:root {
  color-scheme: dark;
  --bg: #07100d;
  --surface: #0d1b16;
  --surface-raised: #13251e;
  --surface-soft: #172c24;
  --border: #294138;
  --border-strong: #3a5b4e;
  --text: #f3f7f4;
  --muted: #91a69d;
  --accent: #b7f33d;
  --accent-ink: #172600;
  --green: #55d98b;
  --orange: #ffae57;
  --yellow: #f3d75a;
  --red: #ff7279;
  --grey: #9ba8a2;
  --page-glow: rgba(90, 164, 83, 0.11);
  --topbar-border: rgba(58, 91, 78, 0.7);
  --topbar-bg: rgba(7, 16, 13, 0.86);
  --detail-surface: #091510;
  --chip-text: #cbd7d2;
  --empty-surface: #102019;
  --road-line: #50625b;
  --placeholder: #6f827a;
  --map-frame: #122019;
  --map-loading-from: #102019;
  --map-loading-to: #172c24;
  --map-overlay: rgba(7, 16, 13, 0.88);
  --map-overlay-text: #c6d2cd;
  --map-selection-bg: rgba(7, 16, 13, 0.96);
  --map-control-bg: rgba(7, 16, 13, 0.9);
  --map-attrib-bg: rgba(7, 16, 13, 0.76);
  --map-scale-border: #253b33;
  --map-scale-text: #14251f;
  --nearby-surface: rgba(13, 27, 22, 0.74);
  --toast-bg: #172820;
  --shimmer: rgba(255, 255, 255, 0.045);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-raised: #eef4f0;
  --surface-soft: #e6eee9;
  --border: #cbd8d1;
  --border-strong: #99aea4;
  --text: #17231e;
  --muted: #60736a;
  --accent: #56870c;
  --accent-ink: #ffffff;
  --green: #16834a;
  --orange: #b75f00;
  --yellow: #8a7000;
  --red: #c93442;
  --grey: #718079;
  --page-glow: rgba(92, 146, 62, 0.12);
  --topbar-border: rgba(168, 187, 177, 0.8);
  --topbar-bg: rgba(248, 251, 249, 0.9);
  --detail-surface: #f7faf8;
  --chip-text: #405148;
  --empty-surface: #e6eee9;
  --road-line: #91a49b;
  --placeholder: #7b8e85;
  --map-frame: #d8e1dc;
  --map-loading-from: #e3ebe6;
  --map-loading-to: #f3f7f4;
  --map-overlay: rgba(255, 255, 255, 0.92);
  --map-overlay-text: #405148;
  --map-selection-bg: rgba(255, 255, 255, 0.97);
  --map-control-bg: rgba(255, 255, 255, 0.94);
  --map-attrib-bg: rgba(255, 255, 255, 0.86);
  --map-scale-border: #53675d;
  --map-scale-text: #203129;
  --nearby-surface: rgba(255, 255, 255, 0.82);
  --toast-bg: #ffffff;
  --shimmer: rgba(75, 102, 88, 0.08);
  --shadow: 0 20px 60px rgba(38, 62, 50, 0.13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 76% 8%, var(--page-glow), transparent 28rem),
    var(--bg);
  color: var(--text);
}

button, input { font: inherit; }

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

button { color: inherit; }

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

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
}

.skip-link:focus { top: 1rem; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0.75rem max(1rem, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--topbar-border);
  background: var(--topbar-bg);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand > span:last-child > span { color: var(--accent); }

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
}

.brand-mark svg { width: 1.35rem; height: 1.35rem; stroke-width: 2; }

.topbar-actions, .live-indicator { display: flex; align-items: center; }

.topbar-actions { gap: 0.75rem; }

.live-indicator {
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.live-indicator i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(85, 217, 139, 0.11);
}

.icon-button {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.icon-button:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.icon-button.loading svg { animation: spin 0.8s linear infinite; }
.theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 5rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 2rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(100deg, var(--surface-raised), var(--surface));
  box-shadow: var(--shadow);
}

.summary-main { display: flex; align-items: center; gap: 0.9rem; }

.summary-icon {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(85, 217, 139, 0.14);
  color: var(--green);
  font-weight: 850;
}

.summary-label, .summary-meta span { margin: 0; color: var(--muted); font-size: 0.75rem; }
.summary-main strong { display: block; margin-top: 0.15rem; font-size: 1.05rem; }
.summary-meta { padding-left: 2rem; border-left: 1px solid var(--border); }
.summary-meta strong { display: block; margin-top: 0.2rem; font-size: 0.85rem; }

.notification-button, .location-button, .empty-watch button, .retry-button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.notification-button.enabled { background: var(--surface-soft); color: var(--green); }
.notification-button:disabled { cursor: not-allowed; opacity: 0.62; }

