/* =========================================================================
   SNAP&CAMP – Farbwelt und Komponenten

   Palette: Erde (Sand, Lehm, Rinde), Wald (Tanne, Moos), Himmel (Dunst, Blau).
   Alles läuft über CSS-Variablen, damit der optionale Nachtmodus nur die
   Werte tauscht und kein einziges Bauteil doppelt gepflegt werden muss.
   ========================================================================= */

:root {
  /* --- Vorgegebene Markenfarben -------------------------------------------
     Creme        #F7F3EA  App-Hintergrund
     Creme dunkel #EFE8D8  Karten und Pills
     Schwarzbraun #2A241C  Haupttext, "SNAP" im Logo
     Moosgrün     #5C7A44  "&" im Logo, Hauptknöpfe
     Jeansblau    #3E6E8E  Kamera-Icon, Karten-Pins
     Die übrigen Werte sind daraus abgeleitet (Ränder, gedämpfter Text,
     helle Flächen) und bleiben in derselben warmen Familie. */

  /* Erde – Flächen und Text */
  --sand-50:   #F7F3EA;
  --sand-100:  #EFE8D8;
  --sand-200:  #E1D7C2;
  --sand-300:  #CCBFA4;
  --bark-800:  #2A241C;
  --bark-700:  #3B342A;
  --bark-500:  #756B5C;
  --bark-400:  #978E7E;

  /* Wald – Campingplätze, Hauptaktionen */
  --forest-100: #E8EEDF;
  --forest-300: #A6BC8D;
  --forest-600: #5C7A44;
  --forest-700: #4A6336;

  /* Himmel – Fotospots */
  --sky-100:   #E3EDF3;
  --sky-300:   #9ABACD;
  --sky-600:   #3E6E8E;
  --sky-700:   #325A75;

  /* Sonne – Radius, goldene Stunde, Hervorhebung */
  --sun-100:   #F6EAD4;
  --sun-300:   #E4C289;
  --sun-500:   #C68C3A;
  --sun-600:   #A57228;

  /* Lehm – Hinweise und Warnungen */
  --clay-100:  #F3E1D8;
  --clay-600:  #A65A3C;

  --shadow-sm: 0 1px 2px rgba(42, 36, 28, .07);
  --shadow-md: 0 4px 14px rgba(42, 36, 28, .11);
  --radius:    14px;

  --tile-filter: saturate(.82) brightness(1.02);
  color-scheme: light;
}

/* Nachtmodus – für Astro-Sessions, damit die Dunkeladaption hält */
[data-theme="night"] {
  --sand-50:   #14181A;
  --sand-100:  #1C2226;
  --sand-200:  #2A3136;
  --sand-300:  #3D4850;
  --bark-800:  #ECE6DC;
  --bark-700:  #DCD5C9;
  --bark-500:  #A79B8A;
  --bark-400:  #8B8070;

  --forest-100: #1D2A1D;
  --forest-300: #47603A;
  --forest-600: #86A86A;
  --forest-700: #9CBC80;

  --sky-100:   #17252D;
  --sky-300:   #3C6379;
  --sky-600:   #74A6C4;
  --sky-700:   #8FBBD6;

  --sun-100:   #2A2114;
  --sun-300:   #6B5426;
  --sun-500:   #D8A75A;
  --sun-600:   #E7BB77;

  --clay-100:  #2E1D16;
  --clay-600:  #CC8168;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .5);

  --tile-filter: invert(1) hue-rotate(180deg) brightness(.7) contrast(1.05) saturate(.5);
  color-scheme: dark;
}

/* ------------------------------- Grundgerüst ----------------------------- */

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  background: var(--sand-50);
  color: var(--bark-700);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

/* Sichere Zonen: Notch, Dynamic Island, Home-Indikator und die abgerundeten
   Ecken im Querformat. `viewport-fit=cover` im <meta> ist die Voraussetzung
   dafür, dass env(safe-area-inset-*) überhaupt Werte liefert. */
:root {
  --sa-top:    env(safe-area-inset-top, 0px);
  --sa-bottom: env(safe-area-inset-bottom, 0px);
  --sa-left:   env(safe-area-inset-left, 0px);
  --sa-right:  env(safe-area-inset-right, 0px);
  --gutter: 14px;
}

#app {
  display: flex; flex-direction: column;
  height: 100dvh;
  background: var(--sand-50);
}

/* Kopfzeile ---------------------------------------------------------------- */
#app-header {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--sand-50);
  border-bottom: 1px solid var(--sand-200);
  padding:
    calc(11px + var(--sa-top))
    calc(var(--gutter) + var(--sa-right))
    11px
    calc(var(--gutter) + var(--sa-left));
  z-index: 20;
}

/* align-items: flex-start ist wesentlich: ohne das streckt die Flexbox das
   Logo auf die Breite des Untertitels, die Grafik wird darin zentriert und
   steht dann eingerückt statt bündig. */
.brand {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px; min-width: 0;
}

/* Die Wortmarke kommt als Bild aus assets/. Zwei Fassungen, weil dunkles
   Braun auf dunklem Grund verschwindet – umgeschaltet wird per Sichtbarkeit,
   damit beide Dateien vorgeladen sind und der Wechsel nicht flackert. */
.brand-logo { display: block; height: 29px; width: auto; max-width: 100%; }
.brand-logo--night { display: none; }
[data-theme="night"] .brand-logo--day { display: none; }
[data-theme="night"] .brand-logo--night { display: block; }

.brand-claim {
  /* Nie mit „…“ abschneiden (Manuel, 19.10.2026): Wird es eng, bricht der
     Untertitel zwischen den beiden Sätzen um, nie mitten im Satz. */
  max-width: 100%;
  font-size: 12.5px; color: var(--bark-500); line-height: 1.3;
}
.brand-claim > span { white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* Schmale Geräte: lieber ganz weglassen als angeschnitten zeigen.
   Unter 420px bleibt neben den beiden Knöpfen kein Platz für den Satz. */
@media (max-width: 419px) { .brand-claim { display: none; } }

/* Inhalt ------------------------------------------------------------------- */
#app-body {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
}
#map { flex: 0 0 40%; min-height: 0; background: var(--sand-200); z-index: 0; }
#panel {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--sand-50);
}

/* --------------------------- Ansichtssteuerung ---------------------------
   Basis ist das Handy: es ist immer genau eine Ansicht sichtbar, gesteuert
   über data-view am #app-Element. Der Desktop weiter unten hebt das für die
   Spot-Liste auf, damit sie stehen bleibt. */

