:root {
  color-scheme: dark;
  --bg: #0b1012;
  --surface: #11191c;
  --surface-2: #162125;
  --surface-3: #1d2a2e;
  --panel: rgba(17, 25, 28, 0.94);
  --panel-soft: rgba(20, 30, 33, 0.78);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f5f7f4;
  --text-soft: #bdc8c4;
  --muted: #7f918b;
  --accent: #ff6a3d;
  --accent-bright: #ff885f;
  --accent-soft: rgba(255, 106, 61, 0.14);
  --amber: #ffc15c;
  --green: #60d394;
  --blue: #6aaefc;
  --danger: #ff414d;
  --critical: #ff3143;
  --high: #ff7a3d;
  --medium: #ffc15c;
  --low: #58b9d6;
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.24);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;
  --topbar-height: 72px;
  --emergency-height: 72px;
  --sidebar-width: 394px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 10% -10%, rgba(255, 106, 61, 0.12), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(58, 137, 126, 0.13), transparent 28%),
    var(--bg);
}

button,
select,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
#map:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

svg {
  display: block;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 10000;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.topbar {
  position: relative;
  z-index: 1000;
  height: var(--topbar-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 18, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 106, 61, 0.2), rgba(255, 106, 61, 0.06));
  border: 1px solid rgba(255, 106, 61, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-mark svg {
  width: 29px;
  height: 29px;
  fill: var(--accent);
}

.brand-mark .brand-mark-inner {
  fill: #ffd198;
}

.brand-name {
  font-size: 16px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 4px rgba(127, 145, 139, 0.1);
}

.status-live .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(96, 211, 148, 0.12);
}

.status-limited .status-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(255, 193, 92, 0.12);
}

.status-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 65, 77, 0.12);
}

.status-loading .status-dot {
  animation: status-pulse 1.2s ease-in-out infinite;
}

@keyframes status-pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.75);
  }
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line-strong);
}

.icon-button:active {
  transform: scale(0.96);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button.is-spinning svg {
  animation: rotate 0.85s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.mobile-only {
  display: none;
}

.system-banner {
  position: relative;
  z-index: 900;
  min-height: 44px;
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 193, 92, 0.22);
  background: rgba(77, 58, 23, 0.92);
  color: #ffe7ba;
  font-size: 12px;
  backdrop-filter: blur(16px);
}

.system-banner p {
  max-width: 1100px;
  margin: 0;
  line-height: 1.45;
}

.system-banner-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 231, 186, 0.42);
  border-radius: 50%;
  font-weight: 850;
}

.system-banner button {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.app-shell {
  height: calc(100vh - var(--topbar-height) - var(--emergency-height));
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  overflow: hidden;
}

.sidebar {
  position: relative;
  z-index: 20;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(11, 16, 18, 0.86);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  background-clip: padding-box;
}

.panel {
  margin-bottom: 14px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

.panel-hero {
  position: relative;
  overflow: hidden;
  padding: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 106, 61, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(24, 35, 38, 0.96), rgba(15, 23, 26, 0.96));
}

.panel-hero::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -30px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(255, 106, 61, 0.14);
  border-radius: 50%;
  box-shadow:
    0 0 0 18px rgba(255, 106, 61, 0.035),
    0 0 0 38px rgba(255, 106, 61, 0.02);
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-bright);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  position: relative;
  z-index: 1;
  margin-bottom: 9px;
  max-width: 290px;
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.panel-hero > p,
.panel-copy {
  position: relative;
  z-index: 1;
  margin-bottom: 17px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.update-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.update-row > div {
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.14);
}

.meta-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.update-row strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  min-height: 112px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(155deg, rgba(24, 35, 38, 0.93), rgba(14, 21, 23, 0.93));
}

