/* ============================================================================
   GLOW — warm-clinical skincare. Calm, gender-neutral, premium-editorial with
   a restrained 90s-retro warmth. Mobile-first.
   ========================================================================== */
:root {
  --bg-page: #f6f1e8;
  --bg-surface: #fffdf8;
  --bg-elev: #ffffff;
  --ink: #23211c;
  --ink-soft: #5e574b;
  --ink-faint: #6e6757; /* WCAG AA on cream + surface */
  --line: #e7dfce;

  --brand-700: #1f5c50;
  --brand-600: #2e7d6f;
  --brand-500: #3a9384;
  --brand-100: #dcede7;
  --brand-050: #eef7f3;

  --sun-700: #b04e1c; /* terracotta text on light — WCAG AA */
  --sun-600: #d9692f;
  --sun-500: #e8853f;
  --sun-100: #fbe6d4;
  --lilac-100: #ece7f4;
  --star: #e8a23d;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --shadow-1: 0 6px 18px rgba(35, 33, 28, 0.07);
  --shadow-2: 0 18px 44px rgba(35, 33, 28, 0.13);
  --shadow-cta: 0 12px 26px rgba(217, 105, 47, 0.32);
  --shadow-green: 0 12px 26px rgba(31, 92, 80, 0.26);

  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-ui: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg-page);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(1100px 520px at 88% -8%, var(--brand-050), transparent 60%),
    radial-gradient(900px 480px at -10% 8%, var(--sun-100), transparent 55%);
  background-attachment: fixed;
}

body.app-active { background-attachment: scroll; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
em { font-style: italic; color: var(--brand-600); }

[hidden] { display: none !important; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  --pad-y: 0.8rem;
  --pad-x: 1.3rem;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.01em;
  padding: var(--pad-y) var(--pad-x);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn { min-height: 44px; } /* comfortable touch target */
.btn-sm { --pad-y: 0.55rem; --pad-x: 1rem; font-size: 0.92rem; min-height: 40px; }
.btn-lg { --pad-y: 1rem; --pad-x: 1.7rem; font-size: 1.06rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  color: #f4fffb;
  box-shadow: var(--shadow-green);
}
.btn-primary:hover { box-shadow: 0 16px 30px rgba(31, 92, 80, 0.34); transform: translateY(-1px); }
.btn-primary:disabled { background: #c8cdc7; color: #fff; box-shadow: none; cursor: not-allowed; opacity: 0.8; }

.btn-secondary {
  background: var(--bg-elev);
  border-color: var(--line);
  color: var(--ink);
}
.btn-secondary:hover { border-color: var(--brand-500); color: var(--brand-700); }

.btn-quiet { background: transparent; color: var(--ink-soft); padding-left: 0.5rem; padding-right: 0.5rem; }
.btn-quiet:hover { color: var(--brand-700); }

.btn-cart {
  background: linear-gradient(135deg, var(--sun-500), var(--sun-600));
  color: #fff8f2;
  box-shadow: var(--shadow-cta);
}
.btn-cart:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(217, 105, 47, 0.4); }
.btn-cart:disabled { background: #cfcabf; box-shadow: none; cursor: not-allowed; }

:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; border-radius: 6px; }

/* ── Site shell (crawlable page) ───────────────────────────────────────── */
#seo { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  padding: 0.9rem 0 0.25rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.14em;
  color: var(--brand-700);
  text-decoration: none;
}

/* ── Welcome back (returning visitor, zero-backend) ────────────────────── */
.welcome-back { margin-top: 0.9rem; }
.wb-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-md);
  padding: 0.7rem 1rem 0.7rem 1.2rem;
}
.wb-text { font-weight: 600; color: var(--brand-700); }
.wb-actions { display: flex; gap: 0.4rem; align-items: center; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 3.5rem);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sun-700);
  margin-bottom: 0.9rem;
}
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  letter-spacing: -0.015em;
  margin-bottom: 1.1rem;
}
.hero h1 em { font-style: italic; }
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 36ch;
  margin-bottom: 1.6rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.5rem; }
