/* ==========================================================================
   MERIDIAN — design system
   Vanilla CSS, no frameworks. Light/dark themes, fluid type, reduced motion.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --font-display: Didot, "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --paper: #faf7f1;
  --paper-2: #f2eee5;
  --paper-3: #e9e3d6;
  --ink: #17150f;
  --ink-2: #57523f;
  --ink-3: #8a8471;
  --hairline: #e0dacb;
  --hairline-strong: #cfc7b2;
  --gold: #9a7434;
  --gold-strong: #7c5b22;
  --gold-soft: rgba(154, 116, 52, 0.12);
  --green: #2e6b45;
  --green-soft: rgba(46, 107, 69, 0.12);
  --red: #a63a2e;
  --red-soft: rgba(166, 58, 46, 0.1);
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(23, 21, 15, 0.05), 0 12px 40px -18px rgba(23, 21, 15, 0.25);
  --shadow-lift: 0 2px 6px rgba(23, 21, 15, 0.06), 0 24px 60px -24px rgba(23, 21, 15, 0.35);
  --focus-ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--gold);
  --stage-bg: radial-gradient(120% 90% at 50% 20%, #fdfcf9 0%, #efe9dc 55%, #ddd4c0 100%);

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --header-h: 64px;
  --announce-h: 36px;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 160ms;
  --dur-2: 280ms;
  --dur-3: 480ms;

  --fs-xs: clamp(0.72rem, 0.68rem + 0.15vw, 0.78rem);
  --fs-s: clamp(0.82rem, 0.78rem + 0.2vw, 0.9rem);
  --fs-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --fs-l: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  --fs-xl: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  --fs-2xl: clamp(1.9rem, 1.5rem + 2vw, 2.9rem);
  --fs-3xl: clamp(2.4rem, 1.8rem + 3.4vw, 4.2rem);

  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #12100d;
  --paper-2: #1a1713;
  --paper-3: #241f18;
  --ink: #ede8dc;
  --ink-2: #b4ac99;
  --ink-3: #837c6a;
  --hairline: #2c261d;
  --hairline-strong: #3d3527;
  --gold: #c9a15e;
  --gold-strong: #dfc08a;
  --gold-soft: rgba(201, 161, 94, 0.14);
  --green: #5eae7f;
  --green-soft: rgba(94, 174, 127, 0.14);
  --red: #d97b6c;
  --red-soft: rgba(217, 123, 108, 0.14);
  --card: #1a1713;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px -18px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.45), 0 24px 60px -24px rgba(0, 0, 0, 0.8);
  --focus-ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--gold);
  --stage-bg: radial-gradient(120% 90% at 50% 20%, #221e17 0%, #16130e 55%, #0c0a07 100%);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --paper: #12100d;
    --paper-2: #1a1713;
    --paper-3: #241f18;
    --ink: #ede8dc;
    --ink-2: #b4ac99;
    --ink-3: #837c6a;
    --hairline: #2c261d;
    --hairline-strong: #3d3527;
    --gold: #c9a15e;
    --gold-strong: #dfc08a;
    --gold-soft: rgba(201, 161, 94, 0.14);
    --green: #5eae7f;
    --green-soft: rgba(94, 174, 127, 0.14);
    --red: #d97b6c;
    --red-soft: rgba(217, 123, 108, 0.14);
    --card: #1a1713;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 40px -18px rgba(0, 0, 0, 0.7);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.45), 0 24px 60px -24px rgba(0, 0, 0, 0.8);
    --stage-bg: radial-gradient(120% 90% at 50% 20%, #221e17 0%, #16130e 55%, #0c0a07 100%);
    color-scheme: dark;
  }
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--dur-2) ease, color var(--dur-2) ease;
}
main { flex: 1; outline: none; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; letter-spacing: 0.005em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-s); }
::selection { background: var(--gold-soft); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100%; left: 16px; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 18px;
  border-radius: 0 0 var(--radius-s) var(--radius-s); text-decoration: none; font-size: var(--fs-s);
  transition: top var(--dur-1) ease;
}
.skip-link:focus { top: 0; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold);
}

/* ---------- announce bar ---------- */
.announce-bar {
  height: var(--announce-h);
  background: var(--ink); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); letter-spacing: 0.06em; text-align: center; padding-inline: 12px;
}
.announce-bar p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="dark"] .announce-bar, [data-theme="auto"] .announce-bar { background: var(--paper-3); color: var(--ink); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto;
  height: var(--header-h);
  display: flex; align-items: center; gap: clamp(8px, 2vw, 24px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-word { font-family: var(--font-display); font-size: 1.18rem; letter-spacing: 0.28em; font-weight: 500; }
.main-nav { margin-inline: auto; }
.main-nav ul { display: flex; gap: clamp(14px, 2.4vw, 32px); list-style: none; padding: 0; }
.main-nav a {
  text-decoration: none; font-size: var(--fs-s); letter-spacing: 0.04em; color: var(--ink-2);
  padding: 8px 2px; border-bottom: 1px solid transparent; transition: color var(--dur-1) ease, border-color var(--dur-1) ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: none; background: transparent; color: var(--ink);
  border-radius: 50%; cursor: pointer; position: relative;
  transition: background-color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn:active { transform: scale(0.92); }

.pref-switchers { display: flex; align-items: center; gap: 2px; }
.pref-select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-s);
  padding: 8px 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em;
  color: var(--ink-2); cursor: pointer; text-align: center;
}
.pref-select:hover { color: var(--ink); background: var(--paper-2); }

.theme-icon-moon { display: none; }
html.theme-dark-active .theme-icon-sun { display: none; }
html.theme-dark-active .theme-icon-moon { display: block; }

.cart-count {
  position: absolute; top: 4px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--gold); color: var(--paper);
  border-radius: 999px; font-size: 0.68rem; font-weight: 700; line-height: 18px; text-align: center;
}
[data-theme="dark"] .cart-count { color: #12100d; }
.cart-count.bump { animation: bump var(--dur-3) var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.5); } 100% { transform: scale(1); } }

