/* ================= PHONE (palette + type tokens) ================= */

.scr { position: relative; height: 100%; border-radius: 44px; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--body); letter-spacing: var(--bls); display: flex; flex-direction: column; transition: background-color .4s var(--ease); }
.scr .num, .scr .m { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px 6px; font-size: 13px; font-weight: 600; font-family: -apple-system, "SF Pro Text", system-ui, sans-serif; letter-spacing: 0; color: var(--text); }
.sbar .sig { display: flex; align-items: center; gap: 5px; }
.sbar .sig i { display: block; width: 3px; border-radius: 1px; background: currentColor; }
.sbar .sig i:nth-child(1) { height: 4px; } .sbar .sig i:nth-child(2) { height: 7px; } .sbar .sig i:nth-child(3) { height: 10px; }
.sbar .bat { width: 23px; height: 11px; border-radius: 3px; border: 1px solid currentColor; opacity: .9; padding: 1px; margin-left: 4px; } .sbar .bat::after { content: ""; display: block; height: 100%; width: 72%; border-radius: 1px; background: currentColor; }
.body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 22px 0; }
.lbl { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lbl .rd { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin-right: 7px; vertical-align: 1px; }
.lit { font-family: var(--display); font-weight: var(--dw); text-transform: var(--dtt); letter-spacing: var(--dls); line-height: .95;
  background: repeating-linear-gradient(180deg, var(--glow) 0 2px, color-mix(in oklab, var(--glow) 58%, transparent) 2px 3px);
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 16px color-mix(in oklab, var(--glow) 30%, transparent); }
.h-read { font-family: var(--body); font-weight: 500; font-size: 21px; line-height: 1.28; letter-spacing: -.005em; color: var(--text); }
.p-read { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.card { background: var(--surf); border: 1px solid color-mix(in oklab, var(--text) 9%, transparent); border-radius: 16px; padding: 14px; transition: box-shadow .35s var(--ease), border-color .35s; }
.p-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; border-radius: 12px; background: var(--act); color: var(--ink); font-family: var(--body); font-weight: 600; font-size: 15px; transition: box-shadow .3s var(--ease), transform .2s, opacity .2s; }
.p-btn:hover { box-shadow: 0 0 0 1px var(--glow), 0 0 22px -4px color-mix(in oklab, var(--glow) 60%, transparent); }
.p-btn:active { transform: scale(.985); }
.p-btn[disabled] { opacity: .35; pointer-events: none; }
.p-btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--text) 22%, transparent); }
.p-btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--glow), 0 0 18px -6px color-mix(in oklab, var(--glow) 50%, transparent); }
.p-link { font-size: 13px; color: var(--muted); text-align: center; padding: 6px; }
.p-link:hover { color: var(--text); }
.bot { margin-top: auto; padding: 14px 0 34px; display: grid; gap: 10px; }
.homebar { position: absolute; bottom: 8px; left: 50%; width: 120px; height: 4px; margin-left: -60px; border-radius: 4px; background: color-mix(in oklab, var(--text) 70%, transparent); pointer-events: none; }


/* screen: globe */
.s-globe .gwrap { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; margin: 0 -22px; }
.s-globe canvas { width: 340px; height: 340px; touch-action: none; cursor: grab; }
.s-globe canvas:active { cursor: grabbing; }
.g-read { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; }
.g-read .coord { font-family: var(--mono); font-size: 13px; color: var(--text); }
.g-read .kind { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; background: color-mix(in oklab, var(--glow) 14%, transparent); color: var(--glow); }
.g-title { }
.s-globe .ttl { font-size: calc(46px * var(--ds)); margin-top: 6px; }
.signal { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; align-content: center; gap: 10px; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
.signal.on { opacity: 1; }
.signal .lit { font-size: calc(44px * var(--ds)); }
.signal .m { font-size: 12px; letter-spacing: .14em; color: var(--muted); }

/* screen: start */
.s-start .mini { display: grid; place-items: center; margin-top: 22px; }
.s-start .mini canvas { width: 250px; height: 250px; touch-action: none; cursor: grab; }
.s-start .word { text-align: center; font-size: calc(64px * var(--ds)); margin-top: 18px; }
.s-start .tag { text-align: center; font-size: 17px; line-height: 1.45; margin-top: 14px; color: var(--text); }
.s-start .tag em { font-style: normal; font-family: var(--mono); color: var(--glow); font-size: .95em; }
.s-start .spawn { text-align: center; margin-top: 14px; }

/* screen: quiz (list) */
.prog { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.prog .bar { flex: 1; height: 3px; border-radius: 3px; background: color-mix(in oklab, var(--text) 10%, transparent); overflow: hidden; display: block; padding: 0; border: 0; }
.prog .bar i { display: block; height: 100%; width: calc(100% / 6); background: var(--glow); border-radius: 3px; }
.s-quiz .h-read { margin-top: 16px; }
.s-quiz .p-read { margin-top: 6px; }
.qlist { list-style: none; margin: 14px -4px 0; padding: 0 4px 4px; overflow-y: auto; flex: 1; min-height: 0; display: grid; gap: 7px; align-content: start; scrollbar-width: none; }
.qlist::-webkit-scrollbar { display: none; }
.qopt { display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 11px 13px; border-radius: 12px; background: var(--surf); border: 1px solid color-mix(in oklab, var(--text) 8%, transparent); transition: border-color .25s, box-shadow .3s var(--ease), background .25s; }
.qopt b { display: block; font-weight: 500; font-size: 14.5px; line-height: 1.3; color: var(--text); }
.qopt span { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); margin-top: 2px; }
.qopt i { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--text) 28%, transparent); transition: box-shadow .25s; }
.qopt:hover { border-color: color-mix(in oklab, var(--glow) 45%, transparent); box-shadow: 0 0 18px -8px color-mix(in oklab, var(--glow) 60%, transparent); }
.qopt[aria-checked="true"] { border-color: var(--glow); background: color-mix(in oklab, var(--surf) 80%, var(--deep)); }
.qopt[aria-checked="true"] i { box-shadow: inset 0 0 0 5px var(--glow); }
.s-quiz .bot { grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding-top: 12px; }
.s-quiz .bot .p-link { padding: 0 6px; }

/* screen: reveal */
.s-reveal { text-align: center; }
.s-reveal .lbl { margin-top: 8px; }
.s-reveal .arch { font-size: calc(70px * var(--ds)); margin-top: 8px; }
.fig { display: grid; place-items: center; margin: 4px 0 0; }
.fig svg { width: 210px; height: 220px; overflow: visible; }
.fig .ring { fill: none; stroke: color-mix(in oklab, var(--text) 12%, transparent); stroke-dasharray: 2 5; }
.fig .halo { fill: none; stroke: var(--glow); stroke-width: 1.2; opacity: .5; }
.s-reveal .why { margin: 4px auto 0; max-width: 270px; }
.s-reveal .why b { color: var(--text); font-weight: 500; }
.s-reveal .later { margin-top: 8px; font-size: 12px; color: var(--faint); }
.alts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.alts button { height: 34px; border-radius: 8px; font-size: 12.5px; color: var(--muted); background: var(--surf); border: 1px solid color-mix(in oklab, var(--text) 8%, transparent); transition: border-color .2s, color .2s; }
.alts button:hover { color: var(--text); border-color: color-mix(in oklab, var(--glow) 40%, transparent); }
.alts button[aria-pressed="true"] { color: var(--ink); background: var(--act); border-color: transparent; }

