:root {
  color-scheme: dark;
  --font-arcade: "Press Start 2P", "Pixelify Sans", ui-monospace, monospace;
  --font-display: "Pixelify Sans", ui-monospace, monospace;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --bg-page: #080b12;
  --bg-rpg: #121826;
  --bg-rpg-deep: #0b0f19;
  --rim-outer: #07090f;
  --rim-mid: #4e6085;
  --rim-gold: #f7cc48;

  --ink: #f2ece0;
  --ink-soft: #b2bfd6;
  --ink-dim: #7b8aa6;
  --ink-dark: #141926;
  --focus: #ffe48a;

  --gold: #f7cc48;
  --gold-hi: #fff2b2;
  --gold-sh: #9c6a10;

  --sky-bg: #f2d8a7; --sky-hi: #fff3d6; --sky-sh: #a68247; --sky-ink: #24170a;
  --abyss-bg: #245878; --abyss-hi: #58a2cf; --abyss-sh: #0f2b3d; --abyss-ink: #eef8ff;
  --past-bg: #b85b52; --past-hi: #e8958c; --past-sh: #6b2b25; --past-ink: #fff5ed;
  --future-bg: #2c756c; --future-hi: #66c9bc; --future-sh: #133d38; --future-ink: #edfcf9;
  --giant-bg: #c97832; --giant-hi: #fab878; --giant-sh: #733c10; --giant-ink: #fff7ed;
  --micro-bg: #66489c; --micro-hi: #b292f0; --micro-sh: #36205c; --micro-ink: #f6f0ff;

  --perfect: #f7cc48;
  --excellent: #a87cf0;
  --great: #62aae8;
  --ok: #64c986;
  --weak: #e06358;
  --timeout: #7c8591;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--bg-page);
}

/* ==================== 16-BIT PIXEL CHROME PRIMITIVES ==================== */
.pixel-box {
  background: var(--bg-rpg);
  border: 2px solid var(--rim-outer);
  border-radius: 0;
  box-shadow:
    inset 0 0 0 2px var(--rim-mid),
    inset 0 0 0 4px #1d273d,
    0 6px 0 rgba(5, 7, 12, 0.85);
}

.pixel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border: 2px solid var(--rim-outer);
  border-radius: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: transform 0.06s steps(2), filter 0.1s steps(2);
}

.pixel-btn:hover {
  filter: brightness(1.08);
}

.pixel-btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.3) !important;
}

.pixel-btn--gold {
  background: var(--gold);
  color: #291a03;
  box-shadow:
    inset 0 2px 0 var(--gold-hi),
    inset 0 -3px 0 var(--gold-sh),
    0 3px 0 var(--rim-outer);
}

.pixel-btn--dark {
  background: #1d273b;
  color: var(--ink);
  box-shadow:
    inset 0 2px 0 #3f5278,
    inset 0 -3px 0 #0e1421,
    0 3px 0 var(--rim-outer);
}

.pixel-btn--ghost {
  background: rgba(14, 20, 32, 0.88);
  color: var(--ink-soft);
  box-shadow:
    inset 0 2px 0 #334261,
    inset 0 -2px 0 #0a0e18,
    0 2px 0 var(--rim-outer);
}

.pixel-btn--ghost:hover {
  color: var(--gold);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 13px;
}

.btn-xs {
  padding: 5px 9px;
  font-size: 12px;
}

/* ==================== PIXEL CANVAS & CRT ==================== */
.world-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.crt-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.app--no-crt .crt-layer {
  display: none;
}

.crt-lines {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(6, 5, 12, 0.16) 2px 4px
  );
  mix-blend-mode: multiply;
}

.crt-vignette {
  background: radial-gradient(
    ellipse at center,
    transparent 56%,
    rgba(6, 5, 10, 0.32) 86%,
    rgba(6, 5, 10, 0.62) 100%
  );
}

.crt-glass {
  background: linear-gradient(160deg, rgba(255, 250, 240, 0.04) 0%, transparent 40%);
}

/* ==================== TOP 16-BIT HUD ==================== */
.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  pointer-events: none;
}

.hud-left,
.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.hud-plaque {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  background: #121826;
  border: 2px solid var(--rim-outer);
  box-shadow:
    inset 0 0 0 2px #3c4d70,
    0 3px 0 rgba(5, 7, 12, 0.8);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.hud-player:hover {
  box-shadow:
    inset 0 0 0 2px var(--gold),
    0 3px 0 rgba(5, 7, 12, 0.8);
}

.hud-home-btn,
.hud-lb-btn {
  padding: 6px 11px;
  font-size: 13px;
}

.hud-zone-metric {
  color: var(--gold);
  font-size: 12px;
}

.hud-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #172033;
  border: 2px solid var(--rim-outer);
  box-shadow:
    inset 0 2px 0 #3f5278,
    inset 0 -2px 0 #0b101b,
    0 3px 0 rgba(5, 7, 12, 0.8);
  color: var(--ink);
}

