* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: #555; font: 12px monospace; }
main { width: 100%; margin: 0 auto; }
nav, footer, #best { display: none; }
#ds-container { position: relative; margin: auto; width: min(98vw, calc(100svh - 36px), 980px); aspect-ratio: 1; background: url('assets/ds_lite.jpg') center / contain no-repeat; }
canvas { position: absolute; left: 27.5%; width: 45%; background: #000; border-radius: 3px; image-rendering: pixelated; }
#topScreen { top: 7.4%; }
#touchCanvas { top: 58.2%; touch-action: none; cursor: url('assets/ds_stylus.cur'), pointer; }
#overlay { position: absolute; left: 27.5%; top: 7.4%; width: 45%; aspect-ratio: 4/3; pointer-events: none; }
#overlay[hidden] { display: none; }
#overlay h1, #overlay p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
button { cursor: pointer; font: inherit; }
#start { position: absolute; left: 22%; top: 84%; width: 56%; height: 14%; padding: 0; background: transparent; border: 0; color: transparent; pointer-events: auto; }
button:focus-visible, a:focus-visible { outline: 2px solid #cc9c3c; outline-offset: 2px; }
.controls { display: flex; justify-content: center; align-items: center; gap: 14px; height: 30px; }
#sound { background: none; border: 0; color: #666; padding: 4px 8px; font-size: 11px; }
#pause, #rules { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border: 0; border-radius: 50%; clip-path: circle(50%); background: transparent; color: transparent; padding: 0; }
#pause { left: 79.8%; top: 86.6%; width: 6%; }
#rules { left: 92.1%; top: 68.9%; width: 8%; }
#pause:enabled:hover, #rules:enabled:hover, #pause:focus-visible, #rules:focus-visible { background: radial-gradient(circle, #ffffff38 20%, #ffffff20 45%, #ffffff00 72%); }
#pause:focus-visible, #rules:focus-visible { outline-offset: -3px; }
#pause:disabled { cursor: default; }
.home { color: #888; text-decoration: none; font-size: 11px; }
#status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 520px) {
    #ds-container { width: min(100vw, calc(100svh - 36px)); }
}

#replayControls { position: absolute; left: 27.5%; top: 58.2%; width: 45%; aspect-ratio: 4/3; pointer-events: none; }
#replayControls[hidden] { display: none; }
#again, #quit { position: absolute; left: 24.21875%; width: 51.5625%; height: 21.35417%; padding: 0; background: transparent; border: 0; color: transparent; pointer-events: auto; }
#again { top: 27.60417%; }
#quit { top: 55.72917%; }
