/* ---------- tokens ---------- */
:root {
  --bg: #FBF7F2;
  --surface: #FFFFFF;
  --surface-2: #F4EDE5;
  --ink: #2A1F2D;
  --muted: #7A6E76;
  --line: #E9E0D7;
  --accent: #6B2D5C;
  --accent-ink: #FFFFFF;
  --accent-soft: #F3E6EF;
  --danger: #B0413E;
  --danger-soft: #F8E5E3;
  --gold: #B8862F;
  --tg: #229ED9;
  --viber: #7360F2;
  --shadow: 0 1px 2px rgba(42, 31, 45, .05), 0 8px 24px rgba(42, 31, 45, .07);
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: 16px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17121A;
    --surface: #211A24;
    --surface-2: #2B2230;
    --ink: #F3ECEF;
    --muted: #A99DA6;
    --line: #382E3D;
    --accent: #DDA6CC;
    --accent-ink: #2A1F2D;
    --accent-soft: #3A2A38;
    --danger: #E58A86;
    --danger-soft: #3D2526;
    --gold: #E2B865;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #17121A;
  --surface: #211A24;
  --surface-2: #2B2230;
  --ink: #F3ECEF;
  --muted: #A99DA6;
  --line: #382E3D;
  --accent: #DDA6CC;
  --accent-ink: #2A1F2D;
  --accent-soft: #3A2A38;
  --danger: #E58A86;
  --danger-soft: #3D2526;
  --gold: #E2B865;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

.icon { width: 22px; height: 22px; flex: none; }
.icon-sm { width: 14px; height: 14px; }

/* ---------- layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center;
  height: 52px; padding: 0 max(var(--gutter), calc((100% - 520px) / 2 + var(--gutter)));
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 22px; height: 26px; border-radius: 7px 7px 9px 9px;
  background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--gold)));
  position: relative;
}
.brand-mark::before {
  content: ''; position: absolute; left: 6px; top: -5px; width: 10px; height: 6px;
  border-radius: 2px; background: var(--gold);
}
.brand-name { font: 600 21px/1 var(--font-display); letter-spacing: .01em; }
.brand-dot { color: var(--gold); margin: 0 4px; }

.app {
  max-width: 520px; margin: 0 auto;
  padding: 0 var(--gutter) calc(110px + env(safe-area-inset-bottom));
  min-height: calc(100vh - 52px);
}
body[data-page="home"] .app { padding-bottom: 32px; }

.loading { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 80px 0; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.section { margin-top: 28px; }
.section-title { font: 600 24px/1.15 var(--font-display); margin: 0 0 12px; }
.section-sub { font: 400 13px var(--font-body); color: var(--muted); margin-left: 6px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.page-head { display: flex; align-items: center; gap: 8px; padding: 12px 0 4px; }
.page-title { font: 600 26px/1.1 var(--font-display); flex: 1; }
.page-head-float { position: absolute; z-index: 5; padding: 12px 0 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: -10px;
  border: 0; border-radius: 50%; background: transparent; text-decoration: none;
}
.page-head-float .icon-btn { margin-left: 0; background: color-mix(in srgb, var(--surface) 85%, transparent); box-shadow: var(--shadow); }
.link-btn { border: 0; background: none; padding: 10px 0; color: var(--accent); font-weight: 600; text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .2s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-lg { min-height: 54px; font-size: 16px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-ghost:disabled { opacity: .45; }
.btn-grow { flex: 1; }
.btn.is-disabled { opacity: .5; pointer-events: none; }
/* joined order buttons: Telegram | Viber */
.order-group { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; overflow: hidden; }
.order-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 6px 8px; color: #fff; text-decoration: none;
  transition: filter .15s;
}
.order-btn .icon { width: 22px; height: 22px; flex: none; }
.order-label { display: grid; text-align: left; line-height: 1.1; white-space: nowrap; }
.order-label small { font-size: 11px; font-weight: 500; opacity: .88; }
.order-label b { font-size: 15px; font-weight: 700; }
.order-btn:active { filter: brightness(.92); }
.order-tg { background: var(--tg); }
.order-viber { background: var(--viber); box-shadow: inset 1px 0 0 rgba(255, 255, 255, .35); }

