:root {
  --bg: #F4EDE4;
  --surface: #FBF8F3;
  --surface-alt: #F1E9DE;
  --white: #FFFFFF;
  --navy: #264653;
  --navy-hover: #2E5564;
  --navy-line: #3D6676;
  --navy-muted: #A9C4C9;
  --teal: #2A9D8F;
  --teal-text: #1C7268;
  --teal-tint: #EAF4F1;
  --coral: #E76F51;
  --coral-ink: #14262E;
  --coral-tint: #FBEAE4;
  --coral-line: #F2C1B2;
  --warn-text: #A63A1F;
  --line: #E6DCCF;
  --line-strong: #DDD3C6;
  --muted: #576A71;
  --switch-off: #D8CEC1;
  --danger: #C43E3E;
  --font-body: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  --font-display: Bahnschrift, "Roboto Condensed", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "Roboto Mono", ui-monospace, Consolas, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--navy);
  background: var(--bg);
  overscroll-behavior: none;
  overflow-x: hidden;
}

button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
/* Icon size default; :where() keeps it at zero specificity so any class
   rule wins, and Leaflet's own vector-layer <svg> is left alone. */
:where(svg:not(.leaflet-zoom-animated)) { width: 20px; height: 20px; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.caption { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--teal-text); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 16px; border-radius: 12px; border: none;
  font-size: 14.5px; font-weight: 600; white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; }
.btn svg { width: 18px; height: 18px; }
.btn-coral { background: var(--coral); color: var(--coral-ink); font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.btn-navy { background: var(--navy); color: var(--bg); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); width: 100%; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid var(--line-strong); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; width: 100%; }

/* ============================================================ */
/* Screens: login / dashboard / editor - only one shown at a time */
/* ============================================================ */
.screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.screen.active { display: block; }

.brand-line { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 16px; min-width: 0; }
.brand-line .wordmark { height: 40px; width: auto; display: block; }
.brand-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Login ---- */
.login-screen.active { display: flex; flex-direction: column; }
.login-hero {
  background: var(--navy); color: var(--bg);
  padding: calc(28px + var(--safe-top)) 24px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.login-illustration { width: 100%; height: auto; max-width: 420px; }
.login-tagline { font-family: var(--font-display); font-size: 22px; line-height: 1.25; margin: 0; }
.login-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--navy-muted); font-size: 14px; }
.login-features li { display: flex; align-items: center; gap: 10px; }
.login-features li::before {
  content: "✓"; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal); color: var(--coral-ink); font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.login-card {
  margin: -16px 16px calc(24px + var(--safe-bottom));
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 28px 24px; box-shadow: 0 10px 30px rgba(20, 38, 46, 0.12);
}
.login-title { font-family: var(--font-display); font-size: 24px; margin: 6px 0 6px; }
.login-lead { color: var(--muted); margin: 0 0 22px; line-height: 1.45; }
.btn-google {
  width: 100%; height: 52px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--white);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 15px; font-weight: 600; color: var(--navy);
}
.btn-google:active { transform: scale(0.98); }
.btn-google:disabled { opacity: 0.6; }
.login-status { font-size: 12.5px; color: var(--muted); margin-top: 14px; min-height: 16px; text-align: center; }

@media (min-width: 900px) {
  .login-screen.active { flex-direction: row; }
  .login-hero { width: 44%; justify-content: center; padding: 48px; }
  .login-card { margin: auto; width: 400px; }
}

/* ---- Dashboard ---- */
.dash-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  background: var(--navy); color: var(--bg);
}
.dash-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-email { font-size: 12px; color: var(--navy-muted); display: none; }
.plan-chip { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; padding: 5px 9px; border-radius: 6px; }
.plan-chip.pro { background: var(--coral); color: var(--coral-ink); }
.plan-chip.trial { background: var(--bg); color: var(--navy); }
.nav-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; min-width: 40px; justify-content: center;
  padding: 0 10px; border-radius: 10px; border: 1px solid var(--navy-line); background: transparent; color: var(--bg);
  font-size: 13px; font-weight: 600;
}
.nav-btn span { display: none; }
@media (min-width: 640px) {
  .header-email { display: inline; }
  .nav-btn span { display: inline; }
}

