:root {
  --hs: 1;
  --big: 1;
  --ink: #33414f;
  --muted: #7b8a99;
  --panel: #ffffff;
  --shadow: #c3ccd6;
  --green: #2e9d5b;
  --armor: #3fbf6f;
  --fuel: #ffb43b;
  --danger: #e85d5d;
  --sky: #7ec8ea;
  --navy: #1a4a73;
  --safe-t: max(10px, env(safe-area-inset-top));
  --safe-r: max(10px, env(safe-area-inset-right));
  --safe-b: max(10px, env(safe-area-inset-bottom));
  --safe-l: max(10px, env(safe-area-inset-left));
  --lbl: max(13px, calc(16px * var(--hs) * var(--big)));
  --num: max(20px, calc(28px * var(--hs) * var(--big)));
  --title: max(22px, calc(32px * var(--hs) * var(--big)));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden;
  background: linear-gradient(#6cc3ee 0%, #b7e4f7 52%, #e3f5fc 100%);
  font-family: Fredoka, sans-serif;
  color: var(--ink);
  user-select: none;
  touch-action: none;
}
#game-root, #game-root canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
  background: linear-gradient(#6cc3ee 0%, #b7e4f7 52%, #e3f5fc 100%);
}
#overlays { position: absolute; inset: 0; pointer-events: none; }
#overlays .screen, #overlays .modal, #overlays button, #overlays input,
#overlays .credits-scroll, #touch-controls, #stick-zone, #hud-pause, #pause-btn {
  pointer-events: auto;
}

.hidden { display: none !important; }
.screen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.modal {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  background: rgba(20, 40, 70, 0.38);
  z-index: 40;
}

/* ---------- panels ---------- */
.panel {
  background: var(--panel);
  border-radius: 14px;
  box-shadow: 0 5px 0 var(--shadow), 0 8px 18px rgba(30, 60, 90, 0.18);
  color: var(--ink);
}
.lbl {
  font-family: Fredoka, sans-serif;
  font-weight: 600;
  font-size: var(--lbl);
  letter-spacing: 1.4px;
  color: var(--muted);
  line-height: 1.1;
  text-transform: uppercase;
}
.num, .obj-text, .hud-money {
  font-family: 'Lilita One', sans-serif;
  font-size: var(--num);
  line-height: 1.05;
  color: var(--ink);
}