.menu-btn { display: none; }
.mobile-nav { border-top: 1px solid var(--hairline); background: var(--paper); }
.mobile-nav ul { list-style: none; padding: 8px var(--gutter) 16px; display: grid; gap: 2px; }
.mobile-nav a {
  display: block; padding: 12px 10px; text-decoration: none; font-size: var(--fs-l);
  font-family: var(--font-display); border-radius: var(--radius-s);
}
.mobile-nav a:hover { background: var(--paper-2); }

@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .pref-switchers { display: none; }
  .brand-word { font-size: 1rem; letter-spacing: 0.22em; }
  .mobile-nav .pref-row { display: flex; gap: 12px; padding: 12px 10px; border-top: 1px solid var(--hairline); margin-top: 8px; }
  .mobile-nav .pref-row .pref-select { border: 1px solid var(--hairline); padding: 10px 14px; flex: 1; text-align: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 28px;
  font-size: var(--fs-s); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color var(--dur-1) ease, color var(--dur-1) ease, border-color var(--dur-1) ease,
    transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--gold-strong); color: #fff; box-shadow: var(--shadow); }
[data-theme="dark"] .btn-primary:hover { color: #12100d; background: var(--gold); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--hairline-strong); }
.btn-secondary:hover { border-color: var(--ink); background: var(--paper-2); }
.btn-ghost { background: transparent; color: var(--ink-2); text-transform: none; letter-spacing: 0; font-weight: 500; min-height: 40px; padding: 8px 14px; }
.btn-ghost:hover { color: var(--ink); background: var(--paper-2); }
.btn-gold { background: var(--gold); color: #fff; }
[data-theme="dark"] .btn-gold { color: #12100d; }
.btn-gold:hover { background: var(--gold-strong); box-shadow: var(--shadow); }
.btn-block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-small { min-height: 38px; padding: 6px 16px; font-size: var(--fs-xs); }

.text-link { background: none; border: none; padding: 2px; color: var(--gold); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.text-link:hover { color: var(--gold-strong); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: clip;
  background: var(--stage-bg);
  border-bottom: 1px solid var(--hairline);
}
.hero-inner {
  width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 64px);
  align-items: center; padding-block: clamp(40px, 7vw, 96px);
  min-height: min(78dvh, 760px);
}
.hero-copy h1 { font-size: var(--fs-3xl); margin: 16px 0 20px; }
.hero-copy .lede { font-size: var(--fs-l); color: var(--ink-2); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; padding: 0; list-style: none; font-size: var(--fs-s); color: var(--ink-2); }
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.hero-meta svg { color: var(--gold); flex: none; }
.hero-art { position: relative; aspect-ratio: 1; max-height: 620px; margin-inline: auto; width: 100%; max-width: 560px; }
.hero-art img, .hero-art svg { width: 100%; height: 100%; }
.hero-art::after {
  content: ""; position: absolute; inset: auto 12% -4% 12%; height: 10%;
  background: radial-gradient(50% 100% at 50% 50%, rgba(0,0,0,0.22), transparent 70%);
  filter: blur(6px); z-index: -1;
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; padding-block: 28px 40px; }
  .hero-art { order: -1; max-width: 340px; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(48px, 8vw, 104px); }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--hairline); }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: var(--fs-2xl); margin: 12px 0 14px; }
.section-head p { color: var(--ink-2); }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: clamp(14px, 2.5vw, 28px); }
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-m);
  overflow: clip; transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) ease, border-color var(--dur-2) ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--hairline-strong); }