#view-list, #view-form, #view-detail, #view-trip, #view-empty { display: none; }
#app[data-view="list"]   #view-list   { display: block; }
#app[data-view="form"]   #view-form   { display: block; }
#app[data-view="detail"] #view-detail { display: block; }
#app[data-view="trip"]   #view-trip   { display: block; }

/* ---------------------------- Ab Tablet: zwei Spalten ------------------- */

@media (min-width: 768px) {
  #app-body { flex-direction: row; }
  #map { flex: 0 0 58%; }
  #panel { border-left: 1px solid var(--sand-200); }
}

/* -------------------- Ab Computer: Liste bleibt stehen ------------------
   Drei Bereiche nebeneinander: Karte, eigene Spots, Arbeitsbereich. Die
   Liste verschwindet nicht mehr beim Öffnen eines Spots, und beide Spalten
   scrollen unabhängig. */

@media (min-width: 1100px) {
  #map { flex: 0 0 46%; }

  #panel {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    overflow: hidden;            /* gescrollt wird in den Spalten */
  }

  #view-list {
    display: block;              /* hebt die Basisregel auf */
    grid-column: 1; grid-row: 1;
    height: 100%; overflow-y: auto;
    border-right: 1px solid var(--sand-200);
    background: var(--sand-50);
  }

  #panel-main {
    grid-column: 2; grid-row: 1;
    height: 100%; overflow-y: auto;
  }

  /* Rechts steht der Platzhalter, solange nichts gewählt ist. */
  #app[data-view="list"] #view-empty { display: block; }

  /* Der Zurück-Knopf des Trips ist am Computer ebenso überflüssig. */
  #view-trip [data-action="trip-back"] { display: none; }

  /* Am Computer führt die Liste zurück – der Knopf wird überflüssig. */
  #view-detail [data-action="back"] { display: none; }

  /* Plätze nebeneinander, sobald die Spalte breit genug ist. */
  .camp-list { grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); }
}

/* Sehr breite Bildschirme: Lesebreite begrenzen, sonst laufen die
   Notizzeilen unangenehm weit. */
@media (min-width: 1600px) {
  #panel-main .view { max-width: 880px; }
}

/* ------------------------- Zeigergeräte: kompakter ----------------------
   Die grossen Flächen sind für Handschuhe im Gelände gedacht. Wer mit Maus
   am Schreibtisch sitzt, braucht sie nicht – dort darf es dichter werden. */

@media (hover: hover) and (pointer: fine) {
  .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .btn--icon { min-height: 40px; width: 40px; padding: 0; }
  .btn--sm { min-height: 34px; padding: 0 11px; font-size: 13px; }
  .field { min-height: 42px; padding: 10px 12px; font-size: 15px; }
  .toggle { min-height: 40px; }
  .card { padding: 13px; }
}

/* Fusszeile ---------------------------------------------------------------- */
#app-footer {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--sand-100);
  border-top: 1px solid var(--sand-200);
  padding:
    7px
    calc(var(--gutter) + var(--sa-right))
    calc(7px + var(--sa-bottom))
    calc(var(--gutter) + var(--sa-left));
  z-index: 20;
}
.foot-left  { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.foot-right { display: flex; align-items: center; gap: 8px; flex: none; }

/* Absender in zwei Zeilen: oben wer, darunter für wen. Beide dürfen
   umbrechen statt abzuschneiden – die Fusszeile wächst mit. */
.foot-note {
  margin: 0;
  display: flex; flex-direction: column; gap: 1px;
  font-size: 11.5px; line-height: 1.25;
  text-wrap: pretty;
}
.foot-by  { color: var(--bark-700); font-weight: 600; }
.foot-for { color: var(--bark-500); }
#app-footer .btn--sm { min-height: 34px; padding: 0 10px; }

/* Auf schmalen Geräten weicht die Versionsnummer, damit der Absender Platz
   behält. Sie steht ohnehin auch in der Info-Ebene. */
@media (max-width: 419px) { #app-version { display: none; } }

h1, h2, h3, h4 { margin: 0; color: var(--bark-800); }

/* ------------------------------- Typo-Helfer ----------------------------- */

.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--bark-400);
}
.muted { color: var(--bark-500); }
.small { font-size: 13px; }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* -------------------------------- Bausteine ------------------------------ */

.card {
  background: var(--sand-100);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}
.card--plain { background: transparent; box-shadow: none; }
.card--dashed { background: transparent; border-style: dashed; box-shadow: none; }

.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row--between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons – bewusst gross für die Bedienung im Gelände */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 16px;
  border-radius: var(--radius); border: 1px solid var(--sand-300);
  background: var(--sand-100); color: var(--bark-700);
  font: inherit; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer;
  transition: filter .12s ease, transform .06s ease;
}
.btn:active { transform: translateY(1px); }
.btn:hover { filter: brightness(.97); }
.btn--primary { background: var(--forest-600); border-color: var(--forest-700); color: #fff; }
.btn--sky     { background: var(--sky-600);    border-color: var(--sky-700);    color: #fff; }
.btn--ghost   { background: transparent; }
.btn--block   { display: flex; width: 100%; }
.btn--sm      { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn--icon    { min-height: 48px; width: 48px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Eingabefelder */
.field {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--sand-300);
  background: var(--sand-50); color: var(--bark-800);
  font: inherit; font-size: 16px; /* 16px verhindert iOS-Zoom beim Fokus */
}
.field::placeholder { color: var(--bark-400); }
textarea.field { min-height: 84px; resize: vertical; line-height: 1.45; }
label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--bark-500); margin-bottom: 5px; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--sand-300); background: var(--sand-50);
  font-size: 12px; font-weight: 600; color: var(--bark-500);
  white-space: nowrap;
}
.chip--forest { background: var(--forest-100); border-color: var(--forest-300); color: var(--forest-700); }
.chip--sky    { background: var(--sky-100);    border-color: var(--sky-300);    color: var(--sky-700); }
.chip--sun    { background: var(--sun-100);    border-color: var(--sun-300);    color: var(--sun-600); }
.chip--clay   { background: var(--clay-100);   border-color: var(--clay-600);   color: var(--clay-600); }

