:root {
  --bg: #f6f5f1;
  --panel: #ffffff;
  --ink: #1d232b;
  --muted: #66707c;
  --reset: #c62828;
  --line: #e2e0d8;
  --accent: #a85c14; /* 4,99:1 auf Weiß, auch als Knopf mit weißer Schrift (vorher #d9822b: 2,93:1) */
  --on-accent: #fff;
  --dry: #2e8b57;
  --wet: #d64545;
  --base: #2f6fde;
  --brand: #1f4f8f;
  --panel-rgb: 255, 255, 255;
  --field: #ffffff;      /* Eingabefelder (Auswahl, Zeit, Adresse …) */
  --field-line: #e2e0d8;
}

/* Dunkel: per JS gesetzt (nach Tageszeit oder Einstellung), ohne JS nach Systemeinstellung */
:root[data-theme="dark"] {
  --panel-rgb: 28, 32, 38;
  --bg: #14171b;
  --panel: #1c2026;
  --ink: #e8eaed;
  --muted: #9aa3ad;
  --accent: #d9822b; /* dunkel: helles Orange als Text, darauf dunkle Schrift */
  --on-accent: #1d1206;
  --reset: #ff6b6b;
  --line: #2c323a;
  --tunnel: #b0bec5; /* hellgrau statt dunkelgrau (Nutzer 05.11.) */
  /* Felder heller als das Menü und mit sichtbarem Rand (Rand 3:1 zum Menü): vorher Feld = Menüfarbe, Rand #2c323a – am iPhone
     kaum zu erkennen (Nutzer 16.11.) */
  --field: #272c34;
  --field-line: #5f6873;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #14171b;
    --panel: #1c2026;
    --ink: #e8eaed;
    --muted: #9aa3ad;
    --accent: #d9822b;
    --on-accent: #1d1206;
    --reset: #ff6b6b;
    --line: #2c323a;
    --tunnel: #b0bec5;
    --field: #272c34;
    --field-line: #5f6873;
    }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  /* Seite selbst federt nicht mit: am Ende des Menüs verschob sich sonst der ganze Bildschirm (iPhone, Nutzer 24.10.) */
  overscroll-behavior: none;
  /* Kein Doppeltipp-Zoom (Fehlbedienung mit Handschuh/Vibration, Nutzer 01.11.); Zwei-Finger-Zoom bleibt, Tippen ohne iOS-Wartezeit */
  touch-action: manipulation;
}

body { display: flex; }

#panel {
  width: 360px;
  max-width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain; /* Scrollen am Ende nicht an die Seite weitergeben */
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#map { flex: 1; height: 100%; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Gedrückthalten zum Punktsetzen: Ring wächst in 0,5 s */
.hold-ring { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; z-index: 700;
  border: 3px solid var(--accent); pointer-events: none; animation: hold-shrink 0.4s linear forwards; }
/* zieht von groß auf den Punkt zusammen (Nutzer 09.11.), Dauer = HOLD_MS in app.js */
@keyframes hold-shrink { from { transform: scale(1); opacity: 0.35; } to { transform: scale(0.3); opacity: 1; } }

h2 { margin: 0 0 6px; font-size: 16px; }

section { display: flex; flex-direction: column; gap: 8px; }

label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; }

label.check { flex-direction: row; align-items: center; color: var(--ink); font-size: 14px; }

input[type=number], input[type=datetime-local], input[type=password] {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--field-line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
}

button {
  font: inherit;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--field-line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

button.primary { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* gesperrt = nicht möglich (z. B. Speichern ohne Route), nicht „lädt“: kein Warte-Zeiger – der sah am PC wie ein ewiger
   Ladekreisel aus (Nutzer 19.10.). Nur Knöpfe, die gerade senden, zeigen ihn (aria-busy). */
button:disabled { opacity: 0.5; cursor: not-allowed; }
button:disabled[aria-busy="true"] { cursor: wait; }

.row { display: flex; gap: 8px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.modes { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }

.mode { flex: 1; border: 0; border-radius: 0; }

.mode.active { background: var(--accent); color: var(--on-accent); }

.hint { margin: 0; color: var(--muted); font-size: 13px; }

.pill { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }

.pill.ok { background: rgba(46, 139, 87, 0.15); color: var(--dry); }

.pill.warn { background: rgba(214, 69, 69, 0.15); color: var(--wet); }
/* Test-Instanz: nicht mit der Produktion verwechseln */
.pill.instance { background: #c2185b; color: #fff; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

ol, ul { margin: 0; padding-left: 20px; }

li { margin: 2px 0; }

li button { padding: 0 6px; margin-left: 6px; font-size: 12px; }


table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }

th, td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); }

th:first-child, td:first-child { text-align: left; }

.legend { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }

.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 3px; vertical-align: middle; opacity: 0.8; }

details summary { cursor: pointer; color: var(--muted); }


@media (max-width: 700px) {
  body { flex-direction: column-reverse; }
  /* Menü 60 %: erste Routenkarte ohne Zwischenziele ganz sichtbar, dauerhaft gleich – kein Karten-Sprung, wenn die Route kommt (Nutzer 07.11.) */
  #panel { width: 100%; height: 60%; border-right: 0; border-top: 1px solid var(--line); }
  #map { height: 40%; }
}

/* --- Adressfelder & Autovervollständigung --- */
.waypoints { display: flex; flex-direction: column; gap: 6px; }

.wp { display: flex; align-items: center; gap: 6px; }

