/* ---------------------------------------------------------------------------
   Urlaubsplaner – Japan 2026
   Idee: ein Streckenplan. Links die Tage als Stationen auf einer Linie, deren
   Farbe die Etappe (= Unterkunft) ist. Die Nummern links sind dieselben wie die
   Marker rechts auf der Karte.
   --------------------------------------------------------------------------- */

:root {
  --bg: #EEF0F3;
  --surface: #FFFFFF;
  --surface-2: #F6F7F9;
  --ink: #151A22;
  --ink-2: #3C4451;
  --muted: #6B7380;
  --line: #DDE1E7;
  --line-2: #C9CED6;
  --alert: #C8102E;
  --alert-bg: #FBE9EC;
  --warn: #B86E00;
  --warn-bg: #FFF3DF;
  --ok: #1F7A4D;
  --ok-bg: #E4F3EA;
  --stage: #5B6472;
  --food: #0F8B8D;
  --food-bg: #E3F3F3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(21, 26, 34, .06), 0 6px 18px -8px rgba(21, 26, 34, .18);
  --font-display: "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Roboto, system-ui, sans-serif;
  --topbar-h: 0px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
}

a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.1; }
p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid #2B6CB0; outline-offset: 2px; border-radius: 4px; }

/* --------------------------------------------------------------------------- Kopf */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 22px 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 28px;
  align-items: center;
}
.stagebar { grid-column: 1 / -1; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand__kanji {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: .04em;
  color: var(--surface);
  background: var(--ink);
  padding: 4px 10px;
  border-radius: 6px;
  line-height: 1.2;
}
.brand__title { font-size: 26px; font-weight: 700; letter-spacing: .01em; }
.brand__sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.stagebar { display: flex; gap: 8px; flex-wrap: wrap; }
.stagepill {
  display: grid;
  gap: 1px;
  padding: 6px 12px 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  background: var(--surface-2);
  border-left: 5px solid var(--stage);
  transition: background .15s;
}
.stagepill:hover { background: color-mix(in srgb, var(--stage) 10%, var(--surface)); }
.stagepill__name { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.1; }
.stagepill__meta { font-family: var(--font-display); font-size: 12.5px; color: var(--ink-2); }
.stagepill__stay { font-size: 11.5px; color: var(--muted); }

.topbar__status { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.statchip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  text-decoration: none; font-size: 13px; color: var(--ink-2);
}
.statchip strong { font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.statchip--alert { background: var(--alert-bg); border-color: #F0B3BC; color: #7A0A1C; }
.statchip--alert strong { color: var(--alert); }
.statchip--muted { color: var(--muted); }

/* --------------------------------------------------------------------------- Raster */

.planner__grid {
  display: grid;
  grid-template-columns: minmax(440px, 11fr) minmax(380px, 9fr);
  gap: 0;
  align-items: start;
}

.rail { padding: 0 22px 60px; min-width: 0; }

.mapside {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  padding: 14px 18px 14px 0;
}

/* --------------------------------------------------------------------------- Tages-Navigation */

.daynav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 12px 0 10px;
  margin: 0 -22px;
  padding-left: 22px;
  padding-right: 22px;
  background: linear-gradient(var(--bg) 85%, transparent);
  scrollbar-width: none;
}
.daynav::-webkit-scrollbar { display: none; }

.daychip {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 0;
  min-width: 46px;
  padding: 5px 7px 4px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  border-bottom: 3px solid var(--stage);
  background: var(--surface);
  cursor: pointer;
  font-family: var(--font-display);
  transition: transform .12s, background .12s;
}
.daychip:hover { transform: translateY(-1px); }
.daychip__wd { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.daychip__d { font-size: 15px; font-weight: 700; }
.daychip.is-active { background: var(--stage); border-color: var(--stage); color: #fff; }
.daychip.is-active .daychip__wd { color: rgba(255, 255, 255, .8); }
.daychip--food { font-weight: 700; font-size: 13.5px; align-content: center; grid-auto-flow: column; gap: 5px; padding-inline: 10px; --stage: var(--food); border-bottom-width: 1px; }
.daychip--food svg { width: 15px; height: 15px; fill: var(--food); }
.daychip--food[aria-pressed="true"] { background: var(--food); border-color: var(--food); color: #fff; }
.daychip--food[aria-pressed="true"] svg { fill: #fff; }
.daychip--all { font-weight: 700; font-size: 14px; align-content: center; --stage: var(--ink); padding-inline: 12px; }

/* --------------------------------------------------------------------------- Die Linie */

.line { position: relative; margin-top: 6px; }

.station {
  position: relative;
  padding-left: 34px;
  padding-bottom: 22px;
  scroll-margin-top: 66px;
}
/* Streckensegment */
.station::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--stage);
  border-radius: 0;
}
.station:first-child::before { top: 18px; border-radius: 3px 3px 0 0; }
.station:last-child::before { bottom: auto; height: 24px; border-radius: 0 0 3px 3px; }

.station__head {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 6px 10px 6px 6px;
  margin-left: -6px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
  cursor: pointer;
  scroll-margin-top: 64px;
}
.station__head:hover { background: rgba(21, 26, 34, .05); }
.station.is-active .station__head { background: var(--surface); box-shadow: var(--shadow); }

/* Stationspunkt auf der Linie */
.station__dot {
  position: absolute;
  left: -27px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--surface);
  border: 4px solid var(--stage);
  box-sizing: border-box;
}
.station__dot--transfer { width: 18px; height: 18px; left: -29px; border-width: 5px; }
.station.is-active .station__dot { background: var(--stage); box-shadow: 0 0 0 4px color-mix(in srgb, var(--stage) 25%, transparent); }

.station__date {
  border: 0;
  cursor: pointer;
  display: grid;
  justify-items: center;
  min-width: 54px;
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--stage);
  color: #fff;
  font-family: var(--font-display);
  line-height: 1;
}
.station__wd { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.station__d { font-size: 19px; font-weight: 700; margin-top: 2px; }

.station__stage { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--font-display); font-weight: 600; }
.station__title h2 { font-size: 20px; font-weight: 700; }
.station__count {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 2px 9px;
}

.station__body { padding: 10px 0 0 4px; }

/* Check-in / Check-out */
.stayline { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.stayline__out, .stayline__in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.stayline svg { width: 16px; height: 16px; fill: currentColor; }
.stayline__in { color: var(--ink); }
.stayline__in svg { fill: var(--stage); }
.stayline__in strong a { text-decoration-color: var(--line-2); }
.stayline__meta { color: var(--muted); font-size: 12.5px; }

/* Programmpunkte */
.stops { display: grid; gap: 8px; }
.stop {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 8px 10px 8px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow .15s, border-color .15s;
}
.stop.is-flash { border-color: var(--stage); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stage) 30%, transparent); }
.stop--transport, .stop--stay { background: var(--surface-2); border-style: dashed; }
.stop--tip { border-color: transparent; background: transparent; }

.stop__marker { display: flex; flex-direction: column; gap: 4px; align-items: center; padding-top: 1px; }
.num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--stage);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  border: 0;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--surface);
  transition: transform .12s;
}
button.num:hover { transform: scale(1.15); }
.num__more { font-size: 10px; font-weight: 600; opacity: .85; }
.num:has(.num__more) { width: auto; padding: 0 7px; border-radius: 13px; }
.stop__place { display: inline-flex; align-items: center; gap: 4px; }
.numlink {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; border: 0;
  background: var(--stage); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 11px;
  cursor: pointer;
}
.numlink:hover { transform: scale(1.15); }
.num--icon { background: var(--surface); border: 1.5px solid var(--line-2); color: var(--ink-2); cursor: default; box-shadow: none; }
.num--icon svg { width: 15px; height: 15px; fill: currentColor; }