/* Umschalter (Filter) */
.toggle {
  flex: 1; min-height: 46px; border-radius: var(--radius);
  border: 1px solid var(--sand-300); background: var(--sand-100);
  color: var(--bark-400); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.toggle[data-on="true"].toggle--sky    { background: var(--sky-100);    border-color: var(--sky-300);    color: var(--sky-700); }
.toggle[data-on="true"].toggle--forest { background: var(--forest-100); border-color: var(--forest-300); color: var(--forest-700); }

/* Zeilen in Detailtabellen */
.deftable { display: grid; grid-template-columns: 108px 1fr; gap: 6px 12px; }
.deftable dt { font-size: 13px; color: var(--bark-500); }
.deftable dd { margin: 0; font-size: 14px; color: var(--bark-800); }

/* Lichtzeiten */
.timerow {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 0; border-bottom: 1px solid var(--sand-200);
}
.timerow:last-child { border-bottom: 0; }
.timerow .dot { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.timerow .lbl2 { flex: 1; font-size: 14px; color: var(--bark-700); }
.timerow .val { font-size: 14px; font-weight: 600; color: var(--bark-800); font-variant-numeric: tabular-nums; }

/* Hinweisboxen */
.note {
  border-radius: var(--radius); padding: 12px 14px; font-size: 14px;
  border: 1px solid var(--sun-300); background: var(--sun-100); color: var(--bark-700);
}
.note--clay { border-color: var(--clay-600); background: var(--clay-100); color: var(--clay-600); }
.note--forest { border-color: var(--forest-300); background: var(--forest-100); color: var(--forest-700); }

/* Ladeanzeige */
.spinner {
  width: 18px; height: 18px; border-radius: 999px;
  border: 2px solid var(--sand-300); border-top-color: var(--forest-600);
  animation: spin .8s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ------------------------------ Leaflet-Feinschliff ---------------------- */

.leaflet-container { background: var(--sand-200); font: inherit; }
.leaflet-tile { filter: var(--tile-filter); }
.leaflet-bar a,
.leaflet-control-attribution,
.leaflet-control-scale-line {
  background: var(--sand-50) !important;
  color: var(--bark-500) !important;
  border-color: var(--sand-300) !important;
}
.leaflet-control-attribution a { color: var(--sky-600) !important; }
.leaflet-control-scale-line { text-shadow: none !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--sand-50); color: var(--bark-800);
  border: 1px solid var(--sand-300); box-shadow: var(--shadow-md);
}
.leaflet-popup-content { margin: 10px 14px; font-size: 14px; }

/* Marker */
.spot-marker { background: none !important; border: none !important; }
.pin {
  width: 34px; height: 34px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--sand-50); box-shadow: var(--shadow-md);
  transition: transform .12s ease;
}
.pin svg { width: 18px; height: 18px; }
.pin--photo { background: var(--sky-600); color: #fff; }
.pin--camp  { background: var(--forest-600); color: #fff; }
.pin--active { transform: scale(1.3); box-shadow: 0 0 0 5px rgba(210, 149, 58, .35), var(--shadow-md); }
.pin--sm { width: 26px; height: 26px; border-width: 1.5px; }
.pin--sm svg { width: 14px; height: 14px; }

/* Fokus sichtbar halten – wichtig bei Bedienung mit Handschuhen */
:where(button, a, input, textarea, select):focus-visible {
  outline: 3px solid var(--sun-500); outline-offset: 2px;
}

.hidden { display: none !important; }

/* ------------------------------ Panel-Struktur --------------------------- */

.h2 { font-size: 17px; font-weight: 700; }
.h3 { font-size: 15px; font-weight: 700; }
.view {
  padding:
    var(--gutter)
    calc(var(--gutter) + var(--sa-right))
    var(--gutter)
    calc(var(--gutter) + var(--sa-left));
}

/* Massstabsleiste etwas höher, damit sie die Attribution nicht überlappt */
.leaflet-bottom.leaflet-left .leaflet-control-scale { margin-bottom: 22px; }
.leaflet-control-attribution { font-size: 11px; }

/* --------------------- Hervorhebung des gewählten Platzes ---------------- */

/* Dezent: warmer Grundton, kräftigerer Rand, kleiner Farbbalken links.
   Bewusst ohne Farbwechsel der Schrift, damit die Lesbarkeit gleich bleibt. */
.card--active {
  background: var(--forest-100);
  border-color: var(--forest-600);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.card--active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--forest-600);
}
/* Der gerade geöffnete Fotospot in der Liste – blau, passend zu Pin und
   Kamera-Symbol, damit er sich vom grünen Platz-Zustand unterscheidet. */
.card--current {
  background: var(--sky-100);
  border-color: var(--sky-600);
  position: relative; overflow: hidden;
}
.card--current::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--sky-600);
}

.card--klickbar { cursor: pointer; }
.card--klickbar:hover { border-color: var(--forest-300); }

/* Marker des gewählten Platzes mitziehen */
.pin--camp-active { transform: scale(1.28); box-shadow: 0 0 0 5px rgba(75,122,78,.30), var(--shadow-md); }

/* Trefferliste der Namenssuche */
.treffer {
  display: block; width: 100%; text-align: left;
  padding: 11px 13px; border: 1px solid var(--sand-300);
  border-radius: var(--radius); background: var(--sand-50);
  font: inherit; cursor: pointer;
}
.treffer:hover { background: var(--sand-100); border-color: var(--sky-300); }
.treffer + .treffer { margin-top: 8px; }
.treffer .t-name { font-weight: 700; color: var(--bark-800); font-size: 15px; }
.treffer .t-sub { font-size: 13px; color: var(--bark-500); }

/* ---------------------- Sichere Zonen für die Karte ---------------------- */

.leaflet-left   { margin-left:  var(--sa-left); }
.leaflet-right  { margin-right: var(--sa-right); }

/* --------------------------- Info-Ebene (Sheet) -------------------------- */

