/*
 * GeoSnow Beta — layout & theme (aligned with alpha palette)
 * Breakpoint: 768px — desktop vs mobile shell
 */

/* -------------------------------------------------------------------------- */
/* Design tokens (alpha: #0072ce header gradient, dark slate sidebar)         */
/* -------------------------------------------------------------------------- */

:root {
  --color-primary: #0072ce;
  --color-primary-dark: #005a9e;
  --color-ink: #0b1120;
  --color-ink-deep: #020617;
  --color-surface: #ffffff;
  --color-muted: #64748b;
  --color-text: #0f172a;
  --color-text-inverse: #e5e7eb;
  --color-accent-soft: #e5f0ff;
  --color-border: rgba(148, 163, 184, 0.45);
  --color-border-strong: rgba(148, 163, 184, 0.65);
  --header-gradient: linear-gradient(135deg, #0072ce 0%, #0b1120 100%);
  --sidebar-gradient: linear-gradient(
    180deg,
    var(--color-ink) 0%,
    var(--color-ink-deep) 55%,
    #000000 100%
  );
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 30px rgba(15, 23, 42, 0.12);
  --shadow-nav: 0 4px 24px rgba(15, 23, 42, 0.18);
  --header-h: 56px;
  --panel-w: 300px;
  --menu-w: 300px;
  --sheet-peek: min(30vh, 210px);
  --sheet-half: 50vh;
  --sheet-min-dock: 80px;
  --sheet-expanded: min(72vh, 560px);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  /* Text sizes: defaults until config.yaml typography block loads (ui.R) */
  --text-map-tooltip: 0.875rem;
  --text-map-tooltip-sub: 0.8125rem;
  --text-map-popup-strong: 0.9375rem;
  --text-card-section: 0.75rem;
  --text-card-title: 1rem;
  --text-card-body: 0.875rem;
  --text-card-label: 0.6875rem;
  --text-card-badge: 0.8125rem;
  --text-brand: 1.0625rem;
  --text-welcome-title: 1.25rem;
  --text-welcome-body: 0.875rem;
  --text-welcome-button: 0.875rem;
  --text-mode-tooltip: 0.625rem;
  --text-menu-label: 0.6875rem;
  --text-menu-hint: 0.6875rem;
  --text-search-input: 0.8125rem;
  --text-search-item-title: 0.8125rem;
  --text-search-item-meta: 0.6875rem;
  --text-search-empty: 0.75rem;
  --text-style-switcher: 0.75rem;
  --text-panel-empty-title: 1rem;
}

/* -------------------------------------------------------------------------- */
/* Reset & base                                                                */
/* -------------------------------------------------------------------------- */

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

html,
body {
  height: 100%;
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-ink);
  -webkit-font-smoothing: antialiased;
}

/* Shiny root */
.container-fluid {
  padding: 0;
  margin: 0;
  max-width: none;
  height: 100%;
}

/* -------------------------------------------------------------------------- */
/* App shell                                                                   */
/* -------------------------------------------------------------------------- */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-surface);
  position: relative;
}

/* Welcome overlay (first visit) */
.welcome-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(11, 17, 32, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  pointer-events: none;
}

.welcome-overlay.is-visible {
  display: flex;
  pointer-events: auto;
}

.welcome-overlay.is-dismissed {
  display: none !important;
}

.welcome-panel {
  max-width: 28rem;
  width: 100%;
  padding: 1.35rem 1.5rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  cursor: default;
  pointer-events: auto;
}

.welcome-title {
  margin: 0 0 0.85rem;
  font-size: var(--text-welcome-title);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-text);
  line-height: 1.25;
}

.welcome-body {
  margin: 0 0 0.75rem;
  font-size: var(--text-welcome-body);
  line-height: 1.55;
  color: var(--color-text);
}

.welcome-body:last-of-type {
  margin-bottom: 1rem;
}

.welcome-continue-btn {
  display: block;
  width: 100%;
  margin: 0.25rem 0 0;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-welcome-button);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  box-shadow: 0 4px 14px rgba(0, 114, 206, 0.35);
  cursor: pointer;
}

.welcome-continue-btn:hover {
  filter: brightness(1.05);
}

.welcome-continue-btn:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Header                                                                      */
/* -------------------------------------------------------------------------- */

