/* Taipei Cloud Roam: on top of Slop New York's HUD stylesheet (style.css, MIT) — Taipei taxi yellow, Traditional Chinese type,
   and the two on-screen displays (DJI-Fly-style drone view, Betaflight-style FPV goggles view). */

:root {
  --font-sans: 'Inter', 'Noto Sans TC', 'PingFang TC', -apple-system, BlinkMacSystemFont, 'Microsoft JhengHei', sans-serif;
  --font-sign: 'Noto Sans TC', 'Inter', 'PingFang TC', sans-serif;
  --taxi: #f7c21b;
  --osd: #f4f6f2;
  --osd-dim: rgba(244, 246, 242, 0.62);
  --osd-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 6px rgba(0, 0, 0, 0.35);
  --fpv: #f2f5ea;
}

body { font-family: var(--font-sans); }

.tp-badge {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--taxi);
  color: #17140a;
  font: 900 17px/1 'Noto Sans TC', sans-serif;
}
.tp-badge.loader-bullet { width: 46px; height: 46px; font-size: 22px; }
.loader-credit {
  max-width: 440px;
  margin: 14px auto 0;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.location-place { font-family: var(--font-sign); font-weight: 700; }
.location-district {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
}
/* Taipei street-name sign: white on blue-green, rounded */
.street-sign.tw-sign {
  background: #0e5a7a;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-family: var(--font-sign);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
}

.hud-toast {
  min-height: 0;
  margin-bottom: 8px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(16, 17, 20, 0.78);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 30px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.hud-toast.show { opacity: 1; transform: none; }

/* ------------------------------------------------------------------------------------------------------------------
   On-screen displays
   ------------------------------------------------------------------------------------------------------------------ */
.osd {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  color: var(--osd);
  text-shadow: var(--osd-shadow);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.osd[hidden] { display: none; }
body.osd-on .hud-top-left,
body.osd-on .hud-bottom-left .location { opacity: 0.0; }

/* DJI-Fly-style: chips on top, a 16:9 frame guide, H / D / speeds at the bottom */
.osd-top {
  position: absolute;
  top: 84px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}
.osd-chip {
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.32);
  font-size: 13px;
  font-weight: 700;
}
.osd-chip#osd-d-mode { background: #f7c21b; color: #14130e; text-shadow: none; }
.osd-frame span {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: rgba(255, 255, 255, 0.7);
  border-style: solid;
}
.osd-frame span:nth-child(1) { top: 16%; left: 14%; border-width: 2px 0 0 2px; }
.osd-frame span:nth-child(2) { top: 16%; right: 14%; border-width: 2px 2px 0 0; }
.osd-frame span:nth-child(3) { bottom: 22%; left: 14%; border-width: 0 0 2px 2px; }
.osd-frame span:nth-child(4) { bottom: 22%; right: 14%; border-width: 0 2px 2px 0; }
.osd-gimbal {
  position: absolute;
  top: 50%;
  right: 4.5%;
  width: 4px;
  height: 150px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%);
}
.osd-gimbal span {
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f7c21b;
  transform: translate(-50%, -50%);
}
.osd-bottom {
  position: absolute;
  bottom: 150px;
  left: 50%;
  display: flex;
  gap: 26px;
  align-items: baseline;
  transform: translateX(-50%);
  font-size: 13px;
}
.osd-bottom small { margin: 0 3px; color: var(--osd-dim); font-weight: 500; }
.osd-bottom b { font-size: 20px; font-weight: 700; }
.osd-rec { display: flex; gap: 6px; align-items: center; color: var(--osd-dim); }
.osd-rec i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 8px #ff3b30; }
.osd-warn {
  position: absolute;
  top: 128px;
  left: 50%;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(240, 160, 20, 0.92);
  color: #1a1407;
  font: 700 14px/1.2 var(--font-sans);
  text-shadow: none;
  transform: translateX(-50%);
}
.osd-warn[hidden], .fpv-warn[hidden] { display: none; }

/* Betaflight-style OSD in white mono, corners + crosshair + horizon */
.osd-fpv { color: var(--fpv); font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
.fpv-corner { position: absolute; display: flex; flex-direction: column; gap: 4px; }
.fpv-tl { top: 92px; left: 8%; }
.fpv-tr { top: 92px; right: 8%; text-align: right; }
.fpv-bl { bottom: 150px; left: 8%; }
.fpv-br { bottom: 150px; right: 8%; text-align: right; }
.fpv-center { position: absolute; top: 50%; left: 50%; width: 260px; height: 160px; transform: translate(-50%, -50%); }
.fpv-cross { position: absolute; top: 50%; left: 50%; width: 46px; height: 2px; background: var(--fpv); transform: translate(-50%, -50%); box-shadow: var(--osd-shadow); }
.fpv-cross::after { content: ''; position: absolute; left: 50%; top: -7px; width: 2px; height: 7px; background: var(--fpv); transform: translateX(-50%); }
.fpv-horizon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 0;
  border-top: 2px dashed rgba(242, 245, 234, 0.75);
  transform: translate(-50%, -50%);
}
.fpv-warn {
  position: absolute;
  top: 38%;
  left: 50%;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  transform: translateX(-50%);
  white-space: pre;
}

/* The OSDs make room for the HUD panels */
body.hud-minimized .osd-bottom,
body.hud-minimized .fpv-bl,
body.hud-minimized .fpv-br { bottom: 40px; }

@media (max-width: 720px) {
  .osd-bottom { gap: 12px; bottom: 170px; font-size: 11px; }
  .osd-bottom b { font-size: 15px; }
  .osd-top { top: 70px; }
  .fpv-tl, .fpv-tr { top: 72px; }
}

/* the radar's N marker orbits the centre as the map turns (map.js sets the transform) */
.radar-north { top: 50%; left: 50%; margin: -8.5px 0 0 -8.5px; }

/* Mavic lens selector & shutter, stacked on the right beside the gimbal scale (the only interactive parts of the OSD) */
.osd-lenses {
  position: absolute;
  right: calc(4.5% + 26px);
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  transform: translateY(-100%) translateY(-40px);
  pointer-events: auto;
}
.osd-lens {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: var(--osd);
  font: 700 12px/1 'JetBrains Mono', monospace;
  cursor: pointer;
}
.osd-lens.active { border-color: #f7c21b; background: #f7c21b; color: #14130e; text-shadow: none; }
.osd-focal { font-size: 11px; color: var(--osd-dim); }
.osd-shutter {
  position: absolute;
  right: calc(4.5% + 18px);
  top: 50%;
  width: 54px;
  height: 54px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%);
  pointer-events: auto;
  cursor: pointer;
}
.osd-shutter:active { background: rgba(255, 255, 255, 0.7); }
#osd-d-signal.weak { background: rgba(255, 140, 0, 0.75); color: #160d00; text-shadow: none; }
.osd-fpv .lq-low { color: #ff5a4a; }
@media (max-width: 720px) {
  .osd-lenses { right: 52px; }
  .osd-shutter { right: 46px; }
}

/* ------------------------------------------------------------------------------------------------------------------
   Ring races
   ------------------------------------------------------------------------------------------------------------------ */
.race-hud {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 4;
  min-width: 220px;
  padding: 8px 16px 10px;
  border-radius: 14px;
  background: rgba(10, 12, 16, 0.62);
  color: #fff;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.race-hud[hidden], .race-marker[hidden], .race-result[hidden], .mission-hud[hidden], .mission-frame[hidden], .photo-result[hidden] { display: none; }
.race-name { color: var(--text-2); font-size: 12px; font-weight: 600; }
.race-time { font: 700 30px/1.15 'JetBrains Mono', monospace; letter-spacing: 0.02em; }
.race-meta { display: flex; justify-content: center; gap: 14px; color: var(--text-2); font: 600 12px/1.4 'JetBrains Mono', monospace; }
.race-hud.flash { animation: raceflash 0.35s ease-out; }
@keyframes raceflash { from { background: rgba(60, 255, 154, 0.55); } to { background: rgba(10, 12, 16, 0.62); } }
.race-marker {
  position: fixed;
  z-index: 4;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 2px solid #31d6ff;
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(49, 214, 255, 0.7);
  pointer-events: none;
}
.race-marker span {
  position: absolute;
  top: 30px;
  left: 50%;
  color: #bff3ff;
  font: 700 12px/1 'JetBrains Mono', monospace;
  text-shadow: var(--osd-shadow);
  white-space: nowrap;
  transform: translateX(-50%) rotate(-45deg);
  transform-origin: 0 0;
}
.race-marker.edge { border-color: #ffc23a; box-shadow: 0 0 10px rgba(255, 194, 58, 0.7); }
.race-result, .photo-result {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 6;
  padding: 20px 24px;
  border-radius: 18px;
  text-align: center;
  transform: translate(-50%, -50%);
}
.rr-title { color: var(--text-2); font-size: 13px; font-weight: 600; }
.rr-time { margin: 4px 0; font: 800 44px/1.1 'JetBrains Mono', monospace; }
.rr-best { color: var(--text-2); font-size: 13px; }
.rr-best.record { color: #3cff9a; font-weight: 700; }
.rr-actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.rr-btn {
  padding: 8px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: 600 13px/1.2 var(--font-sans);
  text-decoration: none;
  cursor: pointer;
}
.rr-btn.primary { border-color: transparent; background: var(--taxi); color: #17140a; }
.rr-btn kbd { margin-left: 6px; }

/* ------------------------------------------------------------------------------------------------------------------
   Photo missions
   ------------------------------------------------------------------------------------------------------------------ */
.mission-hud {
  position: fixed;
  top: 84px;
  left: var(--edge);
  z-index: 4;
  width: min(300px, calc(100vw - 2 * var(--edge)));
  padding: 12px 14px;
  border-radius: 14px;
}
.mission-title { font-size: 15px; font-weight: 800; }
.mission-brief { margin: 4px 0 8px; color: var(--text-2); font-size: 12px; line-height: 1.5; }
.mission-checks, .pr-checks { margin: 0; padding: 0; list-style: none; font-size: 12.5px; line-height: 1.7; }
.mission-checks li::before, .pr-checks li::before { content: '○'; display: inline-block; width: 1.4em; color: var(--text-3); }
.mission-checks li.ok::before, .pr-checks li.ok::before { content: '●'; color: #3cff9a; }
.mission-checks li.ok, .pr-checks li.ok { color: var(--text); }
.mission-checks li, .pr-checks li { color: var(--text-2); }
.mission-hint { margin-top: 8px; color: var(--text-3); font-size: 11px; }
.mission-frame {
  position: fixed;
  z-index: 3;
  border: 1.5px dashed rgba(255, 214, 90, 0.85);
  border-radius: 4px;
  pointer-events: none;
}
.mission-frame.good { border-style: solid; border-color: #3cff9a; }
.photo-result { display: flex; gap: 16px; align-items: center; max-width: min(720px, calc(100vw - 32px)); text-align: left; }
.photo-result img { width: min(360px, 45vw); border-radius: 10px; }
.pr-title { font-size: 15px; font-weight: 800; }
.pr-stars { margin: 4px 0 8px; color: #ffc23a; font-size: 26px; letter-spacing: 0.1em; }
.shutter-flash { position: fixed; inset: 0; z-index: 7; background: #fff; opacity: 0; pointer-events: none; }
.shutter-flash.on { animation: shutter 0.35s ease-out; }
@keyframes shutter { from { opacity: 0.85; } to { opacity: 0; } }
#btn-rain[aria-pressed="true"] { background: #3d6bd6; color: #fff; }
.pop-item .pop-best { margin-left: auto; color: var(--text-3); font: 600 11px/1 'JetBrains Mono', monospace; }
@media (max-width: 720px) {
  .photo-result { flex-direction: column; text-align: center; }
  .photo-result img { width: 100%; }
  .mission-hud { top: 70px; }
  .race-time { font-size: 24px; }
}

/* ------------------------------------------------------------------------------------------------------------------
   Phones & tablets (body.touch-enabled, js/touch.js): two thumb sticks in the lower corners, the HUD folded round them.
   Stacking: the stick zones sit over the 3D view, the OSD buttons, race & mission panels and the HUD over the zones.
   ------------------------------------------------------------------------------------------------------------------ */
.touch-flight[hidden], .t-actions, .t-act, .hint-touch { display: none; }
body.touch-enabled {
  --stick: 116px;
  --stick-bottom: max(18px, calc(env(safe-area-inset-bottom) + 8px));
  --t-osd-top: 72px;
  --t-osd-bottom: calc(var(--stick-bottom) + var(--stick) + 50px);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}
body.touch-enabled button, body.touch-enabled a { touch-action: manipulation; }
body.touch-enabled .hint-desk { display: none; }
body.touch-enabled .hint-touch { display: block; }

.tstick-zone {
  position: fixed;
  z-index: 8;
  bottom: 0;
  width: min(38vw, 340px);
  height: min(62vh, 320px);
  touch-action: none;
}
.tstick-left { left: 0; }
.tstick-right { right: 0; }
.tstick-base {
  position: absolute;
  bottom: var(--stick-bottom);
  width: var(--stick);
  height: var(--stick);
  border: 1.5px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0 29%, rgba(10, 12, 16, 0.3) 30%);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  opacity: 0.6;
  transition: opacity 0.25s;
  pointer-events: none;
}
.tstick-left .tstick-base { left: max(22px, calc(env(safe-area-inset-left) + 10px)); }
.tstick-right .tstick-base { right: max(22px, calc(env(safe-area-inset-right) + 10px)); }
.tstick-base::before, .tstick-base::after { content: ''; position: absolute; background: rgba(255, 255, 255, 0.16); }
.tstick-base::before { top: 12%; bottom: 12%; left: 50%; width: 1px; }
.tstick-base::after { left: 12%; right: 12%; top: 50%; height: 1px; }
/* a held throttle: the vertical axis becomes its track */
.tstick-zone.holding .tstick-base::before { width: 4px; margin-left: -2px; border-radius: 2px; background: rgba(247, 194, 27, 0.45); }
.tstick-zone.active .tstick-base { opacity: 1; transition: none; }
.tstick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44%;
  height: 44%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(246, 245, 242, 0.88);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transform: translate(calc(-50% + var(--kx, 0px)), calc(-50% + var(--ky, 0px)));
}
.tstick-zone.active .tstick-knob { border-color: var(--taxi); background: var(--taxi); }
.tstick-caption {
  position: absolute;
  bottom: calc(var(--stick-bottom) + var(--stick) + 6px);
  width: var(--stick);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text);
  text-shadow: 0 1px 4px #000, 0 0 10px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.25s;
}
.tstick-caption b { font-size: 11.5px; font-weight: 700; }
.tstick-caption small { color: var(--text-2); font: 600 9px/1.3 'JetBrains Mono', monospace; letter-spacing: 0.06em; }
.tstick-left .tstick-caption { left: max(22px, calc(env(safe-area-inset-left) + 10px)); }
.tstick-right .tstick-caption { right: max(22px, calc(env(safe-area-inset-right) + 10px)); }
.tstick-zone.active .tstick-caption { opacity: 0.25; }

/* FPV flight mode & reset, the Mavic's obstacle avoidance: stacked on the inner side of the right stick (phones held
   upright: between the sticks) */
.hud-touch-actions { display: none; }
body.touch-enabled .hud-touch-actions {
  display: block;
  right: calc(max(22px, calc(env(safe-area-inset-right) + 10px)) + var(--stick) + 14px);
  bottom: var(--stick-bottom);
}
body.touch-enabled .t-actions { display: flex; flex-direction: column; gap: 8px; }
body.touch-enabled[data-mode="fpv"] .t-act[data-for="fpv"],
body.touch-enabled[data-mode="drone"] .t-act[data-for="drone"] { display: inline-flex; }
.t-act {
  min-width: 58px;
  height: 44px;
  padding: 0 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  pointer-events: auto;
}
.t-act small { color: var(--text-3); font: 600 8.5px/1.2 'JetBrains Mono', monospace; letter-spacing: 0.08em; }
.t-act.on, .t-act[aria-pressed="true"] { border-color: transparent; background: var(--taxi); color: #17140a; }
.t-act.on small, .t-act[aria-pressed="true"] small { color: rgba(23, 20, 10, 0.6); }
.t-act:active { transform: scale(0.96); }

/* exit buttons on the race & mission panels */
.hud-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text-2);
  pointer-events: auto;
  cursor: pointer;
}
.hud-x .icon { width: 16px; height: 16px; }
.hud-x:hover { color: var(--text); background: var(--hover); }
.race-hud { padding-right: 38px; padding-left: 38px; }
.mission-hud { padding-right: 38px; }
body.touch-enabled .hud-x { width: 40px; height: 40px; top: 2px; right: 2px; }

/* the HUD round the sticks */
body.touch-enabled .hud-top-left { top: max(var(--edge), env(safe-area-inset-top)); left: max(var(--edge), env(safe-area-inset-left)); }
body.touch-enabled .brand { width: 44px; height: 44px; padding: 0; justify-content: center; }
body.touch-enabled .brand-titles { display: none; }
body.touch-enabled .hud-bottom-right { top: max(var(--edge), env(safe-area-inset-top)); left: calc(max(var(--edge), env(safe-area-inset-left)) + 52px); right: auto; bottom: auto; }
body.touch-enabled .cluster { width: auto; }
body.touch-enabled .camera-switch { height: 44px; }
body.touch-enabled .camera-current { max-width: 170px; min-height: 44px; padding: 0 6px; gap: 6px; }
body.touch-enabled #hud-active-camera { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.touch-enabled .hud-bottom-center { bottom: max(var(--edge), env(safe-area-inset-bottom)); gap: 8px; }
body.touch-enabled .hud-toast { max-width: calc(100vw - 2 * var(--stick) - 80px); padding: 5px 14px; border-radius: 14px; line-height: 1.4; text-align: center; white-space: normal; }
body.touch-enabled .hud-bottom-left { bottom: calc(var(--t-osd-bottom) + 70px); pointer-events: none; }
body.touch-enabled .hud-bottom-left > * { pointer-events: none; }
body.touch-enabled .osd { z-index: 9; }
body.touch-enabled .race-hud, body.touch-enabled .mission-hud { z-index: 9; top: var(--t-osd-top); }
body.touch-enabled .race-hud .hud-x, body.touch-enabled .mission-hud .hud-x { pointer-events: auto; }
body.touch-enabled .race-result, body.touch-enabled .photo-result { z-index: 11; }
body.touch-enabled .osd-top, body.touch-enabled .fpv-tl, body.touch-enabled .fpv-tr { top: var(--t-osd-top); }
body.touch-enabled .osd-bottom, body.touch-enabled .fpv-bl, body.touch-enabled .fpv-br { bottom: var(--t-osd-bottom); }
body.touch-enabled .osd-warn { top: calc(var(--t-osd-top) + 40px); }
body.touch-enabled .mission-hud { width: min(250px, calc(100vw - 2 * var(--edge))); padding: 10px 38px 10px 12px; }
body.touch-enabled .mission-brief { display: none; }
body.touch-enabled .mission-checks { font-size: 11.5px; line-height: 1.6; }
body.touch-enabled .osd-lens { width: 42px; height: 42px; }

/* phones: only the current time of day shows, tapping it steps to the next */
@media (max-width: 1023px) {
  body.touch-enabled .time-btn:not(.active) { display: none; }
  body.touch-enabled .time-btn.active { gap: 5px; padding: 0 10px; }
  body.touch-enabled .time-btn.active .seg-label { display: inline; }
}

/* phones held sideways: everything low and to the sides */
@media (orientation: landscape) and (max-height: 500px) {
  body.touch-enabled { --stick: 108px; --t-osd-top: 66px; }
  body.touch-enabled .osd-gimbal { height: 96px; }
  body.touch-enabled .osd-fpv { font-size: 13px; }
  body.touch-enabled .fpv-corner { gap: 2px; }
  body.touch-enabled .osd-lenses { flex-direction: row; right: calc(4.5% + 82px); transform: translateY(-50%) translateY(-48px); }
  body.touch-enabled .osd-rec { display: none; }
  body.touch-enabled .osd-bottom { gap: 12px; font-size: 11px; }
  body.touch-enabled .osd-bottom b { font-size: 15px; }
  body.touch-enabled .mission-hud { width: 222px; padding: 8px 36px 8px 11px; }
  body.touch-enabled .mission-title { font-size: 12.5px; }
  body.touch-enabled .mission-checks { font-size: 11px; line-height: 1.5; }
  body.touch-enabled .mission-hint { display: none; }
  body.touch-enabled .race-time { font-size: 22px; }
  body.touch-enabled .race-hud { padding-top: 4px; padding-bottom: 6px; }
}

/* phones held upright: the mode switch along the bottom, the sticks above it, the OSDs between */
@media (orientation: portrait) {
  body.touch-enabled {
    --stick: 104px;
    --stick-bottom: calc(max(var(--edge), env(safe-area-inset-bottom)) + 70px);
    --t-osd-top: 124px;
  }
  .tstick-zone { width: 50vw; height: min(46vh, 380px); }
  body.touch-enabled .toolbar { max-width: calc(100vw - 2 * var(--edge) - 52px); flex-wrap: wrap; justify-content: flex-end; }
  body.touch-enabled .hud-bottom-right { top: calc(max(var(--edge), env(safe-area-inset-top)) + 52px); left: max(var(--edge), env(safe-area-inset-left)); }
  body.touch-enabled .camera-current { max-width: 130px; }
  body.touch-enabled .hud-toast { max-width: calc(100vw - 32px); margin-bottom: calc(var(--stick) + 50px); }
  body.touch-enabled .hud-touch-actions { right: auto; left: 50%; bottom: calc(var(--stick-bottom) + 6px); transform: translateX(-50%); }
  body.touch-enabled .t-actions { flex-direction: row; }
  body.touch-enabled .t-act { min-width: 52px; padding: 0 6px; }
  body.touch-enabled .osd-bottom { gap: 10px; }
}

/* tablets: bigger sticks, all the room in the world */
@media (min-width: 1024px) and (min-height: 700px) {
  body.touch-enabled { --stick: 140px; --t-osd-top: 84px; }
}
