/* BotOrNot skin: SPLIT, original 01 palette (Alex's pick). Layout, copy and spring motion from the Spotlight pass.
   Idea: red top half (BOT / them), blue bottom half (NOT / you). The speaking half stays lit, the other dims.
   Reveal: the screen fills with the answer's colour (human = red, bot = blue); a wrong call ends in red.
   State in: #app[data-screen], #round[data-who]; motion.js adds #app[data-result=right|wrong] and drives --seam. */
@property --seam{syntax:'<number>';inherits:true;initial-value:50}
:root{--red:#FF4B3E;--blue:#2447F9;--ink:#111;--bg:#2447F9;--fg:#fff;--mute:#fff;--human:#fff;--ai:#fff;--accent:#FF4B3E;--green:#fff;
 --t:var(--red);--b:var(--blue);--ti:#fff;--bi:#fff;--sm:max(19px,4.9cqw);
 --spring:linear(0,.009,.035 2.1%,.141 4.4%,.723 12.9%,.938 16.7%,1.017,1.077,1.121,1.149 24.3%,1.159,1.163,1.161,1.154 29.9%,1.129 32.8%,1.051 39.6%,1.017 43.1%,.991,.977 51%,.974 53.8%,.975 57.1%,.997 69.8%,1.003 76.9%,1.004 83.8%,1);
 --out:cubic-bezier(.22,1,.36,1);--f:ui-rounded,"SF Pro Rounded",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif}
