/* ==========================================
   eSosta Map — Design tokens (Nexus)
   ========================================== */
:root, [data-theme='light'] {
  --color-bg: #f7f6f2;
  --color-surface: #f9f8f5;
  --color-surface-2: #fbfbf9;
  --color-surface-offset: #f3f0ec;
  --color-surface-offset-2: #edeae5;
  --color-surface-dynamic: #e6e4df;
  --color-divider: #dcd9d5;
  --color-border: #d4d1ca;
  --color-text: #28251d;
  --color-text-muted: #7a7974;
  --color-text-faint: #bab9b4;
  --color-text-inverse: #f9f8f4;
  --color-primary: #01696f;
  --color-primary-hover: #0c4e54;
  --color-primary-highlight: #cedcd8;
  --color-success: #437a22;
  --color-success-highlight: #d4dfcc;
  --color-warning: #d19900;
  --color-warning-highlight: #e9e0c6;
  --color-muted: #9a9692;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.12);

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.2vw, 0.9375rem);
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;

  --font-body: 'Satoshi', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'General Sans', ui-sans-serif, system-ui, sans-serif;

  --header-h: 64px;
  --footer-h: 40px;
  --sidebar-w: 360px;
}

[data-theme='dark'] {
  --color-bg: #171614;
  --color-surface: #1c1b19;
  --color-surface-2: #201f1d;
  --color-surface-offset: #1d1c1a;
  --color-surface-offset-2: #22211f;
  --color-surface-dynamic: #2d2c2a;
  --color-divider: #262523;
  --color-border: #393836;
  --color-text: #cdccca;
  --color-text-muted: #8a8987;
  --color-text-faint: #5a5957;
  --color-text-inverse: #2b2a28;
  --color-primary: #4f98a3;
  --color-primary-hover: #7ab0ba;
  --color-primary-highlight: #313b3b;
  --color-success: #6daa45;
  --color-success-highlight: #3a4435;
  --color-warning: #e8af34;
  --color-warning-highlight: #4d4332;
  --color-muted: #6f6d6a;
}

/* ==========================================
   Base
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html, body {
  height: 100dvh;
  overflow: hidden;
}
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  display: grid;
  grid-template-rows: var(--header-h) 1fr var(--footer-h);
}
button { cursor: pointer; background: none; border: none; color: inherit; }
input, button, select { font: inherit; color: inherit; }
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
::selection {
  background: color-mix(in oklab, var(--color-primary) 25%, transparent);
}

/* ==========================================
   Header
   ========================================== */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}
.brand em {
  font-style: normal;
  color: var(--color-text-muted);
  font-weight: 500;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.status-pill[hidden] { display: none !important; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-offset);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-pill[data-status='verified'] .dot { background: var(--color-success); }
.status-pill[data-status='pending'] .dot { background: var(--color-warning); }
.status-pill[data-status='raw'] .dot { background: var(--color-muted); }

/* Scope-Toggle: Empfohlen vs Alle */
.scope-toggle {
  display: inline-flex;
  align-items: stretch;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}
.scope-btn {
  border: 0;
  background: transparent;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all var(--transition-interactive);
  font-family: inherit;
}
.scope-btn:hover { color: var(--color-text); }
.scope-btn.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.scope-btn.active:hover { color: #fff; }
.scope-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  opacity: 0.9;
}

.theme-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
  transition: all var(--transition-interactive);
}
.theme-btn:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

/* ==========================================
   Main layout
   ========================================== */
.main {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  height: 100%;
}

/* ==========================================
   Sidebar
   ========================================== */
.sidebar {
  background: var(--color-surface);
  border-right: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}
.sheet-header { display: none; }
.sidebar > .panel { flex-shrink: 0; }
.sidebar > .list-panel { flex: 1 1 auto; min-height: 320px; }
.list-panel {
  min-height: 0;
}
.panel {
  padding: var(--space-5) var(--space-5) var(--space-4);
}
.filter-panel {
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface-2);
}
.list-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: var(--space-4);
}
.panel-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding-right: var(--space-1);
}
.list-header .panel-title { margin-bottom: 0; }
.panel-meta {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.field {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.field label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}
.field input[type='search'],
.field select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: all var(--transition-interactive);
}
.field input[type='search']:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 15%, transparent);
}
.field input[type='range'] {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.checkbox-group {
  margin-top: var(--space-2);
}
.checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background var(--transition-interactive);
}
.checkbox:hover { background: var(--color-surface-offset); }
.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.checkbox span {
  font-size: var(--text-sm);
  font-weight: 500;
}

.btn-secondary {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  transition: all var(--transition-interactive);
}
.btn-secondary:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
  border-color: var(--color-text-faint);
}

/* ==========================================
   Route-Panel (in Entwicklung)
   ========================================== */
.route-panel {
  border-bottom: 1px solid var(--color-divider);
}
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.panel-title-row .panel-title {
  margin-bottom: 0;
}
.badge-beta {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm, 4px);
  background: var(--color-warning-highlight);
  color: var(--color-warning);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.panel-hint {
  margin: 0 0 var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}
