:root{
  --bg:#070b14; --panel:#0e1626; --panel2:#111d33; --line:#1d2c47;
  --text:#eef4ff; --soft:#c9d6ee; --muted:#8fa3bf; --accent:#35e0c8; --accent2:#7aa2ff;
  --radius:18px;
  /* --ah = the TRUE visible app height in px, set from JS (innerHeight).
     dvh/vh over-report the visible height in some shells (in-app browsers,
     WebViews, standalone windows inset by system bars) — that mismatch is
     what let earlier builds scroll ~half an inch and hide buttons. All
     height-critical sizing derives from --ah so the layout is built on the
     height the user can actually see. Falls back to 100dvh pre-JS. */
  --ah:100dvh;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html{scroll-behavior:smooth; height:100%; overscroll-behavior:none}
html,body{overflow-x:hidden}
.scene > *{min-width:0}
body{margin:0; background:var(--bg); color:var(--text); font-size:16.5px;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  /* Fixed to the window: the body can never be taller than the screen it
     sits in, so the DOCUMENT has nothing to scroll — in any shell. */
  position:fixed; inset:0;
  display:flex; flex-direction:column; overflow:hidden; overscroll-behavior:none;
  background-image:radial-gradient(1px 1px at 12% 22%,#ffffff55 50%,transparent 51%),
    radial-gradient(1px 1px at 78% 8%,#ffffff44 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 35%,#ffffff33 50%,transparent 51%),
    radial-gradient(1px 1px at 88% 48%,#ffffff44 50%,transparent 51%),
    radial-gradient(1px 1px at 30% 60%,#ffffff2e 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 65% 78%,#ffffff2e 50%,transparent 51%)}
.hidden{display:none !important}

/* Dex rule: no visible scrollbars, ever — scrolling keeps working, the bar just isn't drawn */
html{scrollbar-width:none; -ms-overflow-style:none}
*{scrollbar-width:none}
::-webkit-scrollbar, *::-webkit-scrollbar{width:0 !important; height:0 !important; display:none !important}

/* top bar */
.topbar{flex:none; display:flex; justify-content:space-between; align-items:center;
  padding:12px 18px; background:rgba(7,11,20,.85); backdrop-filter:blur(8px); border-bottom:1px solid var(--line)}
.brand{font-weight:800; letter-spacing:.4px; font-size:19px}
.brand-mark{color:var(--accent)}
.ghost-btn{background:none; border:1px solid var(--line); color:var(--muted); border-radius:999px; padding:8px 15px; font-size:14px; cursor:pointer}
.ghost-btn:active{transform:scale(.97)}

/* main NEVER scrolls: the entry is built to fit one fixed screen, and in
   the journey the transform pager owns all vertical movement — a native
   main scroller only ever let the entry page drift and trap content. */
main{flex:1; min-height:0; overflow:hidden; width:100%; max-width:1120px; margin:0 auto; padding:0 16px}

/* ---------- entry: one screen, no scroll; display up top, controls in the bottom half ---------- */
/* batch #5 (Dex): batch #4's centered group read as ONE solid block in
   the middle with void above and below. The space is now SPLIT: a small
   gap at the top, the header block, a real breathing gap, the form in
   the bottom portion, a small gap below. margin-top:auto on the form
   sends ALL the slack to the middle gap — at zero-slack heights the
   layout packs exactly like batch #4's verified fit. */
.entry{height:100%; display:flex; flex-direction:column; justify-content:flex-start;
  max-width:520px; margin:0 auto; gap:clamp(10px, calc(var(--ah)*.026), 26px);
  padding:clamp(8px, calc(var(--ah)*.032), 34px) 4px calc(12px + env(safe-area-inset-bottom));
  overflow:hidden; touch-action:none}
.entry-head{text-align:center; flex:none}
.entry-icon{width:clamp(56px, calc(var(--ah)*.118), 124px); height:clamp(56px, calc(var(--ah)*.118), 124px);
  border-radius:50%; background:transparent; border:none}
  /* the artwork (icon-circle.png) carries its OWN margin: batch #5
     padded the asset so the composed circle spans ~90% of its canvas
     with transparent air on all four sides — the raw art fills 99% of
     the frame, so ANY full-bleed circular display sliced the rim art
     at the tips (Dex, three times). With the padding in the asset,
     entry + hero + install sheet all show the whole circle. */
.entry-head h1{font-size:clamp(16px, min(5.2vw, calc(var(--ah)*.034)), 27px); line-height:1.25; margin:calc(var(--ah)*.008) 0 calc(var(--ah)*.005)}
.entry-head h1 em{color:var(--accent); font-style:normal}
.entry-sub{color:var(--muted); font-size:16px; line-height:1.5; margin:0}
.dob-readout{margin:calc(var(--ah)*.009) 0 0; font-size:19px; color:var(--muted)}
.dob-readout b{color:var(--accent); font-size:21px}
.entry-controls{display:flex; flex-direction:column; gap:clamp(5px, calc(var(--ah)*.009), 12px); flex:none; margin-top:auto}
.field{display:block; text-align:left}
.field > span{display:block; font-size:clamp(12px, 3.8vw, 14.5px); color:var(--muted); margin-bottom:clamp(4px, calc(var(--ah)*.008), 7px); font-weight:600}
.field small{opacity:.75}
.name-field input{width:100%; padding:clamp(10px, calc(var(--ah)*.006 + 5px), 16px); border-radius:12px; border:1.5px solid var(--line);
  background:#0a1120; color:var(--text); font-size:20px; font-weight:600; text-align:center; color-scheme:dark; outline:none}
.name-field input::placeholder{color:#8499bd; opacity:1}
.name-field input:focus{border:1.5px solid transparent;
  background:linear-gradient(#0a1120,#0a1120) padding-box, linear-gradient(90deg,var(--accent),#2bb7d8) border-box}
.cta{width:100%; padding:clamp(11px, calc(var(--ah)*.006 + 5px), 16px); border:none; border-radius:14px; cursor:pointer;
  background:linear-gradient(90deg,var(--accent),#2bb7d8); color:#04241f;
  font-size:18px; font-weight:800}
.cta:active{transform:scale(.98)}
.cta[disabled]{opacity:.7; cursor:default}
/* the entry CTA: label perfectly centered (the arrow is OUT of the text
   flow, pinned right) — a fat rounded play-triangle, not a text glyph */
.cta-main{position:relative}
.cta-main .cta-label{display:block; text-align:center}
.cta-arrow{position:absolute; right:16px; top:50%; transform:translateY(-50%);
  width:21px; height:21px; color:#04241f; display:flex; pointer-events:none}
.cta-arrow svg{width:100%; height:100%; display:block}
.privacy{color:var(--muted); font-size:13px; margin:0; text-align:center}

/* birthday selectors: Month / Day / Year — tap any, in any order */
.sel-row{display:flex; gap:8px}
.sel-btn{flex:1; background:#0a1120; border:1px solid var(--line); border-radius:12px; padding:6px 4px 7px;
  cursor:pointer; color:var(--text); display:flex; flex-direction:column; align-items:center; gap:2px; min-height:clamp(48px, calc(var(--ah)*.078), 64px)}
.sel-btn .sel-lbl{font-size:12.5px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase; color:var(--muted)}
.sel-btn .sel-val{font-size:19px; font-weight:800}
.sel-btn.active{border-color:var(--accent); box-shadow:0 0 0 1px var(--accent)}
.sel-btn.active .sel-lbl{color:var(--accent)}
.sel-btn.set .sel-val{color:var(--accent)}

/* picker panel (swaps in place above the CTA — the page never scrolls) */
.dob-picker{background:#0a1120; border:1px solid var(--line); border-radius:16px; padding:12px; margin-top:10px;
  max-height:calc(var(--ah)*.40); overflow-y:auto; touch-action:pan-y}
.dp-title{font-size:15px; color:var(--muted); margin:2px 0 9px; font-weight:700; text-align:left}
.dp-grid{display:grid; gap:8px}
.dp-grid.cols2{grid-template-columns:repeat(2,1fr)}
.dp-grid.cols4{grid-template-columns:repeat(4,1fr)}
.dp-grid.cols5{grid-template-columns:repeat(5,1fr)}
.dp-grid.cols7{grid-template-columns:repeat(7,1fr)}
.dp-btn{background:var(--panel); border:1px solid var(--line); color:var(--text); border-radius:12px;
  padding:13px 2px; font-size:17px; font-weight:700; cursor:pointer}
.dp-btn:active{transform:scale(.96)}
.dp-btn.sel{background:var(--accent); color:#04241f; border-color:var(--accent)}
.dp-btn .tail{color:var(--accent); font-size:1.3em; font-weight:900}
.dp-btn.sel .tail{color:#04241f}
/* year picker: one quick scroll of full years, uniform style */
.year-scroll{max-height:calc(var(--ah)*.32); overflow-y:auto; padding:2px; position:relative; touch-action:pan-y}
.dp-btn.yr{display:block; width:100%; text-align:center; font-size:20px; padding:12px; margin-bottom:6px}
.dp-btn.yr.sel{background:var(--accent); color:#04241f; border-color:var(--accent)}
/* while a picker panel is open, the entry head shrinks so everything still fits one screen */
.entry.panel-open .entry-icon{width:clamp(30px, calc(var(--ah)*.055), 44px); height:clamp(30px, calc(var(--ah)*.055), 44px)}
.entry.panel-open .entry-head h1{font-size:19px; margin:6px 0 4px}
.entry.panel-open .entry-sub{display:none}
.entry.panel-open .dob-readout{margin-top:6px; font-size:16px}
.dp-grid.cols7 .dp-btn{padding:10px 0; font-size:16px}
.dp-err{color:#ff9c9c; font-size:14.5px; margin:10px 0 0; text-align:left}
@media(max-height:740px){
  .dob-readout{font-size:17px}
  .dp-btn{padding:10px 2px}
}

/* ---------- the journey: one screen per scene, swipe to page ---------- */
/* ---------- the journey: transform pager — one screen per scene, one
   swipe per chapter, guaranteed by the pager itself (app.js), not by
   scroll geometry. Scenes are absolutely stacked in a clipped viewport;
   vertical gestures anywhere page the chapter; horizontal rails keep
   their own native pan-x (see .carousel/.hpages touch-action). ---------- */
#storyView{position:relative; height:100%; overflow:hidden; touch-action:none}
.scene{position:absolute; inset:0; height:100%; min-height:0;
  display:flex; flex-direction:column; padding:20px 2px calc(12px + env(safe-area-inset-bottom)); overflow:hidden}
#storyView.anim .scene{transition:transform .48s cubic-bezier(.22,.8,.26,1)}
.scene.far{visibility:hidden}
.rv{opacity:0; transform:translateY(24px); transition:opacity .65s ease, transform .65s cubic-bezier(.2,.7,.2,1);
  transition-delay:var(--d,0s)}
.rv.in{opacity:1; transform:none}
.scene-bottom{margin-top:auto; padding-top:12px; display:flex; flex-direction:column; gap:10px; flex:none}
.scene-mid{flex:1; min-height:0; display:flex; flex-direction:column}
.scene-mid .carousel{flex:1; min-height:0; align-items:stretch}
#sceneWild .carousel{flex:1; min-height:0}

/* chapter dot navigation — top right, page indicator style */
.dotnav{position:fixed; right:10px; top:calc(57px + 10px); z-index:30;
  display:flex; flex-direction:column; gap:12px}
.dotnav button{background:none; border:none; padding:4px; cursor:pointer; display:flex; align-items:center; gap:7px; flex-direction:row-reverse}
.dotnav i{width:8px; height:8px; border-radius:50%; border:2px solid var(--muted); display:block; transition:all .3s}
.dotnav button.active i{background:var(--accent); border-color:var(--accent); transform:scale(1.35)}
.dotnav button::before{content:attr(data-label); font-size:11px; font-weight:800; letter-spacing:1.2px;
  text-transform:uppercase; color:var(--accent); opacity:0; transform:translateX(4px); transition:all .3s; pointer-events:none}
.dotnav button.active::before{opacity:1; transform:none}
@media(max-width:520px){.dotnav{right:5px; gap:10px}.dotnav button::before{display:none}}

/* ---------- hero (page one: hero + chapter zero, consolidated) ---------- */
.hero{text-align:center; align-items:center; justify-content:space-evenly; padding-bottom:calc(56px + env(safe-area-inset-bottom))}
.hero-avatar{width:64px; height:64px; border-radius:50%; margin-bottom:10px;
  box-shadow:0 12px 44px rgba(53,224,200,.22); animation:floaty 5.5s ease-in-out infinite}
@keyframes floaty{0%,100%{transform:translateY(0) rotate(-1.2deg)}50%{transform:translateY(-9px) rotate(1.2deg)}}
.hero-kicker{color:var(--accent); font-weight:800; letter-spacing:2.5px; text-transform:uppercase; font-size:13px; margin:0}
.hero-seconds{font-size:clamp(38px,9.8vw,100px); font-weight:900; font-variant-numeric:tabular-nums; line-height:1.02; margin-top:4px; max-width:100%; white-space:nowrap}
/* fitHero() steps (app.js measures the real overflow — see fitHero):
   full sizes stay wherever they fit; these only land on screens whose
   height × font-scale would otherwise push chapter zero off page one */
.hero.tight1 .fd-kicker{font-size:14px}
.hero.tight1 .firstday{font-size:15px}
.hero.tight1 .fd-count{font-size:15px}
.hero.tight1 .gen-line{font-size:15.5px}
.hero.tight1 .hero-line{font-size:14.5px}
.hero.tight1 .hero-seconds{font-size:34px}
.hero.tight2 .fd-kicker{font-size:12.5px}
.hero.tight2 .firstday{font-size:13px}
.hero.tight2 .fd-count{font-size:13.5px}
.hero.tight2 .gen-line{font-size:14px}
.hero.tight2 .hero-line{font-size:13.5px}
.hero.tight2 .hero-seconds{font-size:30px}
.hero.tight2 .hero-avatar{width:40px; height:40px}
.hero.tight3 .fd-kicker{font-size:11px}
.hero.tight3 .firstday{font-size:11.5px}
.hero.tight3 .fd-count{font-size:12px}
.hero.tight3 .gen-line{font-size:12.5px}
.hero.tight3 .hero-line{font-size:12px}
.hero.tight3 .hero-seclabel{font-size:12.5px}
.hero.tight3 .hero-seconds{font-size:26px}
.hero.tight3 .hero-avatar{width:32px; height:32px}
.hero.tight3 .hs-num{font-size:19px}
.hero.tight3 .hs-label{font-size:11.5px}
.hero-seclabel{font-size:14.5px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:var(--soft); margin:4px 0 0}
.hero-line{color:var(--muted); font-size:16px; margin:9px auto 0; max-width:540px; line-height:1.45}
.hero-line b{color:var(--text)}
.hero-trio{display:grid; grid-template-columns:repeat(3,1fr); margin:12px auto 0; max-width:840px; width:100%}
.hstat{padding:4px 8px; display:flex; flex-direction:column; align-items:center; min-width:0}
.hstat + .hstat{border-left:1px solid var(--line)}
.hs-num{display:flex; align-items:flex-end; justify-content:center; height:1.12em; font-size:clamp(23px,5.4vw,38px); font-weight:850; font-variant-numeric:tabular-nums; line-height:1.12}
.hs-label{display:block; color:var(--soft); font-size:14px; font-weight:700; letter-spacing:1px;
  text-transform:uppercase; margin-top:6px; line-height:1.4; height:5.6em; overflow:hidden}
.scroll-cue{position:absolute; bottom:12px; left:0; right:0; color:var(--muted); font-size:11.5px; font-weight:700;
  letter-spacing:2px; text-transform:uppercase; display:flex; flex-direction:column; align-items:center; gap:0; line-height:1.3}
.scroll-cue span{font-size:15px; line-height:1.15; animation:cueDrop 1.8s ease-in-out infinite}
@keyframes cueDrop{0%,100%{transform:translateY(0); opacity:.5}50%{transform:translateY(6px); opacity:1}}
/* chapter zero, squeezed onto page one under the hero stats */
.hero-first{width:100%; max-width:660px; margin:0 auto; text-align:center;
  border-top:1px solid var(--line); padding-top:8px}
.fd-kicker{color:var(--accent); font-weight:800; letter-spacing:2.2px; text-transform:uppercase;
  font-size:16px; margin:0 0 5px; text-align:center}
.hero .firstday{font-size:17.4px; line-height:1.42; margin:0 auto}
.hero .fd-count{font-size:16.5px; margin-bottom:6px; line-height:1.35}
.hero .gen-line{font-size:17px; margin-top:7px; line-height:1.38}

/* ---------- chapter scaffolding ---------- */
.ch-kicker{color:var(--accent); font-weight:800; letter-spacing:2.5px; text-transform:uppercase; font-size:12.5px; margin:0 0 7px}
.scene h3{font-size:clamp(31px,7vw,46px); margin:0 0 6px; font-weight:850; line-height:1.08}
.ch-icon{margin-right:8px}
.ch-sub{color:var(--muted); margin:0 0 20px; font-size:16.5px; line-height:1.55; max-width:600px}
/* horizontal sub-pages inside a chapter */
.hpages{flex:1; min-height:0; display:flex; overflow-x:auto; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; touch-action:pan-x;
  scroll-snap-type:x mandatory}
.hpage{flex:0 0 100%; scroll-snap-align:start; scroll-snap-stop:always; display:flex; padding:0 2px; min-width:0}
.hpage .stats{flex:1}
.pagedots{display:flex; gap:7px; justify-content:center; align-items:center; padding-top:11px; flex:none}
.pagedots .pdot{width:9px; height:9px; border-radius:50%; background:var(--line); border:none; padding:6px; cursor:pointer; background-clip:content-box}
.pagedots .pdot.on{background-color:var(--accent)}
.pagedots .pd-hint{color:var(--muted); font-size:11.5px; font-weight:700; letter-spacing:1.4px; text-transform:uppercase; margin-right:6px}
.stats{flex:1; min-height:0; display:grid; grid-template-rows:repeat(5, minmax(0,1fr)); align-content:start; gap:9px; max-width:920px; width:100%}
.srow{min-height:0; overflow:hidden; background:var(--panel); border:1px solid var(--line);
  border-radius:var(--radius); padding:12px 18px; display:flex; align-items:center; gap:18px}
.srow .s-left{flex:none; width:150px; min-width:0; text-align:center}
.srow .num{font-size:31px; font-weight:900; font-variant-numeric:tabular-nums; line-height:1.05; white-space:normal; overflow-wrap:anywhere}
.srow .lbl{color:var(--accent); font-weight:800; margin-top:5px; font-size:19px; line-height:1.25;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden}
.srow .sub{color:var(--soft); font-size:16px; line-height:1.5; min-width:0}
@media(max-width:520px){
  .srow{gap:13px; padding:10px 14px}
  .srow .s-left{width:118px}
  .srow .num{font-size:23px}
  .srow .lbl{font-size:16px}
  .srow .sub{font-size:14.5px}
}
/* (stat-row type fitting is measured + applied in JS — see fitStats) */
.tag{display:inline-block; font-size:10.5px; font-weight:800; letter-spacing:1px; text-transform:uppercase;
  padding:3px 8px; border-radius:999px; margin-bottom:10px}
.tag.exact{background:rgba(53,224,200,.15); color:var(--accent)}
.tag.calc{background:rgba(122,162,255,.15); color:var(--accent2)}
.tag.est{background:rgba(255,200,90,.14); color:#ffc85a}

/* bottom control bars (thumb zone) */
.subtabs{display:flex; gap:8px}
.stab{flex:1; padding:14px 6px; border-radius:12px; border:1px solid var(--line); background:#0a1120;
  color:var(--muted); font-size:15.5px; font-weight:750; cursor:pointer}
.stab.active{background:var(--accent); color:#04241f; border-color:var(--accent)}
.tabs{display:flex; gap:8px}
.tab{flex:1; padding:13px; border-radius:12px; border:1px solid var(--line); background:#0a1120;
  color:var(--muted); font-size:16px; font-weight:700; cursor:pointer}
.tab.active{background:var(--accent); color:#04241f; border-color:var(--accent)}

/* horizontal swipe carousels */
/* horizontal swipe carousels: NO scroll snap at all — a hard flick must
   travel as far as its momentum carries it, many cards at once. Only a
   finger drag (no momentum) stops where it stops. pan-x only: vertical
   gestures over a rail belong to the chapter pager, never the rail. */
.carousel{display:flex; gap:12px; overflow-x:auto;
  padding:8px 2px 12px; -webkit-overflow-scrolling:touch; align-items:stretch; overscroll-behavior-x:contain; touch-action:pan-x}
.ev-card{flex:0 0 82%; background:#0a1120; border:1px solid var(--line);
  border-radius:16px; padding:0; overflow:hidden; cursor:pointer; display:flex; flex-direction:column; height:100%}
/* The media AREA flexes to the space the card gives it, but the fill hugs
   the image itself: the img box shrink-wraps the picture at its fitted
   size (max constraints only), the sampled fill paints that box exactly,
   and the area around the box stays transparent (card shows through). */
.card-media{height:0; flex:none; overflow:hidden; background:transparent;
  display:flex; align-items:center; justify-content:center}
.has-img .card-media{height:auto; flex:1 1 auto; min-height:150px}
.card-media img{width:auto; height:auto; max-width:100%; max-height:100%; object-fit:contain; display:block;
  background:var(--media-bg,#ffffff); border-radius:6px;
  opacity:0; transition:opacity .35s ease}
.card-media img.ld{opacity:1}
.card-body{padding:15px 17px; display:flex; flex-direction:column; flex:0 0 auto; min-height:0}
.ev-card .card-body, .sp-card .card-body{justify-content:flex-start}
.ev-card .go, .sp-card .go{margin-top:10px}
.ev-card .et{font-weight:800; font-size:18px; line-height:1.3}
.ev-card .ed{color:var(--muted); font-size:15px; line-height:1.55; margin-top:6px;
  display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden}
.ev-card .go{padding-top:2px}
.carousel .empty{color:var(--muted); font-size:15px; padding:12px 2px}
.go{color:var(--accent); font-size:13px; font-weight:800; letter-spacing:.4px}
.sp-card{flex:0 0 82%; background:var(--panel); border:1px solid var(--line);
  border-radius:16px; padding:0; overflow:hidden; cursor:pointer; display:flex; flex-direction:column; height:100%}
.sp-card .card-body{padding:15px 17px}
.sp-main{display:flex; justify-content:space-between; align-items:flex-start; gap:10px}
.sp-name{font-weight:800; font-size:18px; line-height:1.3}
.sp-year{color:var(--accent); font-weight:800; font-size:13.5px; background:rgba(53,224,200,.12);
  padding:3px 10px; border-radius:999px; flex:none}
.sp-note{color:var(--muted); font-size:15px; line-height:1.55; margin-top:8px;
  display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden}
.sp-card .go{padding-top:2px}

/* earthlings stat chips */
.wild-stats{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:8px; flex:none}
.wstat{background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:16px}
.wstat .num{font-size:clamp(24px,6vw,34px); font-weight:900; font-variant-numeric:tabular-nums; line-height:1.1}
.wstat .lbl{font-size:14.5px; font-weight:700; margin-top:4px; line-height:1.4}

/* ---------- years: the time machine ---------- */
.chips{display:flex; flex-wrap:nowrap; gap:8px; overflow-x:auto; padding-bottom:2px; touch-action:pan-x}
.chip{border:1px solid var(--line); background:#0a1120; color:var(--muted); border-radius:999px; padding:9px 15px; font-size:14px; cursor:pointer; flex:none}
.chip.active{color:#04241f; background:var(--accent); border-color:var(--accent); font-weight:800}
.year-center{text-align:center; margin:2px 0 2px}
.year-age{color:var(--accent); font-weight:700; font-size:17.5px}
/* the very bottom row: the age itself, flanked by its down/up arrows */
.age-row{display:flex; align-items:center; gap:10px}
.year-big{flex:1; text-align:center; font-size:clamp(42px,11.5vw,60px); font-weight:900; line-height:1; font-variant-numeric:tabular-nums}
.year-big.warp{animation:yearWarp .45s cubic-bezier(.2,.8,.3,1)}
@keyframes yearWarp{0%{transform:scale(1.07); filter:blur(2px); opacity:.55}100%{transform:scale(1); filter:blur(0); opacity:1}}
.nav-arrow{width:56px; height:56px; border-radius:18px; border:1px solid var(--line); background:#0a1120;
  color:var(--text); line-height:1; cursor:pointer; flex:none; display:flex; align-items:center; justify-content:center}
.nav-arrow svg{width:27px; height:27px; display:block}
.nav-arrow:active{transform:scale(.94)}
.nav-arrow:disabled{opacity:.3}
#yearSlider{width:100%; accent-color:var(--accent); height:30px; display:block; margin:0}

/* ---------- first day ---------- */
.firstday{font-size:16.5px; line-height:1.65; color:var(--soft); max-width:660px}
.fd-count{display:block; font-size:19px; line-height:1.45; color:var(--text); margin-bottom:16px}
.fd-count b{color:var(--accent)}
.firstday b{color:var(--accent)}
.gen-line{display:block; margin-top:20px; font-size:21px; line-height:1.55; color:var(--text)}
.gen-line b{color:var(--accent)}

/* ---------- poster ---------- */
.poster-sec{align-items:center; text-align:center; justify-content:flex-start}
.poster-main{margin:auto 0; display:flex; flex-direction:column; align-items:center; min-height:0; width:100%}
.poster-sec .scene-bottom{margin-top:0}
.poster-explain{color:var(--soft); font-size:clamp(14.5px, calc(var(--ah)*.006 + 11px), 16.5px); line-height:1.55; max-width:480px; margin:0 auto}
.poster-note{color:var(--muted); font-size:13.5px; margin:0}
.poster-sec .ch-sub{margin-left:auto; margin-right:auto}
.poster-sec .scene-bottom{width:100%; max-width:440px}
.over-btn{background:none; border:1px solid var(--line); color:var(--muted); border-radius:12px;
  padding:13px; font-size:15px; font-weight:700; cursor:pointer; width:100%}
.over-btn:active{transform:scale(.98)}
.foot{margin-top:clamp(10px, calc(var(--ah)*.03), 40px); color:var(--muted); font-size:15px; line-height:1.65; text-align:center; max-width:640px}
.foot-brand{color:var(--text); font-weight:700; margin-top:12px}

/* ---------- deep-dive sheet ----------
   Batch #5: ONE smooth slide-up. The card has a FIXED height and its
   content is laid out BEFORE the sheet becomes visible, then a single
   translateY transition carries it up — the old version appeared as a
   collapsed chunk at the bottom and lurched taller as content loaded.
   Open/close is class-driven (.open); the sheet never uses display:none,
   which would kill the transition. */
.sheet{position:fixed; inset:0; z-index:50; display:flex; align-items:flex-end; justify-content:center;
  visibility:hidden; pointer-events:none; transition:visibility 0s linear .5s}
.sheet.open{visibility:visible; pointer-events:auto; transition:none}
.sheet-backdrop{position:absolute; inset:0; background:rgba(2,6,12,.7); backdrop-filter:blur(3px);
  opacity:0; transition:opacity .4s ease}
.sheet.open .sheet-backdrop{opacity:1}
.sheet-card{position:relative; width:100%; max-width:560px; height:calc(var(--ah)*.84); overflow-y:auto;
  background:linear-gradient(180deg,var(--panel2),var(--panel)); border:1px solid var(--line);
  border-radius:22px 22px 0 0; padding:26px 22px 30px;
  transform:translateY(104%); transition:transform .48s cubic-bezier(.22,.9,.26,1)}
.sheet.open .sheet-card{transform:translateY(0)}
@media(min-width:640px){.sheet{align-items:center; padding:20px}.sheet-card{border-radius:22px; height:auto; max-height:calc(var(--ah)*.84)}}
@media(prefers-reduced-motion:reduce){.sheet-card{transition-duration:.01s}.sheet-backdrop{transition-duration:.01s}}
.sheet-x{position:absolute; top:12px; right:12px; width:38px; height:38px; border-radius:50%;
  border:1px solid var(--line); background:#0a1120; color:var(--text); font-size:16px; cursor:pointer}
.dive-kicker{color:var(--accent); font-weight:800; font-size:12.5px; letter-spacing:1.6px; text-transform:uppercase}
.dive-title{font-size:24px; margin:6px 40px 10px 0; line-height:1.2}
.dive-img{display:block; width:auto; max-width:100%; margin:4px auto 12px; max-height:300px; object-fit:contain; background:var(--media-bg,#ffffff); border-radius:14px; border:1px solid var(--line)}
.dive-text{color:var(--text); font-size:16px; line-height:1.65; margin:0}
.dive-loading{color:var(--muted); font-size:15px}
.dive-links{display:flex; flex-wrap:wrap; gap:9px; margin-top:18px}
.dive-btn{background:var(--accent); color:#04241f; font-weight:800; font-size:15px; text-decoration:none; padding:12px 17px; border-radius:12px}
.dive-btn.ghost{background:#0a1120; color:var(--text); border:1px solid var(--line)}
.dive-src{color:var(--muted); font-size:12px; margin:12px 0 0}

.srow .tag{margin:0 0 0 6px; vertical-align:2px}
@media(max-height:700px){
  .scene{padding-top:16px}
  .scene h3{font-size:28px}
  .hero-avatar{width:72px; height:72px}
}
@media(prefers-reduced-motion:reduce){
  .rv{transition:none; opacity:1; transform:none}
  .hero-avatar, .scroll-cue span{animation:none}
  html{scroll-behavior:auto}
}

/* ---------- install sheet (MindSplit-style; styles MUST live here —
   the CSP strips inline styles) ---------- */
.ish-scrim{position:fixed;inset:0;background:rgba(2,6,10,.62);z-index:10000;display:flex;align-items:flex-end;justify-content:center}
.ish-sheet{position:relative;width:100%;max-width:560px;height:52%;min-height:360px;background:#0e1626;color:#eef4ff;border-radius:30px 30px 0 0;padding:12px 22px calc(env(safe-area-inset-bottom,0px) + 20px);display:flex;flex-direction:column;animation:ishUp 340ms cubic-bezier(.22,1,.36,1)}
@keyframes ishUp{from{transform:translateY(60px);opacity:.4}to{transform:translateY(0);opacity:1}}
.ish-handle{width:40px;height:6px;border-radius:99px;background:#1d2c47;margin:2px auto 16px}
.ish-x{position:absolute;top:14px;right:16px;width:36px;height:36px;border-radius:50%;border:1px solid #1d2c47;background:transparent;color:#eef4ff;font-size:15px;cursor:pointer}
.ish-icon{width:58px;height:58px;border-radius:50%;display:block;margin-bottom:12px}
.ish-title{margin:0 0 6px;font-size:21px}
.ish-sub{margin:0 0 16px;font-size:14.5px;line-height:1.5;color:#c9d6ee}
.ish-steps{display:flex;flex-direction:column;gap:9px;overflow-y:auto}
.ish-step{display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.05);border-radius:14px;padding:11px 13px}
.ish-num{width:27px;height:27px;flex:none;border-radius:50%;background:linear-gradient(90deg,#35e0c8,#2bb7d8);color:#04241f;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13.5px}
.ish-steptext{font-size:14.5px;line-height:1.45}
.ish-sheet.ish-tall{height:74%}
.ish-spacer{flex:1}
.ish-go{width:100%;background:linear-gradient(90deg,#35e0c8,#2bb7d8);border:none;border-radius:14px;padding:16px;font-weight:800;cursor:pointer;color:#04241f;font-size:16.5px}

/* ---------- one-screen guarantee: condensation tiers ----------
   Every chapter must fit ONE screen at short viewports — content is
   tightened (type, padding, gaps, media floors), never scrolled within
   the chapter and never clipped. Verified by measurement at
   390x844 / 390x740 / 360x670. */
@media(max-height:760px){
  .scene{padding-top:14px; padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  .stats{gap:7px}
  .srow{padding:9px 14px; gap:13px}
  .pagedots{padding-top:7px}
  .wild-stats{gap:9px; margin-bottom:4px}
  .wstat{padding:12px 14px}
  .has-img .card-media{min-height:100px}
  .card-body{padding:12px 15px}
  .ev-card .ed{-webkit-line-clamp:3}
  .firstday{font-size:15.5px; line-height:1.58}
  .ch-sub{margin-bottom:12px}
  .foot{margin-top:24px}
  /* hero: page one now carries chapter zero too — condense for 1.15 scale */
  .hero-avatar{width:38px; height:38px; margin-bottom:5px}
  .hero-kicker{font-size:13px; margin-bottom:4px}
  .hero-seconds{font-size:34px; margin-top:2px}
  .hero-seclabel{font-size:14px; margin-top:4px}
  .hero-line{font-size:15px; line-height:1.31; margin-top:8px}
  .hero-trio{margin-top:9px}
  .hs-num{font-size:20px}
  .hs-label{font-size:12.5px}
  .hero{padding-bottom:calc(48px + env(safe-area-inset-bottom))}
  .hero-first{padding-top:6px}
  .fd-kicker{font-size:15.5px; margin-bottom:3px}
  .hero .firstday{font-size:15.7px; line-height:1.34}
  .hero .fd-count{font-size:15.5px; margin-bottom:4px; line-height:1.27}
  .hero .gen-line{font-size:16px; margin-top:5px; line-height:1.27}
  .scroll-cue{bottom:8px; font-size:11.5px; line-height:1.3; gap:0}
  .scroll-cue span{font-size:15px; line-height:1.15}
  /* poster: the centered column must not spill top/bottom at 1.15 scale */
  .poster-explain{font-size:15px; line-height:1.5}
  .poster-sec .foot{font-size:13px; line-height:1.5; margin-top:16px}
}
@media(max-height:690px){
  .scene{padding-top:10px; padding-bottom:calc(8px + env(safe-area-inset-bottom))}
  .scene h3{font-size:26px}
  .ch-kicker{margin-bottom:4px; font-size:11.5px}
  .stats{gap:6px}
  .srow{padding:7px 11px; gap:10px}
  .srow .s-left{width:102px}
  .srow .num{font-size:20px}
  .srow .lbl{font-size:14.5px; margin-top:3px; line-height:1.2}
  .srow .sub{font-size:13.5px; line-height:1.42}
  .pagedots{padding-top:5px}
  .wstat{padding:10px 12px}
  .wstat .num{font-size:23px}
  .wstat .lbl{font-size:13.5px}
  .has-img .card-media{min-height:90px}
  .card-body{padding:10px 13px}
  .ev-card .et, .sp-name{font-size:16px}
  .ev-card .ed{-webkit-line-clamp:3; font-size:14px}
  .sp-note{-webkit-line-clamp:4; font-size:14px}
  .age-row .year-big{font-size:40px}
  .year-center{margin:2px 0}
  .year-age{font-size:16px}
  .chip{padding:7px 13px}
  .tab{padding:10px}
  .stab{padding:11px 6px}
  .nav-arrow{width:46px; height:46px; font-size:27px}
  .scene-bottom{gap:7px; padding-top:8px}
  .hero-avatar{width:64px; height:64px; margin-bottom:12px}
  .hero-trio{margin-top:20px}
  .firstday{font-size:15px; line-height:1.52}
  .fd-count{font-size:17.5px; margin-bottom:10px}
  .gen-line{font-size:18.5px; margin-top:12px}
  .foot{font-size:13.5px; margin-top:16px; line-height:1.5}
  .poster-explain{font-size:15px}
  /* hero, tighter (641–690px at 1.15 font scale) */
  .hero-avatar{width:36px; height:36px; margin-bottom:5px}
  .hero-kicker{font-size:12.5px; margin-bottom:4px}
  .hero-seconds{font-size:32px; margin-top:2px}
  .hero-seclabel{font-size:13.5px; margin-top:4px}
  .hero-line{font-size:14.5px; line-height:1.34; margin-top:8px}
  .hero-trio{margin-top:9px}
  .hs-num{font-size:20px}
  .hs-label{font-size:12px; margin-top:3px}
  .hero{padding-bottom:calc(48px + env(safe-area-inset-bottom))}
  .hero-first{padding-top:8px}
  .fd-kicker{font-size:15px; margin-bottom:3px}
  .hero .firstday{font-size:15.3px; line-height:1.36}
  .hero .fd-count{font-size:15px; margin-bottom:6px; line-height:1.3}
  .hero .gen-line{font-size:15.5px; margin-top:6px; line-height:1.28}
  .scroll-cue{bottom:10px; font-size:11px; line-height:1.25; gap:0}
  .scroll-cue span{font-size:14px; line-height:1.1}
}

/* ---------- batch #3 tiers: SHORT screens (640 / 600 / 560 CSS px) ----------
   Batch #2 verified at 670px and called it done; Dex's phone (and its
   font scaling) lives shorter than that. These tiers assume Android
   font-scale 1.15 on top. A page only counts as fitting when a screenshot
   at 560px shows every element fully on screen — see the batch #3 audit. */
@media(max-height:640px){
  .scene{padding-top:8px; padding-bottom:calc(8px + env(safe-area-inset-bottom))}
  .scene h3{font-size:24px; margin-bottom:4px}
  .ch-kicker{font-size:11px; margin-bottom:3px}
  .stats{gap:5px}
  .srow{padding:6px 10px; gap:9px; border-radius:14px}
  .srow .s-left{width:94px}
  .srow .num{font-size:18.5px}
  .srow .lbl{font-size:13px; margin-top:2px; line-height:1.18; -webkit-line-clamp:3}
  .srow .sub{font-size:12.8px; line-height:1.36}
  .pagedots{padding-top:4px}
  .pagedots .pdot{padding:5px}
  .wstat{padding:8px 11px}
  .wstat .num{font-size:20px}
  .wstat .lbl{font-size:12.8px; line-height:1.3}
  .wild-stats{gap:7px; margin-bottom:2px}
  .has-img .card-media{min-height:78px}
  .card-body{padding:8px 12px}
  .ev-card .et, .sp-name{font-size:15px}
  .ev-card .ed{font-size:13.5px; line-height:1.45; margin-top:4px}
  .sp-note{font-size:13.5px; line-height:1.45; margin-top:5px; -webkit-line-clamp:3}
  .ev-card .go, .sp-card .go{margin-top:6px}
  .stab{padding:9px 5px; font-size:14px}
  .tab{padding:9px; font-size:14.5px}
  .chip{padding:6px 12px; font-size:13px}
  .scene-bottom{gap:6px; padding-top:6px}
  .age-row .year-big{font-size:36px}
  .age-row .nav-arrow{width:44px; height:44px; font-size:17px}
  #yearSlider{height:24px}
  .year-age{font-size:15px}
  /* page one (hero + chapter zero) */
  .hero{padding-bottom:calc(44px + env(safe-area-inset-bottom))}
  .hero-avatar{width:30px; height:30px; margin-bottom:4px}
  .hero-seconds{font-size:29px; margin-top:2px}
  .hero-seclabel{font-size:13px; margin-top:3px}
  .hero-line{font-size:13.8px; line-height:1.3; margin-top:7px}
  .hero-trio{margin-top:7px}
  .hstat{padding:0 8px}
  .hs-num{font-size:18px}
  .hs-label{font-size:11.5px; margin-top:3px}
  .hero-first{padding-top:7px}
  .fd-kicker{font-size:14.5px; margin-bottom:3px}
  .hero .firstday{font-size:14.9px; line-height:1.26}
  /* shortest windows only: chapter zero ellipsises cleanly at a line
     boundary instead of clipping mid-line (taller windows show it all) */
  .hero .firstday{display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden}
  .hero .fd-count{font-size:14px; margin-bottom:4px; line-height:1.28}
  .hero .gen-line{font-size:14px; margin-top:5px; line-height:1.28}
  .scroll-cue{bottom:8px; font-size:10.5px; line-height:1.25; gap:0}
  .scroll-cue span{font-size:13px; line-height:1.1}
  /* poster */
  .poster-sec .ch-sub{margin-bottom:8px; font-size:15px}
  .poster-explain{font-size:14.5px; line-height:1.45}
  .foot{margin-top:12px; font-size:12.8px; line-height:1.45}
  .foot-brand{margin-top:6px}
  .poster-sec .cta{padding:13px}
  .over-btn{padding:11px; font-size:14px}
  .poster-note{font-size:12.5px}
  /* entry: text trims only — every height/padding is fluid (driven by
     --ah), so the one-screen fit holds at ALL heights, not just at tier
     boundaries, and at any font scale */
  .entry-sub{font-size:14.5px}
  .dob-readout{font-size:16px}
  .dob-readout b{font-size:18px}
  .name-field input{font-size:18px}
  .sel-btn .sel-val{font-size:17px}
  .cta{font-size:17px}
  .privacy{font-size:12px}
  .dp-btn{padding:9px 2px; font-size:15.5px}
  .dp-grid.cols7 .dp-btn{padding:8px 0; font-size:14.5px}
  .dob-picker{padding:10px; margin-top:8px}
  /* panel OPEN on short screens: shrink the head hard and hide the name
     field (it returns the moment the panel closes) so the CTA and the
     privacy line stay on-screen with the picker up */
  .entry.panel-open .entry-head h1{display:none}
  .entry.panel-open .name-field{display:none}
  .entry.panel-open .dob-picker{max-height:calc(var(--ah)*.34)}
}
@media(max-height:580px){
  .scene h3{font-size:22px}
  .srow{padding:5px 9px}
  .srow .num{font-size:17.5px}
  .srow .sub{font-size:12.3px; line-height:1.33}
  .has-img .card-media{min-height:64px}
  .ev-card .ed{-webkit-line-clamp:2}
  .sp-note{-webkit-line-clamp:2}
  .age-row .year-big{font-size:33px}
  .hero-avatar{width:24px; height:24px; margin-bottom:3px}
  .hero{padding-bottom:calc(40px + env(safe-area-inset-bottom))}
  .hero-kicker{display:none}
  .hero-seconds{font-size:28px; margin-top:2px}
  .hero-seclabel{margin-top:3px; font-size:12.5px}
  .hero-line{font-size:13.4px; line-height:1.22; margin-top:6px}
  .hero-trio{margin-top:5px}
  .hero-trio > div{padding:0 4px}
  .hs-num{font-size:16.5px}
  .hs-label{font-size:11px; letter-spacing:1px; margin-top:2px}
  .hero-first{padding-top:5px}
  .hero .firstday{font-size:14.6px; line-height:1.22; -webkit-line-clamp:4}
  .hero .fd-count{font-size:13.5px; margin-bottom:4px; line-height:1.22}
  .hero .gen-line{font-size:14px; margin-top:3px; line-height:1.22}
  .fd-kicker{font-size:14.5px; margin-bottom:3px}
  .scroll-cue{bottom:6px; font-size:10px; line-height:1.2; gap:0}
  .scroll-cue span{font-size:11px; line-height:1}
  .foot{font-size:12.3px; margin-top:9px}
  .entry-sub{display:none}
  .dob-readout{font-size:15px}
  .entry.panel-open .entry-icon{display:none}
  /* end-stop for the shortest windows (<=580px tall at full font scale):
     a few px of air traded so the whole entry — CTA and privacy line
     included — stays on screen; taller windows never see these.
     Batch #5: the top gap survives even here (10px, was 4px) — the
     split-the-difference spacing holds at every height. */
  .entry{padding-top:10px}
  .entry .entry-icon{width:40px; height:40px}
  .entry .entry-head h1{margin-top:4px; margin-bottom:2px; line-height:1.18}
  .entry .dob-readout{margin-top:2px}
  .entry .entry-controls{gap:4px}
  .entry .name-field input{padding-top:9px; padding-bottom:9px}
  .entry .sel-btn{padding-top:5px; padding-bottom:6px}
  .entry .privacy{font-size:11.5px}
}
