@font-face {
  font-family: Departure;
  src: url("./assets/fonts/DepartureMono-Regular.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
:root {
  color-scheme: dark;
  --bg: #10120f;
  --panel: #181b16;
  --field: #0c0f0b;
  --line: #343a2b;
  --quiet: #9ca48f;
  --white: #f0f0df;
  --accent: #d3ff55;
  --danger: #ff795c;
  --amber: #ffc16c;
  --mono: Departure, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--white);
  font: 11px var(--mono);
  background: radial-gradient(ellipse at 35% 45%, #b8d86408, transparent 65%), var(--bg);
  overscroll-behavior: none;
}
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border-radius: 0; }
button:disabled { opacity: 0.3; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button, a { touch-action: manipulation; }
svg { display: block; }
button svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: square;
}
[hidden], button[hidden] { display: none !important; }
.app {
  height: 100svh;
  min-height: 480px;
  max-width: 1220px;
  margin: auto;
  display: flex;
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 40px max(12px, env(safe-area-inset-bottom));
}
.app-header {
  height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line);
}
.studio {
  display: flex; align-items: center; gap: 9px;
  color: var(--white); letter-spacing: 2px; text-decoration: none; font-size: 11px;
}
.studio-mark { font-size: 24px; color: var(--accent); line-height: 1; }
.studio-division { color: var(--quiet); font-size: 9px; letter-spacing: 1px; margin-left: 5px; }
.header-edition { color: var(--quiet); font-size: 8px; letter-spacing: 1.5px; }
.system-controls { display: flex; gap: 4px; }
.icon-button {
  display: grid; place-items: center; min-width: 44px; min-height: 44px;
  border: 1px solid transparent; background: transparent; color: var(--quiet);
}
.icon-button:hover:not(:disabled) { color: var(--white); background: #d3ff550a; border-color: var(--line); }
.icon-button[aria-pressed="true"] { color: var(--accent); }
.sound-wave { display: none; }
[aria-pressed="true"] .sound-wave { display: block; }
[aria-pressed="true"] .sound-slash { display: none; }
.station {
  flex: 1; min-height: 0;
  display: flex; justify-content: center; align-items: center; gap: clamp(36px, 6vw, 88px);
  padding: 12px 0;
}
.console {
  width: min(510px, calc((100svh - 300px) * 0.75));
  flex-shrink: 0; position: relative; container-type: inline-size;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px #0005, 0 0 0 5px #d3ff5503;
}
.hud {
  height: 56px; padding: 0 18px;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: center;
  border-bottom: 1px solid var(--line);
}
.micro-label { display: block; color: var(--quiet); font-size: 8px; line-height: 1.5; letter-spacing: 1.4px; }
.hud strong { font-size: 23px; font-weight: 400; line-height: 1.3; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.score-block strong { color: var(--white); }
.wave-block { text-align: center; }
.wave-block strong { font-size: 20px; color: var(--accent); }
.life-block { justify-self: end; text-align: right; align-self: center; }
.life-cells { display: flex; gap: 5px; height: 29px; align-items: center; }
.life-cells i { width: 10px; height: 13px; background: var(--accent); box-shadow: 0 0 10px #d3ff551a; }
.life-cells i.empty { background: #32392a; box-shadow: none; }
.input-surface { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; position: relative; }
.arena { position: relative; width: 100%; aspect-ratio: 3/4; overflow: hidden; background: var(--field); }
.arena canvas { width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.arena canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.wave-status {
  position: absolute; top: 14px; right: 16px; left: 16px;
  text-align: right; color: var(--quiet); font-size: 8px; letter-spacing: 0.8px; pointer-events: none;
}
.crt {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 2px, #0004 2px, #0004 3px);
  opacity: 0.2; box-shadow: inset 0 0 70px #0004;
}
.corner { position: absolute; width: 12px; height: 12px; color: #87966b; pointer-events: none; opacity: 0.55; }
.corner-tl { top: 9px; left: 9px; border-top: 1px solid; border-left: 1px solid; }
.corner-tr { top: 9px; right: 9px; border-top: 1px solid; border-right: 1px solid; }
.corner-bl { bottom: 9px; left: 9px; border-bottom: 1px solid; border-left: 1px solid; }
.corner-br { bottom: 9px; right: 9px; border-bottom: 1px solid; border-right: 1px solid; }
.overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  text-align: center; padding: 24px 18px;
  background: linear-gradient(#0c0f0b10, #0c0f0b10 20%, #0c0f0b90 80%, #0c0f0b10);
}
[data-phase="paused"] .overlay, [data-phase="over"] .overlay { background: #0c0f0bef; }
.title-eyebrow { color: var(--accent); font-size: 8px; letter-spacing: 2px; line-height: 1.5; }
.title-sigil { width: 82px; margin: 28px 0 22px; filter: drop-shadow(0 0 18px #d3ff5540); }
.title-sigil svg { fill: var(--accent); width: 100%; }
.title-sigil .sigil-eyes { fill: var(--field); }
h1 {
  font: 900 clamp(40px, 19cqw, 88px)/0.82 "Arial Black", Arial, Helvetica, sans-serif;
  letter-spacing: -5px; margin: 0;
}
h1 span { color: var(--accent); }
.overlay-copy { color: var(--quiet); font-size: 9px; letter-spacing: 2px; line-height: 1.8; margin: 22px 0 30px; }
.start-button {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  background: var(--accent); border: 1px solid var(--accent);
  padding: 0 20px; min-height: 50px; max-width: 100%;
  color: #172006; font-size: 11px; letter-spacing: 0.5px;
  box-shadow: 0 0 30px #d3ff550c;
  transition: background 0.12s, transform 0.12s, box-shadow 0.12s;
}
.start-button > span:last-child { font-size: 20px; }
.start-button:hover { background: #e3ff96; box-shadow: 0 0 28px #d3ff5526; }
.start-button:active { transform: translateY(2px); }
.start-help { font-size: 8px; letter-spacing: 0.8px; margin: 18px 0 0; color: var(--quiet); }
.text-button { background: none; border: 0; color: var(--quiet); min-height: 44px; padding: 8px; margin-top: 8px; font-size: 9px; text-decoration: underline; text-underline-offset: 5px; }
.run-result { display: flex; gap: 28px; justify-content: center; margin: 0 0 26px; }
.run-result strong { display: block; font-weight: 400; font-size: 20px; margin-top: 7px; }
.run-result .micro-label { font-size: 8px; }
.event-banner {
  position: absolute; left: 10px; right: 10px; top: 38%; text-align: center;
  pointer-events: none; white-space: pre-line; font-size: 17px; line-height: 1.6;
  color: var(--accent); text-shadow: 0 2px 8px #000, 0 0 20px #000; letter-spacing: 2px;
}
.event-banner:empty { display: none; }
.resume-count { position: absolute; inset: 0; display: grid; place-items: center; background: #0c0f0b99; font-size: 66px; color: var(--accent); }
.thumb-deck {
  height: 86px; border-top: 1px solid var(--line); position: relative; overflow: hidden;
  background: linear-gradient(#1e2319, #171b14); padding: 11px 18px 9px; cursor: ew-resize;
  display: flex; flex-direction: column;
}
.deck-actions { display: flex; align-items: center; gap: 18px; }
.deck-actions .deck-top { flex: 1; }
.deck-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 8px; color: var(--quiet); }
.deck-top .micro-label { font-size: 8px; letter-spacing: 1px; }
#charge-label { grid-column: 3; grid-row: 1; color: var(--accent); }
.charge-track { grid-column: 2; grid-row: 1; height: 4px; background: #3b4430; overflow: hidden; }
.charge-track > div { width: 0; height: 100%; background: var(--accent); transition: width 0.1s linear; }
.control-row { display: flex; align-items: center; flex: 1; min-height: 0; }
.thumb-track { display: flex; justify-content: center; align-items: center; gap: 15px; color: #a8b68b; height: 25px; font-size: 22px; }
.control-row .thumb-track { flex: 1; min-width: 0; }
.track-line { height: 7px; flex: 1; background: repeating-linear-gradient(90deg, #53633b 0px, #53633b 1px, transparent 1px, transparent 8px); }
.thumb-icon { height: 25px; width: 25px; fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: 0.8; }
.fire-button {
  position: relative; z-index: 1; flex: 0 0 70px; min-height: 48px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid #a9c963; background: #29331a; color: var(--accent); letter-spacing: 1px; touch-action: none;
}
.fire-button small { font-size: 7px; color: #b1bd9c; }
.fire-button.is-firing { background: var(--accent); color: #172006; border-color: var(--accent); }
.fire-button.is-firing small { color: #334615; }
[data-auto-fire="false"] .control-row { gap: 16px; }
[data-auto-fire="false"] .thumb-deck { height: 144px; }
[data-auto-fire="false"] .deck-actions { padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
[data-auto-fire="false"] .deck-top { grid-template-columns: 1fr auto; }
[data-auto-fire="false"] #charge-label { grid-column: 2; }
[data-auto-fire="false"] .charge-track { grid-column: 1/-1; grid-row: 2; }
.thumb-deck p { text-align: center; color: var(--quiet); margin: 0; font-size: 8px; line-height: 1.5; letter-spacing: 0.3px; }
.touch-cursor {
  position: absolute; left: var(--touch-x, 50%); top: 28px; bottom: 20px; width: 38px;
  transform: translateX(-50%); border-left: 1px solid #d3ff5580; border-right: 1px solid #d3ff5580;
  background: #d3ff550a; opacity: 0; pointer-events: none;
}
.is-dragging .touch-cursor { opacity: 1; }
.is-dragging .thumb-icon { opacity: 1; }
.console-footer {
  height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 16px; border-top: 1px solid var(--line); font-size: 8px; color: var(--quiet); letter-spacing: 0.4px;
}
.console-footer > span:first-child { display: flex; align-items: center; gap: 7px; }
.console-footer strong { font-weight: 400; color: var(--white); letter-spacing: 1px; margin-left: 4px; }
.status-dot { display: inline-block; flex-shrink: 0; width: 4px; height: 4px; background: #7e896b; }
[data-phase="playing"] .console-footer .status-dot { background: var(--accent); box-shadow: 0 0 7px #d3ff5560; }
[data-overdrive="true"] .console { border-color: var(--accent); }
[data-overdrive="true"] .thumb-deck { background: #2b371b; }
[data-overdrive="true"] #charge-label { color: var(--white); }
.field-guide { width: 248px; flex-shrink: 0; }
.guide-index { font-size: 8px; color: var(--accent); letter-spacing: 1.4px; }
.field-guide h2 { font: 900 32px/0.98 "Arial Black", Arial, sans-serif; letter-spacing: -1.8px; margin: 22px 0 18px; }
.field-guide h2 span { color: var(--accent); }
.field-guide > p { color: var(--quiet); font-size: 10px; line-height: 1.9; }
.guide-rule { height: 1px; background: var(--line); margin: 26px 0; }
.guide-item { display: flex; gap: 13px; margin: 0 0 24px; }
.guide-number { font-size: 9px; color: var(--accent); line-height: 1.5; }
.guide-item h3 { font-size: 9px; letter-spacing: 0.6px; font-weight: 400; line-height: 1.5; margin: 0 0 8px; }
.guide-item p { font-size: 10px; line-height: 1.8; color: var(--quiet); margin: 0; }
.keyboard-hint { display: flex; align-items: center; gap: 5px; margin-top: 12px; color: var(--quiet); font-size: 9px; }
.keyboard-hint > span { margin: 0 4px; }
kbd { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #505c40; border-bottom-width: 2px; font: 10px var(--mono); color: var(--white); }
.guide-signature { padding-top: 18px; border-top: 1px solid var(--line); font-size: 8px; letter-spacing: 0.5px; color: var(--quiet); display: flex; gap: 8px; align-items: center; }
.guide-signature .status-dot { background: var(--accent); }
.app-footer { display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; height: 24px; font-size: 8px; letter-spacing: 1.1px; color: #8b947c; }
.footer-cross { color: var(--accent); margin-left: 10px; }
dialog { width: min(410px, calc(100vw - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 1px solid #68784d; background: var(--panel); color: var(--white); box-shadow: 0 25px 100px #0009; }
dialog::backdrop { background: #080b07dc; backdrop-filter: blur(8px); }
.settings-panel { padding: 24px; }
.settings-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.settings-header h2 { font: 400 16px var(--mono); letter-spacing: -0.5px; margin: 8px 0 0; }
.settings-header .micro-label { color: var(--accent); font-size: 8px; }
.settings-header .icon-button { margin: -10px -12px 0 0; }
.slider-label { display: flex; justify-content: space-between; font-size: 11px; }
.slider-label output { color: var(--accent); }
input[type="range"] { width: 100%; min-height: 44px; margin: 10px 0 0; accent-color: var(--accent); cursor: pointer; }
#steering-setting { width: 100%; min-height: 44px; margin: 12px 0 8px; padding: 8px; border: 1px solid var(--line); background: var(--field); color: var(--white); font: inherit; }
input:disabled { opacity: 0.4; }
.setting-help { color: var(--quiet); font-size: 9px; line-height: 1.8; margin: 0 0 24px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 0; border-top: 1px solid var(--line); font-size: 11px; cursor: pointer; }
.toggle-row small { display: block; font-size: 9px; color: var(--quiet); line-height: 1.7; margin-top: 8px; }
.toggle-row input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--accent); }
.settings-note { font-size: 9px; color: var(--quiet); line-height: 1.8; margin: 14px 0 26px; }
.settings-panel .start-button { width: 100%; font-size: 10px; }
.how-to-play { margin: 0 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.how-to-play summary { padding: 16px 0; min-height: 48px; cursor: pointer; color: var(--accent); touch-action: manipulation; }
.how-to-play ol { padding: 0 0 0 20px; margin: 0 0 18px; color: var(--quiet); font-size: 10px; line-height: 1.8; }
.how-to-play li + li { margin-top: 12px; }
.boot-notice { max-width: 430px; margin: 15svh auto; padding: 24px; }
.boot-notice h1 { font-size: 34px; letter-spacing: -1px; line-height: 1; }
.boot-notice p { color: var(--quiet); font-size: 13px; line-height: 1.8; margin: 24px 0; }
.boot-notice a { text-decoration: none; }
.effects-off .crt { display: none; }
.effects-off .title-sigil { filter: none; }
.effects-off .life-cells i, .effects-off .console, .effects-off .status-dot, .effects-off .start-button { box-shadow: none; }
.effects-off * { transition: none !important; }
@media (min-width: 761px) and (min-height: 561px) {
  [data-auto-fire="false"] .console { width: min(510px, calc((100svh - 358px) * 0.75)); }
}
@media (max-width: 900px) and (min-height: 561px) {
  .app { padding-left: 24px; padding-right: 24px; }
  .station { gap: 30px; }
  .field-guide { display: none; }
  .field-guide h2 { font-size: 28px; }
  .header-edition { display: none; }
}
@media (min-height: 561px) and (max-height: 700px) {
  .field-guide { display: none; }
}
/* One screen, with the spare height assigned to the thumb surface. The width
   budget preserves the world's 3:4 geometry on shorter phones. */
@media (max-width: 760px) and (min-height: 561px), (max-width: 560px) and (orientation: portrait) {
  .app {
    --toolbar-h: 48px; --hud-h: 56px; --deck-min: 112px; --status-h: 26px;
    --safe-top: env(safe-area-inset-top); --safe-bottom: env(safe-area-inset-bottom);
    min-height: 0; max-width: none;
    padding: var(--safe-top) env(safe-area-inset-right) var(--safe-bottom) env(safe-area-inset-left);
  }
  .app-header { height: var(--toolbar-h); padding: 0 12px; gap: 8px; border-bottom: 0; }
  .studio { letter-spacing: 1.2px; font-size: 10px; gap: 7px; }
  .studio-mark { font-size: 22px; }
  .studio-division, .header-edition { display: none; }
  .system-controls { gap: 0; }
  .station { padding: 0; align-items: stretch; }
  .console {
    width: min(100%, 540px, calc((100svh - var(--safe-top) - var(--safe-bottom) - var(--toolbar-h) - var(--hud-h) - var(--deck-min) - var(--status-h) - 2px) * 0.75));
    max-width: 100%; height: 100%; display: flex; flex-direction: column;
    border: 0; border-top: 1px solid var(--line); box-shadow: none;
  }
  .hud { height: var(--hud-h); flex-shrink: 0; padding: 0 16px; }
  .hud strong { font-size: 24px; }
  .wave-block strong { font-size: 19px; }
  .input-surface { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .arena { flex: 0 0 auto; }
  .thumb-deck, [data-auto-fire="false"] .thumb-deck {
    flex: 1; height: auto; min-height: var(--deck-min); padding: 15px 18px 14px;
  }
  [data-auto-fire="false"].app { --deck-min: 168px; }
  .control-row { min-height: 52px; }
  .thumb-track { gap: 18px; }
  .thumb-icon { width: 28px; height: 28px; }
  .track-line { height: 10px; }
  .fire-button { min-height: 56px; flex-basis: 76px; }
  .thumb-deck p { font-size: 8px; line-height: 1.5; }
  .console-footer { height: var(--status-h); flex-shrink: 0; font-size: 8px; }
  .field-guide, .app-footer { display: none; }
  .overlay { padding: 18px 14px; }
  h1 { font-size: clamp(50px, 18vw, 82px); letter-spacing: -4px; }
  .title-eyebrow { font-size: 8px; letter-spacing: 1.7px; }
  .title-sigil { width: 76px; margin: 26px 0 22px; }
  .overlay-copy { margin: 20px 0 26px; font-size: 9px; }
  .start-button { min-height: 52px; font-size: 11px; }
  .touch-cursor { top: 34px; bottom: 30px; width: 44px; }
}
@media (max-height: 700px) and (orientation: portrait) {
  .app { --hud-h: 44px; --deck-min: 92px; --status-h: 24px; }
  [data-auto-fire="false"].app { --deck-min: 136px; }
  .hud strong { font-size: 19px; }
  .micro-label { font-size: 7px; }
  .life-cells { height: 22px; }
  .life-cells i { width: 9px; height: 10px; }
  .thumb-deck, [data-auto-fire="false"] .thumb-deck { padding: 9px 12px 8px; }
  .control-row { min-height: 44px; }
  .fire-button { min-height: 44px; flex-basis: 62px; gap: 3px; }
  .thumb-deck p { font-size: 7px; }
  .console-footer { padding: 0 12px; font-size: 7px; }
  .overlay { padding: 12px; }
  .title-eyebrow { font-size: 7px; letter-spacing: 1.2px; }
  .title-sigil { width: 48px; margin: 14px 0; }
  h1 { font-size: 53px; letter-spacing: -3px; }
  .overlay-copy { margin: 13px 0 18px; font-size: 8px; }
  .start-button { min-height: 44px; font-size: 10px; padding: 0 16px; }
  .start-help { margin-top: 12px; font-size: 7px; }
  .run-result { gap: 20px; margin-bottom: 14px; }
  .run-result strong { font-size: 17px; }
  .text-button { margin-top: 2px; }
  .event-banner { font-size: 13px; }
}
/* Landscape becomes a small cabinet: utility rail, field, then thumb pad. */
@media (max-height: 560px) and (orientation: landscape), (max-height: 650px) and (min-width: 900px) {
  .app {
    min-height: 280px; max-width: 1100px;
    display: grid; grid-template-columns: 120px 1fr; column-gap: 20px;
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .app-header { height: 100%; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 14px 0; border: 0; }
  .studio { font-size: 9px; letter-spacing: 1px; gap: 6px; }
  .studio-division, .header-edition { display: none; }
  .system-controls { flex-direction: column; gap: 4px; }
  .icon-button { width: 44px; height: 44px; border-color: var(--line); }
  .station { padding: 0; min-width: 0; }
  .console, [data-auto-fire="false"] .console { width: auto; max-width: 100%; container-type: normal; box-shadow: none; }
  .hud { height: 40px; padding: 0 14px; }
  .hud strong { font-size: 18px; }
  .hud .micro-label { font-size: 7px; }
  .life-cells { height: 23px; }
  .life-cells i { height: 10px; width: 9px; }
  .input-surface { display: flex; }
  .arena { height: calc(100svh - 82px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); width: auto; flex-shrink: 0; }
  .thumb-deck, [data-auto-fire="false"] .thumb-deck {
    width: clamp(164px, 25vw, 240px); height: auto; border-top: 0; border-left: 1px solid var(--line);
    padding: 20px 16px; justify-content: center; gap: 22px;
  }
  .deck-top { grid-template-columns: 1fr auto; gap: 10px; }
  #charge-label { grid-column: 2; }
  .charge-track { grid-column: 1/-1; grid-row: 2; }
  .control-row { flex: 0 0 auto; min-height: 48px; flex-wrap: wrap; justify-content: flex-end; gap: 22px; }
  .control-row .thumb-track { flex: 1 0 100%; }
  .deck-actions { flex-wrap: wrap; }
  .deck-actions .deck-top { flex-basis: 100%; }
  .fire-button { min-height: 54px; flex-basis: 100%; }
  .thumb-deck p { line-height: 1.8; font-size: 8px; }
  .touch-cursor { top: 68px; bottom: 52px; }
  .console-footer { height: 24px; font-size: 7px; padding: 0 14px; }
  .field-guide, .app-footer { display: none; }
  .overlay { padding: 10px; }
  .title-eyebrow { font-size: 6px; letter-spacing: 0.8px; }
  .title-sigil { width: 42px; margin: 12px 0; }
  h1 { font-size: 40px; letter-spacing: -2.5px; }
  .overlay-copy { font-size: 7px; margin: 12px 0 14px; letter-spacing: 1px; }
  .start-button { min-height: 44px; font-size: 8px; padding: 0 12px; gap: 12px; }
  .start-help { font-size: 6px; margin-top: 10px; letter-spacing: 0.4px; }
  .run-result { gap: 14px; margin-bottom: 10px; }
  .run-result strong { font-size: 14px; }
  .run-result .micro-label { font-size: 6px; }
  .text-button { min-height: 44px; margin-top: 0; font-size: 8px; }
  .event-banner { font-size: 12px; }
}
@media (max-height: 350px) and (orientation: landscape) {
  .app { grid-template-columns: 95px 1fr; column-gap: 10px; }
  .title-sigil { width: 30px; margin: 8px 0; }
  h1 { font-size: 32px; }
  .overlay-copy { margin: 8px 0; }
  .title-eyebrow { display: none; }
  .start-help { margin-top: 8px; }
  .thumb-deck, [data-auto-fire="false"] .thumb-deck { gap: 10px; padding: 12px 14px; }
  .deck-actions { gap: 10px; }
  .fire-button { min-height: 44px; }
  [data-auto-fire="false"] .deck-actions { padding-bottom: 6px; margin-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
/* Size overlays from the actual cabinet, including short desktop windows and
   manual-fire layouts where controls reserve more vertical room. */
@container (max-width: 280px) {
  .hud { padding: 0 12px; gap: 8px; }
  .hud strong { font-size: 18px; }
  .wave-block strong { font-size: 16px; }
  .life-cells { gap: 3px; }
  .life-cells i { width: 8px; height: 10px; }
  .overlay { padding: 12px; }
  .title-eyebrow { font-size: 6px; letter-spacing: 0.8px; }
  .title-sigil { width: 36px; margin: 10px 0; }
  h1 { font-size: clamp(30px, 20cqw, 52px); letter-spacing: -2px; }
  .overlay-copy { font-size: 8px; margin: 12px 0; letter-spacing: 0.6px; }
  .start-button { min-height: 44px; padding: 0 12px; font-size: 8px; gap: 12px; }
  .start-help { margin-top: 10px; font-size: 6px; letter-spacing: 0.3px; }
  .run-result { gap: 16px; margin-bottom: 12px; }
  .run-result strong { font-size: 15px; margin-top: 5px; }
  .run-result .micro-label { font-size: 7px; }
  .text-button { min-height: 44px; margin-top: 0; font-size: 8px; }
  .thumb-deck, [data-auto-fire="false"] .thumb-deck { padding: 8px 12px; }
  .deck-actions { gap: 12px; }
  [data-auto-fire="false"] .deck-actions { padding-bottom: 6px; margin-bottom: 4px; }
  .fire-button { min-height: 44px; flex-basis: 62px; }
  .control-row { min-height: 44px; }
  .thumb-deck p { font-size: 7px; letter-spacing: 0; }
}
@container (max-width: 220px) {
  .hud strong { font-size: 16px; }
  .hud .micro-label { font-size: 6px; letter-spacing: 0.6px; }
  .console-footer { padding: 0 10px; font-size: 6px; letter-spacing: 0; white-space: nowrap; }
  .console-footer strong { letter-spacing: 0; }
  .overlay { padding: 8px; }
  .title-sigil { width: 28px; margin: 8px 0; }
  h1 { font-size: clamp(28px, 18cqw, 40px); letter-spacing: -1.5px; }
  .overlay-copy { margin: 8px 0; font-size: 7px; }
  .start-help { margin-top: 8px; }
  .run-result { gap: 12px; margin-bottom: 10px; }
  .run-result strong { font-size: 14px; }
}
