/* Leipzig erkunden ❤️ – modernes Design (hell & dunkel) */
@font-face {
  font-family: 'Jakarta';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations'), url('plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
}

:root {
  --font: 'Jakarta', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bg: #F4F5F9;
  --surface: #FFFFFF;
  --surface-2: #F0F2F7;
  --surface-3: #E6E9F1;
  --text: #141A2E;
  --text-2: #4D5672;
  --text-3: #7C849D;
  --line: #E4E7EF;
  --line-2: #D3D8E4;
  --brand: #27348B;
  --brand-2: #4253C9;
  --brand-soft: #E9ECFB;
  --on-brand: #FFFFFF;
  --accent: #E8384F;
  --sun: #FFC93C;
  --sun-soft: #FFF4D2;
  --ok: #15803D; --ok-soft: #E3F5E8;
  --warn: #B25A06; --warn-soft: #FFF1DC;
  --bad: #C42B2B; --bad-soft: #FCE7E7;
  --ev: #0B8F63; --ev-soft: #DDF5EB;
  --park: #2459D8; --park-soft: #E4ECFF;
  --shadow-1: 0 1px 2px rgba(20, 26, 46, .05), 0 1px 4px rgba(20, 26, 46, .05);
  --shadow-2: 0 6px 18px rgba(20, 26, 46, .09), 0 1px 4px rgba(20, 26, 46, .06);
  --shadow-3: 0 18px 44px rgba(20, 26, 46, .20), 0 4px 12px rgba(20, 26, 46, .08);
  --glass: rgba(255, 255, 255, .84);
  --glass-line: rgba(20, 26, 46, .07);
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 26px;
  --tab: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tab-space: calc(var(--tab) + 22px + var(--safe-b));
  color-scheme: light;
  font-family: var(--font);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1017;
    --surface: #181B26;
    --surface-2: #212534;
    --surface-3: #2B3043;
    --text: #EEF0F7;
    --text-2: #B4BACD;
    --text-3: #8A91A8;
    --line: #262B3B;
    --line-2: #353B50;
    --brand: #93A3FF;
    --brand-2: #AEBBFF;
    --brand-soft: #222A50;
    --on-brand: #0B0E1A;
    --sun-soft: #3A3014;
    --ok: #4ADE80; --ok-soft: #12301F;
    --warn: #FBBF24; --warn-soft: #3A2A0C;
    --bad: #F87171; --bad-soft: #3B1616;
    --ev: #34D399; --ev-soft: #0E3126;
    --park: #7EA6FF; --park-soft: #1A2748;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-2: 0 6px 18px rgba(0, 0, 0, .35);
    --shadow-3: 0 18px 44px rgba(0, 0, 0, .55);
    --glass: rgba(24, 27, 38, .84);
    --glass-line: rgba(255, 255, 255, .07);
    color-scheme: dark;
  }
  .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.88) saturate(.75); }
  .leaflet-container { background: #1B1E27 !important; }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font-size: 15.5px; line-height: 1.5; overscroll-behavior-y: none; font-feature-settings: 'ss01' 0; }
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.012em; }
h2 { font-weight: 800; }
h3 { font-weight: 750; }
p { margin: .5em 0; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.spacer { flex: 1; }

#app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto; background: var(--bg); position: relative; overflow: hidden; }

/* ---------- top bar ---------- */
.topbar { flex: none; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 16px 10px; background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--glass-line); z-index: 20; }
.topbar-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; box-shadow: 0 2px 8px rgba(20, 26, 46, .18); }
.topbar h1 { display: flex; flex-direction: column; font-size: 18.5px; font-weight: 800; line-height: 1.12; min-width: 0; }
.topbar .t1 { font-size: 12.5px; font-weight: 650; color: var(--text-2); letter-spacing: .01em; }
.topbar .heart { font-size: .8em; }