.product-card-media { aspect-ratio: 1; background: var(--stage-bg); display: grid; place-items: center; padding: 12%; }
.product-card-media img, .product-card-media svg { width: 100%; height: 100%; object-fit: contain; transition: transform var(--dur-3) var(--ease-out); }
.product-card:hover .product-card-media img { transform: scale(1.05) rotate(-1.2deg); }
.product-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card-body h3 { font-size: var(--fs-l); }
.product-card-body h3 a { text-decoration: none; }
.product-card-body h3 a::after { content: ""; position: absolute; inset: 0; }
.product-card-cat { font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.product-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; }
.product-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.06em;
  background: var(--card); border: 1px solid var(--hairline); color: var(--ink-2);
}
.badge-sale { background: var(--red-soft); color: var(--red); border-color: transparent; }
.badge-low { background: var(--gold-soft); color: var(--gold-strong); border-color: transparent; }
.badge-out { background: var(--paper-3); color: var(--ink-3); border-color: transparent; }
.badge-green { background: var(--green-soft); color: var(--green); border-color: transparent; }

.price { font-variant-numeric: tabular-nums; font-weight: 600; }
.price-compare { color: var(--ink-3); text-decoration: line-through; font-weight: 400; margin-right: 8px; font-size: 0.92em; }
.price-note { font-size: var(--fs-xs); color: var(--ink-3); }

.rating { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-s); color: var(--ink-2); }
.rating .stars { display: inline-flex; color: var(--gold); }
.rating .stars svg { width: 14px; height: 14px; }

/* ---------- shop toolbar ---------- */
.shop-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.search-field { position: relative; flex: 1 1 240px; max-width: 380px; }
.search-field input {
  width: 100%; min-height: 46px; padding: 10px 14px 10px 42px;
  border: 1px solid var(--hairline-strong); border-radius: 999px; background: var(--card); color: var(--ink);
}
.search-field svg { position: absolute; left: 15px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--hairline-strong); background: var(--card); color: var(--ink-2);
  padding: 9px 16px; min-height: 40px; border-radius: 999px; font-size: var(--fs-s); cursor: pointer;
  transition: all var(--dur-1) ease;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip:hover:not([aria-pressed="true"]) { border-color: var(--ink); color: var(--ink); }