.trust-bar {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.trust-bar li { white-space: nowrap; }
.trust-bar li::first-letter { color: var(--brand-500); }

/* hero art */
.hero-art { position: relative; min-height: 240px; }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: 0.7; }
.blob-a { width: 240px; height: 240px; right: 6%; top: 0; background: radial-gradient(circle at 35% 30%, var(--brand-100), var(--brand-500)); }
.blob-b { width: 170px; height: 170px; left: 8%; bottom: 0; background: radial-gradient(circle at 40% 35%, var(--sun-100), var(--sun-500)); opacity: 0.55; }
.hero-bottles { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.bottle { width: 56px; border-radius: 16px 16px 10px 10px; box-shadow: var(--shadow-1); position: relative; }
.bottle::before { content: ""; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); width: 22px; height: 14px; border-radius: 5px; background: #cdbfa6; }
.bottle.b1 { height: 150px; background: linear-gradient(180deg, #fff, var(--brand-100)); }
.bottle.b2 { height: 196px; background: linear-gradient(180deg, #fff, var(--sun-100)); }
.bottle.b3 { height: 128px; background: linear-gradient(180deg, #fff, var(--lilac-100)); }

@media (min-width: 860px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; }
  .hero-art { min-height: 340px; }
}

/* ── How it works ──────────────────────────────────────────────────────── */
.how { padding: clamp(1.5rem, 4vw, 2.5rem) 0; }
.how > h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.4rem; }
.how-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.how-steps li {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-1);
}
.how-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand-700);
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
  margin-bottom: 0.7rem;
}
.how-steps h3 { font-size: 1.25rem; margin-bottom: 0.35rem; }
.how-steps p { color: var(--ink-soft); font-size: 0.98rem; }
@media (min-width: 760px) { .how-steps { grid-template-columns: repeat(3, 1fr); } }

/* ── Catalog (crawlable) ───────────────────────────────────────────────── */
.catalog { padding: clamp(2rem, 5vw, 3.5rem) 0 2rem; }
.catalog-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.6rem; }
.catalog-head p { color: var(--ink-soft); max-width: 60ch; margin-bottom: 1.8rem; }
.seo-cats { display: grid; gap: 1.2rem; }
.seo-cat {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow-1);
}
.seo-cat h3 { font-size: 1.3rem; color: var(--brand-700); margin-bottom: 0.8rem; }
.seo-cat ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.55rem; }
.seo-cat li { color: var(--ink-soft); font-size: 0.96rem; }
.seo-cat li strong { color: var(--ink); }
.catalog-cta { text-align: center; margin-top: 2rem; }
.seo-cat-intro { color: var(--ink-soft); font-size: 0.92rem; margin: -0.3rem 0 0.8rem; }
@media (min-width: 760px) { .seo-cats { grid-template-columns: repeat(2, 1fr); } }

/* ── Routine order + FAQ (SEO content) ─────────────────────────────────── */
.routine-order, .faq { padding: clamp(2rem, 5vw, 3rem) 0 1rem; }
.routine-order > h2, .faq > h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.8rem; }
.section-lede { color: var(--ink-soft); max-width: 60ch; margin-bottom: 1.4rem; }
.order-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.7rem;
  max-width: 60ch;
}
.order-steps li {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.9rem 1.1rem 0.9rem 3.2rem;
  box-shadow: var(--shadow-1);
  color: var(--ink-soft);
}
.order-steps li strong { color: var(--ink); }
.order-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-100); color: var(--brand-700);
  font-family: var(--font-display); font-weight: 700;
  border-radius: 50%;
}
.section-cta { color: var(--ink-soft); display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }

.faq-list { display: grid; gap: 0.6rem; max-width: 70ch; }
.faq-list details {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0.2rem 1.1rem;
  box-shadow: var(--shadow-1);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 0.85rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--brand-600); font-size: 1.4rem; line-height: 1; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { color: var(--ink-soft); padding: 0 0 0.9rem; margin: 0; max-width: 64ch; }
.faq-list a, .section-lede a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }
.faq-list a:hover, .section-lede a:hover { color: var(--brand-600); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-foot { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); margin-top: 2.5rem; }
.disclosure { color: var(--ink-faint); font-size: 0.86rem; max-width: 70ch; margin-bottom: 1rem; }
.disclosure strong { color: var(--ink-soft); }
.foot-brand { font-family: var(--font-display); color: var(--ink-soft); font-size: 1rem; }
.noscript-msg { padding: 1rem; text-align: center; color: var(--ink-soft); }
.notfound { max-width: 640px; margin: 0 auto; padding: clamp(4rem, 14vh, 9rem) clamp(1rem, 4vw, 2rem); text-align: center; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.6rem 0 0.8rem; }
.notfound .lede { margin: 0 auto 1.6rem; }
.notfound .hero-cta { justify-content: center; }

/* ── Guide / content pages ─────────────────────────────────────────────── */
.breadcrumb { font-size: 0.86rem; color: var(--ink-faint); padding: 0.3rem 0 0; }
.breadcrumb a { color: var(--brand-700); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.guide-hero { grid-template-columns: 1fr; padding-top: clamp(1.5rem, 4vw, 2.5rem); }
.guide-hero .hero-copy { max-width: 62ch; }
.guide-hero .lede { max-width: 62ch; margin-bottom: 1rem; }
.guide-section { padding: clamp(2rem, 5vw, 3rem) 0 1rem; }
.guide-section > h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.6rem; }
.guide-faq { padding-top: 1rem; }
.guide-faq > h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.8rem; }

.guide-cluster { padding: 2rem 0 0.5rem; border-top: 1px solid var(--line); margin-top: 2rem; }
.guide-cluster > h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.guide-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.guide-links a {
  display: inline-block;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.4rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-700);
  text-decoration: none;
}
.guide-links a:hover { border-color: var(--brand-500); background: var(--brand-050); }

.glossary { display: grid; gap: 1rem; max-width: 70ch; }
.glossary-term {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-1);
  scroll-margin-top: 1rem;
}
.glossary-term h3 { font-size: 1.2rem; color: var(--brand-700); margin-bottom: 0.35rem; }
.glossary-term p { color: var(--ink-soft); margin: 0; }
.glossary-term:target { border-color: var(--brand-500); box-shadow: var(--shadow-2); }

/* Home: guides-by-skin-type strip */
.guides-strip { padding: clamp(1.5rem, 4vw, 2.5rem) 0; }
.guides-strip > h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.5rem; }
.guides-strip > p { color: var(--ink-soft); margin-bottom: 1.2rem; max-width: 60ch; }

/* Header nav (Guides + Quiz), used on home + guide pages */
.site-nav { display: flex; align-items: center; gap: clamp(0.7rem, 2vw, 1.2rem); }
.site-nav > a:not(.btn) { font-weight: 700; font-size: 0.95rem; color: var(--ink); text-decoration: none; }
.site-nav > a:not(.btn):hover,
.site-nav > a[aria-current="page"] { color: var(--brand-700); }

/* Related-guides contextual line on guide pages */
.related-line { color: var(--ink-soft); font-size: 0.92rem; margin: 0.1rem 0 1.3rem; }
.related-line a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 2px; }

/* /guides/ hub grid */
.hub-grid { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .hub-grid { grid-template-columns: 1fr 1fr; } }
.hub-card {
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.1s;
}
.hub-card:hover { box-shadow: var(--shadow-2); border-color: var(--brand-500); transform: translateY(-1px); }
.hub-card h3 { font-size: 1.12rem; color: var(--ink); margin-bottom: 0.3rem; }
.hub-card p { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 0.6rem; }
.hub-read { color: var(--brand-700); font-weight: 700; font-size: 0.9rem; }