/* screen: welcome */
.s-welcome .ttl { font-size: calc(48px * var(--ds)); margin-top: 8px; }
.video { position: relative; margin-top: 18px; aspect-ratio: 9 / 11; border-radius: 16px; overflow: hidden; background: radial-gradient(80% 70% at 50% 35%, var(--deep), var(--bg)); border: 1px solid color-mix(in oklab, var(--text) 9%, transparent); display: grid; place-items: center; }
.video .play { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--text) 14%, transparent); backdrop-filter: blur(4px); transition: box-shadow .3s; }
.video .play::after { content: ""; margin-left: 5px; border-left: 16px solid var(--text); border-top: 10px solid transparent; border-bottom: 10px solid transparent; }
.video:hover .play { box-shadow: 0 0 0 1px var(--glow), 0 0 26px -6px var(--glow); }
.video .vcap { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; justify-content: space-between; }
.s-welcome .next { margin-top: 14px; display: grid; gap: 6px; }
.s-welcome .next div { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; padding: 9px 0; border-top: 1px solid color-mix(in oklab, var(--text) 9%, transparent); }
.s-welcome .next span.m { font-size: 11px; color: var(--muted); }

/* screen: you */
.s-you .body { padding-bottom: 0; gap: 10px; }
.you-row { display: flex; justify-content: space-between; align-items: flex-end; }
.you-row .lit { font-size: calc(78px * var(--ds)); margin-top: 2px; }
.streak { text-align: right; } .streak .num { display: block; font-size: 28px; line-height: 1; color: var(--text); } .streak .lbl { font-size: 8.5px; }
.rsb { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chip { font-size: 10.5px; padding: 3px 8px; border-radius: 99px; background: color-mix(in oklab, var(--glow) 15%, transparent); color: var(--glow); }
.big { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; }
.big .num { font-size: 48px; line-height: 1; color: var(--text); } .big small { font-family: var(--mono); font-size: 13px; color: var(--faint); }
.meter { height: 6px; border-radius: 6px; background: color-mix(in oklab, var(--text) 9%, transparent); margin: 12px 0 8px; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; width: 48%; border-radius: 6px; background: linear-gradient(90deg, var(--mid), var(--glow)); }
.meter b { position: absolute; top: -4px; left: 58%; width: 2px; height: 14px; border-radius: 2px; background: var(--muted); }
.small { font-size: 11.5px; color: var(--muted); } .small .num { color: var(--text); }
.checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ck { padding: 11px; display: grid; gap: 4px; }
.ck .t { font-size: 11.5px; color: var(--muted); }
.ck .num { font-size: 23px; line-height: 1.1; color: var(--text); }
.ck .ln { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--mid) var(--v), color-mix(in oklab, var(--text) 9%, transparent) var(--v)); }
.ck .go { font-size: 11px; color: var(--glow); margin-top: 2px; }
.q-card .h { font-weight: 500; font-size: 16px; line-height: 1.3; margin: 6px 0 4px; }
.q-card .p-read { font-size: 12.5px; }
.q-card .rsb { margin-top: 10px; }
.q-card .p-btn { width: auto; height: 40px; padding: 0 22px; font-size: 13.5px; border-radius: 10px; }
.ph { text-align: right; line-height: 1.1; } .ph .num { display: block; font-size: 15px; color: var(--text); } .ph small { font-size: 10px; color: var(--faint); }
.card:hover { border-color: color-mix(in oklab, var(--glow) 35%, transparent); box-shadow: 0 0 22px -10px color-mix(in oklab, var(--glow) 55%, transparent); }
.tabs { margin-top: auto; margin-inline: -22px; display: grid; grid-template-columns: repeat(5, 1fr); padding: 9px 4px 26px; border-top: 1px solid color-mix(in oklab, var(--text) 8%, transparent); background: color-mix(in oklab, var(--bg) 82%, black); }
.tabs span { display: grid; justify-items: center; gap: 4px; font-family: var(--mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.tabs span.on { color: var(--glow); }
.tabs svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.enter { animation: enter .5s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

/* ---------- pixel titles ---------- */
.lit.pxd { background: none; -webkit-text-fill-color: initial; color: inherit; text-shadow: none; line-height: 0; }
.lit.pxd canvas { display: inline-block; max-width: 100%; height: auto; image-rendering: pixelated; }

/* ---------- PIXEL + PIP-BOY: segmented meters ---------- */
.app:is([data-style="pixel"], [data-style="pipboy"]) .meter i, .app:is([data-style="pixel"], [data-style="pipboy"]) .ck .ln, .app:is([data-style="pixel"], [data-style="pipboy"]) .prog .bar,
.app:is([data-style="pixel"], [data-style="pipboy"]) .meter { -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px); mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px); border-radius: 0; }
.app:is([data-style="pixel"], [data-style="pipboy"]) .meter i { background: var(--glow); border-radius: 0; }
.app:is([data-style="pixel"], [data-style="pipboy"]) .meter { height: 8px; }
.app:is([data-style="pixel"], [data-style="pipboy"]) .meter b { display: none; }
.app[data-style="pixel"] .card, .app[data-style="pixel"] .qopt, .app[data-style="pixel"] .p-btn, .app[data-style="pixel"] .video { border-radius: 8px; }

/* ---------- PIP-BOY ---------- */
.app[data-style="pipboy"] .scr::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.11) 0 1px, transparent 1px 3px), radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0,0,0,.55)); }
.app[data-style="pipboy"] .scr::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: radial-gradient(80% 60% at 50% 35%, color-mix(in oklab, var(--glow) 7%, transparent), transparent 70%); }
.app[data-style="pipboy"] .card, .app[data-style="pipboy"] .qopt, .app[data-style="pipboy"] .video, .app[data-style="pipboy"] .alts button { border-radius: 2px; border-color: color-mix(in oklab, var(--glow) 28%, transparent); background: color-mix(in oklab, var(--surf) 85%, var(--bg)); }
.app[data-style="pipboy"] .p-btn { border-radius: 2px; }
.app[data-style="pipboy"] .p-btn.ghost { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--glow) 45%, transparent); }
.app[data-style="pipboy"] .chip, .app[data-style="pipboy"] .g-read .kind { border-radius: 1px; }
.app[data-style="pipboy"] .qopt { padding: 10px 12px; }
.app[data-style="pipboy"] .qopt i { border-radius: 0; }
.app[data-style="pipboy"] .qopt[aria-checked="true"] { background: var(--glow); border-color: var(--glow); }
.app[data-style="pipboy"] .qopt[aria-checked="true"] b, .app[data-style="pipboy"] .qopt[aria-checked="true"] span { color: var(--ink); }
.app[data-style="pipboy"] .qopt[aria-checked="true"] i { box-shadow: inset 0 0 0 5px var(--ink); }
.app[data-style="pipboy"] .qopt:hover:not([aria-checked="true"]) { background: color-mix(in oklab, var(--glow) 10%, var(--surf)); }
.app[data-style="pipboy"] .lbl { color: color-mix(in oklab, var(--glow) 55%, var(--muted)); }
.app[data-style="pipboy"] .tabs { background: var(--bg); border-top-color: color-mix(in oklab, var(--glow) 25%, transparent); }
.app[data-style="pipboy"] .tabs span.on { text-shadow: 0 0 8px var(--glow); }
.app[data-style="pipboy"] .num { text-shadow: 0 0 10px color-mix(in oklab, var(--glow) 35%, transparent); }
.app[data-style="pipboy"] .alts button[aria-pressed="true"] { background: var(--glow); }