.stat-kicker {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.stat-card strong {
  margin: 7px 0 3px;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.stat-card > span:last-child {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.3;
}

.section-heading {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 13px;
}

.count-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(255, 106, 61, 0.22);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffc1ad;
  font-size: 9px;
  font-weight: 800;
}

.count-badge.neutral {
  max-width: 130px;
  overflow: hidden;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-label {
  display: block;
  margin: 13px 0 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.select-shell {
  position: relative;
}

.select-shell select {
  width: 100%;
  height: 42px;
  padding: 0 38px 0 12px;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.select-shell svg {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  pointer-events: none;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.16);
}

.period-button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.period-button:hover {
  color: var(--text-soft);
}

.period-button.active {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.toggle-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.confidence-toggle {
  min-height: 36px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.confidence-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

.confidence-toggle:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
}

.confidence-toggle:has(input:checked) .toggle-dot {
  opacity: 1;
}

.confidence-high:has(input:checked) .toggle-dot {
  background: var(--high);
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.12);
}

.confidence-nominal:has(input:checked) .toggle-dot {
  background: var(--medium);
  box-shadow: 0 0 0 3px rgba(255, 193, 92, 0.12);
}

.confidence-low:has(input:checked) .toggle-dot {
  background: var(--low);
  box-shadow: 0 0 0 3px rgba(88, 185, 214, 0.12);
}

.timeline-chart {
  height: 78px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 4px;
  padding-top: 7px;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(to bottom, transparent 49%, rgba(255, 255, 255, 0.045) 50%, transparent 51%);
}

.timeline-bar {
  position: relative;
  min-height: 2px;
  border-radius: 5px 5px 1px 1px;
  background: linear-gradient(to top, var(--accent), var(--amber));
  opacity: 0.88;
  transition: height 0.35s ease;
}

.timeline-bar:hover {
  opacity: 1;
}

.timeline-bar::after {
  content: attr(data-count);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  padding: 3px 5px;
  border-radius: 5px;
  background: #0a0f11;
  color: var(--text);
  font-size: 8px;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.timeline-bar:hover::after {
  opacity: 1;
}

.timeline-axis {
  padding-top: 6px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
}

.radius-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
}

.radius-row output {
  color: var(--accent-bright);
}

.range-input {
  width: 100%;
  height: 22px;
  margin: 4px 0 10px;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.range-input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent), rgba(255, 255, 255, 0.12));
}

.range-input::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -5.5px;
  appearance: none;
  border: 3px solid var(--surface-2);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 106, 61, 0.34);
}

.range-input::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.range-input::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}

.range-input::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 3px solid var(--surface-2);
  border-radius: 50%;
  background: var(--accent);
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.secondary-button,
.primary-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.secondary-button {
  min-height: 40px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  transition: 0.2s ease;
}

.secondary-button:hover,
.secondary-button.active {
  border-color: rgba(255, 106, 61, 0.32);
  background: var(--accent-soft);
  color: #ffd0c0;
}

.secondary-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.watch-status {
  min-height: 42px;
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.11);
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.watch-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.primary-button {
  min-height: 37px;
  padding: 0 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #ec4e32);
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(236, 78, 50, 0.2);
}

.primary-button:hover {
  filter: brightness(1.08);
}