.hud-icon-btn:hover {
  color: var(--gold);
}

.hud-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  background: var(--gold);
}

/* ==================== ALTITUDE / SCALE RULER ==================== */
.altitude-ruler {
  position: fixed;
  top: 66px;
  bottom: 24px;
  right: 12px;
  width: 18px;
  z-index: 12;
  pointer-events: none;
}

.ruler__track {
  position: relative;
  width: 4px;
  height: 100%;
  margin: 0 auto;
  background: rgba(18, 24, 38, 0.85);
  border: 1px solid #4e6085;
}

.ruler__surface {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 10px;
  height: 2px;
  background: var(--gold);
}

.ruler__cursor {
  position: absolute;
  left: -4px;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  background: #ffffff;
  border: 2px solid var(--rim-outer);
  transition: top 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.ruler__ghost {
  position: absolute;
  right: 10px;
  margin-top: -8px;
  color: var(--gold);
  filter: drop-shadow(0 2px 0 #07090f);
}

/* ==================== STAGE & HOME VIEW ==================== */
.stage-root {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.home-view {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 54px 16px 20px;
  gap: 12px;
}

.home-brand {
  text-align: center;
  margin-top: 2px;
}

.brand-logo {
  margin: 0;
  font-family: var(--font-arcade);
  font-size: clamp(30px, 5.2vw, 54px);
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: #fff2c4;
  text-shadow:
    -3px 0 0 #090c14,
    3px 0 0 #090c14,
    0 -3px 0 #090c14,
    0 3px 0 #090c14,
    0 6px 0 #9c6a10,
    0 9px 0 #090c14;
}

.brand-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: #121826;
  border: 2px solid var(--rim-outer);
  box-shadow: inset 0 0 0 2px var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.home-panel {
  width: min(580px, 100%);
  margin-top: auto;
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.home-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.home-top-strip__left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.streak-chip {
  color: #ffbd4a;
  padding: 4px 9px;
}

.run-mode-toggle {
  display: inline-flex;
  background: #0d121d;
  border: 2px solid var(--rim-outer);
  box-shadow: inset 0 0 0 2px #364566;
  padding: 3px;
}

.run-toggle-btn {
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.run-toggle-btn--active {
  background: var(--gold);
  color: #241603;
}

/* 3x2 16-bit Core Mode Grid */
.mode-grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.mode-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 96px;
  padding: 10px 8px;
  border: 2px solid var(--rim-outer);
  border-radius: 0;
  text-align: center;
  transition: transform 0.06s steps(2), filter 0.1s steps(2);
}

.mode-tile:hover {
  filter: brightness(1.07);
}

.mode-tile:hover::before {
  content: "▶";
  position: absolute;
  top: 6px;
  left: 7px;
  font-size: 10px;
  opacity: 0.9;
}

.mode-tile:active {
  transform: translateY(4px);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.25) !important;
}

.mode-tile--sky {
  background: var(--sky-bg); color: var(--sky-ink);
  box-shadow: inset 0 3px 0 var(--sky-hi), inset 0 -4px 0 var(--sky-sh), 0 4px 0 var(--rim-outer);
}
.mode-tile--abyss {
  background: var(--abyss-bg); color: var(--abyss-ink);
  box-shadow: inset 0 3px 0 var(--abyss-hi), inset 0 -4px 0 var(--abyss-sh), 0 4px 0 var(--rim-outer);
}
.mode-tile--past {
  background: var(--past-bg); color: var(--past-ink);
  box-shadow: inset 0 3px 0 var(--past-hi), inset 0 -4px 0 var(--past-sh), 0 4px 0 var(--rim-outer);
}
.mode-tile--future {
  background: var(--future-bg); color: var(--future-ink);
  box-shadow: inset 0 3px 0 var(--future-hi), inset 0 -4px 0 var(--future-sh), 0 4px 0 var(--rim-outer);
}
.mode-tile--giant {
  background: var(--giant-bg); color: var(--giant-ink);
  box-shadow: inset 0 3px 0 var(--giant-hi), inset 0 -4px 0 var(--giant-sh), 0 4px 0 var(--rim-outer);
}
.mode-tile--micro {
  background: var(--micro-bg); color: var(--micro-ink);
  box-shadow: inset 0 3px 0 var(--micro-hi), inset 0 -4px 0 var(--micro-sh), 0 4px 0 var(--rim-outer);
}

.mode-tile__arrow svg {
  width: 20px;
  height: 20px;
  display: block;
}

.mode-tile__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.08em;
  line-height: 1.05;
}

.mode-tile__head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

.mode-tile__sub {
  font-size: 11px;
  opacity: 0.9;
}

.mode-tile--compact {
  min-height: 68px;
  padding: 8px 6px;
}

/* 2 Special Arcade Mode Banners (Iron Hop & Blitz) */
.arcade-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.arcade-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 12px;
  border: 2px solid var(--rim-outer);
  text-align: center;
  transition: transform 0.06s steps(2), filter 0.1s steps(2);
}

.arcade-card:hover {
  filter: brightness(1.08);
}

.arcade-card:active {
  transform: translateY(3px);
}

.arcade-card--iron {
  background: linear-gradient(180deg, #5e1d2a 0%, #3d111b 100%);
  color: #ffeef0;
  box-shadow: inset 0 3px 0 #a83b4e, inset 0 -4px 0 #240910, 0 4px 0 var(--rim-outer);
}

.arcade-card--blitz {
  background: linear-gradient(180deg, #4f3b85 0%, #2d2054 100%);
  color: #fff6d6;
  box-shadow: inset 0 3px 0 #9579db, inset 0 -4px 0 #191033, 0 4px 0 var(--rim-outer);
}

.arcade-card__head {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.arcade-card__sub {
  font-size: 11px;
  color: rgba(255, 248, 232, 0.88);
}

.home-subbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.subbar-btn {
  padding: 8px 6px;
  font-size: 12px;
}

.home-util-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Bottom-right Personal Record Plaque */
.records-board {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 242px;
  padding: 12px 13px;
  z-index: 11;
}

.records-title {
  font-family: var(--font-arcade);
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.records-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.rec-cell__lbl {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--ink-soft);
}

.rec-cell__val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.rec-cell__val span {
  font-size: 10px;
  color: var(--ink-dim);
  margin-left: 2px;
}

.records-arcade {
  display: flex;
  justify-content: space-between;
  padding-top: 7px;
  border-top: 2px dashed #313f5e;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--gold);
}

.records-arcade strong {
  margin-left: 4px;
  color: var(--ink);
}

/* ==================== GAMEPLAY VIEW ==================== */
.game-view,
.blitz-view {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 62px 16px 26px;
}

.game-stage {
  width: min(540px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.question-card {
  position: relative;
  width: 100%;
  padding: 18px 22px 24px;
  text-align: center;
  transition: transform 0.25s ease;
}

.question-card--verdict {
  padding: 16px 0 0;
  overflow: hidden;
}

.question-card--verdict .card-top,
.question-card--verdict .card-meta,
.question-card--verdict .question-prompt {
  padding-left: 20px;
  padding-right: 20px;
}

.verdict--perfect {
  box-shadow: inset 0 0 0 2px var(--gold), inset 0 0 0 4px #6b4c0c, 0 0 28px rgba(247, 204, 72, 0.35);
}

.verdict--excellent {
  box-shadow: inset 0 0 0 2px var(--excellent), inset 0 0 0 4px #3c226e, 0 0 24px rgba(168, 124, 240, 0.3);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-slots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.hp-bar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hp-heart svg {
  width: 20px;
  height: 20px;
  display: block;
}

.hp-round {
  margin-left: 6px;
  padding: 2px 7px;
  background: #232f4a;
  border: 2px solid var(--rim-outer);
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--gold);
}

.slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 18px;
  background: #1b2438;
  border: 2px solid #090c14;
}

.slot--active {
  border-color: var(--gold);
  background: #2c3a59;
}

.slot--done {
  background: var(--slot-bg);
  color: var(--slot-ink);
}

.slot--done svg {
  width: 11px;
  height: 11px;
}

.live-score {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--gold);
}

.live-score span {
  font-size: 11px;
  color: var(--ink-soft);
  margin-left: 4px;
}

.card-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.card-meta__sep { opacity: 0.4; }
.card-meta__src { color: var(--ink-soft); }

.question-prompt {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.18;
  color: var(--ink);
}

.question-prompt--compact {
  font-size: clamp(19px, 2.8vw, 24px);
  margin-bottom: 12px;
}

.question-sub {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.timer-track {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 7px;
  background: #0a0e18;
  border-top: 2px solid #07090f;
}

.timer-track--untimed { display: none; }

.timer-fill {
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--gold) 0 10px, #e3b232 10px 12px);
  transition: width 0.05s linear;
}

.timer-fill--urgent {
  background: repeating-linear-gradient(90deg, #eb4d5c 0 10px, #b82c3a 10px 12px);
}

/* Answer Input Dock */
.answer-dock {
  width: min(490px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.answer-feedback {
  padding: 8px 12px;
  border: 2px solid var(--rim-outer);
  font-size: 12.5px;
  text-align: center;
}

.answer-feedback--error {
  background: #8f2626;
  box-shadow: inset 0 0 0 2px #f28c8c;
  color: #fff5f5;
}

.answer-feedback--judging {
  background: #23355c;
  box-shadow: inset 0 0 0 2px #62aae8;
  color: #e6f4ff;
}

.answer-feedback--secret {
  background: #3d246e;
  box-shadow: inset 0 0 0 2px var(--gold);
  color: #fff6d6;
}

.answer-actions-row {
  display: flex;
  justify-content: flex-end;
  min-height: 28px;
}

.answer-form {
  display: flex;
  gap: 8px;
  padding: 9px;
}

.answer-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background: #090d16;
  border: 2px solid #4e6085;
  color: var(--ink);
  font-size: 15px;
}

.answer-input:focus {
  border-color: var(--gold);
}

.answer-input::placeholder {
  color: var(--ink-dim);
}

.btn-submit {
  flex-shrink: 0;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.input-shake {
  animation: shake 0.22s steps(3);
}

/* Verdict Reveal & Iron Hop Banners */
@keyframes shimmerBg {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.verdict-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 20px;
  background: var(--tier-bg);
  color: var(--tier-ink);
  border-top: 2px solid var(--rim-outer);
  border-bottom: 2px solid var(--rim-outer);
  font-family: var(--font-display);
  font-weight: 700;
}

.verdict-banner--perfect {
  background: linear-gradient(90deg, #d99a26, #ffe48a, #f7cc48, #fff6d0, #d99a26);
  background-size: 200% 100%;
  animation: shimmerBg 3s linear infinite;
}

.verdict-banner--excellent {
  background: linear-gradient(90deg, #8052c4, #cdb2f5, #a87cf0, #efe0ff, #8052c4);
  background-size: 200% 100%;
  animation: shimmerBg 3.4s linear infinite;
}

.verdict-banner__left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 23px;
  letter-spacing: 0.06em;
}

.verdict-icon svg { width: 20px; height: 20px; display: block; }
.verdict-pts { font-size: 26px; }
.verdict-pts span { font-size: 12px; margin-left: 3px; }

.iron-banner {
  padding: 7px 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--rim-outer);
}

.iron-banner--dmg,
.iron-banner--dead {
  background: #6e1824;
  color: #ffd6dc;
}

.iron-banner--heal {
  background: #1b5936;
  color: #d6ffea;
}

.verdict-body {
  padding: 14px 20px 10px;
  text-align: left;
}

.verdict-expl { margin: 0 0 12px; font-size: 13.5px; color: var(--ink); }

.examples-heading {
  font-family: var(--font-arcade);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  margin-bottom: 8px;
}

.examples-list { display: flex; flex-direction: column; gap: 7px; }

.example-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}

.example-row--you { color: var(--ink); font-weight: 600; }

.ex-tier {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 96px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 12px;
}
.ex-tier svg { width: 11px; height: 11px; }

.example-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.you-tag { font-style: normal; color: var(--gold); font-size: 11px; }

.example-bar-wrap {
  width: 92px;
  height: 8px;
  background: #0a0e18;
  border: 1px solid #354566;
  overflow: hidden;
  flex-shrink: 0;
}

.example-bar { display: block; height: 100%; }
.example-bar--gold { background: var(--gold) !important; }

.example-val {
  min-width: 64px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.verdict-footer { padding: 12px 20px 18px; }
.btn-next { width: 100%; }

/* ==================== BLITZ 60S ARCADE VIEW ==================== */
.blitz-stage {
  width: min(640px, 100%);
}

.blitz-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blitz-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.blitz-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #47327d;
  border: 2px solid var(--rim-outer);
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}

.blitz-clock {
  font-family: var(--font-arcade);
  font-size: 20px;
  color: var(--gold);
}

.blitz-clock--urgent {
  color: #ff6b78;
}

.blitz-score-box {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.blitz-score-box span {
  font-size: 11px;
  color: var(--ink-soft);
  margin-left: 4px;
}

.blitz-progress-track {
  height: 10px;
  background: #090d16;
  border: 2px solid var(--rim-outer);
}

.blitz-progress-fill {
  height: 100%;
  background: repeating-linear-gradient(90deg, #a87cf0 0 12px, #f7cc48 12px 16px);
  transition: width 0.06s linear;
}

.blitz-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-soft);
}

.blitz-combo {
  padding: 3px 9px;
  background: #1b2438;
  border: 2px solid var(--rim-outer);
  color: var(--ink);
}

.blitz-combo--hot {
  background: #8c4516;
  color: #fff2b2;
  box-shadow: inset 0 0 0 2px var(--gold);
}

.blitz-form {
  display: flex;
  gap: 8px;
}

.blitz-toast {
  min-height: 22px;
  font-family: var(--font-display);
  font-size: 14px;
}

.blitz-toast--ok { color: var(--ok); }
.blitz-toast--err { color: var(--weak); }
.blitz-toast--warn { color: var(--gold); }
.blitz-toast--info { color: var(--great); }

.blitz-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 110px;
  max-height: 230px;
  overflow-y: auto;
  padding: 10px;
  background: #0b0f19;
  border: 2px solid #2b3854;
  align-content: flex-start;
}

.blitz-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: var(--chip-col);
  color: var(--chip-ink);
  border: 2px solid var(--rim-outer);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.blitz-chip svg { width: 11px; height: 11px; }

.blitz-chip--missed {
  background: #1a2336;
  color: var(--ink-soft);
  font-weight: 400;
}

.blitz-summary-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.blitz-end-actions {
  display: flex;
  gap: 10px;
}
.blitz-end-actions > * { flex: 1; }

/* ==================== COMPLETION SUMMARY VIEW ==================== */
.summary-view {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 30px;
}

.summary-layout {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: start;
}

.summary-card { padding: 20px; }
.summary-kicker { font-family: var(--font-display); font-size: 14px; letter-spacing: 0.08em; margin-bottom: 4px; }
.summary-score-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.summary-big-score { font-family: var(--font-arcade); font-size: 40px; line-height: 1; color: var(--gold); }
.summary-max-score { font-family: var(--font-display); font-size: 18px; color: var(--ink-soft); }

.perfect-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: #47340d;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 13px;
}

.streak-box {
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #1d1a14;
  border: 2px solid #8a5e22;
}

.streak-box__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.streak-flame { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 15px; color: #ffbd4a; }
.streak-pips { display: flex; gap: 4px; }
.streak-pip { width: 10px; height: 10px; background: #2c2a24; border: 1px solid #090c14; }
.streak-pip--lit { background: #ffaa3b; }
.streak-box__sub { margin-top: 4px; font-size: 12px; color: var(--ink-soft); }

.summary-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-height: 270px;
  overflow-y: auto;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
  background: #172033;
  border: 2px solid var(--rim-outer);
  border-left: 5px solid var(--row-accent);
}

.summary-row:hover { background: #202d47; }
.summary-row__main { display: flex; flex-direction: column; min-width: 0; }
.summary-row__q { font-size: 11px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-row__a { font-size: 13px; color: var(--ink); font-weight: 600; }
.summary-row__score { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-family: var(--font-display); font-size: 16px; }
.summary-row__tier { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; }
.summary-row__tier svg { width: 11px; height: 11px; }

.summary-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-play-again { width: 100%; }
.summary-actions-sub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.summary-side { display: flex; flex-direction: column; gap: 12px; }
.name-card { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; }
.name-card__kicker { font-family: var(--font-arcade); font-size: 8px; color: var(--ink-dim); margin-bottom: 4px; }
.name-card__val { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 17px; }

.curve-card { padding: 16px; }
.curve-card__kicker { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 13px; letter-spacing: 0.06em; margin-bottom: 6px; }
.curve-card__rank { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.1; }
.curve-card__rank span { font-size: 16px; color: var(--ink-soft); }
.curve-card__pct { font-size: 12px; color: var(--gold); margin-bottom: 12px; }

.bell-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 102px;
  padding-top: 20px;
  border-bottom: 2px solid #4e6085;
}

.bell-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bell-bar { width: 100%; background: #3b5d85; border-top: 2px solid #8eb8e8; }
.bell-col--you .bell-bar { background: var(--gold); border-top-color: #fff6cc; }
.bell-you-tag { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--gold); }
.bell-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--ink-dim); }

.mini-board { margin-top: 14px; padding-top: 10px; border-top: 2px dashed #313f5e; }
.mini-board__title { font-family: var(--font-arcade); font-size: 9px; color: var(--ink-soft); margin-bottom: 8px; }
.mini-board-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; }
.mini-board-rank { width: 24px; color: var(--gold); font-family: var(--font-display); font-weight: 700; }
.mini-board-name { flex: 1; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-board-pts { font-family: var(--font-display); color: var(--ink-soft); }

/* ==================== NATIVE <dialog> TOP-LAYER ANIMATIONS ==================== */
dialog.app-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  overflow: visible;
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 0.2s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: no-preference) {
  dialog.app-dialog { transform: translateY(8px) scale(0.97); }
}

dialog.app-dialog[open] {
  display: block;
  opacity: 1;
}

@starting-style {
  dialog.app-dialog[open] { opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  dialog.app-dialog[open] { transform: translateY(0) scale(1); }
  @starting-style {
    dialog.app-dialog[open] { transform: translateY(8px) scale(0.97); }
  }
}

dialog.app-dialog:modal { overscroll-behavior: contain; }

dialog.app-dialog::backdrop {
  background-color: rgba(4, 6, 12, 0);
  overflow: hidden;
  overscroll-behavior: contain;
  transition-property: background-color, display, overlay;
  transition-duration: 0.2s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

dialog.app-dialog[open]::backdrop {
  background-color: rgba(4, 6, 12, 0.76);
  backdrop-filter: blur(3px);
}

@starting-style {
  dialog.app-dialog[open]::backdrop { background-color: rgba(4, 6, 12, 0); }
}

@media (prefers-reduced-motion: reduce) {
  dialog.app-dialog,
  dialog.app-dialog::backdrop { transition-duration: 0.08s; }
}

/* Modal Interiors */
.modal-shell {
  padding: 18px;
  max-height: calc(100dvh - 30px);
  display: flex;
  flex-direction: column;
  gap: 13px;
  overflow: hidden;
}

.modal-shell--compact { width: min(460px, 94vw); }
.modal-shell--medium { width: min(650px, 94vw); }
.modal-shell--wide { width: min(880px, 96vw); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2d3b59;
}

.modal-header__left { display: flex; align-items: center; gap: 12px; }

.modal-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.modal-sub { font-size: 12px; color: var(--ink-soft); }

.btn-icon-close {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 14px;
}

.unlock-badge {
  padding: 4px 8px;
  background: #382a0b;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
}

.iron-record-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #1a2336;
  border: 2px solid var(--rim-outer);
  font-family: var(--font-display);
  font-size: 14px;
  flex-wrap: wrap;
}

.hp-bar-preview { display: inline-flex; gap: 4px; }

.blitz-pick-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 260px;
}

.blitz-pick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: #182133;
  border: 2px solid var(--rim-outer);
  text-align: left;
  font-size: 13px;
}

.blitz-pick-row:hover {
  background: #25334f;
  border-color: var(--gold);
}

.blitz-pick-row small { color: var(--gold); font-family: var(--font-display); flex-shrink: 0; }

/* Options & Switches */
.option-row, .option-group { display: flex; flex-direction: column; gap: 6px; }
.option-group__label { font-family: var(--font-arcade); font-size: 9px; color: var(--ink-soft); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: #182133;
  border: 2px solid var(--rim-outer);
  font-size: 13px;
  cursor: pointer;
}

.toggle-row span { display: inline-flex; align-items: center; gap: 8px; }
.pixel-switch { accent-color: var(--gold); width: 18px; height: 18px; cursor: pointer; }

.seg-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.seg-btn {
  padding: 8px;
  background: #182133;
  border: 2px solid var(--rim-outer);
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--ink-soft);
}

.seg-btn--active {
  background: var(--gold);
  color: #241603;
  font-weight: 700;
}

/* Packs & Archive */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  overflow-y: auto;
  padding: 2px 2px 6px;
}

.pack-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 108px;
  padding: 12px 10px;
  background: var(--pack-bg);
  color: var(--pack-ink);
  border: 2px solid var(--rim-outer);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.25), inset 0 -4px 0 var(--pack-sh), 0 4px 0 var(--rim-outer);
  text-align: center;
}

