/* ============ Theme ============ */
:root {
  --bg: #fbf8ff;
  --bg-2: #f1ecff;
  --card: rgba(255, 255, 255, 0.72);
  --card-2: rgba(255, 255, 255, 0.92);
  --line: rgba(40, 24, 90, 0.10);
  --ink: #1b1530;
  --muted: #6b6385;
  --iq: #6d5cff;
  --eq: #ff4f8b;
  --aq: #10c9a0;
  --ok: #10b981;
  --warn: #f97316;
  --grad: linear-gradient(120deg, #6d5cff 0%, #c04dff 30%, #ff4f8b 60%, #ff9a3c 100%);
  --grad-loop: linear-gradient(120deg, #6d5cff 0%, #c04dff 20%, #ff4f8b 40%, #ff9a3c 50%, #ff4f8b 60%, #c04dff 80%, #6d5cff 100%);
  --grad-soft: linear-gradient(120deg, rgba(109, 92, 255, .14), rgba(255, 79, 139, .14), rgba(255, 154, 60, .14));
  --shadow: 0 20px 50px -24px rgba(60, 30, 140, .35);
  --radius: 24px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0d0a1f; --bg-2: #151033;
  --card: rgba(255, 255, 255, 0.06); --card-2: rgba(255, 255, 255, 0.10);
  --line: rgba(255, 255, 255, 0.12); --ink: #f4f1ff; --muted: #a9a2c9;
  --iq: #8b7dff; --eq: #ff6aa2; --aq: #2ee6b8;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; transition: background .4s, color .4s; }

/* living colour background */
.aurora { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.aurora::before, .aurora::after { content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(80px); opacity: .5; }
.aurora::before { background: radial-gradient(circle, #8b7dff 0%, transparent 60%); top: -25vmax; left: -15vmax; animation: float1 18s ease-in-out infinite alternate; }
.aurora::after { background: radial-gradient(circle, #ff5f9e 0%, transparent 60%); bottom: -30vmax; right: -20vmax; animation: float2 22s ease-in-out infinite alternate; }
body::before { content: ""; position: fixed; z-index: -2; width: 50vmax; height: 50vmax; border-radius: 50%; filter: blur(90px); opacity: .4; background: radial-gradient(circle, #22d3ee 0%, transparent 60%); top: 30%; left: 45%; animation: float3 26s ease-in-out infinite alternate; pointer-events: none; }
body::after { content: ""; position: fixed; z-index: -2; width: 40vmax; height: 40vmax; border-radius: 50%; filter: blur(90px); opacity: .3; background: radial-gradient(circle, #ffb347 0%, transparent 60%); top: 55%; left: -10%; animation: float1 20s ease-in-out infinite alternate-reverse; pointer-events: none; }
@keyframes float1 { to { transform: translate(12vmax, 8vmax) scale(1.1); } }
@keyframes float2 { to { transform: translate(-10vmax, -12vmax) scale(1.15); } }
@keyframes float3 { to { transform: translate(-14vmax, 6vmax) scale(.9); } }
.glow { position: fixed; z-index: -1; width: 420px; height: 420px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, rgba(192, 77, 255, .22), transparent 65%); transform: translate(-50%, -50%); left: -999px; top: -999px; }

/* ============ Header ============ */
.top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 18px clamp(16px, 4vw, 48px); max-width: 1240px; margin: 0 auto; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; border-radius: 50%; background: var(--grad-loop); background-size: 200% 200%; animation: shimmer 6s linear infinite; box-shadow: 0 6px 18px -6px rgba(192, 77, 255, .7); }
.top-actions { display: flex; gap: 8px; align-items: center; }
select, .icon-btn { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; backdrop-filter: blur(10px); }
select option { color: #111; }
.icon-btn { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }

/* ============ Steps ============ */
.step { display: none; max-width: 1240px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 48px) 40px; }
.step.active { display: block; animation: rise .6s cubic-bezier(.2, .7, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-in { to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

/* ============ Hero ============ */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; min-height: 74vh; }
.eyebrow { display: inline-block; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px; background: var(--grad-soft); color: var(--iq); }
h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.5rem, 5.8vw, 4.8rem); line-height: 1.02; margin: 0 0 18px; letter-spacing: -.025em; }
h1 em { font-style: italic; background: var(--grad-loop); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 5s linear infinite; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; padding: 0; margin: 28px 0 0; }
.pills li { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; font-size: .85rem; color: var(--muted); backdrop-filter: blur(10px); display: flex; align-items: center; gap: 8px; }
.pills li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.hero-visual { position: relative; }
.hero-visual canvas { width: 100%; height: auto; display: block; cursor: pointer; touch-action: none; }
.legend { display: flex; justify-content: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.legend button { display: flex; align-items: center; gap: 7px; font: 600 .82rem var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; backdrop-filter: blur(10px); transition: .2s; }
.legend button:hover, .legend button.on { transform: translateY(-2px); box-shadow: var(--shadow); }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.hero-tip { position: absolute; left: 50%; top: 6%; transform: translateX(-50%) translateY(6px); width: min(320px, 90%); background: var(--card-2); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; font-size: .9rem; box-shadow: var(--shadow); opacity: 0; transition: .25s; pointer-events: none; backdrop-filter: blur(12px); }
.hero-tip.show { opacity: 1; transform: translateX(-50%); }
.hero-tip b { display: block; margin-bottom: 2px; }

/* ============ Buttons ============ */
.btn { border: 0; border-radius: 999px; padding: 14px 26px; font: 600 1rem var(--sans); cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; color: var(--ink); position: relative; }
.btn.primary { background: var(--grad-loop); background-size: 200% auto; color: #fff; box-shadow: 0 12px 30px -10px rgba(192, 77, 255, .65); animation: shimmer 6s linear infinite; }
.btn.primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 40px -12px rgba(255, 79, 139, .7); }
.btn.ghost { background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.btn.ghost:hover { background: var(--card-2); transform: translateY(-1px); }
.btn.small { padding: 10px 16px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: wait; transform: none; }
.upload-btn input { display: none; }

/* ============ Capture ============ */
.capture { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: start; }
.viewport { position: relative; aspect-ratio: 3 / 4; max-height: 74vh; margin: 0 auto; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); }
.viewport::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 3px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; z-index: 3; pointer-events: none; }
.viewport video, .viewport canvas, .viewport img.still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewport video { transform: scaleX(-1); }
.viewport canvas { transform: scaleX(-1); pointer-events: none; }
.viewport.upload video, .viewport.upload canvas { transform: none; }
.guide { position: absolute; inset: 6% 10%; width: 80%; height: 88%; pointer-events: none; }
.guide ellipse, .guide path { fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 2; stroke-dasharray: 6 8; filter: drop-shadow(0 0 4px rgba(192, 77, 255, .7)); }
.viewport.upload .guide { display: none; }
.ring { position: absolute; inset: 8% 14%; pointer-events: none; }
.ring svg { width: 100%; height: 100%; }
.ring circle { fill: none; stroke: var(--eq); stroke-width: 1.4; stroke-dasharray: 0 100; stroke-linecap: round; transition: stroke-dasharray .25s linear; filter: drop-shadow(0 0 3px var(--eq)); }
.instruction { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: rgba(20, 12, 50, .62); backdrop-filter: blur(12px); border-radius: 18px; padding: 10px 18px; font-weight: 500; text-align: center; width: max-content; max-width: 90%; line-height: 1.35; color: #fff; z-index: 2; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 4; }
.flash.go { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.captured { position: absolute; right: 12px; top: 12px; width: 28%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; border: 3px solid #fff; opacity: 0; transform: scale(.85) rotate(4deg); transition: opacity .25s, transform .3s; pointer-events: none; box-shadow: 0 12px 30px rgba(40, 10, 90, .45); z-index: 3; }
.captured.show { opacity: 1; transform: rotate(-2deg); }
.stage-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

.shots { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.shots h2 { font-family: var(--serif); font-weight: 600; margin: 0 0 4px; }
.hint { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.shotlist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shotlist li { aspect-ratio: 3 / 4; border-radius: 14px; border: 1.5px dashed var(--line); background: var(--bg-2); position: relative; overflow: hidden; display: grid; place-items: end center; cursor: pointer; transition: border-color .2s, transform .2s, box-shadow .2s; }
.shotlist li:hover { transform: translateY(-2px) rotate(-1deg); }
.shotlist li.current { border: 2px solid var(--eq); box-shadow: 0 0 0 4px rgba(255, 79, 139, .15); }
.shotlist li.done { border-style: solid; border-color: var(--aq); }
.shotlist li.done::before { content: "✓"; position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--aq); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; z-index: 2; }
.shotlist li img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shotlist li span { position: relative; z-index: 1; font-size: .68rem; line-height: 1.2; padding: 4px 4px 6px; text-align: center; width: 100%; color: var(--muted); font-weight: 600; }
.shotlist li.done span { background: linear-gradient(transparent, rgba(20, 10, 50, .7)); color: #fff; }
.shotlist li.bad::after { content: "!"; position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--warn); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; z-index: 2; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: .88rem; color: var(--muted); }
.check input { accent-color: var(--eq); margin-top: 3px; }
.status { color: var(--warn); min-height: 1.4em; font-size: .9rem; }

/* ============ Scan ============ */
.scan { display: grid; place-items: center; min-height: 70vh; gap: 22px; }
.scan-frame { position: relative; width: min(420px, 86vw); aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.scan-frame img, .scan-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame img { filter: saturate(.6) brightness(.85); }
.beam { position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(109, 92, 255, .35), rgba(255, 79, 139, .35), transparent); animation: beam 2.4s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes beam { 0% { top: -30%; } 100% { top: 100%; } }
.scan-line { font-family: var(--serif); font-size: 1.35rem; text-align: center; min-height: 2em; transition: opacity .4s; }
.progress { width: min(420px, 86vw); height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .8s ease; }

/* ============ Report ============ */
.report { display: grid; gap: 22px; }
.r-hero { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: center; }
.facemap { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); }
.facemap img { display: block; width: 100%; height: auto; }
.facemap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.region { fill: transparent; stroke: rgba(255, 255, 255, .8); stroke-width: 1.4; cursor: pointer; transition: fill .25s, stroke .25s; vector-effect: non-scaling-stroke; }
.region.z-iq { --zc: var(--iq); } .region.z-eq { --zc: var(--eq); } .region.z-aq { --zc: var(--aq); }
.region:hover, .region.on { fill: color-mix(in srgb, var(--zc) 35%, transparent); stroke: var(--zc); stroke-width: 2.4; }
.region.top { stroke: var(--zc); stroke-width: 2.4; filter: drop-shadow(0 0 4px var(--zc)); }
.zone-line { stroke: rgba(255, 255, 255, .7); stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.zone-label { font: 700 13px var(--sans); paint-order: stroke; stroke: rgba(20, 10, 50, .65); stroke-width: 4px; }
.facemap-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lead, .lead-dot, .pin, .map-detail { --zc: var(--iq); }
.z-iq { --zc: var(--iq); } .z-eq { --zc: var(--eq); } .z-aq { --zc: var(--aq); }
.lead { fill: none; stroke: color-mix(in srgb, var(--zc) 70%, #fff); stroke-width: 1.3; opacity: .75; vector-effect: non-scaling-stroke; pointer-events: none; transition: opacity .2s, stroke-width .2s; }
.lead-dot { fill: var(--zc); stroke: #fff; stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.lead.on { opacity: 1; stroke: var(--zc); stroke-width: 2.6; }
.pin { position: absolute; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 7px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--zc) 60%, transparent); background: rgba(20, 12, 50, .82); backdrop-filter: blur(8px); color: #fff; font: 600 .74rem/1.1 var(--sans); white-space: nowrap; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; z-index: 2; }
.pin.left { left: 8px; } .pin.right { right: 8px; }
.pin i { width: 8px; height: 8px; border-radius: 50%; background: var(--zc); flex: none; }
.pin b { font-size: .68rem; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--zc); color: #fff; display: grid; place-items: center; }
.pin.top { box-shadow: 0 0 0 2px color-mix(in srgb, var(--zc) 45%, transparent), 0 0 14px color-mix(in srgb, var(--zc) 55%, transparent); }
.pin.empty { opacity: .6; }
.pin:hover, .pin.on { background: var(--zc); transform: translateY(-50%) scale(1.06); opacity: 1; }
.pin:hover b, .pin.on b { background: rgba(0, 0, 0, .25); }
.map-detail { padding: 14px 16px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); border-left: 5px solid var(--zc); max-height: 260px; overflow: auto; }
.map-detail h4 { margin: 0 0 8px; color: var(--zc); font-size: 1rem; }
.map-detail .md-item + .md-item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.map-detail .md-item p { margin: 4px 0 0; font-size: .9rem; }
.map-detail > .hint { margin: 0; }
.archetype { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.05; margin: 6px 0 14px; background: var(--grad-loop); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 7s linear infinite; }
.essence { font-size: 1.12rem; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.panel h3 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; margin: 0 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.trait { position: relative; padding: 20px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--line); opacity: 0; transform: translateY(12px); animation: rise-in .6s forwards; cursor: pointer; overflow: hidden; transition: box-shadow .25s; }
.trait:hover { box-shadow: var(--shadow); }
.trait::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--tc, var(--iq)); }
.trait .n { font-family: var(--serif); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--tc, var(--iq)); }
.trait h4 { margin: 8px 0 6px; font-size: 1.05rem; }
.trait p { margin: 0; color: var(--muted); font-size: .95rem; }
.zones { display: grid; gap: 14px; }
.zone-row { display: grid; grid-template-columns: 170px 1fr 44px; gap: 12px; align-items: center; }
.bar { height: 12px; border-radius: 12px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 12px; transition: width 1.2s cubic-bezier(.2, .7, .2, 1); }
.shape-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { border-radius: 999px; padding: 6px 14px; font-size: .88rem; font-weight: 600; color: #fff; background: var(--grad); background-size: 300% auto; }
.chip:nth-child(2) { background-position: 50% 0; } .chip:nth-child(3) { background-position: 100% 0; }
.chip b { font-family: var(--serif); margin-right: 6px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { background: var(--card-2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 8px 16px; cursor: pointer; font: 600 .9rem var(--sans); transition: .2s; }
.tabs button.on { color: #fff; background: var(--grad); border-color: transparent; }
.tab-body p { margin: 0; font-size: 1.02rem; }
.list { margin: 0; padding-left: 18px; }
.list li { margin: 6px 0; }
.list li::marker { color: var(--eq); }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.feature { padding: 16px; border-radius: 18px; background: var(--card-2); border: 1px solid var(--line); border-left: 5px solid var(--fc, var(--iq)); transition: transform .25s, box-shadow .25s; }
.feature.hl { transform: translateY(-3px); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc, var(--iq)) 35%, transparent); }
.feature h4 { margin: 0 0 4px; font-size: 1rem; }
.feature .meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .78rem; margin-bottom: 8px; flex-wrap: wrap; }
.dots i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-right: 3px; }
.dots i.f { background: var(--fc, var(--iq)); }
.agree { color: var(--ok); border: 1px solid var(--ok); border-radius: 999px; padding: 0 8px; }
.feature p { margin: 0 0 10px; font-size: .92rem; }
.fb { display: flex; gap: 6px; }
.fb button { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: .78rem; transition: .2s; }
.fb button.on[data-v="1"] { border-color: var(--aq); color: #fff; background: var(--aq); }
.fb button.on[data-v="0"] { border-color: var(--eq); color: #fff; background: var(--eq); }
.question { border-left: 4px solid var(--eq); padding-left: 14px; font-style: italic; }
.locked { position: relative; }
.locked .blur { filter: blur(6px); user-select: none; pointer-events: none; opacity: .6; }
.locked .unlock { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; }
.r-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.peak-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.peak-cell { border: 1px solid var(--line); border-radius: 18px; padding: 14px; text-align: center; background: var(--card-2); transition: .3s; }
.peak-cell b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.peak-cell span { color: var(--muted); font-size: .85rem; }
.peak-cell.on { border-color: transparent; background: var(--grad); color: #fff; box-shadow: 0 12px 30px -12px rgba(192, 77, 255, .7); transform: translateY(-3px); }
.peak-cell.on span { color: rgba(255, 255, 255, .9); }

footer { max-width: 1240px; margin: 0 auto; padding: 10px clamp(16px, 4vw, 48px) 36px; color: var(--muted); font-size: .8rem; }

/* ---- capture screen fits one viewport, no scrolling ---- */
body[data-step="capture"] { height: 100dvh; overflow: hidden; }
body[data-step="capture"] footer { display: none; }
body[data-step="capture"] .top { padding-top: 10px; padding-bottom: 10px; }
#step-capture { padding-top: 0; padding-bottom: 12px; height: calc(100dvh - 62px); }
#step-capture .capture { height: 100%; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 20px; align-items: stretch; }
#step-capture .stage { display: flex; flex-direction: column; min-height: 0; }
#step-capture .viewport { flex: 1; min-height: 0; max-height: none; width: auto; aspect-ratio: 3 / 4; margin: 0 auto; }
#step-capture .stage-actions { margin-top: 10px; flex-shrink: 0; }
#step-capture .shots { display: flex; flex-direction: column; min-height: 0; padding: 16px; overflow: hidden; }
#step-capture .shots h2 { font-size: 1.15rem; }
#step-capture .hint { font-size: .8rem; margin-bottom: 10px; line-height: 1.4; }
#step-capture .shotlist { gap: 6px; flex: 1; min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); }
#step-capture .shotlist li { aspect-ratio: auto; min-height: 0; }
#step-capture .check { margin-top: 8px; font-size: .78rem; line-height: 1.35; }
#step-capture .cta { margin-top: 10px; flex-wrap: nowrap; }
#step-capture .cta .btn { flex: 1; padding: 12px 10px; font-size: .92rem; }
#step-capture .status { min-height: 0; margin: 6px 0 0; font-size: .8rem; }

@media (max-width: 900px) {
  .hero, .capture, .r-hero { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 4px; gap: 6px; }
  .hero-visual { order: -1; max-width: 230px; margin: 0 auto; }
  .legend button { padding: 4px 9px; font-size: .72rem; }
  .lead { font-size: 1rem; }
  h1 { font-size: 2.3rem; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .zone-row { grid-template-columns: 120px 1fr 36px; }
  #step-capture { height: calc(100dvh - 58px); padding-left: 10px; padding-right: 10px; }
  #step-capture .capture { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; }
  #step-capture .viewport { aspect-ratio: auto; width: 100%; border-radius: 18px; }
  #step-capture .stage-actions { margin-top: 6px; gap: 6px; }
  #step-capture .stage-actions .btn { padding: 8px 10px; font-size: .8rem; }
  #step-capture .shots { padding: 10px; border-radius: 18px; }
  #step-capture .shots h2, #step-capture .hint { display: none; }
  #step-capture .shotlist { grid-template-columns: repeat(8, 1fr); grid-template-rows: none; flex: none; }
  #step-capture .shotlist li { aspect-ratio: 3 / 4; border-radius: 8px; }
  #step-capture .shotlist li span { font-size: .5rem; padding: 2px; }
  #step-capture .check { margin-top: 6px; font-size: .7rem; }
  #step-capture .cta { margin-top: 8px; }
  #step-capture .cta .btn { padding: 10px 6px; font-size: .85rem; }
  .glow { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- intro fits one viewport ---- */
body[data-step="intro"] { height: 100dvh; overflow: hidden; }
body[data-step="intro"] .top { padding-top: 12px; padding-bottom: 6px; }
#step-intro { height: calc(100dvh - 64px); padding-top: 0; padding-bottom: 28px; }
#step-intro .hero { height: 100%; min-height: 0; gap: clamp(16px, 3vw, 48px); grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
#step-intro .hero-text { min-height: 0; }
#step-intro h1 { font-size: clamp(2.2rem, min(5.6vw, 9dvh), 5rem); }
#step-intro .lead { font-size: clamp(.95rem, 2.4dvh, 1.2rem); max-width: 32em; }
#step-intro .cta { margin-top: clamp(12px, 3dvh, 26px); }
#step-intro .pills { margin-top: clamp(10px, 2.5dvh, 28px); }
#step-intro .hero-visual { height: 100%; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
#step-intro .hero-visual canvas { flex: 0 1 auto; min-height: 0; width: auto; max-width: 100%; height: auto; max-height: calc(100dvh - 175px); object-fit: contain; margin: 0 auto; }
body[data-step="intro"] footer { position: fixed; left: 0; right: 0; bottom: 0; max-width: none; padding: 6px 16px; font-size: .68rem; text-align: center; background: linear-gradient(transparent, var(--bg) 60%); }
body[data-step="intro"] footer p { margin: 0; }
@media (max-width: 900px) {
  #step-intro { height: calc(100dvh - 60px); padding-bottom: 34px; }
  #step-intro .hero { display: flex; flex-direction: column; gap: 4px; }
  #step-intro .hero-visual { order: -1; flex: 1 1 auto; min-height: 0; max-width: none; height: auto; }
  #step-intro .hero-visual canvas { max-height: 100%; }
  #step-intro .hero-text { flex: none; }
  #step-intro .eyebrow { margin-bottom: 8px; font-size: .64rem; }
  #step-intro h1 { font-size: clamp(1.7rem, 4.4dvh, 2.4rem); margin-bottom: 8px; }
  #step-intro .lead { font-size: .88rem; line-height: 1.45; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  #step-intro .cta { margin-top: 12px; flex-wrap: nowrap; }
  #step-intro .cta .btn { flex: 1; padding: 12px 10px; font-size: .9rem; }
  #step-intro .pills { display: none; }
  #step-intro .legend { margin-top: 0; }
}

footer .short { display: none; }
@media (max-width: 900px) {
  body[data-step="intro"] footer .long { display: none; }
  body[data-step="intro"] footer .short { display: block; }
  body[data-step="intro"] footer { padding: 4px 12px 8px; font-size: .62rem; background: var(--bg); }
  #step-intro { padding-bottom: 42px; }
}

/* ---- brand ---- */
.brand { gap: 10px; }
.brand .brand-mark { width: 40px; height: 40px; border-radius: 0; background: none; box-shadow: none; animation: none; filter: drop-shadow(0 3px 10px rgba(192, 77, 255, .5)); transition: transform .5s cubic-bezier(.2, .8, .2, 1.4); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; line-height: 1; }
.wordmark em { font-style: italic; font-weight: 600; margin-left: 1px; background: var(--grad-loop); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
@media (max-width: 900px) { .brand .brand-mark { width: 34px; height: 34px; } .wordmark { font-size: 1.3rem; } }

#step-intro .hero-visual { justify-content: center; gap: 10px; }
#step-intro .legend { margin-top: 0; }

#step-intro .hero-visual { gap: 4px; }
@media (min-width: 901px) {
  #step-intro .btn { padding: clamp(12px, 2.2dvh, 16px) clamp(22px, 2.4vw, 30px); font-size: clamp(.95rem, 2.4dvh, 1.08rem); }
  #step-intro .pills li { font-size: clamp(.8rem, 2dvh, .9rem); }
}

@media (max-width: 900px) { #step-intro .hero-visual canvas { max-height: 44dvh; } }

/* ---- language menu ---- */
.lang-menu { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 .9rem var(--sans); cursor: pointer; backdrop-filter: blur(12px); transition: background .2s, box-shadow .2s, border-color .2s; }
.lang-btn:hover, .lang-menu.open .lang-btn { background: var(--card-2); border-color: color-mix(in srgb, var(--eq) 45%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--eq) 14%, transparent); }
.lang-btn svg { width: 16px; height: 16px; opacity: .8; }
.lang-btn .chev { width: 14px; height: 14px; transition: transform .25s; }
.lang-menu.open .chev { transform: rotate(180deg); }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; margin: 0; padding: 6px; list-style: none; border-radius: 18px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px); box-shadow: var(--shadow); opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20; }
.lang-menu.open .lang-list { opacity: 1; transform: none; pointer-events: auto; }
.lang-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-weight: 500; color: var(--ink); transition: background .15s; }
.lang-list li:hover { background: var(--card-2); }
.lang-list li[aria-selected="true"] { background: var(--grad-soft); }
.lang-list li[aria-selected="true"]::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.lang-list .code { font: 700 .7rem var(--sans); letter-spacing: .06em; padding: 3px 6px; border-radius: 6px; background: var(--grad); color: #fff; }

/* ---- feature pills on one line ---- */
#step-intro .pills { flex-wrap: nowrap; gap: clamp(6px, .8vw, 10px); }
#step-intro .pills li { white-space: nowrap; flex: none; padding: clamp(5px, 1dvh, 7px) clamp(9px, 1vw, 14px); font-size: clamp(.72rem, 1.05vw, .88rem); gap: 6px; }
#step-intro .pills li::before { flex: none; }

/* ---- italic gradient text: give the slanted glyphs room so background-clip does not cut them ---- */
h1 em, .wordmark em, .archetype {
  padding-right: .14em; margin-right: -.1em;
  padding-bottom: .06em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---- continuous video scan ---- */
.rec-start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 28px; border: 0; border-radius: 28px; cursor: pointer; color: #fff; font: 700 1.1rem var(--sans); background: var(--grad-loop); background-size: 200% auto; animation: shimmer 6s linear infinite; box-shadow: 0 18px 50px -12px rgba(192, 77, 255, .8); transition: transform .2s; max-width: 80%; }
.rec-start:hover { transform: translate(-50%, -50%) scale(1.04); }
.rec-start small { font: 500 .78rem var(--sans); opacity: .9; text-align: center; }
.rec-dot { width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(255, 255, 255, .25); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
.rec-start[hidden] { display: none; }
.rec-progress { position: absolute; left: 16px; right: 16px; top: 14px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .25); overflow: hidden; z-index: 4; }
.rec-progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s linear; }
.rec-progress[hidden] { display: none; }
.viewport.recording::after { content: ""; position: absolute; top: 28px; left: 18px; width: 12px; height: 12px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 0 0 rgba(255, 59, 92, .6); animation: rec 1.2s infinite; z-index: 4; }
@keyframes rec { 70% { box-shadow: 0 0 0 10px rgba(255, 59, 92, 0); } }
.scan-arrow { position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) scale(.6); font: 800 clamp(3rem, 10vw, 6rem) var(--sans); color: #fff; text-shadow: 0 0 24px rgba(192, 77, 255, .9); opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; z-index: 3; }
.scan-arrow.show { opacity: .9; transform: translate(-50%, -50%) scale(1); animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { margin-left: 18px; } }
.status.good { color: var(--aq); }

/* photo check before the reading */
.check-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(10, 6, 30, .55); backdrop-filter: blur(6px); }
.check-modal[hidden] { display: none; }
.check-card { width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; border-radius: 24px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.check-card h3 { margin: 0 0 8px; }
.check-wait { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--eq); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.check-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); border-left: 4px solid var(--eq); }
.check-list li.note { border-left-color: var(--muted); }
.check-list img, .check-all { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; display: grid; place-items: center; background: var(--bg-2); color: var(--iq); }
.check-list b { font-size: .9rem; }
.check-list p { margin: 2px 0 0; font-size: .86rem; }
.check-list p.fix { color: var(--aq); }
.check-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@media (max-width: 520px) { .check-list li { grid-template-columns: 48px 1fr; } .check-list li .btn { grid-column: 1 / -1; } .check-list img, .check-all { width: 48px; height: 48px; } }

/* upload mode: drop zone instead of the camera texts */
.dropzone { position: absolute; inset: 14px; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; border: 2px dashed color-mix(in srgb, var(--iq) 55%, transparent); border-radius: calc(var(--radius) - 8px); background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--iq) 14%, transparent), transparent 70%); transition: border-color .2s, background .2s; }
.dropzone[hidden] { display: none; }
.viewport.drag .dropzone { border-color: var(--eq); background: color-mix(in srgb, var(--eq) 14%, transparent); }
.dz-icon { width: 56px; height: 56px; fill: none; stroke: var(--iq); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dropzone h3 { margin: 4px 0 0; font-size: 1.2rem; }
.dropzone p { margin: 0; max-width: 34ch; color: var(--muted); }
.dropzone small { color: var(--muted); }
.dz-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.instruction[hidden] { display: none; }

/* guided scan: animated head cue, per-step timer, result card */
.scan-cue { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); width: clamp(76px, 16%, 110px); aspect-ratio: 1; z-index: 4; border-radius: 50%; background: rgba(20, 12, 50, .62); backdrop-filter: blur(10px); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); pointer-events: none; }
.scan-cue[hidden] { display: none; }
.scan-cue svg { width: 100%; height: 100%; overflow: visible; }
.scan-cue .face, .scan-cue .ear { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; }
.scan-cue .hair { fill: color-mix(in srgb, var(--iq) 70%, #fff); }
.scan-cue .eye { fill: #fff; }
.scan-cue .nose, .scan-cue .mouth { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.scan-cue .mouth.smile { opacity: 0; stroke: var(--eq); }
.scan-cue .head, .scan-cue .feat, .scan-cue .face, .scan-cue .hair, .scan-cue .ear { transform-box: fill-box; transform-origin: center; }
.scan-cue[data-cue="frame"] .head { animation: cue-frame 1.6s ease-in-out infinite; }
.scan-cue[data-cue="smile"] .mouth.smile { opacity: 1; } .scan-cue[data-cue="smile"] .mouth.neutral { opacity: 0; }
.scan-cue[data-cue="smile"] .head { animation: cue-pop 1.2s ease-in-out infinite; }
.scan-cue[data-cue="turn-right"] .feat { animation: cue-turn-r 2.2s ease-in-out infinite; }
.scan-cue[data-cue="turn-left"] .feat { animation: cue-turn-l 2.2s ease-in-out infinite; }
.scan-cue[data-cue="turn-right"] .ear.r, .scan-cue[data-cue="hold-right"] .ear.r { opacity: 0; }
.scan-cue[data-cue="turn-left"] .ear.l, .scan-cue[data-cue="hold-left"] .ear.l { opacity: 0; }
.scan-cue[data-cue="hold-right"] .feat { transform: translateX(13px) scaleX(.55); }
.scan-cue[data-cue="hold-left"] .feat { transform: translateX(-13px) scaleX(.55); }
.scan-cue[data-cue^="hold"] { box-shadow: 0 0 0 3px var(--aq), 0 0 22px var(--aq); }
.scan-cue[data-cue="closer"] .head { animation: cue-closer 1.6s ease-in-out infinite; }
.scan-cue[data-cue="hair"] .hair { animation: cue-hair 1.4s ease-in-out infinite; }
@keyframes cue-frame { 50% { transform: scale(.82); opacity: .7; } }
@keyframes cue-pop { 50% { transform: scale(1.08); } }
@keyframes cue-turn-r { 0%, 15% { transform: none; } 70%, 100% { transform: translateX(13px) scaleX(.55); } }
@keyframes cue-turn-l { 0%, 15% { transform: none; } 70%, 100% { transform: translateX(-13px) scaleX(.55); } }
@keyframes cue-closer { 0% { transform: scale(.7); } 70%, 100% { transform: scale(1.12); } }
@keyframes cue-hair { 50% { transform: translateY(-9px); opacity: .45; } }
.step-bar { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 4px; border-radius: 4px; overflow: hidden; z-index: 4; pointer-events: none; }
.step-bar i { display: block; height: 100%; width: 0; background: var(--aq); }
.viewport:not(.recording) .step-bar { display: none; }
.scan-result { position: absolute; inset: auto 14px 14px; z-index: 6; padding: 16px 18px; border-radius: 20px; background: rgba(20, 12, 50, .86); backdrop-filter: blur(14px); color: #fff; box-shadow: var(--shadow); }
.scan-result[hidden] { display: none; }
.scan-result h3 { margin: 0 0 8px; font-size: 1.05rem; }
.scan-result ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: .86rem; }
.scan-result li.ok { color: var(--aq); }
.scan-result li.miss { color: #ff8fb1; }
.scan-result li small { display: block; color: rgba(255, 255, 255, .7); font-size: .74rem; }
.sr-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* face map v2: cropped to the face, steady hover */
.facemap.cropped svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.facemap.cropped { width: 100%; }
.region { pointer-events: visiblePainted; }
.region:hover { fill: transparent; stroke: rgba(255, 255, 255, .8); stroke-width: 1.4; }
.region.on { fill: color-mix(in srgb, var(--zc) 30%, transparent); stroke: var(--zc); stroke-width: 2.4; }
.pin:hover, .pin.on { transform: translateY(-50%); }
.pin { transition: background .15s, box-shadow .15s, opacity .15s; }

.sound-btn { position: absolute; top: 22px; right: 16px; z-index: 6; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(20, 12, 50, .6); backdrop-filter: blur(8px); display: grid; place-items: center; cursor: pointer; padding: 0; }
.sound-btn svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn.off { opacity: .6; }
.viewport.upload .sound-btn { display: none; }
.check[hidden] { display: none; }

[hidden] { display: none !important; }
.scan-result li.warn { color: #ffd166; }
.sr-check { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .86rem; }
.sr-check .spinner { width: 16px; height: 16px; border-width: 2px; }
.check-notes-h { margin: 14px 0 4px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.check-notes { margin: 0; padding-left: 18px; font-size: .84rem; color: var(--muted); }

/* live camera: no outline (it made people sit far away); during the scan no cue graphics either */
.viewport .guide { display: none; }
.viewport.recording .scan-cue, .viewport.recording .scan-arrow { display: none !important; }

/* three tiers side by side in the capture panel */
#step-capture .cta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#step-capture .cta .btn { white-space: normal; line-height: 1.15; padding: 11px 8px; font-size: .86rem; }
.detail-btn { border-color: color-mix(in srgb, var(--aq) 60%, transparent) !important; }

/* 20 languages: two columns, scroll if the screen is short */
.lang-list { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 2px; min-width: 330px; max-height: min(70vh, 560px); overflow-y: auto; }
.lang-list li { padding: 8px 10px; font-size: .9rem; }
@media (max-width: 420px) { .lang-list { grid-template-columns: 1fr; min-width: 200px; } }

/* prices */
.btn small.price { display: block; font-size: .74rem; font-weight: 600; opacity: .85; margin-top: 2px; }
.locked.teaser { margin-bottom: 0; }
.upsell h3 { margin-bottom: 4px; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.price-card { position: relative; padding: 20px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.price-card.detail { border-color: color-mix(in srgb, var(--aq) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--aq) 30%, transparent), 0 18px 40px -20px color-mix(in srgb, var(--aq) 60%, transparent); }
.price-card h4 { margin: 0; font-size: 1.05rem; }
.price-card .amount { font: 800 2rem/1 var(--sans); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .1em; }
.price-card ul { margin: 0; padding-left: 18px; font-size: .9rem; display: grid; gap: 4px; flex: 1; }
.price-card .btn { width: 100%; }
.price-card .badge { position: absolute; top: -11px; right: 16px; padding: 3px 10px; border-radius: 999px; background: var(--aq); color: #06261d; font: 700 .72rem var(--sans); }
.up-note { margin: 12px 0 0; text-align: center; }
#step-intro .pills { flex-wrap: wrap; row-gap: 6px; } /* long languages: a pill moves to a second row instead of running off */
.pin:hover:not(.on) { background: color-mix(in srgb, var(--zc) 35%, rgba(20, 12, 50, .82)); }

.panel.refine { border: 1px solid color-mix(in srgb, #ffd166 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, #ffd166 10%, var(--card)), var(--card)); }
.refine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }

.panel.upgrade { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: center; border: 1px solid color-mix(in srgb, var(--aq) 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--aq) 12%, var(--card)), var(--card)); }
.panel.upgrade ul { margin: 8px 0 0; padding-left: 18px; font-size: .92rem; display: grid; gap: 4px; }
.upg-buy { text-align: center; display: grid; gap: 8px; justify-items: center; }
.upg-buy .amount { font: 800 2.2rem/1 var(--sans); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .1em; }
.upg-buy p { margin: 0; }
@media (max-width: 700px) { .panel.upgrade { grid-template-columns: 1fr; } }
/* language list: never scroll sideways; slim themed scrollbar only if the screen is short */
.lang-list { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 360px; min-width: 0; overflow-x: hidden; box-sizing: border-box; max-height: min(78vh, 600px); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.lang-list li { min-width: 0; padding: 7px 10px; line-height: 1.2; }
.lang-list::-webkit-scrollbar { width: 6px; height: 0; }
.lang-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
@media (max-width: 420px) { .lang-list { width: min(92vw, 300px); grid-template-columns: 1fr; } }

.offer-card { position: relative; width: min(760px, 100%); }
.offer-card .panel.upsell { margin: 0; border: 0; background: none; box-shadow: none; padding: 0; }
.offer-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font-size: .9rem; }

.inc { border-top: 1px solid var(--line); padding-top: 8px; }
.inc summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--aq); list-style: none; }
.inc summary::-webkit-details-marker { display: none; }
.inc summary::after { content: " ▾"; }
.inc[open] summary::after { content: " ▴"; }
.inc-list { margin: 8px 0 0; padding-left: 18px; font-size: .85rem; display: grid; gap: 3px; color: var(--muted); }
.inc-sub { margin: 8px 0 0; font-size: .85rem; font-weight: 600; }
.offer-card { max-height: calc(100dvh - 32px); overflow-y: auto; }
.offer-close { z-index: 2; }
.price-card ul { align-content: start; }

.link-btn { display: inline-flex; align-items: center; gap: 8px; margin: 8px auto 0; padding: 4px 6px; border: 0; background: none; color: var(--aq); font: 600 .86rem var(--sans); cursor: pointer; width: 100%; justify-content: center; }
.link-btn:hover { text-decoration: underline; }
.link-btn .i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; font: 700 .72rem/1 var(--serif, serif); font-style: italic; }
.offer-card.wide { width: min(1080px, 100%); }
.price-grid.three { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.price-card.free .amount { background: none; color: var(--muted); -webkit-background-clip: initial; background-clip: initial; }
.free-list { color: var(--ink); flex: 1; }
.price-card > ul { flex: none; }
.price-card > .btn { margin-top: auto; }

/* targeted retake card over the live camera */
.fix-card { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 6; padding: 16px 18px; border-radius: 20px; background: rgba(20, 12, 50, .86); backdrop-filter: blur(14px); color: #fff; display: grid; gap: 6px; text-align: center; }
.fix-card small { color: rgba(255, 255, 255, .7); }
.fix-card b { font-size: 1.05rem; }
.fix-card p { margin: 0; }
.fix-card b.count { font: 800 3rem/1 var(--sans); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fix-actions { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }

.save-note { text-align: center; margin-top: 8px; }
.r-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* PDF / print: the report on white pages, nothing interactive */
@media print {
  :root, [data-theme] { --bg: #fff; --bg-2: #fff; --card: #fff; --card-2: #f7f5fb; --ink: #15112b; --muted: #4a4560; --line: #ddd8ea; }
  body { background: #fff !important; color: #15112b; }
  .aurora, header, footer, .step:not(#step-report), .r-actions, .save-note, .upsell, .upgrade, .refine, .fb, .tabs, .check-modal, .offer-modal, .pin, .map-detail .hint { display: none !important; }
  .panel, .feature, .trait, .price-card { break-inside: avoid; box-shadow: none !important; backdrop-filter: none !important; border: 1px solid #ddd8ea !important; background: #fff !important; }
  .archetype, .amount { -webkit-text-fill-color: #15112b; color: #15112b; background: none !important; }
  .r-hero { grid-template-columns: 1fr 1.4fr; }
  .facemap { max-width: 320px; }
  .trait { animation: none !important; opacity: 1 !important; transform: none !important; }
  .bar i { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  @page { margin: 14mm; }
}
.print-only { display: none; }
@media print { .print-only { display: block; } .tab-body { display: none; } .print-only h4 { margin: 12px 0 4px; } }
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  body::before, body::after, .aurora::before, .aurora::after { display: none !important; }
  .step.active, .trait, .feature, .panel { opacity: 1 !important; transform: none !important; }
  body { height: auto !important; overflow: visible !important; }
}

.legal-links { text-align: center; margin: 4px 0 0; }
.legal-links a { color: inherit; opacity: .8; }
.check.withdraw { justify-content: center; text-align: left; margin-top: 10px; font-size: .82rem; }
.check.withdraw a { color: var(--aq); }
.check.shake { animation: shake .4s; color: #ff8fb1; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
body[data-step="intro"] .legal-links { margin: 0; }
.scan-result .sr-upload { display: inline; width: auto; margin: 0 0 0 4px; padding: 0; font-size: .78rem; }

/* ask the specialist */
.ask-drawer { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: min(440px, calc(100vw - 32px)); height: min(640px, calc(100dvh - 32px)); display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.ask-drawer[hidden] { display: none; }
.ask-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ask-head h3 { margin: 0; }
.ask-head p { margin: 2px 0 0; font-size: .82rem; }
.ask-head .offer-close { position: static; flex: none; }
.ask-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--card-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.err { color: #ff8fb1; }
.typing { display: flex; gap: 4px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-q { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 11px; font: 500 .8rem var(--sans); cursor: pointer; text-align: left; }
.chip-q:hover { border-color: var(--aq); }
.ask-form { display: flex; gap: 8px; align-items: flex-end; }
.ask-form textarea { flex: 1; resize: none; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 10px 12px; font: 15px/1.4 var(--sans); }
.ask-form .btn { padding: 11px 16px; }
.ask-left { margin: 0; font-size: .76rem; text-align: center; }
.ask-btn { box-shadow: 0 0 0 2px color-mix(in srgb, var(--aq) 50%, transparent); }
@media print { .ask-drawer { display: none !important; } }
.ask-fab { position: fixed; right: 18px; bottom: 18px; z-index: 55; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 12px; border: 0; border-radius: 999px; background: var(--grad); color: #fff; font: 700 .95rem var(--sans); cursor: pointer; box-shadow: 0 16px 40px -12px rgba(192, 77, 255, .8); }
.ask-fab span { width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: grid; place-items: center; }
.ask-drawer:not([hidden]) ~ .ask-fab, body:has(.ask-drawer:not([hidden])) .ask-fab { display: none; }
@media print { .ask-fab { display: none !important; } }