.sort-select {
  min-height: 46px; padding: 8px 36px 8px 16px; border: 1px solid var(--hairline-strong);
  border-radius: 999px; background: var(--card); cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.results-note { font-size: var(--fs-s); color: var(--ink-3); margin-bottom: 16px; }
.empty-state { text-align: center; padding: clamp(40px, 8vw, 80px) 20px; color: var(--ink-2); }
.empty-state svg { margin-inline: auto; color: var(--ink-3); margin-bottom: 18px; }
.empty-state h3 { font-size: var(--fs-xl); margin-bottom: 8px; color: var(--ink); }

/* ---------- PDP layout ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-block: clamp(20px, 3vw, 40px); }
@media (max-width: 960px) { .pdp { grid-template-columns: 1fr; } }

.breadcrumbs { padding-block: 14px 4px; font-size: var(--fs-s); color: var(--ink-3); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--hairline-strong); }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); }

/* configurator stage */
.stage-col { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 960px) { .stage-col { position: static; } }
.stage {
  position: relative; border-radius: var(--radius-l); overflow: clip;
  background: var(--stage-bg); border: 1px solid var(--hairline);
  aspect-ratio: 1 / 1.02;
}
.stage canvas { width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage canvas:focus-visible { box-shadow: inset var(--focus-ring); border-radius: var(--radius-l); outline: none; }
.stage-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 12%; }
.stage-hint {
  position: absolute; left: 50%; bottom: 14px; translate: -50% 0;
  font-size: var(--fs-xs); color: var(--ink-3); background: color-mix(in srgb, var(--paper) 80%, transparent);
  padding: 6px 14px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  backdrop-filter: blur(6px); transition: opacity var(--dur-3) ease;
}
.stage-hint.fade { opacity: 0; }
.stage-toolbar {
  position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px;
}
.stage-toolbar .icon-btn { background: color-mix(in srgb, var(--paper) 82%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--hairline); width: 40px; height: 40px; }
.stage-badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
}
.light-control { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.light-control label { font-size: var(--fs-s); color: var(--ink-2); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.light-control input[type="range"] { flex: 1; accent-color: var(--gold); min-height: 32px; }

.gallery-strip { display: flex; gap: 10px; margin-top: 14px; }
.gallery-thumb {
  flex: 1; aspect-ratio: 1; border-radius: var(--radius-m); overflow: clip;
  border: 1px solid var(--hairline); background: var(--stage-bg); cursor: pointer; padding: 0;
  transition: border-color var(--dur-1) ease, transform var(--dur-1) var(--ease-out);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }

/* buy column */
.buy-col h1 { font-size: var(--fs-2xl); margin: 6px 0 10px; }
.pdp-sub { color: var(--ink-2); }
.pdp-price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 18px 0 4px; }
.pdp-price { font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.availability { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-s); margin-block: 8px; }
.availability .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.availability.is-low .dot { background: var(--gold); }
.availability.is-out .dot { background: var(--red); }

.option-group { border: none; padding: 0; margin: 22px 0 0; }
.option-group legend { font-weight: 600; font-size: var(--fs-s); margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; width: 100%; }
.option-group legend .opt-value { color: var(--ink-2); font-weight: 400; }
.option-group legend .opt-delta { margin-left: auto; color: var(--ink-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch-chip {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px 8px 10px;
  border: 1px solid var(--hairline-strong); border-radius: 999px; cursor: pointer; background: var(--card);
  font-size: var(--fs-s); transition: all var(--dur-1) ease; user-select: none; -webkit-user-select: none;
}
.swatch-dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.15); flex: none; background: var(--swatch, #999); box-shadow: inset 0 2px 4px rgba(255,255,255,0.35), inset 0 -2px 4px rgba(0,0,0,0.25); }
.swatch input:checked + .swatch-chip { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.swatch input:focus-visible + .swatch-chip { box-shadow: var(--focus-ring); }
.swatch input:disabled + .swatch-chip { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.swatch:hover input:not(:disabled):not(:checked) + .swatch-chip { border-color: var(--ink-2); }
.swatch-price { color: var(--ink-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.option-note { font-size: var(--fs-s); color: var(--ink-2); margin-top: 10px; padding: 10px 14px; background: var(--gold-soft); border-radius: var(--radius-s); }
.option-note.is-error { background: var(--red-soft); color: var(--red); }

.engraving-field { margin-top: 10px; }
.engraving-field input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-s); background: var(--card); letter-spacing: 0.2em; font-family: var(--font-display);
}
.char-count { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 4px; text-align: right; }

.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--hairline-strong); border-radius: 999px; overflow: clip; background: var(--card); }
.qty-stepper button { width: 44px; height: 46px; border: none; background: transparent; cursor: pointer; font-size: 1.15rem; color: var(--ink-2); transition: background-color var(--dur-1) ease; }
.qty-stepper button:hover:not(:disabled) { background: var(--paper-2); color: var(--ink); }
.qty-stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.qty-stepper output { min-width: 40px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.buy-row { display: flex; gap: 12px; margin-top: 26px; align-items: stretch; }
.buy-row .btn { flex: 1; }
.pdp-perks { list-style: none; padding: 16px 0 0; margin-top: 22px; border-top: 1px solid var(--hairline); display: grid; gap: 10px; font-size: var(--fs-s); color: var(--ink-2); }
.pdp-perks li { display: flex; gap: 10px; align-items: start; }
.pdp-perks svg { color: var(--gold); flex: none; margin-top: 2px; }

.qty-break-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: var(--fs-s); color: var(--green); }

/* fit studio */
.fit-studio { margin-top: 26px; border: 1px solid var(--hairline); border-radius: var(--radius-m); overflow: clip; }
.fit-studio summary {
  display: flex; align-items: center; gap: 10px; padding: 16px 18px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: var(--fs-s); background: var(--paper-2);
}
.fit-studio summary::-webkit-details-marker { display: none; }
.fit-studio summary::after { content: "+"; margin-left: auto; font-size: 1.2rem; color: var(--ink-3); transition: transform var(--dur-1) ease; }
.fit-studio[open] summary::after { transform: rotate(45deg); }
.fit-body { padding: 18px; display: grid; gap: 14px; }
.fit-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.fit-row .field { flex: 1 1 140px; }
.fit-result { padding: 14px 16px; border-radius: var(--radius-s); background: var(--green-soft); color: var(--green); font-size: var(--fs-s); }
.fit-result strong { display: block; margin-bottom: 2px; }

/* bundle / FBT */
.bundle-box { margin-top: 30px; border: 1px solid var(--gold); border-radius: var(--radius-m); padding: 20px; background: var(--gold-soft); }
.bundle-box h2 { font-size: var(--fs-l); margin-bottom: 4px; }
.bundle-items { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 10px; }
.bundle-items li { display: flex; align-items: center; gap: 12px; font-size: var(--fs-s); }
.bundle-items .b-thumb { width: 44px; height: 44px; border-radius: var(--radius-s); background: var(--card); border: 1px solid var(--hairline); padding: 6px; flex: none; }
.bundle-items .b-price { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bundle-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); padding-top: 12px; margin-bottom: 14px; font-weight: 600; }

/* specs & reviews */
.spec-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.spec-table th, .spec-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.spec-table th { color: var(--ink-3); font-weight: 500; width: 38%; }

.review-list { display: grid; gap: 16px; }
.review-card { border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: 18px 20px; background: var(--card); }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: var(--fs-s); }
.review-head .verified { color: var(--green); display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); }
.review-head time { color: var(--ink-3); margin-left: auto; font-size: var(--fs-xs); }
.review-card blockquote { color: var(--ink-2); font-size: var(--fs-s); }

