@import url("https://fonts.googleapis.com/css2?family=Google+Sans+Flex:wght@300;700&display=swap");

:root {
  --bg: #000000;
  --panel: #141414;
  --panel-2: #111111;
  --border: #343434;
  --text: #ffffff;
  --muted: #727272;
  --regular: #0058ff;
  --regular-dark: #001234;
  --speed: #e3003d;
  --speed-dark: #2c000c;
  --easy: #62de67;
  --easy-dark: #0a260b;
  --medium: #ffec0d;
  --medium-dark: #2c2908;
  --hard: #ff8900;
  --hard-dark: #3b2000;
  --extreme: #e3003d;
  --extreme-dark: #2c000c;
  --warning: #ffec0d;
  --danger: #e3003d;
  --success: #62de67;
  --accent: var(--regular);
  --accent-dark: var(--regular-dark);
  --accent-rgb: 0, 88, 255;
  color-scheme: dark;
  font-family: "Google Sans Flex", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #000; }
body {
  min-height: 100vh;
  margin: 0;
  position: relative;
  isolation: isolate;
  color: var(--text);
  /* Use the original artwork untouched and scale it only as much as needed
     to cover the full page without letterboxing. */
  background-color: #000;
  background-image: url("assets/ui/background.jpg");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  font-family: "Google Sans Flex", Arial, sans-serif;
  font-optical-sizing: auto;
  font-weight: 300;
  overflow-x: hidden;
}
body[data-mode="speed"] {
  --accent: var(--speed);
  --accent-dark: var(--speed-dark);
  --accent-rgb: 227, 0, 61;
}
body::before,
body::after {
  content: none;
}


button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
.hidden { display: none !important; }

.app-shell { width: 100%; min-height: 100vh; }
.screen { width: 100%; }
.mode-glow-card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 0 75px rgba(var(--accent-rgb), .58);
}

