:root {
  color-scheme: light;
  --bg: #f4f8fc;
  --bg-2: #edf3fa;
  --panel: #ffffff;
  --panel-2: #f6f9fd;
  --panel-3: #ffffff;
  --border: #d6e2ef;
  --text: #18324a;
  --muted: #5f7791;
  --accent: #1e7be7;
  --accent-2: #f2b857;
  --good: #1d9d6c;
  --warn: #d59b2f;
  --bad: #d95367;
  --shadow: 0 18px 48px rgba(31, 56, 84, 0.12);
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: auto;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
body, input, select, button, textarea { font-family: Inter, system-ui, sans-serif; }
h1, h2, h3, h4, .site-brand__title { font-family: Manrope, Inter, system-ui, sans-serif; }
button, input, select { font: inherit; }
.site-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(30, 123, 231, 0.08), transparent 26%),
    linear-gradient(180deg, #f7fbff 0%, #eef4fa 100%);
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 1300;
  border-bottom: 1px solid rgba(24, 50, 74, 0.08);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
}
.site-header__inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 18px 24px;
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.site-header__menu-toggle {
  display: none;
  width: auto;
  margin: 0;
  justify-self: end;
}
.site-header__menu-panel {
  display: contents;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.site-brand__logo {
  height: 88px;
  width: 156px;
  display: block;
  object-fit: cover;
  object-position: left center;
  flex: 0 0 auto;
}
.site-brand__meta {
  display: none;
}
.site-brand__title {
  display: none;
}
.site-brand__tag {
  display: none;
}
.site-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(24,50,74,0.08);
  background: rgba(255,255,255,0.75);
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.site-nav__link.active,
.site-nav__link:hover {
  color: var(--accent);
  border-color: rgba(30, 123, 231, 0.2);
  background: rgba(30, 123, 231, 0.08);
}
.site-auth {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.site-auth__meta {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
  text-decoration: none;
}
.site-auth__meta:hover {
  color: var(--accent);
}
.site-main {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 24px 40px;
}
.site-main.wide { max-width: 1480px; }
.page-hero {
  display: grid;
  gap: 20px;
  align-items: start;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 420px);
  margin-bottom: 28px;
}
.page-hero h1 { font-size: clamp(34px, 5vw, 54px); margin: 10px 0 12px; }
.page-hero p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 70ch; }
.eyebrow {
  color: #9edfff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-card-stack { display: grid; gap: 12px; }
.hero-stat-card,
.plan-card,
.storm-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,254,0.98));
  border: 1px solid rgba(24,50,74,0.08);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.hero-stat-card {
  padding: 20px 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.hero-stat-card span { color: var(--muted); font-size: 13px; }
.hero-stat-card strong { font-size: 28px; }
.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 20px;
}
.storm-card { overflow: hidden; }
.storm-card__media-link {
  display: block;
  position: relative;
  background: #dce8f3;
}
.storm-card__media {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  filter: saturate(0.95) contrast(1.05);
}
.storm-static-map {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #deebf6 0%, #eef4fa 100%);
}
.storm-static-map--detail {
  aspect-ratio: 16 / 10;
  min-height: 360px;
}
.storm-static-map .leaflet-container,
.storm-static-map.leaflet-container {
  width: 100%;
  height: 100%;
  background: #dce8f3;
}
.storm-card__map-note {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 450;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(24,50,74,0.08);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}
.pill.ready {
  background: #1e7be7;
  color: #ffffff;
  border: 1px solid rgba(30, 123, 231, 0.22);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(30, 123, 231, 0.18);
}
.storm-card__body { padding: 18px; }
.storm-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}
.storm-card__top h2,
.detail-main-card h1 { margin: 6px 0 0; }
.storm-card__top h2 a { color: var(--text); text-decoration: none; }
.storm-card__summary { color: var(--muted); line-height: 1.55; min-height: 72px; }
.storm-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.storm-meta-grid div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}
.storm-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.storm-card__footer,
.detail-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.detail-shell { display: grid; gap: 20px; }
.detail-main-card { padding: 20px; }
.detail-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
}
.detail-preview-wrap {
  border-radius: 20px;
  overflow: hidden;
  background: #dce8f3;
  border: 1px solid rgba(255,255,255,0.06);
}
.detail-preview { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
.detail-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.feature-list { margin: 14px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.plan-card { padding: 22px; }
.plan-card.featured { border-color: rgba(103, 208, 255, 0.42); }
.plan-card.featured-dark { border-color: rgba(255, 209, 102, 0.34); }
.site-main--app {
  max-width: 1760px;
  padding-top: 20px;
  padding-bottom: 20px;
  height: calc(100vh - 92px);
  overflow: hidden;
}
.page-owned .site-header__inner,
.page-admin-builder .site-header__inner,
.page-historic .site-header__inner {
  max-width: none;
  padding-left: 18px;
  padding-right: 18px;
}
.page-owned .site-main--app,
.page-admin-builder .site-main--app,
.page-historic .site-main--app {
  max-width: none;
  padding-left: 18px;
  padding-right: 18px;
}
.site-main--app .shell {
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(24,50,74,0.08);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.66);
  box-shadow: var(--shadow);
}
.site-main--app .sidebar,
.site-main--app .main,
.site-main--app #map {
  min-height: 0;
}
.site-main--app #map {
  height: 100%;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 17, 31, 0.95);
  backdrop-filter: blur(12px);
}
.topbar h1 { margin: 0; font-size: 24px; }
.topbar-brand .tag { margin-top: 4px; font-size: 13px; max-width: 520px; }
.topnav { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.topbar-actions form { margin: 0; }
.shell {
  display: grid;
  grid-template-columns: 450px 1fr;
  min-height: calc(100vh - 79px);
}
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #f9fbfe 0%, #eef4fb 100%);
}
.hero, .panel, .panel-head, .events-list, .event-item, .main { min-width: 0; }
.hero { display: grid; gap: 14px; }
.main { position: relative; height: 100%; overflow: hidden; }
.map-workspace { display: grid; grid-template-columns: minmax(0, 1fr); height: 100%; }
.map-canvas { position: relative; min-width: 0; min-height: 0; }
.mobile-map-actions {
  display: none;
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 980;
  pointer-events: none;
  gap: 8px;
  flex-wrap: wrap;
}
.mobile-map-actions button {
  width: auto;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}