.primary-button:disabled,
.text-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.text-button {
  padding: 8px 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.text-button:hover:not(:disabled) {
  color: var(--text-soft);
}

.microcopy {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.45;
}

.detections-panel {
  padding-bottom: 10px;
}

.detections-list {
  max-height: 320px;
  overflow-y: auto;
  margin: 0 -5px;
  padding: 0 5px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.detection-item {
  width: 100%;
  min-height: 57px;
  margin-bottom: 7px;
  padding: 9px 9px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.detection-item:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.detection-severity {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--medium);
  box-shadow: 0 0 0 4px rgba(255, 193, 92, 0.1);
}

.detection-item[data-severity="critical"] .detection-severity {
  background: var(--critical);
  box-shadow: 0 0 0 4px rgba(255, 49, 67, 0.12);
}

.detection-item[data-severity="high"] .detection-severity {
  background: var(--high);
  box-shadow: 0 0 0 4px rgba(255, 122, 61, 0.12);
}

.detection-item[data-severity="low"] .detection-severity {
  background: var(--low);
  box-shadow: 0 0 0 4px rgba(88, 185, 214, 0.1);
}

.detection-main {
  min-width: 0;
}

.detection-main strong,
.detection-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detection-main strong {
  margin-bottom: 3px;
  font-size: 10px;
}

.detection-main span {
  color: var(--muted);
  font-size: 8.5px;
}

.detection-time {
  color: var(--text-soft);
  font-size: 8.5px;
  font-weight: 750;
}

.empty-state {
  min-height: 132px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.empty-state-icon {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 24px;
}

.empty-state strong {
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 10px;
}

.empty-state span {
  max-width: 220px;
  font-size: 9px;
  line-height: 1.45;
}

.sources-panel h2 {
  margin-bottom: 12px;
}

.source-links {
  display: grid;
  gap: 7px;
}

.source-links a {
  min-height: 51px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-decoration: none;
  transition: 0.2s ease;
}

.source-links a:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.source-links strong,
.source-links small {
  display: block;
}

.source-links strong {
  margin-bottom: 2px;
  font-size: 9.5px;
}

.source-links small {
  color: var(--muted);
  font-size: 8px;
}

.source-links svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.disclaimer-card {
  margin-bottom: 6px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 193, 92, 0.16);
  border-radius: var(--radius-md);
  background: rgba(75, 57, 25, 0.18);
}

.disclaimer-card strong {
  display: block;
  margin-bottom: 5px;
  color: #f6d89d;
  font-size: 9.5px;
}

.disclaimer-card p {
  margin: 0;
  color: #b8aa8d;
  font-size: 8.5px;
  line-height: 1.55;
}

.map-workspace {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #11191b;
}

#map {
  width: 100%;
  height: 100%;
  background: #11191b;
}

.map-top-left,
.map-bottom-left,
.map-bottom-right {
  position: absolute;
  z-index: 500;
  pointer-events: none;
}

.map-top-left {
  top: 16px;
  left: 16px;
  right: 90px;
}

.map-bottom-left {
  left: 16px;
  bottom: 16px;
}

.map-bottom-right {
  right: 16px;
  bottom: 18px;
}

.cloud-timeline {
  position: absolute;
  z-index: 520;
  left: 50%;
  bottom: 18px;
  width: min(520px, calc(100% - 390px));
  min-height: 48px;
  padding: 7px 10px;
  display: grid;
  grid-template-columns: 34px 124px minmax(120px, 1fr) 42px;
  align-items: center;
  gap: 9px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(12, 18, 20, 0.9);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.cloud-timeline[hidden] {
  display: none;
}

.cloud-timeline button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(185, 236, 255, 0.25);
  border-radius: 9px;
  background: rgba(185, 236, 255, 0.08);
  color: #dff7ff;
  font-size: 12px;
  cursor: pointer;
}

.cloud-timeline-copy span,
.cloud-timeline-copy strong {
  display: block;
}

.cloud-timeline-copy span {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cloud-timeline-copy strong {
  color: var(--text);
  font-size: 9px;
}

.cloud-timeline input {
  width: 100%;
  accent-color: #b9ecff;
  cursor: pointer;
}

.cloud-timeline output {
  color: #dff7ff;
  font-size: 10px;
  font-weight: 900;
  text-align: right;
}

.map-title-card {
  width: fit-content;
  max-width: 560px;
  min-height: 52px;
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(12, 18, 20, 0.84);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

.live-indicator {
  min-width: 49px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  background: rgba(255, 65, 77, 0.12);
  color: #ff8a92;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.live-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 65, 77, 0.1);
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(255, 65, 77, 0);
  }
}

.map-title-card strong,
.map-title-card span {
  display: block;
}

.map-title-card strong {
  margin-bottom: 3px;
  font-size: 11px;
}

.map-title-card > div > span {
  color: var(--muted);
  font-size: 8.5px;
}

.legend-card {
  min-width: 165px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(12, 18, 20, 0.84);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.legend-title {
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legend-row {
  margin: 5px 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 8.5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.critical {
  background: var(--critical);
  box-shadow: 0 0 0 3px rgba(255, 49, 67, 0.12);
}

.legend-dot.high {
  background: var(--high);
}

.legend-dot.medium {
  background: var(--medium);
}

.legend-dot.low {
  background: var(--low);
}

.legend-wind-arrow {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  color: #b9ecff;
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.legend-cloud {
  width: 14px;
  height: 9px;
  border-radius: 999px;
  background: rgba(243, 248, 251, 0.7);
  box-shadow: 0 0 8px rgba(243, 248, 251, 0.55);
}

.legend-note {
  max-width: 150px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.35;
}

.map-action-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(12, 18, 20, 0.88);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  backdrop-filter: blur(14px);
  pointer-events: auto;
}

.map-action-button:hover {
  background: rgba(25, 35, 38, 0.94);
}

.map-action-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pick-hint {
  position: absolute;
  z-index: 650;
  left: 50%;
  bottom: 20px;
  min-height: 44px;
  padding: 8px 9px 8px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 106, 61, 0.32);
  border-radius: 12px;
  background: rgba(28, 24, 21, 0.94);
  box-shadow: var(--shadow-lg);
  color: #ffd1c1;
  font-size: 10px;
  font-weight: 750;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.pick-hint button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.emergency-bar {
  position: relative;
  z-index: 1000;
  height: var(--emergency-height);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 106, 61, 0.24);
  background:
    linear-gradient(90deg, rgba(255, 106, 61, 0.1), transparent 35%),
    #111719;
}

.emergency-message {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.emergency-message svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emergency-message strong,
.emergency-message span {
  display: block;
}

.emergency-message strong {
  margin-bottom: 3px;
  font-size: 11px;
}

.emergency-message span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emergency-numbers {
  display: flex;
  align-items: center;
  gap: 9px;
}

.emergency-numbers a {
  min-width: 113px;
  height: 48px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  transition: 0.2s ease;
}

.emergency-numbers a:hover {
  border-color: rgba(255, 106, 61, 0.42);
  background: var(--accent-soft);
}

.emergency-numbers span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
}

.emergency-numbers strong {
  font-size: 19px;
  letter-spacing: -0.04em;
}

.toast-container {
  position: fixed;
  z-index: 10000;
  top: 88px;
  right: 18px;
  width: min(340px, calc(100vw - 36px));
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.toast {
  padding: 12px 13px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(17, 25, 28, 0.96);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  pointer-events: auto;
  animation: toast-in 0.25s ease-out;
}

.toast::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--blue);
}

.toast.success::before {
  background: var(--green);
}

.toast.warning::before {
  background: var(--amber);
}

.toast.error::before {
  background: var(--danger);
}

.toast strong,
.toast span {
  display: block;
}

.toast strong {
  margin-bottom: 3px;
  font-size: 10px;
}

.toast span {
  color: var(--text-soft);
  font-size: 9px;
  line-height: 1.4;
}

.toast button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

/* Leaflet */
.leaflet-container {
  font-family: inherit;
}

.leaflet-control-attribution {
  margin: 0 6px 5px 0 !important;
  padding: 3px 7px !important;
  border-radius: 7px 0 0 0;
  background: rgba(10, 15, 17, 0.78) !important;
  color: #9aaaa5 !important;
  font-size: 8px !important;
  backdrop-filter: blur(8px);
}

.leaflet-control-attribution a {
  color: #c6d1cd !important;
}

.leaflet-bar {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-md) !important;
}

.leaflet-bar a,
.leaflet-bar a:hover {
  width: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center;
  border-bottom-color: var(--line) !important;
  background: rgba(12, 18, 20, 0.88) !important;
  color: var(--text) !important;
  line-height: 38px !important;
  backdrop-filter: blur(12px);
}

.leaflet-control-zoom {
  margin-top: 82px !important;
  margin-right: 16px !important;
}

.leaflet-control-layers {
  margin-top: 16px !important;
  margin-right: 16px !important;
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  border-radius: 12px !important;
  background: rgba(12, 18, 20, 0.9) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-md) !important;
  backdrop-filter: blur(13px);
}

.leaflet-control-layers-toggle {
  width: 40px !important;
  height: 40px !important;
  background-image: none !important;
}

.leaflet-control-layers-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  background:
    linear-gradient(135deg, transparent 46%, currentColor 47%, currentColor 53%, transparent 54%) 0 0 / 100% 50%,
    linear-gradient(45deg, transparent 46%, currentColor 47%, currentColor 53%, transparent 54%) 0 100% / 100% 50%;
  background-repeat: no-repeat;
  color: var(--text-soft);
}

