:root {
  --bg: #0c100b;
  --panel: #151c13;
  --panel-alt: #10150e;
  --border: #2e3b28;
  --border-gold: #eab308;
  --text-main: #f3f0e6;
  --text-dim: #a8b59e;
  --accent-gold: #facc15;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-crimson: #dc2626;
  --accent-lime: #84cc16;
  --accent-cyan: #38bdf8;
  --sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "Cascadia Code", "Consolas", "SFMono-Regular", Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: max(16px, min(1.25vw, 2.6vh));
}

html,
body {
  height: 100%;
  background: radial-gradient(circle at 50% 0%, #1c2617 0%, var(--bg) 70%);
  color: var(--text-main);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: 100%;
  height: 100dvh;
  margin: 0 auto;
  padding: 0.375rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
}

.app-shell[data-phase="playing"] #game-canvas {
  cursor: none;
}

/* Header */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.brand-seal {
  width: 2rem;
  height: 2rem;
  border-radius: 0.4375rem;
  background: linear-gradient(145deg, #b91c1c 0%, #7f1d1d 100%);
  border: 0.125rem solid var(--border-gold);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 900;
  color: #fef08a;
  box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

.brand-titles {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
}

.brand-titles h1 {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fef08a;
  white-space: nowrap;
}

.version-badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: #fde68a;
  background: #232d1e;
  border: 0.0625rem solid rgba(250, 204, 21, 0.45);
  border-radius: 62.4375rem;
  padding: 0.0625rem 0.4375rem;
  text-decoration: none;
}

.version-badge:hover {
  border-color: var(--accent-gold);
  background: #2d3b26;
}

.brand-sub {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: nowrap;
}

.ui-btn {
  padding: 0.3125rem 0.625rem;
  border-radius: 0.375rem;
  border: 0.0625rem solid #3c4d35;
  background: #1a2217;
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.ui-btn:hover:not(:disabled) {
  border-color: var(--border-gold);
  background: #24301f;
}

.ui-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.ui-btn.is-muted {
  border-color: var(--accent-red);
  color: #fca5a5;
}

/* Main Cabinet */
.cabinet-wrap {
  flex: 1 1 auto;
  min-height: 0;
  background: linear-gradient(180deg, #161e13 0%, #0e130c 100%);
  border: 0.125rem solid var(--border);
  border-radius: 0.625rem;
  padding: 0.375rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.72);
}

/* HUD Bars */
.arcade-hud {
  background: #0b0f0a;
  border: 0.0625rem solid var(--border);
  border-radius: 0.4375rem;
  padding: 0.25rem 0.625rem;
  flex-shrink: 0;
}

.hud-top {
  display: grid;
  grid-template-columns: auto auto auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.875rem;
}

.hud-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.hud-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.hud-value {
  font-family: var(--mono);
  font-size: 0.96rem;
  font-weight: 900;
  color: #f8fafc;
}

.score-val {
  color: #fde047;
}

.high-val {
  color: #a3e635;
}

.combo-val {
  color: #38bdf8;
}

.saved-val {
  color: #4ade80;
}

.grade-val {
  color: #fb923c;
}

.hud-progress-block {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  min-width: 0;
}

.hud-era-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hud-era-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: #fef08a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-pill {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 900;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
  background: #232d1f;
  border: 0.0625rem solid #4d6443;
  color: #bef264;
  white-space: nowrap;
}

.mode-pill.is-paradox {
  background: #3b1734;
  border-color: #f472b6;
  color: #fbcfe8;
}

.hud-track {
  height: 0.4375rem;
  background: #171f14;
  border: 0.0625rem solid #32422b;
  border-radius: 0.25rem;
  overflow: hidden;
}

.hud-track-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #65a30d 0%, #facc15 70%, #ef4444 100%);
  transition: width 0.1s linear;
}

/* Bottom Weapon HUD */
.hud-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1.1fr auto;
  align-items: center;
  gap: 0.625rem;
}