.pack-tile:hover { filter: brightness(1.07); }
.pack-tile:active { transform: translateY(3px); }
.pack-tile__name { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.05em; }
.pack-tile__count { font-size: 11px; opacity: 0.9; }

.archive-list { display: flex; flex-direction: column; gap: 7px; overflow-y: auto; padding-right: 4px; max-height: 410px; }

.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  background: #172033;
  border: 2px solid var(--rim-outer);
  flex-wrap: wrap;
}

.archive-day { display: flex; flex-direction: column; }
.archive-day strong { font-family: var(--font-display); font-size: 15px; }
.archive-day span { font-size: 11px; color: var(--ink-dim); }
.archive-pills { display: flex; flex-wrap: wrap; gap: 5px; }

.archive-pill {
  padding: 4px 8px;
  background: #232f4a;
  border: 2px solid var(--rim-outer);
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink);
}

.archive-pill:hover,
.archive-pill--done {
  background: var(--pill-accent);
  color: var(--pill-ink);
}

/* Locker Room */
.locker-gold { color: var(--gold); }
.locker-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; overflow-y: auto; }
.locker-left { display: flex; flex-direction: column; gap: 10px; }

.locker-canvas {
  width: 100%;
  aspect-ratio: 150 / 76;
  background: #121824;
  border: 2px solid var(--rim-outer);
  box-shadow: inset 0 0 0 2px #3b4b6e;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.locker-selected-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--gold); }
.locker-selected-desc { font-size: 12px; color: var(--ink-soft); }
.locker-right { display: flex; flex-direction: column; gap: 10px; }
.locker-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

.locker-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  background: #182133;
  border: 2px solid var(--rim-outer);
  font-family: var(--font-display);
}