/* Drone Nation App tabs (MAPPER | STREAMER), right under the navy header */
.app-tabs {
  position: sticky; top: calc(64px + var(--safe-top)); z-index: 4;
  display: flex; gap: 6px; padding: 0 16px 10px; background: var(--navy);
}
.app-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px;
  border: none; border-radius: 12px; background: transparent; color: var(--navy-muted);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.06em;
  border-bottom: 3px solid transparent;
}
.app-tab[aria-selected="true"] { background: var(--navy-hover); color: var(--bg); }
.app-tab.mapper[aria-selected="true"] { border-bottom-color: var(--teal); }
.app-tab.streamer[aria-selected="true"] { border-bottom-color: var(--coral); }
.app-tab-mark { width: 24px; height: 24px; flex: none; opacity: 0.6; }
.app-tab[aria-selected="true"] .app-tab-mark { opacity: 1; }
@media (min-width: 640px) { .app-tab { flex: 0 0 auto; padding: 0 18px; } }

.streamer-card { border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.streamer-card-band { height: 8px; background: var(--coral); }
.streamer-card-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.streamer-card-body p { margin: 0; color: var(--muted); line-height: 1.5; }

.dash-body { padding: 24px 16px calc(40px + var(--safe-bottom)); max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.dash-body[hidden] { display: none; }
.greeting-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dash-greeting { font-family: var(--font-display); font-size: 28px; margin: 4px 0 0; overflow-wrap: anywhere; }
.btn-new { min-height: 50px; padding: 0 20px; border-radius: 14px; }

.license-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--coral-tint); border: 1px solid var(--coral-line); border-radius: 18px; padding: 16px;
}
.license-tile {
  width: 46px; height: 46px; border-radius: 14px; background: var(--coral); color: var(--coral-ink);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.license-banner-text { flex: 1 1 220px; min-width: 0; }
.license-banner-title { font-weight: 600; font-size: 15px; }
.license-banner-msg { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 0; }
.stat-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin-top: 4px; white-space: nowrap; }
.stat-value small { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px; }

.missions-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.missions-head h2 { font-family: var(--font-display); font-size: 20px; margin: 0; }
.mission-count { font-family: var(--font-body); font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }

.search-field {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; flex: 1 1 260px; max-width: 100%;
}
.search-field:focus-within { border-color: var(--teal); }
.search-field svg { width: 18px; height: 18px; color: var(--muted); }
.search-field input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 14.5px; }
.missions-head .search-field { max-width: 320px; }
.step .search-field { flex: none; }
.search-go { border: none; background: var(--navy); color: var(--bg); font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 9px; }

