:root {
  --ink: #12231d;
  --ink-soft: #33483f;
  --paper: #f7f5eb;
  --panel: #fcfbf5;
  --line: #ddd7c7;
  --line-strong: #b9b3a0;
  --green: #0e6b58;
  --green-deep: #084d40;
  --green-wash: #e9f0e6;
  --yellow: #f2c500;
  --orange: #c9542b;
  --danger: #a93b28;
  --muted: #6f776e;
  --font-ui: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Segoe UI", system-ui, sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Segoe UI", sans-serif;
  --shadow-float: 0 12px 34px rgba(7, 30, 23, 0.2);
  --sheet-h: clamp(380px, 54dvh, 480px);
  --sheet-offset: 50dvh;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #dfe6dd;
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: var(--green);
}

[hidden] {
  display: none !important;
}

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

.map-btn:focus-visible,
.view-btn:focus-visible {
  outline-color: var(--yellow);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

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

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(360px, 34vw, 440px);
  height: 100vh;
}

@supports (height: 100dvh) {
  .app {
    height: 100dvh;
  }
}

.map-shell {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #dfe6dd;
}

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

#map .maplibregl-canvas:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: -2px;
}

/* ---------- Brand plaque ---------- */

.brand {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: calc(100% - 96px);
  padding: 10px 15px 10px 10px;
  border-left: 4px solid var(--yellow);
  background: var(--ink);
  color: #f8f5e9;
  box-shadow: var(--shadow-float);
}

.brand-mark {
  display: grid;
  flex: none;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--yellow);
  color: var(--ink);
}

.brand-text {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
}

.brand p {
  margin: 3px 0 0;
  color: #b9cdc3;
  font-size: 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.proto-tag {
  display: inline-block;
  margin-left: 3px;
  padding: 0 4px;
  border: 1px solid rgba(242, 197, 0, 0.55);
  color: var(--yellow);
  font-size: 8px;
  line-height: 1.5;
  vertical-align: 1px;
}

.title-short {
  display: none;
}

/* ---------- Map controls ---------- */

.map-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 14;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.segmented {
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: var(--shadow-float);
}

.view-btn {
  width: 40px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #d3e0d8;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.view-btn.is-active {
  background: var(--yellow);
  color: var(--ink);
}

.view-btn:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.map-btn {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: var(--ink);
  color: #f8f5e9;
  box-shadow: var(--shadow-float);
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.map-btn:hover {
  background: var(--green-deep);
}

.map-btn:active {
  transform: scale(0.94);
}

.map-btn.is-busy {
  cursor: wait;
  opacity: 0.7;
}

.map-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.map-btn.is-busy svg {
  animation: spin 900ms linear infinite;
}

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

/* ---------- Demo banner, toast, fallback ---------- */

.map-banner {
  position: absolute;
  top: 82px;
  left: 16px;
  z-index: 13;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(520px, calc(100% - 100px));
  padding: 9px 12px;
  border: 1px solid #debb3b;
  border-left: 4px solid var(--yellow);
  background: #fff4cf;
  color: #543c00;
  font-size: 11.5px;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(60, 45, 0, 0.14);
}

.map-banner strong {
  flex: none;
}

.toast {
  position: absolute;
  bottom: 28px;
  left: 50%;
  z-index: 40;
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  border-left: 3px solid var(--yellow);
  background: var(--ink);
  color: #fffdf4;
  font-size: 12.5px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: var(--shadow-float);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.map-fallback {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 22% 28%, rgba(14, 107, 88, 0.1), transparent 42%),
    radial-gradient(circle at 78% 72%, rgba(201, 84, 43, 0.08), transparent 38%),
    repeating-linear-gradient(0deg, rgba(18, 35, 29, 0.035) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(18, 35, 29, 0.035) 0 1px, transparent 1px 32px),
    #e8ece4;
}

.map-fallback-card {
  width: min(390px, 100%);
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--orange);
  background: var(--panel);
  box-shadow: var(--shadow-float);
}

.fallback-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  place-items: center;
  background: #f8e5dd;
  color: var(--danger);
}

