@charset "UTF-8";

:root {
  color-scheme: light;
  --ink: #102d28;
  --ink-soft: #31524b;
  --paper: #f4f0e6;
  --paper-deep: #e8e0cf;
  --card: #fffdf8;
  --forest: #1f5a42;
  --forest-bright: #2f7a54;
  --moss: #86a66f;
  --water: #3e8eb0;
  --route: #ff665f;
  --gold: #f3b23d;
  --danger: #c9352b;
  --line: #d8cfbd;
  --shadow: 0 14px 42px rgb(16 45 40 / 16%);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  overscroll-behavior-y: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

a {
  color: var(--forest);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.app-shell {
  width: min(100%, 1500px);
  min-height: 100svh;
  margin: 0 auto;
  background: var(--paper);
}

.topbar {
  position: relative;
  z-index: 900;
  display: flex;
  min-height: calc(68px + var(--safe-top));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(9px + var(--safe-top)) 14px 9px;
  background: var(--ink);
  color: white;
  box-shadow: 0 1px 0 rgb(255 255 255 / 8%);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 18%);
}

.brand span {
  display: grid;
  min-width: 0;
}

.brand strong {
  overflow: hidden;
  font-size: clamp(17px, 4.8vw, 21px);
  font-weight: 860;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  margin-top: 3px;
  color: #b9cbc5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgb(255 255 255 / 17%);
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
  color: white;
  font-size: 12px;
  font-weight: 780;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 9%);
}

.dot-ready {
  background: #5ee094;
}

.dot-wait {
  background: var(--gold);
}

.dot-bad {
  background: #ff7b73;
}

main {
  padding-bottom: calc(76px + var(--safe-bottom));
}

.map-stage {
  position: relative;
  height: clamp(430px, 61svh, 680px);
  min-height: 430px;
  overflow: hidden;
  background: #e7e3d8;
  isolation: isolate;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 10%, rgb(255 255 255 / 70%), transparent 38%),
    #e7e3d8;
}

.leaflet-container {
  color: var(--ink);
  font: inherit;
}

.leaflet-control-zoom a {
  color: var(--ink) !important;
}

.leaflet-control-attribution {
  max-width: 76vw;
  border-radius: 7px 0 0;
  background: rgb(255 253 248 / 86%) !important;
  color: #52645e !important;
  font-size: 9px !important;
}

.leaflet-control-attribution a {
  color: var(--forest) !important;
}

.leaflet-bottom.leaflet-right .leaflet-control {
  margin-right: 12px;
  margin-bottom: 88px;
}

.map-badge {
  position: absolute;
  z-index: 510;
  top: 12px;
  left: 12px;
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 11px;
  background: rgb(16 45 40 / 90%);
  color: white;
  box-shadow: 0 7px 18px rgb(16 45 40 / 18%);
  backdrop-filter: blur(9px);
}

.map-badge strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.map-badge span {
  color: #c5d8d1;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.warning-banner {
  position: absolute;
  z-index: 800;
  top: 12px;
  left: 50%;
  display: flex;
  width: min(92%, 440px);
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
  border: 2px solid white;
  border-radius: 12px;
  background: var(--danger);
  color: white;
  box-shadow: 0 8px 26px rgb(91 14 9 / 35%);
  transform: translateX(-50%);
}

