/* =========================================
   Reset & Custom Properties
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --green:       #1e8a3c;
  --green-light: #e6f4ea;
  --green-mid:   #34a853;
  --orange:      #9a5200;
  --orange-light:#fef3e2;
  --red:         #c5221f;
  --red-light:   #fce8e6;
  --blue:        #1a73e8;
  --blue-light:  #e8f0fe;
  --gray:        #5f6368;
  --gray-light:  #f1f3f4;
  --text:        #202124;
  --text-muted:  #5f6368;
  --bg:          #f0f4f8;
  --card-bg:     #ffffff;
  --border:      #e8eaed;
  --header-bg:   #ffffff;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.10);
  --shadow:      0 2px 8px rgba(0,0,0,0.10);
}

/* =========================================
   Base
   ========================================= */
html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: var(--blue);
  text-decoration: none;
}

/* =========================================
   App Shell
   ========================================= */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* =========================================
   Header
   ========================================= */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  box-shadow: var(--shadow-sm);
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon {
  width: 22px;
  height: 22px;
  color: var(--blue);
  flex-shrink: 0;
}

.header-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--gray);
  transition: background 0.15s;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
}

.header-action:hover,
.header-action:active {
  background: var(--gray-light);
}

.header-action svg {
  width: 22px;
  height: 22px;
}

/* =========================================
   Controls Bar
   ========================================= */
.controls-bar {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Fuel Tabs */
.fuel-tabs {
  display: flex;
  background: var(--gray-light);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.fuel-tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}

.fuel-tab.active {
  background: var(--card-bg);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

/* Sort Group */
.sort-group {
  display: flex;
  gap: 4px;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
  white-space: nowrap;
}

.sort-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.sort-btn.active {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
}

/* =========================================
   Main Content
   ========================================= */
.main-content {
  flex: 1;
  padding: 12px 12px 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
}

/* =========================================
   State Views (loading / error / setup)
   ========================================= */
.state-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 280px;
  text-align: center;
  padding: 32px 24px;
}

.state-view p {
  color: var(--text-muted);
  max-width: 280px;
}

.state-view h2 {
  font-size: 18px;
  color: var(--text);
}

.state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.state-icon svg {
  width: 28px;
  height: 28px;
}

.error-icon {
  background: var(--red-light);
  color: var(--red);
}

.setup-icon {
  background: var(--blue-light);
  color: var(--blue);
}

.location-icon {
  background: var(--green-light);
  color: var(--green);
}

.location-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 340px;
}

.location-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: var(--shadow-sm);
}

.location-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.location-error {
  color: var(--red);
  font-size: 13px;
  background: var(--red-light);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: center;
}

.btn-gps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-gps:hover {
  background: var(--gray-light);
}

/* ── Mode bar (Umkreis / Route) ── */
.mode-bar {
  display: flex;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 12px 10px;
  gap: 8px;
}

.mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.mode-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.mode-btn.active {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
}

/* ── Route bar ── */
.route-bar {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.route-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.route-field + .route-field {
  border-top: 1px solid var(--border);
}

.route-field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  width: 34px;
  flex-shrink: 0;
}

.route-field-value {
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-field-sep {
  text-align: center;
  padding: 0 0 0 46px;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 0.8;
  background: var(--gray-light);
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  padding: 4px 0 4px 46px;
}

.route-input {
  flex: 1;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  outline: none;
  min-width: 0;
}

.route-input::placeholder {
  color: var(--text-muted);
}

.btn-route-search {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ── Route summary ── */
.route-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-light);
  border: 1px solid rgba(26,115,232,0.2);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
}

.route-summary svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Route cost savings row ── */
.route-cost-msg {
  background: var(--blue-light);
  color: var(--blue);
}

/* ── Price timestamp (Feature 3) ── */
.price-timestamp {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 14px 6px;
  opacity: 0.8;
}

/* ── Navigation hint icon on card ── */
.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.nav-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--blue-light);
  border-radius: 50%;
  color: var(--blue);
}

.nav-hint svg {
  width: 14px;
  height: 14px;
}

/* ── Location bar (shown above station list) ── */
.location-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.location-bar svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--blue);
}

.location-label-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-change-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.location-change-btn:hover {
  background: var(--blue-light);
}

/* Spinner */
.spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Hidden utility */
.hidden {
  display: none !important;
}

/* =========================================
   List Meta (count + refresh)
   ========================================= */
.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}

#station-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  border-radius: 8px;
  transition: background 0.15s;
}

.refresh-btn:hover {
  background: var(--gray-light);
}

.refresh-btn svg {
  width: 15px;
  height: 15px;
}

/* =========================================
   Station Cards
   ========================================= */
#station-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#station-list > * {
  flex-shrink: 0;
}

.section-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 4px 4px;
}

.station-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: box-shadow 0.15s;
}

.station-card:active {
  box-shadow: var(--shadow);
}

/* Reference station (nearest open) */
.station-card.is-reference {
  border-color: var(--blue);
}

/* Price color classes */
.station-card.price-cheap {
  border-left: 4px solid var(--green-mid);
}

.station-card.price-mid {
  border-left: 4px solid #f4a61b;
}