.mobile-detail-sheet {
  display: none;
}
.map-sidepanel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(249,251,254,0.98), rgba(238,244,251,0.98));
}
.page-owned .map-workspace,
.page-admin-builder .map-workspace {
  grid-template-columns: minmax(0, 1fr) 360px;
}
.viewer-mode .site-main--app {
  height: calc(100dvh - 120px);
  min-height: calc(100dvh - 120px);
  overflow: hidden;
}
.viewer-mode .shell {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}
.viewer-mode .sidebar,
.viewer-mode .page-stage {
  display: none;
}
.viewer-mode .main,
.viewer-mode .map-workspace,
.viewer-mode .map-canvas,
.viewer-mode #map {
  height: 100%;
  min-height: 0;
}
.viewer-mode .map-workspace {
  grid-template-columns: minmax(0, 1fr);
}
.viewer-mode .map-sidepanel {
  position: absolute;
  top: 108px;
  right: 16px;
  bottom: 16px;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 0;
  border: none;
  background: transparent;
  pointer-events: none;
  overflow: visible;
  z-index: 1100;
}
.viewer-mode .map-sidepanel .detail-card,
.viewer-mode .map-sidepanel .info-card,
.viewer-mode .map-sidepanel .legend-card {
  pointer-events: auto;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
}
.viewer-mode .map-sidepanel .detail-card {
  max-height: calc(100dvh - 180px);
  overflow-y: auto;
}
#map { height: 100%; width: 100%; }
.admin-subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.mobile-admin-shortcuts,
.builder-mobile-note {
  display: none;
}
h1 { margin: 0 0 6px; font-size: 30px; }
h2, h3, h4 { margin: 0; }
.tag, .subtle, .hint { color: var(--muted); }
.tag { margin: 0; line-height: 1.45; }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,254,0.98));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-head.compact { align-items: center; }
.panel-head.stack-on-mobile > :first-child { min-width: 0; }
.grid.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
input, select, button {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  padding: 12px 14px;
  margin-top: 6px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}
