:root {
  --bg: #0b1015;
  --panel: #11161d;
  --panel-2: #1a2230;
  --border: #1f2937;
  --text: #e6edf3;
  --text-dim: #8b96a3;
  --accent: #ff6b35;
  --accent-dim: #c2410c;
  --r5: #16a34a;
  --r45: #84cc16;
  --r4: #eab308;
  --r35: #f97316;
  --r3: #ef4444;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --sidebar-w: 360px;
  --tabs-h: 48px;
}

/* Persistent top tab bar — always visible, switches between Roads and Food */
#app-tabs {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--tabs-h);
  background: rgba(11, 16, 21, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 900;
  padding: 0 8px;
  gap: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.app-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
  user-select: none;
  -webkit-user-select: none;
}
.app-tab:hover {
  color: var(--text);
  background: var(--panel-2);
  text-decoration: none;
  transform: translateY(-1px);
}
.app-tab.active {
  color: #0b1015;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.35);
}
.app-tab-glyph {
  font-size: 16px;
  line-height: 1;
}
.app-tab-label {
  letter-spacing: 0.01em;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

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

#sidebar {
  position: fixed;
  top: var(--tabs-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--tabs-h));
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 600;
  transition: transform 0.25s ease;
  box-shadow: var(--shadow);
}
#sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }

.sidebar-header {
  padding: 12px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #131a23, var(--panel));
}
.page-nav {
  display: flex;
  gap: 4px;
  margin: 0 -8px 12px;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--border);
}
.nav-tab {
  flex: 1;
  text-align: center;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-tab:hover {
  color: var(--text);
  background: var(--panel-2);
  text-decoration: none;
}
.nav-tab.active {
  color: #0b1015;
  background: var(--accent);
}
.sidebar-header h1 {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sidebar-header h1::before {
  content: "🗻";
  margin-right: 8px;
}
.sidebar-header .subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.filters {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.chip:hover { border-color: var(--accent-dim); }
.chip.active {
  background: var(--accent);
  color: #0b1015;
  border-color: var(--accent);
  font-weight: 600;
}
.chip.toggle.active {
  background: #f97316;
  border-color: #f97316;
}

.route-list-wrap {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.route-list { padding: 8px; }

.route-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.route-card:hover {
  border-color: var(--accent-dim);
  transform: translateX(2px);
}
.route-card.active {
  border-color: var(--accent);
  background: rgba(255, 107, 53, 0.1);
}
.route-card .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.route-card .name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}
.route-card .meta {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.route-card .rating {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}
.route-card.r-5 { border-left-color: var(--r5); }
.route-card.r-45 { border-left-color: var(--r45); }
.route-card.r-4 { border-left-color: var(--r4); }
.route-card.r-35 { border-left-color: var(--r35); }
.route-card.r-3 { border-left-color: var(--r3); }
.route-card.r-5 .rating { color: var(--r5); }
.route-card.r-45 .rating { color: var(--r45); }
.route-card.r-4 .rating { color: var(--r4); }
.route-card.r-35 .rating { color: var(--r35); }
.route-card.r-3 .rating { color: var(--r3); }
.route-card.r-roll {
  border-left-color: #a855f7;
  background: rgba(168, 85, 247, 0.05);
}
.route-card.r-roll .name { color: #f5f3ff; }
.route-card.r-dig {
  border-left-color: #ec4899;
  background: rgba(236, 72, 153, 0.05);
}
.route-card.r-dig .name { color: #fdf2f8; }
.route-card.r-dig .rating.drag-rating {
  color: #fbcfe8;
  background: rgba(236, 72, 153, 0.18);
  border: 1px solid rgba(236, 72, 153, 0.5);
}
.rating.drag-rating {
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.5);
  padding: 2px 7px;
  letter-spacing: 0.04em;
}
.detail-rating.drag-rating {
  font-size: 13px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.5);
}

.sidebar-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  gap: 8px;
  align-items: center;
}

#map {
  position: fixed;
  top: var(--tabs-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  background: #0b1015;
  transition: left 0.25s ease;
}
#sidebar.collapsed ~ #map { left: 0; }

#sidebar-toggle {
  position: fixed;
  top: calc(var(--tabs-h) + 10px);
  left: calc(var(--sidebar-w) + 12px);
  z-index: 700;
  background: var(--panel);
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: left 0.25s ease;
}
#sidebar-toggle:hover { background: var(--panel-2); }
#sidebar.collapsed ~ #sidebar-toggle { left: 12px; }
.bars {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
  position: relative;
}
.bars::before, .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--text);
}
.bars::before { top: -5px; }
.bars::after { top: 5px; }

