/* ==========================================================================
   Leaf API demo kit: shared styles
   ========================================================================== */

:root {
  --bg: #faf8f6;
  --fg: #1a4d2e;
  --fg-soft: rgba(26, 77, 46, 0.72);
  --fg-mute: rgba(26, 77, 46, 0.5);
  --card: #ffffff;
  --primary: #2d7a4f;
  --primary-hover: #256842;
  --primary-fg: #ffffff;
  --secondary: #f0ebe3;
  --muted: #e8ddf5;
  --border: #e0d5ca;
  --input: #ffffff;
  --danger: #c41e3a;
  --dark: #0f2818;
  --dark-2: #1a3a2a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(26, 77, 46, 0.06), 0 1px 3px rgba(26, 77, 46, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 40, 24, 0.12);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--fg);
  background: linear-gradient(180deg, var(--secondary) 0%, var(--bg) 280px);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--primary); }

/* ---------- Shell ---------- */
.leaf-shell { max-width: 1240px; margin: 0 auto; padding: 16px; }
.leaf-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 14px; flex-wrap: wrap; }
.leaf-brand { display: flex; align-items: center; gap: 10px; }
.leaf-logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: var(--primary-fg);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.leaf-brand-title { font-weight: 700; font-size: 16px; }
.leaf-brand-sub { font-size: 12px; color: var(--fg-mute); display: flex; align-items: center; gap: 6px; }
.leaf-status { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--card);
  border-radius: 999px; padding: 5px 10px; color: var(--fg-soft);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.status-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }

.leaf-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.leaf-app {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  padding: 22px; min-height: 520px; min-width: 0;
}
.leaf-stage { min-width: 0; }
/* The demo's own layouts respond to the space the demo really has (page, tablet or phone), not the window. */
.leaf-screen { container: site / inline-size; }
@media (max-width: 960px) { .leaf-layout { grid-template-columns: minmax(0, 1fr); } }
@container site (max-width: 960px) { .leaf-app { padding: 16px; } }

