@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700;800;900&display=swap');
:root{--bg:#fffaf3;--paper:#fff;--ink:#253c38;--muted:#82908a;--orange:#f56d3c;--orange-soft:#fff0e8;--line:#e8e9df;--green:#e9f2ea;--yellow:#fbd97a;--radius:20px;--font:'DM Sans','Noto Sans KR',sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:14px}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button{border:0;background:none}button:disabled{cursor:wait;opacity:.6}button:focus-visible,a:focus-visible{outline:3px solid #367d70;outline-offset:4px}input:focus,select:focus{outline:2px solid #f6a47f;outline-offset:1px}svg{display:block}button svg,.field-label svg,.hero-tags svg,.history-heading svg{width:18px;height:18px;flex-shrink:0}a{color:inherit;text-decoration:none}.site-header{max-width:1280px;margin:auto;height:94px;display:flex;align-items:center;gap:25px;padding:0 40px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;font-size:25px;font-weight:900;letter-spacing:-1px}.brand-symbol{display:grid;place-items:center;width:39px;height:39px;background:var(--orange);border-radius:12px;transform:rotate(-6deg)}.brand-symbol svg{width:28px;fill:none;stroke:white;stroke-width:3;stroke-linecap:round}.brand-question{color:var(--orange)}.header-caption{font-size:12px;color:var(--muted);padding-left:24px;border-left:1px solid #d5dacf}.site-header nav{display:flex;gap:22px;margin-left:auto;align-items:center}.text-button{display:flex;gap:7px;align-items:center;font-size:12px;color:#667870;font-weight:600}.text-button:hover{color:var(--orange)}.share-button{background:white;border:1px solid #dce0d6;padding:11px 16px;border-radius:10px;display:flex;align-items:center;gap:7px;font-weight:600;font-size:12px}.share-button:hover{background:var(--green)}.page{max-width:1200px;margin:auto;padding:0 24px}.hero{display:flex;justify-content:space-between;align-items:center;min-height:338px;padding:37px 25px 35px 14px}.eyebrow{font-size:11px;font-weight:700;letter-spacing:.8px;color:#6b8172;display:flex;align-items:center;gap:7px;margin-bottom:14px}.eyebrow>span{width:7px;height:7px;border-radius:50%;background:#85a789}h1{font-size:43px;line-height:1.38;letter-spacing:-2px;margin:0;font-weight:900}.underline-word{display:inline-block;position:relative;color:var(--orange)}.underline-word svg{position:absolute;width:104%;height:14px;left:-2%;bottom:-6px;stroke:#f6c04b;stroke-width:3;fill:none;stroke-linecap:round}.hero p{color:#7c8880;line-height:1.8;font-size:13px;margin:20px 0 15px}.hero-tags{display:flex;gap:16px;color:#718277;font-size:11px}.hero-tags>span{display:flex;align-items:center;gap:5px}.hero-tags svg{width:14px;height:14px}.hero-art{position:relative;width:440px;align-self:center;margin-right:26px}.art-caption{position:absolute;top:9px;left:170px;font-size:10px;letter-spacing:2px;color:#7c8a7e;transform:rotate(-8deg);font-weight:700}.play-art{width:100%}.art-sticker{position:absolute;bottom:2px;left:180px;border:1px solid #c6d2c5;background:#edf4e8;padding:8px 14px;font-size:11px;border-radius:6px;transform:rotate(-6deg)}.art-sticker b{margin-left:10px;color:var(--orange)}.game-picker{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:2px 0 25px}.game-tab{display:flex;align-items:center;gap:11px;background:white;border:1px solid var(--line);border-radius:14px;padding:17px 14px;text-align:left;position:relative;transition:transform .18s,border-color .18s,background .18s;min-height:80px}.game-tab:hover{transform:translateY(-3px);border-color:#c4cdbf}.game-tab.active{background:var(--orange-soft);border-color:var(--orange);box-shadow:0 3px 0 #f5d9c7}.game-tab.active::after{content:'';position:absolute;width:5px;height:5px;background:var(--orange);border-radius:50%;top:9px;right:10px}.tab-icon{width:34px;height:38px;display:grid;place-items:center;color:#608273}.tab-icon svg{width:30px;height:30px}.game-tab.active .tab-icon{color:var(--orange)}.tab-label b{display:block;font-size:12px;white-space:nowrap}.tab-label small{display:block;font-size:9px;color:#96a198;margin-top:4px;white-space:nowrap;font-weight:500}.playground{display:grid;grid-template-columns:276px minmax(0,1fr);border:1px solid var(--line);border-radius:var(--radius);background:white;overflow:hidden;box-shadow:0 6px 22px #344d3210}.setup-panel{padding:25px 23px;background:#fffefa;border-right:1px solid var(--line)}.panel-heading{display:flex;align-items:center;justify-content:space-between}.panel-heading h2{font-size:15px;margin:0;letter-spacing:-.5px}.count-pill{font-family:'DM Sans',sans-serif;background:#eef1e9;color:#708476;padding:4px 8px;border-radius:5px;font-size:10px;font-weight:700}.small-muted{font-size:11px;margin:7px 0 16px;color:#96a096}.people-list{display:flex;flex-wrap:wrap;gap:7px;min-height:72px;align-content:flex-start}.person-chip{display:flex;align-items:center;gap:6px;background:#f1f4ed;border:1px solid #e6eadd;border-radius:8px;padding:7px 8px;color:#596e5f;font-size:12px;max-width:100%;min-width:61px}.person-chip .person-dot{width:5px;height:5px;flex-shrink:0;background:#8cad91;border-radius:50%}.person-chip .name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.remove-person{padding:0 0 0 2px;color:#a3afa0;font-size:15px;line-height:1}.remove-person:hover{color:#c3482d}.add-person{display:flex;margin-top:13px;border:1px solid #dee3d7;background:white;border-radius:9px;overflow:hidden;height:39px}.add-person input{width:100%;min-width:0;border:0;padding:10px;font-size:11px;background:transparent;color:var(--ink)}input::placeholder{color:#a3aaa1}.add-person button{width:36px;background:#f3f5ed;margin:4px;border-radius:6px;display:grid;place-items:center;flex-shrink:0;color:#839077}.list-actions{display:flex;justify-content:space-between;margin-top:10px;font-size:10px;color:#99a393}.list-actions button{padding:2px 0}.list-actions button:hover{color:var(--orange)}.setup-divider{height:1px;background:var(--line);margin:22px 0}.field-label{font-size:12px;font-weight:700;display:flex;align-items:center;gap:6px;margin-bottom:9px}.field-label svg{width:15px;height:15px;color:#7b8e7c}.wager-input{width:100%;border:1px solid #dee3d7;border-radius:9px;height:40px;padding:0 11px;color:var(--ink);font-size:12px}.wager-presets{display:flex;gap:6px;margin-top:9px}.wager-presets button{padding:5px 6px;border-radius:5px;font-size:10px;background:#f7f5ef;color:#8a8e81;white-space:nowrap}.wager-presets button:hover{background:var(--orange-soft);color:#ae5835}.options{margin-top:21px}.option-field label{display:block;font-size:11px;font-weight:600;margin-bottom:8px}.option-field select{width:100%;padding:9px;background:white;color:var(--ink);border:1px solid #dee3d7;border-radius:8px;font-size:11px}.option-note{font-size:10px;color:#95a08f;line-height:1.6;margin:9px 0 0}.setup-tip{display:flex;gap:8px;align-items:flex-start;background:#f6f4e9;padding:12px 10px;margin-top:22px;border-radius:8px}.setup-tip svg{width:14px;height:14px;color:#ba9c51;margin-top:1px;flex-shrink:0}.setup-tip p{font-size:10px;color:#a29672;line-height:1.7;margin:0}.game-panel{padding:25px 29px 18px;min-width:0}.game-heading{display:flex;align-items:center;justify-content:space-between}.game-kicker{font-size:9px;letter-spacing:1.5px;font-weight:700;color:#a1a99c;margin-bottom:6px}.game-heading h2{font-size:23px;letter-spacing:-1px;margin:0;font-weight:800}.game-heading p{margin:7px 0 0;color:#8d978a;font-size:11px;line-height:1.6}.game-heading-icon{width:43px;height:43px;border-radius:13px;background:#fff3e6;display:grid;place-items:center;color:#d4a059}.game-heading-icon svg{width:27px;height:27px}.game-stage{height:315px;margin-top:19px;background:#fbfcf6;border:1px solid #eef0e6;border-radius:14px;position:relative;overflow:auto;display:grid;place-items:center;background-image:radial-gradient(#dfe5d7 .6px,transparent .6px);background-size:13px 13px}.ladder-wrap{width:100%;height:100%;min-width:0;padding:10px 19px}.ladder-svg{width:100%;height:100%;min-width:300px;overflow:visible}.ladder-label{font-family:var(--font);font-size:12px;fill:#506c59;font-weight:600}.ladder-bottom{font-size:10px;fill:#94a58e}.ladder-track{fill:none;stroke:#cbd6c1;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.ladder-route{fill:none;stroke:#e54747;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;opacity:0}.ladder-route.visible{opacity:1}.ladder-route.tracing{opacity:1;stroke-dasharray:1;stroke-dashoffset:1;animation:trace 5s linear forwards}.ladder-marker{fill:#e4ebdd}.ladder-marker.winner{fill:var(--orange)}.ladder-label.winner,.ladder-bottom.winner{fill:var(--orange);font-weight:800}.ladder-name-box{fill:white;stroke:#e3e8da}.ladder-name-box.selected{fill:#fff0e6;stroke:#f5b08e}.ladder-top-node{cursor:pointer}.ladder-top-node:focus{outline:none}.ladder-top-node:focus .ladder-name-box{stroke:var(--orange);stroke-width:2}.stage-empty{text-align:center;color:#93a18d;padding:30px;line-height:1.8;font-size:13px}.stage-empty svg{width:45px;height:45px;margin:0 auto 15px;color:#b7c6aa}.result-banner{margin-top:14px;padding:12px 13px;border-radius:9px;background:#f8f8f2;color:#95a08c;display:flex;gap:9px;align-items:center;font-size:11px;min-height:42px;line-height:1.7}.result-banner>svg{width:15px;height:15px;flex-shrink:0}.result-banner.success{background:#fff0e7;color:#a95331}.result-banner b{font-weight:800;color:#d45d30}.play-controls{display:flex;gap:10px;margin-top:16px}.secondary-button{display:flex;align-items:center;justify-content:center;gap:7px;border:1px solid #dce3d5;border-radius:9px;padding:13px 17px;color:#788b74;font-size:12px;white-space:nowrap;background:white}.secondary-button:hover{background:#f3f6ee}.play-button{display:flex;align-items:center;justify-content:center;gap:8px;background:var(--orange);color:white;border-radius:9px;padding:14px 20px;font-size:13px;font-weight:700;box-shadow:0 3px 0 #d55529;transition:background .2s,transform .2s;flex:1}.play-button:hover{background:#e86230;transform:translateY(-1px)}.button-arrow{margin-left:auto;font-size:20px;line-height:1}.play-button>span:first-child{margin-left:auto}.game-footnote{text-align:center;font-size:9px;color:#a4ab9e;margin:12px 0 0;line-height:1.7}.history-section{margin:32px 0}.history-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.history-heading h2{font-size:15px;display:flex;gap:7px;align-items:center;margin:0}.history-heading svg{color:#7c917a;width:16px;height:16px}.history-heading p{font-size:10px;color:#9aa393;margin:6px 0 0}.history-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.history-empty{grid-column:1/-1;border:1px dashed #dce1d3;border-radius:11px;padding:20px;text-align:center;font-size:11px;color:#a0aa98;background:#fffdf8}.history-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 15px;min-width:0}.history-meta{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:#8e9a85}.history-meta b{font-size:10px;font-weight:600;color:#71876f;background:#eff3e9;padding:3px 6px;border-radius:4px}.history-card p{font-size:12px;font-weight:600;line-height:1.6;overflow-wrap:anywhere;margin:10px 0 11px;white-space:pre-line}.history-card button{font-size:10px;color:#99a58e;display:flex;align-items:center;gap:4px;padding:0}.history-card button svg{width:11px;height:11px}.history-card button:hover{color:var(--orange)}.bottom-note{display:flex;align-items:center;gap:15px;border:1px solid #e8eadb;border-radius:14px;padding:23px 26px;margin:30px 0 40px;background:#f3f5e9}.note-graphic{color:#90a882;background:#e4ebd8;width:40px;height:40px;display:grid;place-items:center;border-radius:12px;transform:rotate(-7deg)}.note-graphic svg{width:22px;height:22px}.bottom-note h3{font-size:13px;margin:0}.bottom-note p{font-size:11px;color:#91a184;margin:6px 0 0}.note-badge{margin-left:auto;font-size:9px;letter-spacing:1.2px;font-weight:600;color:#9ca98c}footer{max-width:1200px;border-top:1px solid var(--line);margin:auto;display:flex;align-items:center;gap:20px;padding:26px 24px;color:#a0aa97;font-size:10px}.footer-brand{font-weight:900;color:#7f917a;font-size:16px;letter-spacing:-.7px}.footer-right{margin-left:auto}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,15px);padding:13px 20px;border-radius:10px;background:#253c38;color:white;font-size:12px;box-shadow:0 6px 20px #0002;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none;z-index:100;text-align:center;max-width:90vw}.toast.show{opacity:1;transform:translate(-50%,0)}dialog{border:1px solid var(--line);border-radius:20px;padding:27px;width:min(480px,90vw);color:var(--ink);font-family:var(--font);box-shadow:0 20px 80px #263d3825;max-height:90vh}dialog::backdrop{background:#1f302855;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.dialog-heading h2{font-size:19px;margin:0}.dialog-heading button{padding:8px}.dialog-heading button:hover{color:var(--orange)}dialog ol{padding-left:23px;margin:23px 0;font-size:12px}dialog li{padding-left:5px;margin:14px 0}dialog li::marker{color:var(--orange);font-weight:700}dialog p{font-size:11px;color:#83917c;line-height:1.8;margin:5px 0}.guide-note{background:#f3f5ec;padding:12px;border-radius:9px;color:#84947b;font-size:11px;line-height:1.8}.dialog-done{width:100%;margin-top:19px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.wheel-wrap{width:265px;height:265px;position:relative}.wheel-svg{width:100%;height:100%;filter:drop-shadow(0 5px 0 #c3cab236)}.wheel-pointer{position:absolute;top:-2px;left:calc(50% - 12px);z-index:2;width:24px;height:29px;clip-path:polygon(0 0,100% 0,50% 100%);background:var(--ink)}.wheel-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:48px;height:48px;border-radius:50%;background:white;border:6px solid #fff4d3;display:grid;place-items:center;color:var(--orange);font-size:22px;box-shadow:0 2px 4px #0001;pointer-events:none}.draw-grid{width:100%;padding:22px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;align-content:center}.draw-card{height:109px;border:1px solid #e0e7d9;border-radius:11px;background:#fff;text-align:center;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;position:relative;transition:transform .3s,background .3s,border-color .3s;padding:9px;min-width:0;overflow:hidden}.draw-card .card-pattern{width:31px;height:41px;border:2px solid #a7b999;background:#f4f7eb;border-radius:7px;display:grid;place-items:center;font-size:18px;color:#8ba07d}.draw-card small{font-size:10px;color:#8b9e7e;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.draw-card.win{background:#fff0de;border-color:#f5a579;transform:translateY(-5px)}.draw-card.win .card-pattern{background:#f7cc79;border-color:#e8b34c;color:#a66c26}.draw-card.shuffling{animation:shuffle .5s infinite alternate}.draw-card .card-result{font-size:10px;font-weight:700;color:#a38b66}.dice-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;padding:19px;align-content:center}.dice-player{text-align:center;background:white;border:1px solid #e5eadc;border-radius:11px;padding:10px;min-width:0}.dice-player b{display:block;font-size:11px;color:#758969;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dice-pair{display:flex;gap:6px;justify-content:center;margin:9px 0}.die{height:32px;width:32px;background:#fff3e4;border:1px solid #e6cba1;border-radius:7px;padding:5px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:2px}.die-dot{border-radius:50%;background:#b79054}.dice-total{font-size:10px;color:#a6ad9b}.dice-player.win{background:#fff0e4;border-color:#eeab7a}.dice-player.win b{color:#c66c3a}.team-board{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:22px;width:100%;align-content:center}.team-group{border-radius:11px;border:1px solid #dce5d2;padding:15px;background:white}.team-group h3{margin:0 0 11px;font-size:12px;display:flex;align-items:center;gap:7px}.team-group h3 i{width:7px;height:7px;background:#90ad80;border-radius:50%}.team-group:nth-child(even) h3 i{background:#f6a173}.team-members{display:flex;gap:6px;flex-wrap:wrap}.team-member{padding:5px 8px;border-radius:6px;background:#f0f4e9;color:#7c916d;font-size:11px;overflow-wrap:anywhere}.team-group:nth-child(even) .team-member{background:#fff0e5;color:#b28868}.coin-stage{text-align:center}.coin{width:150px;height:150px;border-radius:50%;background:#f7d379;border:9px solid #edbd56;box-shadow:0 8px 0 #d0a049,0 15px 18px #a07d3020;display:grid;place-items:center;margin:12px auto 28px;color:#a27827;position:relative}.coin:before{content:'';position:absolute;inset:7px;border:2px dashed #d8a942;border-radius:50%}.coin-face{font-size:27px;font-weight:800;z-index:1}.coin-stage p{font-size:11px;color:#93a080;margin:0}.coin.flipping{animation:flip .38s infinite linear}.coin .coin-spark{font-size:28px;position:absolute;bottom:20px;line-height:1}.coin-face small{font-size:10px;font-weight:600;display:block;letter-spacing:2px;margin-bottom:3px}.is-busy .setup-panel{pointer-events:none;opacity:.75}.is-busy .game-stage{pointer-events:none}@keyframes trace{to{stroke-dashoffset:0}}@keyframes shuffle{to{transform:translateY(-6px) rotate(3deg)}}@keyframes flip{to{transform:rotateY(360deg)}}@media(min-width:1250px){.hero-art{width:465px}}@media(max-width:1040px){.game-picker{gap:8px}.game-tab{padding:14px 10px;gap:6px}.tab-icon{width:25px}.tab-icon svg{width:25px}.tab-label b{font-size:11px}.hero-art{width:390px;margin-right:0}.playground{grid-template-columns:250px minmax(0,1fr)}.setup-panel{padding:23px 18px}.game-panel{padding:24px 20px 17px}.draw-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.draw-card{height:92px}}@media(max-width:780px){.site-header{height:76px;padding:0 23px;gap:15px}.brand{font-size:22px}.brand-symbol{width:33px;height:33px}.header-caption{display:none}.site-header nav{gap:12px}.hero{padding:30px 6px;min-height:300px}.hero h1{font-size:34px;letter-spacing:-1.5px}.hero-art{width:320px}.hero p{font-size:11px}.hero-tags{font-size:9px;gap:10px}.art-caption{left:110px;font-size:8px}.art-sticker{left:110px;font-size:9px;padding:6px 10px}.game-picker{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.game-tab{padding:12px 13px;gap:9px;min-height:67px}.tab-icon{width:29px}.tab-label b{font-size:12px}.playground{grid-template-columns:210px minmax(0,1fr)}.setup-panel{padding:20px 14px}.game-panel{padding:20px 15px 15px}.game-heading h2{font-size:21px}.game-heading-icon{display:none}.game-heading p{font-size:10px}.play-controls{gap:7px}.secondary-button{padding:12px 9px;font-size:10px}.play-button{padding:12px 11px;font-size:12px}.button-arrow{font-size:17px}.game-stage{height:320px}.ladder-wrap{padding:10px}.history-list{grid-template-columns:repeat(2,minmax(0,1fr))}.dice-board{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px}.draw-grid{padding:13px;gap:8px;grid-template-columns:repeat(3,minmax(0,1fr))}.draw-card{height:85px}.team-board{gap:8px;padding:13px}.team-group{padding:12px}.note-badge{display:none}.footer-right{display:none}}@media(max-width:560px){.site-header{padding:0 18px;height:69px}.site-header .text-button span:last-child{display:none}.share-button{padding:9px 11px;font-size:10px}.page{padding:0 16px}.hero{min-height:260px;position:relative;padding:26px 2px}.hero>div:first-child{position:relative;z-index:1}.hero h1{font-size:31px;line-height:1.4}.eyebrow{font-size:9px;margin-bottom:12px}.hero p{font-size:10px;margin-top:17px;line-height:1.8}.hero-art{width:220px;position:absolute;right:-12px;top:52px;opacity:.93}.hero-art .play-art{transform:rotate(7deg)}.art-caption{display:none}.art-sticker{font-size:8px;left:93px;bottom:-13px;transform:rotate(6deg)}.hero-tags{font-size:8px;gap:9px}.hero-tags svg{width:11px;height:11px}.game-picker{gap:7px;margin:10px 0 19px}.game-tab{padding:11px 9px;gap:6px;min-height:65px;border-radius:11px}.tab-icon{width:25px}.tab-icon svg{width:23px;height:23px}.tab-label b{font-size:10px}.tab-label small{font-size:8px}.playground{display:flex;flex-direction:column;border-radius:16px}.setup-panel{padding:20px;border-right:0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.panel-heading,.small-muted,.people-list,.add-person,.list-actions{grid-column:1/-1}.small-muted{margin:7px 0 12px}.people-list{min-height:0}.person-chip{padding:6px 8px}.add-person{margin-top:11px}.setup-divider{grid-column:1/-1;margin:16px 0}.field-label{grid-column:1/-1}.wager-input{grid-column:1/-1}.wager-presets{grid-column:1/-1;margin-bottom:3px}.options{grid-column:1/-1;margin-top:15px}.option-field{display:flex;gap:15px;align-items:center}.option-field label{margin:0;white-space:nowrap;flex:1}.option-field select{width:120px}.option-note{font-size:9px}.setup-tip{display:none}.game-panel{padding:22px 17px 17px}.game-stage{height:300px}.game-heading h2{font-size:22px}.game-heading-icon{display:grid;width:37px;height:37px}.game-heading-icon svg{width:23px;height:23px}.game-heading p{font-size:10px;max-width:250px}.ladder-wrap{padding:8px 8px}.ladder-svg{min-width:280px}.play-controls{gap:9px}.secondary-button{font-size:11px;padding:12px}.play-button{font-size:12px;padding:13px 18px}.game-footnote{font-size:8px}.result-banner{font-size:10px}.history-section{margin-top:25px}.history-list{grid-template-columns:1fr}.history-card{padding:12px 14px}.history-heading h2{font-size:13px}.history-heading p{font-size:9px}.history-heading .text-button{font-size:10px}.bottom-note{padding:18px;gap:12px;margin:24px 0}.bottom-note h3{font-size:12px}.bottom-note p{font-size:10px}footer{padding:20px 16px;gap:15px;font-size:8px}.footer-brand{font-size:13px}.draw-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.draw-card{height:79px}.draw-card .card-pattern{width:26px;height:32px;font-size:15px}.dice-board{grid-template-columns:repeat(3,minmax(0,1fr))}.dice-player{padding:8px 3px}.die{width:28px;height:28px;padding:4px}.dice-pair{gap:4px}.team-board{gap:10px}.wheel-wrap{width:245px;height:245px}}@media(max-width:370px){.hero-art{width:176px;right:-6px;top:65px}.hero h1{font-size:28px}.hero p{font-size:9px}.game-tab{padding:10px 7px;gap:4px}.tab-label b{font-size:9px}.tab-label small{font-size:7px}.game-heading p{max-width:220px}.dice-board{grid-template-columns:repeat(2,minmax(0,1fr))}.draw-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* The game picker is the first section after the header. */
.game-picker{margin-top:26px}@media(max-width:560px){.game-picker{margin-top:18px}}

.playground{margin-bottom:32px}

.result-banner[hidden]{display:none}.panel-heading{margin-bottom:16px}.list-actions{justify-content:flex-end}.team-members{min-height:26px}

/* Keep every dice participant reachable when the board scrolls. */
.dice-board{align-self:start}
@media(min-width:1041px){.dice-board{grid-template-columns:repeat(4,minmax(0,1fr))}}

.setup-panel[hidden]{display:none}.playground.coin-only{grid-template-columns:minmax(0,1fr)}

/* Ability race */
.game-picker{grid-template-columns:repeat(7,minmax(0,1fr))}
.game-tab[data-game="race"] .tab-icon{color:#b07c43}
.playground.race-active{grid-template-columns:232px minmax(0,1fr)}
.race-active .game-panel{background:#153531;padding:24px 22px 20px}
.race-active .game-heading h2{color:#f0edcb;letter-spacing:-.5px}
.race-active .game-heading-icon{color:#f2d17f;background:#365348}
.playground.race-active .game-stage{height:auto;min-height:340px;display:block;overflow:hidden;background:#173f38;background-image:none;border-color:#436454;border-radius:14px;box-shadow:0 12px 32px #031e2859}
.race-active.is-busy .game-stage{pointer-events:auto}
.race-view{padding:12px}
.race-topbar{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.race-mode-label{font-size:11px;font-weight:800;padding:6px 10px;background:#36564a;border:1px solid #64816a;border-radius:5px;color:#ead391}
.race-phase{font-size:11px;color:#a2bd9e}
.race-timer{margin-left:auto;font-size:25px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-1px;color:#fbebad}
.race-timer span{font-size:10px;font-weight:500;margin-left:6px;letter-spacing:0;color:#a8bea0}
.race-timebar{height:4px;background:#284e42;overflow:hidden;margin-bottom:10px}
.race-timebar>span{display:block;background:#e5bf6f;width:0;height:100%}
.race-screen{position:relative;background:#163735;overflow:hidden;border:1px solid #5c7660;border-radius:8px}
.race-canvas{display:block;width:100%;height:auto;aspect-ratio:3/2}
.race-events{font-size:10px;min-height:32px;padding:9px 2px;color:#e1c899;line-height:1.5;overflow-wrap:anywhere}
.race-event-heal{color:#a5e2b3}
.race-log-row{display:flex;align-items:baseline;gap:6px;min-width:0;height:18px;line-height:18px}
.race-log-time{flex-shrink:0;color:#9bb49e;font-size:9px;font-variant-numeric:tabular-nums}
.race-log-row>span:not(.race-log-time){display:block;min-width:0;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.race-contenders{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.race-contender{min-width:0;text-align:left;display:flex;align-items:center;gap:7px;background:#214b41;border:1px solid #426554;border-radius:6px;padding:8px 7px;color:#dbe5cd;cursor:pointer}
.race-contender:hover,.race-contender[aria-pressed="true"]{background:#325b47;border-color:#c9d693}
.race-number{font-size:10px;font-weight:800;min-width:22px;height:22px;line-height:22px;text-align:center;background:var(--racer-color);color:#fff8df;border:1px solid #ddd5b054;border-radius:4px}
.race-contender-info{min-width:0;flex:1}
.race-contender-info>b{display:block;font-size:10px;color:#e5edd6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.race-contender-info>span{font-size:8px;color:#a5bca1;display:flex;align-items:center;gap:5px;margin-top:3px;white-space:nowrap}
.race-contender-info i{font-style:normal;font-size:7px;color:#f3d792;overflow:hidden;text-overflow:ellipsis}
.race-contender-info .race-mini-progress{display:block;height:2px;background:#153e34;margin-top:5px}
.race-mini-progress>span{display:block;width:0;height:2px;background:var(--racer-color)}
.race-contender-record{text-align:right;flex-shrink:0}
.race-contender-record b{display:block;font-size:11px;color:#d8dfb4;font-variant-numeric:tabular-nums}
.race-contender-record small{display:block;font-size:8px;color:#9bb396;margin-top:4px}
.race-contender.race-leader{border-color:#d9ba6d;background:#3a5944}
.race-contender.race-leader .race-contender-record b{color:#ffe19a}
.race-contender[data-cc="freeze"],.race-contender[data-cc="stun"],.race-contender[data-cc="net"]{background:#294854}
.race-roster{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding-top:12px;margin-top:12px;border-top:1px solid #44634f}
.race-role{display:flex;align-items:flex-start;gap:6px;min-width:0}
.race-role>i{width:6px;height:6px;flex-shrink:0;background:var(--racer-color);margin-top:3px}
.race-role b{display:block;font-size:9px;color:#d0d9b8;font-weight:700}
.race-role span{display:block;font-size:8px;margin-top:4px;color:#98b194;line-height:1.5}
.race-standings{margin-top:14px;border-top:1px solid #5b7658;padding-top:12px}
.race-standings[hidden]{display:none}
.race-results-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}
.race-results-heading>b{font-size:12px;color:#eee0a9}
.race-results-heading>span{font-size:9px;color:#a5b79b}
.race-result-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px}
.race-result-row{display:flex;align-items:center;gap:7px;font-size:10px;border:1px solid #4b6954;padding:9px 8px;border-radius:5px;background:#21463b;min-width:0}
.race-result-row>b{width:13px;font-size:10px;color:#bec99f;flex-shrink:0}
.race-result-name{color:#d5dfbe;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.race-result-role{font-size:8px;color:#9fb594;white-space:nowrap}
.race-result-record{margin-left:auto;white-space:nowrap;font-size:9px;color:#b8c49f}
.race-result-row.selected{background:#4d6040;border-color:#d5b975}
.race-result-row.selected>b,.race-result-row.selected .race-result-name{color:#ffe4a4}
.race-active .secondary-button{background:#274b40;border-color:#64795b;color:#d5dfbc}
.race-active .secondary-button:hover{background:#3d5c45}
.race-active .result-banner.success{background:#415c3f;color:#e0d7ab}
.race-active .result-banner b{color:#ffe1a1}
.play-controls button[hidden]{display:none}
@media(max-width:1040px){.race-active .game-panel{padding:20px 15px}.race-contenders{grid-template-columns:repeat(2,minmax(0,1fr))}.race-role span{font-size:7px}.race-result-list{grid-template-columns:1fr}}
@media(max-width:780px){.game-picker{grid-template-columns:repeat(3,minmax(0,1fr))}.game-tab[data-game="race"]{grid-column:span 3}.playground.race-active{grid-template-columns:190px minmax(0,1fr)}.race-active .game-panel{padding:20px 12px}.race-view{padding:9px}.race-roster{grid-template-columns:repeat(2,minmax(0,1fr))}.race-contender{gap:5px;padding:7px 5px}.race-contender-info i{display:none}.race-active .secondary-button{white-space:normal;max-width:125px}}
@media(max-width:560px){.race-active .game-panel{padding:20px 12px}.race-view{padding:8px}.race-results-heading>span{font-size:8px}.race-contenders{gap:5px}.race-roster{gap:9px}.race-role span{font-size:9px}.race-role b{font-size:10px}.race-contender-info>b{font-size:11px}.race-timer{font-size:23px}}


/* Race setup spans the top; the track gets the whole playground width. */
.playground.race-active{grid-template-columns:minmax(0,1fr)}
.race-active .setup-panel{display:grid;grid-template-columns:minmax(0,1fr) 240px 140px;grid-template-rows:auto auto auto;gap:10px 20px;align-items:center;border-right:0;border-bottom:1px solid var(--line);padding:20px 24px}
.race-active .panel-heading{grid-column:1;grid-row:1;margin:0;justify-content:flex-start;gap:12px}
.race-active .people-list{grid-column:1;grid-row:2/4;min-height:0;gap:6px}
.race-active .add-person{grid-column:2;grid-row:1/3;margin:0;width:100%}
.race-active .list-actions{grid-column:2;grid-row:3;margin:0}
.race-active .options{display:block;grid-column:3;grid-row:1/4;margin:0}
.race-active .option-field{display:block}.race-active .option-field label{margin-bottom:7px}.race-active .option-field select{width:100%}
.race-active .game-panel{padding:20px 16px 18px}.race-active .race-view{padding:10px}
@media(max-width:900px){.race-active .setup-panel{grid-template-columns:minmax(0,1fr) 220px;gap:10px 16px}.race-active .people-list{grid-row:2}.race-active .add-person{grid-row:1/3}.race-active .options{grid-column:1;grid-row:3}.race-active .option-field{display:flex;gap:12px;align-items:center}.race-active .option-field label{margin:0;flex:none}.race-active .option-field select{width:100px}.race-active .list-actions{grid-column:2;grid-row:3}}
@media(max-width:560px){.race-active .setup-panel{grid-template-columns:minmax(0,1fr);padding:16px;gap:10px}.race-active .panel-heading{grid-row:1}.race-active .people-list{grid-row:2}.race-active .add-person{grid-column:1;grid-row:3}.race-active .list-actions{grid-column:1;grid-row:4}.race-active .options{grid-column:1;grid-row:5}.race-active .game-panel{padding:16px 8px}.race-active .race-view{padding:7px}}
.race-active .race-canvas{aspect-ratio:16/9}

/* Give the ability race canvas the full panel without title or status rows. */
.race-active .game-heading{display:none}
.race-active .game-panel{padding:0 0 18px}
.playground.race-active .game-stage{margin-top:0;min-height:0;border:0;border-radius:0;box-shadow:none}
.race-active .race-view{padding:0}
.race-active .race-timebar{margin-bottom:0}
.race-active .race-screen{border:0;border-radius:0}
.race-active .race-events,.race-active .race-standings{margin-left:16px;margin-right:16px}
.race-active .play-controls,.race-active .result-banner{margin-left:16px;margin-right:16px}

/* Ability race rules are available without occupying the game screen. */
.race-active .panel-heading{flex-wrap:wrap}
.race-help-button{margin-left:auto;display:inline-flex;align-items:center;gap:6px;border:1px solid #b8cbc1;background:#eef5ed;border-radius:8px;padding:8px 10px;color:#31594b;font-size:12px;font-weight:700;white-space:nowrap}
.race-help-button[hidden]{display:none}.race-help-button:hover{background:#dcebdc}
#race-help{width:min(850px,calc(100% - 32px));max-height:88vh;max-height:88dvh;padding:0;border:1px solid #d9e2d7;border-radius:20px;background:#fffaf3;color:var(--ink);box-shadow:0 24px 90px #0a221b55;overflow:hidden}
#race-help[open]{display:flex;flex-direction:column}
#race-help::backdrop{background:#122c26b3;backdrop-filter:blur(4px)}
body:has(#race-help[open]){overflow:hidden}
.race-help-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:22px 26px;background:#edf3e8;border-bottom:1px solid #d8e3d5;flex-shrink:0}
.race-help-eyebrow{font-size:11px;font-weight:700;color:#567d62}.race-help-header h2{margin:4px 0 0;font-size:22px;letter-spacing:-.7px}
.race-help-close{width:36px;height:36px;flex-shrink:0;display:grid;place-items:center;font-size:27px;background:white;border:1px solid #cfdbcd;border-radius:50%;line-height:1}
.race-help-close:hover{background:#dde9d8}.race-help-body{padding:24px 26px 28px;overflow:auto;overscroll-behavior:contain;min-height:0}
.race-help-body section+section{margin-top:28px}.race-help-body h3{font-size:16px;margin:0 0 14px}.race-help-body h4{margin:0 0 8px;font-size:14px}
.race-help-rules ol{margin:0;padding-left:22px;line-height:1.8;font-size:13px}.race-help-rules li+li{margin-top:7px}
.race-help-note{margin:14px 0 0;padding:12px 14px;background:#edf1e7;border-radius:9px;color:#607465;font-size:12px;line-height:1.75}
.race-help-characters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.race-help-character{display:grid;grid-template-columns:80px minmax(0,1fr);gap:10px;align-items:start;background:white;border:1px solid #e0e5d9;border-radius:12px;padding:15px 12px}
.race-help-sprite{width:80px;height:80px;background-image:url('./assets/racer-atlas-v8.png');background-size:640px 960px;background-repeat:no-repeat;image-rendering:pixelated}
.race-help-tags{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px}.race-help-tags span{font-size:10px;padding:4px 6px;background:#f2f2e8;border-radius:5px;color:#6d7b64}
.race-help-character p{margin:0;font-size:12px;line-height:1.7;color:#617066}
.race-help-hazards dl{margin:0}.race-help-hazards dl>div{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;padding:10px 0;border-bottom:1px solid #e4e7da;font-size:13px;line-height:1.6}.race-help-hazards dt{font-weight:700}.race-help-hazards dd{margin:0;color:#67756a}
@media(max-width:560px){#race-help{width:calc(100% - 20px);max-height:92dvh;border-radius:16px}.race-help-header{padding:18px}.race-help-header h2{font-size:19px}.race-help-body{padding:18px}.race-help-characters{grid-template-columns:minmax(0,1fr)}.race-help-hazards dl>div{grid-template-columns:90px minmax(0,1fr);gap:8px}}

.race-active #people-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.race-active #add-form[hidden],.race-active #clear-people[hidden]{display:none}.race-active .list-actions{display:none}.race-name-slot{display:flex;align-items:center;gap:7px;min-width:0;border:1px solid #d8e2d4;background:#f5f7ef;border-radius:8px;padding:6px 8px}.race-name-slot>span{font-size:10px;color:#8a9985;width:16px;flex-shrink:0}.race-name-slot input{min-width:0;width:100%;padding:4px 0;border:0;background:transparent;font-size:12px;color:#425d4b}.race-name-slot small{font-size:9px;color:#9a9c8b;flex-shrink:0}.race-name-slot.is-pending{background:#f7f5ee;border-style:dashed}@media(max-width:780px){.race-active #people-list{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:440px){.race-active #people-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
.race-active .setup-panel{grid-template-columns:minmax(0,1fr) 140px;grid-template-rows:auto auto}.race-active .panel-heading{grid-column:1/-1;grid-row:1}.race-active .people-list{grid-column:1;grid-row:2}.race-active .options{grid-column:2;grid-row:2;align-self:start}@media(max-width:780px){.race-active .setup-panel{grid-template-columns:minmax(0,1fr)}.race-active .people-list{grid-column:1;grid-row:2}.race-active .options{grid-column:1;grid-row:3}}

.race-name-slot{display:grid;gap:2px;padding:4px 8px 6px}.race-name-slot>.race-slot-role{display:flex;align-items:center;gap:5px;width:auto;font-size:11px;color:#56705b;font-weight:700}.race-slot-sprite{display:block;flex:0 0 32px;width:32px;height:32px;background-image:url('./assets/racer-atlas-v8.png');background-size:256px 384px;background-repeat:no-repeat;image-rendering:pixelated}.race-name-slot input{border-bottom:1px solid #d6dfcf;padding:4px 1px;font-size:12px}.race-name-slot input::placeholder{color:#91a18d;font-weight:400}.race-name-slot:focus-within{border-color:#8fa383;background:#fcfdf7}

.race-active .panel-heading{flex-wrap:wrap;gap:8px}
.race-roster-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.race-random-button{display:flex;align-items:center;gap:5px;min-height:32px;padding:5px 9px;border:1px solid #cddbc5;border-radius:7px;background:#eff5e9;color:#4f7054;font-size:11px;font-weight:700;white-space:nowrap}
.race-random-button[hidden]{display:none}
.race-random-button svg{width:14px;height:14px}
.race-random-button:hover:not(:disabled){background:#e0edda}
.sound-button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:6px 9px;border:1px solid #d5dfce;border-radius:8px;background:#f1f5eb;color:#56715a;font-size:11px;font-weight:700;white-space:nowrap}
.sound-button svg{width:17px;height:17px}
.sound-button[aria-pressed="false"]{color:#859183;background:#f6f7f2}
.race-toolbar .sound-button{background:#24493f;border-color:#6d8c75;color:#fff0c4}
.race-fullscreen .sound-button{min-height:32px;height:32px;width:32px;padding:6px;border-radius:6px;background:#153531e6}
.race-fullscreen .sound-button [data-sound-label]{display:none}
@media(max-width:440px){.site-header nav{gap:8px}.site-header #sound-toggle [data-sound-label]{display:none}.site-header #sound-toggle{width:36px;padding:6px}}
@container race-display (max-height:480px){.race-fullscreen .sound-button{min-height:30px;height:30px;width:30px}}
@media(max-height:480px),(orientation:portrait) and (max-width:480px){.race-fullscreen .sound-button{min-height:30px;height:30px;width:30px}}

/* Race viewing controls stay available while participant editing is locked. */
.race-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;background:#153531;color:#e4e8c9}
.race-toolbar[hidden]{display:none}
.race-speed-label{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;white-space:nowrap}
.race-speed-label select{min-height:44px;min-width:78px;padding:8px 10px;border:1px solid #6d8c75;border-radius:8px;background:#24493f;color:#fff0c4;font-size:13px;cursor:pointer}
.race-fullscreen-button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:8px 12px;border:1px solid #6d8c75;border-radius:8px;background:#24493f;color:#fff0c4;font-size:12px;font-weight:700;white-space:nowrap}
.race-fullscreen-button svg{width:18px;height:18px}
.race-fullscreen-button:hover{background:#355d4d}
.race-fullscreen-close{display:none}
body.race-fullscreen-open{overflow:hidden;overscroll-behavior:none}
.race-active .game-panel.race-fullscreen{position:fixed;inset:0;z-index:10000;width:100%;height:100vh;height:100dvh;padding:0;overflow:hidden;background:#0a211d}
.race-fullscreen::backdrop{background:#0a211d}
.race-fullscreen .race-display{position:absolute;inset:0;width:100%;height:100%;background:#0a211d;overflow:hidden;container:race-display / size}
.race-fullscreen .race-toolbar{position:absolute;top:0;left:0;right:0;z-index:4;justify-content:flex-end;padding:8px max(12px,env(safe-area-inset-right)) 18px max(12px,env(safe-area-inset-left));background:linear-gradient(#0a211de6,#0a211d00);pointer-events:none}
.race-fullscreen .race-toolbar>*{pointer-events:auto}
.race-active .race-fullscreen .game-stage{position:absolute;inset:0;width:100%;height:100%;margin:0;overflow:hidden;background:#0a211d}
.race-fullscreen .race-view{position:relative;width:100%;height:100%}
.race-fullscreen .race-screen{position:absolute;inset:0;background:#0a211d}
.race-active .race-fullscreen .race-canvas{width:100%;height:100%;aspect-ratio:auto;object-fit:contain}
.race-fullscreen .race-timebar{position:absolute;top:0;left:0;right:0;z-index:3;height:3px}
.race-fullscreen .race-events{position:absolute;left:max(12px,env(safe-area-inset-left));bottom:72px;z-index:2;max-width:70%;max-height:40px;margin:0;padding:6px 10px;border-radius:6px;background:#0a211dcc;overflow:hidden;pointer-events:none}
.race-fullscreen .race-events:empty{display:none}
.race-fullscreen .play-controls{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));right:max(12px,env(safe-area-inset-right));z-index:4;width:min(360px,calc(100% - 24px));margin:0;gap:8px}
.race-fullscreen .play-controls button{min-height:44px;padding:10px 14px;box-shadow:none}
.race-fullscreen .play-controls .button-arrow{display:none}
.race-fullscreen .result-banner{position:absolute;left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));z-index:3;max-width:calc(100% - 408px);margin:0;padding:8px 10px;min-height:44px}
.race-fullscreen .race-standings{position:absolute;top:66px;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:76px;z-index:3;margin:0;padding:12px;border:1px solid #5b7658;border-radius:10px;background:#153531f2;overflow:auto;overscroll-behavior:contain}
.race-fullscreen .race-result-list{grid-template-columns:repeat(2,minmax(0,1fr))}
.race-fullscreen .game-footnote{display:none}
/* Rotate the inner view when orientation lock is unavailable, including iPhone. */
@media(orientation:portrait){
  .race-fullscreen .race-display{inset:auto;top:50%;left:50%;width:100vh;width:100dvh;height:100vw;height:100dvw;transform:translate(-50%,-50%) rotate(90deg)}
}
@media(max-height:440px),(orientation:portrait){
  .race-fullscreen .race-toolbar{padding-top:6px;padding-bottom:10px}
  .race-fullscreen .race-standings{top:60px;bottom:68px;padding:8px}
  .race-fullscreen .race-result-row{padding:7px}
  .race-fullscreen .result-banner{left:12px;bottom:66px;max-width:calc(100% - 24px);min-height:0;font-size:10px}
  .race-fullscreen .race-events{bottom:66px;font-size:10px}
}

/* Small viewing controls sit at the corners instead of covering the course. */
.race-fullscreen .race-toolbar{left:auto;right:max(8px,env(safe-area-inset-right));top:max(6px,env(safe-area-inset-top));padding:0;gap:6px;background:none}
.race-fullscreen .race-speed-label{font-size:11px;gap:4px}
.race-fullscreen .race-speed-label select{min-height:32px;height:32px;min-width:62px;padding:3px 6px;font-size:11px;border-radius:6px;background:#153531e6}
.race-fullscreen .race-fullscreen-button{min-height:32px;width:32px;height:32px;padding:6px;border-radius:6px;background:#153531e6}
.race-fullscreen .race-fullscreen-button>span,.race-fullscreen .race-fullscreen-expand{display:none}
.race-fullscreen .race-fullscreen-close{display:block}
.race-fullscreen .race-fullscreen-button svg{width:16px;height:16px}
.race-fullscreen .play-controls{bottom:max(8px,env(safe-area-inset-bottom));right:max(8px,env(safe-area-inset-right));width:auto;max-width:calc(100% - 16px);gap:6px}
.race-fullscreen .play-controls button{flex:none;min-height:32px;padding:5px 9px;gap:4px;font-size:11px;border-radius:6px}
.race-fullscreen .play-button{min-width:82px}
.race-fullscreen .play-controls button svg{width:14px;height:14px}
.race-fullscreen .play-button>span:first-child{margin-left:0}
.race-fullscreen .race-events{bottom:46px;padding:4px 7px;font-size:9px;max-height:none;max-width:min(560px,70%)}
.race-fullscreen .race-log-row{height:14px;line-height:14px;gap:4px}
.race-fullscreen .race-log-time{font-size:8px}
.race-fullscreen .race-standings{top:46px;bottom:52px}
.race-fullscreen .result-banner{bottom:max(8px,env(safe-area-inset-bottom));min-height:32px;max-width:calc(100% - 230px);padding:5px 8px}
@container race-display (max-height:480px){
  .race-fullscreen .race-speed-title{display:none}
  .race-fullscreen .race-speed-label select{min-height:30px;height:30px;min-width:55px;font-size:10px}
  .race-fullscreen .race-fullscreen-button{min-height:30px;height:30px;width:30px}
  .race-fullscreen .play-controls button{min-height:30px;padding:4px 7px;font-size:10px}
  .race-fullscreen .play-button{min-width:74px}
  .race-fullscreen .race-standings{top:42px;bottom:48px;padding:8px}
  .race-fullscreen .result-banner{bottom:44px;left:8px;max-width:calc(100% - 16px);min-height:0;font-size:10px}
  .race-fullscreen .race-events{bottom:44px}
}
/* Same compact controls on browsers without size-container queries. */
@media(max-height:480px),(orientation:portrait) and (max-width:480px){
  .race-fullscreen .race-speed-title{display:none}
  .race-fullscreen .race-speed-label select{min-height:30px;height:30px;min-width:55px;font-size:10px}
  .race-fullscreen .race-fullscreen-button{min-height:30px;height:30px;width:30px}
  .race-fullscreen .play-controls button{min-height:30px;padding:4px 7px;font-size:10px}
  .race-fullscreen .play-button{min-width:74px}
  .race-fullscreen .race-standings{top:42px;bottom:48px;padding:8px}
  .race-fullscreen .result-banner{bottom:44px;left:8px;max-width:calc(100% - 16px);min-height:0;font-size:10px}
  .race-fullscreen .race-events{bottom:44px}
}

.race-map-field{margin-bottom:14px}.race-active .race-map-field select{min-width:132px}

/* Ads occupy their own space after the footer, away from game controls. */
.footer-ad{max-width:1200px;margin:0 auto;padding:8px 24px 28px;text-align:center}
.footer-ad-label{display:block;margin-bottom:7px;font-size:10px;color:var(--muted)}
.footer-ad-space{position:relative;min-height:100px;width:100%;background:#f5f4ec;border:1px solid var(--line);border-radius:8px}
.footer-ad-placeholder{display:flex;align-items:center;justify-content:center;min-height:100px;color:#a0a696;font-size:12px;letter-spacing:.4px}
.footer-ad-unit{display:block;width:100%;min-height:100px}
.footer-ad-unit[hidden],.footer-ad-placeholder[hidden]{display:none}
@media(max-width:560px){.footer-ad{padding:6px 16px 20px}.footer-ad-space{min-height:100px}}

/* Keep spinning wheel bounds inside its stage; ladder outcomes are editable. */
.game-stage.wheel-stage{overflow:hidden}
.ladder-marker.winner{fill:#e54747}
.ladder-label.winner{fill:#e54747}
.ladder-name-box.selected{fill:#fff0f0;stroke:#e54747}
.ladder-top-node:focus .ladder-name-box{stroke:#e54747}

/* Ladder prizes live with participant setup; hidden destinations are reveal-only. */
.ladder-prizes{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.ladder-prizes[hidden]{display:none}
.ladder-prizes .panel-heading{margin-bottom:12px}
.prize-list{display:grid;gap:7px}
.prize-row{display:flex;align-items:center;gap:7px;border:1px solid #e1e6d8;border-radius:8px;background:#f6f8f0;padding:5px 8px;min-width:0}
.prize-row>span{font-size:10px;color:#8b9985;width:15px;flex-shrink:0}
.prize-row input{min-width:0;width:100%;border:0;background:transparent;padding:5px 0;font-size:12px;color:#526b59}
.prize-row button{color:#94a18f;font-size:18px;padding:0 2px;flex-shrink:0}
.prize-row button:hover{color:#e54747}
.ladder-result-label{display:block;line-height:24px;padding:0 3px;color:#64755d;font-family:var(--font);font-size:11px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:560px){.ladder-prizes{grid-column:1/-1;margin-top:18px}}

/* Choose one ladder result method and show only its matching fields. */
.ladder-mode-picker{display:flex;gap:7px;margin:0;padding:0;border:0;min-width:0}
.ladder-mode-picker label{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 5px;border:1px solid #dce4d4;border-radius:8px;background:#f5f7ef;font-size:11px;cursor:pointer}
.ladder-mode-picker input{margin:0;accent-color:var(--orange)}
.ladder-mode-picker label:has(input:checked){background:var(--orange-soft);border-color:var(--orange);font-weight:700;color:#a54c2c}
.ladder-mode-note{margin:10px 0 12px}
#prize-fields[hidden],.options[hidden],#prize-count[hidden]{display:none}

/* Unnamed race characters can be excluded without removing their setup card. */
.race-name-slot{grid-template-columns:minmax(0,1fr) 28px;align-items:center}
.race-name-slot input{grid-column:1/-1}
.race-name-slot .race-slot-role{min-width:0}
.race-ban-button{width:28px;height:28px;padding:5px;border:1px solid #cddbc5;border-radius:6px;background:#edf4e8;color:#658266;display:grid;place-items:center}
.race-ban-button svg{width:16px;height:16px}
.race-ban-button:hover:not(:disabled){background:#dcebd6;border-color:#88a47e}
.race-ban-button[aria-pressed="true"]{background:#fbe8e3;color:#b35943;border-color:#d5a596}
.race-ban-button:disabled{cursor:default;opacity:.35}
.race-name-slot.is-banned{background:#eeeee7;border-style:dashed;border-color:#b6bcb0}
.race-name-slot.is-banned .race-slot-role{color:#90988a}
.race-name-slot.is-banned .race-slot-sprite{opacity:.4;filter:grayscale(1)}
/* Automatic dice: polished ivory cube on a dark felt tray. */
.game-picker{grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}
.game-tab{padding:14px 10px;gap:7px;min-height:70px}.tab-icon{width:26px}.tab-icon svg{width:25px;height:25px}
#participant-setup[hidden]{display:none}
.auto-dice-active .options{margin-top:0}
.auto-dice-settings .panel-heading{margin-bottom:24px}.auto-dice-settings .panel-heading svg{width:19px;height:19px;color:#81978b}
.period-input{display:flex;align-items:center;gap:10px;border:1px solid #d8e0d5;border-radius:10px;padding:5px 12px;background:#fff}
.period-input input{min-width:0;width:100%;border:0;padding:10px 0;font-size:25px;font-weight:800;color:var(--ink);background:none;font-variant-numeric:tabular-nums}.period-input span{white-space:nowrap;font-size:12px;color:#7d8b7e}
.auto-dice-latest{margin-top:26px;padding:20px;border-radius:14px;background:#eef3e9;border:1px solid #dce6d6}.auto-dice-latest>span{font-size:11px;font-weight:700;color:#789079}.auto-dice-result{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0}.auto-dice-result strong{font-size:65px;line-height:1;font-weight:800;color:#315748;font-variant-numeric:tabular-nums}.auto-dice-latest small{font-size:11px;color:#7d8b7e}
.mini-premium-die{display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:4px;width:54px;height:54px;padding:10px;border-radius:11px;background:linear-gradient(135deg,#fffef9,#e4e5d8);border:1px solid #c9d2c4;box-shadow:0 3px 0 #bdc7b7,inset 0 1px 2px #fff}.mini-premium-die .pip{border-radius:50%;background:#355648;box-shadow:inset 0 1px 2px #16281f66}
.auto-dice-history-heading{display:flex;justify-content:space-between;margin:25px 0 12px;font-size:12px;font-weight:700}.auto-dice-history-heading small{font-size:10px;font-weight:400;color:#97a08f}.auto-dice-history{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;min-height:48px}.dice-history-item{display:grid;justify-items:center;gap:5px;font-size:10px;color:#6e8070}.dice-history-item .mini-premium-die{width:36px;height:36px;border-radius:8px;padding:7px;gap:3px}
.auto-dice-stage{height:400px;overflow:hidden;background:#143c35;border:1px solid #224c3e;background-image:none}
.auto-dice-scene{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:25px 20px;background:radial-gradient(ellipse at 50% 45%,#3f776355,#0c292f99),repeating-linear-gradient(45deg,transparent 0 3px,#ffffff02 3px 4px);color:#ecf0dc}
.auto-dice-badge{display:flex;align-items:center;gap:8px;padding:7px 12px;border:1px solid #8eae8944;border-radius:30px;font-size:11px;color:#c1d2b2;background:#08292266}.auto-dice-badge>i{width:6px;height:6px;border-radius:50%;background:#ebce83}
.dice-table{position:relative;display:grid;place-items:center;width:100%;height:245px;perspective:800px}
.dice-table-ring{position:absolute;width:min(360px,92%);height:200px;border:1px solid #abbd8533;border-radius:50%;transform:rotateX(55deg) translateY(40px);box-shadow:0 0 0 20px #cedb9b04,0 0 0 21px #abbd8515}
.dice-shadow{position:absolute;width:140px;height:35px;background:#021e21b0;border-radius:50%;filter:blur(9px);transform:translateY(87px)}
.dice-bounce{width:112px;height:112px;transform:translateY(-4px);transform-style:preserve-3d}
.dice-camera{width:100%;height:100%;transform:rotateX(-18deg) rotateY(-24deg);transform-style:preserve-3d}
.premium-die{position:relative;width:112px;height:112px;transform-style:preserve-3d}
/* Full square surfaces close the cube; slight overlap prevents subpixel seams while rolling. */
.premium-face{position:absolute;inset:-.5px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:10px;padding:21.5px;border:0;border-radius:0;background:linear-gradient(145deg,#fffefa 12%,#efe9da 78%,#d6cfbc);box-shadow:inset 1px 1px 3px #fff,inset -2px -2px 4px #a59d8533;backface-visibility:hidden}
.premium-face .pip{background:radial-gradient(circle at 65% 70%,#354b42 10%,#172e25 65%,#0b1b16);border-radius:50%;box-shadow:inset 1px 2px 3px #020b08cc,0 1px 1px #ffffffd9}
.face-1{transform:translateZ(56px)}.face-2{transform:rotateY(90deg) translateZ(56px);background:linear-gradient(140deg,#ede7d8,#d4cdbb)}.face-3{transform:rotateX(90deg) translateZ(56px);background:linear-gradient(145deg,#fffefa,#f1eddf)}.face-4{transform:rotateX(-90deg) translateZ(56px);background:linear-gradient(145deg,#ddd6c5,#bfb7a3)}.face-5{transform:rotateY(-90deg) translateZ(56px);background:linear-gradient(140deg,#f2ecdf,#d8d0be)}.face-6{transform:rotateY(180deg) translateZ(56px)}
.premium-die.rolling{animation:premium-roll .9s cubic-bezier(.16,.65,.27,1) both}.dice-bounce.rolling{animation:premium-bounce .9s ease-out}.dice-shadow.rolling{animation:premium-shadow .9s ease-out}
.auto-dice-timing{width:min(320px,90%);text-align:center;font-size:12px;font-variant-numeric:tabular-nums;color:#d0ddc0}.auto-dice-progress{height:4px;border-radius:4px;background:#c5d5bc22;overflow:hidden;margin-top:12px}.auto-dice-progress>i{display:block;height:100%;width:0;background:#eaca81;border-radius:4px;transition:width .1s linear}
@keyframes premium-roll{from{transform:rotateX(var(--from-x,0deg)) rotateY(var(--from-y,0deg))}to{transform:rotateX(var(--to-x,720deg)) rotateY(var(--to-y,720deg))}}
@keyframes premium-bounce{0%,100%{transform:translate(0,-4px)}20%{transform:translate(-35px,-58px)}48%{transform:translate(30px,3px)}68%{transform:translate(-12px,-23px)}85%{transform:translate(5px,0)}}
@keyframes premium-shadow{20%{transform:translate(-35px,87px) scale(.6);opacity:.5}48%{transform:translate(30px,87px) scale(1.05)}68%{transform:translate(-12px,87px) scale(.8)}100%{transform:translate(0,87px) scale(1)}}
@media(max-width:1050px){.game-picker{grid-template-columns:repeat(4,minmax(0,1fr))}.game-tab{padding:13px 14px;gap:10px}}
@media(max-width:600px){.game-picker{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.game-tab{flex-direction:column;gap:5px;padding:10px 4px;min-height:70px;text-align:center}.tab-label b{font-size:10px}.auto-dice-stage{height:350px}.auto-dice-active .setup-panel{padding:20px}.auto-dice-settings{display:grid;grid-template-columns:1fr 1fr;gap:16px}.auto-dice-settings>.panel-heading{grid-column:1/-1;margin-bottom:0}.auto-dice-latest{margin-top:0;padding:15px}.auto-dice-result strong{font-size:48px}.auto-dice-result .mini-premium-die{width:42px;height:42px;padding:8px;gap:3px}.auto-dice-history-heading{grid-column:1/-1;margin:0}.auto-dice-history{grid-column:1/-1;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px}.dice-history-item .mini-premium-die{width:30px;height:30px;padding:5px;gap:2px}}
@media(prefers-reduced-motion:reduce){.premium-die.rolling,.dice-bounce.rolling,.dice-shadow.rolling{animation:none}.auto-dice-progress>i{transition:none}}

.game-tab[data-game="race"] .tab-label{min-width:0}
.game-tab[data-game="race"] .tab-label b{white-space:normal;overflow-wrap:anywhere;line-height:1.4}
/* The roster wrapper and race options share the same top row. */
.race-active .setup-panel{grid-template-columns:minmax(0,1fr) 180px;grid-template-rows:auto;gap:18px;align-items:start;padding:18px 24px}
.race-active #participant-setup{grid-column:1;grid-row:1;min-width:0}
.race-active #participant-setup>.panel-heading{grid-column:auto;grid-row:auto;margin:0 0 12px;gap:8px}
.race-active #game-options{display:grid;grid-column:2;grid-row:1;gap:16px;align-self:start;margin:0;padding-left:18px;border-left:1px solid var(--line);min-width:0}
.race-active #game-options .option-field{display:block;min-width:0}
.race-active #game-options .option-field label{margin:0 0 8px;font-size:12px}
.race-active #game-options .option-field select{width:100%;min-width:0;min-height:40px;font-size:12px}
@media(min-width:641px) and (max-width:900px){.race-active .setup-panel{grid-template-columns:minmax(0,1fr) 150px;padding:18px;gap:16px}.race-active #people-list{grid-template-columns:repeat(3,minmax(0,1fr))}.race-active #game-options{padding-left:16px}}
@media(max-width:640px){.race-active .setup-panel{grid-template-columns:minmax(0,1fr);padding:16px;gap:14px}.race-active #game-options{grid-column:1;grid-row:2;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px 0 0;border-left:0;border-top:1px solid var(--line)}}

/* Fit every dice battle card in the board without an inner scroll area. */
.game-stage.dice-battle-stage{height:auto;min-height:280px;overflow:hidden;container-type:inline-size}
.dice-battle-stage .dice-board{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:12px;align-self:stretch;align-content:center}
.dice-battle-stage .dice-player{padding:8px 6px}
.dice-battle-stage .dice-player>b{line-height:16px}
.dice-battle-stage .dice-pair{margin:6px 0;gap:5px}
.dice-battle-stage .die{width:30px;height:30px;flex-shrink:0}
.dice-battle-stage .dice-total{display:block;line-height:14px;white-space:nowrap;font-size:10px}
@container(max-width:480px){.dice-battle-stage .dice-board{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px}.dice-battle-stage .dice-player{padding:6px 3px}.dice-battle-stage .dice-pair{gap:4px;margin:5px 0}.dice-battle-stage .die{width:24px;height:24px;padding:4px}.dice-battle-stage .dice-total{font-size:9px}}
@container(max-width:240px){.dice-battle-stage .dice-board{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Participant names are directly editable while idle. */
.person-chip{min-width:0;max-width:100%}
.person-name{min-width:0;max-width:180px;border:0;border-bottom:1px solid transparent;background:transparent;padding:1px 0;color:inherit;font-size:12px;cursor:text}
.person-name:hover:not(:disabled){border-bottom-color:#adbf9c}.person-name:focus{border-bottom-color:#ed936b;outline:0;background:#fffaf3}
.person-chip:focus-within{border-color:#edb48f;background:#fff6eb}
/* Shared 3D coin structure with a visible rim and two distinct faces. */
.coin-art-stage{position:relative;width:100%;height:100%;min-height:280px;display:grid;place-items:center;perspective:850px;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,#ffefd09c,transparent 65%)}
.coin-art-halo{position:absolute;width:245px;height:245px;border:1px solid #dcba6d30;border-radius:50%;box-shadow:0 0 0 20px #efd8a21a}
.coin-art-shadow{position:absolute;top:calc(50% + 85px);width:150px;height:20px;border-radius:50%;background:#97662626;filter:blur(7px)}
.coin-art-toss{position:relative;width:166px;height:166px;margin-top:-15px;transform-style:preserve-3d}
.coin-art{position:relative;width:166px;height:166px;transform-style:preserve-3d;transform:rotateX(12deg) rotateY(var(--coin-rest,0deg)) rotateZ(-8deg)}
.coin-art-edge{position:absolute;inset:0;border-radius:50%;background:repeating-conic-gradient(#b5822f 0deg 3deg,#e5bd64 3deg 5deg);box-shadow:0 1px 1px #815316}
.coin-art-face{position:absolute;inset:0;border-radius:50%;backface-visibility:hidden;overflow:hidden}
.coin-art-face svg{width:100%;height:100%}.coin-art-front{transform:translateZ(5px)}.coin-art-back{transform:rotateY(180deg) translateZ(5px)}
.coin-art-caption{position:absolute;bottom:24px;left:16px;right:16px;font-size:12px;font-weight:700;color:#9b7e42;text-align:center;letter-spacing:.3px}
.coin-art.flipping{animation:coin-art-flip .42s linear infinite}.coin-art-toss.tossing{animation:coin-art-flight 1.8s ease-in-out both}
@keyframes coin-art-flip{from{transform:rotateX(12deg) rotateY(0deg) rotateZ(-8deg)}to{transform:rotateX(12deg) rotateY(360deg) rotateZ(-8deg)}}
@keyframes coin-art-flight{0%,100%{transform:translateY(0) scale(1)}25%{transform:translateY(-38px) scale(.9)}55%{transform:translateY(8px) scale(1.02)}75%{transform:translateY(-16px) scale(.97)}}
@media(prefers-reduced-motion:reduce){.coin-art.flipping,.coin-art-toss.tossing{animation:none}}
/* Participant setup uses the full width and never exceeds two six-card rows. */
.playground.roster-layout{display:grid;grid-template-columns:minmax(0,1fr)}
.roster-layout .setup-panel{display:grid;grid-template-columns:minmax(0,1fr) 220px;grid-template-rows:auto;gap:18px;align-items:start;border-right:0;border-bottom:1px solid var(--line);padding:18px 24px}
.roster-layout #participant-setup{grid-column:1;grid-row:1;min-width:0}
.roster-layout #participant-setup>.panel-heading{margin:0 0 12px}
.roster-layout #game-setup-fields{grid-column:2;grid-row:1;min-width:0;border-left:1px solid var(--line);padding-left:18px}
#game-setup-fields[hidden]{display:none}
.roster-layout:has(#game-setup-fields[hidden]) .setup-panel{grid-template-columns:minmax(0,1fr)}
.roster-layout #game-setup-fields .ladder-prizes{margin:0;padding:0;border:0}
.roster-layout #game-setup-fields #game-options{grid-column:auto;grid-row:auto;padding:0;border:0;margin:16px 0 0}
.roster-layout #game-setup-fields #game-options:first-child,.race-active #game-setup-fields #game-options{margin:0}
.roster-layout #people-list{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;min-height:0;align-content:start}
.roster-layout #people-list>.small-muted{grid-column:1/-1;margin:0;padding:12px 0}
.roster-layout .person-chip{display:flex;gap:4px;padding:7px 6px;min-width:0}
.roster-layout .person-name{width:100%!important;max-width:none;min-width:0;flex:1}
.roster-layout .remove-person{flex-shrink:0}
.roster-layout #add-form{max-width:400px;margin:12px 0 0;grid-column:auto;grid-row:auto}
.roster-layout .list-actions{margin:8px 0 0;grid-column:auto;grid-row:auto}
.participant-limit-note{margin:10px 0 0;font-size:10px}
.race-slot-role>b{font:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:900px){.roster-layout .setup-panel{grid-template-columns:minmax(0,1fr) 160px;padding:18px;gap:14px}.roster-layout #game-setup-fields{padding-left:14px}.roster-layout #people-list{gap:5px}.roster-layout .person-dot{display:none}.race-active .race-name-slot{position:relative;padding:24px 4px 6px;grid-template-columns:minmax(0,1fr)}.race-active .race-slot-role{display:flex;flex-direction:column;gap:0;font-size:9px}.race-active .race-ban-button{position:absolute;right:2px;top:2px;width:22px;height:22px;padding:3px}.race-active .race-name-slot input{text-align:center;font-size:10px}}
@media(max-width:640px){.roster-layout .setup-panel{grid-template-columns:minmax(0,1fr);padding:16px;gap:14px}.roster-layout #game-setup-fields{grid-column:1;grid-row:2;border-left:0;border-top:1px solid var(--line);padding:14px 0 0}.roster-layout .person-chip{position:relative;padding:20px 3px 6px;min-height:45px}.roster-layout .person-name{font-size:10px;text-align:center}.roster-layout .remove-person{position:absolute;top:0;right:0;width:22px;height:20px;display:grid;place-items:center}.roster-layout #game-setup-fields #game-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.roster-layout #game-setup-fields .prize-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Compact ladder setup above a viewport-sized playing area. */
body.ladder-view{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.ladder-view .site-header{flex:none;width:100%;height:56px;margin:0 auto;padding:0 24px}
.ladder-view .brand{font-size:21px}.ladder-view .brand-symbol{width:30px;height:30px;border-radius:9px}
.ladder-view .page{flex:1;min-height:0;width:100%;margin:0 auto;padding:0 24px 8px;display:flex;flex-direction:column}
.ladder-view .game-picker{flex:none;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;margin:8px 0}
.ladder-view .game-tab{min-height:38px;padding:7px 6px;gap:4px;border-radius:8px;flex-direction:row;justify-content:center;grid-column:auto}
.ladder-view .tab-label b{font-size:10px}.ladder-view .tab-icon{width:18px;height:20px}.ladder-view .tab-icon svg{width:18px;height:18px}
.playground.ladder-active{flex:1;min-height:0;display:flex;flex-direction:column;border-radius:12px}
.playground.ladder-active .setup-panel{flex:none;max-height:38%;overflow:auto;overscroll-behavior:contain;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:10px 14px}
.ladder-active #participant-setup{display:grid;grid-template-columns:auto minmax(140px,280px) auto;gap:6px 12px;align-items:center}
.ladder-active #participant-setup>.panel-heading{grid-column:1;grid-row:1;justify-content:flex-start;gap:8px;margin:0}
.ladder-active .panel-heading h2{font-size:12px}.ladder-active .count-pill{padding:3px 6px;font-size:9px}
.ladder-active .race-roster-actions{display:none}
.ladder-active #add-form{grid-column:2;grid-row:1;max-width:none;margin:0;height:30px}
.ladder-active .list-actions{grid-column:3;grid-row:1;margin:0;justify-content:flex-end;white-space:nowrap}
.ladder-active #people-list{grid-column:1/-1;grid-row:2;gap:4px}
.ladder-active .person-chip{min-height:26px;padding:3px 6px;gap:4px}
.ladder-active .person-name{font-size:11px}
.ladder-active .remove-person{position:static;width:20px;height:20px;padding:0;display:grid;place-items:center}
.ladder-active #people-list>.small-muted{padding:2px 0}
.ladder-active #participant-limit-note,.ladder-active #prize-fields>.option-note{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ladder-active #game-setup-fields{grid-column:1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:8px 12px;border-left:0;border-top:1px solid var(--line);padding:8px 0 0}
.ladder-active #game-setup-fields:has(#game-options[hidden]){grid-template-columns:minmax(0,1fr)}
.ladder-active #ladder-prizes{display:grid;grid-template-columns:auto 200px minmax(180px,280px);gap:6px 12px;align-items:center;min-width:0}
.ladder-active #ladder-prizes>.panel-heading{grid-column:1;grid-row:1;margin:0;gap:8px;justify-content:flex-start}
.ladder-active .ladder-mode-picker{grid-column:2;grid-row:1;max-width:none;gap:5px}
.ladder-active .ladder-mode-picker label{padding:6px 5px;min-height:30px;font-size:11px}
.ladder-active #prize-fields:not([hidden]){display:contents}
.ladder-active #game-setup-fields .prize-list{grid-column:1/-1;grid-row:2;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.ladder-active .prize-row{padding:2px 6px;gap:4px;min-height:26px}
.ladder-active .prize-row input{padding:3px 0;font-size:11px}
.ladder-active #prize-add-form{grid-column:3;grid-row:1;margin:0;height:30px;max-width:none}
.ladder-active .ladder-mode-note{grid-column:1/-1;grid-row:3;margin:0;line-height:1.4}
.ladder-active #game-setup-fields #game-options{grid-column:2;grid-row:1;max-width:none;margin:0;align-self:start}
.ladder-active #game-setup-fields #game-options[hidden]{display:none}
.ladder-active #game-options .option-field{display:flex;gap:5px;align-items:center}
.ladder-active #game-options label{margin:0;white-space:nowrap;font-size:10px}
.ladder-active #game-options select{min-width:0;padding:5px;height:30px}
.ladder-active .game-panel{flex:1;min-height:0;padding:8px 14px 10px;overflow:hidden}
.ladder-active .race-display{height:100%;min-height:0;display:flex;flex-direction:column;gap:6px}
.ladder-active .game-heading{flex:none;height:24px}.ladder-active .game-heading h2{font-size:16px}
.ladder-active .game-heading-icon{width:24px;height:24px;border-radius:7px}.ladder-active .game-heading-icon svg{width:18px;height:18px}
.ladder-active .game-stage{flex:1;min-height:0;height:auto;width:100%;margin:0;overflow:hidden}
.ladder-active .ladder-wrap{min-height:0;padding:4px 8px}
.ladder-active .ladder-svg{min-width:0;width:100%;height:100%;overflow:hidden}
.ladder-active .ladder-track,.ladder-active .ladder-route{vector-effect:non-scaling-stroke}
.ladder-active .ladder-track{stroke-width:2}.ladder-active .ladder-route{stroke-width:3}
.ladder-active .play-controls{flex:none;margin:0;gap:6px}
.ladder-active .play-controls button{min-height:34px;padding:6px 12px;font-size:12px}
.ladder-active .game-footnote{flex:none;margin:0;line-height:1.3}
.ladder-active .result-banner{flex:none;margin:0;padding:5px 8px;min-height:0;max-height:48px;overflow:auto;overscroll-behavior:contain}
.ladder-view .footer-ad{flex:none;width:100%;padding:4px 24px 8px}
.ladder-view .footer-ad-label{margin-bottom:3px}
@media(max-width:1050px){.ladder-view .game-picker{grid-template-columns:repeat(4,minmax(0,1fr))}.ladder-view .game-tab{min-height:30px;padding:4px 6px}.ladder-active #ladder-prizes{grid-template-columns:auto 160px minmax(140px,240px)}}
@media(max-width:640px){
 .ladder-view .site-header{height:48px;padding:0 10px}.ladder-view .site-header nav{gap:6px}.ladder-view .brand{font-size:17px}.ladder-view .share-button{padding:6px;font-size:10px}
 .ladder-view .page{padding:0 8px 6px}.ladder-view .game-picker{margin:5px 0;gap:4px}.ladder-view .game-tab{min-height:28px;padding:4px 2px}.ladder-view .tab-icon{display:none}.ladder-view .tab-label b{font-size:9px}
 .playground.ladder-active .setup-panel{padding:8px;gap:6px;max-height:38%}
 .ladder-active #participant-setup{grid-template-columns:auto minmax(0,1fr) auto;gap:5px}
 .ladder-active #participant-setup>.panel-heading{gap:4px}.ladder-active .panel-heading h2{font-size:11px}
 .ladder-active #add-form{height:28px}.ladder-active .add-person input{padding:5px;font-size:10px}.ladder-active .add-person button{width:24px;margin:2px}
 .ladder-active .list-actions button{font-size:9px}.ladder-active #people-list{gap:3px}
 .ladder-active .person-chip{padding:3px;min-height:25px}.ladder-active .person-name{font-size:10px;text-align:left}.ladder-active .remove-person{width:14px;height:18px;font-size:13px}
 .ladder-active #game-setup-fields{padding-top:6px;gap:6px;grid-template-columns:minmax(0,1fr) 100px}
 .ladder-active #ladder-prizes{grid-template-columns:auto minmax(0,1fr);gap:5px}
 .ladder-active .ladder-mode-picker label{padding:4px;min-height:28px;font-size:10px}
 .ladder-active #prize-add-form{grid-column:1/-1;grid-row:2;height:28px}
 .ladder-active #game-setup-fields .prize-list{grid-row:3;grid-template-columns:repeat(3,minmax(0,1fr))}
 .ladder-active .ladder-mode-note{grid-row:4;font-size:9px}.ladder-active .prize-row{gap:2px;padding:2px 4px}.ladder-active .prize-row>span{width:10px}.ladder-active .prize-row input{font-size:10px}
 .ladder-active #game-setup-fields #game-options{display:block}.ladder-active #game-options select{height:28px}
 .ladder-active .game-panel{padding:6px 8px 8px}.ladder-active .ladder-wrap{padding:3px}.ladder-active .game-heading h2{font-size:14px}
 .ladder-active .ladder-label{font-size:22px}.ladder-active .ladder-result-label{font-size:20px}
 .ladder-active .game-footnote{font-size:8px}.ladder-view .footer-ad{padding:3px 8px 6px}
}
@media(max-height:650px){.ladder-view .footer-ad:has(.footer-ad-unit[hidden]){display:none}.ladder-active .game-footnote{display:none}.ladder-active .ladder-mode-note{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}}

/* Use the compact ladder game picker for every game on mobile. */
.game-picker .game-tab{min-width:0;max-width:100%}
.game-picker .tab-label{min-width:0;max-width:100%}
.game-picker .tab-label b{white-space:normal;overflow-wrap:anywhere;line-height:1.4}
.playground,.setup-panel,#participant-setup,#game-setup-fields,.race-display{min-width:0}
@media(max-width:640px){
 .page .game-picker{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:5px 0}
 .game-picker .game-tab{grid-column:auto;min-height:28px;padding:4px 2px;gap:4px;border-radius:8px;flex-direction:row;justify-content:center;text-align:center}
 .game-picker .tab-icon{display:none}
 .game-picker .tab-label b{font-size:9px}
 .site-header,.ladder-view .site-header{height:auto;min-height:48px;padding:8px 10px;flex-wrap:wrap;gap:6px 10px}
 .site-header .brand{min-width:0;max-width:100%;font-size:18px}
 .site-header .brand>span:last-child{min-width:0;overflow-wrap:anywhere}
 .site-header nav,.ladder-view .site-header nav{flex-wrap:wrap;gap:6px;max-width:100%}
 .site-header .share-button{padding:6px 8px;font-size:10px}
 .page{padding-right:8px;padding-left:8px}
 .roster-layout .setup-panel{padding:12px;gap:12px}
 .roster-layout #participant-setup>.panel-heading{flex-wrap:wrap;gap:6px}
 .race-roster-actions{flex-wrap:wrap;gap:6px;min-width:0;max-width:100%}
 .race-roster-actions button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .game-panel:not(.race-fullscreen){padding-right:10px;padding-left:10px}
 .race-active .game-panel:not(.race-fullscreen){padding-right:0;padding-left:0}
 .game-panel:not(.race-fullscreen) .play-controls{display:flex;flex-wrap:wrap;gap:6px;max-width:100%}
 .game-panel:not(.race-fullscreen) .play-controls button{flex:1 1 110px;min-width:0;max-width:100%;padding:9px 10px;gap:5px;font-size:11px;white-space:normal;overflow-wrap:anywhere}
 .game-panel:not(.race-fullscreen) .play-controls button>span{min-width:0}
 .game-panel:not(.race-fullscreen) .play-button>span:first-child{margin-left:0}
 .race-active .game-panel:not(.race-fullscreen) .race-toolbar{flex-wrap:wrap;gap:6px;justify-content:flex-end;padding:6px 8px}
 .race-active .game-panel:not(.race-fullscreen) .race-speed-label{min-width:0;gap:4px;margin-right:auto;font-size:11px}
 .race-active .game-panel:not(.race-fullscreen) .race-speed-label select{min-width:0;width:62px;min-height:34px;padding:5px;font-size:11px}
 .race-active .game-panel:not(.race-fullscreen) .race-fullscreen-button{min-width:0;max-width:100%;min-height:34px;padding:6px 8px;font-size:11px;white-space:normal}
 .race-active .game-panel:not(.race-fullscreen) .race-toolbar .sound-button{min-height:34px;padding:6px 8px}
 .wheel-wrap{width:min(245px,calc(100% - 16px));height:auto;aspect-ratio:1}
 .draw-grid,.team-board{min-width:0;padding:8px;gap:6px}
 .team-group,.team-member{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .auto-dice-settings>*{min-width:0}.period-input{min-width:0;gap:6px;padding:5px 8px}.period-input input{flex:1;min-width:0;max-width:100%}.period-input span{flex:none;font-size:11px}
}
@media(max-width:440px){
 .race-active .game-panel:not(.race-fullscreen) #race-sound-toggle [data-sound-label],.race-active .game-panel:not(.race-fullscreen) .race-fullscreen-button>span{display:none}
 .race-active .game-panel:not(.race-fullscreen) .race-fullscreen-button{width:34px;height:34px;padding:7px}
 .site-header .brand{font-size:17px}.site-header .brand-symbol{width:30px;height:30px;border-radius:9px}
}
@media(max-width:360px){.game-panel:not(.race-fullscreen) .play-controls .button-arrow{display:none}.race-roster-actions{margin-left:0;width:100%}.site-header nav{gap:4px}}

/* Keep each game choice at most 112px wide, centered in every game view. */
.page .game-picker{width:100%;max-width:952px;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin-left:auto;margin-right:auto}
.game-picker .game-tab{grid-column:auto}
@media(max-width:1050px){.page .game-picker{max-width:472px;grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:640px){.page .game-picker{max-width:460px;gap:4px}}

/* Auto dice keeps setup, the live cube, results and actions inside the viewport. */
#auto-dice-results[hidden]{display:none}
body.auto-dice-view{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.auto-dice-view .site-header{flex:none;width:100%;height:56px;margin:0 auto;padding:0 24px}
.auto-dice-view .brand{font-size:21px}.auto-dice-view .brand-symbol{width:30px;height:30px;border-radius:9px}
.auto-dice-view .page{flex:1;min-height:0;width:100%;margin:0 auto;padding:0 16px 8px;display:flex;flex-direction:column}
.auto-dice-view .game-picker{flex:none;margin-top:6px;margin-bottom:6px}
.auto-dice-view .game-tab{min-height:30px;padding:4px;gap:0;border-radius:8px;justify-content:center;text-align:center}
.auto-dice-view .tab-icon{display:none}.auto-dice-view .tab-label b{font-size:10px}
.playground.auto-dice-active{flex:1;min-height:0;display:flex;flex-direction:column;margin-bottom:0;border-radius:12px}
.auto-dice-active .setup-panel{flex:none;display:block;min-width:0;padding:6px 12px;border-right:0;border-bottom:1px solid var(--line)}
.auto-dice-active #game-setup-fields,.auto-dice-active #game-options{min-width:0;width:100%;margin:0}
.auto-dice-active .auto-dice-settings{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px}
.auto-dice-active .auto-dice-period-field{display:flex;align-items:center;gap:8px;min-width:0}
.auto-dice-active .auto-dice-period-field label{margin:0;white-space:nowrap;font-size:11px}
.auto-dice-active .period-input{width:130px;min-width:0;height:34px;padding:4px 8px;gap:5px}
.auto-dice-active .period-input input{min-width:0;flex:1;padding:0;font-size:18px}
.auto-dice-active .period-input span{flex:none;font-size:10px}
.auto-dice-active #auto-dice-period-note{margin:0;font-size:9px;line-height:1.4}
.auto-dice-active .game-panel{flex:1;min-height:0;padding:8px 12px;overflow:hidden}
.auto-dice-active .race-display{height:100%;min-height:0;display:flex;flex-direction:column;gap:7px}
.auto-dice-active .game-heading{flex:none;height:24px}.auto-dice-active .game-heading h2{font-size:16px}
.auto-dice-active .game-heading-icon{width:24px;height:24px;border-radius:7px}.auto-dice-active .game-heading-icon svg{width:18px;height:18px}
.auto-dice-active .auto-dice-stage{flex:1;min-height:0;min-width:0;height:auto;width:100%;margin:0;container:dice-stage / size}
.auto-dice-active .auto-dice-scene{min-height:0;min-width:0;padding:12px;gap:6px}
.auto-dice-active .auto-dice-badge{flex:none;max-width:100%;padding:4px 9px;font-size:10px;text-align:center}
.auto-dice-active .dice-table{flex:1;min-height:0;min-width:0;height:auto}
.auto-dice-active .auto-dice-timing{flex:none;max-width:100%;font-size:11px;overflow-wrap:anywhere}
.auto-dice-active .auto-dice-progress{margin-top:6px}
.auto-dice-active .auto-dice-results{flex:none;min-width:0;display:grid;grid-template-columns:130px minmax(0,1fr);gap:10px;container:dice-results / inline-size}
.auto-dice-active .auto-dice-latest{margin:0;padding:8px 10px;border-radius:9px}
.auto-dice-active .auto-dice-latest>span{font-size:10px}.auto-dice-active .auto-dice-latest small{display:block;font-size:9px;line-height:1.2}
.auto-dice-active .auto-dice-result{min-width:0;gap:6px;margin:4px 0}
.auto-dice-active .auto-dice-result strong{font-size:38px}
.auto-dice-active .auto-dice-result .mini-premium-die{flex:none;width:30px;height:30px;padding:6px;gap:2px;border-radius:7px}
.auto-dice-active .auto-dice-history-panel{min-width:0;align-self:center}
.auto-dice-active .auto-dice-history-heading{display:flex;justify-content:space-between;gap:6px;margin:0 0 4px;font-size:10px;flex-wrap:wrap}
.auto-dice-active .auto-dice-history-heading small{font-size:9px}
.auto-dice-active .auto-dice-history{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px 6px;min-height:0;min-width:0}
.auto-dice-active .dice-history-item{min-width:0;gap:2px;font-size:8px;line-height:1}
.auto-dice-active .dice-history-item .mini-premium-die{width:min(24px,100%);height:auto;aspect-ratio:1;padding:4px;gap:2px;border-radius:5px;box-shadow:none}
.auto-dice-active .play-controls{flex:none;margin:0;gap:6px}
.auto-dice-active .game-panel .play-controls button{flex:1;min-width:0;min-height:36px;padding:7px 10px;font-size:11px}
.auto-dice-active .play-controls .button-arrow{display:none}
.auto-dice-active .game-footnote{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0)}
.auto-dice-view .footer-ad{flex:none;width:100%;padding:4px 16px 8px}
.auto-dice-view .footer-ad:has(.footer-ad-unit[hidden]){display:none}
@container dice-results (min-width:480px){.auto-dice-active .auto-dice-history{grid-template-columns:repeat(8,minmax(0,1fr))}}
@container dice-stage (max-height:260px){
 .auto-dice-active .dice-bounce{scale:.75}.auto-dice-active .dice-shadow{scale:.75}
 .auto-dice-active .dice-bounce.rolling{animation-name:compact-dice-bounce}
 .auto-dice-active .dice-table-ring{height:140px}
}
@container dice-stage (max-height:190px){.auto-dice-active .dice-bounce{scale:.55}.auto-dice-active .dice-shadow{scale:.55}.auto-dice-active .auto-dice-badge{display:none}.auto-dice-active .auto-dice-scene{padding:6px}.auto-dice-active .dice-table-ring{height:100px}}
@keyframes compact-dice-bounce{0%,100%{transform:translate(0,-4px)}20%{transform:translate(-16px,-22px)}48%{transform:translate(14px,2px)}68%{transform:translate(-6px,-12px)}85%{transform:translate(3px,0)}}
@media(max-width:640px){
 .auto-dice-view .site-header{height:auto;min-height:48px;padding:8px 10px}
 .auto-dice-view .brand{font-size:17px}.auto-dice-view .page{padding:0 8px 6px}
 .auto-dice-view .game-picker{margin-top:5px;margin-bottom:5px}
 .auto-dice-view .game-tab{min-height:28px;padding:4px 2px}.auto-dice-view .tab-label b{font-size:9px}
 .auto-dice-active .game-panel{padding:6px 8px}.auto-dice-active .race-display{gap:6px}
 .auto-dice-active .setup-panel{padding:6px 8px}.auto-dice-active .auto-dice-results{grid-template-columns:115px minmax(0,1fr);gap:8px}
}
@media(max-height:520px){
 .auto-dice-view .site-header{height:auto;min-height:38px;padding-top:4px;padding-bottom:4px}
 .auto-dice-view .game-tab{min-height:24px;padding:2px 4px}.auto-dice-view .game-picker{margin-top:4px;margin-bottom:4px}
 .auto-dice-active .game-heading{display:none}.auto-dice-active #auto-dice-period-note{display:none}
 .auto-dice-active .auto-dice-latest{padding:5px 8px}.auto-dice-active .auto-dice-result strong{font-size:30px}
 .auto-dice-active .dice-history-item .mini-premium-die{width:min(20px,100%)}
 .auto-dice-active .game-panel .play-controls button{min-height:30px;padding:4px 8px}
}

/* Game selection is shared chrome: switching games never resizes its buttons. */
#game-picker{grid-auto-rows:48px;margin-top:12px;margin-bottom:16px}
#game-picker .game-tab{height:48px;min-height:48px;padding:6px;gap:6px;border-radius:8px;flex-direction:row;justify-content:center;text-align:center}
#game-picker .tab-icon{display:grid;width:20px;height:20px;flex:none}
#game-picker .tab-icon svg{width:20px;height:20px}
#game-picker .tab-label b{font-size:11px;line-height:1.25}
@media(max-width:640px){
 #game-picker{grid-auto-rows:32px;margin-top:5px;margin-bottom:5px}
 #game-picker .game-tab{height:32px;min-height:32px;padding:4px 2px;gap:0}
 #game-picker .tab-icon{display:none}
 #game-picker .tab-label b{font-size:9px}
}

/* PC games share a steady outer frame; tall game contents scroll inside it. */
@media(min-width:641px){
 html{scrollbar-gutter:stable}
 body.ladder-view,body.auto-dice-view{height:auto;min-height:100vh;display:block;overflow:visible}
 .site-header,.ladder-view .site-header,.auto-dice-view .site-header{width:100%;height:64px;margin:0 auto;padding:0 24px}
 .site-header .brand,.ladder-view .brand,.auto-dice-view .brand{font-size:21px}
 .site-header .brand-symbol{width:30px;height:30px;border-radius:9px}
 .site-header nav,.ladder-view .site-header nav,.auto-dice-view .site-header nav{gap:12px}
 .page,.ladder-view .page,.auto-dice-view .page{display:block;flex:none;width:100%;margin:0 auto;padding:0 24px 24px}
 .page>.playground{display:flex;flex-direction:column;height:clamp(720px,calc(100dvh - 180px),840px);min-height:720px;margin-bottom:0;border-radius:16px}
 .page>.playground>.setup-panel{flex:none;min-height:0;max-height:240px;overflow:auto;overscroll-behavior:contain}
 .page>.playground>.setup-panel[hidden]{display:none}
 .page>.playground>.game-panel:not(.race-fullscreen){flex:1;min-height:0;padding:12px 16px;overflow:hidden}
 .page>.playground>.game-panel:not(.race-fullscreen)>.race-display{height:100%;min-height:0;display:flex;flex-direction:column;gap:10px}
 .page .game-panel:not(.race-fullscreen) .game-heading{flex:none;height:28px;display:flex}
 .page .game-panel:not(.race-fullscreen) .game-heading h2{font-size:18px}
 .page .game-panel:not(.race-fullscreen) .game-heading-icon{width:28px;height:28px;border-radius:8px}
 .page .game-panel:not(.race-fullscreen) .game-heading-icon svg{width:20px;height:20px}
 .page .game-panel:not(.race-fullscreen) .game-stage{flex:1;min-height:0;height:auto;width:100%;margin:0;overflow:auto}
 .page .game-panel:not(.race-fullscreen) .game-stage.wheel-stage,.page .game-panel:not(.race-fullscreen) .game-stage.auto-dice-stage{overflow:hidden}
 .page .game-panel:not(.race-fullscreen) .game-stage.dice-battle-stage{container-type:size;overflow:hidden}
 .page .game-panel:not(.race-fullscreen) .play-controls{flex:none;margin:0;gap:8px}
 .page .game-panel:not(.race-fullscreen) .play-controls button{min-height:40px;padding:9px 14px;font-size:12px}
 .page .game-panel:not(.race-fullscreen) .game-footnote{flex:none;margin-top:0}
 .page .game-panel:not(.race-fullscreen) .result-banner{flex:none;max-height:72px;margin:0;overflow:auto}
 .page .game-panel:not(.race-fullscreen) .race-toolbar{flex:none}
 /* The PC race takes its height from its full-width canvas rather than shrinking to a fixed frame. */
 .page>.playground.race-active{height:auto}
 /* Keep all twelve racers and both settings visible without an inner scrollbar. */
 .page>.playground.race-active>.setup-panel{max-height:none;overflow:visible;padding:12px 18px}
 .race-active #participant-setup>.panel-heading{margin-bottom:8px}
 .race-active #participant-limit-note{margin-top:6px}
 .page>.race-active>.game-panel:not(.race-fullscreen){flex:none;overflow:visible}
 .page>.race-active>.game-panel:not(.race-fullscreen)>.race-display{height:auto}
 .page .race-active .game-panel:not(.race-fullscreen) .game-stage{flex:none;height:auto;overflow:hidden}
 .page .race-active .game-panel:not(.race-fullscreen) .race-view{height:auto;min-height:0;display:block}
 .page .race-active .game-panel:not(.race-fullscreen) .race-screen{min-height:0}
 .page .race-active .game-panel:not(.race-fullscreen) .race-canvas{width:100%;height:auto;aspect-ratio:16/9;object-fit:fill}
 .page .race-active .game-panel:not(.race-fullscreen) .race-events{max-height:110px;overflow:auto}
 .page .race-active .game-panel:not(.race-fullscreen) .race-standings{max-height:240px;overflow:auto;overscroll-behavior:contain}
 .page .ladder-active .game-panel:not(.race-fullscreen) .game-stage{display:block;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
 .page .ladder-active .ladder-wrap{height:650px;min-height:650px;padding:12px 14px}
 .page .ladder-active .ladder-svg{height:100%;min-width:0}
 .footer-ad,.ladder-view .footer-ad,.auto-dice-view .footer-ad{width:100%;padding:8px 24px 28px}
 .auto-dice-view .footer-ad:has(.footer-ad-unit[hidden]),.ladder-view .footer-ad:has(.footer-ad-unit[hidden]){display:block}
 .ladder-view .footer-ad-label{margin-bottom:7px}
}
@container(max-height:320px){.dice-battle-stage .dice-player{padding:6px}.dice-battle-stage .dice-pair{margin:5px 0}.dice-battle-stage .die{width:24px;height:24px;padding:4px}}

/* Keep normalized route dashes in the same coordinate space as the ladder. */
.page .ladder-active .ladder-track,.page .ladder-active .ladder-route{vector-effect:none}
.page .ladder-active.is-busy .game-stage{pointer-events:auto}
@media(max-width:640px){
 .race-active #people-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .race-active .race-name-slot{position:static;grid-template-columns:minmax(0,1fr) 26px;grid-template-rows:auto auto;gap:3px;padding:5px;align-items:center}
 .race-active .race-slot-role{grid-column:1/-1;grid-row:1;flex-direction:row;gap:3px;font-size:9px}
 .race-active .race-slot-sprite{flex-basis:32px;width:32px;height:32px}
 .race-active .race-ban-button{position:static;grid-column:2;grid-row:2;width:26px;height:28px;padding:5px}
 .race-active .race-name-slot input{grid-column:1;grid-row:2;min-height:30px;text-align:left;font-size:16px;padding:4px 2px}
}
/* A taller ladder scrolls with the page; labels remain unscaled. */
body.ladder-view{height:auto;min-height:100dvh;display:block;overflow-x:hidden;overflow-y:auto}
.ladder-view .site-header{flex:none}
.ladder-view .page{flex:none;min-height:0;display:block;padding-bottom:8px}
.ladder-view .page>.playground.ladder-active{flex:none;height:auto;min-height:0;margin-bottom:0}
.ladder-view .page>.playground.ladder-active>.setup-panel{flex:none;max-height:none;min-height:0;padding:8px 12px;gap:6px;overflow:visible}
.ladder-view .page .ladder-active .game-panel{flex:none;min-height:0;padding:6px 10px 8px;overflow:visible}
.ladder-view .page .ladder-active .race-display{height:auto;min-height:0;display:flex;flex-direction:column;gap:6px}
.ladder-view .page .ladder-active .game-stage{flex:none;min-height:520px;height:clamp(520px,70dvh,740px);margin:0;display:block;overflow:hidden;scrollbar-gutter:auto;container:ladder-stage / size}
.ladder-view .page .ladder-active .ladder-wrap{width:100%;height:100%;min-width:0;min-height:0;padding:5px;display:grid;grid-template-rows:28px minmax(0,1fr) 36px;gap:4px}
.ladder-view .page .ladder-active .ladder-svg{width:100%;height:100%;min-width:0;min-height:0;overflow:hidden}
.ladder-starts,.ladder-ends{display:grid;grid-template-columns:repeat(var(--ladder-columns),minmax(0,1fr));gap:3px;min-width:0;align-items:stretch}
.ladder-view .ladder-starts .ladder-top-node{min-width:0;padding:3px 1px;border:1px solid #dce5d4;border-radius:6px;background:white;display:flex;align-items:center;justify-content:center}
.ladder-view .ladder-starts .ladder-top-node.selected{background:#fff0f0;border-color:#e54747}
.ladder-view .page .ladder-active .ladder-label{font-size:11px;line-height:1.2;color:#506c59;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ladder-view .page .ladder-active .ladder-label.winner{color:#e54747}
.ladder-view .page .ladder-active .ladder-result-label{font-size:10px;line-height:15px;max-height:none;min-width:0;display:flex;align-items:center;justify-content:center;padding:2px;border-radius:4px;background:#f0f4e9;white-space:normal;overflow-wrap:anywhere;overflow:hidden}
.ladder-view .page .ladder-active .game-heading{flex:none;height:24px}
.ladder-view .page .ladder-active .play-controls{flex:none;margin:0;gap:6px}
.ladder-view .page .ladder-active .play-controls button{min-height:34px;padding:6px 12px}
.ladder-view .page .ladder-active .result-banner{flex:none;max-height:40px;min-height:0;margin:0;padding:4px 8px}
.ladder-view .page .ladder-active .game-footnote{flex:none;margin:0;line-height:1.3}
.ladder-view .footer-ad,.ladder-view .footer-ad:has(.footer-ad-unit[hidden]){display:block;flex:none;width:100%;padding:4px 24px 8px}
.ladder-view .footer-ad-label{margin-bottom:3px}
.ladder-view .footer-ad-space:has(.footer-ad-unit[hidden]){min-height:50px}
.ladder-view .footer-ad-placeholder{min-height:50px;font-size:11px}
/* Keep automatic and footer ads reachable below the game. */
body.ladder-view{overflow-x:hidden;overflow-y:auto}
@media(max-width:640px){
 .ladder-view .page{padding-bottom:6px}
 .ladder-view .footer-ad,.ladder-view .footer-ad:has(.footer-ad-unit[hidden]){padding:3px 8px 6px}
 .ladder-view .page>.playground.ladder-active>.setup-panel{padding:6px;gap:5px;max-height:none}
 .ladder-view .page .ladder-active .game-panel{padding:5px 6px 6px}
 .ladder-view .page .ladder-active .ladder-label{font-size:9px}
 .ladder-view .page .ladder-active .ladder-result-label{font-size:9px;line-height:13px}
 .ladder-starts,.ladder-ends{gap:1px}
}
@container ladder-stage (max-height:200px){
 .ladder-view .page .ladder-active .ladder-wrap{grid-template-rows:22px minmax(0,1fr) 28px;padding:3px;gap:2px}
}
@media(max-height:520px){
 .ladder-view .page .ladder-active .game-heading,.ladder-view .page .ladder-active .game-footnote{display:none}
 .ladder-view .page .ladder-active .race-display{gap:4px}
 .ladder-view .page .ladder-active .play-controls button{min-height:28px;padding:4px 8px}
}

/* Short viewing bars leave more space for the PC race. */
@media(min-width:641px){
 .page .race-active .game-panel:not(.race-fullscreen)>.race-display{gap:5px}
 .page .race-active .game-panel:not(.race-fullscreen) .game-heading{height:20px}
 .page .race-active .game-panel:not(.race-fullscreen) .game-heading h2{font-size:14px;line-height:20px}
 .page .race-active .game-panel:not(.race-fullscreen) .game-heading-icon{width:20px;height:20px;border-radius:5px}
 .page .race-active .game-panel:not(.race-fullscreen) .game-heading-icon svg{width:15px;height:15px}
 .page .race-active .game-panel:not(.race-fullscreen) .race-toolbar{min-height:36px;padding:4px 10px;gap:8px}
 .page .race-active .game-panel:not(.race-fullscreen) .race-speed-label{font-size:11px;gap:6px}
 .page .race-active .game-panel:not(.race-fullscreen) .race-speed-label select{height:28px;min-height:28px;min-width:62px;padding:3px 6px;font-size:11px}
 .page .race-active .game-panel:not(.race-fullscreen) .race-toolbar button{min-height:28px;padding:4px 8px;font-size:11px;border-radius:6px}
 .page .race-active .game-panel:not(.race-fullscreen) .race-toolbar button svg{width:15px;height:15px}
}
.race-events .race-colored-name,.race-standings .race-result-name.race-colored-name{color:var(--name-color);font-weight:800}

/* Participant colors continue from setup to the traced route and its result. */
.ladder-active .person-chip{background:var(--ladder-tint,#f1f4ed);border-color:var(--ladder-color,#e6eadd)}
.ladder-active .person-name{color:var(--ladder-color,#596e5f);font-weight:700}
.ladder-view .ladder-starts .ladder-top-node,.ladder-view .ladder-starts .ladder-top-node.selected{background:var(--ladder-tint);border-color:var(--ladder-color)}
.ladder-view .ladder-starts .ladder-top-node.selected{box-shadow:inset 0 0 0 1px var(--ladder-color)}
.ladder-view .page .ladder-active .ladder-label,.ladder-view .page .ladder-active .ladder-label.winner{color:var(--ladder-color);font-weight:800}
.ladder-view .page .ladder-active .ladder-lane{stroke:var(--ladder-color);opacity:.45}
.ladder-view .page .ladder-active .ladder-route{stroke:var(--ladder-color);stroke-width:4}
.ladder-view .page .ladder-active .ladder-marker.winner{fill:var(--ladder-color)}
.ladder-view .page .ladder-active .ladder-result-label.revealed{background:var(--ladder-tint);color:var(--ladder-color);font-weight:800}

/* Result video actions stay outside the scrolling standings and wrap on small screens. */
.race-replay-actions[hidden]{display:none}
.race-replay-actions{flex:none;margin:6px 16px 0;padding:10px 12px;border:1px solid #58725a;border-radius:8px;background:#203e35;color:#cedcca}
.replay-buttons{display:flex;flex-wrap:wrap;gap:8px}
.replay-buttons button{flex:1 1 140px;min-width:0;min-height:40px;padding:8px 12px;border:1px solid #6e8767;border-radius:6px;background:#e2dbac;color:#254234;font:inherit;font-size:12px;font-weight:700;cursor:pointer}
.replay-buttons button:disabled{opacity:.5;cursor:default}
.replay-buttons button:focus-visible{outline:2px solid #ffe1a1;outline-offset:3px}
.race-replay-actions small{display:block;margin-top:6px;font-size:11px;line-height:1.4;overflow-wrap:anywhere}
.game-guide{flex:none;width:calc(100% - 32px);max-width:1200px;margin:28px auto 24px;padding:0;background:#fffdf8;border:1px solid var(--line);border-radius:16px;color:#405a49;font-size:14px;line-height:1.9;scroll-margin-top:20px}
.game-guide>summary{padding:16px 24px;cursor:pointer;font-weight:700;color:var(--ink);border-radius:16px}
.game-guide>summary::marker{color:#738566}
.game-guide>summary:focus-visible{outline:2px solid #54734c;outline-offset:-4px}
.game-guide[open]>summary{border-bottom:1px solid var(--line);border-radius:16px 16px 0 0}
#game-guide-content{max-width:924px;margin:0 auto;padding:24px 32px}
.game-guide h1,.info-article h1{font-size:27px;line-height:1.45;letter-spacing:-.8px;margin:8px 0 16px;color:var(--ink)}
.game-guide h2,.info-article h2{font-size:18px;line-height:1.5;margin:28px 0 10px;color:var(--ink)}
.game-guide p,.info-article p{margin:12px 0;overflow-wrap:anywhere}
.game-guide li,.info-article li{margin:9px 0}.game-guide ol,.game-guide ul,.info-article ol{padding-left:23px}
.game-guide .guide-kicker,.info-article .guide-kicker{margin:0;color:#738566;font-size:11px;font-weight:700;letter-spacing:1px}
.guide-lead,.info-lead{font-size:16px;color:#536c56}
.guide-table-wrap{max-width:100%;overflow-x:auto}
.guide-table{width:100%;border-collapse:collapse;font-size:13px;line-height:1.65;text-align:left}
.guide-table caption{text-align:left;font-size:12px;color:#65795d;padding-bottom:10px}
.guide-table th,.guide-table td{padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:top}
.guide-table th{background:#eff3e7;color:#38543c;font-weight:700}
.game-guide-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.game-guide-links a{border:1px solid var(--line);border-radius:8px;padding:6px 12px;background:#f5f7ec;font-size:12px}
.game-guide a,.info-article a{color:#385d3f;text-decoration:underline;text-underline-offset:3px}
.game-guide a:focus-visible,.info-article a:focus-visible,.site-footer a:focus-visible,.guide-link:focus-visible{outline:2px solid #54734c;outline-offset:3px}
.site-header .guide-link{font-size:12px;font-weight:700;white-space:nowrap;color:#54734c;text-decoration:underline;text-underline-offset:4px}
body.auto-dice-view{height:auto;min-height:100dvh;overflow-x:hidden;overflow-y:auto}
.auto-dice-view .page{flex:none;height:calc(100dvh - 56px);min-height:460px}
/* An inactive unit should not leave an empty advertisement screen. */
body .footer-ad:has(.footer-ad-unit[hidden]){display:none!important}
.site-footer{flex:none;width:100%;max-width:1200px;display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center;margin:0 auto;padding:22px 24px;border-top:1px solid var(--line);font-size:12px;line-height:1.6;color:#65795d}
.site-footer nav{display:flex;flex-wrap:wrap;gap:8px 18px}
.site-footer a{color:#405f45}.site-footer>span{margin-left:auto;font-size:11px}
.info-main{max-width:1000px;margin:28px auto;padding:0 24px}
.info-article{padding:38px 48px;border:1px solid var(--line);border-radius:16px;background:#fffdf8;color:#405a49;font-size:14px;line-height:1.9}
.info-date{font-size:12px;color:#65795d}
@media(min-width:641px){.auto-dice-view .page{height:auto;min-height:0}}
@media(max-width:640px){
 .game-guide{margin:20px auto;font-size:14px}
 .game-guide>summary{padding:14px 18px}
 #game-guide-content{padding:22px 18px}
 .game-guide h1,.info-article h1{font-size:23px}.game-guide h2,.info-article h2{font-size:17px}
 .guide-lead,.info-lead{font-size:15px}.guide-table{font-size:12px}.guide-table th,.guide-table td{padding:10px 6px}
 .site-header nav{gap:8px}.site-header .guide-link{display:none}
 .site-info-page .site-header .guide-link{display:block;font-size:11px}
 .site-footer{padding:20px 16px;gap:10px 18px}.site-footer>span{width:100%;margin:0}
 .info-main{padding:0 16px;margin:20px auto}.info-article{padding:24px 18px}
}
.race-fullscreen .race-replay-actions{position:absolute;left:8px;right:8px;bottom:88px;z-index:4;margin:0;padding:6px 8px}
.race-fullscreen .race-replay-actions small{font-size:10px}
@media(max-width:640px){.race-replay-actions{margin:4px 8px 0;padding:8px}.replay-buttons{gap:6px}.replay-buttons button{font-size:11px}}

/* Pixel-styled race scrollbars leave a clear gutter beside logs and results. */
.race-events,.race-standings{
 scrollbar-color:#e2bd59 #102f2a;
 scrollbar-width:auto;
 scrollbar-gutter:stable;
}
.race-active .race-events{padding-right:14px}
.race-active .race-standings{padding-right:16px}
.race-events::-webkit-scrollbar,.race-standings::-webkit-scrollbar{width:12px;height:12px}
.race-events::-webkit-scrollbar-track,.race-standings::-webkit-scrollbar-track{
 background:#102f2a;
 border-left:3px solid #183f36;
 box-shadow:inset 1px 0 #071d19,inset -1px 0 #345d4b;
}
.race-events::-webkit-scrollbar-thumb,.race-standings::-webkit-scrollbar-thumb{
 min-height:34px;
 border:2px solid #102f2a;
 border-radius:3px;
 background:linear-gradient(90deg,#b98932 0 22%,#f2d36e 22% 72%,#cf9e3d 72%);
 box-shadow:inset 1px 1px #fff0a0,inset -1px -1px #79551e;
}
.race-events::-webkit-scrollbar-thumb:hover,.race-standings::-webkit-scrollbar-thumb:hover{
 background:linear-gradient(90deg,#d5a743 0 22%,#ffe48a 22% 72%,#e8b64c 72%);
}
.race-events::-webkit-scrollbar-button,.race-standings::-webkit-scrollbar-button{display:none;width:0;height:0}
.race-events::-webkit-scrollbar-corner,.race-standings::-webkit-scrollbar-corner{background:#102f2a}
@media(max-width:640px){
 .race-active .race-events{padding-right:10px}
 .race-active .race-standings{padding-right:12px}
 .race-events::-webkit-scrollbar,.race-standings::-webkit-scrollbar{width:9px;height:9px}
}

/* Compact support chooser shared by all game pages. */
.site-header .support-button{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;min-height:32px;padding:4px 10px;border:1px solid #e8d49b;border-radius:8px;background:#fff4cf;color:#68532c;font-size:11px;font-weight:700;line-height:1.4;white-space:nowrap}
.site-header .support-button:hover{background:#ffe9a8;border-color:#d6ba70}
.support-options{width:min(320px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;padding:18px;border:1px solid #e8d49b;border-radius:16px;background:#fffdf8;color:var(--ink);box-shadow:0 12px 48px #253c3826;font-family:var(--font)}
.support-options::backdrop{background:#253c381a}
.support-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.support-heading h2{margin:0;font-size:15px;line-height:1.5}
.support-close{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:8px;font-size:24px;line-height:1;color:#65795d}
.support-close:hover{background:var(--green)}
.support-options>p{margin:8px 0 16px;color:#65795d;font-size:12px;line-height:1.6}
.support-choices{display:grid;gap:10px}
.support-choice{display:flex;flex-direction:column;gap:5px;padding:13px 14px;border:1px solid var(--line);border-radius:10px;text-align:left;font-family:var(--font)}
.support-choice b{font-size:13px;line-height:1.5}
.support-choice>span{font-size:11px;line-height:1.5;color:#65795d}
.support-international{background:#eef4eb;border-color:#d7e2cf}
.support-international:hover{background:#e1eddb}
@media(max-width:640px){.site-header .support-button{min-height:30px;padding:3px 7px;font-size:10px}}

.site-header .support-button[hidden]{display:none}

/* Prepared language labels wrap without introducing horizontal scrolling. */
.language-control{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;max-width:144px;min-height:28px;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;padding:3px 5px;background:#fff;font-size:11px}
.language-select{border:0;background:transparent;color:var(--ink);width:110px;min-width:0;max-width:100%;padding:2px 0;cursor:pointer;font-size:11px}
html:not([lang="ko"]) .tab-label b{white-space:normal;overflow-wrap:anywhere;line-height:1.35}
html:not([lang="ko"]) .race-slot-role{min-width:0}html:not([lang="ko"]) .race-slot-role b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
html:not([lang="ko"]) .play-controls button{min-width:0;white-space:normal}html:not([lang="ko"]) .race-result-role{overflow-wrap:anywhere}
html:not([lang="ko"]) .game-guide,html:not([lang="ko"]) .info-article,html:not([lang="ko"]) .race-help-body{letter-spacing:normal;line-height:1.75}
@media(max-width:850px){.site-header nav{gap:8px;flex-wrap:wrap;justify-content:flex-end}.site-header{height:auto;min-height:76px;padding-top:12px;padding-bottom:12px}}
@media(max-width:600px){.site-header{flex-wrap:wrap;gap:10px}.site-header nav{flex:1 1 100%;margin-left:0;justify-content:flex-start;gap:7px}.language-select{width:110px}.site-header .share-button,.site-header .sound-button{padding:8px}.site-header .guide-link{font-size:11px}.game-tab{min-width:0}}

/* Let every revealed ladder result remain readable without an inner scroll area. */
.ladder-view .page .ladder-active .result-banner.ladder-results{display:grid;grid-template-columns:minmax(0,1fr);gap:7px;width:100%;min-width:0;max-height:none;overflow:visible;padding:9px;margin:0;align-items:stretch}
.ladder-view .page .ladder-active .result-banner.ladder-results[hidden]{display:none}
.ladder-results-heading{display:flex;align-items:center;gap:6px;font-size:12px;line-height:1.4}
.ladder-results-heading svg{width:16px;height:16px;flex:none}
.ladder-results-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;list-style:none;padding:0;margin:0;min-width:0}
.ladder-result-item{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:5px;min-width:0;padding:7px;border:1px solid var(--ladder-color,#e8e9df);border-radius:7px;background:var(--ladder-tint,#fff);color:var(--ink);font-size:12px;line-height:1.45}
.ladder-result-name,.ladder-result-value{min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.ladder-result-name{font-weight:700;color:var(--ladder-color,var(--ink))}
.ladder-result-value{font-weight:700;text-align:right}
@media(max-width:640px){.ladder-results-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.ladder-result-item{padding:6px;gap:4px;font-size:11px}.ladder-view .page .ladder-active .result-banner.ladder-results{padding:7px}}

/* The fullscreen replay controls own space throughout recording and completion. */
.race-fullscreen .race-display.has-race-replay{display:flex;flex-direction:column;gap:6px;padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
.race-fullscreen .race-display.has-race-replay .race-toolbar{position:static;flex:none;min-width:0;justify-content:flex-end;flex-wrap:wrap;padding:0}
.race-fullscreen .race-display.has-race-replay .game-stage{position:relative;inset:auto;flex:1 0 96px;min-width:0;min-height:96px;height:auto;width:100%;overflow:hidden}
.race-fullscreen .race-display.has-race-replay .race-view{position:absolute;inset:0;width:100%;height:100%}
.race-fullscreen .race-display.has-race-replay .race-standings{inset:0;min-width:0;min-height:0;max-height:none;margin:0;padding:8px;overflow:auto;overscroll-behavior:contain;scroll-padding-block:8px}
.race-fullscreen .race-display.has-race-replay .result-banner{position:static;flex:none;min-width:0;min-height:0;max-width:none;max-height:none;margin:0;padding:4px 8px;font-size:10px;overflow-wrap:anywhere}
.race-fullscreen .race-display.has-race-replay .play-controls{position:static;flex:none;min-width:0;width:100%;max-width:none;margin:0;flex-wrap:wrap;justify-content:flex-end}
.race-fullscreen .race-display.has-race-replay .race-replay-actions{position:static;flex:none;min-width:0;width:100%;max-width:100%;margin:0;padding:6px 8px}
.race-fullscreen .race-display.has-race-replay .replay-buttons{flex-wrap:nowrap;gap:6px}
.race-fullscreen .race-display.has-race-replay .replay-buttons button{flex:1 1 0;min-height:30px;padding:5px 8px;font-size:11px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.race-fullscreen .race-display.has-race-replay .race-replay-actions small{margin-top:4px;font-size:10px;line-height:1.3}
.race-fullscreen .race-display.has-race-replay .race-events{bottom:4px}
@media(max-width:900px),(pointer:coarse){
 .race-display:not(.has-race-results) .race-replay-actions{display:none!important}
}
@container race-display (max-height:480px){
 .race-fullscreen .race-results-heading{margin-bottom:5px}
 .race-fullscreen .race-result-list{gap:4px}
 .race-fullscreen .race-result-row{padding:5px 6px}
}

/* Marathon, ball conquest and chess/Gomoku share the first row. */
.page .game-picker{max-width:1200px;grid-template-columns:repeat(10,minmax(0,1fr))}#game-picker[hidden],.playground[hidden],.duel-host[hidden]{display:none!important}
.game-picker-toggle{display:block;margin:10px auto 0;padding:6px 16px;min-height:30px;border:1px solid var(--line);border-radius:8px;background:#f1f4e9;color:inherit;font-size:11px;cursor:pointer}
.game-picker-toggle[aria-expanded="false"]{margin-bottom:10px}
.duel-host{min-width:0;width:100%;margin:12px 0 24px}:where(.duel-host) .duel-title{font-size:32px;letter-spacing:-1px;line-height:1.3}
:where(.duel-host) .duel-score-table{overflow-x:auto}:where(.duel-host) .duel-score-table table{width:100%;border-collapse:collapse;text-align:center;font-size:11px}:where(.duel-host) .duel-score-table th,:where(.duel-host) .duel-score-table td{padding:8px;border:1px solid #e4e8db;white-space:nowrap}:where(.duel-host) .duel-score-table caption{text-align:left;font-weight:700;margin:8px 0}
@media(max-width:1050px){.page .game-picker{grid-template-columns:repeat(3,minmax(0,1fr));max-width:540px}}
@media(max-width:640px){.page .game-picker{grid-template-columns:repeat(3,minmax(0,1fr));max-width:460px}:where(.duel-host) .duel-title{font-size:26px}.game-picker-toggle{margin-top:5px;font-size:10px}}

/* Remove empty space between sections without tightening control gaps. */
.page{padding-bottom:8px}
.page .game-picker{margin-top:4px;margin-bottom:10px}
.game-guide{margin-top:10px;margin-bottom:10px}
.game-guide>summary{padding-top:10px;padding-bottom:10px}
.site-footer{padding-top:12px;padding-bottom:12px}
.duel-host{margin-top:0;margin-bottom:0}
.duel-host .duel-page{padding:0;max-width:none}
body.duel-view .page{padding-bottom:0}
@media(max-width:900px){
 body.duel-view{min-height:100dvh;overflow-x:hidden}
 body.duel-view .site-header{height:42px;min-height:42px;padding:4px 8px;gap:8px;flex-wrap:nowrap}
 body.duel-view .site-header .brand{font-size:18px;white-space:nowrap}
 body.duel-view .site-header .brand-symbol{width:28px;height:28px}
 body.duel-view .site-header nav{flex:0 1 auto;flex-wrap:nowrap;gap:6px;margin-left:auto}
 body.duel-view .site-header .guide-link,body.duel-view .site-header .sound-button,body.duel-view #share-site,body.duel-view .support-button{display:none}
 body.duel-view .language-control{margin:0;padding:0 3px;min-height:28px;height:28px;max-width:128px;font-size:10px}
 body.duel-view .language-select{font-size:10px;min-height:24px;height:24px;max-width:100px;padding:1px}
 body.duel-view .page{display:block;width:100%;max-width:none;height:auto;margin:0;padding:0 2px 6px;overflow:visible}
 body.duel-view .game-picker-toggle{height:28px;min-height:28px;font-size:10px;line-height:20px;padding:3px 10px;margin:4px auto}
 body.duel-view .game-picker-toggle[aria-expanded="false"]{margin-bottom:10px}
 body.duel-view .duel-host{height:auto;margin:0;width:100%;container-type:normal}
 body.duel-view>.game-guide{display:none}
}

.ball-host[hidden]{display:none!important}
.ball-host{margin:0 0 8px;min-width:0;width:100%}
:where(.ball-host) .ball-page{padding:0;max-width:none}
:where(.ball-host) #ball-conversion-rate{font-size:9px;color:#b3794b}
@media(max-width:900px){body.ball-view .page{padding-left:6px;padding-right:6px}}

/* Game buttons use their labels' natural widths with room above the scrollbar. */
.page #game-picker{display:flex;flex-direction:column;max-width:1200px;gap:6px;min-width:0}
#game-picker .game-picker-row{display:flex;gap:8px;min-width:0;width:100%;padding:4px 2px 16px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
#game-picker .game-tab{flex:0 0 auto;width:auto;min-width:max-content;max-width:none;grid-column:auto;height:auto;min-height:44px;padding:8px 12px}
#game-picker .tab-label,#game-picker .tab-label b{max-width:none;white-space:nowrap;overflow:visible;text-overflow:clip}
#game-picker [data-category="board"]{border-top:1px solid var(--line);padding-top:8px}
@media(max-width:640px){#game-picker .game-picker-row{gap:6px}#game-picker .game-tab{min-height:38px;padding:6px 10px}#game-picker .tab-label b{font-size:10px}}

/* Compact, upright shop labels sit on a shared baseline without hanging strings. */
#game-picker .game-picker-row{padding-top:13px;padding-bottom:10px;gap:8px}
#game-picker [data-category="board"]{padding-top:14px}
#game-picker .game-tab{overflow:visible;min-width:68px}
#game-picker .game-purpose-tag{--tag-paper:#ffe5cc;--tag-edge:#e7b990;--tag-ink:#885335;position:absolute;left:50%;top:-10px;z-index:4;display:flex;align-items:center;justify-content:center;min-height:16px;max-width:calc(100% - 6px);padding:2px 6px 2px 11px;border-radius:3px;background:var(--tag-paper);color:var(--tag-ink);box-shadow:inset 0 0 0 1px var(--tag-edge),0 1px 1px #735b3915;clip-path:polygon(5px 0,100% 0,100% 100%,5px 100%,0 50%);transform:translateX(-50%);font-size:8px;font-weight:700;line-height:1.4;letter-spacing:0;white-space:nowrap;pointer-events:none}
#game-picker .game-purpose-tag::after{content:'';position:absolute;left:4px;top:50%;width:3px;height:3px;transform:translateY(-50%);border-radius:50%;background:var(--bg);box-shadow:0 0 0 1px var(--tag-edge)}
#game-picker .game-purpose-tag>span{overflow:hidden;text-overflow:ellipsis}
#game-picker .purpose-score{--tag-paper:#ddeaf7;--tag-edge:#afc5dd;--tag-ink:#426184}
#game-picker .game-tab.active .game-purpose-tag{filter:saturate(1.15)}
@media(max-width:640px){#game-picker .game-picker-row{gap:6px;padding-top:12px}#game-picker [data-category="board"]{padding-top:13px}#game-picker .game-tab{min-width:64px}#game-picker .game-purpose-tag{font-size:8px;min-height:16px;top:-9px}#game-picker .tab-icon{overflow:hidden;border-radius:inherit}}

/* Desktop gives game buttons and their purpose tags a little more room. */
@media(min-width:901px){
 #game-picker .game-picker-row{padding-top:18px}
 #game-picker [data-category="board"]{padding-top:19px}
 #game-picker .game-tab{min-height:62px;padding:12px 18px}
 #game-picker .tab-label b{font-size:14px}
 #game-picker .tab-icon{width:40px;height:42px}
 #game-picker .tab-icon svg{width:34px;height:34px}
 #game-picker .game-purpose-tag{top:-13px;min-height:21px;padding:3px 9px 3px 14px;font-size:10px}
}

/* Keep the participant label and count separated when race actions are absent. */
.roster-layout:not(.race-active):not(.ladder-active) #participant-setup>.panel-heading{justify-content:flex-start;gap:10px}
.roster-layout:not(.race-active):not(.ladder-active) #people-count{flex-shrink:0;white-space:nowrap}
.roster-layout:not(.race-active):not(.ladder-active) .race-roster-actions{display:none}

/* A small country summary belongs only on the about page. */
.today-visitors{margin:18px 0 24px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:#f5f7ee}
.today-visitors>summary{font-size:13px;font-weight:700;cursor:pointer}
.visitor-rows{margin-top:8px}
.visitor-row{display:grid;grid-template-columns:130px minmax(0,1fr);align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--line);font-size:12px}
.visitor-row:last-child{border-bottom:0}
.visitor-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px;font-size:12px;color:#708476}
.visitor-summary strong{font-size:16px;color:var(--ink);font-variant-numeric:tabular-nums}
.info-article .visitor-countries{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
.visitor-countries li{display:flex;gap:8px;align-items:center;padding:4px 8px;border:1px solid #dfe6d6;border-radius:6px;background:white;font-size:12px;line-height:1.4}
.visitor-countries b{font-variant-numeric:tabular-nums;color:#3b6651}
.info-article .today-visitors p,.today-visitors small{font-size:11px;line-height:1.5;color:#708476;margin:8px 0 0}
.today-visitors small{display:block}
.today-visitors [hidden]{display:none!important}
@media(max-width:640px){.today-visitors{padding:12px}.visitor-row{grid-template-columns:100px minmax(0,1fr);gap:6px}.visitor-countries li{padding:3px 6px}}

/* Mobile keeps compact tabs, with each existing game icon behind its label. */
@media(max-width:640px){
 #game-picker .game-tab{position:relative;isolation:isolate;overflow:visible}
 #game-picker .tab-icon{display:grid;position:absolute;inset:0;place-items:center;width:auto;height:auto;opacity:.16;pointer-events:none;z-index:0}
 #game-picker .tab-icon svg{width:36px;height:36px;max-width:none;transform:rotate(-10deg);filter:blur(.3px)}
 #game-picker .tab-label{position:relative;z-index:1;text-shadow:0 1px 2px var(--paper),0 0 4px var(--paper)}
 #game-picker .game-tab.active .tab-icon{opacity:.2}
}

/* Recording readiness must not reserve a toolbar row in mobile fullscreen. */
@media(max-width:900px),(pointer:coarse){
 .race-fullscreen .race-timebar,.race-fullscreen .race-topbar,.race-fullscreen .game-heading{display:none!important}
 .race-fullscreen .race-display.has-race-replay:not(.has-race-results){display:block;gap:0;padding:0;overflow:hidden}
 .race-fullscreen .race-display.has-race-replay:not(.has-race-results) .race-toolbar{position:absolute;top:max(6px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));left:auto;padding:0;gap:6px;background:none}
 .race-fullscreen .race-display.has-race-replay:not(.has-race-results) .game-stage{position:absolute;inset:0;flex:none;width:100%;height:100%;min-height:0;margin:0}
 .race-fullscreen .race-display.has-race-replay:not(.has-race-results) .play-controls{position:absolute;bottom:max(8px,env(safe-area-inset-bottom));right:max(8px,env(safe-area-inset-right));width:auto;max-width:calc(100% - 16px);margin:0;gap:6px}
 .race-fullscreen .race-display.has-race-replay:not(.has-race-results) .race-events{bottom:46px}
 .race-active .race-fullscreen .race-canvas{object-position:center top}
}

.gear-host{width:100%;min-width:0;padding:14px 16px 18px;border:1px solid #d7dfd1;border-radius:14px;background:#fbfaf5}.gear-host[hidden]{display:none}.gear-view .page{min-width:0}.gear-view #game-picker{margin-bottom:14px}@media(max-width:640px){.gear-host{padding:8px 6px 10px;border-radius:10px}.gear-view #game-picker{margin-bottom:10px}}

html:has(body.gear-view){scrollbar-width:thin;scrollbar-color:#9d8251 #10252c}html:has(body.gear-view)::-webkit-scrollbar{width:10px;height:10px}html:has(body.gear-view)::-webkit-scrollbar-track{background:#10252c;border:1px solid #344b4c}html:has(body.gear-view)::-webkit-scrollbar-thumb{background:linear-gradient(90deg,#725d3d,#ae925e);border:2px solid #10252c;border-radius:2px}html:has(body.gear-view)::-webkit-scrollbar-thumb:hover{background:#c1a46c}

/* Desktop random games keep participant setup visible without an inner scrollbar. */
@media(min-width:641px){
 .page>.playground.compact-roster>.setup-panel{max-height:none;overflow:visible;padding:12px 18px;gap:12px}
 .compact-roster #participant-setup>.panel-heading{margin-bottom:8px}
 .compact-roster #people-list{gap:6px}
 .compact-roster .person-chip{padding:5px 6px}
 .compact-roster .person-name{font-size:11px;line-height:18px}
 .compact-roster #participant-limit-note{margin-top:6px;line-height:15px}
 .compact-roster #add-form{height:34px;margin-top:8px}
 .compact-roster .list-actions{margin-top:5px}
 .page>.playground.compact-random-stage{height:clamp(660px,calc(100dvh - 220px),780px);min-height:660px}
 .page>.playground.compact-random-stage>.game-panel:not(.race-fullscreen){padding:10px 16px}
 .page>.playground.compact-random-stage>.game-panel:not(.race-fullscreen)>.race-display{gap:8px}
 .compact-random-stage .draw-grid{grid-template-columns:repeat(6,minmax(0,1fr));padding:12px;gap:8px}
 .compact-random-stage .draw-card{height:100px;padding:8px;gap:6px}
 .compact-random-stage .draw-card .card-pattern{width:28px;height:35px;font-size:16px}
 .compact-random-stage .dice-battle-stage .dice-board{grid-template-columns:repeat(4,minmax(0,1fr));padding:8px;gap:6px}
 .compact-random-stage .dice-battle-stage .dice-player{padding:6px 4px}
 .compact-random-stage .dice-battle-stage .dice-player>b{font-size:10px;line-height:14px}
 .compact-random-stage .dice-battle-stage .dice-pair{margin:4px 0;gap:5px}
 .compact-random-stage .dice-battle-stage .die{width:24px;height:24px;padding:4px}
 .compact-random-stage .dice-battle-stage .dice-total{font-size:9px;line-height:12px}
}


/* Numbered coin: one-third shorter frame with a continuous, result-aligned toss. */
.coin-only .coin-art-stage{min-height:0;background:radial-gradient(ellipse at 50% 45%,#fff1cd88,transparent 63%)}
.coin-only .coin-art-halo{width:214px;height:214px;border-color:#dcb96633;box-shadow:0 0 0 15px #efd8a214}
.coin-only .coin-art-shadow{top:calc(50% + 62px);width:126px;height:14px;background:#8b61252b;filter:blur(8px)}
.coin-only .coin-art-edge{inset:7%;background:repeating-conic-gradient(#a46d20 0deg 3deg,#ebc46a 3deg 5deg);box-shadow:none}
.coin-only .coin-art-face{border-radius:0;overflow:hidden;-webkit-backface-visibility:hidden;backface-visibility:hidden}
.coin-art-face .coin-number-atlas{position:absolute;left:0;top:0;width:200%;height:100%;max-width:none;object-fit:fill;pointer-events:none}
.coin-art-back .coin-number-atlas{left:-100%}
.coin-only .coin-art-caption{bottom:14px;font-size:12px;line-height:20px;letter-spacing:0;color:#8b743f}
.coin-art-caption b{font-size:18px;color:#a87a2f}.coin-art-caption i{font-style:normal;padding:0 9px;color:#bdad89}
.coin-only .coin-art.flipping{animation:coin-number-flip 1.8s cubic-bezier(.12,.55,.25,1) both;will-change:transform}
.coin-only .coin-art-toss.tossing{animation:coin-number-flight 1.8s ease-in-out both;will-change:transform}
.coin-art-shadow.tossing{animation:coin-number-shadow 1.8s ease-in-out both}
.coin-art-stage.is-landed .coin-art-halo{animation:coin-number-land .6s ease-out both}
@keyframes coin-number-flip{0%{transform:rotateX(12deg) rotateY(0deg) rotateZ(-8deg)}100%{transform:rotateX(12deg) rotateY(var(--coin-end,1440deg)) rotateZ(-8deg)}}
@keyframes coin-number-flight{0%{transform:translateY(0) scale(1)}30%{transform:translateY(-32px) scale(.88)}72%{transform:translateY(4px) scale(1)}86%{transform:translateY(-6px) scale(.98)}100%{transform:translateY(0) scale(1)}}
@keyframes coin-number-shadow{0%,100%{transform:scale(1);opacity:1}30%{transform:scale(.6);opacity:.35}72%{transform:scale(1.05);opacity:.9}}
@keyframes coin-number-land{0%{transform:scale(.8);opacity:.8}100%{transform:scale(1.15);opacity:0}}
@media(min-width:641px){.page>.playground.coin-only{height:clamp(480px,calc(66.667dvh - 120px),560px);min-height:480px}.page .coin-only .game-panel:not(.race-fullscreen) .game-stage{overflow:hidden}}
@media(max-width:640px){.coin-only .game-stage{height:200px;min-height:200px;overflow:hidden}.coin-only .coin-art,.coin-only .coin-art-toss{width:140px;height:140px}.coin-only .coin-art-halo{width:172px;height:172px}.coin-only .coin-art-shadow{top:calc(50% + 48px);width:100px;height:12px}.coin-only .coin-art-caption{bottom:8px;font-size:11px}.coin-only .coin-art-toss{margin-top:-12px}}
@media(prefers-reduced-motion:reduce){.coin-only .coin-art.flipping,.coin-only .coin-art-toss.tossing,.coin-art-shadow.tossing,.coin-art-stage.is-landed .coin-art-halo{animation:none}.coin-only .coin-art.flipping{transform:rotateX(12deg) rotateY(var(--coin-end,1440deg)) rotateZ(-8deg)}}

/* Material economy game follows the common picker edges without a second padded frame. */
.gear-view .gear-host{padding:0;border:0;border-radius:0;background:transparent}
.gear-view #game-picker{margin-bottom:8px}
@media(max-width:640px){.gear-view .gear-host{padding:0}.gear-view #game-picker{margin-bottom:6px}}

.dungeon-host{width:100%;max-width:520px;min-width:min(320px,100%);height:clamp(640px,calc(100svh - 140px),740px);min-height:640px;max-height:740px;margin:18px auto 24px;background:#111917;border-radius:4px;overflow:hidden;color:#e5e8da}.dungeon-host[hidden]{display:none}.dungeon-host>p{text-align:center;padding:48px 15px}.dungeon-view .page{min-width:0}@media(max-width:600px){.dungeon-view .page{padding-inline:8px}.dungeon-host{margin-top:10px}}

/* Center the dungeon frame independently of other game layouts. */
.page>#dungeon-game{width:min(100%,520px);max-width:520px;margin-inline:auto;align-self:center;justify-self:center;float:none}

.backroom-launch{text-decoration:none;color:inherit}.backroom-launch:focus-visible{outline:2px solid currentColor;outline-offset:3px}
