:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --border: #dce3dc;
  --text: #1b271e;
  --muted: #58695c;
  --accent: #1d6b45;
  --accent-hover: #155234;
  --accent-soft: #e7f3ec;
  --rail: #1e4d8c;
  --rail-soft: #e9f0fa;
  --open-bg: #e5f6eb;
  --open-fg: #136f38;
  --unknown-bg: #fff6df;
  --unknown-fg: #9a6500;
  --closed-bg: #fdeaea;
  --closed-fg: #b42318;
  --fav: #d97706;
  --fav-bright: #f59e0b;
  --fav-soft: #fffbeb;
  --fav-border: #fcd34d;
  --shadow: 0 2px 8px rgba(17, 34, 22, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
}

.mobile-only {
  display: none !important;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  z-index: 500;
}

.topbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-fav-header {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-fav-header .star-icon {
  color: var(--fav-bright);
  flex-shrink: 0;
}

.btn-fav-header:hover {
  background: var(--fav-soft);
  border-color: var(--fav-border);
}

.btn-fav-header[aria-pressed='true'] {
  background: var(--fav-soft);
  border-color: var(--fav-bright);
  color: #92400e;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.fav-count-badge {
  background: var(--fav-bright);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.brand-logo {
  font-size: 1.6rem;
  line-height: 1;
}

.brand h1 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 2px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.filter-bar {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}

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

.field label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}

.station-field {
  min-width: 240px;
  flex: 1 1 260px;
  max-width: 360px;
}

.origin-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}

.origin-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--rail-soft);
  color: var(--rail);
  border: 1px solid #c3d6f2;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.76rem;
  font-weight: 600;
}

.origin-chip button {
  background: none;
  border: none;
  color: var(--rail);
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  font-size: 0.9rem;
}

.origin-chip button:hover {
  color: #b42318;
}

.date-field {
  min-width: 145px;
}

.range-field {
  min-width: 165px;
}

