:root {
  color-scheme: light;
  font-family: "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: #213e38;
  background: #f2eee2;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: grid; justify-items: center; }
main { width: min(100%, 450px); padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
header span { color: #376258; font-size: .75rem; font-weight: 800; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#music { min-height: 32px; padding: 4px 9px; background: #fffdf5; box-shadow: inset 0 0 0 1px #d9decb; font-size: .72rem; }
h1 { font-size: clamp(1.25rem, 5.8vw, 1.8rem); margin: 2px 0 8px; }
.hud { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; padding: 7px 12px; background: #fffdf5; border: 1px solid #dedbcd; border-radius: 10px; font-size: .8rem; margin-bottom: 7px; }
.hud label { display: flex; justify-content: space-between; }
.hud div:last-child { text-align: right; }
.hud b { font-variant-numeric: tabular-nums; }
meter { width: 100%; height: 13px; }
.viewport { position: relative; overflow: hidden; border: 3px solid #294940; border-radius: 14px; background: #36534a; box-shadow: 0 5px 13px #29494022; }
canvas { display: block; width: 100%; height: min(65dvh, 540px); object-fit: fill; }
.panel { position: absolute; inset: 0; display: grid; align-content: center; align-content: safe center; justify-items: center; gap: 12px; text-align: center; padding: 22px; color: #fff8e8; background: linear-gradient(155deg, #214c43df, #152f3beb); overflow: auto; }
.panel h2, .panel p { margin: 0; }
.panel h2 { font-size: clamp(1.2rem, 5vw, 1.55rem); }
.panel p { font-size: .9rem; line-height: 1.65; white-space: pre-line; }
button { border: 0; border-radius: 9px; background: #ffc968; color: #273d32; font: inherit; font-weight: 800; cursor: pointer; }
button:focus-visible { outline: 3px solid #ed8d30; outline-offset: 2px; }
.stage-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.stage-button { padding: 10px 15px; }
#notice { position: absolute; inset: 5px 8px auto; margin: 0; padding: 7px 9px; border-radius: 8px; background: #fff8e8; font-size: .82rem; font-weight: 800; text-align: center; pointer-events: none; }
.controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(70px, 1.35fr); gap: 6px; margin-top: 8px; touch-action: none; user-select: none; }
.controls button { min-height: 46px; font-size: 1.25rem; touch-action: none; box-shadow: inset 0 -3px #51432926; }
.controls button.pressed { background: #e49a36; }
.controls [data-direction="brake"] { font-size: .82rem; background: #dbebde; }
.controls [data-direction="brake"].pressed { background: #a7ccb2; }
#evening { background: #d8e6f2; color: #233c50; }
#full-monday, #back-to-title { background: #e2eddd; }
#full-week { background: #f4dcad; }
button:disabled { opacity: .46; cursor: default; }
footer { margin-top: 6px; text-align: center; font-size: .68rem; }
[hidden] { display: none !important; }