.warning-banner strong {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.warning-banner span {
  font-size: 12px;
  font-weight: 650;
}

.compass-hud,
.route-cue {
  position: absolute;
  z-index: 500;
  top: 72px;
  display: flex;
  min-width: 144px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid rgb(255 255 255 / 68%);
  border-radius: 13px;
  background: rgb(255 253 248 / 90%);
  box-shadow: 0 6px 20px rgb(16 45 40 / 15%);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.compass-hud {
  left: 12px;
}

.route-cue {
  right: 12px;
}

.compass-hud > div:last-child,
.route-cue > div:last-child {
  display: grid;
  min-width: 0;
}

.hud-label,
.eyebrow {
  color: #64746e;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.compass-hud strong,
.route-cue strong {
  max-width: 130px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compass-hud small,
.route-cue small {
  max-width: 132px;
  margin-top: 2px;
  overflow: hidden;
  color: #61716b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compass-dial {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 2px solid #bac8c1;
  border-radius: 50%;
  background: #f7f2e7;
  box-shadow: inset 0 0 0 5px #e8e3d8;
}

.north-mark {
  position: absolute;
  top: 1px;
  left: 50%;
  color: var(--danger);
  font-size: 8px;
  font-weight: 900;
  transform: translateX(-50%);
}

.heading-needle {
  position: absolute;
  top: 9px;
  left: 20px;
  width: 4px;
  height: 27px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--route) 0 50%, var(--ink) 50% 100%);
  transform: rotate(0deg);
  transform-origin: 2px 14px;
  transition: transform 140ms linear;
}

.heading-needle::before {
  position: absolute;
  top: -4px;
  left: -3px;
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--route);
  border-left: 5px solid transparent;
  content: "";
}

.compass-centre {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.route-arrow {
  width: 28px;
  height: 40px;
  flex: 0 0 auto;
  background: var(--route);
  clip-path: polygon(50% 0, 100% 55%, 68% 48%, 68% 100%, 32% 100%, 32% 48%, 0 55%);
  filter: drop-shadow(0 2px 2px rgb(16 45 40 / 20%));
  transform: rotate(0deg);
  transition: transform 160ms linear;
}

.map-tools {
  position: absolute;
  z-index: 520;
  right: 10px;
  bottom: calc(12px + var(--safe-bottom));
  left: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.8fr) minmax(0, 0.85fr);
  gap: 8px;
  padding: 7px;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 16px;
  background: rgb(255 253 248 / 90%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.primary-action,
.secondary-action,
.tool-action,
.danger-action,
.link-button,
.button-row button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.primary-action {
  background: var(--ink);
  color: white;
  box-shadow: 0 5px 13px rgb(16 45 40 / 20%);
}

.secondary-action {
  background: var(--gold);
  color: #3a2700;
}

.tool-action,
.button-row button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.tool-action[aria-pressed="true"] {
  border-color: var(--forest);
  background: #dceddf;
  color: var(--forest);
}

.danger-action {
  border: 1px solid #efc0ba;
  background: #fff3f1;
  color: #9b281f;
}

.full {
  width: 100%;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.metric {
  display: grid;
  min-height: 84px;
  align-content: center;
  gap: 3px;
  padding: 12px 14px;
  background: var(--card);
}

.metric-wide {
  grid-column: 1 / -1;
  min-height: 72px;
  background: var(--ink);
  color: white;
}

.metric-label {
  color: #697871;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.metric-wide .metric-label {
  color: #adc3ba;
}

.metric strong {
  overflow: hidden;
  font-size: clamp(16px, 5vw, 22px);
  font-weight: 860;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric small {
  overflow: hidden;
  color: #66756f;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-wide small {
  color: #b8cac3;
}

.tabbar {
  position: fixed;
  z-index: 1000;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 6px max(5px, env(safe-area-inset-right)) calc(6px + var(--safe-bottom)) max(5px, env(safe-area-inset-left));
  border-top: 1px solid rgb(255 255 255 / 12%);
  background: rgb(16 45 40 / 97%);
  box-shadow: 0 -10px 28px rgb(16 45 40 / 20%);
  backdrop-filter: blur(16px);
}

.tabbar button {
  min-height: 48px;
  padding: 4px 2px;
  border-radius: 10px;
  background: transparent;
  color: #c7d6d1;
  font-size: 10px;
  font-weight: 780;
}

.tabbar button::before {
  display: block;
  width: 20px;
  height: 4px;
  margin: 0 auto 7px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 0.5;
}

.tabbar button:active,
.tabbar button[aria-current="true"] {
  background: rgb(255 255 255 / 10%);
  color: white;
}

.gps-panel {
  padding: 14px;
}

.gps-toggle {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 42px 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.gps-toggle span {
  font-size: 13px;
  font-weight: 760;
}

.gps-toggle strong {
  color: var(--forest);
  font-size: 12px;
}

.gps-toggle::after {
  position: absolute;
  right: 16px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  content: "";
  transform: rotate(45deg) translateY(-3px);
  transition: transform 180ms ease;
}

.gps-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg) translate(-3px, -1px);
}

.gps-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.gps-details > div,
.gps-details > p {
  display: grid;
  gap: 3px;
  padding: 12px;
  background: var(--card);
}

.gps-details span {
  color: #6a7771;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gps-details strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.inline-message {
  margin: 0;
  color: #566760;
  font-size: 12px;
  line-height: 1.45;
}

.wide {
  grid-column: 1 / -1;
}

.fallback {
  margin: 0 14px 20px;
  padding: 18px;
  border: 2px dashed var(--gold);
  border-radius: 14px;
  background: #fff9e9;
}

.fallback h2,
.fallback p {
  margin-top: 0;
}

.panel-overlay {
  position: fixed;
  z-index: 1300;
  inset: 0;
  background: rgb(5 20 17 / 55%);
  backdrop-filter: blur(3px);
}

.panel {
  position: fixed;
  z-index: 1400;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(86svh, 850px);
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background: var(--card);
  box-shadow: 0 -18px 60px rgb(5 20 17 / 35%);
}

.panel::before {
  display: block;
  width: 46px;
  height: 5px;
  margin: 8px auto 2px;
  border-radius: 999px;
  background: #d5cdbf;
  content: "";
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head > div {
  display: grid;
  gap: 3px;
}

.panel h2,
.panel h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

.panel h2 {
  font-size: 24px;
}

.panel h3 {
  font-size: 17px;
}

.panel-head button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 12px;
  font-weight: 800;
}

.panel-body {
  max-height: calc(min(86svh, 850px) - 86px);
  overflow-y: auto;
  padding: 16px 18px calc(24px + var(--safe-bottom));
  overscroll-behavior: contain;
}

.facts-grid,
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.facts-grid > div,
.status-grid > div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  align-content: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #faf7ef;
}

.facts-grid span,
.status-grid span {
  color: #68756f;
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts-grid strong,
.status-grid strong {
  font-size: 14px;
  line-height: 1.2;
}

.status-grid .wide {
  grid-column: 1 / -1;
}

.callout {
  margin: 14px 0;
  padding: 13px 14px;
  border-left: 4px solid var(--forest);
  border-radius: 8px;
  background: #edf3eb;
}

.callout-gold {
  border-color: var(--gold);
  background: #fff7df;
}

.callout p {
  margin: 5px 0 0;
  color: #52635c;
  font-size: 12px;
  line-height: 1.5;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-title span {
  color: #66766f;
  font-size: 11px;
  font-weight: 700;
}

.elevation-card {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf7ef;
}

.elevation-card canvas {
  display: block;
  width: 100%;
  height: 150px;
  margin: 10px 0 4px;
  border-radius: 8px;
  background: linear-gradient(#eef3e8, #f8f4eb);
}

.elevation-card small,
.panel-note,
.panel-body > small {
  color: #69766f;
  font-size: 11px;
  line-height: 1.45;
}

.route-order,
.notes-list {
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.route-order li,
.notes-list li {
  position: relative;
  display: grid;
  gap: 3px;
  margin-left: 13px;
  padding: 4px 0 18px 27px;
  border-left: 2px solid #cbd8ce;
}

.route-order li::before,
.notes-list li::before {
  position: absolute;
  top: 4px;
  left: -8px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--route);
  box-shadow: 0 0 0 2px var(--route);
  content: "";
}

.route-order li:last-child,
.notes-list li:last-child {
  border-left-color: transparent;
}

.route-order span,
.notes-list p,
.notes-list span {
  margin: 0;
  color: #62716b;
  font-size: 12px;
  line-height: 1.45;
}

.notes-list li {
  padding-bottom: 22px;
}

.notes-list button {
  width: fit-content;
  margin-top: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--forest);
  font-size: 11px;
  font-weight: 760;
}

.link-button {
  width: 100%;
  border: 1px solid var(--forest);
  background: white;
  color: var(--forest);
}

.trip-hero {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 18px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
}

.trip-hero span,
.trip-hero small {
  color: #b9cbc4;
  font-size: 11px;
}

.trip-hero strong {
  font-size: 38px;
  letter-spacing: -0.05em;
}

.button-row {
  display: flex;
  gap: 9px;
  margin: 13px 0;
}

.button-row > * {
  flex: 1;
}

.offline-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 13px;
  background: var(--ink);
  color: white;
}

.offline-hero .dot {
  width: 14px;
  height: 14px;
}

.offline-hero div {
  display: grid;
  gap: 2px;
}

.offline-hero small {
  color: #b9cbc4;
}

.emergency-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 12px;
  padding: 16px;
  border-radius: 14px;
  background: var(--danger);
  color: white;
}

.emergency-card span {
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
}

.emergency-card strong {
  grid-row: span 2;
  font-size: 36px;
  letter-spacing: -0.05em;
}

.emergency-card a {
  width: fit-content;
  color: white;
  font-weight: 820;
}

.current-location-card {
  display: grid;
  gap: 7px;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #faf7ef;
}

.current-location-card > span {
  color: #6b7772;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.current-location-card strong {
  overflow-wrap: anywhere;
}

.safety-list {
  margin: 16px 0;
}

.safety-list p,
.install-copy p {
  color: #42554e;
  font-size: 13px;
  line-height: 1.55;
}

.link-stack {
  display: grid;
  gap: 8px;
  margin: 13px 0;
}

.link-stack a {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.install-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 15px;
}

.install-hero img {
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.install-hero div {
  display: grid;
  gap: 4px;
}

.install-hero strong {
  font-size: 21px;
  letter-spacing: -0.035em;
}

.install-hero span {
  color: #64736d;
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 2000;
  right: 14px;
  bottom: calc(80px + var(--safe-bottom));
  left: 14px;
  width: fit-content;
  max-width: calc(100% - 28px);
  margin: auto;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 720;
}

.location-marker-shell {
  position: relative;
  width: 38px !important;
  height: 38px !important;
  margin: -19px 0 0 -19px !important;
  border: 0 !important;
  background: transparent !important;
}

.direction-cone {
  position: absolute;
  top: -25px;
  left: 4px;
  width: 30px;
  height: 46px;
  background: linear-gradient(to top, rgb(62 142 176 / 0%), rgb(62 142 176 / 45%));
  clip-path: polygon(50% 0, 100% 100%, 50% 78%, 0 100%);
  transform: rotate(var(--heading, 0deg));
  transform-origin: 50% 44px;
  transition: transform 140ms linear;
}

.location-puck {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--water);
  box-shadow: 0 2px 7px rgb(16 45 40 / 35%);
}

.waypoint-marker {
  display: grid !important;
  width: 28px !important;
  height: 28px !important;
  margin: -14px 0 0 -14px !important;
  place-items: center;
  border: 3px solid white !important;
  border-radius: 50%;
  background: var(--gold) !important;
  color: var(--ink);
  box-shadow: 0 3px 9px rgb(16 45 40 / 28%);
  font-size: 11px;
  font-weight: 900;
}

.waypoint-marker.start,
.waypoint-marker.finish {
  background: var(--route) !important;
  color: white;
}

.waypoint-marker.emergency {
  background: var(--danger) !important;
  color: white;
}

.poi-marker {
  width: 8px !important;
  height: 8px !important;
  margin: -4px 0 0 -4px !important;
  border: 1px solid white !important;
  border-radius: 50%;
  background: #6b776e !important;
  box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
}

.approx-route-label {
  padding: 3px 6px;
  border: 1px solid #d19b2d;
  border-radius: 6px;
  background: #fff8df;
  color: #72500c;
  font-size: 10px;
  font-weight: 780;
}

@media (max-width: 520px) {
  .status-pill span:last-child {
    max-width: 74px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .compass-hud,
  .route-cue {
    top: 68px;
    min-width: 0;
  }

  .compass-hud {
    padding-right: 8px;
  }

  .route-cue {
    padding-left: 8px;
  }

  .compass-hud > div:last-child,
  .route-cue > div:last-child {
    max-width: 90px;
  }

  .compass-hud strong,
  .route-cue strong,
  .compass-hud small,
  .route-cue small {
    max-width: 88px;
  }

  .map-tools {
    grid-template-columns: 1.25fr 0.8fr 0.82fr;
  }

  .primary-action,
  .secondary-action,
  .tool-action {
    padding-inline: 8px;
    font-size: 11px;
  }
}

@media (min-width: 760px) {
  .topbar {
    padding-right: 22px;
    padding-left: 22px;
  }

  .map-stage {
    height: min(68svh, 760px);
  }

  .dashboard {
    grid-template-columns: 1.45fr repeat(4, minmax(0, 1fr));
  }

  .metric-wide {
    grid-column: auto;
    min-height: 92px;
  }

  .metric {
    min-height: 92px;
  }

  .gps-details {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tabbar {
    right: auto;
    bottom: 18px;
    left: 50%;
    width: min(620px, calc(100% - 32px));
    padding: 6px;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 16px;
    transform: translateX(-50%);
  }
}

@media (min-width: 1000px) {
  body {
    padding: 18px;
    background: #08211c;
  }

  .app-shell {
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: 22px;
    box-shadow: 0 30px 100px rgb(0 0 0 / 38%);
  }

  .map-badge,
  .compass-hud {
    left: 18px;
  }

  .route-cue {
    right: 18px;
  }

  .map-tools {
    right: 18px;
    bottom: 18px;
    left: auto;
    width: 520px;
  }

  .panel {
    top: 18px;
    right: 18px;
    bottom: 18px;
    left: auto;
    width: min(470px, calc(100% - 36px));
    max-height: none;
    border-radius: 20px;
  }

  .panel::before {
    display: none;
  }

  .panel-body {
    max-height: calc(100svh - 154px);
  }

  .tabbar {
    bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