.error-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 114, 121, 0.42);
  border-radius: var(--radius-sm);
  background: rgba(255, 114, 121, 0.08);
}

.error-banner[hidden] { display: none; }
.error-banner > span { display: grid; width: 1.5rem; height: 1.5rem; place-items: center; border-radius: 999px; background: var(--red); color: #3a080b; font-weight: 900; }
.error-banner p { margin: 0; font-size: 0.82rem; }
.error-banner small { display: block; margin-top: 0.1rem; color: var(--muted); }
.error-banner button { border: 0; background: transparent; color: var(--text); font-size: 0.78rem; font-weight: 800; text-decoration: underline; cursor: pointer; }

.watch-section, .explore-section { padding-top: 4.5rem; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

h1, h2 { margin-bottom: 0; font-size: clamp(1.55rem, 3vw, 2.1rem); letter-spacing: -0.045em; }
.section-count { color: var(--muted); font-size: 0.8rem; }

.watch-list { display: grid; gap: 0.75rem; }

.station-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1.4fr) minmax(10rem, 0.8fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 160ms ease, transform 160ms ease;
}

.station-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.map-target-card { cursor: pointer; }
.watch-details { grid-column: 1 / -1; min-width: 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.watch-conflict { margin: 0 0 0.75rem; padding: 0.55rem 0.65rem; border: 1px solid color-mix(in srgb, var(--yellow) 42%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--yellow) 10%, transparent); color: var(--yellow); font-size: 0.72rem; line-height: 1.4; }
.watch-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.watch-detail-column { min-width: 0; padding: 0.75rem; border: 1px solid var(--border); border-radius: 10px; background: var(--detail-surface); }
.watch-detail-column > header { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.65rem; }
.watch-detail-column h4 { margin: 0; color: var(--text); font-size: 0.78rem; }
.watch-detail-column header span { display: grid; min-width: 1.3rem; height: 1.3rem; padding-inline: 0.3rem; place-items: center; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 0.62rem; }
.watch-detail-column header small { margin-left: auto; color: var(--muted); font-size: 0.62rem; }
.watch-feed { display: grid; gap: 0.4rem; max-height: 15rem; padding-right: 0.35rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: var(--border-strong) transparent; scrollbar-width: thin; }
.watch-feed::-webkit-scrollbar { width: 6px; }
.watch-feed::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--border-strong); }
.watch-details .selection-detail-note { margin: 0; color: var(--muted); font-size: 0.72rem; }

.status-beacon {
  position: relative;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-color) 14%, transparent);
  color: var(--status-color);
}

.status-beacon::before { content: ""; width: 0.75rem; height: 0.75rem; border-radius: 999px; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, var(--status-color) 13%, transparent); }

.status-available { --status-color: var(--green); }
.status-queue { --status-color: var(--orange); }
.status-low, .status-limited, .status-uncertain { --status-color: var(--yellow); }
.status-empty { --status-color: var(--red); }
.status-unknown { --status-color: var(--grey); }

.station-name { margin: 0 0 0.25rem; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.station-map-link {
  display: block;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.station-map-link:hover { color: var(--accent); }
.station-address { margin: 0; overflow: hidden; color: var(--muted); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }

.status-copy strong { display: block; color: var(--status-color); font-size: 0.84rem; }
.status-copy small { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.7rem; }

.fuel-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.fuel-chip { padding: 0.2rem 0.42rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-soft); color: var(--chip-text); font-size: 0.65rem; font-weight: 750; }
.fuel-filter-chip { cursor: pointer; transition: border-color 140ms ease, background 140ms ease, color 140ms ease; }
.fuel-filter-chip:hover { border-color: var(--border-strong); }
.fuel-filter-chip.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface-soft)); color: var(--accent); }
.fuel-empty { color: var(--muted); font-size: 0.68rem; }

