:root {
  --bg: #0b0f17;
  --panel: rgba(15, 21, 33, 0.92);
  --panel-solid: #111827;
  --card: rgba(24, 33, 49, 0.82);
  --card-hover: rgba(34, 46, 68, 0.92);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #38bdf8;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.48);

  --c-restored: #10b981;
  --c-progress: #f59e0b;
  --c-good: #3b82f6;
  --c-worn: #f97316;
  --c-critical: #ef4444;
  --c-unassessed: #475569;
}

body.theme-light {
  --bg: #f1f5f9;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --card: rgba(248, 250, 252, 0.96);
  --card-hover: #f1f5f9;
  --border: rgba(15, 23, 42, 0.11);
  --border-strong: rgba(15, 23, 42, 0.22);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --accent: #0284c7;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
  --c-unassessed: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

#map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hidden { display: none !important; }

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(11, 15, 23, 0.86);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

.loader-card {
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 28px 36px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 380px;
}

.loader-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--c-restored);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.85s linear infinite;
}

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

.loader-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.loader-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* Map Floating Toolbar */
#map-toolbar {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 25;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
  transition: right 0.28s ease, left 0.28s ease;
}

body.inspector-open #map-toolbar {
  right: 446px;
}

.tool-pill {
  background: var(--panel);
  backdrop-filter: blur(12px);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: all 0.16s ease;
}

.tool-pill:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tool-pill.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--c-restored);
  color: var(--text);
}

.pill-ico { font-size: 13px; opacity: 0.9; }

/* Active Street/District Scope Banner — bottom-center, zero overlap with sidebars or top toolbar */
#active-scope-banner {
  position: fixed;
  bottom: 18px;
  left: calc(50% + 190px);
  transform: translateX(-50%);
  z-index: 26;
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--c-restored);
  border-radius: 14px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  max-width: min(560px, calc(100vw - 440px));
  transition: left 0.28s ease, max-width 0.28s ease;
}

body.left-collapsed #active-scope-banner {
  left: 50%;
  max-width: min(620px, calc(100vw - 90px));
}

body.inspector-open #active-scope-banner {
  left: calc(50% - 18px);
  max-width: min(520px, calc(100vw - 880px));
}

body.left-collapsed.inspector-open #active-scope-banner {
  left: calc(50% - 210px);
  max-width: min(560px, calc(100vw - 490px));
}

.scope-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.scope-kind {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  padding: 2px 7px;
  border-radius: 6px;
}

.scope-metrics {
  font-size: 12px;
  color: var(--text-muted);
}

/* Hover Tooltip */
#hover-tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 9px 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
  max-width: 280px;
  font-size: 12.5px;
  line-height: 1.4;
}

.tt-title { font-weight: 600; color: var(--text); margin-bottom: 3px; }
.tt-sub { font-size: 11.5px; color: var(--text-muted); margin-bottom: 5px; }
.tt-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.tt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tt-ba {
  display: inline-block;
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  padding: 2px 6px;
  border-radius: 5px;
}

/* Left Sidebar */
#left-sidebar {
  position: fixed;
  top: 12px;
  left: 12px;
  bottom: 12px;
  width: 386px;
  z-index: 30;
  background: var(--panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body.left-collapsed #left-sidebar {
  transform: translateX(-402px);
}

.collapse-tab {
  position: absolute;
  right: -28px;
  top: 22px;
  width: 28px;
  height: 44px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 10px 10px 0;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: all 0.18s;
}

.collapse-tab:hover { color: var(--text); }
body.left-collapsed .collapse-tab { transform: rotate(180deg); border-radius: 10px 0 0 10px; right: -36px; }

.sidebar-header {
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Primary Map Mode Switcher: Visual Appearance vs Construction */
.mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 11px;
  background: var(--card);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
}

.mode-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 7px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--text-muted);
  transition: all 0.16s ease;
  font-family: inherit;
}