.locker-tab small { font-size: 10px; color: var(--ink-dim); }
.locker-tab--active { background: #382a0b; border-color: var(--gold); color: var(--gold); }

.locker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }

.locker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 66px;
  padding: 8px;
  background: #182133;
  border: 2px solid var(--rim-outer);
  font-family: var(--font-display);
  font-size: 14px;
}

.locker-item--active { border-color: var(--gold); background: #36290c; }
.locker-worn { font-size: 10px; color: var(--gold); }
.balloon-swatch { width: 36px; height: 12px; border: 2px solid var(--rim-outer); }

/* Review Modal */
.review-total { font-family: var(--font-arcade); font-size: 20px; color: var(--gold); }
.review-total span { font-size: 12px; color: var(--ink-dim); }
.review-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 16px; overflow: hidden; min-height: 360px; }
.review-left { display: flex; flex-direction: column; gap: 12px; }
.rev-tabs { display: flex; flex-wrap: wrap; gap: 5px; }

.rev-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  background: #1a2336;
  border: 2px solid var(--rim-outer);
  font-family: var(--font-display);
  font-size: 13px;
}
.rev-tab svg { width: 11px; height: 11px; }
.rev-tab--active { background: var(--tab-col); color: var(--tab-ink); }

.rev-prompt { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.2; }
.rev-player-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #182133;
  border: 2px solid var(--rim-outer);
  border-left: 5px solid var(--row-accent);
}
.rev-player-box__lbl { font-family: var(--font-arcade); font-size: 8px; color: var(--ink-dim); margin-bottom: 4px; }
.rev-player-box__val { font-size: 15px; font-weight: 600; }
.rev-player-box__pts { text-align: right; font-family: var(--font-display); }
.rev-expl { margin: 0; font-size: 13px; color: var(--ink-soft); }