.sheet { position: fixed; inset: 0; z-index: 100; display: flex; }
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(51, 41, 31, .45);
  backdrop-filter: blur(2px);
}
.sheet-panel {
  position: relative;
  margin: auto auto 0;
  width: 100%; max-width: 620px; max-height: 88dvh;
  display: flex; flex-direction: column;
  background: var(--sand-50);
  border: 1px solid var(--sand-200);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-md);
  animation: sheet-auf .18s ease-out;
}
@keyframes sheet-auf { from { transform: translateY(14px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet-panel { animation: none; } }

@media (min-width: 768px) {
  .sheet-panel { margin: auto; border-radius: 20px; max-height: 82dvh; }
}

.sheet-head {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding:
    14px
    calc(var(--gutter) + var(--sa-right))
    12px
    calc(var(--gutter) + var(--sa-left));
  border-bottom: 1px solid var(--sand-200);
}
.sheet-body {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding:
    16px
    calc(var(--gutter) + var(--sa-right))
    calc(20px + var(--sa-bottom))
    calc(var(--gutter) + var(--sa-left));
}
.sheet-body section + section { border-top: 1px solid var(--sand-200); padding-top: 14px; }

/* --------------------------- Liste der Plätze ---------------------------- */

.camp-list { display: grid; gap: 10px; grid-template-columns: 1fr; }

/* ------------------------------ Sprachknopf ------------------------------
   Flaggen als SVG statt Emoji: Flaggen-Emoji werden unter Windows gar nicht
   als Flagge dargestellt. Gezeigt wird die Flagge der Sprache, in die
   umgeschaltet wird. */

.btn--flag { padding: 0; }
.flag {
  display: block; width: 26px; height: 18px;
  border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(42, 36, 28, .18) inset;
}
.flag svg,
.flag img { display: block; width: 100%; height: 100%; object-fit: cover; }

html[lang="de"] .flag--de { display: none; }
html[lang="en"] .flag--en { display: none; }

/* ------------------------------ Länderordner ----------------------------- */

.land-leiste {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none;                 /* die Leiste scrollt seitlich */
}
.land-leiste::-webkit-scrollbar { display: none; }

.land {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 8px; min-height: 44px;
  border-radius: 999px; border: 1px solid var(--sand-300);
  background: var(--sand-100); color: var(--bark-700);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
}
.land:hover { border-color: var(--sky-300); }
.land--aktiv {
  background: var(--sky-100); border-color: var(--sky-600); color: var(--sky-700);
}

.land-flagge {
  flex: none; width: 24px; height: 16px; border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(42, 36, 28, .18) inset;
}
.land-flagge svg,
.land-flagge img { display: block; width: 100%; height: 100%; object-fit: cover; }

.land-zahl {
  font-size: 12px; font-weight: 700; color: var(--bark-500);
  background: var(--sand-50); border-radius: 999px; padding: 1px 7px;
}
.land--aktiv .land-zahl { background: rgba(255, 255, 255, .65); color: var(--sky-700); }

#country-bar:not(:empty) { margin-bottom: 12px; }

/* --------------------------------- Reiter -------------------------------- */

.tabs {
  display: flex; gap: 6px; margin-bottom: 14px;
  background: var(--sand-100); border: 1px solid var(--sand-200);
  border-radius: var(--radius); padding: 4px;
}
.tab {
  flex: 1; min-height: 40px; border: 0; border-radius: 10px;
  background: transparent; color: var(--bark-500);
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
}
.tab[aria-selected="true"] {
  background: var(--sand-50); color: var(--bark-800); box-shadow: var(--shadow-sm);
}

/* --------------------------------- Trips --------------------------------- */

.trip-stop {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--sand-200);
}
.trip-stop:last-child { border-bottom: 0; }

.trip-nummer {
  flex: none; width: 30px; height: 30px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sky-600); color: #fff;
  font-size: 14px; font-weight: 800; margin-top: 2px;
}

.trip-tag {
  width: 74px; min-height: 34px; padding: 4px 8px; font-size: 13px;
  border-radius: 9px; border: 1px solid var(--sand-300);
  background: var(--sand-50); color: var(--bark-800); font-family: inherit;
}

.trip-licht {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px;
  font-size: 13px; margin-top: 8px;
}
.trip-licht dt { color: var(--bark-500); }
.trip-licht dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--bark-800); }

.trip-strecke {
  font-size: 12px; color: var(--bark-500);
  padding: 2px 0 2px 42px;
}

/* Nummerierte Marker der Trip-Stationen */
.pin--trip {
  background: var(--sky-600); color: #fff;
  font-size: 14px; font-weight: 800;
}
.pin--fuel { background: var(--bark-500); color: #fff; }

/* -------------------- Plätze und Tankstellen je Station ------------------ */

.umfeld { list-style: none; margin: 5px 0 0; padding: 0 0 0 27px; }
.umfeld li {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--bark-700);
  padding: 2px 0;
}
.umfeld li .truncate { min-width: 0; }

/* ------------------------------ Import-Vorschau -------------------------- */

.imp-liste {
  max-height: 46vh; overflow-y: auto;
  border: 1px solid var(--sand-200); border-radius: var(--radius);
  background: var(--sand-50);
}
.imp-zeile {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; cursor: pointer;
  border-bottom: 1px solid var(--sand-200);
}
.imp-zeile:last-child { border-bottom: 0; }
.imp-zeile:hover { background: var(--sand-100); }
.imp-zeile input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--forest-600); }
.imp-zeile--doppelt { opacity: .62; }
.imp-name { display: block; font-size: 14px; font-weight: 600; color: var(--bark-800); }

/* Fortschritt der Länderbestimmung – sitzt in derselben Leiste */
.land--lauf {
  background: var(--sun-100); border-color: var(--sun-300); color: var(--sun-600);
  cursor: default;
}

/* ------------------------- Länderpunkt auf der Karte ---------------------
   In der Übersicht steht je Land ein runder Punkt mit der Flagge. Keine Zahl:
   die Anzahl steht in der Länderleiste, auf der Karte zählt die Ruhe. */

.landpunkt {
  width: 38px; height: 38px; border-radius: 999px; overflow: hidden;
  border: 2.5px solid var(--sand-50);
  box-shadow: 0 2px 8px rgba(42, 36, 28, .35);
  cursor: pointer;
  transition: transform .12s ease;
  background: var(--sand-100);
}
.landpunkt:hover { transform: scale(1.08); }

/* Die Flaggen sind 4:3 – im runden Rahmen füllend zuschneiden, damit kein
   Rand entsteht. */
.landpunkt img,
.landpunkt svg { display: block; width: 100%; height: 100%; object-fit: cover; }


/* ------------------------- Rechtsauskunft am Spot ------------------------- */

/*
 * Fünf Übernachtungsarten würden die Detailansicht fluten, wenn alle offen
 * stünden. <details> hält sie zusammengeklappt: Der Status ist ohne Tippen
 * lesbar, die Bedingungen erst auf Wunsch.
 */
