/* ==========================================================
   Profumore — design system (light by default via html[data-theme="light"]; :root holds the dark palette), RTL/LTR
   Principles: one brand colour used as a flat fill (never a glow or a gradient on text), hairline borders,
   quiet neutral shadows, a strict type scale, line icons (no emoji), consistent radii.
   ========================================================== */

/* ---------- tokens ---------- */
:root {
  /* Inter for Latin + digits, IBM Plex Sans Arabic for Arabic (the browser picks per glyph) */
  --font: "Inter", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --bg: #09090b;
  --bg-2: #131316;
  --card: #111113;                /* solid panel fill */
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .065);
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .15);
  --text: #f4f4f5;
  --text-2: #b4b4bc;
  --text-3: #80808a;
  --track: rgba(255, 255, 255, .05);
  --input-bg: rgba(255, 255, 255, .03);
  --modal-bg: #151518;
  --toast-bg: #1c1c20;
  --tabbar-bg: #0c0c0e;
  /* brand: saffron gold + neutral gray */
  --brand: #f2be3c;               /* the one brand fill */
  --brand-hover: #f6cb5c;
  --accent-1: #f5d68a;            /* soft gold — small labels on dark */
  --accent-2: #f2be3c;            /* gold — icons, links, focus */
  --accent-3: #a1a1aa;            /* gray */
  --grad: linear-gradient(180deg, #f5c84f, #efb931);       /* near-flat brand fill (buttons, badges, bars) */
  --grad-text: linear-gradient(var(--accent-2), var(--accent-2));   /* solid — no gradient text */
  --grad-soft: linear-gradient(rgba(242, 190, 60, .1), rgba(242, 190, 60, .1));
  --glow: 242, 190, 60;           /* brand rgb triplet for rgba(var(--x), a) fills */
  --gray-rgb: 161, 161, 170;
  --pale-rgb: 245, 214, 138;
  --au-1: #71717a; --au-2: #eab308; --au-3: #a1a1aa;
  --on-accent: #141416;
  --star: #f2be3c;
  --star-off: rgba(255, 255, 255, .14);
  --shine: inset 0 1px 0 rgba(255, 255, 255, .04);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .75);
  --danger: #f87171;
  --ok: #4ade80;
  --aurora-o: 1;
  --radius: 16px;
  --topbar-h: 64px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f6f7;
  --bg-2: #ffffff;
  --card: #ffffff;
  --surface: rgba(255, 255, 255, .7);
  --surface-2: #ffffff;
  --border: rgba(17, 17, 20, .09);
  --border-strong: rgba(17, 17, 20, .16);
  --text: #111114;
  --text-2: #4b4b55;
  --text-3: #7a7a84;
  --track: rgba(17, 17, 20, .055);
  --input-bg: #ffffff;
  --modal-bg: #ffffff;
  --toast-bg: #ffffff;
  --tabbar-bg: #ffffff;
  /* gold is too light to read as text on white -> deep gold for text/icons; the bright fill stays */
  --brand: #f2be3c;
  --brand-hover: #edb425;
  --accent-1: #7a5800;
  --accent-2: #8f6700;
  --accent-3: #71717a;
  --grad: linear-gradient(180deg, #f5c84f, #efb931);
  --grad-text: linear-gradient(var(--accent-2), var(--accent-2));
  --grad-soft: linear-gradient(rgba(242, 190, 60, .14), rgba(242, 190, 60, .14));
  --glow: 230, 172, 30;
  --gray-rgb: 113, 113, 122;
  --pale-rgb: 245, 210, 110;
  --au-1: #a1a1aa; --au-2: #facc15; --au-3: #d4d4d8;
  --star: #e8a90f;
  --star-off: rgba(17, 17, 20, .13);
  --shine: inset 0 1px 0 rgba(255, 255, 255, .9);
  --shadow: 0 1px 2px rgba(17, 17, 20, .05), 0 8px 24px -14px rgba(17, 17, 20, .14);
  --shadow-lg: 0 2px 6px rgba(17, 17, 20, .06), 0 24px 48px -22px rgba(17, 17, 20, .22);
  --aurora-o: 1;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--font); font-size: 15px; line-height: 1.7;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
/* Latin headings get optical tightening; Arabic is never letter-spaced (it would break the joins) */
html[lang="en"] :is(h1, h2, .hero-title, .page-title, .section-title, .p-title) { letter-spacing: -.022em; }
html[lang="ar"] :is(h1, h2, h3, .hero-title, .page-title, .section-title, .p-title, .logo-text) { letter-spacing: 0 !important; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
select option { background: var(--bg-2); color: var(--text); }
::selection { background: rgba(var(--glow),.35); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 10px; }
.ico { display: inline-block; vertical-align: middle; flex-shrink: 0; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.muted { color: var(--text-3); }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 10px; background: var(--brand); color: var(--on-accent); font-weight: 600; }
.skip:focus { top: 12px; }
.no-scroll { overflow: hidden; }
::-webkit-scrollbar { width: 10px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 24px; }
/* fill-mode "backwards" (not "both") so no transform lingers after the entrance —
   a retained transform would trap position:fixed children like the mobile filter sheet */
.page { animation: pageIn .45s cubic-bezier(.2, .8, .2, 1) backwards; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- page backdrop ----------
   A quiet, static canvas: one faint light from the top centre (neutral with a hint of brand gold) and a very
   fine grid that fades out — no colour blobs, no noise, no motion. Painted once. */
.aurora { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; contain: strict;
  background: radial-gradient(1100px 520px at 50% -140px, rgba(var(--glow), .07), transparent 70%), var(--bg); }
.aurora span { display: none; }
.aurora::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line, rgba(255, 255, 255, .028)) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line, rgba(255, 255, 255, .028)) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(900px 480px at 50% 0, #000 20%, transparent 75%); mask-image: radial-gradient(900px 480px at 50% 0, #000 20%, transparent 75%);
}
[data-theme="light"] .aurora { --grid-line: rgba(17, 17, 20, .045); }
/* ---------- panels ("glass" kept as the class name) ----------
   Solid fill, hairline border, quiet shadow. No backdrop-filter (costly and invisible over a static canvas). */
.glass {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 11px; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--brand); color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(0, 0, 0, .25);
}
.btn-primary:hover { background: var(--brand-hover); }
.btn-glass { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.btn-glass:hover { border-color: var(--border-strong); background: color-mix(in srgb, var(--text) 9%, transparent); }
[data-theme="light"] .btn-glass { background: #fff; box-shadow: 0 1px 2px rgba(17, 17, 20, .05); }
[data-theme="light"] .btn-glass:hover { background: #f4f4f5; }
.btn-sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 15.5px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn.loading { opacity: .7; pointer-events: none; }
.btn-text { color: var(--accent-2); font-weight: 600; font-size: 13.5px; }
.btn-text:hover { text-decoration: underline; text-underline-offset: 3px; }
.danger { color: var(--danger) !important; }
.armed { background: color-mix(in srgb, var(--danger) 14%, transparent) !important; border-color: color-mix(in srgb, var(--danger) 45%, transparent) !important; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  background: transparent; border: 1px solid var(--border); color: var(--text-2);
  transition: color .18s, background .18s, border-color .18s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border-strong); }
.lang-btn { font-weight: 600; font-size: 12.5px; letter-spacing: .04em; }
kbd { font-family: inherit; font-size: 11px; line-height: 1.4; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); white-space: nowrap; }

/* chips / segmented / tags */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  font-size: 13.5px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  transition: color .2s, border-color .2s, background .2s, transform .15s;
}
.chip i, .apill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.on { color: var(--text); background: color-mix(in srgb, var(--brand) 12%, transparent); border-color: color-mix(in srgb, var(--brand) 60%, transparent); }
.chip.sm { padding: 4px 10px; font-size: 12.5px; }
.apill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: 13px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 18px; max-width: 100%; }
.seg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 14px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.seg-btn:hover { color: var(--text); }
.seg-btn .ico { color: var(--text-3); }
.seg-btn.on { color: var(--text); background: rgba(255, 255, 255, .09); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .4); }
.seg-btn.on .ico { color: var(--accent-2); }
[data-theme="light"] .seg-btn.on { background: #fff; box-shadow: 0 1px 3px rgba(17, 17, 20, .12), inset 0 0 0 1px var(--border); }
.seg-full { display: flex; width: 100%; }
.seg-full .seg-btn { flex: 1; }
.seg-sm .seg-btn { padding: 6px 6px; font-size: 13px; }
.seg-scroll { overflow-x: auto; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.count { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-3); font-weight: 600; }
.count:empty { display: none; }

.tag, .gbadge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: rgba(12, 12, 14,.58); border: 1px solid rgba(255, 255, 255, .16); color: #fff;
}
[data-theme="light"] .tag, [data-theme="light"] .gbadge { background: rgba(255, 255, 255, .8); color: var(--text); border-color: var(--border); }
.gbadge span { font-size: 14px; line-height: 1; }
.g-male span { color: #7fb0ff; } .g-female span { color: #ff8fb8; } .g-unisex span { color: #c8a8ff; }
.tag-accent { background: var(--brand) !important; color: var(--on-accent) !important; border: 0 !important; font-size: 12px; vertical-align: middle; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--on-accent); font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.badge:empty { display: none; }

/* fields */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field-hint { font-size: 12px; color: var(--text-3); }
.field-err { font-size: 12.5px; color: var(--danger); }
.field input:not([type="range"]):not([type="color"]), .field textarea, .select select, .input-wrap input, .review-form textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 11px; background: var(--input-bg); border: 1px solid var(--border-strong);
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea, .review-form textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.75; }
.field input:focus, .field textarea:focus, .select select:focus, .input-wrap input:focus, .review-form textarea:focus, .token-input:focus-within {
  border-color: color-mix(in srgb, var(--brand) 80%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.field.invalid input { border-color: var(--danger); }
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-inline-end: 40px; cursor: pointer; }
.select > .ico { position: absolute; inset-inline-end: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-3); }
.input-ico { position: relative; display: flex; align-items: center; }
.input-ico > .ico { position: absolute; inset-inline-start: 14px; color: var(--text-3); pointer-events: none; }
.input-ico input { padding-inline-start: 42px !important; }
.input-wrap { position: relative; display: block; }
.input-wrap input[type="password"], .input-wrap .pass-toggle ~ input, .input-wrap input:has(+ .pass-toggle) { padding-inline-end: 48px; }
.pass-toggle { position: absolute; inset-inline-end: 5px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--text-3); }
.pass-toggle:hover { color: var(--text); background: var(--surface-2); }
.form-error { padding: 11px 14px; border-radius: 12px; font-size: 14px; color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); margin-bottom: 14px; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 93%, transparent);   /* near-opaque, no scroll-time blur (big win on phones) */
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
body.scrolled .topbar { border-bottom-color: var(--border); }
.topbar-inner { height: var(--topbar-h); display: flex; align-items: center; gap: 22px; }
/* wordmark: the Profumore logo — bottle-with-star mark + the name in Cormorant Garamond Bold, both in the text colour
   (ink on light, white on dark). The name is Latin in both languages, so it always reads left-to-right. */