.route-panel .field input[disabled] {
  background: var(--color-surface-offset, transparent);
  color: var(--color-text-faint);
  cursor: not-allowed;
}
.route-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.route-actions .btn-primary,
.route-actions .btn-secondary {
  margin: 0;
}
.route-status {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm, 4px);
  font-size: var(--text-xs);
  line-height: 1.5;
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
}
.route-status[data-tone='loading'] {
  background: rgba(1, 105, 111, 0.08);
  color: var(--color-primary);
}
.route-status[data-tone='error'] {
  background: rgba(178, 64, 64, 0.10);
  color: var(--color-warning, #b24040);
}
.route-summary {
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm, 4px);
  background: var(--color-surface-offset);
  font-size: var(--text-xs);
}
/* === P1: Curator-First Headline === */
.route-headline {
  margin: 0 calc(-1 * var(--space-3)) var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  background: linear-gradient(180deg, rgba(1,105,111,0.06), transparent);
  cursor: pointer;
  transition: background 0.15s ease;
}
.route-headline[data-combo-id]:hover,
.route-headline[data-combo-id]:focus {
  background: linear-gradient(180deg, rgba(1,105,111,0.12), rgba(1,105,111,0.02));
  outline: none;
}
.route-headline-tier1 {
  background: linear-gradient(180deg, rgba(212,160,23,0.10), transparent);
  border-left: 3px solid #d4a017;
  padding-left: calc(var(--space-3) - 3px);
}
.route-headline-tier1:hover,
.route-headline-tier1:focus {
  background: linear-gradient(180deg, rgba(212,160,23,0.18), rgba(212,160,23,0.03));
}
.route-headline-empty {
  background: linear-gradient(180deg, rgba(120,120,120,0.06), transparent);
  cursor: default;
}
.route-headline-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.route-headline-tier1 .route-headline-tag {
  color: #b08612;
}
.route-headline-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}
.route-headline-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* === Hero-Card Track 1: Entscheidungsbegruendung in 3-4 Zeilen === */
/* Dezent, redaktioneller Hinweis, kein Box-Shadow, kein Card-Elevation.
   Linker Border in Brand-Farbe kommt vom .route-headline-tier1/2 darueber. */