.recht-art {
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  background: var(--sand-100);
}
.recht-art > summary {
  display: flex; align-items: center; gap: 8px 10px;
  flex-wrap: wrap;               /* langer Titel schiebt die Marke in die zweite Zeile */
  padding: 11px 13px; cursor: pointer;
  font-weight: 600; font-size: 15px;
  list-style: none;
}
.recht-art > summary .grow { min-width: 8em; }
.recht-art > summary::-webkit-details-marker { display: none; }
.recht-art > summary::after {
  content: '›'; margin-left: 2px; font-size: 18px; line-height: 1;
  color: var(--bark-500); transition: transform .15s ease;
}
.recht-art[open] > summary::after { transform: rotate(90deg); }
.recht-art > summary:focus-visible { outline: 2px solid var(--sky-600); outline-offset: 2px; }
.recht-art__body { padding: 0 13px 12px; }

.recht-liste { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.recht-liste li { margin: 3px 0; }
.recht-liste--warn { color: var(--clay-600); }

/*
 * Biwakplätze und Hütten sind keine bewilligten Stellplätze. Der gestrichelte
 * Rand sagt das auf einen Blick – und zwar auch dann, wenn die Farbe nicht
 * ankommt (Nachtansicht, Sonnenlicht, Farbsehschwäche).
 */
.card--alt {
  border-style: dashed;
  border-color: var(--sky-300);
  background: transparent;
}

/* --------------------- Ort direkt auf der Karte antippen ------------------ */

/*
 * Die Leiste liegt über der Karte, nicht darüber im Fluss: Sonst würde sie
 * die Karte beim Ein- und Ausblenden in der Höhe verschieben, und Leaflet
 * müsste jedes Mal neu vermessen werden.
 */
/*
 * Die Leiste sass zuerst oben und war so hoch, dass sie die halbe Karte
 * verdeckte – ausgerechnet den Teil, auf den der Nutzer tippen soll. Jetzt
 * liegt sie als schmale Pille am unteren Rand, mittig, und nimmt nur die
 * Breite, die ihr Text braucht.
 */
.pick-bar {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--gutter) + 36px);   /* über Massstab und OSM-Zuschreibung */
  z-index: 500;                          /* über Leaflet-Bedienelementen (400) */
  display: flex; align-items: center; gap: 4px;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 7px 7px 7px 14px; border-radius: 999px;
  background: var(--sky-600); color: #fff;
  font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.pick-bar__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pick-bar__koord { font-size: 14px; }
.pick-bar__sub   { font-size: 11.5px; font-weight: 500; opacity: .82; }

.pick-bar__ok {
  flex: 0 0 auto; padding: 0 12px; height: 30px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--sky-700);
  font: inherit; font-weight: 700; font-size: 13.5px;
}
.pick-bar__ok:hover { filter: brightness(.95); }

.pick-bar__x {
  flex: 0 0 auto; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.2); color: #fff;
  font: inherit; font-size: 19px; line-height: 1;
}
.pick-bar__x:hover { background: rgba(255,255,255,.32); }

/*
 * Der vorläufige Pin muss sich vom gespeicherten Spot unterscheiden, sonst
 * glaubt man, es sei schon eingetragen. Kleiner, hell, gestrichelt – und er
 * lässt sich ziehen, deshalb der Greifzeiger.
 */
.pin--vorlaeufig {
  width: 26px; height: 26px;
  background: var(--sand-50); color: var(--sky-700);
  border: 2px dashed var(--sky-600);
  box-shadow: 0 0 0 4px rgba(62, 110, 142, .18), var(--shadow-sm);
  cursor: grab;
}
.pin--vorlaeufig svg { width: 13px; height: 13px; }
.leaflet-marker-draggable.leaflet-drag-target .pin--vorlaeufig { cursor: grabbing; }
/* display:flex uebersteuert sonst das [hidden] des Browsers. */
.pick-bar[hidden] { display: none; }

/* Runder Knopf auf der Karte, gleiche Anmutung wie die Leaflet-Bedienelemente. */
.map-knopf {
  position: absolute; right: var(--gutter); top: var(--gutter);
  z-index: 500;
  width: 42px; height: 42px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--sand-300); border-radius: 50%;
  background: var(--sand-50); color: var(--bark-700);
  cursor: pointer; box-shadow: var(--shadow-sm);
}
.map-knopf svg { width: 21px; height: 21px; }
.map-knopf:hover { background: var(--sand-100); }
.map-knopf[data-busy="true"] { color: var(--sky-600); animation: puls 1.1s ease-in-out infinite; }
@keyframes puls { 50% { opacity: .45; } }

/* Eigener Standort: gefüllter Punkt statt Nadel – er markiert keinen Ort,
   den man eingetragen hat, sondern wo man gerade ist. */
.pin--me {
  background: var(--sky-600); color: #fff;
  box-shadow: 0 0 0 4px rgba(62, 110, 142, .25), var(--shadow-sm);
}

/* Fadenkreuz sagt deutlicher als jeder Text, dass jetzt ein Tipp erwartet wird. */
#app.pick-aktiv #map,
#app.pick-aktiv #map .leaflet-grab { cursor: crosshair; }

/*
 * Solange gezielt wird, bekommt die Karte mehr Platz. Auf dem Telefon nimmt
 * sie sonst 40 Prozent der Höhe ein – zu wenig, um einen Punkt sicher zu
 * treffen. Nur unterhalb von 768 px: Auf dem Desktop ist sie ohnehin gross,
 * und ein springendes Layout wäre dort nur unruhig.
 */
@media (max-width: 767px) {
  #app.pick-aktiv #map { flex: 0 0 66%; transition: flex-basis .18s ease; }
}
@media (prefers-reduced-motion: reduce) {
  #app.pick-aktiv #map { transition: none; }
}

/* Marker für Biwakplätze und Hütten – gestrichelt wie ihre Karten in der Liste. */
.pin--alt {
  background: var(--sand-50); color: var(--sky-700);
  border: 2px dashed var(--sky-600);
}

/* Schalter, der sich nicht über die ganze Zeile ziehen soll. */
.toggle--auto { flex: 0 0 auto; padding: 0 14px; min-height: 38px; }

/* Filterknoepfe stehen nebeneinander in einer Zeile mit Zaehler – sie duerfen
   sich nicht wie die grossen Umschalter ueber die volle Breite ziehen. */
.filter-zeile .toggle { flex: 0 0 auto; min-height: 38px; padding: 0 14px; font-size: 13.5px; }

/* ------------------------- Eigene Rückfrage (statt confirm) --------------- */

/*
 * Bewusst schmaler und mittig statt am unteren Rand: Es ist eine Entscheidung,
 * keine Inhaltsfläche. Auf dem Telefon bleibt es eine Karte, kein Vollbild.
 */