.logo { display: inline-flex; align-items: center; gap: 9px; line-height: 1; flex-shrink: 0; color: var(--text); }
.logo-mark { height: 32px; width: auto; aspect-ratio: 39 / 57; flex-shrink: 0; color: var(--text); }
.logo-text { font-family: "Cormorant Garamond", Garamond, Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 700; letter-spacing: .005em; color: var(--text); }
[dir="rtl"] .logo { flex-direction: row-reverse; }
.mainnav { display: flex; gap: 2px; }
.mainnav a { position: relative; padding: 8px 12px; border-radius: 9px; color: var(--text-2); font-weight: 500; font-size: 14px; transition: color .18s, background .18s; }
.mainnav a:hover { color: var(--text); background: var(--surface); }
.mainnav a.on { color: var(--text); }
.mainnav a.on::after { content: ""; position: absolute; inset-inline: 12px; bottom: -12px; height: 2px; border-radius: 2px; background: var(--brand); }
.searchpill {
  flex: 1; max-width: 380px; margin-inline-start: auto; display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 8px 0 14px; padding-inline: 12px 6px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-3);
  transition: border-color .18s, background .18s;
}
.searchpill:hover { border-color: var(--border-strong); background: var(--surface-2); }
.searchpill span { flex: 1; text-align: start; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.usermenu { position: relative; }
.avatar-btn { display: block; padding: 2px; border-radius: 50%; border: 1px solid var(--border-strong); }
.avatar-btn:hover { border-color: var(--brand); }
.menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 250px; padding: 8px; z-index: 70; background: var(--modal-bg); animation: menuIn .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.menu-head div { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.menu-head .muted { font-size: 12.5px; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 14px; color: var(--text-2); text-align: start; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--text); }
.avatar {
  display: inline-grid; place-items: center; border-radius: 50%; font-weight: 600; flex-shrink: 0; letter-spacing: .02em;
  color: hsl(var(--h) 60% 82%); background: hsl(var(--h) 28% 22%); box-shadow: inset 0 0 0 1px hsl(var(--h) 40% 40% / .5);
}
[data-theme="light"] .avatar { color: hsl(var(--h) 45% 30%); background: hsl(var(--h) 55% 90%); box-shadow: inset 0 0 0 1px hsl(var(--h) 40% 60% / .35); }

/* ---------- section scaffolding ---------- */
.section { padding-block: 40px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
/* headings carry no decorative icons (a product-grade type hierarchy does the work) */
.section-title { display: flex; align-items: center; gap: 10px; font-size: clamp(20px, 2.1vw, 25px); font-weight: 700; line-height: 1.3; }
.section-title > .ico, .page-title > .ico { display: none; }
.section-sub { margin-top: 4px; color: var(--text-3); font-size: 14px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; padding: 6px 4px; white-space: nowrap; font-size: 13.5px; font-weight: 500; color: var(--text-2); transition: color .18s; }
.link-more:hover { color: var(--accent-2); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 40px 24px; }
.page-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; line-height: 1.2; }
.page-sub { margin-top: 6px; color: var(--text-3); font-size: 15px; }
.page-search { width: min(360px, 100%); border-radius: 12px; }
.page-search input { width: 100%; height: 44px; background: transparent; border: 0; outline: 0; padding-inline: 42px 16px; }
.card { padding: 22px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.card-title .ico { color: var(--text-3); }
.card-sub { margin: -6px 0 14px; color: var(--text-3); font-size: 13px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; text-align: center; }
.empty-ico { width: 56px; height: 56px; margin-bottom: 6px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.empty h3 { font-size: 18px; }
.empty p { max-width: 420px; color: var(--text-3); }
.empty .btn { margin-top: 10px; }

/* ---------- stars & rating ---------- */
.stars { position: relative; display: inline-flex; vertical-align: middle; line-height: 0; }
.stars-bg, .stars-fg { display: flex; gap: 1px; }
.stars-bg { color: var(--star-off); }
.stars-fg { position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--v); overflow: hidden; color: var(--star); }
.rating-inline { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.rating-inline .ico { color: var(--star); }
.rating-inline b { font-weight: 700; }

/* ---------- perfume card ---------- */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 18px; }
.pcard {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.pcard-link { display: block; }
.pcard-media { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 20px 18px 4px; }
.pcard-glow { position: absolute; inset: 10% 12% 0; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 70%, transparent), color-mix(in srgb, var(--c) 22%, transparent) 60%, transparent); opacity: .55; transition: opacity .4s, transform .5s; }
.pcard:hover .pcard-glow { opacity: .8; }
.pcard-media .bottle { position: relative; height: 100%; max-height: 196px; width: auto; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.pcard:hover .bottle { transform: translateY(-3px); }
.pcard-body { padding: 8px 16px 16px; }
.pcard-brand { font-size: 12px; font-weight: 500; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="en"] .pcard-brand { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.pcard-name { margin: 2px 0 8px; font-size: 15px; font-weight: 600; line-height: 1.4; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; white-space: nowrap; }
.pcard-conc { flex-shrink: 0; margin-inline-start: auto; padding: 1px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; color: var(--text-3); border: 1px solid var(--border-strong); }
.pcard-fav {
  position: absolute; z-index: 3; top: 12px; inset-inline-end: 12px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  color: #fff; background: rgba(12, 12, 14,.5); border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .2s, color .2s, background .2s;
}
[data-theme="light"] .pcard-fav { color: var(--text-2); background: rgba(255, 255, 255, .7); border-color: var(--border); }
.pcard-fav:hover { transform: scale(1.1); }
.pcard-fav.on { color: var(--on-accent); background: var(--brand); border-color: transparent; }
.pcard-fav.on svg { fill: currentColor; }
.pcard-rank { position: absolute; z-index: 3; top: 12px; inset-inline-start: 12px; min-width: 28px; height: 26px; padding: 0 8px; display: grid; place-items: center; border-radius: 8px; font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; color: #fff; background: rgba(12, 12, 14, .82); }
/* product photo plate — a neutral studio sweep; white-background photos melt into it (multiply) */
.plate {
  position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f4f5 62%, #e9e9ec 100%);
}
.pimg { position: relative; z-index: 1; display: block; max-width: 86%; max-height: 90%; width: auto; height: auto; object-fit: contain; mix-blend-mode: multiply; user-select: none; -webkit-user-drag: none; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.pcard-media:has(.plate) { padding: 10px 10px 0; }
.pcard-media .plate { width: 100%; height: 100%; }
.pcard:hover .pimg { transform: scale(1.035); }
.pcard:has(.plate) .pcard-fav { top: 18px; inset-inline-end: 18px; width: 32px; height: 32px; color: var(--text-2); background: rgba(255, 255, 255, .92); border-color: rgba(17, 17, 20, .08); }
.pcard:has(.plate) .pcard-fav .ico { width: 16px; height: 16px; }
.pcard:has(.plate) .pcard-fav.on { color: var(--on-accent); background: var(--brand); border-color: transparent; }
.pcard:has(.plate) .pcard-rank { top: 18px; inset-inline-start: 18px; }
.p-media:has(.plate) { padding: 14px; }
/* the photo frame and the photo get fixed boxes (not % of an auto-sized grid row), so the whole bottle always fits instead of overflowing and being cropped on phones */
.p-media .plate { position: absolute; inset: 14px; width: auto; height: auto; border-radius: 16px; }
.p-media .pimg { position: absolute; top: 6%; left: 7%; width: 86%; height: 88%; max-width: none; max-height: none; object-fit: contain; }
.hero-slide .plate { width: 100%; aspect-ratio: 3 / 4; border-radius: 18px; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .75); }
.pal-bottle .plate { width: 40px; height: 50px; border-radius: 10px; }
.rr-bottle .plate { width: 44px; height: 58px; border-radius: 11px; }
.ap-stage .plate { height: 90%; aspect-ratio: 3 / 4; border-radius: 16px; }
.upload-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 214px; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; padding: 6px 4px 18px; margin-inline: -4px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
/* rail chrome: soft fade on whichever edge has more content + floating glass arrows (mouse devices) */
@property --f-start { syntax: "<length>"; inherits: true; initial-value: 0px; }
@property --f-end { syntax: "<length>"; inherits: true; initial-value: 0px; }
.rail-wrap { position: relative; --f-start: 56px; --f-end: 56px; transition: --f-start .35s ease, --f-end .35s ease; }
.rail-wrap.at-start { --f-start: 0px; }
.rail-wrap.at-end { --f-end: 0px; }
.rail-wrap .rail {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--f-start), #000 calc(100% - var(--f-end)), transparent);
          mask-image: linear-gradient(to right, transparent, #000 var(--f-start), #000 calc(100% - var(--f-end)), transparent);
}
[dir="rtl"] .rail-wrap .rail {
  -webkit-mask-image: linear-gradient(to left, transparent, #000 var(--f-start), #000 calc(100% - var(--f-end)), transparent);
          mask-image: linear-gradient(to left, transparent, #000 var(--f-start), #000 calc(100% - var(--f-end)), transparent);
}
.rail-nav {
  position: absolute; z-index: 5; top: calc(50% - 30px); width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  color: var(--text); background: var(--modal-bg); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: scale(.85); pointer-events: none; transition: opacity .25s ease, transform .25s ease, background .2s, color .2s;
}
.rail-nav.prev { inset-inline-start: -14px; }
.rail-nav.next { inset-inline-end: -14px; }
[dir="ltr"] .rail-nav.prev .ico { transform: scaleX(-1); }
.rail-nav:hover { color: var(--on-accent); background: var(--grad); border-color: transparent; }
.rail-wrap:hover .rail-nav, .rail-nav:focus-visible { opacity: 1; transform: none; pointer-events: auto; }
.rail-wrap.at-start .rail-nav.prev, .rail-wrap.at-end .rail-nav.next { opacity: 0 !important; transform: scale(.85) !important; pointer-events: none !important; }
@media (hover: none), (pointer: coarse) { .rail-nav { display: none; } }
.pop { animation: pop .4s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { 40% { transform: scale(1.06); } }

/* ---------- home ---------- */
.hero { padding-block: 40px 10px; overflow-x: hidden; overflow-x: clip; }   /* off-stage carousel bottles must never widen the page (iOS lets you pan into it) */
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 36px; align-items: center; min-height: 470px; }
/* small overline label: a brand dot + quiet text, no pill glow, no sparkles */
.eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 5px 12px 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.eyebrow .ico { display: none; }
.hero-title { margin: 20px 0 16px; font-size: clamp(36px, 5vw, 62px); font-weight: 700; line-height: 1.15; }
.grad-text { display: inline-block; color: var(--accent-2); background: none; padding-bottom: .04em; }
.hero-sub { max-width: 520px; font-size: 17px; line-height: 1.85; color: var(--text-2); }
.hero-search { display: flex; align-items: center; gap: 10px; max-width: 560px; margin-top: 30px; padding: 6px; padding-inline-start: 16px; border-radius: 14px; }
.hero-search > .ico { color: var(--text-3); }
.hero-search input { flex: 1; min-width: 0; height: 44px; background: none; border: 0; outline: 0; font-size: 15.5px; }
.hero-search .btn { height: 44px; border-radius: 10px; }
.hero-search:focus-within { border-color: color-mix(in srgb, var(--brand) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent), var(--shadow); }
.hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; }
.hero-art { position: relative; height: 460px; }
/* stage behind the bottles: two hairline orbits on a faint disc (no conic rainbow, no halo) */
.hero-ring { position: absolute; inset: 6% 4%; border-radius: 50%; border: 1px solid var(--border);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .045), transparent 100%); }
.hero-ring::before { content: ""; position: absolute; inset: 11%; border-radius: 50%; border: 1px dashed var(--border); }
[data-theme="light"] .hero-ring { background: radial-gradient(closest-side, rgba(17, 17, 20, .035), transparent 100%); }
@keyframes spin { to { transform: rotate(360deg); } }
/* hero carousel: every slide sits in the centre box and is moved into a slot with transforms */
/* Performance rules for the carousel (it was the heaviest thing on the site): everything that moves is a
   transform or opacity on its own layer — no filters, no blur, no box-shadow transitions, no endless "float" —
   so the GPU only slides finished pictures around and the main thread stays idle. */
.hero-art { --s: 1; --ease: cubic-bezier(.65, 0, .35, 1); --dur: .95s; }
[dir="rtl"] .hero-art { --s: -1; }   /* next slide waits on the reading-forward side */
/* colour glow behind the centre bottle: two soft gradient layers that cross-fade (opacity only) */
.hero-glow {
  position: absolute; inset: -4% -4% 4%; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 1.2s ease;
  background: radial-gradient(closest-side, var(--gc, #C9A36A) 0%, color-mix(in srgb, var(--gc, #C9A36A) 55%, transparent) 38%, color-mix(in srgb, var(--gc, #C9A36A) 18%, transparent) 66%, transparent 100%);
  will-change: opacity;
}
.hero-glow.on { opacity: .22; }
[data-theme="light"] .hero-glow.on { opacity: .2; }
/* one neat row on a shared centre line, no tilt: prev2 · prev · CENTRE · next · next2.
   Each step every bottle glides one slot sideways; prev2/next2 sit just off-stage (invisible) so bottles
   slide in from one edge and out of the other. Parked slides (pos-h) wait at the next2 spot. */
.hero-slide {
  position: absolute; width: 38%; top: 9%; left: 31%; display: block; cursor: pointer; border-radius: 18px;
  transform: translate3d(0, 0, 0);
  transition: transform var(--dur) var(--ease), opacity calc(var(--dur) * .8) ease;
  will-change: transform, opacity; backface-visibility: hidden; -webkit-tap-highlight-color: transparent;
}
/* side bottles recede under a tint layer (its opacity is animated — cheap — instead of a brightness filter) */
.hero-slide::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  background: rgba(12, 12, 14, .34); opacity: 0; transition: opacity var(--dur) var(--ease);
}
[data-theme="light"] .hero-slide::after { background: rgba(244, 244, 245, .42); }
.hero-slide:is(.pos-next, .pos-prev)::after { opacity: 1; }
.hero-slide:is(.pos-next, .pos-prev):hover::after { opacity: .35; }
.hero-slide.pos-c     { z-index: 4; transform: translate3d(0, 0, 0); }
.hero-slide.pos-next  { z-index: 3; transform: translate3d(calc(var(--s) * 92%), 0, 0) scale(.74); }
.hero-slide.pos-prev  { z-index: 3; transform: translate3d(calc(var(--s) * -92%), 0, 0) scale(.74); }
.hero-slide.pos-next2 { z-index: 2; transform: translate3d(calc(var(--s) * 170%), 0, 0) scale(.6); opacity: 0; pointer-events: none; }
.hero-slide.pos-prev2 { z-index: 2; transform: translate3d(calc(var(--s) * -170%), 0, 0) scale(.6); opacity: 0; pointer-events: none; }
.hero-slide.pos-h     { z-index: 1; transform: translate3d(calc(var(--s) * 170%), 0, 0) scale(.6); opacity: 0; pointer-events: none; transition: none; }
.hero-bob { display: block; }
.hero-slide .bottle { width: 100%; height: auto; }
.hero-slide .plate { box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(255, 255, 255, .3), 0 34px 60px -24px rgba(0, 0, 0, .72); }
.hero-float {
  position: absolute; z-index: 5; bottom: 9%; left: 50%; transform: translateX(-50%); min-width: 176px; background: var(--modal-bg);
  display: flex; justify-content: center; padding: 10px 20px; border-radius: 18px; white-space: nowrap;
}
.hf-inner { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.hf-inner.hf-in { animation: hfIn .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes hfIn { from { opacity: 0; transform: translateY(6px); } }
.hf-brand { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-1); }
.hf-name { font-weight: 700; font-size: 14.5px; }
.hf-rate { display: flex; align-items: center; gap: 6px; font-size: 13px; }
/* progress dots: the active one stretches into a pill; JS fills it via --p (0 → 1) and advances when full */
.hero-dots { position: absolute; z-index: 5; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; }
.hero-dots i { position: relative; overflow: hidden; width: 7px; height: 7px; border-radius: 99px; background: var(--border-strong); transition: width .5s var(--ease), background .3s; }
.hero-dots i.on { width: 30px; background: color-mix(in srgb, var(--text) 18%, transparent); }
.hero-dots i.on::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grad); transform-origin: left center; transform: scaleX(var(--p, 0)); transition: transform .1s linear; }
[dir="rtl"] .hero-dots i.on::after { transform-origin: right center; }
/* sections fade up the first time they enter the viewport (added by JS only) */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 34px; padding: 4px; }
.stat { display: flex; align-items: center; gap: 12px; padding: 16px 20px; }
.stat + .stat { border-inline-start: 1px solid var(--border); }
.stat b { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat > span:last-child { color: var(--text-3); font-size: 13.5px; }
.stat-ico { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
#season-picks { transition: opacity .16s; }
#season-picks.fade { opacity: 0; }
.pgrid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.accord-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.accord-tile {
  position: relative; overflow: hidden; isolation: isolate; min-height: 100px; padding: 16px; border-radius: 14px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .25s;
}
.at-glow { position: absolute; z-index: -1; top: -46px; inset-inline-end: -36px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(closest-side, var(--a), transparent); opacity: .35; transition: transform .5s; }
.accord-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--a) 55%, var(--border)); box-shadow: var(--shadow-lg); }
.accord-tile:hover .at-glow { transform: scale(1.45); }
.at-name { font-size: 17px; font-weight: 700; }
.at-count { font-size: 12.5px; color: var(--text-2); }
.at-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
/* compact tile with a real photo: small round photo (on a pale tint of the accord colour, multiplied so white
   studio backgrounds take the tint, ringed in the accord colour) + name and count beside it */
.accord-tiles:has(.has-img) { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.accord-tile.has-img { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 0; padding: 10px; padding-inline-end: 10px; border-radius: 14px; }
.accord-tile.has-img .at-glow { display: none; }
.at-media { position: relative; width: 48px; height: 48px; flex-shrink: 0; display: block; overflow: hidden; border-radius: 10px; background: color-mix(in srgb, var(--a) 12%, #fff);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.at-media img { display: block; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.at-media::after { content: ""; position: absolute; inset-inline-end: 0; bottom: 0; width: 100%; height: 3px; pointer-events: none; background: var(--a); }
.accord-tile.has-img:hover .at-media img { transform: scale(1.12); }
.accord-tile.has-img .at-name { font-size: 15px; line-height: 1.3; }
.accord-tile.has-img .at-count { font-size: 12px; }
@media (max-width: 1180px) { .accord-tiles:has(.has-img) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cta { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; flex-wrap: wrap; gap: 24px; padding: 32px 34px; border-radius: 20px; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 220px at 100% 0, rgba(var(--glow), .1), transparent 70%); }
[dir="rtl"] .cta::before { background: radial-gradient(600px 220px at 0 0, rgba(var(--glow), .1), transparent 70%); }
.cta > div { flex: 1; min-width: 240px; }
.cta h2 { font-size: 24px; font-weight: 700; }
.cta p { margin-top: 6px; max-width: 560px; color: var(--text-2); }
.cta-art { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; color: var(--accent-2); background: color-mix(in srgb, var(--brand) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }

/* note chips */
.note-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.note-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px; padding-inline-end: 13px; border-radius: 999px; font-size: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shine); transition: transform .2s, border-color .2s, background .2s;
}
.note-chip:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--f) 60%, transparent); background: color-mix(in srgb, var(--f) 12%, var(--surface)); }
.note-orb {
  width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-size: 15px; line-height: 1;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--f) 45%, white), color-mix(in srgb, var(--f) 78%, black));
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .6), 0 4px 12px -3px color-mix(in srgb, var(--f) 70%, transparent);
}
.note-chip.lg { padding: 5px; padding-inline-end: 16px; font-size: 14.5px; }
.note-chip.lg .note-orb { width: 36px; height: 36px; font-size: 19px; }
/* real ingredient photos inside the orbs (emoji stays as fallback when a photo is missing) */
.note-orb.has-img, .note-hero-orb.has-img, .ng-orb.has-img, .fam-dot.has-img {
  position: relative; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--f) 60%, transparent), 0 4px 12px -3px color-mix(in srgb, var(--f) 70%, transparent);
}
.has-img > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.note-orb.has-img::after, .note-hero-orb.has-img::after, .ng-orb.has-img::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, .38), transparent 42%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.note-hero-orb.has-img { box-shadow: 0 0 0 4px color-mix(in srgb, var(--f) 55%, transparent), 0 24px 54px -16px var(--f); }
.fam-dot { width: 20px; height: 20px; flex-shrink: 0; display: inline-grid; place-items: center; border-radius: 50%; font-size: 12px; line-height: 1; }
.fam-dot.has-img { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--f) 60%, transparent); }
.fam-link { display: inline-flex; align-items: center; gap: 7px; }
.note-count { font-size: 12px; color: var(--text-3); font-weight: 600; }