.route-headline-with-lines .route-headline-title {
  font-size: 15px;
  margin-bottom: 6px;
}
.route-headline-lines {
  list-style: none;
  margin: 8px 0 6px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.route-headline-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-text);
}
.route-headline-line-icon {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--color-text-muted);
  font-variant-emoji: text;
}
.route-headline-line-text {
  flex: 1;
  color: var(--color-text);
}
.route-headline-line-accent .route-headline-line-icon {
  color: #01696F;
  font-weight: 700;
}
.route-headline-line-accent .route-headline-line-text {
  color: var(--color-text);
  font-weight: 600;
}
.route-summary-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 2px 0;
}
.route-summary-row strong {
  color: var(--color-text);
  font-weight: 600;
}
.route-summary-row span:first-child {
  color: var(--color-text-muted);
}
.route-summary-stops {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.stop-card {
  border: 1px solid var(--color-divider);
  border-left: 3px solid #e35d2b;
  border-radius: var(--radius-sm, 4px);
  background: var(--color-surface);
  padding: var(--space-2) var(--space-3);
}
.stop-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: 4px;
}
.stop-card-idx {
  font-weight: 700;
  color: #e35d2b;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.stop-card-meta {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.stop-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stop-card-combo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 0.74rem;
  line-height: 1.35;
  padding: 4px 6px;
  margin: 0 -6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.stop-card-combo:hover,
.stop-card-combo:focus-visible {
  background-color: rgba(1, 105, 111, 0.08);
  outline: none;
}
.stop-card-combo:focus-visible {
  box-shadow: 0 0 0 2px var(--color-accent, #01696F);
}
.stop-card-combo-top {
  background-color: rgba(1, 105, 111, 0.06);
}
.stop-card-combo-top:hover,
.stop-card-combo-top:focus-visible {
  background-color: rgba(1, 105, 111, 0.14);
}
/* v=20260629c B3: Pfeil-Affordance fuer Top-5-Cards. */
.stop-card-default-arrow {
  display: inline-block;
  margin-left: 4px;
  color: var(--color-accent, #01696F);
  font-weight: 700;
  opacity: 0.55;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.stop-card-default-item:hover .stop-card-default-arrow,
.stop-card-default-item:focus-visible .stop-card-default-arrow {
  opacity: 1;
  transform: translateX(2px);
}
.stop-card-star {
  color: #d4af37;
  margin-right: 4px;
  font-size: 0.85rem;
}
.stop-card-combo-name {
  color: var(--color-text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stop-card-hours-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}
.dark .stop-card-hours-flag {
  background: rgba(255, 255, 255, 0.08);
}
.stop-card-combo-meta {
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: 0 0 auto;
}
.stop-card-empty {
  color: var(--color-text-muted);
  font-size: 0.74rem;
  font-style: italic;
}
.stop-marker-wrap {
  background: transparent;
  border: 0;
}
.stop-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}
.stop-marker-bubble {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e35d2b;
  border: 2.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stop-marker-label {
  margin-top: 3px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #fff;
  border: 1px solid #e35d2b;
  color: #2E4756;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
[data-theme='dark'] .stop-marker-label {
  background: #2b2a28;
  color: #f3e6d8;
}
.stop-marker-sublabel {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  font-weight: 500;
  color: #4A4A4A;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme='dark'] .stop-marker-sublabel {
  color: #c8b9a8;
}
.combo-route-pos {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(1, 105, 111, 0.10);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.btn-primary {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  transition: all var(--transition-interactive);
}
.btn-primary:hover:not([disabled]) {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}
.btn-primary[disabled] {
  background: var(--color-surface-offset, transparent);
  color: var(--color-text-faint);
  border-color: var(--color-border);
  cursor: not-allowed;
  opacity: 0.75;
}

/* ==========================================
   Combo list
   ========================================== */
.list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-divider);
  border-top: 1px solid var(--color-divider);
  padding-bottom: var(--space-4);
}
.list::-webkit-scrollbar { width: 8px; }
.list::-webkit-scrollbar-track { background: transparent; }
.list::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
.combo-card {
  background: var(--color-surface);
  padding: var(--space-3) var(--space-5);
  cursor: pointer;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  transition: background var(--transition-interactive);
}
.combo-card:hover,
.combo-card.active {
  background: var(--color-surface-offset);
}
.combo-card.active {
  box-shadow: inset 3px 0 0 var(--color-primary);
}
.combo-score {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  text-align: center;
  color: var(--color-text);
  letter-spacing: -0.02em;
  padding: var(--space-1) 0;
  background: var(--color-surface-offset-2);
  border-radius: var(--radius-md);
  line-height: 1.2;
}
.combo-card.active .combo-score {
  background: var(--color-primary-highlight);
  color: var(--color-primary);
}
.combo-body { min-width: 0; }
.combo-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.combo-sub .dot-sep {
  display: inline-block;
  margin: 0 var(--space-2);
  color: var(--color-text-faint);
}
.combo-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.combo-badge.verified { background: var(--color-success); }
.combo-badge.pending { background: var(--color-warning); }
.combo-badge.raw { background: var(--color-muted); }

/* ==========================================
   Map
   ========================================== */
.map-wrap {
  position: relative;
  background: var(--color-bg);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
#map {
  width: 100%;
  height: 100%;
  background: var(--color-surface-offset);
}
[data-theme='dark'] .leaflet-tile {
  filter: brightness(0.7) invert(1) contrast(0.9) hue-rotate(200deg) saturate(0.5);
}

/* Map markers */
.marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.3);
  transition: transform 120ms ease;
}
.marker-verified { background: #437a22; }
.marker-pending { background: #d19900; }
.marker-raw { background: #9a9692; }
.marker-verified-lg { width: 22px; height: 22px; border-width: 3px; }
/* A10-Kern: voller Türkis-Ring (≤3 km von A10-Trasse) */
.marker.marker-a10 {
  box-shadow: 0 0 0 3px #01696f, 0 2px 4px rgb(0 0 0 / 0.35);
}
/* A10-Nah: helleres Türkis (3-7 km, kleiner Umweg über Bundesstraße) */
.marker.marker-a10nah {
  box-shadow: 0 0 0 3px rgba(1, 105, 111, 0.45), 0 2px 4px rgb(0 0 0 / 0.3);
}
/* Südtirol-Pilot: warmer Orange-Ring (Vinschgau + Pustertal + A22) */
.marker.marker-suedtirol {
  box-shadow: 0 0 0 3px #c95a20, 0 2px 4px rgb(0 0 0 / 0.35);
}
.leaflet-marker-icon:hover .marker { transform: scale(1.4); }

/* Pilot-Badge im Filter-Label */
.badge-pilot {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #01696f;
  color: #fff;
  border-radius: 3px;
  vertical-align: 1px;
}

/* Premium-Badge (Michelin / Gault Millau / Falstaff) */
.badge-premium {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #2E4756;
  color: #fff;
  border-radius: 3px;
  vertical-align: 1px;
}

/* v9.3-pin: Tropfen-Pins fuer Award/Pick/Select (SVG inline via iconFor()).
   WICHTIG: KEINE position/transform/margin-Properties auf .esosta-tier-pin selbst -
   Leaflet positioniert den Marker absolut via transform: translate3d(...).
   Das SVG hat schon eigene Hover-Transform-Origin (50% 100% = Spitze). */
.esosta-tier-pin {
  background: transparent;
  border: none;
  cursor: pointer;
}
.esosta-tier-pin svg {
  transition: transform 120ms ease;
}
.leaflet-marker-icon.esosta-tier-pin:hover svg {
  transform: scale(1.12) !important;
  transform-origin: 50% 100% !important;
}
.esosta-tier-pin.is-active svg {
  transform: scale(1.22) !important;
}

/* Premium-Indikator in Combo-Card-Liste */
.combo-premium {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #FFF5DD;
  color: #6E5522;
  border: 1px solid #E8AF34;
  border-radius: 3px;
  vertical-align: 1px;
}
.combo-premium .premium-icon {
  width: 8px;
  height: 8px;
  background: #D19900;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Premium-Section im Popup */
.popup-premium {
  margin-top: 6px;
  padding: 8px 10px;
  background: linear-gradient(90deg, #FFF5DD 0%, #FBF6E8 100%);
  border: 1px solid #E8AF34;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #5C4515;
}
.popup-premium .popup-premium-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8C6717;
  margin-bottom: 3px;
}
.popup-premium .popup-premium-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #D19900;
  border-radius: 50%;
}
.popup-premium .popup-premium-summary {
  font-weight: 600;
  line-height: 1.35;
}

/* Legenden-Marker für A10-Kern */
.legend-marker.marker-a10 {
  background: transparent;
  box-shadow: 0 0 0 3px #01696f inset;
  border: 2px solid white;
}
/* Legenden-Marker für A10-Nah */
.legend-marker.marker-a10nah {
  background: transparent;
  box-shadow: 0 0 0 3px rgba(1, 105, 111, 0.45) inset;
  border: 2px solid white;
}
/* Legenden-Marker für Südtirol-Pilot */
.legend-marker.marker-suedtirol {
  background: transparent;
  box-shadow: 0 0 0 3px #c95a20 inset;
  border: 2px solid white;
}

/* Hint-Text unter Filter-Feldern */
.field-hint {
  margin: 4px 0 0 0;
  font-size: 0.72rem;
  color: var(--text-muted, #6b6b6b);
  line-height: 1.35;
}

/* Autobahn-Layer */
.motorway-label {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  text-align: center;
  pointer-events: none;
}
.motorway-ref {
  display: inline-block;
  background: var(--color-surface);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
  line-height: 1.3;
}
[data-theme='dark'] .motorway-ref {
  background: var(--color-surface-2);
  border-color: var(--color-primary);
  color: var(--color-primary-hover);
}

/* Legend: linien-swatch für Autobahn */
.legend-line {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-primary);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
  flex-shrink: 0;
}
.legend-section-divider {
  height: 1px;
  background: var(--color-divider);
  margin: var(--space-2) 0;
}

/* Popup */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0;
}
.leaflet-popup-tip {
  background: var(--color-surface);
}
.leaflet-popup-content {
  margin: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  line-height: 1.5;
  min-width: 260px;
  max-width: 320px;
}
.leaflet-popup-close-button {
  color: var(--color-text-muted) !important;
  font-size: 22px !important;
  top: 6px !important;
  right: 8px !important;
}
.popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}
.popup-score {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}
.popup-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px var(--space-2);
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 2px;
}
.popup-status.verified { background: var(--color-success-highlight); color: var(--color-success); }
.popup-status.pending { background: var(--color-warning-highlight); color: var(--color-warning); }
.popup-status.raw { background: var(--color-surface-offset); color: var(--color-text-muted); }
.popup-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  align-items: start;
}
.popup-row svg {
  width: 14px;
  height: 14px;
  color: var(--color-text-faint);
  margin-top: 3px;
}
.popup-row .label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}
.popup-row .value {
  font-weight: 500;
  color: var(--color-text);
}
.popup-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin: var(--space-3) 0 var(--space-1);
}
.popup-footer {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-divider);
  display: flex;
  gap: var(--space-2);
}
.popup-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-primary);
  color: white !important;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: 500;
  transition: background var(--transition-interactive);
}
.popup-link:hover { background: var(--color-primary-hover); }

