:root{--bg: #17110c;--panel: #241a12;--line: #4a3726;--ink: #f3e8d6;--muted: #bda98e;--gold: #e4ae47;--light: #e8d6b3;--dark: #70472a;--ivory: #f6ecd9;--ivory-rim: #cdb890;--ebony: #2c211b;--ebony-rim: #6f5a49;color-scheme:dark}*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,PingFang SC,Microsoft YaHei,sans-serif;-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;min-height:44px;padding:8px 14px;border-radius:10px;border:1px solid var(--line);background:var(--panel)}button:hover:not(:disabled){border-color:var(--gold)}button:focus-visible{outline:2px solid var(--gold);outline-offset:2px}button:disabled{opacity:.4;cursor:default}button.primary{background:var(--gold);border-color:var(--gold);color:#2a1c0d;font-weight:800}#menu{max-width:440px;margin:0 auto;padding:48px 20px 28px;display:flex;flex-direction:column;gap:20px}#menu h1{margin:0;font-size:36px;letter-spacing:6px;color:var(--gold)}#menu .tag{margin:4px 0 0;color:var(--muted)}.field h2{margin:0 0 8px;font-size:15px;color:var(--muted);font-weight:600}.choice{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:8px}.choice.big button{min-height:68px;font-size:17px;font-weight:700}.choice.big small{display:block;margin-top:2px;font-size:12px;font-weight:400;color:var(--muted)}.choice button[aria-pressed=true]{border-color:var(--gold);background:#3b2a15;color:var(--gold);font-weight:700}.stack{display:flex;flex-direction:column;gap:10px}.foot{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:13px}.foot button{min-height:40px}#play{display:grid;gap:10px;padding:10px;max-width:560px;margin:0 auto}.top{display:flex;align-items:center;justify-content:space-between;gap:8px}#status{margin:0;font-size:17px;font-weight:700;min-height:24px}#level{font-size:13px;color:var(--muted);white-space:nowrap}#board{display:block;width:100%;height:auto;border-radius:8px;border:3px solid #3c2615;touch-action:manipulation;-moz-user-select:none;user-select:none;-webkit-user-select:none}.counts{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;font-size:14px;color:var(--muted)}.counts i{display:inline-block;width:10px;height:10px;margin-right:5px;border-radius:50%}#notes{display:flex;gap:12px;margin:0;padding:6px 2px;list-style:none;overflow-x:auto;white-space:nowrap;font-size:13px;font-variant-numeric:tabular-nums;color:var(--muted);min-height:30px}.bar{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.bar button{padding:8px 4px}#flash{position:fixed;left:50%;top:14px;transform:translate(-50%);background:#5c2a1b;border:1px solid #c8703f;padding:8px 14px;border-radius:10px;z-index:5}#choices{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px;border:1px solid var(--gold);border-radius:10px;background:var(--panel)}#choices p{margin:0;width:100%}#board.star{border:none;border-radius:0}.star-bg{fill:#5a3a22;stroke:#5a3a22;stroke-width:74;stroke-linejoin:round}.hole{fill:#2c1c10;stroke:#7c5a3c;stroke-width:3}.move-line{fill:none;stroke-width:5;stroke-linejoin:round;stroke-linecap:round;opacity:.75}.marble-body{stroke:#00000073;stroke-width:2}.marble-shine{fill:#ffffff73}.marble.selected .marble-body{stroke:#fff;stroke-width:6}.marble.lifted{filter:drop-shadow(0 6px 5px rgb(0 0 0 / .5))}.light{fill:var(--light)}.dark{fill:var(--dark)}.num{font-size:17px;fill:#e8d6b3;opacity:.55;pointer-events:none}.trail{fill:var(--gold);opacity:.22}.trail-line{fill:none;stroke:var(--gold);stroke-width:5;stroke-linejoin:round;opacity:.8}.piece .body{stroke-width:3}.piece.white .body{fill:var(--ivory);stroke:#8d7650}.piece.white .rim{fill:none;stroke:var(--ivory-rim);stroke-width:3}.piece.white .crown{fill:#b37a1e}.piece.black .body{fill:var(--ebony);stroke:#0e0a08}.piece.black .rim{fill:none;stroke:var(--ebony-rim);stroke-width:3}.piece.black .crown{fill:var(--gold)}.piece.selected .body{stroke:#ffd257;stroke-width:8}.piece.must .body{stroke:#ff8a4c;stroke-width:7}.piece.can .rim{stroke:#ffd98a}.piece.lifted{filter:drop-shadow(0 8px 6px rgb(0 0 0 / .5))}.piece.gone{opacity:.25}.dest{fill:#7be495;stroke:#1d5c33;stroke-width:3}.doomed{fill:none;stroke:#ff5a4c;stroke-width:5;stroke-dasharray:10 8}.hit{fill:transparent;cursor:pointer}dialog{border:1px solid var(--gold);border-radius:14px;background:var(--panel);color:var(--ink);width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:20px}dialog::backdrop{background:#0009}dialog h2{margin:0 0 8px;color:var(--gold)}dialog p{margin:6px 0}dialog ul{margin:8px 0;padding-left:20px;line-height:1.6}dialog .row{display:flex;gap:8px;margin-top:14px}dialog .row button{flex:1}@media(min-width:960px){#play{max-width:1060px;grid-template-columns:minmax(0,1fr) 300px;grid-template-areas:"top top" "board side";align-items:start}.top{grid-area:top}.board-wrap{grid-area:board;max-width:calc(100dvh - 90px)}.side{grid-area:side;display:flex;flex-direction:column;gap:10px}#notes{flex-direction:column;gap:2px;overflow:auto;max-height:46dvh}.bar{grid-template-columns:repeat(2,1fr)}}@media(max-width:959px){.side{display:flex;flex-direction:column;gap:8px}}
