@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/press-start-2p.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

:root {
  --ink: #0a1020;
  --screen: #10182e;
  --grape: #162044;
  --purple: #8a78ff;
  --neon: #c4d4ff;
  --volt: #3ff7e4;
  --mint: #6ff3dc;
  --candy: #ff4d9a;
  --paper: #e8f4ff;
  --shadow: #040814;
  --dock: rgba(8, 12, 28, 0.78);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  font-family: ui-rounded, "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

#stage, #map {
  position: absolute;
  inset: 0;
  touch-action: none;
}

#map {
  z-index: 1;
  background: #071018;
}

.strike-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 460;
}

.hud-top {
  position: absolute;
  top: calc(10px + var(--safe-t));
  left: calc(10px + var(--safe-l));
  right: calc(10px + var(--safe-r));
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.brand {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--dock);
  border: 2px solid var(--volt);
  box-shadow: 2px 2px 0 var(--shadow);
  backdrop-filter: blur(10px);
}

.mascot {
  width: 52px;
  height: 52px;
  image-rendering: auto;
  flex: none;
}

.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.wordmark .name {
  font-family: "Press Start 2P", ui-monospace, monospace;
  font-size: 8px;
  color: var(--volt);
  text-shadow: 2px 2px 0 #2a1d78;
  letter-spacing: 0.02em;
}

.wordmark .ver-chip {
  display: block;
  margin-top: 5px;
  padding: 0;
  font-family: ui-rounded, "Trebuchet MS", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--neon);
  background: none;
  border: 0;
  box-shadow: none;
}

.src-btn {
  position: absolute;
  top: calc(10px + var(--safe-t));
  right: calc(10px + var(--safe-r));
  z-index: 22;
  padding: 4px 7px;
  border: 2px solid var(--volt);
  background: var(--dock);
  color: var(--volt);
  font-family: ui-rounded, "Trebuchet MS", sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  box-shadow: 2px 2px 0 var(--shadow);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.src-modal {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: 20px;
}

.src-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 24, 0.55);
}

.src-card {
  position: relative;
  width: min(340px, 100%);
  padding: 12px 12px 14px;
  background: var(--screen);
  border: 2px solid var(--volt);
  box-shadow: 4px 4px 0 var(--shadow);
}

.src-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--volt);
}

.src-head .icon-btn { margin-left: auto; }

.src-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.src-list li {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(155, 176, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
  color: var(--paper);
}

.src-list span {
  flex: 0 0 78px;
  color: var(--neon);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.src-note {
  margin: 10px 0 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--neon);
}

.asof {
  pointer-events: auto;
  max-width: min(58vw, 280px);
  padding: 4px 7px;
  background: var(--dock);
  border: 2px solid var(--purple);
  box-shadow: 2px 2px 0 var(--shadow);
  backdrop-filter: blur(10px);
  text-align: right;
}

#frameTime {
  font-family: ui-rounded, "Trebuchet MS", sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--volt);
}

.fresh {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--neon);
  line-height: 1.25;
}

.legend {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  font-family: ui-rounded, "Trebuchet MS", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--paper);
}

.swatch {
  width: 14px;
  height: 12px;
  border: 1px solid #000;
}