.mission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mission-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column; text-align: left; padding: 0; color: var(--navy); width: 100%;
}
.mission-card:active { transform: scale(0.99); }
.mission-thumb { display: block; width: 100%; height: 130px; background: #D9D3C3; }
.mission-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.mission-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.mission-card-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mission-card-date { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.type-chip { flex-shrink: 0; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #D4ECE7; color: #1C5F57; }
.type-chip.wpml { background: var(--navy); color: var(--bg); }
.mission-meta { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mission-open { margin-top: 4px; text-align: center; padding: 9px; border-radius: 10px; border: 1px solid var(--navy); font-weight: 600; font-size: 13.5px; }
.empty-state { grid-column: 1 / -1; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 18px; padding: 28px 20px; text-align: center; }
.empty-state b { display: block; font-size: 16px; margin-bottom: 6px; }
.empty-state span { color: var(--muted); }

/* ============================================================ */
/* Editor                                                       */
/* ============================================================ */
#map { position: absolute; inset: 0; z-index: 0; background: #D9D3C3; }

.map-btn {
  width: 46px; height: 46px; min-width: 46px; border: none; border-radius: 14px;
  background: var(--surface); color: var(--navy); box-shadow: 0 3px 10px rgba(20, 38, 46, 0.18);
  display: flex; align-items: center; justify-content: center;
}
.map-btn-navy { background: var(--navy); color: var(--bg); }

.topbar {
  position: fixed; top: calc(12px + var(--safe-top)); left: 12px; right: 12px; z-index: 500;
  display: flex; align-items: center; gap: 10px;
}
.mission-chip {
  flex: 1; min-width: 0; height: 46px; border-radius: 14px; background: var(--surface);
  box-shadow: 0 3px 10px rgba(20, 38, 46, 0.18); padding: 0 14px;
  display: flex; flex-direction: column; justify-content: center;
}
.mission-chip-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mission-chip-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fab-stack.hidden { display: none; }
.fab-stack {
  position: fixed; right: 12px; z-index: 500; display: flex; flex-direction: column; gap: 8px;
  bottom: var(--fab-bottom, 260px); transition: bottom 0.25s ease;
}

.draw-hint, .toast {
  position: fixed; top: calc(70px + var(--safe-top)); left: 50%; transform: translateX(-50%); z-index: 900;
  background: var(--navy); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 13px;
  box-shadow: 0 6px 18px rgba(20, 38, 46, 0.3); display: none; max-width: 86vw; text-align: center;
}
.offline-banner {
  position: fixed; top: calc(70px + var(--safe-top)); left: 12px; right: 12px; z-index: 500; display: none;
  background: var(--coral-tint); color: var(--warn-text); border: 1px solid var(--coral-line);
  padding: 9px 14px; border-radius: 12px; font-size: 12.5px;
}

/* ---- Step sheet ---- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 600;
  background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px rgba(20, 38, 46, 0.2);
  max-height: 64vh; display: flex; flex-direction: column;
}
.sheet-handle { border: none; background: transparent; padding: 10px 0 4px; display: flex; justify-content: center; flex-shrink: 0; }
.handle-bar { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); }

.hud {
  margin: 6px 14px 0; background: var(--navy); color: var(--bg); border-radius: 16px; padding: 10px 4px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex-shrink: 0;
}
.hud-cell { padding: 0 10px; min-width: 0; }
.hud-cell + .hud-cell { border-left: 1px solid var(--navy-line); }
.hud-wide { display: none; }
.hud-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--navy-muted); white-space: nowrap; }
.hud-value { font-family: var(--font-display); font-weight: 600; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-value small { font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--navy-muted); margin-left: 2px; }
.hud-cell.warn .hud-value { color: #F4A68F; }

.step-head { padding: 14px 16px 6px; flex-shrink: 0; }
.step-progress { display: flex; align-items: center; gap: 6px; }
.step-progress button { width: 22px; height: 6px; border-radius: 6px; border: none; padding: 0; background: var(--line); position: relative; }
.step-progress button::after { content: ""; position: absolute; inset: -10px -3px; }
.step-progress button.done { background: var(--teal); }
.step-progress button.active { width: 40px; background: var(--coral); }
.step-count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--teal-text); }
.step-title { font-family: var(--font-display); font-size: 21px; margin: 6px 0 0; }

.sheet-body { overflow-y: auto; padding: 8px 16px 12px; flex: 1 1 auto; min-height: 0; }
.sheet.collapsed .sheet-body { display: none; }
.step { display: none; flex-direction: column; gap: 12px; }
.step.active { display: flex; }

.sheet-foot { flex-shrink: 0; border-top: 1px solid var(--line); padding: 8px 16px calc(14px + var(--safe-bottom)); }
.status-text { font-size: 12px; color: var(--muted); min-height: 16px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-buttons { display: flex; gap: 10px; }
.foot-buttons .btn-coral { flex: 1; }

/* ---- Step content ---- */
.action-card {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; text-align: left;
  border: 1px solid var(--line); background: var(--white); color: var(--navy); width: 100%;
}
.action-card.active { border: 1.5px solid var(--teal); background: var(--teal-tint); }
.action-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--surface-alt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.action-card.active .action-icon { background: var(--navy); color: var(--bg); }
.action-title { display: block; font-weight: 600; font-size: 14.5px; }
.action-sub { display: block; font-size: 12.5px; color: var(--muted); }

.info-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; background: var(--surface-alt); border-radius: 14px; padding: 12px 14px; }
.info-label { font-size: 12px; color: var(--muted); }
.info-value { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.field-caption { font-weight: 600; font-size: 14px; margin-top: 4px; }
.drone-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.drone-card {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 56px; border-radius: 12px; text-align: left;
  border: 1px solid var(--line); background: var(--white); color: var(--navy); font-weight: 600; font-size: 13.5px;
}
.drone-card svg { width: 24px; height: 24px; }
.drone-card.active { border: 1.5px solid var(--teal); background: var(--teal-tint); }
.drone-card.active svg { color: var(--teal-text); }
.note { margin: 4px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-alt); font-size: 13px; line-height: 1.45; }

.segmented { display: flex; gap: 4px; padding: 4px; background: var(--surface-alt); border-radius: 12px; min-width: 0; }
.segment {
  flex: 1; min-width: 0; border: none; background: transparent; border-radius: 9px; padding: 9px 6px;
  font-size: 14px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.segment span { font-size: 11px; font-weight: 400; color: var(--muted); }
.segment.active { background: var(--white); color: var(--navy); box-shadow: 0 1px 3px rgba(38, 70, 83, 0.15); }

.presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preset {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; text-align: left;
  border: 1px solid var(--line); background: var(--white); color: var(--navy); min-width: 0;
}
.preset b { font-size: 14px; }
.preset span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.preset.active { background: var(--navy); border-color: var(--navy); color: var(--bg); }
.preset.active span { color: var(--navy-muted); }

.slider-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.slider-row { min-width: 0; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; }
.slider-head label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readout { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.warn-text { font-size: 12.5px; color: var(--warn-text); margin-top: 4px; }
input[type=range] { width: 100%; margin: 10px 0 0; accent-color: var(--coral); height: 24px; }

.switch-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.switch-row + .switch-row { border-top: 1px solid #EFE7DC; }
.switch-text { flex: 1; min-width: 0; }
.switch-title { display: block; font-weight: 600; }
.switch-sub { display: block; font-size: 12.5px; color: var(--muted); }
.pro-tag { font-family: var(--font-mono); font-size: 10px; padding: 2px 6px; border-radius: 5px; background: var(--coral); color: var(--coral-ink); margin-left: 4px; vertical-align: 1px; }
.switch { position: relative; width: 48px; height: 28px; flex: 0 0 48px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.slider { position: absolute; inset: 0; border-radius: 14px; background: var(--switch-off); transition: 0.2s; pointer-events: none; }
.slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.switch input:checked + .slider { background: var(--teal); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--teal); outline-offset: 2px; }

.advanced { border: 1px solid var(--line-strong); border-radius: 14px; padding: 0 14px; background: transparent; }
.advanced summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 46px; font-weight: 600; cursor: pointer; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary svg { transition: transform 0.2s; }
.advanced[open] summary svg { transform: rotate(180deg); }
.advanced .row-2 { padding-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.field input, .field select, .field textarea {
  height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--white);
  padding: 0 12px; font-size: 15px; color: var(--navy); width: 100%;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; }

.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.check-row.warn { background: var(--coral-tint); border-color: var(--coral-line); }
.takeoff-icon {
  width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--bg);
  border: 3px solid var(--surface); box-shadow: 0 3px 10px rgba(20, 38, 46, 0.4);
  display: flex; align-items: center; justify-content: center; font: 700 14px var(--font-display);
}
.check-icon { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: var(--coral-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.check-row.warn .check-icon { background: var(--coral); }
.check-title { display: block; font-weight: 600; }
.check-detail { display: block; font-size: 12.5px; color: var(--muted); }

/* ---- Leaflet ---- */
.leaflet-control-attribution { font-size: 9px !important; }
.leaflet-bar { border: 1px solid var(--line) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a { color: var(--navy) !important; background: var(--surface) !important; }

/* ---- Tablet / desktop browser: the sheet becomes a right-hand inspector ---- */
@media (min-width: 900px) {
  .sheet { left: auto; top: 0; width: 420px; max-height: none; border-radius: 0; box-shadow: -1px 0 0 var(--line); }
  .sheet-handle { display: none; }
  .sheet.collapsed .sheet-body { display: block; }
  .hud { margin: calc(14px + var(--safe-top)) 16px 0; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 10px; }
  .hud-wide { display: block; }
  .hud-cell:nth-child(4) { border-left: none; }
  .topbar { right: 432px; }
  .fab-stack { right: 432px; bottom: calc(20px + var(--safe-bottom)) !important; }
}

/* ============================================================ */
/* Modals (profile / save-mission name)                          */
/* ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000; background: rgba(20, 38, 46, 0.5);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-card {
  width: 100%; max-width: 400px; max-height: 86vh; overflow-y: auto;
  background: var(--surface); border-radius: 20px; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px;
}
.modal-title { font-family: var(--font-display); font-size: 20px; margin: 0; }
.modal-email { font-size: 12.5px; color: var(--muted); margin-top: -6px; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions .btn { flex: 1; }
.danger-zone { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.danger-zone-title { font-size: 12px; font-weight: 700; color: var(--danger); letter-spacing: 0.03em; margin-bottom: 4px; }
.danger-zone-desc { font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.4; }
