/* ============================================================
   Travelman — Travel-Forward Design
   ============================================================ */

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

:root {
  /* ── Design System (DESIGN_GUIDELINE.md) ── */

  /* Hintergründe — helles Pastel */
  --bg-primary: #FAF8FF;
  --bg-secondary: #F0EDF8;
  --bg-elevated: #FFFFFF;

  /* Akzente — weiche Pasteltöne */
  --accent-primary: #7C6BE0;
  --accent-secondary: #5AB8A0;
  --accent-warm: #E88B8B;

  /* Text — dunkel auf hell */
  --text-primary: #2D2B3D;
  --text-secondary: #6E6B82;
  --text-muted: #9E9BB0;

  /* Oberflächen */
  --surface-card: rgba(255, 255, 255, 0.85);
  --surface-hover: rgba(124, 107, 224, 0.06);
  --surface-active: rgba(124, 107, 224, 0.12);

  /* Borders */
  --border-subtle: rgba(124, 107, 224, 0.10);
  --border-default: rgba(124, 107, 224, 0.18);
  --border-focus: var(--accent-primary);

  /* Gradienten */
  --gradient-hero: linear-gradient(135deg, #F0EDF8 0%, #E8E2F4 50%, #DDD6F0 100%);
  --gradient-cta: linear-gradient(135deg, #7C6BE0 0%, #9B8AEF 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(124, 107, 224, 0.10) 0%, transparent 70%);

  /* Typografie */
  --font-primary: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;

  /* Spacing */
  --max-width-content: 1200px;
  --max-width-narrow: 800px;
  --max-width-chat: 680px;
  --section-gap: 6rem;
  --section-gap-mobile: 3rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Radien */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;

  /* Animation */
  --transition-default: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Legacy-Aliases (alt → neu) ── */
  --bg:          var(--bg-primary);
  --card:        var(--bg-elevated);
  --accent:      var(--accent-primary);
  --accent-dark: var(--accent-primary);
  --accent-glow: var(--surface-active);
  --success:     var(--accent-secondary);
  --warning:     #E8A84C;
  --danger:      var(--accent-warm);
  --text:        var(--text-primary);
  --text-sub:    var(--text-secondary);
  --text-tertiary: var(--text-muted);
  --border:      var(--border-default);
  --shadow:      0 4px 24px rgba(124, 107, 224, 0.10);
  --cta:         var(--accent-primary);
  --cta-dark:    var(--accent-primary);
  --cta-glow:    var(--surface-active);
  --bg-subtle:   var(--bg-secondary);
  --bg-light:    var(--bg-secondary);
  --font-base:   var(--font-primary);
}

:root[data-theme="light"] {
  --bg-primary: #FAF8FF;
  --bg-secondary: #F0EDF8;
  --bg-elevated: #FFFFFF;
  --text-primary: #2D2B3D;
  --text-secondary: #6E6B82;
  --surface-card: rgba(255, 255, 255, 0.85);
  --border-subtle: rgba(124, 107, 224, 0.10);
  --border-default: rgba(124, 107, 224, 0.18);
  --shadow: 0 4px 24px rgba(124, 107, 224, 0.10);
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100dvh;
}

/* ============================================================ Layout */
.app-header {
  background: rgba(250, 248, 255, 0.88);
  backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  padding: 16px clamp(24px, 4vw, 60px);
  display: flex; align-items: center; gap: 12px;
}
.app-logo { font-size: 22px; font-weight: 800; color: var(--accent-dark); letter-spacing: -0.02em; }
.app-subtitle { color: var(--text-sub); font-size: 14px; }
.btn-my-travels {
  margin-left: auto;
  padding: 6px 14px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--accent); border-radius: 8px;
  background: transparent; color: var(--accent); cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-my-travels:hover { background: var(--accent); color: #fff; }

.btn-clear-data {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-sub);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-clear-data:hover { background: var(--bg); color: var(--danger); border-color: var(--danger); }

main { max-width: none; margin: 0; padding: 0 0 96px; }

/* Per-section width constraints */
#form-section, #progress {
  max-width: 700px;
  margin: 0 auto;
  padding: 32px 24px;
}
#route-builder {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}
#travel-guide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
}

.section { display: none; }
.section.active { display: block; }

/* ============================================================ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  border: none; text-decoration: none; transition: all .15s;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-subtle); border: 1px solid var(--border); color: var(--accent-dark); }
.btn-secondary:hover { background: var(--border); }
.btn-cta { background: var(--cta); color: #fff; box-shadow: 0 2px 10px var(--cta-glow); }
.btn-cta:hover { background: var(--cta-dark); transform: translateY(-1px); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }

.btn-icon {
  background: none; border: none; cursor: pointer; padding: 10px;
  border-radius: 6px; display: inline-flex; align-items: center;
  color: var(--text-sub); transition: background .1s;
  min-width: 44px; min-height: 44px; justify-content: center;
}
.btn-icon:hover { background: var(--border); }
.btn-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-icon.btn-danger { color: var(--danger); }

/* ============================================================ Step indicators */
.step-indicators { display: flex; gap: 0; margin-bottom: 32px; }
.step-indicator { flex: 1; display: flex; flex-direction: column; align-items: center; }
.step-indicator .step {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--border); color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px; transition: all .2s;
  box-shadow: 0 0 0 3px transparent;
}
.step-indicator .step.active { background: var(--accent); color: #fff; box-shadow: 0 0 0 3px var(--accent-glow); }
.step-indicator .step.done { background: var(--success); color: #fff; }
.step-indicator .step.done { cursor: pointer; }
.step-indicator .step.done:hover { filter: brightness(1.1); }
.step-indicator .step.done:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.step-indicator .step-label { font-size: 12px; color: var(--text-sub); margin-top: 4px; text-align: center; word-break: break-word; }
@media (max-width: 500px) {
  .step-indicator .step-label { font-size: 10px; }
  .step-indicator .step { width: 28px; height: 28px; font-size: 11px; }
}
.step-connector { flex: 1; height: 3px; background: var(--border); margin-top: 18px; }
.step-connector.done { background: var(--success); }

/* ============================================================ Form */
.form-step { display: none; }
.form-step.active { display: block; }
.form-section-title { font-size: 24px; font-weight: 800; margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; background: #fff; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}
.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: block;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-nav { display: flex; justify-content: space-between; margin-top: 32px; gap: 12px; }

/* Via points */
.via-point { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; }
.via-point-row { display: flex; gap: 8px; align-items: center; }
.via-point-row input { flex: 1; }

/* Adults/children counter */
.adults-counter { display: flex; align-items: center; gap: 16px; }
.adults-counter button { width: 44px; height: 44px; border-radius: 50%; background: var(--border); border: none; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.adults-counter button:hover { background: var(--accent); color: #fff; }
.adults-counter button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.adults-count { font-size: 20px; font-weight: 600; min-width: 24px; text-align: center; }
.child-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }

/* Travel style grid */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.style-card {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 14px 10px; cursor: pointer; text-align: center;
  transition: all .15s; background: #fff;
}
.style-card:hover { border-color: var(--accent); background: var(--bg-subtle); }
.style-card.selected { border-color: var(--accent); background: var(--bg-subtle); }
.style-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.style-icon { width: 28px; height: 28px; margin: 0 auto 8px; color: var(--accent); }
.style-label { font-size: 12px; font-weight: 500; }

/* Tags */
.tag-input-row { display: flex; gap: 8px; }
.tag-input-row input { flex: 1; }
.tags-container { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { background: var(--bg-subtle); color: var(--accent-dark); padding: 4px 10px; border-radius: 999px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.tag button { background: none; border: none; cursor: pointer; color: var(--accent-dark); font-size: 16px; line-height: 1; padding: 0; }

/* Sliders */
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type="range"] { flex: 1; cursor: pointer; }
.slider-display { font-weight: 600; min-width: 40px; }
.advanced-toggle {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-sub);
  padding: 4px 0; margin-bottom: 12px;
}
.advanced-toggle:hover { color: var(--accent-dark); }
.advanced-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.advanced-toggle svg { transition: transform .2s; }
.advanced-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.advanced-section { display: none; }
.advanced-section.open { display: block; }

/* Acc styles grid */
.acc-style-grid, .must-have-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.acc-style, .must-have {
  padding: 8px 16px; border: 2px solid var(--border); border-radius: 999px;
  cursor: pointer; font-size: 14px; background: #fff; transition: all .15s;
}
.acc-style.selected, .must-have.selected { border-color: var(--accent); background: var(--bg-subtle); color: var(--accent-dark); }
.acc-style:focus-visible, .must-have:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Summary */
.summary-grid { display: grid; gap: 12px; }
.summary-item { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.summary-label { color: var(--text-sub); font-size: 14px; min-width: 140px; }

/* ============================================================ Route builder */
.route-builder-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.badge { background: var(--bg-subtle); color: var(--accent-dark); padding: 3px 10px; border-radius: 999px; font-size: 13px; }

.built-stops { margin-bottom: 20px; }
.built-stops h3 { font-size: 15px; color: var(--text-sub); margin-bottom: 10px; }
.built-stop { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.built-stop-number { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.built-stop-info span { font-size: 13px; color: var(--text-sub); }

/* Recompute bar */
.recompute-bar {
  display: flex;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.recompute-bar input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #fff;
  color: var(--text);
}
.recompute-bar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* Route map (route builder) */
#route-map {
  height: clamp(300px, 40vh, 500px);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

/* Guide overview map */
#guide-map {
  height: clamp(360px, 50vh, 600px);
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 24px;
}

/* Leaflet markers — shared base */
.map-marker-num,
.map-marker-anchor {
  width: 28px; height: 28px; border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
/* Option markers: blue */
.map-marker-num { background: var(--accent); }
/* Start pin: green */
.map-marker-anchor.start-pin { background: #66BB6A; }
/* Segment-target pin: red */
.map-marker-anchor.target-pin { background: #EF5350; }

/* Leaflet Tooltip für Kartenmarker */
.map-marker-tooltip-wrap {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.map-marker-tooltip-wrap::before { display: none !important; }
.map-marker-tooltip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  min-width: 160px;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
  pointer-events: none;
}
.map-marker-tooltip strong { font-size: 14px; display: block; margin-bottom: 3px; }
.map-marker-tooltip .tooltip-teaser { color: var(--text-sub); margin-top: 4px; font-size: 12px; }

/* ============================================================ Hero Photo Component */
.hero-photo {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-subtle);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.hero-photo:hover img { transform: scale(1.03); }
.hero-photo--lg { height: 280px; }
.hero-photo--md { height: 200px; }
.hero-photo--sm { height: 140px; }
.hero-photo-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.hero-photo-loading {
  cursor: default;
}
.hero-photo-shimmer {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.hero-photo-error {
  display: none;
}

/* ============================================================ Route Builder Panels */
.route-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
}
.route-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.route-panel-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  flex: 1;
}
.route-panel-body {
  padding: 20px;
}
.route-builder-subtitle {
  color: var(--text-sub);
  font-size: 14px;
  margin-top: 4px;
}

/* ============================================================ Region Cards */
.region-cards-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.region-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
}
.region-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.region-card[draggable="true"] { cursor: grab; }
.region-card[draggable="true"]:active { cursor: grabbing; }
.region-card.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.region-card-body {
  padding: 16px 20px;
}
.region-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.region-card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.region-card-header h3 {
  flex: 1;
  font-size: 18px;
  margin: 0;
}
.region-teaser {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 10px;
  line-height: 1.5;
}
.region-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.region-highlights li {
  font-size: 13px;
  padding: 2px 0;
}
.region-highlights li::before {
  content: '• ';
  color: var(--accent);
}
.region-reason {
  font-size: 13px;
  color: var(--text-sub);
  font-style: italic;
}
.region-replace-form {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  gap: 8px;
  align-items: center;
}
.region-replace-form input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
}
.region-replace-form input:focus {
  outline: none;
  border-color: var(--accent);
}
.region-plan-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .region-plan-layout { grid-template-columns: 1fr; }
}
.region-map-panel #region-plan-map {
  height: 400px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  position: sticky;
  top: 80px;
}
.region-summary {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 16px;
  line-height: 1.6;
}
.region-actions {
  display: flex;
  gap: 8px;
}

/* No-stops-found card */
.no-stops-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}
.no-stops-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.no-stops-card p {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 16px;
}
.no-stops-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Option cards: flex-column, full width */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.option-card {
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 0; overflow: hidden; cursor: default; transition: all .15s;
}
.option-card-body { padding: 20px; cursor: pointer; }
/* Progressive streaming: cards fade in one by one */
.option-card-streaming {
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, border-color .15s, box-shadow .15s;
}
.option-card-streaming.visible { opacity: 1; transform: translateY(0); }
/* Skeleton placeholder cards while options stream in */
.option-skeleton {
  cursor: default; pointer-events: none;
  opacity: 1; transform: none;
}
.skeleton-badge  { height: 20px; width: 70px; border-radius: 999px; background: var(--border); margin-bottom: 10px; }
.skeleton-title  { height: 22px; width: 55%; border-radius: 4px; background: var(--border); margin-bottom: 10px; }
.skeleton-meta   { height: 14px; width: 40%; border-radius: 4px; background: var(--border); margin-bottom: 12px; }
.skeleton-line   { height: 13px; border-radius: 4px; background: var(--border); margin-bottom: 8px; }
.skeleton-line.short { width: 65%; }
.shimmer-elem {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-subtle) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.option-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.option-card.selected { background: var(--bg-subtle); border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.option-type-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  font-weight: 600; text-transform: uppercase;
}
.type-direct   { background: var(--bg-subtle); color: var(--accent-dark); }
.type-scenic   { background: #E8F5E9; color: #2E7D32; }
.type-cultural { background: #FFF3E0; color: #BF6C00; }
.type-via_point { background: #EDE7F6; color: #5E35B1; }
.type-budget      { background: var(--bg-subtle); color: var(--accent-dark); }
.type-comfort     { background: #E8F5E9; color: #2E7D32; }
.type-premium     { background: #FFF8E1; color: #C68A00; }
.type-geheimtipp  { background: #EDE7F6; color: #5E35B1; }
.option-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.option-card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.option-card h3 { font-size: 18px; margin-bottom: 6px; }
.option-meta { display: flex; gap: 12px; font-size: 13px; color: var(--text-sub); margin-bottom: 10px; }
.option-teaser { font-size: 14px; color: var(--text-sub); margin-bottom: 10px; }
.option-highlights { list-style: none; padding: 0; }
.option-highlights li { font-size: 13px; padding: 2px 0; }
.option-highlights li::before { content: '• '; color: var(--accent); }

/* Extra option fields */
.opt-extra-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.opt-extra-tag {
  background: var(--bg); padding: 2px 8px; border-radius: 999px;
  font-size: 12px; color: var(--text-sub);
}
.opt-extra-tag.family { background: #E8F5E9; color: #2E7D32; }
.opt-must-see { font-size: 13px; color: var(--text-sub); margin-top: 8px; width: 100%; }

/* Google Maps link in option card */
.option-maps-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}
.option-maps-link:hover { text-decoration: underline; }

.route-complete-msg { text-align: center; padding: 32px; }
.confirm-route-area { text-align: center; margin-top: 16px; }

/* Drive-time over-limit indicator */
.option-card.over-limit { border-color: var(--warning); }
.option-card.over-limit:hover { border-color: #D48A00; }
.drive-hours-over { color: var(--warning); font-weight: 600; }
.drive-over-limit-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: #FFF8E1; color: #8A6000;
  margin-bottom: 8px;
}

/* All-over-limit banner */
.all-over-limit-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #FFF8E1; border: 1px solid #E8C34A; border-radius: var(--radius);
  padding: 14px 20px; margin-bottom: 16px;
}
.all-over-limit-banner p { flex: 1; font-size: 14px; color: #8A6000; margin: 0; }

/* Segment-Kontext-Banner (Von → Nach) */
.segment-context-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text-secondary);
  grid-column: 1 / -1;
}
.segment-context-banner .segment-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  display: block;
}
.segment-context-banner .segment-from,
.segment-context-banner .segment-to {
  font-weight: 600;
  color: var(--text);
}
.segment-context-banner .segment-arrow {
  font-size: 20px;
  color: var(--accent);
}

/* Detour-Banner */
.detour-banner {
  background: #E3F2FD;
  border: 1px solid #90CAF9;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #1565C0;
  line-height: 1.5;
}
.detour-banner strong { display: block; margin-bottom: 4px; font-size: 14px; }

/* Route-adjust modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000; padding: 24px;
}
.modal-box {
  background: #fff; border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  padding: 28px; max-width: 480px; width: 100%;
  position: relative;
}
.modal-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--text-sub); line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal-desc { font-size: 14px; color: var(--text-sub); margin-bottom: 20px; }
.modal-option {
  border: 2px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px; cursor: pointer;
  transition: border-color .15s;
}
.modal-option:has(input:checked) { border-color: var(--accent); background: var(--bg-subtle); }
.modal-option-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.modal-option-header input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); }
.modal-option-desc { font-size: 13px; color: var(--text-sub); margin: 6px 0 0 26px; }
.modal-option-detail { margin: 10px 0 0 26px; font-size: 14px; }
.modal-option-detail select,
.modal-option-detail input[type=text] {
  margin-left: 8px; padding: 5px 10px; border: 1px solid var(--border);
  border-radius: 7px; font-size: 14px; background: #fff;
}
.modal-option-detail input[type=text] { margin-left: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ============================================================ Accommodation */
#accommodation {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding: 32px clamp(20px, 4vw, 60px);
  box-sizing: border-box;
}
.accommodation-header,
.acc-budget-info,
.accommodation-actions { max-width: 100%; }
.accommodation-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.acc-budget-info { background: var(--bg-subtle); border-radius: var(--radius-sm); padding: 14px 20px; margin-bottom: 20px; font-size: 14px; }
.budget-info-row { display: flex; justify-content: space-between; padding: 4px 0; }

.acc-stop-panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 24px; overflow: hidden; }
.acc-stop-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.acc-stop-num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.acc-stop-header h3 { flex: 1; font-size: 18px; }
.acc-nights { color: var(--text-sub); font-size: 14px; }

.acc-options-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 20px; }
.acc-option-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); cursor: pointer; transition: background .15s, box-shadow .15s;
  overflow: hidden;
}
.acc-option-card:hover { background: var(--bg); box-shadow: 0 4px 24px rgba(0,0,0,.12); }
.acc-option-card.selected { background: var(--bg-subtle); outline: 2px solid var(--accent); outline-offset: -2px; box-shadow: 0 0 0 4px var(--accent-glow); }

/* Hero photo: top panel inside hotel cards */
.acc-option-card .hero-photo,
.acc-option-card .hero-photo-loading {
  height: 180px;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Content panel */
.acc-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  min-width: 0;
  overflow: hidden;
}
.acc-card-body .geheimtipp-badge { margin-top: 0; }
.acc-card-body h4 { font-size: 15px; margin-bottom: 4px; padding-top: 0; }
.acc-card-body .acc-links-row { margin-top: auto; padding-top: 8px; padding-left: 0; padding-right: 0; }
.acc-card-body .acc-description { padding: 0; margin-bottom: 10px; }
.acc-card-body .acc-features { padding-bottom: 0; }
.acc-card-body .acc-geheimtipp-hint { margin: 6px 0 10px; }

.acc-type-badge { display: inline-block; background: var(--border); padding: 2px 8px; border-radius: 999px; font-size: 11px; margin-bottom: 8px; }
.acc-stars { color: #E8A84C; margin-bottom: 6px; }
.acc-price { margin-bottom: 4px; }
.acc-price strong { font-size: 18px; color: var(--accent-dark); }
.acc-price span { font-size: 13px; color: var(--text-sub); }
.acc-total { font-size: 13px; color: var(--text-sub); margin-bottom: 8px; }
.acc-teaser { font-size: 13px; color: var(--text-sub); margin-bottom: 8px; }
.acc-description { font-size: 13px; color: var(--text-sub); line-height: 1.6; margin-bottom: 12px; padding: 0 20px; }
.acc-features { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 12px; }
.feature-tag { background: var(--bg); padding: 2px 7px; border-radius: 999px; font-size: 11px; }
.feature-tag.must-have { background: var(--bg-subtle); color: var(--accent-dark); font-weight: 600; }

.geheimtipp-badge { display: inline-block; background: #EDE7F6; color: #5E35B1; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; }

.acc-geheimtipp-card { outline: 2px solid #AB8ED6; outline-offset: -2px; background: #F8F4FF; }
.acc-geheimtipp-card:hover { background: #F0EAFC; }
.acc-geheimtipp-card.selected { background: #E6DAFA; outline-color: #5E35B1; }

.acc-links-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 20px 14px; margin-top: auto; }

.acc-booking-link {
  display: inline-block;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  background: #5C7CBA;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
}
.acc-booking-link:hover { background: #4A6AA8; }
.acc-booking-search { background: #7C6BE0; }
.acc-booking-search:hover { background: #6558C4; }

.acc-website-link {
  display: inline-block;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
}
.acc-website-link:hover { background: var(--bg-subtle); }

.acc-geheimtipp-hint {
  margin: 6px 20px 10px;
  font-size: 12px;
  color: #5E35B1;
  font-style: italic;
  line-height: 1.4;
}

.acc-resarch-row { display: flex; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid var(--border); background: var(--bg-subtle); }
.acc-resarch-input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; }
.acc-resarch-input:focus { outline: none; border-color: var(--accent); }
.acc-error { padding: 20px; color: var(--danger); font-size: 13px; }

.acc-guide-description { font-size: 13px; color: var(--text-sub); line-height: 1.6; margin-top: 10px; }
.acc-guide-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.accommodation-actions { display: flex; justify-content: space-between; margin-top: 24px; }

@media (min-width: 1100px) {
  .acc-options-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  #accommodation { padding-left: 16px; padding-right: 16px; }
  .acc-options-grid { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
  .acc-option-card .hero-photo,
  .acc-option-card .hero-photo-loading { height: 160px; }
}

/* ============================================================ Progress */
.progress-header { margin-bottom: 24px; }
.progress-agent-status { background: var(--bg-subtle); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 20px; font-size: 14px; color: var(--text-sub); }
.progress-wait-hint {
  font-size: 13px; color: var(--text-sub);
  margin-bottom: 20px;
}
.progress-timeline { }
.timeline-stop { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.timeline-stop.done .timeline-dot { background: var(--success); }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border); flex-shrink: 0; margin-top: 4px; }
.timeline-content { flex: 1; }
.timeline-content h4 { font-size: 16px; margin-bottom: 6px; }
.timeline-status { }
.timeline-item { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 0; }
.timeline-item.done { color: var(--success); }

/* ============================================================ Travel guide */
.guide-tabs {
  display: flex; gap: 0; border-bottom: 2px solid var(--border);
  background: none; border-radius: 0;
  padding: 0; margin-bottom: 24px;
  overflow-x: auto; scrollbar-width: none;
}
.guide-tabs::-webkit-scrollbar { display: none; }
.guide-tab {
  padding: 10px 20px; border-radius: 0; font-size: 14px; font-weight: 500; cursor: pointer;
  background: none; border: none; color: var(--text-sub);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s;
  white-space: nowrap;
}
.guide-tab:hover { color: var(--accent-dark); }
.guide-tab.active {
  color: var(--accent-dark); font-weight: 600;
  border-bottom-color: var(--accent);
  background: none; box-shadow: none;
}

/* Overview */
.overview-hero { text-align: center; padding: 32px 0; }
.overview-hero h2 { font-size: 28px; margin-bottom: 8px; }
.overview-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
@media (max-width: 600px) { .overview-stats { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-value { font-size: 22px; font-weight: 700; color: var(--accent-dark); }
.stat-label { font-size: 13px; color: var(--text-sub); }
.overview-route { background: var(--card); border-radius: var(--radius); padding: 24px; margin-top: 24px; }
.overview-route h3 { margin-bottom: 16px; }
.route-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.route-point { background: var(--bg-subtle); padding: 8px 14px; border-radius: 999px; font-size: 14px; text-align: center; }
.route-point.start { background: var(--accent); color: #fff; }
.route-point small { display: block; font-size: 11px; opacity: .7; }
.route-arrow { color: var(--text-sub); font-size: 18px; }

/* ============================================================ Stops layout (2-column with sidebar) */
.stops-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}
@media (min-width: 1100px) {
  .stops-layout { grid-template-columns: 240px 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .stops-layout { grid-template-columns: 1fr; }
  .stops-sidebar { display: none; }
}

.stops-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 0;
}
.stops-sidebar-inner { display: flex; flex-direction: column; }
.stops-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stops-sidebar-item:hover { background: var(--bg); }
.stops-sidebar-item.active { border-left-color: var(--accent); background: var(--bg-subtle); color: var(--accent-dark); font-weight: 500; }
.sidebar-stop-num {
  background: var(--border);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stops-sidebar-item.active .sidebar-stop-num { background: var(--accent); color: #fff; }
.sidebar-stop-label { overflow: hidden; text-overflow: ellipsis; }

.stops-main { min-width: 0; }

/* Stops */
.stop-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }

/* Collapsible stop header (now a button) */
.stop-toggle {
  width: 100%;
  padding: 20px;
  background: rgba(240, 237, 248, .95);
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background .12s;
  position: sticky; top: 56px; z-index: 10;
  backdrop-filter: blur(8px);
}
.stop-toggle:hover { background: rgba(221, 214, 240, .95); }
.stop-header-left { flex: 1; min-width: 0; }
.stop-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.stop-toggle-arrow { font-size: 12px; color: var(--text-sub); transition: transform .2s; flex-shrink: 0; }
.stop-toggle[aria-expanded="true"] .stop-toggle-arrow { /* arrow text handled in JS */ }

.stop-header h3 { font-size: 20px; margin: 6px 0 4px; }
.stop-number { font-size: 11px; font-weight: 600; color: var(--text-sub); text-transform: uppercase; }
.stop-meta { font-size: 13px; color: var(--text-sub); }
.maps-link { font-size: 12px; color: var(--accent); text-decoration: none; margin-top: 4px; display: inline-block; }

/* Collapsible body */
.stop-body { }
.stop-body > .hero-photo-loading { display: block; }

/* Stop Overview Map */
.stop-overview-map {
  height: clamp(280px, 35vh, 420px);
  border-radius: var(--radius);
  margin: 16px 20px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

/* Stop Map Pins */
.stop-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  font-size: 14px;
  line-height: 1;
  transition: transform .15s ease;
  cursor: pointer;
  user-select: none;
}
.stop-map-pin:hover { transform: scale(1.2); z-index: 10; }

.pin-hotel {
  width: 34px; height: 34px;
  background: #1E40AF;
  color: #fff;
  font-size: 16px;
}
.pin-activity {
  width: 28px; height: 28px;
  background: #D97706;
  color: #fff;
}
.pin-restaurant {
  width: auto; height: 28px;
  min-width: 28px;
  background: #DC2626;
  color: #fff;
  border-radius: 14px;
  padding: 0 8px;
  gap: 3px;
  font-size: 12px;
  white-space: nowrap;
}

/* Stop Map Popup (InfoWindow) */
.stop-map-popup {
  min-width: 160px;
  max-width: 240px;
  font-size: 13px;
  line-height: 1.4;
  padding: 4px 0;
}
.stop-map-popup strong { display: block; margin-bottom: 4px; font-size: 14px; }
.stop-map-popup .popup-meta { color: #666; font-size: 12px; }
.stop-map-popup .popup-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 4px; font-size: 12px; color: #555;
}
.stop-map-popup .popup-badge {
  display: inline-block; background: #e8f5e9; color: #2e7d32;
  font-size: 11px; padding: 1px 6px; border-radius: 8px; margin-top: 4px;
}

/* Highlight flash for click-to-scroll */
@keyframes highlightFlash {
  0%   { box-shadow: 0 0 0 0 rgba(59,130,246,.5); }
  50%  { box-shadow: 0 0 0 6px rgba(59,130,246,.25); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}
.highlight-flash { animation: highlightFlash .8s ease-out; }

/* Section collapse (<details>) inside stop body */
.stop-section-collapse { border-bottom: 1px solid var(--border); }
.stop-section-summary {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.stop-section-summary::-webkit-details-marker { display: none; }
.stop-section-summary::before { content: ''; display: inline-block; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid currentColor; transition: transform .2s; flex-shrink: 0; }
details[open] > .stop-section-summary::before { transform: rotate(90deg); }
.stop-section-collapse .stop-activities,
.stop-section-collapse .stop-restaurants { border-bottom: none; }

.stop-accommodation, .stop-activities, .stop-restaurants { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.stop-accommodation h4, .stop-activities h4, .stop-restaurants h4 { font-size: 14px; font-weight: 600; color: var(--text-sub); text-transform: uppercase; margin-bottom: 12px; }
.acc-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.acc-type-tag, .acc-price-tag { background: var(--bg); padding: 3px 10px; border-radius: 999px; font-size: 13px; }
.acc-price-tag { background: var(--bg-subtle); color: var(--accent-dark); font-weight: 600; }
.booking-link { font-size: 13px; color: var(--accent); text-decoration: none; }

.acc-alt-options { margin-top: 12px; }
.acc-alt-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.acc-alt-item {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  transition: transform .15s, box-shadow .15s;
}
.acc-alt-item:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.acc-alt-item .hero-photo,
.acc-alt-item .hero-photo-loading {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
.acc-alt-summary {
  padding: 10px 12px 0;
  min-width: 0;
}
.acc-alt-summary strong { display: block; font-size: 14px; margin-bottom: 6px; }
.acc-alt-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-alt-item .acc-guide-links { padding: 8px 12px 10px; margin-top: auto; }

.activities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.activity-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.activity-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.activity-card .hero-photo,
.activity-card .hero-photo-loading {
  height: 140px;
}
.activity-content { padding: 12px; }
.activity-content strong { display: block; font-size: 14px; margin-bottom: 4px; }
.activity-content p { font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }
.activity-meta { font-size: 12px; color: var(--text-sub); }

.restaurants-list { display: flex; flex-direction: column; gap: 10px; }
.restaurant-item { padding: 10px; background: var(--bg-subtle); border-radius: var(--radius-sm); }
.restaurant-item strong { font-size: 14px; }
.cuisine-tag, .price-range, .family-tag { background: var(--bg); padding: 2px 8px; border-radius: 999px; font-size: 12px; margin-left: 6px; }
.family-tag { background: #E8F5E9; color: #2E7D32; }
.rest-notes { font-size: 13px; color: var(--text-sub); margin-top: 4px; }

/* Day plan */
.day-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 12px; }
.day-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.day-number { background: var(--accent); color: #fff; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.day-date { color: var(--text-sub); font-size: 13px; }
.day-type-badge { background: var(--bg); padding: 2px 8px; border-radius: 999px; font-size: 11px; text-transform: uppercase; }
.day-card h3 { font-size: 16px; margin-bottom: 6px; }
.day-card p { font-size: 14px; color: var(--text-sub); }
.day-route { font-size: 13px; color: var(--text-sub); margin-top: 8px; }
.day-card.type-drive { border-left: 4px solid var(--accent); }
.day-card.type-rest  { border-left: 4px solid var(--success); }
.day-card.type-activity { border-left: 4px solid var(--warning); }
.day-card.type-mixed { border-left: 4px solid #7C6BE0; }

/* Budget */
.budget-total { text-align: center; padding: 32px; }
.budget-amount { font-size: 40px; font-weight: 700; color: var(--accent-dark); }
.budget-label { font-size: 14px; color: var(--text-sub); }
.budget-breakdown { background: var(--card); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.budget-row { display: grid; grid-template-columns: 140px 1fr 100px 50px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.budget-row:last-child { border-bottom: none; }
.budget-row-label { font-size: 14px; }
.budget-bar-wrap { background: var(--border); border-radius: 999px; height: 8px; overflow: hidden; }
.budget-bar { height: 100%; border-radius: 999px; transition: width .6s; }
.budget-row-amount { font-size: 14px; font-weight: 500; text-align: right; }
.budget-row-pct { font-size: 12px; color: var(--text-sub); }
.budget-remaining { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-radius: var(--radius); margin-bottom: 20px; }
.budget-remaining.positive { background: #E8F5E9; }
.budget-remaining.negative { background: #FFEBEE; }
.budget-remaining strong { font-size: 20px; font-weight: 700; }
.output-actions { background: var(--card); border-radius: var(--radius); padding: 20px; }
.output-actions h3 { margin-bottom: 14px; }
.output-actions .btn { margin-right: 10px; }

/* ============================================================ Shimmer */
.shimmer-card {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-subtle) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
  min-height: 180px;
}
.shimmer-line {
  height: 14px; border-radius: 999px; margin: 6px 0;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-subtle) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.shimmer-line.short { width: 60%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================ Loading / error */
.loading-spinner { text-align: center; padding: 48px; color: var(--text-sub); }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg { background: #FFEBEE; border-radius: 8px; padding: 16px; color: var(--danger); margin: 16px 0; }

/* ============================================================ Debug panel */
.debug-panel { position: fixed; bottom: 0; left: 0; right: 0; background: #1a1a1e; color: #e0e0e0; font-family: monospace; font-size: 12px; max-height: 0; overflow: hidden; transition: max-height .3s; z-index: 999; }
.debug-panel.open { max-height: 260px; }
.debug-toggle { position: fixed; bottom: 16px; right: 16px; background: #1a1a1e; color: #e0e0e0; border: none; border-radius: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer; z-index: 1000; }
.debug-panel-header { display: flex; justify-content: space-between; padding: 8px 16px; border-bottom: 1px solid #333; }
#debug-log { padding: 8px 16px; height: 200px; overflow-y: auto; }
.log-line { padding: 1px 0; }
.log-info    { color: #60cdff; }
.log-success { color: #6de67a; }
.log-warning { color: #ffd966; }
.log-error   { color: #ff6b6b; }
.log-agent   { color: #cf86ff; }
.log-api     { color: #80d0ff; }
.log-debug   { color: #a0a0a0; }

/* Restaurant items — thumbnail-left layout */
.restaurant-item {
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
}
.restaurant-item > div:last-child {
  flex: 1;
  padding: 10px 12px;
  min-width: 0;
}
.restaurant-item .hero-photo,
.restaurant-item .hero-photo-loading {
  width: 100px;
  min-width: 100px;
  height: auto;
  min-height: 100%;
}

/* ============================================================ Lightbox */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000; flex-direction: column; gap: 12px; padding: 24px; cursor: pointer;
}
.lightbox-img { max-width: 92vw; max-height: 80vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.6); cursor: default; }
.lightbox-caption { color: rgba(255,255,255,.8); font-size: 14px; text-align: center; }
.lightbox-close {
  position: absolute; top: 16px; right: 20px; background: rgba(0,0,0,.4);
  border: none; color: #fff; cursor: pointer; opacity: .85;
  border-radius: 8px; padding: 8px; display: flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
}
.lightbox-close:hover { opacity: 1; background: rgba(0,0,0,.65); }
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); border: none; color: #fff;
  font-size: 56px; line-height: 1; padding: 8px 18px;
  cursor: pointer; border-radius: 8px;
  backdrop-filter: blur(4px); transition: background .15s;
  z-index: 1; user-select: none;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.28); }

.lightbox-counter {
  color: rgba(255,255,255,.65); font-size: 13px;
  position: absolute; bottom: 16px;
  left: 50%; transform: translateX(-50%);
}
.lightbox-overlay[data-single="true"] .lightbox-prev,
.lightbox-overlay[data-single="true"] .lightbox-next,
.lightbox-overlay[data-single="true"] .lightbox-counter { display: none; }

/* ============================================================ Loading overlay */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  z-index: 8000;
  display: flex; align-items: center; justify-content: center;
  animation: loading-fadein .15s ease;
}
.loading-overlay.cta-mode .loading-progress-fill { background: var(--cta); }
@keyframes loading-fadein { from { opacity: 0; } to { opacity: 1; } }

.loading-overlay-inner {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 32px 40px;
  background: rgba(255,255,255,.10);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  min-width: 240px; max-width: 360px; text-align: center;
}

.loading-overlay-inner .spinner {
  border-color: rgba(255,255,255,.3);
  border-top-color: #ffffff;
  margin: 0;
}

.loading-progress-bar {
  width: 100%; height: 4px;
  background: rgba(255,255,255,.25);
  border-radius: 999px; overflow: hidden;
}
.loading-progress-fill {
  height: 100%; border-radius: 999px;
  background: #ffffff; width: 40%;
}
.loading-progress-fill.loading-progress-indeterminate {
  animation: loading-indeterminate 1.4s ease-in-out infinite;
}
@keyframes loading-indeterminate {
  0%   { transform: translateX(-250%); width: 40%; }
  50%  { transform: translateX(300%);  width: 40%; }
  100% { transform: translateX(300%);  width: 40%; }
}

.loading-label {
  color: #ffffff; font-size: 15px; font-weight: 500; line-height: 1.4;
}
.loading-counter {
  color: rgba(255,255,255,.65); font-size: 13px;
}

/* ============================================================ Quick-submit sticky bar */
.quick-submit-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  display: none; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px clamp(24px, 4vw, 60px);
  background: rgba(250, 248, 255, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(124, 107, 224, 0.08);
}
.quick-submit-bar.visible { display: flex; }
.quick-submit-hint { font-size: 14px; color: var(--text-sub); }
.quick-submit-btn { padding: 12px 28px; font-size: 16px; }

@media (max-width: 600px) {
  .quick-submit-hint { display: none; }
  .quick-submit-btn { width: 100%; justify-content: center; }
}

/* ============================================================ Budget sliders (Step 5) */
.budget-split-group { }
.form-hint { font-size: 13px; color: var(--text-sub); margin: -4px 0 12px; }
.budget-slider-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.budget-slider-label { width: 120px; font-size: 14px; }
.budget-slider-row input[type=range] { flex: 1; cursor: pointer; }
.budget-total-check { font-size: 14px; margin-top: 8px; color: var(--text-sub); }
.budget-total-check.invalid { color: var(--danger); }
.budget-preview { font-size: 13px; color: var(--text-sub); margin-top: 6px; }

/* Budget visual bar */
.budget-visual-bar {
  height: 8px; border-radius: 999px; overflow: hidden;
  display: flex; background: var(--border); margin-top: 8px;
}
.bvb-segment { height: 100%; transition: width .3s ease; }
.bvb-acc  { background: var(--accent); }
.bvb-food { background: var(--warning); }
.bvb-act  { background: var(--cta); }

/* Button spinner */
.btn-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: middle;
}

/* ============================================================ Settings menu */
.header-settings { position: relative; }
.settings-btn { background: none; border: none; cursor: pointer; color: var(--text-sub); padding: 10px; border-radius: 6px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.settings-btn:hover { background: var(--bg-subtle); }
.settings-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(124, 107, 224, .12); min-width: 220px;
  padding: 12px; z-index: 500;
}
.settings-menu-title { font-weight: 600; font-size: 13px; color: var(--text-sub); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .05em; }
.settings-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--bg-subtle); }
.settings-item:last-child { border-bottom: none; }
.settings-item label { font-size: 14px; color: var(--text); }
.settings-item select { font-size: 14px; border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; }

/* ============================================================ Travels drawer */
.travels-drawer-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  z-index:7000; opacity:0; pointer-events:none; transition:opacity .25s;
}
.travels-drawer-overlay.open { opacity:1; pointer-events:auto; }

.travels-drawer {
  position:fixed; top:0; right:0; bottom:0;
  width:440px; max-width:95vw; background:var(--card);
  box-shadow:-4px 0 32px rgba(0,0,0,.15);
  transform:translateX(100%); transition:transform .3s cubic-bezier(.4,0,.2,1);
  display:flex; flex-direction:column; z-index:7001; overflow:hidden;
}
.travels-drawer.open { transform:translateX(0); }

.travels-drawer-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 24px; border-bottom:1px solid var(--border); flex-shrink:0;
}
.travels-drawer-header h2 { font-size:20px; font-weight:700; }

.travels-list { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px; }

.travel-card {
  background:var(--bg); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px; display:flex; align-items:center; gap:12px;
}
.travel-card-body { flex:1; min-width:0; }
.travel-card-title {
  font-weight:600; font-size:15px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-bottom:6px;
}
.travel-card-meta { display:flex; flex-wrap:wrap; gap:8px; font-size:13px; color:var(--text-sub); }
.travel-card-actions { display:flex; gap:8px; flex-shrink:0; }

.travels-loading, .travels-empty { text-align:center; color:var(--text-sub); font-size:14px; padding:32px 16px; }
.travels-error { text-align:center; color:var(--danger); font-size:14px; padding:32px 16px; }

/* ========================================================= SSE Progress Overlay */
.spo-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 8500;
  display: flex; align-items: center; justify-content: center;
  animation: loading-fadein .2s ease;
  padding: 24px;
}
.spo-card {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  width: 100%; max-width: 480px; max-height: 70vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.spo-progress-bar { height: 3px; background: var(--border); overflow: hidden; flex-shrink: 0; }
.spo-progress-fill { height: 100%; background: var(--accent); width: 40%; }
.spo-progress-indeterminate { animation: loading-indeterminate 1.4s ease-in-out infinite; }
.spo-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.spo-logo  { font-size: 15px; font-weight: 700; color: var(--accent); }
.spo-phase { font-size: 13px; color: var(--text-sub); font-weight: 500; }
.spo-lines {
  padding: 12px 20px 16px; overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 10px;
}
.spo-line { display: flex; align-items: flex-start; gap: 10px; animation: spo-line-in .25s ease; }
@keyframes spo-line-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.spo-line-icon {
  flex-shrink: 0; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.spo-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin .7s linear infinite;
}
.spo-check { width: 16px; height: 16px; color: var(--success); }
.spo-line-text   { font-size: 14px; color: var(--text); line-height: 1.4; flex: 1; }
.spo-line-detail { font-size: 13px; color: var(--text-sub); margin-left: 4px; }
.spo-line.done .spo-line-text { color: var(--text-sub); }

/* ============================================================ Skip card */
.skip-card {
  border: 2px dashed var(--border);
  background: var(--bg-light);
  opacity: .88;
}
.skip-card:hover { border-color: var(--accent); opacity: 1; }
.skip-icon { background: var(--bg); border: 2px solid var(--border); color: var(--text-sub); font-size: 16px; }
.skip-bonus-badge {
  background: #E8F5E9; color: #2E7D32;
  font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
}

/* ============================================================ Guide header row */
.guide-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px;
}
.guide-header-row h2 { margin-bottom: 0; }
.replan-btn {
  white-space: nowrap; flex-shrink: 0;
}

/* Travel card error */
.travel-card-error {
  font-size: 12px; color: var(--danger);
  padding: 6px 12px; margin-top: 6px;
}

/* Travel card badge */
.travel-card-badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  background: #E8F5E9; color: #2E7D32;
  padding: 1px 7px; border-radius: 99px;
  vertical-align: middle; margin-left: 4px;
}

/* Rename + Stars */
.travel-card-title { cursor: pointer; }
.travel-card-title:hover { color: var(--accent); }

.travel-card-rename-input {
  font: inherit; font-size: 15px; font-weight: 600;
  width: 100%; border: none; border-bottom: 1.5px solid var(--accent);
  background: transparent; color: var(--text); outline: none; padding: 0; margin: 0;
}

.travel-card-rating { margin: 4px 0 6px; line-height: 1; }
.travel-stars { display: inline-flex; gap: 2px; }
.travel-star {
  font-size: 18px; cursor: pointer; color: var(--text-sub);
  transition: color .1s, transform .1s; user-select: none; line-height: 1;
}
.travel-star:hover, .travel-star.active { color: #E8A84C; }
.travel-star:hover { transform: scale(1.15); }

/* ============================================================ Reiseführer */
.reisefuehrer-section {
  margin: 20px 0;
  padding: 20px;
  background: linear-gradient(135deg, #F0EDF8 0%, #FAF8FF 100%);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.reisefuehrer-title {
  font-size: 16px; font-weight: 700; color: var(--accent);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.reisefuehrer-title::before { content: ''; }
.guide-intro {
  margin-bottom: 16px;
}
.guide-intro p {
  font-size: 15px; line-height: 1.7; color: var(--text);
  margin-bottom: 8px;
}
.guide-collapse {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--card);
  overflow: hidden;
}
.guide-collapse summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600; font-size: 14px;
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  color: var(--text);
  user-select: none;
}
.guide-collapse summary::-webkit-details-marker { display: none; }
.guide-collapse summary::before {
  content: ''; display: inline-block; width: 0; height: 0;
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent);
  transition: transform .2s; flex-shrink: 0;
}
.guide-collapse[open] summary::before { transform: rotate(90deg); }
.guide-collapse-body {
  padding: 0 16px 14px;
}
.guide-collapse-body p {
  font-size: 14px; line-height: 1.65; color: var(--text);
  margin-bottom: 6px;
}

/* ============================================================ Weitere Empfehlungen */
.further-activities-section {
  margin: 20px 0;
}
.further-activities-section h4 {
  font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--text);
}
.further-activities-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.further-activity-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.further-activity-item .hero-photo,
.further-activity-item .hero-photo-loading {
  width: 120px;
  min-width: 120px;
  height: auto;
  min-height: 100%;
}
.further-activity-content {
  flex: 1;
  padding: 12px;
  min-width: 0;
}
.further-activity-content strong { font-size: 14px; display: block; margin-bottom: 4px; }
.further-activity-content p { font-size: 13px; color: var(--text-sub); margin-bottom: 6px; }

/* ============================================================ Tagesbeispiele */
.stop-day-examples { margin: 20px 0; }
.stop-day-examples > h4 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.day-example-collapse {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--card);
  overflow: hidden;
}
.day-example-collapse summary {
  padding: 14px 16px;
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 10px;
  user-select: none;
}
.day-example-collapse summary::-webkit-details-marker { display: none; }
.day-example-label {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: #E8E2F4; padding: 2px 8px; border-radius: 99px; white-space: nowrap;
}
.day-example-title { font-size: 14px; font-weight: 600; color: var(--text); }
.day-example-body { padding: 0 16px 16px; }
.day-example-desc { font-size: 14px; color: var(--text-sub); margin-bottom: 14px; line-height: 1.55; }

/* ============================================================ Zeitstrahl */
.day-timeblocks { padding: 4px 0; }
.timeblocks-timeline {
  position: relative;
  padding-left: 80px;
  border-left: 2px solid var(--border);
  margin-left: 40px;
  display: flex; flex-direction: column; gap: 0;
}
.time-block {
  position: relative;
  padding: 10px 0 10px 16px;
  border-bottom: 1px solid #E8E2F4;
}
.time-block:last-child { border-bottom: none; }
.time-block-time {
  position: absolute;
  left: -96px; top: 12px;
  font-size: 12px; font-weight: 700; color: var(--text-sub);
  width: 50px; text-align: right;
}
.time-block-dot {
  position: absolute;
  left: -5px; top: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid var(--card);
  background: var(--accent);
}
.time-block.type-drive .time-block-dot   { background: var(--accent); }
.time-block.type-meal .time-block-dot    { background: var(--warning); }
.time-block.type-activity .time-block-dot { background: var(--success); }
.time-block.type-break .time-block-dot  { background: var(--text-sub); }
.time-block.type-check_in .time-block-dot { background: #7C6BE0; }

.time-block-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.time-block-icon { font-size: 14px; }
.time-block-header strong { font-size: 14px; flex: 1; }
.time-block-duration {
  font-size: 11px; color: var(--text-sub);
  background: var(--bg); padding: 1px 6px; border-radius: 99px;
  white-space: nowrap;
}
.time-block-location {
  font-size: 12px; color: var(--text-sub); margin-bottom: 4px;
}
.time-block-desc {
  font-size: 13px; color: var(--text); line-height: 1.5; margin-bottom: 4px;
}
.time-block-price {
  font-size: 12px; font-weight: 600; color: var(--text-sub);
  margin-right: 8px;
}
.time-block-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tb-link {
  font-size: 12px; color: var(--accent); text-decoration: none;
  border: 1px solid var(--accent); border-radius: 4px; padding: 1px 6px;
  transition: background .15s, color .15s;
}
.tb-link:hover { background: var(--accent); color: #fff; }

.time-block.type-drive   { background: #E3F2FD; }
.time-block.type-meal    { background: #FFF3E0; }
.time-block.type-activity { background: #E8F5E9; }
.time-block.type-break   { background: #F5F5F5; }
.time-block.type-check_in { background: #EDE7F6; }

/* ── Reise-Analyse ─────────────────────────────────────── */
/* ── Reise-Analyse ─────────────────────────────────────── */
.trip-analysis {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 2px solid #E0DBF0;
}
.trip-analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.trip-analysis-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

/* Score chip next to title */
.ta-score-chip {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid;
  font-weight: 700;
  white-space: nowrap;
}
.ta-score-num  { font-size: 1.4rem; line-height: 1; }
.ta-score-denom { font-size: 0.85rem; opacity: 0.7; }
.ta-score-label { font-size: 0.85rem; font-weight: 600; margin-left: 4px; }

/* Cards */
.trip-analysis-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}
.trip-analysis-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 14px;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.trip-analysis-text {
  color: var(--text);
  line-height: 1.65;
  margin: 0;
  font-size: 0.95rem;
}
.ta-summary { margin-top: 12px; }

/* Requirement keyword highlight */
strong.req-keyword {
  font-weight: 700;
  color: var(--accent-dark);
}

/* Requirement tags row */
.req-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.req-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  white-space: nowrap;
}
.req-tag-route    { background: var(--bg-subtle); color: var(--accent-dark); }
.req-tag-meta     { background: var(--bg); color: var(--text); }
.req-tag-budget   { background: #E8F5E9; color: #2E7D32; }
.req-tag-style    { background: #FFF3E0; color: #BF6C00; }
.req-tag-must     { background: #FFEBEE; color: #C62828; }
.req-tag-acc      { background: #EDE7F6; color: #5E35B1; }
.req-tag-activity { background: #E3F2FD; color: #1565C0; }

/* Score bar */
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.score-bar-track {
  flex: 1;
  height: 10px;
  background: #E0DBF0;
  border-radius: 5px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.7s ease;
}
.score-label {
  font-size: 1rem;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

/* SWOT */
.trip-analysis-swot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .trip-analysis-swot { grid-template-columns: 1fr; }
}
.swot-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
}
.strengths-title  { color: #2E7D32; }
.weaknesses-title { color: #BF6C00; }
.swot-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.swot-list li {
  padding: 5px 0 5px 22px;
  position: relative;
  color: var(--text);
  line-height: 1.5;
  font-size: 0.93rem;
}
.strengths-list li::before {
  content: '';
  position: absolute;
  left: 2px; top: 9px;
  width: 10px; height: 6px;
  border-left: 2px solid var(--success);
  border-bottom: 2px solid var(--success);
  transform: rotate(-45deg);
}
.weaknesses-list li::before {
  content: '!';
  position: absolute;
  left: 0;
  color: var(--warning);
  font-weight: 700;
}

/* Improvement suggestions */
.suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.suggestion-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}
.suggestion-header strong {
  font-size: 0.95rem;
  color: var(--text);
}
.suggestion-item p {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
}
.impact-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.impact-high   { background: #FFEBEE; color: #C62828; }
.impact-medium { background: #FFF3E0; color: #BF6C00; }
.impact-low    { background: #E8F5E9; color: #2E7D32; }

/* ============================================================ Calendar tab */
.calendar-section { padding: 0; }
.calendar-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.calendar-hint { font-size: 13px; color: var(--text-sub); margin-bottom: 16px; }

.calendar-scroll-wrap {
  overflow-x: auto;
  padding-bottom: 12px;
  position: relative;
}
.calendar-scroll-wrap::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--border);
  margin-top: -2px;
}

.calendar-timeline {
  display: flex;
  gap: 0;
  min-width: max-content;
  padding: 16px 0 8px;
  position: relative;
}
/* Horizontal connecting line */
.calendar-timeline::before {
  content: '';
  position: absolute;
  top: 42px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--border);
  z-index: 0;
}

@media (min-width: 900px) {
  .calendar-scroll-wrap { overflow-x: visible; }
  .calendar-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    min-width: 0;
  }
  .calendar-timeline::before { display: none; }
}
@media (max-width: 899px) {
  .calendar-scroll-wrap { overflow-x: auto; }
  .calendar-timeline { display: flex; min-width: max-content; }
}

.cal-day-cell {
  width: 90px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px 10px;
  cursor: pointer;
  border-radius: 10px;
  transition: background .12s, transform .1s;
  position: relative;
  z-index: 1;
  text-align: center;
}
.cal-day-cell:hover { background: rgba(0,0,0,.04); transform: translateY(-2px); }
.cal-day-cell:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.cal-day-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.cal-day-icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.cal-day-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 84px;
  margin-bottom: 2px;
}
.cal-day-stop {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 84px;
}
.cal-day-date {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 1px;
}

/* Color coding per type */
.cal-day-cell[data-type="drive"]    .cal-day-num { border-color: var(--accent); color: var(--accent-dark); background: var(--bg-subtle); }
.cal-day-cell[data-type="checkin"]  .cal-day-num { border-color: #66BB6A; color: #2E7D32; background: #E8F5E9; }
.cal-day-cell[data-type="activity"] .cal-day-num { border-color: #E8A84C; color: #C68A00; background: #FFF8E1; }
.cal-day-cell[data-type="rest"]     .cal-day-num { border-color: #7C6BE0; color: #5E35B1; background: #EDE7F6; }
.cal-day-cell[data-type="mixed"]    .cal-day-num { border-color: #5AB8A0; color: #2E7D5C; background: #E0F5EF; }

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.cal-legend-item {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-sub);
}
.cal-legend-item[data-type="drive"]    { background: var(--bg-subtle); color: var(--accent-dark); }
.cal-legend-item[data-type="checkin"]  { background: #E8F5E9; color: #2E7D32; }
.cal-legend-item[data-type="activity"] { background: #FFF8E1; color: #C68A00; }
.cal-legend-item[data-type="rest"]     { background: #EDE7F6; color: #5E35B1; }
.cal-legend-item[data-type="mixed"]    { background: #E0F5EF; color: #2E7D5C; }

/* ============================================================ Debug toggle — hidden by default */
.debug-toggle { display: none; }
.debug-mode .debug-toggle { display: block; }

/* ============================================================ Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .shimmer-card,
  .shimmer-line,
  .spinner,
  .btn-spinner,
  .spo-progress-indeterminate,
  .loading-progress-indeterminate { animation: none !important; }
  .option-card-streaming { opacity: 1 !important; transform: none !important; }
}

/* ============================================================ Flag badges (replaces emoji flags) */
.flag-badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  background: var(--border); color: var(--text-sub);
  border-radius: 3px; padding: 1px 4px; vertical-align: middle;
}

/* ============================================================ Star rating SVGs */
.travel-star { display: inline-flex; align-items: center; cursor: pointer; color: var(--border); transition: color .1s, transform .1s; user-select: none; }
.travel-star:hover, .travel-star.active { color: #E8A84C; }
.travel-star:hover { transform: scale(1.15); }
.travel-star svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }


/* Screen-reader-only utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* === Legs Builder === */
.leg-card {
    border: 2px solid #E0DBF0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.leg-card-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.leg-badge {
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.leg-days-label {
    font-size: 12px;
    color: #9E9BB0;
    flex: 1;
}

.leg-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mode-toggle {
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    font-size: 12px;
}

.mode-btn {
    border: 1.5px solid #7C6BE0;
    background: white;
    color: #7C6BE0;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 12px;
}

.mode-btn.active {
    background: #7C6BE0;
    color: white;
}

.leg-delete-btn {
    background: none;
    border: none;
    color: #9E9BB0;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
}

.leg-card-body {
    padding: 14px 18px;
    border-top: 1px solid #E8E2F4;
}

.leg-card-body .form-group { margin-bottom: 0; }

.leg-location-row, .leg-date-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.leg-input-chained {
    background: #F0EDF8;
    color: #9E9BB0;
    cursor: not-allowed;
}

.zone-map-container { width: 100%; }

.zone-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.input-sm {
    border: 1px solid #E0DBF0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    width: 180px;
}

.form-label-sm {
    font-size: 12px;
    font-weight: 600;
    color: #6E6B82;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: block;
}

.leg-via-points { margin-bottom: 4px; }

.tag-input-field {
    border: none;
    outline: none;
    font-size: 13px;
    min-width: 140px;
    flex: 1;
    padding: 2px 4px;
}

/* === Explore UI === */
.explore-guidance-form, .explore-circuit {
    background: #FFF8E1;
    border: 1.5px solid #E8C34A;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
}

.guidance-title, .circuit-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
}

.guidance-subtitle, .circuit-hint {
    font-size: 13px;
    color: #9E9BB0;
    margin: 0 0 14px;
}

.guidance-question { margin-bottom: 12px; }
.guidance-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.guidance-input { width: 100%; border: 1px solid #E0DBF0; border-radius: 6px; padding: 6px 10px; font-size: 13px; }

.circuit-stops { list-style: none; padding: 0; margin: 8px 0; }
.circuit-stop { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid #E8D88A; }
.circuit-stop-name { font-weight: 600; font-size: 14px; flex: 1; }
.circuit-stop-nights { font-size: 12px; color: #9E9BB0; }
.circuit-logistics { font-size: 11px; color: #BF6C00; }

.circuit-warnings { margin-bottom: 10px; }
.circuit-warning { background: #FFF8E1; border-left: 3px solid #E8C34A; padding: 6px 10px; font-size: 12px; margin-bottom: 4px; border-radius: 0 4px 4px 0; }

/* ============================================================ Mobile: hero-photo in flex layouts */
@media (max-width: 600px) {
  .further-activity-item .hero-photo,
  .further-activity-item .hero-photo-loading {
    width: 90px;
    min-width: 90px;
  }
  .restaurant-item .hero-photo,
  .restaurant-item .hero-photo-loading {
    width: 80px;
    min-width: 80px;
  }
}

/* ============================================================ Settings Page */
.settings-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px;
}
.settings-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.settings-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}
.settings-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s;
}
.settings-back-btn:hover { background: var(--bg-card-hover, rgba(0,0,0,0.04)); }

/* ── Category ── */
.settings-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.settings-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.settings-category-header:hover { background: var(--bg-card-hover, rgba(0,0,0,0.03)); }
.settings-category-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.settings-category-actions { display: flex; align-items: center; gap: 8px; }
.settings-chevron { transition: transform 0.2s; }
.settings-chevron.rotated { transform: rotate(180deg); }
.settings-category-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 18px;
}
.settings-category-body.open {
  max-height: 2000px;
  padding: 0 18px 18px;
}

/* ── Row ── */
.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light, #f0f0f0);
  gap: 16px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row > label {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 180px;
}
.settings-row select,
.settings-row input[type="number"] {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-input, #fff);
  color: var(--text-primary);
}
.settings-row select { min-width: 140px; }
.settings-row input[type="number"] { width: 90px; text-align: right; }

/* ── Warning row ── */
.settings-warning {
  border-left: 3px solid #E8A43A;
  padding-left: 12px;
  margin-left: -18px;
  padding-right: 0;
}

/* ── Input group with suffix ── */
.settings-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.settings-input-suffix {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── Slider ── */
.settings-slider-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 280px;
}
.settings-slider-group input[type="range"] {
  flex: 1;
  accent-color: var(--accent, #6C63FF);
}
.settings-slider-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 50px;
  text-align: right;
}

/* ── Agent card ── */
.settings-agent-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}
.settings-agent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.settings-agent-header:hover { background: var(--bg-card-hover, rgba(0,0,0,0.03)); }
.settings-agent-info { display: flex; align-items: center; gap: 10px; }
.settings-agent-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.settings-agent-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  padding: 0 14px;
}
.settings-agent-card.expanded .settings-agent-body {
  max-height: 200px;
  padding: 8px 14px 14px;
  border-top: 1px solid var(--border-light, #f0f0f0);
}

/* ── Model badge ── */
.settings-agent-model-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.settings-agent-model-badge.model-opus  { background: #EDE7FF; color: #5B47C9; }
.settings-agent-model-badge.model-sonnet { background: #E0F5EC; color: #1D8B5E; }
.settings-agent-model-badge.model-haiku { background: #FFF4E0; color: #A67700; }

/* ── Toggle switch ── */
.settings-toggle-wrapper { display: flex; align-items: center; gap: 10px; }
.settings-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.settings-toggle input { opacity: 0; width: 0; height: 0; }
.settings-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background 0.25s;
}
.settings-toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}
.settings-toggle input:checked + .settings-toggle-slider { background: var(--accent, #6C63FF); }
.settings-toggle input:checked + .settings-toggle-slider::before { transform: translateX(20px); }
.settings-toggle-label { font-size: 13px; color: var(--text-secondary); }

/* ── Status badges ── */
.settings-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--bg-card-hover, #f5f5f5);
  color: var(--text-secondary);
}
.settings-badge.badge-ok { background: #E0F5EC; color: #1D8B5E; }
.settings-badge.badge-err { background: #FFE0E0; color: #C44; }

.settings-api-keys { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Reset button ── */
.settings-reset-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.settings-reset-btn:hover { color: #C44; background: rgba(204, 68, 68, 0.08); }

/* ── Toast ── */
.settings-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent, #6C63FF);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 9999;
}
.settings-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Divider in dropdown ── */
.settings-divider {
  height: 1px;
  background: var(--border-color, #e0e0e0);
  margin: 8px 0;
}
.settings-full-btn {
  width: 100%;
  padding: 8px;
  background: var(--accent, #6C63FF);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.settings-full-btn:hover { opacity: 0.85; }

/* ── Mobile settings ── */
@media (max-width: 600px) {
  .settings-page { padding: 10px; }
  .settings-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .settings-row > label { min-width: unset; }
  .settings-slider-group { max-width: 100%; }
}

/* ============================================================ Replace Stop Modal */
.replace-stop-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--accent, #6C63FF);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.replace-stop-btn:hover {
  background: var(--accent, #6C63FF);
  color: #fff;
  border-color: var(--accent, #6C63FF);
}
.replace-stop-btn svg { flex-shrink: 0; }

/* Modal overlay */
.replace-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.replace-modal.visible {
  opacity: 1;
  pointer-events: auto;
}
.replace-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.replace-modal-content {
  position: relative;
  background: var(--bg-card, #fff);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(10px);
  transition: transform 0.2s ease;
}
.replace-modal.visible .replace-modal-content {
  transform: translateY(0);
}

.replace-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.replace-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.replace-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.replace-modal-close:hover { color: var(--text-primary); }

/* Tabs */
.replace-modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}
.replace-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.replace-tab:hover { color: var(--text-primary); }
.replace-tab.active {
  color: var(--accent, #6C63FF);
  border-bottom-color: var(--accent, #6C63FF);
}

/* Form */
.replace-form { display: flex; flex-direction: column; gap: 10px; }
.replace-form label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.replace-form label small { color: var(--text-secondary); font-weight: 400; }
.replace-input {
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-input, #fff);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
}
.replace-input:focus { border-color: var(--accent, #6C63FF); }
.replace-submit-btn { margin-top: 6px; }

/* Search info */
.replace-search-info {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Search results — option cards */
.replace-search-results { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.replace-option-card {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.replace-option-card:hover {
  border-color: var(--accent, #6C63FF);
  box-shadow: 0 2px 12px rgba(108, 99, 255, 0.12);
  transform: translateY(-1px);
}
.replace-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.replace-option-header strong { font-size: 15px; color: var(--text-primary); }
.replace-option-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent, #6C63FF);
  background: var(--accent-bg, rgba(108, 99, 255, 0.08));
  padding: 2px 8px;
  border-radius: 4px;
}
.replace-option-teaser {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 6px;
  line-height: 1.4;
}
.replace-option-meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.replace-no-results {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  padding: 16px 0;
}

/* Progress */
.replace-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}
.replace-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border-color);
  border-top-color: var(--accent, #6C63FF);
  border-radius: 50%;
  animation: replace-spin 0.7s linear infinite;
}
@keyframes replace-spin { to { transform: rotate(360deg); } }
#replace-progress-msg {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* Mobile */
@media (max-width: 600px) {
  .replace-modal-content { width: 95%; padding: 16px; }
  .replace-stop-btn span { display: none; }
}

/* ── Stop Overview Grid ── */
.stops-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
@media (max-width: 480px) {
  .stops-overview-grid { grid-template-columns: 1fr; }
}

.stop-overview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}
.stop-overview-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.stop-overview-card .hero-photo-loading,
.stop-overview-card .hero-photo {
  height: 160px;
}
.stop-overview-card .hero-photo img {
  height: 160px;
  object-fit: cover;
  width: 100%;
}

.stop-overview-card-body {
  padding: 16px;
}
.stop-overview-card-body h3 {
  font-size: 18px;
  margin: 4px 0 6px;
}
.stop-overview-card-body .stop-number {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  text-transform: uppercase;
}
.stop-overview-card-body .stop-meta {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.stop-overview-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stop-overview-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.chip-acc {
  background: var(--bg-subtle);
  color: var(--accent-dark);
}
.chip-act {
  background: #FFF7ED;
  color: #C2410C;
}
.chip-rest {
  background: #FEF2F2;
  color: #DC2626;
}

/* ── Stop Detail Page ── */
.stop-detail-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.stop-detail-back {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .12s;
}
.stop-detail-back:hover {
  background: var(--bg-subtle);
}
.stop-detail-breadcrumb {
  font-size: 14px;
  color: var(--text-sub);
}

.stop-detail-header {
  padding: 20px;
  background: rgba(240, 237, 248, .95);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.stop-detail-header h3 {
  font-size: 22px;
  margin: 6px 0 4px;
}

.stop-detail-prevnext {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.stop-detail-prevnext .btn {
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .stop-detail-prevnext {
    flex-direction: column;
    gap: 8px;
  }
  .stop-detail-prevnext .btn {
    max-width: 100%;
    width: 100%;
  }
}

/* ── Day Plan Tab ── */

.days-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
@media (max-width: 640px) {
  .days-overview-grid { grid-template-columns: 1fr; }
}

.day-overview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease;
}
.day-overview-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.day-overview-card-body { padding: 16px; }
.day-overview-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.day-overview-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
}
.day-overview-date {
  font-size: 12px;
  color: var(--text-sub);
}
.day-overview-card-body h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.day-overview-desc {
  font-size: 13px;
  color: var(--text-sub);
  margin: 0 0 8px;
  line-height: 1.4;
}
.day-overview-stop {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 4px;
}
.day-overview-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 6px;
}
.day-route-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-subtle);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-dark);
}

.day-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
}
.day-type-badge.type-drive { background: var(--accent); }
.day-type-badge.type-rest { background: #7C6BE0; }
.day-type-badge.type-activity { background: #E8A84C; }
.day-type-badge.type-mixed { background: #5AB8A0; }

/* Day detail layout (mirrors stops-layout) */
.days-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}
@media (min-width: 1100px) {
  .days-layout { grid-template-columns: 240px 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .days-layout { grid-template-columns: 1fr; }
  .days-sidebar { display: none; }
}

.days-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 0;
}
.days-sidebar-inner { display: flex; flex-direction: column; }
.days-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-left: 3px solid transparent;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.days-sidebar-item:hover { background: var(--bg); }
.days-sidebar-item.active { border-left-color: var(--accent); background: var(--bg-subtle); color: var(--accent-dark); font-weight: 500; }
.sidebar-day-num {
  background: var(--border);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.days-sidebar-item.active .sidebar-day-num { background: var(--accent); color: #fff; }
.sidebar-day-label { overflow: hidden; text-overflow: ellipsis; }

.days-main { min-width: 0; }

.day-detail-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.day-detail-back {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .12s;
}
.day-detail-back:hover { background: var(--bg-subtle); }
.day-detail-breadcrumb {
  font-size: 14px;
  color: var(--text-sub);
}

.day-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.day-detail-header {
  padding: 20px;
  background: rgba(240, 237, 248, .95);
  border-bottom: 1px solid var(--border);
}
.day-detail-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.day-detail-header h3 {
  font-size: 22px;
  margin: 0 0 6px;
}
.day-detail-header p {
  margin: 0;
  color: var(--text-sub);
  line-height: 1.5;
}

.day-detail-map {
  height: 350px;
  border-radius: 0;
  margin: 0;
}

.day-detail-prevnext {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.day-detail-prevnext .btn {
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .day-detail-prevnext {
    flex-direction: column;
    gap: 8px;
  }
  .day-detail-prevnext .btn {
    max-width: 100%;
    width: 100%;
  }
}

.day-pois {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.day-pois h4 {
  font-size: 16px;
  margin: 0 0 12px;
}

/* Time block numbered marker on day map */
.stop-map-pin.pin-timeblock {
  background: var(--accent);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

/* Day CTA boxes in stop detail */
.stop-day-cta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stop-day-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.stop-day-cta:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transform: translateY(-1px);
  border-color: var(--accent);
}
.stop-day-cta-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.stop-day-cta-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}
.stop-day-cta-date {
  font-size: 12px;
  color: var(--text-sub);
}
.stop-day-cta-center {
  flex: 1;
  min-width: 0;
}
.stop-day-cta-center strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stop-day-cta-center span {
  font-size: 12px;
  color: var(--text-sub);
}
.stop-day-cta-arrow {
  flex-shrink: 0;
  color: var(--text-sub);
  transition: transform .15s ease, color .15s ease;
}
.stop-day-cta:hover .stop-day-cta-arrow {
  color: var(--accent);
  transform: translateX(3px);
}
@media (max-width: 600px) {
  .stop-day-cta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .stop-day-cta-center strong {
    white-space: normal;
  }
}

/* Tagesplan CTA box in overview */
.overview-dayplan-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.overview-dayplan-cta:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-1px);
  border-color: var(--accent);
}
.overview-dayplan-cta-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-radius: 12px;
  color: var(--accent);
}
.overview-dayplan-cta-text {
  flex: 1;
  min-width: 0;
}
.overview-dayplan-cta-text strong {
  display: block;
  font-size: 16px;
  margin-bottom: 2px;
}
.overview-dayplan-cta-text span {
  font-size: 13px;
  color: var(--text-sub);
}
.overview-dayplan-cta-arrow {
  flex-shrink: 0;
  color: var(--text-sub);
  transition: transform .15s ease, color .15s ease;
}
.overview-dayplan-cta:hover .overview-dayplan-cta-arrow {
  color: var(--accent);
  transform: translateX(3px);
}
