/* Reiseplaner – Gestaltung
   Ruhige Reisefarben: Meeresgrün, Sand, Terrakotta. Große Schrift und Knöpfe. */

:root {
  --meer: #0f5257;
  --meer-dunkel: #0a3b3f;
  --meer-hell: #e3efee;
  --terra: #c4573a;
  --terra-hell: #f8e4dc;
  --sonne: #d9a441;
  --sonne-hell: #f8eed6;
  --sand: #f6efe3;
  --papier: #fffdf9;
  --tinte: #1d2a2f;
  --grau: #5d6b70;
  --linie: #e2d8c7;
  --gruen: #2f7d4f;
  --gruen-hell: #e2f1e7;
  --rot: #b3261e;
  --rot-hell: #fbe4e2;
  --radius: 16px;
  --schatten: 0 1px 2px rgba(29, 42, 47, .06), 0 4px 14px rgba(29, 42, 47, .06);
  --kopfschrift: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: 18px;
  line-height: 1.5;
}
img { max-width: 100%; }
a { color: var(--meer); }
h1, h2, h3 { font-family: var(--kopfschrift); line-height: 1.2; margin: 0 0 .4em; color: var(--meer-dunkel); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .8em; }
code { background: var(--meer-hell); padding: 1px 6px; border-radius: 6px; }

.leise { color: var(--grau); }
.klein-text { font-size: .85rem; }
.mitte { text-align: center; }
[hidden] { display: none !important; }

