:root {
  color-scheme: dark;
  --bg: #06110e;
  --surface: #0b1c17;
  --surface-2: #102820;
  --surface-3: #17362c;
  --line: rgba(190, 229, 211, .14);
  --text: #eef8f3;
  --muted: #91aa9e;
  --accent: #74d39e;
  --accent-strong: #3dbb78;
  --danger: #ff786f;
  --shadow: 0 20px 60px rgba(0, 0, 0, .3);
  --radius: 16px;
}

* { box-sizing: border-box; }
body.auth-locked { overflow: hidden; }
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  isolation: isolate;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background: #061522;
}
.auth-gate.hidden { display: none; }
.space-canvas, .space-vignette { position: absolute; inset: 0; width: 100%; height: 100%; }
.space-canvas { z-index: -2; }
.space-vignette {
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 26%, rgba(1, 8, 17, .28) 70%, rgba(1, 7, 15, .72) 100%),
    linear-gradient(115deg, rgba(10, 37, 64, .1), rgba(2, 12, 24, .28));
}
.auth-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(12, 37, 30, .96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .3);
}
.auth-brand-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.nebula-logo { display: block; height: auto; }
.nebula-logo-login { width: min(230px, calc(100% - 64px)); }
.nebula-logo-sidebar { width: 156px; }
.auth-card h1 { margin: 8px 0; }
.auth-card form { display: grid; gap: 14px; margin-top: 22px; }
.auth-profile-fields { display: grid; gap: 14px; }
.auth-profile-fields.hidden { display: none; }
.auth-card input, .auth-card select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(204, 225, 242, .18);
  border-radius: 10px;
  background: rgba(2, 16, 30, .72);
  color: var(--text);
}
.auth-link {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}
.auth-message { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.auth-message:empty { display: none; }
.auth-message.error {
  padding: 10px 12px;
  border: 1px solid rgba(255, 120, 111, .3);
  border-radius: 10px;
  background: rgba(255, 120, 111, .08);
  color: #ffb3ad;
}
.auth-message.success { padding: 9px 0; color: #8bd7ad; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at 80% 0%, rgba(33, 118, 80, .18), transparent 34%),
    var(--bg);
  color: var(--text);
}
button, input, select { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible {
  outline: 3px solid rgba(116, 211, 158, .35);
  outline-offset: 2px;
}
label:focus-within { outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: rgba(238, 248, 243, .32);
}
.auth-card input:focus-visible, .auth-card select:focus-visible {
  outline: none;
  border-color: rgba(180, 215, 243, .58);
}
button:disabled { cursor: wait; opacity: .55; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .88rem; }
.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.app-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  height: 100%;
  padding: 16px;
}
.mobile-app-header {
  display: none;
}
.sidebar, .workspace {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(10, 27, 22, .94);
  box-shadow: var(--shadow);
}
.sidebar { overflow-y: auto; padding: 22px; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #052013;
  font-size: 1.2rem;
  font-weight: 800;
}
.brand h1, .brand p, .section-heading h2, .toolbar h2 { margin: 0; }
.brand h1 { font-size: 1rem; }
.brand p { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.journey {
  display: grid;
  gap: 9px;
  margin: 0 0 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(116, 211, 158, .045);
  list-style: none;
}
.journey li { display: flex; align-items: center; gap: 10px; }
.journey li > span {
  display: grid;
  flex: 0 0 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(116, 211, 158, .3);
  border-radius: 50%;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
}
.journey strong, .journey small { display: block; }
.journey strong { font-size: .75rem; }
.journey small { margin-top: 1px; color: var(--muted); font-size: .65rem; }
.panel { padding: 18px 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { font-size: .95rem; }
.sensor-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: -3px 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 22, 17, .72);
}
.sensor-switcher button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .74rem;
  font-weight: 700;
}
.sensor-switcher button.is-active { background: var(--surface-3); color: var(--text); }
.sensor-note {
  margin: -3px 1px 12px;
  color: #d6c58b;
  font-size: .67rem;
  line-height: 1.45;
}
.radar-controls {
  display: grid;
  gap: 5px;
  margin: -3px 1px 12px;
  padding: 9px 10px;
  border: 1px solid rgba(116, 211, 158, .18);
  border-radius: 11px;
  background: rgba(116, 211, 158, .045);
}
.radar-controls label { color: var(--text); font-size: .7rem; font-weight: 700; }
.radar-controls select {
  width: 100%;
  min-height: 33px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .72rem;
}
.radar-controls small { color: var(--muted); font-size: .65rem; line-height: 1.35; }
.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.25rem;
}

