@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #050608;
  --bg-soft: #090a0d;
  --surface: #0f1116;
  --surface-2: #151821;
  --text: #edebe6;
  --muted: #8d9099;
  --line: rgba(237,235,230,.14);
  --line-strong: rgba(237,235,230,.3);
  --blue: #0000fe;
  --blue-bright: #526eff;
  --orange: #fa4402;
  --concrete: #3b3a37;
  --red: #ff1e00;
  --violet: #5b18ff;
  --silver: #c7c7c1;
  --lime: #c5ff00;
  --cyan: #00c2ff;
  --display: "Druk Cond Trial", "Druk Condensed", "Arial Narrow", Impact, sans-serif;
  --sans: "Space Grotesk", "General Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: clip; background: var(--bg); }
body { min-width: 320px; min-height: 100vh; min-height: 100dvh; margin: 0; overflow-x: clip; color: var(--text); background: var(--bg); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button, label, summary { -webkit-tap-highlight-color: transparent; }

/* ATMOSPHERE */
.atmosphere { position: fixed; z-index: -2; inset: 0; overflow: hidden; pointer-events: none; background: linear-gradient(145deg,#050608 0%,#08090d 52%,#050608 100%); }
.atmosphere__grid { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(237,235,230,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(237,235,230,.045) 1px,transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom,black 0 65%,transparent 100%); }
.atmosphere__glow { position: absolute; width: 42rem; height: 42rem; border-radius: 50%; filter: blur(85px); opacity: .12; }
.atmosphere__glow--blue { top: -20rem; right: -18rem; background: var(--blue); }
.atmosphere__glow--orange { bottom: -25rem; left: -22rem; background: var(--orange); opacity: .07; }
.atmosphere__noise { position: absolute; inset: 0; opacity: .045; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }
.app-shell { min-height: 100vh; min-height: 100dvh; }

/* HEADER / PROGRESS */
.topbar { position: sticky; z-index: 40; top: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px 14px; min-height: 70px; padding: max(11px,env(safe-area-inset-top)) 16px 11px; border-bottom: 1px solid rgba(255,255,255,.09); background: rgba(5,6,8,.82); backdrop-filter: blur(20px) saturate(135%); }
.brand { display: inline-flex; width: max-content; align-items: center; gap: 9px; }
.brand img { display: block; width: 42px; height: 24px; object-fit: contain; }
.brand span { padding-left: 9px; border-left: 1px solid var(--line-strong); color: #9a9ca5; font-size: .56rem; font-weight: 800; letter-spacing: .16em; }
.progress-meta { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: .56rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.progress-meta strong { min-width: 3ch; color: var(--text); font-size: .8rem; text-align: right; }
.progress-track { position: relative; grid-column: 1/-1; overflow: hidden; height: 3px; background: repeating-linear-gradient(90deg,#242730 0 11px,transparent 11px 14px); }
.progress-track span { display: block; position: relative; width: 0; height: 100%; background: linear-gradient(90deg,var(--blue) 0 82%,var(--cyan)); box-shadow: 0 0 16px rgba(82,110,255,.52); transition: width 560ms var(--ease-out); }
.progress-track span::after { position: absolute; top: -3px; right: 0; width: 2px; height: 9px; background: var(--orange); box-shadow: 0 0 9px rgba(250,68,2,.8); content: ""; }
.progress-signal { position: absolute; right: 16px; bottom: -29px; padding: 7px 9px; border: 1px solid rgba(197,255,0,.35); background: rgba(5,6,8,.94); color: var(--lime); font-size: .56rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; opacity: 0; transform: translateY(-6px); transition: opacity 160ms ease,transform 160ms ease; }
.progress-signal.is-visible { opacity: 1; transform: none; }

#app { position: relative; width: min(100%,900px); margin: 0 auto; padding: 28px 16px max(48px,env(safe-area-inset-bottom)); outline: none; }

/* TYPE */
.screen { position: relative; isolation: isolate; animation: screen-enter 260ms var(--ease-out) both; }
@keyframes screen-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 13px; color: var(--orange); font-size: .62rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { width: 24px; height: 2px; background: currentColor; content: ""; }
h1,h2 { margin: 0; font-family: var(--display); font-weight: 900; letter-spacing: -.045em; line-height: .92; text-wrap: balance; text-transform: uppercase; }
h1 { font-size: clamp(3rem,14vw,6rem); }
h2 { max-width: 760px; font-size: clamp(2.2rem,9.8vw,4.8rem); }
.lead { max-width: 610px; margin: 16px 0 0; color: #a9abb3; font-size: .96rem; line-height: 1.58; }
.accent { color: var(--orange); }

/* WELCOME */
.screen--welcome { display: grid; align-content: center; gap: 22px; min-height: calc(100dvh - 125px); }
.welcome-visual { position: relative; min-height: 170px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(125deg,rgba(0,0,254,.08),transparent 55%); }
.welcome-visual::before { position: absolute; inset: 0; background-image: linear-gradient(90deg,transparent 49.7%,rgba(255,255,255,.08) 50%,transparent 50.3%); content: ""; }
.welcome-visual__code { position: absolute; right: 9px; bottom: 9px; color: rgba(237,235,230,.4); font-size: .52rem; font-weight: 800; letter-spacing: .16em; }
.welcome-object { position: absolute; top: 50%; left: 50%; width: 150px; height: 150px; transform: translate(-50%,-50%); perspective: 500px; animation: welcome-object-in 900ms 120ms var(--ease-out) both; }
@keyframes welcome-object-in { from { opacity: 0; transform: translate(-50%,-44%) scale(.65) rotate(-9deg); filter: blur(8px); } to { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0); filter: blur(0); } }
.welcome-object__core { position: absolute; inset: 22px; border: 1px solid rgba(255,255,255,.2); border-radius: 42% 58% 54% 46% / 55% 42% 58% 45%; background: radial-gradient(circle at 28% 24%,rgba(255,255,255,.33),transparent 19%),linear-gradient(145deg,rgba(255,255,255,.15),rgba(0,194,255,.06) 38%,rgba(91,24,255,.08) 58%,rgba(250,68,2,.08)); box-shadow: inset 16px 18px 30px rgba(255,255,255,.07),inset -20px -24px 45px rgba(0,0,0,.42),0 28px 55px rgba(0,0,0,.48),0 0 70px rgba(82,110,255,.12); backdrop-filter: blur(12px); animation: glass-breathe 7s 1s ease-in-out infinite; }
@keyframes glass-breathe { 0%,100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(4deg) scale(1.035); } }
.welcome-object__ring { position: absolute; inset: 2px; border: 1px solid rgba(199,199,193,.3); border-radius: 50%; transform: rotateX(62deg) rotateZ(-13deg); box-shadow: 0 0 24px rgba(0,194,255,.12); animation: ring-rotate 12s linear infinite; }
@keyframes ring-rotate { to { transform: rotateX(62deg) rotateZ(347deg); } }
.welcome-object__spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; }
.welcome-object__spark--a { top: 18px; right: 27px; background: var(--orange); box-shadow: 0 0 18px rgba(250,68,2,.9); }
.welcome-object__spark--b { bottom: 26px; left: 20px; background: var(--blue-bright); box-shadow: 0 0 18px rgba(82,110,255,.9); }
.welcome-kicker { margin: 0 0 8px; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; opacity: 0; animation: welcome-copy-in 430ms 250ms var(--ease-out) forwards; }
.welcome-title { max-width: 620px; font-size: clamp(3rem,14vw,5.4rem); }
.welcome-title span { display: block; opacity: 0; transform: translateY(18px); animation: welcome-copy-in 520ms var(--ease-out) forwards; }
.welcome-title span:nth-child(1) { animation-delay: 360ms; }
.welcome-title span:nth-child(2) { animation-delay: 500ms; }
.welcome-title span:nth-child(3) { animation-delay: 640ms; }
.welcome-copy .lead { opacity: 0; animation: welcome-copy-in 460ms 780ms var(--ease-out) forwards; }
.welcome-copy .actions { opacity: 0; animation: welcome-copy-in 460ms 900ms var(--ease-out) forwards; }
@keyframes welcome-copy-in { to { opacity: 1; transform: none; } }
.screen--welcome.is-exiting .welcome-object { transition: transform 500ms var(--ease-in-out),opacity 400ms ease; transform: translate(-50%,-50%) scale(.42); opacity: .15; }
.screen--welcome.is-exiting .welcome-copy { transition: transform 500ms var(--ease-in-out),opacity 400ms ease; transform: translateY(-14px); opacity: 0; }
.screen--welcome.is-exiting .welcome-visual { transition: border-color 400ms ease,background 400ms ease; border-color: transparent; background: transparent; }

/* FORM FOUNDATION */
.screen--question { min-height: calc(100dvh - 148px); display: flex; flex-direction: column; justify-content: center; }
.question-heading { padding: 0 0 18px; }
.question-panel { display: grid; gap: 22px; padding-top: 6px; }
.field { display: grid; gap: 9px; }
.field + .field { padding-top: 19px; border-top: 1px solid var(--line); }
.field-label { color: var(--text); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.field-help { color: var(--muted); font-size: .72rem; line-height: 1.5; }
input[type="text"],input[type="tel"],input[type="url"],input[type="date"],textarea { width: 100%; min-height: 58px; border: 1px solid var(--line-strong); border-radius: 3px; outline: 0; background: rgba(255,255,255,.025); color: var(--text); font-size: 1rem; line-height: 1.45; transition: border-color 150ms ease,background 150ms ease,box-shadow 150ms ease; }
input[type="text"],input[type="tel"],input[type="url"],input[type="date"] { padding: 14px 15px; }
textarea { min-height: 132px; padding: 14px 15px; resize: vertical; }
input:focus,textarea:focus { border-color: var(--cyan); background: rgba(0,194,255,.035); box-shadow: 0 0 0 1px rgba(0,194,255,.18); }
input:disabled { opacity: .38; cursor: not-allowed; }
::placeholder { color: #62656f; }
.counter { justify-self: end; margin-top: -4px; color: #666973; font-size: .6rem; font-weight: 700; letter-spacing: .08em; }
.greeting { min-height: 18px; margin-top: -4px; color: var(--lime); font-size: .72rem; font-weight: 750; }

.choices { display: grid; gap: 9px; }
.choices--two { grid-template-columns: 1fr; }
.choice { display: block; position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 58px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,.015); transition: border-color 150ms ease,background 150ms ease,transform 150ms ease,box-shadow 150ms ease; }
.choice span em { color: #62656f; font-size: .58rem; font-style: normal; font-weight: 850; letter-spacing: .1em; }
.choice span b { font-size: .9rem; font-weight: 650; line-height: 1.35; }
.choice span small { color: var(--muted); font-size: .54rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.choice:hover span { border-color: rgba(82,110,255,.46); transform: translateX(2px); }
.choice input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.choice input:checked + span { border-color: rgba(82,110,255,.9); background: linear-gradient(90deg,rgba(0,0,254,.22),rgba(82,110,255,.06)); box-shadow: inset 3px 0 0 var(--orange),0 0 0 1px rgba(82,110,255,.13); transform: translateX(2px); }
.choice input:checked + span em { color: var(--orange); }
.choice.is-disabled { opacity: .38; cursor: not-allowed; }
.choice.is-disabled span { transform: none !important; }

.inline-check { display: inline-flex; align-items: flex-start; gap: 10px; color: #b2b4bb; font-size: .82rem; line-height: 1.45; cursor: pointer; }
.inline-check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue-bright); }
.conditional { display: grid; gap: 16px; margin-top: 17px; padding: 16px 0 0; border-top: 1px dashed rgba(237,235,230,.16); }
.error { margin: 18px 0 0; padding: 12px 13px; border-left: 3px solid var(--red); background: rgba(255,30,0,.06); color: #ffd2cb; font-size: .82rem; line-height: 1.48; }

.actions { display: flex; flex-direction: column; gap: 9px; margin-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 56px; padding: 13px 15px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; font-size: .72rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; transition: transform 150ms ease,background 150ms ease,border-color 150ms ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button--primary { background: var(--blue); color: white; }
.button--primary:hover { background: #1111ff; }
.button--ghost { justify-content: flex-start; border-color: var(--line); background: transparent; color: #a6a8b0; }
.button--ghost:hover { border-color: var(--line-strong); color: var(--text); }
.text-action { border: 0; background: none; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; cursor: pointer; }

/* CHAPTER CUES */
.chapter-cue { position: relative; margin: 0 0 26px; padding: 14px 14px 14px 17px; border-left: 3px solid var(--blue-bright); background: linear-gradient(90deg,rgba(82,110,255,.08),transparent); }
.chapter-cue span { display: block; color: var(--text); font-family: var(--display); font-size: clamp(1.45rem,7vw,2.5rem); font-weight: 900; line-height: .98; letter-spacing: -.02em; text-transform: uppercase; }
.chapter-cue p { margin: 7px 0 0; color: #9fa1aa; font-size: .78rem; line-height: 1.48; }
.chapter-cue--orange { border-color: var(--orange); background: linear-gradient(90deg,rgba(250,68,2,.08),transparent); }
.chapter-cue--cyan { border-color: var(--cyan); background: linear-gradient(90deg,rgba(0,194,255,.07),transparent); }
.chapter-cue--violet { border-color: var(--violet); background: linear-gradient(90deg,rgba(91,24,255,.09),transparent); }
.chapter-cue--lime { border-color: var(--lime); background: linear-gradient(90deg,rgba(197,255,0,.055),transparent); }

/* ROUTE REVEAL */
.screen--route-reveal { display: grid; gap: 22px; align-items: center; min-height: calc(100dvh - 145px); }
.route-reveal__visual { min-height: 220px; display: grid; place-items: center; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: radial-gradient(circle at center,rgba(0,0,254,.12),transparent 58%); }
.route-reveal__copy h2 { margin-top: 22px; font-size: clamp(2.8rem,12vw,5.2rem); }
.route-nodes { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 42px; }
.route-nodes::before { position: absolute; z-index: -1; top: 50%; right: 0; left: 0; height: 1px; background: linear-gradient(90deg,var(--blue-bright),rgba(82,110,255,.1)); content: ""; transform: scaleX(0); transform-origin: left; animation: route-line 680ms 120ms var(--ease-out) forwards; }
@keyframes route-line { to { transform: scaleX(1); } }
.route-nodes span { padding: 8px 10px; border: 1px solid rgba(82,110,255,.45); background: var(--bg); color: var(--text); font-size: .62rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: translateY(8px); animation: route-node 320ms calc(200ms + var(--i)*110ms) var(--ease-out) forwards; }
@keyframes route-node { to { opacity: 1; transform: none; } }
.screen--route-reveal-unsure .route-nodes span { border-color: rgba(91,24,255,.5); }

/* GLOBE / OPTIONAL BRAND ASSETS */
.optional-brand-asset { display: grid; place-items: center; width: 100%; min-height: inherit; }
.optional-brand-asset__image { display: block; width: min(62%,210px); max-height: 210px; object-fit: contain; }
.route-reveal__seal.has-brand-asset .optional-brand-asset__image,
.loading-seal.has-brand-asset .optional-brand-asset__image { animation: seal-rotate 12s linear infinite; }
.final-seal.has-brand-asset .optional-brand-asset__image { animation: seal-settle 720ms var(--ease-out) both; }
@keyframes seal-rotate { to { transform: rotate(1turn); } }
@keyframes seal-settle { from { opacity: 0; transform: scale(1.35) rotate(-12deg); } to { opacity: 1; transform: none; } }
.system-globe { position: relative; width: 188px; height: 188px; display: grid; place-items: center; }
.system-globe__sphere { position: relative; width: 92px; height: 92px; overflow: hidden; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: radial-gradient(circle at 30% 25%,rgba(255,255,255,.36),transparent 18%),linear-gradient(145deg,rgba(255,255,255,.16),rgba(0,0,254,.18) 48%,rgba(255,255,255,.03)); box-shadow: inset 10px 12px 22px rgba(255,255,255,.06),inset -16px -16px 26px rgba(0,0,0,.35),0 24px 48px rgba(0,0,0,.42),0 0 48px rgba(82,110,255,.16); animation: globe-float 5.6s ease-in-out infinite; }
.system-globe__sphere::before,.system-globe__sphere::after,.system-globe__sphere i { position: absolute; inset: 8px 28px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; content: ""; }
.system-globe__sphere::after { inset: 28px 8px; }
.system-globe__sphere i:nth-child(1) { inset: 8px 38px; }
.system-globe__sphere i:nth-child(2) { inset: 38px 8px; }
.system-globe__sphere i:nth-child(3) { display: none; }
.system-globe__type { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: orbit-type 14s linear infinite; }
.system-globe__type text { fill: rgba(237,235,230,.58); font-family: var(--sans); font-size: 7px; font-weight: 850; letter-spacing: 2.2px; }
.system-globe--violet .system-globe__sphere { background: radial-gradient(circle at 30% 25%,rgba(255,255,255,.36),transparent 18%),linear-gradient(145deg,rgba(255,255,255,.14),rgba(91,24,255,.25),rgba(255,255,255,.02)); box-shadow: 0 0 50px rgba(91,24,255,.16),inset 10px 12px 22px rgba(255,255,255,.06); }
.system-globe--orange .system-globe__sphere { background: radial-gradient(circle at 30% 25%,rgba(255,255,255,.36),transparent 18%),linear-gradient(145deg,rgba(255,255,255,.15),rgba(250,68,2,.23),rgba(255,255,255,.02)); box-shadow: 0 0 50px rgba(250,68,2,.14),inset 10px 12px 22px rgba(255,255,255,.06); }
@keyframes globe-float { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-7px) rotate(4deg); } }
@keyframes orbit-type { to { transform: rotate(1turn); } }

/* RANGE */
.field--range { padding-block: 6px 2px; }
.range-labels { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; color: var(--muted); font-size: .56rem; font-weight: 760; text-transform: uppercase; letter-spacing: .07em; }
.range-labels span:last-child { text-align: right; }
.range-labels strong { color: var(--cyan); font-size: .6rem; }
.range { width: 100%; height: 26px; margin: 4px 0 0; accent-color: var(--orange); cursor: pointer; }
.range-value { justify-self: end; color: var(--muted); font-size: .6rem; font-weight: 800; }
.range-value span { color: var(--orange); }

/* NOTES / MATERIALS */
.info-note { display: grid; gap: 4px; padding: 12px 13px; border-left: 3px solid var(--cyan); background: rgba(0,194,255,.055); color: #b9eefe; }
.info-note strong { font-size: .76rem; }
.info-note span { font-size: .74rem; line-height: 1.45; }
.material-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 6px; }
.material-suggestions__label { width: 100%; color: var(--cyan); font-size: .58rem; font-weight: 900; letter-spacing: .12em; }
.material-suggestions i { padding: 7px 8px; border: 1px solid rgba(0,194,255,.18); color: #aeb0b8; font-size: .65rem; font-style: normal; }
.why { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 13px; color: #989aa3; }
.why summary { width: fit-content; color: var(--cyan); font-size: .7rem; font-weight: 800; cursor: pointer; }
.why p { max-width: 560px; margin: 9px 0 0; font-size: .78rem; line-height: 1.5; }

/* RECOMMENDATION + CREATURE */
.screen--recommendation { display: grid; align-items: center; gap: 26px; min-height: calc(100dvh - 145px); }
.recommendation-surprise { position: relative; min-height: 235px; display: grid; place-items: center; overflow: hidden; border-top: 1px solid rgba(91,24,255,.28); border-bottom: 1px solid var(--line); background: radial-gradient(circle at center,rgba(91,24,255,.12),transparent 60%); }
.recommendation-surprise > span { position: absolute; right: 12px; bottom: 9px; color: rgba(237,235,230,.42); font-family: var(--display); font-size: 1.3rem; letter-spacing: .03em; }
.curious-creature { position: relative; width: 145px; height: 150px; animation: creature-arrive 760ms var(--ease-out) both; }
@keyframes creature-arrive { from { opacity: 0; transform: translateY(45px) scale(.72) rotate(8deg); } to { opacity: 1; transform: none; } }
.curious-creature__body { position: absolute; inset: 12px 9px 20px; border: 1px solid rgba(255,255,255,.22); border-radius: 48% 52% 44% 56% / 45% 42% 58% 55%; background: radial-gradient(circle at 30% 20%,rgba(255,255,255,.4),transparent 16%),linear-gradient(145deg,rgba(255,255,255,.19),rgba(91,24,255,.18) 45%,rgba(0,194,255,.09)); box-shadow: inset 16px 16px 28px rgba(255,255,255,.08),inset -20px -22px 35px rgba(0,0,0,.34),0 30px 50px rgba(0,0,0,.4),0 0 44px rgba(91,24,255,.17); backdrop-filter: blur(13px); animation: creature-bob 3.5s 1s ease-in-out infinite; }
@keyframes creature-bob { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
.eye { position: absolute; top: 48px; width: 14px; height: 20px; border-radius: 50%; background: #050608; box-shadow: inset 3px 3px 0 rgba(255,255,255,.15); }
.eye::after { position: absolute; top: 4px; left: 4px; width: 4px; height: 5px; border-radius: 50%; background: white; content: ""; animation: eye-look 4s 1.4s ease-in-out infinite; }
.eye--a { left: 42px; }
.eye--b { right: 42px; }
@keyframes eye-look { 0%,35%,100% { transform: translateX(0); } 50%,70% { transform: translateX(3px); } }
.shine { position: absolute; top: 22px; right: 25px; width: 20px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); transform: rotate(28deg); filter: blur(2px); }
.curious-creature__shadow { position: absolute; right: 22px; bottom: 5px; left: 22px; height: 17px; border-radius: 50%; background: rgba(0,0,0,.5); filter: blur(7px); }
.recommendation-directions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 23px; }
.recommendation-directions strong { padding: 10px 12px; border: 1px solid rgba(91,24,255,.5); background: rgba(91,24,255,.1); font-family: var(--display); font-size: 1.55rem; letter-spacing: -.02em; text-transform: uppercase; }
.recommendation-directions i { color: var(--orange); font-style: normal; font-weight: 900; }

/* REVIEW */
.screen--review { min-height: calc(100dvh - 145px); display: flex; flex-direction: column; justify-content: center; }
.summary { margin: 25px 0 0; border-top: 1px solid var(--line-strong); }
.summary-row { display: grid; grid-template-columns: 92px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 15px 0; border-bottom: 1px solid var(--line); }
.summary-row dt { color: var(--muted); font-size: .56rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.summary-row dd { margin: 0; color: var(--text); font-size: .82rem; line-height: 1.48; }
.summary-edit { border: 0; background: none; color: var(--cyan); font-size: .58rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.flag { padding: 6px 8px; border: 1px solid rgba(255,30,0,.26); color: #ff9a89; font-size: .54rem; font-weight: 800; letter-spacing: .07em; }

/* LOADING */
body[data-view="loading"] .topbar { background: rgba(5,6,8,.94); }
.screen--loading { min-height: calc(100dvh - 126px); display: grid; place-items: center; gap: 16px; align-content: center; text-align: center; }
.loading-visual { min-height: 220px; display: grid; place-items: center; }
.loading-copy { width: min(100%,560px); }
.loading-copy .eyebrow { justify-content: center; color: var(--blue-bright); }
.loading-steps { display: grid; gap: 8px; margin-top: 18px; text-align: left; }
.loading-steps span { position: relative; padding: 12px 12px 12px 36px; border-bottom: 1px solid var(--line); color: #636670; font-size: .78rem; font-weight: 730; transition: color 180ms ease,border-color 180ms ease; }
.loading-steps span::before { position: absolute; top: 13px; left: 6px; color: #4e515a; content: "○"; }
.loading-steps span.is-active { color: var(--text); border-color: rgba(82,110,255,.3); }
.loading-steps span.is-active::before { color: var(--blue-bright); content: "+"; }
.loading-steps span.is-done { color: #b8bba8; }
.loading-steps span.is-done::before { color: var(--lime); content: "✓"; }
.loading-micro { margin: 20px 0 0; color: rgba(250,68,2,.72); font-size: .52rem; font-weight: 850; letter-spacing: .17em; }

/* FINAL */
body[data-view="final"] #app { padding-top: 18px; padding-bottom: 20px; }
.screen--final { min-height: calc(100dvh - 112px); display: grid; align-content: center; gap: 16px; }
.final-visual { min-height: 125px; display: grid; place-items: center; border-bottom: 1px solid var(--line); overflow: hidden; }
.final-visual .system-globe { transform: scale(.72); }
.final-copy h1 { max-width: 610px; font-size: clamp(3.1rem,13vw,5.8rem); animation: final-title 720ms 120ms var(--ease-out) both; }
@keyframes final-title { from { opacity: 0; transform: translateY(22px); clip-path: inset(100% 0 0); } to { opacity: 1; transform: none; clip-path: inset(0); } }
.receipt { margin-top: 4px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.receipt-item { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.receipt-item:last-child { border-bottom: 0; }
.receipt-item span { color: var(--muted); font-size: .53rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.receipt-item strong { font-size: .78rem; line-height: 1.35; }
.receipt-item--project strong { color: var(--orange); }
.status-ready { color: var(--lime); }
.final-actions { display: grid; gap: 8px; margin-top: 4px; }
.optional-signature { min-height: 0; height: 0; opacity: .85; }
.optional-signature.has-brand-asset { height: 48px; display: flex; justify-content: flex-end; }
.optional-signature .optional-brand-asset__image { width: 120px; max-height: 48px; object-fit: contain; }

/* NOTICES / TOAST */
.system-notice { position: sticky; z-index: 35; top: 70px; width: min(calc(100% - 24px),760px); margin: 10px auto 0; padding: 10px 12px; border-left: 3px solid var(--cyan); background: rgba(6,10,14,.96); color: #b9eefe; font-size: .72rem; line-height: 1.45; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.system-notice--danger { border-color: var(--red); color: #ffd0c8; }
.toast { position: fixed; z-index: 80; right: 12px; bottom: max(14px,env(safe-area-inset-bottom)); left: 12px; padding: 11px 13px; border: 1px solid var(--line-strong); background: rgba(12,14,18,.96); color: var(--text); font-size: .72rem; font-weight: 750; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 180ms ease,transform 180ms ease; }
.toast.is-visible { opacity: 1; transform: none; }

/* MODAL / RESUME */
.modal[hidden] { display: none; }
.modal { position: fixed; z-index: 100; inset: 0; display: grid; align-items: end; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.modal__card { position: relative; display: grid; grid-template-rows: 210px auto; max-height: 94dvh; overflow: auto; border-top: 1px solid var(--line-strong); background: #090a0e; box-shadow: 0 -35px 80px rgba(0,0,0,.5); }
.modal__art { position: relative; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at center,rgba(0,194,255,.09),transparent 62%); }
.modal__code { position: absolute; right: 11px; bottom: 10px; color: rgba(237,235,230,.38); font-size: .52rem; font-weight: 850; letter-spacing: .15em; }
.resume-orb { position: relative; width: 112px; height: 112px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: linear-gradient(145deg,rgba(255,255,255,.15),rgba(0,194,255,.08),rgba(255,255,255,.02)); box-shadow: inset 12px 12px 20px rgba(255,255,255,.05),0 20px 40px rgba(0,0,0,.35); animation: resume-rest 6s ease-in-out infinite; }
.resume-orb span,.resume-orb i,.resume-orb b { position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; }
.resume-orb span { inset: 12px 40px; }
.resume-orb i { inset: 40px 12px; }
.resume-orb b { inset: -18px; border-color: rgba(82,110,255,.2); transform: rotateX(65deg); }
@keyframes resume-rest { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
.modal__content { padding: 26px 18px max(24px,env(safe-area-inset-bottom)); }
.modal__content h2 { font-size: clamp(2.2rem,9vw,3.5rem); }
.modal__content > p:not(.eyebrow) { color: #9ea0a8; line-height: 1.55; }
.modal__actions { display: grid; gap: 9px; margin-top: 22px; }

/* ERROR PAGE */
.error-page { width: min(100%,1050px); min-height: 100dvh; margin: 0 auto; padding: 24px 16px; display: grid; align-content: center; gap: 26px; }
.error-page__visual { position: relative; min-height: 250px; display: grid; place-items: center; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: radial-gradient(circle at center,rgba(91,24,255,.1),transparent 62%); }
.error-page__visual .curious-creature { transform: translateX(-35px); }
.error-page__number { position: absolute; right: 12px; bottom: -12px; color: rgba(237,235,230,.12); font-family: var(--display); font-size: 7rem; line-height: 1; }
.error-page__copy h1 { font-size: clamp(3rem,12vw,6.4rem); }
.error-page__copy .button { margin-top: 24px; }

/* RESPONSIVE */
@media (min-width: 620px) {
  .topbar { padding-inline: 26px; }
  .brand img { width: 48px; height: 27px; }
  #app { padding: 46px 26px 68px; }
  .choices--two { grid-template-columns: 1fr 1fr; }
  .actions { flex-direction: row-reverse; justify-content: flex-start; }
  .actions .button { min-width: 200px; }
  .actions .button--ghost { margin-right: auto; }
  .screen--welcome { grid-template-columns: minmax(300px,.92fr) minmax(330px,1.08fr); align-items: center; gap: 48px; }
  .welcome-visual { min-height: 450px; order: 2; }
  .welcome-object { width: 245px; height: 245px; }
  .welcome-object__core { inset: 33px; }
  .welcome-copy { order: 1; }
  .welcome-title { font-size: clamp(4.2rem,7.4vw,6.4rem); }
  .screen--route-reveal { grid-template-columns: .82fr 1.18fr; gap: 48px; }
  .route-reveal__visual { min-height: 480px; }
  .system-globe { width: 240px; height: 240px; }
  .system-globe__sphere { width: 116px; height: 116px; }
  .system-globe__sphere::before { inset: 9px 35px; }
  .system-globe__sphere::after { inset: 35px 9px; }
  .system-globe__sphere i:nth-child(1) { inset: 9px 47px; }
  .system-globe__sphere i:nth-child(2) { inset: 47px 9px; }
  .screen--recommendation { grid-template-columns: .82fr 1.18fr; gap: 48px; }
  .recommendation-surprise { min-height: 480px; }
  .curious-creature { width: 190px; height: 200px; }
  .eye { top: 68px; }
  .eye--a { left: 56px; }
  .eye--b { right: 56px; }
  .modal { place-items: center; padding: 24px; }
  .modal__card { grid-template-columns: .85fr 1.15fr; grid-template-rows: none; width: min(100%,820px); min-height: 480px; border: 1px solid var(--line-strong); }
  .modal__content { align-self: center; padding: 40px; }
  .toast { right: 24px; left: auto; width: auto; min-width: 280px; }
  .error-page { grid-template-columns: .86fr 1.14fr; align-items: center; gap: 50px; }
  .error-page__visual { min-height: 600px; }
}

@media (min-width: 860px) {
  #app { width: min(100%,1040px); }
  .screen--question { padding-left: 58px; }
  .screen--question::before { position: absolute; top: 2px; bottom: 2px; left: 0; width: 1px; background: linear-gradient(var(--blue-bright),transparent 48%); content: ""; opacity: .55; }
  .screen--final { grid-template-columns: minmax(0,1.08fr) minmax(350px,.92fr); grid-template-areas: "copy visual" "receipt visual" "actions visual"; column-gap: 58px; }
  .final-copy { grid-area: copy; align-self: end; }
  .final-visual { grid-area: visual; min-height: 100%; border: 0; border-left: 1px solid var(--line); }
  .final-visual .system-globe { transform: scale(.96); }
  .receipt { grid-area: receipt; }
  .final-actions { grid-area: actions; }
  .optional-signature { position: absolute; right: 18px; bottom: 18px; }
  .screen--final { min-height: calc(100dvh - 150px); }
}

@media (max-width: 370px) {
  h1 { font-size: 2.85rem; }
  h2 { font-size: 2.05rem; }
  .welcome-title { font-size: 2.95rem; }
  .welcome-visual { min-height: 150px; }
  .welcome-object { width: 132px; height: 132px; }
  .choice span { padding-inline: 10px; grid-template-columns: 31px minmax(0,1fr) auto; }
  .summary-row { grid-template-columns: 78px minmax(0,1fr) auto; }
  .receipt-item { grid-template-columns: 84px minmax(0,1fr); }
  .final-copy h1 { font-size: 2.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =========================================================
   MAUTHEUX VFINAL · EXPERIENCE REFINEMENT
   Editorial impact without sacrificing readability.
   ========================================================= */
:root {
  --display: "Space Grotesk", "General Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --condensed: "Druk Cond Trial", "Druk Condensed", "Arial Narrow", Impact, sans-serif;
}

/* TYPE SYSTEM */
h1,h2 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .98;
  text-transform: none;
  text-wrap: balance;
}
h1 { font-size: clamp(2.85rem, 11vw, 5.7rem); }
h2 { font-size: clamp(2.15rem, 8.8vw, 4.45rem); }
.eyebrow,
.field-label,
.brand span,
.progress-meta,
.material-suggestions__label,
.receipt-item span,
.summary-row dt,
.loading-micro,
.modal__code,
.welcome-visual__code {
  font-family: var(--condensed);
}
.chapter-cue span,
.recommendation-directions strong,
.error-page__number {
  font-family: var(--display);
  letter-spacing: -.035em;
}
.chapter-cue span { line-height: 1.04; }
.question-heading { max-width: 790px; }
.question-heading h2 { max-width: 760px; }
.lead { font-size: clamp(.92rem, 2.4vw, 1rem); line-height: 1.62; }

/* HEADER */
.topbar { min-height: 72px; }
.brand img { width: 46px; height: 26px; }
.progress-track { height: 3px; }

/* CTA SYSTEM */
.button { border-radius: 2px; font-family: var(--sans); }
.button--accent { background: var(--orange); color: #fff; }
.button--accent:hover { background: #ff5718; }
.button--accent:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* OPENING · CALM BOOT -> TOOL */
.screen--welcome {
  min-height: calc(100dvh - 122px);
  align-content: center;
  gap: clamp(22px, 5vw, 44px);
}
.welcome-visual {
  min-height: 180px;
  background:
    radial-gradient(circle at 50% 50%, rgba(82,110,255,.12), transparent 48%),
    linear-gradient(125deg,rgba(0,0,254,.055),transparent 60%);
}
.welcome-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,transparent 10%,rgba(255,255,255,.025) 52%,transparent 90%);
  content: "";
  opacity: 0;
  animation: boot-scan 1.15s 120ms var(--ease-out) forwards;
}
@keyframes boot-scan {
  from { opacity: 0; transform: translateY(-35%); }
  40% { opacity: .65; }
  to { opacity: 0; transform: translateY(35%); }
}
.boot-system {
  position: absolute;
  top: 50%; left: 50%;
  width: 150px; height: 150px;
  transform: translate(-50%,-50%);
  opacity: 0;
  animation: boot-arrive 820ms 110ms var(--ease-out) forwards;
}
@keyframes boot-arrive {
  from { opacity: 0; transform: translate(-50%,-46%) scale(.68); filter: blur(8px); }
  to { opacity: 1; transform: translate(-50%,-50%) scale(1); filter: blur(0); }
}
.boot-system__glass {
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 44% 56% 51% 49% / 48% 42% 58% 52%;
  background:
    radial-gradient(circle at 28% 22%,rgba(255,255,255,.4),transparent 17%),
    linear-gradient(145deg,rgba(255,255,255,.13),rgba(0,194,255,.08) 37%,rgba(0,0,254,.14) 63%,rgba(250,68,2,.055));
  box-shadow:
    inset 12px 14px 24px rgba(255,255,255,.06),
    inset -18px -18px 30px rgba(0,0,0,.42),
    0 20px 45px rgba(0,0,0,.48),
    0 0 60px rgba(82,110,255,.17);
  backdrop-filter: blur(14px);
  animation: boot-glass 6.8s 1s ease-in-out infinite;
}
.boot-system__glass i,
.boot-system__glass b {
  position: absolute;
  inset: 16px 28px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
}
.boot-system__glass b { inset: 28px 16px; }
@keyframes boot-glass {
  0%,100% { transform: rotate(-4deg) scale(1); }
  50% { transform: rotate(4deg) scale(1.035); }
}
.boot-system__halo {
  position: absolute;
  border: 1px solid rgba(199,199,193,.28);
  border-radius: 50%;
}
.boot-system__halo--outer {
  inset: 4px;
  transform: rotateX(66deg) rotateZ(-12deg);
  animation: boot-orbit 11s linear infinite;
}
.boot-system__halo--inner {
  inset: 20px -6px;
  border-color: rgba(82,110,255,.23);
  transform: rotateX(72deg) rotateZ(42deg);
  animation: boot-orbit-alt 8s linear infinite reverse;
}
@keyframes boot-orbit { to { transform: rotateX(66deg) rotateZ(348deg); } }
@keyframes boot-orbit-alt { to { transform: rotateX(72deg) rotateZ(402deg); } }
.boot-system__spark { position:absolute; width:7px; height:7px; border-radius:50%; }
.boot-system__spark--orange { top:18px; right:27px; background:var(--orange); box-shadow:0 0 18px rgba(250,68,2,.9); }
.boot-system__spark--blue { bottom:25px; left:24px; background:var(--blue-bright); box-shadow:0 0 18px rgba(82,110,255,.9); }
.welcome-kicker {
  font-family: var(--condensed);
  color: #a3a5ad;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: translateY(10px);
}
.welcome-title {
  max-width: 630px;
  font-size: clamp(2.75rem, 10.8vw, 5.25rem);
  line-height: .96;
  text-transform: none;
}
.welcome-title span { transform: translateY(14px); }
.welcome-copy .actions { margin-top: 24px; }
.screen--welcome.is-exiting .boot-system {
  transition: transform 520ms var(--ease-in-out),opacity 380ms ease,filter 380ms ease;
  transform: translate(-50%,-50%) scale(.42);
  opacity: .08;
  filter: blur(7px);
}

/* QUESTIONS · STABLE, LOCAL FEEDBACK ONLY */
.screen--question { min-height: calc(100dvh - 142px); }
.choice:hover span { transform: none; }
.choice input:checked + span { transform: none; }
.choice span { transition: border-color 150ms ease,background 150ms ease,box-shadow 150ms ease; }
.choice input:checked + span {
  border-color: rgba(82,110,255,.92);
  background: linear-gradient(90deg,rgba(0,0,254,.20),rgba(82,110,255,.045));
  box-shadow: inset 3px 0 0 var(--orange),0 0 0 1px rgba(82,110,255,.12);
}
.choice:active span { box-shadow: inset 3px 0 0 var(--orange),0 0 0 1px rgba(82,110,255,.18); }

/* CHAPTER / TRANSITION COPY */
.chapter-cue {
  padding: 15px 16px 15px 18px;
  border-left-width: 2px;
}
.chapter-cue span { font-size: clamp(1.3rem,5.8vw,2.15rem); font-weight: 700; }

/* ROUTE REVEAL */
.screen--route-reveal { gap: 24px; }
.route-reveal__visual { min-height: 220px; }
.route-reveal__copy h2 {
  max-width: 720px;
  margin-top: 20px;
  font-size: clamp(2.35rem, 9.5vw, 4.9rem);
  line-height: .98;
}
.route-nodes span { border-radius: 2px; }
.route-reveal__copy .button--accent { min-width: 190px; }

/* CHARACTER SYSTEM */
.character-asset {
  display:block;
  max-width:100%;
  height:auto;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.45));
  user-select:none;
  pointer-events:none;
}
.character-stage {
  position:relative;
  display:grid;
  place-items:center;
  width:100%;
  min-height:inherit;
  overflow:hidden;
}
.character-stage__glow {
  position:absolute;
  width:190px; height:190px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(91,24,255,.17),rgba(0,194,255,.05) 45%,transparent 70%);
  filter:blur(4px);
}
.recommendation-surprise {
  min-height: 250px;
  background:
    radial-gradient(circle at 50% 45%,rgba(91,24,255,.11),transparent 56%),
    linear-gradient(180deg,rgba(255,255,255,.015),transparent);
}
.recommendation-character {
  position:relative;
  z-index:2;
  width:min(45%,175px);
  animation: character-think-in 720ms var(--ease-out) both, character-idle 5s 1s ease-in-out infinite;
}
@keyframes character-think-in {
  from { opacity:0; transform:translate(26px,34px) rotate(4deg) scale(.82); }
  to { opacity:1; transform:none; }
}
@keyframes character-idle {
  0%,100% { transform:translateY(0) rotate(-1deg); }
  50% { transform:translateY(-5px) rotate(1deg); }
}
.recommendation-directions strong {
  font-size:1rem;
  font-weight:700;
  letter-spacing:-.02em;
}

.character-moment {
  position:fixed;
  z-index:75;
  pointer-events:none;
  opacity:0;
  transition:opacity 260ms ease,transform 420ms var(--ease-out);
}
.character-moment img { width:100%; }
.character-moment--peek {
  top:46%;
  right:-78px;
  width:145px;
  transform:translateX(42px) rotate(-4deg);
}
.character-moment--peek.is-visible { opacity:1; transform:translateX(0) rotate(-4deg); }
.character-moment--approve {
  right:-14px;
  bottom:max(80px,calc(env(safe-area-inset-bottom) + 70px));
  width:142px;
  transform:translate(34px,18px) rotate(3deg) scale(.9);
}
.character-moment--approve.is-visible { opacity:1; transform:translate(0,0) rotate(0) scale(1); }

/* REVIEW */
.screen--review h2 { max-width:620px; }
.screen--review .eyebrow { color:var(--cyan); }
.summary { margin-top:26px; }
.summary-row dd { font-size:.86rem; }

/* LOADING · KEEP AS SIGNATURE PEAK */
.loading-visual { min-height:215px; }
.loading-seal.has-brand-asset .optional-brand-asset__image { animation-duration:10s; }
.loading-copy .eyebrow { color:var(--blue-bright); }

/* FINAL · SEAL FIRST, CHARACTER SECOND */
.screen--final { position:relative; }
.final-visual {
  position:relative;
  min-height:160px;
  overflow:visible;
}
.final-seal-stage { display:grid; place-items:center; width:100%; min-height:150px; }
.final-character {
  position:absolute;
  z-index:3;
  right:2px;
  bottom:-4px;
  width:104px;
  opacity:0;
  transform:translate(26px,22px) rotate(4deg) scale(.85);
  animation:final-character-in 620ms 900ms var(--ease-out) forwards;
}
@keyframes final-character-in {
  to { opacity:1; transform:translate(0,0) rotate(0) scale(1); }
}
.final-copy h1 {
  font-size:clamp(2.85rem,10.5vw,5.45rem);
  line-height:.93;
  text-transform:uppercase;
}
.final-actions .button--accent { box-shadow:0 0 0 1px rgba(250,68,2,.16),0 10px 30px rgba(250,68,2,.10); }

/* 404 CHARACTER */
.error-character-stage {
  position:relative;
  display:grid;
  place-items:center;
  width:100%;
  min-height:inherit;
}
.error-character {
  position:relative;
  z-index:2;
  width:min(50%,205px);
  filter:drop-shadow(0 24px 35px rgba(0,0,0,.5));
  animation:error-character-in 650ms var(--ease-out) both, error-shrug 3.8s 1s ease-in-out infinite;
}
.error-character-stage__mark {
  position:absolute;
  top:18%;
  right:18%;
  color:var(--cyan);
  font-family:var(--display);
  font-size:2.2rem;
  font-weight:700;
  transform:rotate(8deg);
  animation:error-mark 2.6s ease-in-out infinite;
}
@keyframes error-character-in { from { opacity:0; transform:translateY(32px) scale(.82) rotate(5deg); } to { opacity:1; transform:none; } }
@keyframes error-shrug { 0%,100%{transform:translateY(0) rotate(-1deg)} 50%{transform:translateY(-4px) rotate(1deg)} }
@keyframes error-mark { 0%,100%{opacity:.45;transform:translateY(0) rotate(8deg)} 50%{opacity:1;transform:translateY(-6px) rotate(-3deg)} }
.error-page__copy h1 { line-height:.92; }

/* DESKTOP */
@media (min-width:620px) {
  .screen--welcome { grid-template-columns:minmax(300px,.95fr) minmax(340px,1.05fr); }
  .welcome-visual { min-height:440px; }
  .boot-system { width:250px; height:250px; }
  .boot-system__glass { inset:55px; }
  .welcome-title { font-size:clamp(4rem,6.4vw,5.75rem); }
  .recommendation-character { width:min(48%,230px); }
  .character-moment--peek { width:190px; right:-86px; }
  .character-moment--approve { width:180px; right:18px; bottom:42px; }
  .final-character { width:160px; right:10px; bottom:2px; }
}
@media (min-width:860px) {
  .final-visual { overflow:hidden; }
  .final-character { width:205px; right:22px; bottom:22px; }
  .final-seal-stage { min-height:100%; }
  .route-reveal__copy h2 { font-size:clamp(3rem,5vw,5.1rem); }
}

/* MOBILE FIRST TUNING */
@media (max-width:430px) {
  #app { padding-top:24px; }
  .topbar { min-height:70px; }
  .brand img { width:43px; height:24px; }
  h1 { font-size:clamp(2.7rem,11vw,3.45rem); }
  h2 { font-size:clamp(2.05rem,8.8vw,2.85rem); }
  .welcome-visual { min-height:165px; }
  .boot-system { width:142px; height:142px; }
  .welcome-title { font-size:clamp(2.65rem,11vw,3.55rem); }
  .welcome-copy .lead { margin-top:18px; }
  .screen--question { justify-content:flex-start; padding-top:12px; }
  .question-heading { padding-bottom:16px; }
  .choice span { min-height:60px; }
  .route-reveal__copy h2 { font-size:clamp(2.3rem,9.2vw,3.1rem); }
  .final-copy h1 { font-size:clamp(2.75rem,10.6vw,3.65rem); }
  .final-character { width:98px; }
  .recommendation-character { width:min(45%,160px); }
}
@media (max-width:370px) {
  h1 { font-size:2.55rem; }
  h2 { font-size:1.98rem; }
  .welcome-title { font-size:2.58rem; }
  .route-reveal__copy h2 { font-size:2.22rem; }
  .final-copy h1 { font-size:2.55rem; }
  .character-moment--peek { width:126px; right:-68px; }
  .character-moment--approve { width:125px; }
}

@media (prefers-reduced-motion: reduce) {
  .character-moment { display:none !important; }
  .recommendation-character,
  .final-character,
  .error-character,
  .boot-system { opacity:1 !important; transform:none !important; animation:none !important; }
}

/* BRANDING ATMOSPHERE CARDS */
.mood-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.mood-choice span {
  display:grid;
  grid-template-columns:1fr;
  align-content:end;
  min-height:118px;
  padding:10px;
  overflow:hidden;
  background:#0a0b0f;
}
.mood-choice span b { position:relative; z-index:2; margin-top:34px; font-size:.78rem; }
.mood-choice span small { position:relative; z-index:2; margin-top:3px; font-size:.5rem; }
.mood-choice .mood-swatch {
  position:absolute;
  inset:0 0 auto;
  height:72px;
  border-bottom:1px solid var(--line);
  background:#111;
  opacity:.92;
}
.mood-choice[data-mood="editorial"] .mood-swatch {
  background:linear-gradient(135deg,#e9e6de 0 31%,#090a0d 31% 48%,var(--orange) 48% 63%,#1b1d22 63%);
}
.mood-choice[data-mood="urban"] .mood-swatch {
  background:
    linear-gradient(20deg,transparent 0 46%,rgba(255,255,255,.13) 46% 48%,transparent 48%),
    repeating-linear-gradient(90deg,#0a0b0f 0 11px,#202229 11px 12px),
    linear-gradient(135deg,var(--blue),#0a0b0f 66%);
}
.mood-choice[data-mood="refined"] .mood-swatch {
  background:radial-gradient(circle at 65% 30%,rgba(255,255,255,.36),transparent 13%),linear-gradient(145deg,#1e2025,#090a0d 50%,#5c4721);
}
.mood-choice[data-mood="organic"] .mood-swatch {
  background:radial-gradient(ellipse at 30% 30%,var(--orange) 0 18%,transparent 19%),radial-gradient(ellipse at 70% 65%,#e8e3d8 0 24%,transparent 25%),linear-gradient(145deg,#20221e,#090a0d);
}
.mood-choice[data-mood="expressive"] .mood-swatch {
  background:conic-gradient(from 25deg at 40% 50%,var(--orange),var(--blue),#12141b,var(--orange));
}
.mood-choice[data-mood="technical"] .mood-swatch {
  background-image:linear-gradient(rgba(0,194,255,.13) 1px,transparent 1px),linear-gradient(90deg,rgba(0,194,255,.13) 1px,transparent 1px),linear-gradient(145deg,#0a0d12,#111820);
  background-size:16px 16px,16px 16px,auto;
}
.mood-choice input:checked + span .mood-swatch { filter:saturate(1.2) brightness(1.08); }
@media (min-width:620px) { .mood-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* =========================================================
   MAUTHEUX VFINAL · CHARACTER INTEGRATION PASS
   More presence, better harmony, smaller seal, clearer type.
   ========================================================= */
:root {
  --display: "Space Grotesk", "General Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --condensed: "Space Grotesk", "General Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
}

h1, h2 {
  letter-spacing: -.038em;
  line-height: 1;
}
.question-heading h2,
.final-copy h1,
.route-reveal__copy h2,
.loading-copy h2,
.error-page__copy h1 {
  text-wrap: balance;
}

/* route reveal */
.route-reveal__visual { position: relative; overflow: visible; }
.route-reveal__character {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 118px;
  z-index: 4;
}
.route-reveal__character .character-asset {
  width: 100%;
  transform: translateY(4px);
}

/* question scenes */
.scene-card {
  position: relative;
  min-height: 168px;
  margin: 0 0 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.028), transparent 66%),
    radial-gradient(circle at 88% 78%, rgba(255,255,255,.045), transparent 28%);
}
.scene-card::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 46%, rgba(255,255,255,.05) 46.2%, transparent 46.4%);
  opacity: .45;
  content: "";
  pointer-events: none;
}
.scene-card::after {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), rgba(255,255,255,0));
  content: "";
}
.scene-card--blue { background-color: rgba(8, 12, 22, .82); }
.scene-card--orange { background-color: rgba(18, 10, 7, .82); }
.scene-card__copy { position: relative; z-index: 2; max-width: calc(100% - 126px); }
.scene-card__copy span {
  display: inline-block;
  margin-bottom: 8px;
  color: #9ea2ab;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.scene-card__copy strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: clamp(1.34rem, 5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -.03em;
}
.scene-card__copy p {
  margin: 0;
  color: #b5b8c0;
  font-size: .92rem;
  line-height: 1.45;
}
.scene-card__asset-wrap {
  position: absolute;
  right: -12px;
  bottom: -10px;
  width: 132px;
  z-index: 3;
}
.scene-card__asset-wrap .character-asset { width: 100%; }
.scene-card--curious .scene-card__asset-wrap,
.scene-card--observe .scene-card__asset-wrap { right: -4px; bottom: -2px; width: 124px; }
.scene-card--approve .scene-card__asset-wrap { right: -6px; bottom: -8px; width: 142px; }
.scene-card--point .scene-card__asset-wrap { right: -10px; bottom: -10px; width: 136px; }

/* loading */
.screen--loading {
  min-height: calc(100dvh - 122px);
  align-content: center;
  gap: 22px;
}
.loading-composer {
  position: relative;
  min-height: 270px;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 22%, rgba(0,0,254,.14), transparent 26%),
    radial-gradient(circle at 16% 84%, rgba(250,68,2,.10), transparent 25%),
    linear-gradient(145deg, rgba(255,255,255,.02), rgba(255,255,255,.005));
}
.loading-composer__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .18;
}
.loading-cluster {
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  gap: 10px;
  max-width: 56%;
}
.loading-cluster span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(11, 14, 22, .78);
  color: #c8cbd2;
  font-size: .86rem;
  font-weight: 600;
  transition: 260ms var(--ease-out);
}
.loading-cluster span.is-active {
  border-color: rgba(82,110,255,.85);
  box-shadow: inset 3px 0 0 var(--orange), 0 0 0 1px rgba(82,110,255,.1);
  color: #fff;
  transform: translateX(4px);
}
.loading-cluster span.is-done {
  border-color: rgba(250,68,2,.42);
  color: rgba(237,235,230,.7);
}
.loading-character-stage {
  position: absolute;
  right: 8px;
  bottom: 0;
  width: 154px;
}
.loading-character { width: 100%; }
.loading-bubble,
.final-bubble {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(8, 12, 22, .92);
  color: var(--text);
  font-family: var(--display);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.loading-bubble {
  left: -18px;
  top: 18px;
}
.loading-caption {
  position: absolute;
  left: 18px;
  bottom: 16px;
  color: #8d9099;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.loading-copy { max-width: 620px; }
.loading-copy h2 {
  margin-top: 0;
  font-size: clamp(2.2rem, 8.5vw, 4.2rem);
}
.loading-micro { margin-top: 14px; }

/* final */
.screen--final {
  display: grid;
  gap: 18px;
  min-height: calc(100dvh - 122px);
  align-content: center;
}
.final-hero {
  position: relative;
  min-height: 260px;
  border-block: 1px solid var(--line-strong);
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(255,255,255,.02), transparent 45%),
    radial-gradient(circle at 82% 25%, rgba(0,0,254,.12), transparent 26%),
    radial-gradient(circle at 18% 78%, rgba(250,68,2,.10), transparent 24%);
}
.final-hero::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0 74%, rgba(255,255,255,.05) 74.2%, transparent 74.4%);
  content: "";
  opacity: .65;
}
.final-mini-seal {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 110px;
  z-index: 2;
  opacity: .92;
}
.final-mini-seal .system-globe,
.final-mini-seal .optional-brand-asset__image { width: 100%; height: auto; }
.final-character-stage {
  position: absolute;
  right: -8px;
  bottom: -12px;
  width: min(56%, 218px);
  z-index: 3;
}
.final-character-asset { width: 100%; }
.final-bubble {
  left: -26px;
  top: 34px;
  z-index: 4;
}
.final-copy { position: relative; z-index: 3; }
.final-copy h1 {
  max-width: 9ch;
  font-size: clamp(3.15rem, 11vw, 5.55rem);
  line-height: .92;
}
.final-actions { display: grid; gap: 10px; }
.final-actions .button--accent { min-width: 0; }

/* 404 */
.error-character-stage__mark { font-family: var(--display); }

@media (min-width: 620px) {
  .route-reveal__character { width: 176px; right: 8px; bottom: -10px; }
  .scene-card { min-height: 186px; padding: 18px 20px; }
  .scene-card__copy { max-width: calc(100% - 168px); }
  .scene-card__asset-wrap { width: 154px; right: -8px; }
  .loading-composer { min-height: 330px; }
  .loading-cluster { left: 22px; top: 22px; }
  .loading-character-stage { width: 210px; right: 18px; }
  .screen--loading { grid-template-columns: minmax(0, 1fr) minmax(320px, .92fr); align-items: center; }
  .loading-copy h2 { font-size: clamp(2.75rem, 5vw, 4.6rem); }
  .screen--final {
    grid-template-columns: minmax(0, 1.04fr) minmax(330px, .96fr);
    grid-template-areas:
      "hero copy"
      "hero receipt"
      "hero actions";
    column-gap: 36px;
  }
  .final-hero { grid-area: hero; min-height: 560px; }
  .final-copy { grid-area: copy; }
  .receipt { grid-area: receipt; }
  .final-actions { grid-area: actions; }
  .final-mini-seal { width: 124px; left: 18px; top: 18px; }
  .final-character-stage { width: min(64%, 290px); right: 8px; bottom: -8px; }
  .final-bubble { left: -24px; top: 56px; }
}

@media (min-width: 920px) {
  .final-character-stage { width: min(68%, 360px); right: 16px; bottom: -12px; }
  .final-mini-seal { width: 132px; }
}

@media (max-width: 430px) {
  .scene-card { min-height: 156px; }
  .scene-card__copy { max-width: calc(100% - 116px); }
  .scene-card__copy p { font-size: .86rem; }
  .scene-card__asset-wrap { width: 118px; right: -10px; }
  .loading-composer { min-height: 240px; }
  .loading-cluster { max-width: 58%; }
  .loading-character-stage { width: 132px; }
  .final-hero { min-height: 220px; }
  .final-mini-seal { width: 96px; }
  .final-character-stage { width: min(55%, 180px); }
}

/* CHARACTER PASS 2 · visibly integrated */
.welcome-visual { overflow: hidden; }
.welcome-character {
  --parallax-x: 0px;
  --parallax-y: 0px;
  position: absolute;
  z-index: 8;
  right: -18px;
  bottom: -26px;
  width: min(46%, 190px);
  transform: translate(var(--parallax-x), var(--parallax-y)) rotate(-2deg);
  transition: transform 240ms ease-out;
  filter: drop-shadow(0 26px 34px rgba(0,0,0,.55));
  animation: welcome-character-in 760ms 420ms var(--ease-out) both;
}
.welcome-character::before {
  position: absolute;
  z-index: -1;
  right: 3%;
  bottom: 10%;
  width: 78%;
  height: 52%;
  border: 1px solid rgba(82,110,255,.24);
  background: rgba(9,12,19,.42);
  backdrop-filter: blur(12px);
  transform: rotate(7deg);
  content: "";
}
.welcome-character b {
  position: absolute;
  z-index: 3;
  top: 17%;
  left: -18%;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(5,6,8,.9);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.welcome-character__asset { width: 100%; }
@keyframes welcome-character-in {
  from { opacity: 0; transform: translate(42px,28px) rotate(5deg) scale(.86); }
  to { opacity: 1; transform: translate(var(--parallax-x), var(--parallax-y)) rotate(-2deg) scale(1); }
}

.character-moment--dramatic {
  right: -8px;
  bottom: max(88px, calc(env(safe-area-inset-bottom) + 78px));
  width: 164px;
  transform: translate(54px,28px) rotate(7deg) scale(.86);
}
.character-moment--dramatic.is-visible {
  opacity: 1;
  transform: translate(0,0) rotate(-2deg) scale(1);
}
.character-moment__bubble {
  position: absolute;
  left: -16px;
  top: 18px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(5,6,8,.92);
  color: var(--text);
  font-size: .8rem;
  font-weight: 700;
}

.route-reveal__character { width: 138px; right: -16px; bottom: -14px; }
.route-reveal__seal { transform: scale(.86); transform-origin: center; }

@media (min-width: 620px) {
  .welcome-character { width: min(50%, 280px); right: -24px; bottom: -30px; }
  .character-moment--dramatic { width: 214px; right: 18px; }
  .route-reveal__character { width: 205px; right: 4px; bottom: -18px; }
}

@media (max-width: 430px) {
  .welcome-character { width: min(49%, 178px); right: -20px; bottom: -26px; }
  .welcome-character b { left: -12%; top: 14%; }
  .character-moment--dramatic { width: 148px; right: -16px; }
}

/* =========================================================
   MOBILE FIX PASS · 390 FIRST
   Recompose character scenes for mobile instead of shrinking desktop.
   ========================================================= */
@media (max-width: 430px) {
  /* global */
  .screen--welcome,
  .screen--question,
  .screen--route-reveal,
  .screen--recommendation,
  .screen--loading,
  .screen--final { gap: 18px; }

  /* opening */
  .screen--welcome { align-content: start; }
  .welcome-visual {
    min-height: 154px;
    overflow: hidden;
  }
  .boot-system { width: 124px; height: 124px; }
  .boot-system__glass { inset: 26px; }
  .welcome-character {
    right: -10px;
    bottom: -8px;
    width: min(34vw, 132px);
    overflow: hidden;
  }
  .welcome-character::before {
    right: 8%;
    bottom: 8%;
    width: 68%;
    height: 46%;
  }
  .welcome-character b {
    top: 12%;
    left: -8%;
    font-size: .74rem;
  }
  .welcome-copy { gap: 12px; }
  .welcome-title { max-width: 8.5ch; }

  /* question cards */
  .scene-card {
    min-height: 172px;
    padding: 16px;
    overflow: hidden;
  }
  .scene-card__copy {
    max-width: calc(100% - 110px);
  }
  .scene-card__copy strong {
    font-size: clamp(1.28rem, 5.6vw, 1.62rem);
  }
  .scene-card__copy p {
    max-width: 18ch;
    font-size: .84rem;
    line-height: 1.42;
  }
  .scene-card__asset-wrap {
    right: -8px;
    bottom: -6px;
    width: 112px;
    height: 124px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
  }
  .scene-card__asset-wrap .character-asset {
    width: 132px;
    max-width: none;
  }
  .scene-card--curious .scene-card__asset-wrap,
  .scene-card--observe .scene-card__asset-wrap {
    width: 106px;
    height: 118px;
    right: -4px;
    bottom: 0;
  }
  .scene-card--curious .scene-card__asset-wrap .character-asset,
  .scene-card--observe .scene-card__asset-wrap .character-asset {
    width: 118px;
    transform: translate(4px, 8px);
  }
  .scene-card--approve .scene-card__asset-wrap {
    width: 114px;
    height: 126px;
    right: -6px;
    bottom: -4px;
  }
  .scene-card--approve .scene-card__asset-wrap .character-asset {
    width: 132px;
    transform: translate(6px, 6px);
  }
  .scene-card--point .scene-card__asset-wrap {
    width: 114px;
    height: 124px;
    right: -8px;
    bottom: -4px;
  }
  .scene-card--point .scene-card__asset-wrap .character-asset {
    width: 128px;
    transform: translate(8px, 4px);
  }

  /* route reveal */
  .screen--route-reveal { align-content: start; }
  .route-reveal__visual {
    min-height: 172px;
    overflow: hidden;
  }
  .route-reveal__seal {
    transform: scale(.78);
    transform-origin: 32% 40%;
  }
  .route-reveal__character {
    width: 96px;
    right: -10px;
    bottom: -4px;
  }
  .route-reveal__copy h2 { max-width: 8.3ch; }

  /* recommendation / direction possible */
  .screen--recommendation {
    align-content: start;
    gap: 18px;
  }
  .recommendation-surprise {
    min-height: 186px;
    place-items: end;
    padding: 0 10px 0 0;
    overflow: hidden;
  }
  .recommendation-surprise .character-stage {
    align-items: end;
    justify-items: end;
    padding-right: 4px;
  }
  .character-stage__glow {
    width: 150px;
    height: 150px;
  }
  .recommendation-character {
    width: min(36vw, 138px);
    max-width: none;
    transform: translate(0, 8px);
  }
  .recommendation-copy h2 { max-width: 8.4ch; }
  .recommendation-directions strong { font-size: .94rem; }

  /* loading */
  .screen--loading {
    min-height: auto;
    gap: 18px;
  }
  .loading-composer {
    min-height: 214px;
  }
  .loading-cluster {
    left: 14px;
    top: 14px;
    gap: 8px;
    max-width: 56%;
  }
  .loading-cluster span {
    min-height: 34px;
    padding: 7px 10px;
    font-size: .78rem;
  }
  .loading-character-stage {
    right: -4px;
    bottom: -2px;
    width: 106px;
    height: 138px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
  }
  .loading-character {
    width: 126px;
    max-width: none;
    transform: translate(8px, 12px);
  }
  .loading-bubble {
    left: -12px;
    top: 18px;
    min-height: 30px;
    padding: 5px 10px;
    font-size: .78rem;
  }
  .loading-copy h2 {
    max-width: 9ch;
    font-size: clamp(2.15rem, 9vw, 3rem);
  }

  /* final */
  .screen--final {
    align-content: start;
    gap: 16px;
  }
  .final-hero {
    min-height: 194px;
    overflow: hidden;
  }
  .final-mini-seal {
    left: 10px;
    top: 10px;
    width: 82px;
  }
  .final-character-stage {
    right: -4px;
    bottom: -6px;
    width: min(40vw, 146px);
    height: 188px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
  }
  .final-character-asset {
    width: 162px;
    max-width: none;
    transform: translate(6px, 12px);
  }
  .final-bubble {
    left: -18px;
    top: 14px;
    min-height: 30px;
    padding: 5px 10px;
    font-size: .78rem;
  }
  .final-copy h1 {
    max-width: 7.6ch;
    font-size: clamp(2.92rem, 11vw, 4.05rem);
  }

  /* transient moments */
  .character-moment--peek {
    width: 116px;
    right: -72px;
    top: 44%;
  }
  .character-moment--approve {
    width: 108px;
    right: -10px;
    bottom: max(84px, calc(env(safe-area-inset-bottom) + 74px));
  }
  .character-moment--dramatic {
    width: 124px;
    right: -12px;
    bottom: max(88px, calc(env(safe-area-inset-bottom) + 78px));
  }

  /* 404 */
  .error-character { width: min(38vw, 148px); }
  .error-character-stage__mark {
    top: 14%;
    right: 14%;
    font-size: 1.68rem;
  }
}

@media (max-width: 390px) {
  .welcome-visual { min-height: 148px; }
  .welcome-character { width: min(33vw, 126px); right: -10px; bottom: -8px; }
  .scene-card { min-height: 166px; }
  .scene-card__copy { max-width: calc(100% - 102px); }
  .scene-card__copy p { font-size: .82rem; max-width: 17ch; }
  .scene-card__asset-wrap { width: 104px; height: 118px; }
  .scene-card__asset-wrap .character-asset { width: 124px; }
  .route-reveal__visual { min-height: 164px; }
  .route-reveal__seal { transform: scale(.74); }
  .route-reveal__character { width: 90px; right: -10px; bottom: -2px; }
  .recommendation-surprise { min-height: 176px; }
  .recommendation-character { width: min(35vw, 132px); }
  .loading-composer { min-height: 206px; }
  .loading-character-stage { width: 100px; }
  .loading-character { width: 118px; }
  .final-hero { min-height: 186px; }
  .final-mini-seal { width: 76px; }
  .final-character-stage { width: min(39vw, 138px); height: 180px; }
  .final-character-asset { width: 152px; }
}

/* =========================================================
   CHARACTER STAGE V3 · FREE 3D ACTOR
   No boxed cutouts. Character behaves as a floating 3D object.
   ========================================================= */
.character-actor {
  --actor-x: 0px;
  --actor-y: 0px;
  --actor-rx: 0deg;
  --actor-ry: 0deg;
  position: relative;
  width: 100%;
  min-height: 150px;
  margin: 2px 0 8px;
  perspective: 900px;
  pointer-events: none;
  overflow: visible;
}
.character-actor__world {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translate3d(var(--actor-x), var(--actor-y), 0) rotateX(var(--actor-rx)) rotateY(var(--actor-ry));
  transition: transform 180ms ease-out;
  animation: actor-world-breathe 5.6s ease-in-out infinite;
}
@keyframes actor-world-breathe {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}
.character-actor__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82,110,255,.18), rgba(0,194,255,.07) 38%, rgba(250,68,2,.04) 58%, transparent 72%);
  filter: blur(7px);
  transform: translate3d(-50%,-50%,-55px);
}
.character-actor__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 178px;
  height: 72px;
  border: 1px solid rgba(139,156,255,.24);
  border-radius: 50%;
  transform-style: preserve-3d;
}
.character-actor__ring--one {
  transform: translate3d(-50%,-50%,-16px) rotateX(68deg) rotateZ(-8deg);
  animation: actor-ring-one 8.5s linear infinite;
}
.character-actor__ring--two {
  width: 134px;
  height: 134px;
  border-color: rgba(250,68,2,.16);
  transform: translate3d(-50%,-50%,-30px) rotateX(74deg) rotateZ(48deg);
  animation: actor-ring-two 11s linear infinite reverse;
}
@keyframes actor-ring-one { to { transform: translate3d(-50%,-50%,-16px) rotateX(68deg) rotateZ(352deg); } }
@keyframes actor-ring-two { to { transform: translate3d(-50%,-50%,-30px) rotateX(74deg) rotateZ(408deg); } }
.character-actor__spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  z-index: 5;
}
.character-actor__spark--one {
  left: 23%;
  top: 23%;
  background: var(--blue-bright);
  box-shadow: 0 0 16px rgba(82,110,255,.9);
  animation: actor-spark 2.8s ease-in-out infinite;
}
.character-actor__spark--two {
  right: 18%;
  bottom: 22%;
  background: var(--orange);
  box-shadow: 0 0 16px rgba(250,68,2,.9);
  animation: actor-spark 3.2s .6s ease-in-out infinite reverse;
}
@keyframes actor-spark { 50% { opacity:.35; transform: translateY(-8px) scale(.72); } }
.character-actor__body {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 0;
  transform: translate3d(-50%,0,42px);
  transform-style: preserve-3d;
  filter: drop-shadow(0 24px 28px rgba(0,0,0,.58));
}
.character-actor__asset {
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
  object-fit: contain;
  animation: actor-body-idle 4.4s ease-in-out infinite;
}
@keyframes actor-body-idle {
  0%,100% { transform: rotate(-.8deg) translateY(0); }
  50% { transform: rotate(.8deg) translateY(-4px); }
}
.character-actor__shadow {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  width: 110px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.48);
  filter: blur(8px);
  transform: translate3d(-50%, 6px, -20px);
}
.character-actor__micro {
  position: absolute;
  z-index: 9;
  left: 50%;
  top: 22%;
  min-width: 50px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(5,6,8,.86);
  backdrop-filter: blur(12px);
  color: #fff;
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: -.02em;
  transform: translate3d(58px,-10px,68px) rotate(-2deg);
}
.character-actor__label {
  position: absolute;
  z-index: 4;
  left: 14px;
  bottom: 10px;
  color: rgba(237,235,230,.36);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.character-actor--right .character-actor__body { left: 68%; }
.character-actor--right .character-actor__glow,
.character-actor--right .character-actor__ring { left: 68%; }
.character-actor--right .character-actor__shadow { left: 68%; }
.character-actor--right .character-actor__micro { left: 68%; }
.character-actor--center .character-actor__body,
.character-actor--center .character-actor__glow,
.character-actor--center .character-actor__ring,
.character-actor--center .character-actor__shadow,
.character-actor--center .character-actor__micro { left: 50%; }

.character-actor--small { min-height: 132px; }
.character-actor--small .character-actor__body { height: 126px; }
.character-actor--small .character-actor__glow { width: 128px; height: 128px; }
.character-actor--small .character-actor__ring { width: 140px; height: 56px; }
.character-actor--small .character-actor__ring--two { width: 102px; height: 102px; }
.character-actor--medium { min-height: 160px; }
.character-actor--medium .character-actor__body { height: 154px; }
.character-actor--hero { min-height: 218px; }
.character-actor--hero .character-actor__body { height: 204px; }
.character-actor--hero .character-actor__glow { width: 205px; height: 205px; }
.character-actor--route { min-height: 178px; }
.character-actor--route .character-actor__body { height: 166px; }
.character-actor--welcome { min-height: 226px; }
.character-actor--welcome .character-actor__body { height: 212px; }
.character-actor--welcome .character-actor__glow { width: 220px; height: 220px; }
.character-actor--loading { min-height: 250px; }
.character-actor--loading .character-actor__body { height: 226px; }
.character-actor--loading .character-actor__glow { width: 228px; height: 228px; }
.character-actor--final { min-height: 282px; }
.character-actor--final .character-actor__body { height: 270px; }
.character-actor--final .character-actor__glow { width: 270px; height: 270px; }

/* opening */
.welcome-visual {
  min-height: 230px;
  overflow: visible;
  isolation: isolate;
}
.welcome-actor {
  position: absolute;
  inset: auto 0 -8px 0;
  margin: 0;
  z-index: 7;
}
.welcome-actor .character-actor__body { left: 72%; }
.welcome-actor .character-actor__glow,
.welcome-actor .character-actor__ring,
.welcome-actor .character-actor__shadow,
.welcome-actor .character-actor__micro { left: 72%; }
.welcome-actor .character-actor__micro { transform: translate3d(-88px,-6px,68px) rotate(-3deg); }

/* route reveal */
.route-reveal__visual { min-height: 228px; overflow: visible; isolation:isolate; }
.route-reveal__actor { position:absolute; inset:30px 0 auto 0; z-index:5; margin:0; }
.route-reveal__actor .character-actor__body,
.route-reveal__actor .character-actor__glow,
.route-reveal__actor .character-actor__ring,
.route-reveal__actor .character-actor__shadow,
.route-reveal__actor .character-actor__micro { left: 76%; }
.route-reveal__actor .character-actor__micro { transform: translate3d(-90px,-6px,68px) rotate(-2deg); }
.route-reveal__seal { transform: scale(.74) translateX(-10%); transform-origin: center; }

/* recommendation */
.screen--recommendation { grid-template-columns: 1fr; gap: 14px; }
.recommendation-actor { margin: -10px 0 -10px; }
.recommendation-actor .character-actor__body,
.recommendation-actor .character-actor__glow,
.recommendation-actor .character-actor__ring,
.recommendation-actor .character-actor__shadow,
.recommendation-actor .character-actor__micro { left: 70%; }
.recommendation-actor .character-actor__micro { transform: translate3d(-96px,-4px,68px) rotate(-4deg); }

/* loading */
.loading-stage {
  position:relative;
  min-height:286px;
  overflow:visible;
  isolation:isolate;
}
.loading-actor { position:absolute; inset:0; margin:0; }
.loading-fragments { position:absolute; inset:0; z-index:8; pointer-events:none; }
.loading-fragments span {
  position:absolute;
  min-width:74px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(8,10,16,.74);
  backdrop-filter:blur(12px);
  color:#b9bdc7;
  font-size:.66rem;
  font-weight:700;
  letter-spacing:.12em;
  text-align:center;
  transition:420ms var(--ease-out);
  animation: fragment-float 4.8s ease-in-out infinite;
}
.loading-fragments span:nth-child(1) { left:5%; top:20%; }
.loading-fragments span:nth-child(2) { right:4%; top:16%; animation-delay:.5s; }
.loading-fragments span:nth-child(3) { left:7%; bottom:18%; animation-delay:1s; }
.loading-fragments span:nth-child(4) { right:6%; bottom:16%; animation-delay:1.5s; }
.loading-fragments span.is-active { color:#fff; border-color:rgba(82,110,255,.7); box-shadow:0 0 24px rgba(82,110,255,.12); transform:translateZ(20px) scale(1.05); }
.loading-fragments span.is-done { color:rgba(237,235,230,.6); border-color:rgba(250,68,2,.35); opacity:.72; }
@keyframes fragment-float { 50% { transform:translateY(-7px) rotate(.6deg); } }
.loading-caption { position:absolute; left:50%; bottom:4px; z-index:10; transform:translateX(-50%); color:#7f838c; font-size:.58rem; font-weight:700; letter-spacing:.16em; white-space:nowrap; }

/* final */
.final-stage {
  position:relative;
  min-height:310px;
  isolation:isolate;
  overflow:visible;
}
.final-actor { position:absolute; inset:0; margin:0; }
.final-mini-seal {
  position:absolute;
  left:10px;
  top:14px;
  z-index:10;
  width:74px;
  opacity:.9;
  filter:drop-shadow(0 10px 18px rgba(0,0,0,.35));
}
.final-actor .character-actor__micro { transform: translate3d(92px,-6px,68px) rotate(2deg); }
.final-copy { margin-top:-6px; }

/* remove visual remnants from previous boxed passes */
.scene-card,
.recommendation-surprise,
.loading-composer,
.final-hero,
.route-reveal__character,
.welcome-character { display:none !important; }

@media (min-width:620px) {
  .character-actor--small .character-actor__body { height:150px; }
  .character-actor--medium .character-actor__body { height:190px; }
  .character-actor--hero .character-actor__body { height:260px; }
  .character-actor--route .character-actor__body { height:210px; }
  .character-actor--welcome .character-actor__body { height:300px; }
  .character-actor--loading .character-actor__body { height:300px; }
  .character-actor--final .character-actor__body { height:360px; }
  .welcome-visual { min-height:390px; }
  .route-reveal__visual { min-height:330px; }
  .loading-stage { min-height:390px; }
  .final-stage { min-height:430px; }
}

@media (max-width:430px) {
  .character-actor { margin:0 0 4px; }
  .character-actor__micro { font-size:.72rem; padding:5px 9px; }
  .character-actor--small { min-height:126px; }
  .character-actor--small .character-actor__body { height:120px; }
  .character-actor--medium { min-height:146px; }
  .character-actor--medium .character-actor__body { height:142px; }
  .character-actor--hero { min-height:190px; }
  .character-actor--hero .character-actor__body { height:184px; }
  .character-actor--route { min-height:154px; }
  .character-actor--route .character-actor__body { height:148px; }
  .character-actor--welcome { min-height:194px; }
  .character-actor--welcome .character-actor__body { height:188px; }
  .character-actor--loading { min-height:218px; }
  .character-actor--loading .character-actor__body { height:206px; }
  .character-actor--final { min-height:236px; }
  .character-actor--final .character-actor__body { height:228px; }
  .character-actor__ring { width:146px; height:58px; }
  .character-actor__ring--two { width:112px; height:112px; }
  .character-actor__glow { width:154px; height:154px; }
  .welcome-visual { min-height:205px; overflow:visible; }
  .welcome-actor .character-actor__body,
  .welcome-actor .character-actor__glow,
  .welcome-actor .character-actor__ring,
  .welcome-actor .character-actor__shadow,
  .welcome-actor .character-actor__micro { left:70%; }
  .route-reveal__visual { min-height:190px; overflow:visible; }
  .route-reveal__actor { inset:16px 0 auto 0; }
  .route-reveal__actor .character-actor__body,
  .route-reveal__actor .character-actor__glow,
  .route-reveal__actor .character-actor__ring,
  .route-reveal__actor .character-actor__shadow,
  .route-reveal__actor .character-actor__micro { left:74%; }
  .route-reveal__seal { transform:scale(.64) translateX(-18%); }
  .recommendation-actor { min-height:188px; margin:-2px 0 -12px; }
  .recommendation-actor .character-actor__body,
  .recommendation-actor .character-actor__glow,
  .recommendation-actor .character-actor__ring,
  .recommendation-actor .character-actor__shadow,
  .recommendation-actor .character-actor__micro { left:68%; }
  .loading-stage { min-height:250px; }
  .loading-fragments span { min-width:66px; padding:7px 8px; font-size:.58rem; }
  .loading-fragments span:nth-child(1) { left:2%; top:18%; }
  .loading-fragments span:nth-child(2) { right:1%; top:15%; }
  .loading-fragments span:nth-child(3) { left:2%; bottom:20%; }
  .loading-fragments span:nth-child(4) { right:2%; bottom:18%; }
  .final-stage { min-height:250px; }
  .final-mini-seal { width:62px; left:4px; top:8px; }
  .final-actor .character-actor__micro { transform:translate3d(70px,-4px,68px) rotate(2deg); }
  .final-copy h1 { max-width:8ch; }
}

@media (prefers-reduced-motion: reduce) {
  .character-actor__world,
  .character-actor__ring,
  .character-actor__asset,
  .character-actor__spark,
  .loading-fragments span { animation:none !important; }
}

/* =========================================================
   CHARACTER POLISH V4 · SAFE FRAME + INTEGRATED SCENES
   Approved route reveal, recommendation, loading and final are untouched.
   ========================================================= */
.actor-safe {
  min-height: 184px;
  margin: 2px 0 12px;
  isolation: isolate;
  overflow: visible;
  background:
    radial-gradient(circle at 72% 48%, rgba(82,110,255,.095), transparent 34%),
    linear-gradient(90deg, transparent, rgba(255,255,255,.018) 48%, transparent);
}
.actor-safe::before,
.actor-safe::after {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237,235,230,.16) 14%, rgba(237,235,230,.06) 74%, transparent);
  content: "";
  z-index: 1;
}
.actor-safe::before { top: 0; }
.actor-safe::after { bottom: 0; }
.actor-safe .character-actor__world { overflow: visible; }
.actor-safe .character-actor__body {
  top: 12px;
  bottom: 12px;
  height: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.actor-safe .character-actor__asset {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
}
.actor-safe .character-actor__glow {
  width: 164px;
  height: 164px;
  opacity: .84;
}
.actor-safe .character-actor__ring {
  width: 160px;
  height: 62px;
  opacity: .8;
}
.actor-safe .character-actor__ring--two {
  width: 118px;
  height: 118px;
}
.actor-safe .character-actor__label {
  left: 12px;
  bottom: 14px;
  color: rgba(237,235,230,.46);
  font-size: .61rem;
}
.actor-safe .character-actor__micro {
  top: 16%;
  padding: 6px 10px;
  background: rgba(5,6,8,.78);
  border-color: rgba(237,235,230,.16);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.actor-focus .character-actor__body,
.actor-focus .character-actor__glow,
.actor-focus .character-actor__ring,
.actor-focus .character-actor__shadow,
.actor-focus .character-actor__micro,
.actor-map .character-actor__body,
.actor-map .character-actor__glow,
.actor-map .character-actor__ring,
.actor-map .character-actor__shadow,
.actor-map .character-actor__micro { left: 70%; }
.actor-focus .character-actor__micro,
.actor-map .character-actor__micro {
  transform: translate3d(-98px,-4px,68px) rotate(-2deg);
}

/* Opening: full clean composition, no accidental crop. */
.welcome-visual {
  min-height: 252px;
  overflow: visible;
}
.actor-opening {
  inset: 0;
  min-height: 252px;
}
.actor-opening .character-actor__body,
.actor-opening .character-actor__glow,
.actor-opening .character-actor__ring,
.actor-opening .character-actor__shadow,
.actor-opening .character-actor__micro { left: 72%; }
.actor-opening .character-actor__body {
  top: 14px;
  bottom: 14px;
}
.actor-opening .character-actor__micro {
  top: 13%;
  transform: translate3d(-108px,-3px,68px) rotate(-3deg);
}
.actor-opening .character-actor__glow { width: 204px; height: 204px; }
.actor-opening .character-actor__ring { width: 192px; height: 70px; }
.actor-opening .character-actor__ring--two { width: 138px; height: 138px; }

/* Transient reactions: settle fully inside viewport and stay long enough to read the face. */
.character-moment {
  display: grid;
  place-items: end center;
  width: 148px;
  min-height: 150px;
  overflow: visible;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.5));
}
.character-moment__glow {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82,110,255,.16), rgba(250,68,2,.045) 52%, transparent 72%);
  filter: blur(7px);
  transform: translate(-50%,-50%);
}
.character-moment__asset {
  display: grid;
  place-items: end center;
  width: 100%;
  overflow: visible;
}
.character-moment__asset .character-asset {
  width: auto;
  max-width: 100%;
  max-height: 168px;
  object-fit: contain;
}
.character-moment__bubble {
  left: -4px;
  top: -8px;
  z-index: 4;
  min-width: 48px;
  text-align: center;
  padding: 6px 10px;
  background: rgba(5,6,8,.88);
  border: 1px solid rgba(237,235,230,.16);
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
}
.character-moment--peek {
  top: 42%;
  right: 12px;
  width: 148px;
  transform: translateX(54px) rotate(-2deg) scale(.94);
}
.character-moment--peek.is-visible {
  opacity: 1;
  transform: translateX(0) rotate(-1deg) scale(1);
}
.character-moment--approve {
  right: 12px;
  bottom: max(82px, calc(env(safe-area-inset-bottom) + 72px));
  width: 126px;
  transform: translate(42px,18px) rotate(2deg) scale(.92);
}
.character-moment--approve.is-visible {
  opacity: 1;
  transform: translate(0,0) rotate(0) scale(1);
}
.character-moment--dramatic {
  right: 12px;
  bottom: max(88px, calc(env(safe-area-inset-bottom) + 78px));
  width: 142px;
  transform: translate(48px,22px) rotate(5deg) scale(.9);
}
.character-moment--dramatic.is-visible {
  opacity: 1;
  transform: translate(0,0) rotate(-1deg) scale(1);
}

@media (min-width: 620px) {
  .actor-safe { min-height: 220px; }
  .actor-opening { min-height: 380px; }
  .welcome-visual { min-height: 380px; }
  .actor-opening .character-actor__body { top: 22px; bottom: 22px; }
  .actor-focus .character-actor__body,
  .actor-map .character-actor__body { top: 18px; bottom: 18px; }
  .character-moment--peek { width: 188px; right: 24px; }
  .character-moment--approve { width: 160px; right: 24px; }
  .character-moment--dramatic { width: 176px; right: 24px; }
}

@media (max-width: 430px) {
  .actor-safe {
    min-height: 184px;
    margin-bottom: 10px;
  }
  .actor-safe .character-actor__body {
    top: 14px;
    bottom: 14px;
  }
  .actor-safe .character-actor__glow { width: 148px; height: 148px; }
  .actor-safe .character-actor__ring { width: 146px; height: 56px; }
  .actor-safe .character-actor__ring--two { width: 108px; height: 108px; }
  .actor-focus .character-actor__body,
  .actor-focus .character-actor__glow,
  .actor-focus .character-actor__ring,
  .actor-focus .character-actor__shadow,
  .actor-focus .character-actor__micro,
  .actor-map .character-actor__body,
  .actor-map .character-actor__glow,
  .actor-map .character-actor__ring,
  .actor-map .character-actor__shadow,
  .actor-map .character-actor__micro { left: 68%; }
  .actor-focus .character-actor__micro,
  .actor-map .character-actor__micro {
    transform: translate3d(-92px,-2px,68px) rotate(-2deg);
  }
  .welcome-visual { min-height: 240px; }
  .actor-opening { min-height: 240px; }
  .actor-opening .character-actor__body,
  .actor-opening .character-actor__glow,
  .actor-opening .character-actor__ring,
  .actor-opening .character-actor__shadow,
  .actor-opening .character-actor__micro { left: 69%; }
  .actor-opening .character-actor__body { top: 16px; bottom: 16px; }
  .actor-opening .character-actor__micro {
    transform: translate3d(-98px,-2px,68px) rotate(-3deg);
  }
  .actor-opening .character-actor__glow { width: 184px; height: 184px; }
  .actor-opening .character-actor__ring { width: 176px; height: 66px; }
  .actor-opening .character-actor__ring--two { width: 126px; height: 126px; }
  .character-moment--peek { right: 10px; width: 136px; }
  .character-moment--approve { right: 10px; width: 118px; }
  .character-moment--dramatic { right: 10px; width: 132px; }
  .character-moment__asset .character-asset { max-height: 154px; }
}

@media (max-width: 370px) {
  .actor-safe { min-height: 176px; }
  .welcome-visual,
  .actor-opening { min-height: 226px; }
  .actor-opening .character-actor__body { top: 16px; bottom: 16px; }
  .character-moment--peek { width: 126px; right: 8px; }
  .character-moment--approve { width: 110px; right: 8px; }
  .character-moment--dramatic { width: 124px; right: 8px; }
}

/* =========================================================
   CHARACTER V5 · CLEAN FULL-FIGURE STAGES
   New clean renders, no accidental cropping, no boxed sticker look.
   ========================================================= */
.character-v5-asset {
  display: block;
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 24px 28px rgba(0,0,0,.55));
  user-select: none;
  pointer-events: none;
}

.character-scene-v5 {
  --actor-x: 0px;
  --actor-y: 0px;
  --actor-rx: 0deg;
  --actor-ry: 0deg;
  position: relative;
  width: 100%;
  min-height: 218px;
  margin: 4px 0 18px;
  isolation: isolate;
  overflow: visible;
  perspective: 950px;
  pointer-events: none;
}
.character-scene-v5::before,
.character-scene-v5::after {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237,235,230,.14) 10%, rgba(237,235,230,.07) 70%, transparent);
  content: "";
  z-index: 1;
}
.character-scene-v5::before { top: 0; }
.character-scene-v5::after { bottom: 0; }
.character-scene-v5__world {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translate3d(var(--actor-x), var(--actor-y), 0) rotateX(var(--actor-rx)) rotateY(var(--actor-ry));
  transition: transform 180ms ease-out;
}
.character-scene-v5__glow {
  position: absolute;
  z-index: 0;
  right: 24px;
  top: 50%;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82,110,255,.17), rgba(0,194,255,.05) 42%, rgba(250,68,2,.035) 60%, transparent 73%);
  filter: blur(8px);
  transform: translateY(-50%) translateZ(-60px);
}
.character-scene-v5--orange .character-scene-v5__glow {
  background: radial-gradient(circle, rgba(250,68,2,.15), rgba(250,68,2,.04) 45%, rgba(82,110,255,.035) 62%, transparent 74%);
}
.character-scene-v5__orb {
  position: absolute;
  z-index: 2;
  right: 35px;
  top: 50%;
  border: 1px solid rgba(125,145,255,.22);
  border-radius: 50%;
  transform-style: preserve-3d;
}
.character-scene-v5__orb--one {
  width: 174px;
  height: 62px;
  transform: translateY(-50%) rotateX(70deg) rotateZ(-9deg) translateZ(-14px);
  animation: scene-v5-orbit-one 10s linear infinite;
}
.character-scene-v5__orb--two {
  right: 58px;
  width: 126px;
  height: 126px;
  border-color: rgba(250,68,2,.15);
  transform: translateY(-50%) rotateX(74deg) rotateZ(44deg) translateZ(-28px);
  animation: scene-v5-orbit-two 13s linear infinite reverse;
}
@keyframes scene-v5-orbit-one { to { transform: translateY(-50%) rotateX(70deg) rotateZ(351deg) translateZ(-14px); } }
@keyframes scene-v5-orbit-two { to { transform: translateY(-50%) rotateX(74deg) rotateZ(404deg) translateZ(-28px); } }
.character-scene-v5__spark {
  position: absolute;
  z-index: 4;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.character-scene-v5__spark--one {
  left: 24%;
  top: 28%;
  background: var(--blue-bright);
  box-shadow: 0 0 18px rgba(82,110,255,.85);
  animation: scene-v5-spark 3.1s ease-in-out infinite;
}
.character-scene-v5__spark--two {
  right: 9%;
  bottom: 22%;
  background: var(--orange);
  box-shadow: 0 0 18px rgba(250,68,2,.82);
  animation: scene-v5-spark 3.4s .5s ease-in-out infinite reverse;
}
@keyframes scene-v5-spark { 50% { opacity: .38; transform: translateY(-7px) scale(.7); } }
.character-scene-v5__figure {
  position: absolute;
  z-index: 6;
  right: 18px;
  top: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(42px);
  transform-style: preserve-3d;
  animation: scene-v5-figure-in 620ms var(--ease-out) both, scene-v5-idle 4.8s .7s ease-in-out infinite;
}
@keyframes scene-v5-figure-in {
  from { opacity: 0; transform: translate3d(22px,18px,42px) rotate(3deg) scale(.9); }
  to { opacity: 1; transform: translate3d(0,0,42px) rotate(0) scale(1); }
}
@keyframes scene-v5-idle {
  0%,100% { translate: 0 0; rotate: -.7deg; }
  50% { translate: 0 -5px; rotate: .7deg; }
}
.character-scene-v5__base {
  position: absolute;
  z-index: 3;
  right: 34px;
  bottom: 13px;
  width: 126px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.46);
  filter: blur(8px);
  transform: translateZ(-10px);
}
.character-scene-v5__micro {
  position: absolute;
  z-index: 8;
  right: 150px;
  top: 34px;
  min-width: 52px;
  padding: 7px 11px;
  border: 1px solid rgba(237,235,230,.16);
  background: rgba(5,6,8,.86);
  color: var(--text);
  font-family: var(--display);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: -.02em;
  box-shadow: 0 12px 28px rgba(0,0,0,.2);
  backdrop-filter: blur(12px);
  transform: translateZ(62px) rotate(-2deg);
  animation: scene-v5-micro 420ms 360ms var(--ease-out) both;
}
@keyframes scene-v5-micro { from { opacity:0; transform: translate3d(8px,8px,62px) rotate(2deg); } to { opacity:1; transform: translate3d(0,0,62px) rotate(-2deg); } }
.character-scene-v5__label {
  position: absolute;
  z-index: 5;
  left: 12px;
  bottom: 16px;
  color: rgba(237,235,230,.42);
  font-size: .62rem;
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* Opening gets the full object treatment, but stays completely inside the frame. */
.opening-stage-v5 {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.opening-stage-v5__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: .18;
  mask-image: radial-gradient(circle at 70% 50%, black 0 34%, transparent 72%);
}
.opening-stage-v5 .character-scene-v5 {
  min-height: 100%;
  height: 100%;
  margin: 0;
}
.opening-stage-v5 .character-scene-v5::before,
.opening-stage-v5 .character-scene-v5::after { display:none; }
.opening-stage-v5 .character-scene-v5__figure {
  right: 9%;
  top: 16px;
  bottom: 16px;
}
.opening-stage-v5 .character-scene-v5__glow { right: 5%; width: 220px; height: 220px; }
.opening-stage-v5 .character-scene-v5__orb--one { right: 7%; width: 205px; height: 72px; }
.opening-stage-v5 .character-scene-v5__orb--two { right: 12%; width: 146px; height: 146px; }
.opening-stage-v5 .character-scene-v5__base { right: 10%; width: 142px; }
.opening-stage-v5 .character-scene-v5__micro { right: 44%; top: 20%; }
.opening-stage-v5__code {
  position: absolute;
  right: 8px;
  bottom: 8px;
  color: rgba(237,235,230,.28);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .16em;
}

/* New transient reaction: fully visible, never peeking with an accidental crop. */
.character-pop-v5 {
  position: fixed;
  z-index: 80;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(96px, calc(env(safe-area-inset-bottom) + 82px));
  width: 148px;
  height: 170px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px) scale(.92) rotate(2deg);
  transition: opacity 260ms ease, transform 430ms var(--ease-out);
}
.character-pop-v5.is-visible { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
.character-pop-v5__glow {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 138px;
  height: 138px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(82,110,255,.16), rgba(250,68,2,.04) 52%, transparent 72%);
  filter: blur(7px);
  transform: translate(-50%,-50%);
}
.character-pop-v5__ring {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 128px;
  height: 48px;
  border: 1px solid rgba(125,145,255,.2);
  border-radius: 50%;
  transform: translate(-50%,-50%) rotate(-7deg);
}
.character-pop-v5__figure {
  position: absolute;
  inset: 8px 8px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.character-pop-v5__figure .character-v5-asset { max-width: 100%; max-height: 100%; }
.character-pop-v5--peek .character-pop-v5__figure { inset: 18px 4px 6px; align-items: center; }
.character-pop-v5--peek .character-v5-asset--face { width: 100%; height: auto; }
.character-pop-v5__micro {
  position: absolute;
  z-index: 4;
  left: -4px;
  top: 2px;
  padding: 6px 10px;
  border: 1px solid rgba(237,235,230,.16);
  background: rgba(5,6,8,.9);
  color: var(--text);
  font-family: var(--display);
  font-size: .78rem;
  font-weight: 700;
}

@media (min-width: 620px) {
  .character-scene-v5 { min-height: 252px; }
  .character-scene-v5__figure { right: 34px; top: 16px; bottom: 16px; }
  .character-scene-v5__glow { right: 34px; width: 220px; height: 220px; }
  .character-scene-v5__orb--one { right: 44px; width: 210px; height: 76px; }
  .character-scene-v5__orb--two { right: 76px; width: 150px; height: 150px; }
  .character-scene-v5__base { right: 55px; width: 150px; }
  .character-scene-v5__micro { right: 200px; top: 44px; }
  .opening-stage-v5 .character-scene-v5__figure { right: 12%; top: 22px; bottom: 22px; }
  .opening-stage-v5 .character-scene-v5__glow { right: 8%; width: 310px; height: 310px; }
  .opening-stage-v5 .character-scene-v5__orb--one { right: 9%; width: 285px; height: 90px; }
  .opening-stage-v5 .character-scene-v5__orb--two { right: 15%; width: 190px; height: 190px; }
  .opening-stage-v5 .character-scene-v5__micro { right: 43%; top: 18%; }
  .character-pop-v5 { width: 184px; height: 208px; right: 24px; }
}

@media (max-width: 430px) {
  .welcome-visual {
    min-height: 252px !important;
    overflow: visible !important;
  }
  .boot-system {
    width: 112px !important;
    height: 112px !important;
    left: 27% !important;
    opacity: .72;
  }
  .character-scene-v5 {
    min-height: 214px;
    margin: 2px 0 16px;
  }
  .character-scene-v5__figure {
    right: 14px;
    top: 14px;
    bottom: 14px;
  }
  .character-scene-v5__glow { right: 10px; width: 176px; height: 176px; }
  .character-scene-v5__orb--one { right: 16px; width: 164px; height: 58px; }
  .character-scene-v5__orb--two { right: 38px; width: 116px; height: 116px; }
  .character-scene-v5__base { right: 24px; width: 122px; }
  .character-scene-v5__micro { right: 132px; top: 30px; font-size: .76rem; }
  .character-scene-v5__label { left: 10px; bottom: 14px; }
  .opening-stage-v5 .character-scene-v5__figure {
    right: 7%;
    top: 15px;
    bottom: 15px;
  }
  .opening-stage-v5 .character-scene-v5__glow { right: 2%; width: 205px; height: 205px; }
  .opening-stage-v5 .character-scene-v5__orb--one { right: 4%; width: 190px; height: 66px; }
  .opening-stage-v5 .character-scene-v5__orb--two { right: 10%; width: 134px; height: 134px; }
  .opening-stage-v5 .character-scene-v5__base { right: 8%; width: 134px; }
  .opening-stage-v5 .character-scene-v5__micro { right: 45%; top: 17%; }
  .character-pop-v5 {
    width: 142px;
    height: 166px;
    right: max(12px, env(safe-area-inset-right));
  }
}

@media (max-width: 370px) {
  .welcome-visual { min-height: 238px !important; }
  .character-scene-v5 { min-height: 202px; }
  .character-scene-v5__figure { right: 10px; top: 14px; bottom: 14px; }
  .character-scene-v5__glow { width: 162px; height: 162px; }
  .character-scene-v5__orb--one { width: 150px; height: 54px; }
  .character-scene-v5__orb--two { right: 32px; width: 108px; height: 108px; }
  .character-scene-v5__micro { right: 120px; top: 28px; }
  .opening-stage-v5 .character-scene-v5__figure { right: 5%; }
  .character-pop-v5 { width: 132px; height: 154px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .character-scene-v5__figure,
  .character-scene-v5__orb,
  .character-scene-v5__spark { animation: none !important; }
}

/* =========================================================
   V6 · CLEAN RESET BEFORE ROUTE REVEAL
   The character deliberately debuts at Route Reveal.
   Everything from Route Reveal onward remains untouched.
   ========================================================= */

/* Remove legacy pre-route character stages entirely. */
.screen[data-step="objective"] .character-scene-v5,
.screen[data-step="demands"] .character-scene-v5,
.screen[data-step="objective"] .actor-safe,
.screen[data-step="demands"] .actor-safe {
  display: none !important;
}

/* Opening becomes a pure living system object, not a mascot showcase. */
.screen--welcome .welcome-visual {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-block: 1px solid rgba(237,235,230,.13);
  background:
    radial-gradient(circle at 50% 48%, rgba(82,110,255,.11), transparent 34%),
    radial-gradient(circle at 62% 58%, rgba(250,68,2,.055), transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,.015), transparent 66%);
}
.screen--welcome .welcome-visual::before {
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(rgba(255,255,255,.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.038) 1px, transparent 1px);
  background-size: 52px 52px;
  opacity:.36;
  content:"";
}
.screen--welcome .boot-system {
  width: 184px;
  height: 184px;
}
.screen--welcome .boot-system__glass {
  inset: 40px;
  box-shadow:
    inset 12px 14px 24px rgba(255,255,255,.07),
    inset -18px -18px 30px rgba(0,0,0,.42),
    0 24px 52px rgba(0,0,0,.46),
    0 0 72px rgba(82,110,255,.20);
}
.screen--welcome .boot-system__halo--outer { border-color: rgba(237,235,230,.30); }
.screen--welcome .boot-system__halo--inner { border-color: rgba(82,110,255,.34); }

/* Keep pre-route questions editorial and calm. */
.screen[data-step="objective"],
.screen[data-step="demands"] {
  min-height: calc(100dvh - 138px);
}
.screen[data-step="objective"] .question-heading,
.screen[data-step="demands"] .question-heading {
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(237,235,230,.12);
}
.screen[data-step="objective"] .question-panel,
.screen[data-step="demands"] .question-panel {
  margin-top: 8px;
}

/* A tiny abstract pulse gives life without forcing the mascot into the UI. */
.screen[data-step="objective"]::after,
.screen[data-step="demands"]::after {
  position:absolute;
  right:4px;
  top:152px;
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--blue-bright);
  box-shadow:0 0 20px rgba(82,110,255,.75);
  content:"";
  opacity:.72;
  animation:pre-route-pulse 2.8s ease-in-out infinite;
  pointer-events:none;
}
.screen[data-step="demands"]::after {
  background:var(--orange);
  box-shadow:0 0 20px rgba(250,68,2,.7);
  animation-delay:.8s;
}
@keyframes pre-route-pulse {
  0%,100% { transform:scale(.7); opacity:.36; }
  50% { transform:scale(1); opacity:.9; }
}

@media (min-width: 620px) {
  .screen--welcome .welcome-visual { min-height: 430px; }
  .screen--welcome .boot-system { width: 286px; height: 286px; }
  .screen--welcome .boot-system__glass { inset: 62px; }
  .screen[data-step="objective"]::after,
  .screen[data-step="demands"]::after { top:126px; right:18px; }
}

@media (max-width: 430px) {
  .screen--welcome {
    min-height: calc(100dvh - 112px);
    align-content:start;
  }
  .screen--welcome .welcome-visual {
    min-height: 182px;
  }
  .screen--welcome .boot-system {
    width: 144px;
    height: 144px;
  }
  .screen--welcome .boot-system__glass { inset:31px; }
  .screen--welcome .welcome-title {
    max-width: 8.2ch;
    font-size: clamp(2.8rem, 12vw, 3.7rem);
  }
  .screen[data-step="objective"] .question-heading,
  .screen[data-step="demands"] .question-heading {
    padding-bottom:20px;
  }
  .screen[data-step="objective"]::after,
  .screen[data-step="demands"]::after {
    top:138px;
    right:2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen[data-step="objective"]::after,
  .screen[data-step="demands"]::after { animation:none; }
}


/* =========================================================
   OPENING FINAL PASS · restore premium 3D intro without mascot
   ========================================================= */
.screen--welcome .welcome-copy .lead {
  max-width: 31ch;
}

.screen--welcome .welcome-visual {
  min-height: 250px !important;
  border-block: 1px solid rgba(237,235,230,.12);
  background:
    radial-gradient(circle at 50% 48%, rgba(82,110,255,.16), transparent 30%),
    radial-gradient(circle at 58% 54%, rgba(250,68,2,.08), transparent 18%),
    linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,0) 36%),
    linear-gradient(135deg, rgba(3,7,18,.84), rgba(2,4,12,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), inset 0 -1px 0 rgba(255,255,255,.02);
}
.screen--welcome .welcome-visual::before {
  background-size: 48px 48px;
  opacity: .28;
}
.screen--welcome .welcome-visual::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.08), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 18%, transparent 82%, rgba(255,255,255,.025));
  content: "";
  pointer-events: none;
}
.screen--welcome .welcome-visual__meta {
  position: absolute;
  z-index: 2;
  color: rgba(237,235,230,.44);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: 0;
  animation: welcome-meta-in 500ms 650ms var(--ease-out) forwards;
}
.screen--welcome .welcome-visual__meta--left { left: 12px; bottom: 10px; }
.screen--welcome .welcome-visual__meta--right { right: 12px; top: 12px; }
.screen--welcome .welcome-visual__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
  transform: translateY(-50%);
  opacity: .45;
}
@keyframes welcome-meta-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen--welcome .boot-system {
  width: 198px !important;
  height: 198px !important;
  z-index: 1;
}
.screen--welcome .boot-system__glass {
  inset: 42px !important;
  box-shadow:
    inset 14px 18px 26px rgba(255,255,255,.08),
    inset -20px -24px 34px rgba(0,0,0,.44),
    0 30px 60px rgba(0,0,0,.48),
    0 0 84px rgba(82,110,255,.24) !important;
}
.screen--welcome .boot-system__halo--outer {
  inset: -2px;
  border-color: rgba(237,235,230,.34) !important;
}
.screen--welcome .boot-system__halo--inner {
  inset: 18px -10px;
  border-color: rgba(82,110,255,.42) !important;
}
.screen--welcome .boot-system__fragment {
  position: absolute;
  display: block;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 22px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  opacity: .9;
}
.screen--welcome .boot-system__fragment--a {
  width: 20px;
  height: 44px;
  left: -10px;
  top: 34px;
  transform: rotate(-14deg);
  animation: welcome-fragment-a 6.5s ease-in-out infinite;
}
.screen--welcome .boot-system__fragment--b {
  width: 14px;
  height: 34px;
  right: -6px;
  bottom: 30px;
  transform: rotate(16deg);
  animation: welcome-fragment-b 5.8s ease-in-out infinite;
}
@keyframes welcome-fragment-a {
  0%,100% { transform: translateY(0) rotate(-14deg); opacity: .7; }
  50% { transform: translateY(-8px) rotate(-8deg); opacity: 1; }
}
@keyframes welcome-fragment-b {
  0%,100% { transform: translateY(0) rotate(16deg); opacity: .66; }
  50% { transform: translateY(7px) rotate(8deg); opacity: .96; }
}

@media (min-width: 620px) {
  .screen--welcome .welcome-visual {
    min-height: 460px !important;
  }
  .screen--welcome .boot-system {
    width: 292px !important;
    height: 292px !important;
  }
  .screen--welcome .boot-system__glass { inset: 64px !important; }
  .screen--welcome .welcome-copy { align-self: center; }
}

@media (max-width: 430px) {
  .screen--welcome {
    gap: 20px;
  }
  .screen--welcome .welcome-visual {
    min-height: 236px !important;
  }
  .screen--welcome .boot-system {
    width: 176px !important;
    height: 176px !important;
  }
  .screen--welcome .boot-system__glass { inset: 36px !important; }
  .screen--welcome .welcome-title {
    max-width: 7.8ch;
    font-size: clamp(3rem, 13vw, 3.95rem) !important;
  }
  .screen--welcome .welcome-kicker { margin-bottom: 10px; }
  .screen--welcome .welcome-copy .lead {
    font-size: 1rem;
    line-height: 1.48;
  }
}

@media (max-width: 390px) {
  .screen--welcome .welcome-visual {
    min-height: 224px !important;
  }
  .screen--welcome .boot-system {
    width: 168px !important;
    height: 168px !important;
  }
  .screen--welcome .boot-system__glass { inset: 34px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .screen--welcome .welcome-visual__meta,
  .screen--welcome .boot-system__fragment { animation: none !important; }
}
