:root {
  --h: 215;
  --s: 45;
  --sat: calc(var(--s) * 1%);
  --primary: hsl(var(--h) var(--sat) 38%);
  --on-primary: #fff;
  --primary-container: hsl(var(--h) calc(var(--s) * 1.6%) 90%);
  --on-primary-container: hsl(var(--h) var(--sat) 14%);
  --secondary-container: hsl(var(--h) calc(var(--s) * 0.5%) 88%);
  --on-secondary-container: hsl(var(--h) calc(var(--s) * 0.6%) 14%);
  --surface: hsl(var(--h) calc(var(--s) * 0.25%) 98%);
  --surface-1: hsl(var(--h) calc(var(--s) * 0.3%) 96%);
  --surface-2: hsl(var(--h) calc(var(--s) * 0.3%) 94%);
  --surface-3: hsl(var(--h) calc(var(--s) * 0.3%) 91%);
  --on-surface: hsl(var(--h) calc(var(--s) * 0.2%) 11%);
  --on-surface-variant: hsl(var(--h) calc(var(--s) * 0.2%) 30%);
  --outline: hsl(var(--h) calc(var(--s) * 0.15%) 48%);
  --outline-variant: hsl(var(--h) calc(var(--s) * 0.2%) 80%);
  --scrim: rgb(0 0 0 / 0.4);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.18), 0 1px 3px 1px rgb(0 0 0 / 0.1);
  --shadow-2: 0 1px 2px rgb(0 0 0 / 0.2), 0 2px 6px 2px rgb(0 0 0 / 0.12);
  --shadow-3: 0 4px 8px 3px rgb(0 0 0 / 0.14), 0 1px 3px rgb(0 0 0 / 0.2);

  --map-bg: #e4e4e2;
  --land: #fbfbfa;
  --border: #1b1b1b;
  --district-border: #8e8e8c;
  --uav: #ffc400;
  --uav-fill: rgb(255 196 0 / 0.78);
  --uav-soft: rgb(255 214 64 / 0.38);
  --uav-strong: rgb(255 171 0 / 0.95);
  --uav-edge: #6d4c00;
  --missile: #e53935;
  --missile-fill: rgb(229 57 53 / 0.72);
  --missile-strong: rgb(198 40 40 / 0.95);
  --missile-edge: #5f0f0f;
  --airport: #8a8a8a;
  --airport-fill: rgb(120 120 120 / 0.62);
  --badge-ink: #1a1a1a;
  --badge-ring: #fff;
  --halo: #fff;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-xl: 28px;
  --appbar-h: 64px;
  --panel-w: 400px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: hsl(var(--h) calc(var(--s) * 1.8%) 80%);
  --on-primary: hsl(var(--h) var(--sat) 17%);
  --primary-container: hsl(var(--h) var(--sat) 28%);
  --on-primary-container: hsl(var(--h) calc(var(--s) * 1.8%) 90%);
  --secondary-container: hsl(var(--h) calc(var(--s) * 0.4%) 26%);
  --on-secondary-container: hsl(var(--h) calc(var(--s) * 0.5%) 90%);
  --surface: hsl(var(--h) calc(var(--s) * 0.25%) 8%);
  --surface-1: hsl(var(--h) calc(var(--s) * 0.25%) 11%);
  --surface-2: hsl(var(--h) calc(var(--s) * 0.25%) 14%);
  --surface-3: hsl(var(--h) calc(var(--s) * 0.25%) 18%);
  --on-surface: hsl(var(--h) calc(var(--s) * 0.15%) 90%);
  --on-surface-variant: hsl(var(--h) calc(var(--s) * 0.15%) 74%);
  --outline: hsl(var(--h) calc(var(--s) * 0.12%) 56%);
  --outline-variant: hsl(var(--h) calc(var(--s) * 0.15%) 28%);
  --scrim: rgb(0 0 0 / 0.6);
  --map-bg: #050505;
  --land: #1a1a1a;
  --border: #d9d9d6;
  --district-border: #5a5a58;
  --uav-fill: rgb(255 196 0 / 0.88);
  --uav-soft: rgb(255 214 64 / 0.3);
  --missile-fill: rgb(239 83 80 / 0.82);
  --airport: #a0a0a0;
  --airport-fill: rgb(150 150 150 / 0.55);
  --halo: #000;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --primary: hsl(var(--h) calc(var(--s) * 1.8%) 80%);
    --on-primary: hsl(var(--h) var(--sat) 17%);
    --primary-container: hsl(var(--h) var(--sat) 28%);
    --on-primary-container: hsl(var(--h) calc(var(--s) * 1.8%) 90%);
    --secondary-container: hsl(var(--h) calc(var(--s) * 0.4%) 26%);
    --on-secondary-container: hsl(var(--h) calc(var(--s) * 0.5%) 90%);
    --surface: hsl(var(--h) calc(var(--s) * 0.25%) 8%);
    --surface-1: hsl(var(--h) calc(var(--s) * 0.25%) 11%);
    --surface-2: hsl(var(--h) calc(var(--s) * 0.25%) 14%);
    --surface-3: hsl(var(--h) calc(var(--s) * 0.25%) 18%);
    --on-surface: hsl(var(--h) calc(var(--s) * 0.15%) 90%);
    --on-surface-variant: hsl(var(--h) calc(var(--s) * 0.15%) 74%);
    --outline: hsl(var(--h) calc(var(--s) * 0.12%) 56%);
    --outline-variant: hsl(var(--h) calc(var(--s) * 0.15%) 28%);
    --scrim: rgb(0 0 0 / 0.6);
    --map-bg: #050505;
    --land: #1a1a1a;
    --border: #d9d9d6;
    --district-border: #5a5a58;
    --uav-fill: rgb(255 196 0 / 0.88);
    --uav-soft: rgb(255 214 64 / 0.3);
    --missile-fill: rgb(239 83 80 / 0.82);
    --airport: #a0a0a0;
    --airport-fill: rgb(150 150 150 / 0.55);
    --halo: #000;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--surface);
  color: var(--on-surface);
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