/* ---------- drawer (mini-cart / search / assistant) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 140; background: rgba(12, 10, 7, 0.45);
  opacity: 0; transition: opacity var(--dur-2) ease; backdrop-filter: blur(2px);
}
.overlay.in { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 150;
  width: min(440px, 100vw); background: var(--paper); border-left: 1px solid var(--hairline);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform var(--dur-2) var(--ease-out);
  box-shadow: var(--shadow-lift);
}
.drawer.in { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--hairline); }
.drawer-head h2 { font-size: var(--fs-xl); flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 20px; }
.drawer-foot { border-top: 1px solid var(--hairline); padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); background: var(--paper); }

.freeship-meter { margin-bottom: 16px; }
.freeship-meter p { font-size: var(--fs-s); color: var(--ink-2); margin-bottom: 8px; }
.freeship-meter p strong { color: var(--gold-strong); }
[data-theme="dark"] .freeship-meter p strong { color: var(--gold); }
.meter-track { height: 6px; border-radius: 999px; background: var(--paper-3); overflow: clip; }
.meter-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-strong)); transition: width var(--dur-3) var(--ease-out); }
.freeship-meter.done p { color: var(--green); }
.freeship-meter.done .meter-fill { background: var(--green); }

.cart-lines { list-style: none; padding: 0; display: grid; gap: 16px; }
.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--hairline); }
.cart-line-media { width: 72px; height: 72px; border-radius: var(--radius-s); background: var(--stage-bg); border: 1px solid var(--hairline); padding: 8px; }
.cart-line-media img { width: 100%; height: 100%; object-fit: contain; }
.cart-line h3 { font-size: var(--fs-base); font-family: var(--font-body); font-weight: 600; }
.cart-line-opts { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.cart-line-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.cart-line-price { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.cart-line-price .was { display: block; font-weight: 400; color: var(--ink-3); text-decoration: line-through; font-size: var(--fs-xs); }
.cart-line .qty-stepper button { width: 38px; height: 38px; }
.line-remove { background: none; border: none; color: var(--ink-3); cursor: pointer; font-size: var(--fs-xs); text-decoration: underline; padding: 6px; }
.line-remove:hover { color: var(--red); }

.coupon-row { display: flex; gap: 8px; margin: 14px 0 4px; }
.coupon-row input {
  flex: 1; min-height: 44px; padding: 8px 14px; border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-s); background: var(--card); text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--fs-s);
}
.coupon-msg { font-size: var(--fs-s); margin-bottom: 8px; }
.coupon-msg.ok { color: var(--green); }
.coupon-msg.err { color: var(--red); }
.coupon-applied { display: flex; align-items: center; gap: 8px; font-size: var(--fs-s); color: var(--green); margin: 10px 0; }

.totals { display: grid; gap: 7px; font-size: var(--fs-s); margin-block: 12px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; }
.totals .t-label { color: var(--ink-2); }
.totals .t-value { font-variant-numeric: tabular-nums; }
.totals .t-discount .t-value, .totals .t-discount .t-label { color: var(--green); }
.totals .t-grand { font-size: var(--fs-l); font-weight: 600; border-top: 1px solid var(--hairline); padding-top: 10px; margin-top: 4px; }
.totals .t-muted { color: var(--ink-3); font-size: var(--fs-xs); }

.cart-empty { text-align: center; padding: 48px 12px; color: var(--ink-2); }
.cart-empty svg { margin: 0 auto 16px; color: var(--ink-3); }

.cart-upsell { margin-top: 20px; padding: 14px; border: 1px dashed var(--hairline-strong); border-radius: var(--radius-m); }
.cart-upsell h3 { font-size: var(--fs-s); font-family: var(--font-body); font-weight: 600; margin-bottom: 10px; }

/* ---------- search overlay ---------- */
.search-panel { padding: 12px 20px 20px; }
.search-panel .search-field { max-width: none; }
.search-results { list-style: none; padding: 0; margin-top: 14px; display: grid; gap: 6px; }
.search-results a {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--radius-m);
  text-decoration: none; transition: background-color var(--dur-1) ease;
}
.search-results a:hover, .search-results a.active { background: var(--paper-2); }
.search-results .s-thumb { width: 52px; height: 52px; border-radius: var(--radius-s); background: var(--stage-bg); padding: 6px; border: 1px solid var(--hairline); flex: none; }
.search-results .s-name { font-weight: 600; font-size: var(--fs-s); }
.search-results .s-cat { font-size: var(--fs-xs); color: var(--ink-3); }
.search-results .s-price { margin-left: auto; font-variant-numeric: tabular-nums; font-size: var(--fs-s); white-space: nowrap; }

/* ---------- checkout ---------- */
.checkout-wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-block: clamp(20px, 3vw, 40px); }
@media (max-width: 960px) { .checkout-wrap { grid-template-columns: 1fr; } .checkout-summary { order: -1; } }