.hud-vitals {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.hud-portrait {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  border: 0.0625rem solid #47583e;
  background: #141c11;
  flex-shrink: 0;
}

.hp-block {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  min-width: 0;
}

.hp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.hp-val {
  color: #fef08a;
  font-weight: 900;
}

.hp-track {
  height: 0.625rem;
  background: #1c1313;
  border: 0.0625rem solid #4a3535;
  border-radius: 0.25rem;
  overflow: hidden;
  padding: 0.0625rem;
}

.hp-fill {
  height: 100%;
  width: 100%;
  border-radius: 0.125rem;
  background: linear-gradient(90deg, #dc2626 0%, #f59e0b 55%, #84cc16 100%);
  transition: width 0.1s linear;
}

.hud-weapon-box {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.25rem 0.5625rem;
  border-radius: 0.375rem;
  border: 0.0625rem solid #36452e;
  background: #131a11;
  color: var(--text-main);
  text-align: left;
  min-width: 0;
}

.primary-weapon-box {
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.primary-weapon-box:hover {
  border-color: var(--border-gold);
  background: #1c2618;
}

.primary-weapon-box.is-low {
  border-color: var(--accent-amber);
  background: #272011;
}

.primary-weapon-box.is-empty {
  border-color: var(--accent-red);
  background: #281414;
}

.primary-weapon-box.is-reloading {
  border-color: var(--accent-cyan);
  background: #102330;
}

.primary-weapon-box.no-reload {
  cursor: default;
}

.weapon-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.375rem;
  font-family: var(--mono);
}

.weapon-name {
  font-size: 0.68rem;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weapon-count {
  font-size: 0.74rem;
  font-weight: 900;
  color: #f8fafc;
  white-space: nowrap;
}

.ammo-pips {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  height: 0.5625rem;
  overflow: hidden;
}

.ammo-pip {
  flex: 1 1 0;
  max-width: 0.4375rem;
  height: 100%;
  border-radius: 0.09375rem;
  background: linear-gradient(180deg, #fde047 0%, #b45309 100%);
}

.ammo-pip.spent {
  background: #252e20;
  opacity: 0.45;
}

.heavy-pips .ammo-pip {
  max-width: 1.125rem;
  background: linear-gradient(180deg, #f87171 0%, #991b1b 100%);
}

.reload-cue,
.secondary-hint {
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.primary-weapon-box.is-empty .reload-cue {
  color: #fca5a5;
}

.primary-weapon-box.is-reloading .reload-cue {
  color: #7dd3fc;
}

.hud-buff-pill {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5625rem;
  border-radius: 0.375rem;
  border: 0.0625rem solid #38bdf8;
  background: rgba(14, 116, 144, 0.45);
  color: #e0f2fe;
  white-space: nowrap;
}

/* Canvas Stage & Overlays */
.canvas-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060806;
  border: 0.125rem solid #293624;
  border-radius: 0.4375rem;
  overflow: hidden;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.stage-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 8, 0.88);
  backdrop-filter: blur(0.25rem);
  display: flex;
  overflow-y: auto;
  padding: 0.5rem 0.875rem;
  z-index: 10;
}

.title-screen-overlay {
  padding: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(160, 32, 24, 0.26) 0%, rgba(14, 20, 12, 0.96) 72%),
    linear-gradient(180deg, #161f12 0%, #0a0d09 100%);
  backdrop-filter: none;
}

.title-card {
  margin: auto;
  width: 100%;
  min-height: 100%;
  max-width: 104rem;
  padding: 0.75rem clamp(1.25rem, 3.2vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 0.625rem;
}

.title-hero {
  display: flex;
  align-items: center;
  gap: 1.125rem;
}

.title-emblem-wrap {
  flex-shrink: 0;
  padding: 0.375rem;
  border-radius: 0.75rem;
  border: 0.125rem solid var(--border-gold);
  background: radial-gradient(circle at 50% 35%, #27341e 0%, #10160d 100%);
  box-shadow: 0 0 1.5rem rgba(234, 179, 8, 0.24);
}

#title-hamster-canvas {
  display: block;
  width: 7.75rem;
  height: 7.75rem;
}

.title-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
}

.title-classification {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #fca5a5;
}

.title-logo {
  font-size: 2.15rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.02;
  background: linear-gradient(180deg, #fef9c3 0%, #facc15 55%, #ca8a04 100%);
  background-clip: text;
  color: transparent;
}

.title-tagline {
  font-size: 0.86rem;
  line-height: 1.35;
  color: #dce3d5;
}

.title-telemetry-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4375rem;
  margin-top: 0.125rem;
}

.tele-box {
  background: rgba(12, 16, 11, 0.85);
  border: 0.0625rem solid #32422b;
  border-radius: 0.4375rem;
  padding: 0.3125rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.0625rem;
}

.tele-lbl {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.tele-num {
  font-family: var(--mono);
  font-size: 0.94rem;
  font-weight: 900;
  color: #a3e635;
}

.tele-num.gold {
  color: #fde047;
}

.tele-num.muted {
  color: #9ca3af;
  font-size: 0.78rem;
}

.tele-num.unlocked {
  color: #f472b6;
}

.title-brief-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}

.brief-col {
  background: rgba(14, 19, 12, 0.86);
  border: 0.0625rem solid #2c3a26;
  border-radius: 0.4375rem;
  padding: 0.4375rem 0.75rem;
}

.brief-col h3 {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin-bottom: 0.25rem;
}

.brief-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #e4e8df;
}

kbd {
  display: inline-block;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.25rem;
  background: #232d1f;
  border: 0.0625rem solid #4c6042;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #fef3c7;
}

.title-actions,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.primary-btn {
  padding: 0.5rem 1.0625rem;
  border-radius: 0.4375rem;
  border: 0.0625rem solid #fde047;
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  color: #fffbeb;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 0.25rem 0.875rem rgba(220, 38, 38, 0.38);
}

.primary-btn:hover:not(:disabled) {
  filter: brightness(1.1);
}

.primary-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.primary-btn.paradox-btn {
  border-color: #f9a8d4;
  background: linear-gradient(180deg, #9d174d 0%, #581c87 100%);
  box-shadow: 0 0.25rem 0.875rem rgba(157, 23, 77, 0.4);
}

.secondary-btn {
  padding: 0.5rem 0.9375rem;
  border-radius: 0.4375rem;
  border: 0.0625rem solid #45593c;
  background: #1b2417;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.secondary-btn:hover {
  border-color: var(--border-gold);
  background: #24311f;
}

/* Modals */
.modal-card {
  margin: auto;
  width: min(46rem, 100%);
  background: linear-gradient(180deg, #182014 0%, #10150d 100%);
  border: 0.125rem solid var(--border-gold);
  border-radius: 0.625rem;
  padding: 0.875rem 1.125rem;
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 0.5625rem;
}

.modal-card.wide-modal {
  width: min(60rem, 100%);
}

.modal-card.compact {
  width: min(29rem, 100%);
  text-align: center;
}

.modal-card.compact .title-classification,
.modal-card.summary-card .title-classification {
  text-align: center;
}

.modal-card h2 {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fde047;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.modal-sub {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.stage-select-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.paradox-toggle-btn.is-paradox {
  border-color: #f472b6;
  background: #4a154b;
  color: #fbcfe8;
}

.stage-select-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.era-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1875rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.4375rem;
  border: 0.0625rem solid #3c4d35;
  background: #11170f;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
}

.era-card:hover:not(:disabled) {
  border-color: var(--border-gold);
  background: #1b2517;
}

.era-card:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.era-card-num {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 900;
  color: #a3e635;
}

.era-card-name {
  font-size: 0.84rem;
  font-weight: 900;
  color: #fef08a;
}

.era-card-loadout {
  font-size: 0.68rem;
  color: var(--text-dim);
  line-height: 1.25;
}

.howto-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5625rem;
}

.howto-card {
  background: #11160f;
  border: 0.0625rem solid #2e3b28;
  border-radius: 0.4375rem;
  padding: 0.5rem 0.6875rem;
}

.howto-card h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin-bottom: 0.25rem;
}

.howto-card p {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #dce3d5;
}

.scores-card {
  width: min(38rem, 100%);
}

.scores-table-wrap {
  border: 0.0625rem solid #2e3b28;
  border-radius: 0.4375rem;
  overflow: hidden;
  background: #0e130c;
}

.scores-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.76rem;
}

.scores-table th,
.scores-table td {
  padding: 0.3125rem 0.625rem;
  text-align: left;
  border-bottom: 0.0625rem solid #202a1c;
}

.scores-table th {
  background: #172013;
  color: var(--accent-gold);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.scores-table tr:last-child td {
  border-bottom: none;
}

.scores-table td:first-child {
  color: #a3e635;
  font-weight: 800;
}

.scores-table td:nth-child(3) {
  color: #fde047;
  font-weight: 900;
}

/* Pause Volume Controls */
.volume-controls {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
  background: #0e130c;
  border: 0.0625rem solid #2e3b28;
  border-radius: 0.4375rem;
  padding: 0.5625rem 0.75rem;
}

.vol-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 2.75rem;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-main);
}

.vol-row input[type="range"] {
  accent-color: #eab308;
  cursor: pointer;
}

.vol-val {
  text-align: right;
  color: #fde047;
}

.confirm-note {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: #fde68a;
  flex-basis: 100%;
}

/* Stage Clear & Game Over Summaries */
.summary-card {
  width: min(40rem, 100%);
  text-align: center;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.sum-stat {
  background: #0e130c;
  border: 0.0625rem solid #2f3d29;
  border-radius: 0.4375rem;
  padding: 0.4375rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sum-stat span {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-dim);
}

.sum-stat strong {
  font-family: var(--mono);
  font-size: 1rem;
  color: #fde047;
}

.grade-showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.375rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 800;
}

.grade-letter {
  font-size: 2rem;
  color: #a3e635;
  text-shadow: 0 0 0.75rem rgba(163, 230, 53, 0.55);
}

.initials-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.75rem;
  background: #172013;
  border: 0.0625rem solid #84cc16;
  border-radius: 0.4375rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 800;
  color: #bef264;
}

.initials-box input {
  width: 3.75rem;
  padding: 0.25rem 0.375rem;
  text-align: center;
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #fde047;
  background: #0b0f0a;
  border: 0.0625rem solid #eab308;
  border-radius: 0.3125rem;
}

/* Footer */
.cabinet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.footer-left,
.footer-center,
.footer-right {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  white-space: nowrap;
}

.reset-save-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.66rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.125rem 0.25rem;
}

