:root{color-scheme:light dark;font-family:system-ui,-apple-system,Segoe UI,sans-serif;--bg: #14161c;--surface: #1e212b;--surface-2: #2a2e3a;--text: #eef1f6;--muted: #9aa1b0;--accent: #8fb3f0;--on-accent: #101319;--good: #7fd19b;--bad: #e8837f;--gold: #f0c75e}@media (prefers-color-scheme: light){:root{--bg: #f5f3ee;--surface: #ffffff;--surface-2: #e9e6de;--text: #1c1f26;--muted: #5b6270;--accent: #3b6fc4;--on-accent: #ffffff;--good: #2f8f5b;--bad: #c14f3f;--gold: #9c6f08}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}#root{min-height:100dvh}button{font:inherit;cursor:pointer;border:none;border-radius:8px;padding:.5em 1em;background:var(--surface-2);color:var(--text)}button.primary{background:var(--accent);color:var(--on-accent);font-weight:600}button.ghost{background:transparent;border:1px solid var(--surface-2)}button:disabled,button.primary:disabled,button.ghost:disabled{opacity:1;cursor:not-allowed;background:var(--surface-2);color:var(--muted);border-color:var(--surface-2);font-weight:400}input,select,textarea{font:inherit;width:100%;padding:.6em;border-radius:8px;border:1px solid var(--surface-2);background:var(--surface);color:var(--text)}label{display:flex;flex-direction:column;gap:.3em;margin:.8em 0}.centered{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.5rem;text-align:center;gap:1rem}.hand-app,.board-app{display:flex;flex-direction:column;min-height:100dvh}.hand-app{padding:1.25rem;max-width:480px;margin:0 auto}.board-app{padding:.6rem .8rem;height:100dvh;overflow:hidden}.board-header{display:flex;align-items:flex-start;gap:1rem;margin-bottom:.5rem}.board-header .rules{flex:0 1 auto;margin:0;padding:.35em .8em}.board-header .rules-content{max-height:60vh;overflow:auto}.board-header .room-bar{flex:1;margin:0;gap:1rem;padding-top:.35em}.rules{margin-bottom:1rem;background:var(--surface);border-radius:8px;padding:.7em 1em}.rules>summary{cursor:pointer;font-weight:600}.rules-content{margin-top:.8em}.rules-content h3{margin:.8em 0 .3em;font-size:1em}.rules-content ol,.rules-content ul{margin:.3em 0;padding-left:1.4em}.rules-content li{margin:.3em 0}.history-box{margin-top:1em;background:var(--surface-2);border-radius:8px;padding:.6em .9em}.history-box>summary{cursor:pointer;font-weight:600}.history-box p{margin:.6em 0}.history-box .sources{color:var(--muted);font-size:.85em}.error{color:var(--bad)}.hint{color:var(--muted)}.privacy-note{font-size:.8em;margin:.3em 0 0}.name-form{display:flex;flex-direction:column}.room-bar{display:flex;align-items:center;justify-content:space-between;color:var(--muted);margin-bottom:1.5rem;font-size:.9em}.build-id{font-family:monospace;opacity:.4;font-size:.8em}.lobby{display:flex;gap:2rem;flex-wrap:wrap}.hand-app .lobby{flex-direction:column}.lobby-players{flex:1;min-width:280px}.lobby-players ol{list-style:none;padding:0;display:flex;flex-direction:column;gap:.5em}.lobby-players li{display:flex;align-items:center;gap:.5em;background:var(--surface);padding:.5em .8em;border-radius:8px}.lobby-players .name{flex:1}.bot-badge{margin-left:.5em;font-size:.7em;font-weight:700;text-transform:uppercase;color:var(--muted);background:var(--surface-2);border-radius:999px;padding:.15em .5em;vertical-align:middle}.dot{width:.6em;height:.6em;border-radius:50%;flex-shrink:0}.dot.online{background:var(--good)}.dot.offline{background:var(--bad)}.qr-panel{display:flex;flex-direction:column;align-items:center;gap:.8em;background:var(--surface);padding:1.5rem;border-radius:12px}.qr-panel img{border-radius:8px;background:#fff;padding:8px}.qr-fallback{color:var(--muted);text-align:center;font-size:.9em;word-break:break-all}.qr-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:50}.qr-overlay-content{position:relative;max-height:90vh;overflow-y:auto;display:flex;flex-direction:column;align-items:center;gap:1rem}.reclaim-panel{background:var(--surface);padding:1.2rem 1.5rem;border-radius:12px;width:100%;max-width:320px}.reclaim-panel h3{margin:0 0 .4rem}.reclaim-panel ul{list-style:none;margin:.6rem 0 0;padding:0;display:flex;flex-direction:column;gap:.5rem}.reclaim-qr{display:flex;flex-direction:column;align-items:center;gap:.6em;text-align:center}.reclaim-qr img{border-radius:8px;background:#fff;padding:8px}.qr-overlay-close{position:absolute;top:-.6em;right:-.6em;border-radius:999px;width:2em;height:2em;padding:0;line-height:1}.room-form{display:flex;flex-direction:column;gap:.8em;width:100%;max-width:360px}.room-form .divider{color:var(--muted);text-align:center;font-size:.9em;margin:.4em 0}.table-panel{margin-top:1.5rem;border-top:1px solid var(--surface-2);padding-top:.8rem}.table-panel>summary{cursor:pointer;color:var(--muted);font-size:.9em;margin-bottom:.6em}.horse-token{display:inline-flex;align-items:center;justify-content:center;gap:.3em;border-radius:999px;color:#14161c;border:1px solid rgba(0,0,0,.15);font-weight:700;padding:0 .4em;vertical-align:middle;white-space:nowrap}.horse-token-label{font-size:.6em;font-weight:700}.horse-order{display:flex;justify-content:center;gap:.6em;margin:.4em 0 .8em}.horse-order-item{display:flex;flex-direction:column;align-items:center;gap:.15em}.horse-order-token{display:flex;align-items:center;justify-content:center;width:2.4em;height:2.4em;border-radius:999px;border:1px solid rgba(0,0,0,.15);color:#14161c;font-weight:700;font-size:1em}.horse-order-pos{font-size:.7em;color:var(--muted)}.betting-panel,.bet-status{background:var(--surface);border-radius:12px;padding:1em;margin:.8em 0}.bet-label{color:var(--muted);margin:.8em 0 .3em;font-size:.9em}.horse-picker{display:flex;flex-wrap:wrap;gap:.5em}.horse-choice{border:2px solid transparent;background:var(--surface-2)}.horse-choice.selected{border-color:var(--accent)}.bet-status-row{display:flex;justify-content:space-between;gap:1em;flex-wrap:wrap}.bet-hint{margin-top:.6em;padding:.5em .8em;border-radius:8px;font-size:.92em}.bet-hint.good{background:#7fd19b26;color:var(--good)}.bet-hint.attention{background:#f0c75e26;color:var(--gold)}.turn-panel{display:flex;flex-direction:column;gap:.6em}.turn-indicator{font-weight:700;font-size:1.05em;text-align:center;background:var(--surface);border-radius:8px;padding:.5em;margin:0}.turn-indicator.my-turn{background:var(--accent);color:var(--on-accent)}.hand-cards{background:var(--surface);border-radius:12px;padding:1em}.card-row{display:flex;flex-wrap:wrap;gap:.5em}.card-chip{border:2px solid transparent;border-radius:8px;padding:.5em .4em;font-weight:700;width:4.7em;text-align:center;color:#24282f}.card-chip.neutral{background:#f1f1ef}.card-chip.positional{font-style:italic}.card-chip.selected{border-color:var(--accent)}.card-chip.mini{display:inline-block;width:auto;min-width:3.2em;padding:.2em .5em;font-size:.9em;vertical-align:middle}.card-preview{margin-top:1em;padding-top:1em;border-top:1px solid var(--surface-2)}.effect-preview{font-size:1.05em;font-weight:600;background:var(--surface-2);border-radius:8px;padding:.6em .8em;margin:.6em 0}.card-preview-actions{display:flex;gap:.6em;justify-content:flex-end}.ring-track{position:relative;flex:1;min-height:0;width:100%}.ring-track-svg{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%}.track-cell circle{fill:var(--surface);stroke:var(--muted);stroke-width:1.5}.track-cell text{fill:var(--text)}.track-gate{fill:none;stroke:var(--muted);stroke-width:1.5;stroke-dasharray:5 4}.track-horse circle{filter:drop-shadow(0 1px 3px rgba(0,0,0,.4))}.track-horse-hint{fill:var(--muted);font-weight:500;opacity:.85}.track-horse{transition:transform .18s linear}.ring-track-center{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:.6em;padding:.6em;overflow:hidden}.ring-track-center .standings-panel{margin:0;min-width:min(340px,100%)}.ring-track-center .turn-indicator{margin:0}.ring-track-center .last-play{margin:0;background:transparent;padding:0}.last-play{background:var(--surface);border-radius:12px;padding:.8em 1em;margin-top:1em;display:flex;flex-direction:column;gap:.5em;width:100%}.last-play-row{display:flex;align-items:center;gap:.6em;color:var(--muted)}.last-play-row.latest{color:var(--text);font-weight:700}.last-play-name{flex:0 0 auto;min-width:4.5em;text-align:right}.last-play-effect{flex:1;text-align:left}.race-over-panel,.game-over{background:var(--surface);border-radius:12px;padding:1.5em}.finish-line{font-size:1.1em;margin:.6em 0 1em}.results-table{width:100%;border-collapse:collapse;margin-bottom:1em}.results-table th,.results-table td{text-align:left;padding:.4em .6em;border-bottom:1px solid var(--surface-2)}.standings-panel{background:var(--surface);border-radius:12px;padding:.8em 1em;margin:.8em 0}.standings-panel h3{margin:0 0 .4em;font-size:.95em;color:var(--muted)}.standings{list-style:none;padding:0;display:flex;flex-direction:column;gap:.3em;margin:.5em 0 1.2em}.standings li{display:flex;gap:.8em}.standings li .name{flex:1;text-align:left}.game-over .winner{font-size:1.3em;font-weight:700;color:var(--gold)}.final-scores{list-style:none;padding:0;display:flex;flex-direction:column;gap:.4em;margin-top:1em}.final-scores li{display:flex;align-items:center;gap:.8em;background:var(--surface-2);padding:.5em .8em;border-radius:8px}.final-scores .name{flex:1}