.map-fallback h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.map-fallback p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* ---------- MapLibre chrome ---------- */

.maplibregl-ctrl-attrib {
  background: rgba(252, 251, 245, 0.9) !important;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 9.5px !important;
}

.maplibregl-ctrl-attrib a {
  color: var(--green);
}

.maplibregl-ctrl-scale {
  border-color: rgba(18, 35, 29, 0.5) !important;
  background: rgba(252, 251, 245, 0.78) !important;
  color: var(--ink) !important;
  font-family: var(--font-num);
  font-size: 9px !important;
}

.maplibregl-ctrl-bottom-right {
  right: 10px;
  bottom: 12px;
}

.maplibregl-ctrl-bottom-left {
  left: 12px;
  bottom: 12px;
}

.maplibregl-popup-content {
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px !important;
  background: var(--paper) !important;
  box-shadow: 0 14px 40px rgba(7, 30, 23, 0.24) !important;
}

.maplibregl-popup-close-button {
  top: 4px !important;
  right: 4px !important;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted) !important;
  font-size: 20px !important;
  line-height: 26px !important;
}

.maplibregl-popup-tip {
  border-top-color: var(--paper) !important;
  border-bottom-color: var(--paper) !important;
}

.station-popup {
  min-width: 218px;
  max-width: 284px;
  padding: 14px 16px 15px;
}

.popup-kicker {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.station-popup h3 {
  margin: 0;
  padding-right: 18px;
  font-size: 16px;
  line-height: 1.35;
}

.popup-metrics {
  display: flex;
  gap: 18px;
  margin: 11px 0 9px;
}

.popup-metrics .metric {
  min-width: 36px;
}

.popup-metrics .metric strong {
  font-size: 28px;
}

.popup-address {
  margin: 5px 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.popup-time {
  margin: 3px 0 0;
  color: #7d857b;
  font-size: 9.5px;
}

.status-chip {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 6px;
  border: 1px solid rgba(14, 107, 88, 0.35);
  background: #eef4ec;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
}

.status-chip.inactive {
  border-color: #b0b5ad;
  background: #eef0ec;
  color: #687069;
}

.status-chip.expired {
  border-color: rgba(201, 84, 43, 0.4);
  background: #f9e8e1;
  color: var(--orange);
}

.user-location {
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1a73e8;
  box-shadow: 0 0 0 7px rgba(26, 115, 232, 0.2);
  animation: user-pulse 2.4s ease-out infinite;
}

@keyframes user-pulse {
  0% {
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.28);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(26, 115, 232, 0);
  }
  100% {
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0);
  }
}

/* ---------- Panel ---------- */

.panel {
  position: relative;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: -18px 0 44px rgba(8, 30, 24, 0.08);
}

.panel-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.panel-grip {
  display: none;
}