.s1 { background: #00e1ff; }
.s2 { background: #1e6bff; }
.s3 { background: #00e010; }
.s4 { background: #ffff00; }
.s5 { background: #ff4a00; }
.s6 { background: #ff40ff; }

.legend-hi { color: #ff9ad8; margin-left: 2px; }

.banner {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  z-index: 30;
  width: min(360px, calc(100% - 28px));
  padding: 18px;
  background: var(--grape);
  border: 3px solid var(--candy);
  box-shadow: 6px 6px 0 var(--shadow);
  text-align: center;
}

.banner p { margin: 0 0 14px; font-weight: 700; }

.hidden { display: none !important; }

.edge-tab {
  position: absolute;
  right: 0;
  top: 42%;
  z-index: 22;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 10px 5px;
  border: 2px solid var(--volt);
  border-right: 0;
  background: var(--dock);
  color: var(--volt);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  box-shadow: -2px 2px 0 var(--shadow);
  cursor: pointer;
}

.sheet {
  position: absolute;
  right: calc(8px + var(--safe-r));
  top: calc(48px + var(--safe-t));
  z-index: 23;
  width: min(280px, calc(100vw - 24px));
  padding: 10px;
  background: var(--dock);
  border: 2px solid var(--volt);
  box-shadow: 3px 3px 0 var(--shadow);
  backdrop-filter: blur(12px);
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 11px;
}

.sheet-head .ver { margin-left: auto; }

.sheet-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 800;
  color: var(--neon);
}

.sheet-row.extras { justify-content: flex-start; }

.bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px calc(8px + var(--safe-b));
  background: linear-gradient(180deg, transparent, rgba(8, 2, 18, 0.72) 28%);
  pointer-events: none;
}

.bar > * { pointer-events: auto; }

.bar.is-hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.bar-hide {
  width: 28px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--volt);
  font-size: 16px;
  cursor: pointer;
  flex: 0 0 auto;
}

.dock-tab {
  position: absolute;
  left: 50%;
  bottom: calc(4px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 21;
  min-width: 56px;
  height: 26px;
  padding: 0 12px;
  border: 2px solid var(--volt);
  background: var(--dock);
  color: var(--volt);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 2px 2px 0 var(--shadow);
  cursor: pointer;
}

.timeline {
  position: relative;
  flex: 1;
  min-width: 0;
  padding-top: 18px;
}

.time-bubble {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 999px;
  background: #0a1020;
  border: 1px solid var(--volt);
  color: var(--volt);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  max-width: calc(100% - 8px);
}

.scrub-wrap {
  position: relative;
}

.now-pip {
  position: absolute;
  top: 3px;
  left: 100%;
  width: 2px;
  height: 10px;
  background: var(--volt);
  box-shadow: 0 0 0 1px #000;
  transform: translateX(-50%);
  pointer-events: none;
}

.ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 1px;
  font-size: 9px;
  font-weight: 700;
  color: #c4d4ff;
}

#tickEnd {
  color: var(--volt);
}

#scrub, #opacity {
  touch-action: none;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  background: transparent;
}

#scrub::-webkit-slider-runnable-track,
#opacity::-webkit-slider-runnable-track {
  height: 5px;
  background: linear-gradient(90deg, #3d7cff, #3dffe6, #ffe14a, #ff4d9a);
  border: 1px solid #000;
}

#scrub::-webkit-slider-thumb,
#opacity::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  background: var(--volt);
  border: 2px solid #000;
  box-shadow: 1px 1px 0 #6b21a8;
}

#scrub::-moz-range-track,
#opacity::-moz-range-track {
  height: 5px;
  background: linear-gradient(90deg, #3d7cff, #3dffe6, #ffe14a, #ff4d9a);
  border: 1px solid #000;
}

#scrub::-moz-range-thumb,
#opacity::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--volt);
  border: 2px solid #000;
}

.dock-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.ver {
  font-family: ui-rounded, "Trebuchet MS", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--neon);
  white-space: nowrap;
  margin-left: auto;
  opacity: 0.9;
}

.gate .ver {
  display: block;
  margin: 10px auto 0;
  text-align: center;
  font-size: 11px;
}

.btn {
  font-family: ui-rounded, "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: 0.03em;
  border: 2px solid #000;
  background: var(--purple);
  color: var(--paper);
  box-shadow: 1px 1px 0 var(--shadow);
  cursor: pointer;
  min-height: 28px;
}

.btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--shadow); }

.btn.primary { background: var(--volt); color: #0a1020; }

.btn.ghost {
  background: transparent;
  color: var(--neon);
  box-shadow: none;
  min-height: 36px;
}

.btn.play {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--volt);
  color: #0a1020;
  font-size: 14px;
  flex: 0 0 auto;
  border: 0;
  box-shadow: none;
}