/* ---------- explore ---------- */
.explore { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 30px; }
.filters { position: sticky; top: calc(var(--topbar-h) + 18px); max-height: calc(100vh - var(--topbar-h) - 36px); overflow: auto; padding: 20px; scrollbar-width: thin; }
.filters-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.filters-head h2 { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 17px; }
.filters .field { margin-bottom: 20px; }
.filters .field input { height: 42px; }
.filters-backdrop { display: none; }
.results-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.results-count { flex: 1; font-weight: 500; color: var(--text-2); }
.select-sort select { height: 42px; min-width: 190px; border-radius: 999px; background: var(--surface-2); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.active-filters:empty { display: none; }

/* ---------- perfume page ---------- */
.p-page { position: relative; }
.p-backdrop { position: absolute; z-index: -1; inset: -90px 0 auto; height: 680px; pointer-events: none; opacity: .6;
  background: radial-gradient(55% 60% at 70% 22%, color-mix(in srgb, var(--c) 48%, transparent), transparent 70%), radial-gradient(40% 50% at 18% 0%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 22px 0 16px; font-size: 13px; color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.crumbs span { color: var(--text-2); }
.p-hero-grid { display: grid; grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); gap: 34px; align-items: start; }
.p-media { position: sticky; top: calc(var(--topbar-h) + 16px); aspect-ratio: 1 / 1.06; overflow: hidden; display: grid; place-items: center; padding: 34px; border-radius: 20px; }
/* static: the photo area is painted once and stays still */
.p-media-glow { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 60%, transparent), color-mix(in srgb, var(--c) 18%, transparent) 55%, transparent); opacity: .5; }
.p-bottle { position: relative; height: 90%; width: auto; filter: drop-shadow(0 30px 34px rgba(0, 0, 0, .38)); }
.p-media-tags { position: absolute; z-index: 2; top: 24px; inset-inline-start: 24px; display: flex; gap: 6px; }
.p-brand { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--accent-2); }
html[lang="en"] .p-brand { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.p-brand:hover { text-decoration: underline; text-underline-offset: 4px; }
.p-name { margin: 6px 0 4px; font-size: clamp(30px, 4vw, 46px); font-weight: 700; line-height: 1.15; }
.p-alt { font-size: 16px; color: var(--text-3); }
.p-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 22px 0 14px; }
.fact { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.fact .ico { grid-row: span 2; color: var(--text-3); }
.fact span { font-size: 12px; color: var(--text-3); }
.fact b { font-size: 14px; font-weight: 600; line-height: 1.5; }
.fact b a { text-decoration: underline dotted; text-underline-offset: 3px; }
.fact b a:hover { color: var(--accent-2); }
.p-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; padding: 16px 20px; border-radius: 14px; }
.pr-score { text-align: center; }
.pr-score b { display: block; font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.pr-score span { font-size: 12px; color: var(--text-3); }
.pr-mid { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.pr-mine { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding-inline-start: 18px; border-inline-start: 1px solid var(--border); font-size: 12.5px; }
.star-input { display: inline-flex; gap: 1px; }
.star-input button { padding: 2px; color: var(--star-off); transition: transform .15s, color .15s; }
.star-input button.on { color: var(--star); }
.star-input:hover button { color: var(--star); }
.star-input button:hover ~ button { color: var(--star-off); filter: none; }
.star-input button:hover { transform: scale(1.2); }
.p-shelf { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.shelf-btn {
  flex: 1; min-width: 118px; height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px;
  font-size: 14px; font-weight: 600; color: var(--text-2); background: var(--card); border: 1px solid var(--border-strong);
  transition: background .18s, color .18s, border-color .18s;
}
.shelf-btn:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.shelf-btn small { font-size: 12px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.shelf-btn.on { color: var(--on-accent); background: var(--brand); border-color: transparent; }
.shelf-btn.on small { color: rgba(20, 20, 22, .62); }
.shelf-btn.on svg { fill: currentColor; }
.summary-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stile { display: flex; flex-direction: column; gap: 6px; padding: 13px 14px; border-radius: 12px; text-align: start; background: var(--card); border: 1px solid var(--border); transition: border-color .18s; }
.stile:hover { border-color: var(--border-strong); }
.stile-h { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.stile b { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.stile-wide { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
.stile-seasons { display: flex; flex-wrap: wrap; gap: 6px; }
.stile-seasons span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.stile-seasons .ico { color: var(--text-3); }

/* boutique price box: same panel as the rating card. Big price for the chosen size, size chips whose
   bottle grows with the ml, a $–$$$$ price tier, and a "best value" tag on the cheapest price per ml.
   Chosen size = brand outline + light tint. Only opacity/transform move (the price fades in on a size change).
   Sits under the rating card, compact. */
.p-price { margin: 12px 0 0; padding: 12px 14px 10px; border-radius: 12px; }
.pp-head { display: flex; align-items: center; gap: 8px; }
.pp-ico { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; border-radius: 7px; color: var(--accent-2); background: rgba(var(--glow), .12); }
.pp-title { flex: 1; min-width: 0; margin: 0; font-size: 13px; font-weight: 600; color: var(--text-2); }
.pp-tier { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.pp-signs { display: inline-flex; gap: 1px; font-family: "Inter", system-ui, sans-serif; font-size: 11.5px; font-weight: 700; }
.pp-signs i { font-style: normal; color: var(--text-3); opacity: .4; }
.pp-signs i.on { color: var(--accent-2); opacity: 1; }
.pp-body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 18px; margin-top: 10px; }
.pp-main { min-width: 0; }
.pp-amount { display: inline-flex; align-items: flex-start; gap: 2px; font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.pp-cur { margin-top: 2px; font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--text-3); }
.pp-anim { animation: ppIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes ppIn { from { opacity: 0; transform: translateY(4px); } }
.pp-sub { display: flex; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 12px; color: var(--text-3); }
.pp-sub bdi { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); }
.pp-dot { width: 3px; height: 3px; margin-inline: 7px; border-radius: 50%; background: currentColor; opacity: .6; }
.pp-sizes { display: flex; flex-wrap: wrap; gap: 12px 6px; }
.pp-size {
  position: relative; min-width: 62px; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 8px 5px;
  border-radius: 9px; color: var(--text-2); background: transparent; border: 1px solid var(--border-strong);
  transition: border-color .18s, background-color .18s, color .18s;
}
.pp-size:hover { color: var(--text); border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.pp-size.on { color: var(--text); border-color: var(--brand); background: rgba(var(--glow), .1); }
.pp-bottle { height: 20px; display: flex; align-items: flex-end; color: var(--text-3); }
.pp-size.on .pp-bottle { color: var(--accent-2); }
.pp-ml { font-size: 11.5px; font-weight: 600; line-height: 1.5; }
.pp-usd { font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums; color: var(--text-3); }
.pp-size.on .pp-usd { color: var(--text-2); }
.pp-best {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%); padding: 0 6px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; line-height: 1.6; white-space: nowrap; color: var(--on-accent); background: var(--brand);
}
.pp-note { display: flex; align-items: flex-start; gap: 6px; margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--border); font-size: 11px; line-height: 1.55; color: var(--text-3); }
.pp-note .ico { flex-shrink: 0; margin-top: 2px; }
@media (max-width: 560px) {
  .p-price { padding: 11px 12px 9px; }
  .pp-amount { font-size: 28px; }
  .pp-sizes { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); }
  .pp-size { min-width: 0; }
}
.meter { display: flex; gap: 3px; }
.meter i { flex: 1; height: 4px; border-radius: 99px; background: var(--track); }
.meter i.on { background: var(--brand); }
.gscale { position: relative; height: 6px; margin-block: 2px; border-radius: 99px; background: linear-gradient(to right, #ff8fb8, #c8a8ff 50%, #7fb0ff); }
[dir="rtl"] .gscale { background: linear-gradient(to left, #ff8fb8, #c8a8ff 50%, #7fb0ff); }
.gscale i { position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; margin-inline-start: -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(0, 0, 0, .25), 0 4px 10px rgba(0, 0, 0, .4); transition: inset-inline-start .6s; }

.p-tabs { position: sticky; z-index: 40; top: calc(var(--topbar-h) + env(safe-area-inset-top)); margin-top: 34px; border-radius: 0; border-inline: 0; box-shadow: var(--shine);
  background: color-mix(in srgb, var(--bg) 93%, transparent); }   /* near-opaque instead of a scroll-time blur */
.p-tabs-inner { display: flex; gap: 4px; padding-block: 8px; overflow-x: auto; scrollbar-width: none; }
.p-tabs-inner::-webkit-scrollbar { display: none; }
.p-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--text-2); transition: background .18s, color .18s; }
.p-tab:hover { color: var(--text); background: var(--surface); }
.p-tab.on { color: var(--text); }
.p-tab.on::after { content: ""; position: absolute; inset-inline: 14px; bottom: -8px; height: 2px; border-radius: 2px; background: var(--brand); }
.p-share { margin-inline-start: auto; }
.p-section { padding-block: 32px 6px; scroll-margin-top: calc(var(--topbar-h) + 72px); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.p-desc { font-size: 15.5px; line-height: 1.95; color: var(--text-2); }
.accord-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.accord-bars { display: flex; flex-direction: column; gap: 7px; }
.abar { position: relative; display: flex; align-items: center; height: 34px; overflow: hidden; border-radius: 11px; background: var(--track); transition: transform .2s; }
.abar:hover { transform: translateX(3px); }
[dir="rtl"] .abar:hover { transform: translateX(-3px); }
/* accord bars: a translucent glass tint of each accord's colour (not a solid block) with a thin tinted edge,
   so they sit softly on the glass cards; labels use the theme text colour, readable on every tint */
.abar-fill {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: 11px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--a) 52%, transparent), color-mix(in srgb, var(--a) 36%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px color-mix(in srgb, var(--a) 45%, transparent);
  transition: width 1s cubic-bezier(.2, .8, .2, 1) var(--d);
}
[data-theme="light"] .abar-fill {
  background: linear-gradient(180deg, color-mix(in srgb, var(--a) 56%, transparent), color-mix(in srgb, var(--a) 42%, transparent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px color-mix(in srgb, color-mix(in srgb, var(--a) 75%, #18181b) 45%, transparent);
}
.accord-bars.in .abar-fill { width: var(--w); }
.abar-label { position: relative; padding-inline: 13px; font-size: 13.5px; font-weight: 600; white-space: nowrap; color: var(--text); text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
[data-theme="light"] .abar-label { text-shadow: 0 1px 0 rgba(255, 255, 255, .45); }

/* fragrance pyramid: one glass panel, each layer a centred heading between hairlines and a row of photo tiles
   (ingredient photo above its name), bottom-aligned so the varying tile sizes read as one tidy line */
.pnotes { --pn: 92px; --line: color-mix(in srgb, var(--text-3) 42%, transparent); margin-top: 18px; padding: 30px clamp(14px, 3vw, 34px) 34px; display: flex; flex-direction: column; gap: 34px; text-align: center; }
.pn-head { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 14.5px; font-weight: 700; color: var(--text-2); }
.pn-head > span { flex: none; white-space: nowrap; }
.pn-head::before, .pn-head::after { content: ""; flex: 1 1 0; max-width: 170px; height: 1px; }
.pn-head::before, [dir="rtl"] .pn-head::after { background: linear-gradient(90deg, transparent, var(--line)); }
.pn-head::after, [dir="rtl"] .pn-head::before { background: linear-gradient(90deg, var(--line), transparent); }
[lang="en"] .pn-head { text-transform: uppercase; letter-spacing: .1em; font-size: 13px; }
.pn-hint { margin-top: 5px; font-size: 12.5px; color: var(--text-3); }
.pn-notes { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 20px 22px; }
.pnote { --s: calc(var(--pn) * var(--k, 1)); display: flex; flex-direction: column; align-items: center; gap: 9px; max-width: max(var(--s), 136px); color: var(--text); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.pnote:hover { transform: translateY(-4px); }
.pnote-img {
  position: relative; overflow: hidden; width: var(--s); height: var(--s); flex-shrink: 0; display: grid; place-items: center; border-radius: 16px;
  font-size: calc(var(--s) * .46); line-height: 1;
  background: linear-gradient(160deg, color-mix(in srgb, var(--f) 40%, white), color-mix(in srgb, var(--f) 80%, black));
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .75); transition: box-shadow .3s;
}
.pnote-img.has-img { background: #fff; }
.pnote-img.has-img > img { border-radius: inherit; }
.pnote-img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.pnote:hover .pnote-img { box-shadow: 0 0 0 2px color-mix(in srgb, var(--f) 75%, transparent), 0 16px 30px -14px var(--f); }
.pnote-name { font-size: 14px; font-weight: 600; line-height: 1.35; text-wrap: balance; transition: color .2s; }
.pnote:hover .pnote-name { color: var(--accent-1); }
[data-theme="light"] .pnote-img { box-shadow: 0 0 0 1px rgba(24, 24, 27, .07), 0 12px 24px -16px rgba(24, 24, 27, .45); }
[data-theme="light"] .pnote:hover .pnote-img { box-shadow: 0 0 0 2px color-mix(in srgb, var(--f) 75%, transparent), 0 16px 30px -14px var(--f); }
[data-theme="light"] .pnote:hover .pnote-name { color: var(--text); }
@media (max-width: 560px) {
  .pnotes { --pn: 74px; gap: 28px; padding-block: 24px 28px; }
  .pn-notes { gap: 16px 14px; margin-top: 16px; }
  .pnote { max-width: max(var(--s), 100px); gap: 7px; }
  .pnote-name { font-size: 12.5px; }
}
.tier-badge { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }

.login-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 18px; margin-bottom: 16px; border-radius: 18px; }
.login-banner > .ico { color: var(--accent-1); }
.login-banner > span { flex: 1; min-width: 200px; color: var(--text-2); }
/* community votes: compact cards (6 = two even rows of three on desktop; the seasons card takes a normal cell) */
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 14px; }
.vcard { padding: 15px 16px 16px; }
.vcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.vcard-head > div { flex: 1; min-width: 0; }
.vcard-head h3 { font-size: 15px; font-weight: 700; }
.vcard-head p { font-size: 12px; color: var(--text-3); }
.vcard-ico { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.vcard-ico .ico { width: 16px; height: 16px; }
.vcard-total { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.vopts { display: flex; flex-direction: column; gap: 6px; }
.vopt {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 33px; padding: 5px 12px; border-radius: 10px; text-align: start; background: var(--track); border: 1px solid transparent;
  transition: border-color .2s, transform .12s, box-shadow .25s;
}
.vopt:hover { border-color: var(--border-strong); }
.vopt:active { transform: scale(.99); }
/* result bars: every bar in the brand gold (no gray); the leading answer a deeper shade of it */
.vopt-fill { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: inherit; background: rgba(var(--glow), .26); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.vopt.top .vopt-fill { background: rgba(var(--glow), .5); }
[data-theme="light"] .vopt-fill { background: rgba(var(--glow), .3); }
[data-theme="light"] .vopt.top .vopt-fill { background: rgba(var(--glow), .55); }
.vopt.top .vopt-label small { color: var(--text-2); }
.vopt-label { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 7px; font-size: 12px; font-weight: 500; }   /* a clear step below the 15px card titles */
.vopt-label small { font-size: 10.5px; font-weight: 400; color: var(--text-3); }
.vopt-pct { position: relative; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vopt.on { border-color: color-mix(in srgb, var(--accent-2) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 14%, transparent); }
.vcheck { width: 18px; height: 18px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; color: var(--on-accent); background: var(--brand); }
/* "when to wear": small 3×2 tiles that fill the card, so it lines up with its neighbours */
.vcard-season { display: flex; flex-direction: column; }
.season-grid { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(84px, 1fr); gap: 8px; }
.season { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 6px; border-radius: 13px; background: var(--track); border: 1px solid transparent; transition: border-color .2s, transform .15s, box-shadow .25s; }
.season:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.season > *:not(.season-fill) { position: relative; }
.season-fill { position: absolute !important; inset-inline: 0; bottom: 0; background: rgba(var(--glow), .2); transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.season-emoji { display: grid; place-items: center; height: 24px; color: var(--text-2); }
.season.on .season-emoji { color: var(--accent-2); }
.season-name { font-size: 11.5px; font-weight: 500; }
.season-pct { font-size: 12px; font-variant-numeric: tabular-nums; }
.season.on { border-color: color-mix(in srgb, var(--accent-2) 70%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 14%, transparent); }
.season .vcheck { position: absolute !important; top: 6px; inset-inline-end: 6px; }

/* reviews */
.review-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.review { padding: 18px; }
.review-head { display: flex; align-items: center; gap: 12px; }
.review-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }
.review-who .muted { font-size: 12.5px; }
.review-body { margin-top: 12px; line-height: 1.9; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.review-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.review-perfume { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; font-weight: 600; }
.rp-dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.btn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); transition: color .2s, border-color .2s, background .2s; }
.btn-chip:hover { color: var(--text); border-color: var(--border-strong); }
.btn-chip.on { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 50%, transparent); background: color-mix(in srgb, var(--accent-2) 10%, transparent); }
.review-form { padding: 18px; }
.rf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rf-head div { display: flex; flex-direction: column; line-height: 1.45; }
.rf-head .muted { font-size: 13px; }
.rf-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rf-count { flex: 1; font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- brands / notes / entity ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding-bottom: 30px; }
.brand-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 16px; transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s; }
.brand-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, var(--border)); box-shadow: var(--shine), 0 22px 44px -24px var(--c); }
.monogram {
  position: relative; overflow: hidden; grid-row: span 2; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 17px;
  font-weight: 700; font-size: 18px; letter-spacing: .04em; color: #fff; flex-shrink: 0;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c, #a1a1aa) 78%, white), color-mix(in srgb, var(--c, #a1a1aa) 72%, black));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 10px 22px -10px var(--c, #a1a1aa); text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.monogram::after { content: ""; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent); }
.monogram.xl { width: 112px; height: 112px; font-size: 34px; border-radius: 22px; }
.monogram.sm { width: 40px; height: 40px; font-size: 13px; border-radius: 12px; grid-row: auto; }
/* official brand logo on a white glossy plate (logos are dark-on-transparent, so the plate keeps them visible in dark mode) */
.blogo {
  position: relative; overflow: hidden; grid-row: span 2; flex-shrink: 0;
  width: 104px; height: 56px; padding: 9px 12px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 100% at 50% 0%, #ffffff 0%, #f5f5f6 65%, #e8e8eb 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(0, 0, 0, .05), 0 10px 22px -12px rgba(0, 0, 0, .6);
}
.blogo::after { content: ""; position: absolute; inset: 0 0 55% 0; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, .6), transparent); }
.blogo img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.blogo.xl { width: 220px; height: 112px; padding: 18px 26px; border-radius: 18px; }
.blogo.sm { width: 64px; height: 40px; padding: 6px 8px; border-radius: 12px; grid-row: auto; }
.blogo.inline { width: 132px; height: 46px; padding: 8px 14px; border-radius: 14px; grid-row: auto; }
[data-theme="light"] .blogo { box-shadow: inset 0 1px 0 #fff, 0 0 0 1px var(--border), 0 10px 22px -14px rgba(24, 24, 27, .35); }
.brand-tile:hover .blogo { box-shadow: inset 0 1px 0 #fff, 0 12px 26px -12px var(--c); }
.p-brandrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.p-brandlogo { display: inline-flex; border-radius: 14px; transition: transform .2s ease; }
.p-brandlogo:hover { transform: translateY(-2px); }
.bt-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.bt-info b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-info .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--text-3); }
.entity-hero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; flex-wrap: wrap; gap: 26px; margin-top: 28px; padding: 30px; border-radius: 20px; }
.entity-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 130% at 0% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 62%); }
[dir="rtl"] .entity-hero::before { background: radial-gradient(60% 130% at 100% 0%, color-mix(in srgb, var(--c) 38%, transparent), transparent 62%); }
.eh-info { flex: 1; min-width: 240px; }
.eh-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.eh-stats > div { display: flex; flex-direction: column; min-width: 112px; padding: 10px 16px; border-radius: 15px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shine); }
.eh-stats span { font-size: 12px; color: var(--text-3); }
.eh-stats b { display: flex; align-items: center; gap: 5px; font-size: 16px; }
.eh-stats b .ico { color: var(--star); }
.eh-action { align-self: flex-start; }
.note-hero-orb {
  width: 112px; height: 112px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-size: 54px;
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--f) 45%, white), color-mix(in srgb, var(--f) 78%, black));
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, .5), 0 24px 54px -16px var(--f);
}
.fam-chips { margin-bottom: 6px; }
.note-group { margin-top: 28px; }
.ng-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 19px; font-weight: 700; }
.ng-title .muted { font-size: 14px; font-weight: 500; }
.ng-orb { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-size: 18px; background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--f) 45%, white), color-mix(in srgb, var(--f) 78%, black)); box-shadow: inset 0 1px 2px rgba(255, 255, 255, .6); }
.profile-hero .avatar { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 20px 44px -14px hsl(var(--h) 70% 50% / .8); }
.rated-list { display: grid; gap: 10px; }
.rated-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-radius: 18px; transition: transform .2s; }
.rated-row:hover { transform: translateY(-2px); }
.rr-bottle { width: 44px; height: 58px; display: grid; place-items: center; }
.rr-bottle svg { width: 100%; height: 100%; }
.rr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.45; }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; padding-bottom: 30px; }
.admin-form { display: flex; flex-direction: column; gap: 16px; }
fieldset.card { margin: 0; min-width: 0; }
legend.card-title { float: left; width: 100%; padding: 0; }
legend.card-title + * { clear: both; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
.span-2 { grid-column: span 2; }
.token-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; padding: 6px 8px; border-radius: 14px; background: var(--input-bg); border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s; }
.tokens { display: contents; }
.token-input input { flex: 1; min-width: 170px; height: 34px !important; padding: 0 6px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: 0; }
.token { display: inline-flex; align-items: center; gap: 6px; padding: 4px; padding-inline-start: 11px; border-radius: 999px; font-size: 13px; background: var(--grad-soft); border: 1px solid var(--border); }
.token button { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); }
.token button:hover { color: var(--danger); }
.accord-sliders { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.aslider { display: grid; grid-template-columns: 120px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: 13.5px; }
.aslider span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-inline-end: 7px; border-radius: 50%; background: var(--a); }
.aslider input { width: 100%; accent-color: var(--a); }
.aslider b { font-variant-numeric: tabular-nums; text-align: end; }
.admin-side { display: flex; flex-direction: column; gap: 16px; }
.admin-side .sticky { position: sticky; top: calc(var(--topbar-h) + 18px); }
.admin-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.ap-stage { width: 100%; aspect-ratio: 1.25; display: grid; place-items: center; border-radius: 18px; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, transparent), transparent), var(--track); }
.ap-stage svg { height: 88%; width: auto; }
input[type="color"] { width: 100%; height: 46px; padding: 4px; border-radius: 14px; border: 1px solid var(--border); background: var(--input-bg); cursor: pointer; }
.custom-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.custom-row a { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.sep { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---------- Fragella ---------- */
.spinner { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent-2); animation: spin .8s linear infinite; }
.fg-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px; color: var(--text-2); font-size: 14px; }
.mini-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.mini-badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.mini-badge.warn { color: var(--accent-1); border-color: color-mix(in srgb, var(--accent-1) 40%, transparent); background: color-mix(in srgb, var(--accent-1) 10%, transparent); }
.fg-panel { margin-top: 26px; }
.fg-panel.glass { padding: 22px; }
.fg-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; position: relative; overflow: hidden; isolation: isolate; }
.fg-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad); opacity: .09; }
.fg-cta > div { flex: 1; min-width: 220px; }
.fg-cta h3 { font-size: 17px; font-weight: 700; }
.fg-cta p { margin-top: 2px; font-size: 14px; color: var(--text-2); }
.fg-cta-ico { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: var(--accent-2); background: color-mix(in srgb, var(--brand) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.rcard { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius); }
.rcard-media { aspect-ratio: 1; display: grid; place-items: center; }
.rcard-media .plate { width: 100%; height: 100%; }
.rcard-media .bottle { height: 90%; }
.rcard-body { padding: 0 4px; flex: 1; }
.source-note { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 12.5px; color: var(--text-3); }
.admin-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fg-admin .seg { margin-bottom: 12px; }
.fg-status { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 9px 12px; border-radius: 12px; font-size: 13px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.fg-status i { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.fg-status.ok i { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.fg-keyrow, .fg-search-row { display: flex; gap: 10px; margin-bottom: 8px; }
.fg-keyrow input, .fg-search-row input { flex: 1; min-width: 0; width: 100%; height: 46px; padding: 0 14px; border-radius: 14px; background: var(--input-bg); border: 1px solid var(--border); outline: none; }
.fg-search-row .input-ico { flex: 1; min-width: 0; }
.fg-search-row .btn { height: 46px; }
.fg-keyrow input:focus, .fg-search-row input:focus { border-color: color-mix(in srgb, var(--accent-2) 70%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 16%, transparent); }
#fg-results:not(:empty) { margin-top: 14px; }
.fg-rows { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow: auto; padding: 2px; scrollbar-width: thin; }
.fg-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.fg-row.is-existing { opacity: .65; }
.fg-check input { width: 18px; height: 18px; accent-color: var(--accent-2); cursor: pointer; }
.fg-thumb { width: 46px; height: 56px; flex-shrink: 0; display: grid; place-items: center; }
.fg-thumb .plate { width: 46px; height: 56px; border-radius: 11px; }
.fg-thumb .bottle { height: 100%; }
.fg-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.fg-info b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-info .muted { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg-badges { display: flex; gap: 6px; margin-top: 3px; }
.fg-badges:empty { display: none; }
.fg-import { margin-top: 12px; }
.fg-import:disabled { opacity: .5; pointer-events: none; }
.fg-empty { padding: 12px 0; }
.fg-export { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.custom-list { max-height: 340px; overflow: auto; scrollbar-width: thin; }
.custom-row a { flex: 1; }
.cr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-remote { border: 1px dashed color-mix(in srgb, var(--accent-2) 45%, transparent); margin-top: 6px; }
.pal-globe { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; color: var(--on-accent); background: var(--grad); }
#pal-fg .form-error { margin: 8px; }
button.pal-item { width: 100%; text-align: start; }

/* ---------- modal / auth / palette ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-wrap:has(.modal-palette) { place-items: start center; padding-top: 11vh; padding-top: 11dvh; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 5, 6,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.modal { position: relative; width: min(440px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto; padding: 28px; border-radius: 18px; background: var(--modal-bg); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(18px) scale(.97); transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s; }
.modal-wrap.show .modal-backdrop { opacity: 1; }
.modal-wrap.show .modal { opacity: 1; transform: none; }
.modal-x { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; }
.auth-top { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 18px; }
.auth-top .logo-mark { height: 54px; width: auto; color: var(--text); }
.auth-tabs { margin: 0; }
.auth-title { font-size: 24px; font-weight: 700; text-align: center; }
.auth-sub { margin: 6px 0 22px; font-size: 14px; text-align: center; color: var(--text-3); }
.auth-switch { margin-top: 16px; font-size: 14px; text-align: center; color: var(--text-3); }
.auth-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; padding: 10px; border-radius: 12px; font-size: 12.5px; color: var(--text-3); background: var(--surface); }
.modal-palette { width: min(640px, 100%); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.palette-input > .ico { color: var(--accent-2); }
.palette-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 17px; }
.palette-results { max-height: min(58vh, 480px); max-height: min(58dvh, 480px); overflow: auto; padding: 8px; }
.pal-group h4 { padding: 10px 10px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; transition: background .15s; }
.pal-item.active, .pal-item:hover { background: var(--surface-2); box-shadow: var(--shine), 0 0 0 1px var(--border); }
.pal-bottle { width: 42px; height: 50px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 50%, transparent), transparent); }
.pal-bottle svg { height: 48px; width: auto; }
.pal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.pal-text b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-text .muted { font-size: 12.5px; }
.pal-all { margin-top: 4px; border-top: 1px dashed var(--border); border-radius: 0 0 14px 14px; color: var(--accent-2); }
.pal-hint { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; font-size: 13px; color: var(--text-3); }
.pal-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; color: var(--text-3); }
.palette-foot { display: flex; flex-wrap: wrap; gap: 16px; padding: 11px 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); }
.palette-foot kbd { margin-inline-end: 3px; }
.pal-close { display: grid; place-items: center; min-width: 36px; height: 36px; border-radius: 10px; color: var(--text-3); }
.pal-close:hover { color: var(--text); background: var(--surface-2); }
.show-touch { display: none; }
@media (pointer: coarse) {
  .hide-touch, .palette-foot, .searchpill kbd { display: none !important; }
  .show-touch { display: inline-grid; }
}

/* ---------- toasts ---------- */
#toasts { position: fixed; z-index: 200; bottom: 24px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; padding-inline-start: 10px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--text); background: var(--toast-bg); border: 1px solid var(--border-strong); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .55), var(--shine);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); opacity: 0; transform: translateY(18px) scale(.96); transition: opacity .3s, transform .4s cubic-bezier(.2, .8, .2, 1);
}
.toast.show { opacity: 1; transform: none; }
.toast-ico { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--on-accent); background: var(--grad); }
.toast.err .toast-ico { color: #fff; background: var(--danger); }
.toast.info .toast-ico { color: #fff; background: #52525b; }

/* ---------- footer & tabbar ---------- */
.footer { margin-top: 50px; padding: 42px 0 30px; border-top: 1px solid var(--border); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 70%, #000 30%)); }
[data-theme="light"] .footer { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .6)); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { margin-bottom: 12px; font-size: 14px; }
.footer-grid a:not(.logo), .linklike { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 14px; color: var(--text-3); text-align: start; transition: color .2s; }
.footer-grid a:not(.logo):hover, .linklike:hover { color: var(--text); }
.footer-brand p { max-width: 400px; margin-top: 12px; font-size: 14px; line-height: 1.85; color: var(--text-3); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }
.tabbar { display: none; }
.only-mobile, .only-sm { display: none !important; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .pgrid-5 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
@media (max-width: 1024px) {
  /* the full search pill no longer fits next to the nav at tablet widths (it pushed "Log in" off-screen): use the icon */
  .searchpill { display: none; }
  .topbar .only-sm { display: grid !important; }
  .topbar-actions { margin-inline-start: auto; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 10px; }
  .hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .hero-chips { justify-content: center; }
  .hero-art { height: 380px; max-width: 520px; width: 100%; margin-inline: auto; order: -1; }
  .hero-slide { width: 35%; left: 32.5%; top: 6%; }
  .p-hero-grid { grid-template-columns: 1fr; }
  .p-media { position: relative; top: 0; max-width: 460px; width: 100%; margin-inline: auto; aspect-ratio: 1.15; }
  .p-info { text-align: start; }
  .admin { grid-template-columns: 1fr; }
  .admin-side .sticky { position: static; }
}
@media (max-width: 960px) {
  .only-mobile { display: inline-flex !important; }
  .explore { grid-template-columns: 1fr; }
  .filters {
    position: fixed; z-index: 90; inset: auto 0 0 0; top: auto; max-height: 86vh; max-height: 86dvh; border-radius: 18px 18px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .4s cubic-bezier(.2, .8, .2, 1);
    background: var(--modal-bg);
  }
  .filters-backdrop { display: block; position: fixed; inset: 0; z-index: 89; background: rgba(5, 5, 6,.5); opacity: 0; pointer-events: none; transition: opacity .3s; }
  body.filters-open { overflow: hidden; }
  body.filters-open .filters { transform: none; }
  body.filters-open .filters-backdrop { opacity: 1; pointer-events: auto; }
  .filters-head .btn-text { margin-inline-start: auto; }
  #filters-apply { position: sticky; bottom: 0; z-index: 2; }
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --topbar-h: 60px; }
  .only-sm { display: grid !important; }
  .mainnav, .searchpill { display: none; }
  .topbar-actions { margin-inline-start: auto; }
  .tabbar {
    position: fixed; z-index: 60; inset-inline: 0; bottom: 0; display: flex; align-items: center; justify-content: space-around;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--tabbar-bg); border-top: 1px solid var(--border);
  }
  .tabbar > a, .tabbar > button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px; padding: 4px 6px; font-size: 11px; color: var(--text-3); }
  .tabbar .on { color: var(--text); }
  .tabbar .on .ico { color: var(--accent-2); }
  .tabbar .tab-search { min-width: 0; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: var(--on-accent); background: var(--brand); }
  .tabbar .tab-search .ico { color: var(--on-accent) !important; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  #toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .summary-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .season-grid { grid-auto-rows: minmax(74px, auto); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .section { padding-block: 26px; }
  .page-head { padding-block: 26px 16px; }
  .p-rating { gap: 14px; }
  .pr-mine { padding-inline-start: 0; border-inline-start: 0; width: 100%; flex-direction: row; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .p-media { aspect-ratio: 1; } /* square on phones: more room for the (portrait) bottle photo */
  .container { padding-inline: 16px; }
  .pgrid, .pgrid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pcard-body { padding: 4px 12px 13px; }
  .pcard-name { font-size: 14.5px; }
  .pcard-media { padding: 16px 12px 2px; }
  .pcard-conc { display: none; }
  .rail { grid-auto-columns: 168px; gap: 12px; }
  .hero { padding-top: 18px; }
  .hero-art { height: 318px; }
  .hero-slide { width: 38%; left: 31%; top: 3%; }
  .hero-float { bottom: 18px; min-width: 150px; padding: 7px 14px; border-radius: 15px; }
  .hf-name { font-size: 13.5px; }
  .hero-sub { font-size: 16px; }
  .hero-search { padding-inline-start: 14px; }
  .hero-search .btn { padding: 0 16px; }
  .stat { padding: 12px; gap: 10px; }
  .stat b { font-size: 20px; }
  .stat-ico { width: 34px; height: 34px; }
  .entity-hero { padding: 22px; gap: 18px; }
  .monogram.xl, .note-hero-orb { width: 84px; height: 84px; font-size: 30px; }
  .blogo.xl { width: 168px; height: 84px; padding: 14px 18px; border-radius: 16px; }
  .note-hero-orb { font-size: 42px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .card { padding: 18px; }
  .vcard { padding: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .p-share span { display: none; }
  .modal { padding: 24px 20px; }
  .hide-xs { display: none; }
  .accord-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accord-tiles:has(.has-img) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .accord-tile.has-img { gap: 10px; padding: 10px; border-radius: 18px; }
  .at-media { width: 46px; height: 46px; }
  .accord-tile.has-img .at-name { font-size: 14px; }
  .accord-tile.has-img .at-count { font-size: 11.5px; }
  .select-sort select { min-width: 0; }
}
/* phone: community-vote cards two per row (rating·longevity / sillage·gender / value·seasons), compact.
   The question line and the option hints are hidden at this width; the vote count sits under the title. */
@media (max-width: 640px) {
  .vote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .vcard { padding: 11px 10px 12px; border-radius: 18px; }
  .vcard-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; row-gap: 1px; align-items: center; margin-bottom: 9px; }
  .vcard-ico { grid-row: 1 / 3; width: 28px; height: 28px; border-radius: 9px; }
  .vcard-ico .ico { width: 14px; height: 14px; }
  .vcard-head h3 { font-size: 13.5px; line-height: 1.25; }
  .vcard-head p { display: none; }
  .vcard-total { grid-column: 2; font-size: 10.5px; line-height: 1.2; }
  .vopts { gap: 5px; }
  .vopt { min-height: 30px; padding: 4px 9px; gap: 6px; border-radius: 9px; }
  .vopt-label { font-size: 11px; gap: 2px 5px; }   /* options a clear step below the 13.5px card titles */
  .vopt-label small { display: none; }
  .vopt-label .vcheck { width: 14px; height: 14px; }
  .vopt-pct { font-size: 10.5px; }
  .season-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 5px; }
  .season { padding: 4px; border-radius: 9px; gap: 0; }
  .season-emoji { height: 19px; }
  .season-emoji .ico { width: 16px; height: 16px; }
  .season-name { font-size: 10.5px; line-height: 1.3; }
  .season-pct { font-size: 10.5px; line-height: 1.3; }
  .season .vcheck { top: 3px; inset-inline-end: 3px; width: 14px; height: 14px; }
}

/* ==========================================================
   Compare — two perfumes side by side (#/compare/a/b)
   Side A = brand yellow, side B = cool silver-blue; shared notes = gold ring + ✓
   ========================================================== */
:root { --ca: #f5c518; --cb: #8fb4e3; }
[data-theme="light"] { --ca: #c99a06; --cb: #4a73a8; }

/* entry point on the perfume page */
.btn-compare {
  width: 100%; height: auto; justify-content: flex-start; gap: 12px; margin: 0 0 14px; padding: 10px 14px; padding-inline-start: 10px;
  border-radius: 12px; text-align: start; white-space: normal; color: var(--text);
  background: var(--card); border: 1px solid var(--border-strong);
}
.btn-compare:hover { border-color: color-mix(in srgb, var(--brand) 70%, transparent); background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.btn-compare-ico { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; color: var(--on-accent); background: var(--brand); }
.btn-compare-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.btn-compare-txt b { font-size: 15px; font-weight: 700; }
.btn-compare-txt small { font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.btn-compare > .ico:last-child { color: var(--text-3); transition: transform .2s; }
.btn-compare:hover > .ico:last-child { transform: translateX(calc(var(--dirx, 1) * 3px)); color: var(--accent-2); }
[dir="rtl"] .btn-compare { --dirx: -1; }
.p-cmp-tab + .p-share { margin-inline-start: 0; }

/* page + heroes */
.cmp-page { padding-bottom: 30px; }
.cmp-pagehead .page-title { display: flex; align-items: center; gap: 12px; }
.cmp-pagehead .page-title .ico { color: var(--accent-2); }
.cmp-heroes { display: grid; grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.cmp-slot-a, .cmp-slot-b { min-width: 0; display: flex; }
.cmp-hero { position: relative; flex: 1; min-width: 0; display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px; border-radius: 18px; overflow: hidden; isolation: isolate; }
.cmp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 100% at 18% 30%, color-mix(in srgb, var(--c, #888) 32%, transparent), transparent 70%); }
[dir="rtl"] .cmp-hero::before { background: radial-gradient(70% 100% at 82% 30%, color-mix(in srgb, var(--c, #888) 32%, transparent), transparent 70%); }
.cmp-hero.ca { box-shadow: var(--shine), var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--ca) 50%, transparent); }
.cmp-hero.cb { box-shadow: var(--shine), var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--cb) 50%, transparent); }
.cmp-side { display: inline-grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; font-size: 13px; font-weight: 800; line-height: 1; color: #141416; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 10px -3px rgba(0, 0, 0, .5); }
.cmp-side.ca { background: var(--ca); }
.cmp-side.cb { background: var(--cb); }
.cmp-hero > .cmp-side { position: absolute; z-index: 3; top: 14px; inset-inline-end: 14px; }
.cmp-media { position: relative; display: block; }
.cmp-media .plate { width: 100%; aspect-ratio: 3 / 4; border-radius: 12px; }
.cmp-media .bottle { width: 100%; height: auto; }
.cmp-hero-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.cmp-brand { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-1); }
.cmp-name { font-size: 25px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.cmp-name a:hover { text-decoration: underline; text-underline-offset: 5px; }
.cmp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.cmp-meta > span:not(.gbadge) { padding: 2px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); }
.cmp-rate { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.cmp-rate b { font-size: 16px; }
.cmp-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cmp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 250px; text-align: center; cursor: pointer;
  background: var(--surface); border: 2px dashed color-mix(in srgb, var(--cb) 55%, var(--border)); transition: transform .2s, background .2s, border-color .2s; }
.cmp-empty.ca { border-color: color-mix(in srgb, var(--ca) 55%, var(--border)); }
.cmp-empty:hover { transform: translateY(-2px); background: var(--surface-2); border-style: solid; }
.cmp-empty b { font-size: 17px; }
.cmp-empty .muted { max-width: 260px; font-size: 13.5px; }
.cmp-plus { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; color: var(--on-accent); background: var(--brand); }

/* middle column: VS + similarity ring */
.cmp-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.cmp-vs { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--text-2); background: var(--card); border: 1px solid var(--border-strong); }
.cmp-sim { position: relative; width: 108px; height: 108px; display: grid; place-items: center; }
.cmp-sim-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--accent-2) calc(var(--sim) * 1%), var(--track) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px)); mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 calc(100% - 8px)); }
.cmp-sim-in { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.cmp-sim-in b { font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cmp-sim-in small { font-size: 12px; color: var(--text-3); }
.cmp-sim-label { font-size: 14px; font-weight: 700; }
.cmp-shared-n { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 13%, transparent); border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent); }
.cmp-shared-n:hover { background: color-mix(in srgb, var(--accent-2) 22%, transparent); }

/* sticky column header so you always know which side is which */
.cmp-colhead { position: sticky; z-index: 30; top: calc(var(--topbar-h) + 8px); display: grid; grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); align-items: center; gap: 18px;
  margin: 22px 0 4px; padding: 9px 16px; border-radius: 18px; background: var(--modal-bg); }
.cmp-colhead > span { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 9px; }
.cmp-colhead b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.cmp-colhead-vs { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--text-3); }

/* sections + rows (A | label | B) */
.cmp-section { margin-top: 16px; padding: 22px 24px; border-radius: 18px; scroll-margin-top: calc(var(--topbar-h) + 76px); }
.cmp-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 10px; }
.cmp-sec-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; }
.cmp-sec-title .ico { color: var(--text-3); }
.cmp-sec-head .seg { margin: 0; }
.cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); gap: 8px 18px; align-items: center; padding: 12px 8px; border-top: 1px solid var(--border); border-radius: 12px; }
.cmp-sec-head + .cmp-row, .cmp-section > .cmp-row:first-of-type, .cmp-pyramid > .cmp-row:first-child { border-top-color: transparent; }
.cmp-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 7px; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.cmp-label .ico { color: var(--text-3); }
.cmp-cell { min-width: 0; display: flex; align-items: center; gap: 12px; font-size: 14.5px; }
.cmp-text .cmp-cell.ca { justify-content: flex-end; text-align: end; }   /* values hug the centre */
.cmp-text .cmp-cell.cb { justify-content: flex-start; text-align: start; }
.cmp-text .cmp-cell { flex-wrap: wrap; font-weight: 600; }
.cmp-text a:hover { color: var(--accent-2); }
/* matching values are not highlighted (every row reads the same); .same stays as a hook */
.cmp-acc { display: inline-flex; align-items: center; gap: 7px; }
.cmp-acc i, .cmp-dot { width: 10px; height: 10px; flex-shrink: 0; display: inline-block; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .08); }
.cmp-emoji { display: inline-grid; place-items: center; color: var(--text-3); }