.review-right { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.modal-search { width: 100%; padding: 8px 11px; background: #090d16; border: 2px solid #4e6085; color: var(--ink); font-size: 13px; }
.rev-count-bar { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-dim); }
.rev-scroll { overflow-y: auto; max-height: 360px; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }

.rev-group__hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: color-mix(in srgb, var(--grp-col) 22%, #111726);
  border-left: 4px solid var(--grp-col);
  color: var(--grp-col);
  font-family: var(--font-display);
  font-size: 13px;
}
.rev-group__hdr small { color: var(--ink-soft); margin-left: 6px; }
.rev-item { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-bottom: 1px solid #222d45; font-size: 12.5px; }
.rev-item--you { background: rgba(247, 204, 72, 0.14); }
.rev-item__rank { width: 24px; color: var(--ink-dim); }
.rev-item__name { flex: 1; }
.you-pill { padding: 1px 5px; background: var(--gold); color: #241603; font-size: 10px; font-weight: 700; margin-left: 4px; }
.rev-item__val { color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rev-item__pts { width: 38px; text-align: right; font-family: var(--font-display); }

/* Share, Stats, Notebook, Help */
.share-body { display: flex; flex-direction: column; align-items: center; gap: 12px; overflow-y: auto; }
.share-preview { width: min(320px, 80vw); height: auto; border: 2px solid var(--gold); }
.share-text-box { width: 100%; margin: 0; padding: 10px 12px; background: #090d16; border: 2px solid #354566; font-size: 12px; white-space: pre-wrap; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.share-btns > * { flex: 1; }
.share-status { font-size: 12px; color: var(--gold); min-height: 16px; }

.stats-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats-kpi { padding: 10px; background: #182133; border: 2px solid var(--rim-outer); text-align: center; }
.stats-kpi span { display: block; font-family: var(--font-arcade); font-size: 8px; color: var(--ink-dim); margin-bottom: 4px; }
.stats-kpi strong { font-family: var(--font-display); font-size: 22px; color: var(--gold); }
.stats-section-title { font-family: var(--font-arcade); font-size: 9px; color: var(--ink-soft); }
.stats-modes, .stats-history { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 190px; }
.stat-mode-row, .hist-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; background: #172033; border: 2px solid var(--rim-outer); font-size: 12.5px; }
.stat-mode-name, .hist-mode { font-family: var(--font-display); min-width: 118px; }
.hist-pips { display: flex; gap: 3px; }
.hist-pip { width: 9px; height: 9px; border: 1px solid #090c14; }

.notebook-shell {
  width: min(470px, 94vw);
  max-height: calc(100dvh - 36px);
  background: #e6dac2;
  color: #2c241b;
  border: 3px solid #241910;
  border-left: 12px solid #6e523d;
  box-shadow: 0 12px 0 rgba(5, 7, 12, 0.75);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nb-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 12px; border-bottom: 2px solid rgba(44, 36, 27, 0.25); }
.nb-main-title { margin: 0; font-family: var(--font-display); font-size: 22px; color: #241d15; }
.nb-progress { font-size: 11px; color: #6b5b49; }
.nb-close-btn { width: 28px; height: 28px; background: #d6c5a3; border: 2px solid #2c241b; color: #241d15; font-family: var(--font-display); font-weight: 700; }
.nb-body { padding: 12px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.nb-section-hdr { margin-top: 8px; font-family: var(--font-arcade); font-size: 9px; color: #705e4b; padding-bottom: 4px; border-bottom: 2px solid rgba(44, 36, 27, 0.2); }
.nb-row { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed rgba(44, 36, 27, 0.2); font-size: 12.5px; }
.nb-num, .nb-arrow { font-family: var(--font-display); color: #705e4b; }
.nb-title { font-weight: 600; color: #241d15; }
.nb-row:not(.nb-row--open) .nb-title { color: #9c8e78; font-weight: 400; }
.nb-hint { font-size: 11px; color: #6b5b49; text-align: right; max-width: 175px; }
.nb-watch-btn { padding: 4px 8px; background: #2c241b; color: #efe5d0; border: 0; font-family: var(--font-display); font-size: 11px; }

.help-scroll { overflow-y: auto; display: flex; flex-direction: column; gap: 11px; padding-right: 4px; }
.help-lead { margin: 0; font-size: 13px; color: var(--ink-soft); }
.help-modes { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.modal-divider { border: 0; border-top: 2px dashed #313f5e; margin: 4px 0; }
.settings-block { display: flex; flex-direction: column; gap: 10px; }
.settings-field { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-arcade); font-size: 9px; color: var(--ink-soft); }
.settings-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.muted-note { font-size: 12px; color: var(--ink-dim); }

/* ==================== CINEMATIC & TOAST ==================== */
.cinematic-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cinematic-bar { height: 11vh; background: #040508; }
.cinematic-caption { margin: auto 16px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cinematic-title { font-family: var(--font-arcade); font-size: clamp(18px, 3.2vw, 30px); color: var(--gold); text-shadow: 0 4px 0 #090c14; }
.cinematic-text { max-width: 580px; margin: 0; padding: 12px 18px; font-size: 14px; }

.toast {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  padding: 9px 16px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 14px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1080px) {
  .records-board { position: static; width: min(580px, 100%); margin-top: 8px; }
  .summary-layout { grid-template-columns: 1fr; }
  .review-grid, .locker-layout { grid-template-columns: 1fr; }
}

@media (max-height: 760px) {
  .home-view { padding: 46px 14px 12px; gap: 6px; }
  .brand-logo { font-size: clamp(26px, 4.4vw, 40px); }
  .mode-tile { min-height: 74px; padding: 7px 6px; }
  .mode-tile__title { font-size: 17px; }
  .arcade-card { padding: 7px 10px; }
}

@media (max-width: 640px) {
  .mode-grid-3x2 { grid-template-columns: repeat(2, 1fr); }
  .arcade-row { grid-template-columns: 1fr; }
  .home-subbar { grid-template-columns: repeat(2, 1fr); }
  .stats-hero, .blitz-summary-kpis { grid-template-columns: repeat(2, 1fr); }
  .hud-lb-btn span:last-child { display: none; }
}