*{box-sizing:border-box;margin:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;background:#111;overscroll-behavior:none}
body{display:flex;justify-content:center}
#app{position:relative;width:100%;max-width:460px;height:100dvh;overflow:hidden;container-type:size;font-family:var(--f);color:var(--fg);--seam:50;transition:--seam .75s var(--spring)}
/* the two halves */
#app::before,#app::after{content:"";position:absolute;inset:0;transition:background-color .35s var(--out),filter .45s var(--out)}
#app::before{background:var(--t);clip-path:inset(0 0 calc((100 - var(--seam))*1%) 0);z-index:1}
#app::after{background:var(--b);z-index:0}
#app>*{z-index:2}
header{position:absolute;top:max(5cqh,env(safe-area-inset-top));left:0;right:0;text-align:center;font:700 3.9cqw var(--f);color:var(--ti);opacity:.85;pointer-events:none}
header>span:first-child{display:none}
section{display:none;position:absolute;inset:0}
#app[data-screen=home] #home,#app[data-screen=search] #search,#app[data-screen=round] #round,#app[data-screen=verdict] #verdict,#app[data-screen=reveal] #reveal,#app[data-screen=board] #board{display:block}
.hide{display:none!important}
button{font:inherit;border:0;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none}
/* shared: huge words centred in each half, orb on the seam */
.huge,#home h1 b,#search h2,#verdict .row button{position:absolute;left:0;right:0;text-align:center;font:900 40cqw/.9 var(--f);letter-spacing:-.045em;transform:translateY(-50%);background:none}
.orb,#play,.ring,#vsecs,#ricon,.pulse{position:absolute;left:50%;top:calc(var(--seam)*1cqh);width:30cqw;height:30cqw;margin:-15cqw;border-radius:50%;background:#fff;color:var(--ink);display:grid;place-items:center;font:900 10cqw var(--f);letter-spacing:-.03em;font-variant-numeric:tabular-nums;box-shadow:0 0 0 max(9px,2.3cqw) rgba(0,0,0,.22);transition:transform .55s var(--spring);z-index:4}
#play:active{transform:scale(.9);transition-duration:.12s}
@keyframes breathe{50%{transform:scale(1.05)}}
@keyframes ripple{from{transform:scale(1);opacity:.8}to{transform:scale(1.7);opacity:0}}
#play,.pulse{animation:breathe 1.8s ease-in-out infinite}
#play::after,.pulse::after{content:"";position:absolute;inset:0;border-radius:50%;border:1cqw solid #fff;animation:ripple 1.8s var(--out) infinite}
/* HOME  (DOM change: <h1><b>BOT</b><b>NOT</b></h1>, #play text "OR") */
#home h1 b:first-child{top:25cqh;color:var(--ti)}#home h1 b:last-child{top:75cqh;color:var(--bi)}
#home>p:not(.small){display:none}
#home .small{position:absolute;left:8cqw;right:8cqw;bottom:max(4.5cqh,env(safe-area-inset-bottom));text-align:center;font:700 3.5cqw/1.3 var(--f);color:var(--bi);opacity:.7}
#showboard{position:absolute;right:5cqw;top:max(4cqh,env(safe-area-inset-top));height:10cqw;padding:0 4cqw;border-radius:9cqw;background:rgba(0,0,0,.14);color:var(--ti);font:800 3.6cqw var(--f);z-index:5}
/* SEARCH (also the mic ask moment) */
#search h2{top:25cqh;color:var(--ti);font-size:17cqw;padding:0 6cqw}
#search p{position:absolute;left:8cqw;right:8cqw;top:75cqh;transform:translateY(-50%);text-align:center;font:800 7.4cqw/1.12 var(--f);color:var(--bi)}
.pulse{font-size:0}
/* ROUND: them = top half, you = bottom half. Active half is green (motion.js sets --seam 62/38). */
#app[data-screen=round]:has(#round[data-who=them])::after,#app[data-screen=round]:has(#round[data-who=you])::before{filter:saturate(.5) brightness(.55)}
#dots{position:absolute;top:max(7.5cqh,env(safe-area-inset-top));left:0;right:0;display:flex;justify-content:center;gap:1.6cqw;color:var(--ti)}
#dots i{width:2.2cqw;height:2.2cqw;border-radius:9cqw;background:currentColor;opacity:.3;transition:width .5s var(--spring),opacity .3s}
#dots i.on{width:8cqw;opacity:1}#dots i.past{opacity:.7}
#phase,.bubble{position:absolute;left:8cqw;right:8cqw;text-align:center;transition:top .01s}
#phase{font:800 3.6cqw var(--f);letter-spacing:.12em;text-transform:uppercase;opacity:.75}
#round .bubble{font:800 7.4cqw/1.12 var(--f);letter-spacing:-.02em;text-wrap:balance}
#round .bubble b{display:none}
#round[data-who=them] #phase{top:calc(var(--seam)*.5cqh - 12cqw);color:var(--ti)}#round[data-who=them] .bubble{top:calc(var(--seam)*.5cqh - 5cqw);color:var(--ti)}
#round[data-who=you] #phase{top:calc(50cqh + var(--seam)*.5cqh - 16cqw);color:var(--bi)}#round[data-who=you] .bubble{top:calc(50cqh + var(--seam)*.5cqh - 9cqw);color:var(--bi)}
.ring svg{position:absolute;inset:-1.4cqw;width:auto;height:auto;transform:rotate(-90deg)}
.ring circle{fill:none;stroke:rgba(0,0,0,.12);stroke-width:7}.ring .fg{stroke:#000;stroke-linecap:round;transition:stroke-dashoffset .1s linear}
.ring .num small{display:none}
.ring.tick{animation:tick .3s var(--out)}@keyframes tick{from{transform:scale(1.08)}}
#done,#next{position:absolute;left:8cqw;right:8cqw;bottom:max(5.5cqh,env(safe-area-inset-bottom));height:16cqw;border-radius:9cqw;background:#fff;color:#000;font:900 5.6cqw var(--f);transition:transform .5s var(--spring)}
#done:active,#next:active{transform:scale(.96);transition-duration:.12s}
#done{background:#fff;color:var(--ink)}
#typebox{position:absolute;left:8cqw;right:8cqw;bottom:calc(max(5.5cqh,env(safe-area-inset-bottom)) + 19cqw);display:flex;gap:2cqw}
#typebox input{flex:1;min-width:0;height:12cqw;border-radius:9cqw;border:0;padding:0 5cqw;font:700 16px var(--f);background:rgba(0,0,0,.12);color:inherit;outline:0}
#typebox input::placeholder{color:currentColor;opacity:.5}
#typebox button{height:12cqw;padding:0 5cqw;border-radius:9cqw;background:rgba(0,0,0,.12);color:inherit;font:800 4cqw var(--f)}
#round[data-who=you] #typebox{color:#fff}
/* VERDICT: the two halves are the two buttons */
#verdict h2{position:absolute;top:max(7.5cqh,env(safe-area-inset-top));left:0;right:0;text-align:center;font:700 3.9cqw var(--f);color:var(--ti);opacity:.85}
#verdict .row{position:absolute;inset:0}
#verdict .row button{top:25%;height:50%;display:grid;place-items:center;color:var(--ti);transition:transform .5s var(--spring)}
#verdict .row button.human{font-size:23.5cqw}
#verdict .row button.ai{top:75%;color:var(--bi)}
#verdict .row button:active{transform:translateY(-50%) scale(.94);transition-duration:.12s}
#vsecs{font-size:9cqw;pointer-events:none}
/* REVEAL: the wrong half slides off; the screen fills with the answer's colour (human = red top, bot = blue bottom).
   A wrong call (game over) always ends in red. motion.js sets #app[data-result]; app.js sets #reveal[data-partner]. */
#app[data-screen=reveal]{--seam:100}
#app[data-screen=reveal][data-result=right]:has(#reveal[data-partner=ai]){--seam:0}
#reveal{color:#fff;text-align:center}
#ricon{top:15cqh;transform:scale(.72);font-size:0}
#ricon svg{width:12cqw;height:12cqw}
#reveal>*{animation:rise .7s var(--spring) backwards}
#rtitle{position:absolute;left:6cqw;right:6cqw;top:27cqh;font:900 9cqw/1 var(--f);letter-spacing:-.03em;animation-delay:.3s}
#rsub{position:absolute;left:8cqw;right:8cqw;top:calc(27cqh + 21cqw);font:700 4cqw var(--f);opacity:.7;animation-delay:.36s}
#reveal .bubble{position:absolute;left:8cqw;right:8cqw;top:42cqh;font:800 5.4cqw/1.2 var(--f);animation-delay:.42s}
#reveal .bubble b{display:none}
#rstreak{position:absolute;left:0;right:0;top:50cqh;font:900 8cqw/1 var(--f);animation-delay:.5s}
#rstreak .n{display:block;font:900 40cqw/1 var(--f);letter-spacing:-.05em;font-variant-numeric:tabular-nums}
#rstreak .n.pop{animation:pop .5s var(--spring)}@keyframes pop{from{scale:1.18}}
#rbeat{position:absolute;left:0;right:0;top:calc(50cqh + 50cqw);font:800 4.2cqw var(--f);opacity:.8;animation-delay:.56s}
#next{animation-delay:.62s}
#reveal .row{position:absolute;right:5cqw;top:max(4cqh,env(safe-area-inset-top));display:flex;gap:2cqw;animation-delay:.68s}
#reveal .row button{height:10cqw;padding:0 4cqw;border-radius:9cqw;background:var(--ink);color:#fff;font:800 3.8cqw var(--f)}
@keyframes rise{from{opacity:0;transform:translateY(3cqh) scale(.94)}}
/* BOARD */
#app[data-screen=board]{--seam:100}
#board{color:#fff;padding:max(8cqh,env(safe-area-inset-top)) 8cqw 0;overflow:auto}
#board h2{font:800 3.4cqw var(--f);letter-spacing:.12em;opacity:.7;text-transform:uppercase;margin:3cqh 0 1cqh}
#board table{width:100%;border-collapse:collapse;font:800 4.6cqw/2 var(--f);font-variant-numeric:tabular-nums}
#board td:last-child,#board th:last-child{text-align:right}
#back{position:absolute;right:5cqw;top:max(4cqh,env(safe-area-inset-top));height:10cqw;padding:0 4cqw;border-radius:9cqw;background:var(--ink);color:#fff;font:800 3.6cqw var(--f)}
@media (max-height:700px){#rstreak .n{font-size:32cqw}#rbeat{top:calc(50cqh + 41cqw)}}
@media (prefers-reduced-motion:reduce){#app,#app *,#app::before,#app::after{animation:none!important;transition:opacity .2s linear,background-color .2s linear!important}}
/* streak HUD only on home; elsewhere the big number carries it */
#app:not([data-screen=home]) header{display:none}
#app[data-screen=home] header{right:auto;left:6cqw;text-align:left}

/* --- contrast (WCAG AA). White on #2447F9 = 6.6:1 (any size). White on #FF4B3E = 3.3:1: large text only,
   so every small label that can sit on red is >= 19px at weight 800 with full opacity, or sits in a dark chip. --- */
header{font:800 var(--sm) var(--f);opacity:1}
#showboard{background:var(--ink);color:#fff}
#phase{font:800 var(--sm) var(--f);letter-spacing:.06em;opacity:1}
#round[data-who=them] #phase{top:calc(var(--seam)*.5cqh - 15cqw)}#round[data-who=you] #phase{top:calc(50cqh + var(--seam)*.5cqh - 19cqw)}
#verdict h2{font:800 var(--sm) var(--f);opacity:1}
#rsub{font:800 var(--sm) var(--f);opacity:1}#rbeat{font:800 var(--sm) var(--f);opacity:1}
#home .small{opacity:1;font-weight:700}
#typebox input{background:rgba(0,0,0,.28)}#typebox input::placeholder{opacity:.85}#typebox button{background:var(--ink);color:#fff}
#dots i{opacity:.45}
/* --- game lane additions (keep when the skin is updated) --- */
#cap{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden}
#board h1{font:800 15cqw/.92 var(--f);letter-spacing:-.05em;margin:0 0 1.5cqh;text-align:left}
#board h2{font:800 6.4cqw/1 var(--f);letter-spacing:-.03em;opacity:1;text-transform:none;margin:5cqh 0 1.5cqh;text-align:left}
#bme{color:#fff;font:800 var(--sm)/1.25 var(--f);margin:0 0 2.5cqh;text-align:left}
#board{padding-bottom:max(6cqh,env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1.6cqw}
.rows li{display:grid;grid-template-columns:8cqw 1fr auto;grid-template-areas:"r n b" "r s b";align-items:center;column-gap:3cqw;padding:2.4cqw 4cqw 2.4cqw 2.4cqw;border-radius:5cqw;background:rgba(0,0,0,.55);color:#fff;text-align:left;animation:rise .5s var(--out) both}
.rows li:nth-child(2){animation-delay:.04s}.rows li:nth-child(3){animation-delay:.08s}.rows li:nth-child(4){animation-delay:.12s}.rows li:nth-child(n+5){animation-delay:.16s}
.rows i{grid-area:r;font:800 3.6cqw var(--f);font-style:normal;width:8cqw;height:8cqw;border-radius:50%;background:#fff;color:var(--ink);display:grid;place-items:center;font-variant-numeric:tabular-nums}
.rows span{grid-area:n;font:800 4.8cqw/1.15 var(--f);letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rows small{grid-area:s;font:700 3.3cqw/1.2 var(--f);opacity:.85}
.rows b{grid-area:b;font:800 9cqw/1 var(--f);letter-spacing:-.04em;font-variant-numeric:tabular-nums}
.rows li.me{background:#fff;color:var(--ink)}.rows li.me i{background:var(--blue);color:#fff}.rows li.me small{opacity:.7}
.rows li.empty{display:block;padding:4cqw}.rows li.empty span{font-size:4.2cqw}
@media (max-height:700px){#reveal .bubble{top:46cqh}#board h1{font-size:12cqw}}
