:root { color-scheme: dark; font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; background: #111216; color: #eceef4; --muted: #9599a8; --line: #30333e; --accent: #a8b9f5; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 760px; margin: 0 auto; padding: 32px 28px 24px; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
h1 { font-size: 27px; font-weight: 650; letter-spacing: -1px; margin: 0; } h1 span { color: var(--accent); }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); border-radius: 7px; background: #1c1f27; padding: 10px 16px; font-size: 13px; }
button:hover { background: #292e3b; } button:disabled { opacity: .4; cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible, canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
nav { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; gap: 3px; }
nav button { background: transparent; border: 0; color: var(--muted); padding: 8px 16px; }
nav button[aria-pressed="true"] { background: var(--accent); color: #151c32; }
.toolbar { display: flex; justify-content: center; align-items: center; gap: 22px; margin-bottom: 24px; font-size: 12px; color: var(--muted); min-height: 34px; flex-wrap: wrap; }
select { border: 0; border-bottom: 1px solid var(--line); background: #111216; font-size: 12px; padding: 7px 0; margin-left: 8px; cursor: pointer; }
.toggle { display: flex; align-items: center; gap: 7px; color: #c7cad5; cursor: pointer; } input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }
.boards { display: flex; justify-content: center; gap: 28px; }
.board-panel { width: min(300px, max(200px, calc((100svh - 310px) / 2))); min-width: 0; }
.board-heading { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
h2 { margin: 0; font-size: 12px; font-weight: 500; color: #c7cad5; }
strong { font-size: 23px; color: #eceef4; font-weight: 500; font-variant-numeric: tabular-nums; }
.board-wrap { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #17191f; box-shadow: 0 12px 36px #00000025, inset 0 1px 0 #ffffff04; }
canvas { display: block; width: 100%; height: auto; aspect-ratio: 1 / 2; touch-action: manipulation; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: #111216c4; pointer-events: none; font-size: 18px; letter-spacing: -.4px; }
.board-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
#restart { background: var(--accent); border-color: var(--accent); color: #151c32; } #restart:hover { background: #c2cff9; } #restart span { margin-left: 16px; }
.touch-controls { display: flex; justify-content: center; gap: 6px; margin-top: 20px; } .touch-controls button { padding: 10px 12px; }
.keys, .note { text-align: center; color: var(--muted); font-size: 11px; margin: 16px 0 0; line-height: 1.8; } .keys span { margin-left: 13px; }
[hidden] { display: none !important; }
.game-footer { margin-top: 24px; text-align: center; }
.game-footer a { font-size: 11px; color: var(--muted); text-decoration: none; }
.game-footer a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 520px) { main { padding: 22px 16px; } header { margin-bottom: 20px; } .toolbar { gap: 16px; } .boards { gap: 12px; } nav button { padding: 8px 12px; } .keys span { margin-left: 8px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