/* butterfly bars: both bars grow out of the centre label */
.cmp-bar { flex: 1; min-width: 36px; height: 12px; display: flex; overflow: hidden; border-radius: 99px; background: var(--track); }
.cmp-bars .ca .cmp-bar { justify-content: flex-end; }
.cmp-bar i { display: block; width: var(--w); height: 100%; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); transition: width .9s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.ca .cmp-bar i { background: var(--bc, var(--ca)); }
.cb .cmp-bar i { background: var(--bc, var(--cb)); }
.cmp-bars:has(.win) .cmp-cell:not(.win) .cmp-bar i { opacity: .45; }
.cmp-val { display: inline-flex; align-items: center; gap: 5px; min-width: 70px; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.cmp-bars .ca .cmp-val { justify-content: flex-start; }
.cmp-bars .cb .cmp-val { justify-content: flex-end; }
.cmp-val small { font-weight: 500; color: var(--text-3); }
.ca.win .cmp-val { color: var(--ca); font-weight: 800; }
.cb.win .cmp-val { color: var(--cb); font-weight: 800; }
.cmp-crown { display: inline-grid; place-items: center; }
.cmp-row.shared .cmp-label { color: var(--text); }
.cmp-tick { width: 17px; height: 17px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--on-accent); background: var(--grad); }

