:root {
  --green: #2f6b2f;
  --green-l: #e8f1e4;
  --text: #1d231d;
  --muted: #6a736a;
  --line: #dde3dc;
  --bg: #f6f7f4;
  --red: #b3261e;
  --planned: #3d6fb6;
  --panel-w: 400px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--red); min-height: 1.2em; }
.msg { min-height: 1.2em; font-size: 14px; }
.msg.error { color: var(--red); }
h3 { margin: 22px 0 8px; font-size: 15px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
label.check { display: inline-flex; gap: 6px; align-items: center; margin: 0; color: var(--text); font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.row { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.row > select, .row > input { flex: 1; min-width: 120px; }
.btns { gap: 6px; }
.btn { padding: 8px 12px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; color: var(--text); }
.btn:hover { background: var(--green-l); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: #255825; }
.btn.danger { color: var(--red); }
.btn:disabled { opacity: .5; cursor: default; }
.pw-wrap { display: flex; gap: 6px; }
.pw-wrap input { flex: 1; }
.pw-toggle { white-space: nowrap; padding: 0 10px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 13px; cursor: pointer; }

/* Login */
.login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--bg); }
.login-box { background: #fff; padding: 28px; border-radius: 14px; width: 100%; max-width: 380px; box-shadow: 0 2px 16px rgba(0,0,0,.08); }
.login-box h1 { margin: 0 0 6px; font-size: 22px; color: var(--green); }
.login-box .btn { width: 100%; margin-top: 16px; padding: 11px; }

/* Layout */
.app { position: fixed; inset: 0; display: flex; }
.panel { width: var(--panel-w); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 1000; }
.panel-handle { display: none; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; flex-shrink: 0; }
.tabs button { flex: 1; padding: 12px 6px; border: 0; background: none; font: inherit; font-size: 14px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.tabs .tab-logout { flex: 0 0 auto; font-size: 12px; }
.panel-body { overflow-y: auto; padding: 12px 14px 40px; flex: 1; -webkit-overflow-scrolling: touch; }
.mapwrap { flex: 1; position: relative; }
#map { position: absolute; inset: 0; background: #e5e3df; }
.map-btn { position: absolute; right: 10px; bottom: 30px; z-index: 900; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.3); font-size: 22px; cursor: pointer; }
.map-btn.on { color: #1a73e8; }

/* Liste */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 8px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.list li:hover, .list li.hl { background: var(--green-l); }
.list .t-name { font-weight: 600; display: flex; gap: 6px; align-items: baseline; }
.list .t-meta { color: var(--muted); font-size: 13px; }
.badge { font-size: 11px; padding: 1px 6px; border-radius: 10px; background: var(--green-l); color: var(--green); font-weight: 600; white-space: nowrap; }
.badge.planned { background: #e6eef9; color: var(--planned); }
.list.compact li { display: flex; gap: 8px; align-items: flex-start; cursor: default; padding: 7px 4px; }
.list.compact li input { margin-top: 4px; }
.list.compact li.done { opacity: .55; }

/* Detail */
.back { background: none; border: 0; color: var(--green); font: inherit; cursor: pointer; padding: 4px 0; }
.detail h2 { margin: 6px 0 2px; font-size: 19px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.stats div { background: var(--bg); padding: 8px 10px; border-radius: 8px; }
.stats b { display: block; font-size: 17px; }
.stats small { color: var(--muted); font-size: 12px; }
.chart { position: relative; margin: 8px 0; }
.chart svg { width: 100%; height: 130px; display: block; touch-action: none; }
.chart .tip { position: absolute; top: 0; font-size: 12px; background: #fff; border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; pointer-events: none; transform: translateX(-50%); white-space: nowrap; }

/* Statistik */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 18px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 11px; color: var(--muted); }
.bars .bar i { display: block; width: 100%; background: var(--green); border-radius: 3px 3px 0 0; min-height: 1px; }
.bars .bar span { margin-top: 3px; }
.bars .bar em { font-style: normal; color: var(--text); font-size: 10px; margin-bottom: 2px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }

.progress { position: relative; height: 22px; background: var(--bg); border-radius: 11px; overflow: hidden; margin: 8px 0; }
.progress div { height: 100%; width: 0; background: var(--green); transition: width .2s; }
.progress span { position: absolute; inset: 0; text-align: center; font-size: 12px; line-height: 22px; }

/* Unterwegs */
.nav { position: absolute; left: 10px; right: 10px; top: 10px; z-index: 950; background: #fff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 2px 12px rgba(0,0,0,.25); max-width: 520px; }
.nav-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.nav-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; text-align: center; }
.nav-stats span { display: block; font-weight: 700; font-size: 17px; }
.nav-stats small { color: var(--muted); font-size: 11px; }
.pos-dot { width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 1px 4px rgba(0,0,0,.4); }
.wp-icon { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--green); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.wp-icon.start { background: var(--green); }
.end-icon { width: 16px; height: 16px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* Mobil: Karte oben, Bereich als Bodenblatt */
@media (max-width: 760px) {
  .app { flex-direction: column-reverse; }
  .panel { width: 100%; height: 48vh; border-right: 0; border-top: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -2px 10px rgba(0,0,0,.12); transition: height .2s; margin-top: -14px; }
  .panel.small { height: 130px; }
  .panel.big { height: 86vh; }
  .panel-handle { display: block; border: 0; background: none; padding: 7px 0 2px; cursor: pointer; flex-shrink: 0; }
  .panel-handle span { display: block; width: 44px; height: 5px; border-radius: 3px; background: #c7ccc6; margin: 0 auto; }
  .tabs button { padding: 9px 4px; font-size: 13px; }
  .map-btn { bottom: 24px; }
  .nav-stats span { font-size: 15px; }
}
.chart .lbl { position: absolute; font-size: 11px; color: var(--muted); background: rgba(255,255,255,.75); padding: 0 3px; border-radius: 3px; pointer-events: none; }
.nav { left: 56px; }
@media (max-width: 760px) { .nav { left: 52px; right: 8px; } }

/* Öffentlich / angemeldet */
body:not(.authed) .auth-only { display: none !important; }
body.authed .public-only { display: none !important; }
.login { z-index: 3000; background: rgba(246,247,244,.97); }
.login-box { position: relative; }
.login-close { position: absolute; right: 10px; top: 6px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; }
.login-box .btn.faceid { margin: 8px 0 4px; }
.login-box .or { margin: 14px 0 0; }
.badge.private { background: #eee; color: #555; }

/* Hinweis-Banner */
.banner { position: absolute; left: 50%; transform: translateX(-50%); top: 10px; z-index: 960; background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 2px 12px rgba(0,0,0,.3); width: min(480px, calc(100% - 110px)); border-left: 5px solid var(--green); }
.banner p { margin: 0 0 4px; font-weight: 600; }
.banner .row { margin: 4px 0 0; }

/* Aufzeichnung */
.rec-btn { bottom: 84px; color: var(--red); font-size: 20px; }
.rec-btn.on { background: var(--red); color: #fff; }
.rec-menu { position: absolute; right: 64px; bottom: 84px; z-index: 960; background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.3); width: min(300px, calc(100% - 80px)); display: flex; flex-direction: column; gap: 8px; }
.rec-menu p { margin: 0; }
.recbar { position: absolute; left: 10px; right: 64px; bottom: 24px; z-index: 950; background: #fff; border-radius: 12px; padding: 8px 12px; box-shadow: 0 2px 12px rgba(0,0,0,.3); max-width: 520px; border-left: 5px solid var(--red); }
.recbar.waiting { border-left-color: #c79100; }
.recbar.paused { border-left-color: #888; }
.rec-info { display: flex; flex-direction: column; }
.rec-info span { font-size: 14px; color: var(--muted); }
.recbar .row { margin: 6px 0 0; }
@media (max-width: 760px) {
  .banner { top: 8px; left: 50px; right: 56px; width: auto; transform: none; padding: 8px 10px; }
  .recbar .btn, .banner .btn { padding: 6px 9px; font-size: 13px; }
  .rec-btn { bottom: 78px; }
}

/* Übersicht: Startpunkte und Bündel */
.pin { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid var(--green); display: flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pin.bike { border-color: var(--planned); }
.pin.sel { transform: scale(1.25); background: #fffbe6; }
.cluster { width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(47,107,47,.35), 0 1px 5px rgba(0,0,0,.4); font-size: 14px; }
.tcard { font: 14px/1.4 system-ui, -apple-system, sans-serif; }
.tcard b { display: block; font-size: 15px; margin-bottom: 2px; }
.tcard .t-meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.tcard .btn { width: 100%; }
.plist { list-style: none; margin: 6px 0 0; padding: 0; max-height: 230px; overflow-y: auto; }
.plist li { padding: 7px 4px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; gap: 6px; justify-content: space-between; }
.plist li span { color: var(--muted); white-space: nowrap; }
.leaflet-popup-content { margin: 12px 14px; }

/* Liste kompakter */
.list li { display: flex; gap: 10px; align-items: flex-start; }
.t-ico { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--green-l); display: flex; align-items: center; justify-content: center; font-size: 17px; margin-top: 2px; }
.t-ico.bike { background: #e6eef9; }
.t-body { flex: 1; min-width: 0; }
.t-title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-meta b.dist { color: var(--text); }
.list.compact li { display: flex; }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.frow > select { min-width: 0; padding: 9px 6px; font-size: 14px; }
@media (max-width: 760px) {
  .panel { height: 42vh; }
}

.selcard { position: absolute; left: 10px; right: 64px; bottom: 24px; z-index: 955; background: #fff; border-radius: 12px; padding: 10px 34px 12px 14px; box-shadow: 0 2px 12px rgba(0,0,0,.3); max-width: 460px; }
.sc-close { position: absolute; right: 6px; top: 2px; border: 0; background: none; font-size: 24px; color: var(--muted); cursor: pointer; }
.selcard .plist { max-height: 190px; }
label.check.small { font-size: 13px; color: var(--muted); }
.filters .row { margin: 6px 0; }

/* ================= Handy-Optimierung ================= */
html { -webkit-text-size-adjust: 100%; }
body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, .btn, .tabs button, select, label.check { touch-action: manipulation; }
.tabs svg { display: none; }
.panel-body { overscroll-behavior: contain; }
.leaflet-top { top: env(safe-area-inset-top, 0px); }
.leaflet-right { right: env(safe-area-inset-right, 0px); }
.leaflet-left { left: env(safe-area-inset-left, 0px); }

@media (max-width: 760px) {
  /* Eingaben mind. 16px: sonst zoomt iOS beim Antippen hinein */
  input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], select { font-size: 16px; min-height: 44px; }
  .frow > select { font-size: 16px; padding: 8px 4px 8px 8px; }
  body.authed .frow { grid-template-columns: 1fr 1fr; }
  .btn { min-height: 44px; padding: 10px 14px; font-size: 15px; }
  .pw-toggle { min-height: 44px; }
  label.check { min-height: 36px; }
  label.check input { width: 20px; height: 20px; }

  /* Bodenblatt mit Leiste unten */
  .panel { height: 50vh; height: 50dvh; margin-top: -16px; border-radius: 16px 16px 0 0; transition: height .25s ease; will-change: height; }
  .panel.small { height: 170px; height: calc(170px + env(safe-area-inset-bottom, 0px)); }
  .panel.big { height: 88vh; height: 88dvh; }
  .panel-handle { display: block; width: 100%; padding: 10px 0 8px; touch-action: none; }
  .panel-handle span { width: 48px; height: 5px; }
  .panel-body { order: 2; padding: 4px 14px 16px; }
  .tabs { order: 3; border-bottom: 0; border-top: 1px solid var(--line); background: #fff; padding-bottom: env(safe-area-inset-bottom, 0px); overflow: visible; }
  .tabs button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; font-size: 11px; border-bottom: 0; border-top: 3px solid transparent; min-height: 54px; }
  .tabs button.active { border-top-color: var(--green); border-bottom-color: transparent; }
  .tabs svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabs .tab-logout { flex: 1; font-size: 11px; }
  #logoutBtn { display: none !important; }

  /* Karte: ruhiger, Bedienelemente greifbar */
  .leaflet-control-attribution { font-size: 9px !important; line-height: 1.3; max-width: 70%; opacity: .85; }
  .leaflet-control-scale { margin-bottom: 4px !important; }
  .leaflet-control-layers-toggle { width: 44px !important; height: 44px !important; }
  .map-btn { width: 48px; height: 48px; right: 12px; bottom: 30px; }
  .rec-btn { bottom: 88px; }
  .rec-menu { right: 70px; bottom: 30px; }
  .selcard, .recbar { left: 8px; right: 70px; bottom: 30px; }
  .nav { left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top, 0px)); padding: 8px 10px; }
  .banner { left: 8px; right: 60px; top: calc(8px + env(safe-area-inset-top, 0px)); }

  /* Liste und Detail */
  .list li { padding: 12px 6px; }
  .detail .row.btns { display: grid; grid-template-columns: 1fr 1fr; }
  .detail .row.btns > .btn, .detail .row.btns > select { width: 100%; text-align: center; }
  .detail .row.btns > label { grid-column: 1 / -1; }
  .detail h2 { font-size: 20px; }
  .stats { gap: 6px; }
  .chart svg { height: 110px; }
  h3 { margin-top: 18px; }

  /* Login als Blatt von unten */
  .login { align-items: flex-end; padding: 0; }
  .login-box { max-width: none; border-radius: 18px 18px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)); }
}
.panel { position: relative; z-index: 1000; }
.mapwrap { position: relative; z-index: 0; }
@media (max-width: 760px) { .app:has(.panel.big) .map-btn, .app:has(.panel.big) .leaflet-control-layers { display: none; } }

/* Empfehlungen */
.cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cards li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; border-left: 5px solid #c79100; }
.cards li:hover { background: var(--green-l); }
.rc-head b { font-size: 16px; }
.rc-desc, .rv-desc { color: var(--text); font-size: 14px; margin-top: 6px; white-space: pre-line; }
.rc-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-meta.warn { color: #a15c00; }
.rv-title { margin: 6px 0 2px; font-size: 20px; }
.rv-edit { margin: 10px 0; }
textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.cluster.rec { background: #c79100; flex-direction: column; line-height: 1; font-size: 15px; width: 42px; height: 42px; }
.cluster.rec small { font-size: 10px; }
.pin.num, .t-ico.num { font-weight: 700; font-size: 13px; color: var(--text); background: #fff; border: 3px solid var(--green); }
.t-ico.num { border-radius: 50%; }
.btn.small { min-height: 0; padding: 4px 9px; font-size: 13px; align-self: center; }
.dcoll { margin-top: 14px; }
@media (max-width: 760px) { textarea { font-size: 16px; } .btn.small { min-height: 36px; } }
#recView a, .detail a, .muted a { color: var(--green); }

/* Kartenbild in Listen */
.mm { position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #e8ebe4; display: block; }
.mm.empty { width: 64px; height: 64px; }
.mm img { position: absolute; width: 256px; height: 256px; max-width: none; filter: saturate(.7) brightness(1.04); }
.mm svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mm-sport { position: absolute; left: 2px; bottom: 2px; font-style: normal; font-size: 12px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 0 2px; line-height: 16px; }
.mm-ph { position: absolute; right: 2px; top: 2px; font-style: normal; font-size: 10px; background: rgba(255,255,255,.9); border-radius: 6px; padding: 0 3px; line-height: 15px; }
.mm-wrap { position: relative; flex: 0 0 auto; }
.mm-num { position: absolute; left: -4px; top: -4px; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-style: normal; font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; z-index: 2; }
.tc-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.tc-photo { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.tc-row .t-meta { margin-bottom: 0; }
.cards li.has-photo { padding-top: 0; overflow: hidden; }
.rc-photo { display: block; width: calc(100% + 28px); margin: 0 -14px 10px -14px; height: 130px; object-fit: cover; }

/* Fotos in der Tour */
.photos { margin: 10px 0; }
.ph-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.ph { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; border: 0; padding: 0; background: #eee; cursor: pointer; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-add { display: flex; align-items: center; justify-content: center; text-align: center; border: 2px dashed var(--line); background: #fff; color: var(--green); font-size: 13px; line-height: 1.3; }
.ph-pin { width: 36px; height: 36px; border-radius: 8px; overflow: hidden; border: 2px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45); }
.ph-pin img { width: 100%; height: 100%; object-fit: cover; }
.lbl.hr { color: #c62828; }

/* Großansicht */
.lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(0,0,0,.94); display: flex; flex-direction: column; color: #fff; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 8px; font-size: 14px; }
.lb-btn { background: none; border: 0; color: #fff; font-size: 26px; cursor: pointer; padding: 4px 8px; }
.lb-stage { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: 0; color: #fff; font-size: 34px; width: 46px; height: 64px; border-radius: 8px; cursor: pointer; }
#lbPrev { left: 6px; } #lbNext { right: 6px; }
.lb-bottom { display: flex; gap: 10px; justify-content: center; padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
.lb-bottom .btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
.lb-bottom .btn.danger { color: #ff8a80; }

/* Aufzeichnen-Knopf mit Beschriftung */
.rec-btn { width: auto !important; padding: 0 14px 0 12px; border-radius: 24px !important; display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 14px; font-weight: 600; }
.rec-btn .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--red); display: block; }
.rec-btn.on { background: var(--red); color: #fff; }
.rec-btn.on .dot { background: #fff; animation: recblink 1.2s infinite; }
.rec-btn.on .rec-lbl { font-size: 0; }
.rec-btn.on .rec-lbl::after { content: 'Läuft'; font-size: 14px; }
@keyframes recblink { 50% { opacity: .3; } }

.app:has(#rec:not(.hidden)) #recBtn, .app:has(#selCard:not(.hidden)) #recBtn, .app:has(#recMenu:not(.hidden)) .selcard { display: none; }

/* Planer */
.pbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 2px 0 8px; }
.pbar .btn { padding: 8px 4px; font-size: 13px; min-height: 42px; white-space: nowrap; }
.psum { margin: 4px 0; font-size: 16px; }
.wp { width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.wp.start { background: var(--green); }
.wp.end { background: var(--red); }
.wp.via { background: #fff; color: var(--planned); border-color: var(--planned); }
.wpmenu { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.wpmenu b { margin-bottom: 2px; }

/* Gefällt mir */
.like { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 2px; padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 14px; cursor: pointer; color: var(--text); min-height: 40px; }
.like .heart { color: #c62828; font-size: 18px; line-height: 1; }
.like.on { background: #fdecec; border-color: #f2b8b8; }
.like b { color: #c62828; }
.lk { color: #c62828; }

/* Wanderbuch */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-head p { margin: 8px 0; }
.book-open { position: relative; white-space: nowrap; }
.book-open .bp { position: absolute; top: -6px; right: -6px; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 0 6px; line-height: 18px; }
.dbook { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 4px; }
.entries { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.entry { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.entry.pending { border: 1px dashed #c79100; background: #fffaf0; }
.e-head { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.e-date { margin-left: auto; color: var(--muted); font-size: 12px; }
.e-text { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.e-tour { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--green); }
.entry audio { width: 100%; margin-top: 8px; height: 40px; }
.e-mod { margin: 6px 0 0; }
.bf-wrap { margin: 10px 0; }
.bf-wrap summary { list-style: none; display: inline-block; }
.bf-wrap summary::-webkit-details-marker { display: none; }
.bf-wrap[open] summary { margin-bottom: 6px; }
.bookform .btn.on { background: #fdecec; border-color: #f2b8b8; }
.bf-audio { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.bf-audio audio { width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Ruhigere Grundkarte, damit Strecken hervortreten */
.leaflet-tile-pane { filter: saturate(.6) brightness(1.05); }
.pin.num.sel { transform: scale(1.25); background: #fffbe6; }
.numdot { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; margin-right: 4px; }
.rv-edit { margin: 8px 0; }
.rv-edit summary { list-style: none; display: inline-block; }
.rv-edit summary::-webkit-details-marker { display: none; }
.rv-edit[open] summary { margin-bottom: 8px; }
#rvTours li.hl { background: var(--green-l); }

.kc-sum { margin: 6px 0; padding-left: 18px; font-size: 14px; }
#kcMsg { margin-top: 8px; }
#kcMsg:not(:empty) { background: var(--green-l); border-radius: 8px; padding: 8px 10px; }
#kcMsg.error:not(:empty) { background: #fdecec; }

/* Ortssuche */
.searchbox { position: absolute; top: 10px; left: 58px; right: 64px; z-index: 940; max-width: 560px; }
.s-row { display: flex; gap: 6px; }
.s-row input { flex: 1; min-width: 0; border-radius: 22px; padding: 9px 14px; box-shadow: 0 1px 6px rgba(0,0,0,.25); border: 0; }
.s-row .btn { border-radius: 22px; box-shadow: 0 1px 6px rgba(0,0,0,.25); border: 0; padding: 0 12px; }
.s-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 2px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.s-chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 0; background: #fff; border-radius: 16px; padding: 6px 11px; font: inherit; font-size: 13px; box-shadow: 0 1px 4px rgba(0,0,0,.22); cursor: pointer; white-space: nowrap; color: var(--text); }
.chip.on { background: var(--green); color: #fff; }
.s-msg { margin: 4px 0 0; background: rgba(255,255,255,.95); border-radius: 8px; padding: 5px 10px; font-size: 13px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.s-msg.error { color: var(--red); }
.s-results { list-style: none; margin: 6px 0 0; padding: 4px 0; background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.25); max-height: 42vh; overflow-y: auto; }
.s-results li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line); }
.s-results li:last-child { border-bottom: 0; }
.s-results li:hover { background: var(--green-l); }
.s-ic { font-size: 18px; width: 24px; text-align: center; }
.s-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.s-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.s-txt small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-d { color: var(--muted); font-size: 12px; white-space: nowrap; }
.poi { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid #8a5a00; display: flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.poi.sel { transform: scale(1.3); border-color: var(--red); }
.poicard .poi-lines { font-size: 14px; margin: 4px 0 8px; display: flex; flex-direction: column; gap: 3px; }
.poi-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.poi-btns .btn { flex: 1 1 auto; text-align: center; text-decoration: none; padding: 8px 10px; font-size: 13px; }
.poicard .osm { margin: 6px 0 0; font-size: 11px; }
.banner { top: 64px; }
.app:has(#nav:not(.hidden)) .searchbox { display: none; }
@media (max-width: 760px) {
  .searchbox { left: 8px; right: 62px; top: calc(8px + env(safe-area-inset-top, 0px)); }
  .s-row input { font-size: 16px; }
  .banner { top: calc(60px + env(safe-area-inset-top, 0px)); }
  .selcard { max-height: 55%; overflow-y: auto; }
}

.poi-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.poi-btns .btn { min-height: 40px; padding: 6px 4px; font-size: 13px; }
.nav-help { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.nav-help .btn { min-height: 36px; }
.nav-hi { margin: 2px 0; font-size: 14px; font-weight: 600; color: #e65100; }
.nav-hi:empty { display: none; }
.offl { margin: 10px 0; }
.off-ok { color: var(--green); font-weight: 600; font-size: 14px; }
@media (max-width: 760px) { .nav { right: 58px; } }
.app:has(#nav:not(.hidden)) .banner { top: auto; bottom: 96px; }

/* Sportart wählen */
.sportpick { position: fixed; inset: 0; z-index: 3500; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.sp-box { background: #fff; width: 100%; max-width: 480px; border-radius: 18px 18px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
.sp-box b { font-size: 18px; }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-grid .sp { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; min-height: 76px; font-size: 14px; }
.sp-grid .sp span { font-size: 26px; line-height: 1; }
.sp-grid .sp.on { border: 2px solid var(--green); background: var(--green-l); }
@media (min-width: 761px) { .sportpick { align-items: center; } .sp-box { border-radius: 16px; } }

/* Schwierigkeit, Untergrund, Wetter */
.badge.diff.leicht { background: #e3f2e1; color: #2e7d32; }
.badge.diff.mittel { background: #fff3e0; color: #e65100; }
.badge.diff.schwer { background: #fdecec; color: #c62828; }
.dsurf h3 { margin: 12px 0 6px; font-size: 14px; }
.dline { margin: 8px 0; }
.sbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eee; }
.sbar i { display: block; height: 100%; }
.slegend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 13px; }
.slegend span { display: inline-flex; align-items: center; gap: 5px; }
.slegend span i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.src { font-size: 11px; margin: 4px 0 0; }
.dwx { margin-top: 8px; }
.wxrow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.wxd, .wxh { flex: 0 0 auto; min-width: 70px; background: var(--bg); border-radius: 10px; padding: 6px 6px; display: flex; flex-direction: column; align-items: center; font-size: 13px; }
.wxh { min-width: 54px; background: #f0f4f8; }
.wxi { font-size: 24px; line-height: 1.2; }
.wxd small, .wxh small { color: var(--muted); font-size: 11px; }

/* ---------- Wanderbuch ---------- */
.jcard { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 4px; padding: 12px 14px; background: var(--green-l); border-radius: 12px; }
.jcard > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jcard small { font-size: 13px; }
#tab-journal h3 { margin: 22px 0 8px; }
.jform { display: flex; flex-direction: column; gap: 6px; }
.jform label:not(.check) { font-size: 13px; color: var(--muted); margin-top: 6px; }
.jform input, .jform textarea, .jd-title, .jentry-form input, .jentry-form textarea, .jprint select, #jAddTour { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.jsaved { font-size: 13px; align-self: center; }
.jstages { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.jstages li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg); border-radius: 10px; }
.jstages li span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.jstages li small { font-size: 12px; }
.jstages em { font-size: 12px; font-style: normal; }
.muted.small, p.small { font-size: 13px; }
.jday { margin-top: 18px; padding-top: 12px; border-top: 2px solid var(--green-l); display: flex; flex-direction: column; gap: 8px; }
.jd-head { display: flex; flex-direction: column; gap: 2px; }
.jd-head b { color: var(--green); }
.jd-title { font-weight: 600; }
.jmap { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.jmap.old { opacity: .6; }
.jentries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jentries > li { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.jentries p, .jentry p { margin: 4px 0; white-space: normal; line-height: 1.45; }
.je-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.jnum { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; }
.jadd > summary { list-style: none; display: inline-block; }
.jadd > summary::-webkit-details-marker { display: none; }
.jentry-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.jentry-form label:not(.check) { font-size: 13px; color: var(--muted); }
.jentry-form input[type=time] { width: auto; }
.btn.on { background: #fdecec; border-color: #f2b8b8; }
.jphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.jph { position: relative; margin: 0; background: var(--bg); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; border: 2px solid transparent; }
.jph img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; cursor: zoom-in; }
.jph.off img { opacity: .35; filter: grayscale(1); }
.jph.star { border-color: #e0b400; }
.jph.lowres { border-color: var(--red); }
.jph figcaption { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; align-items: center; }
.jph figcaption .btn.small { padding: 4px 7px; font-size: 12px; min-height: 0; }
.jph figcaption select { font-size: 12px; padding: 3px; border-radius: 6px; border: 1px solid var(--line); }
.jph figcaption small { width: 100%; font-size: 12px; color: var(--muted); font-style: italic; }
.jstar, .jcov { position: absolute; left: 6px; top: 6px; background: rgba(255,255,255,.92); border-radius: 6px; padding: 2px 6px; font-size: 11px; font-weight: 600; }
.jcov { left: auto; right: 6px; }
.jphotos.ro .jph { border: 0; padding: 0; cursor: zoom-in; }
.jphotos.ro .jph small { padding: 4px 6px; font-size: 12px; color: var(--muted); text-align: left; }
.jprint { margin-top: 24px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.jprint h3 { margin-top: 0 !important; }
.jprint > label:not(.check) { font-size: 13px; color: var(--muted); }
.jgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.jgrid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.jgrid input { font: inherit; font-size: 16px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; width: 100%; box-sizing: border-box; }
#jpMsg p { margin: 4px 0; }
#jpMsg .btn { margin-top: 6px; display: inline-block; text-decoration: none; }
.jread .jr-title { font-size: 22px; margin: 6px 0 2px; }
.jr-sub { font-style: italic; margin: 0 0 4px; }
.jr-text { line-height: 1.5; margin: 8px 0; }
.jday h4 { margin: 2px 0; font-size: 17px; }
.jdaypin { width: 22px; height: 22px; border-radius: 50%; color: #fff; font: 700 12px/22px system-ui, sans-serif; text-align: center; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); box-sizing: border-box; line-height: 18px; }
#noteText { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }

/* gebündelte Treffer der Ortssuche */
.poi.poi-cl { width: 34px; height: 34px; position: relative; border-color: var(--green); }
.poi.poi-cl span { position: absolute; right: -8px; top: -7px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: 9px; background: var(--green); color: #fff; font: 700 11px/18px system-ui, sans-serif; text-align: center; }
#sResults .s-head { font-size: 12px; color: var(--muted); padding: 6px 12px; cursor: default; background: var(--bg); position: sticky; top: 0; z-index: 1; }

/* Unterwegs: Umplanen, Warnung */
.nav-rp { background: #f3e5f5; border-radius: 10px; padding: 8px 10px; margin: 6px 0; font-size: 14px; }
.nav-rp p { margin: 0 0 6px; }
.nav-set { margin: 6px 0 2px; font-size: 14px; }
.nav-set summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.nav-set[open] { background: var(--bg); border-radius: 10px; padding: 6px 10px; }
.nav-set .nw-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.nav-set select { font-size: 15px; padding: 4px; border-radius: 8px; border: 1px solid var(--line); }
/* Offline-Übersicht */
.offlist li { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.offlist .ol-t { display: flex; flex-direction: column; }
.offlist .ol-t small { font-size: 12px; }
.nav.rp-mode .nav-stats, .nav.rp-mode .nav-help, .nav.rp-mode #navHelpInfo, .nav.rp-mode .nav-set, .nav.rp-mode > label.check, .nav.rp-mode #navMsg { display: none; }

/* Tour bearbeiten */
.tdesc { margin: 8px 0; line-height: 1.45; }
.ebar { margin: 10px 0; padding: 10px 12px; background: var(--bg); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.ebar-info { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.ebar .row.btns { margin: 0; }
.eform { display: flex; flex-direction: column; gap: 6px; }
.eform > label:not(.check) { font-size: 13px; color: var(--muted); margin-top: 6px; }
.eform input, .eform textarea, .eform select, #eNewColl, #rvPickQ { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 6px; }
.egrid label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--muted); }
#tab-edit h3 { margin: 22px 0 6px; }
.echecks { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.echecks li { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.echecks small { font-size: 12px; }
#eNewColl { flex: 1 1 200px; width: auto; }
.pedit { display: flex; align-items: center; gap: 8px; background: #fff8e1; border: 1px solid #f0d98a; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; font-size: 14px; }
.pedit span { flex: 1; }
.rvpick { margin: 8px 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.rvpick .echecks { max-height: 45vh; overflow-y: auto; }
.rv-ord { display: inline-flex; gap: 3px; margin-left: auto; }
.rv-ord .btn.small { padding: 4px 8px; min-height: 0; }

/* Suchknöpfe: am PC umbrechen statt abschneiden, am Handy wischen (mit Hinweis am Rand) */
@media (pointer: fine) { .s-chips { flex-wrap: wrap; overflow: visible; } }
@media (pointer: coarse) { .s-chips { -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); padding-right: 24px; } }

/* Wanderzeichen */
.osmc { display: block; border-radius: 3px; flex: 0 0 auto; }
.osmc-pin { filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.osmc-pin .osmc { width: 20px; height: 20px; }
.osmc-pin.sel .osmc { width: 26px; height: 26px; margin: -2px; }
#sResults .s-ic .osmc { width: 26px; height: 26px; }
.trailcard .tc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.trailcard .tc-head .osmc { width: 40px; height: 40px; }

/* Mehrtagestouren */
.pmulti { margin: 10px 0; padding: 8px 10px; background: var(--bg); border-radius: 12px; }
.pm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; margin: 6px 0; }
.pm-row select, .pm-row input { font-size: 15px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; }
.pm-row input { width: 64px; }
.stages { margin: 6px 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.stages li { background: #fff; border-radius: 10px; padding: 8px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 1px solid var(--line); }
.stages li > div { flex: 1 1 200px; display: flex; flex-direction: column; }
.stages small { color: var(--muted); font-size: 12px; }
.stages .st-stay { color: var(--text); }
.st-btns { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.st-btns .btn.small { padding: 4px 8px; min-height: 0; }
.st-wx { flex: 1 1 100%; }
.stpin { background: #fff; border: 2px solid #6d4c41; border-radius: 12px; font-size: 13px; line-height: 18px; padding: 0 5px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.stpin b { font: 700 11px/18px system-ui, sans-serif; margin-left: 2px; }
.nav-stage { margin: 4px 0; font-size: 14px; font-weight: 600; color: #5d4037; }
.dstages h3 { margin: 18px 0 6px; }

/* Update 27: Bilder-Platzhalter, Fernwege, schönste Wege, Etappen nach Fitness, Website-Import */
.dhead { display: flex; gap: 12px; align-items: flex-start; }
.dhead-t { flex: 1; min-width: 0; }
.dhead-t h2 { margin-top: 2px; }
.dcover { position: relative; flex: 0 0 84px; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); padding: 0; cursor: pointer; margin-top: 4px; }
.dcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dcover > span { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.62); color: #fff; font-size: 12px; border-radius: 8px; padding: 1px 6px; }
.dcover.empty { display: flex; align-items: center; justify-content: center; border-style: dashed; color: var(--muted); }
.dcover.empty > span { position: static; background: none; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.25; padding: 0; }
#sResults small.hl { color: #2f6b2f; }
.tparts { margin: 8px 0; }
.tparts summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.tparts ul { list-style: none; padding: 0; margin: 6px 0 0; max-height: 220px; overflow: auto; }
.tparts li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fitrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 8px 0; }
.fit { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; cursor: pointer; }
.fit input[type=radio] { margin-top: 3px; }
.fit span { display: flex; flex-direction: column; gap: 2px; }
.fit small { color: var(--muted); }
.fit small input, .fit small select { display: inline-block; width: auto; min-width: 0; margin: 2px 0; font-size: 14px; }
.fit small input { width: 52px; padding: 3px 5px; }
.fit small select { padding: 3px 2px; height: auto; }
#eStList { margin-top: 10px; }
.wpick { list-style: none; padding: 0; margin: 6px 0 0; }
.wpick li { display: flex; gap: 8px; align-items: center; padding: 3px 0; word-break: break-all; font-size: 13px; }
.dstages > small { display: inline-block; margin-top: 6px; }
.pavoid { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 2px; }
.pavoid .check { margin: 0; }
.ebar-login { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 14px; }
/* Update 31: Strecke durch Ziehen der Linie ändern */
.leaflet-interactive.track-hit { cursor: grab; }
.leaflet-container.line-dragging, .leaflet-container.line-dragging .leaflet-interactive { cursor: grabbing !important; }
.wp.wp-ghost { opacity: .85; box-shadow: 0 0 0 4px rgba(61,111,182,.25); }
.leaflet-tooltip.line-tip { font-size: 13px; padding: 4px 8px; }
.eroute { background: #eef3fb; border: 1px solid #c9d8ef; border-radius: 12px; padding: 10px 12px; margin: 8px 0 14px; }
.eroute p { margin: 4px 0 8px; }
.leaflet-container path.leaflet-interactive:focus { outline: none; }

/* Update 32: Gäste-Ansicht (?ansicht=gast), z. B. als iFrame auf der Ferienwohnungs-Seite */
body.guest .public-only, body.guest .auth-only, body.guest .book-open, body.guest #recBtn, body.guest .like,
body.guest .tabs [data-tab="plan"], body.guest .tabs [data-tab="stats"], body.guest .tabs [data-tab="import"] { display: none !important; }

/* Update 33: Aufzeichnung – Hinweis, ob der Bildschirm anbleibt */
#recAwake { display: block; font-size: 12px; color: #2f6b2f; margin-top: 2px; }
#recAwake.warn { color: #a35a00; }
#rec.waiting #recAwake { display: none; }
/* Unterwegs: Höhenprofil mit Position */
.nav-chart { margin: 4px 0 6px; }
.nav-chart svg { height: 72px; }
.nav-stats small { white-space: nowrap; }
.rec-prof summary { cursor: pointer; font-size: 13px; color: var(--muted); margin-top: 4px; }
.rec-prof .nav-chart svg { height: 64px; }
/* Update 34: Overland */
.olsteps { padding-left: 20px; margin: 6px 0 10px; }
.olsteps li { margin: 6px 0; line-height: 1.4; }
.olsteps .btn { margin: 4px 0; display: inline-block; text-decoration: none; }
.olfound { list-style: none; padding: 0; margin: 4px 0 10px; }
.olfound li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
/* Update 36: Touren auswählen und löschen */
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; margin: 4px 0 8px; background: #fff4e5; border: 1px solid #f0c98a; border-radius: 10px; font-size: 14px; position: sticky; top: 0; z-index: 3; }
.selbar #selInfo { flex: 1; font-weight: 600; }
.list.selecting li { cursor: pointer; }
.list li.picked { background: #fff4e5; }
.list li .pick { font-size: 22px; align-self: center; margin-right: 2px; }
/* Update 37: Anfahrt zum Startpunkt */
.anf { margin: 10px 0; padding: 10px; border: 1px solid #cfe3d4; background: #f3faf5; border-radius: 10px; font-size: 14px; }
.anf .poi-btns { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; }
#banner .row { flex-wrap: wrap; }
/* Update 38: weit weg → Anfahrt ist Hauptknopf */
.anf.far { border-color: var(--green); }
.anf .poi-btns .btn.primary { color: #fff; }
.anf .anf-hint { margin-top: 6px; font-size: 13px; }
/* Update 39: Handy – Unterwegs kompakt, Filter einklappbar */
.qrow { display: flex; gap: 6px; align-items: center; }
.qrow input { flex: 1; min-width: 0; }
#fToggle { display: none; white-space: nowrap; }
.nav-top b { flex: 1; min-width: 0; }
.nav-minbtn { display: none; }
.nav-morebtn { display: none; }
@media (max-width: 760px) {
  #fToggle { display: inline-flex; }
  .filters:not(.open) .frow, .filters:not(.open) .row:has(#fLines) { display: none; }
  /* Unterwegs: Karte groß, Bodenblatt weg, nur das Nötigste oben */
  body.navving .panel { display: none; }
  body.navving #recBtn { display: none; }
  .nav { max-height: calc(100vh - 120px); overflow-y: auto; }
  .nav-top b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
  .nav-top .btn { padding: 6px 10px; min-height: 34px; }
  .nav-minbtn, .nav-morebtn { display: inline-flex; }
  .nav-stats { gap: 2px 4px; margin: 6px 0 4px; }
  .nav-stats span { font-size: 15px; }
  .nav-stats small { font-size: 10px; }
  .nav-stats div:nth-child(n+5) span { font-size: 13px; }
  .nav-chart svg { height: 52px; }
  .nav-help { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; scrollbar-width: none; }
  .nav-help .btn { flex: 0 0 auto; white-space: nowrap; min-height: 34px; padding: 5px 9px; font-size: 13px; }
  .nav:not(.more) .nav-more { display: none; }
  .nav.min .nav-stats div:nth-child(n+5), .nav.min .nav-chart, .nav.min .nav-help, .nav.min .nav-more, .nav.min #navStage { display: none; }
  /* Aufzeichnung läuft mit: nur eine Zeile, Antippen zeigt die Knöpfe */
  body.navving .recbar { bottom: 22px; padding: 6px 10px; }
  body.navving .recbar:not(.open) #recBtns, body.navving .recbar:not(.open) #recProf, body.navving .recbar:not(.open) #recAwake { display: none; }
  body.navving .recbar .rec-info { cursor: pointer; }
}
/* Update 40: Fotos zur Tour vorschlagen */
.ppk { max-height: 88vh; }
.ppk-info { margin: 0; font-size: 14px; }
.ppk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; overflow-y: auto; min-height: 0; flex: 1; }
.ppk-it { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; background: var(--bg); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.ppk-it img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; opacity: .45; }
.ppk-it.on { border-color: var(--green); }
.ppk-it.on img { opacity: 1; }
.ppk-it small { font-size: 10.5px; padding: 3px 4px; line-height: 1.2; text-align: left; color: var(--muted); }
.ppk-it.on small { color: var(--green); font-weight: 600; }
.ppk-chk { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.9); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.ppk-it.on .ppk-chk { background: var(--green); }
@media (min-width: 761px) { .ppk-grid { grid-template-columns: repeat(4, 1fr); } }
/* Update 41: Gewicht */
.wg-tot { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.wg-rng { display: flex; gap: 6px; margin: 4px 0 6px; }
.wg-rng .btn.on { background: var(--green); border-color: var(--green); color: #fff; }
.wg-chart { position: relative; }
.wg-chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.wg-chart text { font-size: 11px; fill: var(--muted); }
.wg-chart .g { stroke: #e3e6e1; stroke-width: 1; vector-effect: non-scaling-stroke; }
.wg-chart .ln { fill: none; stroke: var(--green); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.wg-chart .pt { fill: #9bbf9b; }
.wg-chart .cur { stroke: #1565c0; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wg-chart .cur.hidden { display: none; }
.wg-tip { position: absolute; top: 4px; right: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 600; }
#wgSetupBox { background: var(--bg); border-radius: 10px; padding: 8px 12px; margin: 6px 0; font-size: 14px; }
#wgSetupBox input { flex: 1; min-width: 0; font-size: 13px; }
/* Update 43: Sportart auf der Startseite */
.spchips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.spchips::-webkit-scrollbar { display: none; }
.spchips .chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 6px 12px; font-size: 14px; cursor: pointer; white-space: nowrap; color: inherit; }
.spchips .chip small { color: var(--muted); margin-left: 2px; }
.spchips .chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.spchips .chip.on small { color: rgba(255,255,255,.85); }
.spchips:empty { display: none; }
/* Update 44: Puls */
#hrSetupBox { background: var(--bg); border-radius: 10px; padding: 8px 12px; margin: 6px 0; font-size: 14px; }
#hrSetupBox input { flex: 1; min-width: 0; font-size: 13px; }
/* Update 47: eigene iPhone-App */
.nattrack { background: #f3faf5; border: 1px solid #cfe3d4; border-radius: 10px; padding: 4px 12px 8px; margin: 6px 0 10px; font-size: 14px; }
body.native-app #olSetup { display: none; }
body.native-app .ios-tip { display: none; }