/* ---------- boot ---------- */
#boot-screen { background: linear-gradient(#6cc3ee 0%, #a9def6 55%, #e3f5fc 100%); }
.boot-inner { text-align: center; width: min(420px, 70vw); }
.boot-title {
  font-family: 'Lilita One', sans-serif;
  font-size: clamp(28px, 6vw, 48px);
  color: #fff;
  text-shadow: 0 3px 0 var(--navy), 0 8px 18px rgba(10, 40, 80, 0.3);
  margin-bottom: 22px;
  white-space: nowrap;
}
.boot-bar {
  height: 16px; border-radius: 10px; background: rgba(255,255,255,0.55);
  overflow: hidden; box-shadow: inset 0 2px 4px rgba(30,60,90,0.15);
}
.boot-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #3fbf6f, #7ee0a0);
  border-radius: 10px;
  transition: width 0.12s linear;
}
.boot-pct { margin-top: 8px; color: #fff; font-weight: 600; }

/* ---------- title ---------- */
#title-screen { align-items: flex-start; padding-top: 6vh; }
.title-center { text-align: center; width: min(760px, 94vw); }
.logo-wrap {
  width: 100%;
  overflow: visible;
  transition: opacity 0.16s ease;
}
.logo-sub {
  font-family: Fredoka, sans-serif;
  font-weight: 700;
  letter-spacing: 4px;
  color: #1a4a73;
  font-size: max(12px, calc(14px * var(--hs)));
  margin-bottom: 4px;
}
.logo {
  margin: 0 auto 14px;
  font-family: 'Lilita One', sans-serif;
  font-size: clamp(26px, 5vw, 64px);
  line-height: 1;
  color: #fff8e8;
  letter-spacing: 1px;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
  transform-origin: top center;
  text-shadow:
    3px 0 0 var(--navy), -3px 0 0 var(--navy), 0 3px 0 var(--navy), 0 -3px 0 var(--navy),
    3px 3px 0 var(--navy), -3px 3px 0 var(--navy), 3px -3px 0 var(--navy), -3px -3px 0 var(--navy),
    0 8px 0 #0e3560, 0 14px 24px rgba(8, 30, 60, 0.35);
}
#title-screen.dimmed .logo-wrap,
#title-screen.dimmed .title-btns,
#title-screen.dimmed .title-stars { opacity: 0; pointer-events: none; }
.title-stars {
  font-size: 28px; color: #ffd23f; margin-bottom: 10px;
  text-shadow: 0 2px 0 #c79212;
  font-family: 'Lilita One', sans-serif;
}
.title-btns { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.title-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.ver-tag {
  position: absolute; right: var(--safe-r); bottom: var(--safe-b);
  font-size: 12px; color: rgba(20, 50, 80, 0.55); font-weight: 600;
}

.btn {
  font-family: 'Lilita One', sans-serif;
  border: 0; cursor: pointer;
  min-height: 52px; min-width: 52px;
  padding: 10px 22px;
  border-radius: 14px;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 0 var(--shadow), 0 8px 16px rgba(30,60,90,0.16);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.08s;
  flex-shrink: 0;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--shadow), 0 4px 10px rgba(30,60,90,0.16); }
.btn-play {
  min-width: 240px; min-height: 64px;
  font-size: 34px; padding: 12px 40px;
  color: #fff; background: linear-gradient(#4fd37e, #2e9d5b);
  box-shadow: 0 6px 0 #1e7a45, 0 10px 18px rgba(20, 80, 40, 0.25);
}
.btn-play:active { box-shadow: 0 2px 0 #1e7a45, 0 4px 10px rgba(20,80,40,0.25); }
.btn-primary {
  background: linear-gradient(#4ea4e8, #2f7fc0); color: #fff;
  box-shadow: 0 5px 0 #1d5e94, 0 8px 16px rgba(20,50,90,0.2);
  min-width: 160px;
}
.btn-ghost { background: #fff; min-width: 160px; }

body.touch .btn { min-height: 56px; }
body.touch .btn-play { min-height: 64px; }

/* ---------- modal cards ---------- */
.modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px 26px 20px;
  width: min(480px, calc(100vw - 24px));
  max-height: calc(100dvh - 20px);
  max-height: calc(100svh - 20px);
  box-shadow: 0 8px 0 #c3ccd6, 0 18px 40px rgba(20,40,70,0.28);
  display: flex; flex-direction: column; gap: 12px;
  overflow: hidden;
}
.modal-card h2 {
  font-family: 'Lilita One', sans-serif;
  margin: 0 0 4px;
  font-size: var(--title);
  text-align: center;
  flex-shrink: 0;
}
.slider-row, .toggle-row {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: max(16px, calc(18px * var(--hs) * var(--big)));
  min-height: 44px;
  flex-shrink: 0;
}
.slider-row span, .toggle-row span:first-child { flex: 0 0 110px; }
.slider-row input[type=range] { flex: 1; height: 28px; accent-color: #2f7fc0; }
.slider-row em { width: 36px; text-align: right; color: var(--muted); font-style: normal; }
.toggle-row { justify-content: space-between; cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle {
  width: 52px; height: 30px; border-radius: 16px;
  background: #cfd6de; position: relative; flex-shrink: 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.12);
}
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}
.toggle-row input:checked + .toggle { background: #3fbf6f; }
.toggle-row input:checked + .toggle::after { transform: translateX(22px); }

.credits-card { width: min(760px, calc(100vw - 24px)); }
.credits-scroll {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 4px 8px 12px;
  font-size: max(14px, calc(15px * var(--hs) * var(--big)));
  line-height: 1.35;
  color: var(--ink);
  outline: none;
  overscroll-behavior: contain;
}
.credits-scroll h3 {
  font-family: 'Lilita One', sans-serif;
  font-size: max(16px, calc(18px * var(--hs)));
  margin: 12px 0 6px; color: var(--navy);
}
.credits-scroll a { color: #2f7fc0; }
.credits-scroll p { margin: 0 0 8px; }
.cred-pack { margin: 0 0 10px; }
.cred-pack .cred-name { font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cred-pack .cred-url {
  font-size: 12px;
  line-height: 1.3;
  color: #2f7fc0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pause-card .btn, .results-card .btn { width: 100%; }
.confirm-msg {
  text-align: center; margin: 0;
  font-size: max(16px, calc(18px * var(--hs) * var(--big)));
}

.results-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; }
.results-side { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.star-row { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.star-item {
  display: flex; align-items: center; gap: 10px;
  background: #f4f7fb; border-radius: 12px; padding: 8px 12px;
  font-size: max(14px, calc(16px * var(--hs) * var(--big)));
  font-weight: 600;
}
.star-item .star {
  font-size: 28px; color: #d3dae2; width: 32px; text-align: center;
}
.star-item.on .star { color: #ffd23f; text-shadow: 0 2px 0 #c79212; }
.star-item .mark { margin-left: auto; font-size: 22px; }
.pay-box {
  background: #f4f7fb; border-radius: 12px; padding: 10px 14px;
  font-size: max(15px, calc(17px * var(--hs) * var(--big)));
  font-weight: 600;
}
.pay-box .total {
  font-family: 'Lilita One', sans-serif;
  font-size: max(26px, calc(32px * var(--hs)));
  color: var(--green); margin-top: 6px;
}

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
#hud button { pointer-events: auto; }
.hud-armor {
  position: absolute;
  top: var(--safe-t); left: var(--safe-l);
  width: min(300px, 42vw);
  padding: 10px 14px 12px;
}
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-row + .bar-row { margin-top: 8px; }
.bar-meta { flex: 1; min-width: 0; }
.bar { height: 14px; border-radius: 8px; background: #e3e8ee; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; border-radius: 8px; background: var(--armor); transform-origin: left center; }
#bar-fuel { background: var(--fuel); }
.hud-armor.low-armor #bar-armor { background: var(--danger); }
.hud-armor.low-fuel #bar-fuel { animation: pulse 0.7s ease-in-out infinite; }
@keyframes pulse { 50% { filter: brightness(1.35); } }

.hud-ico { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.hud-ico-fuel { width: 22px; margin: 0 3px; }

.hud-obj {
  position: absolute;
  top: var(--safe-t); left: 50%; transform: translateX(-50%);
  min-width: min(280px, 36vw);
  padding: 8px 18px 10px;
  text-align: center;
}
.obj-text { font-size: max(16px, calc(20px * var(--hs) * var(--big))); }

.hud-top-right {
  position: absolute; top: var(--safe-t); right: var(--safe-r);
  display: flex; gap: 8px; align-items: stretch;
}
.hud-money {
  padding: 8px 16px;
  min-width: 110px;
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  font-size: max(22px, calc(30px * var(--hs) * var(--big)));
}
.hud-pause {
  width: 56px; min-width: 56px; height: 56px; min-height: 56px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer; padding: 0; background: #fff;
}
.hud-pause span {
  width: 8px; height: 24px; background: var(--ink); border-radius: 2px;
}

.hud-radio {
  position: absolute;
  top: calc(var(--safe-t) + 118px);
  left: var(--safe-l);
  width: min(420px, 52vw);
  padding: 8px 14px;
  display: flex; align-items: center; gap: 12px;
  border-radius: 16px;
}
.radio-face {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background:
    radial-gradient(circle at 50% 42%, #f0b98d 0 9px, transparent 10px),
    linear-gradient(#5a6b3a, #5a6b3a) 8px 4px / 30px 14px no-repeat,
    linear-gradient(#5a6b3a, #5a6b3a) 6px 30px / 34px 16px no-repeat,
    #dbe7f3;
}
.radio-text {
  font-family: Fredoka, sans-serif;
  font-weight: 600;
  font-size: max(15px, calc(18px * var(--hs) * var(--big)));
  color: var(--ink);
  line-height: 1.2;
}

.hud-aboard {
  position: absolute;
  left: var(--safe-l);
  bottom: var(--safe-b);
  min-width: 170px;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
}
.person-ico {
  width: 28px; height: 40px; flex-shrink: 0;
  background:
    radial-gradient(circle at 50% 22%, #f0b98d 0 8px, transparent 9px),
    radial-gradient(circle at 50% 78%, #3a8fd9 0 14px, transparent 15px);
}

.hud-ammo {
  position: absolute;
  right: var(--safe-r);
  bottom: var(--safe-b);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 18px;
}
.ammo-col { display: flex; align-items: center; gap: 8px; }
.flare-ico {
  width: 18px; height: 30px;
  background:
    radial-gradient(circle at 50% 32%, #fff6c9 0 4px, #ffd23f 5px 10px, transparent 11px),
    linear-gradient(#f47c3c, #f47c3c) 5px 18px / 8px 12px no-repeat;
}

.edge-arrow {
  position: absolute; top: 46%; width: 56px; height: 40px;
  background: url('../assets/kenney/tank_arrowFull.png') center/contain no-repeat;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,0.15));
  pointer-events: none;
}
.edge-arrow.threat { filter: hue-rotate(-20deg) saturate(1.4) drop-shadow(0 3px 0 rgba(0,0,0,0.15)); }

/* ---------- hints ---------- */
#hint-cards {
  position: absolute; left: 50%; top: 58%;
  transform: translate(-50%, -50%);
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center;
  max-width: 90vw; pointer-events: none;
  z-index: 12;
}
body.modal-open #hint-cards { display: none !important; }
.hint {
  background: rgba(255,255,255,0.92);
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 0 var(--shadow);
  font-weight: 600;
  font-size: max(13px, calc(15px * var(--hs)));
  color: var(--ink);
}

/* ---------- touch ---------- */
#touch-controls { position: absolute; inset: 0; }
#stick-zone { position: absolute; left: 0; top: 0; width: 45%; height: 100%; }
#stick {
  position: absolute; width: 128px; height: 128px; pointer-events: none;
  transform: translate(-50%, -50%);
}
#stick-pad, #stick-nub { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.85; }
#stick-nub { width: 56px; height: 56px; left: 50%; top: 50%; margin: -28px 0 0 -28px; }

#stick-idle {
  position: absolute;
  left: calc(var(--safe-l) + 18px);
  bottom: calc(var(--safe-b) + 16px);
  width: 112px; height: 112px;
  pointer-events: none;
  opacity: 0.55;
}
#stick-idle.hidden { display: none !important; }
.stick-idle-ring {
  width: 100%; height: 100%;
  border: 3px solid rgba(255,255,255,0.78);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(30,60,90,0.16), inset 0 0 20px rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
}
#stick-idle span {
  position: absolute; left: 50%; top: 100%;
  transform: translate(-50%, 4px);
  font-weight: 700; font-size: 14px; color: #1a4a73;
  text-shadow: 0 1px 0 #fff;
  white-space: nowrap;
}
body.modal-open #stick-idle { display: none !important; }

#touch-btns {
  position: absolute;
  right: var(--safe-r);
  bottom: var(--safe-b);
  width: 196px;
  height: 196px;
  pointer-events: none;
}
.tbtn {
  position: absolute;
  pointer-events: auto;
  width: 64px; height: 64px; min-width: 64px; min-height: 64px;
  border: 3px solid #4ea4e8;
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: Fredoka, sans-serif; font-weight: 700; font-size: 14px;
  color: #33414f; letter-spacing: 0.3px;
  box-shadow: 0 4px 0 rgba(80,90,100,0.16), 0 8px 16px rgba(30,60,90,0.18);
  padding: 0;
}
.tbtn img, .tbtn .flare-ico, .tbtn .winch-ico { width: 22px; height: 22px; object-fit: contain; }
.tbtn .winch-ico { font-size: 18px; line-height: 22px; color: #1a4a73; }
.tbtn img.icon-mono { filter: brightness(0) saturate(100%) invert(22%) sepia(18%) saturate(900%) hue-rotate(330deg); }
.tbtn-fire {
  right: 0; bottom: 0;
  width: 88px; height: 88px; min-width: 88px; min-height: 88px;
  border-color: #e85d5d;
  font-size: 15px;
}
.tbtn-fire img { width: 28px; height: 28px; }
.tbtn-rocket { right: 8px; bottom: 100px; border-color: #2e9d5b; }
.tbtn-flare { right: 100px; bottom: 12px; border-color: #f47c3c; }
.tbtn-winch { right: 108px; bottom: 108px; border-color: #2f7fc0; }
.tbtn-winch.winch-out { background: #e8f3ff; border-color: #1a4a73; }
.tbtn-winch.winch-out .winch-ico { transform: rotate(180deg); }
.tbtn:active, .tbtn.held { transform: translateY(2px); filter: brightness(0.96); }
.tbadge {
  display: none;
  position: absolute; top: -5px; right: -5px;
  min-width: 22px; height: 22px; padding: 0 5px;
  background: #33414f; color: #fff;
  border-radius: 11px;
  font-family: 'Lilita One', sans-serif;
  font-size: 13px; font-style: normal; font-weight: 400;
  align-items: center; justify-content: center;
  box-shadow: 0 2px 0 rgba(0,0,0,0.15);
}

body.touch .tbadge { display: flex; }
body.touch .hud-ammo { display: none !important; }
body.touch .hud-aboard {
  left: 50%;
  bottom: var(--safe-b);
  top: auto;
  transform: translateX(-50%);
}
body.touch .hud-radio {
  top: calc(var(--safe-t) + 108px);
}

/* ---------- rotate ---------- */
#rotate-card {
  background: rgba(20, 48, 80, 0.82);
  z-index: 40;
}
.rotate-inner { text-align: center; color: #fff; }
.rotate-inner p {
  font-family: 'Lilita One', sans-serif;
  font-size: 28px; max-width: 280px; margin: 18px auto 0;
}
.phone-icon {
  width: 72px; height: 120px; margin: 0 auto;
  border: 6px solid #fff; border-radius: 12px;
  animation: spinphone 1.6s ease-in-out infinite;
}
@keyframes spinphone {
  0%, 30% { transform: rotate(0deg); }
  55%, 100% { transform: rotate(90deg); }
}

/* compact layouts */
@media (max-width: 960px) {
  .hud-armor { width: min(236px, 34vw); padding: 8px 10px; }
  .hud-obj { min-width: min(210px, 30vw); padding: 6px 12px 8px; }
  .hud-radio { width: min(340px, 46vw); top: calc(var(--safe-t) + 96px); }
  .hud-money { min-width: 90px; padding: 6px 12px; }
  .hud-pause { width: 48px; min-width: 48px; height: 48px; min-height: 48px; }
  body.touch .hud-aboard { top: auto; bottom: var(--safe-b); }
  body.touch .hud-radio { top: calc(var(--safe-t) + 96px); width: min(300px, 42vw); }
}
@media (max-width: 700px) {
  .hud-armor { width: min(178px, 32vw); padding: 7px 8px; }
  .hud-obj { min-width: min(168px, 28vw); padding: 5px 8px 7px; }
  .hud-radio { width: min(250px, 44vw); top: calc(var(--safe-t) + 78px); padding: 6px 10px; }
  .hud-aboard { min-width: 132px; padding: 6px 10px; }
  body.touch .hud-aboard { top: auto; bottom: var(--safe-b); min-width: 124px; }
  body.touch .hud-radio { top: calc(var(--safe-t) + 86px); width: min(230px, 40vw); }
}

/* short screens (phones landscape 375–450) */
@media (max-height: 450px) {
  .modal-card {
    padding: 10px 14px 10px;
    gap: 6px;
    border-radius: 16px;
    max-height: calc(100dvh - 12px);
  }
  .modal-card h2 { font-size: 22px; margin: 0; }
  .slider-row, .toggle-row { min-height: 32px; gap: 8px; font-size: 15px; }
  .slider-row span, .toggle-row span:first-child { flex-basis: 92px; }
  .modal-card .btn { min-height: 40px; font-size: 18px; padding: 6px 14px; }
  body.touch .modal-card .btn { min-height: 40px; }
  .modal-card .btn-play { min-width: 140px; min-height: 42px; font-size: 22px; padding: 6px 16px; }
  body.touch .modal-card .btn-play { min-height: 42px; }
  .pause-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(560px, calc(100vw - 20px));
  }
  .pause-card h2, .pause-card .btn-primary { grid-column: 1 / -1; }
  .pause-card .btn { width: 100%; min-width: 0; }
  .results-card { width: min(720px, calc(100vw - 16px)); }
  .results-body { flex-direction: row; gap: 12px; align-items: stretch; }
  .star-row { flex: 1.15; gap: 6px; }
  .results-side { flex: 0.95; justify-content: space-between; }
  .star-item { padding: 5px 8px; font-size: 13px; }
  .star-item .star { font-size: 22px; width: 24px; }
  .pay-box { padding: 8px 10px; font-size: 13px; }
  .pay-box .total { font-size: 22px; margin-top: 4px; }
  .credits-card { width: min(720px, calc(100vw - 16px)); }
  .cred-pack { margin: 0 0 6px; }
  .hud-aboard, .hud-ammo { padding: 8px 12px; }
  .hud-radio { top: calc(var(--safe-t) + 86px); }
  #title-screen { padding-top: 0.6vh; align-items: flex-start; }
  .logo { font-size: clamp(22px, 5.4vw, 40px); margin-bottom: 4px; }
  .logo-sub { margin-bottom: 0; letter-spacing: 3px; }
  #title-screen .btn-play { min-width: 180px; min-height: 56px; font-size: 26px; padding: 6px 28px; }
  #title-screen .btn-ghost { min-height: 56px; min-width: 140px; }
  .title-btns { gap: 6px; }
  .title-row { gap: 8px; }
  body.touch .hud-aboard { top: auto; bottom: var(--safe-b); padding: 4px 8px; }
  body.touch .hud-radio { top: calc(var(--safe-t) + 86px); padding: 5px 8px; }
  #stick-idle { width: 88px; height: 88px; bottom: calc(var(--safe-b) + 8px); }
  #stick-idle span { font-size: 12px; }
}

@media (max-height: 450px) and (min-width: 600px) {
  .results-card { width: min(740px, calc(100vw - 16px)); }
}

body.big-text {
  --big: 1.2;
}
body.short .modal-card {
  padding: 10px 14px;
  gap: 6px;
}