main { flex: 1; min-height: 0; position: relative; }
.view { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#view-map { overflow: hidden; }
.list, .plan, .info { padding-bottom: var(--tab-space) !important; }

/* ---------- floating tab bar ---------- */
.tabbar { position: absolute; left: 12px; right: 12px; bottom: calc(10px + var(--safe-b)); height: var(--tab); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px; background: var(--glass); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); border: 1px solid var(--glass-line); border-radius: 24px; box-shadow: var(--shadow-3); z-index: 700; }
.tabbar button { border: 0; background: none; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 650; color: var(--text-3); transition: background .2s, color .2s; }
.tabbar button .ic { width: 23px; height: 23px; }
.tabbar button.active { color: var(--brand); background: var(--brand-soft); }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 0 14px 0 12px; font-weight: 650; font-size: 13.5px; white-space: nowrap; color: var(--text); transition: background .15s, color .15s, border-color .15s; }
.chip .ic { width: 16px; height: 16px; vertical-align: 0; }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--brand)); }
.chip[aria-pressed="true"] { background: var(--c, var(--brand)); border-color: transparent; color: #fff; }
.chip.plain[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.chip[aria-pressed="true"] .dot { background: #fff; }
.chip.plain { padding-left: 14px; }
.chip.plain .ic { margin-left: -2px; }
.map-top { position: absolute; top: 0; left: 0; right: 0; z-index: 500; pointer-events: none; }
.map-top .chips { pointer-events: auto; padding-top: 12px; }
.chips-map .chip { box-shadow: var(--shadow-2); border-color: transparent; }

/* ---------- map ---------- */
#map { position: absolute; inset: 0; background: #E9EDF3; }
.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 10.5px; border-radius: 8px 0 0 0; background: var(--glass) !important; color: var(--text-2); }
.leaflet-control-attribution a { color: var(--text-2); }
.leaflet-bottom.leaflet-left { margin-bottom: var(--tab-space); }
.leaflet-top, .leaflet-bottom { z-index: 450 !important; }
.leaflet-bottom.leaflet-left .leaflet-control-attribution { border-radius: 0 8px 8px 0; margin: 0; }
.pin { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--c); color: #fff; border: 2.5px solid #fff; display: grid; place-items: center; font-weight: 800; font-size: 13.5px; line-height: 1; box-shadow: 0 3px 10px rgba(16, 22, 40, .32); transition: transform .15s; }
.pin.own { border-radius: 11px; font-size: 12px; }
.pin.sel { transform: scale(1.22); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 35%, transparent), 0 6px 16px rgba(16, 22, 40, .35); }
.pin.star::after { content: ''; position: absolute; top: -6px; right: -6px; width: 15px; height: 15px; border-radius: 50%; background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3.5 2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.8l-5.2 2.8 1-5.8-4.3-4.1 5.9-.9Z' fill='%237A4B00'/%3E%3C/svg%3E") center/11px no-repeat; border: 1.5px solid #fff; }
.fpin { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(16, 22, 40, .3); }
.fpin.g, .fpin.l { background: #2459D8; }
.fpin.l { background: #5B7FD9; }
.fpin.c { background: #0B8F63; }
.fpin .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.order-badge { width: 20px; height: 20px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2F80ED; border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(47, 128, 237, .5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 128, 237, .45); } 70% { box-shadow: 0 0 0 14px rgba(47, 128, 237, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 128, 237, 0); } }
.map-tools { position: absolute; right: 12px; bottom: calc(var(--tab-space) + var(--peek-h, 0px)); display: flex; flex-direction: column; gap: 10px; z-index: 500; transition: bottom .2s ease; }
.round-btn { width: 48px; height: 48px; border-radius: 16px; border: 1px solid var(--glass-line); background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text); display: grid; place-items: center; box-shadow: var(--shadow-2); }
.round-btn .ic { width: 22px; height: 22px; }
.round-btn[aria-pressed="true"] { background: var(--park); color: #fff; border-color: transparent; }
.round-btn.accent { background: var(--accent); color: #fff; border-color: transparent; }

.route-banner { position: absolute; left: 12px; right: 74px; top: 62px; z-index: 500; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--glass-line); border-radius: 16px; padding: 8px 8px 8px 14px; box-shadow: var(--shadow-2); display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 14px; }
.route-banner span { flex: 1; }

.peek { position: absolute; left: 12px; right: 12px; bottom: var(--tab-space); z-index: 650; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-3); padding: 14px 14px 14px 16px; animation: pop .2s ease-out; }
@keyframes pop { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.peek-top { display: flex; gap: 12px; align-items: flex-start; }
.peek-main { flex: 1; min-width: 0; }
.peek h3 { font-size: 18px; }
.peek .btn-row { margin-top: 12px; }
.peek .note { margin: 10px 0 0; }

/* ---------- placement mode (eigener Ort) ---------- */
.place-mode { position: absolute; inset: 0; z-index: 600; pointer-events: none; }
.place-pin { position: absolute; left: 50%; top: 50%; width: 40px; height: 52px; transform: translate(-50%, -100%); filter: drop-shadow(0 6px 10px rgba(16, 22, 40, .35)); }
.place-pin::after { content: ''; position: absolute; left: 50%; bottom: -4px; width: 10px; height: 4px; margin-left: -5px; border-radius: 50%; background: rgba(16, 22, 40, .35); }
.place-pin svg { width: 40px; height: 52px; display: block; }
.place-bar { position: absolute; left: 12px; right: 12px; top: 12px; pointer-events: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-3); padding: 12px 14px; }
.place-bar p { margin: 0 0 8px; font-size: 14px; color: var(--text-2); }
.place-bar p b { color: var(--text); font-size: 15.5px; }
.place-actions { display: flex; gap: 8px; align-items: center; }
.place-actions .icon-btn { width: 42px; height: 42px; }
#view-map.placing .map-top, #view-map.placing .peek, #view-map.placing .route-banner { display: none !important; }
#view-map.placing #btn-add, #view-map.placing #btn-fit { display: none; }

/* ---------- badges & tags ---------- */
.num { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; line-height: 1; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); }
.num .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.num.free { --c: var(--surface-3); color: var(--text-2); box-shadow: none; }
.num.lg { width: 52px; height: 52px; font-size: 20px; background: #fff; color: var(--c); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.sub { color: var(--text-2); font-size: 14px; }
.sub.small { font-size: 12.5px; }
.note { color: var(--text-3); font-size: 13px; line-height: 1.45; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.meta:empty { display: none; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); line-height: 1.35; }
.tag .ic { width: 14px; height: 14px; vertical-align: 0; }
.tag.mini { font-size: 11px; padding: 1px 7px; vertical-align: 2px; }
.tag.dog-free, .tag.dog-ok, .tag.open { background: var(--ok-soft); color: var(--ok); }
.tag.dog-ask { background: var(--warn-soft); color: var(--warn); }
.tag.dog-out, .tag.closed { background: var(--bad-soft); color: var(--bad); }
.tag.star { background: var(--sun-soft); color: #8A5A00; }
@media (prefers-color-scheme: dark) { .tag.star { color: #F6C453; } }
.pk { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--park-soft); color: var(--park); line-height: 1.35; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pk .ic { width: 14px; height: 14px; vertical-align: 0; stroke-width: 2.2; }
.pk.ev { background: var(--ev-soft); color: var(--ev); }
.ico-star .ic { width: 15px; height: 15px; color: #E0A400; fill: #FFC93C; stroke-width: 1.6; vertical-align: -2px; }
.ico-heart .ic { width: 15px; height: 15px; color: var(--accent); fill: var(--accent); vertical-align: -2px; }
.inline-ico .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; border: 0; background: var(--surface-2); border-radius: 13px; padding: 0 15px; font-weight: 650; font-size: 14.5px; text-decoration: none; color: var(--text); line-height: 1.2; transition: transform .08s, background .15s, filter .15s; }
.btn .ic { width: 18px; height: 18px; }
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.small { min-height: 34px; padding: 0 11px; font-size: 13.5px; border-radius: 11px; gap: 5px; }
.btn.small .ic { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn-row.tight { margin-top: 8px; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 13px; background: var(--surface-2); color: var(--text); display: grid; place-items: center; flex: none; transition: transform .08s; }
.icon-btn:active { transform: scale(.94); }
.icon-btn.ghost { background: transparent; color: var(--text-2); }
.icon-btn.accent { background: var(--accent); color: #fff; }
.icon-btn.glass { background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.icon-btn.fav[aria-pressed="true"] { background: #fff; color: var(--accent); }
.icon-btn.fav[aria-pressed="true"] .ic { fill: var(--accent); }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 11px; }
.icon-btn.sm .ic { width: 17px; height: 17px; }
.icon-btn:disabled { opacity: .35; }
.link-btn { background: none; border: 0; padding: 0; text-decoration: underline; font-weight: 650; color: var(--brand); font-size: inherit; }

/* ---------- list ---------- */
.list-head { position: sticky; top: 0; z-index: 5; background: var(--bg); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 12px; }
.search-row { display: flex; gap: 8px; margin: 0 14px; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 0 14px; box-shadow: var(--shadow-1); color: var(--text-3); min-width: 0; }
.search input { -webkit-appearance: none; appearance: none; border: 0; border-radius: 0; outline: 0; background: none; flex: 1; padding: 12px 0; font-size: 16px; min-width: 0; color: var(--text); }
.search-row .icon-btn { width: 48px; height: 48px; border-radius: 15px; }
.list { padding: 4px 14px 28px; }
.group-h { margin: 26px 2px 6px; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.group-h::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.group-lead { margin: 0 2px 12px; color: var(--text-2); font-size: 14.5px; }
.sub-h { margin: 16px 2px 8px; font-size: 13px; color: var(--text-3); font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.row { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 12px 12px 12px; margin-bottom: 8px; width: 100%; text-align: left; box-shadow: var(--shadow-1); transition: transform .08s, box-shadow .15s; }
.row:active { transform: scale(.985); }
.row > .ic { color: var(--text-3); width: 18px; height: 18px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-weight: 700; font-size: 15.5px; line-height: 1.25; }
.row-sub { color: var(--text-2); font-size: 13.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.row-meta:empty { display: none; }
.row .dist { font-size: 12.5px; color: var(--text-2); white-space: nowrap; font-weight: 650; }
.row.slim { box-shadow: none; background: var(--surface-2); border-color: transparent; padding: 10px; }
.row.new-row { border-style: dashed; border-color: var(--line-2); box-shadow: none; background: transparent; }
.add-btn { width: 34px; height: 34px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.add-btn .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }

/* ---------- sheet (detail / picker) ---------- */
.sheet { position: fixed; inset: 0; z-index: 1000; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; max-width: 760px; margin: 0 auto; animation: up .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(28px); opacity: .3; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sheet, .peek, .modal { animation: none !important; } }
.sheet-head { background: var(--c); background-image: linear-gradient(155deg, rgba(255, 255, 255, .16), rgba(0, 0, 0, .22)); color: #fff; padding: calc(10px + var(--safe-t)) 14px 34px; }
.sheet-head .bar { display: flex; gap: 8px; align-items: center; }
.title-row { display: flex; gap: 14px; align-items: center; margin-top: 18px; }
.title-row h2 { font-size: 26px; }
.kicker { font-size: 13px; font-weight: 650; opacity: .88; margin-bottom: 3px; }
.sheet-body { position: relative; margin-top: -20px; border-radius: 22px 22px 0 0; background: var(--bg); padding: 16px 14px calc(30px + var(--safe-b)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-1); }
.card h3 { font-size: 16.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.card h3 .ic { color: var(--brand); }
.lead-text { font-size: 15.5px; }
.facts .field { padding: 10px 0; border-top: 1px solid var(--line); }
.facts .field:first-child { border-top: 0; padding-top: 0; }
.facts .field:last-child { padding-bottom: 0; }
.field .k { display: block; font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 2px; }
.hours { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.hours td { padding: 6px 8px; }
.hours td:first-child { font-weight: 700; width: 46px; color: var(--text-2); }
.hours tr.today td { background: var(--brand-soft); font-weight: 700; color: var(--text); }
.hours tr.today td:first-child { border-radius: 10px 0 0 10px; }
.hours tr.today td:last-child { border-radius: 0 10px 10px 0; }
.gframe { width: 100%; height: 360px; border: 0; border-radius: 14px; margin-top: 12px; background: var(--surface-2); }
.foot { text-align: center; margin: 18px 10px 0; }
.fac { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.card h3 + .fac, .fac-sep + .fac { border-top: 0; }
.fac-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fac-main b { font-size: 14.5px; line-height: 1.3; }
.fac-main .sub { font-size: 12.5px; line-height: 1.4; }
.fac-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--park-soft); color: var(--park); }
.fac-ico.c { background: var(--ev-soft); color: var(--ev); }
.fac-ico.lg { width: 44px; height: 44px; border-radius: 13px; }
.fac-sep { margin: 14px 0 2px; font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.picker-head { position: sticky; top: 0; z-index: 3; background: var(--bg); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: calc(10px + var(--safe-t)) 0 0; border-bottom: 1px solid var(--line); }
.picker-head .bar { display: flex; gap: 6px; align-items: center; padding: 0 10px 8px; }
.picker-head h2 { font-size: 19px; }
.picker-head .search { margin: 0 14px; }
.sheet-picker .sheet-body { margin-top: 0; border-radius: 0; }

/* ---------- forms ---------- */
.fld { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-top: 12px; min-width: 0; }
.fld > .lbl { display: block; }
.inp { display: block; width: 100%; margin-top: 6px; min-height: 46px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text); border-radius: 13px; padding: 10px 12px; font-size: 16px; font-weight: 500; outline: 0; transition: border-color .15s, box-shadow .15s; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea.inp { resize: vertical; line-height: 1.4; }
/* Datum & Uhrzeit: iOS/Safari geben diesen Feldern sonst eine eigene Mindestbreite und -höhe */
input.inp[type="date"], input.inp[type="time"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; max-width: 100%; height: 46px; line-height: 24px; text-align: left; overflow: hidden; }
input.inp[type="date"]::-webkit-date-and-time-value, input.inp[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 24px; }
input.inp[type="date"]::-webkit-calendar-picker-indicator, input.inp[type="time"]::-webkit-calendar-picker-indicator { margin-left: auto; opacity: .55; cursor: pointer; }
@media (prefers-color-scheme: dark) { input.inp[type="date"]::-webkit-calendar-picker-indicator, input.inp[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); } }
select.inp { height: 46px; }
select.inp { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237C849D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 34px; }
.fld-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; }
.inp-group { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; }
.inp-group .inp { margin-top: 0; flex: 1 1 auto; min-width: 0; }
.inp-group .btn { min-height: 46px; flex: none; }
.pos-box { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 12px; border-radius: 13px; background: var(--surface-2); font-weight: 600; color: var(--text-2); }
.pos-box.ok { background: var(--ev-soft); color: var(--ev); }
.geo-results { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.geo-results:empty { display: none; }
.geo-hit { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 13px; padding: 10px 12px; }
.geo-hit .ic { color: var(--brand); margin-top: 2px; }
.geo-hit b { display: block; font-size: 14.5px; }
.geo-hit .sub { font-size: 12.5px; }
.ok-t { color: var(--ok); font-weight: 700; }
.bad-t { color: var(--bad); font-weight: 700; }

/* ---------- plan ---------- */
.plan { padding: 6px 14px 28px; }
.plan-hero { padding: 14px 4px 6px; }
.plan-hero h2 { font-size: 26px; }
.plan-hero p { color: var(--text-2); margin: 4px 0 8px; font-size: 14.5px; }
.settings .set-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; }
.settings .fld { margin-top: 0; }
.set-label { margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.toggles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tgl { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 15px; border: 1.5px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--text-2); transition: all .15s; }
.tgl .ic { width: 22px; height: 22px; }
.tgl[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.tgl.wide { flex-direction: row; width: 100%; margin-top: 8px; text-align: left; padding: 10px 12px; gap: 10px; }
.tgl.wide[aria-pressed="true"] { border-color: var(--ev); background: var(--ev-soft); color: var(--ev); }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; margin: 16px 0 12px; box-shadow: var(--shadow-1); overflow: hidden; }
.day-head { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--brand-soft), transparent); }
.day-title { display: flex; flex-direction: column; gap: 4px; }
.day-no { align-self: flex-start; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.day-title h3 { font-size: 20px; }
.day-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fact { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.fact .ic { width: 15px; height: 15px; color: #E07A00; }
.fact.dim { color: var(--text-3); }
.day-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.day-times label { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; font-size: 12px; font-weight: 700; color: var(--text-2); }
.day-times .inp { margin: 0; width: 100%; min-width: 0; height: 42px; min-height: 42px; padding: 6px 10px; font-size: 16px; }
.timeline { position: relative; padding: 14px 14px 4px 14px; }
.timeline::before { content: ''; position: absolute; left: 31px; top: 30px; bottom: 30px; width: 2px; border-radius: 2px; background: var(--line-2); }
.empty-day { color: var(--text-3); font-size: 14px; padding: 6px 0 10px 50px; position: relative; }
.stop { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 6px 0 10px; }
.stop > .num { margin-top: 2px; box-shadow: 0 0 0 4px var(--surface); }
.stop-main { flex: 1; min-width: 0; }
.stop-time { font-size: 12.5px; font-weight: 750; color: var(--text-3); letter-spacing: .02em; }
.stop-name { font-size: 16px; font-weight: 750; line-height: 1.3; }
.stop-name button { border: 0; background: none; padding: 0; text-align: left; font-weight: 750; color: var(--text); }
.stop-ctrl { display: flex; align-items: center; gap: 4px; row-gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.stop-ctrl .icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.stop-ctrl .icon-btn.sm .ic { width: 16px; height: 16px; }
.stepper { display: inline-flex; align-items: center; background: var(--surface-2); border-radius: 11px; height: 32px; flex: none; }
.stepper button { width: 32px; height: 32px; border: 0; background: none; display: grid; place-items: center; color: var(--text-2); }
.stepper button .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.stepper span { min-width: 52px; text-align: center; font-size: 13px; font-weight: 750; white-space: nowrap; }
.stepper.changed { background: var(--sun-soft); }
.msg { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 10px; margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.msg .ic { width: 16px; height: 16px; }
.msg.warn { background: var(--warn-soft); color: var(--warn); }
.msg.bad { background: var(--bad-soft); color: var(--bad); }
.msg.good { background: var(--ok-soft); color: var(--ok); }
.leg { position: relative; margin: 0 0 6px 48px; }
.leg-line { display: flex; align-items: center; gap: 6px; }
.leg-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 10px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--text-2); flex: 0 1 auto; min-width: 0; }
.leg-btn b { color: var(--text); font-weight: 750; }
.leg-ico .ic { width: 18px; height: 18px; color: var(--brand); vertical-align: -4px; }
.leg-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.leg-btn .chev .ic { width: 16px; height: 16px; transition: transform .2s; vertical-align: -3px; }
.leg.open .leg-btn .chev .ic { transform: rotate(180deg); }
.leg.open .leg-btn { border-color: var(--brand); background: var(--brand-soft); }
.badge { font-size: 11px; font-weight: 750; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.auto { background: var(--ok-soft); color: var(--ok); }
.badge.slow { background: var(--warn-soft); color: var(--warn); }
.leg-route { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); flex: none; }
.leg-route .ic { width: 16px; height: 16px; }
.leg-park { display: flex; align-items: center; gap: 6px; margin: 5px 0 0 6px; font-size: 12.5px; color: var(--text-2); }
.leg-park .ic { width: 15px; height: 15px; color: var(--park); }
.leg-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.lopt { display: grid; grid-template-columns: auto minmax(0, 1fr); min-width: 0; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: 14px; padding: 8px 10px; }
.lopt .ic { grid-row: 1 / 3; width: 20px; height: 20px; color: var(--brand); }
.lopt span { font-weight: 750; font-size: 14px; }
.lopt small { color: var(--text-3); font-size: 11.5px; font-weight: 600; }
.lopt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.lopt:disabled { opacity: .45; }
.sunline { position: relative; margin: 2px 0 10px 48px; padding: 6px 12px; border-radius: 12px; background: linear-gradient(90deg, #FFE7A8, #FFC8A0); color: #7A3E00; font-size: 13px; font-weight: 750; display: inline-flex; gap: 6px; align-items: center; }
.sunline .ic { width: 16px; height: 16px; }
.daybar { padding: 12px 16px 4px; border-top: 1px solid var(--line); }
.track { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.track .stay { background: var(--brand); }
.track .move { background: var(--brand-2); opacity: .45; }
@supports (background: color-mix(in srgb, red 50%, blue)) { .track .move { opacity: 1; background: color-mix(in srgb, var(--brand) 40%, var(--surface-2)); } }
.track .over { background: var(--bad); }
.verdict { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 14px; }
.daybar .note { margin: 4px 0 6px; }
.day-actions { padding: 4px 16px 16px; margin-top: 8px; }

/* ---------- info ---------- */
.info { padding: 14px 14px 28px; }
.hero { display: flex; gap: 16px; align-items: center; padding: 8px 4px 18px; }
.hero img { width: 88px; height: 88px; border-radius: 24px; box-shadow: var(--shadow-2); flex: none; }
.hero h2 { font-size: 24px; }
.hero .sub { margin: 4px 0 0; }
.info ul { padding-left: 20px; margin: 8px 0; }
.info li { margin: 4px 0; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 6px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 7px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.trip td { background: var(--sun-soft); }
.sun-tbl td:first-child { white-space: nowrap; }
.tbl tr.today td { font-weight: 800; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 12, 22, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; align-items: end; justify-items: center; }
.modal { width: 100%; max-width: 560px; max-height: 90vh; max-height: 90dvh; overflow-y: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding: 20px 18px calc(18px + var(--safe-b)); box-shadow: var(--shadow-3); animation: up .22s cubic-bezier(.2, .8, .2, 1); }
.modal h3 { font-size: 20px; margin-bottom: 4px; }
.modal-actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.opt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.opt-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 15px; border: 1.5px solid var(--line-2); background: var(--surface); }
.opt-btn b { font-size: 15px; }
.opt-btn .sub { font-size: 13px; }
.opt-btn:active { border-color: var(--brand); background: var(--brand-soft); }
.share-box { display: flex; align-items: center; gap: 10px; min-height: 46px; margin-top: 12px; padding: 0; color: var(--text-2); font-weight: 600; }
.share-box .inp { margin: 0; font-size: 16px; font-weight: 600; color: var(--brand); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
#share-note:empty { display: none; }

/* ---------- toast & install ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-space) + 4px); transform: translateX(-50%); z-index: 3000; background: #151A2E; color: #fff; padding: 11px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-3); max-width: calc(100% - 32px); width: max-content; text-align: center; animation: pop .2s ease-out; }
@media (prefers-color-scheme: dark) { .toast { background: #EEF0F7; color: #141A2E; } }
.modal-backdrop:not([hidden]) ~ .toast { bottom: auto; top: calc(14px + var(--safe-t)); }
.install { position: fixed; left: 12px; right: 12px; bottom: var(--tab-space); z-index: 1500; max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-3); padding: 14px; display: flex; gap: 12px; align-items: flex-start; animation: pop .25s ease-out; }
.install img { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.install h3 { font-size: 16px; }
.install p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.install .btn-row { margin-top: 10px; }
.ios-step { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--text); }

/* ---------- große Displays: Karte links, Bedienung rechts ---------- */
@media (min-width: 600px) {
  :root { --panel: clamp(360px, 43vw, 560px); }
  #app { max-width: none; }
  .topbar { padding-left: 20px; }
  #view-map, #view-map[hidden] { display: block !important; right: var(--panel); }
  .view[data-view="list"], .view[data-view="plan"], .view[data-view="info"] { left: auto; width: var(--panel); border-left: 1px solid var(--line); background: var(--bg); }
  .tabbar { left: auto; right: 12px; width: calc(var(--panel) - 24px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tabbar button[data-tab="map"] { display: none; }
  #view-map .map-tools { bottom: 18px; }
  #view-map .peek { right: auto; width: min(460px, calc(100% - 86px)); bottom: 18px; }
  .leaflet-bottom.leaflet-left { margin-bottom: 0; }
  .sheet { left: auto; right: 0; width: var(--panel); max-width: none; margin: 0; border-left: 1px solid var(--line); box-shadow: var(--shadow-3); }
  .install, .toast { left: auto; right: 12px; margin: 0; transform: none; max-width: calc(var(--panel) - 24px); }
  .toast { width: auto; }
  .modal-backdrop { align-items: center; }
  .modal { border-radius: 26px; padding-bottom: 20px; }
  .leg-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