.mode-btn:hover { color: var(--text); }
.mode-btn.active {
  background: var(--panel-solid);
  border-color: rgba(16, 185, 129, 0.55);
  color: var(--text);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.mode-btn[data-mode="construction"].active {
  border-color: rgba(56, 189, 248, 0.55);
}
.mode-title { font-size: 12px; font-weight: 700; white-space: nowrap; }
.mode-sub { font-size: 10px; color: var(--text-dim); white-space: nowrap; }
.mode-btn.active .mode-sub { color: var(--text-muted); }

/* Visual Facade Rating Card & Quick-Rate Controls in Inspector */
.status-badge.v5 { background: rgba(16, 185, 129, 0.22); color: #34d399; }
.status-badge.v4 { background: rgba(59, 130, 246, 0.22); color: #60a5fa; }
.status-badge.v3 { background: rgba(234, 179, 8, 0.22); color: #facc15; }
.status-badge.v2 { background: rgba(249, 115, 22, 0.22); color: #fb923c; }
.status-badge.v1 { background: rgba(239, 68, 68, 0.22); color: #f87171; }
.status-badge.v0 { background: rgba(148, 163, 184, 0.18); color: var(--text-muted); }

.vis-card {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 12px;
}

.vis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.vis-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.vis-score-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
}

.vis-note {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.42;
  margin-bottom: 7px;
}

.vis-src {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.vis-src.anchor { color: #34d399; font-weight: 600; }

.quick-rate-label {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.quick-rate-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.qr-btn {
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 5px 2px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-family: inherit;
  transition: all 0.12s;
}

.qr-btn span { font-size: 8.5px; font-weight: 600; }
.qr-btn:hover { border-color: var(--accent); color: var(--text); }
.qr-btn.active-5 { background: #10b981; border-color: #10b981; color: #052e16; }
.qr-btn.active-4 { background: #3b82f6; border-color: #3b82f6; color: #ffffff; }
.qr-btn.active-3 { background: #eab308; border-color: #eab308; color: #1c1917; }
.qr-btn.active-2 { background: #f97316; border-color: #f97316; color: #ffffff; }
.qr-btn.active-1 { background: #ef4444; border-color: #ef4444; color: #ffffff; }

.c-yl { color: #facc15; }
.c-bl { color: #60a5fa; }

/* Search Box */
.search-box {
  position: relative;
  margin-top: 12px;
}

.search-box input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 9px 32px 9px 32px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.search-box input:focus { border-color: var(--accent); }
.search-box input::placeholder { color: var(--text-dim); }

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

.clear-search {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 4px;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 60;
}

.search-item {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

.search-item:hover { background: var(--card-hover); }
.search-item:last-child { border-bottom: none; }
.search-item-main { min-width: 0; }
.search-item-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-sub { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-muted);
}

/* Tabs */
.tabs-bar {
  display: grid;
  grid-template-columns: 0.78fr 0.95fr 1.05fr 0.85fr;
  gap: 4px;
  margin-top: 12px;
  background: var(--card);
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  background: var(--panel-solid);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.tab-count {
  font-size: 10.5px;
  opacity: 0.7;
  margin-left: 2px;
}

.tab-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 18px;
}

.tab-panel.active { display: block; }

/* Custom scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.26); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.44); }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
}

.kpi-val {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.kpi-val.emerald { color: #34d399; }
.kpi-val.orange { color: #fb923c; }
.kpi-val.amber { color: #fbbf24; }

.kpi-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
}

/* Panel Sections */
.panel-section { margin-bottom: 16px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.section-head h2 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.section-hint { font-size: 11px; color: var(--text-dim); }

.mini-pill {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}

.mini-pill:hover, .mini-pill.active {
  background: var(--c-restored);
  color: #052e16;
}

.visual-tools-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.mini-pill.pano-cta {
  text-decoration: none;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.42);
  color: #38bdf8;
}

.mini-pill.pano-cta:hover {
  background: #38bdf8;
  color: #0b0f17;
}

/* Legend Filters */
.legend-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.15s;
  user-select: none;
}

.legend-item:hover { background: var(--card-hover); }
.legend-item.muted { opacity: 0.38; }

.legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-cnt {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* District Cards */
.districts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.district-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  transition: all 0.16s;
}

.district-card:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-1px);
}

.district-card.active {
  border-color: var(--c-restored);
  box-shadow: 0 0 0 1px var(--c-restored);
}

.dist-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.dist-name { font-weight: 600; font-size: 13.5px; }
.dist-total { font-size: 11px; color: var(--text-muted); }

.stacked-bar {
  display: flex;
  height: 7px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.16);
  margin-bottom: 8px;
}

.sb-seg { height: 100%; }

.dist-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  font-size: 11px;
}

.dm-item { display: flex; flex-direction: column; }
.dm-val { font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dm-lbl { color: var(--text-muted); font-size: 10.5px; }

/* Methodology Box */
.methodology-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
}

.methodology-box summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.methodology-box summary::after { content: '▾'; font-size: 12px; }
.methodology-box[open] summary::after { content: '▴'; }

.method-body {
  margin-top: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11.5px;
}

.method-body strong { color: var(--text); }

/* Streets Tab */
.streets-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.streets-controls input,
.streets-controls select {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 12.5px;
  outline: none;
}

.streets-controls select option {
  background: var(--panel-solid);
  color: var(--text);
}

.controls-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6px;
}

.streets-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.streets-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.street-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 11px;
  cursor: pointer;
  transition: all 0.14s;
}

.street-row:hover {
  border-color: var(--accent);
  background: var(--card-hover);
}

.street-row.active {
  border-color: var(--c-restored);
}

.sr-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.sr-name { font-weight: 600; font-size: 13px; }
.sr-dist { font-size: 10.5px; color: var(--text-dim); flex-shrink: 0; }

.sr-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.sr-nums strong { font-variant-numeric: tabular-nums; }
.c-em { color: #34d399; }
.c-am { color: #fbbf24; }
.c-or { color: #fb923c; }
.c-rd { color: #f87171; }

/* Gallery Tab */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.14s;
}

.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b1120;
  font-weight: 600;
}

.gallery-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.gallery-card {
  display: flex;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px;
  cursor: pointer;
  transition: all 0.15s;
}

.gallery-card:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateY(-1px);
}

.gc-thumb {
  width: 78px;
  height: 66px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.12);
  flex-shrink: 0;
}

.gc-thumb-placeholder {
  width: 78px;
  height: 66px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.28);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--accent);
  font-size: 16px;
}

.gc-thumb-placeholder span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gc-info { min-width: 0; flex: 1; }
.gc-title { font-size: 12.5px; font-weight: 600; line-height: 1.25; margin-bottom: 3px; }
.gc-addr { font-size: 11px; color: var(--text-muted); margin-bottom: 5px; }
.gc-badges { display: flex; gap: 5px; flex-wrap: wrap; }

.badge-mini {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
}

.badge-mini.ba { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-mini.restored { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-mini.local_repair { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }
.badge-mini.in_progress { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge-mini.critical { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-mini.needs_repair { background: rgba(249, 115, 22, 0.2); color: #fb923c; }

/* Right Inspector Drawer (no transform/backdrop-filter so cross-origin WebGL panoramas composite reliably) */
#right-inspector {
  position: fixed;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: 422px;
  z-index: 35;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

#right-inspector.closed {
  display: none;
}

.inspector-topbar {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.status-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-badge.restored { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.status-badge.local_repair { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }
.status-badge.in_progress { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.status-badge.good { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.status-badge.needs_repair { background: rgba(249, 115, 22, 0.2); color: #fb923c; }
.status-badge.critical { background: rgba(239, 68, 68, 0.22); color: #f87171; }
.status-badge.unassessed { background: rgba(148, 163, 184, 0.18); color: var(--text-muted); }

.icon-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.icon-btn:hover { color: var(--text); border-color: var(--accent); }

.inspector-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px 16px 22px;
}

.insp-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
}

.insp-addr {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Before/After Comparison Slider */
.ba-container {
  margin-bottom: 14px;
}

.ba-stage {
  position: relative;
  width: 100%;
  height: 248px;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #090d14;
  user-select: none;
  cursor: ew-resize;
}

.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  pointer-events: none;
}

.ba-stage.fit-contain .ba-img {
  object-fit: contain;
  object-position: center center;
}

.ba-before-wrap {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
  border-right: 2px solid #ffffff;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.55);
}

.ba-before-wrap .ba-img {
  width: 390px;
  max-width: none;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.ba-tag {
  position: absolute;
  top: 10px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.ba-tag.left {
  left: 10px;
  background: rgba(15, 23, 42, 0.78);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.5);
}

.ba-tag.right {
  right: 10px;
  background: rgba(15, 23, 42, 0.78);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.55);
}

.ba-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 7px;
  gap: 6px;
}

.ba-btn-group { display: flex; gap: 4px; }
.ba-mini-btn {
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
}
.ba-mini-btn:hover { color: var(--text); border-color: var(--accent); }

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

.ba-side-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  height: 170px;
  cursor: zoom-in;
}

.ba-side-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-credits {
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.35;
}

.photo-credits a { color: var(--accent); text-decoration: none; }
.photo-credits a:hover { text-decoration: underline; }

/* Single Current Photo Card & Embedded Yandex Street Panorama */
.media-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 8px;
}

.media-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-tab-btn:hover { color: var(--text); }
.media-tab-btn.active {
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.single-photo-box {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #090d14;
  margin-bottom: 6px;
  cursor: zoom-in;
}

.single-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  display: block;
}

.single-photo-box.fit-contain img {
  object-fit: contain;
  object-position: center center;
}

.pano-stage {
  position: relative;
  width: 100%;
  height: 248px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #090d14;
}

.pano-loading-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.pano-iframe {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 9px;
  display: block;
}

.pano-badge {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.pano-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 6px;
}

.pano-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.pano-footer a:hover { text-decoration: underline; }

/* Community Edits Tab & Form */
.edits-intro {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.edits-intro strong { color: var(--text); }

.edit-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group select option { background: var(--panel-solid); color: var(--text); }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.form-row-photo {
  display: grid;
  grid-template-columns: 1fr 74px;
  gap: 6px;
}

.form-hint {
  font-size: 11px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  padding: 4px 8px;
  border-radius: 7px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.btn-submit-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s, opacity 0.14s;
}

.btn-submit-primary:hover { transform: translateY(-1px); opacity: 0.95; }

.btn-submit-secondary {
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit-secondary:hover { border-color: var(--accent); }

.form-feedback {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.edits-queue-box {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.edits-queue-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.edit-queue-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 12px;
}

.eq-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}

.eq-addr { font-weight: 600; color: var(--text); }
.eq-del {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
}
.eq-del:hover { color: #f87171; }
.eq-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 3px; }
.eq-comment { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

.insp-propose-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px dashed rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.insp-propose-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-style: solid;
}

body.picking-building #map { cursor: crosshair !important; }

.photo-empty-box {
  border-radius: 13px;
  border: 1px dashed var(--border-strong);
  background: var(--card);
  padding: 18px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  margin-bottom: 10px;
  line-height: 1.45;
}

/* External Time-Machine Links */
.external-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 10px 0 14px;
}

.ext-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
  transition: all 0.15s;
}

.ext-btn:hover {
  border-color: var(--accent);
  background: var(--card-hover);
}

.ext-btn.primary {
  grid-column: 1 / -1;
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--accent);
}

/* Before / After Text Story Cards */
.story-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.story-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--c-worn);
  border-radius: 10px;
  padding: 10px 12px;
}

.story-card.after { border-left-color: var(--c-restored); }
.story-card.progress { border-left-color: var(--c-progress); }
.story-card.critical { border-left-color: var(--c-critical); }

.story-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.story-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
}

.program-banner {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.program-banner.local_repair {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.38);
}

.program-banner.in_progress {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.program-banner.critical {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}

/* Wear Gauge */
.wear-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 12px;
}

.wear-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}

.wear-title { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.wear-pct { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

.wear-bar-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.18);
  overflow: hidden;
  margin-bottom: 6px;
}

.wear-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s ease;
}

.wear-sub {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

/* Passport Specs Grid */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 14px;
}

.spec-cell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
}

.spec-cell.wide { grid-column: 1 / -1; }
.spec-k { font-size: 10.5px; color: var(--text-dim); margin-bottom: 2px; }
.spec-v { font-size: 12.5px; font-weight: 500; color: var(--text); word-break: break-word; }

/* Live Archive Strip (PastVu + Commons) */
.archive-strip {
  margin-bottom: 14px;
}

.archive-thumbs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.archive-thumb-card {
  flex: 0 0 116px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: zoom-in;
}

.archive-thumb-card img {
  width: 116px;
  height: 76px;
  object-fit: cover;
  display: block;
}

.archive-thumb-cap {
  padding: 4px 6px;
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Street Context Card */
.street-context-card {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 11px 12px;
}

.sc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.sc-btn {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 7px;
  cursor: pointer;
}

.sc-btn:hover { background: var(--accent); color: #0b1120; }

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 8, 14, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

#lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

#lightbox-caption {
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 13px;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}

/* Custom Map Markers for Featured Landmarks */
.landmark-pin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.landmark-pin:hover { transform: scale(1.38); z-index: 5; }
.landmark-pin.ba {
  width: 17px;
  height: 17px;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35), 0 3px 10px rgba(0, 0, 0, 0.55);
}

@media (max-width: 960px) {
  #left-sidebar { width: calc(100vw - 24px); max-height: 52vh; top: auto; bottom: 12px; }
  #right-inspector { width: calc(100vw - 24px); }
  body.inspector-open #map-toolbar { right: 12px; }
  #active-scope-banner,
  body.inspector-open #active-scope-banner,
  body.left-collapsed #active-scope-banner {
    left: 50%;
    bottom: auto;
    top: 56px;
    max-width: calc(100vw - 24px);
  }
}


/* ==================== SIMPLIFIED AIRY REDESIGN + INTERESTING COLLECTIONS ==================== */
#left-sidebar {
  width: 350px;
  border-radius: 16px;
}
body.left-collapsed #left-sidebar {
  transform: translateX(-368px);
}
.sidebar-header {
  padding: 13px 14px 10px;
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sidebar-header h1 {
  font-size: 18px;
  line-height: 1.15;
}
.donate-pill {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s;
}
.donate-pill:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #ffe4e6;
}
body.theme-light .donate-pill { color: #e11d48; }

.mode-switcher.compact {
  margin-top: 9px;
  padding: 3px;
  border-radius: 10px;
}
.mode-switcher.compact .mode-btn {
  flex-direction: row;
  justify-content: center;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
}
.search-box { margin-top: 9px; }
.search-box input { padding: 8px 30px; font-size: 12.5px; border-radius: 10px; }

.tabs-bar {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 9px;
  padding: 3px;
}
.tab-btn { font-size: 11.5px; padding: 6px 4px; }

.tab-panel { padding: 12px 14px 16px; }

/* Compact Single-Row 3-Metric KPI Strip (replaces bulky 4-card grid!) */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}
.kpi-cell { min-width: 0; }
.kpi-cell + .kpi-cell { border-left: 1px solid var(--border); }
.kpi-cell .kpi-val { font-size: 17px; font-weight: 700; line-height: 1.15; }
.kpi-cell .kpi-label { font-size: 10px; color: var(--text-muted); margin-top: 3px; line-height: 1.2; }

.visual-tools-row {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}
.visual-tools-row .mini-pill {
  flex: 1;
  text-align: center;
  justify-content: center;
}

/* Interesting Buildings Tab (Башенки / Соборы / До и После) */
.subtabs-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 9px;
}
.subtab-btn {
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 4px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.14s;
}
.subtab-btn span { font-size: 10px; opacity: 0.72; font-weight: 500; }
.subtab-btn:hover { color: var(--text); }
.subtab-btn.active {
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.interesting-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}
.interesting-toolbar .mini-pill {
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 11.5px;
}
.interesting-toolbar .mini-pill.active {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
  color: #fde047;
}
body.theme-light .interesting-toolbar .mini-pill.active {
  color: #b45309;
}
.interesting-toolbar select {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 11.5px;
  font-family: inherit;
}

.interesting-intro {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

.gc-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.36;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gc-icon-box {
  width: 62px;
  height: 62px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(56, 189, 248, 0.10));
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: var(--text);
}
.gc-icon-box span {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Support / Donations Card */
.support-card {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.08), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 12px;
  padding: 12px 13px;
}
.support-title {
  font-size: 13px;
  font-weight: 700;
  color: #fb7185;
  margin-bottom: 5px;
}
body.theme-light .support-title { color: #e11d48; }
.support-text {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.42;
  margin-bottom: 9px;
}
.btn-donate-full {
  display: block;
  text-align: center;
  text-decoration: none;
  background: #e11d48;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 9px;
}
.btn-donate-full:hover { background: #be123c; }
.support-hint {
  font-size: 10.5px;
  color: var(--text-dim);
  line-height: 1.4;
}
.support-hint code {
  background: var(--card);
  padding: 1px 4px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* Cleaner District Cards */
.district-card {
  padding: 9px 11px;
  border-radius: 11px;
}
.dist-metrics {
  font-size: 11px;
  margin-top: 5px;
}