#detail-panel {
  position: fixed;
  top: calc(var(--tabs-h) + 12px);
  right: 16px;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - var(--tabs-h) - 24px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 800;
  overflow-y: auto;
  transform: translateX(420px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#detail-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.detail-close:hover { background: rgba(0, 0, 0, 0.7); }
.detail-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #0b1015;
}
.detail-photo-placeholder {
  height: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
}
#detail-body { padding: 0; }
.detail-content { padding: 16px 20px 18px; }
.detail-content h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}
.detail-rating-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-dim);
}
.detail-rating {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}
.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin: 14px 0;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
}
.detail-stat-label {
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.detail-stat-val {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.detail-section { margin: 12px 0 8px; }
.detail-section h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 4px;
}
.detail-section p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text); }
.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.btn {
  flex: 1;
  padding: 9px 12px;
  background: var(--accent);
  color: #0b1015;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.15s;
}
.btn:hover { background: #ff8155; text-decoration: none; }
.btn.secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.secondary:hover { background: var(--border); }
.photo-credit {
  font-size: 10px;
  color: var(--text-dim);
  padding: 4px 12px 0;
  font-style: italic;
}

.loading {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-dim);
  z-index: 700;
  box-shadow: var(--shadow);
}
.loading.hidden { display: none; }

/* Restaurant pins (food map) */
.resto-icon {
  background: transparent !important;
  border: none !important;
}
.resto-pin {
  width: 32px;
  height: 32px;
  background: var(--c);
  border: 2px solid #0b1015;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.resto-pin:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px var(--c), 0 0 0 6px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.6);
}
.resto-glyph {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.resto-card {
  display: flex;
  padding: 0;
  overflow: hidden;
  gap: 10px;
}
.resto-card-thumb {
  width: 64px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  position: relative;
}
.resto-card-emoji {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s ease;
}
.resto-card:hover .resto-card-emoji {
  transform: scale(1.15) rotate(-5deg);
}
.resto-card-body {
  padding: 10px 12px 10px 0;
  flex: 1;
  min-width: 0;
}
.resto-card .name { font-size: 13px; }
.resto-card .meta {
  flex-wrap: wrap;
  gap: 4px 10px;
}
.resto-sig {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
}
.resto-tag-row {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.resto-tag-row-detail { margin: 8px 0 14px; }
.resto-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
}

/* Detail panel — rich food version */
.resto-hero {
  width: 100%;
  height: 140px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.resto-hero-emoji {
  font-size: 84px;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  animation: hero-float 4s ease-in-out infinite;
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}
.resto-hero-cuisine {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.signature-callout {
  margin: 12px 0 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--c, var(--accent));
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.signature-callout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: var(--c);
}
.signature-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--c);
  margin-bottom: 4px;
}
.signature-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.dish-list, .tip-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}
.dish-list li, .tip-list li {
  font-size: 13px;
  line-height: 1.5;
  padding: 5px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
}
.dish-list li {
  border-bottom: 1px dashed var(--border);
}
.dish-list li:last-child { border-bottom: none; }
.dish-bullet {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}
.tip-list li {
  background: rgba(255, 255, 255, 0.02);
  border-left: 2px solid var(--accent-dim);
  padding-left: 10px;
  margin-bottom: 4px;
  border-radius: 0 4px 4px 0;
}