.sheet-panel--schmal {
  margin: auto;
  max-width: 420px;
  border-radius: 18px;
  width: calc(100% - 2 * var(--gutter));
}
.sheet-panel--schmal .sheet-head { border-bottom: 0; padding-bottom: 0; }
.sheet-panel--schmal .sheet-body { padding-top: 10px; }

/* Löschen ist nicht die harmlose Wahl – die Farbe sagt das. */
.btn--clay { background: var(--clay-600); border-color: var(--clay-600); color: #fff; }

/* ------------------- Detailansicht: aufklappbare Abschnitte --------------- */

/*
 * Vier Kacheln statt einer langen Rolle. Die Kopfzeile trägt rechts eine
 * Kurzfassung ("23 in der Nähe"), damit man ohne Aufklappen sieht, ob sich
 * das Öffnen lohnt — gerade für Biwakplätze und Hütten, die vorher ganz
 * unten hinter einem Knopf lagen.
 */
.abschnitte { display: grid; gap: 10px; }

.abschnitt {
  border: 1px solid var(--sand-200);
  border-radius: var(--radius);
  background: var(--sand-100);
  box-shadow: var(--shadow-sm);
}
.abschnitt > summary {
  display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  padding: 13px 14px; cursor: pointer; list-style: none;
}
.abschnitt > summary::-webkit-details-marker { display: none; }
.abschnitt > summary::after {
  content: '›'; margin-left: auto; order: 3;
  font-size: 20px; line-height: 1; color: var(--bark-500);
  transition: transform .15s ease;
}
.abschnitt[open] > summary::after { transform: rotate(90deg); }
.abschnitt > summary:focus-visible { outline: 2px solid var(--sky-600); outline-offset: 2px; }

.abschnitt__titel { font-weight: 700; font-size: 16px; color: var(--bark-800); }
.abschnitt__summe {
  font-size: 13px; font-weight: 600; color: var(--bark-500);
  padding: 3px 9px; border-radius: 999px;
  background: var(--sand-200);
}
.abschnitt__summe--forest { background: var(--forest-100); color: var(--forest-700); }
.abschnitt__summe--sky    { background: var(--sky-100);    color: var(--sky-700); }
.abschnitt__summe--clay   { background: var(--clay-100);   color: var(--clay-600); }

/* Der Inhalt sitzt schon in einer Kachel – innen keine zweite Umrandung. */
.abschnitt__inhalt { padding: 0 14px 14px; }
.abschnitt__inhalt > .card {
  background: transparent; border: 0; box-shadow: none; padding: 0;
}
@media (prefers-reduced-motion: reduce) {
  .abschnitt > summary::after { transition: none; }
}

/* --------------- Versuch: Bild am Fotospot (siehe js/photos.js) ----------- */

.bild-rahmen { margin: 0; }
.bild-rahmen img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius); background: var(--sand-200);
}
.bild-rahmen figcaption { margin-top: 6px; line-height: 1.4; }

.bild-gitter {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
}
.bild-kachel {
  position: relative; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; background: var(--sand-200);
}
.bild-kachel img { display: block; width: 100%; height: 96px; object-fit: cover; }
.bild-kachel__text {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 4px 6px; font-size: 10.5px; line-height: 1.25; text-align: left;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bild-kachel:hover img { filter: brightness(1.06); }
.bild-kachel:focus-visible { outline: 2px solid var(--sky-600); outline-offset: 2px; }

/* Bildstreifen im Spot-Kopf: Wiedererkennen auf einen Blick. Flach genug,
   dass auf dem Telefon die Abschnitte darunter noch sichtbar bleiben. */
.kopfbild {
  position: relative; display: block; width: 100%;
  margin: 0; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; background: var(--sand-200);
}
.kopfbild img { display: block; width: 100%; height: 150px; object-fit: cover; }
.kopfbild__nennung {
  position: absolute; right: 0; bottom: 0; max-width: 100%;
  padding: 3px 8px; font-size: 10.5px; line-height: 1.3;
  color: #fff; background: rgba(0, 0, 0, .55);
  border-top-left-radius: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kopfbild:focus-visible { outline: 2px solid var(--sky-600); outline-offset: 2px; }
@media (min-width: 768px) { .kopfbild img { height: 190px; } }

/* ------------------------- Trip: Tage und Tagesplan ----------------------- */

/* Start, Reisetage, Fahrstil: kurze Felder nebeneinander, auf dem Telefon
   untereinander. */
.trip-felder {
  display: grid; gap: 6px 10px; align-items: center;
  grid-template-columns: max-content 1fr;
}
.trip-felder .field { min-height: 40px; padding: 6px 10px; font-size: 14px; }

.ortfeld { display: grid; gap: 6px; }
.ort-treffer { display: grid; gap: 6px; }
.ort-treffer__eintrag {
  gap: 10px; width: 100%; text-align: left; cursor: pointer; padding: 9px 12px;
}

/* Gesamturteil: die Farbe sagt, wie es um den Trip steht. */
.trip-urteil {
  border-radius: var(--radius); padding: 12px 14px; font-size: 14px;
  border: 1px solid var(--forest-300); background: var(--forest-100);
}
.trip-urteil--ambitioniert { border-color: var(--sun-300); background: var(--sun-100); }
.trip-urteil--zuviel       { border-color: var(--clay-600); background: var(--clay-100); }

/*
 * Ein Reisetag. Der linke Rand trägt die Bewertung, damit man beim Scrollen
 * durch einen langen Trip die vollen Tage sieht, ohne die Köpfe zu lesen.
 */
.tage { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.tag {
  border-left: 4px solid var(--forest-300);
  padding-left: 12px;
}
.tag--ambitioniert { border-left-color: var(--sun-500); }
.tag--zuviel       { border-left-color: var(--clay-600); }
.tag--ruhetag      { border-left-color: var(--sand-300); }

.tag-kopf {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 2px 0 8px;
}
/* Licht passt nicht zum Tagesablauf */
.tag-licht { margin: 0 0 8px; color: var(--clay-600); }

.tag-kopf__datum { font-weight: 500; color: var(--bark-500); }

/* Empfehlungen im Urteilskasten, abgesetzt vom Urteil darüber. */
.trip-vorschlag {
  gap: 8px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}
.trip-amweg .btn { flex: none; }

/* Hinweis mit „Rückgängig" */
.toast-rueck {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 9999;
  max-width: 92vw; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 12px;
}

/*
 * Raster und Zeilen im Trip dürfen nie breiter werden als die Spalte.
 * Ohne minmax(0, 1fr) wächst eine Rasterspalte mit dem breitesten Inhalt –
 * etwa einem einzeiligen Platznamen – und schiebt alles rechts aus dem Bild
 * (gefunden am 01.10.2026 beim Verkleinern des Fensters).
 */
.tag, .nacht, .tag-nav, .laender, .trip-vorschlag { min-width: 0; }
.nacht, .tag-nav, .laender { grid-template-columns: minmax(0, 1fr); }
.nacht__platz > .grow, .land-zeile > .grow, .trip-amweg > .grow { min-width: 0; }

/* An- und Rückreise: eigener Block neben dem Trip */
.reise-block {
  display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); min-width: 0;
  padding: 10px 12px; border-radius: 12px;
  border: 1px dashed var(--sand-300); background: var(--sand-100);
}
.reise-block > summary { cursor: pointer; list-style: none; }
.reise-block > summary::-webkit-details-marker { display: none; }
.tag--reise { border-left-color: var(--sand-300); }
.zuhause-karte { margin-bottom: 4px; }

/* Vermerk auf der Karte, solange ein Trip offen ist */
.karte-hinweis {
  max-width: 260px; padding: 4px 8px; border-radius: 8px;
  background: color-mix(in srgb, var(--sand-50) 88%, transparent);
  color: var(--bark-700); font-size: 11px; line-height: 1.3;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.15));
}