/* ============================================================================
   APP: stories quiz + results (rendered into #app)
   ========================================================================== */
#app { min-height: 100svh; }

/* ── Stories quiz ──────────────────────────────────────────────────────── */
.story {
  min-height: 100svh;
  max-width: 620px;
  margin: 0 auto;
  padding: 0.9rem clamp(1rem, 4vw, 1.5rem) 1.5rem;
  display: flex;
  flex-direction: column;
}
.story-top { position: sticky; top: 0; padding-top: 0.4rem; }
.segments { display: flex; gap: 6px; }
.seg {
  flex: 1;
  height: 4px;
  border-radius: var(--r-pill);
  background: rgba(35, 33, 28, 0.12);
  overflow: hidden;
  position: relative;
}
.seg.done { background: var(--brand-500); }
.seg.active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-600);
  border-radius: inherit;
  transform-origin: left;
  animation: segfill 0.5s ease forwards;
}
@keyframes segfill { from { transform: scaleX(0.15); } to { transform: scaleX(1); } }

.story-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 0.7rem; }
.story-brand { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.16em; color: var(--brand-700); }
.icon-btn {
  border: none; background: transparent; color: var(--ink-soft);
  font-size: 1.5rem; line-height: 1; width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(35, 33, 28, 0.06); color: var(--ink); }

.story-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 0;
}
.q-icon {
  font-size: 2.4rem;
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  margin-bottom: 1.2rem;
}
.q-title { font-size: clamp(1.7rem, 5vw, 2.4rem); letter-spacing: -0.01em; margin-bottom: 0.6rem; }
.q-sub { color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 1.5rem; }

.opts { display: grid; gap: 0.7rem; }
.opts-grid { grid-template-columns: 1fr 1fr; }
.opt {
  text-align: left;
  background: var(--bg-surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  position: relative;
  font-family: var(--font-ui);
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.opt:hover { border-color: var(--brand-500); }
.opt.on { border-color: var(--brand-600); background: var(--brand-050); }
.opt-main { font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.opt-hint { font-size: 0.88rem; color: var(--ink-faint); }
.opt-check {
  position: absolute; top: 0.75rem; right: 0.85rem;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; opacity: 0; transform: scale(0.6); transition: 0.15s;
}
.opt.on .opt-check { opacity: 1; transform: scale(1); }

/* budget slider */
.budget { text-align: center; padding: 0.5rem 0 0.5rem; }
.budget-amount { font-family: var(--font-display); font-weight: 700; font-size: 3rem; color: var(--brand-700); display: block; margin-bottom: 1rem; }
.budget-amount span { font-size: 1.1rem; color: var(--ink-faint); font-family: var(--font-ui); margin-left: 0.35rem; }
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--brand-500), var(--sun-500)); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-600); box-shadow: var(--shadow-1); cursor: pointer; }
.slider::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-600); cursor: pointer; }
.slider-scale { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--ink-faint); margin-top: 0.6rem; }

.story-foot { padding-top: 0.5rem; }
.foot-hint { text-align: center; color: var(--ink-faint); font-size: 0.9rem; }

/* ── Results ───────────────────────────────────────────────────────────── */
.results { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem) 1rem; }
.results-head { padding: 1rem 0 1.5rem; }
.rh-inner { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.results-title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 0.6rem; }
.results-sub { color: var(--ink-soft); max-width: 54ch; font-size: 1.05rem; }

.budget-inline {
  margin: 1.4rem 0 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow-1);
}
.budget-inline label { display: flex; justify-content: space-between; font-weight: 600; color: var(--ink-soft); margin-bottom: 0.7rem; font-size: 0.95rem; }
.budget-inline strong { color: var(--brand-700); font-size: 1.1rem; }