/* Featured-area easter egg (Milpitas Square) */
.area-icon {
  background: transparent !important;
  border: none !important;
}
.area-pin {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.area-pin-pulse, .area-pin-pulse-2 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border-radius: 50%;
  background: #fbbf24;
  opacity: 0.65;
  animation: area-pulse 2s ease-out infinite;
  pointer-events: none;
}
.area-pin-pulse-2 { animation-delay: 1s; }
@keyframes area-pulse {
  0%   { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(2.4); opacity: 0; }
}
.area-pin-core {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  border: 2px solid #0b1015;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.65), 0 4px 12px rgba(0, 0, 0, 0.55);
  z-index: 2;
  transition: transform 0.15s ease;
}
.area-pin:hover .area-pin-core {
  transform: scale(1.18);
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.9), 0 6px 16px rgba(0, 0, 0, 0.6);
}
.area-pin-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-2px);
  background: rgba(11, 16, 21, 0.92);
  color: #fde047;
  border: 1px solid #f59e0b;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.area-pin:hover .area-pin-label {
  opacity: 1;
  transform: translateX(-50%) translateY(4px);
}

/* Easter-egg modal */
.area-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.area-modal.open { display: flex; animation: modal-in 0.25s ease-out; }
@keyframes modal-in { from { opacity: 0; } to { opacity: 1; } }
.area-modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.15) 0%, rgba(0, 0, 0, 0.85) 70%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.area-modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 60px);
  background: var(--panel);
  border: 1px solid #f59e0b;
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.18), 0 30px 60px rgba(0, 0, 0, 0.6);
  animation: modal-card-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-card-in {
  from { transform: translateY(20px) scale(0.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.area-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.area-modal-close:hover { background: rgba(0, 0, 0, 0.75); }

.area-hero {
  position: relative;
  padding: 28px 24px 20px;
  background: linear-gradient(135deg, #78350f 0%, #b45309 50%, #d97706 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
}
.area-hero-glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 224, 71, 0.5), transparent 70%);
  pointer-events: none;
}
.area-hero-icon {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  animation: hero-float 4s ease-in-out infinite;
}
.area-hero-text { position: relative; }
.area-hero-eyebrow {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #fde047;
  margin-bottom: 4px;
}
.area-hero-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.area-hero-sub {
  font-size: 13px;
  color: #fef3c7;
  margin: 0;
  opacity: 0.95;
}

/* Custom SVG diagram of Milpitas Square + absolutely-positioned pins */
.ms-diagram {
  position: relative;
  width: 100%;
  aspect-ratio: 720 / 320;
  background: #0e1620;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.ms-diagram svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ms-pin-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ms-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: var(--size);
  height: var(--size);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  display: grid;
  place-items: center;
  font-family: inherit;
}
.ms-pin-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--c);
  opacity: calc(0.5 * var(--intensity));
  animation: ms-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes ms-pulse {
  0%   { transform: scale(0.7); opacity: calc(0.6 * var(--intensity, 0.5)); }
  100% { transform: scale(1.9); opacity: 0; }
}
.ms-pin-core {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 65%, #000));
  border: 2px solid #0b1015;
  display: grid;
  place-items: center;
  font-size: calc(var(--size) * 0.45);
  box-shadow: 0 0 calc(var(--size) * 0.45) color-mix(in srgb, var(--c) 70%, transparent),
              0 3px 8px rgba(0, 0, 0, 0.6);
  z-index: 2;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ms-pin:hover .ms-pin-core,
.ms-pin.highlighted .ms-pin-core {
  transform: scale(1.2);
  box-shadow: 0 0 calc(var(--size) * 0.7) var(--c),
              0 4px 14px rgba(0, 0, 0, 0.7);
}
.ms-pin-rating {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: rgba(11, 16, 21, 0.96);
  color: var(--c);
  border: 1.5px solid var(--c);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  z-index: 3;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.ms-pin-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  background: rgba(11, 16, 21, 0.95);
  color: #fff;
  border: 1px solid var(--c);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 4;
}
.ms-pin:hover .ms-pin-label,
.ms-pin.highlighted .ms-pin-label {
  opacity: 1;
  transform: translateX(-50%) translateY(6px);
}
.ms-pin.highlighted .ms-pin-pulse {
  animation-duration: 1.2s;
  opacity: calc(0.8 * var(--intensity));
}

.area-content { padding: 18px 22px 22px; }
.area-description {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 14px;
}
.area-move {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}
.area-move-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fbbf24;
  text-transform: uppercase;
}
.area-move p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.area-heatmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.area-heatmap-count { color: #fbbf24; }
.area-heatmap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.heat-row {
  display: grid;
  grid-template-columns: 28px 28px 1fr 38px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--text);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.heat-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--w);
  background: linear-gradient(90deg, var(--c) 0%, var(--c) 60%, transparent 100%);
  opacity: 0.07;
  pointer-events: none;
}
.heat-row:hover {
  transform: translateX(2px);
  border-color: var(--c);
  background: var(--panel);
}
.heat-rank {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.heat-emoji {
  font-size: 22px;
  text-align: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.heat-meat { min-width: 0; }
.heat-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.heat-sub {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-bottom: 6px;
}
.heat-dot { color: var(--text-dim); opacity: 0.5; }
.heat-sig {
  color: var(--text);
  opacity: 0.85;
  font-style: italic;
}
.heat-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
}
.heat-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c), var(--c) 60%, #fff8);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.heat-bar-fill.filled { width: var(--w); }
.heat-rating {
  font-size: 18px;
  font-weight: 800;
  color: var(--c);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.area-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

/* POI markers (incident points, vistas, etc.) */
.poi-icon {
  background: transparent !important;
  border: none !important;
  pointer-events: none;
}
.poi-wrap {
  position: relative;
  display: flex;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
}
.poi-glyph {
  width: 30px;
  height: 30px;
  background: #ef4444;
  border: 2px solid #0b1015;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25), 0 4px 12px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
  animation: poi-pulse 2s ease-in-out infinite;
}
.poi-crash {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.3), 0 4px 12px rgba(0, 0, 0, 0.6);
}
.poi-vista {
  background: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.25), 0 4px 12px rgba(0, 0, 0, 0.6);
}
.poi-donut {
  background: #d946ef;
  box-shadow: 0 0 0 4px rgba(217, 70, 239, 0.25), 0 4px 12px rgba(0, 0, 0, 0.6);
}
.poi-golf {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.25), 0 4px 12px rgba(0, 0, 0, 0.6);
}

