/* Full-viewport recon tab (same pattern as map / Live Tracking) */
body.race-event-body:has(.race-event-main--recon-tab) {
  overflow: hidden;
}

.race-event-app:has(.race-event-main--recon-tab) {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.race-event-main.race-event-main--recon-tab {
  overflow: hidden;
  padding: 0 !important;
  max-width: none !important;
  margin-inline: 0 !important;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

/* Keep event header above the map canvas on touch devices */
.race-event-app:has(.race-event-main--recon-tab) .race-event-topbar {
  position: relative;
  z-index: 500;
  isolation: isolate;
}

/* No AI assistant in Recon — it blocks the add-point control on phone */
body.race-event-body--recon-tab #noribel-chat-btn,
body.race-event-body--recon-tab #noribel-chat-panel-wrap,
body.race-event-body--recon-immersive #noribel-chat-btn,
body.race-event-body--recon-immersive #noribel-chat-panel-wrap {
  display: none !important;
}

/* Full-screen drive mode — map uses entire viewport, chrome hidden */
html.recon-drive-active .race-event-topbar,
html.recon-drive-active .race-event-mobile-nav-btn {
  display: none !important;
}

html.recon-drive-active #race-event-mobile-nav:not(.race-event-mobile-nav--open) {
  display: none !important;
}

html.recon-drive-active .race-event-app {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
}

html.recon-drive-active .race-event-main--recon-tab,
html.recon-drive-active .race-event-panel--recon,
html.recon-drive-active .recon-shell,
html.recon-drive-active .recon-layout,
html.recon-drive-active .recon-main {
  height: 100dvh !important;
  max-height: 100dvh !important;
}

html.recon-drive-active .recon-fab {
  display: none !important;
}

html.recon-drive-active,
body.race-event-body--recon-driving {
  overflow: hidden;
}

/* Mobile full-screen Recon — hide race chrome, map fills viewport */
@media (max-width: 900px) {
  body.race-event-body--recon-immersive .race-event-topbar,
  body.race-event-body--recon-driving .race-event-topbar {
    display: none !important;
  }

  body.race-event-body--recon-driving .race-event-main--recon-tab {
    height: 100dvh;
    max-height: 100dvh;
  }

  body.race-event-body--recon-immersive .race-event-app {
    height: 100dvh;
    max-height: 100dvh;
  }

  body.race-event-body--recon-immersive .race-event-main--recon-tab {
    height: 100dvh;
    max-height: 100dvh;
  }

  .recon-shell--immersive {
    min-height: 100dvh;
    height: 100dvh;
  }

  .recon-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 12;
    padding: calc(0.35rem + env(safe-area-inset-top, 0px)) 0.55rem 0.35rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .recon-topbar__back {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0.25rem 0.55rem;
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
  }

  .recon-topbar__title-wrap {
    flex: 1;
    min-width: 0;
  }

  .recon-topbar__lede { display: none; }

  .recon-topbar__title {
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .recon-topbar__actions {
    width: auto;
    flex-wrap: nowrap;
    gap: 0.3rem;
  }

  .recon-layout {
    padding-top: 0;
  }

  .recon-shell--immersive:not(.recon-shell--navigating) .recon-layout {
    padding-top: calc(3.1rem + env(safe-area-inset-top, 0px));
  }

  .recon-shell--navigating .recon-topbar {
    display: none !important;
  }

  .recon-shell--navigating .recon-layout {
    padding-top: 0;
  }

  .recon-shell--navigating .recon-fab {
    display: none !important;
  }

  .recon-shell--immersive:not(.recon-shell--navigating) .recon-fab {
    display: flex;
    left: auto;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .recon-main .mapboxgl-ctrl-bottom-right {
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    right: 0.5rem;
  }

  .recon-shell--navigating .recon-main .mapboxgl-ctrl-bottom-right {
    bottom: calc(12rem + env(safe-area-inset-bottom, 0px));
  }

  .recon-shell--nav-sheet-open .recon-main .mapboxgl-ctrl-bottom-right {
    bottom: calc(44vh + env(safe-area-inset-bottom, 0px));
  }
}

.recon-topbar__back { display: none; }

.race-event-panel--recon {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: auto;
  max-height: none;
  overflow: hidden;
}

.race-event-main--recon-tab .race-event-panel--recon[hidden] {
  display: none !important;
}

.recon-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #0b1220;
  color: #f8fafc;
  font-family: 'Outfit', system-ui, sans-serif;
}

.recon-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  z-index: 4;
}