/* ================= v3.2 onboarding ================= */
.h-read.long { font-size: 17.5px; line-height: 1.32; }
.segs6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 6px; }
.segs6 i { height: 3px; border-radius: 2px; background: color-mix(in oklab, var(--text) 12%, transparent); }
.segs6 i.done { background: var(--mid); } .segs6 i.now { background: var(--glow); }
.app[data-style="pipboy"] .segs6 i, .app[data-style="pixel"] .segs6 i { border-radius: 0; height: 4px; }
.qopt.plain b { font-weight: 400; font-size: 14px; line-height: 1.38; }
.qbot { grid-template-columns: auto 1fr !important; }
.qhint { text-align: right; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.tapnote { margin-top: 6px; color: var(--glow); font-size: 12.5px; }
.bubbles { list-style: none; margin: 10px -4px 0; padding: 0 4px 4px; overflow-y: auto; flex: 1; min-height: 0; display: grid; gap: 7px; align-content: start; scrollbar-width: none; }
.bubbles::-webkit-scrollbar { display: none; }
.bub { position: relative; width: 100%; text-align: left; padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: var(--surf); border: 1px solid color-mix(in oklab, var(--text) 9%, transparent); font-size: 13px; line-height: 1.42; color: var(--text); transition: border-color .25s, box-shadow .3s var(--ease), background .25s; }
.bub:hover { border-color: color-mix(in oklab, var(--glow) 45%, transparent); }
.bub[aria-pressed="true"] { border-color: var(--glow); background: color-mix(in oklab, var(--surf) 75%, var(--deep)); box-shadow: 0 0 18px -8px color-mix(in oklab, var(--glow) 60%, transparent); }
.bub .rank { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--glow); margin-bottom: 3px; }
.app[data-style="pipboy"] .bub { border-radius: 2px; }
.app[data-style="pipboy"] .bub[aria-pressed="true"] { background: var(--glow); color: var(--ink); } .app[data-style="pipboy"] .bub[aria-pressed="true"] .rank { color: var(--ink); }

/* sign up */
.s-signup .h-read { margin-top: 8px; }
.field { display: grid; gap: 6px; margin-top: 18px; }
.field input { height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid color-mix(in oklab, var(--text) 16%, transparent); background: var(--surf); color: var(--text); font: 500 16px var(--body); outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--glow); box-shadow: 0 0 0 3px color-mix(in oklab, var(--glow) 18%, transparent); }
.field input::placeholder { color: var(--faint); }
.figl { margin-top: 22px; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.figs button { display: grid; justify-items: center; gap: 4px; padding: 12px 8px 10px; border-radius: 14px; background: var(--surf); border: 1px solid color-mix(in oklab, var(--text) 9%, transparent); color: var(--muted); font-size: 13.5px; transition: border-color .25s, box-shadow .3s, color .2s; }
.figs button .figsvg { width: 90px; height: 96px; }
.figs button[aria-checked="true"] { border-color: var(--glow); color: var(--text); box-shadow: 0 0 20px -8px color-mix(in oklab, var(--glow) 60%, transparent); }
.s-signup .later { margin-top: 12px; font-size: 12px; color: var(--faint); }
.app[data-style="pipboy"] .field input, .app[data-style="pipboy"] .figs button { border-radius: 2px; }

/* figure */
.figsvg .s1 { stop-color: color-mix(in oklab, var(--mid) 70%, var(--deep)); } .figsvg .s2 { stop-color: var(--deep); }
.figsvg .eyes { fill: var(--glow); opacity: 0; }
.figsvg.awk .eyes { transition: opacity .6s var(--ease); }

/* cinematics */
.s-cine, .s-cine2 { background: #000; }
.cine-cv { position: absolute; inset: 0; width: 100%; height: 100%; }
.cine-still { position: absolute; inset: 0; background: radial-gradient(30% 22% at 50% 46%, color-mix(in oklab, var(--glow) 55%, transparent), transparent 70%), repeating-conic-gradient(from 0deg at 50% 46%, color-mix(in oklab, var(--glow) 18%, transparent) 0 1deg, transparent 1deg 9deg), #000; }
.cine-cap { position: absolute; left: 0; right: 0; bottom: 58px; text-align: center; z-index: 2; display: grid; gap: 8px; justify-items: center; padding: 0 24px; }
.cine-t { font-size: calc(40px * var(--ds)); }
.cine-note { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in oklab, var(--text) 45%, transparent); }
.cine-skip { position: absolute; top: 54px; right: 22px; z-index: 3; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in oklab, var(--text) 55%, transparent); padding: 6px 10px; border-radius: 6px; border: 1px solid color-mix(in oklab, var(--text) 18%, transparent); }
.awake { position: absolute; inset: 0; display: grid; place-items: center; }
.awake .figsvg { width: 230px; height: 252px; margin-top: -60px; }
.awake .figsvg .s1, .awake .figsvg .s2 { stop-color: #0d1512; transition: stop-color 1.2s var(--ease); }
.awake .orb { position: absolute; top: 12%; left: 50%; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, var(--glow) 40%, transparent 70%); filter: blur(.5px); opacity: 0; }
.s-cine2.play .orb { animation: soul 2.2s var(--ease) .3s forwards; }
.s-cine2.play .figsvg .s1 { stop-color: color-mix(in oklab, var(--glow) 70%, var(--mid)); transition-delay: 2.1s; }
.s-cine2.play .figsvg .s2 { stop-color: var(--mid); transition-delay: 2.2s; }
.s-cine2.play .figsvg .eyes { opacity: 1; transition-delay: 3s; filter: drop-shadow(0 0 4px var(--glow)); }
.s-cine2.done .figsvg .s1 { stop-color: color-mix(in oklab, var(--glow) 70%, var(--mid)); } .s-cine2.done .figsvg .s2 { stop-color: var(--mid); } .s-cine2.done .figsvg .eyes { opacity: 1; }
.s-cine2.play .awake { animation: halo 1.4s ease-out 2.1s forwards; }
@keyframes soul { 0% { opacity: 0; transform: translateY(-30px) scale(.6); } 20% { opacity: 1; } 85% { opacity: 1; transform: translateY(190px) scale(.9); } 100% { opacity: 0; transform: translateY(205px) scale(2.2); } }
@keyframes halo { from { background: radial-gradient(10% 10% at 50% 40%, color-mix(in oklab, var(--glow) 0%, transparent), transparent); } to { background: radial-gradient(45% 32% at 50% 40%, color-mix(in oklab, var(--glow) 22%, transparent), transparent 70%); } }

/* loader */
.s-loader .body { justify-content: center; }
.ld { text-align: center; display: grid; gap: 14px; justify-items: center; margin-top: -40px; }
.ld-t { font-size: calc(42px * var(--ds)); line-height: 1.02; }
.ld-bar { width: 220px; height: 8px; background: color-mix(in oklab, var(--text) 10%, transparent); -webkit-mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); mask: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); }
.ld-bar i { display: block; height: 100%; width: 0; background: var(--glow); animation: fill 2.5s cubic-bezier(.4,0,.2,1) forwards; }
.static .ld-bar i { width: 64%; animation: none; }
@keyframes fill { to { width: 100%; } }
.ld-log { list-style: none; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: grid; gap: 4px; }
.ld-log li { opacity: 0; animation: up .4s var(--ease) forwards; } .ld-log li:nth-child(1) { animation-delay: .3s; } .ld-log li:nth-child(2) { animation-delay: 1.1s; } .ld-log li:nth-child(3) { animation-delay: 1.9s; }
.static .ld-log li { opacity: 1; animation: none; }
@keyframes up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* character select */
.s-select .h-read { margin-top: 6px; font-size: 19px; }
.s-select .reason { margin-top: 6px; font-size: 12.5px; color: var(--text); opacity: .85; }
.s-select .later { margin-top: 6px; font-size: 11.5px; color: var(--faint); }
.av-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 12px; }
.av-tile { position: relative; width: 100%; display: grid; justify-items: center; gap: 2px; padding: 10px 4px 9px; border-radius: 12px; background: var(--surf); border: 1px solid color-mix(in oklab, var(--text) 8%, transparent); color: var(--muted); transition: border-color .25s, box-shadow .3s var(--ease); }
.av-tile .figsvg { width: 58px; height: 64px; }
.av-tile b { font-family: var(--display); font-weight: var(--dw); text-transform: var(--dtt); letter-spacing: var(--dls); font-size: calc(17px * var(--ds)); color: var(--text); line-height: 1.1; }
.av-tile:hover { border-color: color-mix(in oklab, var(--glow) 40%, transparent); }
.av-tile.rec { border-color: var(--glow); box-shadow: 0 0 24px -6px color-mix(in oklab, var(--glow) 70%, transparent), inset 0 0 18px -10px var(--glow); }
.av-tile.rec .figsvg .eyes { opacity: 1; }
.av-tile.rec b { color: var(--glow); }
.rec-tag { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: var(--glow); color: var(--ink); white-space: nowrap; }
.app[data-style="pipboy"] .av-tile, .app[data-style="pipboy"] .rec-tag { border-radius: 2px; }
.sheet { position: absolute; inset: 0; z-index: 4; background: color-mix(in oklab, var(--bg) 55%, transparent); backdrop-filter: blur(6px); display: flex; align-items: flex-end; animation: fadein .3s var(--ease) both; }
.sheet-in { width: 100%; max-height: 88%; overflow-y: auto; padding: 18px 22px 0; border-radius: 26px 26px 0 0; background: var(--surf); border-top: 1px solid color-mix(in oklab, var(--glow) 30%, transparent); animation: rise .45s var(--ease) both; }
.app[data-style="pipboy"] .sheet-in { border-radius: 2px 2px 0 0; }
.sheet-fig { display: grid; place-items: center; } .sheet-fig .figsvg { width: 120px; height: 130px; } .sheet-fig .eyes { opacity: 1; }
.sheet-name { font-size: calc(52px * var(--ds)); margin-top: 4px; }
.sheet .desc { margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--text); opacity: .9; }
.sheet .bot { padding-bottom: 30px; }
@keyframes fadein { from { opacity: 0; } } @keyframes rise { from { transform: translateY(30px); opacity: 0; } }