input[type='text'],

  input[type='date'],
  select {
    height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    background: #fff;
    color: var(--text);
  }

  input[type='text']:focus,
    input[type='date']:focus,
    select:focus {
      outline: 2px solid rgba(29, 107, 69, 0.25);
      border-color: var(--accent);
    }

    .select-field {
      min-width: 145px;
    }

    .sort-control {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--muted);
      flex-shrink: 0;
    }

    .sort-control select {
      height: 28px;
      padding: 2px 8px;
      font-size: 0.8rem;
    }

    input[type='range'] {
      accent-color: var(--accent);
      cursor: pointer;
      height: 24px;
    }

    .autocomplete-wrap {
      position: relative;
    }

    .autocomplete-wrap input {
      width: 100%;
    }

    .suggestions {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      right: 0;
      margin: 0;
      padding: 4px;
      list-style: none;
      background: #fff;
      border: 1px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
      max-height: 280px;
      overflow-y: auto;
      z-index: 1200;
    }

    .suggestions li {
      padding: 8px 10px;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .suggestions li:hover,
    .suggestions li.active {
      background: var(--accent-soft);
    }

    .sugg-name {
      font-size: 0.88rem;
      font-weight: 600;
    }

    .sugg-meta {
      font-size: 0.74rem;
      color: var(--muted);
    }

    .toggles {
      display: flex;
      flex-direction: column;
      gap: 5px;
      justify-content: center;
      padding-bottom: 2px;
    }

    .checkbox-label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.8rem;
      color: var(--text);
      cursor: pointer;
      user-select: none;
    }

    .checkbox-label input {
      accent-color: var(--accent);
      width: 15px;
      height: 15px;
    }

    .checkbox-label code {
      background: #eef2ee;
      padding: 1px 4px;
      border-radius: 4px;
      font-size: 0.75rem;
    }

    .form-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .btn-primary {
      height: 36px;
      padding: 0 18px;
      border: none;
      border-radius: 8px;
      background: var(--accent);
      color: #fff;
      font-weight: 600;
      font-size: 0.9rem;
      cursor: pointer;
      transition: background 0.15s ease;
    }

    .btn-primary:hover:not(:disabled) {
      background: var(--accent-hover);
    }

    .btn-primary:disabled {
      opacity: 0.65;
      cursor: wait;
    }

    .btn-secondary {
      height: 36px;
      padding: 0 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface);
      color: var(--text);
      font-weight: 600;
      font-size: 0.85rem;
      cursor: pointer;
      align-items: center;
      gap: 5px;
    }

    .btn-secondary[aria-expanded='true'] {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    .btn-ghost {
      height: 36px;
      padding: 0 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: transparent;
      color: var(--muted);
      font-weight: 600;
      font-size: 0.82rem;
      cursor: pointer;
    }

    .btn-ghost:hover {
      background: #f1f4f1;
      color: var(--text);
    }

    .split-layout {
      flex: 1;
      min-height: 0;
      display: grid;
      grid-template-columns: minmax(360px, 47%) 1fr;
    }

    .results-pane {
      display: flex;
      flex-direction: column;
      min-height: 0;
      border-right: 1px solid var(--border);
      background: var(--bg);
    }

    .status-bar {
      padding: 10px 16px;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      font-size: 0.82rem;
      color: var(--muted);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .banner-info,
    .banner-error {
      margin: 10px 14px 0;
      padding: 9px 12px;
      border-radius: 8px;
      font-size: 0.82rem;
      line-height: 1.4;
    }

    .banner-info {
      background: #eaf3ff;
      border: 1px solid #c4dcfb;
      color: #16447a;
    }

    .banner-error {
      background: var(--closed-bg);
      border: 1px solid #f7c5c5;
      color: var(--closed-fg);
    }

    .results-list {
      flex: 1;
      overflow-y: auto;
      padding: 12px 14px 24px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .empty-state {
      text-align: center;
      padding: 40px 20px;
      color: var(--muted);
      background: var(--surface);
      border: 1px dashed var(--border);
      border-radius: 12px;
    }

    .search-progress {
      padding: 8px 14px 10px;
      background: #f3f8f4;
      border-bottom: 1px solid var(--border);
    }

    .search-progress[hidden] {
      display: none;
    }

    .search-progress-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--accent-dark, #165235);
    }

    .search-progress-spinner {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
      border: 2px solid rgba(29, 107, 69, 0.22);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: status-spin 0.75s linear infinite;
    }

    .search-progress-label {
      flex: 1;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .search-progress-percent {
      flex-shrink: 0;
      font-variant-numeric: tabular-nums;
      color: var(--muted);
    }

    .search-progress-track {
      position: relative;
      height: 6px;
      width: 100%;
      background: rgba(29, 107, 69, 0.14);
      border-radius: 999px;
      overflow: hidden;
    }

    .search-progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--accent), #2e9963);
      border-radius: 999px;
      transition: width 0.25s ease;
    }

    .search-progress.is-indeterminate .search-progress-fill {
      width: 35%;
      animation: progress-indeterminate 1.2s ease-in-out infinite;
    }

    @keyframes progress-indeterminate {
      0% {
        transform: translateX(-100%);
      }
      100% {
        transform: translateX(320%);
      }
    }

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

    .skeleton-card {
      cursor: default;
      pointer-events: none;
    }

    .skeleton-card:hover {
      border-color: var(--border);
    }

    .skeleton-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      margin-bottom: 10px;
    }

    .skeleton-chips {
      display: flex;
      gap: 6px;
      margin-top: 10px;
    }

    .skeleton-block {
      border-radius: 6px;
      background: linear-gradient(90deg, #ecefec 25%, #f6f8f6 50%, #ecefec 75%);
      background-size: 200% 100%;
      animation: skeleton-shimmer 1.4s ease-in-out infinite;
    }

    .skeleton-title {
      height: 18px;
      width: 58%;
    }

    .skeleton-badge {
      height: 22px;
      width: 72px;
      border-radius: 999px;
      flex-shrink: 0;
    }

    .skeleton-line {
      height: 13px;
      margin-bottom: 7px;
    }

    .skeleton-line.short {
      width: 45%;
    }

    .skeleton-line.medium {
      width: 78%;
    }

    .skeleton-chip {
      height: 20px;
      width: 84px;
      border-radius: 999px;
    }

    @keyframes skeleton-shimmer {
      0% {
        background-position: 200% 0;
      }
      100% {
        background-position: -200% 0;
      }
    }

    .camp-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 14px;
      box-shadow: var(--shadow);
      transition: border-color 0.15s ease, transform 0.1s ease;
      cursor: pointer;
    }

    .camp-card:hover,
    .camp-card.selected {
      border-color: var(--accent);
    }

    .camp-card.selected {
      box-shadow: 0 0 0 2px rgba(29, 107, 69, 0.2), var(--shadow);
    }

    .card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 10px;
    }

    .card-title-wrap {
      display: flex;
      align-items: baseline;
      gap: 7px;
      min-width: 0;
    }

    .rank-num {
      font-size: 0.75rem;
      font-weight: 700;
      color: var(--muted);
      flex-shrink: 0;
    }

    .card-title {
      margin: 0;
      font-size: 1rem;
      line-height: 1.3;
      word-break: break-word;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      padding: 3px 8px;
      border-radius: 999px;
      font-size: 0.74rem;
      font-weight: 700;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .badge-open {
      background: var(--open-bg);
      color: var(--open-fg);
    }

    .badge-unknown {
      background: var(--unknown-bg);
      color: var(--unknown-fg);
    }

    .badge-closed {
      background: var(--closed-bg);
      color: var(--closed-fg);
    }

    .card-route {
      margin-top: 8px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 10px;
      font-size: 0.86rem;
    }

    .pill-rail {
      background: var(--rail-soft);
      color: var(--rail);
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 600;
      font-size: 0.8rem;
    }

    .pill-dticket {
      background: #e2f5f2;
      color: #0b6b5d;
      border: 1px solid #b5e4dc;
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 0.76rem;
    }

    .pill-fernverkehr {
      background: #f3eafc;
      color: #6b21a8;
      border: 1px solid #dec6f8;
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 0.76rem;
    }

    .pill-dist {
      background: var(--accent-soft);
      color: var(--accent);
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 600;
      font-size: 0.8rem;
    }

    .pill-alt-route {
      background: #f0f4f8;
      color: #334e68;
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 500;
      font-size: 0.78rem;
    }

    .pill-total {
      background: #f7f3e6;
      color: #6b5200;
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 0.78rem;
    }

    .pill-score {
      color: var(--muted);
      font-size: 0.75rem;
      margin-left: auto;
    }

    .card-meta {
      margin-top: 8px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      font-size: 0.76rem;
      color: var(--muted);
    }

    .tag-chip {
      background: #f1f4f1;
      border: 1px solid #e2e7e2;
      padding: 2px 7px;
      border-radius: 6px;
    }

    .tag-chip.tents-yes {
      background: #eaf7ef;
      border-color: #bfe4cd;
      color: #156334;
    }

    .tag-chip.tents-no {
      background: #fdeaea;
      border-color: #f4c2c2;
      color: #a6221b;
    }

    .card-actions {
      margin-top: 10px;
      padding-top: 8px;
      border-top: 1px solid #eef2ee;
      display: flex;
      flex-wrap: wrap;
      gap: 8px 12px;
      font-size: 0.8rem;
    }

    .card-actions a,
    .card-actions button {
      color: var(--rail);
      text-decoration: none;
      font-weight: 600;
      background: none;
      border: none;
      padding: 0;
      font-size: inherit;
      cursor: pointer;
    }

    .card-actions a:hover,
    .card-actions button:hover {
      text-decoration: underline;
    }

    .shop-row {
      margin-top: 7px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      font-size: 0.76rem;
    }

    .shop-chip {
      background: #edf6ee;
      border: 1px solid #c6e2c9;
      color: #1c5a27;
      padding: 2px 8px;
      border-radius: 6px;
    }

    .shop-chip.on-way {
      background: #e1f5fe;
      border-color: #9ed7f5;
      color: #0b537a;
      font-weight: 600;
    }

    .poi-btn {
      font-family: inherit;
      font-size: inherit;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: transform 0.1s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    }

    .poi-btn:hover {
      filter: brightness(0.96);
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    }

    .poi-btn.active {
      outline: 2px solid var(--accent);
      outline-offset: 1px;
    }

    .poi-detail-box {
      margin-top: 8px;
      padding: 8px 10px;
      background: #f5faf6;
      border: 1px solid #c8e3cf;
      border-radius: 8px;
      font-size: 0.78rem;
      line-height: 1.45;
    }

    .poi-detail-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 8px;
    }

    .poi-detail-meta {
      margin-top: 4px;
      color: var(--muted);
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .poi-detail-links {
      margin-top: 6px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px 12px;
      align-items: center;
    }

    .poi-detail-links a,
    .poi-detail-links button {
      color: var(--rail);
      text-decoration: none;
      font-weight: 600;
      background: none;
      border: none;
      padding: 0;
      font-size: inherit;
      cursor: pointer;
    }

    .poi-detail-links a:hover,
    .poi-detail-links button:hover {
      text-decoration: underline;
    }

    .poi-close-btn {
      background: none;
      border: none;
      color: var(--muted);
      cursor: pointer;
      font-size: 1rem;
      line-height: 1;
      padding: 0 2px;
    }

    .poi-map-pin {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: #ffffff;
      border: 2px solid #16a34a;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      line-height: 1;
    }

    .poi-map-pin.poi-supermarket {
      border-color: #0284c7;
    }

    .poi-map-pin.poi-bakery {
      border-color: #d97706;
    }

    .poi-map-pin.poi-vegan {
      border-color: #16a34a;
    }

    .vegan-badge {
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 0.75rem;
    }

    .vegan-badge.vegan-green {
      background: #dcfce7;
      border: 1px solid #86efac;
      color: #14532d;
    }

    .vegan-badge.vegan-yellow {
      background: #fef9c3;
      border: 1px solid #fde047;
      color: #713f12;
    }

    .vegan-chip {
      background: #f0fdf4;
      border: 1px solid #bbf7d0;
      color: #166534;
      padding: 2px 8px;
      border-radius: 6px;
    }

    .vegan-chip.vegan-only {
      background: #dcfce7;
      border-color: #4ade80;
      color: #14532d;
      font-weight: 600;
    }

    .vegan-chip.vegan-vegetarian {
      background: #ecfccb;
      border-color: #bef264;
      color: #365314;
    }

    .curated-chip {
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: #1e40af;
      font-weight: 600;
    }

    .curated-box {
      margin-top: 8px;
      padding: 8px 10px;
      background: #f8fafc;
      border: 1px solid #cbd5e1;
      border-left: 3px solid #2563eb;
      border-radius: 8px;
      font-size: 0.77rem;
      line-height: 1.4;
      color: #1e293b;
    }

    .curated-box .curated-list {
      margin: 4px 0 0;
      padding-left: 16px;
    }

    .curated-box .curated-note {
      margin-top: 4px;
      color: #475569;
    }

    .curated-box .curated-sources {
      margin-top: 4px;
      font-size: 0.73rem;
      color: #64748b;
    }

    .curated-box a {
      color: #1d4ed8;
    }

    .price-box {
      margin-top: 8px;
      padding: 8px 10px;
      background: #fafaf7;
      border: 1px solid #e4e2d5;
      border-radius: 8px;
      font-size: 0.78rem;
      line-height: 1.4;
    }

    .price-box ul {
      margin: 4px 0 0;
      padding-left: 16px;
    }

    .price-box li {
      margin: 2px 0;
    }

    .map-pane {
      position: relative;
      min-height: 360px;
    }

    #map {
      width: 100%;
      height: 100%;
    }

    .map-legend {
      position: absolute;
      bottom: 18px;
      right: 12px;
      z-index: 450;
      background: rgba(255, 255, 255, 0.94);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 8px 12px;
      box-shadow: var(--shadow);
      font-size: 0.76rem;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .legend-item {
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .dot {
      width: 11px;
      height: 11px;
      border-radius: 50%;
      display: inline-block;
      border: 1.5px solid #fff;
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
    }

    .dot-origin {
      background: #1e4d8c;
      width: 13px;
      height: 13px;
    }

    .dot-station {
      background: #4b6584;
    }

    .dot-open {
      background: #18a34a;
    }

    .dot-unknown {
      background: #e59c00;
    }

    .dot-closed {
      background: #dc2626;
    }

    .dot-poi {
      background: #0ea5e9;
    }

    .dot-fav {
      background: #18a34a;
      border: 2px solid #f59e0b;
      box-shadow: 0 0 0 1px rgba(180, 83, 9, 0.35);
    }

    /* View switcher & Favorites management */
    .view-switcher {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      padding: 8px 12px;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
    }

    .view-tab {
      height: 34px;
      padding: 0 12px;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--bg);
      color: var(--muted);
      font-weight: 600;
      font-size: 0.83rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .view-tab:hover {
      background: #ebf0ec;
      color: var(--text);
    }

    .view-tab.active {
      background: var(--accent-soft);
      border-color: var(--accent);
      color: var(--accent);
    }

    #view-tab-favorites.active {
      background: var(--fav-soft);
      border-color: var(--fav-bright);
      color: #92400e;
    }

    .tab-count {
      background: rgba(0, 0, 0, 0.08);
      color: inherit;
      border-radius: 999px;
      padding: 1px 7px;
      font-size: 0.72rem;
      font-weight: 700;
    }

    .view-tab.active .tab-count {
      background: rgba(29, 107, 69, 0.15);
    }

    #view-tab-favorites.active .tab-count {
      background: rgba(245, 158, 11, 0.22);
    }

    .favorites-toolbar {
      padding: 10px 14px;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .favorites-toolbar[hidden] {
      display: none !important;
    }

    .fav-toolbar-top {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .fav-search-input {
      flex: 1 1 200px;
      height: 32px;
      padding: 4px 10px;
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 0.83rem;
      background: #fff;
      color: var(--text);
    }

    .fav-search-input:focus {
      outline: 2px solid rgba(217, 119, 6, 0.25);
      border-color: var(--fav-bright);
    }

    .fav-toolbar-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
    }

    .fav-toolbar-summary {
      font-size: 0.78rem;
      color: var(--muted);
      font-weight: 600;
    }

    .fav-toolbar-btns {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .btn-toolbar {
      height: 28px;
      padding: 0 9px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: var(--surface);
      color: var(--text);
      font-size: 0.76rem;
      font-weight: 600;
      cursor: pointer;
    }

    .btn-toolbar:hover {
      background: #f1f4f1;
    }

    .btn-danger-ghost {
      height: 28px;
      padding: 0 9px;
      border: 1px solid #f4c2c2;
      border-radius: 6px;
      background: #fff5f5;
      color: var(--closed-fg);
      font-size: 0.76rem;
      font-weight: 600;
      cursor: pointer;
    }

    .btn-danger-ghost:hover {
      background: var(--closed-bg);
    }

    .card-header-right {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .fav-btn {
      width: 30px;
      height: 30px;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      color: #94a3b8;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    }

    .fav-btn:hover {
      background: var(--fav-soft);
      border-color: var(--fav-border);
      color: var(--fav-bright);
    }

    .fav-btn.is-favorite {
      background: var(--fav-soft);
      border-color: var(--fav-bright);
      color: var(--fav-bright);
      animation: fav-pop 0.25s ease;
    }

    @keyframes fav-pop {
      0% { transform: scale(1); }
      45% { transform: scale(1.22); }
      100% { transform: scale(1); }
    }

    .camp-card.is-favorite {
      border-left: 3px solid var(--fav-bright);
    }

    .fav-status-pill {
      display: inline-flex;
      align-items: center;
      padding: 2px 7px;
      border-radius: 6px;
      font-size: 0.74rem;
      font-weight: 600;
    }

    .fav-status-pill.is-live {
      background: #e5f6eb;
      color: #136f38;
      border: 1px solid #bce8cb;
    }

    .fav-status-pill.is-snapshot {
      background: #f1f5f9;
      color: #475569;
      border: 1px solid #cbd5e1;
    }

    .fav-note-box {
      margin-top: 8px;
      padding: 7px 10px;
      background: var(--fav-soft);
      border: 1px solid #fde68a;
      border-radius: 8px;
      font-size: 0.79rem;
      line-height: 1.4;
      color: #78350f;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
    }

    .fav-note-box[hidden] {
      display: none;
    }

    .fav-note-text {
      white-space: pre-wrap;
      word-break: break-word;
    }

    .fav-note-edit-inline {
      background: none;
      border: none;
      color: #92400e;
      cursor: pointer;
      font-size: 0.75rem;
      font-weight: 600;
      padding: 0 2px;
      flex-shrink: 0;
    }

    .fav-note-edit-inline:hover {
      text-decoration: underline;
    }

    .fav-note-editor {
      margin-top: 8px;
      padding: 8px 10px;
      background: #fafaf9;
      border: 1px solid var(--border);
      border-radius: 8px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .fav-note-editor[hidden] {
      display: none !important;
    }

    .fav-note-editor textarea {
      width: 100%;
      min-height: 58px;
      padding: 6px 8px;
      border: 1px solid var(--border);
      border-radius: 6px;
      font-family: inherit;
      font-size: 0.82rem;
      resize: vertical;
      color: var(--text);
      background: #fff;
    }

    .fav-note-editor textarea:focus {
      outline: 2px solid rgba(245, 158, 11, 0.25);
      border-color: var(--fav-bright);
    }

    .fav-note-editor-actions {
      display: flex;
      justify-content: flex-end;
      gap: 6px;
    }

    .popup-fav-btn {
      margin-top: 6px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 9px;
      border: 1px solid var(--border);
      border-radius: 6px;
      background: #fff;
      color: var(--text);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
    }

    .popup-fav-btn:hover {
      background: var(--fav-soft);
      border-color: var(--fav-border);
    }

    .popup-fav-btn.is-favorite {
      background: var(--fav-soft);
      border-color: var(--fav-bright);
      color: #92400e;
    }

    .toast-container {
      position: fixed;
      bottom: 18px;
      left: 18px;
      z-index: 1500;
      display: flex;
      flex-direction: column;
      gap: 8px;
      pointer-events: none;
      max-width: min(360px, calc(100vw - 24px));
    }

    .toast {
      pointer-events: auto;
      background: #1b271e;
      color: #fff;
      padding: 10px 14px;
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
      font-size: 0.83rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      animation: toast-in 0.18s ease;
    }

    .toast-undo-btn {
      background: rgba(255, 255, 255, 0.14);
      border: 1px solid rgba(255, 255, 255, 0.25);
      border-radius: 6px;
      color: #fde68a;
      font-weight: 700;
      font-size: 0.78rem;
      padding: 3px 8px;
      cursor: pointer;
      flex-shrink: 0;
    }

    .toast-undo-btn:hover {
      background: rgba(255, 255, 255, 0.24);
    }

    @keyframes toast-in {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 960px) {
      .mobile-only {
        display: inline-flex !important;
      }

      .mobile-filter-trigger.mobile-only {
        display: flex !important;
      }

      .mobile-view-bar.mobile-only {
        display: grid !important;
      }

      body {
        overflow: hidden;
      }

      .topbar {
        padding: 10px 12px;
        padding-top: calc(10px + env(safe-area-inset-top));
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
        flex-shrink: 0;
      }

      .topbar-head {
        width: 100%;
        gap: 8px;
        min-width: 0;
      }

      .brand {
        min-width: 0;
        flex: 1 1 auto;
        gap: 6px;
        overflow: hidden;
      }

      .brand > div {
        min-width: 0;
        overflow: hidden;
      }

      .brand-logo {
        font-size: 1.25rem;
        flex-shrink: 0;
      }

      .brand h1 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .tagline {
        display: none;
      }

      .header-actions {
        gap: 6px;
        flex-shrink: 0;
      }

      .mobile-filter-trigger {
        width: 100%;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 7px 9px 7px 11px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--bg);
        color: var(--text);
        font-family: inherit;
        text-align: left;
        cursor: pointer;
        transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
        -webkit-tap-highlight-color: transparent;
      }

      .mobile-filter-trigger:active {
        background: var(--accent-soft);
        border-color: var(--accent);
      }

      .mobile-filter-summary {
        flex: 1;
        min-width: 0;
        font-size: 0.78rem;
        font-weight: 500;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.35;
      }

      .mobile-filter-action {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 10px;
        border-radius: 7px;
        background: var(--surface);
        border: 1px solid var(--border);
        color: var(--accent);
        font-size: 0.78rem;
        font-weight: 700;
        line-height: 1.25;
        white-space: nowrap;
      }

      .topbar.filters-open .mobile-filter-trigger {
        background: var(--accent-soft);
        border-color: var(--accent);
        box-shadow: 0 0 0 2px rgba(29, 107, 69, 0.12);
      }

      .topbar.filters-open .mobile-filter-action {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
      }

      .filter-bar {
        display: none;
        flex: none;
        width: 100%;
        grid-template-columns: 1fr 1fr;
        gap: 10px 10px;
        padding-top: 8px;
        border-top: 1px solid var(--border);
        max-height: calc(100dvh - 150px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
      }

      .topbar.filters-open .filter-bar {
        display: grid;
      }

      .station-field,
      .toggles,
      .form-actions {
        grid-column: 1 / -1;
        max-width: none;
        min-width: 0;
      }

      .date-field,
      .select-field,
      .range-field {
        min-width: 0;
        width: 100%;
      }

      input[type='text'],
      input[type='date'],
      select {
        font-size: 16px;
        height: 40px;
        width: 100%;
        min-width: 0;
      }

      input[type='range'] {
        width: 100%;
        height: 28px;
        margin: 0;
        display: block;
      }

      .checkbox-label {
        font-size: 0.84rem;
        gap: 8px;
        padding: 2px 0;
      }

      .checkbox-label input {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
      }

      .form-actions {
        position: sticky;
        bottom: 0;
        background: var(--surface);
        padding: 8px 0 2px;
        border-top: 1px solid #eef2ee;
      }

      .form-actions .btn-primary {
        flex: 1;
        height: 42px;
        font-size: 0.95rem;
      }

      .form-actions .btn-ghost {
        height: 42px;
        padding: 0 14px;
      }

      .mobile-view-bar {
        grid-template-columns: 1fr 1fr;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 6px 12px;
        gap: 8px;
        flex-shrink: 0;
      }

      .mobile-tab {
        height: 36px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--bg);
        color: var(--muted);
        font-weight: 600;
        font-size: 0.86rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
      }

      .mobile-tab.active {
        background: var(--accent);
        border-color: var(--accent);
        color: #fff;
      }

      .split-layout {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
      }

      .results-pane {
        flex: 1;
        min-height: 0;
        border-right: none;
        border-top: none;
      }

      .results-list {
        -webkit-overflow-scrolling: touch;
        padding: 10px 10px calc(24px + env(safe-area-inset-bottom));
      }

      .status-bar {
        padding: 8px 12px;
        flex-wrap: wrap;
        gap: 6px 10px;
      }

      .sort-control {
        width: 100%;
        justify-content: space-between;
      }

      .sort-control select {
        height: 34px;
        font-size: 16px;
        width: auto;
        flex: 1;
        max-width: 240px;
      }

      .fav-header-label {
        display: none;
      }

      .btn-fav-header {
        height: 32px;
        padding: 0 8px;
        font-size: 0.8rem;
      }

      .fav-search-input,
      .fav-note-editor textarea {
        font-size: 16px;
      }

      .fav-sort-control {
        width: 100%;
        justify-content: space-between;
      }

      .toast-container {
        left: 12px;
        right: 12px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        max-width: none;
      }

      .card-actions {
        gap: 10px 14px;
      }

      .card-actions a,
      .card-actions button {
        padding: 3px 0;
      }

      .map-pane {
        flex: 1;
        min-height: 0;
        height: 100%;
      }

      body.mobile-view-list .map-pane {
        display: none;
      }

      body.mobile-view-map .results-pane {
        display: none;
      }

      .map-back-btn {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 460;
        height: 36px;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.96);
        color: var(--text);
        font-weight: 600;
        font-size: 0.84rem;
        box-shadow: var(--shadow);
        cursor: pointer;
        align-items: center;
      }

      .map-legend {
        bottom: calc(14px + env(safe-area-inset-bottom));
        right: 8px;
        left: 8px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 10px;
        padding: 6px 10px;
        font-size: 0.72rem;
      }
    }

    @media (max-width: 380px) {
      .topbar.filters-open .filter-bar {
        grid-template-columns: 1fr;
      }
    }

    .auth-user-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 36px;
      padding: 0 8px 0 6px;
      border-radius: 999px;
      border: 1px solid var(--border);
      background: #fff;
      font-size: 0.8rem;
      max-width: 240px;
    }

    .auth-user-pill[hidden],
    .btn-admin-users[hidden],
    .auth-gate[hidden],
    .admin-modal[hidden],
    .auth-card-error[hidden],
    .auth-card-actions button[hidden],
    .auth-user-avatar[hidden] {
      display: none !important;
    }

    .auth-user-avatar {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      object-fit: cover;
      flex-shrink: 0;
    }

    .auth-user-label {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: var(--text);
      font-weight: 500;
    }

    .btn-logout {
      height: 24px;
      padding: 0 6px;
      font-size: 0.75rem;
    }

    .btn-admin-users {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 36px;
      padding: 0 10px;
      font-size: 0.84rem;
    }

    .auth-gate,
    .admin-modal {
      position: fixed;
      inset: 0;
      z-index: 2000;
      background: rgba(15, 23, 42, 0.56);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }

    .auth-card {
      width: 100%;
      max-width: 400px;
      background: #fff;
      border-radius: 16px;
      padding: 28px 24px;
      text-align: center;
      box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24);
      border: 1px solid var(--border);
    }

    .auth-card-logo {
      font-size: 2.2rem;
      margin-bottom: 6px;
    }

    .auth-card h2 {
      margin: 0 0 8px;
      font-size: 1.35rem;
    }

    .auth-card-subtitle {
      margin: 0 0 18px;
      color: var(--muted);
      font-size: 0.92rem;
      line-height: 1.45;
    }

    .auth-card-error {
      margin-bottom: 14px;
      padding: 9px 12px;
      border-radius: 8px;
      background: #fef2f2;
      color: #b91c1c;
      border: 1px solid #fecaca;
      font-size: 0.82rem;
      text-align: left;
    }

    .auth-card-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .admin-modal-card {
      width: 100%;
      max-width: 580px;
      max-height: 82vh;
      background: #fff;
      border-radius: 14px;
      padding: 18px 20px;
      box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24);
      border: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .admin-modal-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 12px;
    }

    .admin-modal-header h2 {
      margin: 0;
      font-size: 1.1rem;
    }

    .admin-modal-sub {
      margin: 3px 0 0;
      font-size: 0.82rem;
      color: var(--muted);
    }

    .admin-users-list {
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding-right: 2px;
    }

    .admin-user-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: #f8fafc;
    }

    .admin-user-info {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }

    .admin-user-meta {
      min-width: 0;
    }

    .admin-user-name {
      font-weight: 600;
      font-size: 0.88rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .admin-user-email {
      font-size: 0.78rem;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .admin-user-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    .admin-status-badge {
      font-size: 0.72rem;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 999px;
    }

    .admin-status-pending {
      background: #fef3c7;
      color: #92400e;
    }

    .admin-status-approved {
      background: #dcfce7;
      color: #166534;
    }

    .admin-status-blocked {
      background: #fee2e2;
      color: #991b1b;
    }

    @media (max-width: 960px) {
      .btn-admin-users {
        height: 32px;
        padding: 0 8px;
        font-size: 0.8rem;
        gap: 4px;
      }

      .auth-user-pill {
        height: 32px;
        padding: 0 6px 0 4px;
        gap: 5px;
        max-width: 180px;
      }

      .auth-user-avatar {
        width: 22px;
        height: 22px;
      }

      .btn-logout {
        height: 22px;
        padding: 0 6px;
        font-size: 0.72rem;
      }
    }

    @media (max-width: 680px) {
      .auth-user-label {
        display: none;
      }

      .range-field {
        grid-column: 1 / -1;
      }

      .range-field label {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
      }
    }

    @media (max-width: 480px) {
      .admin-users-label {
        display: none;
      }

      .admin-user-row {
        flex-wrap: wrap;
      }
    }

    @media (max-width: 340px) {
      .topbar-head {
        flex-wrap: wrap;
      }
    }