.recon-topbar__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.recon-topbar__lede {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.recon-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.recon-btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  cursor: pointer;
  border: 0;
  white-space: nowrap;
}

.recon-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.recon-btn--start {
  background: #dc2626;
  color: #fff;
  font-weight: 700;
}

.recon-btn--start:hover { background: #b91c1c; }

.recon-btn--stop {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.recon-status {
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.recon-status--drive {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
}

.recon-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
}

.recon-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
}

#recon-map-root {
  position: absolute;
  inset: 0;
}

#recon-loading, #recon-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  z-index: 3;
  background: #0b1220;
}

#recon-loading[hidden], #recon-error[hidden] { display: none !important; }

#recon-error { color: #fca5a5; }

.recon-sidebar {
  width: min(300px, 88vw);
  flex-shrink: 0;
  overflow: auto;
  background: #111827;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.55rem;
  z-index: 4;
}

.recon-sidebar[hidden] { display: none !important; }

.recon-layer-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.25rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.recon-layer-row input { accent-color: #38bdf8; }

.recon-layer-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.recon-fab {
  position: absolute;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: 0;
  background: #2563eb;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  font-weight: 300;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.recon-fab:hover { background: #1d4ed8; }

.recon-fab--active {
  animation: recon-fab-pulse 2s ease-in-out infinite;
}

@keyframes recon-fab-pulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45); }
  50% { box-shadow: 0 8px 36px rgba(37, 99, 235, 0.75); }
}