/* User-Location Marker (pulsing dot) */
.user-marker {
  position: relative;
  width: 20px;
  height: 20px;
}
.user-marker-dot {
  position: absolute;
  inset: 4px;
  background: #1a73e8;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgb(26 115 232 / 0.3), 0 2px 6px rgb(0 0 0 / 0.3);
  z-index: 2;
}
.user-marker-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgb(26 115 232 / 0.35);
  animation: user-pulse 2s ease-out infinite;
  z-index: 1;
}
@keyframes user-pulse {
  0%   { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* Leaflet Location-Control Button */
.loc-control {
  background: var(--color-surface);
  border: 1px solid var(--color-divider) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-sm);
}
.loc-control button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: all var(--transition-interactive);
}
.loc-control button:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.loc-control button.is-loading svg {
  animation: spin 900ms linear infinite;
  color: var(--color-primary);
}
.loc-control button.is-active {
  color: var(--color-primary);
  background: var(--color-primary-highlight);
}

/* Distance-Badge in Combo-Card */
.combo-dist-row {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.combo-dist {
  display: inline-block;
  padding: 2px 8px;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  font-weight: 600;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
}

/* Legend */
.legend {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-md);
  z-index: 800;
  font-size: var(--text-xs);
}
.legend-title {
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
  margin-bottom: var(--space-2);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px 0;
  color: var(--color-text);
}
.legend-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
  flex-shrink: 0;
}

/* Loading */
.loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: color-mix(in oklab, var(--color-bg) 80%, transparent);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  backdrop-filter: blur(2px);
  z-index: 900;
  transition: opacity 200ms ease;
}
.loading[data-hidden='true'] {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--color-divider);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================
   Footer
   ========================================== */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-divider);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: var(--space-4);
}
.footer-trust {
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
}
.footer-meta {
  text-align: right;
  opacity: 0.85;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 900px) {
  :root { --sidebar-w: 320px; }
  .status-pill[data-status='raw'] { display: none; }
}