svg {
  display: block;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100dvh;
}

.appbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: calc(var(--appbar-h) + var(--safe-t));
  padding: var(--safe-t) 12px 0 20px;
  background: var(--surface-2);
  z-index: 5;
}

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

.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
}

.logo {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.status .dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--outline);
}

.status[data-state="ok"] .dot {
  background: #2e9e57;
}

.status[data-state="warn"] .dot {
  background: #e8a300;
}

.status[data-state="error"] .dot {
  background: #d93025;
}

.appbar-actions {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--on-surface-variant);
  transition: background-color 0.15s;
}

.icon-btn:hover {
  background: color-mix(in srgb, var(--on-surface) 8%, transparent);
}

.icon-btn:active {
  background: color-mix(in srgb, var(--on-surface) 12%, transparent);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

.only-compact {
  display: none;
}

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr var(--panel-w);
}

.map {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  overflow: hidden;
  background: var(--map-bg);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  outline-offset: -2px;
  cursor: grab;
}

.map.dragging {
  cursor: grabbing;
}

.mapsvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--on-surface-variant);
  z-index: 2;
}

.map-loading[hidden] {
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid var(--outline-variant);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

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

.region {
  fill: var(--land);
  stroke: var(--border);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  transition: fill 0.35s;
}

.region.uav {
  fill: var(--uav-fill);
}

.region.attention {
  fill: var(--uav-soft);
}

.region.missile {
  fill: var(--missile-fill);
}

.region.airport {
  fill: var(--airport-fill);
}

.region.hover,
.region.selected {
  stroke-width: 2;
}

.region-edge {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  pointer-events: none;
  opacity: 0.85;
}

.district {
  display: none;
  fill: transparent;
  stroke: var(--district-border);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}

.mapsvg.show-districts .district {
  display: inline;
}

.district.on {
  display: inline;
  stroke-width: 1.4;
}

.district.on.d-uav {
  fill: var(--uav-strong);
  stroke: var(--uav-edge);
}

.district.on.d-attn {
  fill: var(--uav-soft);
  stroke: var(--uav-edge);
  stroke-dasharray: 5 3;
}

.district.on.d-missile {
  fill: var(--missile-strong);
  stroke: var(--missile-edge);
}

.district.hover,
.district.selected {
  stroke-width: 2.4;
}

.badge {
  cursor: pointer;
}

.badge .ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.badge .bg {
  fill: var(--badge-bg);
  stroke: var(--badge-ring);
  stroke-width: 2;
}

.badge .glyph {
  color: var(--badge-ink);
}

.badge.w-uav {
  --badge-bg: var(--uav);
  color: var(--uav);
}

.badge.w-missile {
  --badge-bg: var(--missile);
  color: var(--missile);
}

.badge.w-missile .glyph {
  color: #fff;
}

.badge.w-airport {
  --badge-bg: var(--airport);
  color: var(--airport);
}

.badge.w-airport .glyph {
  color: #fff;
}

.badge.fresh .ring {
  animation: pulse 2.2s var(--ease) infinite;
}

:root[data-anim="off"] .badge.fresh .ring {
  animation: none;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.85;
  }

  80%,
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.badge-label {
  font-size: 11.5px;
  font-weight: 600;
  text-anchor: middle;
  fill: var(--on-surface);
  stroke: var(--halo);
  stroke-width: 3.5px;
  paint-order: stroke;
  stroke-linejoin: round;
  pointer-events: none;
  display: none;
}

.mapsvg.show-labels .badge-label,
.badge-group.selected .badge-label {
  display: inline;
}

.tooltip {
  position: absolute;
  z-index: 4;
  max-width: 260px;
  padding: 6px 10px;
  border-radius: var(--radius-s);
  background: var(--on-surface);
  color: var(--surface);
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
  box-shadow: var(--shadow-2);
}

.tooltip[hidden] {
  display: none;
}

.chips {
  position: absolute;
  top: 12px;
  left: 12px;
  right: calc(var(--panel-w) + 12px);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 3;
  pointer-events: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  pointer-events: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 10px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-s);
  background: var(--surface-1);
  color: var(--on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-1);
  transition: background-color 0.15s, opacity 0.15s;
}