.btn.play.playing {
  animation: playPulse 1.1s ease-in-out infinite;
}

@keyframes playPulse {
  0%, 100% { box-shadow: 1px 1px 0 var(--shadow), 0 0 0 0 rgba(46, 230, 214, 0.7); }
  50% { box-shadow: 1px 1px 0 var(--shadow), 0 0 0 6px rgba(46, 230, 214, 0); }
}

.speed {
  display: flex;
  border: 2px solid #000;
  box-shadow: 1px 1px 0 var(--shadow);
}

.speed-btn {
  min-width: 26px;
  min-height: 26px;
  padding: 0 4px;
  box-shadow: none;
  border: 0;
  border-right: 2px solid #000;
  background: #1a2458;
  font-size: 10px;
}

.speed-btn:last-child { border-right: 0; }

.speed-btn.on { background: var(--mint); color: #042f2e; }

.toggle-btn {
  min-width: 44px;
  min-height: 26px;
  padding: 0 10px;
  font-size: 10px;
  background: #1a2458;
  color: var(--neon);
}

.toggle-btn.on {
  background: var(--mint);
  color: #042f2e;
}

.leaflet-rivers-pane {
  z-index: 320;
  pointer-events: none;
}

.leaflet-borders-pane {
  z-index: 345;
  pointer-events: none;
}

.leaflet-radar-pane {
  z-index: 400;
  pointer-events: none;
}

.leaflet-radar-pane .leaflet-layer {
  will-change: opacity;
}

.leaflet-radar-pane img {
  /* Crisp NEXRAD — no saturate/blur stacks (those soften + cost GPU) */
  filter: none;
  image-rendering: auto;
}

.icon-btn {
  min-width: 26px;
  width: 26px;
  min-height: 26px;
  font-size: 12px;
  background: #1a2458;
  flex: 0 0 auto;
}

.icon-btn.on { background: var(--candy); }

.opacity {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-family: ui-rounded, "Trebuchet MS", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--neon);
}

.opacity input { height: 16px; flex: 1; }

.loc-chip {
  min-width: 0;
  padding: 0 5px;
  font-size: 10px;
  line-height: 1.2;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  justify-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  padding: max(12px, var(--safe-t)) max(16px, var(--safe-r)) max(12px, var(--safe-b)) max(16px, var(--safe-l));
  background: rgba(6, 10, 24, 0.55);
  backdrop-filter: blur(4px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gate-card {
  box-sizing: border-box;
  width: 100%;
  max-width: 400px;
  min-width: 0;
  margin: 0 auto;
  padding: 22px 18px 16px;
  background: var(--screen);
  border: 4px solid var(--volt);
  box-shadow: 8px 8px 0 var(--shadow);
  text-align: center;
}

.gate-card img {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.gate-card h1 {
  font-family: "Press Start 2P", ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.4;
  color: var(--volt);
  text-shadow: 3px 3px 0 #2a1d78;
  margin: 10px 0 12px;
}

.gate-copy {
  margin: 0 0 16px;
  font-weight: 700;
  line-height: 1.4;
}

.gate-hint {
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--neon);
}

.gate-error { color: var(--candy); font-weight: 700; }

.zip-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  min-width: 0;
  width: 100%;
}

.zip-row input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  min-height: 52px;
  border: 3px solid #000;
  background: #e8f4ff;
  color: #10182e;
  font-family: ui-rounded, "Trebuchet MS", sans-serif;
  font-weight: 800;
  font-size: 22px;
  text-align: center;
  letter-spacing: 0.18em;
}

.zip-row .btn {
  flex: 0 0 auto;
  padding: 0 12px;
  font-size: 14px;
  white-space: nowrap;
}

.gate .btn {
  min-height: 44px;
}