/* ==========================================
   Mobile Bottom-Sheet Layout (<=720px)
   Karte nimmt den größten Teil des Bildschirms ein.
   Sidebar wird zum einziehbaren Bottom-Sheet.
   ========================================== */
@media (max-width: 720px) {
  body {
    grid-template-rows: var(--header-h) 1fr;
    grid-template-columns: 1fr;
  }
  .footer { display: none; }
  .main {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    position: relative;
  }
  .header { padding: 0 var(--space-4); }
  .header-nav .status-pill { display: none; }

  /* Karte füllt den gesamten Main-Bereich */
  .map-wrap {
    grid-column: 1;
    grid-row: 1;
    height: 100%;
  }

  /* Sidebar als Bottom-Sheet */
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 1000;
    background: var(--color-surface);
    border-top: 1px solid var(--color-divider);
    border-right: none;
    box-shadow: 0 -8px 24px rgb(0 0 0 / 0.12);
    border-radius: 18px 18px 0 0;
    max-height: 80dvh;
    height: 88px; /* collapsed-Höhe inkl. Handle + CTA-Zeile */
    overflow: hidden;
    transition: height 260ms cubic-bezier(0.16, 1, 0.3, 1);
    padding-top: 0;
  }
  .sidebar[data-sheet='expanded'] {
    height: 78dvh;
    overflow-y: auto;
  }
  /* Drag-Handle oben */
  .sidebar::before {
    content: '';
    position: sticky;
    top: 0;
    display: block;
    width: 44px;
    height: 4px;
    margin: 8px auto 0;
    background: var(--color-border);
    border-radius: 2px;
    flex-shrink: 0;
    z-index: 2;
  }
  /* Sheet-Header: klickbarer Streifen mit Titel + Toggle */
  .sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 6px var(--space-5) var(--space-3);
    background: var(--color-surface);
    position: sticky;
    top: 0;
    z-index: 3;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .sheet-header-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--color-text);
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
  }
  .sheet-header-title .count-badge {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: 500;
  }
  .sheet-toggle {
    color: var(--color-text-muted);
    transition: transform 260ms ease;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-surface-offset);
  }
  .sidebar[data-sheet='expanded'] .sheet-toggle {
    transform: rotate(180deg);
  }
  /* Route-Panel im collapsed state verstecken */
  .sidebar:not([data-sheet='expanded']) .route-panel,
  .sidebar:not([data-sheet='expanded']) .filter-panel,
  .sidebar:not([data-sheet='expanded']) .list-panel {
    display: none;
  }

  .filter-panel { border-bottom: 1px solid var(--color-divider); }
  .list-panel { overflow: visible; }
  .list-panel .list { max-height: none; overflow: visible; }

  /* Legende am Handy ausblenden (Platz fehlt) */
  .legend { display: none; }

  /* Combo-Cards am Handy: größere Tap-Targets */
  .combo-card {
    padding: var(--space-4) var(--space-5);
    min-height: 64px;
  }
  .combo-card .combo-title { font-size: var(--text-base); }
  .combo-card .combo-sub { font-size: var(--text-sm); white-space: normal; }

  /* Popup am Handy: breiter, größere Tap-Targets */
  .leaflet-popup-content {
    margin: var(--space-4);
    min-width: min(86vw, 320px);
    max-width: 86vw;
  }
  .leaflet-popup-close-button {
    font-size: 28px !important;
    width: 36px !important;
    height: 36px !important;
    top: 4px !important;
    right: 4px !important;
    display: grid !important;
    place-items: center;
  }
  .popup-link {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    min-height: 44px;
    justify-content: center;
    flex: 1;
  }
  .popup-footer { gap: var(--space-3); }
}