.refine { margin-top: 1rem; }
.refine summary { cursor: pointer; font-weight: 600; color: var(--brand-700); padding: 0.4rem 0; list-style: none; }
.refine summary::-webkit-details-marker { display: none; }
.refine summary::before { content: "＋ "; }
.refine[open] summary::before { content: "－ "; }
.refine-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.refine-chip { border: 1.5px solid var(--line); background: var(--bg-surface); color: var(--ink-soft); border-radius: var(--r-pill); padding: 0.4rem 0.9rem; font-size: 0.88rem; font-weight: 600; cursor: pointer; font-family: var(--font-ui); }
.refine-chip.on { border-color: var(--sun-600); background: var(--sun-100); color: var(--sun-600); }

/* product cards */
.cards { display: grid; gap: 1rem; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  display: grid;
  grid-template-columns: 96px 1fr;
  grid-template-areas: "img body" "foot foot";
  gap: 0.4rem 1rem;
  padding: 1rem;
  transition: box-shadow 0.18s, opacity 0.18s, border-color 0.18s;
}
.card:hover { box-shadow: var(--shadow-2); }
.card.is-off { opacity: 0.5; border-style: dashed; }

.card-pick { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.card-pick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.card-pick-box {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--bg-surface);
  color: transparent; font-size: 0.85rem; transition: 0.15s;
}
.card-pick input:checked + .card-pick-box { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.card-pick input:focus-visible + .card-pick-box { outline: 3px solid var(--brand-500); outline-offset: 2px; }

.card-img {
  grid-area: img;
  width: 96px; height: 96px;
  border-radius: var(--r-sm);
  background: #fff;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
}
.card-img img { width: 100%; height: 100%; object-fit: contain; }

.card-body { grid-area: body; min-width: 0; padding-right: 1.6rem; }
.chip {
  display: inline-block;
  background: var(--brand-100); color: var(--brand-700);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem; border-radius: var(--r-pill); margin-bottom: 0.4rem;
}
.card-title { font-size: 1.12rem; line-height: 1.18; margin-bottom: 0.15rem; }
.card-brand { color: var(--ink-faint); font-size: 0.86rem; font-weight: 600; margin-bottom: 0.4rem; }
.trust { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.5rem; flex-wrap: wrap; }
.stars { color: var(--star); letter-spacing: 1px; }
.stars i { font-style: normal; color: rgba(35, 33, 28, 0.2); }
.stars i.on { color: var(--star); }
.trust span { font-weight: 700; color: var(--ink); }
.trust em { font-style: normal; color: var(--ink-faint); }
.card-why { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 0.6rem; }
.bestfor { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tag { font-size: 0.74rem; font-weight: 600; color: var(--ink-soft); background: var(--lilac-100); border-radius: var(--r-pill); padding: 0.18rem 0.55rem; }

.card-foot { grid-area: foot; display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.8rem; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--ink); }
.price small { font-family: var(--font-ui); font-size: 0.7rem; font-weight: 600; color: var(--ink-faint); margin-left: 0.25rem; }

.results .disclosure { margin-top: 1.6rem; }
.sticky-spacer { height: 90px; }

/* sticky cart */
.sticky-cart {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 120%);
  width: min(var(--maxw), 100% - 1.5rem);
  margin-bottom: 0.75rem;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.55rem 0.7rem 0.55rem 1.4rem;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
  z-index: 50;
}
.sticky-cart.show { transform: translate(-50%, 0); }
.sc-meta { display: flex; flex-direction: column; line-height: 1.2; }
.sc-meta strong { font-size: 1rem; }
.sc-meta span { font-size: 0.82rem; color: var(--ink-soft); }
.btn-cart { white-space: nowrap; }

/* ── Motion primitives ─────────────────────────────────────────────────── */
.frame-enter { animation: frameEnter 0.18s ease both; }
@keyframes frameEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.card { animation: frameEnter 0.26s ease both; animation-delay: calc(var(--i, 0) * 40ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .seg.active::after { transform: scaleX(1); }
}