.hierarchy-list, .hierarchy-list ul, .image-list { margin: 0; padding: 0; list-style: none; }
.tree-group { margin-bottom: 8px; }
.tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 4px 6px;
  border-radius: 10px;
}
.tree-row:hover { background: rgba(255, 255, 255, .035); }
.tree-row.active { background: rgba(116, 211, 158, .11); }
.tree-toggle {
  flex: 1;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-toggle::before { content: "›"; display: inline-block; width: 18px; color: var(--muted); transition: transform .18s; }
.tree-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.tree-children { margin-left: 17px !important; padding-left: 9px !important; border-left: 1px solid var(--line); }
.tree-leaf { padding-left: 18px; }
.tree-action, .delete-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.tree-action { width: 100%; padding: 9px 10px; color: var(--accent); text-align: left; }
.delete-button { padding: 6px; color: var(--muted); opacity: 0; }
.tree-row:hover .delete-button, .delete-button:focus-visible { opacity: 1; }
.delete-button:hover { color: var(--danger); }

.empty-state {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
  text-align: center;
}
.image-list { display: grid; gap: 8px; }
.image-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.image-card:hover { border-color: rgba(116, 211, 158, .3); }
.image-card.is-active {
  border-color: rgba(116, 211, 158, .75);
  background: rgba(34, 86, 65, .48);
  box-shadow: inset 3px 0 0 var(--accent);
}
.image-card.is-pending { border-color: rgba(238, 248, 243, .32); }
.image-card-label { min-width: 0; }
.image-card-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.image-card strong { display: block; font-size: .83rem; }
.image-card small { display: block; margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.image-card-badge {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(116, 211, 158, .15);
  color: var(--accent);
  font-size: .58rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.image-card .small-button { flex: 0 0 auto; }
.image-card .small-button.is-active { border-color: transparent; background: var(--accent); color: #062014; }
.image-card .small-button.is-active:disabled { cursor: default; opacity: 1; }
.button-spinner {
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 2px solid rgba(255,255,255,.22);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.image-skeleton { display: grid; gap: 8px; }
.image-skeleton span {
  height: 55px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 650;
  text-decoration: none;
}
.primary-button { border: 1px solid transparent; background: var(--accent); color: #062014; }
.primary-button:hover { background: #8ce4b1; }
.secondary-button { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
.secondary-button:hover { border-color: rgba(116, 211, 158, .45); }
.small-button { min-height: 32px; padding: 6px 10px; font-size: .76rem; }
.disclosure {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
}
.date-controls { display: grid; gap: 12px; margin-top: 15px; }
.date-controls label, .modal-card label { display: grid; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 600; }
input[type="date"], input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #081611;
  color: var(--text);
}

.workspace { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.map-top-controls {
  position: absolute;
  z-index: 1200;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.settings-menu {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 22, 17, .9);
  backdrop-filter: blur(10px);
}
.settings-button {
  display: grid;
  width: 38px;
  min-height: 29px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: color .18s ease, background .18s ease;
}
.settings-button > span { display: inline-block; transition: transform .18s ease; }
.settings-button:hover, .settings-button[aria-expanded="true"] {
  background: #1d4436;
  color: var(--accent);
}
.settings-button[aria-expanded="true"] > span { transform: rotate(24deg); }
.settings-popover {
  position: absolute;
  z-index: 1300;
  top: calc(100% + 9px);
  right: 0;
  width: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 28, 23, .98);
  box-shadow: var(--shadow);
}
.settings-popover > strong { display: block; margin-bottom: 12px; font-size: .85rem; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.settings-logout {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 120, 111, .28);
  border-radius: 10px;
  background: rgba(255, 120, 111, .08);
  color: #ffaaa4;
  cursor: pointer;
  text-align: left;
}
.settings-logout:hover { background: rgba(255, 120, 111, .14); }
.plan-usage-panel { padding-bottom: 16px; }
.plan-badge { padding: 5px 8px; border: 1px solid rgba(116, 211, 158, .3); border-radius: 999px; color: var(--accent); font-size: .65rem; font-weight: 700; }
.plan-usage-content { display: grid; gap: 8px; }
.plan-meter-label, .plan-capacity { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .72rem; }
.plan-meter-label strong { color: var(--text); font-size: .72rem; }
.plan-meter { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(145, 170, 158, .18); }
.plan-meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.language-toggle {
  min-width: 46px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--accent);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
}
#geojsonFile { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
#map { flex: 1; min-height: 420px; border: 0; border-radius: 21px; background: #0c1713; overflow: hidden; }
.displayed-image-info {
  position: absolute;
  z-index: 700;
  top: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 8px;
  padding: 9px 12px;
  border: 1px solid rgba(116, 211, 158, .35);
  border-radius: 12px;
  background: rgba(8, 22, 17, .9);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  backdrop-filter: blur(10px);
}
.displayed-image-kicker {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: .58rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.displayed-image-info strong { font-size: .78rem; }
#displayedImageType { color: var(--muted); font-size: .7rem; }
.displayed-image-info small {
  grid-column: 1 / -1;
  max-width: 280px;
  color: var(--muted);
  font-size: .62rem;
}
.radar-insight-panel {
  position: absolute;
  z-index: 700;
  top: 94px;
  left: 12px;
  width: min(350px, calc(100% - 24px));
  padding: 14px;
  border: 1px solid rgba(116, 211, 158, .35);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: rgba(8, 22, 17, .94);
  box-shadow: 0 12px 30px rgba(0,0,0,.26);
  backdrop-filter: blur(12px);
}
.radar-insight-panel.tone-warning { border-left-color: #ef7e4b; }
.radar-insight-panel.tone-mixed, .radar-insight-panel.tone-attention { border-left-color: #e0b847; }
.radar-insight-panel.tone-surface { border-left-color: #4b8bd3; }
.radar-insight-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.radar-insight-panel > strong { display: block; font-size: .92rem; line-height: 1.3; }
#radarInsightComparison { margin: 4px 0 11px; color: var(--muted); font-size: .67rem; }
.radar-insight-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.radar-insight-metric {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 7px;
  padding: 7px;
  border-radius: 9px;
  background: rgba(255,255,255,.045);
}
.radar-insight-swatch { width: 10px; height: 100%; min-height: 37px; border-radius: 5px; }
.radar-insight-metric strong, .radar-insight-metric span, .radar-insight-metric small { display: block; }
.radar-insight-metric strong { font-size: .78rem; }
.radar-insight-metric span { margin-top: 1px; color: var(--text); font-size: .61rem; line-height: 1.25; }
.radar-insight-metric small { margin-top: 2px; color: var(--muted); font-size: .58rem; }
.radar-insight-action {
  margin: 10px 0 7px;
  padding: 8px 9px;
  border-radius: 9px;
  background: rgba(116, 211, 158, .09);
  color: var(--text);
  font-size: .68rem;
  font-weight: 650;
  line-height: 1.4;
}
.radar-insight-panel > small { display: block; color: var(--muted); font-size: .56rem; line-height: 1.35; }
.map-type-switcher {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 22, 17, .9);
  backdrop-filter: blur(10px);
}
.drawing-controls {
  position: absolute;
  z-index: 1250;
  left: 50%;
  bottom: 24px;
  display: grid;
  width: min(430px, calc(100% - 24px));
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(116, 211, 158, .35);
  border-radius: 14px;
  background: rgba(8, 22, 17, .95);
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}
.drawing-controls strong { font-size: .8rem; }
.drawing-controls > span { color: var(--muted); font-size: .68rem; line-height: 1.35; }
.drawing-controls-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 3px; }
.drawing-controls .small-button { min-height: 34px; padding: 6px 10px; font-size: .68rem; }
.map-type-switcher input { position: absolute; opacity: 0; }
.map-type-options { display: flex; }
.map-type-switcher span { display: block; padding: 7px 10px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: .72rem; }
.map-type-switcher input:checked + span { background: var(--surface-3); color: var(--text); }
.legend {
  position: absolute;
  z-index: 700;
  right: 12px;
  bottom: 24px;
  width: 215px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 22, 17, .92);
  font-size: .72rem;
}
.legend-row { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: var(--muted); }
.legend-swatch { width: 16px; height: 16px; border-radius: 4px; }
.map-status {
  position: absolute;
  z-index: 700;
  bottom: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 22, 17, .92);
  transform: translateX(-50%);
  font-size: .78rem;
}
.spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal { position: fixed; z-index: 3000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(0, 8, 5, .76); backdrop-filter: blur(8px); }
.modal-card { position: relative; width: min(100%, 440px); padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.modal-card h2 { margin: 0 0 22px; font-size: 1.2rem; }
.modal-close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.creation-options { display: grid; gap: 10px; margin-top: 20px; }
.creation-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.creation-option:hover { border-color: rgba(116, 211, 158, .55); background: var(--surface-3); }
.creation-option strong, .creation-option small { display: block; }
.creation-option strong { margin-bottom: 4px; font-size: .86rem; }
.creation-option small { color: var(--muted); font-size: .72rem; line-height: 1.4; }
.creation-icon {
  display: grid;
  flex: 0 0 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  background: rgba(116, 211, 158, .12);
  color: var(--accent);
  font-size: 1.2rem;
}
.chart-card { width: min(900px, 100%); }
.chart-subtitle { margin: -14px 0 18px; }
.chart-wrap { height: min(55vh, 480px); }
.toast-region { position: fixed; z-index: 5000; right: 20px; bottom: 20px; display: grid; gap: 9px; width: min(380px, calc(100% - 40px)); }
.toast { padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 11px; background: #10241d; box-shadow: var(--shadow); font-size: .83rem; }
.toast.error { border-left-color: var(--danger); }

.leaflet-container { font-family: Inter, sans-serif; }
.leaflet-control-zoom a { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; }

@media (max-width: 900px) {
  body { height: auto; }
  .mobile-app-header {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: max(10px, env(safe-area-inset-top)) 16px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 17, 14, .96);
  }
  .nebula-logo-mobile { width: min(148px, 48vw); }
  .mobile-app-header span { color: var(--muted); font-size: .68rem; text-align: right; }
  .app-shell { grid-template-columns: 1fr; height: auto; padding: 10px; }
  .sidebar { max-height: none; order: 2; }
  .sidebar > .brand { display: none; }
  .workspace { min-height: min(68svh, 640px); order: 1; }
  #map { min-height: min(68svh, 640px); }
}
@media (max-width: 560px) {
  .app-shell { gap: 10px; }
  .sidebar, .workspace { border-radius: 16px; }
  .sidebar { padding: 16px; }
  .workspace { padding: 10px; }
  .mobile-app-header { min-height: 54px; padding-right: 14px; padding-left: 14px; }
  .mobile-app-header span { max-width: 42%; line-height: 1.25; }
  .map-top-controls { top: 8px; right: 8px; left: 8px; align-items: center; gap: 6px; }
  .map-type-switcher { min-width: 0; max-width: none; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
  .map-type-switcher::-webkit-scrollbar { display: none; }
  .map-type-options { flex-wrap: nowrap; min-width: max-content; }
  .map-type-switcher span { padding: 8px 9px; white-space: nowrap; font-size: .68rem; }
  .settings-menu { padding: 3px; border-radius: 11px; }
  .settings-button { width: 42px; min-height: 36px; font-size: 1.28rem; }
  .displayed-image-info { top: 61px; left: 8px; max-width: calc(100% - 16px); }
  .displayed-image-info small { max-width: min(280px, calc(100vw - 48px)); }
  .radar-insight-panel { top: 126px; left: 8px; max-height: 290px; overflow-y: auto; }
  .radar-insight-metrics { grid-template-columns: 1fr; }
  .map-status { bottom: 12px; width: max-content; max-width: calc(100% - 24px); }
  .drawing-controls { bottom: 12px; }
  .legend { right: 8px; bottom: 62px; }
  .leaflet-control-zoom a { width: 40px !important; height: 40px !important; line-height: 40px !important; }
  .panel { padding-top: 16px; padding-bottom: 16px; }
  .section-heading h2 { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