.steps-nav { margin: 20px 0 30px; }
.steps-nav ol { list-style: none; padding: 0; display: flex; gap: 4px; counter-reset: step; }
.steps-nav li { flex: 1; counter-increment: step; }
.steps-nav .step-item {
  display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center;
  font-size: var(--fs-xs); color: var(--ink-3); position: relative; padding-top: 4px;
}
.steps-nav .step-item::before {
  content: counter(step); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 600;
  border: 1px solid var(--hairline-strong); background: var(--card); color: var(--ink-3);
  transition: all var(--dur-2) ease;
}
.steps-nav li[aria-current="step"] .step-item { color: var(--ink); font-weight: 600; }
.steps-nav li[aria-current="step"] .step-item::before { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.steps-nav li.done .step-item { color: var(--green); }
.steps-nav li.done .step-item::before { content: "✓"; background: var(--green-soft); color: var(--green); border-color: transparent; }
@media (max-width: 640px) { .steps-nav .step-label { display: none; } .steps-nav li[aria-current="step"] .step-label { display: block; } }

.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-s); font-weight: 600; }
.field label .opt { color: var(--ink-3); font-weight: 400; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 12px 14px; border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-s); background: var(--card); width: 100%;
  transition: border-color var(--dur-1) ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field select:hover { border-color: var(--ink-2); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); background: var(--red-soft); }
.field-error { font-size: var(--fs-xs); color: var(--red); display: flex; align-items: center; gap: 5px; min-height: 1em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: span 1; } }

.choice-cards { display: grid; gap: 12px; }
.choice-card { position: relative; }
.choice-card input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.choice-card-body {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-m); background: var(--card); cursor: pointer; transition: all var(--dur-1) ease;
}
.choice-card input:checked + .choice-card-body { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.choice-card input:focus-visible + .choice-card-body { box-shadow: var(--focus-ring); }
.choice-card-body svg { flex: none; color: var(--gold); }
.choice-card-body .cc-title { font-weight: 600; font-size: var(--fs-s); }
.choice-card-body .cc-sub { font-size: var(--fs-xs); color: var(--ink-3); }
.choice-card-body .cc-price { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: var(--fs-s); }

.checkout-summary { background: var(--paper-2); border: 1px solid var(--hairline); border-radius: var(--radius-l); padding: clamp(18px, 3vw, 28px); position: sticky; top: calc(var(--header-h) + 16px); }
.checkout-summary h2 { font-size: var(--fs-l); margin-bottom: 14px; }
.summary-lines { list-style: none; padding: 0; display: grid; gap: 12px; margin-bottom: 14px; font-size: var(--fs-s); }
.summary-lines li { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; }
.summary-lines .s-thumb { width: 48px; height: 48px; border-radius: var(--radius-s); background: var(--stage-bg); padding: 5px; border: 1px solid var(--hairline); }
.summary-lines .s-meta { min-width: 0; }
.summary-lines .s-opts { color: var(--ink-3); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.review-block { border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: 16px 18px; background: var(--card); margin-bottom: 14px; }
.review-block h3 { font-size: var(--fs-s); font-family: var(--font-body); font-weight: 600; display: flex; justify-content: space-between; margin-bottom: 6px; }
.review-block p { font-size: var(--fs-s); color: var(--ink-2); white-space: pre-line; }
.review-block .edit-link { font-size: var(--fs-xs); font-weight: 400; }

.checkbox-row { display: flex; gap: 10px; align-items: start; font-size: var(--fs-s); }
.checkbox-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--gold); flex: none; }

.checkout-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap-reverse; }
.checkout-actions .btn-primary { flex: 1; min-width: 200px; }

/* confirmation */
.confirm-hero { text-align: center; padding-block: clamp(30px, 5vw, 60px) 10px; }
.confirm-hero .order-no { font-family: var(--font-mono); font-size: var(--fs-l); background: var(--paper-2); border: 1px dashed var(--hairline-strong); border-radius: var(--radius-s); padding: 8px 18px; display: inline-block; margin-top: 14px; }
.confirm-hero h1 { font-size: var(--fs-2xl); margin: 14px 0 8px; }
.confirm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; margin-block: 30px; }
.confirm-card { border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: 20px; background: var(--card); font-size: var(--fs-s); }
.confirm-card h2 { font-size: var(--fs-base); font-family: var(--font-body); font-weight: 600; margin-bottom: 10px; }
.confirm-card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.confirm-card dt { color: var(--ink-3); }
.confirm-card dd { margin: 0; }

.order-timeline { list-style: none; padding: 0; display: grid; gap: 0; }
.order-timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.order-timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--hairline); }
.order-timeline li:last-child::before { display: none; }
.order-timeline .t-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--hairline-strong); background: var(--paper); flex: none; margin-top: 3px; z-index: 1; }
.order-timeline li.active .t-dot { border-color: var(--green); background: var(--green); }
.order-timeline .t-when { color: var(--ink-3); font-size: var(--fs-xs); }