/* day-one You */
.s-you.first .body { gap: 9px; }
.chase { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 12px; background: linear-gradient(110deg, color-mix(in oklab, var(--deep) 70%, var(--surf)), var(--surf)); }
.chase .play { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--glow) 18%, transparent); }
.chase .play::after { content: ""; margin-left: 4px; border-left: 12px solid var(--glow); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.chase b { display: block; font-weight: 500; font-size: 15px; color: var(--text); }
.meter.zero b { display: none; }
.mini3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.mini3 b { display: block; font-size: 16px; color: var(--faint); font-weight: 400; }
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.path { text-align: left; display: grid; gap: 4px; align-content: start; }
.path b { font-weight: 500; font-size: 14px; line-height: 1.3; color: var(--text); }
.path .p-read { font-size: 11.5px; line-height: 1.4; }
.app[data-style="pipboy"] .chase, .app[data-style="pipboy"] .chase .play { border-radius: 2px; }

/* red glitch on switch */
.app.glitch .scr { animation: glitch .3s steps(3) 1; }
@keyframes glitch {
  0% { transform: translate(3px, 0); filter: drop-shadow(-4px 0 0 rgba(224,18,16,.85)); }
  33% { transform: translate(-3px, 1px); filter: drop-shadow(4px 0 0 rgba(224,18,16,.75)) contrast(1.2); }
  66% { transform: translate(1px, -1px); filter: drop-shadow(-2px 0 0 rgba(224,18,16,.5)); }
  100% { transform: none; filter: none; }
}

/* ================= NCI Earth demo app: frame + app shell ================= */
:root { --ease: cubic-bezier(.22,1,.36,1); --red: #E01210; }
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; background: #050706; }
body { color: #e8ece9; font-family: "IBM Plex Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--glow, #B0FDFC); outline-offset: 2px; border-radius: 6px; }

.frame-wrap { height: 100vh; height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; background: radial-gradient(60% 70% at 50% 45%, #0d1412, #050706 75%); }
.aside { grid-column: 1; justify-self: end; max-width: 260px; margin-right: 56px; display: grid; gap: 10px; }
.a-wm { display: inline-flex; align-items: center; gap: 10px; font-family: "Bebas Neue", sans-serif; font-size: 30px; letter-spacing: .08em; line-height: 1; color: #e8ece9; }
.a-wm i { width: 1px; height: 22px; background: rgba(232,236,233,.25); }
.a-t { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #7d8a85; }
.a-p { font-size: 13.5px; line-height: 1.6; color: #9aa6a1; }
.device { grid-column: 2; position: relative; width: 392px; height: min(852px, calc(100dvh - 40px)); padding: 10px; border-radius: 56px; background: linear-gradient(155deg, #2a2e2c, #0b0d0c 60%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 50px 100px -40px rgba(0,0,0,.95); }
.device::after { content: ""; position: absolute; top: 21px; left: 50%; width: 96px; height: 28px; margin-left: -48px; border-radius: 20px; background: #000; z-index: 50; pointer-events: none; }
.app { position: relative; height: 100%; border-radius: 46px; overflow: hidden; isolation: isolate; background: var(--bg); color: var(--text); font-family: var(--body);
  --display: "Bebas Neue", sans-serif; --body: "Lexend", sans-serif; --mono: "IBM Plex Mono", monospace; --ds: 1; --dls: .02em; --dtt: uppercase; --dw: 400; --bls: 0; }
.app > .scr { position: absolute; inset: 0; }
.scr { border-radius: 0 !important; }

/* phones: full screen, no bezel, no fake status bar */
@media (max-width: 520px), (max-height: 560px) and (pointer: coarse) {
  .frame-wrap { display: block; }
  .aside { display: none; }
  .device { width: 100%; height: 100vh; height: 100dvh; padding: 0; border-radius: 0; background: none; box-shadow: none; }
  .device::after { display: none; }
  .app { border-radius: 0; }
  .sbar { display: none !important; }
  .scr { padding-top: env(safe-area-inset-top); }
  .homebar { display: none; }
}
@media (max-width: 860px) and (min-width: 521px) { .aside { display: none; } .frame-wrap { grid-template-columns: 1fr auto 1fr; } }

/* ================= shell with tabs ================= */
.shell { display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 20px 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.view::-webkit-scrollbar { display: none; }
.view > * + * { margin-top: 12px; }
.tabbar { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 4px calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid color-mix(in oklab, var(--text) 8%, transparent); background: color-mix(in oklab, var(--bg) 82%, black); position: relative; z-index: 3; }
.tabbar button { display: grid; justify-items: center; gap: 4px; padding: 4px 0; font-family: var(--mono); font-size: 8.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); transition: color .2s; }
.tabbar button[aria-current="page"] { color: var(--glow); }
.app[data-style="pipboy"] .tabbar button[aria-current="page"] { text-shadow: 0 0 8px var(--glow); }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 6px; }
.top .lit { font-size: calc(64px * var(--ds)); }
.icon-btn { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--muted); border: 1px solid color-mix(in oklab, var(--text) 10%, transparent); transition: color .2s, border-color .2s; }
.icon-btn:hover { color: var(--text); border-color: color-mix(in oklab, var(--glow) 35%, transparent); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app[data-style="pipboy"] .icon-btn { border-radius: 2px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 8px 0; }
.back:hover { color: var(--text); }
.sec-t { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px !important; }
.sec-t .lbl a, .sec-t button.lbl { color: var(--glow); letter-spacing: .06em; text-transform: none; font-size: 11px; }
.demo-pill { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; color: var(--faint); border: 1px solid color-mix(in oklab, var(--text) 12%, transparent); }

/* avatar card on You */
.hero-card { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px 12px 6px; }
.hero-card .avfig { width: 116px; height: 128px; }
.hero-card .arch { font-family: var(--display); font-weight: var(--dw); text-transform: var(--dtt); letter-spacing: var(--dls); font-size: calc(30px * var(--ds)); line-height: 1; color: var(--glow); }
.hero-card .st { margin-top: 6px; }
.hero-card .chg { margin-top: 10px; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in oklab, var(--text) 25%, transparent); }
.stage-dots { display: flex; gap: 5px; margin-top: 8px; }
.stage-dots i { width: 22px; height: 5px; background: color-mix(in oklab, var(--text) 12%, transparent); }
.stage-dots i.on { background: var(--glow); box-shadow: 0 0 8px -1px var(--glow); }
.app:is([data-style="clean"], [data-style="calm"]) .stage-dots i { border-radius: 3px; }

/* check-in tiles as buttons */
.ck { text-align: left; width: 100%; }
.ck.done .go { color: var(--muted); }
.ck .num.dash { color: var(--faint); }

/* generic list rows */
.rows { display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 13px 14px; }
.row b { display: block; font-weight: 500; font-size: 14.5px; line-height: 1.3; color: var(--text); }
.row .p-read { font-size: 12.5px; margin-top: 2px; }
.row .chev { color: var(--faint); font-size: 16px; }

/* quests */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: color-mix(in oklab, var(--surf) 70%, var(--bg)); border: 1px solid color-mix(in oklab, var(--text) 7%, transparent); }
.seg button { height: 32px; border-radius: 9px; font-size: 12.5px; color: var(--muted); transition: background .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--surf); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--glow) 35%, transparent); }
.app[data-style="pipboy"] .seg, .app[data-style="pipboy"] .seg button { border-radius: 2px; }
.app[data-style="pipboy"] .seg button[aria-pressed="true"] { background: var(--glow); color: var(--ink); }
.qc { display: grid; gap: 6px; width: 100%; text-align: left; padding: 14px; }
.qc .qt { font-weight: 500; font-size: 16px; line-height: 1.3; color: var(--text); }
.qc .qd { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.qc .qf { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.pips { display: flex; gap: 4px; } .pips i { width: 16px; height: 4px; background: color-mix(in oklab, var(--text) 12%, transparent); } .pips i.on { background: var(--glow); }
.badge { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; background: color-mix(in oklab, var(--glow) 14%, transparent); color: var(--glow); }
.badge.done { background: color-mix(in oklab, var(--text) 8%, transparent); color: var(--muted); }
.badge.coop { background: color-mix(in oklab, var(--red) 16%, transparent); color: #ff8a86; }
.app[data-style="pipboy"] .badge { border-radius: 1px; }

/* quest detail */
.qhead .lit { font-size: calc(40px * var(--ds)); margin-top: 6px; }
.qhead .h-read { margin-top: 8px; font-size: 22px; }
.trains { display: flex; gap: 8px; flex-wrap: wrap; }
.phases { list-style: none; display: grid; gap: 8px; }
.phase { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; }
.phase .n { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-family: var(--mono); font-size: 11px; color: var(--muted); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--text) 22%, transparent); }
.phase.done .n { background: var(--glow); color: var(--ink); box-shadow: none; }
.phase b { font-weight: 500; font-size: 14px; color: var(--text); display: block; }
.phase .p-read { font-size: 12px; }
.phase.done b { color: var(--muted); }
.mini-btn { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--ink); background: var(--act); white-space: nowrap; }
.mini-btn.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--text) 18%, transparent); }
.app[data-style="pipboy"] .mini-btn, .app[data-style="pipboy"] .phase .n { border-radius: 2px; }
.audio { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; }
.audio .play { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--glow) 16%, transparent); }
.audio .play::after { content: ""; margin-left: 4px; border-left: 12px solid var(--glow); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.audio.on .play::after { margin: 0; width: 12px; height: 14px; border: 0; background: linear-gradient(90deg, var(--glow) 0 4px, transparent 4px 8px, var(--glow) 8px 12px); }
.wave { display: flex; align-items: center; gap: 2px; height: 22px; }
.wave i { flex: 1; background: color-mix(in oklab, var(--glow) 45%, transparent); height: var(--h); border-radius: 1px; }
.audio.on .wave i { animation: wv 1s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes wv { to { transform: scaleY(.4); } }

/* measures / checks */
.scale5 { display: grid; gap: 8px; margin-top: 18px; }
.scale5 button { display: flex; justify-content: space-between; align-items: center; height: 52px; padding: 0 16px; border-radius: 12px; background: var(--surf); border: 1px solid color-mix(in oklab, var(--text) 8%, transparent); font-size: 15px; color: var(--text); transition: border-color .2s, background .2s; }
.scale5 button span { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.scale5 button:hover { border-color: color-mix(in oklab, var(--glow) 40%, transparent); }
.scale5 button[aria-pressed="true"] { border-color: var(--glow); background: color-mix(in oklab, var(--surf) 75%, var(--deep)); }
.app[data-style="pipboy"] .scale5 button { border-radius: 2px; }
.app[data-style="pipboy"] .scale5 button[aria-pressed="true"] { background: var(--glow); color: var(--ink); } .app[data-style="pipboy"] .scale5 button[aria-pressed="true"] span { color: var(--ink); }
.mq { display: flex; flex-direction: column; min-height: 100%; }
.mq .h-read { margin-top: 18px; font-size: 22px; }
.mq .bot { margin-top: auto; }
.result-big { display: flex; align-items: baseline; gap: 14px; margin-top: 10px; }
.result-big .was { font-family: var(--mono); font-size: 34px; color: var(--faint); }
.result-big .now { font-family: var(--mono); font-size: 64px; line-height: 1; color: var(--text); }
.result-big .arrow { color: var(--faint); font-size: 22px; }

/* progress */
.grp { padding: 14px; }
.grp .gh { display: flex; justify-content: space-between; align-items: baseline; }
.grp .gh b { font-family: var(--display); font-weight: var(--dw); text-transform: var(--dtt); letter-spacing: var(--dls); font-size: calc(26px * var(--ds)); color: var(--text); }
.grp .gh .num { font-size: 22px; color: var(--text); }
.el { display: grid; grid-template-columns: 96px minmax(0, 1fr) 32px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid color-mix(in oklab, var(--text) 7%, transparent); font-size: 12.5px; color: var(--muted); }
.el:first-of-type { margin-top: 10px; }
.el .bar { height: 5px; background: color-mix(in oklab, var(--text) 9%, transparent); position: relative; }
.el .bar i { position: absolute; inset: 0 auto 0 0; width: var(--v); background: linear-gradient(90deg, var(--mid), var(--glow)); }
.app:is([data-style="pixel"], [data-style="pipboy"]) .el .bar { -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px); mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 7px); }
.app:is([data-style="clean"], [data-style="calm"]) .el .bar, .app:is([data-style="clean"], [data-style="calm"]) .el .bar i { border-radius: 3px; }
.el .num { text-align: right; color: var(--text); font-size: 13px; }
.el .num.dash { color: var(--faint); }
.grp .p-btn { margin-top: 12px; height: 42px; font-size: 13.5px; }
.chart { padding: 14px; }
.chart svg { width: 100%; height: 90px; display: block; margin-top: 8px; overflow: visible; }
.chart .ln { fill: none; stroke: var(--glow); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.chart .ar { fill: color-mix(in oklab, var(--glow) 10%, transparent); }
.chart .gl { stroke: color-mix(in oklab, var(--text) 8%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .dot { fill: var(--glow); }
.empty { text-align: center; padding: 22px 16px; font-size: 13px; color: var(--muted); }

/* circle */
.me-row, .fr { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px 10px 8px; }
.fr .avfig, .me-row .avfig { width: 52px; height: 58px; }
.fr b, .me-row b { display: block; font-weight: 500; font-size: 14.5px; color: var(--text); }
.fr .meta { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.fr .side { display: grid; justify-items: end; gap: 6px; }
.fr .side .num { font-size: 18px; color: var(--text); }
.hf { height: 28px; padding: 0 10px; border-radius: 7px; font-size: 11.5px; color: var(--muted); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--text) 18%, transparent); transition: all .2s; }
.hf[aria-pressed="true"] { color: var(--ink); background: var(--glow); box-shadow: none; }
.app[data-style="pipboy"] .hf { border-radius: 2px; }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; width: 100%; text-align: left; }
.toggle b { font-weight: 500; font-size: 14px; color: var(--text); display: block; }
.toggle .p-read { font-size: 12px; }
.sw { width: 44px; height: 26px; flex: none; border-radius: 13px; background: color-mix(in oklab, var(--text) 14%, transparent); position: relative; transition: background .25s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform .3s var(--ease); }
.toggle[aria-checked="true"] .sw { background: var(--act); } .toggle[aria-checked="true"] .sw::after { transform: translateX(18px); background: var(--ink); }
.app[data-style="pipboy"] .sw, .app[data-style="pipboy"] .sw::after { border-radius: 2px; }
.invite { padding: 14px; border-color: color-mix(in oklab, var(--red) 35%, transparent) !important; }
.invite .h { font-weight: 500; font-size: 15.5px; margin: 6px 0 4px; color: var(--text); }
.invite .acts { display: flex; gap: 8px; margin-top: 12px; }

/* resources */
.res { display: grid; gap: 6px; padding: 16px; width: 100%; text-align: left; position: relative; overflow: hidden; }
.res.feature { padding: 20px 16px; background: radial-gradient(90% 120% at 100% 0%, color-mix(in oklab, var(--deep) 80%, transparent), transparent 70%), var(--surf); }
.res b { font-weight: 500; font-size: 16px; color: var(--text); }
.res .p-read { font-size: 12.5px; }
.res .ext { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--glow); margin-top: 4px; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* settings */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips button { height: 34px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; color: var(--muted); background: var(--surf); border: 1px solid color-mix(in oklab, var(--text) 9%, transparent); display: inline-flex; align-items: center; gap: 7px; }
.chips button[aria-pressed="true"] { color: var(--text); border-color: var(--glow); }
.chips .sw3 { display: inline-flex; } .chips .sw3 i { width: 7px; height: 14px; }
.app[data-style="pipboy"] .chips button { border-radius: 2px; }
.set-grp { padding: 14px; }
.set-grp + .set-grp { margin-top: 10px; }
.danger { color: #ff8a86 !important; }

/* sheets, toast, coach, evolution */
.ov { position: absolute; inset: 0; z-index: 30; }
.sheet { position: absolute; inset: 0; z-index: 30; }
.sheet-in .h-read { font-size: 20px; margin-top: 6px; }
.slider { width: 100%; margin: 22px 0 6px; -webkit-appearance: none; appearance: none; height: 6px; background: linear-gradient(90deg, var(--glow) var(--p, 50%), color-mix(in oklab, var(--text) 14%, transparent) var(--p, 50%)); border-radius: 3px; outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 4px var(--bg), 0 0 14px var(--glow); cursor: pointer; }
.slider::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--text); border: 4px solid var(--bg); }
.app[data-style="pipboy"] .slider::-webkit-slider-thumb { border-radius: 2px; }
.sl-val { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.sl-big { font-family: var(--mono); font-size: 54px; color: var(--text); text-align: center; margin-top: 10px; line-height: 1; }
.toast { position: absolute; left: 16px; right: 16px; bottom: 96px; z-index: 40; padding: 12px 14px; border-radius: 12px; background: color-mix(in oklab, var(--surf) 92%, var(--text)); border: 1px solid color-mix(in oklab, var(--glow) 30%, transparent); color: var(--text); font-size: 13px; line-height: 1.45; box-shadow: 0 20px 40px -20px #000; animation: rise .35s var(--ease) both; }
.app[data-style="pipboy"] .toast { border-radius: 2px; }
.coach { position: absolute; inset: 0; z-index: 35; background: color-mix(in oklab, var(--bg) 70%, transparent); backdrop-filter: blur(3px); display: flex; align-items: flex-end; padding: 0 16px 104px; animation: fadein .3s both; }
.coach-in { width: 100%; padding: 18px; border-radius: 18px; background: var(--surf); border: 1px solid var(--glow); box-shadow: 0 0 30px -10px var(--glow); }
.coach-in .h-read { font-size: 19px; margin: 6px 0; }
.coach-in .row2 { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.app[data-style="pipboy"] .coach-in { border-radius: 2px; }
.evo { position: absolute; inset: 0; z-index: 45; background: #000; display: grid; place-items: center; overflow: hidden; }
.evo .avfig { width: 250px; height: 276px; position: relative; z-index: 2; }
.evo .flash { position: absolute; inset: 0; background: var(--glow); opacity: 0; z-index: 3; pointer-events: none; }
.evo.go .flash { animation: flash 1.1s ease-out .9s; }
.evo .from, .evo .to { position: absolute; inset: 0; display: grid; place-items: center; }
.evo .to { opacity: 0; } .evo.go .from { animation: out .2s linear 1.35s forwards; } .evo.go .to { animation: in .5s var(--ease) 1.4s forwards; }
.evo .rays { position: absolute; inset: -40%; background: repeating-conic-gradient(from 0deg, color-mix(in oklab, var(--glow) 16%, transparent) 0 2deg, transparent 2deg 12deg); opacity: 0; z-index: 1; }
.evo.go .rays { animation: rays 3s ease-out 1.3s forwards; }
.evo .cap { position: absolute; left: 0; right: 0; bottom: 70px; text-align: center; z-index: 4; display: grid; gap: 8px; justify-items: center; opacity: 0; padding: 0 24px; }
.evo.go .cap { animation: in .6s var(--ease) 2s forwards; }
.evo .cap .lit { font-size: calc(48px * var(--ds)); }
.evo .cap .p-read { color: var(--text); opacity: .8; }
@keyframes flash { 0% { opacity: 0; } 35% { opacity: .95; } 100% { opacity: 0; } }
@keyframes out { to { opacity: 0; } } @keyframes in { to { opacity: 1; } }
@keyframes rays { 0% { opacity: 0; transform: rotate(0) scale(.6); } 30% { opacity: 1; } 100% { opacity: .55; transform: rotate(40deg) scale(1); } }

/* avatar figure */
.avfig { display: block; overflow: visible; }
.avfig .s1 { stop-color: color-mix(in oklab, var(--mid) 70%, var(--deep)); } .avfig .s2 { stop-color: var(--deep); }
.avfig.st3 .s1, .avfig.st4 .s1 { stop-color: color-mix(in oklab, var(--glow) 45%, var(--mid)); }
.avfig.st4 .s1 { stop-color: color-mix(in oklab, var(--glow) 72%, var(--mid)); } .avfig.st4 .s2 { stop-color: var(--mid); }
.avfig .eyes { fill: var(--glow); opacity: .35; } .avfig.st2 .eyes, .avfig.st3 .eyes, .avfig.st4 .eyes { opacity: 1; filter: drop-shadow(0 0 3px var(--glow)); }
.avfig .mantle { fill: none; stroke: color-mix(in oklab, var(--glow) 55%, transparent); stroke-width: 1.4; }
.avfig .aura { fill: none; stroke: var(--glow); stroke-width: 1; opacity: .35; stroke-dasharray: 2 5; }
.avfig.st4 .aura { opacity: .75; stroke-dasharray: none; }
.avfig .prop { fill: none; stroke: var(--glow); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px color-mix(in oklab, var(--glow) 70%, transparent)); }
.avfig .prop .fillp { fill: var(--glow); stroke: none; }
.avfig .spark { fill: var(--glow); }
.avfig .emb { fill: none; stroke: var(--glow); stroke-width: 1.4; opacity: .9; }
.av-tile .avfig { width: 58px; height: 64px; }
.av-tile .figsvg { display: none; }

/* misc */
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px !important; }
.note { font-size: 11.5px; line-height: 1.5; color: var(--faint); }

.coach-acts { display: grid; gap: 8px; margin-top: 16px; }
.coach-acts .p-btn { height: 46px; }
.evo.done .from { opacity: 0; } .evo.done .to, .evo.done .cap { opacity: 1; } .evo.done .rays { opacity: .55; transform: rotate(40deg); }

/* ================= lean layout (all styles) ================= */
.bar-top { display: flex; justify-content: space-between; align-items: center; min-height: 46px; padding-top: 6px; }
.page-t { font-size: calc(34px * var(--ds)); }
.day { font-size: 13px; color: var(--muted); }
.hint { font-size: 13px; line-height: 1.5; color: var(--muted); }
.dim { color: var(--faint); font-size: 12.5px; }
.hero { display: grid; justify-items: center; gap: 8px; width: 100%; margin-top: 2px !important; border-radius: 18px; padding: 4px 0 8px; }
.hero:hover .avfig { filter: drop-shadow(0 0 12px color-mix(in oklab, var(--glow) 35%, transparent)); }
.avfig.big { width: 180px; height: 198px; }
.hero-name { font-size: calc(30px * var(--ds)); text-align: center; }
.score { margin-top: 20px !important; }
.score-row { display: flex; align-items: baseline; gap: 10px; }
.score-n { font-size: 54px; line-height: 1; font-weight: 500; color: var(--text); }
.score-t { font-size: 14px; color: var(--muted); }
.score .meter { margin: 12px 0 8px; }
.pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px !important; }
.pill { position: relative; display: grid; gap: 2px; justify-items: start; padding: 12px 14px; border-radius: 14px; background: var(--surf); text-align: left; transition: box-shadow .2s; }
.pill span { font-size: 12.5px; color: var(--muted); }
.pill b { font-size: 22px; font-weight: 500; color: var(--text); }
.pill.done::after { content: ""; position: absolute; top: 12px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--glow); }
.pill:hover, .qrow:hover, .step:hover, .grp-h:hover, .rrow:hover, .link-row:hover, .feature2:hover { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--glow) 30%, transparent); }
.link-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--surf); font-size: 14.5px; color: var(--text); text-align: left; margin-top: 10px !important; }
.link-row .dim { margin-left: auto; }
.play-s { position: relative; width: 30px; height: 30px; flex: none; border-radius: 50%; background: color-mix(in oklab, var(--glow) 16%, transparent); }
.play-s::after { content: ""; position: absolute; left: 12px; top: 9px; border-left: 9px solid var(--glow); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.link-row.on .play-s::after { left: 10px; top: 10px; width: 10px; height: 10px; border: 0; background: linear-gradient(90deg, var(--glow) 0 3px, transparent 3px 7px, var(--glow) 7px 10px); }
.cta { display: grid; gap: 6px; margin-top: 22px !important; }
.sec { font-size: 13px; color: var(--muted); margin-top: 22px !important; }
.qlist2 { display: grid; gap: 8px; margin-top: 8px !important; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t s" "m s"; gap: 3px 12px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--surf); transition: box-shadow .2s; }
.qrow .qt { grid-area: t; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--text); }
.qrow .qm { grid-area: m; font-size: 12.5px; color: var(--muted); }
.qrow .qs { grid-area: s; align-self: center; font-size: 13px; color: var(--glow); font-variant-numeric: tabular-nums; }
.qrow.is-done .qt { color: var(--muted); }
.q-title { font-size: 24px; margin-top: 4px; }
.q-desc { font-size: 15px; line-height: 1.55; color: var(--text); opacity: .85; margin-top: 10px; }
.steps { list-style: none; display: grid; gap: 8px; margin-top: 20px !important; }
.step { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 14px; background: var(--surf); font-size: 15px; color: var(--text); transition: box-shadow .2s, color .2s; }
.step .tick { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--text) 28%, transparent); }
.step.done { color: var(--muted); }
.step.done .tick { background: var(--glow); box-shadow: none; }
.step.done .tick::after { content: "✓"; font-size: 12px; color: var(--ink); }
.prog3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 14px; }
.prog3 i { height: 3px; border-radius: 2px; background: color-mix(in oklab, var(--text) 12%, transparent); }
.prog3 i.on { background: var(--glow); }
.done-screen { text-align: center; padding-top: 18vh; }
.done-screen .grp-b { text-align: left; margin-top: 18px; padding: 0; }
.delta { display: flex; justify-content: center; align-items: baseline; gap: 14px; margin: 10px 0; }
.delta .was { font-size: 32px; color: var(--faint); }
.delta .arr { color: var(--faint); font-size: 20px; }
.delta .now { font-size: 76px; line-height: 1; color: var(--text); }
.grps { display: grid; gap: 8px; margin-top: 22px !important; }
.grp2 { border-radius: 16px; background: var(--surf); overflow: hidden; }
.grp-h { display: grid; grid-template-columns: minmax(0, 1fr) auto 22px; gap: 12px; align-items: center; width: 100%; padding: 16px; font-size: 15.5px; color: var(--text); text-align: left; }
.grp-h b { font-size: 20px; font-weight: 500; }
.chev { color: var(--faint); font-size: 18px; text-align: right; }
.grp-b { padding: 0 16px 16px; display: grid; gap: 11px; }
.grp-b .p-btn { margin-top: 6px; height: 44px; font-size: 14px; }
.el2 { display: grid; grid-template-columns: 100px minmax(0, 1fr) 30px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.el2 .bar { height: 4px; border-radius: 2px; background: color-mix(in oklab, var(--text) 9%, transparent); position: relative; }
.el2 .bar i { position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: 2px; background: var(--glow); }
.el2 b { text-align: right; font-weight: 500; font-size: 13.5px; color: var(--text); }
.spark2 { width: 100%; height: 80px; margin-top: 16px; display: block; overflow: visible; }
.spark2 .ln { fill: none; stroke: var(--glow); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.spark2 .ar { fill: color-mix(in oklab, var(--glow) 8%, transparent); }
.flist { display: grid; gap: 6px; margin-top: 14px !important; }
.frow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 12px 8px 6px; border-radius: 14px; background: var(--surf); }
.frow .avfig { width: 44px; height: 48px; }
.fn b { display: block; font-size: 14.5px; font-weight: 500; color: var(--text); }
.fn span { font-size: 12px; color: var(--muted); }
.fs { font-size: 17px; color: var(--text); min-width: 28px; text-align: right; }
.hf2 { width: 36px; height: 36px; border-radius: 50%; font-size: 15px; background: color-mix(in oklab, var(--text) 6%, transparent); filter: grayscale(1); opacity: .65; transition: all .2s; }
.hf2[aria-pressed="true"] { background: color-mix(in oklab, var(--glow) 22%, transparent); filter: none; opacity: 1; }
.toggle2 { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 16px; margin-top: 16px !important; border-radius: 14px; background: var(--surf); font-size: 14.5px; color: var(--text); }
.toggle2[aria-checked="true"] .sw { background: var(--act); } .toggle2[aria-checked="true"] .sw::after { transform: translateX(18px); background: var(--ink); }
.invite2 { padding: 16px; border-radius: 16px; background: var(--surf); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--glow) 30%, transparent); margin-top: 14px !important; }
.inv-t { font-size: 16px; font-weight: 500; line-height: 1.35; color: var(--text); margin: 4px 0 12px; }
.invite2 .acts { display: flex; gap: 8px; }
.feature2 { display: grid; gap: 4px; width: 100%; text-align: left; padding: 22px 18px; border-radius: 18px; background: radial-gradient(90% 130% at 100% 0%, color-mix(in oklab, var(--deep) 75%, transparent), transparent 70%), var(--surf); margin-top: 14px !important; }
.feature2 b { font-size: 19px; font-weight: 600; color: var(--text); }
.rlist { display: grid; gap: 6px; margin-top: 10px !important; }
.rrow { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 16px; border-radius: 14px; background: var(--surf); font-size: 15px; color: var(--text); }
.app[data-style="pipboy"] :is(.pill, .link-row, .qrow, .step, .grp2, .frow, .toggle2, .invite2, .feature2, .rrow, .hf2) { border-radius: 2px; }