/* Übernachtung unterwegs: Vorschläge zwischen zwei Fahrtagen */
.nacht {
  display: grid; gap: 6px;
  margin: 6px 0 10px 18px; padding: 10px 12px;
  border-left: 3px solid var(--sky-300);
  border-radius: 0 10px 10px 0; background: var(--sand-100);
}
.nacht__platz .btn { flex: none; }
.nacht--reise { border-left-color: var(--forest-300); }
.nacht__platz--gewaehlt { color: var(--forest-700); }
.pin--nacht-gewaehlt { background: var(--forest-600); color: var(--sand-50); border-color: var(--forest-700); }
/* Länder auf der Route: Transit / Reiseland, Priorität */
.laender { display: grid; gap: 6px; }
.land-zeile {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 10px; background: var(--sand-100);
}
.land-zeile--transit { opacity: .8; }
.land-zeile__flagge { flex: none; display: inline-flex; width: 26px; height: 18px; border-radius: 3px; overflow: hidden; }
.land-zeile__flagge img, .land-zeile__flagge svg { width: 100%; height: 100%; object-fit: cover; }
.seg {
  flex: none; display: inline-flex; border: 1px solid var(--sand-300);
  border-radius: 999px; overflow: hidden; background: var(--sand-50);
}
.seg__knopf {
  border: 0; background: transparent; font: inherit; font-size: 12px; font-weight: 600;
  padding: 6px 10px; min-height: 32px; color: var(--bark-700); cursor: pointer;
}
.seg__knopf--an { background: var(--forest-600); color: var(--sand-50); }
.land-prio { flex: none; min-width: 36px; }

/* Vorschläge aus „Trip vorschlagen": gestrichelt, bis sie übernommen sind */
.trip-nummer--vorschlag { background: var(--sand-50); color: var(--sky-700); border: 2px dashed var(--sky-600); }
.trip-stop--vorschlag .h3 { color: var(--bark-700); }
.pin--vorschlag { background: var(--sand-50); color: var(--sky-700); border-style: dashed; }

/* Reiseziel einer Rundreise im Ablauf: Fahne statt Nummer */
.trip-nummer--ziel { background: var(--bark-800); color: var(--sand-50); }
.trip-nummer--ziel svg { width: 15px; height: 15px; }

.pin--nacht {
  width: 24px; height: 24px; border-width: 1.5px;
  background: var(--sky-100); color: var(--sky-700);
}
.pin--nacht svg { width: 13px; height: 13px; }

/* Navigation am Ende eines Reisetags; am heutigen Tag hervorgehoben. */
.tag-nav {
  display: grid; gap: 6px;
  margin-top: 10px; padding: 10px 12px;
  border-radius: 12px; background: var(--sand-100);
}
.tag-nav__titel { font-weight: 600; color: var(--bark-700); }
.tag-nav--heute { background: var(--sky-100); }

.trip-strecke__zusatz {
  display: block; font-size: 12px; color: var(--bark-500); margin-top: 2px;
}

/* Start und Ziel heben sich von den nummerierten Stationen ab. */
.pin--endpunkt { background: var(--bark-800); color: var(--sand-50); }
.pin--endpunkt svg { width: 17px; height: 17px; }

/* Abgleich zwischen Geräten ------------------------------------------------
   Knopf in der Kopfzeile: auf dem Telefon nur das Symbol, ab 768 px mit
   Beschriftung. Der Punkt zeigt Änderungen, die noch nicht gesendet sind. */
.btn--abgleich { position: relative; }
.btn--abgleich__text { display: none; }
@media (min-width: 768px) {
  .btn--abgleich { width: auto; padding: 0 14px 0 12px; gap: 8px; }
  .btn--abgleich__text { display: inline; font-size: 14px; font-weight: 600; }
}
.abgleich-punkt {
  position: absolute; top: -5px; right: -5px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; border: 2px solid var(--sand-50);
  background: var(--sun-500); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
}
.abgleich-punkt.hidden { display: none; }

/* Schmale Telefone: Die Sprache stellt man einmal ein (im Info-Fenster),
   abgeglichen wird immer wieder – der Platz gehört dem Abgleich. */