.badge {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  background: var(--ink); color: var(--panel);
}
.badge.start { background: var(--dry); color: #fff; }
.badge.end { background: var(--wet); color: #fff; }
/* Ziel: Flagge wie in der Karte (#603), ohne Kreis */
.badge.end.flag { background: none; border-radius: 0; }
.badge.end.flag svg { width: 22px; height: 26px; display: block; }

.ac { position: relative; flex: 1; min-width: 0; }

.ac input {
  width: 100%;
  font: inherit;
  padding: 7px 9px;
  border: 1px solid var(--field-line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
}

.ac ul {
  position: absolute;
  z-index: 1000;
  left: 0; right: 0; top: calc(100% + 2px);
  margin: 0; padding: 4px 0;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  max-height: 260px;
  overflow-y: auto;
}

.ac li { padding: 6px 10px; cursor: pointer; margin: 0; }
.ac li small { display: block; color: var(--muted); font-size: 12px; }
.ac li.active, .ac li:hover { background: rgba(217, 130, 43, 0.14); }

.wp .remove { padding: 2px 8px; flex: none; }

button.link { border: 0; padding: 2px 0; color: var(--accent); text-align: left; align-self: flex-start; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { padding: 4px 10px; font-size: 13px; border-radius: 999px; }

.range-row { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.range-row input { flex: 1; }

.modes.small .mode { padding: 5px 8px; font-size: 13px; }

input[type=range] { width: 100%; accent-color: var(--accent); }

/* --- Rundtour-Vorschläge --- */
.trip {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 2px 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 6px;
}
.trip.active { border-color: var(--accent); background: rgba(217, 130, 43, 0.08); }
.trip .dot { width: 12px; height: 12px; border-radius: 50%; grid-row: span 2; }
.trip .title { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
/* feste Spalten: Länge | Dauer | Regen – Regen steht in jeder Karte an derselben Stelle */
/* Länge und Dauer so breit wie nötig, der Rest für Regen (bricht dort sonst um); Werte gut lesbar in Textfarbe,
   Zusätze (Unterschied, doppelt, Autobahn) klein und grau darunter */
.trip .meta { color: var(--ink); font-size: 14px; grid-column: 2; display: grid;
  grid-template-columns: minmax(4.2em, auto) minmax(3.6em, auto) 1fr; gap: 4px 14px; font-variant-numeric: tabular-nums; }
.trip .meta > span:not(:last-child) { white-space: nowrap; }
/* Unterschied (+7 km, +10 min) immer in eigener Zeile unter dem Wert – sonst bricht er je nach Länge mal um, mal nicht */
.trip .meta small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
/* Ankunft groß in eigener Spalte rechts, über beide Zeilen mittig; Sonne/Nacht klar gelb in der Regen-Spalte */
.trip .meta:has(.eta) { grid-template-columns: minmax(3.6em, auto) minmax(3.2em, auto) minmax(0, 1fr) auto; column-gap: 10px; font-size: 15px; }
/* bei großer Schrift (Systemzoom) darf die Regen-Spalte umbrechen statt die Karte zu sprengen */
.trip .meta:has(.eta) > span:nth-child(3), .trip .meta:has(.eta) > span:nth-child(3) small, .trip .eta small { white-space: normal; }
.trip .eta { grid-column: 4; grid-row: 1 / span 2; align-self: center; text-align: right; }
.trip .eta b { display: block; font-size: 22px; line-height: 1; font-weight: 700; letter-spacing: -0.01em; }
.trip .eta small { margin-top: 3px; max-width: 6.5em; margin-left: auto; }
.trip .meta small.sun { color: #c98f00; }
[data-theme="dark"] .trip .meta small.sun { color: #f0c14b; }

a { color: var(--accent); }

[hidden] { display: none !important; }

/* --- Wegpunkt-Werkzeuge --- */
.tools { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.tools button:disabled { color: var(--muted); opacity: 0.5; cursor: default; }

.handle {
  flex: none;
  cursor: grab;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: -2px;
  padding: 4px 2px;
  touch-action: none;
  user-select: none;
}
.sortable-ghost { opacity: 0.4; }

button.icon {
  flex: none;
  width: 32px; height: 32px;
  padding: 0;
  display: inline-grid; place-items: center; /* Symbol (SVG) mittig */
  font-size: 16px;
  line-height: 1;
  border-radius: 6px;
}

/* Vorschlagsliste: passt aufs Handy-Display, scrollt in sich */
.ac ul { max-height: min(45vh, 320px); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ac li { padding: 9px 10px; }

/* --- Hinweise --- */
.note { margin: 0 0 6px; padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.note.warn { background: rgba(214, 69, 69, 0.12); border-left: 3px solid var(--wet); }
.note.info { background: rgba(47, 111, 222, 0.10); border-left: 3px solid var(--base); color: var(--muted); }
.icon-spacer { flex: none; width: 32px; }

/* Verschiebe-Symbol rechts im Adressfeld */
.ac input { padding-right: 30px; }
.ac .move {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  cursor: grab;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  user-select: none;
  touch-action: none;
}
#tripSection .ac input { padding-right: 9px; }
/* Lackfarbe des Themes: runde Farbfelder, gewähltes mit Ring */
.design-colors { margin: 2px 0 10px; }
#designColors { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
#designColors button { width: 28px; height: 28px; padding: 0; border-radius: 50%; cursor: pointer; border: 0; }
/* Lackfarbe wie Metallic-Lack (Nutzer 22.10., Variante A): Glanz läuft rundum (conic), Glanzpunkt oben links,
   feines Glitzerkorn als SVG-Rauschen darübergeblendet, Schatten innen und darunter */
.paint {
  position: relative; overflow: hidden;
  background-color: var(--paint);
  background-image:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.75) 0, rgba(255, 255, 255, 0.2) 18%, rgba(255, 255, 255, 0) 42%),
    conic-gradient(from 200deg at 50% 50%, color-mix(in srgb, var(--paint) 55%, #000), color-mix(in srgb, var(--paint) 70%, #fff) 25%,
      var(--paint) 45%, color-mix(in srgb, var(--paint) 50%, #000) 70%, color-mix(in srgb, var(--paint) 75%, #fff) 90%,
      color-mix(in srgb, var(--paint) 55%, #000));
  box-shadow: inset 0 -4px 7px rgba(0, 0, 0, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.5), 0 2px 5px rgba(0, 0, 0, 0.35);
}
.paint::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0.16; mix-blend-mode: overlay; /* feiner Schimmer – 0,55 wirkte grießlig/schmutzig (Nutzer 23.10.) */ pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.4' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 2.2 -0.9'/%3E%3C/filter%3E%3Crect width='60' height='60' filter='url(%23n)'/%3E%3C/svg%3E");
}
#designColors button.active, .pick-colors button.active {
  box-shadow: inset 0 -4px 7px rgba(0, 0, 0, 0.4), inset 0 2px 2px rgba(255, 255, 255, 0.5),
    0 0 0 3px var(--panel), 0 0 0 5px var(--accent);
}

/* Wegpunkte in der Karte: wie die Abzeichen der Liste, mit Rand in Hintergrundfarbe (hell: schwarz mit weißem Rand) */
.wp-mk {
  box-sizing: border-box;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font: 700 11px/1 system-ui, sans-serif;
  background: var(--ink); color: var(--panel);
  border: 2px solid var(--panel);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.wp-mk.start { background: var(--dry); color: #fff; }
.wp-mk.end { background: var(--wet); color: #fff; }
/* Ziel als Flagge (#557): kein Kreis, nur Schatten unter der Form */
.wp-mk.flag { background: none; border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.4)); }
.wp-mk.flag svg { display: block; width: 100%; height: 100%; pointer-events: none; }

.badge.drag { cursor: grab; touch-action: none; user-select: none; position: relative; }
/* Fläche zum Antippen/Ziehen auf ~44 px vergrößern (Punkt bleibt 22 px) – am Handy traf man S/Z oft nicht */
.badge.drag::after { content: ""; position: absolute; inset: -11px; }
.sortable-chosen .ac input { border-color: var(--accent); }
.sortable-fallback { opacity: 0.9 !important; }

.chips button.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
label.check.small { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* --- Karte im Dunkelmodus --- */
/* Nur die Bildkarten (Topo, basemap.at, OSM). Die Vektorkarte hat die Dunkelfarben im Stil (themeMapColors in app.js):
   der Filter lag dort auch auf Route und Verkehr (blass) und kostete beim Verschieben ~9× so viel Zeit je Bild */
:root[data-theme="dark"] .leaflet-tile-pane .dl-base {
  filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.88) saturate(0.55);
}
:root[data-theme="dark"] .leaflet-container { background: #1b1f24; }
:root[data-theme="dark"] .leaflet-bar a,
:root[data-theme="dark"] .leaflet-control-layers {
  background: var(--panel);
  color: var(--ink);
  border-color: var(--line);
}
:root[data-theme="dark"] .leaflet-control-layers-toggle { filter: invert(1); }

select {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--field-line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
}

.chips button:disabled { opacity: 0.45; cursor: default; }

/* --- Wegpunkt-Zeile mit „ab hier“ --- */
.wp-wrap { display: flex; flex-direction: column; gap: 2px; }
.leg { margin-left: 28px; padding-left: 10px; border-left: 2px dashed var(--line); display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }
.leg.custom { border-left-color: var(--accent); }
.leg-head { border: 0; padding: 2px 0; text-align: left; font-size: 13px; color: var(--muted); background: transparent; }
.leg.custom .leg-head { color: var(--accent); }
.leg .chips button { font-size: 12px; padding: 3px 8px; }

.ac li { display: flex; align-items: center; gap: 8px; }
.ac-text { flex: 1; min-width: 0; }
.ac-take { flex: none; width: 34px; height: 30px; padding: 0; font-size: 16px; border-radius: 6px; }

:root[data-theme="dark"] { --brand: #3f7fc7; }

#result.stale #resultBody, #result.stale #reason { opacity: 0.45; transition: opacity 0.2s; } /* nicht „busy“: .busy malt den Ladekreisel der Statuszeile */
/* Rechnet es neu, steht ein kleiner Kreisel vor der Überschrift – in derselben Zeile, kein Umbruch (Nutzer 14.11.) */
#result.stale #decision::before { content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-right: 0.4em; vertical-align: -0.05em;
  border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; box-sizing: border-box; }

@keyframes spin { to { transform: rotate(360deg); } }
/* Standort-Knopf sucht GPS: sichtbar arbeiten, sonst wirkt der erste Tipp verloren (#456) */
button.icon.busy .ico { animation: spin 1s linear infinite; color: var(--brand); }

:root[data-theme="dark"] .leaflet-control-scale-line { background: rgba(28, 32, 38, 0.8); color: var(--ink); border-color: var(--ink); text-shadow: none; }

/* Quellen: ⓘ dauerhaft ganz rechts unten in der Ecke (Kästchen wie Leaflets Quellenangabe), links davon TEST, ganz links beim Laden „© OpenStreetMap“ */
/* Kein eckiges Kästchen hinter dem runden ⓘ (Nutzer 13.11.): das Steuerelement ist durchsichtig, nur „© OpenStreetMap“ hat
   ein eigenes abgerundetes Feld zum Lesen; TEST-Schild und ⓘ bringen ihren Hintergrund selbst mit */
.leaflet-container .map-info { display: flex; align-items: center; gap: 6px; padding: 0 4px 4px 0; background: none; font-size: 11px; }
.map-info-osm { padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.85); }
.map-info.collapsed .map-info-osm { display: none; }
:root[data-theme="dark"] .map-info { color: var(--ink); }
:root[data-theme="dark"] .map-info-osm { background: var(--panel); }
.legal-list { margin: 0 0 8px; padding-left: 18px; line-height: 1.45; }
#legalBtn { align-self: flex-start; }
.attr-toggle { display: grid; place-items: center; box-sizing: border-box; flex: none; width: 22px; height: 22px; padding: 0; margin: 0; font-size: 14px; line-height: 1; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(0, 0, 0, 0.15); color: #333; }
:root[data-theme="dark"] .attr-toggle { background: rgba(28, 32, 38, 0.85); color: var(--ink); border-color: var(--line); }

/* Ladeanzeige im Kartenstatus */
.busy { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.busy::before { content: ""; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite; }
.variants-busy { flex: none; margin: 0 6px; font-size: 13px; }
.variants-busy[hidden] { display: none; }

/* Wasserzeichen: Banner blass hinter den Einstellungen (bleibt stehen, Inhalt scrollt darüber) */
#panel {
  background:
    linear-gradient(rgba(var(--panel-rgb), 0.88), rgba(var(--panel-rgb), 0.88)),
    var(--hero-img, url("theme-asset/chopper/hero.jpg")) 59% 70% / cover no-repeat, /* Lage genauer: placeHero (app.js) */
    var(--panel);
}
/* Lesbarkeit über dem Wasserzeichen: Felder und Knöpfe deckend */
.ac input, input[type=number], input[type=datetime-local], input[type=password], select { background-color: var(--field); }
button:not(.link):not(.leg-head), .modes, .trip, .note { background-color: var(--panel); }
#panel .chips button.active { background-color: var(--accent); }
#panel button.primary { background-color: var(--brand); }
#panel input[type=datetime-local].set { border-color: var(--accent); background-color: rgba(217, 130, 43, 0.12); font-weight: 600; }
.dep-info { margin-top: 6px; padding: 6px 10px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
#panel .modes .mode.active { background-color: var(--accent); color: var(--on-accent); }   /* „ausgewählt“ überall gleich (Nutzer 07.11.) */
#panel .trip.active { background-color: rgba(217, 130, 43, 0.12); }

/* Kurven-Stufe: eigene Zeile unter den Schaltern */
.curves { flex-basis: 100%; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.curves .modes { flex: 1; }
.chips .curves .mode { border-radius: 0; border: 0; }
.leg .chips .curves .mode { font-size: 12px; padding: 3px 6px; }

/* iOS zoomt bei Eingabefeldern unter 16 px hinein und nicht mehr heraus */
@media (pointer: coarse) {
  /* #panel: stärker als input[type=number] { font: inherit } (sonst 12 px vom Label → iOS zoomt hinein) */
  /* #reportText/.feedback/#shareLink: deren eigene Schrift (12–14 px) ist stärker als textarea – Fehler-melden-Popup zoomte hinein (01.11.) */
  #panel input, #panel select, #panel textarea, input, select, textarea, body #reportText, body .feedback textarea, body #shareLink { font-size: 16px; }
}

/* Schriftgröße (Einstellungen): vergrößert Menü und Kartenknöpfe; Ortsnamen der Vektorkarte skaliert app.js.
   Maßstab bleibt unvergrößert, sonst stimmt die Länge nicht. */
#panel, .leaflet-control-zoom, .leaflet-control-layers, .map-info { zoom: var(--ui-zoom, 1); }
.leaflet-tooltip { font-size: calc(12px * var(--ui-zoom, 1)); }
#uiZoomLabel { color: var(--ink); font-weight: 600; }

/* Status oben mittig auf der Karte (ersetzt die Kopfzeile im Menü) */
.map-status { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: center; gap: 6px; padding: 3px; border-radius: 999px; white-space: nowrap;
  background: rgba(var(--panel-rgb), 0.92); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); zoom: var(--ui-zoom, 1); }
.map-status .pill { font-size: 12px; }
.map-status .pill.warn { white-space: normal; text-align: center; }
/* ohne Verbindung: Kreisel in der Statuspille statt eigener Pille (showOfflinePill) */
.pill.waiting { display: inline-flex; align-items: center; gap: 6px; }
.pill.waiting::before { content: ""; flex: none; width: 10px; height: 10px; border: 2px solid currentColor;
  border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
/* Fortschritt der Planung („Suche Umfahrung … (3 Varianten geprüft)“) als zweite Zeile unter Logo und Wetterstand,
   so breit wie der Chip – oben bleibt alles sichtbar. Chip bleibt zwischen den Karten-Knöpfen (Zoom links, Ebenen rechts) */
.map-status { flex-wrap: wrap; justify-content: center; max-width: min(460px, calc(100vw - 140px) / var(--ui-zoom, 1)); }
.map-status .busy { order: 2; flex: 1 0 100%; justify-content: center; text-align: center; white-space: normal;
  line-height: 1.25; padding: 0 6px 3px; }
.map-status .busy::before { flex: none; }
.map-status:has(.busy:not([hidden])) { border-radius: 14px; }

/* Favoriten-Stern im Adressfeld (links neben dem Verschiebe-Symbol) */
.ac .fav { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); border: 0; background: transparent !important;
  padding: 4px; font-size: 18px; line-height: 1; color: var(--muted); cursor: pointer; }
.ac .fav.on { color: var(--accent); }
.ac input.has-fav { padding-right: 56px; }
.ac li.fav-item .ac-text { font-weight: 600; }
.ac li.fav-item small { font-weight: 400; }

/* Gespeicherte Routen */
#routesDetails summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; }
.saved { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.saved li { display: flex; align-items: center; gap: 8px; margin: 0; }
.saved .load { flex: 1; text-align: left; padding: 8px 10px; min-width: 0; }
.saved .load small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.saved .load b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* „App laden“-Banner oben (Android-/iPhone-Browser, schließbar). Liegt über der Karte: früher schob padding-top die ganze
   Seite nach unten, und weil es erst mit der Serverantwort kommt, sprang die Karte (Nutzer-Video 02.11.). */
.app-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 2000; display: flex; align-items: center; gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 10px 8px; background: var(--panel); color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); font-size: 14px; }
.app-banner[hidden] { display: none; }
/* breit (iPad, Querformat): Menü links über die volle Höhe – Banner nur über der Karte, sonst verdeckt es die Eingaben */
@media (min-width: 701px) { .app-banner { left: calc(360px * var(--ui-zoom, 1)); } }
.app-banner img { flex: none; border-radius: 9px; }
.app-banner span { flex: 1; min-width: 0; line-height: 1.25; }
.app-banner b, .app-banner small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-banner small { color: var(--muted); font-size: 12px; }
.app-banner .get { flex: none; padding: 8px 18px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; text-decoration: none; }

/* Meine Fahrten: Vorschaubild der Spur links */
#ridesDetails summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; }
.rides .load { display: flex; align-items: center; gap: 10px; }
.rides .load span { min-width: 0; flex: 1; }
.rides svg { flex: none; width: 56px; height: 56px; border-radius: 8px; background: var(--ride-thumb, rgba(18, 153, 74, 0.08)); }
.rides svg polyline { fill: none; stroke: #006b30; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
[data-theme="dark"] .rides svg polyline { stroke: #b6ffd6; }

/* Rückmeldung nach der Fahrt */
.feedback[open] { display: flex; flex-direction: column; gap: 10px; }
.feedback h2, .feedback .hint, .feedback .row { margin: 0; }
/* Hinweistext kleiner; die Schrift selbst bleibt 16 px, sonst vergrößert Safari beim Antippen (01.11.) – Nutzer 06.11. */
.feedback textarea::placeholder { font-size: 14px; }
.feedback .row { justify-content: space-between; }
.feedback .row button { min-width: 130px; padding: 12px 20px; }
.rating { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rating button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; font-size: 13px; }
.rating button .ico.big { width: 32px; height: 32px; }
.feedback .rating button.active { background-color: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.feedback textarea, #reportText { width: 100%; font: inherit; padding: 8px; border-radius: 6px; border: 1px solid var(--field-line);
  background: var(--panel); color: var(--ink); resize: vertical; }

/* Straßennummer auf der Route: Autobahn blau wie das Auffahrt-Symbol, sonst weiß mit dunklem Rand; mittig auf der Linie */
.road-ref span { display: inline-block; transform: translate(-50%, -50%); padding: 0 4px; border-radius: 3px;
  border: 1.5px solid #263238; background: #fff; color: #263238; font: 700 calc(11px * var(--ui-zoom, 1))/1.35 system-ui, sans-serif;
  white-space: nowrap; box-shadow: 0 0 0 1.5px #fff; }
.road-ref.motorway span { background: #1f5fbf; border-color: #fff; color: #fff; box-shadow: 0 0 0 1px #1f5fbf; }
.refs-far .road-ref { display: none; }
.route-far :is(.time-mark, .fuel-mk, .incident-mk, .ramp-mk) { display: none; }
/* Schild an nicht gewählten Varianten (altTag): Name + Mehrzeit, im Grün der Alternativen; antippbar */
.alt-tag span { display: inline-block; transform: translate(-50%, -50%); padding: 1px 6px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid #2f7d52; background: #d6f0e0; color: #173d29; font: 600 calc(11.5px * var(--ui-zoom, 1))/1.35 system-ui, sans-serif;
  white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.alt-tag.off { visibility: hidden; }
[data-theme="dark"] .alt-tag span { border-color: #5fbf8a; background: #1d3a2b; color: #d6f0e0; }
/* Routenlinien zeichnet auf der Vektorkarte MapLibre (unter den Namen); die Leaflet-Linien bleiben nur zum Antippen */
svg.gl-hidden { opacity: 0; }
/* Perlen der nassen Straße zeichnet bei Vektorkarte nur MapLibre (sonst springen sie beim Übergeben); stroke-opacity statt
   visibility, damit sie antippbar bleiben */
svg.gl-on path.wet-dots { stroke-opacity: 0; }
/* am Auf-/Abfahrt-Symbol: rechts daneben statt mittig auf der Linie (das Symbol ist als Leaflet-Marker schon absolut positioniert) */
.road-ref.at-ramp { position: absolute; left: calc(100% + 3px); top: 50%; pointer-events: none; }
.road-ref.at-ramp span { transform: translateY(-50%); }
/* Uhrzeiten an der gewählten Route */
.time-mark span { display: inline-block; transform: translate(-50%, -150%); padding: 1px 5px; border-radius: 4px;
  background: rgba(29, 35, 43, 0.85); color: #fff; font-size: calc(11px * var(--ui-zoom, 1)); font-weight: 600; white-space: nowrap; }
/* von layoutLabels verdrängt: kein Platz neben Meldungen, Wegpunkten, Tankstellen oder anderen Schildern */
.label-hidden { visibility: hidden; }
.time-pop .leaflet-popup-content { margin: 8px 10px; font-size: calc(13px * var(--ui-zoom, 1)); }

/* Vorausfahren */
.play-row { align-items: center; gap: 8px 10px; flex-wrap: wrap; }
/* Vorausfahren-Knopf grün: unter den grauen Knöpfen wurde er übersehen (Nutzer 19.10.); Grün ist sonst nur Verkehr frei */
/* Vorausfahren: bewusst unauffällig, Hauptknopf ist die Navigation (Nutzer 07.11.) */
#panel button.go { color: var(--dry); border-color: var(--dry); font-weight: 600; }
/* Test-Regen: Richtungsstern */
.compass-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted);
  grid-column: 2; grid-row: 2 / span 2; } /* rechts über zwei Zeilen, „Dauer“ rückt links darunter (kein Loch) */
.compass { display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(3, 34px); gap: 3px; }
.compass button { padding: 0; display: flex; align-items: center; justify-content: center; }
#panel .compass button.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.compass .deg { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
/* Wetterbild: geglättet vergrößert (Standard) oder scharfe Zellen („Regen weich zeichnen“ aus) */
.weather-img { image-rendering: auto; transition: opacity 0.25s ease; } /* Überblenden bei neuen Wetterdaten */
/* Deckkraft beider Bilder addieren (t·a + (1−t)·a = a): unveränderter Regen bleibt beim Überblenden gleich kräftig –
   normal übereinander gelegt deckten zwei halbe Bilder weniger als eines, gleicher Regen blitzte kurz auf (Genua 18.10.) */
.leaflet-weather-pane { isolation: isolate; }
.weather-img { mix-blend-mode: plus-lighter; }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }
button.with-ico { display: inline-flex; align-items: center; gap: 6px; }
/* Vorausfahren-Steuerung: drei gleich große Felder als eine Leiste, Pause/Weiter hervorgehoben */
.player { display: inline-flex; }
.player button { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 36px; padding: 0;
  border-radius: 0; margin-left: -1px; }
.player button:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.player button:last-child { border-radius: 0 6px 6px 0; }
#playToggle { background: var(--brand); border-color: var(--brand); color: #fff; position: relative; }
/* Tankstellen */
.fuel-info { font-size: 13px; margin: 0; }
/* eine Zeile, auch mit großer Schrift und den Pfeilen, die Windows-Chrome in Zahlenfelder zeichnet (Nutzer 19.10.);
   „label.inline input { flex: 1 }“ ließ das Feld sonst auf die ganze freie Breite wachsen */
.fuel-start { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; font-size: 16px; white-space: nowrap; }
.fuel-start label.inline { flex: 0 1 auto; min-width: 0; gap: 6px; }
.fuel-start .chips { flex: none; flex-wrap: nowrap; }
.fuel-start .chips button { font-size: 15px; padding: 6px 14px; }
.fuel-start label.inline input { flex: none; width: 3.6em; padding-inline: 6px; font-size: inherit; text-align: right; -moz-appearance: textfield; appearance: textfield; }
.fuel-start input::-webkit-outer-spin-button, .fuel-start input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fuel-mk { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff;
  border: 2px solid #2e3a46; color: #2e3a46; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.fuel-mk svg { width: 14px; height: 14px; fill: currentColor; }
.fuel-mk.stop { background: var(--accent); border-color: #fff; color: #fff; transform: scale(1.25); }
.fuel-mk.inline { display: inline-flex; width: 20px; height: 20px; vertical-align: -5px; margin-right: 6px; box-sizing: border-box; }
.fuel-mk.no { opacity: 0.45; border-color: #8a939c; color: #8a939c; }
.fuel-pop .fuel-no { color: #b3261e; }
/* Autobahn-Auf-/Abfahrt: Autobahnschild des Landes (Hoch- oder Querformat, daher eingepasst), Abfahrt „Ende der Autobahn“ */
.ramp-mk { display: flex; align-items: center; justify-content: center; }
/* ohne filter: drop-shadow – je Schild eine eigene Filter-Ebene, iOS-Safari stand damit nach der Planung sekundenlang (#513) */
.ramp-mk img { width: 100%; height: 100%; object-fit: contain; }
.fuel-pop .link { display: block; margin-top: 6px; }
.rain-link { align-self: flex-start; font-size: 13px; padding: 2px 0; }
.trip-more { display: flex; gap: 16px; justify-content: flex-end; font-size: 13px; }
.trip-more .link { align-self: auto; padding: 4px 0; }
#playInfo { font-variant-numeric: tabular-nums; }
.play-bike { font-size: calc(22px * var(--ui-zoom, 1)); line-height: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); }
.play-bike span { display: inline-block; position: relative; transform: translate(-50%, -80%); }
/* Leaflet setzt Marker-Bilder auf width:auto (.leaflet-container .leaflet-marker-pane img) → hier spezifischer */
/* alle Theme-Motorräder gleich hoch (Bilder 96 px hoch, tools/ride-icon.py) – lange wie der Chopper werden breiter */
.leaflet-container .leaflet-marker-pane .play-bike img { display: block; height: calc(24px * var(--ui-zoom, 1)); width: auto; max-width: none; }
.leaflet-container .leaflet-marker-pane .play-bike img.mirror { transform: scaleX(-1); }   /* Theme mit nur einer Richtung */
/* dunkle Motorräder (z. B. Naked in Schwarz) auf dunkler Karte: heller Schein statt Schatten */
:root[data-theme="dark"] .play-bike { filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 3px rgba(255, 255, 255, 0.35)); }
.play-bike.wet span::after { content: ""; position: absolute; left: 25%; top: -55%; width: 0.75em; height: 0.75em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 14.5a4.5 4.5 0 0 1-.6-9 6 6 0 0 1 11.2 1.5A3.8 3.8 0 0 1 17 14.5z' fill='%23c9d3dd' stroke='%238a98a6' stroke-width='1.1'/%3E%3Cpath d='M8 17.5l-1.2 3M12.3 17.5 11.1 20.5M16.6 17.5l-1.2 3' stroke='%232b78d9' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }   /* knapp über dem Tank */

/* Höhen- und Temperaturprofil */
.profile { margin: 4px 0 10px; position: relative; }
/* Platzhalter über der Profilfläche: statisch (keine Animation – billig auf schwachen Geräten) */
.profile-msg { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; /* #panel zoomt schon */ display: flex;
  align-items: center; justify-content: center; padding: 0 12px; border: 1px dashed var(--line, rgba(128,128,128,.4));
  border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13px; text-align: center; cursor: default; }
.profile-msg[hidden] { display: none; }
.profile-msg.failed { cursor: pointer; color: var(--ink); }
.profile .fuel-marks line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 2; }
.profile .fuel-marks circle { fill: var(--accent); stroke: var(--panel); stroke-width: 1.5; }
.profile .fuel-marks path { fill: #fff; }
/* feste Höhe (zwei Zeilen), leer wie gefüllt – sonst rückte alles darunter beim Nachladen um ein paar Pixel */
.profile-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums; height: 2.8em; overflow: hidden; }
.profile-head > span { display: flex; flex-direction: column; line-height: 1.4em; }
.profile-head > span > span { white-space: nowrap; }
#profileSummary .t { color: #e65100; }
#profileSummary .r { color: #4a90e2; }
#profileSummary b { font-weight: inherit; }
/* Spalten sind so breit wie ihre längste Zeile: die Übersicht darf unter den Wert am Finger laufen (je Zeile ist Platz),
   der Wert selbst behält seine Breite – sonst schob die Übersicht ihn bei 360 px über den Rand */
#profileSummary { flex: 1 1 0; min-width: 0; }
#profileInfo { flex: none; }
#profileSummary b + b { margin-left: 10px; }
#profileInfo { text-align: right; align-items: flex-end; }
#profileInfo { color: var(--ink); font-weight: 600; }
#profileSvg { display: block; width: 100%; height: 96px; /* #panel zoomt schon – calc(96px * zoom) vergrößerte doppelt */ touch-action: pan-y; cursor: crosshair; }
#profileSvg .elev { fill: rgba(102, 112, 124, 0.28); stroke: rgba(102, 112, 124, 0.7); stroke-width: 1; }
#profileSvg .temp { fill: none; stroke: #e65100; stroke-width: 2; }
#profileSvg .wet { fill: rgba(42, 91, 215, 0.18); }
#profileSvg .nodata-hatch { fill: rgba(141, 147, 155, 0.45); } /* ohne Wetterdaten, wie die graue Strecke */
#profileSvg text.nodata-label { fill: var(--muted); }
#profileSvg .tunnel { fill: var(--tunnel, #455a64); } /* Tunnel: trocken, kein Regenbalken */
#profileSvg .ferry-hatch { fill: var(--tunnel, #455a64); } /* Fähre: Tunnelfarbe schraffiert (blau sah aus wie Regen) */
#profileSvg .cursor { stroke: var(--ink); stroke-width: 1; }
#profileSvg text { font-size: 11px; fill: var(--muted); }
#profileSvg text.t { fill: #e65100; }
#profileSvg text.pass-label { fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }
#profileSvg .pass-tick { fill: none; stroke: var(--ink); stroke-width: 1.2; }
#profileSvg.naming .pass-marks { visibility: hidden; } /* Ortsname beim Überfahren steht oben an derselben Stelle */
#profileSvg text.place { font-size: 12px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; }

/* Am Computer: während des Ziehens am Schriftgrößen-Regler bleibt die Menübreite auf dem Bildschirm gleich */
@media (min-width: 701px) {
  #panel { width: calc(360px * var(--ui-zoom-fixed, var(--ui-zoom, 1)) / var(--ui-zoom, 1)); }
}

/* Keine Überbreite bei großer Schrift: lange Auswahltexte und Felder auf Menübreite begrenzen */
#panel { overflow-x: hidden; }
#panel select, #panel input, #panel label { max-width: 100%; min-width: 0; }
#panel select { width: 100%; text-overflow: ellipsis; }   /* Safari misst Auswahllisten sonst nach dem längsten Eintrag */
/* Adressfeld ohne Knöpfe innen; Favorit an der Schrift erkennbar */
.ac input, .ac input.has-fav { padding-right: 9px; }
.ac input.is-fav { font-weight: 600; padding-left: 27px; }
.ac .fav-mark { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); pointer-events: none; display: flex; }
.ac .fav-mark .fav-star { margin: 0; width: 14px; height: 14px; }
.ac li.fav-action .ac-text { color: var(--accent); font-weight: 600; }
/* Knopfzeile unter den Adressen: enger, damit „+ Zwischenziel · Rundtour · Rückgängig“ in eine Zeile passt */
.chips.tight { gap: 4px; }   /* bricht nur um, wenn es bei sehr großer Schrift nicht anders geht */
.chips.tight button { padding-left: 8px; padding-right: 8px; white-space: nowrap; }
#panel input[type=range] { width: 100%; margin-left: 0; margin-right: 0; box-sizing: border-box; }   /* Safari: 2 px Rand rechts */

/* Standort-Knopf und eigener Standort mit Sichtkegel */
.locate-ctrl a { display: grid !important; place-items: center; }
.locate-ctrl a.active { color: #2f6fde; }
.me-marker { pointer-events: none; }
.me-marker svg { overflow: visible; }
/* Sichtkegel auf dunkler Karte heller und kräftiger, sonst kaum zu sehen (#84) */
:root[data-theme="dark"] .me-cone { fill: #8ab4f8; fill-opacity: 0.55; }
.leaflet-control-zoom, .leaflet-control-layers, .locate-ctrl { zoom: var(--ui-zoom, 1); }

/* Beschriftung und Feld in einer Zeile (Abfahrt) */
label.inline { flex-direction: row; align-items: center; gap: 8px; }
label.inline input { flex: 1; min-width: 0; width: auto; }

/* Griff zum Einklappen des Menüs */
#panelTop { margin: -16px -16px -2px; flex: none; position: sticky; top: -16px; z-index: 5; background: var(--panel); } /* beim Scrollen oben erreichbar */
#panelHandle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 34px;
  cursor: grab; touch-action: none; user-select: none; }
#panelBar { position: absolute; right: 8px; top: 1px; display: flex; gap: 2px; }
#panelTop:has(#moreMenu:not([hidden])) { z-index: 1200; } /* offenes Menü über Karte und Kartenknöpfen */
#moreBtn { touch-action: none; } /* Wischen darf auch auf dem Knopf beginnen */
#panel #panelBar .icon-btn { width: 32px; height: 32px; }
/* Android: Balken wirkte bei gleichem Zoom (110 %) deutlich höher als am iPhone (Nutzer 26.11.) → 34 statt 42 */
/* iOS (Safari/WKWebView) stellt größer dar: Balken wirkte deutlich höher als am Android (Nutzer 06.11., 82 statt 67 Bildpunkte) */
body.ios #panelHandle { height: 38px; }
body.ios #panel #panelBar .icon-btn { width: 36px; height: 36px; }
#panelHandle .grip { width: 44px; height: 5px; border-radius: 3px; background: var(--muted); opacity: 0.6; }
#panelHandle .handle-text { font-size: 12px; color: var(--muted); }
#panelHandle .handle-text:empty { display: none; }
#panel, #map { transition: height 0.22s ease, width 0.22s ease; }

/* Handy hochkant: unten bis auf den Griff einklappen */
@media (max-width: 700px) {
  /* eingeklappt ohne Wasserzeichen: unter dem Griff (bis unter die schwebende Safari-Leiste) schien sonst das Bild durch (Nutzer 24.10.) */
  body.panel-min #panel { height: 48px; overflow: hidden; background: var(--panel); }
  body.panel-min #map { height: calc(100% - 48px); }
  body.panel-min #panelHandle { height: 48px; } /* füllt eingeklappt die ganze Leiste */
  body.panel-min #panelBar { top: 4px; }
  /* eingeklappt: Text links neben den Knöpfen; Griff bleibt mittig */
  body.panel-min #panelTop { height: 48px; overflow: hidden; }
  body.panel-min #panelHandle { align-items: flex-start; padding: 0 56px 0 16px; box-sizing: border-box; }
  body.panel-min #panelHandle .grip { position: absolute; left: 50%; margin-left: -22px; top: 6px; }
  body.panel-min #panelHandle .handle-text { max-width: 100%; margin-top: 8px; color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* ganz aufgezogen: Menü fast über die ganze Höhe, oben bleibt ein Streifen Karte (Griff nach unten = halb) */
  body.panel-full #panel { height: 85%; flex: none; }
  body.panel-full #map { height: 15%; min-height: 0; } /* sonst hält die Karte ihre Knöpfe-Höhe (~50 %) */
}
/* Breit: Menü ganz ausblenden, zurück über den Griff an der Kante */
@media (min-width: 701px) {
  /* oben kein Griff mehr – seitlich an der Kante (#sideHandle, Nutzer 23.10.) */
  #panelHandle { display: none; }
  #panelTop { margin-bottom: 0; }
  #panelBar { position: static; justify-content: flex-end; padding: 2px 8px 0; }
  body.panel-min #panel { width: 0; padding: 0; border: 0; overflow: hidden; }
}

/* Ergebnis-Kopf kompakt, damit die Routenkarten ohne Scrollen sichtbar sind */
#result { gap: 6px; }
#result #decision { margin: 0; font-size: 15px; }
#result #reason { margin: 0; font-size: 13px; color: var(--muted); }
/* Hinweis/Begründung mit Stelle auf der Route: antippen fliegt hin, nochmal zurück (wie der Regen-Knopf) */
#result .spot { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
#result .spot.spot-back { text-decoration-style: solid; }
#result #warnings .note { margin: 0 0 2px; padding: 5px 8px; font-size: 13px; }

/* Beschriftung der Abdeckungs-Rechtecke */
.cov-label { background: rgba(var(--panel-rgb), 0.85); color: var(--ink); border: 0; box-shadow: none; font-size: 11px; padding: 1px 5px; }
.cov-label::before { display: none; }

/* Teilen: Link mit Route und Einstellungen */
.share-panel { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.share-panel .hint, .share-mode .hint { margin: 0; }
.share-panel label.check.small, .share-mode label.check.small { margin-top: 0; }
#shareLink { width: 100%; font-size: 12px; color: var(--muted); }
.share-mode { display: flex; flex-direction: column; gap: 2px; padding-left: 22px; }

/* Einladungsseite (ohne Zugangsschlüssel): über allem, Karte blass dahinter */
.gate { position: fixed; inset: 0; z-index: 5000; display: flex; overflow-y: auto; overscroll-behavior: contain;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(var(--panel-rgb), 0.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.gate-box { width: min(340px, 100%); background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px 20px; text-align: center; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column; gap: 10px; margin: auto; }
/* Tastatur offen: unten Platz lassen, damit das Feld über die Tastatur gescrollt werden kann (keepFieldVisible) */
.kb-open .gate { padding-bottom: calc(16px + var(--kb, 0px)); }
.gate-box img { align-self: center; }
.gate-box h1 { margin: 0; font-size: 24px; }
.gate-box p { margin: 0; color: var(--muted); line-height: 1.4; }
.gate-box .gate-claim { color: var(--accent); font-weight: 600; margin-top: -6px; }
.gate-box input { font-size: 16px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); margin-top: 6px; }
.gate-form { display: flex; flex-direction: column; gap: 8px; }
.gate-form input { margin-top: 0; }
.gate-box .gate-form button, .gate-box .sso { font-size: 16px; padding: 10px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.gate-box .gate-form button.primary { background-color: var(--brand); color: #fff; border: 0; }
.gate-box .gate-form button:not(.primary) { background: var(--panel); color: var(--ink); border: 1px solid var(--line); }
/* Google/Apple: Entwurf, noch ausgegraut */
.gate-box .sso { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--panel);
  color: var(--ink); border: 1px solid var(--line); }
.gate-box .sso .ico { width: 20px; height: 20px; }
.gate-box .sso:disabled { opacity: 0.45; cursor: not-allowed; }
.gate-box .gate-or { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.gate-box .gate-or::before, .gate-box .gate-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.gate-box .gate-sent { color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.gate-box .gate-links, .gate-box .gate-new { font-size: 13px; }
.gate-key { text-align: left; font-size: 13px; color: var(--muted); margin-top: 4px; }
.gate-key summary { cursor: pointer; text-align: center; }
.gate-key .gate-form { margin-top: 8px; }
.gate-error { color: #d64545 !important; font-weight: 600; }

/* Erster App-Start: Motorrad wählen */
.design-pick { width: min(420px, 100%); max-height: 100%; overflow-y: auto; }
.pick-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pick-themes button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.pick-themes button img { width: 52px; height: 52px; border-radius: 12px; }
.pick-themes button.active { border-color: var(--accent); background: rgba(217, 130, 43, 0.1); font-weight: 600; }
.pick-preview { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 72px; }
.pick-preview #pickIcon { border-radius: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); }
.pick-colors { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pick-colors { gap: 14px; min-height: 102px; align-content: flex-start; } /* Platz bleibt auch ohne Farben (Ohne Motorrad), damit sich nichts verschiebt */
.pick-colors button { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 0; cursor: pointer; }
#pickDone { font-size: 17px; padding: 12px; background-color: var(--brand); color: #fff; border: 0; border-radius: 10px;
  font-weight: 600; cursor: pointer; }

/* Verkehrsmeldungen (TomTom) an der gewählten Route */
.traffic-info { font-size: 14px; margin: 6px 0; display: flex; flex-direction: column; gap: 2px; }
.traffic-info .traffic-closed { color: #d64545; font-weight: 600; }
.traffic-info .inc-line { cursor: pointer; border-radius: 6px; padding: 2px 4px; margin: 0 -4px; }   /* antippen = Karte hinschieben */
@media (hover: hover) { .traffic-info .inc-line:hover { background: var(--line); } }
.incident-mk { display: flex; align-items: center; justify-content: center; background: var(--panel); color: var(--ink);
  border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
.incident-mk .inc-ico { width: 17px; height: 17px; }
/* Stau in der Farbe des Abschnitts (JAM_COLORS), Sperre dunkelrot – auf Gelb dunkles Symbol (lesbar) */
.incident-mk.jam.m1 { background: #f2c200; color: #1d232b; }
.incident-mk.jam.m2 { background: #f57c00; color: #fff; }
.incident-mk.jam.m3 { background: #d32f2f; color: #fff; }
.incident-mk.closed { background: #8b0000; color: #fff; }
.inc-ico { width: 1.25em; height: 1.25em; vertical-align: -0.28em; fill: currentColor; flex: none; }
.traffic-info .traffic-closed .inc-ico { color: #d64545; }


/* Zugangsschlüssel verdeckt anzeigen, ohne Passwortfeld (siehe index.html) */
input.secret { -webkit-text-security: disc; text-security: disc; }

/* ===== Seitenmenü neu (Nutzer 23.10.): Abfahrt oben, Strecke eingeklappt, ☆ ↗ ⋯ statt großer Knöpfe, Wetter auf der Karte ===== */
/* iPad/iPhone: Safari vergrößert sonst Schrift in breiten Bereichen von sich aus (Zeilen brachen um, Knöpfe ragten hinaus) */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.ico.big { width: 30px; height: 30px; }
.ico.chev { width: 14px; height: 14px; transition: transform 0.15s; }
.ico.chev.up { transform: rotate(-90deg); }
.ico.chev.down { transform: rotate(90deg); }
.lbl { color: var(--muted); font-size: 13px; white-space: nowrap; }
.trip { grid-template-columns: 14px 1fr; }

/* Rundtour ohne Zwischenziel: Länge in einer Zeile */
.trip-row { gap: 4px; }
.trip-head { display: flex; align-items: center; gap: 10px; }
.trip-row .modes { flex: none; margin-left: auto; }
.trip-row output { font-size: 16px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Finger: größere Greiffläche um den Regler (war schwer zu fassen, Nutzer 04.11.) */
@media (pointer: coarse) { .trip-row input[type=range] { height: 40px; margin-top: -8px; margin-bottom: -8px; } }

/* Abfahrt: Jetzt | Lieblingszeit | Lieblingszeit | Kalender */
.dep-row { display: flex; align-items: center; gap: 8px; }
.dep-seg { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr 1fr auto; border: 1px solid var(--line);
  border-radius: 8px; overflow: hidden; background: var(--panel); }
.dep-seg > button, .dep-seg > .dep-cal { border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 5px 7px;
  font-size: 13px; white-space: nowrap; display: grid; place-items: center; min-width: 0; }
.dep-seg > button:first-child { border-left: 0; }
#panel .dep-seg > button.active { background-color: var(--accent); color: var(--on-accent); }
.dep-cal { position: relative; width: 36px; color: var(--muted); cursor: pointer; }
.dep-cal:has(input.set) { background: var(--accent); color: var(--on-accent); }
/* Feld unsichtbar über dem Symbol: Antippen öffnet die Datums-/Zeitauswahl des Geräts */
#panel .dep-cal input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; padding: 0; border: 0; cursor: pointer; font-size: 16px; }
.dep-info { margin-top: 6px; padding: 4px 10px; font-size: 13px; }

/* Einklappbare Kästen: Strecke, Meine Routen, Einstellungen */
details.box { border: 1px solid var(--line); border-radius: 10px; background: rgba(var(--panel-rgb), 0.7); }
details.box > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--ink); }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary .chev { color: var(--muted); }
details.box[open] > summary .chev { transform: rotate(90deg); }
details.box > summary b { font-weight: 600; white-space: nowrap; }
details.box > summary span { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.box > :not(summary) { margin-left: 10px; margin-right: 10px; }
details.box > :last-child { margin-bottom: 10px; }
#settingsPanel .sheet-body { display: flex; flex-direction: column; gap: 10px; }
/* aufgeklappte Einstellungen heller (Nutzer 25.10.): das Hintergrundbild scheint kaum noch durch */
.design-row { display: flex; align-items: center; gap: 12px; }
.design-row button.link { align-self: center; padding: 0; line-height: inherit; }
#settingsPanel h3 { margin: 14px 10px 12px; padding: 6px 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: inherit;
  background: rgba(127, 127, 127, 0.14); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; }
#settingsPanel .sheet-body > h3:first-of-type { margin-top: 6px; } /* war 11 px – zu klein (Nutzer 25.10.) */
#settingsPanel .sheet-body > label, #settingsPanel .sheet-body > p, #settingsPanel .sheet-body > div, #settingsPanel .sheet-body > section, #settingsPanel .sheet-body > details { margin-left: 24px; margin-right: 10px; } /* Inhalt eingerückt unter der Überschrift (Nutzer 31.10.) */

/* Ergebnis-Kopf: Entscheidung + kleine Symbol-Knöpfe */
.res-head { display: flex; align-items: center; gap: 2px; position: relative; }
.res-head #decision { flex: 1; min-width: 0; }
#panel .icon-btn { width: 34px; height: 34px; padding: 0; border: 1px solid transparent; background: transparent !important;
  color: var(--muted); display: grid; place-items: center; border-radius: 8px; flex: none; }
#panel .icon-btn:hover:not(:disabled) { border-color: var(--line); }
#panel .icon-btn .ico { width: 20px; height: 20px; }
.pop-menu { position: fixed; z-index: 20; min-width: 210px; max-height: 80vh; overflow-y: auto; padding: 4px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); display: flex; flex-direction: column; }
#panel .pop-menu button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left;
  padding: 9px 10px; border-radius: 6px; font-size: 14px; }
#panel .pop-menu button:hover:not(:disabled) { background: var(--bg); }

/* Tank: eine Zeile, Antippen öffnet die Reichweite */
#panel button.fuel-info { border: 0; padding: 0; background: transparent; text-align: left; color: var(--ink); display: flex;
  align-items: flex-start; gap: 0; font-size: 13px; cursor: pointer; }
#panel button.fuel-info.note.warn { padding: 6px 8px; }
.fuel-info u { color: var(--muted); text-decoration-style: dotted; text-underline-offset: 3px; white-space: nowrap; }

/* Meine Routen: Reiter */
.tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
#panel .tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 4px 0;
  color: var(--muted); font-size: 13px; }
#panel .tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }

/* Symbole in Vorschlägen, Profil, Ergebnis */
.ac .fav-star { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; color: var(--accent); }
.ac .ac-take .ico { width: 16px; height: 16px; }
.profile-head .ico, #profileInfo .ico { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }
.rain-link { display: inline-flex; align-items: center; gap: 6px; }
.rain-link .ico { width: 16px; height: 16px; }
.inc-more .ico.chev { vertical-align: -2px; }
.leg-head .ico.chev { vertical-align: -2px; }
#panel button.icon .ico, .icon .ico { width: 16px; height: 16px; display: block; }
.fuel-popup .ico, .leaflet-popup .ico.s { width: 14px; height: 14px; vertical-align: -2px; color: var(--wet); }
.chips.tight button.with-ico { gap: 4px; }

/* Kartenknöpfe mit eigenen Symbolen */
.locate-ctrl a .ico { width: 18px; height: 18px; }
.leaflet-control-layers-toggle { background-image: none !important; place-items: center; color: #333; }
.leaflet-control-layers .leaflet-control-layers-toggle { display: grid; }
/* aufgeklappt bleibt der Knopf rechts oben an seinem Platz, „Wetter“ steht links daneben (Innenabstand des offenen Menüs: 6px 10px 6px 6px) */
.leaflet-control-layers-expanded .leaflet-control-layers-toggle { float: right; margin: -6px -10px 0 8px; position: relative; z-index: 1; }
.leaflet-control-layers-toggle .ico { width: 24px; height: 24px; }
:root[data-theme="dark"] .leaflet-control-layers-toggle { filter: none; color: var(--ink); }
.leaflet-control-layers .lc-head { margin: 6px 0 2px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.leaflet-control-layers .lc-head:first-child { margin-top: 0; }
.leaflet-control-layers-separator { display: none; }
/* aufgeklappt über dem Seitenmenü statt in der (am Handy kleinen) Karte gefangen – Lage setzt app.js (float) */
.leaflet-control-layers.lc-float { position: fixed; z-index: 1300; margin: 0; }
.leaflet-top:has(.lc-float) { z-index: 1001; } /* über der unteren Ecke (ⓘ, Maßstab), die im DOM später kommt */
/* Symbol absolut in die Ecke statt float (Nutzer 12.11.): sonst hielt es neben der ganzen Liste eine Spalte frei und machte
   das Menü unnötig breit; neben dem Symbol stehen nur „Wetter“ und „Regen“ (kurz) */
.leaflet-control-layers.lc-float .leaflet-control-layers-toggle { position: absolute; top: 4px; right: 4px; float: none; margin: 0; }
.leaflet-control-layers.lc-float .leaflet-control-layers-list { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; }
.attr-toggle .ico { width: 14px; height: 14px; display: block; }

/* Seitlicher Griff (breit) an der Kante Menü | Karte */
.side-handle { position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 1000; width: 16px; height: 64px;
  /* Querformat am Handy/Tablet (Finger): breiter und höher, war schwer zu treffen (Nutzer 04.11.) */
  padding: 0; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; background: var(--panel);
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.18); display: grid; place-items: center; cursor: pointer; }
.side-handle::before { content: ""; width: 4px; height: 40px; border-radius: 2px; background: var(--muted); opacity: 0.6; }
@media (max-width: 700px) { .side-handle { display: none; } }
@media (pointer: coarse) { .side-handle { width: 28px; height: 96px; } .side-handle::before { width: 5px; height: 56px; } }

/* Wetter-Zeitleiste unten auf der Karte */
.time-bar { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 1000;
  width: min(540px, calc(100% - 24px)); padding: 5px 12px 6px; border-radius: 12px; background: rgba(var(--panel-rgb), 0.94);
  border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; gap: 2px;
  zoom: var(--ui-zoom, 1); }
.time-bar .tb-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.time-bar .tb-label { display: grid; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.time-bar .tb-label > *, .time-bar .tb-sizer > * { grid-area: 1 / 1; }
.time-bar .tb-sizer { display: grid; visibility: hidden; }
.time-bar input[type=range] { flex: 1; min-width: 0; margin: 0; }
.time-bar .tb-sub { display: flex; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); }
.time-bar .legend i { width: 10px; height: 10px; }
.time-bar.off .legend { display: none; }
.time-bar.off .ico { opacity: 0.4; }
@media (max-width: 700px) {
  .time-bar { bottom: 34px; padding: 3px 10px 4px; }
  .time-bar .legend { display: none; }
}
/* Wetterstand im Chip oben nur bei Problemen (sonst in der Zeitleiste) */
.map-status .pill.quiet { display: none; }
/* Nichts anzuzeigen → ganzer Chip weg, sonst bleibt ein leerer weißer Rahmen stehen (Nutzer 03.11.) */
.map-status:not(:has(> :not([hidden], .quiet))) { display: none; }

/* Leiste „Vom anderen Gerät · 14:32 · Rückgängig“: oben auf der Karte unter dem Status-Chip, weg vom Menü-Griff
   (das eigene Rückgängig ist der Kartenknopf ↶) */
.undo-bar { position: fixed; left: 50%; top: calc(56px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 3000;
  display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border-radius: 10px; background: #1d232b; color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3); font-size: 14px; white-space: nowrap; width: max-content; max-width: calc(100vw - 24px); zoom: var(--ui-zoom, 1); }
/* width: max-content – sonst begrenzt left: 50% die Breite auf die halbe Bildschirmbreite (am Handy früh umbrochen) */
.undo-bar #undoText { white-space: normal; line-height: 1.25; }     /* lieber zweizeilig als abgeschnitten */
.undo-bar button { flex: none; white-space: nowrap; }
.undo-bar button { border: 0; background: transparent; color: #ffb26b; font-weight: 600; padding: 6px 8px; gap: 5px; }
.undo-bar button .ico { width: 16px; height: 16px; }

/* Spracheingabe: unten an der Karte (Daumen, Nutzer 05.11.), nicht modal (Route darüber sichtbar). Schriftgröße per zoom nur
   auf den Teilen – zoom am fixen Fenster skalierte in Safari auch Breite/Lage → ragte am iPhone über den Rand (Nutzer 05.11.) */
.voice-panel { position: fixed; inset: auto auto calc(16px + env(safe-area-inset-bottom, 0px)) 50%; transform: translateX(-50%); margin: 0;
  z-index: 3001; width: min(calc(420px * var(--ui-zoom, 1)), calc(100vw - 24px)); max-height: calc(100% - 80px); overflow-y: auto;
  box-sizing: border-box; padding: 10px 10px 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
.voice-head, .voice-list, .voice-actions { zoom: var(--ui-zoom, 1); }
@media (min-width: 701px) and (min-height: 521px) {
  body:not(.panel-min) .voice-panel { left: calc(50% + 180px * var(--ui-zoom, 1)); width: min(calc(420px * var(--ui-zoom, 1)), calc(100vw - 384px * var(--ui-zoom, 1))); }
}
/* Handy: Karte oben, Menü unten → Unterkante der Karte = Oberkante des Menüs (50 % bzw. 48 px eingeklappt) */
@media (max-width: 700px) {
  .voice-panel { bottom: calc(60% + 10px); max-height: calc(40% - 66px - env(safe-area-inset-top, 0px)); }
  body.panel-min .voice-panel { bottom: 58px; max-height: calc(100% - 124px - env(safe-area-inset-top, 0px)); }
  body.panel-full .voice-panel { bottom: auto; top: calc(56px + env(safe-area-inset-top, 0px)); max-height: 70%; }   /* Karte nur 15 % hoch */
}
.voice-head { display: flex; align-items: center; gap: 10px; }
.voice-mic { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; }
.voice-mic .ico { width: 22px; height: 22px; }
/* Zuhören: Ring nur über transform/opacity (kein Neuzeichnen, billig auf schwachen Geräten) */
.voice-panel.listening .voice-mic { background: var(--wet); }
.voice-panel.listening .voice-mic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--wet);
  animation: voice-pulse 1.4s ease-out infinite; will-change: transform, opacity; }
@keyframes voice-pulse { from { transform: scale(1); opacity: 0.7; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .voice-panel.listening .voice-mic::after { animation: none; } }
.voice-texts { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.voice-texts span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-panel.error .voice-texts span { white-space: normal; }   /* Fehlertext ganz lesen */
.voice-panel.error .voice-mic { background: var(--wet); }
/* Ring um das ×: läuft während des automatischen Schließens von voll auf leer */
button.voice-x { position: relative; border-radius: 50%; }
.voice-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; opacity: 0; }
.voice-ring circle { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.voice-panel.closing .voice-ring { opacity: 1; }
.voice-panel.closing .voice-ring circle { animation: voice-ring var(--close-ms, 3s) linear forwards; }
@keyframes voice-ring { to { stroke-dashoffset: 100; } }
.voice-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.voice-list button { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; color: inherit; font-size: 14px; min-height: 44px; }
.voice-list button.chosen { border-color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
.voice-list small { color: var(--muted); }
.voice-actions { margin-top: 8px; display: flex; justify-content: flex-end; }
/* Mikrofon rechts im Adressfeld (jedes Feld, Nutzer 03.11.) */
.ac input.has-mic, #tripSection .ac input.has-mic { padding-right: 34px; }
.ac .icon.mic { position: absolute; right: 1px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; min-width: 0;
  padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.ac .icon.mic .ico { color: var(--brand); }

/* Hilfe „Standort freigeben“ */
.help-dialog { max-width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  background: var(--panel); color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.help-dialog .row { margin-top: 14px; }
.report-dialog input[type="text"], .report-dialog textarea { width: 100%; box-sizing: border-box; margin-top: 8px; }
.share-opts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.report-dialog { width: min(440px, calc(100vw - 32px)); box-sizing: border-box; }
.report-dialog label.check { margin-top: 8px; }
/* nie höher als der sichtbare Bereich (iOS-Tastatur offen): sonst lag „Bericht senden“ außer Reichweite (#455) */
.report-dialog { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.report-dialog .report-more { margin-top: 12px; font-size: 13px; }
.report-dialog .report-more .hint { margin: 6px 0 0; }
/* Popups deutlich abblenden: bei 0,35 war „Trocken geblieben?“ im Dunkelmodus kaum vom Hintergrund zu unterscheiden,
   man tippte auf Knöpfe dahinter (Nutzer 15.11.). Kein backdrop-filter (blur) – zu teuer auf schwachen Geräten. */
.help-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
:root[data-theme="dark"] .help-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
:root[data-theme="dark"] .help-dialog { background: #262b33; border-color: #4a525c; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 40px rgba(0, 0, 0, 0.7); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .help-dialog::backdrop { background: rgba(0, 0, 0, 0.72); }
  :root:not([data-theme]) .help-dialog { background: #262b33; border-color: #4a525c; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 12px 40px rgba(0, 0, 0, 0.7); }
}
.help-dialog h2 { margin: 0 0 6px; font-size: 17px; }
.help-dialog ol { margin: 10px 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.4; }
.help-dialog button.primary { background-color: var(--brand); border-color: var(--brand); color: #fff; }

/* Niedriger Bildschirm (Handy quer): Zeitleiste einzeilig, sonst deckt sie die halbe Karte (ipad-check 23.10.) */
@media (max-height: 520px) {
  .time-bar { bottom: 34px; padding: 3px 10px; } /* über Maßstab und Quellen */
  .time-bar .tb-sub { display: none; }
}

/* Handy (hoch und quer): Zeitleiste eingeklappt als Kartenknopf rechts oben unter den Ebenen – die Karte hat dort nur den
   halben Bildschirm; die volle Leiste verdeckte Start/Ziel, der Knopf „jetzt“ rechts unten störte noch über der Route
   (Nutzer 23.10.). Nur das Wetter-Symbol; steht die Zeit nicht auf „jetzt“, daneben die Zeit, damit man es merkt.
   Antippen klappt die Leiste unten auf, nach ein paar Sekunden ohne Bedienung wieder zu. Wetter aus → kein Knopf. */
@media (max-width: 700px), (max-height: 520px) {
  .time-bar:not(.open) { left: auto; right: 10px; top: 66px; bottom: auto; transform: none; width: auto; min-width: 46px; height: 46px;
    box-sizing: border-box; padding: 0 11px; border-radius: 4px; border: 2px solid rgba(0, 0, 0, 0.2); box-shadow: none;
    background: var(--panel); justify-content: center; cursor: pointer; z-index: 999; }
  .time-bar:not(.open) .ico { width: 22px; height: 22px; }
  .time-bar:not(.open) #timeSlider, .time-bar:not(.open) .tb-sub, .time-bar:not(.open) .tb-sizer,
  .time-bar:not(.open):not(.future) .tb-label { display: none; }
  .time-bar.off:not(.open) { display: none; }
}

/* Ebene „Straßennamen“ aus: auch die eigenen Nummernschilder an der Route weg */

/* Kartensymbole wachsen mit der Schriftgröße (iconSize in app.js über mk()) – Inhalt passend mitskalieren */
.wp-mk { font-size: calc(11px * var(--ui-zoom, 1)); }
.fuel-mk svg { width: calc(14px * var(--ui-zoom, 1)); height: calc(14px * var(--ui-zoom, 1)); }
.incident-mk .inc-ico { width: calc(17px * var(--ui-zoom, 1)); height: calc(17px * var(--ui-zoom, 1)); }
.fuel-mk.inline svg { width: 14px; height: 14px; }

/* Lieblingszeiten: Schrift und Höhe wie die Auswahllisten daneben (time-Felder bekamen sonst die Systemschrift des Browsers;
   die Uhr im Feld machte sie 2 px höher). Am Handy 16 px wie alle Felder – „font: inherit“ war stärker als die Regel für
   (pointer: coarse) und gab 12 px → iOS zoomte beim Antippen hinein (Screenshot 24.10.). */
#panel input[type=time] { font: inherit; padding: 5px 8px; border: 1px solid var(--field-line); border-radius: 6px; background: var(--field); color: var(--ink); }
@media (pointer: coarse) { #panel input[type=time] { font-size: 16px; } }
/* Breit: Leiste mittig über der Karte (rechts vom Menü) */
@media (min-width: 701px) and (min-height: 521px) {
  .undo-bar { left: calc(50% + 180px * var(--ui-zoom, 1)); }
}

/* Eigene Eingabe-/Bestätigungsfenster (statt prompt/confirm, die App-Webviews unterdrücken) */
.ask-dialog { width: min(420px, calc(100vw - 32px)); }
.ask-dialog .ask-msg { margin: 0 0 10px; font-size: 15px; line-height: 1.4; }
.ask-dialog input { width: 100%; box-sizing: border-box; margin-bottom: 12px; font-size: 16px; }
.saved .fav-star { width: 14px; height: 14px; margin-right: 6px; vertical-align: -1px; color: var(--accent); }
/* kurze Felder nicht über die ganze Breite (Nutzer 31.10.) */
#settingsPanel #fuelRange { flex: none; width: 6em; text-align: right; }
/* Pfeile immer zeigen: Chrome blendet sie erst beim Überfahren ein, der Klick ins Feld traf sie dann und änderte den Wert (Nutzer 09.11.) */
input[type=number]::-webkit-inner-spin-button { opacity: 1; }
/* Abstand zwischen Zahl und Pfeilen (Nutzer 09.11.: klebten aneinander) */
#settingsPanel #fuelRange::-webkit-inner-spin-button { margin-left: 10px; }
#panel #fuelOctane { width: auto; max-width: 100%; }

/* kurze Meldung (flash in app.js) als eigene Pille im Status-Chip; solange sie steht, tritt der Status dahinter zurück */
.map-status #flash { white-space: normal; text-align: center; }
.map-status:has(#flash:not([hidden])) #status { display: none; }
/* Chip als Popover über offenen Fenstern: gleiche Stelle wie sonst auf der Karte (Lage aus flash) */
#mapStatus:popover-open { position: fixed; inset: auto; top: var(--flash-top); left: var(--flash-left); margin: 0; border: 0;
  overflow: visible; color: inherit; }

/* „Wann losfahren?“: Hinweis + Zeitleiste (ein Balken je 15 min, Höhe = Regenminuten) */
.dep-advice { margin: 4px 0 6px; font-size: 13px; }
.dep-advice p { margin: 0 0 4px; }
.dep-advice.pending p { color: var(--muted); }
.dep-head { display: flex; align-items: center; gap: 6px; }
.dep-head > p { flex: 1; min-width: 0; margin: 0; }
.dep-head:has(.dep-more:not([hidden])) > p { cursor: pointer; }
.dep-head + * { margin-top: 4px; }
.dep-advice.pending .dep-bars { opacity: 0.35; } /* alte Leiste bis zur neuen: Platz bleibt */
.dep-advice.pending:not(.anchored) .dep-bars { pointer-events: none; } /* neue Abfahrt, alte Balken gelten nicht mehr; verankert stimmen sie weiter */
.dep-advice #depAdviceText.good { color: var(--dry); font-weight: 600; }
.dep-earlier { display: block; width: 100%; min-height: 36px; margin: 0 0 6px; padding: 4px 8px; text-align: left; font: inherit; color: var(--dry); font-weight: 600; background: transparent; border: 1px solid var(--dry); border-radius: 6px; cursor: pointer; }
.dep-earlier[hidden] { display: none; }
.dep-advice.pending .dep-earlier { opacity: 0.35; pointer-events: none; }
.dep-bars { display: flex; gap: 2px; align-items: flex-end; height: 46px; }
#depAdviceBars button { flex: 1 1 0; min-width: 0; height: 100%; padding: 0 0 12px; border: 0; border-radius: 3px; background: transparent;
  display: flex; flex-direction: column; justify-content: flex-end; position: relative; cursor: pointer; }
#depAdviceBars button i { display: block; border-radius: 2px 2px 0 0; min-height: 3px; }
#depAdviceBars button.fc i { opacity: 0.45; }
/* Empfehlung nur als Punkt darüber, Auswahl als Rahmen + Fläche: vorher sah der Rahmen der Empfehlung wie die Auswahl aus
   und die graue Auswahl war im Dunkeln kaum zu sehen (#89) */
#depAdviceBars button.sug::before { content: ""; position: absolute; top: 0; left: 50%; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--accent); }
#depAdviceBars button.cur { background: rgba(217, 130, 43, 0.22); outline: 2px solid var(--accent); outline-offset: -1px; } /* gewählte Abfahrt */
#depAdviceBars button span { position: absolute; bottom: 0; left: 0; font-size: 11px; color: var(--muted); white-space: nowrap; line-height: 11px; }

/* Adresseingabe am Handy: Popup über die ganze Höhe (Nutzer 05.11.) – das Feld wandert hinein, darunter
   Favoriten und letzte Suchen. Höhe/Lage setzt fitSheet() nach dem sichtbaren Bereich über der Tastatur. */
#acSheet { position: fixed; left: 0; right: 0; top: 0; height: 100%; z-index: 2900; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink); }
#acSheet[hidden] { display: none; }
.ac-sheet-bar { flex: none; display: flex; align-items: center; gap: 6px; background: var(--panel); border-bottom: 1px solid var(--line);
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-right, 0px)) 8px max(6px, env(safe-area-inset-left, 0px)); }
#acSheet .ac-sheet-back { flex: none; width: 48px; height: 48px; padding: 0; display: flex; align-items: center; justify-content: center; }
#acSheet .ac-sheet-back .ico { transform: rotate(180deg); width: 24px; height: 24px; }
.ac-sheet-slot { flex: 1; min-width: 0; display: flex; }
#acSheet .ac input { font-size: 17px; min-height: 48px; border-color: var(--accent); } /* 16 px: Safari vergrößert sonst die Seite */
.ac-sheet-list { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
/* Schriftgröße (Einstellungen) wie im Menü – auf den Teilen, nicht auf #acSheet (dessen Höhe kommt in px aus visualViewport) */
.ac-sheet-bar, .ac-sheet-list { zoom: var(--ui-zoom, 1); }
/* Feld im Popup ist leer (Adresse als Platzhalter): Favoriten-Stern und Fettschrift weg */
#acSheet .fav-mark { display: none; }
#acSheet .ac input.is-fav { font-weight: inherit; padding-left: 9px; }
/* Liste im Popup: kein Klappmenü, sondern die ganze Fläche */
#acSheet ul { position: static; flex: 1; min-height: 0; margin: 0; padding: 0 0 env(safe-area-inset-bottom, 0px); list-style: none; max-height: none;
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
#acSheet li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; border-top: 1px solid var(--line); }
#acSheet li small { display: block; color: var(--muted); font-size: 13px; }
#acSheet li.active, #acSheet li:hover { background: rgba(217, 130, 43, 0.14); }
.ac li.ac-head { cursor: default; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  justify-content: space-between; padding-top: 12px; padding-bottom: 4px; }
#acSheet li.ac-head { border-top: 0; padding: 14px 14px 4px; }
.ac li.ac-head:hover, #acSheet li.ac-head:hover { background: none; }
.ac li.ac-head button { border: 0; background: none !important; color: var(--brand); font-size: 12px; text-transform: none; letter-spacing: 0;
  padding: 2px 4px; min-height: 0; cursor: pointer; }
.ac li.ac-head + li { border-top: 0; }
.ac-km { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ac .recent-ico { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; color: var(--muted); }

/* nur in Test-Instanz und Dev-Server (body.test-instance aus /api/status) */
body:not(.test-instance) .test-only { display: none !important; }

/* Popups der Knopfleiste: am Handy ganzseitig, am großen Bildschirm mittig. inset statt 100vw: das Menü hat CSS-zoom */
.sheet-panel { position: fixed; inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--panel); color: var(--ink); }
.sheet-panel[open] { display: flex; flex-direction: column; }
.sheet-panel::backdrop { background: rgba(0, 0, 0, 0.35); }
.sheet-head { display: flex; align-items: center; gap: 8px; flex: none; padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 6px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 17px; }
#panel .sheet-close { width: 40px; height: 40px; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
/* Platz unter dem letzten Feld, damit es sich über die Tastatur scrollen lässt (keepFieldVisible) */
.kb-open .sheet-body { padding-bottom: calc(16px + var(--kb, 0px)); }
/* Zeile über der Liste: Speichern (Hauptaktion, nimmt den Platz) + GPX daneben; große Schrift → untereinander */
.mine-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.mine-actions button { min-height: 44px; justify-content: center; }
.mine-actions .save-route { flex: 1 1 150px; }
.mine-actions #gpxImportMine { flex: 0 1 auto; }
#minePanel .tabs { margin-bottom: 8px; }
@media (min-width: 701px) {
  .sheet-panel { inset: 5vh auto auto 50%; transform: translateX(-50%); width: min(560px, 92vw); height: 90vh; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); overflow: hidden; }
}
#quickMine { margin-top: 4px; }
#quickMine[hidden] { display: none; }

/* Zeile unter den Adressen: 3 Symbole, Optionen, Abfahrt */
.plan-row { display: grid; grid-template-columns: 40px 40px 40px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; margin-top: 6px; }
#panel .plan-row button { min-height: 40px; margin: 0; border: 1px solid var(--line); border-radius: 10px; background-color: var(--panel); color: var(--ink); }
#panel .plan-row .tool { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.plan-row .tool .ico { width: 20px; height: 20px; }
#panel .plan-row #roundTrip.active { background-color: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.plan-row .tool:disabled { opacity: 0.4; cursor: default; }
#panel .plan-row .plan-pick { position: relative; display: block; min-width: 0; padding: 3px 22px 3px 8px; text-align: left; font-size: 13px; line-height: 1.2; }
.plan-pick small { display: block; color: var(--muted); font-size: 11px; }
.plan-pick > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-pick .chev { position: absolute; right: 6px; top: 50%; margin-top: -7px; color: var(--muted); }
#panel .plan-row .plan-pick.warn { border-color: #b3541e; }
.plan-pick.warn > span { color: #b3541e; }
:root[data-theme="dark"] .plan-pick.warn > span { color: #f0a36d; }
#prefsSection, #departureSection { margin-top: 6px; }

/* Navi-Leiste am Menüende: bleibt beim Scrollen stehen; nur mit Route (#result vor ihr im Menü), nicht eingeklappt */
#rideBox { position: sticky; bottom: -16px; z-index: 4; display: flex; gap: 8px; margin: 8px -16px -16px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--panel); border-top: 1px solid var(--line); }
#result[hidden] ~ #rideBox, body.panel-min #rideBox, #result[hidden] ~ #aboNavHint, body.panel-min #aboNavHint { display: none; }
/* „Keine Route“: kein Navi-Knopf, kein Vorausfahren/Profil */
#result.failed ~ #rideBox, #result.failed ~ #aboNavHint, #result.failed .play-row, #result.failed #profile { display: none; }
/* Reicht der Platz nicht (schmal, große Schrift), rutscht der Test-Knopf in eine eigene Zeile; km und Ankunft bleiben ganz */
#rideBox { flex-wrap: wrap; }
#rideBox #navBtn { flex: 1 1 12em; min-width: 0; min-height: 44px; padding-top: 4px; padding-bottom: 4px; justify-content: center; font-size: 16px; }
#navBtn > span { min-width: 0; line-height: 1.15; }
/* Ankunft und km fett in einer Zeile; nur wenn es nicht passt, untereinander – die Höhe des Knopfs bleibt (Nutzer 07.11.) */
#navMeta { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; column-gap: 6px; margin-left: 4px;
  font-size: 15px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
#navMeta b { font-size: 18px; font-weight: 700; }
#navMeta:empty { display: none; }
#rideBox #navSimBtn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 44px; padding: 0 8px; font-size: 12px; }
#navSimBtn .ico { width: 22px; height: 22px; }
#navSimKm:empty { display: none; }
#panel button.rain-link { color: inherit; }

/* Tippflächen im Menü mindestens 40 px (vorher Chips 27, Abfahrt/Reiter 28, ✕ 32, Symbole 34, Ändern 18, Häkchen 13) */
#panel .chips button, #panel .dep-seg > button, #panel .dep-cal, #panel .modes .mode, #panel .tabs button, #panel button.link { min-height: 40px; }
#panel button.link { display: inline-flex; align-items: center; }
#panel button.icon, #panel .icon-btn, #panel .ac .icon.mic { width: 40px; height: 40px; }
#panel .ac input { min-height: 40px; }
#panel label.check { min-height: 40px; }
#panel input[type=checkbox] { flex: none; width: 20px; height: 20px; }

/* Wasserzeichen nicht hinter Text: Ergebnis auf ruhiger Fläche, Ring statt Innenabstand spart Layout; gewählte Karte deckend */
#result { background: rgba(var(--panel-rgb), 0.72); box-shadow: 0 0 0 6px rgba(var(--panel-rgb), 0.72); border-radius: 6px; }
#panel .trip.active { background-color: var(--panel); background-color: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
#legsBtn { margin-top: 2px; font-size: 13px; }
#settingsPanel .sheet-body > label { gap: 6px; }

/* offenes App-Banner: Kartenknöpfe und Hinweise darunter statt verdeckt (vorher + bei 12–42, − bei 42–72, Ebenen verdeckt; Banner bis 56 px) */
body:has(#appBanner:not([hidden])) .leaflet-top { top: calc(58px + env(safe-area-inset-top, 0px)); }
body:has(#appBanner:not([hidden])) .map-status { top: calc(66px + env(safe-area-inset-top, 0px)); }

/* ===== Webseite am Computer (html.desk: Browser ab 701 px, nicht in der App) wie bis v1.8.0 (Nutzer 09.11.) =====
   Seitenleiste mit Beschriftungen, aufklappbare Bereiche statt Popups, Orange, kompakte Schrift; etwas breiter
   (ab 1100 px Fensterbreite 420 statt 360 px), damit weniger umbricht. Apps und schmale Bildschirme behalten das Handy-Menü darüber. */
html:not(.desk) .desk-only, html:not(.desk) .desk-lbl { display: none !important; }
html.desk:root { --accent: #d9822b; --on-accent: #fff; }
@media (min-width: 1100px) { /* am iPad hoch (810 px) bliebe sonst kaum Karte */
  html.desk #panel { width: calc(420px * var(--ui-zoom-fixed, var(--ui-zoom, 1)) / var(--ui-zoom, 1)); }
  html.desk .app-banner { left: calc(420px * var(--ui-zoom, 1)); }
}
/* Eingeklappt: die Breite oben ist genauso spezifisch und steht später – ohne diese Regel blieb das Menü breit und verlor
   nur Rand und Abstände (Nutzer 19.11., Windows/Chrome) */
html.desk body.panel-min #panel { width: 0; scrollbar-gutter: auto; }
/* Platz für den Rollbalken immer frei halten (Windows: 15 px breit, nicht überlagernd): sonst wird das Menü beim
   Erscheinen schmaler und das Hintergrundbild („cover“, placeHero) springt und skaliert neu (Nutzer 19.11.) */
html.desk #panel { scrollbar-gutter: stable; }
html.desk #panelTop { display: none; }

/* Zeile unter den Adressen: beschriftete Chips, Optionen als aufklappbare Zeile, Abfahrt immer offen */
html.desk .plan-row { display: flex; flex-wrap: wrap; gap: 4px; }
html.desk #panel .plan-row .tool { display: inline-flex; gap: 4px; min-height: 0; padding: 4px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
html.desk .plan-row .tool .ico { width: 14px; height: 14px; }
html.desk #panel .plan-row #addViaBtn { background-color: rgba(47, 111, 222, 0.12); border-color: var(--base); color: var(--base); font-weight: 600; }
html.desk:root[data-theme="dark"] #panel .plan-row #addViaBtn { color: #8db4ff; border-color: #5b8ff0; background-color: rgba(47, 111, 222, 0.22); }
html.desk #panel .plan-row #depToggle { display: none; }
html.desk #panel .plan-row #prefsToggle { flex-basis: 100%; display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 10px; min-height: 0;
  font-size: 14px; background-color: rgba(var(--panel-rgb), 0.7); }
html.desk .plan-pick small { order: 1; color: var(--ink); font-size: 14px; font-weight: 600; }
html.desk .plan-pick > span { order: 2; flex: 1; min-width: 0; color: var(--muted); font-size: 12px; }
html.desk #panel .plan-row .plan-pick .chev { order: 0; position: static; margin: 0; transform: none; }
html.desk #panel .plan-row .plan-pick[aria-expanded="true"] .chev { transform: rotate(90deg); }
html.desk #departureSection[hidden] { display: block !important; } /* gegen die allgemeine [hidden]-Regel */

/* Popups der Knopfleiste als aufklappbare Kästen im Menü (Kopf antippen) */
html.desk dialog.sheet-panel { display: block; position: static; inset: auto; transform: none; width: auto; height: auto; margin: 10px 0 0;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: none; overflow: visible; background: rgba(var(--panel-rgb), 0.7); }
html.desk dialog.sheet-panel.unfold { background: rgba(var(--panel-rgb), 0.95); }
html.desk #testPanel:not(.avail) { display: none; }
html.desk .sheet-head { padding: 8px 10px; border-bottom: 0; cursor: pointer; }
html.desk .sheet-head h2 { font-size: 14px; font-weight: 600; }
html.desk .sheet-head .chev { color: var(--muted); }
html.desk .sheet-panel.unfold .sheet-head .chev { transform: rotate(90deg); }
html.desk #panel .sheet-close { display: none; }
html.desk .sheet-body { overflow: visible; padding: 0 10px 10px; }
html.desk .sheet-panel:not(.unfold) .sheet-body { display: none !important; } /* #settingsPanel .sheet-body setzt flex */

/* Farben und Schrift wie bis v1.8.0 */
html.desk .mode.active, html.desk #panel .modes .mode.active { background-color: var(--ink); color: var(--panel); }
html.desk #panel .tabs button.active { border-bottom-color: var(--ink); }
html.desk #panel .compass button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
html.desk #panel button.go { background: #2e7d32; border-color: #2e7d32; color: #fff; }
html.desk #panel button.go:hover { background: #276b2b; }
html.desk:root[data-theme="dark"] #panel button.go { background: #388e3c; border-color: #388e3c; }
html.desk label, html.desk .hint, html.desk .chips button, html.desk .modes.small .mode, html.desk .leg-head, html.desk .busy, html.desk .curves,
html.desk .saved .load small, html.desk .profile-head, html.desk #result #warnings .note, html.desk .lbl, html.desk .dep-info,
html.desk .dep-seg > button, html.desk #legsBtn { font-size: 12px; }
html.desk label.check { font-size: 14px; }
html.desk .ac li small, html.desk .trip .meta small, html.desk .leg .chips button, html.desk .leg .chips .curves .mode,
html.desk #profileSvg text.place, html.desk .ac-km { font-size: 11px; }
html.desk #profileSvg text, html.desk #depAdviceBars button span { font-size: 10px; }
html.desk .trip .eta b { font-size: 19px; }

/* Tippflächen: am Computer genügt die Maus, kompakt wie bis v1.8.0 */
html.desk #panel .chips button, html.desk #panel .dep-seg > button, html.desk #panel .dep-cal, html.desk #panel .modes .mode,
html.desk #panel .tabs button, html.desk #panel button.link, html.desk #panel .ac input, html.desk #panel label.check { min-height: 0; }
html.desk #panel button.icon, html.desk #panel .ac .icon.mic { width: 32px; height: 32px; }
html.desk #panel .icon-btn { width: 34px; height: 34px; }
html.desk #panel input[type=checkbox] { width: auto; height: auto; }
html.desk #moreMenu #mineBtn, html.desk #moreMenu #settingsBtn, html.desk #moreMenu #testBtn { display: none; } /* am Computer Kästen im Menü */

/* Abo (MONETARISIERUNG.md): Stufen im Konto, Hinweis unter „Navigation starten“ */
.abo-open { margin-top: 4px; }
.abo-danke { text-align: center; }
.abo-danke-icon { margin: 4px 0 0; display: flex; justify-content: center; gap: 10px; }
.abo-danke-icon .ico { width: 48px; height: 48px; }
.abo-danke h2 { margin: 4px 0 8px; font-size: 22px; }
.abo-danke .row { justify-content: center; }
.abo-geschenk-nachricht { font-style: italic; white-space: pre-line; }
.abo-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.abo-stand-gross { font-weight: 600; margin: 4px 0 8px; }
.abo-vorteile { margin: 8px 0; padding-left: 20px; font-size: 14px; }
.abo-dialog #aboEinloesen { width: 100%; margin: 4px 0 8px; }
.abo-dialog .row { margin-top: 10px; }
.premium-teaser { display: block; width: 100%; text-align: left; margin: 4px 0 6px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--wet); background: transparent; color: inherit; font-size: 13px; cursor: pointer; }
.premium-teaser b { color: var(--wet); }
.premium-teaser .ico { vertical-align: -3px; margin-right: 4px; }
.abo-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.abo-row > span:first-child { flex: 1; }
.abo-preis s { color: var(--muted); }
.abo-nav-hint { padding: 0 2px; }
.abo-nav-hint.warn { color: var(--wet); }

/* Favoriten im Adressfeld als wischbare Kachelleiste (Nutzer 16.11.): 3½ Kacheln sichtbar, die halbe zeigt „weiter wischen“ */
.ac li.fav-tiles, #acSheet li.fav-tiles { display: flex; gap: 2px; padding: 8px 8px 6px; overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; cursor: default; border-top: 0; touch-action: pan-x pan-y; }
.ac li.fav-tiles::-webkit-scrollbar { display: none; }
.ac li.fav-tiles:hover, #acSheet li.fav-tiles:hover { background: none; }
.ac li.fav-tiles button.fav-tile { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 2px; border: 0; background: none; color: var(--ink); font-size: 12px; font-weight: 600; cursor: pointer; min-height: 0; }
.fav-tile-ico { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(217, 130, 43, 0.14); color: var(--accent); }
.fav-tile-ico .ico { width: 22px; height: 22px; }
.fav-tile-here .fav-tile-ico { background: rgba(47, 111, 222, 0.14); color: var(--base); }
.fav-tile:hover .fav-tile-ico, .fav-tile:focus-visible .fav-tile-ico { background: rgba(217, 130, 43, 0.26); }
.fav-tile-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac li.fav-tiles + li { border-top: 1px solid var(--line); }
/* Sortieren in Meine Routen › Favoriten */
.saved li button.fav-grip { cursor: grab; touch-action: none; color: var(--muted); border: 0; background: transparent; padding: 0; width: 32px; }
.saved li.dragging { position: relative; z-index: 2; background: var(--panel); border-radius: 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  will-change: transform; }
.saved.sorting li:not(.dragging) { transition: transform 0.18s ease-out; }
.saved.sorting { user-select: none; -webkit-user-select: none; }
.saved li.dragging .fav-grip { cursor: grabbing; color: var(--accent); }

/* Prototyp Glas-Menü (html.glas, ?glas=1; Nutzer 19.11.): Handy hochkant, Menü schwebt als Glasblatt mit runden Ecken,
   die Karte läuft unter seinen oberen Rand (--glas-ueber, fitView rechnet das ein). Hinter dem Rest liegt das Bild statt
   Wasserzeichen im Menü – das Glas macht daraus Milchglas. Nur Menü, Knöpfe/Felder bleiben fast deckend (Lesbarkeit). */
@media (max-width: 700px) {
  html.glas { --glas-ueber: 44px; --glas-rand: 6px; }
  /* Innenrand 12 statt 16 px: gleicht den Glasrand aus, sonst bricht „Navigation starten“ um */
  html.glas #panel { padding-left: 12px; padding-right: 12px; }
  html.glas #panelTop, html.glas #rideBox { margin-left: -12px; margin-right: -12px; }
  html.glas #rideBox { padding-left: 12px; padding-right: 12px; }
  html.glas body { background: var(--hero-img, url("theme-asset/chopper/hero.jpg")) 59% 70% / cover no-repeat, var(--bg); }
  html.glas #map { position: relative; z-index: 0; isolation: isolate;
    height: calc(40% + var(--glas-ueber)); margin-bottom: calc(-1 * var(--glas-ueber)); }
  html.glas body.panel-min #map { height: calc(100% - 48px - var(--glas-rand) + var(--glas-ueber)); }
  html.glas body.panel-full #map { height: calc(15% + var(--glas-ueber)); }
  html.glas #map .leaflet-bottom { bottom: var(--glas-ueber); }
  html.glas #panel, html.glas body.panel-min #panel {
    position: relative; z-index: 1; box-sizing: border-box;
    width: calc(100% - 2 * var(--glas-rand)); margin: 0 var(--glas-rand) var(--glas-rand);
    border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 26px;
    background: linear-gradient(160deg, rgba(var(--panel-rgb), 0.74), rgba(var(--panel-rgb), 0.58));
    backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(255, 255, 255, 0.2), 0 10px 32px rgba(0, 0, 0, 0.28); }
  html.glas #panel { height: calc(60% - var(--glas-rand)); }
  html.glas body.panel-full #panel { height: calc(85% - var(--glas-rand)); }
  /* Kopf mit Griff: eigenes, leichteres Glas, Inhalt scrollt darunter durch */
  html.glas #panelTop { background: rgba(var(--panel-rgb), 0.45); border-radius: 26px 26px 0 0;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  html.glas #panel button:not(.link):not(.leg-head):not(.active):not(.primary):not(.icon-btn), html.glas #panel .modes,
  html.glas #panel .trip:not(.active), html.glas #panel .note { background-color: rgba(var(--panel-rgb), 0.78); }
  :root[data-theme="dark"].glas #panel { border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 32px rgba(0, 0, 0, 0.55); }
}
/* System „Transparenz reduzieren“: Glas deckend */
@media (max-width: 700px) and (prefers-reduced-transparency: reduce) {
  html.glas #panel, html.glas body.panel-min #panel, html.glas #panelTop { background: var(--panel); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