/* Premium-Filter-Highlight oben in der Sidebar (gut sichtbar ohne scroll). */
.field.premium-highlight {
  background: linear-gradient(135deg, #fff8e6, #fff2cc);
  border: 1px solid #d4af37;
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(212, 175, 55, 0.15);
}
.field.premium-highlight .checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
}
.field.premium-highlight .checkbox input { margin: 0; }
.field.premium-highlight .checkbox span { font-size: 13px; color: #4a3a00; }
.field.premium-highlight .checkbox strong { color: #2a2200; }
.field.premium-highlight .premium-sub {
  font-size: 11px;
  color: #7a6a30;
  margin-top: 4px;
  margin-left: 0;
  letter-spacing: 0.2px;
}

/* Tier-Filter-Pills: 3-stufige Auswahl Award/Pick/Select */
.field.premium-highlight .tier-filter-label {
  font-size: 13px;
  color: #2a2200;
  margin-bottom: 8px;
}
.tier-pill-group {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}
.tier-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #fff;
  border: 1.5px solid #d4af37;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #4a3a00;
  line-height: 1.2;
  transition: all 120ms ease;
  text-align: left;
}
.tier-pill:hover {
  background: #fff8e6;
  transform: translateY(-1px);
}
.tier-pill .tier-pill-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.tier-pill .tier-pill-text {
  flex: 1;
  font-size: 11px;
}
.tier-pill .tier-pill-count {
  font-size: 10px;
  font-weight: 500;
  color: #7a6a30;
}
.tier-pill[aria-pressed="true"].tier-pill-award {
  background: linear-gradient(135deg, #FFD75A, #C8A24A);
  border-color: #A87800;
  color: #fff;
}
.tier-pill[aria-pressed="true"].tier-pill-award .tier-pill-count {
  color: #fff;
}
.tier-pill[aria-pressed="true"].tier-pill-pick,
.tier-pill[aria-pressed="true"].tier-pill-select {
  background: #2A6E5C;
  border-color: #114A3E;
  color: #fff;
}
.tier-pill[aria-pressed="true"].tier-pill-pick .tier-pill-count,
.tier-pill[aria-pressed="true"].tier-pill-select .tier-pill-count {
  color: rgba(255,255,255,0.85);
}
[data-theme='dark'] .tier-pill {
  background: var(--color-surface-2, #1f2a2a);
  color: #e0d28a;
}
.premium-count-pill {
  display: inline-block;
  background: #d4af37;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 4px;
  min-width: 18px;
  text-align: center;
}

/* v9: Pill-Filter für Küche und Preis */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.pill {
  background: var(--color-surface, #fff);
  color: var(--color-text-muted, #4A4A4A);
  border: 1px solid var(--color-border, #d8d2c8);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}
.pill:hover {
  border-color: #01696F;
  color: #01696F;
}
.pill.active {
  background: #01696F;
  color: #fff;
  border-color: #01696F;
  font-weight: 600;
}
[data-theme='dark'] .pill {
  background: #2b2a28;
  color: #c8b9a8;
  border-color: #3d3b39;
}
[data-theme='dark'] .pill.active {
  background: #01696F;
  color: #fff;
  border-color: #01696F;
}
.top-tip-count-pill {
  display: inline-block;
  background: #d4af37;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 4px;
  min-width: 18px;
  text-align: center;
}
.badge-top-tip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
  box-shadow: 0 1px 3px rgba(212, 175, 55, 0.3);
}

/* Kategorie-Filter ("Was suchst du jetzt?") */
.field.category-field {
  background: linear-gradient(135deg, #f3f7f8, #e7eff1);
  border: 1px solid #01696F;
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(1, 105, 111, 0.10);
}
.field.category-field > label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #2E4756;
  margin-bottom: 6px;
}
.context-badge {
  display: inline-block;
  background: #01696F;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pill-count {
  display: inline-block;
  background: rgba(255, 255, 255, 0.85);
  color: #2E4756;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  min-width: 18px;
  text-align: center;
  letter-spacing: 0.02em;
}
.pill.active .pill-count {
  background: rgba(255, 255, 255, 0.95);
  color: #01696F;
}
.category-time-hint {
  margin: 8px 0 4px;
  padding: 8px 10px;
  background: rgba(1, 105, 111, 0.08);
  border-left: 3px solid #01696F;
  border-radius: 4px;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #2E4756;
  transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}
.category-time-hint strong {
  color: #01696F;
  font-weight: 600;
}
.category-time-hint.dismissed {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}
[data-theme='dark'] .category-time-hint {
  background: rgba(1, 105, 111, 0.18);
  color: #d8e2e4;
}
[data-theme='dark'] .category-time-hint strong { color: #5fb4b8; }

.category-phase2 {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(1, 105, 111, 0.25);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.phase2-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  font-size: 10.5px;
  color: #4A4A4A;
  line-height: 1.3;
}
.phase2-label {
  font-weight: 600;
  color: #2E4756;
  font-size: 11px;
}
.phase2-tags {
  color: #4A4A4A;
  font-size: 10.5px;
}
.phase2-badge {
  background: #e7e1d4;
  color: #7a6a30;
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.phase2-badge.phase2-badge-live {
  background: #d6efe9;
  color: #01696F;
}
[data-theme='dark'] .phase2-badge.phase2-badge-live {
  background: #0f3a3a;
  color: #6fd1c5;
}

/* Context-Layer Filter (Stufe C) */
.context-filter {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #d4d0c8;
}
.context-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: #2E4756;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pill-context {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pill-context svg {
  flex-shrink: 0;
  opacity: 0.75;
}
.pill-context.active {
  background: #01696F;
  color: #ffffff;
  border-color: #01696F;
}
.pill-context.active svg {
  opacity: 1;
}
.pill-context.active .pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
[data-theme='dark'] .context-filter { border-top-color: #2a2a2a; }
[data-theme='dark'] .context-filter-label { color: #c8d4d6; }
[data-theme='dark'] .field.category-field {
  background: linear-gradient(135deg, #1d2a2d, #15201f);
  border-color: #01696F;
}
[data-theme='dark'] .field.category-field > label {
  color: #c8d4d6;
}
[data-theme='dark'] .phase2-row { color: #a6a6a6; }
[data-theme='dark'] .phase2-label { color: #c8d4d6; }
[data-theme='dark'] .phase2-badge { background: #2b2a28; color: #c8b9a8; }
[data-theme='dark'] .pill-count { background: rgba(255, 255, 255, 0.10); color: #c8b9a8; }

/* ==========================================
   Hero (Welcome-Bar)
   ========================================== */
.hero {
  background: linear-gradient(135deg, #2E4756 0%, #1f3742 100%);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  flex-shrink: 0;
  z-index: 90;
}
.hero[hidden] { display: none !important; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  grid-template-areas: "claim quality close" "coverage coverage close";
  align-items: center;
  gap: 8px var(--space-6);
  padding: 16px var(--space-6);
  max-width: 100%;
}
.hero-claim { min-width: 0; grid-area: claim; }
.hero-title {
  font-family: var(--font-display, var(--font-body));
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 4px 0;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 4px 0 0 0;
  color: rgba(255, 255, 255, 0.85);
  max-width: 52ch;
}
.hero-quality {
  grid-area: quality;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  min-width: 0;
  align-self: center;
  justify-content: flex-end;
}
.hero-quality li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  line-height: 1.2;
}
.hero-quality-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(1, 105, 111, 0.85);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.hero-coverage {
  grid-area: coverage;
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.01em;
  font-style: italic;
}
.hero-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}
.hero-step {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  min-width: 0;
}
.hero-step-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #01696F;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hero-step-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.hero-step-text strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-step-text span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-close {
  grid-area: close;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: rgba(255, 255, 255, 0.75);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.hero-close:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
}

/* Layout fix: main füllt den Rest unter Header + Hero */
html, body { display: block; }
body {
  display: flex;
  flex-direction: column;
}
.main {
  flex: 1 1 auto;
  min-height: 0;
}

/* Mobile: Schritte ausblenden, nur Claim zeigen */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "claim close" "quality quality" "coverage coverage";
    gap: 10px var(--space-3);
    padding: 12px var(--space-4);
    align-items: start;
  }
  .hero-steps { display: none; }
  .hero-title { font-size: 1.1rem; }
  .hero-sub { font-size: 0.82rem; margin-top: 2px; }
  .hero-quality {
    justify-content: flex-start;
    gap: 8px 16px;
  }
  .hero-quality li { font-size: 0.78rem; }
  .hero-coverage { font-size: 0.72rem; }
  .hero-close { align-self: start; }
}

/* ==========================================
   Premium-Polish: Crown-Pille im Popup-Header
   ========================================== */
.popup-premium-crown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #FFD970 0%, #D19900 100%);
  color: #4A3000;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(209, 153, 0, 0.30);
  white-space: nowrap;
}
.popup-premium-crown svg {
  flex-shrink: 0;
}
/* eSosta Pick (Signature, kein Award): dezent dunkelgrün */
.popup-premium-crown.popup-signature-crown {
  background: linear-gradient(135deg, #2A6E5C 0%, #114A3E 100%);
  color: #E8F5EF;
  box-shadow: 0 1px 2px rgba(17, 74, 62, 0.35);
}
/* Award-winning (externe Auszeichnung): kräftiges Gold mit dunklem Text — sticht hervor */
.popup-premium-crown.popup-award-crown {
  background: linear-gradient(135deg, #FFC940 0%, #A87800 100%);
  color: #2A1A00;
  box-shadow: 0 1px 3px rgba(168, 120, 0, 0.40);
  cursor: help;
}

/* Pin-Popup: kompakte 4-Zeilen-Entscheidungs-Liste (parallel zu route-headline-lines) */
.popup-decision-lines {
  list-style: none;
  margin: 6px 0 8px 0;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(1, 105, 111, 0.04);
  border-left: 2px solid rgba(1, 105, 111, 0.25);
  border-radius: 4px;
}
.popup-decision-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--color-text);
}
.popup-decision-line-icon {
  flex-shrink: 0;
  width: 14px;
  text-align: center;
  font-size: 11px;
  color: var(--color-text-muted);
  font-variant-emoji: text;
}
.popup-decision-line-text {
  flex: 1;
  color: var(--color-text);
}
.popup-decision-line-accent .popup-decision-line-icon {
  color: #01696F;
  font-weight: 700;
}
.popup-decision-line-accent .popup-decision-line-text {
  color: var(--color-text);
  font-weight: 600;
}
.popup-decision-line[title] {
  cursor: help;
}

/* === Editorial Layer (v9.4 v2 — eigener Block "eSosta empfiehlt") ===
   Eigenständiger Editorial-Block, gold-dashed vom DB-Block getrennt.
   3 Ebenen: (1) Headline + Empfehlung, (2) Meta-Box, (3) Quellen */
.esosta-editorial-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(200, 162, 74, 0.35);
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text);
}
.esosta-ed-tag {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #C8A24A;
  font-weight: 700;
  margin-bottom: 6px;
  opacity: 0.9;
}
.esosta-ed-headline {
  color: #C8A24A;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.35;
  margin-bottom: 7px;
}
.esosta-ed-body {
  color: var(--color-text);
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 10px;
}
.esosta-ed-meta {
  background: rgba(200, 162, 74, 0.05);
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 6px;
}
.esosta-ed-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 11.5px;
  margin-bottom: 3px;
}
.esosta-ed-row:last-child { margin-bottom: 0; }
.esosta-ed-row-besond { margin-top: 5px; }
.esosta-ed-lbl {
  color: var(--color-text-muted);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 72px;
  font-size: 10.5px;
}
.esosta-ed-val { color: var(--color-text); }
.esosta-ed-fact { font-style: italic; color: var(--color-text); }
.esosta-ed-source {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 9.5px;
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
[data-theme='dark'] .esosta-ed-source {
  border-top-color: rgba(255,255,255,0.05);
}
[data-theme='dark'] .esosta-ed-meta {
  background: rgba(200, 162, 74, 0.07);
}
/* === /Editorial Layer v2 === */

/* Dark-Mode Hero */
[data-theme='dark'] .hero {
  background: linear-gradient(135deg, #1a2a32 0%, #0f1d24 100%);
}

/* ============================================================
   Default-State (Pre-Route): Top-5 Stops
   Sichtbar wenn keine Route aktiv ist; ersetzt leere Listenansicht.
   ============================================================ */
.default-state-card {
  border-left-color: #d4af37;   /* Gold-Akzent statt Orange */
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, var(--color-surface) 60%);
}
.default-state-badge {
  color: #b88a1a !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  font-size: 0.74rem !important;
}
.default-state-meta {
  color: #01696F;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.default-state-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.25;
  margin: 6px 0 2px;
}
.default-state-sub {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  margin-bottom: 8px;
}
.stop-card-default-prem {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #8a5a00;
  background: #FFF5DD;
  border: 1px solid #E8C977;
  border-radius: 3px;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}
.stop-card-default-bl {
  font-weight: 500;
  color: var(--color-text-muted);
}
.dark .default-state-card {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, var(--color-surface) 60%);
}
.dark .stop-card-default-prem {
  color: #FFD27A;
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.35);
}

/* Sheet-Count im Default-State: Gold statt Standard */
.count-badge-default {
  background: linear-gradient(135deg, #d4af37 0%, #b88a1a 100%) !important;
  color: #fff !important;
  font-weight: 700;
}

/* Marker-Highlight für die 5 Default-Stops auf der Karte.
   WICHTIG: KEINE transform/position/margin — siehe Kommentar bei .marker-premium.
   Box-shadow erzeugt sanften Pulse-Ring; ::after wäre risky wegen Leaflet-translate3d. */
/* v9.3-pin: Top-5-Pulse als drop-shadow auf SVG (folgt Tropfen-Form),
   statt box-shadow auf der rechteckigen Bounding-Box des Marker-Divs.
   Wirkt sowohl auf .esosta-tier-pin (SVG-Tropfen) als auch auf den
   runden Standard-Pin (Kreis im div). */
.marker-default-highlight {
  z-index: 1000 !important;
  animation: defaultMarkerPulse 2.4s ease-in-out infinite;
}
.marker-default-highlight svg,
.marker-default-highlight .marker {
  filter:
    drop-shadow(0 0 4px rgba(212, 175, 55, 0.95))
    drop-shadow(0 0 8px rgba(212, 175, 55, 0.55));
}
@keyframes defaultMarkerPulse {
  0%, 100% {
    filter: none;
  }
  50% {
    filter: none;
  }
}
@keyframes defaultPinGlow {
  0%, 100% {
    filter:
      drop-shadow(0 0 4px rgba(212, 175, 55, 0.95))
      drop-shadow(0 0 8px rgba(212, 175, 55, 0.55));
  }
  50% {
    filter:
      drop-shadow(0 0 6px rgba(212, 175, 55, 1))
      drop-shadow(0 0 14px rgba(212, 175, 55, 0.75));
  }
}
.marker-default-highlight svg,
.marker-default-highlight .marker {
  animation: defaultPinGlow 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .marker-default-highlight,
  .marker-default-highlight svg,
  .marker-default-highlight .marker {
    animation: none;
  }
}

/* ===== UI-Politur v=j: Progressive Disclosure ===== */
.hero-howto {
  margin: 12px 0 0 0;
  font-size: 14px;
  color: var(--text-secondary, #4a5568);
  line-height: 1.5;
  max-width: 52ch;
}

.advanced-toggle,
.more-filters-toggle {
  margin-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 12px;
}

.advanced-summary,
.more-filters-summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #4a5568);
  padding: 6px 0;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.advanced-summary::-webkit-details-marker,
.more-filters-summary::-webkit-details-marker {
  display: none;
}

.advanced-summary::before,
.more-filters-summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 11px;
  color: var(--text-tertiary, #718096);
}

.advanced-toggle[open] > .advanced-summary::before,
.more-filters-toggle[open] > .more-filters-summary::before {
  transform: rotate(90deg);
}

.advanced-summary:hover,
.more-filters-summary:hover {
  color: var(--text-primary, #1a202c);
}

.advanced-body,
.more-filters-body {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- Basemap-Tuning eSosta (Aug 2026) ------------------------------- */
/* OSM-Standardkacheln werden entsaettigt und aufgehellt, damit die
   teal-farbenen Marker und Routenlinien klar im Vordergrund stehen. */
.leaflet-tile.esosta-basemap {
  filter: saturate(0.32) brightness(1.1) contrast(0.9);
}
[data-theme='dark'] .leaflet-tile.esosta-basemap {
  filter: brightness(0.7) invert(1) contrast(0.9) hue-rotate(200deg) saturate(0.5);
}