.station-card.price-expensive {
  border-left: 4px solid var(--red);
}

.station-card.station-closed {
  opacity: 0.6;
  border-left: 4px solid var(--border);
}

/* Card Top Row */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 14px 0;
  gap: 12px;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-brand {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-address {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-distance {
  text-align: right;
  background: var(--gray-light);
  border-radius: 8px;
  padding: 4px 8px;
  line-height: 1.2;
}

.dist-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.dist-unit {
  font-size: 11px;
  color: var(--text-muted);
}

.dist-type {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.7;
  margin-top: 1px;
}

/* Price Row */
.card-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 10px;
}

.card-price {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1;
}

/* Color the price by class */
.price-cheap .card-price  { color: var(--green); }
.price-mid .card-price    { color: var(--orange); }
.price-expensive .card-price { color: var(--red); }

.price-unit {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  align-self: flex-end;
  padding-bottom: 3px;
}

.badge-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-left: auto;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-green {
  background: var(--green-light);
  color: var(--green);
}

.badge-blue {
  background: var(--blue-light);
  color: var(--blue);
}

/* Savings Row */
.savings-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px 13px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.4;
}

.savings-row .icon {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  margin-top: 1px;
}

.worth-it-msg {
  background: var(--green-light);
  color: var(--green);
}

.worth-it-msg strong {
  color: var(--green);
}

.not-worth-msg {
  background: var(--orange-light);
  color: var(--orange);
}

.expensive-msg {
  background: var(--red-light);
  color: var(--red);
}

.reference-msg {
  background: var(--blue-light);
  color: var(--blue);
}

.closed-msg {
  color: var(--text-muted);
  font-style: italic;
}

.savings-detail {
  font-size: 11.5px;
  opacity: 0.8;
  margin-top: 2px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover {
  background: #1557b0;
}

.btn-secondary {
  background: var(--gray-light);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-full {
  width: 100%;
}

/* =========================================
   Settings Page
   ========================================= */
.settings-main {
  padding: 16px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  margin-top: -8px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6368' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.input-with-unit {
  position: relative;
}

.input-with-unit input {
  padding-right: 90px;
}

.input-unit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-toggle {
  position: relative;
}

.input-with-toggle input {
  padding-right: 44px;
}

.toggle-visibility {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray);
  padding: 4px;
  display: flex;
  align-items: center;
}

.toggle-visibility svg {
  width: 18px;
  height: 18px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.form-hint a {
  color: var(--blue);
}

.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-info {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 20px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--red-light);
  color: var(--red);
  border: 1px solid rgba(197,34,31,0.2);
}

/* =========================================
   Back button (settings page)
   ========================================= */
.back-btn {
  color: var(--blue);
}

/* =========================================
   View-Toggle (Liste / Karte)
   ========================================= */
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 2px;
  flex-shrink: 0;
}
.view-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.view-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.view-btn.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* =========================================
   Karte
   ========================================= */
#map-container {
  height: calc(100dvh - 260px);
  min-height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0;
}

.map-pin {
  position: relative;
  background: var(--pin-bg, #555);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 7px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  width: 64px;
  text-align: center;
}
.map-pin::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--pin-bg, #555);
  border-bottom: none;
}

.map-popup {
  font-size: 14px;
  line-height: 1.4;
}
.map-popup-brand {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}
.map-popup-name {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 4px;
}
.map-popup-addr {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 6px;
}
.map-popup-price {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}
.map-popup-nav {
  display: block;
  background: var(--blue);
  color: #fff;
  text-align: center;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.map-popup-closed {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

/* =========================================
   Responsive (Tablet)
   ========================================= */
@media (min-width: 480px) {
  .app-shell {
    box-shadow: 0 0 40px rgba(0,0,0,0.12);
  }
}

/* =========================================
   Desktop (>= 960px) – Zweispaltenlayout
   ========================================= */
@media (min-width: 960px) {
  .app-shell {
    max-width: 100%;
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .app-header,
  .controls-bar,
  .mode-bar,
  #route-bar {
    flex-shrink: 0;
  }

  .main-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    padding: 0;
  }

  /* Nicht-Content-States: nur linke Spalte nutzen */
  #state-loading,
  #state-error,
  #state-location,
  #state-setup {
    width: 420px;
    flex-shrink: 0;
    align-self: flex-start;
    padding: 32px 24px;
    overflow-y: auto;
  }

  /* Content-State: volle Breite, Flex-Spalte */
  #state-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .location-bar,
  #route-summary,
  .list-meta {
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
  }

  /* Panels: linke Stationsliste + rechte Karte, füllt restliche Höhe */
  .content-panels {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    overflow: hidden;
  }

  #station-list {
    width: 420px;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    padding-bottom: 24px;
  }

  /* Rechte Spalte: Karte immer sichtbar */
  #map-container {
    flex: 1;
    min-width: 0;
    height: auto !important;
    min-height: unset !important;
    border-radius: 0 !important;
    display: block !important;
    margin-bottom: 0;
  }

  /* View-Toggle auf Desktop nicht nötig */
  .view-toggle { display: none; }

  .station-card { margin: 8px 12px; }
}