.reset-save-btn:hover {
  color: var(--accent-red);
}

.dock-pill {
  display: inline-flex;
  align-items: center;
  background: #141b11;
  border: 0.0625rem solid #32422b;
  border-radius: 0.375rem;
  padding: 0.0625rem;
}

.dock-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0 0.3125rem;
}

.dock-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.dock-btn.active {
  background: #eab308;
  color: #11160f;
}

/* Compact 4K@300% (1280x585) zero-scroll tuning */
@media (max-height: 660px), (min-width: 1281px) and (min-height: 616px) and (min-aspect-ratio: 1280/660) {
  .app-shell {
    padding: 0.25rem 0.625rem;
    gap: 0.22rem;
  }
  .cabinet-wrap {
    padding: 0.28rem 0.45rem;
    gap: 0.22rem;
  }
  .arcade-hud {
    padding: 0.18rem 0.5rem;
  }
  .hud-portrait {
    width: 2.125rem;
    height: 2.125rem;
  }
  .hud-weapon-box {
    padding: 0.18rem 0.5rem;
  }
  .ammo-pips {
    height: 0.4375rem;
  }
  .title-card {
    padding: 0.4rem clamp(1rem, 2.5vw, 2.5rem);
    gap: 0.35rem;
  }
  #title-hamster-canvas {
    width: 6.25rem;
    height: 6.25rem;
  }
  .title-logo {
    font-size: 1.75rem;
  }
  .title-tagline {
    font-size: 0.78rem;
  }
  .tele-box {
    padding: 0.2rem 0.45rem;
  }
  .tele-num {
    font-size: 0.85rem;
  }
  .brief-col {
    padding: 0.3rem 0.6rem;
  }
  .brief-col ul {
    font-size: 0.74rem;
    line-height: 1.22;
  }
  .modal-card {
    padding: 0.55rem 0.9rem;
    gap: 0.38rem;
  }
  .modal-card h2 {
    font-size: 1.12rem;
  }
  .howto-card {
    padding: 0.38rem 0.55rem;
  }
  .howto-card p {
    font-size: 0.7rem;
    line-height: 1.26;
  }
  .scores-table th,
  .scores-table td {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
  }
  .era-card {
    padding: 0.38rem 0.5rem;
  }
}