.gate-card > .btn.primary,
.gate-card > .btn.chunky {
  width: 100%;
  font-size: 16px;
}

.zip-row .btn.chunky,
.zip-row .btn {
  width: auto;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.leaflet-control-attribution,
.leaflet-control-attribution.leaflet-control,
.leaflet-attribution-flag {
  display: none !important;
}

.viper-pin-wrap { background: none !important; border: 0 !important; }
.viper-pin {
  display: block;
  width: 7px;
  height: 7px;
  border: 1px solid var(--volt);
  background: var(--mint);
  border-radius: 50%;
  box-shadow: 0 0 0 1px #000;
}

@media (min-width: 720px) {
  .bar {
    left: 50%;
    right: auto;
    width: min(640px, calc(100% - 40px));
    transform: translateX(-50%);
    background: transparent;
  }
  .bar.is-hidden { transform: translate(-50%, 110%); }
  .timeline {
    padding: 18px 12px 6px;
    background: rgba(8, 12, 28, 0.72);
    border-radius: 8px;
  }
}



.leaflet-places-pane {
  z-index: 455;
  pointer-events: none;
  filter: none;
}

.viper-place-wrap {
  background: none !important;
  border: 0 !important;
}

.viper-place {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 800;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #111;
  white-space: nowrap;
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 1px 0 #fff,
    0 -1px 0 #fff,
    1px 0 0 #fff,
    -1px 0 0 #fff;
}

.viper-place-state {
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: #161616;
}

.viper-place-city {
  font-size: 10px;
}

/* Label-free DEM — no saturate/sepia/multiply mush */
.terrain-tiles {
  filter: none;
  image-rendering: auto;
}

/* Thin highways above radar; no contrast punch */
.road-tiles {
  filter: none;
  image-rendering: auto;
}

.leaflet-roads-pane {
  z-index: 430;
  pointer-events: none;
}

/* Vertical DBZ legend (reference-style) */
.dbz-legend {
  position: absolute;
  top: 72px;
  right: 10px;
  z-index: 25;
  width: 46px;
  padding: 6px 4px 8px;
  background: rgba(28, 22, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
  pointer-events: none;
  font-family: ui-rounded, "Trebuchet MS", sans-serif;
  color: #f4f0e6;
}
.dbz-head {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  margin-bottom: 4px;
}
.dbz-scale {
  position: relative;
  height: 168px;
}
.dbz-bar {
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 12px;
  border: 1px solid #111;
  background: linear-gradient(
    to top,
    #0a0a2e 0%,
    #1e4cff 12%,
    #00e1ff 22%,
    #00c010 38%,
    #a0ff00 48%,
    #ffff00 58%,
    #ff9a00 68%,
    #ff2000 78%,
    #ff40ff 88%,
    #ffffff 100%
  );
}
.dbz-ticks {
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  color: #f4f0e6;
  text-shadow: 0 1px 0 #000;
}
.dbz-tag {
  position: absolute;
  left: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 0 #000;
}
.dbz-tag.hvy { top: 8%; color: #ff9ad8; }
.dbz-tag.mid { top: 42%; color: #ffe14a; }
.dbz-tag.lgt { top: 72%; color: #7ad7ff; }



.leaflet-motion-pane {
  z-index: 420;
  pointer-events: none;
}

.viper-motion-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* —— Phone-first (iPhone widths incl. 390×844) —— */
@media (max-width: 520px) {
  .mascot {
    width: 44px;
    height: 44px;
  }
  .brand {
    padding: 3px 8px 3px 3px;
    gap: 6px;
  }
  .wordmark .name { font-size: 7px; }
  .wordmark .ver-chip { font-size: 10px; margin-top: 4px; }

  .src-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 12px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  /* Thumb-reachable MORE: sit above dock, ≥44px hit strip */
  .edge-tab {
    top: auto;
    bottom: calc(118px + var(--safe-b));
    min-width: 44px;
    padding: 16px 14px;
    font-size: 11px;
    letter-spacing: 0.14em;
    border-width: 2px;
  }

  .bar {
    gap: 6px;
    padding: 8px 8px calc(12px + var(--safe-b));
    align-items: flex-end;
    background: linear-gradient(180deg, transparent, rgba(8, 2, 18, 0.82) 22%);
  }

  .btn.play {
    width: 48px;
    min-width: 48px;
    height: 48px;
    font-size: 16px;
  }

  .bar-hide {
    width: 44px;
    min-width: 44px;
    height: 48px;
    font-size: 20px;
  }

  .dock-tab {
    min-width: 72px;
    height: 44px;
    padding: 0 16px;
    font-size: 16px;
    bottom: calc(10px + var(--safe-b));
  }

  .timeline {
    padding-top: 24px;
    padding-bottom: 2px;
  }

  .time-bubble {
    font-size: 11px;
    padding: 4px 10px;
    max-width: calc(100% - 4px);
  }

  .ticks {
    font-size: 10px;
    margin-top: 4px;
    color: #d6e2ff;
  }

  /* Fat scrub — thumb-friendly (≥44px hit, 28px thumb) */
  #scrub,
  #opacity {
    height: 44px;
    touch-action: none;
  }

  #scrub::-webkit-slider-runnable-track,
  #opacity::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 2px;
  }

  #scrub::-webkit-slider-thumb,
  #opacity::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    margin-top: -9px;
    border-radius: 4px;
  }

  #scrub::-moz-range-track,
  #opacity::-moz-range-track {
    height: 10px;
  }

  #scrub::-moz-range-thumb,
  #opacity::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 4px;
  }

  .scrub-wrap {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .now-pip {
    top: 15px;
    height: 14px;
    width: 3px;
  }

  .sheet {
    top: calc(56px + var(--safe-t));
    right: calc(8px + var(--safe-r));
    width: min(300px, calc(100vw - 20px));
    max-height: calc(100dvh - 140px - var(--safe-b));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }

  .icon-btn {
    min-width: 44px;
    width: 44px;
    min-height: 44px;
    font-size: 16px;
  }

  .speed-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 12px;
  }

  .toggle-btn {
    min-width: 56px;
    min-height: 44px;
    font-size: 12px;
  }

  .loc-chip {
    min-height: 44px;
    max-width: 96px;
    padding: 0 10px;
    font-size: 12px;
  }

  .sheet-row {
    font-size: 11px;
    margin-top: 10px;
    gap: 10px;
  }

  .opacity input { height: 44px; }

  .gate-card {
    padding: 18px 14px 14px;
    box-shadow: 4px 4px 0 var(--shadow);
  }
  .gate-card h1 { font-size: 13px; }
  .zip-row input {
    font-size: 18px;
    letter-spacing: 0.12em;
    min-height: 52px;
  }

  /* Place labels readable through weather on small screens */
  .viper-place {
    font-size: 11px;
  }
  .viper-place-state {
    font-size: 13px;
  }
  .viper-place-city {
    font-size: 11px;
  }

  .dbz-legend {
    top: calc(56px + var(--safe-t));
    right: calc(6px + var(--safe-r));
    width: 40px;
    padding: 4px 2px 6px;
  }
  .dbz-scale { height: 132px; }
  .dbz-bar { left: 12px; width: 10px; }
  .dbz-ticks { left: 24px; font-size: 7px; }

  .src-modal {
    padding: max(12px, var(--safe-t)) max(12px, var(--safe-r)) max(12px, var(--safe-b)) max(12px, var(--safe-l));
    align-items: end;
  }
  .src-card {
    width: min(360px, 100%);
    max-height: calc(100dvh - 48px - var(--safe-t) - var(--safe-b));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* v0.1.16 scrub glide */
#scrub {
  touch-action: none;
  cursor: grab;
}
#scrub:active {
  cursor: grabbing;
}
.scrub-wrap {
  touch-action: none;
}