.leaflet-control-layers-expanded {
  padding: 12px 13px !important;
  font-size: 10px;
  line-height: 1.8;
}

.leaflet-control-layers-separator {
  border-top-color: var(--line) !important;
}

.leaflet-control-layers input {
  accent-color: var(--accent);
}

.wind-map-marker {
  border: 0 !important;
  background: transparent !important;
}

.leaflet-cloud-pane svg {
  overflow: visible;
}

.cloud-forecast-cell {
  filter: blur(16px);
  mix-blend-mode: screen;
}

.wind-map-symbol {
  position: relative;
  width: 48px;
  height: 48px;
  color: #b9ecff;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.9));
}

.wind-map-arrow {
  position: absolute;
  top: 1px;
  left: 8px;
  width: 32px;
  height: 32px;
  overflow: visible;
  transform-origin: 50% 50%;
}

.wind-map-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wind-map-symbol span {
  position: absolute;
  bottom: 0;
  left: 50%;
  min-width: 25px;
  padding: 2px 4px;
  transform: translateX(-50%);
  border: 1px solid rgba(185, 236, 255, 0.42);
  border-radius: 999px;
  background: rgba(8, 18, 24, 0.88);
  color: #e5f8ff;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.wind-map-symbol.is-strong {
  color: #ffd479;
}