/* ---------- hero ---------- */
.hero { padding: 28px 0 4px; }
.hero-title { font: 600 42px/1.02 var(--font-display); margin: 10px 0 12px; letter-spacing: -.01em; }
.hero-lead { color: var(--muted); font-size: 16px; max-width: 34ch; }
.hero-actions { display: grid; gap: 10px; margin-top: 22px; }

/* ---------- families ---------- */
.family-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.family-card {
  position: relative; display: grid; gap: 2px; text-align: left;
  padding: 14px; min-height: 92px; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--line); text-decoration: none;
  transition: border-color .15s, background .15s, transform .12s;
}
.family-card:active { transform: scale(.98); }
.family-icon { font-size: 24px; line-height: 1; margin-bottom: 6px; }
.family-label { font-weight: 600; }
.family-hint { font-size: 12px; color: var(--muted); line-height: 1.3; }
.family-count {
  position: absolute; top: 12px; right: 12px;
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.family-card[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.family-card[aria-pressed="true"]::after {
  content: '✓'; position: absolute; right: 10px; bottom: 10px; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700;
}

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; }
.chips-wrap { flex-wrap: wrap; }
.chips-scroll {
  overflow-x: auto; scrollbar-width: none; padding: 4px var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
}
.chips-scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.chip-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.chip-soft { background: var(--surface-2); border-color: transparent; }
.chip .dot, .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--muted)); flex: none; }
.chip-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.is-active, .chip.is-liked { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.is-liked .chip-count, .chip.is-active .chip-count { color: inherit; opacity: .75; }
.chip.is-liked .dot { box-shadow: 0 0 0 2px var(--accent-ink); }
.chip.is-disliked { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); text-decoration: line-through; }
.chip.is-disliked .dot { opacity: .4; }
.chip.is-empty:not(.is-liked):not(.is-disliked) { opacity: .4; }
.chip .icon-sm { margin-right: -4px; }

/* ---------- picker ---------- */
.segmented {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px;
  background: var(--surface-2); border-radius: 999px;
}
.segmented button {
  min-height: 42px; border: 0; border-radius: 999px; background: transparent; font-weight: 500;
}
.segmented button[aria-checked="true"] { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }

.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-toggle button {
  min-height: 46px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--surface); font-weight: 600; color: var(--muted);
}
.mode-toggle button[data-mode="like"][aria-selected="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.mode-toggle button[data-mode="dislike"][aria-selected="true"] { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.mode-hint { font-size: 13px; color: var(--muted); margin: 8px 2px 12px; }

.search {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 48px;
  border-radius: var(--radius-sm); background: var(--surface); border: 1.5px solid var(--line); color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; border: 0; background: transparent; outline: none; min-height: 44px; color: var(--ink); font-size: 16px; }

.note-group { margin-top: 18px; }
.note-group-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.empty-inline { color: var(--muted); padding: 20px 0; text-align: center; }

.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 10px; align-items: center;
  max-width: 520px; margin: 0 auto;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}

/* ---------- results ---------- */
#active { margin-top: 4px; }
.toolbar { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; }
.toolbar .chips-scroll { flex: 1; }
.toolbar-sort { justify-content: flex-end; margin: 4px 0 14px; font-size: 13px; }
.sort select {
  appearance: none; -webkit-appearance: none; min-height: 34px; padding: 0 28px 0 12px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface) no-repeat right 10px center / 10px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237A6E76' stroke-width='1.6'/%3E%3C/svg%3E");
  font-size: 13px;
}