/* ================= CALM: one typeface, no effects ================= */
.app[data-style="calm"] .lit:not(.pxd) { background: none; -webkit-text-fill-color: currentColor; color: var(--text); text-shadow: none; font-weight: 600; letter-spacing: -.02em; text-transform: none; line-height: 1.12; }
.app[data-style="calm"] .lbl { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 12.5px; color: var(--muted); }
.app[data-style="calm"] :is(.m, .num, .mono) { font-family: var(--body); letter-spacing: 0; }
.app[data-style="calm"] .card { border-color: transparent; }
.app[data-style="calm"] .s-globe .ttl { font-size: 32px; }
.app[data-style="calm"] .ld-t { font-size: 28px; }
.app[data-style="calm"] .cine-t { font-size: 28px; }
.app[data-style="calm"] .sheet-name { font-size: 32px; }
.app[data-style="calm"] .evo .cap .lit { font-size: 32px; }
.app[data-style="calm"] .av-tile b { font-family: var(--body); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 13px; }
.app[data-style="calm"] .rec-tag { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 9.5px; }
.app[data-style="calm"] .cine-note, .app[data-style="calm"] .ld-log, .app[data-style="calm"] .qhint, .app[data-style="calm"] .g-read .kind, .app[data-style="calm"] .cine-skip { font-family: var(--body); letter-spacing: 0; text-transform: none; }
.app[data-style="calm"] .tabbar button { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 10.5px; }
.app[data-style="calm"] .segs6 i, .app[data-style="calm"] .meter { border-radius: 3px; }
.app[data-style="calm"] .bub .rank { font-family: var(--body); letter-spacing: 0; text-transform: none; }
.app[data-style="calm"] .lbl .rd { display: none; }