.panel-head {
  flex: none;
  padding: 22px 20px 0;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.panel-title-row h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.panel-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.panel-count {
  display: flex;
  flex: none;
  align-items: baseline;
  gap: 3px;
  color: var(--green);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.panel-count strong {
  font-size: 31px;
  font-weight: 650;
  line-height: 0.9;
}

.panel-count span {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 9.5px;
}

.search-box {
  position: relative;
  margin-top: 16px;
}

.search-box input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 40px;
  border: 1.5px solid var(--line-strong);
  border-radius: 3px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.search-box input::placeholder {
  color: #92998f;
}

.search-box input::-webkit-search-cancel-button {
  display: none;
}

.search-box input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(14, 107, 88, 0.12);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.search-clear:hover {
  background: #efece0;
}

.city-tabs {
  display: flex;
  gap: 2px;
  margin-top: 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.city-tabs::-webkit-scrollbar {
  display: none;
}

.city-tab {
  flex: 1 0 auto;
  padding: 9px 10px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
}

.city-tab:hover {
  color: var(--ink);
}

.city-tab.is-active {
  border-bottom-color: var(--green);
  color: var(--ink);
  font-weight: 700;
}

.tab-count {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.list-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

#filter-note {
  text-align: right;
}

.city-status {
  display: flex;
  gap: 6px;
  padding: 10px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.city-status::-webkit-scrollbar {
  display: none;
}

.city-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.city-chip .dot {
  flex: none;
}

.city-chip.is-stale {
  border-color: #debb3b;
  background: #fff4cf;
  color: #5a3f00;
}

.city-chip.is-error {
  border-color: #d49a87;
  background: #f9e2da;
  color: #7b2b19;
}

.city-chip time {
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Station list ---------- */

.station-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.station-list::-webkit-scrollbar {
  width: 8px;
}

.station-list::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 2px solid var(--paper);
  border-radius: 999px;
}

.station-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  padding: 13px 16px 13px 20px;
  border: 0;
  border-bottom: 1px solid rgba(185, 179, 160, 0.48);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.station-row::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  background: var(--green);
  content: "";
}

.station-row.status-low::before {
  background: var(--orange);
}

.station-row.status-inactive::before {
  background: #9aa096;
}

.station-row.status-expired::before {
  background: var(--orange);
  opacity: 0.55;
}

.station-row:hover {
  background: #f2f0e5;
}

.station-row.is-selected {
  background: var(--green-wash);
  box-shadow: inset 0 0 0 1px rgba(14, 107, 88, 0.28);
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.row-title {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.station-name {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  flex: none;
  padding: 1px 5px;
  border: 1px solid;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.5;
}

.badge.city {
  border-color: rgba(14, 107, 88, 0.3);
  background: #edf3ea;
  color: var(--green);
}

.badge.inactive {
  border-color: #b0b5ad;
  background: #eef0ec;
  color: #687069;
}

.badge.expired {
  border-color: rgba(201, 84, 43, 0.38);
  background: #f9e8e1;
  color: var(--orange);
}

.row-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-time {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 7px;
  color: #8a9088;
  font-size: 9.5px;
  line-height: 1.4;
}

.row-distance {
  color: var(--green);
  font-weight: 700;
}

.row-metrics {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 7px;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 29px;
}

.metric strong {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 25px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.metric small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1;
  white-space: nowrap;
}

.metric.rent strong {
  color: var(--green);
}

.metric.is-zero strong {
  color: var(--orange);
}

.station-row.status-inactive .metric strong,
.station-row.status-expired .metric strong {
  color: var(--muted);
}

.station-row.status-inactive .metric.is-zero strong,
.station-row.status-expired .metric.is-zero strong {
  color: var(--muted);
}

.metric-divider {
  width: 1px;
  height: 27px;
  background: var(--line);
}

.list-more {
  flex: none;
  padding: 10px 16px;
  text-align: center;
}

#load-more {
  padding: 8px 20px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  font-size: 10.5px;
  cursor: pointer;
}

#load-more:hover {
  border-color: var(--green);
  color: var(--green);
}

.empty-state {
  padding: 38px 24px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
}

.empty-state button {
  margin-top: 12px;
  padding: 7px 16px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-size: 10.5px;
  cursor: pointer;
}

.panel-foot {
  flex: none;
  max-height: 118px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  border-top: 1px solid var(--line);
  background: #f4f1e5;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.panel-foot p {
  margin: 0 0 4px;
}

.panel-foot p:last-child {
  margin-bottom: 0;
}

.panel-foot a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid rgba(14, 107, 88, 0.3);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--ink-soft);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

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

.dot.inactive {
  background: #9aa096;
}

.dot.expired {
  background: #d98a6d;
}

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

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  padding: 14px 18px;
  border-left: 4px solid var(--orange);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

/* ---------- Mobile bottom sheet ---------- */

@media (max-width: 900px) {
  .app {
    display: block;
  }

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

  .panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    height: var(--sheet-h);
    max-height: 88dvh;
    border-top: 1px solid var(--line-strong);
    border-left: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -14px 44px rgba(8, 30, 24, 0.22);
    transition: height 260ms cubic-bezier(0.22, 0.8, 0.28, 1);
  }

  .panel.is-expanded {
    height: 88dvh;
  }

  .panel-grip {
    display: flex;
    flex: none;
    height: 34px;
    border-bottom: 1px solid rgba(185, 179, 160, 0.4);
  }

  .panel-grip > button {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 8.5px;
    cursor: pointer;
  }

  .grip-bar {
    width: 34px;
    height: 3px;
    border-radius: 999px;
    background: var(--line-strong);
  }

  .grip-text {
    line-height: 1;
  }

  .grip-chevron {
    position: absolute;
    top: 8px;
    right: 14px;
    transition: transform 200ms ease;
  }

  .panel.is-expanded .grip-chevron {
    transform: rotate(180deg);
  }

  .panel-head {
    padding: 10px 14px 0;
  }

  .panel-title-row h2 {
    font-size: 20px;
  }

  .panel-subtitle {
    font-size: 9.5px;
  }

  .panel-count strong {
    font-size: 25px;
  }

  .search-box {
    margin-top: 10px;
  }

  .search-box input {
    height: 42px;
    font-size: 13px;
  }

  .city-tabs {
    margin-top: 10px;
  }

  .city-tab {
    padding: 7px 8px 8px;
    font-size: 10.5px;
  }

  .list-meta {
    padding-top: 7px;
    font-size: 8.5px;
  }

  .city-status {
    padding: 7px 0 9px;
  }

  .city-chip {
    padding: 4px 7px;
    font-size: 9px;
  }

  .station-row {
    padding: 11px 14px 11px 17px;
  }

  .station-name {
    font-size: 13px;
  }

  .metric strong {
    font-size: 23px;
  }

  .list-more {
    padding: 7px 14px;
  }

  .panel-foot {
    display: none;
    max-height: 92px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .panel.is-expanded .panel-foot {
    display: block;
  }

  .brand {
    top: 10px;
    left: 10px;
    gap: 8px;
    max-width: calc(100% - 74px);
    padding: 7px 10px 7px 7px;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .brand-mark svg {
    width: 26px;
    height: 26px;
  }

  .brand h1 {
    font-size: 12.5px;
  }

  .brand p {
    margin-top: 2px;
    font-size: 8.5px;
  }

  .title-long {
    display: none;
  }

  .title-short {
    display: inline;
  }

  .map-controls {
    top: 10px;
    right: 10px;
    gap: 6px;
  }

  .segmented {
    padding: 2px;
  }

  .view-btn {
    width: 31px;
    height: 26px;
    font-size: 10px;
  }

  .map-btn {
    width: 36px;
    height: 36px;
  }

  .zoom-btn {
    display: none;
  }

  .map-banner {
    top: 128px;
    right: 10px;
    left: 10px;
    max-width: none;
    flex-direction: column;
    gap: 2px;
    padding: 7px 9px;
    font-size: 10px;
  }

  .maplibregl-ctrl-bottom-right {
    right: 8px;
    bottom: calc(var(--sheet-offset) + 8px) !important;
  }

  .maplibregl-ctrl-bottom-left {
    left: 8px;
    bottom: calc(var(--sheet-offset) + 8px) !important;
  }

  .toast {
    bottom: calc(var(--sheet-offset) + 12px);
    font-size: 11.5px;
  }

  .map-fallback {
    align-items: start;
    padding: 76px 14px 14px;
  }

  .map-fallback-card {
    padding: 18px;
  }

  body.sheet-expanded .map-controls,
  body.sheet-expanded .map-banner,
  body.sheet-expanded .maplibregl-ctrl-bottom-right,
  body.sheet-expanded .maplibregl-ctrl-bottom-left {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-width: 380px) {
  .brand p {
    display: none;
  }

  .brand h1 {
    font-size: 12px;
  }

  .panel-title-row h2 {
    font-size: 18px;
  }

  .panel-count strong {
    font-size: 22px;
  }

  .metric {
    min-width: 26px;
  }

  .metric strong {
    font-size: 21px;
  }
}

@media (max-width: 900px) and (max-height: 560px) {
  .panel {
    height: 62dvh;
  }

  .panel.is-expanded {
    height: 94dvh;
  }

  .city-status {
    display: none;
  }
}

@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;
  }

  .user-location {
    animation: none;
  }
}