.leaf-boot { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--fg-mute); font-size: 14px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--secondary); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- API call log ---------- */
.leaf-log {
  background: var(--dark); color: #f0ebe3; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  height: 640px; position: sticky; top: 16px;
}
@media (max-width: 960px) { .leaf-log { position: static; height: 360px; } }
.log-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: 14px; font-weight: 600; }
.log-head .count { color: rgba(255, 255, 255, 0.5); font-weight: 500; font-size: 12px; }
.log-head .spacer { flex: 1; }
.log-head button { background: none; border: 0; color: rgba(255, 255, 255, 0.55); padding: 4px; display: inline-flex; }
.log-head button:hover { color: #fff; }
.pulse { position: relative; width: 8px; height: 8px; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #4ade80; }
.pulse::before { animation: ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite; opacity: 0.6; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
.log-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.log-empty { text-align: center; color: rgba(255, 255, 255, 0.5); font-size: 13px; padding: 40px 16px; line-height: 1.5; }
.log-item { background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 10px; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.log-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.log-copy {
  margin-left: auto; flex-shrink: 0; width: 24px; height: 24px; border: 0; border-radius: 6px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.75); opacity: 0; transition: opacity 0.15s, background 0.15s;
}
.log-copy svg { width: 13px; height: 13px; }
.log-item:hover .log-copy, .log-copy:focus-visible, .log-copy.done { opacity: 1; }
.log-copy:hover { background: #22c55e; color: #052e16; }
.log-copy.done { background: #22c55e; color: #052e16; }
@media (hover: none) { .log-copy { opacity: 1; } }
.log-path { font-family: var(--mono); font-size: 11.5px; color: rgba(255, 255, 255, 0.92); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-body pre { margin: 8px 0 0; max-height: 110px; overflow: auto; background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 8px; font-family: var(--mono); font-size: 11px; line-height: 1.5; color: rgba(255, 255, 255, 0.72); }
.log-result { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; }
.log-result.ok { color: #86efac; }
.log-result.err { color: #fca5a5; }
.log-result .ms { margin-left: auto; color: rgba(255, 255, 255, 0.4); }
.log-result svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ---------- Methods ---------- */
.method { flex-shrink: 0; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 2px 6px; letter-spacing: 0.02em; }
.m-GET { background: #dbeafe; color: #1e40af; }
.m-POST { background: #dcfce7; color: #166534; }
.m-PATCH { background: #f3e8ff; color: #6b21a8; }
.m-PUT { background: #fef9c3; color: #854d0e; }
.m-DELETE { background: #fee2e2; color: #991b1b; }

/* ---------- Primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; border: 1px solid transparent;
  padding: 8px 14px; font-size: 14px; font-weight: 600; background: var(--primary); color: var(--primary-fg); white-space: nowrap; text-decoration: none;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}
.btn:hover:not(:disabled) { background: var(--primary-hover); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-outline { background: var(--card); color: var(--fg); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { background: var(--secondary); border-color: rgba(45, 122, 79, 0.35); }
.btn-ghost { background: transparent; color: var(--fg-soft); }
.btn-ghost:hover:not(:disabled) { background: var(--secondary); color: var(--fg); }
.btn-danger, .btn.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a3182f; border-color: #a3182f; color: #fff; }
.btn-warn, .btn.btn-warn { background: #f59e0b; border-color: #f59e0b; color: #422006; }
.btn-warn:hover:not(:disabled) { background: #d97706; border-color: #d97706; color: #422006; }
/* Armed "click again to confirm" state for destructive buttons. */
.btn.armed { background: var(--danger); border-color: var(--danger); color: #fff; animation: armPulse 1s ease-in-out infinite; }
.btn.armed:hover:not(:disabled) { background: #a3182f; border-color: #a3182f; color: #fff; }
@keyframes armPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.35); } 50% { box-shadow: 0 0 0 5px rgba(196, 30, 58, 0); } }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; padding: 4px; color: var(--fg-mute); display: inline-flex; border-radius: 6px; }
.icon-btn { transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--fg); background: var(--secondary); }
.icon-btn.danger:hover { color: var(--danger); background: #fee2e2; }
.icon-btn.armed, .icon-btn.armed:hover { background: var(--danger); color: #fff; padding: 4px 8px; font-size: 12px; font-weight: 600; gap: 4px; align-items: center; }
.icon-btn svg { width: 15px; height: 15px; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); background: var(--input); border-radius: 9px; padding: 8px 11px; font-size: 14px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.15); }
.textarea { resize: vertical; min-height: 90px; }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.badge-low { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.badge-medium { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.badge-hard { background: #ffe4e6; color: #9f1239; border-color: #fecdd3; }
.badge-expert { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.badge-mobile { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.chip { border: 0; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 500; background: var(--secondary); color: var(--fg-soft); transition: background .15s, color .15s; }
.chip:hover:not(.active) { background: #e7dfd3; color: var(--fg); }
.chip.active { background: var(--primary); color: var(--primary-fg); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--fg-mute); }
.soft { color: var(--fg-soft); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 8px; }
.grid { display: grid; gap: 12px; }
.title { font-size: 20px; font-weight: 700; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-mute); }
.skeleton { background: var(--secondary); border-radius: 10px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }
.error-banner { margin-bottom: 14px; border: 1px solid rgba(196, 30, 58, 0.3); background: rgba(196, 30, 58, 0.08); color: var(--danger); padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none !important; } }

/* ---------- Modal ---------- */
.leaf-overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(15, 40, 24, 0.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.leaf-modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); border-radius: 20px;
  box-shadow: 0 25px 60px rgba(15, 40, 24, 0.3); animation: popIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.modal-hero { padding: 22px 22px 0; display: flex; gap: 14px; align-items: flex-start; }
.modal-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #dcfce7; color: var(--primary); }
.modal-icon.warn { background: #fef3c7; color: #b45309; }
.modal-icon.err { background: #ffe4e6; color: #be123c; }
.modal-icon svg { width: 22px; height: 22px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-sub { font-size: 13.5px; color: var(--fg-soft); margin-top: 4px; line-height: 1.5; }
.modal-body { padding: 18px 22px 22px; }
.modal-close { margin-left: auto; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--fg-soft); margin-bottom: 6px; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 8px; }
.key-input { font-family: var(--mono); letter-spacing: 0.02em; }
.hint { font-size: 12px; color: var(--fg-mute); margin-top: 8px; line-height: 1.5; }
.account-note { display: flex; align-items: center; gap: 6px; color: var(--primary); }
.account-note svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-google { width: 100%; gap: 10px; padding: 10px 14px; color: var(--primary); border-color: var(--primary); }
.btn-google svg { width: 18px; height: 18px; }
.or-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 14px; font-size: 12px; color: var(--fg-mute); }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--secondary); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 19px; }
.stat span { font-size: 11px; color: var(--fg-soft); }
.meter { height: 6px; background: var(--secondary); border-radius: 999px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.5s ease; }
.meter.warn > i { background: #f59e0b; }
.meter.full > i { background: var(--danger); }
.res-list { display: flex; flex-direction: column; gap: 6px; }
.res-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 11px; padding: 9px 10px; }
.res-item.current { border-color: var(--primary); background: rgba(45, 122, 79, 0.05); }
.res-item .grow { flex: 1; min-width: 0; }
.res-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-meta { font-size: 11.5px; color: var(--fg-mute); }
.tag { font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 5px; background: var(--secondary); color: var(--fg-soft); }
.tag.green { background: #dcfce7; color: #166534; }
.tag.red { background: #ffe4e6; color: #9f1239; }
.need-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px dashed #c4b5fd; background: #f5f3ff; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.need-box p { flex-basis: 100%; margin: 0; }
.need-facts { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--fg-soft); }
.need-facts b { color: #6d28d9; }
.need-count { display: flex; align-items: baseline; gap: 6px; }
.need-count b { font-size: 30px; font-weight: 800; color: #6d28d9; line-height: 1; transition: transform .2s; }
.need-count span { font-size: 12px; color: var(--fg-soft); }
.need-slots { display: flex; gap: 5px; }
.need-slots i { width: 22px; height: 22px; border-radius: 6px; background: #ddd6fe; border: 2px solid #c4b5fd; }
.need-slots i.used { background: #7c3aed; border-color: #7c3aed; }
.need-slots i.just-freed { animation: popIn .35s ease; background: #dcfce7; border-color: #22c55e; }
.res-item.freed { opacity: .55; border-style: dashed; }
/* Project choice rows: info on the left, the two choices (each with an optional Recommended badge) on the right. */
.res-item.res-choice { flex-wrap: wrap; row-gap: 10px; }
.res-choice-info { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; }
.res-choice-actions { display: flex; align-items: flex-end; gap: 8px; margin-left: auto; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.choice.recommended .btn-warn { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3); }
.choice.recommended .btn-danger { box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.22); }
.rec-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.rec-badge svg { width: 10px; height: 10px; fill: currentColor; }
.rec-badge.use { background: #fef3c7; color: #92400e; }
.rec-badge.delete { background: #ffe4e6; color: #9f1239; }
.res-meta.fit-ok { color: #166534; }
.res-meta.fit-short { color: #9f1239; }
.res-meta.fit-tight { color: #92400e; }
.res-item.suggested { border-color: rgba(196, 30, 58, 0.45); background: rgba(196, 30, 58, 0.04); }
.ok-box { border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.warn-box { border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.progress-line { height: 4px; background: var(--secondary); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress-line > i { display: block; height: 100%; background: var(--primary); transition: width 0.25s; }

/* ---------- Toast ---------- */
.leaf-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: var(--dark); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: popIn 0.25s ease;
}

/* ==========================================================================
   Device preview (website / tablet / mobile): only the demo goes in the frame
   ========================================================================== */
.leaf-statusbar, .leaf-homebar { display: none; }
.leaf-device { position: relative; }
html:not([data-device="desktop"]) .leaf-layout { align-items: stretch; }
html:not([data-device="desktop"]) .leaf-stage {
  display: flex; justify-content: center; align-items: flex-start; padding: 18px 12px; border-radius: 18px; border: 1px solid var(--border);
  background: radial-gradient(circle at 30% 20%, rgba(45,122,79,.12), transparent 50%), radial-gradient(circle at 80% 80%, rgba(139,92,246,.10), transparent 45%), #ece7df;
}
html:not([data-device="desktop"]) .leaf-device {
  display: flex; flex-direction: column; overflow: hidden; background: var(--card); flex-shrink: 0;
  border: 12px solid #121212; box-shadow: 0 0 0 2px #3a3a3a, 0 30px 70px rgba(0,0,0,.28);
}
/* Real device proportions (390×844 phone, 820×1180 tablet). leaf-api.js zooms the whole frame down to fit the
   window instead of squashing its height, so the preview always has the shape of a real device. */
html[data-device="mobile"] .leaf-device { width: 390px; height: 844px; border-radius: 56px; --leaf-screen-r: 44px; }
html[data-device="tablet"] .leaf-device { width: 820px; height: 1180px; border-radius: 38px; border-width: 16px; --leaf-screen-r: 22px; }
html:not([data-device="desktop"]) .leaf-screen { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
/* Chrome (GPU compositing) ignores the frame's rounded overflow clip for backdrop-filter, so a blurred bottom nav or
   sheet backdrop paints square corners over the frame. A solid mask forces a real mask layer that clips to the
   element's own rounded corners (radius = frame radius - border). clip-path: inset() is not enough for sticky navs. */
html:not([data-device="desktop"]) .leaf-screen,
html:not([data-device="desktop"]) .leaf-device > .in-device { -webkit-mask-image: linear-gradient(#000, #000); mask-image: linear-gradient(#000, #000); }
html:not([data-device="desktop"]) .leaf-screen { border-radius: 0 0 var(--leaf-screen-r) var(--leaf-screen-r); }
html:not([data-device="desktop"]) .leaf-device > .in-device { border-radius: var(--leaf-screen-r); overflow: hidden; }
html:not([data-device="desktop"]) .leaf-screen::-webkit-scrollbar { width: 0; }
html:not([data-device="desktop"]) .leaf-app { border: 0; border-radius: 0; box-shadow: none; min-height: 100%; padding: 16px 16px 28px; }
/* Apps drawn edge to edge (chat, full-screen tools): a root with .leaf-bleed fills the whole device screen with no
   white gutter around it, the way a native app does. */
html:not([data-device="desktop"]) .leaf-app:has(> .leaf-bleed) { padding: 0; display: flex; flex-direction: column; }
html:not([data-device="desktop"]) .leaf-app > .leaf-bleed { flex: 1; min-height: 0; border: 0; border-radius: 0; }
/* The API calls panel stays beside the device and matches its height. */
html:not([data-device="desktop"]) .leaf-log { height: auto; contain: size; position: static; }
@media (max-width: 960px) { html:not([data-device="desktop"]) .leaf-log { contain: none; height: 360px; } }
html:not([data-device="desktop"]) .leaf-statusbar {
  display: flex; align-items: center; justify-content: space-between; position: relative; flex-shrink: 0;
  padding: 0 26px; height: 48px; font-size: 15px; font-weight: 600; color: #111; background: var(--card);
}
html[data-device="tablet"] .leaf-statusbar { height: 30px; font-size: 12px; padding: 0 20px; }
.sb-island { position: absolute; left: 50%; top: 11px; width: 122px; height: 34px; transform: translateX(-50%); background: #000; border-radius: 999px; }
html[data-device="tablet"] .sb-island { width: 8px; height: 8px; top: 11px; background: #2a2a2a; }
.sb-icons { display: inline-flex; align-items: center; gap: 6px; }
.sb-icons svg { fill: #111; }
.sb-battery { position: relative; width: 25px; height: 12px; border: 1.5px solid rgba(0,0,0,.45); border-radius: 4px; padding: 1.5px; }
.sb-battery::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: rgba(0,0,0,.45); border-radius: 0 2px 2px 0; }
.sb-level { display: block; height: 100%; width: 100%; background: #111; border-radius: 1.5px; }
.sb-level.low { background: #ef4444; }
html:not([data-device="desktop"]) .leaf-homebar {
  display: block; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 999px; background: #111; opacity: .85; z-index: 5; pointer-events: none;
}
html[data-device="tablet"] .leaf-homebar { width: 180px; }
/* The demo's own toasts appear on the device screen. */
.leaf-device > .leaf-toast { position: absolute; }

/* ---------- Top bar controls: preview size + settings ---------- */
.tb-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); background: var(--card); border-radius: 999px; }
.tb-seg-btn, .tb-btn {
  width: 30px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: var(--fg-mute);
  display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, color .15s;
}
.tb-seg-btn svg, .tb-btn svg { width: 16px; height: 16px; }
.tb-seg-btn:hover, .tb-btn:hover { color: var(--fg); background: var(--secondary); }
.tb-seg-btn.on { background: var(--primary); color: var(--primary-fg); }
.tb-btn { width: 36px; height: 36px; border: 1px solid var(--border); background: var(--card); }
.tb-btn:hover svg { animation: spin 2s linear infinite; }
@media (max-width: 600px) { .tb-seg { display: none; } }

/* ---------- Narrow demo widths (mobile preview, small screens) ---------- */
@media (max-width: 480px) {
  .leaf-shell { padding: 12px; }
  .leaf-status .status-chip { font-size: 11px; }
  .stat-grid { gap: 6px; }
}
@container site (max-width: 480px) {
  .leaf-app { padding: 14px; border-radius: 14px; min-height: 0; }
  .title { font-size: 18px; }
}

/* ---------- Eyewear Store ("Iris & Ash") ----------
   Warm paper background, ink type, a terracotta accent and a serif display face for headings.
   Radius scale 10 / 14 / 20 / 28, spacing on a 4 / 8 px rhythm, 16 px phone gutters.
   Layout: phone first; container queries on `site` take over at 640 (top nav, two-column pages), 760 (filters
   sidebar) and 900 px (roomier grids). */
.leaf-app:has(> .ey) { background: #f8f5f0; overflow: clip; }
html[data-device="desktop"] .leaf-app:has(> .ey) { padding: 0; }
.ey, .ey-sheet-host {
  --ey-ink: #17181d;
  --ey-ink-2: #2b2d35;
  --ey-paper: #f8f5f0;
  --ey-paper-2: #f1ece4;
  --ey-card: #ffffff;
  --ey-line: #e7e0d6;
  --ey-line-2: #d8cfc2;
  --ey-soft: #514c46;
  --ey-mute: #857e75;
  --ey-accent: #c2512b;
  --ey-accent-2: #a8421f;
  --ey-accent-soft: #f8e5da;
  --ey-sage: #e3ebe1;
  --ey-good: #2f7d4f;
  --ey-danger: #c4342b;
  --ey-r-sm: 10px;
  --ey-r: 14px;
  --ey-r-lg: 20px;
  --ey-r-xl: 28px;
  --ey-ease: cubic-bezier(.2, .8, .2, 1);
  --ey-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --ey-shadow: 0 1px 2px rgba(23, 24, 29, .05), 0 4px 14px rgba(23, 24, 29, .06);
  --ey-shadow-lg: 0 18px 44px rgba(23, 24, 29, .16);
  --ey-tortoise: radial-gradient(circle at 30% 30%, #3b1d0b 0 18%, transparent 19%), radial-gradient(circle at 72% 64%, #b36f2e 0 20%, transparent 21%), radial-gradient(circle at 70% 22%, #2a1408 0 12%, transparent 13%), #7a431d;
  /* Base kit tokens, re-skinned so shared primitives (.skeleton, .input) match. */
  --fg: var(--ey-ink);
  --fg-soft: var(--ey-soft);
  --fg-mute: var(--ey-mute);
  --primary: var(--ey-ink);
  --secondary: var(--ey-paper-2);
  --border: var(--ey-line);
  --card: var(--ey-card);
  color: var(--ey-ink);
  font-family: var(--font);
}
/* Lift the shared toast above the bottom tab bar on phones. */
html[data-device="mobile"] .leaf-device:has(.ey) > .leaf-toast { bottom: 104px; }
.leaf-device:has(.ey) > .leaf-toast, body:has(.ey) > .leaf-toast { pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
@media (max-width: 640px) { html[data-device="desktop"] body:has(.ey) > .leaf-toast { bottom: 84px; } }
.ey { min-height: 100%; display: flex; flex-direction: column; background: var(--ey-paper); }
.ey .grow, .ey-sheet-host .grow { flex: 1; min-width: 0; }
.ey .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ey button, .ey-sheet-host button { -webkit-tap-highlight-color: transparent; }
.ey :focus-visible, .ey-sheet-host :focus-visible { outline: 2px solid var(--ey-accent); outline-offset: 2px; }
.ey-frame { display: block; width: 100%; height: auto; overflow: visible; }
.ey-display { font-family: var(--ey-display); font-weight: 600; letter-spacing: -.012em; line-height: 1.12; text-wrap: balance; }
.ey-search input:focus-visible, .ey-input:focus-visible { outline: none; }
.ey-h1 { font-size: 30px; }
.ey-h2 { font-family: var(--ey-display); font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.ey-kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ey-accent); margin-bottom: 4px; }
.ey-hint { font-size: 12.5px; color: var(--ey-mute); line-height: 1.5; }
.ey-hint.center { text-align: center; margin-top: 16px; }
.ey-note { font-size: 12.5px; color: var(--ey-mute); margin-top: 4px; }
.ey-err { font-size: 12.5px; color: var(--ey-danger); margin-top: 8px; font-weight: 600; }

/* ---------- Buttons ---------- */
.ey-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; font-size: 14px; font-weight: 650; white-space: nowrap; text-decoration: none;
  background: var(--ey-ink); color: #fff; transition: background .2s var(--ey-ease), transform .15s var(--ey-ease), box-shadow .2s var(--ey-ease), border-color .2s, color .2s;
}
.ey-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.ey-btn.sm { padding: 0 14px; font-size: 13px; }
.ey-btn.sm svg { width: 15px; height: 15px; }
.ey-btn.lg { min-height: 52px; padding: 0 22px; font-size: 15px; }
.ey-btn.block { width: 100%; }
.ey-btn.grow { flex: 1; }
.ey-btn.primary { background: var(--ey-accent); box-shadow: 0 6px 16px rgba(194, 81, 43, .28); }
.ey-btn.dark { background: var(--ey-ink); }
.ey-btn.light { background: #f8f1e7; color: var(--ey-ink); }
.ey-btn.outline { background: var(--ey-card); color: var(--ey-ink); border-color: var(--ey-line-2); }
.ey-btn.ghost { background: transparent; color: var(--ey-soft); border-color: var(--ey-line); }
.ey-btn.danger, .ey-btn.armed { background: var(--ey-danger); color: #fff; border-color: var(--ey-danger); }
.ey-btn:active:not(:disabled) { transform: scale(.97); }
.ey-btn:disabled { opacity: .5; box-shadow: none; }
@media (hover: hover) {
  .ey-btn:hover:not(:disabled) { transform: translateY(-1px); }
  .ey-btn.primary:hover:not(:disabled) { background: var(--ey-accent-2); box-shadow: 0 10px 22px rgba(194, 81, 43, .32); }
  .ey-btn.dark:hover:not(:disabled) { background: #000; }
  .ey-btn.light:hover:not(:disabled) { background: #fff; }
  .ey-btn.outline:hover:not(:disabled), .ey-btn.ghost:hover:not(:disabled) { border-color: var(--ey-ink); color: var(--ey-ink); }
  .ey-btn:active:not(:disabled) { transform: scale(.97); }
}
.ey-link { border: 0; background: none; padding: 0; color: var(--ey-ink); font-weight: 650; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ey-line-2); display: inline-flex; align-items: center; gap: 5px; transition: color .15s, text-decoration-color .15s; }
.ey-link svg { width: 15px; height: 15px; }
.ey-link.danger { color: var(--ey-danger); text-decoration: none; }
@media (hover: hover) { .ey-link:hover { text-decoration-color: currentColor; } .ey-link.danger:hover { color: #9b2019; } }
.ey-round { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--ey-line); background: var(--ey-card); display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--ey-soft); transition: background .15s, transform .15s var(--ey-ease); }
.ey-round svg { width: 18px; height: 18px; }
.ey-round:active { transform: scale(.94); }
@media (hover: hover) { .ey-round:hover { background: var(--ey-paper-2); color: var(--ey-ink); } }
.ey-input { width: 100%; min-height: 44px; border: 1px solid var(--ey-line-2); border-radius: 999px; padding: 0 16px; background: var(--ey-card); font-size: 14px; outline: none; text-transform: uppercase; letter-spacing: .06em; transition: border-color .15s, box-shadow .15s; }
.ey-input::placeholder { text-transform: none; letter-spacing: 0; color: var(--ey-mute); }
.ey-input:focus { border-color: var(--ey-ink); box-shadow: 0 0 0 3px rgba(23, 24, 29, .1); }

/* ---------- Top bar + navigation ---------- */
.ey-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px; background: rgba(248, 245, 240, .92); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--ey-line); }
.ey-brand { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; min-height: 44px; border-radius: 12px; }
.ey-logo { width: 38px; height: 38px; border-radius: 12px; background: var(--ey-ink); display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; transition: transform .3s var(--ey-ease); }
.ey-brand:active .ey-logo { transform: scale(.94); }
@media (hover: hover) { .ey-brand:hover .ey-logo { transform: rotate(-6deg); } }
.ey-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.ey-brand-text b { font-family: var(--ey-display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.ey-brand-text i { color: var(--ey-accent); font-style: italic; }
.ey-brand-text small { font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ey-mute); margin-top: 3px; }
.ey-top-perk { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ey-soft); background: var(--ey-card); border: 1px solid var(--ey-line); border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.ey-top-perk svg { width: 13px; height: 13px; color: var(--ey-accent); }
.ey-view { flex: 1; min-width: 0; padding: 16px 16px 28px; }

.ey-nav { position: sticky; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px 6px 8px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--ey-line); box-shadow: 0 -8px 24px rgba(23, 24, 29, .05); }
html:not([data-device="desktop"]) .ey-nav { padding-bottom: 22px; }
.ey-tab { border: 0; background: none; min-height: 52px; padding: 4px 0; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ey-mute); font-size: 11px; font-weight: 650; transition: color .2s; }
.ey-tab-ico { position: relative; width: 52px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; transition: background .25s var(--ey-ease), color .25s, transform .2s var(--ey-ease); }
.ey-tab-ico svg { width: 21px; height: 21px; }
.ey-tab.on { color: var(--ey-ink); }
.ey-tab.on .ey-tab-ico { background: var(--ey-ink); color: #fff; }
.ey-tab:active .ey-tab-ico { transform: scale(.92); }
@media (hover: hover) { .ey-tab:hover:not(.on) { color: var(--ey-ink); } .ey-tab:hover:not(.on) .ey-tab-ico { background: var(--ey-paper-2); } }
.ey-badge { position: absolute; top: -5px; right: 4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--ey-accent); color: #fff; font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.ey-dotw { position: absolute; top: 3px; right: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--ey-accent); border: 2px solid #fff; }
.ey-tab.on .ey-dotw { border-color: var(--ey-ink); }

/* ---------- Page scaffolding ---------- */
.ey-sec { margin-top: 28px; }
.ey-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ey-sec-sub { font-size: 12.5px; color: var(--ey-mute); }
.ey-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 18px; }
.ey-count { font-size: 13px; color: var(--ey-mute); font-weight: 600; padding-bottom: 4px; }

/* ---------- Hero carousel ---------- */
.ey-hero { position: relative; border-radius: var(--ey-r-xl); overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; box-shadow: var(--ey-shadow); }
.ey-hero-track { display: flex; transition: transform .55s var(--ey-ease); }
.ey-hero-track.dragging { transition: none; }
.ey-slide { position: relative; flex: 0 0 100%; min-height: 212px; padding: 22px 20px 40px; display: flex; align-items: center; overflow: hidden; }
.ey-hero-a { background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .55), transparent 45%), linear-gradient(135deg, #f7dcc8 0%, #f0b999 55%, #e69876 100%); }
.ey-hero-b { background: radial-gradient(circle at 80% 30%, rgba(255, 255, 255, .6), transparent 50%), linear-gradient(135deg, #e7eee4, #c6d6c3); }
.ey-hero-c { background: radial-gradient(circle at 80% 25%, rgba(194, 81, 43, .45), transparent 50%), linear-gradient(135deg, #1c1e28, #3a2c33); color: #f8f1e7; }
.ey-slide-copy { position: relative; z-index: 1; max-width: 60%; display: flex; flex-direction: column; align-items: flex-start; }
.ey-slide .ey-kicker { color: inherit; opacity: .7; }
.ey-hero-c .ey-kicker { color: #f2a88b; opacity: 1; }
.ey-slide h2 { font-size: 25px; }
.ey-slide-text { font-size: 13px; line-height: 1.45; margin: 8px 0 14px; opacity: .78; }
.ey-slide-art { position: absolute; right: -14px; top: 50%; width: 52%; transform: translateY(-46%) rotate(-9deg); filter: drop-shadow(0 16px 18px rgba(23, 24, 29, .25)); pointer-events: none; }
.ey-dots { position: absolute; left: 20px; bottom: 12px; display: flex; gap: 2px; }
.ey-dots button { width: 26px; height: 24px; border: 0; padding: 0; background: none; display: inline-flex; align-items: center; }
.ey-dots button::before { content: ""; display: block; width: 8px; height: 8px; border-radius: 999px; background: currentColor; opacity: .3; transition: width .35s var(--ey-ease), opacity .3s; }
.ey-dots button.on::before { width: 22px; opacity: .9; }
.ey-hero .ey-dots { color: var(--ey-ink); }
.ey-hero:has(.ey-hero-c[aria-hidden="false"]) .ey-dots { color: #fff; }

/* ---------- Face / shape chips, categories ---------- */
.ey-chiprow { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px; }
.ey-chiprow::-webkit-scrollbar, .ey-rail::-webkit-scrollbar, .ey-catchips::-webkit-scrollbar, .ey-try-rail::-webkit-scrollbar { display: none; }
.ey-facechip { flex: 0 0 auto; width: 196px; scroll-snap-align: start; display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--ey-line); background: var(--ey-card); border-radius: var(--ey-r-lg); padding: 10px 12px; min-height: 64px; transition: border-color .2s, box-shadow .2s, transform .15s var(--ey-ease), background .2s; }
.ey-facechip-ico { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; background: var(--ey-paper-2); display: inline-flex; align-items: center; justify-content: center; color: var(--ey-ink); transition: background .2s, color .2s; }
.ey-facechip-ico svg { width: 24px; height: 24px; }
.ey-facechip b { display: block; font-size: 14px; }
.ey-facechip small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11.5px; color: var(--ey-mute); line-height: 1.3; margin-top: 1px; }
.ey-facechip.on { border-color: var(--ey-ink); box-shadow: inset 0 0 0 1px var(--ey-ink); }
.ey-facechip.on .ey-facechip-ico { background: var(--ey-ink); color: #fff; }
.ey-shapechip { flex: 0 0 auto; width: 98px; scroll-snap-align: start; border: 1px solid var(--ey-line); background: var(--ey-card); border-radius: var(--ey-r); padding: 14px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 650; transition: border-color .2s, box-shadow .2s, transform .15s var(--ey-ease); }
.ey-shapechip .ey-frame { width: 70px; transition: transform .3s var(--ey-ease); }
.ey-shapechip.on { border-color: var(--ey-ink); box-shadow: inset 0 0 0 1px var(--ey-ink); background: #fffdf9; }
.ey-facechip:active, .ey-shapechip:active, .ey-cat:active, .ey-pill:active { transform: scale(.97); }
@media (hover: hover) {
  .ey-facechip:hover, .ey-shapechip:hover { border-color: var(--ey-line-2); box-shadow: var(--ey-shadow); }
  .ey-shapechip:hover .ey-frame { transform: scale(1.08) rotate(-3deg); }
}
.ey-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ey-cat { position: relative; overflow: hidden; border: 0; border-radius: var(--ey-r-lg); background: var(--bg); color: var(--ink); min-height: 112px; padding: 14px; text-align: left; display: flex; flex-direction: column; justify-content: flex-start; transition: transform .2s var(--ey-ease), box-shadow .2s; }
.ey-cat-copy b { display: block; font-family: var(--ey-display); font-size: 17px; font-weight: 600; }
.ey-cat-copy small { display: block; font-size: 11.5px; opacity: .72; margin-top: 2px; max-width: 80%; }
.ey-cat-art { position: absolute; right: -10px; bottom: 6px; width: 64%; transform: rotate(-8deg); filter: drop-shadow(0 8px 10px rgba(23, 24, 29, .2)); transition: transform .35s var(--ey-ease); }
.ey-cat-go { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .7); display: inline-flex; align-items: center; justify-content: center; transition: transform .2s var(--ey-ease), background .2s; }
.ey-cat-go svg { width: 15px; height: 15px; }
@media (hover: hover) {
  .ey-cat:hover { box-shadow: var(--ey-shadow-lg); transform: translateY(-2px); }
  .ey-cat:hover .ey-cat-art { transform: rotate(-2deg) scale(1.06); }
  .ey-cat:hover .ey-cat-go { background: #fff; transform: translateX(2px); }
}

/* ---------- Product cards ---------- */
.ey-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 10px; scroll-padding: 0 16px; }
.ey-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
.ey-card { position: relative; min-width: 0; display: flex; flex-direction: column; cursor: pointer; border-radius: var(--ey-r-lg); outline-offset: 3px; }
.ey-card.rail { flex: 0 0 168px; scroll-snap-align: start; }
.ey-card-media { position: relative; aspect-ratio: 5 / 4; border-radius: var(--ey-r-lg); background: radial-gradient(circle at 50% 38%, #fff 0, #f3eee6 68%); border: 1px solid var(--ey-line); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: border-color .2s, box-shadow .25s var(--ey-ease); }
.ey-card-media.sun { background: radial-gradient(circle at 50% 38%, #fffaf5 0, #f6e7dc 70%); }
.ey-card-svg { width: 80%; filter: drop-shadow(0 8px 8px rgba(23, 24, 29, .14)); transition: transform .45s var(--ey-ease); }
.ey-flag { position: absolute; left: 8px; top: 8px; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--ey-ink); color: #fff; border-radius: 999px; padding: 4px 8px; }
.ey-heart { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; padding: 0; background: none; display: inline-flex; align-items: center; justify-content: center; color: var(--ey-soft); }
.ey-heart::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(23, 24, 29, .1); transition: transform .2s var(--ey-ease); }
.ey-heart svg { position: relative; width: 18px; height: 18px; transition: transform .2s var(--ey-ease), color .2s; }
.ey-heart.on { color: var(--ey-accent); }
.ey-heart:active::before { transform: scale(.9); }
.ey-heart.lg { right: 10px; top: 10px; width: 52px; height: 52px; }
.ey-heart.lg svg { width: 22px; height: 22px; }
@media (hover: hover) { .ey-heart:hover svg { transform: scale(1.15); color: var(--ey-accent); } }
.ey-card-body { padding: 10px 2px 0; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ey-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.ey-card-name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ey-card-meta { font-size: 12px; color: var(--ey-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ey-card-cta { margin-top: 8px; }
.ey-rate { font-size: 11.5px; font-weight: 700; color: var(--ey-ink); white-space: nowrap; }
.ey-rate span { color: var(--ey-mute); font-weight: 500; }
.ey-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; margin-top: 2px; }
.ey-price b { font-size: 15.5px; font-weight: 750; }
.ey-price s { font-size: 12px; color: var(--ey-mute); }
.ey-price em { font-style: normal; font-size: 11.5px; font-weight: 750; color: var(--ey-good); }
.ey-price.lg { margin-top: 14px; gap: 4px 10px; }
.ey-price.lg b { font-size: 28px; font-family: var(--ey-display); }
.ey-price.lg s { font-size: 15px; }
.ey-price.lg em { font-size: 12px; background: #e5f3ea; padding: 3px 8px; border-radius: 999px; }
@media (hover: hover) {
  .ey-card:hover .ey-card-media { border-color: var(--ey-line-2); box-shadow: var(--ey-shadow-lg); }
  .ey-card:hover .ey-card-svg { transform: scale(1.07) rotate(-2deg); }
}
.ey-card:active .ey-card-media { transform: scale(.985); }

/* Colour swatches (small on cards, large on product / try-on). The ::after widens the tap area. */
.ey-swatches { display: flex; align-items: center; gap: 6px; }
.ey-sw { position: relative; width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(23, 24, 29, .18); transition: transform .2s var(--ey-ease), box-shadow .2s; }
.ey-sw::after { content: ""; position: absolute; inset: -9px -3px; }
.ey-sw.on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ey-ink); }
.ey-swatches.lg { gap: 14px; margin-top: 4px; }
.ey-swatches.lg .ey-sw { width: 34px; height: 34px; }
.ey-swatches.lg .ey-sw::after { inset: -5px; }
.ey-sw:active { transform: scale(.9); }
@media (hover: hover) { .ey-sw:hover { transform: scale(1.15); } }

/* ---------- Shop: search, filters, grid ---------- */
.ey-shop { scroll-margin-top: 70px; }
.ey-shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ey-sort select { appearance: none; -webkit-appearance: none; min-height: 40px; border: 1px solid var(--ey-line-2); border-radius: 999px; background-color: var(--ey-card); padding: 0 34px 0 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ey-ink) 50%), linear-gradient(135deg, var(--ey-ink) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; transition: border-color .15s; }
.ey-sort select:hover { border-color: var(--ey-ink); }
.ey-search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 6px 0 16px; border-radius: 999px; background: var(--ey-card); border: 1px solid var(--ey-line); transition: border-color .15s, box-shadow .2s; }
.ey-search:focus-within { border-color: var(--ey-ink); box-shadow: 0 0 0 4px rgba(23, 24, 29, .07); }
.ey-search > svg { width: 18px; height: 18px; color: var(--ey-mute); flex-shrink: 0; }
.ey-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 14.5px; min-height: 44px; }
.ey-search input::-webkit-search-cancel-button { display: none; }
.ey-search-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ey-paper-2); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ey-search-x svg { width: 15px; height: 15px; }
.ey-catchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 12px -16px 14px; padding: 0 16px; }
.ey-pill { flex: 0 0 auto; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ey-line-2); background: var(--ey-card); font-size: 13px; font-weight: 650; color: var(--ey-soft); transition: background .2s, color .2s, border-color .2s, transform .15s var(--ey-ease); }
.ey-pill.on { background: var(--ey-ink); color: #fff; border-color: var(--ey-ink); }
@media (hover: hover) { .ey-pill:hover:not(.on) { border-color: var(--ey-ink); color: var(--ey-ink); } }
.ey-active { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ey-active-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px 0 12px; border-radius: 999px; border: 0; background: var(--ey-accent-soft); color: var(--ey-accent-2); font-size: 12.5px; font-weight: 700; transition: background .15s; }
.ey-active-chip svg { width: 14px; height: 14px; }
@media (hover: hover) { .ey-active-chip:hover { background: #f3d4c3; } }
.ey-filters { display: none; }
.ey-shop-main { min-width: 0; }
.ey-fgroup { padding: 14px 0; border-top: 1px solid var(--ey-line); }
.ey-fgroup h4 { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ey-mute); margin: 0 0 6px 10px; }
.ey-fopt { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--ey-r-sm); background: none; text-align: left; font-size: 13.5px; color: var(--ey-soft); transition: background .15s, color .15s; }
.ey-fopt svg { width: 17px; height: 17px; flex-shrink: 0; }
.ey-fopt small { font-size: 11.5px; color: var(--ey-mute); font-variant-numeric: tabular-nums; }
.ey-fopt.on { background: var(--ey-card); color: var(--ey-ink); font-weight: 700; box-shadow: var(--ey-shadow); }
@media (hover: hover) { .ey-fopt:hover:not(.on) { background: rgba(255, 255, 255, .7); color: var(--ey-ink); } }
.ey-radio { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--ey-line-2); display: inline-flex; align-items: center; justify-content: center; transition: border-color .2s; }
.ey-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ey-ink); transform: scale(0); transition: transform .25s var(--ey-ease); }
.on > .ey-radio { border-color: var(--ey-ink); }
.on > .ey-radio::after { transform: scale(1); }
.ey-filters-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 12px; }
.ey-filters-head b { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.ey-filters-head svg { width: 16px; height: 16px; }

/* Skeletons + empty states */
.ey-skel { display: flex; flex-direction: column; gap: 8px; }
.ey-skel > div { aspect-ratio: 5 / 4; border-radius: var(--ey-r-lg); }
.ey-skel > i { display: block; height: 12px; width: 78%; border-radius: 6px; }
.ey-skel > i.short { width: 46%; }
.ey-skel.rail { flex: 0 0 168px; }
.ey-skel.line { margin-bottom: 12px; }
.ey-skel.line > div { aspect-ratio: auto; height: 120px; }
.ey-empty { text-align: center; padding: 40px 16px 32px; display: flex; flex-direction: column; align-items: center; }
.ey-empty-art { width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--ey-accent-soft)); display: flex; align-items: center; justify-content: center; font-size: 46px; margin-bottom: 16px; box-shadow: inset 0 0 0 1px rgba(194, 81, 43, .12); }
.ey-empty h3 { font-family: var(--ey-display); font-size: 21px; font-weight: 600; }
.ey-empty p { font-size: 14px; color: var(--ey-mute); margin: 6px 0 18px; max-width: 280px; line-height: 1.5; }

/* ---------- Product page ---------- */
.ey-crumbs { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; min-width: 0; }
.ey-back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid var(--ey-line); background: var(--ey-card); font-size: 13px; font-weight: 650; transition: border-color .15s, transform .15s var(--ey-ease); flex-shrink: 0; }
.ey-back svg { width: 17px; height: 17px; }
.ey-back:active { transform: scale(.96); }
@media (hover: hover) { .ey-back:hover { border-color: var(--ey-ink); } .ey-back:hover svg { transform: translateX(-2px); } }
.ey-back svg { transition: transform .2s var(--ey-ease); }
.ey-crumb-path { font-size: 12.5px; color: var(--ey-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ey-crumb-path b { color: var(--ey-ink); }
.ey-pdp-grid { display: grid; gap: 20px; }
.ey-pdp-media { min-width: 0; }
.ey-stage { position: relative; aspect-ratio: 4 / 3; border-radius: var(--ey-r-xl); overflow: hidden; background: radial-gradient(circle at 50% 40%, #fff 0, #f2ece3 70%); border: 1px solid var(--ey-line); display: flex; align-items: center; justify-content: center; cursor: zoom-in; perspective: 700px; }
.ey-stage.sun { background: radial-gradient(circle at 50% 40%, #fffaf5 0, #f4e3d6 72%); }
.ey-stage-svg { width: 82%; filter: drop-shadow(0 18px 16px rgba(23, 24, 29, .18)); transform-origin: var(--ox, 50%) var(--oy, 50%); transition: transform .4s var(--ey-ease); }
.ey-stage.zoomed { cursor: zoom-out; }
.ey-stage.zoomed .ey-stage-svg { transform: scale(1.7); }
@media (hover: hover) { .ey-stage:not(.zoomed):hover .ey-stage-svg { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(1.1); } }
.ey-stage-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ey-soft); background: rgba(255, 255, 255, .8); border-radius: 999px; padding: 5px 10px; white-space: nowrap; pointer-events: none; }
.ey-stage-hint svg { width: 13px; height: 13px; }
.ey-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.ey-thumb { flex: 1; max-width: 104px; aspect-ratio: 4 / 3; border-radius: var(--ey-r); border: 1px solid var(--ey-line); background: var(--ey-card); padding: 8px; display: flex; align-items: center; transition: border-color .2s, box-shadow .2s, transform .15s var(--ey-ease); }
.ey-thumb.on { border-color: var(--ey-ink); box-shadow: inset 0 0 0 1px var(--ey-ink); }
.ey-thumb:active { transform: scale(.96); }
@media (hover: hover) { .ey-thumb:hover:not(.on) { border-color: var(--ey-line-2); } }
.ey-pdp-info { min-width: 0; }
.ey-pdp-name { font-size: 34px; }
.ey-pdp-rate { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
.ey-pdp-rate span:last-child { color: var(--ey-mute); }
.ey-stars { position: relative; display: inline-block; font-size: 15px; letter-spacing: 1px; color: #e3dbcf; line-height: 1; }
.ey-stars::before { content: "★★★★★"; position: absolute; inset: 0; width: var(--r); overflow: hidden; color: #d9962b; }
.ey-label { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ey-ink); margin: 22px 0 10px; }
.ey-label span { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ey-mute); }
.ey-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: var(--ey-r); background: var(--ey-paper-2); }
.ey-seg button { min-height: 52px; border: 0; border-radius: var(--ey-r-sm); background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ey-soft); transition: background .2s, color .2s, box-shadow .2s, transform .15s var(--ey-ease); }
.ey-seg button b { font-size: 13.5px; }
.ey-seg button small { font-size: 11px; color: var(--ey-mute); }
.ey-seg button svg { width: 20px; height: 20px; }
.ey-seg button.on { background: var(--ey-card); color: var(--ey-ink); box-shadow: 0 1px 2px rgba(23, 24, 29, .08), 0 4px 10px rgba(23, 24, 29, .06); }
.ey-seg button:active { transform: scale(.97); }
@media (hover: hover) { .ey-seg button:hover:not(.on) { color: var(--ey-ink); background: rgba(255, 255, 255, .5); } }
.ey-seg.four button b { font-size: 12px; }
.ey-cta-row { display: flex; gap: 10px; margin-top: 22px; }
.ey-cta-row .ey-btn { flex: 1; }
.ey-cta-row .ey-btn.outline { flex: 0 0 auto; }
.ey-perks { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ey-perks li { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ey-soft); background: var(--ey-card); border: 1px solid var(--ey-line); border-radius: 999px; padding: 6px 12px 6px 8px; }
.ey-fit-faces { display: flex; flex-wrap: wrap; gap: 8px; }
.ey-fit-faces span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--ey-paper-2); color: var(--ey-mute); }
.ey-fit-faces span svg { width: 17px; height: 17px; }
.ey-fit-faces span.yes { background: #e5f3ea; color: var(--ey-good); }
.ey-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0; }
.ey-specs div { padding: 10px 0; border-bottom: 1px solid var(--ey-line); min-width: 0; }
.ey-specs dt { font-size: 11.5px; color: var(--ey-mute); }
.ey-specs dd { margin: 2px 0 0; font-size: 14px; font-weight: 650; }

/* ---------- Try on ---------- */
.ey-try { display: grid; gap: 18px; }
.ey-try-stage { position: relative; aspect-ratio: 1 / 1.02; border-radius: var(--ey-r-xl); overflow: hidden; background: radial-gradient(circle at 50% 35%, #fffaf3 0, #efe4d6 62%, #e3d4c1 100%); display: flex; align-items: flex-end; justify-content: center; touch-action: pan-y; user-select: none; -webkit-user-select: none; box-shadow: inset 0 0 0 1px var(--ey-line); }
.ey-try-stage::before { content: ""; position: absolute; left: 10%; right: 10%; top: 8%; height: 60%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .7), transparent 65%); }
.ey-face-wrap { position: relative; width: 86%; height: 92%; cursor: grab; transition: transform .35s var(--ey-ease); }
.ey-face-wrap.dragging { transition: none; cursor: grabbing; }
.ey-face { display: block; width: 100%; height: 100%; }
.ey-try-arrow { position: absolute; top: 46%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); box-shadow: var(--ey-shadow); display: inline-flex; align-items: center; justify-content: center; padding: 0; color: var(--ey-ink); transition: transform .15s var(--ey-ease), background .15s; }
.ey-try-arrow svg { width: 20px; height: 20px; }
.ey-try-arrow.prev { left: 10px; }
.ey-try-arrow.next { right: 10px; }
.ey-try-arrow:active { transform: scale(.92); }
@media (hover: hover) { .ey-try-arrow:hover { background: #fff; transform: scale(1.06); } }
.ey-try-count { position: absolute; left: 12px; top: 12px; z-index: 2; font-size: 12px; font-weight: 700; background: rgba(23, 24, 29, .78); color: #fff; padding: 5px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.ey-cam-toggle { position: absolute; right: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 12px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .94); box-shadow: var(--ey-shadow); font-size: 12.5px; font-weight: 700; transition: background .15s, transform .15s var(--ey-ease); }
.ey-cam-toggle svg { width: 17px; height: 17px; }
.ey-cam-toggle.on { background: var(--ey-ink); color: #fff; }
.ey-cam-toggle:active { transform: scale(.96); }
.ey-match { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; white-space: nowrap; font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ey-soft); box-shadow: var(--ey-shadow); }
.ey-match.yes { background: #e5f3ea; color: var(--ey-good); }
.ey-try-stage.cam { background: #111; align-items: stretch; }
.ey-try-stage.cam::before { display: none; }
.ey-cam { position: absolute; inset: 0; }
.ey-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
.ey-cam-frame { position: absolute; z-index: 1; width: 54%; transform: translate(-50%, -50%) scale(var(--s, 1)); cursor: grab; touch-action: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.ey-cam-frame.dragging { cursor: grabbing; }
.ey-cam-frame .ey-frame { pointer-events: none; }
.ey-cam-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .55); padding: 7px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none; }
.ey-try-panel { min-width: 0; }
.ey-try-info { display: flex; align-items: flex-start; gap: 8px; }
.ey-try-info .ey-heart { position: relative; right: auto; top: auto; flex-shrink: 0; margin: -4px -6px 0 0; }
.ey-try-name { font-size: 28px; }
.ey-try-panel > .ey-swatches { margin-top: 14px; }
.ey-range { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ey-range input { width: 100%; accent-color: var(--ey-accent); min-height: 32px; }
.ey-skins { display: flex; gap: 12px; flex-wrap: wrap; }
.ey-skins button { width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; background: radial-gradient(circle at 35% 30%, var(--c), var(--d)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: transform .2s var(--ey-ease), box-shadow .2s; }
.ey-skins button.on { box-shadow: 0 0 0 3px var(--ey-paper), 0 0 0 5px var(--ey-ink); }
.ey-skins button:active { transform: scale(.9); }
@media (hover: hover) { .ey-skins button:hover { transform: scale(1.1); } }
.ey-try-rail { position: relative; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x proximity; }
.ey-try-pick { flex: 0 0 96px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 8px; border-radius: var(--ey-r); border: 1px solid var(--ey-line); background: var(--ey-card); transition: border-color .2s, box-shadow .2s, transform .15s var(--ey-ease); }
.ey-try-pick .ey-frame { width: 72px; }
.ey-try-pick span { font-size: 11.5px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ey-try-pick.on { border-color: var(--ey-ink); box-shadow: inset 0 0 0 1px var(--ey-ink); }
.ey-try-pick:active { transform: scale(.96); }
@media (hover: hover) { .ey-try-pick:hover:not(.on) { border-color: var(--ey-line-2); box-shadow: var(--ey-shadow); } }

/* ---------- Cart ---------- */
.ey-cart { display: grid; gap: 18px; align-items: start; }
.ey-lines { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ey-ship { background: var(--ey-card); border: 1px solid var(--ey-line); border-radius: var(--ey-r); padding: 12px 14px; font-size: 13px; color: var(--ey-soft); }
.ey-ship i { display: block; height: 6px; margin-top: 8px; border-radius: 999px; background: var(--ey-paper-2); overflow: hidden; }
.ey-ship em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e08a63, var(--ey-accent)); transition: width .6s var(--ey-ease); }
.ey-ship.done em { background: linear-gradient(90deg, #5aa877, var(--ey-good)); }
.ey-swipe { position: relative; border-radius: var(--ey-r-lg); }
.ey-swipe-bg { position: absolute; inset: 1px; border-radius: inherit; background: var(--ey-danger); display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-right: 22px; color: #fff; font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .2s; }
.ey-swipe:has(.ey-line.dragging) .ey-swipe-bg, .ey-swipe[style*="--reveal"] .ey-swipe-bg { opacity: calc(.35 + var(--reveal, 0) * .65); transition: none; }
.ey-swipe-bg svg { width: 18px; height: 18px; }
.ey-line { position: relative; display: flex; gap: 12px; padding: 12px; background: var(--ey-card); border: 1px solid var(--ey-line); border-radius: var(--ey-r-lg); touch-action: pan-y; transition: transform .25s var(--ey-ease); }
.ey-line.dragging { transition: none; }
.ey-line-media { flex: 0 0 92px; height: 74px; border-radius: var(--ey-r); border: 0; background: radial-gradient(circle at 50% 40%, #fff, #f1ebe2 72%); display: flex; align-items: center; justify-content: center; padding: 8px; transition: transform .15s var(--ey-ease); }
.ey-line-media:active { transform: scale(.96); }
.ey-line-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ey-line-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.ey-line-top b:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ey-line-price { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.ey-line-meta, .ey-line-lens, .ey-line-power { font-size: 12px; color: var(--ey-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ey-line-lens { color: var(--ey-soft); font-weight: 600; }
.ey-line-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ey-qty { display: inline-flex; align-items: center; border: 1px solid var(--ey-line-2); border-radius: 999px; background: var(--ey-card); }
.ey-qty button { width: 44px; height: 40px; border: 0; background: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, transform .15s var(--ey-ease); }
.ey-qty button svg { width: 15px; height: 15px; }
.ey-qty button:active:not(:disabled) { transform: scale(.88); }
.ey-qty b { min-width: 20px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .ey-qty button:hover:not(:disabled) { background: var(--ey-paper-2); } }
.ey-line-actions .ey-link { min-height: 40px; }
.ey-summary-card { background: var(--ey-card); border: 1px solid var(--ey-line); border-radius: var(--ey-r-lg); padding: 16px; box-shadow: var(--ey-shadow); display: flex; flex-direction: column; gap: 14px; }
.ey-coupon-row { display: flex; gap: 8px; }
.ey-coupon .ey-hint { margin-top: 8px; }
.ey-coupon-on { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--ey-r); border: 1.5px dashed #9cc9ac; background: #eef7f0; }
.ey-coupon-on svg { width: 18px; height: 18px; color: var(--ey-good); flex-shrink: 0; }
.ey-coupon-on b { display: block; font-size: 13.5px; letter-spacing: .06em; }
.ey-coupon-on small { font-size: 12px; color: var(--ey-good); }
.ey-sum { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--ey-line); padding-top: 14px; }
.ey-sum > div { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ey-soft); }
.ey-sum > div b { color: var(--ey-ink); font-variant-numeric: tabular-nums; }
.ey-sum > div.good, .ey-sum > div.good b { color: var(--ey-good); }
.ey-sum > div.total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--ey-line); font-size: 15px; color: var(--ey-ink); font-weight: 700; }
.ey-sum > div.total b { font-family: var(--ey-display); font-size: 24px; }
.ey-save { font-size: 12.5px; font-weight: 700; color: var(--ey-good); background: #e9f4ec; border-radius: var(--ey-r-sm); padding: 8px 10px; text-align: center; }
.ey-addr { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ey-mute); }
.ey-addr svg { width: 15px; height: 15px; flex-shrink: 0; }
.ey-tick { display: inline-block; }

/* ---------- Orders ---------- */
.ey-orders { display: grid; gap: 14px; }
.ey-order { background: var(--ey-card); border: 1px solid var(--ey-line); border-radius: var(--ey-r-lg); padding: 16px; box-shadow: var(--ey-shadow); min-width: 0; }
.ey-order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ey-order-head > div { min-width: 0; display: flex; flex-direction: column; }
.ey-order-no { font-size: 15px; }
.ey-order-head span:not(.ey-status) { font-size: 12.5px; color: var(--ey-mute); margin-top: 2px; }
.ey-status { flex-shrink: 0; font-size: 12px; font-weight: 750; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.s-placed { background: #eceffa; color: #2c3a66; }
.s-cut { background: #f2ebfb; color: #5b3a8c; }
.s-qc { background: #fff2d6; color: #845300; }
.s-shipped { background: #e4eefb; color: #1d4f8a; }
.s-delivered { background: #e5f3ea; color: #1f6a3f; }
.ey-order-items { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; }
.ey-order-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ey-order-thumb { flex: 0 0 68px; height: 50px; border-radius: 12px; background: var(--ey-paper); display: flex; align-items: center; padding: 6px; }
.ey-order-item b { display: block; font-size: 14px; }
.ey-order-item small { display: block; font-size: 12px; color: var(--ey-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ey-track { position: relative; margin: 16px -4px 4px; }
.ey-track-line { position: absolute; top: 15px; left: calc(100% / var(--n) / 2); right: calc(100% / var(--n) / 2); height: 3px; border-radius: 999px; background: var(--ey-paper-2); overflow: hidden; }
.ey-track-line i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ey-ink), var(--ey-accent)); transition: width .9s var(--ey-ease); }
.ey-track ol { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
.ey-track li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 0 2px; min-width: 0; }
.ey-track-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--ey-card); border: 2px solid var(--ey-line-2); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; transition: background .3s, border-color .3s, color .3s; }
.ey-track li.done .ey-track-dot { background: var(--ey-ink); border-color: var(--ey-ink); color: #fff; font-size: 13px; }
.ey-track li.on .ey-track-dot { background: var(--ey-accent-soft); border-color: var(--ey-accent); }
.ey-track li b { font-size: 10.5px; font-weight: 700; line-height: 1.2; color: var(--ey-mute); }
.ey-track li.done b, .ey-track li.on b { color: var(--ey-ink); }
.ey-track li small { font-size: 10px; color: var(--ey-mute); min-height: 12px; }
.ey-order-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ey-line); }
.ey-eta { font-size: 12.5px; color: var(--ey-soft); min-width: 0; }
.ey-order.done { box-shadow: none; }

/* ---------- Lens builder sheet ---------- */
.ey-sheet-host { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.ey-sheet-host.in-device { position: absolute; border-radius: inherit; overflow: hidden; }
.ey-backdrop { position: absolute; inset: 0; background: rgba(23, 24, 29, .45); opacity: 0; transition: opacity .3s; backdrop-filter: blur(2px); }
.ey-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 92%; overflow-y: auto; overscroll-behavior: contain; background: var(--ey-card); border-radius: var(--ey-r-xl) var(--ey-r-xl) 0 0; padding: 0 16px; transform: translateY(100%); transition: transform .38s var(--ey-ease); box-shadow: 0 -12px 40px rgba(23, 24, 29, .2); }
.ey-sheet-host.open { pointer-events: auto; }
.ey-sheet-host.open .ey-backdrop { opacity: 1; }
.ey-sheet-host.open .ey-sheet { transform: none; }
.ey-grab { display: flex; justify-content: center; padding: 10px 0 6px; }
.ey-grab i { width: 40px; height: 5px; border-radius: 999px; background: var(--ey-line-2); }
.ey-lens { display: flex; flex-direction: column; gap: 16px; }
.ey-sheet-head { display: flex; align-items: center; gap: 12px; }
.ey-sheet-thumb { flex: 0 0 64px; height: 48px; border-radius: 12px; background: var(--ey-paper); display: flex; align-items: center; padding: 6px; }
.ey-sheet-title { font-size: 21px; }
.ey-sheet-head p { font-size: 12.5px; color: var(--ey-mute); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ey-stepper { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ey-stepper::before, .ey-stepper::after { content: ""; position: absolute; top: 15px; left: 16.66%; height: 3px; border-radius: 999px; }
.ey-stepper::before { right: 16.66%; background: var(--ey-paper-2); }
.ey-stepper::after { width: calc(66.66% * var(--p)); background: var(--ey-accent); transition: width .45s var(--ey-ease); }
.ey-stepper li { position: relative; z-index: 1; display: flex; justify-content: center; }
.ey-stepper button { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ey-mute); min-height: 44px; }
.ey-stepper button:disabled { opacity: 1; cursor: default; }
.ey-stepper button > span { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ey-card); border: 2px solid var(--ey-line-2); font-size: 13px; transition: background .3s, border-color .3s, color .3s, transform .3s var(--ey-ease); }
.ey-stepper button svg { width: 15px; height: 15px; }
.ey-stepper li.on button { color: var(--ey-ink); }
.ey-stepper li.on button > span { background: var(--ey-accent); border-color: var(--ey-accent); color: #fff; transform: scale(1.08); box-shadow: 0 0 0 5px var(--ey-accent-soft); }
.ey-stepper li.done button { color: var(--ey-ink); }
.ey-stepper li.done button > span { background: var(--ey-ink); border-color: var(--ey-ink); color: #fff; }
@media (hover: hover) { .ey-stepper li.done button:hover > span { transform: scale(1.08); } }
.ey-lens-body { min-height: 236px; display: flex; flex-direction: column; gap: 12px; }
.ey-opts { display: flex; flex-direction: column; gap: 8px; }
.ey-opt { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; border-radius: var(--ey-r); border: 1px solid var(--ey-line); background: var(--ey-card); text-align: left; transition: border-color .2s, background .2s, box-shadow .2s, transform .15s var(--ey-ease); }
.ey-opt-e { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--ey-paper); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.ey-opt b { display: block; font-size: 14.5px; }
.ey-opt small { display: block; font-size: 12px; color: var(--ey-mute); margin-top: 1px; line-height: 1.35; }
.ey-opt-price { font-size: 13px; font-weight: 750; white-space: nowrap; }
.ey-opt.on { border-color: var(--ey-ink); background: #fffdf9; box-shadow: inset 0 0 0 1px var(--ey-ink); }
.ey-opt:active { transform: scale(.985); }
@media (hover: hover) { .ey-opt:hover:not(.on) { border-color: var(--ey-line-2); box-shadow: var(--ey-shadow); } }
.ey-check { width: 24px; height: 24px; flex-shrink: 0; border-radius: 8px; border: 2px solid var(--ey-line-2); display: inline-flex; align-items: center; justify-content: center; color: transparent; transition: background .2s, border-color .2s, color .2s; }
.ey-check svg { width: 15px; height: 15px; stroke-width: 3; transform: scale(.4); transition: transform .25s var(--ey-ease); }
.ey-opt.on .ey-check { background: var(--ey-ink); border-color: var(--ey-ink); color: #fff; }
.ey-opt.on .ey-check svg { transform: none; }
.ey-info { display: flex; gap: 12px; padding: 14px; border-radius: var(--ey-r); background: var(--ey-paper); border: 1px solid var(--ey-line); }
.ey-info > span { font-size: 24px; line-height: 1; }
.ey-info b { font-size: 14.5px; }
.ey-info p { font-size: 13px; color: var(--ey-soft); margin-top: 4px; line-height: 1.5; }
.ey-power { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.ey-power-head, .ey-power-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.ey-power-head b { width: 116px; text-align: center; font-size: 11px; letter-spacing: .12em; color: var(--ey-mute); }
.ey-power-row { padding: 8px 8px 8px 12px; border-radius: var(--ey-r); background: var(--ey-paper); }
.ey-power-row > span b { display: block; font-size: 13.5px; }
.ey-power-row > span small { font-size: 11px; color: var(--ey-mute); font-weight: 700; letter-spacing: .08em; }
.ey-pstep { width: 116px; display: inline-flex; align-items: center; justify-content: space-between; background: var(--ey-card); border: 1px solid var(--ey-line-2); border-radius: 12px; }
.ey-pstep button { width: 40px; height: 44px; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; transition: background .15s, transform .15s var(--ey-ease); }
.ey-pstep button svg { width: 14px; height: 14px; }
.ey-pstep button:active { transform: scale(.88); }
@media (hover: hover) { .ey-pstep button:hover { background: var(--ey-paper-2); } }
.ey-pstep b { font-size: 14px; font-variant-numeric: tabular-nums; }
.ey-power > .ey-link { align-self: flex-start; min-height: 36px; }
.ey-lsum { background: var(--ey-paper); border-radius: var(--ey-r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.ey-lsum > div { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ey-soft); }
.ey-lsum > div b { color: var(--ey-ink); font-variant-numeric: tabular-nums; }
.ey-lsum > div.total { padding-top: 8px; margin-top: 2px; border-top: 1px dashed var(--ey-line-2); font-size: 14.5px; font-weight: 700; color: var(--ey-ink); align-items: baseline; }
.ey-lsum > div.total b { font-family: var(--ey-display); font-size: 22px; }
.ey-sheet-actions { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 0 18px; margin-top: -4px; background: linear-gradient(transparent, var(--ey-card) 14px); }
.ey-sheet-host.in-device .ey-sheet-actions { padding-bottom: 30px; }
@media (min-width: 700px) {
  .ey-sheet-host:not(.in-device) .ey-sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: 540px; max-height: 88vh; border-radius: var(--ey-r-xl); padding: 8px 22px 0; transform: translate(-50%, -44%) scale(.98); opacity: 0; transition: transform .32s var(--ey-ease), opacity .22s; }
  .ey-sheet-host.open:not(.in-device) .ey-sheet { transform: translate(-50%, -50%); opacity: 1; }
  .ey-sheet-host:not(.in-device) .ey-grab { visibility: hidden; padding: 2px 0; }
}

/* ---------- Motion (only when the viewer hasn't asked for less) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ey-page-in { animation: eyPage .32s var(--ey-ease); }
  .ey-in { animation: eyIn .45s var(--ey-ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
  .ey-heart.pop svg { animation: eyPop .5s var(--ey-ease); }
  .ey-heart.pop::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid var(--ey-accent); animation: eyRing .55s ease-out forwards; pointer-events: none; }
  .ey-badge.bump { animation: eyBump .5s var(--ey-ease); }
  .ey-tick { animation: eyTick .45s var(--ey-ease); }
  .ey-face-wrap.from-r { animation: eyFromR .4s var(--ey-ease); }
  .ey-face-wrap.from-l { animation: eyFromL .4s var(--ey-ease); }
  .ey-lens-body.from-r { animation: eyFromR .32s var(--ey-ease); }
  .ey-lens-body.from-l { animation: eyFromL .32s var(--ey-ease); }
  .ey-track li.on .ey-track-dot { animation: eyPulse 1.8s ease-in-out infinite; }
  .ey-empty-art span { animation: eyFloat 3s ease-in-out infinite; }
  .ey-slide[aria-hidden="false"] .ey-slide-art { animation: eyArt .7s var(--ey-ease) both; }
}
@keyframes eyPage { from { opacity: 0; transform: translateY(6px); } }
@keyframes eyIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes eyPop { 0% { transform: scale(1); } 30% { transform: scale(.7); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes eyRing { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
@keyframes eyBump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes eyTick { 0% { transform: translateY(0); color: inherit; } 35% { transform: translateY(-3px); color: var(--ey-accent); } 100% { transform: none; } }
@keyframes eyFromR { from { opacity: 0; transform: translateX(36px); } }
@keyframes eyFromL { from { opacity: 0; transform: translateX(-36px); } }
@keyframes eyPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(194, 81, 43, .35); } 50% { box-shadow: 0 0 0 7px rgba(194, 81, 43, 0); } }
@keyframes eyFloat { 50% { transform: translateY(-5px) rotate(-4deg); } }
@keyframes eyArt { from { opacity: 0; transform: translateY(-40%) translateX(24px) rotate(-16deg); } }
.ey-empty-art span { display: inline-block; }

/* ---------- Tablet / desktop ---------- */
@container site (min-width: 640px) {
  .ey { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr; }
  .ey-top { grid-area: 1 / 1 / 2 / 3; padding: 10px 24px; min-height: 68px; }
  .ey-top-perk { display: none; }
  .ey-nav { grid-area: 1 / 2 / 2 / 3; position: sticky; top: 0; bottom: auto; align-self: start; z-index: 31; display: flex; gap: 4px; padding: 12px 24px 12px 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  html:not([data-device="desktop"]) .ey-nav { padding-bottom: 12px; }
  .ey-tab { flex-direction: row; min-height: 44px; padding: 0 12px 0 6px; gap: 2px; font-size: 13px; border-radius: 999px; }
  .ey-tab-ico { width: 32px; height: 32px; background: none !important; color: inherit !important; }
  .ey-tab-ico svg { width: 19px; height: 19px; }
  .ey-tab.on { background: var(--ey-ink); color: #fff; }
  .ey-tab-label { display: none; }
  .ey-tab { padding: 0 6px; }
  .ey-badge { top: -3px; right: -4px; border-color: var(--ey-paper); }
  .ey-tab.on .ey-badge { border-color: var(--ey-ink); }
  .ey-dotw { right: 4px; top: 4px; border-color: var(--ey-paper); }
  .ey-view { grid-area: 2 / 1 / 3 / 3; padding: 20px 24px 36px; }
  .ey-chiprow, .ey-rail, .ey-catchips, .ey-try-rail { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; scroll-padding: 0 24px; }
  .ey-slide { min-height: 260px; padding: 32px 36px 44px; }
  .ey-slide-copy { max-width: 48%; }
  .ey-slide h2 { font-size: 34px; }
  .ey-slide-text { font-size: 14.5px; }
  .ey-slide-art { width: 46%; right: 4%; }
  .ey-dots { left: 36px; bottom: 16px; }
  .ey-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .ey-cat { min-height: 140px; }
  .ey-card.rail, .ey-skel.rail { flex-basis: 196px; }
  .ey-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 22px 16px; }
  .ey-facechip { width: 220px; }
  .ey-pdp-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .ey-pdp-media { position: sticky; top: 84px; }
  .ey-pdp-name { font-size: 40px; }
  .ey-try { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .ey-try-stage { position: sticky; top: 84px; }
  .ey-try-panel .ey-try-rail { margin: 0; padding: 2px 2px 8px; }
  .ey-cart { grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; }
  .ey-summary-card { position: sticky; top: 84px; }
  .ey-orders { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
  .ey-h1 { font-size: 36px; }
  .ey-sec { margin-top: 36px; }
}
@container site (min-width: 760px) {
  .ey-tab-label { display: inline; }
  .ey-tab { padding: 0 14px 0 6px; }
  .ey-shop-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
  .ey-filters { display: block; position: sticky; top: 84px; }
  .ey-catchips { display: none; }
  .ey-search { margin-bottom: 18px; max-width: 460px; }
  .ey-shop-head { align-items: center; }
  .ey-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .ey-sec > .ey-chiprow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: visible; margin: 0; padding: 0; }
  .ey-sec > .ey-chiprow > * { width: auto; }
}
@container site (min-width: 900px) {
  .ey-top, .ey-view { padding-left: 32px; padding-right: 32px; }
  .ey-nav { padding-right: 32px; }
  .ey-top-perk { display: inline-flex; margin-left: 20px; }
  .ey-chiprow, .ey-rail, .ey-catchips, .ey-try-rail { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
  .ey-shop-body { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .ey-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .ey-slide { min-height: 300px; }
  .ey-try { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}