.card-actions { display: flex; align-items: center; gap: 0.4rem; }
.card-action {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.card-action:hover { border-color: var(--border-strong); color: var(--text); }
.card-action.remove:hover { border-color: rgba(255, 114, 121, 0.5); color: var(--red); }

.empty-watch {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: rgba(13, 27, 22, 0.6);
}

.empty-watch h3 { margin-bottom: 0.35rem; font-size: 1rem; }
.empty-watch p { margin-bottom: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.empty-watch button { background: var(--surface-soft); color: var(--text); }

.empty-illustration { position: relative; width: 4.8rem; height: 3.8rem; overflow: hidden; border-radius: var(--radius-sm); background: var(--empty-surface); }
.road-line { position: absolute; top: 48%; left: -10%; width: 120%; border-top: 2px dashed var(--road-line); transform: rotate(-18deg); }
.empty-pin { position: absolute; top: 0.65rem; right: 1rem; display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 999px 999px 999px 3px; background: var(--accent); color: var(--accent-ink); font-weight: 850; transform: rotate(-45deg); }
.empty-pin::first-letter { transform: rotate(45deg); }

.explore-heading { align-items: center; }
.location-button { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.location-button:hover { border-color: var(--border-strong); }

.filters {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) auto;
  gap: 1rem;
  margin-bottom: 1rem;
}

.search-field {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
}

.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(183, 243, 61, 0.1); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-field input::placeholder { color: var(--placeholder); }

.grade-filter { display: flex; align-items: center; gap: 0.35rem; overflow-x: auto; }
.grade {
  min-height: 3rem;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}
.grade:hover { border-color: var(--border-strong); color: var(--text); }
.grade.active { border-color: var(--accent); background: rgba(183, 243, 61, 0.12); color: var(--accent); }

.map-shell {
  position: relative;
  height: 31rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--map-frame);
  box-shadow: var(--shadow);
}

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

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: linear-gradient(120deg, var(--map-loading-from), var(--map-loading-to));
  color: var(--muted);
  font-size: 0.82rem;
  transition: opacity 180ms ease;
}

.map-loading-actions { display: grid; justify-items: center; gap: 0.75rem; text-align: center; }
.map-loading-actions button { min-width: 9.5rem; background: var(--accent); color: var(--accent-ink); }
.map-loading-actions button[hidden] { display: none; }

.map-loading.ready { opacity: 0; pointer-events: none; }
.map-loading.error { color: var(--red); }

.map-legend {
  position: absolute;
  z-index: 5;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  max-width: calc(100% - 5.5rem);
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(41, 65, 56, 0.8);
  border-radius: 9px;
  background: var(--map-overlay);
  backdrop-filter: blur(12px);
  color: var(--map-overlay-text);
  font-size: 0.65rem;
  font-weight: 700;
}

.map-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.legend-dot { width: 0.45rem; height: 0.45rem; border-radius: 999px; }
.legend-dot.available { background: var(--green); }
.legend-dot.queue { background: var(--orange); }
.legend-dot.low { background: #f3d75a; }
.legend-dot.empty { background: var(--red); }
.legend-dot.unknown { background: var(--grey); }

.map-selection {
  position: absolute;
  z-index: 6;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 3.25rem 1rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--map-selection-bg);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
}

.map-selection[hidden] { display: none; }
.map-selection-copy { min-width: 0; }
.map-selection h3 { margin: 0.2rem 0 0.2rem; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.map-selection p { margin: 0; overflow: hidden; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.map-selection-status { color: var(--status-color); font-size: 0.7rem; font-weight: 800; }
.map-selection .fuel-row { margin-top: 0.45rem; }
.station-report { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto; align-items: start; gap: 0.65rem; padding: 0.55rem 0.6rem; border: 1px solid var(--border); border-left: 3px solid var(--status-color); border-radius: 8px; background: var(--surface); }
.station-report.is-filtered-out { opacity: 0.28; filter: saturate(0.45); }
.station-report time { padding-top: 0.08rem; color: var(--muted); font-size: 0.68rem; font-variant-numeric: tabular-nums; }
.station-report strong { display: block; color: var(--status-color); font-size: 0.72rem; line-height: 1.35; }
.station-report p { margin-top: 0.18rem; overflow: visible; color: var(--text); line-height: 1.4; text-overflow: clip; }
.report-onsite { padding: 0.18rem 0.35rem; border-radius: 5px; background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); font-size: 0.58rem; font-weight: 800; white-space: nowrap; }
.station-comment { display: grid; gap: 0.3rem; padding: 0.55rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: color-mix(in srgb, var(--surface-soft) 75%, transparent); }
.station-comment-meta { display: flex; align-items: baseline; gap: 0.45rem; color: var(--muted); font-size: 0.62rem; }
.station-comment-meta strong { margin-right: auto; color: var(--text); font-size: 0.7rem; }
.station-comment-body { color: var(--text) !important; line-height: 1.45; }
.station-comment-reply { padding: 0.35rem 0.45rem; border-left: 2px solid var(--border-strong); color: var(--muted) !important; font-size: 0.65rem !important; line-height: 1.35; }

.map-selection-action {
  min-height: 2.6rem;
  padding: 0 1rem;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.map-selection-action.watching { background: var(--surface-soft); color: var(--green); }

.map-selection-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 0.8rem;
}

.list-heading h3 { margin: 0; font-size: 1rem; }
.list-heading span { color: var(--muted); font-size: 0.72rem; }

.maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid var(--border) !important;
  border-radius: 9px !important;
  background: var(--map-control-bg) !important;
  box-shadow: none !important;
}