/* ---------- Kopf und Fuß ---------- */
.kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px calc(12px);
  padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--meer); color: #fff;
  position: sticky; top: 0; z-index: 500;
}
.marke { color: #fff; text-decoration: none; font-family: var(--kopfschrift); font-size: 1.3rem; display: flex; align-items: center; gap: 10px; }
.marke-zeichen {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--sonne) 0 30%, transparent 31%),
              linear-gradient(to bottom, transparent 55%, #7fc1c4 55% 66%, transparent 66% 74%, #7fc1c4 74% 85%, transparent 85%);
  border: 2px solid #fff;
}
.kopf-nav { display: flex; gap: 16px; }
.kopf-nav a { color: #fff; text-decoration: none; font-size: 1rem; padding: 6px 0; }
.inhalt { max-width: 760px; margin: 0 auto; padding: 18px 16px 40px; }
.fuss { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(28px + env(safe-area-inset-bottom)); color: var(--grau); font-size: .78rem; }
.fuss a { color: var(--grau); }

.titelzeile { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.zurueck { font-size: 1rem; text-decoration: none; padding: 8px 0; }
.zurueck::before { content: "‹ "; }

/* ---------- Karten ---------- */
.karte {
  background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 18px; margin: 0 0 16px; box-shadow: var(--schatten);
}
.karte.schmal { max-width: 460px; margin: 24px auto; }
.karte.leer { text-align: center; }

/* ---------- Hinweise ---------- */
.hinweis { padding: 12px 14px; border-radius: 12px; background: var(--meer-hell); margin: 0 0 14px; }
.hinweis.fehler { background: var(--rot-hell); color: var(--rot); }
.hinweis.erfolg { background: var(--gruen-hell); color: var(--gruen); }
.hinweis.warnung { background: var(--terra-hell); color: #8a3a24; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none;
  color: var(--meer); background: var(--papier);
  border: 2px solid var(--meer); border-radius: 12px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.knopf:active { transform: translateY(1px); }
.knopf:disabled { opacity: .45; cursor: default; }
.knopf.haupt { background: var(--meer); color: #fff; }
.knopf.gross { min-height: 56px; font-size: 1.1rem; }
.knopf.voll { display: flex; width: 100%; }
.knopf.klein { min-height: 40px; padding: 6px 12px; font-size: .9rem; }
.knopf.gefahr { color: var(--rot); border-color: var(--rot); }
.knopf.ok { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.knopf.rund { width: 52px; height: 52px; min-height: 0; padding: 0; border-radius: 50%; font-size: 1.1rem; }
.knopf.riesig {
  display: flex; flex-direction: column; width: 100%; min-height: 86px; margin: 0 0 16px;
  font-size: 1rem; font-weight: 500; border-radius: 18px;
}
.knopf.riesig strong { font-size: 1.35rem; font-weight: 700; }
.knopf.riesig.haupt { box-shadow: 0 6px 18px rgba(15, 82, 87, .3); }
.knopf.haupt.voll { margin-bottom: 18px; }

.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.knopfreihe form { margin: 0; }
.knopfreihe.zwei > * { flex: 1 1 0; }

/* ---------- Formulare ---------- */
.formular { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 1rem; }
input[type=text], input[type=password], input[type=search], input[type=date], input[type=number], select {
  font: inherit; font-weight: 400; font-size: 1.05rem;
  width: 100%; min-height: 52px; padding: 10px 14px;
  border: 2px solid var(--linie); border-radius: 12px; background: #fff; color: var(--tinte);
}
input:focus, select:focus, .knopf:focus-visible, .auswahl:focus-visible { outline: 3px solid var(--sonne); outline-offset: 2px; }
.gross-eingabe { font-size: 1.2rem !important; min-height: 58px !important; }
.schalter-zeile { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.schalter-zeile input { width: 26px; height: 26px; accent-color: var(--meer); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { width: auto; flex: 1 1 160px; min-height: 40px; }

/* ---------- Reiseliste ---------- */
.reise { position: relative; }
.reise h2 { margin-right: 120px; }
.reise.aktiv { border: 2px solid var(--terra); }
.reise.vorbei { opacity: .8; }
.abzeichen {
  position: absolute; top: 14px; right: 14px;
  background: var(--terra); color: #fff; font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 99px;
}
.mehr { margin-top: 12px; }
.mehr summary { cursor: pointer; color: var(--grau); font-size: .95rem; padding: 6px 0; }

/* ---------- Assistent ---------- */
.schrittpunkte { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; }
.schrittpunkte li { flex: 1; }
.schrittpunkte button {
  width: 100%; height: 10px; padding: 0; border: 0; border-radius: 99px; background: var(--linie);
  font-size: 0; cursor: pointer;
}
.schrittpunkte li.besucht button { background: #9cc4c6; }
.schrittpunkte li.aktiv button { background: var(--meer); }
.schritt h2 { font-size: 1.6rem; }
.assistent-knoepfe { display: flex; gap: 12px; margin-top: 22px; position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--sand) 75%, transparent); }
.assistent-knoepfe .knopf { flex: 1; }

.auswahl-gitter { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auswahl-liste { display: grid; gap: 10px; }
.auswahl-liste.zwei { grid-template-columns: 1fr 1fr; margin-bottom: 14px; }
.auswahl {
  font: inherit; font-size: 1.05rem; font-weight: 600; text-align: left;
  min-height: 64px; padding: 12px 34px 12px 16px; border-radius: 14px; cursor: pointer;
  background: var(--papier); color: var(--tinte); border: 2px solid var(--linie);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  -webkit-tap-highlight-color: transparent;
}
.auswahl small { font-weight: 400; color: var(--grau); font-size: .9rem; }
.auswahl[aria-pressed=true] { border-color: var(--meer); background: var(--meer-hell); box-shadow: inset 0 0 0 1px var(--meer); }
.auswahl { position: relative; }
.auswahl[aria-pressed=true]::after { content: "✓"; position: absolute; top: 8px; right: 12px; color: var(--meer); font-size: 1.1rem; }
.reisetag-wahl p { margin: 8px 0 6px; }

.etappe { padding: 14px; }
#etappe-plus { margin-bottom: 8px; }
.etappe-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.etappe-gewaehlt { margin: 8px 0 0; padding: 10px 12px; background: var(--gruen-hell); border-radius: 10px; font-size: 1rem; }
.datum-paar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.datum-paar label { min-width: 0; }
.datum-paar input { min-width: 0; max-width: 100%; padding-left: 10px; padding-right: 6px; font-size: 1rem; }

.vorschlaege { list-style: none; margin: 6px 0 0; padding: 0; border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; background: #fff; }
.vorschlaege li { border-bottom: 1px solid var(--linie); }
.vorschlaege li:last-child { border-bottom: 0; }
.vorschlaege li.leise, .vorschlaege li.fehler { padding: 12px 14px; }
.vorschlaege li.fehler { color: var(--rot); }
.vorschlaege button {
  display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  padding: 12px 14px; border: 0; background: none; font: inherit; cursor: pointer; color: var(--tinte);
}
.vorschlaege button span { color: var(--grau); font-size: .9rem; }
.vorschlaege button:active { background: var(--meer-hell); }

/* ---------- Planung ---------- */
.fortschritt { height: 12px; border-radius: 99px; background: var(--linie); overflow: hidden; margin: 18px 0; }
.fortschritt-balken { height: 100%; width: 0; background: var(--meer); transition: width .4s; }
.schrittliste { list-style: none; padding: 0; margin: 0; }
.schrittliste li { padding: 8px 0 8px 34px; position: relative; color: var(--grau); }
.schrittliste li::before {
  content: ""; position: absolute; left: 4px; top: 12px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--linie);
}
.schrittliste li.laeuft { color: var(--tinte); font-weight: 600; }
.schrittliste li.laeuft::before { border-color: var(--meer); border-top-color: transparent; animation: drehen 1s linear infinite; }
.schrittliste li.fertig { color: var(--tinte); }
.schrittliste li.fertig::before { content: "✓"; border: 0; background: var(--gruen); color: #fff; font-size: 12px; line-height: 16px; text-align: center; width: 20px; height: 20px; top: 10px; }
.schrittliste li.fehler { color: var(--rot); }
.schrittliste li.fehler::before { border-color: var(--rot); background: var(--rot-hell); }
@keyframes drehen { to { transform: rotate(360deg); } }

/* ---------- Reise: Tage ---------- */
.tagleiste {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 14px -16px 8px; padding-left: 16px; padding-right: 16px;
  position: sticky; top: 62px; z-index: 400; background: var(--sand);
  scrollbar-width: none;
}
.tagleiste::-webkit-scrollbar { display: none; }
.tagchip {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 6px 8px;
  border-radius: 12px; background: var(--papier); border: 1px solid var(--linie); text-decoration: none; color: var(--tinte); font-size: .85rem;
}
.tagchip strong { font-size: .95rem; }
.tagchip.frei { color: var(--grau); background: transparent; }
.tagchip.ueber { border-color: var(--terra); }
.tag { scroll-margin-top: 140px; }
.tag-kopf { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.tag-kopf h2 { margin-bottom: 2px; }
.tag-kopf p { margin: 0 0 8px; font-size: .95rem; }
.tag-zeit { text-align: right; display: flex; flex-direction: column; flex: 0 0 auto; }
.tag-zeit strong { font-size: 1.15rem; color: var(--meer); }
.tag-zeit span { font-size: .8rem; color: var(--grau); }
.tag-zeit.ueber strong { color: var(--rot); }
.tageskarte { height: 230px; border-radius: 12px; margin: 10px 0 14px; background: var(--meer-hell); z-index: 1; }
.freier-tag { font-family: var(--kopfschrift); font-size: 1.25rem; color: var(--grau); text-align: center; padding: 18px 0; margin: 0; }

.stoppliste { list-style: none; margin: 0; padding: 0; }
.stoppliste li { display: flex; align-items: center; gap: 12px; }
.stoppliste li.hotel { color: var(--grau); font-size: .95rem; padding: 4px 0; }
.stoppliste li.fahrt {
  margin-left: 15px; padding: 2px 0 2px 24px; border-left: 2px dashed #a9c9ca; color: var(--grau); font-size: .85rem; min-height: 26px;
}
.stoppliste li.stopp { padding: 4px 0; }
.punkt {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--meer); color: #fff; font-weight: 700; font-size: .95rem;
}
li.hotel .punkt { background: var(--terra); }
li.mittag .punkt, .uw-ort.mittag .punkt { background: var(--sonne); }
li.mittag .punkt::before, .uw-ort.mittag .punkt::before { content: "☕"; font-size: .9rem; }
.stopp-knopf {
  flex: 1; display: flex; flex-direction: column; text-align: left; gap: 2px; min-height: 56px; justify-content: center;
  padding: 8px 12px; font: inherit; color: var(--tinte); background: var(--sand); border: 1px solid transparent; border-radius: 12px; cursor: pointer;
}
.stopp-knopf strong { font-size: 1.05rem; }
.stopp-knopf .leise { font-size: .88rem; }
li.fest .stopp-knopf { border-color: var(--sonne); background: var(--sonne-hell); }
.marke-fest { color: #8a6516; font-weight: 600; }
.pfeile { display: flex; flex-direction: column; gap: 4px; }
.pfeil {
  width: 40px; height: 30px; border: 1px solid var(--linie); background: var(--papier); border-radius: 8px;
  font-size: .75rem; color: var(--meer); cursor: pointer;
}
.pfeil:disabled { opacity: .3; }

/* Kartenmarker */
.km { background: none; border: 0; }
.km span {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 14px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); font-family: var(--schrift);
}
.km-ort span { background: var(--meer); }
.km-hotel span { background: var(--terra); }
.km-mittag span { background: var(--sonne); }
.km-mittag span::before { content: "☕"; font-size: 13px; }

/* ---------- Dialoge ---------- */
.dialog {
  width: min(560px, calc(100vw - 20px)); max-height: calc(100vh - 40px); padding: 0;
  border: 0; border-radius: 20px; background: var(--papier); color: var(--tinte); box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.dialog::backdrop { background: rgba(10, 30, 32, .5); }
.dialog-kopf {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 16px 18px 10px; position: sticky; top: 0; background: var(--papier); z-index: 2; border-bottom: 1px solid var(--linie);
}
.dialog-kopf h2 { margin: 0; }
.schliessen {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; border: 0; background: var(--sand); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--tinte);
}
.dialog-inhalt { padding: 14px 18px 22px; }
.dialog-inhalt img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.aktionen { display: grid; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--linie); }
.feld { font-weight: 600; }
.feld-reihe { display: flex; gap: 8px; }
.feld-reihe select { flex: 1; }
.ersatzliste { display: grid; gap: 10px; margin-bottom: 14px; }
.ersatz {
  display: flex; flex-direction: column; text-align: left; gap: 4px; padding: 12px 14px; font: inherit;
  background: var(--sand); border: 2px solid var(--linie); border-radius: 12px; cursor: pointer; color: var(--tinte);
}
.ersatz strong { font-size: 1.05rem; }
.ersatz .auszug { font-size: .88rem; }

/* ---------- Warten und Meldungen ---------- */
.warten { position: fixed; inset: 0; background: rgba(246, 239, 227, .8); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.warten-box { background: var(--papier); padding: 22px 26px; border-radius: 18px; box-shadow: var(--schatten); text-align: center; max-width: 300px; }
.warten-box p { margin: 12px 0 0; }
.kreisel { display: inline-block; width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--meer-hell); border-top-color: var(--meer); animation: drehen 1s linear infinite; }
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  width: min(560px, calc(100vw - 24px)); padding: 14px 18px; border-radius: 14px;
  background: var(--meer-dunkel); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 3000;
  transition: transform .3s ease; font-size: 1rem;
}
.toast.sichtbar { transform: translate(-50%, 0); }

/* ---------- Unterwegs ---------- */
.tagwahl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 4px; }
.tagwahl-text { text-align: center; display: flex; flex-direction: column; }
.tagwahl-text strong { font-family: var(--kopfschrift); font-size: 1.6rem; color: var(--meer-dunkel); }
.tagwahl-text span { color: var(--grau); font-size: .95rem; }
.segment { display: flex; background: var(--papier); border: 2px solid var(--meer); border-radius: 14px; overflow: hidden; margin: 12px 0 16px; }
.segment button {
  flex: 1; min-height: 50px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--meer); cursor: pointer;
  border-right: 1px solid var(--meer-hell);
}
.segment button:last-child { border-right: 0; }
.segment button[aria-pressed=true] { background: var(--meer); color: #fff; }
.tagesroute summary { cursor: pointer; font-weight: 600; color: var(--meer); min-height: 30px; }
.tagesroute .knopf { margin-top: 10px; }
.uw-liste { list-style: none; padding: 0; margin: 0; }
.uw-kopf { display: flex; gap: 12px; align-items: flex-start; }
.uw-kopf h2 { margin: 2px 0 2px; font-size: 1.3rem; }
.uw-kopf p { margin: 0 0 8px; font-size: .92rem; }
.uw-bild { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; margin: 6px 0 10px; display: block; }
.uw-ort.erledigt { opacity: .6; }
.uw-ort.erledigt h2 { text-decoration: line-through; }

/* ---------- Verwaltung ---------- */
.reiter { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 16px; }
.reiter a { padding: 10px 14px; border-radius: 10px; text-decoration: none; background: var(--papier); border: 1px solid var(--linie); font-size: .95rem; }
.reiter a.aktiv { background: var(--meer); color: #fff; border-color: var(--meer); }
.konto.gesperrt { opacity: .65; }

/* ---------- Leaflet-Anpassungen ---------- */
.leaflet-container { font-family: var(--schrift); }
.leaflet-control-attribution { font-size: 10px; }

@media (min-width: 640px) {
  .auswahl-gitter { grid-template-columns: 1fr 1fr 1fr; }
  .tageskarte { height: 300px; }
  h1 { font-size: 2rem; }
}

@media print {
  .kopf, .fuss, .knopfreihe, .tagleiste, .pfeile { display: none !important; }
}
