/* Streifzug — kitty.michel.to
   Farbwelt: Flechte und Nachtgarten als ruhiger Grund; die beiden Katzen tragen
   die einzigen kraeftigen Farben (Ahri Bernstein wie Fuchsfeuer, Izzy Mondviolett
   wie Izanami). Alles andere bleibt leise, damit man sie auf einen Blick findet. */

@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(/fonts/figtree.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --ground: #E6EAE2;
  --surface: #F7F8F3;
  --raised: #FDFDFA;
  --ink: #1C2723;
  --ink-2: #4A5852;
  --muted: #6F7C76;
  --line: #D7DDD3;
  --line-2: #E6EAE2;
  --moss: #2E6A56;
  --moss-ink: #F4F7F2;
  --c0: #C8761E;
  --c1: #7462C4;
  --c0-wash: rgba(200, 118, 30, .12);
  --c1-wash: rgba(116, 98, 196, .12);
  --warn: #B4471F;
  --shadow: 0 1px 0 rgba(28, 39, 35, .04), 0 10px 30px -12px rgba(28, 39, 35, .28);
  --tile-filter: grayscale(1) sepia(.22) hue-rotate(45deg) saturate(1.25) brightness(1.07) contrast(.84);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-s: 10px; --r-m: 16px; --r-l: 26px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --tabbar: 62px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #111917; --surface: #172120; --raised: #1D2927; --ink: #E7EBE3; --ink-2: #B6C1BA;
    --muted: #8B9892; --line: #2B3734; --line-2: #222D2B; --moss: #86C3AA; --moss-ink: #0E1715;
    --c0: #C98236; --c1: #8B78D6; --c0-wash: rgba(201, 130, 54, .16); --c1-wash: rgba(139, 120, 214, .16);
    --warn: #E37C55;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 34px -12px rgba(0, 0, 0, .7);
    --tile-filter: grayscale(1) invert(1) sepia(.3) hue-rotate(110deg) saturate(.9) brightness(.78) contrast(.92);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #111917; --surface: #172120; --raised: #1D2927; --ink: #E7EBE3; --ink-2: #B6C1BA;
  --muted: #8B9892; --line: #2B3734; --line-2: #222D2B; --moss: #86C3AA; --moss-ink: #0E1715;
  --c0: #C98236; --c1: #8B78D6; --c0-wash: rgba(201, 130, 54, .16); --c1-wash: rgba(139, 120, 214, .16);
  --warn: #E37C55;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 34px -12px rgba(0, 0, 0, .7);
  --tile-filter: grayscale(1) invert(1) sepia(.3) hue-rotate(110deg) saturate(.9) brightness(.78) contrast(.92);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--ground); color: var(--ink); font: 400 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
svg { display: block; }
.c0 { --c: var(--c0); --wash: var(--c0-wash); }
.c1 { --c: var(--c1); --wash: var(--c1-wash); }
.head-ring { fill: none; stroke: var(--ring, var(--surface)); stroke-width: 6; stroke-linejoin: round; }
.head-fill { fill: var(--c); stroke: var(--c); stroke-width: 1.5; stroke-linejoin: round; }

/* ---------- Anmeldung ---------- */
.gate { min-height: 100%; display: grid; place-items: center; padding: calc(24px + var(--sat)) 22px calc(24px + var(--sab));
  background: radial-gradient(120% 70% at 50% 0%, var(--surface), var(--ground)); }
.gate-card { width: min(360px, 100%); }
.gate-mark { width: 120px; height: 80px; margin: 0 0 22px -4px; --ring: var(--ground); }
.gate-title { font: 600 44px/1 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 96; letter-spacing: -.02em; margin: 0; }
.gate-sub { color: var(--ink-2); margin: 10px 0 30px; font-size: 16px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.field input { width: 100%; font: 400 17px var(--sans); color: var(--ink); padding: 13px 14px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--raised); outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus { border-color: var(--moss); box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 22%, transparent); }
.gate-err { min-height: 20px; color: var(--warn); font-size: 14px; margin: 4px 0 10px; }
.btn-primary { width: 100%; padding: 14px; border-radius: var(--r-s); background: var(--moss); color: var(--moss-ink);
  font-weight: 600; font-size: 16px; transition: transform .1s, filter .15s; }
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { filter: saturate(.3) opacity(.7); }