.stop__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.stop__time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--stage);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.stop__title { font-weight: 600; font-size: 15px; }
.stop__note { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.stop__places { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; font-size: 13px; }

.placelink { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.placelink:hover { color: var(--ink); text-decoration-color: var(--ink); }
.placelink--plan { text-decoration-style: dashed; }
.placelink--plan::after { content: " ⊘"; color: var(--muted); font-size: 11px; }

.ticket {
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
  padding-left: 10px;
  border-left: 3px solid var(--line-2);
}
.ticket__lvl { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; margin-right: 4px; }
.ticket--free { border-color: var(--line-2); }
.ticket--free .ticket__lvl { color: var(--muted); }
.ticket--advance { border-color: var(--warn); }
.ticket--advance .ticket__lvl { color: var(--warn); }
.ticket--urgent { border-color: var(--alert); background: var(--alert-bg); padding: 4px 8px; border-radius: 0 6px 6px 0; }
.ticket--urgent .ticket__lvl { color: var(--alert); }
.ticket--booked { border-color: var(--ok); }
.ticket--booked .ticket__lvl { color: var(--ok); }

/* Essen in der Nähe – nur sichtbar, wenn der Essen-Schalter an ist */
.food { display: none; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 8px; }
.show-food .food { display: flex; }
.food__label { font-family: var(--font-display); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--food); margin-right: 2px; }
.food--stay { margin: 4px 0 0 22px; }
.foodchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px 2px 6px; border-radius: 999px;
  background: var(--food-bg); border: 1px solid transparent;
  font-size: 12.5px; color: #0B5E5F; text-decoration: none;
  transition: border-color .12s, background .12s;
}
.foodchip:hover { border-color: var(--food); background: #fff; }
.foodchip__emoji { font-size: 14px; line-height: 1; }
.foodchip__name { font-weight: 600; }
.foodchip__cuisine { color: #0B5E5F; opacity: .8; font-size: 11.5px; }
.foodchip__cuisine::before { content: "·"; margin-right: 5px; }
.foodchip__dist { color: var(--muted); font-size: 11.5px; }
.foodchip__dist::before { content: "·"; margin-right: 5px; }
.foodchip--light, .foodchip--drink { background: #F2EFE6; color: #5A4A2A; }
.foodchip--light .foodchip__cuisine, .foodchip--drink .foodchip__cuisine { color: #5A4A2A; }
.foodchip--light:hover, .foodchip--drink:hover { border-color: #9A7E4E; }
.foodchip--breakfast { background: #FFF1DC; color: #6B4400; }
.foodchip--breakfast .foodchip__cuisine { color: #6B4400; }
.foodchip--more { background: transparent; border-color: var(--line-2); color: var(--muted); }
.foodchip.is-done { display: none; }

.place.place--food { grid-template-columns: auto 1fr auto; }
.place__emoji { font-size: 22px; line-height: 1.2; padding-top: 2px; }
.place__dishes { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.place__price { color: var(--muted); }
.place__tip { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.place__tip--res { color: #7A0A1C; }
.place__tip--warn { color: var(--alert); font-weight: 600; }
.tag--cuisine { background: var(--food-bg); color: #0B5E5F; }
.tag--meal { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }
.tag--meal-light, .tag--meal-drink { background: #F2EFE6; color: #5A4A2A; border-color: #E3DCC8; }
.tag--meal-breakfast { background: #FFF1DC; color: #6B4400; border-color: #F5DDB5; }
.cuisines { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cuisines__item { font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.cuisines__item strong { font-family: var(--font-display); color: var(--ink); margin-left: 2px; }

/* Hinweise */
.hints { margin-top: 12px; display: grid; gap: 6px; }
.hints li {
  position: relative;
  padding: 7px 10px 7px 30px;
  border-radius: 8px;
  background: var(--warn-bg);
  color: #5A3A05;
  font-size: 13.5px;
}
.hints li::before {
  content: "?";
  position: absolute; left: 10px; top: 7px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--warn); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 11px;
  display: grid; place-items: center;
}

/* Vorschläge aus der Maps-Liste */
.suggest { margin-top: 12px; padding: 10px 12px; border: 1.5px dashed var(--line-2); border-radius: var(--radius); }
.suggest__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-family: var(--font-display); font-weight: 600; margin-bottom: 6px; }
.suggest ul { display: grid; gap: 4px; }
.suggest__item { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; }
/* "+" übernimmt den Ort per Klick in den Tagesplan (plan#add) */
.suggest__pin {
  width: 22px; height: 22px; border-radius: 50%; padding: 0;
  border: 1.5px dashed var(--muted); color: var(--muted); background: transparent;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s, transform .12s;
}
.suggest__pin:hover, .suggest__pin:focus-visible { border-style: solid; border-color: var(--stage); background: var(--stage); color: #fff; transform: scale(1.12); }
.suggest__pin:disabled { cursor: progress; opacity: .6; transform: none; }
.suggest__pin.is-error { border-style: solid; border-color: var(--alert); background: var(--alert-bg); color: var(--alert); }
.suggest__item.is-busy { opacity: .6; }
.suggest__why { color: var(--muted); }
.suggest__item.is-done { opacity: .5; }
.suggest__item.is-done .suggest__text { text-decoration: line-through; }

.planonly { margin-top: 10px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 8px; }
.planonly__link { color: var(--ink-2); text-decoration-style: dashed; text-underline-offset: 2px; }

/* --------------------------------------------------------------------------- Abschnitte */

.panel {
  margin-top: 36px;
  padding: 18px 18px 16px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  scroll-margin-top: 70px;
}
.panel--quiet { box-shadow: none; border: 1px solid var(--line); }
.panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.panel__eyebrow { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; color: var(--muted); }
.panel__title { font-size: 22px; font-weight: 700; margin-top: 2px; }
.panel__sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.panel__city { font-size: 15px; font-weight: 700; margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.panel__city span { font-size: 12px; color: var(--muted); font-weight: 600; border: 1px solid var(--line-2); border-radius: 999px; padding: 0 7px; }

.hidedone { font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; cursor: pointer; }
.hide-done .is-done { display: none !important; }

/* Check-Button (Erledigt / Ausblenden) */
.checkbtn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  align-self: center;
  transition: background .12s, border-color .12s;
}
.checkbtn:hover { border-color: var(--ink-2); }
.checkbtn__box { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--line-2); background: var(--surface); display: grid; place-items: center; }
.checkbtn[aria-pressed="true"] { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.checkbtn[aria-pressed="true"] .checkbtn__box { background: var(--ok); border-color: var(--ok); }
.checkbtn[aria-pressed="true"] .checkbtn__box::after { content: "✓"; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }

/* Aufgaben */
.tasks { display: grid; gap: 8px; }
.task {
  display: grid;
  grid-template-columns: 108px 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-left-width: 5px;
  background: var(--surface);
}
.task--overdue { border-left-color: var(--alert); background: var(--alert-bg); }
.task--open { border-left-color: var(--ok); background: var(--ok-bg); }
.task--soon { border-left-color: var(--warn); background: var(--warn-bg); }
.task--later { border-left-color: var(--line-2); }
.task--anytime { border-left-color: var(--line-2); }
.task--fixed, .task.is-done { opacity: .6; background: var(--surface-2); border-left-color: var(--line-2); }
.task.is-done .task__title { text-decoration: line-through; }

.task__when { display: grid; gap: 3px; align-content: start; }
.task__state { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.1; }
.task--overdue .task__state { color: var(--alert); }
.task--open .task__state { color: var(--ok); }
.task--soon .task__state { color: var(--warn); }
.task__for { font-size: 12px; color: var(--muted); text-decoration: none; }
.task__for:hover { text-decoration: underline; }
.task__title { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.task__window { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.task__detail { font-size: 13px; color: var(--muted); margin-top: 4px; }
.task__link { font-size: 12.5px; display: inline-block; margin-top: 4px; color: var(--ink-2); }

.tag { font-family: var(--font-display); font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; padding: 1px 6px; border-radius: 4px; }
.tag--alert { background: var(--alert); color: #fff; }
.tag--muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }

/* Nicht eingeplante Orte */
.places { display: grid; gap: 6px; }
.place {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.place.is-done { opacity: .5; background: var(--surface-2); }
.place.is-done .place__name { text-decoration: line-through; }
.place__name { font-weight: 600; }
.place__note { font-size: 12.5px; color: var(--muted); font-style: italic; }
.place__fit { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.place__fit--none { color: var(--muted); }
.daylink {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  color: var(--stage); text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--stage) 40%, transparent);
  border-radius: 5px; padding: 0 5px; margin: 0 2px;
}
.daylink:hover { background: var(--stage); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px dashed var(--line-2);
  font-size: 13px; text-decoration: none; color: var(--ink-2);
}
.chip:hover { border-style: solid; color: var(--ink); }
.chip__meta { font-family: var(--font-display); font-size: 11.5px; color: var(--muted); }

/* Gebucht */
.logi { display: grid; gap: 6px; }
.logi__row { display: grid; grid-template-columns: 24px 1fr; gap: 4px 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.logi__row:last-child { border-bottom: 0; }
.logi__icon svg { width: 18px; height: 18px; fill: var(--muted); }
.logi__icon--stage svg { fill: var(--stage); }
.logi__meta { grid-column: 2; font-size: 12.5px; color: var(--muted); font-family: var(--font-display); }

/* Cafés */
.cafes { border-top: 1px solid var(--line); padding: 8px 0; }
.cafes summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.cafes__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--stage); }
.cafes__n { font-size: 12px; color: var(--muted); font-weight: 600; }
.cafes ul { display: grid; gap: 8px; padding: 10px 0 4px 18px; font-size: 13.5px; }
.cafes__hours { font-family: var(--font-display); font-weight: 600; color: var(--stage); font-size: 12.5px; margin-left: 6px; }
.cafes__style { color: var(--muted); font-size: 12.5px; }

.rail__foot { margin-top: 28px; font-size: 12px; color: var(--muted); }
.rail__foot code { font-size: 11.5px; }

/* --------------------------------------------------------------------------- Karte */

.map {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.map__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.map__mode { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 15px; min-width: 0; }
.map__mode span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, #5B6472); flex: 0 0 auto; }
.map__ctl { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.map__btn { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; cursor: pointer; }
.map__btn.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.map__toggle { font-size: 12.5px; color: var(--ink-2); display: inline-flex; gap: 5px; align-items: center; cursor: pointer; }
.map__canvas { min-height: 200px; background: #E7ECF0; }
.map__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 12px 2px; font-size: 12px; color: var(--muted); }
.map__legend li { display: inline-flex; align-items: center; gap: 6px; }
.map__hint { padding: 2px 12px 8px; font-size: 11px; color: var(--muted); }
.map__style { display: flex; align-items: center; gap: 8px; padding: 6px 12px 2px; font-size: 12px; color: var(--ink-2); }
.map__select { font: inherit; font-size: 12.5px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); min-width: 0; max-width: 100%; }

.lg { width: 16px; height: 16px; border-radius: 50%; display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 10px; color: #fff; }
.lg--num { background: var(--ink); }
.lg--stay { background: #fff; border: 3px solid var(--ink); border-radius: 4px; box-sizing: border-box; }
.lg--sugg { background: #fff; border: 1.5px dashed var(--muted); color: var(--muted); }
.lg--unsched { background: #9AA2AE; width: 11px; height: 11px; }
.lg--food { background: #fff; border: 2px solid var(--food); font-size: 10px; }

/* Marker – in beiden Engines dasselbe HTML */
.mk-wrap { background: transparent; border: 0; }
.mk {
  --c: #5B6472;
  position: absolute;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  transition: transform .12s, width .12s, height .12s;
  cursor: pointer;
}
.mk--transport { border-radius: 6px; }
.mk--plan { box-shadow: 0 0 0 2px var(--c), 0 1px 4px rgba(0,0,0,.35); border-style: dashed; }
.mk--mini { width: 12px; height: 12px; border-width: 2px; }
.mk--mini .mk__num { display: none; }
.mk--stay { border-radius: 7px; background: #fff; color: var(--c); border: 3px solid var(--c); width: 28px; height: 28px; }
.mk--stay svg { width: 16px; height: 16px; fill: currentColor; }
.mk--suggestion { background: #fff; color: var(--muted); border: 2px dashed var(--muted); width: 24px; height: 24px; box-shadow: none; }
.mk--food { background: #fff; border: 2px solid var(--food); width: 26px; height: 26px; font-size: 14px; line-height: 1; }
.mk--food-light, .mk--food-drink { border-color: #9A7E4E; }
.mk--food-breakfast { border-color: #D9921E; }
.mk--food.mk--mini { width: 10px; height: 10px; background: var(--food); }
.mk--food.mk--mini .mk__emoji { display: none; }
.mk--food-light.mk--mini, .mk--food-drink.mk--mini { background: #9A7E4E; }
.mk--unscheduled { width: 13px; height: 13px; background: #9AA2AE; border-width: 2px; }
.mk.is-hot { transform: translate(-50%, -50%) scale(1.3); z-index: 1000; box-shadow: 0 0 0 4px rgba(21, 26, 34, .2), 0 2px 6px rgba(0,0,0,.4); }
.mk--mini.is-hot { width: 22px; height: 22px; }
.mk--mini.is-hot .mk__num { display: block; font-size: 11px; }
/* Google Advanced Markers ankern unten-mittig, Leaflet-DivIcons oben-links */
.map--google .mk { position: relative; transform: translate(0, 50%); }
.map--google .mk.is-hot { transform: translate(0, 50%) scale(1.3); }

/* Popup */
.leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--font-body); font-size: 13px; line-height: 1.4; }
.pp { max-width: 260px; }
.pp__eyebrow { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 11px; color: var(--c, var(--muted)); display: flex; align-items: center; gap: 6px; }
.pp__num { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--c, var(--ink)); color: #fff; font-size: 11px; }
.pp h3 { font-size: 16px; margin: 3px 0 2px; }
.pp__item { color: var(--ink-2); }
.pp__flag { color: var(--warn); font-size: 12px; margin-top: 2px; }
.pp__links { margin-top: 8px; font-size: 12.5px; }
.pp__links a { color: var(--ink); }

/* --------------------------------------------------------------------------- Responsiv */

@media (max-width: 1100px) {
  .planner__grid { grid-template-columns: minmax(400px, 1fr) minmax(340px, 1fr); }
}

@media (max-width: 860px) {
  /* Fester Viewport: Kopfzeile + Karte stehen, nur die Liste scrollt in ihrem eigenen Fenster. */
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  .planner { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }

  .topbar { padding: 8px 12px; gap: 6px 10px; grid-template-columns: auto 1fr; align-items: center; flex: 0 0 auto; }
  .brand { gap: 8px; }
  .brand__kanji { font-size: 15px; padding: 3px 7px; }
  .brand__title { font-size: 17px; }
  .brand__sub { display: none; }
  .stagebar { display: none; }
  .topbar__status { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .topbar__status::-webkit-scrollbar { display: none; }
  .statchip { padding: 3px 9px; font-size: 12px; white-space: nowrap; }
  .statchip strong { font-size: 14px; }
  .statchip--muted { display: none; }

  .planner__grid { display: flex; flex-direction: column; align-items: stretch; flex: 1 1 auto; min-height: 0; }
  .mapside { order: -1; position: static; flex: 0 0 40dvh; height: 40vh; height: 40dvh; padding: 6px 8px 0; width: 100%; }
  .map { border-radius: 10px; }
  .map__legend { display: none; }
  .map__hint { display: none; }
  .map__style { padding: 4px 10px 2px; }
  .map__toggle { display: none; }
  .map__bar { padding: 6px 10px; }
  .map__mode { font-size: 14px; }

  /* Die Liste ist das Scroll-Fenster; die Tagesleiste klebt an dessen oberem Rand. */
  .rail { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0 12px 40px; width: 100%; }
  .daynav { top: 0; margin: 0 -12px; padding: 8px 12px; background: var(--bg); }
  .daychip { min-width: 42px; padding: 4px 6px 3px; }
  .station, .panel { scroll-margin-top: 64px; }
  .station__head { scroll-margin-top: 0; }

  .task { grid-template-columns: 1fr; }
  .task .checkbtn { justify-self: start; }
  .station__title h2 { font-size: 18px; }
  .station__count { display: none; }

  /* Essen-Chips als Zeilen: Name oben, Küche darunter, Fußweg rechts */
  .stop__main, .stayline__in { min-width: 0; }
  .food { gap: 4px; min-width: 0; }
  .food__label { width: 100%; }
  .foodchip {
    width: 100%; min-width: 0;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "emoji name dist" "emoji cuisine dist";
    align-items: center; column-gap: 7px; row-gap: 0; padding: 4px 9px 4px 7px;
  }
  .foodchip__emoji { grid-area: emoji; font-size: 17px; }
  .foodchip__name { grid-area: name; line-height: 1.25; }
  .foodchip__cuisine { grid-area: cuisine; font-size: 11.5px; }
  .foodchip__cuisine::before { content: none; }
  .foodchip__dist { grid-area: dist; white-space: nowrap; text-align: right; }
  .foodchip__dist::before { content: none; }
  .foodchip--more { display: inline-flex; width: auto; }
  .food--stay { margin-left: 0; }
}

/* --------------------------------------------------------------------------- Per Klick ergänzte Stopps */

.stop--added { border-color: color-mix(in srgb, var(--stage) 45%, var(--line)); }
.stop.is-busy { opacity: .6; }
.stop__tools { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; align-self: center; }
.tag--added { background: color-mix(in srgb, var(--stage) 12%, var(--surface)); color: var(--stage); border: 1px solid color-mix(in srgb, var(--stage) 35%, transparent); }
.linkbtn {
  border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px;
  color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px;
  cursor: pointer;
}
.linkbtn:hover { color: var(--ink); text-decoration-color: var(--ink); }
.linkbtn:disabled { cursor: progress; opacity: .6; }
.linkbtn.is-error { color: var(--alert); }

/* --------------------------------------------------------------------------- Sprungmarken zu den Abschnitten */

.sectionnav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.sectionnav__label { font-family: var(--font-display); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 4px; }
.sectionlink {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  font-size: 12.5px; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.sectionlink::before { content: "↓"; font-family: var(--font-display); font-weight: 700; color: var(--muted); }
.sectionlink:hover { background: var(--surface-2); border-color: var(--ink-2); color: var(--ink); }

@media (max-width: 860px) {
  .sectionnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 5px; }
  .sectionnav::-webkit-scrollbar { display: none; }
  .sectionnav__label { display: none; }
  .sectionlink { padding: 2px 9px 2px 7px; font-size: 12px; }
}