.chip[aria-pressed="true"] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  border-color: transparent;
}

.chip[aria-pressed="false"] {
  opacity: 0.7;
}

.chip[aria-pressed="false"] .swatch {
  background: transparent;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.swatch.uav {
  background: var(--uav);
  border-color: var(--uav);
}

.swatch.missile {
  background: var(--missile);
  border-color: var(--missile);
}

.swatch.airport {
  background: var(--airport);
  border-color: var(--airport);
}

.chip-count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-size: 12px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.map-controls {
  position: absolute;
  right: calc(var(--panel-w) + 12px);
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
}

.fab {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-m);
  background: var(--surface-3);
  color: var(--primary);
  box-shadow: var(--shadow-2);
  transition: box-shadow 0.15s, background-color 0.15s;
}

.fab:hover {
  box-shadow: var(--shadow-3);
}

.fab:active {
  background: var(--primary-container);
}

.fab svg {
  width: 22px;
  height: 22px;
}

.banner {
  position: absolute;
  left: 12px;
  bottom: 20px;
  max-width: min(420px, calc(100% - var(--panel-w) - 80px));
  padding: 12px 16px;
  border-radius: var(--radius-m);
  background: var(--on-surface);
  color: var(--surface);
  font-size: 13px;
  box-shadow: var(--shadow-3);
  z-index: 6;
}

.banner[hidden] {
  display: none;
}

.panel {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface-1);
  border-left: 1px solid var(--outline-variant);
  z-index: 4;
}

.panel-handle {
  display: none;
}

.tabs {
  flex: none;
  display: flex;
  border-bottom: 1px solid var(--outline-variant);
}

.tab {
  position: relative;
  flex: 1;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--on-surface-variant);
  font-size: 14px;
  font-weight: 500;
}

.tab[aria-selected="true"] {
  color: var(--primary);
}

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
}

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: var(--safe-b);
}

.list[hidden] {
  display: none;
}

.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 6px;
  color: var(--on-surface-variant);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.group-title .swatch {
  width: 12px;
  height: 12px;
}

.item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s;
}

.item:hover {
  background: color-mix(in srgb, var(--on-surface) 6%, transparent);
}

.item:active {
  background: color-mix(in srgb, var(--on-surface) 10%, transparent);
}

.item > svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--on-surface-variant);
}

.item-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--uav);
  color: var(--badge-ink);
}

.item-icon.w-missile {
  background: var(--missile);
  color: #fff;
}

.item-icon.w-airport {
  background: var(--airport);
  color: #fff;
}