@media (max-width: 419px) { #btn-lang { display: none; } }

.abgleich-schritt {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: 14px;
  background: var(--sand-100); border: 1px solid var(--sand-200);
}
.abgleich-schritt__titel { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.abgleich-schritt__nr {
  flex: none; width: 24px; height: 24px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--forest-600); color: #fff; font-size: 13px; font-weight: 700;
}
.abgleich-stand { font-size: 13px; font-weight: 600; }
.abgleich-stand--offen { color: var(--sun-700, #9A6420); }
.abgleich-stand--ok { color: var(--forest-700, #35552F); }

/* Übernachtung am Abend ------------------------------------------------------ */
.abend {
  display: grid; gap: 8px;
  margin: 8px 0 10px; padding: 12px;
  border-radius: 12px; background: var(--sand-100);
  border: 1px solid var(--sand-200);
}
.abend--gewaehlt { border-color: var(--forest-300); }
.abend__kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.abend__mond { width: 18px; height: 18px; color: var(--sky-600); display: inline-flex; }
.abend__mond svg { width: 18px; height: 18px; }
.abend__vorschlag {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px; border-radius: 10px; background: var(--sand-50);
}
.abend__platz .btn { flex: none; }
.abend--gewaehlt .abend__platz { color: var(--forest-700); }
.abend-weitere { margin: 4px 0 8px; }
.abend__arten { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.abend__art { cursor: pointer; font-size: 12.5px; padding: 4px 10px; }
.abend__art--an { background: var(--forest-600); border-color: var(--forest-600); color: #fff; }
.abend__andere summary { cursor: pointer; color: var(--bark-600, inherit); padding: 2px 0; }
.abend__andere[open] summary { margin-bottom: 6px; }
.abend__platz .tabular, .nacht__platz .tabular { white-space: nowrap; }
/* Raster nie breiter als ihr Platz (Handy): Ohne minmax(0, 1fr) drückt eine
   lange Zeile – Platzname plus Ausstattung – den Block über den Bildschirm
   hinaus (gesehen am 19.10.2026, 625 px auf 375 px). */
.abend, .nacht { grid-template-columns: minmax(0, 1fr); }
.abend__platz > .grow, .nacht__platz > .grow, .abend__vorschlag > .grow { min-width: 0; }
.abend__vorschlag strong { overflow-wrap: anywhere; }
.abend__km { margin-left: 6px; white-space: nowrap; }

/* Tage als Übersicht (v129) ----------------------------------------------------
   Jeder Tag eine zugeklappte Zeile; aufgeklappt wie bisher. */
details.tag { border-radius: 0 12px 12px 0; background: var(--sand-50); }
details.tag > summary { list-style: none; cursor: pointer; }
details.tag > summary::-webkit-details-marker { display: none; }
.tag-zeile { display: grid; gap: 3px; padding: 10px 34px 10px 0; position: relative; min-width: 0; }
.tag-zeile::after {
  content: ''; position: absolute; right: 12px; top: 18px;
  width: 8px; height: 8px; border-right: 2px solid var(--bark-500); border-bottom: 2px solid var(--bark-500);
  transform: rotate(45deg); transition: transform .15s;
}
details.tag[open] > .tag-zeile::after { transform: rotate(-135deg); top: 22px; }
.tag-zeile__oben { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.tag-zeile__titel { font-weight: 700; font-size: 16px; min-width: 0; }
.tag-zeile__spots { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tag-zeile__unten { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tag-zeile__nacht--offen { color: var(--sun-700, #9A6420); }
details.tag[open] > .tag-zeile { border-bottom: 1px solid var(--sand-200); margin-bottom: 8px; }
.tag-inhalt { padding: 0 10px 10px 0; min-width: 0; }
.tage { gap: 8px; }

/* Rahmen des Trips: zugeklappt eine Zeile */
.trip-rahmen > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.trip-rahmen > summary::-webkit-details-marker { display: none; }
.trip-rahmen__kurz { display: block; font-weight: 600; }
.trip-rahmen__aendern {
  flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--sand-300);
  background: var(--sand-50); font-weight: 600;
}
.trip-rahmen[open] .trip-rahmen__aendern { background: var(--sand-200); }
.trip-einteilung { margin-top: 8px; }
.trip-einteilung > summary { cursor: pointer; font-weight: 600; }
.tag-zeile { padding-top: 8px; padding-bottom: 8px; gap: 2px; }
.tag-zeile__unten { font-size: 13px; }
.tag-zeile .chip { flex: none; font-size: 12px; padding: 2px 8px; }
.trip-titel { margin: 0; overflow-wrap: anywhere; }
.trip-rahmen__kurz { font-weight: 600; color: var(--bark-600, inherit); }

/* Keine Fusszeile mehr (v133): Info als Knopf auf der Karte, unter dem
   Standort-Knopf; offline als Pille oben auf der Karte. */
.map-knopf--info { top: calc(var(--gutter) + 50px); }
.karte-offline { position: absolute; top: var(--gutter); left: 50%; transform: translateX(-50%); z-index: 500; }
.karte-offline.hidden { display: none; }
#panel { padding-bottom: calc(16px + var(--sa-bottom)); }
.info-absender .foot-note { margin: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }

/* Handy: Karte etwas kleiner, damit mehr von Liste und Trip zu sehen ist –
   aber nicht so klein, dass sie nichts mehr zeigt. */
@media (max-width: 767px) { #map { flex: 0 0 34%; } }
.trip-licht__erkl { margin: 4px 0 0; }

/* Reiseplan: Titel und Knöpfe auf einer Zeile; wird es eng, rutscht nur der
   Titel darüber – die Knöpfe bleiben zusammen auf einer Zeile. */
.reiseplan-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap; }
.reiseplan-kopf .h3 { flex: 1 1 auto; }
.reiseplan-knoepfe { display: flex; gap: 6px; flex-wrap: nowrap; min-width: 0; }
.reiseplan-knoepfe .btn { flex: none; padding-left: 12px; padding-right: 12px; white-space: nowrap; }
@media (max-width: 420px) {
  .reiseplan-knoepfe { width: 100%; display: grid; grid-template-columns: auto 1fr 1fr; }
  .reiseplan-knoepfe .btn { min-width: 0; padding-left: 8px; padding-right: 8px; font-size: 13.5px;
    overflow: hidden; text-overflow: ellipsis; }
}

/* Pässe statt Tunnels: kleiner Knopf im Hinweis an der Etappe */
.trip-pass-knopf { margin-left: 4px; padding: 2px 10px; min-height: 0; font-size: 12px; vertical-align: baseline; }

/* Schutz vor Datenverlust: Einstieg, Home-Bildschirm, Sicherung (app.js, renderHinweis) */
#hinweis { margin-bottom: 14px; }
.hinweis { border-left: 4px solid var(--forest-600); gap: 10px; }
.hinweis--sicherung { border-left-color: var(--clay-600); }
.hinweis__schritte { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.4; }
.hinweis__symbol { vertical-align: -3px; display: inline-block; }

/* Rechtliches im Info-Fenster */
.info-recht { line-height: 1.8; }
.info-recht a { color: var(--sky-700); font-weight: 600; text-underline-offset: 2px; }

/* Lizenz */
.lizenz-eingabe { gap: 8px; margin-top: 6px; }
#lizenz-feld { min-height: 72px; font-size: 13px; word-break: break-all; }
.lizenz-fehler { color: var(--clay-600); font-weight: 600; }