/* gender: one axis, two markers */
.cmp-gscale { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 16px 6px 12px; font-size: 12px; color: var(--text-3); }
.cmp-gtrack { position: relative; flex: 1; height: 8px; border-radius: 99px; background: linear-gradient(to right, #ff8fb8, #c8a8ff 50%, #7fb0ff); }
[dir="rtl"] .cmp-gtrack { background: linear-gradient(to left, #ff8fb8, #c8a8ff 50%, #7fb0ff); }
.cmp-gtrack .mk { position: absolute; top: 50%; width: 24px; height: 24px; margin-top: -12px; margin-inline-start: -12px; display: grid; place-items: center; border-radius: 50%;
  font-size: 11.5px; font-weight: 800; font-style: normal; color: #141416; border: 2px solid var(--bg-2); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); transition: inset-inline-start .8s cubic-bezier(.2, .8, .2, 1); }
.cmp-gtrack .mk.ca { background: var(--ca); transform: translateY(-10px); }
.cmp-gtrack .mk.cb { background: var(--cb); transform: translateY(10px); }

/* at a glance */
.cmp-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cmp-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shine); }
.cmp-tile.ca { border-color: color-mix(in srgb, var(--ca) 55%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--ca) 13%, transparent), var(--surface) 65%); }
.cmp-tile.cb { border-color: color-mix(in srgb, var(--cb) 55%, var(--border)); background: linear-gradient(160deg, color-mix(in srgb, var(--cb) 13%, transparent), var(--surface) 65%); }
.cmp-tile-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.cmp-tile-p { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 46px; }
.cmp-tile-p b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.cmp-tile-img { width: 36px; height: 46px; flex-shrink: 0; display: grid; place-items: center; }
.cmp-tile-img .plate { width: 100%; height: 100%; border-radius: 10px; }
.cmp-tile-img .bottle { width: 100%; height: 100%; }

/* notes: shared highlight, shared table, pyramid, filter */
.cmp-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 2px 0 14px; font-size: 13px; color: var(--text-2); }
.cmp-legend:empty { display: none; }
.cmp-legend-item { display: inline-flex; align-items: center; gap: 9px; }
.cmp-legend-chip { padding: 3px !important; pointer-events: none; }
.cmp-legend-chip .note-orb { width: 18px; height: 18px; }
.note-chip.shared { position: relative; border-color: color-mix(in srgb, var(--accent-2) 75%, transparent); background: color-mix(in srgb, var(--accent-2) 16%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-2) 35%, transparent), 0 8px 22px -10px rgba(var(--glow), .95); }
.note-chip.shared .note-label { font-weight: 700; }
.note-chip.shared::after { content: "✓"; position: absolute; top: -6px; inset-inline-end: -6px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%;
  font-size: 10.5px; font-weight: 900; line-height: 1; color: var(--on-accent); background: var(--grad); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
/* a note in only one of the two perfumes: its normal colours, just slightly see-through, so the shared (gold ✓)
   ones stand out; hover — or the "different" filter — brings it back to full strength */
.note-chip.unique { opacity: .7; }
.note-chip.unique:hover, .cmp-notes[data-filter="diff"] .cmp-pyramid .note-chip.unique { opacity: 1; }
.cmp-legend-chip.unique { --f: #8fb36a; }   /* legend sample: an ordinary coloured note at the same transparency */
.cmp-notes .note-chip { transition: opacity .3s, filter .3s, transform .2s, border-color .2s, background .2s; }
.cmp-notes[data-filter="shared"] .cmp-pyramid .note-chip:not(.shared),
.cmp-notes[data-filter="diff"] .cmp-pyramid .note-chip.shared { opacity: .15; filter: grayscale(1); }
.cmp-noshared { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 12px 16px; border-radius: 16px; color: var(--text-2); background: var(--surface); border: 1px dashed var(--border-strong); }
.cmp-layer { align-items: start; padding: 16px 8px; border-top-color: transparent; }   /* no line between top / heart / base — only the vertical one */
.cmp-layer .cmp-cell { display: block; }
.cmp-layer .cmp-label { flex-direction: column; gap: 8px; padding-top: 2px; }
/* one vertical hairline that drops from under the layer name down the centre of the row, between perfume 1's
   notes and perfume 2's notes (same fading line as the perfume page's layer headings, stood upright) */
.cmp-notes { --vline: color-mix(in srgb, var(--text-3) 55%, transparent); }
.cmp-layer > .cmp-label { align-self: stretch; justify-content: flex-start; flex-wrap: nowrap; }
.cmp-layer > .cmp-label::after {
  content: ""; flex: 1 1 auto; width: 1px; min-height: 46px; margin-top: 2px; pointer-events: none;
  background: linear-gradient(to bottom, var(--vline), var(--vline) 72%, transparent);
}
.cmp-layer .cmp-label > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.cmp-layer .cmp-label b { color: var(--text); font-size: 14px; }
.cmp-layer .cmp-label small { font-size: 11.5px; font-weight: 400; line-height: 1.5; color: var(--text-3); }
.cmp-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.cmp-layer .ca .cmp-chips { justify-content: flex-end; }
.cmp-none { color: var(--text-3); }
.cmp-start { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; padding: 26px; border-radius: 16px; color: var(--text-2); }
.cmp-start .ico { color: var(--accent-2); }

/* picker */
.modal-cmp .cmp-picker-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.cmp-picker-head h2 { font-size: 17px; font-weight: 800; }
.cmp-picker-head p { font-size: 13px; color: var(--text-3); }
.cmp-picker-head p b { color: var(--text); }
.cmp-picker-head .icon-btn { margin-inline-start: auto; }
.cmp-picker-ico { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px; color: var(--on-accent); background: var(--grad); }

@media (max-width: 760px) {
  .cmp-heroes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .cmp-slot-a { grid-column: 1; grid-row: 1; }
  .cmp-slot-b { grid-column: 2; grid-row: 1; }
  .cmp-mid { grid-column: 1 / -1; grid-row: 2; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px 14px; padding: 4px 0; }
  .cmp-vs { display: none; }
  .cmp-sim { width: 78px; height: 78px; }
  .cmp-sim-in b { font-size: 19px; }
  .cmp-sim-in small { font-size: 10.5px; }
  .cmp-hero { grid-template-columns: 1fr; gap: 10px; padding: 12px 10px 14px; text-align: center; }
  .cmp-hero > .cmp-side { top: 10px; inset-inline-end: 10px; }
  .cmp-media { width: 74%; margin-inline: auto; }
  .cmp-hero-info { align-items: center; gap: 6px; }
  .cmp-name { font-size: 16.5px; }
  .cmp-brand { font-size: 10.5px; }
  .cmp-meta { justify-content: center; font-size: 11.5px; gap: 4px; }
  .cmp-meta > span:not(.gbadge) { padding: 1px 7px; }
  .cmp-rate { justify-content: center; font-size: 11.5px; }
  .cmp-rate .stars { display: none; }
  .cmp-hero-actions { justify-content: center; gap: 6px; }
  .cmp-hero-actions .btn { height: 32px; padding: 0 10px; font-size: 12px; gap: 5px; }
  .cmp-empty { min-height: 220px; padding: 14px; }
  .cmp-colhead { grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); gap: 6px; padding: 8px 10px; top: calc(var(--topbar-h) + 4px); }
  .cmp-colhead b { font-size: 12.5px; }
  .cmp-colhead .cmp-side { width: 22px; height: 22px; font-size: 11.5px; }
  .cmp-section { padding: 16px 12px; border-radius: 16px; }
  .cmp-sec-title { font-size: 17px; }
  .cmp-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; padding: 11px 4px; }
  .cmp-row > .cmp-label { grid-column: 1 / -1; grid-row: 1; font-size: 12.5px; }
  .cmp-row > .cmp-cell.ca { grid-column: 1; grid-row: 2; }
  .cmp-row > .cmp-cell.cb { grid-column: 2; grid-row: 2; }
  .cmp-gscale { grid-row: 3; }
  .cmp-cell { font-size: 13px; gap: 8px; }
  .cmp-text .cmp-cell { justify-content: center !important; text-align: center !important; }
  .cmp-text > .cmp-cell.ca { border-inline-end: 1px solid var(--border); }   /* thin divider between the two halves */
  .cmp-val { min-width: 0; font-size: 12.5px; }
  .cmp-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cmp-tile { padding: 11px; }
  .cmp-tile-p b { font-size: 13px; }
  .cmp-chips { gap: 7px; }
  .cmp-layer .cmp-label { flex-direction: row; }
  .cmp-layer .cmp-label small { display: none; }
  .cmp-layer .tier-badge { width: 30px; height: 30px; border-radius: 10px; }
  .cmp-notes .note-chip { font-size: 12.5px; }
  /* hairline down the middle between perfume 1's notes and perfume 2's notes — the same fading line as the
     perfume page's layer headings (.pn-head), stood upright */
  /* phone: the layer name sits centred on its own row; the line drops from under it between the two columns */
  .cmp-layer { column-gap: 16px; }
  .cmp-layer > .cmp-label { align-self: auto; justify-content: center; }
  .cmp-layer > .cmp-label::after { display: none; }
  .cmp-layer > .cmp-cell { align-self: stretch; }   /* full row height, so the line runs past the shorter column */
  .cmp-layer > .cmp-cell.ca { position: relative; }
  .cmp-layer > .cmp-cell.ca::after {
    content: ""; position: absolute; top: -2px; bottom: -2px; inset-inline-end: -8.5px; width: 1px; pointer-events: none;
    background: linear-gradient(to bottom, transparent, var(--vline) 16%, var(--vline) 84%, transparent);
  }
}

