* { box-sizing: border-box }
body { margin: 0; overflow: hidden; color: #faf9f6; background: #424a43; font: 14px/1.4 system-ui, sans-serif }
#stage { position: fixed; inset: 0 }
canvas { display: block; width: 100%; height: 100%; touch-action: none }
header, aside, #hint { position: fixed; pointer-events: none; text-shadow: 0 1px 5px #151915 }
header { top: 22px; left: 26px }
h1 { margin: 0; font: normal clamp(28px, 3vw, 40px)/1.12 Georgia, serif; letter-spacing: -.035em }
header span, #hint { font-size: 12px }
aside { top: 25px; right: 26px; display: grid; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums }
aside b { font-weight: 600; letter-spacing: .06em }
footer { position: fixed; bottom: 38px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; max-width: calc(100% - 16px); padding: 8px 10px; background: #202521f2; border: 1px solid #ffffff38; border-radius: 5px }
label { display: flex; align-items: center; gap: 8px; color: #c9ccc7; font-size: 12px; min-width: 0 }
select, button { font: inherit; cursor: pointer; border: 0; color: inherit; border-radius: 2px }
select { min-width: 0; background: #202521; color: white; padding: 6px 0 }
.buttons { display: flex; border-left: 1px solid #ffffff3d; padding-left: 9px }
button { padding: 6px 10px; background: transparent }
.buttons button[aria-pressed=true], #pad button { color: #202521; background: #efeee7 }
:focus-visible { outline: 2px solid #9bbcff; outline-offset: 2px }
#hint { bottom: 10px; width: 100%; text-align: center }
#loading { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #202521; padding: 12px 18px; border-radius: 3px }
#pad { position: fixed; bottom: 100px; left: 14px; touch-action: none }
#pad button { margin: 1px }
@media (max-width: 600px) {
  header { top: 14px; left: 16px }
  aside { top: 16px; right: 16px }
  footer { gap: 6px; width: max-content }
  .buttons button { padding: 6px 8px }
}