/* crown reveal */
.crown-reveal { text-align: center; margin: 34px auto; max-width: 460px; padding: 30px 24px; border: 1px solid var(--gold); border-radius: var(--radius-l); background: var(--gold-soft); }
.crown-reveal h2 { font-size: var(--fs-xl); margin-bottom: 6px; }
.crown-reveal p { font-size: var(--fs-s); color: var(--ink-2); }
.crown-btn {
  width: 92px; height: 92px; margin: 18px auto; border-radius: 50%; border: 2px solid var(--gold);
  background: var(--card); cursor: pointer; display: grid; place-items: center; color: var(--gold);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) ease;
}
.crown-btn:hover { transform: scale(1.06); box-shadow: var(--shadow); }
.crown-btn.spinning svg { animation: crown-spin 1.4s var(--ease-out); }
@keyframes crown-spin { from { transform: rotate(0); } to { transform: rotate(1080deg); } }
.reveal-code { font-family: var(--font-mono); font-size: var(--fs-l); letter-spacing: 0.2em; padding: 10px 20px; border: 1px dashed var(--gold); border-radius: var(--radius-s); display: inline-flex; gap: 12px; align-items: center; margin-top: 10px; background: var(--card); }

/* ---------- assistant ---------- */
.assistant-panel {
  position: fixed; z-index: 150; right: 16px; bottom: 16px;
  width: min(400px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 100px));
  background: var(--paper); border: 1px solid var(--hairline-strong); border-radius: var(--radius-l);
  box-shadow: var(--shadow-lift); display: flex; flex-direction: column; overflow: clip;
  transform: translateY(16px); opacity: 0; transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) ease;
}
.assistant-panel.in { transform: none; opacity: 1; }
@media (max-width: 560px) {
  .assistant-panel { right: 0; bottom: 0; left: 0; width: 100%; border-radius: var(--radius-l) var(--radius-l) 0 0; max-height: 82dvh; }
}
.assistant-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); background: var(--paper-2); }
.assistant-head h2 { font-size: var(--fs-base); display: flex; align-items: center; gap: 8px; flex: 1; }
.assistant-head .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.assistant-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px; display: grid; gap: 12px; align-content: start; }
.chat-msg { max-width: 88%; padding: 10px 14px; border-radius: var(--radius-m); font-size: var(--fs-s); }
.chat-msg.from-user { background: var(--ink); color: var(--paper); justify-self: end; border-bottom-right-radius: 4px; }
.chat-msg.from-ai { background: var(--paper-2); border: 1px solid var(--hairline); justify-self: start; border-bottom-left-radius: 4px; }
.plan-card { border: 1px solid var(--hairline-strong); border-radius: var(--radius-m); overflow: clip; justify-self: stretch; }
.plan-card h3 { font-size: var(--fs-s); font-family: var(--font-body); font-weight: 600; padding: 10px 14px; background: var(--paper-2); border-bottom: 1px solid var(--hairline); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-steps { list-style: none; padding: 8px 0; }
.plan-steps li { display: flex; gap: 10px; align-items: start; padding: 7px 14px; font-size: var(--fs-s); color: var(--ink-3); }
.plan-steps li .step-ico { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--hairline-strong); flex: none; margin-top: 2px; display: grid; place-items: center; font-size: 10px; transition: all var(--dur-1) ease; }
.plan-steps li.running { color: var(--ink); }
.plan-steps li.running .step-ico { border-color: var(--gold); }
.plan-steps li.running .step-ico::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse-dot 900ms ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { transform: scale(0.6); opacity: 0.6; } 50% { transform: scale(1); opacity: 1; } }
.plan-steps li.done { color: var(--ink-2); }
.plan-steps li.done .step-ico { background: var(--green); border-color: var(--green); color: #fff; }
.plan-steps li.done .step-ico::after { content: "✓"; }
.plan-steps li.failed .step-ico { border-color: var(--red); color: var(--red); }
.plan-steps li.failed .step-ico::after { content: "✕"; }
.plan-actions { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--hairline); }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.assistant-suggestions .chip { font-size: var(--fs-xs); padding: 8px 13px; min-height: 38px; text-align: left; }
.assistant-foot { display: flex; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hairline); }
.assistant-foot input { flex: 1; min-height: 46px; padding: 10px 16px; border: 1px solid var(--hairline-strong); border-radius: 999px; background: var(--card); font-size: var(--fs-s); }
.assistant-foot button { flex: none; }

/* highlight pulse when assistant touches an element */
.agent-highlight { position: relative; animation: agent-pulse 1.2s ease-out; }
@keyframes agent-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 70%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}