.cards { display: grid; gap: 12px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.card-main { display: grid; grid-template-columns: 116px 1fr; gap: 14px; padding: 12px; flex: 1; }
.card > .order-group { border-radius: 0; }
.card-media {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  background: #F6F2EE; aspect-ratio: 1 / 1.2; display: grid; place-items: center;
}
.card-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.badge {
  position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 600;
}
.badge-stock { background: var(--ink); color: var(--bg); top: auto; bottom: 8px; right: 8px; text-align: center; font-size: 11px; line-height: 1.3; padding: 3px 8px; }
.card.is-unavailable .card-media img { opacity: .5; filter: grayscale(.6); }
.card.is-unavailable .card-price { color: var(--muted); }
.stock { margin-top: 10px; font-size: 14px; font-weight: 600; }
.stock-in { color: #2E7D4F; }
.stock-out { color: var(--danger); }
.card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-type { font-size: 12px; color: var(--muted); }
.card-title { font: 600 21px/1.1 var(--font-display); }
.card-title a { text-decoration: none; }
.card-title a::after { content: ''; position: absolute; inset: 0 0 52px; }
.card { position: relative; }
.card-media, .card > .order-group { position: relative; z-index: 1; }
.card-meta { font-size: 13px; }
.rating { color: var(--gold); font-weight: 600; }
.card-match, .card-notes { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.card-match-label { margin-right: 2px; }
.hl { display: inline-block; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; margin: 1px 0; }
.card-price { margin-top: auto; padding-top: 6px; }
.price { font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.price s { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 4px; }
.price-lg { font-size: 26px; margin-top: 8px; }

.empty { text-align: center; padding: 56px 8px; display: grid; gap: 10px; justify-items: center; }
.empty h2 { font: 600 26px/1.1 var(--font-display); }
.empty p { color: var(--muted); }
.empty-icon { font-size: 40px; }

/* ---------- product ---------- */
body[data-page="p"] .app { padding-top: 0; }
.gallery {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); background: #F6F2EE;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; scroll-snap-align: center; mix-blend-mode: multiply; }
.gallery-dots { display: flex; justify-content: center; gap: 6px; padding: 10px 0 0; }
.gallery-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: var(--line); transition: width .2s, background .2s; }
.gallery-dots button.on { width: 18px; border-radius: 3px; background: var(--accent); }

.product { padding-top: 16px; }
.product-title { font: 600 36px/1.05 var(--font-display); margin: 6px 0 6px; }
.product-rating { font-size: 14px; }
.families { margin-top: 12px; }
.product-info { margin-top: 14px; font-size: 16px; line-height: 1.55; }
.product .section-title { margin-top: 28px; }

.pyramid { display: grid; gap: 10px; }
.pyramid-row { padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.pyramid-label { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pyramid-label b { font-size: 14px; }
.pyramid-label span { font-size: 12px; color: var(--muted); }
.pyramid-top { border-top: 3px solid #E8B422; }
.pyramid-heart { border-top: 3px solid #C77DBA; }
.pyramid-base { border-top: 3px solid #7D5A3C; }

.benefits { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.benefits li { position: relative; padding-left: 22px; color: var(--ink); }
.benefits li::before { content: '✦'; position: absolute; left: 0; color: var(--gold); }

.prose { color: var(--ink); line-height: 1.6; }
.prose p { margin: 0 0 10px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

.accordion { margin-top: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px;
  font-weight: 600; cursor: pointer; list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion .chev { transition: transform .2s; }
.accordion[open] .chev { transform: rotate(180deg); }
.accordion .prose { padding-bottom: 14px; }

.source { margin-top: 24px; font-size: 12px; color: var(--muted); }
.source a { color: var(--muted); }

/* order bar: fixed at the bottom on phones, inline on desktop */
.order-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 10px; align-items: center;
  max-width: 520px; margin: 0 auto;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.order-bar-price { display: grid; line-height: 1.15; flex: none; }
.order-bar-price .price { font-size: 16px; }
.order-bar-price s { font-size: 12px; color: var(--muted); }
.order-bar .order-group { flex: 1; }
.order-bar .order-bar-price { display: none; }
.order-note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* ---------- header nav ---------- */
.topbar { justify-content: space-between; }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav-link { display: none; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 14px; }
.topnav-link:hover { background: var(--surface-2); }
.topnav-link.is-current { color: var(--accent); background: var(--accent-soft); }
/* The only text link that stays in the mobile header. */
.topnav-link.topnav-like { display: inline-block; padding: 8px 10px; font-size: 13px; line-height: 1.15; text-align: center; color: var(--accent); background: var(--accent-soft); }
.nav-long { display: none; }
.topnav-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; }
.topnav-icon .icon { width: 18px; height: 18px; }
.topnav-icon.tg { background: var(--tg); }
.topnav-icon.viber { background: var(--viber); }

/* ---------- hero showcase ---------- */
.hero-art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.hero-bottle {
  display: grid; gap: 6px; padding: 10px 8px 12px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); text-decoration: none; text-align: center;
  font: 600 15px/1.1 var(--font-display);
}
.hero-bottle img { aspect-ratio: 1 / 1.15; object-fit: contain; width: 100%; mix-blend-mode: multiply; }

/* ---------- picker layout ---------- */
.pick-preview { display: none; }

/* ---------- home extras ---------- */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li {
  counter-increment: s; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: start;
}
.steps li::before {
  content: counter(s); grid-row: span 2; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
  font: 700 18px/1 var(--font-display);
}
.steps b { font-weight: 600; }
.steps span { color: var(--muted); font-size: 14px; }
.footer { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 50; text-align: center;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow);
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { padding: 40px 16px; text-align: center; }

/* dark-mode product images sit on a light tile so PNG/JPG backgrounds blend */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card-media,
  :root:not([data-theme="light"]) .gallery { background: #EFE9E3; }
}

@media (min-width: 560px) {
  .hero-title { font-size: 52px; }
  .hero-actions { grid-template-columns: 1fr 1fr; }
  .family-grid { grid-template-columns: repeat(3, 1fr); }
  .card { grid-template-columns: 140px 1fr; }
}

/* ================= desktop ================= */
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  body { font-size: 15.5px; }
  .topbar { height: 64px; padding: 0 max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter))); }
  .brand-name { font-size: 24px; }
  .topnav { gap: 6px; }
  .topnav-link { display: inline-block; }
  .topnav-link.topnav-like { padding: 8px 12px; font-size: 14px; color: inherit; background: none; }
  .topnav-link.topnav-like:hover { background: var(--surface-2); }
  .topnav-link.topnav-like.is-current { color: var(--accent); background: var(--accent-soft); }
  .nav-long { display: inline; }
  .nav-short { display: none; }
  .topnav-icon { margin-left: 4px; }

  .app { max-width: 1200px; padding: 0 var(--gutter) 64px; min-height: calc(100vh - 64px); }
  body[data-page="home"] .app { padding-bottom: 48px; }
  .section-title { font-size: 30px; margin-bottom: 16px; }
  .section { margin-top: 44px; }

  /* home */
  .hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 56px 0 8px; }
  .hero-title { font-size: 68px; }
  .hero-lead { font-size: 18px; max-width: 38ch; }
  .hero-actions { grid-template-columns: auto auto; justify-content: start; }
  .hero-actions .btn { padding: 0 28px; }
  .hero-art { margin-top: 0; gap: 16px; align-items: end; }
  .hero-bottle { padding: 18px 14px; font-size: 18px; transition: transform .2s; }
  .hero-bottle:nth-child(2) { transform: translateY(-28px); }
  .hero-bottle:hover { transform: translateY(-6px); }
  .hero-bottle:nth-child(2):hover { transform: translateY(-34px); }
  .family-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .family-card { min-height: 112px; padding: 18px; }
  .family-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .chip:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

  /* page head */
  .page-head { padding: 28px 0 8px; }
  .page-title { font-size: 40px; }

  /* picker: filters left, live preview right */
  .pick-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
  .pick-side { position: sticky; top: 84px; display: grid; gap: 14px; margin-top: 28px; }
  .pick-preview { display: block; padding: 18px; border-radius: var(--radius); background: var(--surface-2); }
  .pick-preview-title { font: 600 20px/1.2 var(--font-display); margin-bottom: 12px; }
  .pick-side .sticky-bar {
    position: static; padding: 0; background: none; border: 0;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .cards-mini { gap: 10px; }
  .cards-mini .card { box-shadow: none; }
  .cards-mini .card-main { grid-template-columns: 76px 1fr; gap: 12px; padding: 10px; }
  .cards-mini .card-title a::after { inset: 0; }
  .cards-mini .card-title { font-size: 18px; }
  .cards-mini .card-match, .cards-mini .card-notes, .cards-mini .card-meta, .cards-mini .order-group { display: none; }
  .cards-mini .price { font-size: 15px; }
  .cards-mini .card-price { padding-top: 2px; }
  .chips-scroll { margin: 0; padding: 4px 0; flex-wrap: wrap; overflow: visible; }

  /* results: grid of vertical cards */
  .toolbar { margin-top: 8px; }
  .toolbar-sort { margin: -38px 0 20px auto; width: max-content; }
  .cards:not(.cards-mini) { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .cards:not(.cards-mini) .card { transition: transform .2s, box-shadow .2s; }
  .cards:not(.cards-mini) .card-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding: 14px; }
  .cards:not(.cards-mini) .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgba(42, 31, 45, .06), 0 16px 36px rgba(42, 31, 45, .12);
  }
  .cards:not(.cards-mini) .card-media { aspect-ratio: 1 / 1; }
  .cards:not(.cards-mini) .card-body { padding: 4px 4px 2px; }
  .cards:not(.cards-mini) .card-title { font-size: 24px; }

  /* product: gallery left, details right */
  body[data-page="p"] .app { padding-top: 24px; }
  .page-head-float { position: static; padding: 0 0 12px; }
  .page-head-float .icon-btn { box-shadow: none; background: var(--surface-2); }
  .product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .product-media { position: sticky; top: 84px; }
  .gallery { margin: 0; border-radius: 24px; }
  .gallery-dots button { width: 8px; height: 8px; }
  .product { padding-top: 0; }
  .product-title { font-size: 52px; }
  .price-lg { display: none; }
  .order-bar {
    position: static; max-width: none; margin: 18px 0 0; padding: 16px;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .order-bar-price .price { font-size: 28px; }
  .order-bar { flex-direction: column; align-items: stretch; gap: 14px; }
  .order-bar .order-bar-price { display: flex; align-items: baseline; gap: 10px; }
  .order-bar .order-btn { min-height: 60px; }
  .order-bar .order-label b { font-size: 17px; }
  .order-btn:hover { filter: brightness(1.08); }

  .toast { bottom: 32px; }
  .footer { margin-top: 56px; }
}

@media (min-width: 1024px) and (hover: hover) {
  .btn-primary:hover { filter: brightness(1.08); }
}

/* ---------- similar to a favourite perfume ---------- */
.like-cta-search { text-decoration: none; margin-top: 12px; }
.like-cta-search span { color: var(--muted); }
.like-lead { color: var(--muted); margin: 24px 0 0; }
.like-search { position: relative; }
.suggest {
  list-style: none; margin: 6px 0 0; padding: 4px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.suggest-item { display: grid; gap: 1px; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.suggest-item:hover, .suggest-item:focus-visible { background: var(--surface-2); }
.suggest-item b { font-weight: 600; }
.suggest-item span { font-size: 13px; color: var(--muted); }
.suggest-empty { padding: 12px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spinner-sm { width: 14px; height: 14px; display: inline-block; flex: none; }

.ref-card { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 16px; }
.ref-title { font: 600 28px/1.1 var(--font-display); margin: 4px 0 2px; }
.ref-notes { margin-top: 10px; }
.ref-notes summary { cursor: pointer; font-size: 14px; color: var(--accent); font-weight: 600; }
.ref-notes[open] summary { color: var(--muted); font-weight: 500; }
.pyramid-compact { margin-top: 10px; gap: 8px; }
.pyramid-compact .pyramid-row { padding: 10px 12px; background: var(--bg); }
.pyramid-compact .pyramid-label { margin-bottom: 6px; }
.like-count { margin: 12px 2px; font-size: 14px; }
.like-more { display: grid; justify-items: center; margin-top: 16px; }

.cmp { display: grid; gap: 6px; font-size: 13px; line-height: 1.5; }
.card-main > .cmp { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); }
.cmp-sim { font-weight: 600; }
.cmp-sim.sim-high { color: #2E7D4F; }
.cmp-sim.sim-mid { color: var(--accent); }
.cmp-sim.sim-low { color: var(--muted); }
.cmp-traits { font-weight: 500; color: var(--ink); }
.cmp-row { color: var(--muted); }
.cmp-label { margin-right: 4px; }
.cmp-note { display: inline-block; padding: 1px 8px; border-radius: 999px; margin: 2px 0; }
.cmp-missing { background: var(--surface-2); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.cmp-added { border: 1px dashed var(--line); }

@media (min-width: 1024px) {
  .like-lead { font-size: 17px; max-width: 640px; }
  .like-search, .like-search + .suggest { max-width: 640px; }
  .like-layout { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: start; }
  .like-ref { position: sticky; top: 88px; }
  .like-main .cards { grid-template-columns: repeat(2, 1fr); }
  .like-cta-search { max-width: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media (max-width: 400px) {
  .brand { gap: 8px; }
  .brand-name { font-size: 18px; }
  .topnav { gap: 4px; }
  .topnav-icon { width: 34px; height: 34px; }
  .segmented button { font-size: 14px; white-space: nowrap; }
}
@media (max-width: 340px) {
  .brand-mark { display: none; }
  .brand-name { font-size: 16px; white-space: nowrap; }
  .topnav-link.topnav-like { padding: 6px 8px; font-size: 12px; }
}
