:root{--navy-950:#030816;--navy-900:#050c20;--navy-800:#0a1530;--gold:#d4a64a;--gold-bright:#f0c46a;--cream:#f6ecd9;--cream-dim:#cdbf9f;--mist:#8f9bb8;
--serif:"Cormorant Garamond",Georgia,"Times New Roman",serif;--sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
--safe-t:env(safe-area-inset-top,0px);--safe-b:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;overflow:hidden;background:var(--navy-950);color:var(--cream);font-family:var(--sans);-webkit-font-smoothing:antialiased;overscroll-behavior:none}
body{position:fixed;inset:0;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input{-webkit-user-select:text;user-select:text}
#world{position:fixed;inset:0;width:100%;height:100%;display:block}
[hidden]{display:none!important}
a{color:var(--gold-bright)}
button{font:inherit;color:inherit;cursor:pointer}
.hud{position:fixed;top:calc(10px + var(--safe-t));z-index:40;display:flex;gap:8px;align-items:center}
#hud-left{left:10px}#hud-right{right:10px}
.help988{display:flex;align-items:center;gap:6px;background:rgba(3,8,22,.72);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid rgba(212,166,74,.45);border-radius:999px;padding:7px 12px;font-size:.82rem;font-weight:600;white-space:nowrap}
.help988 a{color:var(--gold-bright);text-decoration:none}
.help988 span{color:var(--mist)}
.help988 button{background:none;border:0;padding:0;color:var(--cream-dim);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.icon-btn{width:40px;height:40px;border-radius:50%;border:1px solid rgba(212,166,74,.35);background:rgba(3,8,22,.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:grid;place-items:center;padding:0}
.icon-btn svg{width:20px;height:20px;fill:var(--cream);stroke:var(--cream)}
.icon-btn svg rect{stroke:none}
.icon-btn .off{display:none}.icon-btn[aria-pressed=true] .off{display:block}.icon-btn[aria-pressed=true] .on{display:none}
.chip{font-size:.75rem;padding:6px 10px;border-radius:999px;background:rgba(3,8,22,.7);border:1px solid rgba(212,166,74,.35);color:var(--cream-dim);white-space:nowrap}
#ui{position:fixed;inset:0;z-index:10;pointer-events:none}
.screen{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:calc(64px + var(--safe-t)) 18px calc(18px + var(--safe-b));pointer-events:auto;animation:fade .45s ease both}
@keyframes fade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.eyebrow{font-size:.72rem;letter-spacing:.24em;text-transform:uppercase;color:var(--gold);font-weight:600;display:block;margin-bottom:10px;text-align:center}
h1,h2,h3{font-family:var(--serif);font-weight:600;margin:0;text-align:center;line-height:1.08;color:var(--cream)}
h1{font-size:clamp(2rem,6.4vw,3.4rem);text-shadow:0 2px 24px rgba(3,8,22,.8)}
h2{font-size:clamp(1.8rem,5.4vw,2.8rem);text-shadow:0 2px 24px rgba(3,8,22,.8)}
h3{font-size:1.35rem;margin:16px 0 10px}
/* home */
#s-home{justify-content:space-between}
.home-top{margin-top:2vh;max-width:640px}
.battles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;max-width:640px}
@media(min-width:760px) and (min-height:640px){.battles{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}}
.battle{position:relative;min-height:84px;border-radius:18px;border:1px solid rgba(212,166,74,.42);background:linear-gradient(180deg,rgba(17,31,66,.78),rgba(5,12,32,.86));backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  padding:14px 14px 12px;text-align:left;display:flex;flex-direction:column;justify-content:flex-end;gap:3px;box-shadow:0 10px 30px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.06);transition:transform .15s ease,border-color .2s,box-shadow .2s}
.battle:hover{border-color:var(--gold-bright);box-shadow:0 10px 36px rgba(212,166,74,.18),inset 0 1px 0 rgba(255,255,255,.08)}
.battle:active{transform:scale(.97)}
.battle .n{position:absolute;top:10px;right:14px;font-family:var(--serif);font-size:.95rem;color:rgba(240,196,106,.55)}
.battle .nm{font-family:var(--serif);font-size:1.65rem;font-weight:600;line-height:1}
.battle .tg{font-size:.78rem;color:var(--cream-dim)}
.battle .dot{position:absolute;top:14px;left:14px;width:9px;height:9px;border-radius:50%;background:var(--gold-bright);box-shadow:0 0 12px 3px rgba(240,196,106,.6)}
.home-foot{width:100%;max-width:640px;display:flex;flex-direction:column;align-items:center;gap:6px}
.small-row{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.ghost{background:none;border:0;color:var(--cream-dim);font-size:.88rem;padding:10px 12px;text-decoration:underline;text-decoration-color:rgba(205,191,159,.35);text-underline-offset:4px;border-radius:10px}
.ghost:hover{color:var(--gold-bright)}
.disc{font-size:.72rem;line-height:1.45;color:var(--mist);text-align:center;max-width:560px;margin:4px auto 0}
/* rating */
#s-rate h2{max-width:560px;margin-bottom:26px}
.back{position:absolute;top:calc(58px + var(--safe-t));left:8px}
.scale{display:grid;grid-template-columns:repeat(11,minmax(0,1fr));gap:8px;width:100%;max-width:720px}
.scale button{aspect-ratio:1/1.15;min-height:52px;border-radius:14px;border:1px solid rgba(212,166,74,.42);background:rgba(5,12,32,.78);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  font-family:var(--serif);font-size:1.7rem;font-weight:600;transition:transform .12s,background .2s,border-color .2s;box-shadow:0 8px 20px rgba(0,0,0,.3)}
.scale button:hover{border-color:var(--gold-bright)}
.scale button:active,.scale button.sel{transform:scale(.94);background:var(--gold);color:var(--navy-950);border-color:var(--gold-bright)}
@media(max-width:560px){.scale{grid-template-columns:repeat(6,minmax(0,1fr));max-width:420px}.scale button{aspect-ratio:auto;min-height:58px}}
.scale-labels{display:flex;justify-content:space-between;width:100%;max-width:720px;margin-top:10px;color:var(--mist);font-size:.8rem}
@media(max-width:560px){.scale-labels{max-width:420px}}
#rate-skip{margin-top:14px}
/* play */
#s-play{padding:0;justify-content:flex-end}
.hold-layer{position:absolute;inset:0;touch-action:none;outline:none;cursor:pointer}
.title-card{position:absolute;top:calc(56px + var(--safe-t) + 2vh);left:0;right:0;pointer-events:none;animation:title 3.2s ease both}
@keyframes title{0%{opacity:0;transform:translateY(10px)}18%{opacity:1;transform:none}75%{opacity:1}100%{opacity:0}}
.hint{position:relative;z-index:2;pointer-events:none;margin:0 16px calc(64px + var(--safe-b));padding:10px 18px;border-radius:999px;background:rgba(3,8,22,.55);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
  font-family:var(--serif);font-size:clamp(1.15rem,3.6vw,1.45rem);text-align:center;color:var(--cream);transition:opacity .4s;max-width:560px}
.hint:empty{opacity:0}
.finish{position:absolute;right:8px;bottom:calc(10px + var(--safe-b));z-index:3}
.kind{position:absolute;left:0;right:0;bottom:calc(120px + var(--safe-b));z-index:3;display:flex;flex-direction:column;gap:10px;align-items:center;padding:0 18px;top:auto}
.kind button{width:100%;max-width:460px;min-height:56px;border-radius:16px;border:1px solid rgba(212,166,74,.6);background:rgba(5,12,32,.86);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  font-family:var(--serif);font-size:1.3rem;font-weight:600;padding:10px 16px;box-shadow:0 10px 26px rgba(0,0,0,.4);animation:fade .4s ease both}
.kind button:nth-child(2){animation-delay:.08s}.kind button:nth-child(3){animation-delay:.16s}
.kind button small{display:block;font-family:var(--sans);font-size:.68rem;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);font-weight:600;margin-bottom:2px}
.kind button:hover{border-color:var(--gold-bright);color:var(--gold-bright)}
.kind button:active{transform:scale(.97)}
.kind-top{top:calc(70px + var(--safe-t) + 6vh)!important;bottom:auto!important}
/* result */
#s-result,#s-gift{overflow-y:auto;justify-content:flex-start}
.result-card{width:100%;max-width:560px;margin:auto 0;padding:26px 20px 18px;border-radius:24px;background:rgba(3,8,22,.72);border:1px solid rgba(212,166,74,.3);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 20px 60px rgba(0,0,0,.45);text-align:center}
#res-main{font-size:clamp(2.2rem,7.5vw,3.3rem)}
.res-stat{color:var(--gold-bright);margin:10px 0 0;font-size:.95rem}
.flip{font-family:var(--serif);font-size:1.3rem;line-height:1.35;margin:18px 0 8px;color:var(--cream-dim)}
.flip strong{color:var(--gold-bright);font-weight:600}
.res-after{color:var(--cream);font-size:.98rem;line-height:1.55;margin:0 0 14px}
.res-links{display:flex;flex-direction:column;gap:6px;margin-bottom:16px;font-size:.92rem}
.res-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:6px 0}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:12px 22px;border-radius:999px;border:1px solid var(--gold);background:linear-gradient(180deg,#f0c46a,#d4a64a);color:#0a1226;font-weight:600;font-size:1rem;text-decoration:none;box-shadow:0 8px 24px rgba(212,166,74,.25)}
.btn.alt{background:rgba(5,12,32,.6);color:var(--cream);border-color:rgba(212,166,74,.55);box-shadow:none}
.btn:active{transform:scale(.97)}
.btn.wide{width:100%}
.crisis-inline{margin:16px 0 4px;padding:14px;border-radius:16px;border:1px solid rgba(240,196,106,.55);background:rgba(212,166,74,.08);text-align:left;font-size:.92rem;line-height:1.5}
.crisis-inline .res-btns{justify-content:flex-start}
.crisis-inline .btn{min-height:42px;padding:8px 16px;font-size:.9rem}
.gift-note{font-family:var(--serif);font-size:1.6rem;line-height:1.3;color:var(--gold-bright);margin:16px 0 4px;word-break:break-word}
.gift-from{color:var(--cream-dim);margin:0 0 16px}
/* modals */
.modal{position:fixed;inset:0;z-index:30;background:rgba(3,8,22,.6);display:flex;align-items:flex-end;justify-content:center;padding:calc(60px + var(--safe-t)) 10px calc(10px + var(--safe-b));animation:fade .25s ease both}
@media(min-width:640px){.modal{align-items:center}}
.sheet{width:100%;max-width:520px;max-height:100%;overflow-y:auto;background:linear-gradient(180deg,#0a1530,#050c20);border:1px solid rgba(212,166,74,.35);border-radius:22px;padding:22px 18px 14px;box-shadow:0 20px 60px rgba(0,0,0,.6);display:flex;flex-direction:column;gap:10px;text-align:center}
.sheet h2{font-size:1.9rem}
.sheet p{margin:0;line-height:1.55;font-size:.95rem}
.crisis-links{display:flex;flex-direction:column;gap:8px}
.small{font-size:.8rem;color:var(--mist)}
.toggle{display:flex;gap:10px;align-items:center;justify-content:center;font-size:.92rem;color:var(--cream-dim);padding:8px}
.toggle input{width:20px;height:20px;accent-color:var(--gold)}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.stats div{background:rgba(255,255,255,.03);border:1px solid rgba(212,166,74,.2);border-radius:14px;padding:10px 4px}
.stats b{display:block;font-family:var(--serif);font-size:1.8rem;color:var(--gold-bright)}
.stats span{font-size:.75rem;color:var(--mist)}
.hist{font-size:.85rem;color:var(--cream-dim);text-align:left;margin:4px 0;padding:0;list-style:none;max-height:150px;overflow:auto}
.hist li{display:flex;justify-content:space-between;padding:5px 2px;border-bottom:1px solid rgba(255,255,255,.05)}
.lines{font-family:var(--serif);font-size:1.05rem;color:var(--gold-bright);margin:0;padding:0;list-style:none}
.notes{display:flex;flex-direction:column;gap:6px}
.notes button{border-radius:14px;border:1px solid rgba(212,166,74,.35);background:rgba(5,12,32,.6);padding:10px 12px;font-family:var(--serif);font-size:1.15rem}
.notes button[aria-checked=true]{border-color:var(--gold-bright);background:rgba(212,166,74,.16);color:var(--gold-bright)}
.sheet input:not([type]),.sheet input[type=text]{width:100%;min-height:46px;border-radius:12px;border:1px solid rgba(212,166,74,.35);background:rgba(3,8,22,.7);color:var(--cream);padding:10px 12px;font:inherit;font-size:16px}
.join-row{display:flex;gap:8px}.join-row input{flex:1}
.share-img{width:min(260px,70%);margin:0 auto;border-radius:14px;border:1px solid rgba(212,166,74,.3)}
@media(max-height:560px) and (orientation:landscape){
  .screen{padding-top:calc(54px + var(--safe-t))}
  .battles{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-width:760px}.battle{min-height:62px;padding:8px 12px}.battle .nm{font-size:1.3rem}
  h1{font-size:1.7rem}.home-top{margin-top:0}.home-foot .disc{display:none}
  .scale{grid-template-columns:repeat(11,minmax(0,1fr));max-width:720px}.scale button{min-height:46px;aspect-ratio:auto}
  .hint{margin-bottom:calc(8px + var(--safe-b));padding:6px 14px;font-size:1.05rem}.finish{bottom:auto;top:calc(56px + var(--safe-t))}
  .kind{bottom:calc(60px + var(--safe-b))}.kind button{min-height:44px;font-size:1.1rem}
}
@media(prefers-reduced-motion:reduce){.screen,.modal,.kind button{animation:none}.title-card{animation-duration:.01s;opacity:0}}
#room-chip{position:fixed;top:calc(58px + var(--safe-t));right:10px}
@media(max-height:560px) and (orientation:landscape){.title-card{display:none}}
/* ---- touch targets >= 44px (Nov 17) ---- */
.icon-btn{width:44px;height:44px}
.help988{padding:0 8px;gap:0;min-height:44px}
.help988 a,.help988 button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;padding:0 6px}
.ghost{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center}
.res-links a{display:flex;align-items:center;justify-content:center;min-height:44px}
.res-links{gap:0}
#room-chip{top:calc(62px + var(--safe-t))}
/* ================= v3 (Nov 17): wow pass ================= */
/* 7: readable small text */
.disc{font-size:.78rem}.eyebrow{font-size:.78rem}.small{font-size:.82rem}
h1,h2,#res-main{text-wrap:balance}
/* 988/Help stays reachable but steps back during play */
.help988{transition:opacity .5s}
html.playing .help988{opacity:.3}
html.playing .help988:hover,html.playing .help988:focus-within,html.playing .help988:active{opacity:1}
/* pause dim fades in */
.modal{animation:dimIn .45s ease both}
@keyframes dimIn{from{background:rgba(3,8,22,0);opacity:0}to{background:rgba(3,8,22,.6);opacity:1}}
/* 8: a floating, breathing menu */
.battle{animation:fade .5s ease both,floaty 6s ease-in-out infinite;animation-delay:calc(var(--i,0)*.07s),calc(var(--i,0)*-1.1s)}
@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
.battle .dot{animation:pulse 2.6s ease-in-out infinite;animation-delay:calc(var(--i,0)*-.4s)}
@keyframes pulse{0%,100%{box-shadow:0 0 8px 2px rgba(240,196,106,.45);transform:scale(1)}50%{box-shadow:0 0 18px 6px rgba(240,196,106,.8);transform:scale(1.25)}}
.battle .stars{position:absolute;bottom:10px;right:14px;font-size:.72rem;color:var(--gold-bright);letter-spacing:.04em}
.battle:active{transform:scale(.97)!important}
.friend-btn{background:rgba(5,12,32,.62);color:var(--cream);border-color:rgba(240,196,106,.75);box-shadow:0 0 0 0 rgba(240,196,106,.5);animation:ring 3.2s ease-out infinite;gap:8px;min-height:48px;margin-top:6px}
.friend-btn span{color:var(--gold-bright);letter-spacing:-.2em;margin-right:4px}
@keyframes ring{0%{box-shadow:0 0 0 0 rgba(240,196,106,.45)}70%{box-shadow:0 0 0 14px rgba(240,196,106,0)}100%{box-shadow:0 0 0 0 rgba(240,196,106,0)}}
.home-foot{gap:2px}
/* sky slider rating */
.sky-rate{width:100%;max-width:520px;display:flex;flex-direction:column;align-items:center;gap:8px}
.rate-num{font-family:var(--serif);font-size:4.2rem;line-height:1;color:var(--gold-bright);text-shadow:0 0 30px rgba(240,196,106,.5);transition:transform .15s}
.rate-num.unset{color:rgba(246,236,217,.35);text-shadow:none}
.sky-slider{-webkit-appearance:none;appearance:none;width:100%;height:44px;background:transparent;touch-action:none;cursor:pointer}
.sky-slider::-webkit-slider-runnable-track{height:10px;border-radius:999px;background:linear-gradient(90deg,#7aa2e8,#2a3f78 50%,#0b0f1d);border:1px solid rgba(212,166,74,.45)}
.sky-slider::-moz-range-track{height:10px;border-radius:999px;background:linear-gradient(90deg,#7aa2e8,#2a3f78 50%,#0b0f1d);border:1px solid rgba(212,166,74,.45)}
.sky-slider::-webkit-slider-thumb{-webkit-appearance:none;width:34px;height:34px;margin-top:-13px;border-radius:50%;background:radial-gradient(circle at 40% 35%,#fff6e2,#f0c46a 60%,#d4a64a);box-shadow:0 0 20px rgba(240,196,106,.8);border:0}
.sky-slider::-moz-range-thumb{width:34px;height:34px;border-radius:50%;background:radial-gradient(circle at 40% 35%,#fff6e2,#f0c46a 60%,#d4a64a);box-shadow:0 0 20px rgba(240,196,106,.8);border:0}
.sky-slider.unset::-webkit-slider-thumb{opacity:.55;animation:nudge 1.6s ease-in-out infinite}
@keyframes nudge{0%,100%{transform:translateX(0)}50%{transform:translateX(10px)}}
.sky-rate .scale-labels{max-width:none}
#rate-go{min-width:180px}#rate-go:disabled{opacity:.35;box-shadow:none}
.rate-or{margin:14px 0 6px}
#s-rate h2{margin-bottom:10px}
#s-rate .scale button{min-height:44px;font-size:1.25rem;aspect-ratio:auto}
@media(max-width:560px){#s-rate .scale{grid-template-columns:repeat(11,minmax(0,1fr));gap:3px;max-width:none}#s-rate .scale button{border-radius:9px;min-height:44px;font-size:1.05rem;padding:0}}
/* title card never sits over choices (B5) */
.title-card.gone{opacity:0!important;transition:opacity .3s;animation:none}
/* choices */
.kind-bottom{bottom:calc(118px + var(--safe-b))!important;top:auto!important}
.kind-pair{bottom:auto!important;flex-direction:row;justify-content:center;gap:10px;padding:0 12px}
.kind-pair button{flex:1 1 0;max-width:280px;font-size:1.08rem;min-height:64px;transition:transform .15s,border-color .15s,box-shadow .15s}
.kind-pair.flank{left:0;right:0;transform:translateY(-50%);justify-content:space-between;padding:0 max(12px,calc(var(--cx,50vw) - 380px))}
.kind-pair.flank button{max-width:min(300px,calc(var(--cx,50vw) - 80px))}
.kind button.lean{border-color:var(--gold-bright);box-shadow:0 0 26px rgba(240,196,106,.55);transform:scale(1.04)}
.fly{position:fixed;z-index:20;pointer-events:none;font-family:var(--serif);font-weight:600;font-size:1.3rem;color:var(--gold-bright);text-shadow:0 0 18px rgba(240,196,106,.9),0 2px 10px rgba(3,8,22,.9);white-space:nowrap;max-width:90vw;overflow:hidden;text-overflow:ellipsis}
/* ghost finger */
.ghost-hand{position:fixed;z-index:4;pointer-events:none;width:0;height:0}
.ghost-hand i{position:absolute;left:-22px;top:-22px;width:44px;height:44px;border-radius:50%;background:radial-gradient(circle,rgba(255,246,226,.95),rgba(240,196,106,.55) 55%,rgba(240,196,106,0) 72%);box-shadow:0 0 30px rgba(240,196,106,.7)}
.g-tap i{animation:gTap 1s ease-in-out 3}
.g-hold i{animation:gHold 3s ease-in-out 1}
.g-swipe-left i{animation:gSwipeL 1.5s ease-in-out 2}
.g-drag-down i{animation:gDragD 1.5s ease-in-out 2}
@keyframes gTap{0%,100%{transform:scale(1);opacity:.9}40%{transform:scale(.7);opacity:1}}
@keyframes gHold{0%{transform:scale(1);opacity:0}10%{opacity:1}20%{transform:scale(.7)}75%{transform:scale(.7);box-shadow:0 0 60px 20px rgba(240,196,106,.6)}100%{transform:scale(1);opacity:0}}
@keyframes gSwipeL{0%{transform:translate(0,0);opacity:0}15%{opacity:1}80%{transform:translate(-90px,-140px);opacity:1}100%{transform:translate(-100px,-150px);opacity:0}}
@keyframes gDragD{0%{transform:translate(0,0);opacity:0}15%{opacity:1}80%{transform:translate(0,140px);opacity:1}100%{transform:translate(0,150px);opacity:0}}
.g-drag-up i{animation:gDragU 1.5s ease-in-out 2}
@keyframes gDragU{0%{transform:translate(0,0);opacity:0}15%{opacity:1}80%{transform:translate(0,-130px);opacity:1}100%{transform:translate(0,-140px);opacity:0}}
/* result payoff */
.result-card{background:rgba(3,8,22,.9)}
#res-main{font-size:clamp(2rem,7vw,3.1rem)}
#res-main .num{display:inline-block;color:var(--gold-bright);font-weight:600}
#res-main .num.pop{animation:pop .35s ease}
@keyframes pop{0%{transform:scale(1.45);text-shadow:0 0 30px rgba(240,196,106,1)}100%{transform:scale(1)}}
.res-pic{margin:14px auto 6px;position:relative;max-width:360px;border-radius:16px;overflow:hidden;border:1px solid rgba(212,166,74,.45);box-shadow:0 0 40px rgba(240,196,106,.18);animation:fade .8s ease .3s both}
.res-pic img{display:block;width:100%;max-height:34vh;object-fit:cover}
.res-pic figcaption{position:absolute;left:0;right:0;bottom:0;padding:18px 10px 8px;background:linear-gradient(transparent,rgba(3,8,22,.85));font-family:var(--serif);font-size:1.15rem;color:var(--cream)}
.res-ex{margin:10px 0 4px;display:flex;flex-direction:column;align-items:center}
.res-ex q{font-family:var(--serif);font-size:1.3rem;line-height:1.3;color:var(--cream);text-wrap:balance}
.res-ex a{display:inline-flex;align-items:center;min-height:44px;font-size:.9rem}
.res-star{background:none;border:1px solid rgba(240,196,106,.4);border-radius:999px;color:var(--gold-bright);min-height:44px;padding:6px 16px;margin:6px 0;font-size:.9rem}
.res-plenty{margin:6px 0;color:var(--cream-dim);font-family:var(--serif);font-size:1.15rem}
.res-stat{margin-top:6px}
#s-result .res-stat:empty{display:none}
.crisis-first .crisis-inline{margin:0 0 16px}
.crisis-first #res-main{font-size:1.6rem;color:var(--cream-dim)}
.crisis-first .eyebrow{margin-top:4px}
.res-links a,.ghost.inline{min-height:44px}
.ghost.inline{display:inline-flex;padding:0 6px}
/* night sky */
.sky-cv{width:100%;height:260px;border-radius:16px;border:1px solid rgba(212,166,74,.3);background:#030816}
@media(min-width:440px){.sky-cv{height:240px}}
.week{display:flex;justify-content:center;gap:8px}
.night{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-size:.75rem;color:var(--mist);border:1px solid rgba(143,155,184,.35)}
.night.on{background:radial-gradient(circle,#fff3d6,#f0c46a 55%,#d4a64a);color:#0a1226;border-color:var(--gold-bright);box-shadow:0 0 14px rgba(240,196,106,.6)}
.night.today{outline:2px solid rgba(240,196,106,.55);outline-offset:2px}
/* friends */
.marks{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.marks button{width:46px;height:46px;border-radius:50%;border:1px solid rgba(212,166,74,.35);background:rgba(5,12,32,.6);font-size:1.3rem}
.marks button[aria-checked=true]{border-color:var(--gold-bright);background:rgba(212,166,74,.2)}
.react{position:fixed;z-index:41;right:10px;top:calc(104px + var(--safe-t));display:flex;flex-direction:column;gap:6px}
.react button{width:44px;height:44px;border-radius:50%;border:1px solid rgba(212,166,74,.35);background:rgba(3,8,22,.6);font-size:1.25rem;padding:0}
.react button:active{transform:scale(.9)}
.react-float{position:fixed;z-index:42;bottom:22%;font-size:2.4rem;pointer-events:none;transform:translateX(-50%);animation:floatUp 2.6s ease-out forwards}
@keyframes floatUp{0%{opacity:0;transform:translate(-50%,20px) scale(.6)}15%{opacity:1;transform:translate(-50%,0) scale(1.1)}100%{opacity:0;transform:translate(-50%,-220px) scale(1)}}
.toast{position:fixed;z-index:45;left:0;right:0;margin:0 auto;width:max-content;bottom:calc(84px + var(--safe-b));max-width:min(92vw,460px);padding:12px 18px;border-radius:16px;background:rgba(10,21,48,.94);border:1px solid rgba(240,196,106,.55);color:var(--cream);font-size:.95rem;text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.5);animation:fade .4s ease both;cursor:pointer;text-wrap:balance}
.toast.out{opacity:0;transition:opacity .4s}
@media(max-height:560px) and (orientation:landscape){
  .rate-num{font-size:2.4rem}.rate-or{display:none}#s-rate .scale{display:none}.sky-rate{gap:2px}
  .friend-btn{min-height:44px;margin-top:0;padding:6px 16px}
  .res-pic img{max-height:40vh}
  .kind-pair button{min-height:48px;font-size:.98rem}
}
@media(prefers-reduced-motion:reduce){.battle,.battle .dot,.friend-btn,.sky-slider.unset::-webkit-slider-thumb{animation:none}.ghost-hand i{animation-iteration-count:1}}
.small a.tall{display:inline-flex;align-items:center;min-height:44px;padding:0 4px}
.res-pic[data-b=pride] img{object-position:50% 72%}
/* v3 rate: one-tap numbers stay at least 44x44 everywhere */
@media(max-width:560px){#s-rate .scale{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;max-width:420px}#s-rate .scale button{min-height:46px;border-radius:12px}}
@media(max-height:560px) and (orientation:landscape){
  #s-rate{justify-content:center;gap:4px;padding-top:56px}
  #s-rate h2{font-size:1.7rem;margin:2px 0 4px}
  #s-rate .rate-num{display:none}
  #s-rate .sky-rate{flex-direction:row;flex-wrap:wrap;justify-content:center;max-width:720px;gap:4px 12px}
  #s-rate .sky-slider{flex:1 1 60%}
  #s-rate .scale-labels{display:none}
  #s-rate #rate-go{min-height:44px;padding:8px 22px}
  #s-rate .scale{display:grid;grid-template-columns:repeat(11,minmax(44px,1fr));gap:5px;max-width:720px}
  #s-rate .scale button{min-height:44px}
}
.kind-pair.flank{padding:0 max(12px,calc(var(--cx,50vw) - 420px))}
.kind-pair.flank button{max-width:min(290px,calc(var(--cx,50vw) - 120px))}
.kind-pair,.kind-bottom{pointer-events:none}.kind-pair button,.kind-bottom button{pointer-events:auto}
/* ===== v4 ===== */
/* M2: reactions fold into one button at the bottom-left, only during play */
.react{left:10px;right:auto;top:auto;bottom:calc(8px + var(--safe-b));flex-direction:row;align-items:center;gap:6px}
html:not(.playing) .react{display:none}
.react .r-e{display:none}
.react.open .r-e{display:inline-block;animation:fade .25s ease both}
.react .react-t{width:44px;height:44px;border-radius:50%;border:1px solid rgba(212,166,74,.35);background:rgba(3,8,22,.55);color:var(--gold-bright);font-size:1.3rem;padding:0;opacity:.75}
.react.open .react-t{opacity:1;border-color:var(--gold-bright)}
html.playing #room-chip{opacity:.72;font-size:.68rem;padding:4px 9px}
/* L1: star counts on their own line */
.battle .stars{position:static;display:block;margin-top:3px;line-height:1.1}
.battle .stars:empty{display:none}
/* M5: first-launch toast at the top, clear of the friend button */
.toast.top{bottom:auto;top:calc(70px + var(--safe-t))}
/* M4: hint steps aside while you drag the lantern */
html.dragging #hint{opacity:0;transition:opacity .15s}
#hint{transition:opacity .3s}
#hold{touch-action:pinch-zoom}
/* L5: crisis buttons at least 44 px */
.crisis-inline .btn{min-height:44px}
/* item 7: a quiet "Skip this stone" link */
.skip-stone{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(10px + var(--safe-b));z-index:3;min-height:44px;font-size:.9rem;opacity:.8;text-decoration:underline;text-underline-offset:3px}
@media(max-height:560px) and (orientation:landscape){.skip-stone{left:auto;right:8px;transform:none;bottom:auto;top:calc(100px + var(--safe-t))}}
/* item 4: Pride choices in a bottom tray that never covers the climber */
.kind-bottom{left:0!important;right:0!important;transform:none!important;bottom:calc(56px + var(--safe-b))!important;display:flex;flex-direction:row!important;justify-content:center;gap:10px;padding:14px 14px 10px;background:linear-gradient(rgba(3,8,22,0),rgba(3,8,22,.78) 40%);width:auto!important;max-width:none!important}
.kind-bottom button{flex:1 1 0;max-width:230px;min-height:52px}
.kind-bottom:not([hidden]) ~ #hint{opacity:0}
@media(max-height:560px) and (orientation:landscape){.kind-bottom{bottom:calc(4px + var(--safe-b))!important;padding:8px 70px 6px}.kind-bottom button{min-height:46px}}
.res-pic[data-b=anger] img{object-position:50% 50%}

/* item 6: the 12/12 joint ending card (sits high, never covers 988/Help or the breath ring area for long) */
.joint{position:fixed;z-index:44;left:0;right:0;margin:0 auto;bottom:calc(96px + var(--safe-b));width:min(92vw,420px);padding:16px 18px 12px;border-radius:18px;text-align:center;background:rgba(5,12,32,.88);border:1px solid rgba(240,196,106,.7);box-shadow:0 0 60px rgba(240,196,106,.35);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);animation:fade .9s ease both}
.joint-t{margin:0;font-family:var(--serif);font-size:1.7rem;color:#ffe3a8;line-height:1.15}
.joint-m{margin:6px 0 10px;color:#cdbf9f;font-size:.9rem}
.joint-b{display:flex;gap:10px;justify-content:center;align-items:center;flex-wrap:wrap}
.joint-b .btn{min-height:46px}
.linkbtn{background:none;border:0;color:#cdbf9f;text-decoration:underline;font:inherit;min-height:44px;min-width:44px;cursor:pointer}
@media(max-height:560px) and (orientation:landscape){.joint{bottom:calc(8px + var(--safe-b));top:auto;left:auto;right:calc(12px + var(--safe-r,0px));margin:0;width:min(44vw,360px);padding:10px 14px 8px}.joint-t{font-size:1.3rem}.joint-m{margin:2px 0 6px}}

/* v4 M5: first-launch sound tip lives in the eyebrow slot (no overlay) */
.eyebrow.tip{color:#ffe3a8;letter-spacing:.04em;text-transform:none;font-size:.9rem;animation:fade .5s ease both}
.eyebrow.tip-out{opacity:0;transition:opacity .4s}

/* v5 item 1: one-time aurora moment */
.aurora-m{margin:4px auto 10px;padding:14px 18px;border-radius:18px;text-align:center;background:linear-gradient(120deg,rgba(20,60,70,.9),rgba(30,30,80,.9));border:1px solid rgba(140,240,200,.6);box-shadow:0 0 70px rgba(120,240,190,.35);animation:fade 1.2s ease both;pointer-events:none}
.aurora-m.out{opacity:0;transition:opacity .6s}
.aurora-m-t{margin:0;font-family:var(--serif);font-size:1.6rem;color:#c9ffe9;line-height:1.15}
.aurora-m-s{margin:6px 0 0;color:#d9e8e2;font-size:.9rem}
.res-pic[data-au="1"] img{object-position:50% 35%}
.res-pic[data-b=guilt] img{object-position:50% 40%}
.res-pic[data-b=guilt][data-au="1"] img{object-position:50% 38%}
/* v5 item 5: in a room, the home screen shows the room line under the heading instead of the fixed chip */
html[data-screen=home] #room-chip{display:none}
.room-home{margin:8px auto 0;width:max-content;max-width:92vw;padding:6px 14px;border-radius:999px;border:1px solid rgba(240,196,106,.45);background:rgba(5,12,32,.6);color:var(--cream);font-size:.82rem;text-align:center;text-wrap:balance;animation:fade .4s ease both}
.room-home.note{border-color:rgba(240,196,106,.85);color:#ffe3a8}
@media(max-width:380px){.room-home{font-size:.72rem;padding:5px 10px;white-space:nowrap;margin:6px auto 6px}}
/* v5 item 7: tilt opt-in card (iOS only, once) */
.tilt-card{position:fixed;z-index:47;left:0;right:0;margin:0 auto;bottom:calc(10px + var(--safe-b));width:min(92vw,400px);padding:14px 16px 10px;border-radius:18px;text-align:center;background:#060d22;border:1px solid rgba(240,196,106,.6);box-shadow:0 -10px 40px rgba(0,0,0,.6);animation:fade .5s ease both}
.tilt-t{margin:0;font-family:var(--serif);font-size:1.35rem;color:#ffe3a8}
.tilt-m{margin:6px 0 10px;color:#cdbf9f;font-size:.86rem}
.tilt-b{display:flex;gap:12px;justify-content:center;align-items:center}
.tilt-b .btn{min-height:44px}.tilt-b .linkbtn{min-height:44px}
@media(max-height:560px) and (orientation:landscape){.tilt-card{bottom:calc(10px + var(--safe-b));right:12px;left:auto;margin:0}}
/* v5 item 8: soft wait cue */
.rate-or.wait{color:#ffe3a8;animation:waitpulse 1s ease-in-out infinite}
@keyframes waitpulse{0%,100%{opacity:.55}50%{opacity:1}}
/* v5 item 8: during play the 988 bar keeps a ~50% dark background so it reads over bright scenes (still >=44px) */
html.playing .help988{opacity:.9;background:rgba(3,8,22,.55);border-color:rgba(212,166,74,.35)}
/* 10c: polish */
.battle .nm{padding-right:26px}.battle .n{font-size:.82rem;top:9px;right:12px}
/* item 9: small 988 line for a 9-10 start (non-blocking; sits under the top bar, left) */
.heavy-note{position:fixed;z-index:25;left:10px;top:calc(62px + var(--safe-t));max-width:min(62vw,330px);display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;padding:4px 6px 4px 12px;border-radius:16px;background:rgba(3,8,22,.78);border:1px solid rgba(212,166,74,.5);color:var(--cream);font-size:.82rem;animation:fade .5s ease both}
.heavy-note a{display:inline-flex;align-items:center;min-height:44px;padding:0 8px;color:var(--gold-bright);font-weight:600;text-decoration:none}
.heavy-note.out{opacity:0;transition:opacity .5s}
html.inroom .heavy-note{top:calc(100px + var(--safe-t))}
/* item 10: numbered steps (elegant card, once per battle), '?' button, soft idle hint */
.steps{position:fixed;z-index:43;left:0;right:0;margin:0 auto;top:calc(64px + var(--safe-t));width:min(92vw,440px);display:flex;gap:14px;align-items:flex-start;padding:14px 16px 12px;border-radius:20px;background:rgba(5,12,32,.9);border:1px solid rgba(240,196,106,.55);box-shadow:0 18px 50px rgba(0,0,0,.5),0 0 40px rgba(240,196,106,.12);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);animation:fade .45s ease both}
.steps-t{margin:0 0 6px;font-family:var(--serif);font-size:1.35rem;color:#ffe3a8;line-height:1.1}
.steps ol{margin:0 0 10px;padding-left:1.2em;color:#efe4cc;font-size:.92rem;line-height:1.35}
.steps li{margin:3px 0}.steps li::marker{color:var(--gold-bright);font-weight:700}
.steps-ok{min-height:44px;padding:0 22px}
.steps-demo{flex:0 0 56px;height:56px;margin-top:4px;border-radius:50%;border:1px solid rgba(240,196,106,.45);position:relative;overflow:hidden;background:radial-gradient(circle,rgba(240,196,106,.18),rgba(5,12,32,0) 70%)}
.steps-demo i{position:absolute;left:18px;top:18px;width:20px;height:20px;border-radius:50%;background:radial-gradient(circle,#fff6e2,rgba(240,196,106,.6) 60%,rgba(240,196,106,0))}
.d-hold i{animation:dHold 3s ease-in-out infinite}.d-tap i{animation:dTap 1.1s ease-in-out infinite}.d-swipe-left i{animation:dSwipe 1.6s ease-in-out infinite}.d-drag-down i{animation:dDrag 1.6s ease-in-out infinite}
@keyframes dHold{0%,100%{transform:scale(.7)}45%{transform:scale(1.7)}}
@keyframes dTap{0%,100%{transform:scale(1)}40%{transform:scale(.65)}}
@keyframes dSwipe{0%{transform:translate(10px,14px);opacity:0}20%{opacity:1}100%{transform:translate(-12px,-16px);opacity:0}}
@keyframes dDrag{0%{transform:translateY(-14px);opacity:0}20%{opacity:1}100%{transform:translateY(16px);opacity:0}}
@media(max-width:380px){.steps{padding:12px 12px 10px;gap:10px}.steps-demo{flex-basis:44px;height:44px}.steps-demo i{left:12px;top:12px}.steps ol{font-size:.86rem}.steps-t{font-size:1.2rem}}
@media(max-height:560px) and (orientation:landscape){.steps{top:calc(60px + var(--safe-t));width:min(70vw,560px);padding:10px 14px 8px}.steps ol{font-size:.84rem;margin-bottom:6px}.steps-t{font-size:1.15rem;margin-bottom:2px}}
.steps-q{position:fixed;z-index:39;left:calc(10px + var(--safe-l,0px));bottom:calc(10px + var(--safe-b));width:44px;height:44px;border-radius:50%;background:rgba(3,8,22,.6);border:1px solid rgba(212,166,74,.5);color:#ffe3a8;font-family:var(--serif);font-size:1.35rem;font-weight:700;line-height:1;cursor:pointer}
html.inroom .steps-q{left:calc(62px + var(--safe-l,0px))}
.ghost-hand.soft i{opacity:.75}
@media(prefers-reduced-motion:reduce){.steps-demo i{animation-iteration-count:2}}
body:has(.react.open) .steps-q{visibility:hidden}
body:has(#heavy-note:not([hidden])) .steps{top:calc(172px + var(--safe-t))}
@media(max-height:560px) and (orientation:landscape){body:has(#heavy-note:not([hidden])) .steps{top:calc(60px + var(--safe-t));right:12px;left:auto;margin:0;width:min(58vw,480px)}}
@media(max-height:560px) and (orientation:landscape){.heavy-note{max-width:36vw}}
#s-home .eyebrow{width:fit-content;max-width:100%;margin-left:auto;margin-right:auto}
/* v5b: the tilt opt-in sits in the page under the heading (never over the footer or the friend button) */
.tilt-card{position:static;margin:10px auto 0;width:min(100%,460px);padding:8px 10px 8px 14px;display:flex;align-items:center;gap:10px;text-align:left;background:rgba(6,13,34,.82);box-shadow:none;border-color:rgba(240,196,106,.45);animation:fade .5s ease both}
.tilt-card[hidden]{display:none}
.tilt-x{flex:1 1 auto;min-width:0}
.tilt-card .tilt-t{font-size:1.02rem;line-height:1.15}
.tilt-card .tilt-m{margin:2px 0 0;font-size:.74rem;line-height:1.3}
.tilt-card .tilt-b{flex:0 0 auto;flex-direction:column;gap:0}
.tilt-card .tilt-b .btn{min-height:44px;padding:0 14px;font-size:.9rem}
.tilt-card .tilt-b .linkbtn{min-height:44px;font-size:.84rem}
@media(max-height:560px) and (orientation:landscape){.tilt-card{margin-top:4px;padding:4px 8px 4px 12px}.tilt-card .tilt-m{display:none}.tilt-card .tilt-b{flex-direction:row;gap:8px}}
@media(max-height:700px) and (orientation:portrait){.tilt-card{margin-top:6px;padding:3px 6px 3px 12px}.tilt-card .tilt-m{display:none}.tilt-card .tilt-b{flex-direction:row;gap:4px}}
/* v5b: steps card beside the breath ring on wide screens */
.steps.beside{gap:10px;padding:10px 12px 10px}
.steps.beside .steps-demo{flex-basis:40px;height:40px}.steps.beside .steps-demo i{left:10px;top:10px}
@media(max-height:560px) and (orientation:landscape){.steps.beside .steps-t{font-size:1.05rem}.steps.beside ol{font-size:.8rem;margin-bottom:4px}.steps.beside li{margin:1px 0}}
@media(max-height:700px) and (orientation:portrait){.steps{padding:10px 12px 8px;gap:10px}.steps-demo{flex-basis:40px;height:40px}.steps-demo i{left:10px;top:10px}.steps ol{font-size:.82rem;line-height:1.28;margin-bottom:6px}.steps li{margin:1px 0}.steps-t{font-size:1.12rem;margin-bottom:3px}}
/* v5b: taps pass through the steps card to the game (only "Got it" and the card's own text selection catch them) */
.steps{pointer-events:none}.steps .steps-ok{pointer-events:auto}
.steps.compact{padding:8px 12px 8px;gap:10px}.steps.compact .steps-demo{flex-basis:36px;height:36px}.steps.compact .steps-demo i{left:8px;top:8px}
.steps.compact ol{font-size:.8rem;line-height:1.25;margin-bottom:4px}.steps.compact li{margin:0}.steps.compact .steps-t{font-size:1.02rem;margin-bottom:2px}.steps.compact .steps-ok{min-height:44px;padding:0 18px}
#s-rate.quick{animation-duration:.18s}
.steps.mini{padding:8px 10px 8px}.steps.mini .steps-t{padding-right:86px;min-height:28px;font-size:.98rem}.steps.mini .steps-ok{position:absolute;right:8px;top:6px;min-height:44px;padding:0 16px}
.steps.mini .steps-demo{flex-basis:30px;height:30px}.steps.mini .steps-demo i{left:5px;top:5px}.steps.mini ol{font-size:.76rem;margin-bottom:0}.steps.mini li{margin:0;line-height:1.22}
/* v5b item 9: breathe together button, only in a room */
.together-go{display:block;margin:8px auto 0;min-height:44px;font-size:15px}
.together-go[hidden]{display:none}
/* v6 item 8: room chip clear of the rating/result eyebrow; choices step back during the 12/12 moment */
html.inroom[data-screen=rate] #rate-eyebrow{margin-top:30px}
html.inroom[data-screen=result] #s-result .eyebrow{margin-top:30px}
html.bigm #kind{opacity:0;pointer-events:none;transition:opacity .5s}
/* v6 item 7: breathe-together invite on the result */
.together-res{display:block;margin:10px auto 0;min-height:44px}
.together-res[hidden]{display:none}
/* v8e: the whole 988 line uses one inherited size, never below 11px, including in-play at 320. */
.help988 .us,.help988 .us-if,.help988 .us-in{color:var(--cream);font-weight:500;font-size:inherit;padding:0 2px 0 6px;letter-spacing:-.01em}
.crisis-links .us-h{margin:0 0 -4px;color:var(--cream-dim)}
@media (max-width:420px){.help988{padding:0 4px}.help988 a{padding:0 3px;min-width:0}.help988 button{padding:0 4px}.help988 .us{padding:0 1px 0 4px}.help988>span[aria-hidden]{padding:0 1px}}

/* v6b: victory moment. Centre band only (top 24%..64%), pointer-events off, calm fade, no flashing */
.victory{position:fixed;left:0;right:0;top:24%;z-index:6;text-align:center;pointer-events:none;padding:0 18px;opacity:0;transition:opacity .45s ease}
.victory.on{opacity:1}
.victory .v-banner{display:inline-block;margin:0;padding:10px 22px;border-radius:999px;font:700 clamp(22px,6.4vw,34px)/1.15 'Cormorant Garamond',Georgia,serif;color:#0b0f1e;background:var(--vc,#f0c46a);box-shadow:0 0 0 2px rgba(255,255,255,.35),0 10px 40px rgba(0,0,0,.45);transform:scale(.9);transition:transform .6s cubic-bezier(.2,1.4,.4,1)}
.victory.on .v-banner{transform:scale(1)}
.victory .v-line{margin:14px auto 0;max-width:30ch;font:500 clamp(17px,4.6vw,22px)/1.35 system-ui,sans-serif;color:#fff3dc;text-shadow:0 2px 10px rgba(3,8,22,.95)}
.victory .v-sky{margin:12px 0 0;font:600 16px/1 system-ui,sans-serif;color:#ffe2a8;text-shadow:0 2px 8px rgba(3,8,22,.95)}
.victory .v-star{display:inline-block;color:var(--vc,#f0c46a);font-size:22px}
.victory.fly .v-star{animation:vfly 1.4s cubic-bezier(.3,.1,.2,1) forwards}
@keyframes vfly{0%{transform:translate(0,0) scale(1)}60%{transform:translate(0,-90px) scale(1.8)}100%{transform:translate(0,-130px) scale(.4);opacity:0}}
@media (prefers-reduced-motion:reduce){.victory .v-banner{transition:none;transform:none}.victory.fly .v-star{animation:none}.victory{transition:opacity .3s linear}}
@media (max-height:500px){.victory{top:18%}.victory .v-line{margin-top:8px}}

/* v6b Guilt: one-press cards with a clear pressed state + short glow */
.kind-pair button{transition:transform .12s ease,box-shadow .25s ease,background .25s ease}
.kind button.pressed,.kind button:active{transform:scale(.95);background:rgba(255,200,120,.32);box-shadow:0 0 0 2px #ffd27a,0 0 24px rgba(255,190,90,.75)}
.kind-pair.row{display:flex;gap:6px;justify-content:center;flex-wrap:nowrap}
.kind-pair.row button{flex:1 1 0;min-width:0;max-width:150px;min-height:48px;padding:8px 6px;font-size:15px;line-height:1.2}

.victory{display:flex;flex-direction:column;align-items:center}
.victory[hidden]{display:none}
.victory .v-panel,.victory p{white-space:normal;overflow:visible;text-overflow:clip;height:auto;max-height:none}
.victory .v-line{background:rgba(6,9,22,.62);border-radius:14px;padding:8px 14px;max-width:min(30ch,88vw)}
.victory .v-sky{background:rgba(6,9,22,.55);border-radius:999px;padding:6px 12px}

/* v7 Guilt: two big press cards (>=64 px), stacked under 360 px */
.kind-pair.row button{max-width:220px;min-height:64px;font-size:14px}
.kind-pair.row button small{display:block;font-size:15px;font-weight:700;margin-bottom:3px;color:#ffe2a8}
@media (max-width:359px){.kind-pair.row{flex-direction:column;align-items:center}.kind-pair.row button{width:92%;max-width:none}}

/* v7: action line HUD (top, under the 988 pill) + cue ring on the exact target */
.act{position:fixed;left:50%;top:64px;transform:translateX(-50%);z-index:5;max-width:min(92vw,560px);padding:7px 14px;border-radius:999px;background:rgba(6,9,22,.72);box-shadow:0 0 0 1px rgba(255,214,150,.35);color:#fff3dc;font:600 15px/1.25 system-ui,sans-serif;text-align:center;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.act .act-n{color:#ffd27a;font-weight:700;font-size:12px;letter-spacing:.04em;text-transform:uppercase;margin-right:4px}
@media (max-width:400px){.act{font-size:14px;white-space:normal;border-radius:16px;top:62px}}
@media (max-height:500px){.act{top:58px;font-size:13px}}
/* v8e: reserved band for the heavy note at 320/360 so it never covers play controls; #act and .kind-top sit under it. */
@media (max-width:400px){
  #heavy-note{z-index:6}
  html.playing.has-heavy #heavy-note{left:10px!important;right:10px!important;width:auto!important;max-width:none!important;top:var(--heavy-top, calc(64px + var(--safe-t)))!important}
  html.playing.has-heavy .act{top:calc(var(--heavy-top, 64px) + var(--heavy-h, 86px))!important;transform:translateX(-50%)}
  html.playing.has-heavy.inroom .act{top:calc(var(--heavy-top, 98px) + var(--heavy-h, 86px))!important}
  html.playing .kind.kind-top,html.playing .kind.kind-pair{top:calc(var(--play-top, 70px) + 8px)!important}
}
@media (max-width:400px) and (max-height:500px){
  html.playing.has-heavy .act{top:calc(var(--heavy-top, 56px) + var(--heavy-h, 80px))!important}
}
.cue{position:fixed;z-index:4;pointer-events:none;border-radius:999px;border:3px solid rgba(255,214,140,.95);box-shadow:0 0 18px rgba(255,190,90,.8),inset 0 0 12px rgba(255,190,90,.5);animation:cuep 1.2s ease-in-out infinite}
.cue.box{border-radius:16px}
@keyframes cuep{0%,100%{opacity:.55}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){.cue{animation:none;opacity:.9}}

/* v7 hook: "Not sure? Start here" for first-timers (pulses gently; still under reduced motion) */
.start-here{display:block;margin:4px auto 10px;min-height:48px;padding:0 20px;font-weight:700;animation:shpulse 2.4s ease-in-out infinite}
.start-here[hidden]{display:none}
@keyframes shpulse{0%,100%{box-shadow:0 0 0 0 rgba(255,214,120,.0)}50%{box-shadow:0 0 0 8px rgba(255,214,120,.22)}}
@media (prefers-reduced-motion:reduce){.start-here{animation:none}}

/* ---- v7b ---- */
/* fix 1: the heavy note sits under every sheet (modals are z 30) and is hidden while one is open */
body:has(.modal:not([hidden])) #heavy-note{display:none!important}
/* fix 4: the victory count is final from the first frame; it just pops when the star lands */
.victory .v-sky .pop,#v-count.pop{display:inline-block;animation:vpop .5s ease-out}
@keyframes vpop{0%{transform:scale(1)}40%{transform:scale(1.22)}100%{transform:scale(1)}}
/* fix 6: in a room the step bar sits below the room chip */
html.inroom.playing .act{top:calc(98px + var(--safe-t))}
@media (max-height:500px){html.inroom.playing .act{top:calc(58px + var(--safe-t));left:auto;right:auto;transform:translateX(-50%);max-width:min(52vw,460px)}}
/* fix 7: the privacy line under the first before-rating */
.rate-privacy{margin:10px auto 0;max-width:34ch;color:var(--mist);font-size:.78rem;line-height:1.35;text-align:center}
@media (max-height:500px){.rate-privacy{margin-top:4px;font-size:.72rem;max-width:60ch}}

/* v7b added scope: today's battle, share-my-win, next step, day count */
.today{display:flex;align-items:center;justify-content:center;gap:10px;margin:10px auto 0;pointer-events:auto}
.today[hidden]{display:none}
.today-k{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--gold-bright)}
.today-go{min-height:44px;padding:0 16px;border-radius:999px;border:1px solid rgba(240,196,106,.55);background:rgba(5,12,32,.72);color:var(--cream);font:inherit;font-size:.92rem;cursor:pointer}
.today-go span:not([aria-hidden]){color:var(--mist)}
.win-btn{margin:12px auto 0;display:block}
.win-img{display:block;margin:10px auto;max-width:100%;border-radius:12px;border:1px solid rgba(240,196,106,.4)}
.win-img.story{max-height:46vh}.win-img.square{max-height:40vh}
.seg{display:flex;gap:6px;justify-content:center}.seg button{min-height:44px;padding:0 14px;border-radius:999px;border:1px solid rgba(212,166,74,.45);background:transparent;color:var(--cream);font:inherit;cursor:pointer}
.seg button[aria-pressed=true]{background:var(--gold);color:var(--navy-950)}
/* v8f: always-available, user-opened "Get the free chapter" on a normal Inside result */
.res-chapter-row{display:flex;justify-content:center;margin:8px 0 0}
.res-chapter-row[hidden]{display:none}
#res-chapter{font-size:.9rem}
#res-chapter:focus-visible{outline:2px solid var(--gold-bright);outline-offset:3px;color:var(--gold-bright)}
@media (prefers-reduced-motion:reduce){#res-chapter{transition:none}}
@media (max-width:360px){#res-chapter{font-size:.85rem}}
@media (max-height:560px) and (orientation:landscape){.res-chapter-row{margin:4px 0 0}}
.res-step{margin:16px 0 4px;padding:14px;border-radius:16px;border:1px solid rgba(240,196,106,.35);background:rgba(5,12,32,.55);text-align:center}
.res-step[hidden],#step-free[hidden],#step-ebook[hidden]{display:none}
.step-h{margin:0 0 4px;font-family:var(--serif);font-size:1.25rem;color:#ffe3a8}
.step-form{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:8px 0}
.step-form[hidden]{display:none}
.step-form input[type=email]{flex:1 1 200px;min-height:44px;padding:0 12px;border-radius:12px;border:1px solid rgba(212,166,74,.5);background:rgba(3,8,22,.7);color:var(--cream);font:inherit}
.step-form .hp,.sr{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.step-toggle{display:flex;gap:8px;align-items:flex-start;width:100%;margin:8px 0 0;text-align:left;font-size:.8rem;line-height:1.35;color:var(--cream-dim);font-weight:400}
.step-toggle input{flex:none;margin-top:5px;width:18px;height:18px}
.step-consent,.step-ages,.step-fine{width:100%;margin:6px 0 0;font-size:.78rem;line-height:1.35;color:var(--mist);text-align:center;text-wrap:balance}
.step-ages{font-weight:700}
.step-fine a,.step-msg a{color:var(--gold-bright)}
.step-msg{min-height:1em;color:#ffe3a8}
.step-msg a{display:inline-block;margin-top:4px}
.step-msg:focus{outline:none}
.step-msg .step-ok{margin:6px 0 4px;font-size:1rem;font-weight:700;line-height:1.35;color:#fff1c9;text-wrap:balance}
.step-msg .step-note{margin:4px 0 0;font-size:.85rem;line-height:1.4;color:var(--cream-dim);text-wrap:balance}
@media (max-width:360px){.step-msg .step-ok{font-size:.95rem}.step-msg .step-note{font-size:.8rem}}
@media (max-width:360px){
  .step-toggle,.step-consent,.step-ages,.step-fine{font-size:.72rem;margin:4px 0 0}
  .res-step{margin:10px 0 4px;padding:10px}
}
@media (max-height:560px) and (orientation:landscape){
  .res-step{margin:6px 0 2px;padding:8px 12px}
  .step-h{font-size:1.05rem}
  .step-form{margin:4px 0}
  .step-toggle,.step-consent,.step-ages,.step-fine{font-size:.7rem;margin:3px 0 0}
  .step-toggle input{margin-top:3px}
}
.days-t{color:#ffe3a8}

/* v7b: copyright line (preview) */
.copy{font-size:.68rem;line-height:1.4;color:var(--mist);opacity:.75;text-align:center;margin:6px auto 0}
.steps.mini .steps-t{min-height:44px;display:flex;align-items:center}   /* v7c: the list always starts below "Got it", so no line runs under the button */
/* v7c fix 4: while the how-to card is open, its own "?" button steps aside (it would only reopen the card); Finish steps aside only when the card covers it */
body:has(#steps:not([hidden])) .steps-q{visibility:hidden}
body:has(#steps:not([hidden])) #btn-finish.under-steps{visibility:hidden}

/* v7c: tip jar, small and skippable, only after a normal win */
.res-tip{margin:12px auto 2px;max-width:380px;padding:10px 12px 6px;border-radius:14px;border:1px dashed rgba(240,196,106,.3);text-align:center}
.res-tip[hidden],.tip-thanks[hidden]{display:none}
.tip-h{margin:0 0 8px;font-family:var(--serif);font-size:1.02rem;color:var(--cream-dim)}.tip-opt{font-size:.8rem;color:var(--mist)}
.tip-amts{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.tip-b{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;min-width:50px;padding:0 10px;border-radius:22px;border:1px solid rgba(240,196,106,.45);background:rgba(5,12,32,.5);color:#ffe3a8;font:600 .95rem system-ui,sans-serif;cursor:pointer;text-decoration:none}
.tip-other-note{margin:8px 0 0;font-size:.78rem;line-height:1.35;color:var(--mist);text-wrap:balance}
.tip-msg{min-height:1em;margin:6px 0 0}.tip-skip{font-size:.85rem;min-height:40px}
/* v8f: ?tip=thanks note, sits below the 988 pill / mute / Back */
.tip-thanks{position:fixed;z-index:45;left:10px;right:10px;top:calc(var(--hud-pill-bottom, 70px) + 8px);max-width:min(420px,calc(100vw - 20px));margin:0 auto;padding:10px 12px;border-radius:14px;background:rgba(10,21,48,.94);border:1px solid rgba(240,196,106,.55);color:var(--cream);text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.5);box-sizing:border-box}
.tip-thanks p{margin:0;font-size:.92rem;line-height:1.35;text-wrap:balance}
.tip-thanks-x{display:inline-flex;align-items:center;justify-content:center;min-height:44px;min-width:44px;margin-top:2px;padding:0 12px;border:0;background:none;color:var(--gold-bright);font:600 .9rem system-ui,sans-serif;cursor:pointer}
@media (max-height:560px) and (orientation:landscape){
  .tip-thanks{padding:6px 10px;max-width:min(520px,calc(100vw - 20px))}
  .tip-thanks p{font-size:.85rem}
  .tip-thanks-x{min-height:40px;margin-top:0}
}

/* v7d: the 988 pill reads "If you're in the US: Call or text 988" (links unchanged: tel:988 and sms:988) */
.help988 .or{color:var(--cream-dim);padding:0 2px}
.help988 a[href^="tel"]{min-width:40px;padding:0 3px}
@media (max-width:400px){.help988{font-size:12px}}
@media (max-width:350px){.help988{font-size:11px}}
.heavy-note .hn-l{white-space:nowrap}.heavy-note .hn-l a{display:inline-block;line-height:44px;min-height:44px;padding:0 6px}
/* v7d: in play on narrow phones the pill must clear pause + mute (they start at ~254 px on a 360 px screen) */
@media (max-width:400px){html.playing .help988{font-size:12px;padding:0 2px}html.playing .help988 a{padding:0 2px}html.playing .help988 a[href^="tel"]{min-width:34px}html.playing .help988 .or{padding:0 1px}html.playing .help988 .us{padding:0 1px 0 4px}}
@media (max-width:400px){html.playing .help988>span[aria-hidden]{display:none}html.playing .help988 button{padding:0 4px 0 6px}}
/* v8e: wrap the exact sentence in play at 400 px and below so it stays clear of Pause; every fragment uses the pill's size (12 px, then 11 px at 345 and below). */
.help988 .us-in{display:none}
@media (max-width:400px){
  html.playing .help988 .us-if{display:inline}
  html.playing .help988 .us-in{display:none}
  html.playing .help988{white-space:normal;line-height:1.25;max-width:calc(100vw - 108px);border-radius:14px;padding:5px 8px;align-items:center;flex-wrap:wrap;column-gap:2px;row-gap:0;min-height:0}
  html.playing .help988 .us{flex:1 0 100%;display:block;padding:0;font-size:inherit;line-height:1.25}
  html.playing .help988 a,html.playing .help988 button,html.playing .help988 .or,html.playing .help988>span[aria-hidden]{display:inline-flex;align-items:center;min-height:26px;min-width:0;padding:0 3px;font-size:inherit}
  html.playing .help988 a[href^="tel"]{min-width:0}
  html.playing .help988>span[aria-hidden]{display:inline-flex}
  html.playing #hud-left{left:6px;right:auto;max-width:calc(100vw - 108px)}
  html.playing #hud-right{right:6px;gap:6px}
}
@media (max-width:345px){
  html.playing .help988{font-size:11px}
}
/* v8b: the Help sheet and crisis card carry the exact pill line, with Call / text 988 links */
.us988{font-weight:700;font-size:1.05rem;margin:4px 0 10px;color:var(--cream)}
.us988 a{color:var(--gold-bright);text-decoration:underline;text-underline-offset:3px;display:inline-flex;align-items:center;min-height:44px;padding:0 2px}
#kind.kind-bottom button{min-height:64px}   /* v8b: the Guilt "Let it rise" fallback is a big target too */

/* v8f: wrap the 988 pill at ≤400 px on every screen (split, Inside home, rating, Outside), not only Inside play, so mute never covers Help */
@media (max-width:345px){
  .help988{white-space:normal;line-height:1.25;max-width:calc(100vw - 64px);border-radius:14px;padding:5px 8px;align-items:center;flex-wrap:wrap;column-gap:2px;row-gap:0;min-height:0}
  .help988 .us{flex:1 0 100%;display:block;padding:0;font-size:inherit;line-height:1.25}
  .help988 a,.help988 button,.help988 .or,.help988>span[aria-hidden]{display:inline-flex;align-items:center;min-height:26px;min-width:0;padding:0 3px;font-size:inherit}
  .help988 a[href^="tel"]{min-width:0}
  .help988>span[aria-hidden]{display:inline-flex}
  #hud-left{left:6px;right:auto;max-width:calc(100vw - 64px)}
}