/* ==========================================================
   iPhone Duo — Apple's foldable. Marked by the head script in index.html:
   html[data-device="iphone-duo"][data-duo="inner"|"outer"][data-orient="portrait"|"landscape"]
   inner = unfolded 7.6" (≈669×867 portrait / ≈951×585 landscape): a compact-tablet layout instead of a stretched phone one
   outer = folded 5.4" (≈382×580) or a narrow split-view window
   ========================================================== */

/* ---- inner screen, both orientations ---- */
html[data-duo="inner"] .pgrid, html[data-duo="inner"] .pgrid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
html[data-duo="inner"] .pcard-name { font-size: 15px; }
html[data-duo="inner"] .rail { grid-auto-columns: 196px; gap: 14px; }
html[data-duo="inner"] .accord-tiles:has(.has-img) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* perfume page: photo beside the details (not a full-screen photo with the details pushed below) */
html[data-duo="inner"] .p-hero-grid { grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 22px; }
html[data-duo="inner"] .p-media { position: sticky; top: calc(var(--topbar-h) + 14px); max-width: none; margin: 0; aspect-ratio: 3 / 4; padding: 14px; border-radius: 18px; }
html[data-duo="inner"] .p-name { font-size: 34px; }
html[data-duo="inner"] .summary-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* compare: there is room for the real side-by-side table (side 1 | label | side 2) */
html[data-duo="inner"] .cmp-row { grid-template-columns: minmax(0, 1fr) 132px minmax(0, 1fr); gap: 8px 14px; padding: 11px 6px; }
html[data-duo="inner"] .cmp-row > .cmp-cell.ca { grid-column: 1; grid-row: 1; }
html[data-duo="inner"] .cmp-row > .cmp-label { grid-column: 2; grid-row: 1; }
html[data-duo="inner"] .cmp-row > .cmp-cell.cb { grid-column: 3; grid-row: 1; }
html[data-duo="inner"] .cmp-gscale { grid-column: 1 / -1; grid-row: 2; }
html[data-duo="inner"] .cmp-text .cmp-cell.ca { justify-content: flex-end !important; text-align: end !important; border: 0; }
html[data-duo="inner"] .cmp-text .cmp-cell.cb { justify-content: flex-start !important; text-align: start !important; }
html[data-duo="inner"] .cmp-colhead { grid-template-columns: minmax(0, 1fr) 132px minmax(0, 1fr); gap: 14px; }
html[data-duo="inner"] .cmp-layer .cmp-label { flex-direction: column; }
/* open Duo: the name is back in the centre column -> the line drops from under it (as on desktop) */
html[data-duo="inner"] .cmp-layer { column-gap: 14px; }
html[data-duo="inner"] .cmp-layer > .cmp-label { align-self: stretch; justify-content: flex-start; }
html[data-duo="inner"] .cmp-layer > .cmp-label::after { display: block; }
html[data-duo="inner"] .cmp-layer > .cmp-cell.ca::after { display: none; }