.diff-badge {
  display: inline-block;
  padding: 1px 7px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  border: 1px solid;
  background: transparent;
}
.diff-easy { color: #16a34a; border-color: #16a34a; background: rgba(22, 163, 74, 0.1); }
.diff-moderate { color: #eab308; border-color: #eab308; background: rgba(234, 179, 8, 0.1); }
.diff-hard { color: #f97316; border-color: #f97316; background: rgba(249, 115, 22, 0.12); }
.diff-expert {
  color: #fef2f2;
  border-color: #ef4444;
  background: linear-gradient(90deg, #b91c1c, #ef4444);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4);
}

/* Type badges (drag strip, etc.) */
.type-badge {
  display: inline-block;
  padding: 1px 7px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 999px;
  border: 1px solid;
}
.tag-drag-strip {
  color: #f0f9ff;
  border-color: #3b82f6;
  background: linear-gradient(90deg, #1e40af, #3b82f6);
}
@keyframes poi-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.poi-label {
  margin-left: 8px;
  background: rgba(11, 16, 21, 0.92);
  color: #fef2f2;
  border: 1px solid #ef4444;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  user-select: none;
  opacity: 0;
  transform: translateX(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.poi-wrap:hover .poi-label {
  opacity: 1;
  transform: translateX(0);
}
.poi-wrap:has(.poi-donut) .poi-label { border-color: #d946ef; color: #fdf4ff; }
.poi-wrap:has(.poi-vista) .poi-label { border-color: #0ea5e9; color: #f0f9ff; }
.poi-wrap:has(.poi-golf) .poi-label { border-color: #16a34a; color: #f0fdf4; }

/* Warning popup styling for crash / hazard POIs */
.leaflet-popup.popup-warning .leaflet-popup-content-wrapper {
  background: #1a0e0e;
  border: 1px solid #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2), 0 10px 30px rgba(0, 0, 0, 0.7);
}
.leaflet-popup.popup-warning .leaflet-popup-tip {
  background: #1a0e0e;
  border: 1px solid #ef4444;
}
.poi-warning {
  margin: -2px -2px 10px;
  padding: 8px 12px;
  background: linear-gradient(90deg, #7f1d1d, #b91c1c);
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid #ef4444;
}
.poi-warning-tag {
  color: #fef2f2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.poi-warning-sub {
  color: #fecaca;
  font-size: 11px;
  margin-top: 2px;
  font-weight: 600;
}

/* Leaflet overrides */
.leaflet-container {
  background: #0e1620;
  font-family: inherit;
}
.leaflet-popup-content-wrapper {
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
}
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-content { margin: 12px 14px; font-size: 13px; }
.leaflet-popup-content strong { display: block; margin-bottom: 4px; font-size: 14px; }
.leaflet-popup-content a { color: var(--accent); }
.leaflet-control-attribution {
  background: rgba(11, 16, 21, 0.8) !important;
  color: var(--text-dim) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--text) !important; }
.leaflet-control-zoom a {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--panel-2) !important;
}

/* Mobile */
@media (max-width: 720px) {
  :root { --sidebar-w: 100vw; --tabs-h: 44px; }
  #app-tabs { padding: 0 4px; gap: 2px; }
  .app-tab { padding: 0 12px; font-size: 12px; }
  .app-tab-label { display: inline; }
  #sidebar {
    height: 55vh;
    top: auto;
    bottom: 0;
    width: 100vw;
    border-right: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    transform: translateY(0);
  }
  #sidebar.collapsed {
    transform: translateY(calc(55vh - 60px));
  }
  #map {
    left: 0;
    bottom: 0;
  }
  #sidebar-toggle {
    top: calc(var(--tabs-h) + 10px);
    left: 14px;
  }
  #sidebar.collapsed ~ #sidebar-toggle { left: 14px; }
  #detail-panel {
    width: calc(100vw - 32px);
  }
}

/* ─── Cesium 3D viewer overrides ──────────────────────────── */
/* Make the Cesium widget fill our #map container exactly. */
.cesium-viewer { width: 100% !important; height: 100% !important; }
.cesium-widget, .cesium-widget canvas { width: 100% !important; height: 100% !important; }

/* HUD — coords readout + reset button overlaid on the 3D viewport */
#hud-3d {
  position: fixed;
  bottom: 36px;
  left: calc(var(--sidebar-w) + 14px);
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 10;
  pointer-events: none;
  transition: left 0.25s ease;
}
#sidebar.collapsed ~ #hud-3d { left: 14px; }
.hud-btn {
  pointer-events: auto;
  background: rgba(11, 16, 21, 0.85);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font: 600 12px system-ui;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.hud-btn:hover { background: rgba(11, 16, 21, 0.95); border-color: var(--accent); }
.hud-coords {
  background: rgba(11, 16, 21, 0.7);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font: 11px ui-monospace, "SF Mono", monospace;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}
@media (max-width: 720px) {
  #hud-3d { bottom: auto; top: calc(var(--tabs-h) + 60px); left: 14px; }
}

/* Help overlay (3D shortcut sheet) */
.help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 16, 21, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
}
.help-overlay.open { display: flex; }
.help-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 28px;
  max-width: 460px;
  width: calc(100vw - 32px);
  position: relative;
  color: var(--text);
}
.help-card h3 { margin: 0 0 14px 0; font-size: 16px; }
.help-close {
  position: absolute; top: 10px; right: 14px;
  background: none; border: none; color: var(--text-dim);
  font-size: 22px; cursor: pointer;
}
.help-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.help-table td { padding: 6px 4px; vertical-align: middle; }
.help-table td:first-child { width: 130px; color: var(--text-dim); }
.help-table kbd {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font: 11px ui-monospace, monospace;
  color: var(--text);
}
.help-tip { margin-top: 14px; font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* Hide the Cesium ion credit/logo — legally OK because we're using Esri
   imagery and Esri terrain, not Cesium Ion services. Esri's attribution is
   kept in the credit text bar. */
.cesium-credit-logoContainer { display: none !important; }
.cesium-credit-textContainer { color: rgba(229, 231, 235, 0.7); }
.cesium-widget-credits { font-size: 10px; }

/* Customization slider in the sidebar */
.range-row {
  display: flex; align-items: center; gap: 10px; padding: 4px 0;
}
.range-row label { font-size: 11px; color: var(--text-dim); min-width: 90px; }
.range-row input[type="range"] {
  flex: 1; height: 4px; accent-color: var(--accent);
}
.range-val { font: 11px ui-monospace, monospace; color: var(--text); min-width: 38px; text-align: right; }

/* Compass — small N indicator that rotates with the camera heading */
#compass-3d {
  position: fixed;
  top: 78px;
  right: 18px;
  width: 56px;
  height: 56px;
  z-index: 8;
  cursor: pointer;
  pointer-events: auto;
}
.compass-ring {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: rgba(11, 16, 21, 0.7);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  position: relative;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.compass-needle {
  width: 4px; height: 24px;
  background: linear-gradient(to bottom, #ef4444 0%, #ef4444 50%, #cbd5e1 50%, #cbd5e1 100%);
  border-radius: 2px;
  position: relative;
  transform-origin: center center;
  transition: transform 0.18s ease-out;
}
.compass-n {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font: bold 11px system-ui; color: var(--text);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.compass-sun {
  position: absolute;
  top: 50%; left: 50%;
  font-size: 13px;
  pointer-events: none;
  /* set via inline transform from JS — orbits at radius ~22px */
  transition: transform 0.18s ease-out, opacity 0.18s ease-out;
  text-shadow: 0 0 4px rgba(0,0,0,0.7);
}
@media (max-width: 720px) { #compass-3d { top: 64px; right: 12px; width: 44px; height: 44px; } }

/* Fly-route button in the detail panel */
.btn.fly-route {
  background: var(--accent);
  color: #fff;
  border: none;
}
.btn.fly-route:hover { filter: brightness(1.1); }

/* Measure mode cursor + tool active state */
body.measure-mode .cesium-widget canvas { cursor: crosshair !important; }
.chip.toggle.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Mini-map — small Leaflet 2D map showing the camera footprint */
#minimap-wrap {
  position: fixed;
  bottom: 36px;
  right: 18px;
  z-index: 8;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  background: rgba(11,16,21,0.85);
  transition: width 0.25s ease, height 0.25s ease, opacity 0.25s ease;
  width: 220px; height: 180px;
}
#minimap-wrap.collapsed { width: 36px; height: 36px; }
#minimap-wrap.collapsed #minimap { display: none; }
#minimap { width: 100%; height: 100%; }
#minimap-toggle {
  position: absolute; top: 4px; right: 4px;
  z-index: 9; padding: 2px 8px; font-size: 14px;
  background: rgba(11,16,21,0.85);
}
#minimap-wrap.collapsed #minimap-toggle { top: 4px; right: 4px; }
@media (max-width: 720px) { #minimap-wrap { display: none; } }

/* Camera-footprint polygon style on the mini-map */
.minimap-footprint {
  fill: #f97316;
  fill-opacity: 0.18;
  stroke: #f97316;
  stroke-width: 1.5;
}

/* Heart favorite button on each route card */
.fav-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  margin-right: 4px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.fav-btn:hover { color: #f87171; transform: scale(1.15); }
.fav-btn.fav { color: #ef4444; }
.route-card .row { display: flex; align-items: center; gap: 6px; }
.route-card .row .name { flex: 1; }

/* Search box at the top of the sidebar */
.route-search {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px;
  font: 13px system-ui;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.18s ease;
}
.route-search:focus { border-color: var(--accent); }
.route-search::placeholder { color: var(--text-dim); }

/* Compare panel — appears when 2+ routes are shift-clicked */
.compare-panel {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  background: rgba(11,16,21,0.95);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  max-width: calc(100vw - 80px);
  overflow-x: auto;
}
.compare-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-size: 13px;
}
.compare-head button {
  background: none; border: none; color: var(--text-dim);
  font-size: 18px; cursor: pointer;
}
.compare-table {
  border-collapse: collapse;
  width: 100%;
}
.compare-table th, .compare-table td {
  padding: 6px 12px;
  font-size: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th { color: var(--text-dim); font-weight: 600; }
.compare-color {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 2px; margin-right: 6px; vertical-align: middle;
}
.compare-tip { margin-top: 8px; font-size: 11px; color: var(--text-dim); }

.route-card.compare-selected {
  border-left: 3px solid var(--accent);
  background: rgba(249, 115, 22, 0.08);
}
.route-card.keyboard-focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Stats summary above the route list */
.route-stats {
  padding: 8px 14px;
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(0,0,0,0.18);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.route-stats .stat strong {
  color: var(--text);
  font-weight: 600;
}

/* Empty-state when no routes match filters */
.route-list-empty {
  padding: 18px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
.route-list-empty .clear-filters {
  display: inline-block;
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.route-list-empty .clear-filters:hover { filter: brightness(1.1); }

/* Mobile-only refinements for the 3D viewer */
@media (max-width: 720px) {
  .compare-panel {
    bottom: 60vh;
    max-width: calc(100vw - 24px);
    padding: 10px 12px;
    font-size: 11px;
  }
  .compare-table th, .compare-table td { padding: 4px 6px; }
  #hud-3d {
    flex-wrap: wrap;
    bottom: calc(55vh + 10px);
    left: 14px;
    right: 14px;
    pointer-events: none;
  }
  #hud-coords, #hud-measure { font-size: 10px; padding: 4px 8px; }
  .hud-btn { padding: 5px 10px; font-size: 11px; }
}

/* Cinematic mode — hide every overlay so the 3D view fills the screen */
body.cinematic #sidebar,
body.cinematic #app-tabs,
body.cinematic #hud-3d,
body.cinematic #compass-3d,
body.cinematic #minimap-wrap,
body.cinematic #detail-panel,
body.cinematic #sidebar-toggle,
body.cinematic .cesium-viewer-toolbar,
body.cinematic .cesium-credit-textContainer { display: none !important; }
body.cinematic #map { left: 0 !important; top: 0 !important; }
body.cinematic::after {
  content: "Press H to exit cinematic mode";
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(11,16,21,0.85); color: var(--text-dim);
  padding: 6px 14px; border-radius: 6px; font: 11px system-ui;
  border: 1px solid var(--border); z-index: 100;
  pointer-events: none;
}

/* Tour mode banner */
.tour-controls {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(11,16,21,0.92);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 8px 16px;
  font: 600 12px system-ui;
  color: var(--text);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
.tour-controls.open { display: flex; }
#tour-label { white-space: nowrap; }

/* Push the Cesium toolbar (home, baselayer, scene-mode etc.) clear of the
   sidebar-toggle hamburger which sits top-left. */
.cesium-viewer-toolbar {
  top: 14px;
  right: 14px;
}

/* Cesium info-box (popup) — restyle to match the dark UI */
.cesium-infoBox {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
}
.cesium-infoBox-title { background: rgba(0,0,0,0.4); color: var(--text); }
.cesium-infoBox iframe { background: var(--panel); }

/* Credit container — keep the OSM/Bing/Cesium attribution legible without
   blocking too much of the bottom of the viewport. */
.cesium-credit-lightbox-overlay { background: rgba(0,0,0,0.7); }
