:root {
  --bg: #f8f2ee; --surface: #ffffff; --surface-alt: #f1e7e2; --ink: #2a1c2d; --muted: #8b7986;
  --plum: #6b2d5c; --on-plum: #ffffff; --rose: #c98b7b; --sage: #6f9179; --amber: #c58a3d; --hairline: #e8dcd6;
  --hero: linear-gradient(135deg, #3b1636 0%, #7a3562 55%, #d08f83 100%);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #150f18; --surface: #221926; --surface-alt: #2c2131; --ink: #f5ece8; --muted: #a9979f;
    --plum: #e2aab4; --on-plum: #2a1420; --rose: #d9a08f; --sage: #9dbfa6; --amber: #e0b06a; --hairline: #382b3d;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--plum); }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
[hidden] { display: none !important; }

header.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); text-decoration: none; }
.brand span { color: var(--plum); margin-right: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 15px 26px; font-weight: 600; text-decoration: none; }
.btn.primary { background: var(--plum); color: var(--on-plum); }
.btn.light { background: #fff; color: #3b1636; }
.btn.quiet { background: color-mix(in srgb, var(--plum) 12%, transparent); color: var(--plum); padding: 10px 18px; font-size: 15px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:focus-visible, .chip:focus-visible, .plan:focus-within, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--plum) 45%, transparent); outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; color: var(--plum); font-weight: 600; font-size: 15px; }

.hero { background: var(--hero); color: #fff; border-radius: 32px; padding: 64px 44px; display: grid; gap: 18px; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); max-width: 12ch; }
.hero p.lead { font-size: 20px; opacity: 0.88; max-width: 34ch; }
.hero .note { font-size: 14px; opacity: 0.75; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 10px; }

section { padding: 64px 0 0; }
section > h2 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 28px; }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 22px; padding: 22px; }
.card h3 { font-size: 20px; margin: 10px 0 6px; }
.card p { color: var(--muted); font-size: 15.5px; }
.icon { width: 28px; height: 28px; color: var(--plum); }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--plum); color: var(--on-plum); font-weight: 700; font-size: 14px; }

.plans { display: grid; gap: 12px; margin-top: 24px; max-width: 560px; }
.plan { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 18px; padding: 16px 18px; cursor: pointer; }
.plan:has(input:checked) { border: 2px solid var(--plum); padding: 15px 17px; }
.plan input { accent-color: var(--plum); width: 20px; height: 20px; margin: 0; }
.plan .name { font-weight: 600; }
.plan .sub { color: var(--muted); font-size: 14px; }
.plan .price { margin-left: auto; text-align: right; font-weight: 600; }
.plan .price small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.badge { background: var(--plum); color: var(--on-plum); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 8px; margin-left: 8px; letter-spacing: 0.04em; }
.field { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; padding: 14px 16px; }
.form { display: grid; gap: 12px; max-width: 560px; margin-top: 16px; }
.fine { font-size: 13px; color: var(--muted); }
.error { color: #b3261e; font-size: 15px; }
@media (prefers-color-scheme: dark) { .error { color: #f2b8b5; } }

footer { padding: 56px 0 40px; color: var(--muted); font-size: 14px; display: grid; gap: 8px; }

/* Scan dialog */
dialog { border: 0; padding: 0; border-radius: 28px; background: var(--bg); color: var(--ink); width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgba(20, 10, 22, 0.55); }
.sheet { padding: 26px 24px 24px; display: grid; gap: 18px; }
.sheet h2 { font-size: 28px; }
.close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-alt); color: var(--ink); font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--hairline); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 9px 14px; font-size: 15px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--plum); color: var(--on-plum); border-color: transparent; }
.points { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; font-size: 15px; }
.points li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.stage { position: relative; background: #000; border-radius: 22px; overflow: hidden; aspect-ratio: 3 / 4; display: grid; place-items: center; }
.stage video, .stage img { width: 100%; height: 100%; object-fit: cover; }
.stage video { transform: scaleX(-1); }
.stage .oval { position: absolute; width: 62%; aspect-ratio: 3 / 4; border: 2.5px dashed rgba(255, 255, 255, 0.85); border-radius: 50%; pointer-events: none; }
.stage .sweep { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(transparent, rgba(255, 255, 255, 0.5), transparent); animation: sweep 2.2s ease-in-out infinite; }
.stage .status { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #fff; font-family: var(--serif); font-size: 22px; }
.stage img.dim { opacity: 0.55; }
@keyframes sweep { from { top: -30%; } to { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .stage .sweep { animation: none; top: 35%; } html { scroll-behavior: auto; } }

.result-top { display: flex; align-items: center; gap: 18px; }
.result-top img { width: 96px; height: 124px; object-fit: cover; border-radius: 18px; }
.ring { position: relative; width: 108px; height: 108px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--hairline); }
.ring .value { stroke: var(--plum); stroke-linecap: round; }
.ring .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-family: var(--serif); font-size: 38px; line-height: 1; }
.ring .num small { font: 12px var(--sans); color: var(--muted); }
.bars { display: grid; gap: 14px; }
.bar .row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 6px; }
.bar .line { height: 6px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; }
.bar.locked .row { color: var(--muted); }
.banner { background: color-mix(in srgb, var(--amber) 20%, transparent); border-radius: 14px; padding: 10px 14px; font-size: 14px; }

@media (max-width: 560px) {
  .hero { padding: 44px 26px; border-radius: 26px; }
  section { padding-top: 48px; }
}
