/* Game surface and game-specific controls only. */
:root{color-scheme:dark;--bg:#060b17;--cyan:#66e7ef;--coral:#ff8172;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.brand-pill,.home-pill{display:inline-flex;align-items:center;gap:9px;color:var(--ink);text-decoration:none;font-size:.83rem;font-weight:800;letter-spacing:.025em}
.brand-mark{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:linear-gradient(145deg,#f7dd8b,#b97721);color:#09101c;box-shadow:0 0 22px rgba(238,196,92,.27)}
.home-pill{padding:9px 13px;border:1px solid rgba(255,255,255,.11);border-radius:999px;background:rgba(255,255,255,.045)}
.player-line{margin:8px 0 0;color:var(--muted);font-size:.72rem;letter-spacing:.12em}
.player-line strong{color:var(--ink)}
.game-actions{display:flex;gap:7px}
.close-button{border:1px solid rgba(255,255,255,.13);background:linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.025));color:var(--ink);width:42px;height:42px;border-radius:13px;font-weight:900;font-size:1.05rem;box-shadow:inset 0 1px rgba(255,255,255,.08);cursor:pointer}
.stats{display:grid;grid-template-columns:repeat(4,1fr);margin-top:17px;border:1px solid var(--line);border-radius:16px;background:rgba(5,10,22,.76);overflow:hidden}
.stats>div{padding:10px 8px;text-align:center;border-right:1px solid rgba(255,255,255,.07)}
.stats>div:last-child{border:0}
.stats span{display:block;color:#8fa0b9;font-size:.61rem;font-weight:900;letter-spacing:.16em}
.stats strong{display:block;margin-top:4px;font-size:.96rem;color:#fff}
.stats>div:first-child strong{color:var(--gold)}
.racer-strip{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:10px 0}
.racer{display:grid;grid-template-columns:42px 1fr 38px;align-items:center;min-height:52px;padding:3px 9px 3px 3px;border:1px solid rgba(255,255,255,.1);border-radius:16px;background:rgba(7,15,30,.72);transition:.25s}
.racer.active{border-color:rgba(238,196,92,.72);box-shadow:0 0 24px rgba(238,196,92,.14)}
.racer img{width:42px;height:42px;object-fit:contain}
.racer small,.racer strong{display:block}
.racer small{color:#8fa0b9;font-size:.55rem;letter-spacing:.13em}
.racer strong{font-size:.78rem}
.racer b{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.08);color:var(--gold)}
.board-frame{width:100%;max-width:820px;margin:auto}
.board-art{position:relative;aspect-ratio:1;background:url('assets/cloudspire-board.webp') center/cover no-repeat;filter:drop-shadow(0 28px 55px rgba(0,0,0,.48));isolation:isolate}
.board,.routes{position:absolute;inset:12.5%;width:75%;height:75%}
.board{display:grid;z-index:1}
.cell{position:relative;display:grid;place-items:start;border:1px solid rgba(244,223,153,.32);background:linear-gradient(145deg,rgba(7,33,56,.43),rgba(29,120,132,.2));color:#fff;text-shadow:0 1px 3px #001;font-size:clamp(.5rem,1.5vw,.82rem);font-weight:900;padding:3px;cursor:default}
.cell:nth-child(3n+1){background:linear-gradient(145deg,rgba(21,84,102,.44),rgba(5,29,48,.39))}
.cell.finish{background:radial-gradient(circle,rgba(255,222,116,.72),rgba(27,93,94,.38));color:#151109}
.cell.target{cursor:pointer;animation:targetPulse 1s infinite alternate;z-index:5;box-shadow:inset 0 0 0 3px #fff1a5,0 0 25px #ffdc62}
.routes{z-index:2;overflow:visible;pointer-events:none}
.route-ladder{stroke:#ffd879;stroke-width:1.25;stroke-linecap:round;filter:drop-shadow(0 0 1.4px #fff3b8) drop-shadow(0 0 3px #9b5a00)}
.route-rung{stroke:#fff0b6;stroke-width:.8}
.route-slide{fill:none;stroke:#76f1f7;stroke-width:2.8;stroke-linecap:round;filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 3px #00899a)}
.route-slide-highlight{fill:none;stroke:rgba(255,255,255,.78);stroke-width:.55;stroke-linecap:round}
.piece{position:absolute;z-index:6;width:clamp(28px,6.2%,54px);height:clamp(28px,6.2%,54px);transform:translate(-50%,-66%);transition:left .38s cubic-bezier(.2,.85,.35,1.18),top .38s cubic-bezier(.2,.85,.35,1.18);pointer-events:none;filter:drop-shadow(0 5px 6px rgba(0,0,0,.55))}
.piece img{width:100%;height:100%;object-fit:contain}
.piece-rabbit{margin-left:8px;margin-top:7px}
.piece.bounce{animation:pieceBounce .55s cubic-bezier(.15,.75,.25,1.35)}
.piece.slide{animation:pieceSlide .7s ease-in-out}
.turn-controls{display:grid;grid-template-columns:62px minmax(170px,300px);justify-content:center;gap:12px;align-items:center;margin-top:5px}
.die{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:linear-gradient(145deg,#fff7df,#d6e9e6);color:#102036;box-shadow:inset 0 2px #fff,0 12px 28px rgba(0,0,0,.32);font-size:2rem}
.die.rolling{animation:dieRoll .18s linear infinite}
.danger-button{border:0;border-radius:14px;min-height:49px;padding:12px 18px;font-weight:900;cursor:pointer}
.danger-button{color:#fff;background:#8d3040}
.full{display:flex;width:100%;justify-content:center;text-align:center}
.close-button{font-size:1.55rem}
.field{display:grid;gap:8px;margin:16px 0;color:#dbe4f2;font-weight:800;font-size:.83rem}
.field select,.field input[type=range]{width:100%;border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:12px;background:#091326;color:#fff}
.toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:14px 0;color:#dbe4f2;font-weight:800;font-size:.83rem}
.toggle input{position:absolute;opacity:0}
.toggle i{position:relative;width:48px;height:28px;border-radius:999px;background:#263249;transition:.2s}
.toggle i::after{content:"";position:absolute;width:22px;height:22px;left:3px;top:3px;border-radius:50%;background:#fff;transition:.2s}
.toggle input:checked+i{background:#b98925}
.toggle input:checked+i::after{transform:translateX(20px)}
.compact{text-align:center}
.compact button{margin-top:10px}
.result-tokens{display:flex;justify-content:center;align-items:center;height:100px;margin:10px 0}
.result-tokens img{width:92px;height:92px;object-fit:contain}
.result-tokens span{color:var(--gold);font-size:2rem}
@keyframes targetPulse{to{transform:scale(.95);filter:brightness(1.22)}}
@keyframes dieRoll{to{transform:rotate(90deg) scale(.9)}}
@keyframes pieceBounce{0%{transform:translate(-50%,-66%) scale(1)}35%{transform:translate(-50%,-100%) scale(.88,1.18)}68%{transform:translate(-50%,-55%) scale(1.16,.88)}100%{transform:translate(-50%,-66%) scale(1)}}
@keyframes pieceSlide{35%{transform:translate(-50%,-45%) rotate(12deg) scale(1.12)}70%{transform:translate(-50%,-75%) rotate(-8deg) scale(.92)}100%{transform:translate(-50%,-66%) rotate(0)}}
@media(max-width:600px){.brand-pill span:last-child{display:none}
.game-actions{gap:4px}
.stats{margin-top:13px}
.racer-strip{gap:5px}
.racer{grid-template-columns:35px 1fr 30px;padding-right:5px}
.racer img{width:35px;height:35px}
.racer b{width:27px;height:27px}
.racer strong{font-size:.67rem}
.racer small{font-size:.49rem}
.board-art{width:calc(100% + 18px);margin-left:-9px}
.cell{padding:1px}
.turn-controls{margin-top:0}}
@media(min-width:700px){.board-frame{max-width:min(73vh,800px)}
.racer-strip{max-width:720px;margin:13px auto}
.stats{max-width:720px;margin-left:auto;margin-right:auto}
.turn-controls{margin-top:0}}
@media(prefers-reduced-motion:reduce){.piece{transition:none}}
body.reduced-motion *,body.reduced-motion *::before,body.reduced-motion *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
.racer img{transform:scale(1.4)}
.piece{width:clamp(44px,10%,76px);height:clamp(44px,10%,76px)}
.stats{grid-template-columns:repeat(3,1fr)}
.stats.with-time{grid-template-columns:repeat(4,1fr)}
.vector-snake{filter:drop-shadow(0 0 1.1px rgba(255,255,255,.8)) drop-shadow(0 1px 2.4px rgba(4,34,55,.95))}
.snake-outline,.snake-body,.snake-scales,.snake-highlight{fill:none;stroke-linecap:round;stroke-linejoin:round}
.snake-outline{stroke:rgba(190,129,34,.92);stroke-width:2.5}
.snake-body{stroke-width:1.92}
.snake-scales{stroke:rgba(255,231,164,.8);stroke-width:.48;stroke-dasharray:.4 1.15}
.snake-highlight{stroke:rgba(255,255,255,.78);stroke-width:.28;stroke-dasharray:2.6 1.1;transform:translate(-.25px,-.28px);animation:snakeShimmer 3.4s linear infinite}
.snake-head-shape{stroke:#efc96e;stroke-width:.28}
.snake-fin{fill:rgba(255,232,169,.92);stroke:#c58c31;stroke-width:.2}
.snake-head-glint{fill:none;stroke:rgba(255,255,255,.8);stroke-width:.25}
.snake-eye{fill:#f8f4c9;stroke:#9c6721;stroke-width:.12}
.snake-pupil{fill:#13273b}
@keyframes snakeShimmer{to{stroke-dashoffset:-3.7}}
.board-frame{width:100%;max-width:none;margin:0}
.board-art{width:100%;margin:0;aspect-ratio:1;background:url('assets/cloudspire-board-field.webp') center/cover no-repeat;filter:none}
.board,.routes{inset:0;width:100%;height:100%}
.turn-controls{width:min(100%,620px);grid-template-columns:62px 1fr;gap:8px;margin:7px auto 0}
.die{position:relative;display:block;width:auto;height:auto;aspect-ratio:1;border:1px solid #8f969b;border-radius:15px;background:repeating-linear-gradient(90deg,rgba(255,255,255,.13) 0 1px,rgba(39,46,51,.06) 1px 3px),linear-gradient(145deg,#f7f9f9 0%,#c7cdd0 24%,#eef1f2 48%,#9ca4a9 74%,#d8dde0 100%);box-shadow:0 7px 0 #687176,0 13px 22px #0009,inset 0 2px 1px #fff,inset 0 -2px 3px #5e676c66;color:#111;will-change:transform;perspective:700px}
.die::after{content:"";position:absolute;inset:3px;border-radius:11px;background:linear-gradient(115deg,rgba(255,255,255,.42),transparent 30% 70%,rgba(20,26,30,.16));pointer-events:none}
.die-face{position:absolute;inset:0;overflow:hidden;border-radius:inherit}
.pip{position:absolute;width:14%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 35% 30%,#3d464b,#090b0d 62%);box-shadow:inset 0 1px 2px #000,0 1px 1px #fff8}
.pip[data-position=tl]{left:22%;top:22%}
.pip[data-position=tr]{right:22%;top:22%}
.pip[data-position=ml]{left:22%;top:43%}
.pip[data-position=mc]{left:43%;top:43%}
.pip[data-position=mr]{right:22%;top:43%}
.pip[data-position=bl]{left:22%;bottom:22%}
.pip[data-position=br]{right:22%;bottom:22%}
.die.is-spinning{animation:dice-tumble .24s linear infinite;box-shadow:0 10px 0 #687176,0 18px 30px #000c}
.die.is-spinning .die-face{animation:face-flurry .15s linear infinite;filter:blur(.45px)}
.die.is-settling{animation:die-lock .4s cubic-bezier(.2,.9,.25,1.35)}
.turn-controls>.primary-button{min-height:62px}
@keyframes dice-tumble{0%{transform:translate(-4px,-7px) rotate(-5deg) scale(1.04)}25%{transform:translate(5px,1px) rotate(4deg) scale(.98)}50%{transform:translate(-1px,7px) rotate(7deg) scale(1)}75%{transform:translate(-6px,0) rotate(-3deg) scale(.97)}100%{transform:translate(-4px,-7px) rotate(-5deg) scale(1.04)}}
@keyframes face-flurry{0%{transform:translateY(-12%);opacity:.7}50%{transform:translateY(12%);opacity:1}100%{transform:translateY(-12%);opacity:.7}}
@keyframes die-lock{0%{transform:translateY(-12px) scale(.9)}55%{transform:translateY(4px) scale(1.08)}78%{transform:translateY(-1px) scale(.985)}100%{transform:translateY(0) scale(1)}}
@media(max-width:600px){.board-art{width:100%;margin:0}}
@media(min-width:700px){.board-frame{max-width:none}
.turn-controls{grid-template-columns:76px 1fr}
.turn-controls>.primary-button{min-height:76px}}
.vector-ladder{filter:drop-shadow(0 1px 1px #000) drop-shadow(0 2px 2px #0009);transition:filter .2s ease}
.vector-ladder .route-ladder{stroke:#3b2012;stroke-width:1.7;filter:none;transition:stroke .2s ease,filter .2s ease}
.vector-ladder .route-rung{stroke:#714324;stroke-width:1.02;transition:stroke .2s ease,filter .2s ease}
.vector-ladder.is-active{filter:drop-shadow(0 0 2px #fff6bf) drop-shadow(0 0 7px #ffc94c);animation:ladderRouteGlow .42s ease-in-out infinite alternate}
.vector-ladder.is-active .route-ladder{stroke:#ffdf7c;filter:drop-shadow(0 0 1px #fff)}
.vector-ladder.is-active .route-rung{stroke:#fff1ad;filter:drop-shadow(0 0 1.5px #ffd45f)}
.vector-snake{transition:filter .2s ease}
.vector-snake.is-active{filter:brightness(1.7) saturate(1.3) drop-shadow(0 0 2px #fffbd0) drop-shadow(0 0 7px #59efff);animation:snakeRouteGlow .38s ease-in-out infinite alternate}
.vector-snake.is-active .snake-highlight{stroke:#fffbd7;stroke-width:.65;animation-duration:.42s}
.piece.step-bounce{transition-duration:.23s;animation:fieldHop .285s cubic-bezier(.18,.78,.22,1)}
.piece.is-climbing-route{transition:left 1.25s cubic-bezier(.24,.68,.25,1),top 1.25s cubic-bezier(.24,.68,.25,1);animation:climbRider .34s ease-in-out infinite alternate}
.piece.is-snaking-route{transition:left 1.35s cubic-bezier(.3,.1,.42,1),top 1.35s cubic-bezier(.3,.1,.42,1);animation:snakeRider .38s ease-in-out infinite alternate}
@keyframes fieldHop{0%{transform:translate(-50%,-66%) scale(1)}38%{transform:translate(-50%,-112%) scale(.86,1.15)}72%{transform:translate(-50%,-57%) scale(1.14,.86)}100%{transform:translate(-50%,-66%) scale(1)}}
@keyframes climbRider{from{transform:translate(-50%,-66%) rotate(-3deg) scale(.97)}to{transform:translate(-50%,-76%) rotate(3deg) scale(1.04)}}
@keyframes snakeRider{from{transform:translate(-50%,-63%) rotate(-8deg) scale(.98)}to{transform:translate(-50%,-73%) rotate(9deg) scale(1.04)}}
@keyframes ladderRouteGlow{to{filter:drop-shadow(0 0 3px #fffbd2) drop-shadow(0 0 10px #ffd04e)}}
@keyframes snakeRouteGlow{to{filter:brightness(1.95) saturate(1.4) drop-shadow(0 0 3px #fffbd0) drop-shadow(0 0 11px #56eefe)}}
.vector-ladder{filter:drop-shadow(0 .45px .35px #000) drop-shadow(0 1px 1px #0008)}
.vector-ladder .route-ladder{stroke-width:.68;stroke-linecap:round}
.vector-ladder .route-rung{stroke-width:.38;stroke-linecap:round}
.die.is-spinning{animation:dice-tumble-elastic .46s cubic-bezier(.34,.02,.28,1) infinite;box-shadow:0 9px 0 #687176,0 18px 30px #000c}
.die.is-spinning .die-face{animation:face-flurry-elastic .16s linear infinite;filter:blur(.35px)}
.die.is-settling{animation:die-lock-elastic .56s cubic-bezier(.18,.72,.22,1.22)}
.piece.landing-bounce{animation:arrivalBounce .82s cubic-bezier(.16,.76,.2,1)}
@keyframes dice-tumble-elastic{0%{transform:translateY(0) rotate(0) scale(1)}18%{transform:translate(-2px,3px) rotate(-4deg) scale(.9,.87)}43%{transform:translate(3px,-8px) rotate(6deg) scale(1.045,.98)}68%{transform:translate(-2px,2px) rotate(-3deg) scale(.965,1.025)}84%{transform:translate(1px,-2px) rotate(2deg) scale(1.015,.985)}100%{transform:translateY(0) rotate(0) scale(1)}}
@keyframes face-flurry-elastic{0%{transform:translateY(-10%) scale(.96);opacity:.72}50%{transform:translateY(10%) scale(1.03);opacity:1}100%{transform:translateY(-10%) scale(.96);opacity:.72}}
@keyframes die-lock-elastic{0%{transform:translateY(-9px) scale(.88,.84)}38%{transform:translateY(3px) scale(1.09,.92)}58%{transform:translateY(-4px) scale(.965,1.055)}76%{transform:translateY(1px) scale(1.025,.98)}89%{transform:translateY(-1px) scale(.992,1.012)}100%{transform:translateY(0) scale(1)}}
@keyframes arrivalBounce{0%{transform:translate(-50%,-66%) scale(1);filter:drop-shadow(0 5px 6px #0008)}22%{transform:translate(-50%,-128%) scale(.78,1.24);filter:drop-shadow(0 15px 8px #0005)}46%{transform:translate(-50%,-48%) scale(1.27,.76);filter:drop-shadow(0 2px 3px #000b)}62%{transform:translate(-50%,-87%) scale(.9,1.14);filter:drop-shadow(0 9px 6px #0006)}77%{transform:translate(-50%,-59%) scale(1.12,.91);filter:drop-shadow(0 4px 4px #0009)}89%{transform:translate(-50%,-71%) scale(.97,1.04);filter:drop-shadow(0 6px 5px #0008)}100%{transform:translate(-50%,-66%) scale(1);filter:drop-shadow(0 5px 6px #0008)}}
.vector-ladder,.vector-snake{filter:none!important;animation:none!important}
.vector-ladder .route-ladder{stroke:#765037;stroke-width:.68;filter:none!important}
.vector-ladder .route-rung{stroke:#a8774c;stroke-width:.38;filter:none!important}
.vector-ladder.is-active{filter:brightness(1.23) saturate(1.08)!important}
.vector-ladder.is-active .route-ladder{stroke:#b78352;filter:none!important}
.vector-ladder.is-active .route-rung{stroke:#d0a06a;filter:none!important}
.snake-outline{stroke:#79542c;stroke-width:2.35}
.snake-body{stroke-width:1.9}
.snake-scales{stroke:rgba(226,194,126,.64)}
.snake-highlight{stroke:rgba(191,205,190,.34);stroke-width:.2;animation:none!important}
.snake-fin{fill:rgba(211,174,109,.84);stroke:#98672d}
.snake-head-glint{stroke:rgba(213,221,194,.42)}
.vector-snake.is-active{filter:brightness(1.18) saturate(1.22)!important;animation:none!important}
.vector-snake.is-active .snake-highlight{stroke:rgba(220,211,157,.48);stroke-width:.28;animation:none!important}
.cell.target{animation:destinationBlink .68s ease-in-out infinite;box-shadow:inset 0 0 0 2px #fff1a5,0 0 0 2px #ca9e39,0 0 14px #ffd967;transform-origin:center}
.snake-outline{stroke-width:1.72}
.snake-body{stroke-width:1.34}
.snake-scales{stroke-width:.3}
.snake-highlight{stroke-width:.14}
.vector-snake.is-active .snake-highlight{stroke-width:.18}
@keyframes destinationBlink{0%,100%{filter:brightness(.88) saturate(.9);box-shadow:inset 0 0 0 2px #7c6128,0 0 0 1px #70551e;transform:scale(.965)}50%{filter:brightness(1.42) saturate(1.25);box-shadow:inset 0 0 0 3px #fff5bd,0 0 0 2px #e7ba52,0 0 18px #ffd967;transform:scale(1)}}
.vector-snake.is-active{filter:none!important;animation:snakeTravelBlink .28s steps(2,end) infinite!important}
.vector-ladder.is-active{filter:none!important;animation:ladderTravelBlink .34s steps(2,end) infinite!important}
.vector-ladder.is-active .route-ladder{stroke:#765037;filter:none!important}
.vector-ladder.is-active .route-rung{stroke:#a8774c;filter:none!important}
.vector-snake.is-active .snake-highlight{stroke:rgba(191,205,190,.34);stroke-width:.14;animation:none!important}
.cell.target{animation:destinationBlinkThin .68s ease-in-out infinite;box-shadow:inset 0 0 0 1px #fff1a5,0 0 7px #d8af50}
@keyframes snakeTravelBlink{0%,49%{opacity:1}50%,100%{opacity:.38}}
@keyframes ladderTravelBlink{0%,49%{opacity:1}50%,100%{opacity:.42}}
@keyframes destinationBlinkThin{0%,100%{filter:brightness(.9) saturate(.92);box-shadow:inset 0 0 0 1px #725923,0 0 3px #8a6b28;transform:scale(.975)}50%{filter:brightness(1.34) saturate(1.18);box-shadow:inset 0 0 0 1px #fff5bd,0 0 8px #d8af50;transform:scale(1)}}
.vector-snake.is-active{filter:brightness(1.2) saturate(1.12)!important}
.vector-ladder.is-active{filter:brightness(1.18) saturate(1.08)!important}
.vector-ladder.is-active .route-ladder{stroke:#a97954}
.vector-ladder.is-active .route-rung{stroke:#d2a06d}
@keyframes snakeTravelBlink{0%,49%{opacity:1}50%,100%{opacity:.48}}
@keyframes ladderTravelBlink{0%,49%{opacity:1}50%,100%{opacity:.52}}
.turn-controls>.primary-button{width:min(100%,300px);justify-self:center;justify-content:center;border:1px solid #f5dda0;border-radius:999px;padding:7px 20px;background:linear-gradient(110deg,#aa7d2b,#f3dc91 48%,#ae812d);box-shadow:inset 0 1px #fff9,0 5px 14px #0008;color:#090806;font:900 .82rem/1 Arial,sans-serif;letter-spacing:.04em}
.turn-controls>.primary-button:hover:not(:disabled){background:linear-gradient(110deg,#c79d48,#ffe9a8 48%,#c79d48)}
.vector-ladder .route-rung{stroke-width:.44}
.turn-controls>.primary-button{border-color:#8f969b;background:repeating-linear-gradient(90deg,rgba(255,255,255,.13) 0 1px,rgba(39,46,51,.06) 1px 3px),linear-gradient(145deg,#f7f9f9 0%,#c7cdd0 24%,#eef1f2 48%,#9ca4a9 74%,#d8dde0 100%);box-shadow:inset 0 2px 1px #fff,inset 0 -2px 3px #5e676c66,0 6px 14px #0008;color:#111;font:900 1rem/1 Arial,sans-serif;letter-spacing:.03em}
.turn-controls>.primary-button:hover:not(:disabled){background:repeating-linear-gradient(90deg,rgba(255,255,255,.16) 0 1px,rgba(39,46,51,.05) 1px 3px),linear-gradient(145deg,#fff 0%,#d5dade 24%,#f5f7f7 48%,#abb2b7 74%,#e3e7e9 100%)}
.vector-snake.is-active{filter:brightness(1.42) saturate(1.2)!important}
.vector-ladder.is-active{filter:brightness(1.36) saturate(1.14)!important}
.vector-ladder.is-active .route-ladder{stroke:#c89561}
.vector-ladder.is-active .route-rung{stroke:#edbd7f}
#roll-button{transition:opacity .16s ease,visibility 0s linear 0s,transform .16s ease}
#roll-button:disabled{visibility:hidden;opacity:0;transform:scale(.94);transition:opacity .16s ease,visibility 0s linear .16s,transform .16s ease}
body.demo-active #roll-button:disabled{visibility:visible;opacity:1;transform:none;pointer-events:none;transition:none}
.turn-prompt{display:flex;min-height:49px;grid-column:2;grid-row:1;align-items:center;justify-content:center;margin:0;color:#fff;font:800 18px/1.25 Arial,sans-serif;letter-spacing:.02em;text-align:center;text-shadow:0 2px 5px #000}
.die-scene{position:relative;display:grid;width:62px;height:78px;place-items:center;perspective:420px}
.die-scene::after{content:"";position:absolute;left:8px;right:8px;bottom:6px;height:12px;border-radius:50%;background:#0009;filter:blur(6px)}
.die-3d{position:relative;z-index:1;width:58px;height:58px;transform-style:preserve-3d;transition:transform .44s cubic-bezier(.18,.78,.24,1.28);will-change:transform}
.die-3d[data-face="1"]{transform:rotateX(0) rotateY(0)}
.die-3d[data-face="2"]{transform:rotateX(-90deg) rotateY(0)}
.die-3d[data-face="3"]{transform:rotateX(0) rotateY(-90deg)}
.die-3d[data-face="4"]{transform:rotateX(0) rotateY(90deg)}
.die-3d[data-face="5"]{transform:rotateX(90deg) rotateY(0)}
.die-3d[data-face="6"]{transform:rotateX(0) rotateY(180deg)}
.die-3d .die-face{position:absolute;inset:0;overflow:hidden;border:2px solid #888b89;border-radius:9px;background:linear-gradient(135deg,#fffef5 0,#deded4 43%,#aaaead 100%);box-shadow:inset 3px 3px 3px #fff,inset -4px -5px 6px #5557;backface-visibility:hidden}
.die-3d .face-front{transform:translateZ(29px)}
.die-3d .face-back{transform:rotateY(180deg) translateZ(29px)}
.die-3d .face-right{transform:rotateY(90deg) translateZ(29px)}
.die-3d .face-left{transform:rotateY(-90deg) translateZ(29px)}
.die-3d .face-top{transform:rotateX(90deg) translateZ(29px)}
.die-3d .face-bottom{transform:rotateX(-90deg) translateZ(29px)}
.die-3d .pip{position:absolute;width:10px;height:10px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#3a3c3c,#080909 68%);box-shadow:inset 0 1px 2px #000,0 1px 1px #fff8}
.die-3d .pip.tl{left:10px;top:10px}
.die-3d .pip.tr{right:10px;top:10px}
.die-3d .pip.ml{left:10px;top:50%;transform:translateY(-50%)}
.die-3d .pip.mc{left:50%;top:50%;transform:translate(-50%,-50%)}
.die-3d .pip.mr{right:10px;top:50%;transform:translateY(-50%)}
.die-3d .pip.bl{left:10px;bottom:10px}
.die-3d .pip.br{right:10px;bottom:10px}
@media(prefers-reduced-motion:reduce){.die-3d{transition-duration:.05s}}
.reduced-motion .die-3d{transition-duration:.05s}
.board-art[data-size="6"] .piece{width:clamp(60px,17%,120px);height:clamp(60px,17%,120px)}
.board-art[data-size="7"] .piece{width:clamp(54px,14.7%,106px);height:clamp(54px,14.7%,106px)}
.board-art[data-size="8"] .piece{width:clamp(49px,12.7%,94px);height:clamp(49px,12.7%,94px)}
.piece-rabbit img{transform:scale(.94);transform-origin:center bottom}
.board-art[data-size="6"] .piece-rabbit{margin-left:16px;margin-top:8px}
.board-art[data-size="7"] .piece-rabbit{margin-left:14px;margin-top:7px}
.board-art[data-size="8"] .piece-rabbit{margin-left:12px;margin-top:7px}
.piece-rabbit,.board-art[data-size="6"] .piece-rabbit,.board-art[data-size="7"] .piece-rabbit,.board-art[data-size="8"] .piece-rabbit{margin-left:0;margin-top:0}
.piece{transform:translate(-50%,-58%)}
.board-art[data-size="6"] .piece{width:clamp(83.85px,23.76%,167.71px);height:clamp(83.85px,23.76%,167.71px)}
.board-art[data-size="7"] .piece{width:clamp(71.87px,20.37%,143.75px);height:clamp(71.87px,20.37%,143.75px)}
.board-art[data-size="8"] .piece{width:clamp(62.89px,17.82%,125.78px);height:clamp(62.89px,17.82%,125.78px)}
.board-art[data-size="9"] .piece{width:clamp(55.9px,15.84%,111.81px);height:clamp(55.9px,15.84%,111.81px)}
.board-art[data-size="10"] .piece{width:clamp(50.31px,14.26%,100.63px);height:clamp(50.31px,14.26%,100.63px)}
@keyframes pieceBounce{0%{transform:translate(-50%,-58%) scale(1)}35%{transform:translate(-50%,-92%) scale(.88,1.18)}68%{transform:translate(-50%,-47%) scale(1.16,.88)}100%{transform:translate(-50%,-58%) scale(1)}}
@keyframes pieceSlide{35%{transform:translate(-50%,-37%) rotate(12deg) scale(1.12)}70%{transform:translate(-50%,-67%) rotate(-8deg) scale(.92)}100%{transform:translate(-50%,-58%) rotate(0)}}
@keyframes fieldHop{0%{transform:translate(-50%,-58%) scale(1)}38%{transform:translate(-50%,-104%) scale(.86,1.15)}72%{transform:translate(-50%,-49%) scale(1.14,.86)}100%{transform:translate(-50%,-58%) scale(1)}}
@keyframes climbRider{from{transform:translate(-50%,-58%) rotate(-3deg) scale(.97)}to{transform:translate(-50%,-68%) rotate(3deg) scale(1.04)}}
@keyframes snakeRider{from{transform:translate(-50%,-55%) rotate(-8deg) scale(.98)}to{transform:translate(-50%,-65%) rotate(9deg) scale(1.04)}}
@keyframes arrivalBounce{0%{transform:translate(-50%,-58%) scale(1);filter:drop-shadow(0 5px 6px #0008)}22%{transform:translate(-50%,-120%) scale(.78,1.24);filter:drop-shadow(0 15px 8px #0005)}46%{transform:translate(-50%,-40%) scale(1.27,.76);filter:drop-shadow(0 2px 3px #000b)}62%{transform:translate(-50%,-79%) scale(.9,1.14);filter:drop-shadow(0 9px 6px #0006)}77%{transform:translate(-50%,-51%) scale(1.12,.91);filter:drop-shadow(0 4px 4px #0009)}89%{transform:translate(-50%,-63%) scale(.97,1.04);filter:drop-shadow(0 6px 5px #0008)}100%{transform:translate(-50%,-58%) scale(1);filter:drop-shadow(0 5px 6px #0008)}}
.board-art,.turn-controls,.danger-button,.close-button,.toggle{-webkit-tap-highlight-color:transparent}
.board-art,.board,.cell,.piece,.die-scene,.die-3d,.turn-controls,.danger-button,.close-button{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.board-art,.board,.cell,.die-scene,.die-3d,.turn-controls button{touch-action:manipulation}
.board-art img,.piece img,.racer img,.result-tokens img{-webkit-user-drag:none;user-drag:none}
#volume-input{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.board-art{contain:layout style}
.piece-layer{position:absolute;inset:0;z-index:6;pointer-events:none;overflow:visible;contain:layout style}
.piece-layer .piece{z-index:1}
#turn-stat{font-size:clamp(12px,3vw,15px);line-height:1.1;letter-spacing:.035em}
.turn-controls{grid-template-columns:108px minmax(0,1fr)}
.die-scene{width:108px;height:108px;overflow:visible}
.die-scene::after{display:none}
.die-scene .closed-die{position:relative;z-index:1;display:block;width:108px;height:108px;filter:none}