.maplibregl-ctrl-group button { filter: invert(1); }
[data-theme="light"] .maplibregl-ctrl-group button { filter: none; }
.maplibregl-ctrl-attrib { border-radius: 6px 0 0 !important; background: var(--map-attrib-bg) !important; color: var(--muted); }
.maplibregl-ctrl-attrib a { color: var(--text); }
.maplibregl-ctrl-scale { border-color: var(--map-scale-border) !important; color: var(--map-scale-text); font-weight: 700; }

.nearby-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.nearby-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--nearby-surface);
}

.nearby-card .status-beacon { width: 2.4rem; height: 2.4rem; }
.nearby-card .status-beacon::before { width: 0.58rem; height: 0.58rem; }
.nearby-meta { min-width: 0; }
.nearby-meta .station-name { font-size: 0.9rem; }
.nearby-meta .station-address { margin-bottom: 0.45rem; }
.nearby-sub { color: var(--muted); font-size: 0.68rem; }

.follow-button {
  min-height: 2.35rem;
  padding: 0 0.72rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.follow-button:hover, .follow-button.watching { background: var(--accent); color: var(--accent-ink); }
.follow-button.watching { border-color: var(--accent); }

.list-message, .skeleton-card {
  min-height: 7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.usage-section {
  padding: 3rem 0 2.5rem;
}

.usage-heading { align-items: end; }
.usage-updated { color: var(--muted); font-size: 0.7rem; }
.usage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }

.usage-card {
  display: grid;
  grid-template-columns: minmax(8rem, auto) minmax(9rem, 1fr);
  align-items: end;
  gap: 1.25rem;
  min-height: 8rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--nearby-surface);
}

.usage-copy { display: grid; align-content: end; }
.usage-copy span, .usage-copy small { color: var(--muted); font-size: 0.68rem; }
.usage-copy strong { margin: 0.2rem 0; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1; letter-spacing: -0.05em; }
.sparkline { width: 100%; height: 3.25rem; overflow: visible; color: var(--green); }
.sparkline polyline { fill: none; stroke: currentColor; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.sparkline-stations { color: var(--accent); }

.list-message { grid-column: 1 / -1; display: grid; place-items: center; padding: 2rem; color: var(--muted); text-align: center; }
.skeleton-card { position: relative; overflow: hidden; }
.skeleton-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, var(--shimmer) 45%, transparent 70%); animation: shimmer 1.4s infinite; }

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  max-width: min(24rem, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--toast-bg);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid rgba(183, 243, 61, 0.62); outline-offset: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

@media (max-width: 760px) {
  .shell { width: min(100% - 1.25rem, 1180px); padding-top: 1rem; }
  .topbar { padding-inline: 0.75rem; }
  .live-indicator span { display: none; }
  .summary { grid-template-columns: 1fr auto; gap: 1rem; }
  .summary-meta { display: none; }
  .notification-button span { display: none; }
  .notification-button { width: 2.85rem; padding: 0; }
  .watch-section, .explore-section { padding-top: 3.25rem; }
  .station-card { grid-template-columns: auto minmax(0, 1fr) auto; }
  .watch-details-grid { grid-template-columns: 1fr; }
  .status-copy { grid-column: 2 / -1; padding-top: 0.75rem; border-top: 1px solid var(--border); }
  .card-actions { grid-column: 3; grid-row: 1; }
  .empty-watch { grid-template-columns: auto 1fr; }
  .empty-watch button { grid-column: 1 / -1; }
  .filters { grid-template-columns: 1fr; }
  .grade-filter { padding-bottom: 0.2rem; }
  .map-shell { height: 27rem; border-radius: var(--radius-md); }
  .map-legend { gap: 0.45rem; }
  .map-selection { right: 0.6rem; bottom: 0.6rem; left: 0.6rem; grid-template-columns: 1fr; gap: 0.75rem; padding: 0.85rem; }
  .map-selection-action { width: 100%; }
  .watch-feed { max-height: 12rem; }
  .station-report { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .report-onsite { grid-column: 2; justify-self: start; }
  .map-selection-close { top: 0.35rem; right: 0.35rem; }
  .nearby-list { grid-template-columns: 1fr; }
  .usage-grid { grid-template-columns: 1fr; }
  .location-button { max-width: 54%; }
  .location-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 420px) {
  .summary { padding: 0.85rem; }
  .summary-icon { width: 2.35rem; height: 2.35rem; }
  .station-card { gap: 0.7rem; padding: 0.85rem; }
  .status-beacon { width: 2.5rem; height: 2.5rem; }
  .card-action { width: 2.25rem; height: 2.25rem; }
  .explore-heading { align-items: flex-end; }
  .location-button { min-height: 2.5rem; padding: 0.55rem 0.7rem; }
  .usage-card { grid-template-columns: minmax(7rem, auto) 1fr; gap: 0.75rem; }
}

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