/* ---------- Grundgeruest ---------- */
.app { position: fixed; inset: 0; }
/* iOS-Homescreen-App (iOS 26): innerHeight ist um die obere Safe-Area zu kurz -> Hoehe per JS aus screen.height (theme.js) */
/* iOS-Homescreen-App mit black-translucent: WebView endet um die obere Safe-Area zu frueh
   (gemessen Manu 02.10.: screenH 956, innerH 894, sat 62). Ein um sat hoeheres Dokument zwingt iOS,
   die WebView bis ganz unten zu ziehen. */
html.ios-standalone { min-height: calc(100% + env(safe-area-inset-top)); }
.map { position: absolute; inset: 0; background: var(--ground); }
.leaflet-container { background: var(--ground); font-family: var(--sans); }
.leaflet-tile-pane { filter: var(--tile-filter); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--muted) !important;
  font-size: 10px; border-radius: 8px 0 0 0; padding: 1px 6px !important; backdrop-filter: blur(6px); }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.leaflet-control-zoom { display: none; }

.map-top { position: absolute; z-index: 500; top: calc(12px + var(--sat)); left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: var(--shadow); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.live .pill-dot { background: var(--moss); box-shadow: 0 0 0 0 color-mix(in srgb, var(--moss) 60%, transparent); animation: beat 2.4s infinite; }
.pill.off .pill-dot { background: var(--warn); }
@keyframes beat { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--moss) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.map-tools { display: flex; flex-direction: column; gap: 8px; }
.tool { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow); color: var(--ink); transition: transform .12s; }
.tool:active { transform: scale(.94); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool-ghost { background: none; box-shadow: none; backdrop-filter: none; color: var(--muted); width: 36px; height: 36px; }

/* ---------- Seitenleiste / Blatt ---------- */
.panel { position: absolute; z-index: 600; background: var(--surface); display: flex; flex-direction: column; }
.brand { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 22px 22px 14px; }
.brand-mark { width: 54px; height: 36px; --ring: var(--surface); }
.brand-title { font: 600 26px/1 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 72; letter-spacing: -.015em; margin: 0; }
.brand-sub { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); margin: 4px 22px 6px; padding: 4px; border-radius: 13px;
  background: var(--line-2); position: relative; }
.seg button { padding: 8px 0; border-radius: 10px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); transition: background .2s, color .2s; }
.seg button[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }

.views { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 6px 22px 28px; scrollbar-width: thin; }
.view { animation: viewin .28s ease both; }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } }

/* Katzen (Live) */
.cats { display: grid; gap: 0; }
.cat { padding: 18px 0; border-bottom: 1px solid var(--line); }
.cat-hit { display: grid; grid-template-columns: 52px 1fr auto; gap: 4px 14px; align-items: center; text-align: left; width: 100%; }
.cat:last-child { border-bottom: 0; }
.cat-av { grid-row: span 2; width: 52px; height: 58px; position: relative; }
.cat-av svg { width: 52px; height: 58px; --ring: var(--surface); }
.cat-av b { position: absolute; left: 0; right: 0; top: 23px; text-align: center; font: 600 19px/1 var(--serif);
  font-variation-settings: "SOFT" 100; color: #fff; }
.cat-name { font: 600 24px/1.05 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 48; letter-spacing: -.01em; }
.cat-ago { font-size: 13px; color: var(--muted); justify-self: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-where { grid-column: 2 / 4; font-size: 15px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cat-where strong { color: var(--ink); font-weight: 600; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-weight: 500; }
.cat-meta { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.meta-k { display: block; font-size: 12px; color: var(--muted); }
.meta-v { display: flex; font-size: 17px; font-weight: 600; margin-top: 1px; white-space: nowrap; }
.meta-v small { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.batt { display: flex; align-items: center; gap: 8px; }
.batt-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; max-width: 64px; }
.batt-bar i { display: block; height: 100%; border-radius: 3px; background: var(--moss); }
.batt.low .batt-bar i { background: var(--warn); }
.footnote { font-size: 12px; color: var(--muted); margin: 14px 0 0; }

/* Tracker-ID und Live */
.cat-id { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.cat-id span { font-variant-numeric: tabular-nums; letter-spacing: .06em; color: var(--ink-2); font-weight: 500; }
.live-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
.live-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 11px; border-radius: 999px;
  border: 1.5px solid var(--c); color: var(--ink); font-weight: 600; font-size: 14px; background: var(--wash); transition: transform .1s; }
.live-btn:active { transform: scale(.97); }
.live-btn svg { width: 18px; height: 18px; fill: none; stroke: var(--c); stroke-width: 1.9; stroke-linecap: round; }
.live-btn svg circle { fill: var(--c); stroke: none; }
.live-hint { flex: 1 1 180px; font-size: 12px; color: var(--muted); line-height: 1.35; }
.live-note { flex-basis: 100%; font-size: 12px; color: var(--muted); }
.live-state { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; color: var(--ink); }
.live-state i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.live-state.on i { animation: livebeat 1.6s infinite; }
.live-state.pending { color: var(--ink-2); font-weight: 500; font-size: 14px; }
.live-state.pending i { background: none; border: 2px solid var(--c); border-right-color: transparent; animation: spin 1s linear infinite; }
.live-left { font-variant-numeric: tabular-nums; font-weight: 500; color: var(--ink-2); }
.live-acts { display: inline-flex; gap: 6px; margin-left: auto; }
.live-acts button { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; border: 1px solid var(--line); color: var(--ink-2); }
.live-acts .live-stop { color: var(--ink); }
.live-row button:disabled { opacity: .55; }
@keyframes livebeat { 0% { box-shadow: 0 0 0 0 var(--c); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Gesundheit */
.h-head { margin-bottom: 6px; }
.h-block { padding: 18px 0 6px; border-top: 1px solid var(--line); }
.h-head + .h-block { border-top: 0; padding-top: 6px; }
.h-title { font: 600 16px/1.25 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 24; margin: 0 0 10px; }
.h-goal { display: flex; align-items: baseline; gap: 10px; }
.h-big { font: 600 44px/1 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 96; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.h-of { color: var(--ink-2); font-size: 15px; }
.h-pct { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.meter-l { height: 10px; border-radius: 5px; margin: 10px 0 22px; }
.stackbar { display: flex; gap: 2px; height: 14px; margin-bottom: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.stackbar i { display: block; min-width: 3px; }
.stackbar + .h-note { margin: 0 0 12px; }
.s0 { background: var(--c); fill: var(--c); }
.s1 { background: color-mix(in srgb, var(--c) 62%, var(--surface)); fill: color-mix(in srgb, var(--c) 62%, var(--surface)); }
.s2 { background: color-mix(in srgb, var(--c) 30%, var(--surface)); fill: color-mix(in srgb, var(--c) 30%, var(--surface)); }
.sleep-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 14px; }
.sleep-legend span { display: inline-flex; align-items: center; gap: 7px; }
.sleep-legend i { width: 10px; height: 10px; border-radius: 3px; }
.sleep-legend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.vitals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.vital { padding: 14px 14px 12px; border-radius: var(--r-m); background: var(--raised); border: 1px solid var(--line); }
.vital-k { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.vital-v { font: 600 26px/1.15 var(--serif); font-variation-settings: "SOFT" 100; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.vital-v small { font: 500 12px var(--sans); color: var(--muted); }
.vital-s { font-size: 12.5px; color: var(--ink-2); }
.vital-wait .vital-v { color: var(--muted); }
.vital-wait .vital-s::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px;
  border: 1.5px solid var(--muted); border-right-color: transparent; vertical-align: 0; animation: spin 1.4s linear infinite; }
.h-note { font-size: 12.5px; color: var(--muted); margin: 6px 0 10px; line-height: 1.4; }
.h-alert { display: flex; align-items: center; gap: 10px; font-size: 14.5px; margin: 0 0 12px; color: var(--ink-2); }
.h-alert svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--moss); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.h-alert.has { color: var(--ink); font-weight: 500; }
.h-alert.has svg { stroke: var(--warn); }
.chart .goal { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .goal-l { fill: var(--ink-2); }
.chart .nodata { stroke: var(--line); stroke-width: 2; stroke-linecap: round; }
.chips-cats .chip[aria-checked="true"] { background: var(--wash); color: var(--ink); border-color: var(--c); }

/* Filter */
.filters { display: grid; gap: 12px; margin: 8px 0 18px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2);
  border: 1px solid var(--line); background: transparent; transition: background .15s, color .15s, border-color .15s; display: inline-flex; align-items: center; gap: 7px; }
.chip[aria-checked="true"], .chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface); }
.chips-cats .chip[aria-pressed="true"] { background: var(--wash); color: var(--ink); border-color: var(--c); }
.chip-date svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.chip input[type="date"] { border: 0; background: none; font: inherit; color: inherit; padding: 0; width: 118px; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--raised);
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--moss); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--moss); outline-offset: 2px; }

/* Zeitreise */
.scrub { padding: 14px 16px 10px; border-radius: var(--r-m); background: var(--raised); border: 1px solid var(--line); margin-bottom: 18px; }
.scrub-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.scrub-label { font: 600 16px var(--serif); font-variation-settings: "SOFT" 100; }
.scrub time { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.scrub input { width: 100%; appearance: none; -webkit-appearance: none; background: transparent; height: 28px; margin: 0; }
.scrub input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line); }
.scrub input::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; margin-top: -9px;
  background: var(--raised); border: 2px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.scrub input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--raised); border: 2px solid var(--ink); }