.recon-shell--navigating .recon-topbar,
.recon-shell--navigating .recon-sidebar {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Navigation SDK-style HUD */
.recon-nav-hud {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.recon-nav-hud--fixed {
  position: fixed;
  inset: 0;
  z-index: 10050;
}

.recon-nav-hud[hidden] { display: none !important; }

.recon-nav-hud__drive-bar {
  pointer-events: auto;
  position: absolute;
  top: calc(0.45rem + env(safe-area-inset-top, 0px));
  left: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.recon-nav-hud__recenter {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  color: #1d4ed8;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  touch-action: manipulation;
  margin-right: auto;
}

.recon-nav-hud__recenter[hidden] {
  display: none !important;
}

.recon-nav-hud__end {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  touch-action: manipulation;
}

.recon-nav-hud__metrics {
  pointer-events: none;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 0.35rem;
}

.recon-nav-hud--light .recon-nav-hud__metrics--in-sheet {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.recon-nav-hud--light .recon-nav-hud__metric--primary .recon-nav-hud__metric-value {
  color: #2563eb;
}

.recon-nav-hud--light .recon-nav-hud__metric-value {
  color: #0f172a;
}

.recon-nav-hud--light .recon-nav-hud__metric-label {
  color: #64748b;
}

.recon-nav-hud--light .recon-nav-hud__sheet {
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.12);
}

.recon-nav-hud--light .recon-nav-hud__sheet-handle {
  color: #64748b;
}

.recon-nav-hud--light .recon-nav-hud__sheet-grip {
  background: #cbd5e1;
}

.recon-nav-hud--light .recon-nav-hud__sheet-body {
  border-top: 1px solid #e2e8f0;
}

.recon-nav-hud--light .recon-nav-hud__sheet-heading {
  color: #64748b;
}

.recon-nav-hud--light .recon-nav-hud__upcoming-empty {
  color: #64748b;
}

.recon-nav-hud--light .recon-nav-hud__upcoming-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.recon-nav-hud--light .recon-nav-hud__upcoming-item--next {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.recon-nav-hud--light .recon-nav-hud__upcoming-dist {
  color: #2563eb;
}

.recon-nav-hud--light .recon-nav-hud__upcoming-name {
  color: #0f172a;
}

.recon-nav-hud--light .recon-nav-hud__upcoming-layer {
  color: #64748b;
}

.recon-nav-hud--light .recon-nav-hud__arrow {
  color: #2563eb;
}

.recon-nav-hud--light .recon-nav-hud__dist {
  color: #2563eb;
}

.recon-nav-hud--light .recon-nav-hud__primary {
  color: #0f172a;
}

.recon-nav-hud--light .recon-nav-hud__secondary {
  color: #64748b;
}

.recon-nav-hud__metrics--in-sheet {
  margin: 0 0.7rem 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.5rem 0.4rem;
}

.recon-nav-hud__metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
}

.recon-nav-hud__metric--primary .recon-nav-hud__metric-value {
  color: #38bdf8;
  font-size: 1.35rem;
}

.recon-nav-hud__metric-value {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #f8fafc;
  white-space: nowrap;
}

.recon-nav-hud__metric-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.recon-nav-hud__sheet {
  pointer-events: auto;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  transition: max-height 0.28s ease;
  overflow: hidden;
  touch-action: pan-y;
  z-index: 1;
}

.recon-nav-hud__sheet:not(.recon-nav-hud__sheet--expanded) {
  max-height: none;
}

.recon-nav-hud__sheet--expanded {
  max-height: min(72dvh, 560px);
  touch-action: none;
}

.recon-nav-hud__sheet--expanded .recon-nav-hud__sheet-body {
  touch-action: pan-y;
}

.recon-nav-hud__sheet-handle {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  width: 100%;
  padding: 0.55rem 0.75rem 0.35rem;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  cursor: grab;
  touch-action: none;
}

.recon-nav-hud__sheet-handle:active {
  cursor: grabbing;
}

.recon-nav-hud__sheet-grip {
  width: 3rem;
  height: 5px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.95);
}

.recon-nav-hud__sheet-hint {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.recon-nav-hud__sheet--expanded .recon-nav-hud__sheet-hint::after {
  content: ' · swipe down to close';
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.recon-nav-hud__sheet-peek {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0 0.7rem 0.35rem;
}

.recon-nav-hud__sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0.7rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.recon-nav-hud__sheet:not(.recon-nav-hud__sheet--expanded) .recon-nav-hud__sheet-body {
  display: none;
}

.recon-nav-hud__sheet-heading {
  margin: 0.55rem 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
}

.recon-nav-hud__upcoming {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.recon-nav-hud__upcoming-empty {
  font-size: 0.82rem;
  color: #94a3b8;
  padding: 0.35rem 0;
}

.recon-nav-hud__upcoming-item {
  display: grid;
  grid-template-columns: 1.75rem 3.4rem 1fr;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.recon-nav-hud__upcoming-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}

.recon-nav-hud__upcoming-icon-img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  display: block;
}

.recon-nav-hud__upcoming-icon-fallback {
  font-size: 1.1rem;
  line-height: 1;
  color: #94a3b8;
}

.recon-nav-hud__next-icon {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.recon-nav-hud__upcoming-item--next {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.recon-nav-hud__upcoming-dist {
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #38bdf8;
  line-height: 1.25;
}

.recon-nav-hud__upcoming-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
}

.recon-nav-hud__upcoming-layer {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.25;
}

.recon-nav-hud__arrow {
  font-size: 1.75rem;
  line-height: 1;
  width: 2.25rem;
  text-align: center;
  flex-shrink: 0;
  color: #38bdf8;
}

.recon-nav-hud__copy {
  min-width: 0;
}

.recon-nav-hud__dist {
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recon-nav-hud__primary {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: #f8fafc;
}

.recon-nav-hud__secondary {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.12rem;
  line-height: 1.3;
}

.recon-nav-hud__add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0;
  background: #2563eb;
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.recon-nav-hud__actions,
.recon-nav-hud__stop {
  display: none;
}

/* Legacy panel/card — removed in favour of bottom sheet */
.recon-nav-hud__panel,
.recon-nav-hud__card {
  display: none;
}

.recon-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 30;
}

.recon-sheet-backdrop--modal {
  z-index: 10100;
  background: rgba(15, 23, 42, 0.62);
}

.recon-sheet-backdrop[hidden] { display: none !important; }

.recon-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 31;
  max-height: min(88dvh, 640px);
  overflow: auto;
  background: #fff;
  color: #0f172a;
  border-radius: 18px 18px 0 0;
  padding: 0.85rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}

.recon-sheet--modal {
  left: 50%;
  right: auto;
  bottom: auto;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(94vw, 440px);
  max-height: min(88dvh, 680px);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 10101;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

.recon-sheet[hidden] { display: none !important; }

.recon-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.35rem;
  flex-shrink: 0;
}

.recon-sheet__head-copy {
  min-width: 0;
}

.recon-sheet__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.recon-sheet__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 1rem;
}

.recon-sheet:not(.recon-sheet--modal) .recon-sheet__head {
  padding-left: 0;
  padding-right: 0;
}

.recon-sheet:not(.recon-sheet--modal) .recon-sheet__scroll {
  padding: 0;
  overflow: visible;
}

.recon-sheet--modal .recon-sheet__actions {
  flex-shrink: 0;
  margin: 0;
  padding: 0.75rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

body.recon-add-sheet-open .recon-nav-hud {
  pointer-events: none;
}

.recon-sheet__handle {
  width: 2.5rem;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 0.75rem;
  display: none;
}

.recon-sheet__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.recon-sheet__sub {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

.recon-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}

.recon-field__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recon-input, .recon-select, .recon-textarea {
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  width: 100%;
}

.recon-textarea { min-height: 4.5rem; resize: vertical; }

.recon-layer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.recon-layer-chip {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
}

.recon-layer-chip--active {
  border-color: transparent;
  color: #fff;
}

.recon-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.2rem, 1fr));
  gap: 0.35rem;
  max-height: 8rem;
  overflow: auto;
  padding: 0.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.recon-icon-btn {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 0.25rem;
  cursor: pointer;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recon-icon-btn img {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
}

.recon-icon-btn--active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.recon-photo-preview {
  max-width: 100%;
  max-height: 120px;
  border-radius: 8px;
  object-fit: cover;
}

.recon-sheet__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.recon-sheet__actions .recon-btn { flex: 1; border-radius: 10px; padding: 0.65rem; }

.recon-btn--save {
  background: #2563eb;
  color: #fff;
}

.recon-btn--cancel {
  background: #f1f5f9;
  color: #334155;
}

.recon-toast {
  position: fixed;
  left: 50%;
  bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.recon-toast[hidden] { display: none !important; }

.recon-nav-puck {
  width: 44px;
  height: 44px;
  position: relative;
  pointer-events: none;
}

.recon-nav-puck__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.2);
  border: 2px solid #2563eb;
  box-sizing: border-box;
}

.recon-nav-puck__arrow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: #2563eb;
  text-shadow: 0 0 3px #fff, 0 0 6px rgba(255, 255, 255, 0.85);
}

/* Mapbox Geolocate dot drifts from our nav puck in 3D drive — hide it while navigating */
.recon-shell--navigating .mapboxgl-user-location-dot,
.recon-shell--navigating .mapboxgl-user-location-accuracy-circle,
.recon-shell--navigating .mapboxgl-user-location-show-heading,
.recon-shell--navigating .mapboxgl-user-location-heading {
  display: none !important;
}

@media (max-width: 700px) {
  .recon-topbar { flex-wrap: wrap; gap: 0.35rem; padding: 0.45rem 0.55rem; }
  .recon-topbar__lede { display: none; }
  .recon-topbar__title { font-size: 0.95rem; }
  .recon-btn { padding: 0.35rem 0.55rem; font-size: 0.75rem; }

  .recon-nav-hud__primary { font-size: 0.95rem; }
  .recon-nav-hud__metric--primary .recon-nav-hud__metric-value { font-size: 1.15rem; }
  .recon-nav-hud__metric-value { font-size: 0.92rem; }
}

@media (min-width: 901px) {
  .recon-nav-hud__drive-bar {
    top: 0.75rem;
    right: 0.75rem;
  }

  .recon-nav-hud__sheet {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(28rem, calc(100% - 1.5rem));
    border-radius: 16px 16px 0 0;
  }

  .recon-nav-hud__sheet--expanded {
    max-height: min(52dvh, 420px);
  }
}