.wind-map-symbol.is-severe {
  color: #ff806c;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(14, 21, 23, 0.97) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-content-wrapper {
  border: 1px solid var(--line-strong);
  border-radius: 15px !important;
}

.leaflet-popup-content {
  width: 310px !important;
  margin: 13px !important;
}

.leaflet-popup-close-button {
  color: var(--muted) !important;
  top: 6px !important;
  right: 6px !important;
}

.fire-popup-header {
  padding-right: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fire-popup-badge {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255, 106, 61, 0.13);
  color: #ffc1ad;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.fire-popup-header strong {
  font-size: 11px;
}

.fire-popup-grid {
  margin-top: 11px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.fire-popup-metric {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.fire-popup-metric span,
.fire-popup-metric strong {
  display: block;
}

.fire-popup-metric span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.fire-popup-metric strong {
  font-size: 9px;
}

.fire-popup-coordinates {
  margin: 9px 0;
  color: var(--muted);
  font-size: 8px;
}

.fire-popup-start {
  margin: -3px 0 9px;
  color: var(--text-soft);
  font-size: 8px;
  line-height: 1.4;
}

.fire-popup-actions {
  display: flex;
  gap: 7px;
}

.fire-popup-actions button,
.fire-popup-actions a {
  min-height: 31px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.fire-popup-actions button {
  flex: 1;
}

.fire-popup-actions a {
  flex: 0 0 auto;
}

.fire-popup-actions a:hover,
.fire-popup-actions button:hover {
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.fire-popup-weather {
  min-height: 0;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 8px;
  line-height: 1.45;
}

.fire-popup-wind {
  min-height: 0;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 8px;
  line-height: 1.45;
}

.wind-summary {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 6px;
}

.wind-summary > div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}

.wind-summary span,
.wind-summary strong {
  display: block;
}

.wind-summary span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.wind-summary strong {
  color: var(--text);
  font-size: 9px;
}

.smoke-direction {
  border-color: rgba(106, 174, 252, 0.28) !important;
  background: rgba(106, 174, 252, 0.08) !important;
}

.smoke-direction i {
  width: 13px;
  height: 13px;
  margin-right: 5px;
  display: inline-grid;
  place-items: center;
  color: #a8ddff;
  font-size: 12px;
  font-style: normal;
  transform-origin: center;
}

.wind-speed-line {
  margin: 7px 0;
  color: var(--text-soft);
  font-weight: 700;
}

.wind-history-list {
  max-height: 128px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.wind-history-row {
  min-height: 24px;
  display: grid;
  grid-template-columns: 68px 15px 26px 1fr;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.wind-history-row:last-child {
  border-bottom: 0;
}

.wind-history-row time {
  color: var(--muted);
}

.wind-history-row .wind-arrow {
  display: inline-grid;
  place-items: center;
  color: #a8ddff;
  font-size: 12px;
  transform-origin: center;
}

.wind-history-row strong {
  color: var(--text);
}

.wind-disclaimer {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.45;
}

.fire-marker-shell {
  background: transparent !important;
  border: 0 !important;
}

.fire-marker {
  position: relative;
  width: 19px;
  height: 19px;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 50% 50% 50% 7px;
  background: var(--medium);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.36);
  transform: rotate(-45deg);
}

.fire-marker::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.fire-marker.severity-critical {
  background: var(--critical);
}

.fire-marker.severity-high {
  background: var(--high);
}

.fire-marker.severity-medium {
  background: var(--medium);
}

.fire-marker.severity-low {
  background: var(--low);
}

.fire-marker.is-recent::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: inherit;
  animation: marker-ring 1.8s ease-out infinite;
}

@keyframes marker-ring {
  from {
    opacity: 0.7;
    transform: scale(0.55);
  }
  to {
    opacity: 0;
    transform: scale(1.35);
  }
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(255, 106, 61, 0.18) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: rgba(236, 78, 50, 0.9) !important;
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.35);
}

.watch-center-icon {
  width: 20px;
  height: 20px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow:
    0 0 0 5px rgba(106, 174, 252, 0.18),
    0 5px 16px rgba(0, 0, 0, 0.38);
}

@media (max-width: 1080px) {
  :root {
    --sidebar-width: 352px;
  }

  .status-pill {
    max-width: 230px;
  }

  #feedStatusText {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .emergency-message span {
    max-width: 430px;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar-height: 66px;
    --emergency-height: 88px;
  }

  body {
    overflow: hidden;
  }

  .topbar {
    padding: 0 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .brand-name {
    font-size: 14px;
  }

  .brand-subtitle {
    display: none;
  }

  .status-pill {
    max-width: 150px;
    padding: 0 9px;
    font-size: 9px;
  }

  .mobile-only {
    display: grid;
  }

  .app-shell {
    position: relative;
    display: block;
  }

  .map-workspace {
    width: 100%;
    height: 100%;
  }

  .sidebar {
    position: absolute;
    z-index: 700;
    inset: 0 auto 0 0;
    width: min(390px, calc(100vw - 36px));
    border-right: 1px solid var(--line-strong);
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.46);
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .map-title-card {
    max-width: calc(100vw - 125px);
  }

  .map-title-card > div > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .legend-card {
    display: none;
  }

  .cloud-timeline {
    left: 12px;
    right: 64px;
    bottom: 14px;
    width: auto;
    grid-template-columns: 34px 100px minmax(70px, 1fr) 38px;
    gap: 7px;
    transform: none;
  }

  .emergency-bar {
    height: var(--emergency-height);
    padding: 9px 12px;
    gap: 10px;
  }

  .emergency-message {
    flex: 1;
  }

  .emergency-message span {
    max-width: 340px;
    white-space: normal;
    line-height: 1.3;
  }

  .emergency-numbers a {
    min-width: 69px;
    height: 57px;
    padding: 6px 8px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .emergency-numbers strong {
    font-size: 18px;
  }

  .emergency-numbers span {
    font-size: 7px;
  }
}

@media (max-width: 560px) {
  :root {
    --emergency-height: 96px;
  }

  .status-pill {
    width: 34px;
    padding: 0;
    justify-content: center;
  }

  #feedStatusText {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .topbar-actions {
    gap: 7px;
  }

  .cloud-timeline {
    padding: 6px 8px;
    grid-template-columns: 32px 72px minmax(60px, 1fr) 34px;
    gap: 5px;
  }

  .cloud-timeline-copy span {
    display: none;
  }

  .cloud-timeline-copy strong {
    font-size: 7.5px;
  }

  .icon-button {
    width: 35px;
    height: 35px;
  }

  .system-banner {
    justify-content: flex-start;
    padding: 9px 11px;
    font-size: 10px;
  }

  .map-top-left {
    top: 12px;
    left: 12px;
    right: 62px;
  }

  .map-title-card {
    width: 100%;
    max-width: none;
    padding: 8px 9px;
  }

  .map-title-card strong {
    font-size: 9px;
  }

  .map-title-card > div > span {
    font-size: 7.5px;
  }

  .live-indicator {
    min-width: 42px;
    height: 23px;
    font-size: 7px;
  }

  .leaflet-control-layers {
    margin-top: 12px !important;
    margin-right: 12px !important;
  }

  .leaflet-control-zoom {
    margin-top: 70px !important;
    margin-right: 12px !important;
  }

  .map-bottom-right {
    right: 12px;
    bottom: 14px;
  }

  .pick-hint {
    left: 12px;
    right: 12px;
    width: auto;
    justify-content: space-between;
    font-size: 9px;
    transform: none;
  }

  .emergency-bar {
    padding: 8px 10px;
  }

  .emergency-message svg {
    display: none;
  }

  .emergency-message strong {
    font-size: 10px;
  }

  .emergency-message span {
    font-size: 8px;
  }

  .emergency-numbers {
    gap: 5px;
  }

  .emergency-numbers a {
    min-width: 61px;
  }

  .sidebar {
    width: calc(100vw - 24px);
    padding: 12px;
  }

  .panel {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