/* Home */
.start-screen { padding: 44px 28px 26px; }
.home-header { text-align: center; margin: 0 auto 42px; }
.home-header h1 {
  margin: 0;
  font-size: clamp(54px, 4vw, 76px);
  line-height: .95;
  font-weight: 700;
  letter-spacing: .018em;
  text-transform: uppercase;
}
.home-header h2 {
  margin: 22px 0 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
}
.home-card {
  width: min(1120px, 100%);
  margin: 0 auto;
  border-radius: 25px;
  padding: 48px 50px 50px;
}
.home-content { width: 100%; }
.mode-picker, .difficulty-picker { margin: 0; padding: 0; border: 0; }
.mode-picker { margin-bottom: 52px; }
.mode-picker legend, .difficulty-picker legend {
  margin: 0 0 17px;
  padding: 0;
  font-size: 22px;
  font-weight: 700;
}
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.difficulty-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.mode-card, .difficulty-card { position: relative; display: block; cursor: pointer; }
.mode-card input, .difficulty-card input { position: absolute; opacity: 0; pointer-events: none; }
.mode-card > span, .difficulty-card > span {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  aspect-ratio: 477 / 146;
  overflow: hidden;
  padding: 20px 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.mode-card strong, .difficulty-card strong { font-size: 22px; font-weight: 700; line-height: 1.1; }
.mobile-separator { display: none; }
.difficulty-card small { white-space: nowrap; }
.mode-card small, .difficulty-card small { margin-top: 18px; color: #fff; font-size: 16px; line-height: 1.12; font-weight: 300; }
.mode-regular > span { background-image: url("assets/ui/mode-regular-unselected.jpg"); }
.mode-regular input:checked + span { background-image: url("assets/ui/mode-regular-selected.jpg"); border-color: var(--regular); }
.mode-speed > span { background-image: url("assets/ui/mode-speed-unselected.jpg"); }
.mode-speed input:checked + span { background-image: url("assets/ui/mode-speed-selected.jpg"); border-color: var(--speed); }
.mode-card:hover > span, .difficulty-card:hover > span {
  transform: translateY(-5px);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), .75);
}
.mode-card input:focus-visible + span, .difficulty-card input:focus-visible + span { outline: 2px solid #fff; outline-offset: 3px; }
.difficulty-picker { margin-top: 0; }
.difficulty-card > span { height: 146px; aspect-ratio: auto; padding: 18px 24px; }
.difficulty-card small { margin-top: 16px; }
.difficulty-easy > span { background-image: url("assets/ui/difficulty-easy-unselected.jpg"); }
.difficulty-easy input:checked + span { background-image: url("assets/ui/difficulty-easy-selected.jpg"); border-color: var(--easy); }
.difficulty-medium > span { background-image: url("assets/ui/difficulty-medium-unselected.jpg"); }
.difficulty-medium input:checked + span { background-image: url("assets/ui/difficulty-medium-selected.jpg"); border-color: var(--medium); }
.difficulty-hard > span { background-image: url("assets/ui/difficulty-hard-unselected.jpg"); }
.difficulty-hard input:checked + span { background-image: url("assets/ui/difficulty-hard-selected.jpg"); border-color: var(--hard); }
.difficulty-extreme > span { background-image: url("assets/ui/difficulty-extreme-unselected.jpg"); }
.difficulty-extreme input:checked + span { background-image: url("assets/ui/difficulty-extreme-selected.jpg"); border-color: var(--extreme); }

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 11px;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}
.primary-button { border: 1px solid var(--accent); background: var(--accent); }
.secondary-button { border: 1px solid var(--border); background: var(--panel); }
.primary-button:hover:not(:disabled) { transform: none; box-shadow: 0 0 10px rgba(var(--accent-rgb), .75); }
.secondary-button:hover:not(:disabled) { transform: none; border-color: #555; background: #2a2a2a; box-shadow: 0 0 10px rgba(255,255,255,.4); }
.primary-button:disabled, .secondary-button:disabled {
  border-color: #313131 !important;
  background: #313131 !important;
  color: #727272 !important;
  box-shadow: none !important;
  transform: none !important;
}
.start-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 56px; }
.menu-secondary-actions { display: flex; gap: 12px; }
.home-footer { width: min(1120px, 100%); margin: 54px auto 0; }
.creator-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.creator-social-inline { display: flex; align-items: center; gap: 22px; min-width: 0; }
.creator-social-inline > strong { flex: 0 0 auto; font-size: 28px; font-weight: 700; white-space: nowrap; }
.social-row { display: flex; align-items: center; gap: 22px; min-width: 0; }
.social-group { display: flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; }
.social-group img { width: auto; height: 24px; object-fit: contain; }
.support-project-button { flex: 0 0 auto; }
.fan-disclaimer { margin: 42px 0 0; color: #727272; font-size: 10px; line-height: 1.35; }

/* Game */
.game-layout { display: contents; }
.game-screen { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 50px 0 70px; }
.scoreboard { display: grid; grid-template-columns: repeat(3, 140px); gap: 10px; margin-bottom: 12px; }
.scoreboard.speed-active { grid-template-columns: repeat(4, 140px); }
.scoreboard > div {
  min-height: 70px;
  padding: 11px 12px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.scoreboard strong, .scoreboard span { display: block; }
.scoreboard strong { font-size: 18px; line-height: 1.05; font-weight: 700; white-space: nowrap; }
.scoreboard span { margin-top: 7px; font-size: 18px; line-height: 1; }
.timer-card span { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.game-card { min-height: 820px; border-radius: 23px; padding: 56px 56px 34px; }
.image-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: #000; }
#track-image {
  width: 100%; height: 100%; display: block; object-fit: cover;
  transform: scale(var(--zoom, 4)); transform-origin: var(--focus-x, 50%) var(--focus-y, 50%);
  transition: transform .55s ease, opacity .16s ease; user-select: none; -webkit-user-drag: none;
}
#track-image.is-loading { visibility: hidden; opacity: 0; transition: none; }
#track-image.is-revealed { object-fit: cover; transform: scale(1); }
.image-loading { position: absolute; inset: 0; display: grid; place-items: center; color: #aaa; }
.guess-form { display: flex; min-height: 210px; flex-direction: column; margin-top: 20px; position: relative; z-index: 20; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) 145px 118px; gap: 20px; align-items: start; }
.autocomplete { position: relative; min-width: 0; }
input[type="text"] {
  width: 100%; height: 52px; padding: 0 20px; border: 1px solid var(--border); border-radius: 10px;
  outline: 0; background: var(--panel); color: #fff; font-size: 18px; font-weight: 300;
}
input[type="text"]::placeholder { color: #727272; opacity: 1; }
input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 8px rgba(var(--accent-rgb), .75); }
input[type="text"].is-correct { border-color: var(--success); box-shadow: 0 0 8px rgba(98,222,103,.75); font-weight: 700; }
.track-suggestions {
  position: absolute; z-index: 100; left: 0; right: 0; bottom: calc(100% + 10px);
  max-height: 250px; overflow-y: auto; margin: 0; padding: 8px 0; list-style: none;
  border: 1px solid var(--border); border-radius: 10px; background: #111; box-shadow: 0 8px 22px rgba(0,0,0,.55);
}
.track-suggestions li { padding: 9px 18px; font-size: 17px; cursor: pointer; }
.track-suggestions li:hover, .track-suggestions li.is-active { background: #313131; }
.feedback { min-height: 22px; margin: 8px 0 0 20px; font-size: 18px; line-height: 1.2; color: #fff; font-weight: 700; }
.feedback.error { color: var(--danger); }
.feedback.warning, .feedback.skipped { color: var(--warning); }
.feedback.unknown { color: var(--warning); font-weight: 400; }
.feedback.success { color: var(--success); font-weight: 700; }
.feedback.timeout { color: var(--warning); }
.game-bottom-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-top: auto; }
.round-tools { display: grid; grid-template-columns: repeat(2, 220px); gap: 24px; }
.round-tool { display: grid; gap: 7px; }
.round-tool .secondary-button { width: 100%; }
.round-tool-cost { color: #727272; text-align: center; font-size: 14px; line-height: 1; }
.round-actions { margin-left: auto; }
.round-actions .primary-button { min-width: 160px; }

/* Results */
.results-screen { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 130px 0 70px; }
.results-card { border-radius: 23px; padding: 46px 48px 48px; }
.results-mode-title { margin: 0 0 58px; font-size: 22px; font-weight: 700; }
.results-card h2 { margin: 0; font-size: 46px; line-height: 1; font-weight: 300; }
.results-card h2 strong { font-weight: 700; }
.results-list { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 20px; margin: 64px 0 0; padding: 0; list-style: none; }
.result-round { min-width: 0; }
.result-image-wrap { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-dark); }
.result-image-wrap::after { content:""; position:absolute; inset:0; background: var(--accent-dark); mix-blend-mode: hard-light; opacity:.92; pointer-events:none; }
.result-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.result-score { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 700; }
.result-details { min-height: 275px; margin-top: 18px; padding: 18px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); font-size: 16px; line-height: 1.12; }
.result-details .round-label { display: block; margin-bottom: 22px; }
.result-details .track-name { display: block; margin-bottom: 20px; font-weight: 700; }
.result-details .highlight { color: var(--accent); font-weight: 700; }
.result-details .powerups-label { display: block; margin-top: 2px; }
.results-actions { display: flex; gap: 16px; }
.results-actions-top { display: none; }
.results-actions-bottom { margin-top: 110px; }

/* Dialogs */
.info-dialog { width: min(900px, calc(100% - 40px)); max-height: calc(100dvh - 70px); padding: 0; border: 0; background: transparent; color: #fff; }
.info-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(3px); }
.dialog-card { max-height: calc(100dvh - 70px); overflow: auto; padding: 44px 52px 46px; border: 1px solid var(--border); border-radius: 24px; background: var(--panel); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.dialog-header h2 { margin: 0; font-size: 30px; font-weight: 700; }
.compact-button { min-height: 40px; padding: 0 22px; font-size: 14px; }
.rules-section + .rules-section { margin-top: 34px; }
.rules-section h3 { margin: 0 0 14px; font-size: 22px; font-weight: 700; }
.rules-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.58; }
.rules-list li::marker, .track-list li::marker { color: #fff; }
.track-dialog { width: min(1180px, calc(100% - 40px)); }
.track-list { columns: 2; column-gap: 90px; margin: 0; padding-left: 18px; font-size: 16px; line-height: 1.45; }
.track-list li { break-inside: avoid; margin-bottom: 5px; }
.support-dialog { width: min(720px, calc(100% - 40px)); }
.support-dialog-card { padding: 42px 42px 38px; }
.support-dialog-header { margin-bottom: 22px; }
.support-dialog-copy { max-width: 600px; font-size: 14px; line-height: 1.45; }
.support-dialog-copy p { margin: 0 0 18px; }
.support-kofi-button { width: max-content; margin-top: 10px; text-decoration: none; }

@media (max-width: 900px) {
  .start-screen { padding: 64px 20px 90px; }
  .home-header { margin-bottom: 50px; }
  .home-header h1 { font-size: 46px; }
  .home-header h2 { max-width: 330px; margin: 26px auto 0; font-size: 29px; line-height: 1.28; }
  .home-card { padding: 38px 32px 42px; border-radius: 24px; }
  .mode-picker { margin-bottom: 38px; }
  .mode-picker legend, .difficulty-picker legend { font-size: 28px; margin-bottom: 20px; }
  .mode-grid { grid-template-columns: 1fr; gap: 14px; }
  .mode-card > span { aspect-ratio: auto; min-height: 132px; padding: 20px 28px; }
  .mode-card strong { font-size: 28px; }
  .mode-card small { margin-top: 20px; font-size: 18px; white-space: nowrap; }
  .mobile-separator { display: inline; }
  .desktop-mode-break { display: none; }
  .difficulty-grid { grid-template-columns: 1fr 1fr; gap: 14px 18px; }
  .difficulty-card > span { aspect-ratio: auto; min-height: 134px; padding: 20px 18px; }
  .difficulty-card strong { font-size: 28px; }
  .difficulty-card small { font-size: 18px; }
  .start-actions { margin-top: 34px; display: grid; grid-template-columns: 1fr; gap: 38px; }
  .start-actions > .primary-button { width: 50%; min-width: 0; }
  .menu-secondary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .primary-button, .secondary-button { min-height: 58px; font-size: 22px; }
  .home-footer { margin-top: 50px; }
  .creator-row { align-items: center; gap: 18px; }
  .creator-social-inline { gap: 16px; flex-wrap: wrap; }
  .creator-social-inline > strong { font-size: 26px; }
  .social-row { gap: 16px; }
  .social-group { gap: 7px; font-size: 12px; }
  .social-group img { height: 27px; }
  .support-project-button { min-height: 52px; padding-inline: 20px; font-size: 18px; }
  .fan-disclaimer { margin-top: 50px; font-size: 11px; line-height: 1.32; }

  .game-screen { width: calc(100% - 40px); padding: 70px 0 95px; }
  .game-layout {
    display: flex;
    min-height: 1220px;
    flex-direction: column;
    padding: 32px;
    border-radius: 24px;
  }
  .scoreboard, .scoreboard.speed-active { grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 16px; }
  .scoreboard > div { min-height: 76px; padding: 12px; }
  .scoreboard strong { font-size: 22px; }
  .scoreboard span { font-size: 22px; }
  .game-card {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .image-frame { margin-top: 0; border-radius: 18px; }
  .guess-form { min-height: 0; flex: 1; margin-top: 18px; }
  .input-row { grid-template-columns: 1fr 1fr; gap: 80px 18px; }
  .autocomplete { grid-column: 1 / -1; }
  input[type="text"] { height: 58px; border-radius: 28px; padding: 0 18px; font-size: 18px; }
  .track-suggestions { bottom: auto; top: calc(100% + 8px); }
  .feedback { margin-left: 18px; font-size: 18px; }
  .input-row .primary-button, .input-row .secondary-button { width: 100%; }
  .game-bottom-row { margin-top: auto; display: block; }
  .round-tools { grid-template-columns: 1fr 1fr; gap: 18px; }
  .round-tool .secondary-button { padding-inline: 8px; font-size: 16px; white-space: nowrap; }
  .round-tool-cost { margin-top: 4px; font-size: 18px; }
  .round-actions { margin: 24px 0 0; }
  .round-actions .primary-button { width: 100%; }

  .results-screen { width: calc(100% - 40px); padding: 56px 0 80px; }
  .results-card { padding: 22px 22px 28px; }
  .results-mode-title { margin-bottom: 26px; font-size: 14px; }
  .results-card h2 { font-size: 24px; }
  .results-actions-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
  .results-actions-top .primary-button, .results-actions-top .secondary-button { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .results-list { display: block; margin-top: 34px; }
  .result-round + .result-round { margin-top: 22px; }
  .result-image-wrap { border-radius: 14px; }
  .result-score { font-size: 36px; }
  .result-details { min-height: 0; margin-top: 10px; padding: 18px; font-size: 17px; line-height: 1.17; }
  .result-details .round-label { margin-bottom: 14px; }
  .result-details .track-name { margin-bottom: 14px; font-size: 17px; }
  .results-actions-bottom { display: none; }

  .info-dialog { width: calc(100% - 40px); max-height: calc(100dvh - 40px); }
  .dialog-card { max-height: calc(100dvh - 40px); padding: 24px 20px 30px; border-radius: 22px; }
  .dialog-header { margin-bottom: 24px; }
  .dialog-header h2 { font-size: 20px; }
  .compact-button { min-height: 38px; width: auto; padding: 0 18px; font-size: 13px; }
  .rules-section h3 { font-size: 18px; }
  .rules-list { font-size: 14px; line-height: 1.58; }
  .track-list { columns: 1; font-size: 14px; }
}

@media (max-width: 460px) {
  .start-screen {
    padding: 44px 14px 64px;
  }

  .home-header {
    margin-bottom: 34px;
  }

  .home-header h1 {
    font-size: 34px;
    white-space: nowrap;
  }

  .home-header h2 {
    max-width: 290px;
    margin-top: 18px;
    font-size: 21px;
    line-height: 1.24;
  }

  .home-card {
    padding: 28px 18px 30px;
    border-radius: 20px;
  }

  .mode-picker {
    margin-bottom: 32px;
  }

  .mode-picker legend,
  .difficulty-picker legend {
    margin-bottom: 16px;
    font-size: 22px;
  }

  .mode-grid {
    gap: 12px;
  }

  .mode-card > span {
    min-height: 104px;
    height: 104px;
    padding: 16px 20px;
    border-radius: 14px;
  }

  .mode-card strong {
    font-size: 21px;
  }

  .mode-card small {
    margin-top: 13px;
    font-size: 14px;
    white-space: normal;
  }

  .difficulty-grid {
    gap: 12px;
  }

  .difficulty-card > span {
    min-height: 104px;
    height: 104px;
    padding: 14px 14px;
    border-radius: 14px;
  }

  .difficulty-card strong {
    font-size: 20px;
  }

  .difficulty-card small {
    margin-top: 12px;
    font-size: 14px;
  }

  .start-actions {
    margin-top: 30px;
    gap: 28px;
  }

  .start-actions > .primary-button {
    width: 46%;
    min-height: 48px;
    padding-inline: 18px;
    font-size: 17px;
  }

  .menu-secondary-actions {
    gap: 12px;
  }

  .menu-secondary-actions .secondary-button {
    min-width: 0;
    min-height: 48px;
    padding-inline: 10px;
    font-size: 17px;
    line-height: 1.05;
  }

  .home-footer {
    margin-top: 38px;
  }

  .creator-social-inline > strong {
    font-size: 22px;
  }

  .social-row {
    margin-top: 0;
    gap: 12px;
  }

  .social-group {
    gap: 7px;
    font-size: 11px;
  }

  .social-group img {
    height: 26px;
  }

  .fan-disclaimer {
    margin-top: 54px;
    font-size: 10px;
  }

  .game-screen { width: calc(100% - 40px); padding-top: 68px; }
  .scoreboard, .scoreboard.speed-active { margin-inline: 32px; }
  .scoreboard > div { min-height: 72px; padding: 11px 16px; }
  .scoreboard strong, .scoreboard span { font-size: 18px; }
  .game-layout { min-height: 1220px; }
  .game-card { min-height: 0; padding-inline: 0; }
  .image-frame { margin-top: 0; }
  .guess-form { min-height: 0; }
  .input-row { gap: 80px 18px; }
  .round-tools { gap: 18px; }
  .round-tool .secondary-button { padding: 0 8px; font-size: 16px; white-space: nowrap; }
  .round-tool-cost { font-size: 16px; }
}


/* Full mobile QA pass — desktop layout is intentionally untouched. */
@media (max-width: 600px) {
  .start-screen { padding: 70px 20px 58px; }
  .home-header { margin-bottom: 34px; }
  .home-header h1 { font-size: 34px; white-space: nowrap; }
  .home-header h2 { max-width: 290px; margin-top: 18px; font-size: 19px; line-height: 1.24; }
  .home-card { padding: 26px 20px 30px; border-radius: 20px; }
  .mode-picker { margin-bottom: 26px; }
  .mode-picker legend, .difficulty-picker legend { margin-bottom: 14px; font-size: 20px; }
  .mode-grid { gap: 10px; }
  .mode-card > span { min-height: 80px; height: 80px; padding: 12px 16px; border-radius: 13px; }
  .mode-card strong { font-size: 18px; }
  .mode-card small { margin-top: 10px; font-size: 12px; white-space: normal; }
  .difficulty-grid { gap: 10px 12px; }
  .difficulty-card > span { min-height: 80px; height: 80px; padding: 12px 14px; border-radius: 13px; }
  .difficulty-card strong { font-size: 18px; }
  .difficulty-card small { margin-top: 10px; font-size: 12px; }
  .start-actions { margin-top: 24px; gap: 24px; }
  .start-actions > .primary-button { width: calc((100% - 12px) / 2); min-height: 48px; padding-inline: 16px; font-size: 17px; }
  .menu-secondary-actions { gap: 12px; }
  .menu-secondary-actions .secondary-button { min-width: 0; min-height: 48px; padding-inline: 10px; font-size: 16px; white-space: nowrap; }
  .home-footer { margin-top: 32px; }
  .creator-social-inline > strong { font-size: 20px; }
  .social-row { margin-top: 0; gap: 10px; flex-wrap: wrap; }
  .social-group { gap: 6px; font-size: 10px; }
  .social-group img { height: 24px; }
  .fan-disclaimer { margin-top: 42px; font-size: 9px; }

  .game-screen { width: calc(100% - 40px); padding: 60px 0; }
  .game-layout { min-height: 733px; padding: 20px; border-radius: 22px; }
  .scoreboard, .scoreboard.speed-active { grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 0 0 10px; }
  .scoreboard > div { min-height: 45px; padding: 6px 10px; border-radius: 9px; }
  .scoreboard strong { font-size: 15px; }
  .scoreboard span { margin-top: 2px; font-size: 15px; }
  .game-card { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .image-frame { border-radius: 14px; }
  .guess-form { min-height: 0; flex: 1; margin-top: 12px; }
  .input-row { grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 30px; }
  .autocomplete { grid-column: 1 / -1; }
  input[type="text"] { height: 36px; padding: 0 12px; border-radius: 18px; font-size: 14px; }
  .feedback { min-height: 18px; margin: 5px 0 0 12px; font-size: 15px; }
  .game-layout .primary-button, .game-layout .secondary-button { min-height: 36px; padding: 0 12px; border-radius: 18px; font-size: 14px; }
  .track-suggestions { top: calc(100% + 6px); bottom: auto; max-height: 160px; padding: 4px 0; border-radius: 14px; }
  .track-suggestions li { padding: 7px 12px; font-size: 14px; }
  .game-bottom-row { display: contents; }
  .round-actions { order: 1; margin: 12px 0 0; }
  .round-actions .primary-button { width: calc((100% - 12px) / 2); min-width: 0; }
  .round-tools { order: 2; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
  .round-tool { gap: 6px; }
  .round-tool .secondary-button { padding: 0 6px; font-size: 14px; white-space: nowrap; }
  .round-tool-cost { margin-top: 2px; font-size: 12px; }

  .results-screen { width: calc(100% - 40px); padding: 34px 0 48px; }
  .results-card { padding: 18px 18px 24px; border-radius: 20px; }
  .results-mode-title { margin-bottom: 18px; font-size: 13px; }
  .results-card h2 { font-size: 21px; }
  .results-actions-top { gap: 10px; margin-top: 18px; }
  .results-actions-top .primary-button, .results-actions-top .secondary-button { min-height: 36px; padding: 0 10px; font-size: 13px; }
  .results-list { margin-top: 26px; }
  .result-round + .result-round { margin-top: 18px; }
  .result-score { font-size: 28px; }
  .result-details { margin-top: 8px; padding: 14px; font-size: 14px; line-height: 1.18; }
  .result-details .round-label { margin-bottom: 11px; }
  .result-details .track-name { margin-bottom: 11px; font-size: 14px; }

  .info-dialog { width: calc(100% - 32px); max-height: calc(100dvh - 32px); }
  .dialog-card { max-height: calc(100dvh - 32px); padding: 20px 16px 24px; border-radius: 20px; }
  .dialog-header { margin-bottom: 20px; }
  .dialog-header h2 { font-size: 19px; }
  .compact-button { min-height: 32px; padding: 0 13px; font-size: 12px; }
  .rules-section + .rules-section { margin-top: 26px; }
  .rules-section h3 { font-size: 16px; }
  .rules-list { font-size: 13px; line-height: 1.5; }
  .track-list { font-size: 13px; }
}

/* ========================================================================== 
   MULTI-MODE SHELL + 2026 DISTANCE MODE EXTENSION
   ========================================================================== */
body[data-app-mode="menu"] {
  --accent: #ffffff;
  --accent-dark: #141414;
  --accent-rgb: 0, 0, 0;
}
body[data-app-mode="distance"] {
  --accent: #62de67;
  --accent-dark: #0a260b;
  --accent-rgb: 98, 222, 103;
}
body[data-app-mode="menu"]::after {
  background: linear-gradient(rgba(0,0,0,.17), rgba(0,0,0,.55));
}
body[data-app-mode="distance"]::after {
  background:
    radial-gradient(ellipse at 50% 55%, rgba(98,222,103,.25) 0%, rgba(98,222,103,.11) 30%, rgba(0,0,0,0) 59%),
    linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.47));
}

.mode-choice-card:hover {
  transform: translateY(-5px);
}

/* Shared mode home header */
.mode-home-header {
  width: min(1120px, 100%);
  margin: 0 auto 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.brand-block { text-align: left; }
.brand-block h1,
.brand-title {
  display: block;
  margin: 0;
  font-size: clamp(42px, 3.25vw, 58px);
  line-height: .95;
  font-weight: 700;
  letter-spacing: .018em;
}
.brand-block h2,
.brand-subtitle {
  display: block;
  margin: 12px 0 0;
  color: #fff;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 700;
}
.brand-button {
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  font: inherit;
}
.mode-brand {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  font-size: clamp(46px, 3.2vw, 60px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
.mode-brand img { width: 74px; height: 74px; object-fit: contain; }
.start-screen { padding-top: 88px; }
.zoom-start-actions { align-items: center; }
.start-actions-left { display: flex; gap: 12px; }

/* Main mode selector */
.mode-menu-screen { padding: 58px 20px 28px; }
.menu-heading { width: min(1060px, 100%); margin: 0 auto 34px; text-align: center; }
.menu-heading h1 { margin: 0; font-size: 58px; line-height: .96; font-weight: 700; letter-spacing: .018em; }
.menu-heading p { margin: 15px 0 0; font-size: 22px; font-weight: 700; }
.mode-choice-grid { width: min(1060px, 100%); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mode-choice-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  height: min(610px, 57vh);
  min-height: 440px;
  padding: 52px 34px 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  border: 1px solid var(--border);
  border-radius: 18px;
  background-color: var(--panel);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.mode-choice-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.52) 48%, rgba(0,0,0,.68) 100%);
  z-index: -1;
}
.mode-choice-card > * { position: relative; z-index: 1; }
.mode-choice-card:hover { border-color: #555; box-shadow: 0 0 10px rgba(255,255,255,.40); }
.mode-choice-card-zoom { background-image: url("assets/ui/zoom-mode-menu-bg.jpg"); }
.mode-choice-card-distance { background-image: url("assets/ui/distance-mode-menu-bg.jpg"); }
.mode-choice-card strong { margin-top: 18px; font-size: 36px; line-height: 1; font-weight: 700; }
.mode-choice-card img { width: 188px; height: 188px; margin: 42px 0 34px; object-fit: contain; }
.mode-choice-card span { max-width: 390px; font-size: 17px; line-height: 1.32; font-weight: 300; }
.site-footer { width: min(1120px, 100%); margin-left: auto; margin-right: auto; }
.menu-footer { width: min(970px, calc(100% - 40px)); margin-top: 50px; }

/* Distance home */
.distance-start-screen { padding: 84px 28px 26px; }
.distance-home-header { margin-bottom: 42px; }
.distance-glow-card {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 0 75px rgba(98,222,103,.58);
}
.distance-home-card {
  width: min(1120px, 100%);
  min-height: 650px;
  margin: 0 auto;
  padding: 48px 50px 48px;
  border-radius: 25px;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 66px;
}
.distance-settings { display: flex; flex-direction: column; min-width: 0; }
.distance-setting-group { margin: 0 0 30px; padding: 0; border: 0; }
.distance-setting-group legend { margin: 0 0 15px; padding: 0; font-size: 22px; font-weight: 700; }
.distance-option-grid { display: grid; gap: 10px; }
.timer-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-options { grid-template-columns: repeat(2, 95px); }
.distance-option-grid label { position: relative; display: block; cursor: pointer; }
.distance-option-grid input { position: absolute; opacity: 0; pointer-events: none; }
.distance-option-grid span {
  min-height: 36px;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.distance-option-grid input:checked + span { border-color: #62de67; background: #62de67; color: #fff; }
.distance-option-grid label:hover span { transform: none; border-color: #555; box-shadow: 0 0 8px rgba(255,255,255,.22); }
.distance-option-grid input:checked + span:hover { transform: none; box-shadow: 0 0 10px rgba(98,222,103,.75); }
.distance-settings-note { margin: auto 0 0; color: #fff; font-size: 10px; line-height: 1.35; }
.distance-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 0 30px;
  border: 1px solid #62de67;
  border-radius: 11px;
  background: #62de67;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}
.distance-primary-button:hover:not(:disabled) { transform: none; box-shadow: 0 0 10px rgba(98,222,103,.75); }
.distance-primary-button:disabled { cursor: default; border-color: #313131; background: #313131; color: #727272; box-shadow: none; transform: none; }
.distance-start-actions { margin-top: 56px; display: flex; align-items: center; gap: 12px; }
.distance-start-button { width: auto; margin-top: 0; }
.distance-home-visual { display: flex; flex-direction: column; min-width: 0; }
.distance-home-visual > img { width: 100%; height: 435px; object-fit: cover; object-position: center; border: 0; border-radius: 16px; }
.distance-home-actions { margin-top: auto; display: flex; justify-content: flex-end; gap: 12px; }
.distance-home-footer { margin-top: 54px; }

/* Distance dialogs */
.distance-info-dialog { width: min(1120px, calc(100% - 40px)); }
.distance-rules-list { padding-left: 18px; font-size: 14px; line-height: 1.58; }
.distance-track-list-dialog { width: min(1120px, calc(100% - 40px)); }
.distance-track-list-section + .distance-track-list-section { margin-top: 34px; }
.distance-track-list-section h3 { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.distance-track-list { columns: 4; column-gap: 44px; margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.45; }
.distance-track-list li { break-inside: avoid; margin-bottom: 4px; }

/* Distance round */
.distance-game-screen { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 50px 0 70px; }
.distance-game-shell { width: 100%; margin: 0 auto; }
.distance-scoreboard { display: grid; grid-template-columns: repeat(3, 140px); gap: 10px; margin-bottom: 12px; }
.distance-scoreboard > div { min-height: 70px; padding: 11px 12px 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.distance-scoreboard strong, .distance-scoreboard span { display: block; }
.distance-scoreboard strong { font-size: 18px; line-height: 1.05; font-weight: 700; white-space: nowrap; }
.distance-scoreboard span { margin-top: 7px; font-size: 18px; line-height: 1; }
.distance-timer-card span { color: #62de67; font-weight: 700; font-variant-numeric: tabular-nums; }
.distance-game-card {
  /* Match the Zoom round card's responsive desktop height: its 16:9 image + 20px gap + 210px controls + card padding. */
  min-height: max(820px, min(943.25px, calc(56.25vw + 234.5px)));
  padding: 56px 56px 34px;
  border-radius: 23px;
}
.distance-round-grid { min-height: 730px; }
.distance-media-area { position: relative; width: 100%; aspect-ratio: 16 / 9; min-width: 0; }
.distance-image-wrap { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; border: 0; border-radius: 16px; background: #000; touch-action: none; overscroll-behavior: contain; -webkit-touch-callout: none; }
.distance-image-wrap > img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; transform-origin: 0 0; transform: translate3d(0,0,0) scale(1); transition: transform .18s ease; will-change: transform; }
.distance-image-wrap.image-zoom-enabled { cursor: zoom-in; }
.distance-image-wrap.is-image-zoomed { cursor: grab; }
.distance-image-wrap.is-image-panning { cursor: grabbing; }
.distance-image-wrap.is-image-panning > img { transition: none; }
.distance-image-wrap.zoom-disabled { cursor: default; touch-action: pan-y; }

.distance-helper { position: absolute; z-index: 3; top: 14px; left: 18px; color: #727272; font-size: 10px; line-height: 1; pointer-events: none; }
.distance-map-dock { position: absolute; z-index: 20; left: 18px; bottom: 18px; width: 180px; }
.distance-expand-map-button { width: 100%; min-height: 44px; margin-bottom: 8px; padding: 0 16px; border-radius: 9px; font-size: 15px; }
.distance-map-wrap { position: relative; width: 100%; height: 142px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.distance-map-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.distance-map-svg { width: 100%; height: 100%; display: block; overflow: hidden; touch-action: none; cursor: default; user-select: none; }
.distance-map-svg.is-dragging { cursor: grabbing; }
.distance-map-placeholder { display: grid; place-items: center; font-size: 76px; line-height: 1; font-weight: 700; color: #fff; }
.distance-map-dock.is-unavailable .distance-map-wrap { cursor: default; }
.distance-media-area.is-map-expanded .distance-map-dock { inset: 0; width: auto; }
.distance-media-area.is-map-expanded .distance-map-wrap { width: 100%; height: 100%; border-radius: 16px; }
.distance-media-area.is-map-expanded .distance-expand-map-button { position: absolute; z-index: 5; top: 18px; right: 18px; width: 170px; margin: 0; }
.distance-media-area.is-map-expanded .distance-map-svg { width: 100%; height: 100%; }
.distance-media-area.is-map-expanded .distance-map-placeholder { font-size: 100px; }
.distance-known-track-label { color: #fff; font-size: 16px; font-weight: 700; }
.distance-track-select-row { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) 130px; gap: 20px; }
.distance-autocomplete { position: relative; min-width: 0; }
#distance-track-input { width: 100%; height: 52px; padding: 0 20px; border: 1px solid var(--border); border-radius: 10px; outline: 0; background: var(--panel); color: #fff; font-size: 18px; font-weight: 300; }
#distance-track-input::placeholder { color: #727272; opacity: 1; }
#distance-track-input:focus, #distance-track-input.is-valid { border-color: #62de67; box-shadow: 0 0 8px rgba(98,222,103,.75); }
#distance-track-input.is-invalid { border-color: #ffec0d; box-shadow: 0 0 8px rgba(255,236,13,.55); }
.distance-track-select-row .secondary-button { min-height: 52px; padding: 0 16px; border-radius: 10px; font-size: 18px; }
.distance-track-suggestions { position: absolute; z-index: 100; left: 0; right: 0; top: calc(100% + 5px); max-height: 220px; overflow-y: auto; margin: 0; padding: 6px 0; list-style: none; border: 1px solid var(--border); border-radius: 9px; background: #111; box-shadow: 0 8px 22px rgba(0,0,0,.55); }
.distance-track-suggestions li { padding: 8px 14px; font-size: 15px; cursor: pointer; }
.distance-track-suggestions li:hover, .distance-track-suggestions li.is-active { background: #313131; }
.distance-feedback { min-height: 24px; white-space: normal; font-size: 18px; line-height: 1.2; font-weight: 700; }
.distance-feedback.success { color: #62de67; }
.distance-feedback.warning { color: #ffec0d; }
.distance-feedback.error { color: #e3003d; }
.distance-next-button { white-space: nowrap; }
.distance-round-actions .secondary-button, .distance-round-actions .distance-primary-button { min-height: 52px; font-size: 18px; }
.distance-route-segment { opacity: 0; animation: distanceRouteReveal .12s linear forwards; }
@keyframes distanceRouteReveal { to { opacity: 1; } }

@media (min-width: 601px) {
  .distance-round-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) 145px;
    grid-template-rows: auto auto auto minmax(22px,1fr) auto;
    column-gap: 20px;
    /* Match Zoom mode's usable inner card height so the lower action row sits on the same baseline as Reveal Country / Move the Area. */
    min-height: max(730px, min(853.25px, calc(56.25vw + 144.5px)));
  }
  .distance-media-area { grid-column: 1 / -1; grid-row: 1; }
  .distance-known-track-label { grid-column: 1; grid-row: 2; align-self: center; margin-top: 20px; padding-left: 18px; }
  .distance-track-select-row { grid-column: 1; grid-row: 2; margin-top: 20px; }
  .distance-feedback { grid-column: 1 / -1; grid-row: 3; margin: 14px 18px 0; white-space: nowrap; }
  .distance-round-actions { display: contents; }
  #distance-submit-button { grid-column: 2; grid-row: 2; width: 145px; margin-top: 20px; }
  #distance-skip-button { grid-column: 1; grid-row: 5; justify-self: start; width: 118px; }
  #distance-next-button { grid-column: 2; grid-row: 5; width: 145px; }
}

/* Distance results — match Zoom results scale exactly while retaining Distance content/colors. */
.distance-results-screen { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 130px 0 70px; }
.distance-results-card { padding: 46px 48px 48px; border-radius: 23px; }
.distance-results-settings { margin: 0 0 58px; font-size: 22px; font-weight: 700; }
.distance-results-card h2 { margin: 0; font-size: 46px; line-height: 1; font-weight: 300; }
.distance-results-card h2 strong { font-weight: 700; }
.distance-results-list { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 20px; margin: 64px 0 0; padding: 0; list-style: none; }
.distance-result-image-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; border: 1px solid #62de67; border-radius: 12px; background: #0a260b; }
.distance-result-image-wrap::after { content:""; position:absolute; inset:0; background:#0a260b; mix-blend-mode: hard-light; opacity:.92; }
.distance-result-image-wrap img { width:100%; height:100%; display:block; object-fit:cover; }
.distance-result-image-wrap span { position:absolute; z-index:2; inset:0; display:grid; place-items:center; font-size:34px; font-weight:700; }
.distance-result-details { min-height: 275px; margin-top: 18px; padding: 18px 14px; border:1px solid var(--border); border-radius:12px; background:var(--panel); font-size:16px; line-height:1.12; }
.distance-result-details > span:first-child { display:block; margin-bottom:22px; }
.distance-result-details strong { display:block; min-height:0; margin-bottom:20px; font-size:16px; font-weight:700; }
.distance-result-highlight { display:block; font-weight:700; }
.distance-result-highlight.success { color:#62de67; }
.distance-result-highlight.warning { color:#ffec0d; }
.distance-result-highlight.danger { color:#e3003d; }
.distance-results-actions { display:flex; gap:16px; margin-top:110px; }
.distance-results-actions .distance-primary-button, .distance-results-actions .secondary-button { min-width: 0; }

@media (max-width: 900px) {
  .mode-home-header { padding: 0 20px; }
  .brand-block h1, .brand-title { font-size: 46px; }
  .brand-block h2, .brand-subtitle { font-size: 18px; }
  .mode-brand { font-size: 46px; }
  .mode-brand img { width: 62px; height: 62px; }
  .start-actions-left { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

  .mode-menu-screen { padding: 62px 20px 70px; }
  .menu-heading h1 { font-size: 46px; }
  .menu-heading p { font-size: 20px; }
  .mode-choice-grid { max-width: 620px; grid-template-columns: 1fr; gap: 16px; }
  .mode-choice-card { height: 300px; min-height: 0; padding: 28px 24px; }
  .mode-choice-card strong { margin-top: 0; font-size: 30px; }
  .mode-choice-card img { width: 120px; height: 120px; margin: 24px 0 18px; }
  .mode-choice-card span { font-size: 15px; }
  .menu-footer { width: min(560px, calc(100% - 32px)); max-width: none; }

  .distance-start-screen { padding: 70px 20px 58px; }
  .distance-home-header { padding: 0; flex-direction: column; gap: 30px; text-align:center; }
  .distance-home-header .brand-block { text-align:center; }
  .distance-home-card { max-width: 620px; grid-template-columns: 1fr; min-height: 0; padding: 32px; gap: 30px; }
  .distance-home-visual > img { display:none; }
  .distance-home-actions { justify-content: stretch; display:grid; grid-template-columns:1fr 1fr; gap:18px; }
  .distance-settings-note { display:none; }
  .distance-start-actions { margin-top:20px; display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  .distance-start-actions > button { width:100%; min-width:0; }
  .distance-start-button { margin-top:0; }
  .distance-home-footer { max-width:620px; }

  .distance-track-list { columns: 2; }

  .distance-game-screen { padding: 70px 20px 90px; }
  .distance-game-shell { max-width: 760px; }
  .distance-game-card { min-height: 0; padding: 38px 38px 30px; }
  .distance-round-grid { min-height: 0; }

  .distance-results-screen { width: calc(100% - 40px); padding: 56px 0 80px; }
  .distance-results-card { padding: 22px 22px 28px; }
  .distance-results-settings { margin-bottom:26px; font-size:14px; }
  .distance-results-card h2 { font-size:24px; }
  .distance-results-list { display:block; margin-top:34px; }
  .distance-result-round + .distance-result-round { margin-top:22px; }
  .distance-result-image-wrap { border-radius:14px; }
  .distance-result-image-wrap span { font-size:36px; }
  .distance-result-details { min-height:0; margin-top:10px; padding:18px; font-size:17px; line-height:1.17; }
  .distance-result-details > span:first-child { margin-bottom:14px; }
  .distance-result-details strong { min-height:0; margin-bottom:14px; font-size:17px; }
  .distance-results-actions { margin-top:34px; }
}

@media (max-width: 600px) {
  .desktop-only { display:none; }

  .mode-home-header { width:100%; margin-bottom:30px; padding:0; flex-direction:column; gap:28px; text-align:center; }
  .brand-block, .distance-home-header .brand-block { text-align:center; }
  .brand-block h1, .brand-title { font-size:34px; white-space:nowrap; }
  .brand-block h2, .brand-subtitle { margin-top:8px; font-size:12px; }
  .mode-brand { justify-content:center; gap:12px; font-size:34px; }
  .mode-brand img { width:52px; height:52px; }
  .start-screen { padding-top:64px; }
  .zoom-start-actions { grid-template-columns:1fr; gap:24px; }
  .start-actions-left { width:100%; grid-template-columns:1fr 1fr; gap:12px; }
  .start-actions-left > button { width:100% !important; min-height:48px; padding:0 10px; font-size:16px; }

  .mode-menu-screen { padding: 58px 20px 52px; }
  .menu-heading { margin-bottom:34px; }
  .menu-heading h1 { font-size:34px; white-space:nowrap; }
  .menu-heading p { max-width:310px; margin:10px auto 0; font-size:14px; line-height:1.25; }
  .mode-choice-grid { width:100%; gap:14px; }
  .mode-choice-card { height:220px; padding:22px 20px 20px; border-radius:18px; }
  .mode-choice-card strong { font-size:26px; }
  .mode-choice-card img { width:88px; height:88px; margin:18px 0 12px; }
  .mode-choice-card span { max-width:300px; font-size:12px; line-height:1.28; }
  .menu-footer { width: min(91.5%, 560px); margin-top:36px; }

  .distance-start-screen { padding: 64px 20px 58px; }
  .distance-home-header { margin-bottom:32px; }
  .distance-home-card { width:100%; padding:62px 24px 34px; border-radius:25px; }
  .distance-setting-group { margin-bottom:36px; }
  .distance-setting-group legend { margin-bottom:14px; font-size:20px; }
  .distance-option-grid { gap:12px 14px; }
  .timer-options { grid-template-columns:1fr 1fr; }
  .two-options { grid-template-columns:1fr 1fr; }
  .distance-option-grid span { min-height:60px; border-radius:18px; font-size:18px; }
  .distance-start-actions { margin-top:28px; grid-template-columns:1fr 1fr; gap:12px; }
  .distance-start-actions > button { width:100% !important; min-height:48px; padding:0 10px; border-radius:16px; font-size:16px; }
  .distance-start-button { margin-top:0; }
  .distance-home-actions { margin-top:30px; gap:14px; }
  .distance-home-actions .secondary-button { min-height:48px; padding:0 10px; border-radius:16px; font-size:17px; }
  .distance-home-footer { width:100%; margin-top:38px; }

  .distance-info-dialog, .distance-track-list-dialog { width:calc(100% - 32px); }
  .distance-track-list { columns:1; font-size:13px; }
  .distance-track-list-section h3 { font-size:16px; }

  .distance-game-screen { width:100%; padding:31px 20px 50px; }
  .distance-game-shell { width:100%; padding:20px; border:1px solid var(--border); border-radius:25px; background:var(--panel); box-shadow:0 0 44px rgba(98,222,103,.58); }
  .distance-scoreboard { grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:10px; }
  .distance-scoreboard > div { min-width:0; min-height:45px; padding:6px 10px; border-radius:9px; }
  .distance-scoreboard strong, .distance-scoreboard span { font-size:14px; }
  .distance-scoreboard span { margin-top:2px; }
  .distance-game-card { min-height:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
  .distance-round-grid { min-height:0; display:flex; flex-direction:column; gap:0; }
  .distance-media-area, .distance-map-dock { display:contents; }
  .distance-image-wrap { position:relative; inset:auto; order:1; width:100%; height:auto; aspect-ratio:16/9; border:1px solid var(--border); border-radius:14px; }
  .distance-map-wrap { order:2; width:100%; height:280px; margin-top:10px; border-radius:14px; }
  .distance-helper { display:none; }
  .distance-known-track-label { order:3; margin:10px 0 0; padding:0; font-size:12px; }
  .distance-track-select-row { order:3; margin-top:10px; grid-template-columns:1fr; }
  .distance-track-select-row .secondary-button { display:none; }
  #distance-track-input { height:34px; padding:0 12px; border-radius:17px; font-size:14px; }
  .distance-track-suggestions { top:calc(100% + 6px); max-height:150px; border-radius:14px; }
  .distance-track-suggestions li { padding:7px 12px; font-size:14px; }
  .distance-feedback { order:4; min-height:52px; margin:14px 0 0; font-size:14px; line-height:1.2; }
  .distance-next-button { display:none !important; }
  .distance-round-actions { order:6; margin-top:10px; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .distance-round-actions .secondary-button, .distance-round-actions .distance-primary-button { min-width:0; width:100%; min-height:36px; padding:0 8px; border-radius:18px; font-size:14px; }
  .distance-feedback { font-size: 15px; white-space: normal; }
  #distance-submit-button { order:1; margin:0; }
  #distance-skip-button { order:2; }
  #distance-submit-button.is-next-round { border-color:#62de67; background:#62de67; color:#fff; }
  .distance-map-svg { width:100%; height:100%; }
  .distance-map-placeholder { font-size:82px; }

  .distance-results-screen { width:calc(100% - 40px); padding:34px 0 48px; }
  .distance-results-card { padding:18px 18px 24px; border-radius:20px; }
  .distance-results-settings { margin-bottom:18px; font-size:13px; line-height:1.25; }
  .distance-results-card h2 { font-size:21px; }
  .distance-results-list { margin-top:26px; }
  .distance-result-round + .distance-result-round { margin-top:18px; }
  .distance-result-image-wrap { border-radius:14px; }
  .distance-result-image-wrap span { font-size:28px; }
  .distance-result-details { margin-top:8px; padding:14px; font-size:14px; line-height:1.18; }
  .distance-result-details > span:first-child, .distance-result-details strong { margin-bottom:11px; }
  .distance-results-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:26px; }
  .distance-results-actions .distance-primary-button, .distance-results-actions .secondary-button { min-width:0; min-height:36px; padding:0 10px; font-size:13px; }
}

/* Final alignment pass against supplied reference boards. */
@media (min-width: 901px) {
  .mode-menu-screen { padding-top: 126px; }
}
@media (max-width: 600px) {
  .start-screen .mode-home-header { gap: 12px; margin-bottom: 15px; }
  .distance-start-screen { padding-top: 78px; }
}

/* Compact main-menu layout: keep the full mode selector visible on phone screens. */
@media (max-width: 600px) {
  .mode-menu-screen {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 18px 16px 12px;
  }
  .menu-heading { flex: 0 0 auto; margin: 0 auto 10px; }
  .menu-heading h1 { font-size: clamp(27px, 8vw, 34px); }
  .menu-heading p { max-width: 300px; margin-top: 5px; font-size: 11px; line-height: 1.15; }
  .mode-choice-grid {
    flex: 1 1 auto;
    min-height: 0;
    width: min(100%, 330px);
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .mode-choice-card {
    min-height: 0;
    height: auto;
    padding: 8px 14px;
    justify-content: center;
    border-radius: 15px;
  }
  .mode-choice-card strong { margin-top: 0; font-size: clamp(18px, 5.3vw, 22px); }
  .mode-choice-card img { width: min(60px, 8dvh); height: min(60px, 8dvh); margin: min(7px, 1dvh) 0; }
  .mode-choice-card span { max-width: 270px; font-size: clamp(9px, 2.6vw, 11px); line-height: 1.15; }
  .menu-footer { flex: 0 0 auto; width: min(310px, 94%); margin-top: 10px; }
  .menu-footer .creator-row { gap: 8px; align-items: center; }
  .menu-footer .creator-social-inline { flex: 1 1 auto; min-width: 0; gap: 8px; flex-wrap: nowrap; }
  .menu-footer .creator-social-inline > strong { font-size: 13px; }
  .menu-footer .social-row { gap: 6px; flex-wrap: nowrap; }
  .menu-footer .social-group { gap: 3px; font-size: 7px; }
  .menu-footer .social-group img { height: 15px; }
  .menu-footer .support-project-button { min-height: 34px; padding: 0 9px; border-radius: 8px; font-size: 10px; white-space: nowrap; }
  .menu-footer .fan-disclaimer { margin-top: 7px; font-size: 6px; line-height: 1.15; }

  .home-footer .creator-row, .distance-home-footer .creator-row { gap: 10px; }
  .home-footer .creator-social-inline, .distance-home-footer .creator-social-inline { gap: 10px; flex-wrap: wrap; }
  .home-footer .support-project-button, .distance-home-footer .support-project-button { min-height: 44px; padding-inline: 12px; font-size: 14px; }

  .support-dialog { width: calc(100% - 28px); }
  .support-dialog-card { padding: 24px 20px 22px; }
  .support-dialog-header { margin-bottom: 18px; }
  .support-dialog-copy { font-size: 12px; line-height: 1.4; }
  .support-kofi-button { min-height: 44px; padding-inline: 16px; font-size: 14px; }
}

@media (max-width: 380px), (max-height: 700px) and (max-width: 600px) {
  .mode-menu-screen { padding-top: 10px; padding-bottom: 8px; }
  .menu-heading { margin-bottom: 6px; }
  .menu-heading h1 { font-size: 25px; }
  .menu-heading p { font-size: 9px; }
  .mode-choice-grid { gap: 6px; }
  .mode-choice-card { padding: 5px 10px; }
  .mode-choice-card strong { font-size: 17px; }
  .mode-choice-card img { width: min(48px, 7dvh); height: min(48px, 7dvh); margin: 4px 0; }
  .mode-choice-card span { font-size: 8px; }
  .menu-footer { margin-top: 6px; }
  .menu-footer .creator-social-inline > strong { font-size: 11px; }
  .menu-footer .social-group { font-size: 6px; }
  .menu-footer .social-group img { height: 13px; }
  .menu-footer .support-project-button { min-height: 30px; padding-inline: 7px; font-size: 9px; }
  .menu-footer .fan-disclaimer { margin-top: 4px; font-size: 5.5px; }
}


/* ==========================================================================
   ROUND UX / RESPONSIVE POLISH — 2026-09
   Only the requested round/menu behaviors are adjusted below.
   ========================================================================== */

/* Shared in-round Quit confirmation, based on the existing Support dialog UI. */
.quit-game-dialog {
  width: min(420px, calc(100% - 40px));
}
.quit-game-dialog-card {
  overflow: hidden;
  padding: 28px 30px 26px;
  text-align: center;
}
.quit-game-dialog-card h2 {
  margin: 0 0 22px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}
.quit-game-dialog-note {
  margin: -10px 0 20px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--muted);
}
.quit-game-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.quit-game-dialog-actions .primary-button,
.quit-game-dialog-actions .secondary-button {
  width: 100%;
  min-width: 0;
}

/* Desktop round screens: keep the whole active round inside one viewport.
   JS only scales down when the natural content height would otherwise overflow. */
@media (min-width: 901px) {
  body.desktop-round-active {
    overflow-y: hidden;
  }

  #zoom-game-screen,
  #distance-game-screen {
    height: 100dvh;
    min-height: 0;
    /* The body still prevents desktop round scrolling. Keep this overflow visible
       so the mode-colored box-shadow/glow is not cut off at the screen bounds. */
    overflow: visible;
  }

  #zoom-game-screen .game-layout {
    display: block;
    position: relative;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  #distance-game-screen .distance-game-shell,
  #daily-game-screen .daily-game-shell {
    position: relative;
  }

  #zoom-game-screen .game-layout,
  #distance-game-screen .distance-game-shell,
  #daily-game-screen .daily-game-shell {
    transform-origin: top center;
  }

  .zoom-round-quit-button,
  .distance-round-quit-button,
  .daily-round-quit-button {
    position: absolute;
    z-index: 40;
    top: 0;
    right: 0;
    width: 118px;
    min-width: 118px;
    min-height: 52px;
    padding: 0 16px;
  }
}

/* Use some of the otherwise-empty lower control space first on short desktop
   viewports, then the full round is proportionally scaled if still required. */
@media (min-width: 901px) and (max-height: 980px) {
  #zoom-game-screen .guess-form {
    min-height: 170px;
    margin-top: 14px;
  }
}

/* Mobile: prevent iOS Safari from automatically zooming the page on text focus. */
@media (max-width: 600px) {
  #guess-input,
  #distance-track-input {
    font-size: 16px !important;
  }

  /* Zoom round: Submit/Skip first, power-ups directly below them,
     Next Round beneath Reveal Country, and Quit at the bottom. */
  #zoom-game-screen .game-layout {
    min-height: calc(100dvh - 120px);
  }

  #zoom-game-screen .game-card {
    flex: 1 1 auto;
  }

  #zoom-game-screen .guess-form {
    flex: 1 1 auto;
  }

  #zoom-game-screen .game-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
    align-items: start;
  }

  #zoom-game-screen .round-tools {
    display: contents;
    margin-top: 0;
  }

  #zoom-game-screen .round-actions {
    grid-column: 1;
    margin: 0;
  }

  #zoom-game-screen .round-actions .primary-button {
    width: 100%;
    min-width: 0;
  }

  .zoom-round-quit-button,
  .distance-round-quit-button,
  .daily-round-quit-button {
    position: static;
    flex: 0 0 auto;
    width: calc((100% - 12px) / 2);
    min-width: 0;
    min-height: 36px;
    margin: 22px 0 0 auto;
    padding: 0 12px;
    border-radius: 18px;
    font-size: 14px;
  }

  /* Keep Distance's existing mobile controls intact; only add the bottom Quit. */
  #distance-game-screen .distance-game-shell {
    display: flex;
    flex-direction: column;
  }

  /* Compact quit confirmation on phones. */
  .quit-game-dialog {
    width: calc(100% - 32px);
  }

  .quit-game-dialog-card {
    padding: 22px 18px 20px;
  }

  .quit-game-dialog-card h2 {
    margin-bottom: 18px;
    font-size: 20px;
  }

  .quit-game-dialog-note {
    margin: -8px 0 17px;
    font-size: 13px;
  }

  .quit-game-dialog-actions .primary-button,
  .quit-game-dialog-actions .secondary-button {
    min-height: 42px;
    padding: 0 12px;
    font-size: 15px;
  }

  /* Main mode menu: restore a readable, deliberately spacious mobile layout. */
  .mode-menu-screen {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    display: block;
    padding: 34px 20px 30px;
  }

  .mode-menu-screen .menu-heading {
    margin: 0 auto 28px;
  }

  .mode-menu-screen .menu-heading h1 {
    font-size: clamp(34px, 9.5vw, 42px);
  }

  .mode-menu-screen .menu-heading p {
    max-width: 330px;
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.25;
  }

  .mode-menu-screen .mode-choice-grid {
    display: grid;
    width: min(100%, 370px);
    margin: 0 auto;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 14px;
  }

  .mode-menu-screen .mode-choice-card {
    height: auto;
    min-height: 390px;
    padding: 42px 24px 38px;
    justify-content: center;
    border-radius: 20px;
  }

  .mode-menu-screen .mode-choice-card strong {
    margin-top: 0;
    font-size: 30px;
  }

  .mode-menu-screen .mode-choice-card img {
    width: 112px;
    height: 112px;
    margin: 32px 0 28px;
  }

  .mode-menu-screen .mode-choice-card span {
    max-width: 310px;
    padding: 0 18px;
    font-size: 15px;
    line-height: 1.34;
  }

  .mode-menu-screen .menu-footer {
    width: min(100%, 370px);
    margin: 30px auto 0;
  }

  .mode-menu-screen .menu-footer .creator-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
  }

  .mode-menu-screen .menu-footer .creator-social-inline {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
  }

  .mode-menu-screen .menu-footer .creator-social-inline > strong {
    font-size: 22px;
    line-height: 1.1;
  }

  .mode-menu-screen .menu-footer .social-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
  }

  .mode-menu-screen .menu-footer .social-group {
    gap: 7px;
    font-size: 11px;
  }

  .mode-menu-screen .menu-footer .social-group img {
    height: 25px;
  }

  .mode-menu-screen .menu-footer .support-project-button {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 11px;
    font-size: 14px;
    white-space: nowrap;
  }

  .mode-menu-screen .menu-footer .fan-disclaimer {
    margin-top: 32px;
    font-size: 8.5px;
    line-height: 1.25;
  }
}

/* ========================================================================== 
   DAILY DASH EXPANSION + 2026 MODE BRANDING
   ========================================================================== */
:root { --daily: #7B48BE; --daily-rgb: 123,72,190; }
body[data-app-mode="daily"] { --accent: var(--daily); --accent-dark: #241238; --accent-rgb: var(--daily-rgb); }

/* New supplied brand assets */
.menu-full-logo { width: min(390px, 72vw); height: auto; display: block; margin: 0 auto; }
.mode-home-logo-button { display:block; width:min(390px,44vw); }
.mode-home-full-logo { display:block; width:100%; height:auto; }
.mode-home-mode-logo { display:block; width:auto; height:92px; max-width:310px; object-fit:contain; }
.mode-home-mode-logo-zoom { height:92px; }
.mode-home-mode-logo-distance { height:92px; }
.mode-home-mode-logo-daily { height:92px; }

/* Three-card mode menu using the supplied mode backgrounds. */
.mode-menu-screen .menu-heading { width:min(1120px,100%); }
.mode-menu-screen .menu-heading p { margin-top:24px; }
.mode-menu-screen .mode-choice-grid { width:min(1120px,100%); grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.mode-menu-screen .mode-choice-card { height:min(650px,58vh); min-height:480px; padding:36px 30px 48px; justify-content:center; }
.mode-menu-screen .mode-choice-card::before { background:linear-gradient(180deg,rgba(0,0,0,.17) 0%,rgba(0,0,0,.30) 45%,rgba(0,0,0,.72) 100%); }
.mode-choice-card-zoom { background-image:url("assets/ui/zoom-mode-background.jpg"); }
.mode-choice-card-distance { background-image:url("assets/ui/distance-mode-background.jpg"); }
.mode-choice-card-daily { background-image:url("assets/ui/daily-dash-background.jpg"); }
.mode-menu-screen .mode-choice-card .mode-choice-logo { width:230px; max-width:90%; height:105px; margin:0 0 34px; object-fit:contain; }
.mode-menu-screen .mode-choice-card span { min-height:48px; max-width:300px; font-size:16px; line-height:1.28; }
.mode-menu-screen .menu-footer { width:min(1120px,calc(100% - 40px)); margin-top:30px; }

/* Supplied imagery now fills the mode-home panels instead of a separate preview. */
#zoom-start-screen .home-card {
  min-height:650px;
  background-image:linear-gradient(90deg,rgba(0,0,0,.83) 0%,rgba(0,0,0,.68) 48%,rgba(0,0,0,.28) 100%),url("assets/ui/zoom-mode-background.jpg");
  background-size:cover; background-position:center; background-repeat:no-repeat;
}
#zoom-start-screen .home-content { max-width:100%; }
.distance-home-card {
  background-image:linear-gradient(90deg,rgba(0,0,0,.83) 0%,rgba(0,0,0,.56) 50%,rgba(0,0,0,.22) 100%),url("assets/ui/distance-mode-background.jpg");
  background-size:cover; background-position:center; background-repeat:no-repeat;
}
.distance-home-visual { justify-content:flex-end; }
.distance-home-actions { margin-top:auto; }

/* Daily Dash home */
.daily-start-screen { padding:84px 28px 26px; }
.daily-home-header { margin-bottom:42px; }
.daily-glow-card { border:1px solid var(--border); box-shadow:0 0 75px rgba(var(--daily-rgb),.60); }
.daily-home-card {
  width:min(1120px,100%); min-height:650px; margin:0 auto; padding:48px 50px;
  position:relative; overflow:hidden; border-radius:25px;
  background-image:linear-gradient(rgba(0,0,0,.22),rgba(0,0,0,.55)),url("assets/ui/daily-dash-background.jpg");
  background-size:cover; background-position:center; background-repeat:no-repeat;
  display:flex; flex-direction:column; justify-content:space-between;
}
.daily-home-status { margin:auto; text-align:center; transform:translateY(-8px); }
.daily-home-status h2 { margin:0; font-size:30px; font-weight:700; }
.daily-number-label { margin:12px 0 64px; font-size:18px; }
.daily-home-message { margin:0; font-size:28px; line-height:1.2; font-weight:700; }
.daily-home-countdown { margin:16px 0 0; font-size:18px; }
.daily-home-actions { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.daily-home-start-actions { display:flex; gap:12px; }
.daily-home-secondary-actions { display:flex; gap:12px; }
.daily-primary-button {
  min-height:52px; padding:0 30px; display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--daily); border-radius:11px; background:var(--daily); color:#fff;
  font:inherit; font-size:18px; font-weight:700; cursor:pointer;
}
.daily-primary-button:hover:not(:disabled) { box-shadow:0 0 10px rgba(var(--daily-rgb),.80); }
.daily-primary-button:disabled { cursor:default; border-color:#313131; background:#313131; color:#727272; box-shadow:none; }
.daily-home-footer { margin-top:54px; }

/* Daily Dash round */
.daily-game-screen { width:min(1220px,calc(100% - 40px)); margin:0 auto; padding:50px 0 70px; }
.daily-game-shell { width:100%; margin:0 auto; }
.daily-attempt-strip { display:grid; grid-template-columns:repeat(5,60px); gap:10px; margin-bottom:12px; }
.daily-attempt-strip span { width:60px; height:60px; border:1px solid var(--border); border-radius:10px; background:var(--panel); }
.daily-attempt-strip .is-wrong, .daily-legend-swatch.is-wrong { background:#E3003D; border-color:#E3003D; }
.daily-attempt-strip .is-far, .daily-legend-swatch.is-far { background:#FFEC0D; border-color:#FFEC0D; }
.daily-attempt-strip .is-near, .daily-legend-swatch.is-near { background:#62DE67; border-color:#62DE67; }
.daily-attempt-strip .is-win, .daily-legend-swatch.is-win { background:#7B48BE; border-color:#7B48BE; }
.daily-game-card { min-height:760px; padding:48px 50px; border-radius:25px; background:var(--panel); }
.daily-round-grid { display:grid; grid-template-rows:auto auto auto; }
.daily-media-area { position:relative; height:600px; }
.daily-image-wrap { position:absolute; inset:0; overflow:hidden; border:1px solid var(--border); border-radius:16px; background:#000; }
.daily-image-wrap img { width:100%; height:100%; display:block; object-fit:cover; pointer-events:none; user-select:none; transition:transform .25s ease; }
.daily-map-dock { position:absolute; z-index:20; left:18px; bottom:18px; width:180px; }
.daily-expand-map-button { width:100%; min-height:42px; margin-bottom:8px; padding:0 16px; font-size:14px; }
.daily-map-wrap { position:relative; width:100%; height:142px; overflow:hidden; border:1px solid var(--border); border-radius:10px; background:var(--panel); }
.daily-map-stage { position:absolute; inset:0; display:grid; place-items:center; overflow:hidden; }
.daily-map-placeholder { display:grid; place-items:center; width:100%; height:100%; color:#fff; font-size:76px; font-weight:700; }
.daily-map-svg { width:100%; height:100%; display:block; overflow:hidden; touch-action:none; user-select:none; }
.daily-media-area.is-map-expanded .daily-map-dock { inset:0; width:auto; }
.daily-media-area.is-map-expanded .daily-map-wrap { width:100%; height:100%; border-radius:16px; }
.daily-media-area.is-map-expanded .daily-expand-map-button { position:absolute; z-index:2; top:18px; right:18px; width:170px; }
.daily-track-select-row { display:grid; grid-template-columns:minmax(0,1fr) 140px 140px; gap:12px; margin-top:20px; }
.daily-autocomplete { position:relative; }
.daily-track-select-row input { width:100%; min-height:52px; padding:0 18px; border:1px solid var(--border); border-radius:11px; background:var(--panel); color:#fff; font-size:18px; outline:none; }
.daily-track-select-row input:focus { border-color:var(--daily); box-shadow:0 0 10px rgba(var(--daily-rgb),.70); }
.daily-track-suggestions { position:absolute; z-index:70; left:0; right:0; top:calc(100% + 5px); max-height:260px; overflow:auto; margin:0; padding:6px; list-style:none; border:1px solid var(--border); border-radius:10px; background:#111; box-shadow:0 12px 30px rgba(0,0,0,.65); }
.daily-track-suggestions li { padding:9px 10px; border-radius:7px; cursor:pointer; font-size:14px; }
.daily-track-suggestions li:hover, .daily-track-suggestions li.active { background:#2b2b2b; }
.daily-feedback { min-height:30px; margin:8px 0 0; font-size:14px; font-weight:700; }
.daily-feedback.is-wrong { color:#E3003D; }
.daily-feedback.is-far { color:#FFEC0D; }
.daily-feedback.is-near { color:#62DE67; }
.daily-feedback.is-win { color:#7B48BE; }
.daily-results-button { justify-self:end; margin-top:10px; min-width:140px; }

/* Daily rules, result popup and share UI */
.daily-info-dialog { width:min(1120px,calc(100% - 40px)); }
.daily-rules-list { padding-left:20px; font-size:15px; line-height:1.55; }
.daily-legend-title { margin:34px 0 16px; }
.daily-legend { margin:0; padding:0; list-style:none; display:grid; gap:12px; }
.daily-legend li { display:flex; align-items:center; gap:14px; font-size:14px; }
.daily-legend-swatch { flex:0 0 28px; width:28px; height:28px; border-radius:5px; }
.daily-results-dialog { width:min(720px,calc(100% - 40px)); }
.daily-results-dialog::backdrop { background:rgba(0,0,0,.58); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.daily-results-dialog-card { padding:34px 42px 36px; text-align:center; }
.daily-results-dialog-card h2,
.daily-results-dialog-card > p,
.daily-results-dialog-card h3 { font-size:32px; line-height:1.12; font-weight:700; }
.daily-results-dialog-card h2 { margin:0; }
.daily-results-dialog-card > p { margin:6px 0 34px; }
.daily-results-dialog-card h3 { margin:0 0 16px; }
.daily-results-squares { display:grid; grid-template-columns:repeat(5,34px); justify-content:center; gap:7px; margin:0 auto 14px; }
.daily-results-squares span { width:34px; height:34px; border:1px solid var(--border); background:var(--panel); }
.daily-results-squares .is-wrong { background:#E3003D; border-color:#E3003D; }
.daily-results-squares .is-far { background:#FFEC0D; border-color:#FFEC0D; }
.daily-results-squares .is-near { background:#62DE67; border-color:#62DE67; }
.daily-results-squares .is-win { background:#7B48BE; border-color:#7B48BE; }
.daily-results-list { width:max-content; max-width:100%; margin:0 auto 24px; padding:0; list-style:none; text-align:left; line-height:1.6; }
.daily-copy-results-button { min-width:190px; }
.daily-results-next { margin:40px 0 28px; display:grid; gap:8px; font-size:18px; }
.daily-results-next span { font-size:22px; }
.daily-results-actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.daily-results-actions > button { width:100%; }

@media (min-width:901px) {
  #daily-game-screen { height:100dvh; min-height:0; overflow:visible; }
  #daily-game-screen .daily-game-shell { transform-origin:top center; }
}

@media (max-width:900px) {
  .mode-menu-screen .mode-choice-grid { max-width:620px; grid-template-columns:1fr; }
  .mode-menu-screen .mode-choice-card { height:300px; min-height:0; justify-content:center; padding:24px; }
  .mode-menu-screen .mode-choice-card .mode-choice-logo { width:190px; height:90px; margin:0 0 18px; }
  .mode-home-header { padding:0 20px; }
  .mode-home-logo-button { width:min(360px,65vw); }
  .mode-home-mode-logo { height:78px; max-width:240px; }
  .daily-home-card { max-width:620px; min-height:520px; padding:34px; }
  .daily-home-footer { max-width:620px; }
  .daily-game-screen { padding:70px 20px 90px; }
  .daily-game-shell { max-width:760px; }
  .daily-game-card { min-height:0; padding:38px; }
  .daily-media-area { height:430px; }
}

@media (max-width:600px) {
  .mode-menu-screen .menu-full-logo { width:min(290px,82vw); }
  .mode-menu-screen .menu-heading p { margin-top:10px; font-size:14px; }
  .mode-menu-screen .mode-choice-grid { gap:14px; }
  .mode-menu-screen .mode-choice-card { height:220px; padding:18px 20px; }
  .mode-menu-screen .mode-choice-card .mode-choice-logo { width:150px; height:70px; margin:0 0 10px; }
  .mode-menu-screen .mode-choice-card span { min-height:0; max-width:300px; font-size:12px; }
  .mode-home-header { width:100%; margin-bottom:28px; padding:0; flex-direction:column; gap:18px; }
  .mode-home-logo-button { width:min(300px,82vw); }
  .mode-home-mode-logo { height:64px; max-width:210px; }
  #zoom-start-screen .home-card, .distance-home-card { background-position:center; }
  .distance-home-card { grid-template-columns:1fr; }
  .daily-start-screen { padding:58px 20px 42px; }
  .daily-home-card { width:100%; min-height:500px; padding:30px 24px; border-radius:22px; }
  .daily-home-status h2 { font-size:24px; }
  .daily-number-label { margin:8px 0 48px; font-size:15px; }
  .daily-home-message { font-size:21px; }
  .daily-home-actions { align-items:stretch; display:grid; grid-template-columns:1fr; gap:12px; }
  .daily-home-start-actions,
  .daily-home-secondary-actions { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  .daily-home-start-actions > button,
  .daily-home-secondary-actions > button { width:100%; min-width:0; min-height:48px; padding:0 10px; border-radius:16px; font-size:16px; white-space:nowrap; }
  .daily-home-footer { width:100%; margin-top:38px; }

  .daily-game-screen { width:100%; padding:31px 20px 50px; }
  .daily-game-shell { width:100%; padding:20px; border:1px solid var(--border); border-radius:25px; background:var(--panel); box-shadow:0 0 44px rgba(var(--daily-rgb),.60); display:flex; flex-direction:column; }
  .daily-attempt-strip { grid-template-columns:repeat(5,1fr); gap:7px; margin-bottom:12px; }
  .daily-attempt-strip span { width:100%; height:auto; aspect-ratio:1; border-radius:8px; }
  .daily-game-card { min-height:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
  .daily-round-grid { display:flex; flex-direction:column; }
  .daily-media-area, .daily-map-dock { display:contents; }
  .daily-image-wrap { position:relative; inset:auto; order:1; width:100%; height:auto; aspect-ratio:16/9; border-radius:14px; }
  .daily-map-wrap { order:2; width:100%; height:280px; margin-top:10px; border-radius:14px; }
  .daily-expand-map-button { display:none !important; }
  .daily-track-select-row { order:3; grid-template-columns:1fr; gap:9px; margin-top:12px; }
  .daily-track-select-row .daily-primary-button { grid-column:1 / -1; }
  #daily-select-track-button { display:none; }
  .daily-track-select-row input { height:34px; min-height:34px; padding:0 12px; border-radius:17px; font-size:16px; }
  .daily-feedback { order:4; min-height:28px; font-size:12px; line-height:1.25; }
  .daily-results-button { order:5; width:100%; margin-top:8px; }
  .daily-results-dialog-card { padding:26px 22px; }
  .daily-results-dialog-card h2,
  .daily-results-dialog-card > p,
  .daily-results-dialog-card h3 { font-size:24px; line-height:1.12; font-weight:700; }
  .daily-results-dialog-card > p { margin-top:5px; margin-bottom:28px; }
  .daily-results-squares { grid-template-columns:repeat(5,28px); gap:6px; }
  .daily-results-squares span { width:28px; height:28px; }
  .daily-results-actions { gap:10px; }
  .daily-results-dialog button { min-height:46px; padding:0 12px; border-radius:14px; font-size:16px; white-space:nowrap; }
  .daily-copy-results-button { min-width:0; }
  .daily-game-screen button { font-size:14px; }
  .daily-info-dialog button,
  .daily-track-list-dialog button { font-size:14px; }
  .daily-rules-list, .daily-legend li { font-size:13px; }
}

/* ==========================================================================
   MOBILE FOOTER ALIGNMENT — consistent across Main Menu / Zoom / Distance / Daily Dash
   ========================================================================== */
@media (max-width: 600px) {
  .site-footer,
  .mode-menu-screen .menu-footer,
  .home-footer,
  .distance-home-footer,
  .daily-home-footer {
    width: 100%;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
  }

  .site-footer .creator-row,
  .mode-menu-screen .menu-footer .creator-row,
  .home-footer .creator-row,
  .distance-home-footer .creator-row,
  .daily-home-footer .creator-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  .site-footer .creator-social-inline,
  .mode-menu-screen .menu-footer .creator-social-inline,
  .home-footer .creator-social-inline,
  .distance-home-footer .creator-social-inline,
  .daily-home-footer .creator-social-inline {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .site-footer .creator-social-inline > strong,
  .mode-menu-screen .menu-footer .creator-social-inline > strong,
  .home-footer .creator-social-inline > strong,
  .distance-home-footer .creator-social-inline > strong,
  .daily-home-footer .creator-social-inline > strong {
    font-size: 18px;
    line-height: 1.1;
    white-space: nowrap;
  }

  .site-footer .social-row,
  .mode-menu-screen .menu-footer .social-row,
  .home-footer .social-row,
  .distance-home-footer .social-row,
  .daily-home-footer .social-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0;
  }

  .site-footer .social-group,
  .mode-menu-screen .menu-footer .social-group,
  .home-footer .social-group,
  .distance-home-footer .social-group,
  .daily-home-footer .social-group {
    gap: 6px;
    font-size: 10px;
  }

  .site-footer .social-group img,
  .mode-menu-screen .menu-footer .social-group img,
  .home-footer .social-group img,
  .distance-home-footer .social-group img,
  .daily-home-footer .social-group img {
    height: 23px;
  }

  .site-footer .support-project-button,
  .mode-menu-screen .menu-footer .support-project-button,
  .home-footer .support-project-button,
  .distance-home-footer .support-project-button,
  .daily-home-footer .support-project-button {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 11px;
    font-size: 13px;
    white-space: nowrap;
    align-self: start;
  }

  .site-footer .fan-disclaimer,
  .mode-menu-screen .menu-footer .fan-disclaimer,
  .home-footer .fan-disclaimer,
  .distance-home-footer .fan-disclaimer,
  .daily-home-footer .fan-disclaimer {
    margin-top: 32px;
    font-size: 8.5px;
    line-height: 1.25;
  }
}

@media (max-width: 380px) {
  .site-footer .creator-row,
  .mode-menu-screen .menu-footer .creator-row,
  .home-footer .creator-row,
  .distance-home-footer .creator-row,
  .daily-home-footer .creator-row {
    gap: 9px;
  }

  .site-footer .creator-social-inline > strong,
  .mode-menu-screen .menu-footer .creator-social-inline > strong,
  .home-footer .creator-social-inline > strong,
  .distance-home-footer .creator-social-inline > strong,
  .daily-home-footer .creator-social-inline > strong {
    font-size: 16px;
  }

  .site-footer .support-project-button,
  .mode-menu-screen .menu-footer .support-project-button,
  .home-footer .support-project-button,
  .distance-home-footer .support-project-button,
  .daily-home-footer .support-project-button {
    min-height: 42px;
    padding-inline: 10px;
    font-size: 12px;
  }
}



/* DAILY DASH DROPDOWN ABOVE INPUT - 2026-09-22 */
.daily-track-suggestions {
  top: auto;
  bottom: calc(100% + 5px);
  z-index: 100;
}