.item-icon.w-neutral {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.item-icon svg {
  width: 20px;
  height: 20px;
}

.item-text {
  flex: 1;
  min-width: 0;
}

.item-title {
  display: block;
  font-size: 15px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.item-sub {
  display: block;
  color: var(--on-surface-variant);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.item-time {
  flex: none;
  color: var(--on-surface-variant);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 24px;
  text-align: center;
  color: var(--on-surface-variant);
}

.empty svg {
  width: 40px;
  height: 40px;
  color: #2e9e57;
}

.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.detail {
  position: absolute;
  left: 12px;
  bottom: 20px;
  width: 380px;
  max-height: calc(100% - 100px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: var(--surface-2);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  z-index: 7;
  animation: rise 0.25s var(--ease);
}

.detail[hidden] {
  display: none;
}

@keyframes rise {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
}

.detail-head {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 8px 8px 24px;
}

.detail-head h2 {
  flex: 1;
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.25;
}

.detail-sub {
  padding: 0 24px 8px;
  color: var(--on-surface-variant);
  font-size: 13px;
}

.detail-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0 12px;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 16px;
  padding: 12px 14px;
  border-radius: var(--radius-l);
  background: var(--surface-3);
}

.status-card .item-text {
  min-width: 0;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}

.link svg {
  width: 14px;
  height: 14px;
}

.link:hover {
  text-decoration: underline;
}

.dialog {
  width: min(92vw, 440px);
  max-height: 92dvh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--surface-3);
  color: var(--on-surface);
  box-shadow: var(--shadow-3);
}

.dialog::backdrop {
  background: var(--scrim);
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -8px -8px 8px 0;
}

.dialog-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
}

.setting {
  padding: 12px 0;
}

.setting-title {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.setting-sub {
  display: block;
  color: var(--on-surface-variant);
  font-size: 12.5px;
}

.segmented {
  display: flex;
  margin-top: 10px;
  border: 1px solid var(--outline);
  border-radius: 20px;
  overflow: hidden;
}

.segmented button {
  flex: 1;
  height: 40px;
  border: 0;
  border-left: 1px solid var(--outline);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-surface);
}

.segmented button:first-child {
  border-left: 0;
}

.segmented button[aria-checked="true"] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.swatches button {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--sw);
}

.swatches button[aria-checked="true"]::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 3px solid var(--on-surface);
  border-radius: 50%;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  cursor: pointer;
}

.switch {
  appearance: none;
  flex: none;
  position: relative;
  width: 52px;
  height: 32px;
  margin: 0;
  border: 2px solid var(--outline);
  border-radius: 16px;
  background: var(--surface-3);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.switch::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--outline);
  transform: translateY(-50%);
  transition: left 0.2s var(--ease), width 0.2s var(--ease), height 0.2s var(--ease), background-color 0.2s;
}

.switch:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.switch:checked::before {
  left: 24px;
  width: 24px;
  height: 24px;
  background: var(--on-primary);
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  height: 40px;
  padding: 0 24px;
  border: 0;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.btn.filled {
  background: var(--primary);
  color: var(--on-primary);
}

.btn.text {
  padding: 0 12px;
  background: transparent;
  color: var(--primary);
}

.attribution {
  margin: 12px 0 0;
  color: var(--on-surface-variant);
  font-size: 11.5px;
  line-height: 1.4;
}

@media (max-width: 899px) {
  :root {
    --panel-w: 0px;
    --appbar-h: 56px;
  }

  .only-compact {
    display: grid;
  }

  .stage {
    display: block;
  }

  .map {
    position: absolute;
    inset: 0;
  }

  .appbar {
    padding-left: 16px;
  }

  .status {
    margin-left: 0;
    flex: 1;
    max-width: 240px;
  }

  .chips {
    right: 12px;
    top: 10px;
  }

  .map-controls {
    right: 12px;
    top: 62px;
    bottom: auto;
    gap: 6px;
  }

  .fab {
    width: 40px;
    height: 40px;
  }

  .banner {
    left: 12px;
    right: 12px;
    max-width: none;
    bottom: 160px;
  }

  .panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(72%, 560px);
    border: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -2px 12px rgb(0 0 0 / 0.25);
    transform: translateY(calc(100% - 76px - var(--safe-b)));
    transition: transform 0.3s var(--ease);
    z-index: 5;
  }

  .panel[data-state="open"] {
    transform: none;
  }

  .panel-handle {
    display: grid;
    place-items: center;
    flex: none;
    width: 100%;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .panel-handle span {
    width: 32px;
    height: 4px;
    border-radius: 2px;
    background: var(--outline);
  }

  .tab {
    height: 44px;
  }

  .detail {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: 62%;
    z-index: 8;
  }
}

@media (max-width: 480px) {
  .brand h1 {
    font-size: 20px;
  }

  .status {
    max-width: 180px;
    padding: 0 10px;
  }

  .chip {
    padding: 0 10px 0 8px;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

:root[data-anim="off"] * {
  animation: none !important;
  transition: none !important;
}