/* ---- inner screen, portrait (≈669 wide, almost square) ---- */
html[data-duo="inner"][data-orient="portrait"] .hero { padding-top: 22px; }
html[data-duo="inner"][data-orient="portrait"] .hero-art { height: 330px; max-width: 470px; }
html[data-duo="inner"][data-orient="portrait"] .hero-title { font-size: 48px; margin: 14px 0 12px; }

/* ---- inner screen, landscape (≈951×585, short): keep the hero side by side so the heading stays in view ---- */
html[data-duo="inner"][data-orient="landscape"] .hero { padding-top: 14px; }
html[data-duo="inner"][data-orient="landscape"] .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 26px; min-height: 0; }
html[data-duo="inner"][data-orient="landscape"] .hero-copy { text-align: start; align-items: flex-start; }
html[data-duo="inner"][data-orient="landscape"] .hero-chips { justify-content: flex-start; }
html[data-duo="inner"][data-orient="landscape"] .hero-art { order: 0; height: 390px; max-width: none; }
html[data-duo="inner"][data-orient="landscape"] .hero-slide { width: 38%; left: 31%; top: 5%; }
html[data-duo="inner"][data-orient="landscape"] .hero-title { font-size: 46px; margin: 12px 0 10px; }
html[data-duo="inner"][data-orient="landscape"] .hero-sub { font-size: 16px; }
html[data-duo="inner"][data-orient="landscape"] .pgrid, html[data-duo="inner"][data-orient="landscape"] .pgrid-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html[data-duo="inner"][data-orient="landscape"] .accord-tiles:has(.has-img) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
html[data-duo="inner"][data-orient="landscape"] .p-hero-grid { grid-template-columns: minmax(0, 33%) minmax(0, 1fr); }
html[data-duo="inner"][data-orient="landscape"] .p-media { aspect-ratio: 1 / 1.05; }