.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem 0 1rem;
  background: linear-gradient(
    180deg,
    rgba(11, 17, 32, 0.92) 0%,
    rgba(11, 17, 32, 0.55) 70%,
    transparent 100%
  );
  color: var(--color-text-inverse);
  box-shadow: none;
  z-index: 20;
  pointer-events: none;
}

.app-header .brand,
.app-header .header-mode-nav,
.app-header .menu-btn {
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo {
  display: block;
  height: 32px;
  width: auto;
  border-radius: 6px;
}

.brand-text {
  font-size: var(--text-brand);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.header-mode-nav {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.header-mode-nav::-webkit-scrollbar {
  display: none;
}

.mode-btn--icon {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.mode-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.mode-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.mode-btn-tooltip {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  padding: 0.3rem 0.55rem;
  font-size: var(--text-mode-tooltip);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: #e5f0ff;
  background: rgba(11, 17, 32, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  z-index: 30;
}

@media (hover: hover) and (pointer: fine) {
  .mode-btn--icon:hover .mode-btn-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

.mode-btn--icon:focus-visible .mode-btn-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mode-btn--icon:focus-visible {
  outline: 2px solid rgba(229, 240, 255, 0.9);
  outline-offset: 2px;
}

.style-switcher {
  appearance: none;
  background-color: rgba(15, 23, 42, 0.72);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23e5f0ff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  background-size: 8px 5px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: var(--radius-sm);
  color: #e5f0ff;
  font-family: var(--font-sans);
  font-size: var(--text-style-switcher);
  font-weight: 600;
  padding: 0.35rem 1.8rem 0.35rem 0.7rem;
  cursor: pointer;
  height: 36px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.style-switcher:hover {
  background-color: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.7);
}

.style-switcher option {
  background: #0b1120;
  color: #e5f0ff;
}

.menu-btn {
  display: inline-flex;
  flex-shrink: 0;
  margin-left: auto;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-icon {
  font-size: 1.25rem;
}

/* -------------------------------------------------------------------------- */
/* Main layout — desktop: 3 columns                                            */
/* -------------------------------------------------------------------------- */

.app-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr var(--panel-w);
  grid-template-rows: 1fr;
  min-height: 0;
}

.map-stack {
  position: relative;
  min-height: 0;
  min-width: 0;
  background: #e8eef5;
}

/* -------------------------------------------------------------------------- */
/* Header menu drawer (search + map style)                                     */
/* -------------------------------------------------------------------------- */

.header-menu {
  display: none;
  position: absolute;
  top: var(--header-h);
  right: 0;
  z-index: 25;
  width: min(var(--menu-w), calc(100% - 1rem));
  max-height: min(72vh, 520px);
  overflow: hidden;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem 1rem 1rem;
  background: rgba(11, 17, 32, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-top: none;
  border-radius: 0 0 0 var(--radius-md);
  box-shadow: var(--shadow-nav);
  pointer-events: auto;
}

.header-menu.is-open {
  display: flex;
}

.header-menu-label {
  margin: 0 0 0.35rem;
  font-size: var(--text-menu-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(229, 240, 255, 0.75);
}

.header-menu-hint {
  margin: 0.35rem 0 0;
  font-size: var(--text-menu-hint);
  color: #94a3b8;
  line-height: 1.4;
}

.header-menu-section--search {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.header-menu-section--search .search-box {
  min-height: 0;
}

.header-menu .search-results {
  max-height: min(40vh, 280px);
}

.header-menu .style-switcher {
  width: 100%;
}

.mode-btn {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.5);
  color: #cbd5f5;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.mode-btn:hover {
  background: rgba(0, 114, 206, 0.25);
  border-color: rgba(0, 114, 206, 0.55);
  color: #fff;
}

.mode-btn.active {
  background: linear-gradient(135deg, rgba(0, 114, 206, 0.85), rgba(11, 17, 32, 0.95));
  border-color: rgba(0, 114, 206, 0.9);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 114, 206, 0.35);
}

.search-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-input {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(2, 6, 23, 0.55);
  color: #e5f0ff;
  padding: 0.55rem 0.65rem;
  font-size: var(--text-search-input);
  outline: none;
}

.search-input::placeholder {
  color: rgba(203, 213, 245, 0.65);
}

.search-input:focus {
  border-color: rgba(0, 114, 206, 0.75);
  box-shadow: 0 0 0 3px rgba(0, 114, 206, 0.18);
}

.search-results {
  display: none;
  max-height: 260px;
  overflow: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.82);
}

.search-results.is-open {
  display: block;
}

.search-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  color: #e5f0ff;
  padding: 0.6rem 0.7rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.search-item:hover {
  background: rgba(0, 114, 206, 0.18);
}

.search-item-title {
  font-size: var(--text-search-item-title);
  font-weight: 700;
  line-height: 1.25;
}

.search-item-meta {
  margin-top: 0.15rem;
  font-size: var(--text-search-item-meta);
  color: rgba(203, 213, 245, 0.72);
  line-height: 1.25;
}

.search-empty {
  padding: 0.65rem 0.7rem;
  font-size: var(--text-search-empty);
  color: rgba(203, 213, 245, 0.75);
}

/* Mapbox mounts its canvas as position:absolute inside #map */
.map-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #dfe9f3 0%, #cfd9e8 45%, #b8c9dc 100%);
  overflow: hidden;
}

/* Placeholder grid — shown before Mapbox loads */
.map-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

/* Once Mapbox fires 'load', JS adds .map-loaded — remove the placeholder */
.map-container.map-loaded::before {
  opacity: 0;
  pointer-events: none;
}

.map-container.map-boot-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.map-boot-error-inner {
  max-width: 22rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  color: var(--color-text);
  font-size: var(--text-card-body);
  line-height: 1.45;
}

.map-boot-error-inner strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: var(--text-card-title);
}

/* -------------------------------------------------------------------------- */
/* Right panel (desktop)                                                       */
/* -------------------------------------------------------------------------- */

.panel-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem;
  gap: 0.75rem;
  background: #f8fafc;
  border-left: 1px solid rgba(148, 163, 184, 0.35);
  overflow: auto;
  z-index: 5;
}

.card-surface {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.panel-empty {
  padding: 1.5rem 1.25rem;
  text-align: left;
}

.panel-empty-title {
  margin: 0 0 0.5rem;
  font-size: var(--text-panel-empty-title);
  font-weight: 700;
  color: var(--color-text);
}

.panel-empty-hint {
  margin: 0;
  font-size: var(--text-card-body);
  color: var(--color-muted);
  line-height: 1.5;
}

.mode-empty-hint {
  margin: 0;
  font-size: var(--text-card-body);
  color: var(--color-muted);
  line-height: 1.5;
}

.mode-empty-hint--with-sample {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.mode-hint-sample {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mode-hint-sample--ski svg {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.mode-hint-sample--airport,
.mode-hint-sample--town {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.mode-hint-sample--airport {
  background: #dc2626;
}

.mode-hint-sample--town {
  background: #1e3a8a;
}

.mode-hint-sample--rail {
  position: relative;
  width: 1.75rem;
  height: 1rem;
}

.mode-hint-rail-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: rgba(55, 65, 81, 0.55);
}

.mode-hint-rail-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.65rem;
  height: 0.65rem;
  margin: -0.325rem 0 0 -0.325rem;
  border-radius: 50%;
  background: #2a9d8f;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.panel-filled-heading,
.sheet-filled-heading {
  margin: 0 0 0.75rem;
  font-size: var(--text-card-section);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
}

.panel-cards,
.sheet-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.info-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.info-card-title {
  margin: 0 0 0.4rem;
  font-size: var(--text-card-title);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.info-card-meta {
  margin: 0;
  font-size: var(--text-card-body);
  color: var(--color-muted);
  line-height: 1.45;
}

.is-hidden {
  display: none !important;
}

/* -------------------------------------------------------------------------- */
/* Bottom sheet (mobile) — default closed                                      */
/* -------------------------------------------------------------------------- */

.bottom-sheet {
  display: none;
}

.sheet-backdrop {
  display: none;
}

/* -------------------------------------------------------------------------- */
/* Mobile layout (<768px)                                                      */
/* -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .app-shell {
    position: fixed;
    inset: 0;
    height: 100%;
    height: 100dvh;
  }

  .app-main {
    display: block;
    position: relative;
    height: 100%;
    min-height: 0;
  }

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

  .mode-btn--icon {
    width: 36px;
    height: 36px;
  }

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

  .panel-right {
    display: none;
  }

  .header-menu {
    width: min(var(--menu-w), calc(100vw - 0.75rem));
    max-height: min(65vh, 480px);
  }

  /* Bottom sheet */
  .bottom-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    pointer-events: none;
  }

  .bottom-sheet.is-open {
    /* Keep the map clickable even when sheet is open */
    pointer-events: none;
  }

  .sheet-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    /* No dimming overlay; allow direct map interaction */
    background: transparent;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
  }

  .bottom-sheet.is-open .sheet-backdrop {
    opacity: 0;
  }

  .sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    height: var(--sheet-h, var(--sheet-peek));
    min-height: var(--sheet-min-dock);
    max-height: var(--sheet-half);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 0 0 max(0.75rem, env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition:
      transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.2);
    pointer-events: auto;
    touch-action: none;
    overflow: hidden;
  }

  .sheet-panel.is-dragging {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    transition-property: transform;
  }

  .bottom-sheet.is-open .sheet-panel {
    transform: translateY(0);
  }

  .sheet-handle {
    flex: 0 0 auto;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0.65rem 0 0.35rem;
    cursor: grab;
    touch-action: none;
  }

  .sheet-handle:active {
    cursor: grabbing;
  }

  .sheet-handle-bar {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto;
    border-radius: var(--radius-pill);
    background: rgba(148, 163, 184, 0.55);
  }

  .sheet-body {
    flex: 1;
    overflow: hidden;
    padding: 0 1rem 0.5rem;
    min-height: 0;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .sheet-body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .sheet-empty {
    padding: 0.25rem 0 0.5rem;
  }

  .sheet-placeholder-title {
    margin: 0 0 0.35rem;
    font-size: var(--text-card-title);
    font-weight: 700;
    color: var(--color-text);
  }

  .sheet-placeholder-hint {
    margin: 0;
    font-size: var(--text-card-body);
    color: var(--color-muted);
    line-height: 1.45;
  }

}

/* -------------------------------------------------------------------------- */
/* Desktop layout (typography from config.yaml)                                */
/* -------------------------------------------------------------------------- */

@media (min-width: 768px) {
  .panel-right {
    padding: 1.15rem 1.25rem;
  }

  .panel-empty {
    padding: 1.65rem 1.4rem;
  }

  .info-card {
    padding: 1.1rem 1.2rem;
  }
}

/* -------------------------------------------------------------------------- */
/* Mapbox hover popup                                                          */
/* -------------------------------------------------------------------------- */

.gs-hover-popup .mapboxgl-popup-content {
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--text-map-tooltip);
  line-height: 1.45;
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
  pointer-events: none;
}

.gs-hover-popup .mapboxgl-popup-content strong {
  font-size: var(--text-map-popup-strong);
  font-weight: 700;
}

.gs-hover-popup .mapboxgl-popup-content span {
  font-size: var(--text-map-tooltip-sub);
  color: var(--color-muted);
}

.gs-hover-popup .mapboxgl-popup-tip {
  display: none;
}

/* -------------------------------------------------------------------------- */
/* Info card: label/value rows (used for ski area group info)                 */
/* -------------------------------------------------------------------------- */

.info-card--ski .info-card-meta-block {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.info-card-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: var(--text-card-body);
}

.info-card-label {
  flex: 0 0 6rem;
  font-size: var(--text-card-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-muted);
}

.info-card-value {
  font-size: var(--text-card-body);
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.35;
}

/* Badge: "X related areas highlighted" */
.info-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-card-badge);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.info-badge--related {
  background: rgba(229, 160, 0, 0.14);
  color: #7a5000;
  border: 1px solid rgba(229, 160, 0, 0.45);
}

/* Map legends (airport isochrones, etc.) */
.map-legend {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--color-border);
  background: rgba(248, 250, 252, 0.95);
}

.map-legend-title {
  margin: 0 0 0.45rem;
  font-size: var(--text-card-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.map-legend-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.map-legend-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-card-body);
  color: var(--color-text);
}

.panel-empty .map-legend,
.sheet-empty .map-legend {
  margin-top: 0.85rem;
}

.map-legend-swatch,
.route-rank-swatch {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 3px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.info-card--airport-route {
  padding-left: 0.85rem;
}

.info-card-route-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.info-card-route-head .info-card-title {
  margin: 0;
  flex: 1;
}

.info-card-meta--route-rank {
  margin: 0.15rem 0 0.5rem 1.65rem;
}

.info-card-value--with-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.route-rank-swatch--inline {
  width: 0.85rem;
  height: 0.85rem;
}

.info-card--rail-station {
  padding-left: 0.85rem;
}