/* ---------- toasts ---------- */
.toast-root { position: fixed; z-index: 180; bottom: 20px; left: 50%; translate: -50% 0; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--paper); padding: 13px 18px; border-radius: var(--radius-m);
  box-shadow: var(--shadow-lift); font-size: var(--fs-s);
  animation: toast-in var(--dur-3) var(--ease-out);
}
.toast svg { flex: none; color: var(--gold); }
[data-theme="dark"] .toast { background: var(--paper-3); color: var(--ink); border: 1px solid var(--hairline-strong); }
.toast.out { animation: toast-out var(--dur-2) ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ---------- circle / rewards ---------- */
.tier-track { display: grid; gap: 8px; margin-block: 20px; }
.tier-labels { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-3); }
.tier-labels .active { color: var(--gold-strong); font-weight: 700; }
[data-theme="dark"] .tier-labels .active { color: var(--gold); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 14px; }
.badge-card { border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: 20px; text-align: center; background: var(--card); transition: all var(--dur-2) ease; }
.badge-card.locked { opacity: 0.55; filter: grayscale(0.7); }
.badge-card .badge-ico { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; background: var(--gold-soft); display: grid; place-items: center; color: var(--gold); }
.badge-card h3 { font-size: var(--fs-base); font-family: var(--font-body); font-weight: 600; }
.badge-card p { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 4px; }
.points-hero { display: flex; gap: clamp(16px, 4vw, 44px); align-items: center; flex-wrap: wrap; }
.points-num { font-family: var(--font-display); font-size: var(--fs-3xl); line-height: 1; }
.referral-box { border: 1px dashed var(--hairline-strong); border-radius: var(--radius-m); padding: 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
.referral-box code { font-family: var(--font-mono); background: var(--paper-2); padding: 6px 14px; border-radius: var(--radius-s); letter-spacing: 0.15em; }

/* ---------- support ---------- */
.faq-list { display: grid; gap: 10px; max-width: 760px; }
.faq-item { border: 1px solid var(--hairline); border-radius: var(--radius-m); background: var(--card); overflow: clip; }
.faq-item summary { padding: 16px 20px; cursor: pointer; font-weight: 600; font-size: var(--fs-s); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--ink-3); font-size: 1.2rem; transition: transform var(--dur-1) ease; flex: none; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 20px 18px; color: var(--ink-2); font-size: var(--fs-s); }
.policy-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; }
.policy-card { border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: 22px; background: var(--card); }
.policy-card svg { color: var(--gold); margin-bottom: 12px; }
.policy-card h3 { font-size: var(--fs-l); margin-bottom: 8px; }
.policy-card p { font-size: var(--fs-s); color: var(--ink-2); }
.demo-note { padding: 12px 16px; border-radius: var(--radius-s); background: var(--gold-soft); font-size: var(--fs-s); color: var(--ink-2); border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }

/* ---------- story / values ---------- */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .story-grid { grid-template-columns: 1fr; } }
.story-art { border-radius: var(--radius-l); overflow: clip; border: 1px solid var(--hairline); background: var(--stage-bg); aspect-ratio: 4 / 3.4; display: grid; place-items: center; padding: 10%; }
.value-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.value-card { padding: 26px 24px; border: 1px solid var(--hairline); border-radius: var(--radius-m); background: var(--card); }
.value-card svg { color: var(--gold); margin-bottom: 14px; }
.value-card h3 { font-size: var(--fs-l); margin-bottom: 8px; }
.value-card p { font-size: var(--fs-s); color: var(--ink-2); }

.quote-band { text-align: center; max-width: 760px; margin-inline: auto; }
.quote-band blockquote { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.4; font-style: italic; }
.quote-band cite { display: block; margin-top: 16px; font-style: normal; font-size: var(--fs-s); color: var(--ink-3); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); background: var(--paper-2); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: clamp(20px, 4vw, 48px); padding-block: clamp(36px, 6vw, 64px) 28px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: span 2; } }
.site-footer h2 { font-size: var(--fs-s); font-family: var(--font-body); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; color: var(--ink-2); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.site-footer a { text-decoration: none; color: var(--ink-2); font-size: var(--fs-s); }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-tagline { color: var(--ink-2); font-size: var(--fs-s); max-width: 34ch; margin-block: 10px 18px; }
.trust-list { font-size: var(--fs-s); color: var(--ink-2); }
.trust-list li { display: flex; align-items: center; gap: 8px; }
.trust-list li::before { content: "✓"; color: var(--gold); font-weight: 700; }
.footer-legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 18px 26px; border-top: 1px solid var(--hairline); font-size: var(--fs-xs); color: var(--ink-3); }

/* ---------- utility & misc ---------- */
.divider { border: none; border-top: 1px solid var(--hairline); margin-block: clamp(24px, 4vw, 44px); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; } .mt-4 { margin-top: 44px; }
.muted { color: var(--ink-3); font-size: var(--fs-s); }
.center { text-align: center; }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(100deg, var(--paper-2) 40%, var(--paper-3) 50%, var(--paper-2) 60%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--radius-s); }
@keyframes shimmer { to { background-position: -200% 0; } }

.kbd { font-family: var(--font-mono); font-size: 0.78em; background: var(--paper-2); border: 1px solid var(--hairline-strong); border-bottom-width: 2px; border-radius: 4px; padding: 1px 6px; }

/* view transitions between routes */
.route-enter { animation: route-in var(--dur-3) var(--ease-out); }
@keyframes route-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .product-card:hover { transform: none; }
  .product-card:hover .product-card-media img { transform: none; }
}

@media print {
  .site-header, .site-footer, .announce-bar, .toast-root, .assistant-panel { display: none !important; }
}
