/* Original 16-bit arcade cabinet treatment. All art and fonts remain local. */
:root {
  color-scheme: dark;
  --bg: #0b1026;
  --panel: #17213d;
  --border: #3d527b;
  --text: #f5efd9;
  --muted: #a0afd0;
  --mint: #8ff0b8;
  --orange: #ffad52;
  --cyan: #69d8ef;
  --gold: #ffcf61;
  --mono: "Courier New", "Osaka-Mono", monospace;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: linear-gradient(90deg, #26304b24 1px, transparent 1px), linear-gradient(#26304b24 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--text);
}
button, a, input { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { cursor: pointer; color: var(--text); border-radius: 0; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
button:active { transform: translateY(2px); }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-decoration: none; }
output { font-variant-numeric: tabular-nums; }
.app { max-width: 1510px; margin: auto; padding: 0 42px; }
.header { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid var(--border); box-shadow: 0 2px #050a19; }
.brand { display: flex; align-items: center; gap: 13px; font: 900 31px var(--mono); letter-spacing: 2px; color: var(--gold); text-shadow: 2px 2px #9c4b3f, 4px 4px #040a1c; }
.brand-mark { position: relative; width: 36px; height: 30px; display: block; }
.brand-mark i { position: absolute; top: 0; left: 0; width: 25px; height: 25px; border: 3px solid #ffd76e; background: #de833d; box-shadow: inset -4px -4px #904a40; clip-path: polygon(25% 0,75% 0,75% 12%,100% 12%,100% 75%,88% 75%,88% 100%,25% 100%,25% 88%,0 88%,0 25%,25% 25%); }
.brand-mark i + i { top: 7px; left: 13px; background: #328fba; border-color: #9ae6f0; box-shadow: inset -4px -4px #314678; }
.brand-label { margin-left: 5px; border-left: 2px solid #3d527b; padding-left: 15px; color: #bdc8df; font: bold 9px var(--mono); letter-spacing: 1.4px; text-shadow: none; }
.header-right { display: flex; align-items: center; gap: 23px; }
.version { font: bold 10px var(--mono); color: #768daf; letter-spacing: 1px; }
.live { display: flex; align-items: center; gap: 9px; min-width: 85px; padding: 8px 10px; border: 2px solid #466180; background: #162943; box-shadow: inset 2px 2px #264569, 2px 2px #040a1b; color: var(--cyan); font: bold 10px var(--mono); }
.live i, .telemetry-dot { display: block; width: 6px; height: 6px; background: var(--cyan); box-shadow: 2px 2px #247698; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; padding: 30px 0 24px; }
.eyebrow { margin-bottom: 10px; color: var(--cyan); font: bold 9px var(--mono); letter-spacing: 1.8px; }
h1 { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.4; letter-spacing: 1px; text-shadow: 3px 3px #050918; }
.title-dot { color: var(--orange); margin-left: 5px; }
.intro > p { margin: 0 0 2px; color: var(--muted); font-size: 11px; line-height: 1.9; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 302px; gap: 22px; align-items: start; }
.simulation { overflow: hidden; background: #0b1228; border: 3px solid #51638c; box-shadow: 4px 4px #040716, inset 2px 2px #7b8aa7; }
.game-hud { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 82px; padding: 14px 25px 12px; background: #1a2748; border-top: 2px solid #8a9bb9; border-bottom: 3px solid #405b86; box-shadow: inset 0 -3px #0b142d; }
.game-hud > div { display: flex; flex-direction: column; gap: 6px; }
.game-hud > div > span { color: #a6c2e7; font: bold 10px var(--mono); letter-spacing: 1.6px; }
.hud-score output { color: var(--gold); font: bold 30px var(--mono); letter-spacing: 2px; text-shadow: 2px 2px #8a523b; }
.hud-wave { text-align: center; }
.hud-wave strong { color: var(--text); font: bold 15px var(--mono); letter-spacing: 1px; text-shadow: 2px 2px #071026; }
.hud-best { text-align: right; }
.hud-best output { color: var(--cyan); font: bold 20px var(--mono); letter-spacing: 1px; text-shadow: 2px 2px #234b71; }
.canvas-wrap { position: relative; width: 100%; height: 640px; min-height: 360px; background: #090f24; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; cursor: default; image-rendering: pixelated; }
canvas:focus-visible { box-shadow: inset 0 0 0 2px #69d8ef80; }
.stage-hint { position: absolute; left: 50%; bottom: 15px; transform: translateX(-50%); }
.game-start { width: 314px; max-width: calc(100% - 24px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 15px 19px 12px; background: #14203ef5; border: 2px solid #8fa7c9; box-shadow: inset 2px 2px #33456c, inset -2px -2px #070d22, 4px 4px #040815aa; }
.game-start.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.start-copy { display: flex; flex-direction: column; text-align: center; gap: 7px; font-size: 11px; }
.start-eyebrow { color: var(--gold); font: bold 10px var(--mono); letter-spacing: 1.5px; }
.hint-secondary { display: block; color: #b7c5de; font-size: 9px; }
.start-sound { color: #8198bd; font-size: 8px; }
.primary-button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 15px; border: 2px solid #ffe8a0; border-right-color: #aa6238; border-bottom-color: #aa6238; background: var(--gold); box-shadow: inset 0 -3px #ee9d43, 2px 2px #070e24; color: #252342; font-size: 12px; font-weight: 800; letter-spacing: .5px; }
.primary-button:hover { background: #ffe49a; }
.game-start .primary-button { margin-top: 2px; }
.stage-bottom { height: 43px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-top: 2px solid #273958; }
.legend { display: flex; gap: 17px; font-size: 10px; color: #becbe2; }
.legend > span { display: flex; gap: 7px; align-items: center; }
.legend i { width: 7px; height: 7px; display: block; box-shadow: 2px 2px #030918; }
.legend-player { background: var(--mint); }
.legend-a { background: var(--orange); }
.legend-b { background: var(--cyan); }
.legend-enemy { background: #f97086; }
.boundary-caption { color: #7f93b4; font-size: 8px; }
.toolbar { height: 61px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-top: 2px solid #53688e; background: #1c2947; box-shadow: inset 0 2px #2a3d62; }
.toolbar-actions { display: flex; align-items: center; gap: 15px; }
.icon-button { width: 33px; height: 31px; padding: 0; border: 2px solid #6e90ad; border-bottom-color: #1a3456; border-right-color: #1a3456; background: #355678; color: #b5edee; box-shadow: 2px 2px #0b1228; font-size: 15px; }
.icon-button:hover { background: #456f91; }
.reset-button { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; color: #c4cee1; font-size: 11px; padding: 6px 0; }
.reset-button:hover { color: var(--gold); }
.reset-button > span { font: 24px var(--mono); line-height: 1; }
.toolbar-separator { width: 2px; height: 21px; background: #425675; }
.trail-toggle { display: flex; align-items: center; gap: 8px; color: #c4cee1; font-size: 11px; cursor: pointer; }
.trail-toggle input { position: absolute; opacity: 0; width: 28px; height: 20px; }
.switch { display: block; position: relative; width: 28px; height: 15px; border: 1px solid #506384; background: #101a32; }
.switch:after { content: ""; position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; background: #8397b6; box-shadow: inset 2px 2px #bac8d8; }
.trail-toggle input:checked + .switch { background: #1b596e; border-color: #48a0be; }
.trail-toggle input:checked + .switch:after { background: var(--cyan); box-shadow: inset 2px 2px #c6f4f5; transform: translateX(13px); }
.trail-toggle input:focus-visible + .switch { outline: 2px solid var(--cyan); outline-offset: 4px; }
.elapsed { display: flex; align-items: center; gap: 10px; }
.elapsed > span { color: #93a7c8; font: bold 8px var(--mono); letter-spacing: .8px; }
.elapsed output { color: #f0e8ce; font: bold 17px var(--mono); letter-spacing: .5px; }
.sidebar { display: flex; flex-direction: column; gap: 15px; }
.panel { position: relative; padding: 19px 19px 18px; border: 2px solid #3f557f; background: var(--panel); box-shadow: inset 2px 2px #2a3b5f, inset -2px -2px #0c142b, 3px 3px #050a1b; }
.panel:before, .panel:after { content: ""; position: absolute; top: 5px; width: 3px; height: 3px; background: #788bb0; }
.panel:before { left: 5px; }
.panel:after { right: 5px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 17px; }
.section-heading h2 { margin: 0; color: #c8d5ef; font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.section-heading > span:not(.telemetry-dot) { color: #7d95bf; font: bold 8px var(--mono); white-space: nowrap; }
.guide-lead { font-size: 18px; font-weight: 800; letter-spacing: .1px; margin: 0 0 11px; color: var(--text); }
.muted { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.9; }
.enemy-guide { display: flex; gap: 23px; margin-top: 19px; }
.enemy-guide > div { display: flex; align-items: center; gap: 9px; }
.enemy-guide span { color: #d8d7df; font-size: 10px; }
.enemy-guide small { display: block; color: #8ea5c8; font: bold 8px var(--mono); margin-top: 5px; }
.enemy-icon { display: block; width: 17px; height: 17px; box-shadow: 2px 2px #050d25; }
.enemy-icon.chaser { background: #dd526a; border: 3px solid #ff9f91; clip-path: polygon(25% 0,75% 0,75% 25%,100% 25%,100% 75%,75% 75%,75% 100%,25% 100%,25% 75%,0 75%,0 25%,25% 25%); }
.enemy-icon.wanderer { background: #8b65c4; border: 3px solid #d4a9ff; clip-path: polygon(25% 0,75% 0,75% 12%,100% 12%,100% 75%,75% 75%,75% 100%,25% 100%,25% 75%,0 75%,0 12%,25% 12%); }
.danger-note { display: flex; align-items: center; gap: 10px; padding: 10px 11px; margin-top: 19px; background: #352837; border-left: 3px solid #eb8860; }
.danger-note > span { color: #ffb473; font: bold 18px var(--mono); }
.danger-note p { margin: 0; color: #c7aab2; font-size: 9px; line-height: 1.7; }
.danger-note strong { font-weight: 700; color: #ffc48b; }
.sound-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sound-row > div > strong { display: block; color: var(--cyan); font: bold 12px var(--mono); letter-spacing: 1px; }
.sound-row > div > span { display: block; color: #8ba3c5; font: bold 7px var(--mono); margin-top: 6px; }
.sound-toggle { padding: 8px; min-width: 54px; border: 2px solid #6493b3; border-right-color: #234b69; border-bottom-color: #234b69; background: #264866; color: #a4ecf0; font: bold 10px var(--mono); box-shadow: 2px 2px #080f23; }
.sound-toggle[aria-pressed="true"] { background: #202b44; color: #8da1c1; border-color: #465976; }
.sound-toggle:hover { background: #345d7a; }
.volume-label { display: flex; justify-content: space-between; margin-top: 18px; color: #bccae0; font-size: 10px; }
.volume-label output { color: var(--cyan); font: bold 10px var(--mono); }
input[type="range"] { appearance: none; display: block; width: 100%; height: 5px; margin: 16px 0 11px; border: 1px solid #435a7e; border-radius: 0; background: linear-gradient(to right,#69d8ef 35%,#172038 35%); cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 12px; height: 15px; border: 2px solid #b3eaf2; border-right-color: #42768d; border-bottom-color: #42768d; border-radius: 0; background: #69d8ef; box-shadow: 2px 2px #080f25; }
input[type="range"]::-moz-range-thumb { width: 10px; height: 13px; border: 2px solid #b3eaf2; border-radius: 0; background: #69d8ef; }
.audio-status { color: #8ba3c5; font-size: 8px; line-height: 1.6; margin: 13px 0 0; }
.boss-panel { background: #27283d; border-color: #7b604e; box-shadow: inset 2px 2px #494158, inset -2px -2px #171728, 3px 3px #050a1b; }
.boss-panel .section-heading h2 { color: #e5c4a1; }
.boss-panel .section-heading > span { color: #b38c72; }
.boss-intro { display: flex; align-items: center; gap: 14px; }
.boss-emblem { display: block; position: relative; width: 39px; height: 37px; flex-shrink: 0; border: 5px solid #ffcb68; background: #bb7641; box-shadow: inset -5px -5px #774c44; clip-path: polygon(20% 0,80% 0,80% 13%,100% 13%,100% 80%,80% 80%,80% 100%,20% 100%,20% 80%,0 80%,0 13%,20% 13%); }
.boss-emblem:before, .boss-emblem:after { content: ""; position: absolute; width: 5px; height: 6px; top: 7px; background: #372a3d; border-top: 2px solid #fff0b4; }
.boss-emblem:before { left: 5px; }
.boss-emblem:after { right: 5px; }
.boss-emblem i { position: absolute; left: 8px; right: 8px; height: 4px; top: 18px; background: #ffecac; }
.boss-intro strong { color: #ffd18a; font: bold 12px var(--mono); letter-spacing: 1.2px; }
.boss-intro p { color: #baa9b2; font-size: 9px; line-height: 1.8; margin: 7px 0 0; }
.boss-meter { margin-top: 19px; }
.boss-meter-label { display: flex; align-items: center; justify-content: space-between; color: #c2b4be; font-size: 9px; }
.boss-meter-label output { color: var(--gold); font: bold 12px var(--mono); }
.boss-track { height: 8px; margin-top: 9px; padding: 1px; background: #11162b; border: 1px solid #65504e; overflow: hidden; }
.boss-track > div { height: 100%; width: 0; background: repeating-linear-gradient(90deg,#ffbe5c 0,#ffbe5c 8px,#bd7042 8px,#bd7042 10px); }
.boss-reward { display: flex; justify-content: space-between; margin: 15px 0 0; color: #9e8e9f; font: bold 8px var(--mono); letter-spacing: .4px; }
.boss-reward span { color: #e7b576; }
.stats { display: grid; grid-template-columns: 1fr 1fr; }
.stats > div + div { border-left: 2px solid #34476b; padding-left: 19px; }
.stats > div > span { display: block; color: #a0b1d1; font-size: 9px; }
.stats output { display: block; margin-top: 7px; color: #f4e8ca; font: bold 27px var(--mono); text-shadow: 2px 2px #050b1d; }
.mini-stats { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; font-size: 8px; color: #8fa4c7; }
.mini-stats output { margin-left: 5px; color: #bfd6eb; font: bold 10px var(--mono); }
.mini-stats small { margin-left: 3px; color: #8fa4c7; font-size: 8px; }
.status-line { display: flex; align-items: center; gap: 8px; border-top: 2px solid #2a3b5b; margin-top: 16px; padding-top: 12px; color: #9bb0d2; font-size: 9px; line-height: 1.5; }
.status-line > span:first-child { width: 5px; height: 5px; flex-shrink: 0; background: var(--mint); }
footer { display: flex; justify-content: space-between; gap: 15px; padding: 23px 0 25px; color: #758bad; font: bold 8px var(--mono); letter-spacing: .4px; }
footer > span:nth-child(2) { font: 9px "Hiragino Kaku Gothic ProN", sans-serif; letter-spacing: 0; }
kbd { font-family: var(--mono); }
footer kbd { color: #afc2de; font-weight: bold; }
footer i { font-style: normal; margin: 0 9px; }
/* The final positions stay visible through the results; intentionally no blur. */
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(5,9,25,.08); backdrop-filter: none; -webkit-backdrop-filter: none; }
.overlay[hidden] { display: none; }
.overlay-card { width: 340px; max-width: 100%; padding: 29px 25px; border: 2px solid #a3b3d0b3; background: rgba(19,30,61,.58); box-shadow: inset 2px 2px #a2b9d329, 4px 4px #050c2438; text-align: center; text-shadow: 1px 2px #080e24; }
.overlay-eyebrow { color: var(--gold); font: bold 10px var(--mono); letter-spacing: 2px; }
.overlay-card h2 { margin: 12px 0; color: #fff1c6; font: bold 32px var(--mono); letter-spacing: 1px; text-shadow: 2px 2px #a05446, 4px 4px #0a1128; }
.overlay-card p { margin: 15px 0 23px; color: #dae1ef; font-size: 11px; line-height: 1.8; }
.overlay-card .primary-button { text-shadow: none; }
.result-stats { display: grid; grid-template-columns: 1.3fr .8fr 1fr; gap: 9px; padding: 17px 0; border-top: 2px solid #8fa3c969; border-bottom: 2px solid #8fa3c969; margin-bottom: 22px; }
.result-stats[hidden] { display: none; }
.result-stats > div > span { display: block; margin-bottom: 7px; color: #c5d4ef; font-size: 8px; }
.result-stats strong { color: var(--text); font: bold 21px var(--mono); }
.result-stats > div:first-child strong { color: var(--gold); }
.overlay-card .new-record { margin: -8px 0 18px; color: var(--gold); font: bold 10px var(--mono); letter-spacing: 1px; }
.new-record[hidden] { display: none; }
.overlay-card .restart-hint { margin: 15px 0 0; color: #dbe5f4; font: bold 9px var(--mono); letter-spacing: .3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (min-width: 1440px) { .canvas-wrap { height: 686px; } }
@media (max-width: 1150px) {
  .app { padding: 0 26px; }
  .workspace { grid-template-columns: minmax(0,1fr) 278px; gap: 17px; }
  .panel { padding: 18px 16px; }
  .canvas-wrap { height: 605px; }
  .game-hud { padding-left: 19px; padding-right: 19px; }
  .hud-score output { font-size: 26px; }
  .hud-best output { font-size: 18px; }
  .boundary-caption { display: none; }
  .enemy-guide { gap: 20px; }
  .section-heading > span:not(.telemetry-dot) { font-size: 7px; }
  .sound-row > div > strong { font-size: 11px; }
  .sound-row > div > span { font-size: 6.5px; }
  .brand-label { font-size: 8px; }
}
@media (max-width: 850px) {
  .app { padding: 0 20px; }
  .header { height: 76px; }
  .version { display: none; }
  .intro { padding: 25px 0 22px; }
  h1 { font-size: 27px; }
  .intro > p { font-size: 10px; }
  .workspace { grid-template-columns: 1fr; }
  .canvas-wrap { height: 580px; max-height: 72vh; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .panel { padding: 20px; }
  .guide { order: 1; }
  .boss-panel { order: 2; }
  .audio-panel { order: 3; }
  .telemetry { order: 4; }
  .section-heading > span:not(.telemetry-dot) { font-size: 8px; }
  .sound-row > div > span { font-size: 7px; }
  footer > span:last-child { display: none; }
}
@media (max-width: 520px) {
  .app { padding: 0 12px; }
  .header { height: 67px; }
  .brand { font-size: 27px; gap: 9px; letter-spacing: 1px; }
  .brand-mark { transform: scale(.85); transform-origin: left center; width: 32px; }
  .brand-label { display: none; }
  .live { font-size: 9px; min-width: 73px; padding: 7px; gap: 6px; }
  .intro { padding: 23px 1px 20px; }
  .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .intro > p { display: none; }
  h1 { font-size: 25px; letter-spacing: .3px; }
  .workspace { gap: 15px; }
  .simulation { border-width: 2px; box-shadow: 3px 3px #040716; }
  .game-hud { min-height: 70px; gap: 8px; padding: 12px 13px; }
  .game-hud > div > span { font-size: 8px; letter-spacing: .7px; }
  .hud-score output { font-size: 24px; letter-spacing: 1px; }
  .hud-wave strong { font-size: 11px; }
  .hud-best output { font-size: 15px; }
  .canvas-wrap { height: 405px; min-height: 345px; max-height: 65vh; }
  .game-start { width: 276px; bottom: 9px; gap: 6px; padding: 12px 14px 10px; }
  .start-copy { font-size: 10px; gap: 6px; }
  .start-eyebrow { font-size: 9px; }
  .game-start .primary-button { padding: 10px 13px; font-size: 11px; }
  .hint-secondary { font-size: 8px; }
  .start-sound { font-size: 7px; }
  .stage-bottom { padding: 0 13px; height: 37px; }
  .legend { gap: 14px; font-size: 9px; }
  .legend > span { gap: 6px; }
  .toolbar { padding: 0 13px; height: 57px; }
  .toolbar-actions { gap: 11px; }
  .elapsed > span { display: none; }
  .elapsed output { font-size: 14px; }
  .reset-button, .trail-toggle { font-size: 10px; }
  .sidebar { grid-template-columns: 1fr; gap: 13px; }
  .panel { padding: 19px 20px; }
  .guide .muted { font-size: 11px; max-width: 67%; }
  .guide .enemy-guide { position: absolute; right: 20px; top: 53px; flex-direction: column; margin: 0; gap: 12px; }
  .guide-lead { font-size: 18px; }
  .guide .danger-note { margin-top: 21px; }
  .guide .danger-note p { font-size: 10px; }
  .boss-intro p { font-size: 10px; }
  .sound-row > div > strong { font-size: 13px; }
  .sound-row > div > span { font-size: 8px; }
  .audio-status { font-size: 9px; }
  .mini-stats { font-size: 9px; }
  .overlay-card { width: 300px; padding: 23px 20px; }
  .overlay-card h2 { font-size: 29px; }
  .result-stats strong { font-size: 19px; }
  footer { justify-content: center; padding: 21px 0; }
  footer > span:first-child { display: none; }
  footer > span:nth-child(2) { font-size: 8px; }
}
@media (max-width: 365px) {
  .game-hud { padding-left: 10px; padding-right: 10px; }
  .hud-score output { font-size: 21px; }
  .hud-best output { font-size: 13px; }
  .toolbar-actions { gap: 8px; }
  .toolbar-separator { display: none; }
  .guide .enemy-guide { position: static; flex-direction: row; margin-top: 17px; }
  .guide .muted { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { transition: none !important; animation: none !important; } }

/* Play controls sit in the empty corners around the circular arena. */
.game-page .app { max-width: 1320px; padding-left: 28px; padding-right: 28px; }
.game-page .header { height: 64px; }
.game-page main { padding-top: 12px; }
.game-page .header-right { gap: 16px; }
.help-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 14px; border: 2px solid #8ea2c4; border-right-color: #354d72; border-bottom-color: #354d72; background: #243656; color: #eff3de; box-shadow: inset 1px 1px #536b8f, 2px 2px #040b1d; font: bold 11px var(--mono); letter-spacing: .6px; white-space: nowrap; }
.help-button:hover { background: #344d70; color: var(--gold); }
.help-button:active { transform: translateY(2px); }
.game-page .workspace { display: block; }
.game-page .game-hud { min-height: 64px; padding-top: 9px; padding-bottom: 8px; }
.game-page .game-hud > div { gap: 3px; }
.game-page .hud-score output { font-size: 27px; }
.game-page .canvas-wrap { height: clamp(400px, calc(100svh - 250px), 760px); min-height: 400px; max-height: none; }
.game-page .stage-bottom { height: 30px; }
.game-page .legend { font: bold 9px var(--mono); }
.game-page .toolbar { height: 50px; }
.game-page .reset-button, .game-page .trail-toggle { font: bold 11px var(--mono); }
.game-page .game-start { left: auto; right: 12px; transform: none; width: 228px; gap: 9px; padding: 12px 15px; bottom: 12px; z-index: 2; }
.game-page .hint-secondary { font: bold 9px var(--mono); letter-spacing: .5px; }
.game-page .primary-button { font: bold 12px var(--mono); }
.game-page footer { padding: 10px 0; }
.game-page footer > span { display: block; font: bold 8px var(--mono); }
.arena-hud { position: absolute; z-index: 1; width: 186px; padding: 10px 12px; border: 2px solid #536b8f; background: #131d34e8; box-shadow: inset 1px 1px #34496a, 2px 2px #050b1c88; }
.arena-hud h2 { margin: 0; color: #aec9e3; font: bold 11px var(--mono); letter-spacing: 1px; }
.audio-hud { top: 12px; left: 12px; z-index: 3; }
.hud-audio-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.audio-hud .sound-toggle { min-width: 58px; min-height: 30px; padding: 5px 7px; }
.audio-hud .volume-label { margin-top: 10px; font: bold 9px var(--mono); }
.audio-hud input[type="range"] { margin: 12px 0 0; height: 7px; }
.audio-hud input[type="range"]::-webkit-slider-thumb { height: 20px; width: 14px; }
.audio-hud input[type="range"]::-moz-range-thumb { height: 18px; width: 12px; }
.audio-hud .audio-status { min-height: 12px; margin: 10px 0 0; font: 8px var(--mono); line-height: 1.4; }
.stats-hud { bottom: 12px; left: 12px; pointer-events: none; }
.stats-hud h2 { margin-bottom: 9px; }
.stats-hud .stats { margin-bottom: 7px; }
.stats-hud .stats > div > span { color: #99afcf; font: bold 8px var(--mono); }
.stats-hud .stats > div + div { padding-left: 14px; }
.stats-hud .stats output { margin-top: 3px; font: bold 21px var(--mono); }
.hud-stat-row { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; margin-top: 5px; font: 9px var(--mono); color: #99afcf; }
.hud-stat-row output { color: #d9e6e9; font: bold 10px var(--mono); white-space: nowrap; }
.hud-stat-row small { color: #99afcf; font-size: 8px; margin-left: 3px; }
.boss-hud { position: absolute; z-index: 1; top: 12px; right: 12px; width: 186px; padding: 8px 10px; border: 2px solid #ab8454; background: #151b30e8; box-shadow: inset 1px 1px #51445a, 2px 2px #050b1c88; pointer-events: none; }
.boss-hud .boss-meter-label { gap: 8px; color: #e5c090; font: bold 10px var(--mono); letter-spacing: .6px; }
.boss-hud .boss-meter-label output { font: bold 19px var(--mono); white-space: nowrap; }
.boss-hud .boss-track { margin-top: 5px; height: 6px; }
.boss-hud[data-urgent="true"] { border-color: #ff9c54; background: #392535f2; }
.boss-hud[data-urgent="true"] .boss-meter-label output { color: #ff9c54; }
.game-page .overlay { z-index: 2; }
@media (max-width: 850px) {
  .game-page .app { padding-left: 18px; padding-right: 18px; }
  .game-page .brand-label { display: none; }
  .game-page .canvas-wrap { height: clamp(500px, calc(100svh - 240px), 740px); }
  .game-page .game-start { width: 196px; }
  .arena-hud, .boss-hud { width: 170px; }
}
@media (max-width: 520px) {
  .game-page .app { padding-left: 10px; padding-right: 10px; }
  .game-page .header { height: 60px; }
  .game-page .brand { font-size: 23px; gap: 3px; }
  .game-page .brand-mark { transform: scale(.7); width: 29px; }
  .game-page .header-right { gap: 8px; }
  .game-page .help-button { padding: 9px 8px; gap: 5px; font-size: 9px; letter-spacing: 0; }
  .game-page .live { display: none; }
  .game-page main { padding-top: 10px; }
  .game-page .game-hud { min-height: 60px; padding-left: 12px; padding-right: 12px; }
  .game-page .hud-score output { font-size: 24px; }
  .game-page .canvas-wrap { height: clamp(500px, calc(100svh - 240px), 680px); min-height: 500px; }
  .game-page .game-start { width: 156px; right: 9px; bottom: 9px; padding: 10px 9px; gap: 7px; }
  .game-page .game-start .primary-button { padding: 10px 8px; font-size: 11px; }
  .game-page .start-eyebrow { font-size: 8px; letter-spacing: .5px; }
  .game-page .hint-secondary { font-size: 8px; letter-spacing: 0; }
  .game-page .stage-bottom { height: 29px; padding: 0 12px; }
  .game-page .legend { gap: 13px; font-size: 8px; }
  .game-page .toolbar { height: 50px; padding: 0 11px; }
  .game-page .toolbar-actions { gap: 10px; }
  .game-page .reset-button, .game-page .trail-toggle { font-size: 10px; }
  .game-page .toolbar-separator { display: none; }
  .arena-hud { width: 152px; padding: 8px 9px; }
  .arena-hud h2 { font-size: 10px; }
  .audio-hud { top: 9px; left: 9px; }
  .audio-hud .sound-toggle { min-width: 52px; }
  .audio-hud .audio-status { font-size: 7px; }
  .stats-hud { bottom: 9px; left: 9px; }
  .stats-hud .stats output { font-size: 19px; }
  .stats-hud .stats > div + div { padding-left: 9px; }
  .hud-stat-row { font-size: 8px; }
  .game-page .boss-hud { top: 9px; right: 9px; width: 152px; padding: 6px 8px; }
  .game-page .boss-hud .boss-meter-label { font-size: 9px; letter-spacing: 0; }
  .game-page .boss-hud .boss-meter-label output { font-size: 17px; }
  .game-page footer { justify-content: space-between; }
  .game-page footer > span { font-size: 7px; }
}
@media (max-width: 365px) {
  .game-page .toolbar-actions { gap: 7px; }
  .game-page .elapsed output { font-size: 12px; }
  .game-page .hud-score output { font-size: 21px; }
  .arena-hud, .game-page .boss-hud { width: 134px; }
  .game-page .game-start { width: 134px; padding-left: 7px; padding-right: 7px; }
  .game-page .game-start .primary-button { font-size: 10px; }
  .game-page .boss-hud .boss-meter-label { font-size: 8px; }
  .game-page .boss-hud .boss-meter-label output { font-size: 15px; }
}