.scrub-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.hist-sum { display: grid; gap: 10px; }
.sum-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: baseline; font-size: 15px; }
.sum-row .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); align-self: center; }
.sum-row b { font-weight: 600; }
.sum-row span:last-child { color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Statistik */
.cmp { width: 100%; border-collapse: collapse; margin-bottom: 26px; font-variant-numeric: tabular-nums; }
.cmp th { font-weight: 500; font-size: 13px; color: var(--muted); text-align: left; padding: 0 0 8px; }
.cmp th.catcol { text-align: right; color: var(--ink); font: 600 17px var(--serif); font-variation-settings: "SOFT" 100; }
.cmp th.catcol i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 7px; vertical-align: 1px; }
.cmp td { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.cmp td:not(:first-child) { text-align: right; font-weight: 600; font-size: 17px; }
.cmp td small { font-weight: 500; font-size: 13px; color: var(--ink-2); }
.sec-title { font: 600 19px/1.2 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 36; margin: 0 0 4px; }
.sec-sub { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.chart { margin-bottom: 28px; position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 500 11px var(--sans); font-variant-numeric: tabular-nums; }
.chart .hit { fill: transparent; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 4px; border-radius: 2px; background: var(--c); }
.legend i.sq { width: 10px; height: 10px; border-radius: 3px; }
.empty { color: var(--muted); font-size: 14px; padding: 14px 0 18px; }
.places { list-style: none; margin: 0 0 26px; padding: 0; }
.places li { border-top: 1px solid var(--line); }
.places button { width: 100%; display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; text-align: left; font-size: 15px; }
.places .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.places small { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 4px; background: var(--wash); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--c); }
.act { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 26px; }
.act-k { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.act-k i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.act-v { font-size: 20px; font-weight: 600; margin-top: 2px; }
.act-v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.act-s { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Tooltip */
.tip { position: fixed; z-index: 2000; pointer-events: none; background: var(--ink); color: var(--surface); font-size: 12.5px;
  padding: 7px 10px; border-radius: 9px; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.tip b { font-weight: 600; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 6px; box-shadow: 0 0 0 1.5px var(--surface); }

/* Tab-Leiste (mobil) */
.tabbar { display: none; }

/* ---------- Kartenmarker ---------- */
.mk { position: relative; width: 48px; height: 54px; }
.mk svg { width: 48px; height: 54px; position: relative; z-index: 2; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); --ring: var(--surface); }
.mk b { position: absolute; z-index: 3; left: 0; right: 0; top: 22px; text-align: center; color: #fff; font: 600 18px/1 var(--serif); font-variation-settings: "SOFT" 100; }
.mk .pulse { position: absolute; z-index: 1; left: 50%; top: 58%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: var(--c); opacity: 0; }
.mk.live .pulse { animation: pulse 2.6s cubic-bezier(.2,.6,.3,1) infinite; }
.mk.live .pulse + .pulse { animation-delay: 1.3s; }
@keyframes pulse { 0% { transform: scale(.7); opacity: .45; } 100% { transform: scale(2.4); opacity: 0; } }
.mk.stale svg { filter: grayscale(.65) drop-shadow(0 3px 5px rgba(0,0,0,.2)); opacity: .82; }
.mk-tag { position: absolute; z-index: 3; top: 52px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 600 11.5px var(--sans);
  padding: 2px 8px; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.home-mk { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--moss);
  box-shadow: 0 3px 8px rgba(0,0,0,.18); }
.home-mk svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ghost-mk { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 3px solid var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.leaflet-div-icon { background: none; border: 0; }

.today { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.today:empty { display: none; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .panel { left: 0; top: 0; bottom: 0; width: 420px; border-right: 1px solid var(--line); box-shadow: 8px 0 30px -20px rgba(0,0,0,.35); }
  .map { left: 420px; }
  .map-top { left: 436px; top: 16px; right: 16px; }
  .grip { display: none; }
  .brand { padding: 30px 28px 18px; }
  .seg { margin: 0 28px 8px; }
  .views { padding: 10px 28px 36px; }
  .cat { padding: 20px 0; }
  .chips { flex-wrap: wrap; overflow: visible; }
}

/* ---------- Mobil: Vollbildkarte + Blatt ---------- */
@media (max-width: 899px) {
  html, body { background: var(--surface); }
  .panel { left: 0; right: 0; bottom: 0; height: calc(100% - var(--sat) - 70px);
    border-radius: var(--r-l) var(--r-l) 0 0; box-shadow: 0 -10px 40px -16px rgba(0,0,0,.4);
    padding-bottom: calc(var(--tabbar) + max(var(--sab) - 18px, 4px));
    transform: translateY(var(--sheet-y, 60%)); transition: transform .42s cubic-bezier(.2,.9,.25,1); will-change: transform; touch-action: none; }
  .panel.dragging { transition: none; }
  .grip { display: grid; place-items: center; height: 22px; cursor: grab; touch-action: none; }
  .grip span { width: 38px; height: 5px; border-radius: 3px; background: var(--line); }
  .brand { display: none; }
  .seg { display: none; }
  .views { padding: 2px 20px 24px; touch-action: none; }
  .panel.at-full .views { touch-action: pan-y; }
  .panel .views { transition: opacity .25s; }
  .panel.at-mini:not(.dragging) .views { opacity: 0; pointer-events: none; }
  .map-top { left: 12px; right: 12px; }
  .desk-only { display: none; }
  .cat { padding: 14px 0; }
  .cat-hit { grid-template-columns: 44px 1fr auto; gap: 2px 12px; }
  .cat-av, .cat-av svg { width: 44px; height: 50px; }
  .cat-av b { top: 20px; font-size: 17px; }
  .cat-name { font-size: 21px; }
  .cat-where { font-size: 14px; }
  .cat-meta { margin-top: 10px; }
  .meta-v { font-size: 15px; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: absolute; z-index: 700; left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar) + max(var(--sab) - 18px, 4px)); padding-bottom: max(var(--sab) - 18px, 4px);
    box-shadow: 0 120px 0 0 var(--surface); /* fuellt evtl. Restspalt unter der Leiste */
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
    border-top: 1px solid var(--line); }
  .tabbar button { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button[aria-selected="true"] { color: var(--ink); }
  .tabbar button[aria-selected="true"] svg { stroke: var(--moss); }
  .leaflet-bottom { bottom: calc(var(--tabbar) + max(var(--sab) - 18px, 4px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Eigener Standort (me.js) ---------- */
.map-tools .tool.on { color: #2F7CF6; }
.me-dot { width: 22px; height: 22px; border-radius: 50%; background: #2F7CF6; border: 3.5px solid #fff;
  box-shadow: 0 0 0 0 rgba(47,124,246,.45), 0 2px 8px rgba(0,0,0,.3); animation: me-beat 2.2s infinite; }
@keyframes me-beat { 0% { box-shadow: 0 0 0 0 rgba(47,124,246,.45), 0 2px 8px rgba(0,0,0,.3); } 100% { box-shadow: 0 0 0 16px rgba(47,124,246,0), 0 2px 8px rgba(0,0,0,.3); } }
.me-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 10px 12px;
  border-radius: 14px; background: color-mix(in srgb, var(--c) 10%, transparent); }
.me-txt { font-size: 14px; color: var(--ink-2); }
.me-txt b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.me-go { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: var(--c); color: #fff;
  font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.me-go svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.me-go:active { transform: scale(.97); }
/* Suchmodus (me.js) */
.seek { position: fixed; z-index: 1500; left: 12px; right: 12px; top: calc(12px + var(--sat)); }
.seek-card { max-width: 440px; margin: 0 auto; padding: 14px 16px 14px; border-radius: 22px; background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); box-shadow: var(--shadow); }
.seek-head { display: flex; justify-content: space-between; align-items: center; }
.seek-name { font: 600 19px var(--serif); color: var(--ink); }
.seek-x { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); font-size: 16px; }
.seek-body { display: flex; align-items: center; gap: 18px; margin: 8px 0 12px; }
.seek-dial { position: relative; flex: none; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 12%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 35%, transparent); }
.seek-n { position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -6px; font: 700 12px var(--sans); color: var(--muted); transition: transform .25s; }
.seek-arrow { width: 66px; height: 66px; fill: var(--c); transition: transform .3s cubic-bezier(.2,.8,.3,1); filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.seek.near .seek-dial { animation: me-beat 1.4s infinite; }
.seek-dist { font: 600 40px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.seek-dir { font-size: 16px; color: var(--ink-2); margin-top: 6px; font-weight: 500; }
.seek-hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.35; }
.seek-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.seek-live { padding: 10px 16px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 600; font-size: 14px; }
.seek-live:disabled { opacity: .7; }
.seek-ext { font-size: 13.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
body.seeking .map-top { visibility: hidden; }
.seek-sub { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.seek-sub:empty { display: none; }
