:root{--bg:#111;--panel:#1a1a1a;--text:#eee;--muted:#9ca3af;--red:#e11d48;--light:#f5f5f4;--dark:#7c3e0a}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.4 system-ui,Segoe UI,Roboto,Arial}.app-shell{max-width:860px;margin:0 auto;padding:16px}.topbar{display:flex;justify-content:space-between;align-items:center;margin:8px 0 16px}.topbar h1{margin:0;font-size:24px}.controls select{margin-left:8px}.board-wrap{display:flex;flex-direction:column;align-items:center;gap:8px}.score{display:flex;align-items:center;gap:10px;color:var(--muted)}.dot{display:inline-block;width:10px;height:10px;border-radius:999px}.dot.red{background:var(--red)}.dot.black{background:#222;border:1px solid #555}.turn{margin-left:16px}.board{display:grid;grid-template-rows:repeat(8,1fr);width:min(90vw,640px);aspect-ratio:1;border:6px solid #333;border-radius:8px;overflow:hidden;box-shadow:0 8px 30px #00000059}.row{display:grid;grid-template-columns:repeat(8,1fr)}.sq{position:relative;width:100%;padding-top:100%}.sq.light{background:var(--light)}.sq.dark{background:var(--dark)}.sq.can-select{outline:2px solid rgba(255,255,255,.2)}.sq.selected{outline:3px solid #38bdf8}.sq.dest{box-shadow:inset 0 0 0 3px #38bdf8cc}.piece{position:absolute;top:10%;right:10%;bottom:10%;left:10%;border-radius:999px;box-shadow:inset 0 6px #ffffff26,inset 0 -6px #00000040,0 4px 10px #0006}.piece.red{background:var(--red)}.piece.black{background:#222}.piece.king{outline:4px double gold}.hint{color:var(--muted);font-size:12px}.footer{margin-top:20px;color:var(--muted);text-align:center}.win-popup{position:fixed;top:0;left:0;width:100vw;height:100vh;background:#000000b3;display:flex;align-items:center;justify-content:center;z-index:1000}.win-popup>div{background:#222;padding:2em;border-radius:12px;box-shadow:0 4px 32px #000;color:#fff;min-width:320px;max-width:90vw}.win-popup h2{color:#2a2;font-size:2em;margin-bottom:.5em}.win-popup button{margin-top:1em;padding:.5em 1.5em;font-size:1em;border-radius:6px;background:#38bdf8;color:#222;border:none;cursor:pointer}