input:hover, select:hover { border-color: rgba(30, 123, 231, 0.28); }
input:focus, select:focus {
  outline: none;
  border-color: rgba(30, 123, 231, 0.48);
  box-shadow: 0 0 0 3px rgba(30, 123, 231, 0.12);
  background: var(--panel-3);
}
input[type="range"] { padding: 0; }
button {
  cursor: pointer;
  background: linear-gradient(135deg, #1e7be7, #4fa8ff);
  border: none;
  font-weight: 700;
  color: #ffffff;
}
button:hover { transform: translateY(-1px); }
button.ghost {
  width: auto;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
}
button.small { padding: 7px 11px; font-size: 12px; }
.tab-row, .helper-row, .layer-switch, .basemap-switch {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.tab-row {
  gap: 2px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.tab-btn {
  width: auto;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 12px;
  text-decoration: none;
}
.tab-btn.active, .layer-switch .active {
  border-color: rgba(103, 208, 255, 0.8);
  background: rgba(103, 208, 255, 0.12);
  color: var(--text);
}
.tab-btn.active {
  background: linear-gradient(180deg, rgba(103, 208, 255, 0.18), rgba(103, 208, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(103, 208, 255, 0.24);
}
.tab-panel { display: none; gap: 16px; }
.tab-panel.active { display: grid; }
.chip, .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.chip { background: rgba(255,255,255,0.06); color: var(--muted); }
.chip.accent { background: rgba(255, 209, 102, 0.14); color: #ffd98a; }
.status { min-height: 20px; margin-top: 4px; color: var(--accent); font-size: 14px; }
.status[data-tone="error"] { color: #ff9ca2; }
.events-list { display: grid; gap: 10px; }
.event-item {
  text-align: left;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,254,0.98));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  color: var(--text);
}
.event-item strong,
.subtle,
.hint,
.toolbar-copy,
.message { overflow-wrap: anywhere; }
.event-item strong { color: var(--text); }
.event-item.active, .event-item:hover {
  border-color: rgba(30,123,231,0.3);
  background: linear-gradient(180deg, rgba(255,255,255,1), rgba(242,247,253,1));
  box-shadow: 0 14px 30px rgba(31, 56, 84, 0.12), inset 0 1px 0 rgba(255,255,255,0.9);
}
.event-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.event-top strong { font-size: 15px; }
.ownership-strip { margin: 6px 0 8px; }
.chip.ownership {
  background: rgba(30,123,231,0.1);
  color: #18324a;
  font-weight: 700;
}
.event-actions-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 10px;
}
.ownership-admin-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(24,50,74,0.08);
}
.ownership-title { margin-bottom: 8px; }
.ownership-list {
  display: grid;
  gap: 8px;
}
.ownership-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(24,50,74,0.08);
}
.panel-subcard {
  margin: 10px 0 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(24,50,74,0.08);
  background: rgba(255,255,255,0.6);
}
.search-results {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.search-result-btn {
  width: 100%;
  margin-top: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(24,50,74,0.08);
}
.search-result-btn span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}
.progress-wrap { margin-top: 10px; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 6px;
}
.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f90ff, #67d0ff);
  box-shadow: 0 0 18px rgba(103, 208, 255, 0.3);
}
.pill { text-transform: uppercase; }
.pill.ready { background: rgba(30, 194, 139, 0.15); color: #18324a; }
.pill.failed { background: rgba(239, 107, 115, 0.14); color: #18324a; }
.pill.working { background: rgba(240, 178, 74, 0.14); color: #18324a; }
.pill.queued { background: rgba(30, 123, 231, 0.12); color: #18324a; }
.legend { display: grid; gap: 10px; }
.legend-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.045);
}
.swatch { width: 18px; height: 18px; border-radius: 4px; display: inline-block; border: 1px solid rgba(255,255,255,0.2); }
.map-toolbar,
.playback-card,
.detail-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.map-toolbar,
.playback-card {
  position: absolute;
  z-index: 900;
}
.detail-card {
  position: static;
}
.map-toolbar {
  top: 18px;
  right: 18px;
  width: min(290px, calc(100% - 36px));
  padding: 12px;
}
.legend-card {
  top: auto;
  right: 18px;
  bottom: 18px;
  width: min(260px, calc(100% - 36px));
}
.map-sidepanel .legend-card,
.map-sidepanel .detail-card,
.map-sidepanel .info-card {
  width: 100%;
}
.map-sidepanel .legend-card {
  position: static;
}
.map-sidepanel .detail-card,
.map-sidepanel .info-card {
  padding: 18px;
}
.map-sidepanel .floating-card-body {
  margin-top: 14px;
}
.map-sidepanel .detail-grid {
  padding-right: 2px;
}
.floating-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}
.floating-card-body { margin-top: 10px; }
.floating-toggle {
  width: auto;
  min-width: 58px;
  margin-top: 0;
  flex: 0 0 auto;
}
.map-toolbar.is-collapsed,
.playback-card.is-collapsed,
.detail-card.is-collapsed {
  padding-bottom: 12px;
}
.toolbar-title { font-weight: 700; margin-bottom: 6px; }
.toolbar-copy { color: var(--muted); line-height: 1.35; font-size: 13px; }
.layer-switch,
.basemap-switch {
  margin-top: 12px;
  gap: 6px;
}
.map-toolbar .ghost.small {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(24,50,74,0.08);
}
.map-toolbar .ghost.small:hover {
  background: rgba(30,123,231,0.06);
  border-color: rgba(30,123,231,0.2);
}
.map-toolbar .layer-switch,
.map-toolbar .basemap-switch {
  padding-top: 10px;
  border-top: 1px solid rgba(24,50,74,0.08);
}
.map-toolbar .layer-switch::before,
.map-toolbar .basemap-switch::before {
  display: block;
  width: 100%;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.map-toolbar .layer-switch::before { content: 'Layers'; }
.map-toolbar .basemap-switch::before { content: 'Basemap'; }
.map-toolbar .layer-switch .active,
.map-toolbar .basemap-switch .active {
  background: linear-gradient(180deg, rgba(30, 123, 231, 0.14), rgba(30, 123, 231, 0.06));
  border-color: rgba(30, 123, 231, 0.35);
  box-shadow: inset 0 0 0 1px rgba(30, 123, 231, 0.1), 0 6px 18px rgba(31, 56, 84, 0.12);
}
.playback-card {
  left: 18px;
  bottom: 18px;
  width: min(300px, calc(100% - 36px));
  padding: 12px;
}
.playback-card .ghost.small { min-width: 72px; }
.playback-card .panel-head,
.detail-card .detail-header {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(24,50,74,0.08);
}
.playback-card h3,
.detail-card h3 {
  font-size: 18px;
}
.playback-card input[type="range"] {
  margin-top: 4px;
}
.playback-card input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(24,50,74,0.12);
}
.playback-card input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border-radius: 50%;
  background: linear-gradient(180deg, #dff6ff, #67d0ff);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 12px rgba(103,208,255,0.35);
}
.playback-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
}
.detail-card.hidden { display: none; }
.detail-card:not(.hidden) { display: block; }
.detail-card .detail-grid {
  display: grid;
  gap: 12px;
}
.detail-card .detail-copy {
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}
.detail-card .detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.detail-card .detail-stat {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(24,50,74,0.08);
}
.detail-card .detail-stat strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}
.detail-card .detail-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.detail-card .detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.detail-card .detail-section {
  padding-top: 12px;
  border-top: 1px solid rgba(24,50,74,0.08);
}
.detail-card .detail-section h4 {
  margin-bottom: 6px;
}
.leaflet-control-container,
.leaflet-pane,
.leaflet-top,
.leaflet-bottom { z-index: 400; }
.radar-dot {
  width: 16px;
  height: 16px;
  margin-left: -8px;
  margin-top: -8px;
}
.radar-dot span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.78);
  background: radial-gradient(circle at 30% 30%, #f7fbff 0%, #7bd6ff 30%, #2b8cff 68%, #0f3872 100%);
  box-shadow: 0 0 0 2px rgba(8,17,31,0.45), 0 6px 16px rgba(13, 87, 184, 0.45);
}
.radar-dot.selected {
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
}
.radar-dot.selected span {
  border-color: rgba(220,255,227,0.95);
  background: radial-gradient(circle at 30% 30%, #f5fff7 0%, #8df5a5 28%, #35c95b 62%, #116b2b 100%);
  box-shadow: 0 0 0 3px rgba(72, 210, 111, 0.22), 0 10px 22px rgba(52, 201, 91, 0.42);
}
.detail-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.detail-header h3 { margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 16px 0; }
.stats div {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.stats span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.section { margin-top: 14px; }
.section h4 { margin-bottom: 8px; }
.section ul { margin: 0; padding-left: 18px; }
.section li { margin-bottom: 6px; }
.message {
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.4;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
}
.empty { color: var(--muted); font-size: 14px; }
.empty {
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.02);
}
.hidden { display: none; }
.page-no-map .site-main--app { height: auto; overflow: visible; }
.page-no-map .shell { grid-template-columns: minmax(0, 1fr); height: auto; }
.page-no-map .sidebar { border-right: none; max-width: 980px; width: 100%; margin: 0 auto; }
.page-historic.page-no-map .sidebar,
.page-owned.page-no-map .sidebar,
.page-admin-builder.page-no-map .sidebar {
  max-width: none;
  margin: 0;
}
.page-no-map .main { display: none; }
.page-stage {
  display: none;
  position: absolute;
  inset: 24px;
  max-width: 760px;
}
.page-no-map .page-stage { display: block; }
@media (max-width: 1100px) {
  .site-main--app {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .site-main--app .shell,
  .map-workspace {
    height: auto;
    min-height: 0;
  }
  .shell { grid-template-columns: 1fr; height: auto; }
  .page-owned .map-workspace,
  .page-admin-builder .map-workspace { grid-template-columns: 1fr; }
  .map-sidepanel {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: none;
  }
  .site-header__inner,
  .page-hero,
  .detail-main-grid,
  .detail-lower-grid,
  .plans-grid { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 1fr; justify-items: start; }
  .topnav, .topbar-actions { justify-content: flex-start; }
  .sidebar {
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 18px;
  }
  .main, #map { height: 56vh; min-height: 360px; }
  .map-toolbar, .playback-card, .detail-card {
    position: static;
    width: auto;
    margin: 16px;
  }
  .page-owned .main,
  .page-owned #map,
  .page-admin-builder .main,
  .page-admin-builder #map {
    height: 72vh;
    min-height: 420px;
  }
  .playback-card {
    width: min(320px, calc(100% - 32px));
    padding: 12px;
  }
  .playback-card h3 {
    font-size: 17px;
  }
  .playback-card .panel-head {
    padding-bottom: 8px;
    margin-bottom: 10px;
  }
  .playback-card .ghost.small {
    min-width: 64px;
    padding: 8px 11px;
  }
  .playback-meta {
    gap: 10px;
    font-size: 12px;
  }
  .playback-card.is-collapsed {
    width: auto;
    max-width: calc(100% - 32px);
  }
  .page-owned .mobile-map-actions,
  .page-admin-builder .mobile-map-actions {
    display: flex;
    justify-content: flex-start;
  }
  .viewer-mode .site-main--app {
    height: calc(100dvh - 102px);
    min-height: calc(100dvh - 102px);
  }
  .viewer-mode .map-sidepanel {
    top: 88px;
    right: 12px;
    bottom: auto;
    width: min(340px, calc(100vw - 24px));
  }
}
@media (max-width: 900px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .site-header__menu-toggle {
    display: inline-flex;
  }
  .site-header__menu-panel {
    display: none;
    grid-column: 1 / -1;
    gap: 12px;
  }
  body.mobile-nav-open .site-header__menu-panel {
    display: grid;
  }
  .site-brand__logo {
    width: 136px;
    height: 76px;
  }
  .site-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
    scrollbar-width: auto;
  }
  .site-nav__link {
    flex: 1 1 calc(50% - 8px);
  }
  .site-auth {
    width: 100%;
    justify-content: flex-start;
  }
  .site-auth__meta {
    width: 100%;
    text-align: left;
  }
  .site-main,
  .page-owned .site-main--app,
  .page-admin-builder .site-main--app,
  .page-historic .site-main--app {
    padding-left: 16px;
    padding-right: 16px;
  }
  .library-grid,
  .plans-grid,
  .detail-lower-grid {
    grid-template-columns: 1fr;
  }
  .detail-main-grid > :last-child {
    order: -1;
  }
  .mobile-admin-shortcuts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
  }
  .builder-mobile-note {
    display: block;
    margin: -2px 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(30,123,231,0.08);
    border: 1px solid rgba(30,123,231,0.14);
    color: var(--muted);
    line-height: 1.45;
    font-size: 13px;
  }
  .admin-panel {
    scroll-margin-top: 84px;
  }
  .storm-static-map--detail {
    min-height: 260px;
  }
  .library-search-grid {
    grid-template-columns: 1fr 1fr;
  }
  .page-owned .mobile-detail-sheet,
  .page-admin-builder .mobile-detail-sheet {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 970;
    pointer-events: none;
    padding: 0 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .page-owned .mobile-detail-sheet.hidden,
  .page-admin-builder .mobile-detail-sheet.hidden {
    display: none !important;
  }
  .mobile-detail-sheet__card {
    pointer-events: auto;
    border-radius: 22px 22px 0 0;
    background: rgba(255,255,255,0.96);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: min(62vh, 560px);
    overflow-y: auto;
    padding: 10px 14px 16px;
  }
  .mobile-detail-sheet__grab {
    width: 52px;
    height: 5px;
    border-radius: 999px;
    background: rgba(24,50,74,0.18);
    margin: 2px auto 12px;
  }
  .mobile-detail-sheet__body .detail-card {
    display: block;
    position: static;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
  .mobile-detail-sheet__body .detail-card .detail-header {
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
  body.mobile-map-focus.page-owned,
  body.mobile-map-focus.page-admin-builder {
    overflow: hidden;
  }
  body.mobile-map-focus.page-owned .site-header,
  body.mobile-map-focus.page-admin-builder .site-header,
  body.mobile-map-focus.page-owned .sidebar,
  body.mobile-map-focus.page-admin-builder .sidebar,
  body.mobile-map-focus.page-owned .map-sidepanel,
  body.mobile-map-focus.page-admin-builder .map-sidepanel,
  body.mobile-map-focus.page-owned .page-stage,
  body.mobile-map-focus.page-admin-builder .page-stage {
    display: none !important;
  }
  body.mobile-map-focus.page-owned .site-main--app,
  body.mobile-map-focus.page-admin-builder .site-main--app {
    padding: 0 !important;
    height: 100dvh;
    min-height: 100dvh;
  }
  body.mobile-map-focus.page-owned .shell,
  body.mobile-map-focus.page-admin-builder .shell {
    display: block;
    height: 100dvh;
    min-height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
  }
  body.mobile-map-focus.page-owned .main,
  body.mobile-map-focus.page-owned #map,
  body.mobile-map-focus.page-owned .map-workspace,
  body.mobile-map-focus.page-owned .map-canvas,
  body.mobile-map-focus.page-admin-builder .main,
  body.mobile-map-focus.page-admin-builder #map,
  body.mobile-map-focus.page-admin-builder .map-workspace,
  body.mobile-map-focus.page-admin-builder .map-canvas {
    height: 100dvh !important;
    min-height: 100dvh !important;
  }
  body.mobile-map-focus.page-owned .mobile-map-actions,
  body.mobile-map-focus.page-admin-builder .mobile-map-actions {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  body.mobile-map-focus.page-owned .mobile-detail-sheet,
  body.mobile-map-focus.page-admin-builder .mobile-detail-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
  }
  body.mobile-map-focus.page-owned .mobile-detail-sheet.hidden,
  body.mobile-map-focus.page-admin-builder .mobile-detail-sheet.hidden {
    display: none !important;
  }
  body.mobile-map-focus.page-owned .map-toolbar,
  body.mobile-map-focus.page-admin-builder .map-toolbar,
  body.mobile-map-focus.page-owned .playback-card,
  body.mobile-map-focus.page-admin-builder .playback-card {
    position: absolute;
    margin: 0;
  }
  body.mobile-map-focus.page-owned .map-toolbar,
  body.mobile-map-focus.page-admin-builder .map-toolbar {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
  body.mobile-map-focus.page-owned .playback-card,
  body.mobile-map-focus.page-admin-builder .playback-card {
    left: 12px;
    right: 12px;
    bottom: 118px;
    width: min(320px, calc(100vw - 24px));
  }
  body.mobile-map-focus.page-owned .playback-card.is-collapsed,
  body.mobile-map-focus.page-admin-builder .playback-card.is-collapsed {
    right: auto;
    width: auto;
    max-width: calc(100vw - 24px);
  }
}
@media (max-width: 640px) {
  .grid.two, .stats { grid-template-columns: 1fr; }
  .site-header__inner,
  .site-main { padding-left: 14px; padding-right: 14px; }
  .site-brand__logo {
    width: 124px;
    height: 70px;
  }
  .site-nav__link,
  .site-auth .ghost.small,
  .site-auth form {
    width: 100%;
  }
  .page-hero {
    margin-bottom: 20px;
  }
  .page-hero h1 {
    font-size: clamp(28px, 10vw, 38px);
  }
  .library-search-grid,
  .storm-meta-grid,
  .detail-lower-grid { grid-template-columns: 1fr; }
  .library-search-actions,
  .storm-card__top,
  .detail-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .storm-card__summary {
    min-height: 0;
  }
  .storm-meta-grid { grid-template-columns: 1fr; }
  .shell { min-width: 0; }
  .panel-head.stack-on-mobile,
  .playback-meta { flex-direction: column; align-items: stretch; }
  .tab-btn { flex-basis: calc(50% - 4px); }
  .sidebar { padding: 14px; }
  .topbar { padding: 14px; }
  .panel { padding: 14px; border-radius: 16px; }
  .map-toolbar, .playback-card, .detail-card { margin: 12px; }
  .map-toolbar { width: calc(100% - 24px); }
  .main,
  #map {
    height: 46vh;
    min-height: 300px;
  }
  .page-owned .main,
  .page-owned #map,
  .page-admin-builder .main,
  .page-admin-builder #map {
    height: 64vh;
    min-height: 360px;
  }
  .playback-card {
    width: min(300px, calc(100% - 20px));
    padding: 11px;
  }
  .playback-card h3 {
    font-size: 16px;
  }
  .playback-card .panel-head {
    gap: 8px;
  }
  .playback-card .ghost.small {
    min-width: 60px;
    padding: 7px 10px;
  }
  .playback-card input[type="range"] {
    margin-top: 3px;
  }
  .playback-meta {
    font-size: 11px;
    margin-top: 7px;
  }
  .playback-card.is-collapsed {
    width: auto;
    max-width: calc(100% - 20px);
  }
  .map-sidepanel {
    padding: 14px;
  }
  .storm-card__body {
    padding: 16px;
  }
  .storm-card__map-note {
    left: 10px;
    right: 10px;
    bottom: 10px;
    text-align: center;
  }
  .mobile-map-actions {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  .mobile-map-actions button {
    flex: 1 1 100%;
    width: 100%;
  }
  body.mobile-map-focus.page-owned .playback-card,
  body.mobile-map-focus.page-admin-builder .playback-card {
    bottom: 132px;
    width: min(300px, calc(100vw - 20px));
  }
  body.mobile-map-focus.page-owned .playback-card.is-collapsed,
  body.mobile-map-focus.page-admin-builder .playback-card.is-collapsed {
    width: auto;
    max-width: calc(100vw - 20px);
  }
  .mobile-detail-sheet {
    padding-left: 8px;
    padding-right: 8px;
  }
  .mobile-detail-sheet__card {
    max-height: min(68vh, 620px);
  }
  h1 { font-size: 25px; }
}

/* Historic address autocomplete suggestions */
.address-suggestions {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}
.address-suggestions li {
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  line-height: 1.35;
}
.address-suggestions li:hover,
.address-suggestions li.active {
  background: rgba(103, 208, 255, 0.14);
  color: var(--text);
}
