:root{--ink:#24203d;--muted:#756f82;--paper:#fff8eb;--card:#fffefa;--line:#ddd3bf;--board:#242c5b;--board-edge:#171b3e;--coral:#ff626c;--coral-dark:#bc2738;--yellow:#ffd33d;--yellow-dark:#b27b00;--mint:#74ddb5;--shadow:#d9cfba;box-sizing:border-box;font-family:ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;color:var(--ink);background:var(--paper)}*{box-sizing:inherit}body{margin:0;min-height:100vh;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:radial-gradient(circle at 5% 8%,#ffe0b5 0 7rem,transparent 7.1rem),radial-gradient(circle at 96% 88%,#dcfff1 0 8rem,transparent 8.1rem),linear-gradient(145deg,#fff9ed,#f3efff)}button,input{font:inherit;color:inherit}.skip{position:fixed;left:1rem;top:-5rem;z-index:20;background:white;padding:.8rem}.skip:focus{top:1rem}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.topbar{width:min(1120px,100%);margin:auto;display:flex;align-items:center;justify-content:space-between;padding:.35rem 0 .8rem;border-bottom:1px solid #e2dacb}.brand{display:flex;align-items:center;gap:.5rem;color:inherit;text-decoration:none;font-weight:950}.brand img{width:38px;height:38px}.topbar>div{display:flex;align-items:center;gap:.55rem}.topbar>div>span{font-weight:900}.quiet,.sound,.icon-button{border:2px solid var(--line);background:#fffaf2;border-radius:13px;padding:.65rem .8rem;font-weight:850;cursor:pointer}.sound{background:var(--ink);border-color:var(--ink);color:white}.setup,.play{width:min(1060px,100%);margin:auto}.setup-intro{display:flex;align-items:center;justify-content:center;gap:1rem;padding:clamp(1.4rem,4vw,3rem) .5rem 1.2rem}.setup-intro img{width:clamp(72px,11vw,112px);filter:drop-shadow(0 8px 0 #ded3bd)}.eyebrow{margin:0 0 .25rem;color:#7156d9;text-transform:uppercase;letter-spacing:.13em;font-size:.75rem;font-weight:950}.setup-intro h1{font-size:clamp(2.35rem,7vw,4.4rem);line-height:1;margin:0}.setup-intro p:last-child{color:var(--muted);margin:.45rem 0 0;font-size:clamp(.95rem,2vw,1.2rem)}.setup-card{background:#fffffff0;border:2px solid var(--line);border-radius:28px;padding:clamp(1rem,3vw,1.8rem);box-shadow:0 11px 0 var(--shadow)}.setup-head{display:flex;align-items:start;justify-content:space-between;gap:1rem}.setup-head h2{margin:.15rem 0 1rem;font-size:clamp(1.4rem,3vw,2rem)}.text-button{border:0;background:none;color:#7156d9;font-weight:900;cursor:pointer;padding:.6rem}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.wide{grid-column:1/-1}fieldset{border:0;padding:0;margin:0}legend,label>span{display:block;font-weight:900;margin-bottom:.5rem}.segments{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:.5rem}.segments button{min-height:46px;border:2px solid var(--line);border-radius:13px;background:#fffaf2;font-weight:850;cursor:pointer}.segments button[aria-pressed=true]{background:var(--ink);border-color:var(--ink);color:#fff;box-shadow:0 5px 0 #5b4c8d}.names{display:grid;grid-template-columns:1fr 1fr;gap:.7rem}.names label{font-weight:850}.names input{width:100%;border:2px solid var(--line);border-radius:13px;padding:.75rem;background:white}.color-choice button{display:flex;align-items:center;justify-content:center;gap:.5rem}.disc-swatch{display:inline-block;width:22px;height:22px;border-radius:50%;background:var(--disc);box-shadow:inset 0 -4px 0 #0002}.primary{border:0;border-radius:15px;background:var(--mint);color:#173a32;font-weight:950;padding:.9rem 1rem;box-shadow:0 7px 0 #249a72;cursor:pointer}.start{width:100%;margin-top:1.2rem;font-size:1.05rem}.offline-status{text-align:center;color:var(--muted);font-size:.84rem;margin:.9rem 0 0}.recovery{background:#fff0bf;border:2px solid #e4b637;border-radius:14px;padding:.75rem;margin-bottom:1rem}.game-head{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:1rem 0 .7rem}.game-head h1{font-size:clamp(1.35rem,3vw,2rem);margin:0}.game-head p:last-child{margin:.25rem 0;color:var(--muted)}.head-actions{display:flex;gap:.45rem}.score{width:min(740px,100%);margin:0 auto .85rem;display:grid;grid-template-columns:1fr .58fr 1fr;border:2px solid var(--line);background:white;border-radius:19px;overflow:hidden;box-shadow:0 6px 0 var(--shadow)}.score>div{position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.45rem;padding:.65rem .8rem}.score>div+div{border-left:1px solid var(--line)}.score .active{background:#f2edff}.mini-disc{width:22px;height:22px;border-radius:50%;background:var(--disc);box-shadow:inset 0 -4px 0 #0002}.mini-disc.ring::after,.disc.player-p2::after{content:"";position:absolute;inset:25%;border:2px solid #24203d;border-radius:50%}.score small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:800}.score strong{font-size:1.35rem}.game-shell{width:min(720px,100%);margin:auto}.column-preview{height:clamp(30px,5vw,46px);display:grid;grid-template-columns:repeat(7,1fr);padding:0 clamp(8px,1.7vw,14px);gap:clamp(4px,1vw,8px)}.preview-disc{display:grid;place-items:center;opacity:0;transition:opacity .12s}.preview-disc::before{content:"";width:70%;aspect-ratio:1;border-radius:50%;background:var(--active-disc);box-shadow:inset 0 -5px 0 #0002}.game-shell:has(.column-button:hover:not(:disabled)) .preview-disc{opacity:.12}.game-shell[data-selected="0"] .preview-disc:nth-child(1),.game-shell[data-selected="1"] .preview-disc:nth-child(2),.game-shell[data-selected="2"] .preview-disc:nth-child(3),.game-shell[data-selected="3"] .preview-disc:nth-child(4),.game-shell[data-selected="4"] .preview-disc:nth-child(5),.game-shell[data-selected="5"] .preview-disc:nth-child(6),.game-shell[data-selected="6"] .preview-disc:nth-child(7){opacity:1}.board-wrap{position:relative}.column-buttons{position:absolute;inset:0;z-index:5;display:grid;grid-template-columns:repeat(7,1fr);padding:clamp(8px,1.7vw,14px);gap:clamp(4px,1vw,8px)}.column-button{border:0;background:transparent;cursor:pointer;border-radius:12px;min-width:0}.column-button:hover:not(:disabled),.column-button:focus-visible{background:#fff2}.column-button.selected{box-shadow:inset 0 0 0 3px #fff7}.column-button.full{animation:fullshake .22s}.board{aspect-ratio:7/6;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:repeat(6,1fr);gap:clamp(4px,1vw,8px);padding:clamp(8px,1.7vw,14px);background:linear-gradient(145deg,#303b77,var(--board));border:4px solid var(--board-edge);border-radius:clamp(19px,4vw,30px);box-shadow:0 11px 0 #bdb39f}.slot{position:relative;display:grid;place-items:center;border-radius:50%;background:#fff9ed;box-shadow:inset 0 5px 0 #1115}.disc{position:relative;width:88%;aspect-ratio:1;border-radius:50%;background:var(--disc);box-shadow:inset 0 -8px 0 #0002,0 2px 2px #0003}.disc.player-p2::after{border-width:clamp(2px,.5vw,4px)}.disc.last{outline:3px solid white;outline-offset:-6px}.disc.winning{animation:winpulse .7s ease-in-out infinite alternate;outline:4px solid #fff;outline-offset:2px}.disc.dropping{animation:drop var(--drop-time,.3s) cubic-bezier(.2,.75,.35,1.16) both}.thinking{margin:.8rem auto 0;width:max-content;display:flex;align-items:center;gap:.5rem;padding:.5rem .8rem;border:2px solid var(--line);background:white;border-radius:999px;font-weight:850;box-shadow:0 4px 0 var(--shadow)}.thinking i{width:15px;height:15px;border:3px dotted #7156d9;border-radius:50%;animation:spin 1.1s linear infinite}.result-banner{margin:.9rem auto 0;display:flex;align-items:center;justify-content:space-between;gap:.8rem;background:white;border:2px solid var(--line);border-radius:19px;padding:.8rem;box-shadow:0 6px 0 var(--shadow)}.result-banner>div{display:flex;align-items:center;gap:.6rem}.result-banner strong,.result-banner small{display:block}.result-banner small{color:var(--muted)}dialog{width:min(480px,calc(100% - 24px));border:0;border-radius:24px;padding:1.2rem;color:var(--ink);box-shadow:0 25px 70px #17102666}dialog::backdrop{background:#20193999;backdrop-filter:blur(5px)}.dialog-head{display:flex;align-items:center;justify-content:space-between}.dialog-head h2{margin:0}.dialog-head button{width:44px;height:44px;border:2px solid var(--line);border-radius:12px;background:white}.dialog-actions{display:flex;justify-content:flex-end;gap:.55rem;margin-top:1rem}.rules li+li{margin-top:.5rem}.loading{text-align:center;padding:20vh 1rem}.loading img{width:96px}.toast{position:fixed;left:50%;bottom:max(1rem,env(safe-area-inset-bottom));translate:-50% 0;background:var(--ink);color:white;border-radius:999px;padding:.7rem 1rem;z-index:30;font-weight:850;animation:toast .2s}.cell-reader{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}button:focus-visible,input:focus-visible{outline:4px solid #ffbd38;outline-offset:3px}@keyframes drop{from{translate:0 calc(-1 * var(--travel,5) * 105%)}70%{translate:0 2%}85%{translate:0 -5%}to{translate:0 0}}@keyframes winpulse{to{scale:1.08;filter:brightness(1.1)}}@keyframes fullshake{25%{translate:-4px}75%{translate:4px}}@keyframes spin{to{rotate:360deg}}@keyframes toast{from{translate:-50% 10px;opacity:0}}
@media(max-width:650px){body{padding-left:6px;padding-right:6px}.topbar>div>span{display:none}.turnza-install b{display:none}.setup-intro{justify-content:flex-start}.setup-intro img{width:68px}.setup-intro h1{font-size:2.25rem}.setup-card{padding:.9rem;border-radius:22px}.form-grid,.names{grid-template-columns:1fr}.wide{grid-column:auto}.game-head{align-items:flex-start}.head-actions{display:grid}.head-actions button{padding:.5rem .6rem}.score>div{padding:.55rem .4rem;gap:.25rem}.score small{font-size:.69rem}.score strong{font-size:1.15rem}.mini-disc{width:18px}.game-shell{width:min(100%,calc((100vh - 255px)*7/6))}.column-preview{height:30px}.board{border-width:3px}.result-banner{align-items:stretch;flex-direction:column}.result-banner>div:last-child{display:grid;grid-template-columns:1fr 1fr}.dialog-actions{display:grid;grid-template-columns:1fr 1fr}}
@media(max-height:620px) and (orientation:landscape){.topbar{padding-bottom:.2rem}.play{display:grid;grid-template-columns:minmax(330px,68vh) 1fr;gap:.8rem;align-items:start}.game-head,.score,.result-banner{grid-column:2;margin:.2rem 0}.game-shell{grid-row:1/5;width:min(68vh,58vw)}.game-head{padding:.2rem 0}.score{grid-template-columns:1fr}.score>div+div{border-left:0;border-top:1px solid var(--line)}}
@media(hover:none){.game-shell:has(.column-button:hover:not(:disabled)) .preview-disc{opacity:0}}
.mini-disc{position:relative;display:block;flex:0 0 auto}
.game-shell[style*="--coral"] .preview-disc::before{background:#ff626c}.game-shell[style*="--yellow"] .preview-disc::before{background:#ffd33d}
.disc-swatch[style*="--coral"],.mini-disc[style*="--coral"],.disc[style*="--coral"]{background:#ff626c!important}.disc-swatch[style*="--yellow"],.mini-disc[style*="--yellow"],.disc[style*="--yellow"]{background:#ffd33d!important}.disc-swatch[style*="--coral"],.disc[style*="--coral"]{box-shadow:inset 0 -6px 0 #bc2738,0 2px 2px #0003}.disc-swatch[style*="--yellow"],.disc[style*="--yellow"]{box-shadow:inset 0 -6px 0 #b27b00,0 2px 2px #0003}
.disc.player-p2[style*="--yellow"]::after,.mini-disc.ring[style*="--yellow"]::after{display:none}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}
.column-buttons{padding:0;gap:0}
@media(max-width:650px){.topbar button{min-width:44px;min-height:44px}}