/* ---- outer screen (folded, ≈382×580: short) ---- */
html[data-duo="outer"] .hero { padding-top: 10px; }
html[data-duo="outer"] .hero-art { height: 282px; }
html[data-duo="outer"] .hero-title { font-size: 36px; }
/* Safari's controls sit in a column on the right edge of the outer screen and tint themselves from fixed elements
   there (theme-color is ignored): an 8px strip in the page colour makes that column blend in. It never covers
   content — the page keeps 16px side padding — and it doesn't widen the page. */
html[data-duo="outer"] body::after { content: ""; position: fixed; z-index: 75; top: 0; right: 0; bottom: 0; width: 8px; background: var(--bg); pointer-events: none; }

/* ---- half-open like a book (Safari's Viewport Segments API — a preview feature, off unless enabled):
   keep each side's content on its own side of the fold instead of running across it ---- */
@media (horizontal-viewport-segments: 2) {
  .hero-grid, .p-hero-grid, .cmp-heroes {
    grid-template-columns: calc(env(viewport-segment-width 0 0) - 48px) calc(env(viewport-segment-width 1 0) - 48px) !important;
    column-gap: calc(env(viewport-segment-left 1 0) - env(viewport-segment-right 0 0) + 48px) !important;
  }
  .hero-art { order: 0 !important; }
  .cmp-heroes > .cmp-mid { grid-column: 1 / -1; grid-row: 2; }
}

/* "Reduce motion" (OS setting): drop movement (drifting, spinning, floating, sliding, lift-in) but keep
   fades and colour changes so the site still feels alive — content changes by cross-fading instead */
@media (prefers-reduced-motion: reduce) {
  .page, .menu, .hf-inner.hf-in, .pop, .shake, .pp-anim { animation-name: fadeIn !important; }
  .reveal { transform: none !important; }
  html { scroll-behavior: auto !important; }
}
@keyframes fadeIn { from { opacity: 0; } }
