/* Dieselben Farben, Maße und Schriften wie die Android-App (PanoptesFarben.kt, App.kt). */
@font-face { font-family: 'Sora'; font-display: swap; font-weight: 100 800; src: url('schriften/sora-latin-wght.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+2013-2014, U+2018-2022, U+2026, U+20AC, U+2192; }
@font-face { font-family: 'Sora'; font-display: swap; font-weight: 100 800; src: url('schriften/sora-latin-ext-wght.woff2') format('woff2');
    unicode-range: U+0100-02FF; }
@font-face { font-family: 'Manrope'; font-display: swap; font-weight: 200 800; src: url('schriften/manrope-latin-wght.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+2013-2014, U+2018-2022, U+2026, U+20AC, U+2192; }
@font-face { font-family: 'Manrope'; font-display: swap; font-weight: 200 800; src: url('schriften/manrope-latin-ext-wght.woff2') format('woff2');
    unicode-range: U+0100-02FF; }

:root {
    color-scheme: dark;
    --grund: #071A2B; --karte: rgba(255, 255, 255, .043); --karte2: #133248; --linie: rgba(160, 230, 240, .14);
    --tinte: #EAF6F8; --tinte2: #A9C7CE; --tinte3: #6E8E97;
    --aqua: #5FD6E6; --limette: #B5F23D; --limette-tinte: #1D2A00; --warn: #FFC266; --koralle: #FF8A6B;
    --pegel-a: rgba(11, 92, 102, .45); --pegel-b: rgba(10, 34, 56, .35);
    --leiste: rgba(4, 16, 27, .88); --schleier: rgba(4, 16, 27, .7); --blatt: #0F2B40;
    --tab-an-a: rgba(95, 214, 230, .18); --tab-an-b: rgba(95, 214, 230, .06);
    --kopf: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    --text: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}
/* Hell: wie das Handy (auto) oder fest aus dem Auto bzw. „nur auf diesem Gerät“ (data-thema, darstellung.js) */
@media (prefers-color-scheme: light) {
    :root:not([data-thema="dunkel"]) {
        color-scheme: light;
        --grund: #EEF6F8; --karte: rgba(255, 255, 255, .75); --karte2: #E0EDF1; --linie: rgba(10, 34, 56, .1);
        --tinte: #0A2238; --tinte2: #3A5862; --tinte3: #5F7C86;
        --aqua: #00758A; --limette: #B5F23D; --limette-tinte: #1D2A00; --warn: #9A5B00; --koralle: #B3361B;
        --pegel-a: rgba(11, 92, 102, .14); --pegel-b: rgba(255, 255, 255, .7);
        --leiste: rgba(246, 251, 252, .92); --schleier: rgba(10, 34, 56, .4); --blatt: #F6FBFC;
        --tab-an-a: rgba(0, 117, 138, .16); --tab-an-b: rgba(0, 117, 138, .05);
    }
}
:root[data-thema="hell"] {
    color-scheme: light;
    --grund: #EEF6F8; --karte: rgba(255, 255, 255, .75); --karte2: #E0EDF1; --linie: rgba(10, 34, 56, .1);
    --tinte: #0A2238; --tinte2: #3A5862; --tinte3: #5F7C86;
    --aqua: #00758A; --limette: #B5F23D; --limette-tinte: #1D2A00; --warn: #9A5B00; --koralle: #B3361B;
    --pegel-a: rgba(11, 92, 102, .14); --pegel-b: rgba(255, 255, 255, .7);
    --leiste: rgba(246, 251, 252, .92); --schleier: rgba(10, 34, 56, .4); --blatt: #F6FBFC;
    --tab-an-a: rgba(0, 117, 138, .16); --tab-an-b: rgba(0, 117, 138, .05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--grund); color: var(--tinte); font: 500 16px/1.4 var(--text); }
.vorrat { position: absolute; }
main {
    max-width: 30rem; margin: 0 auto;
    padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(112px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.kopf-text { flex: 1; min-width: 0; }
.kopf-text p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header img { border-radius: 12px; display: block; }
h1 { font: 700 21px/1.2 var(--kopf); margin: 0; }
h2 { font: 600 18px/1.3 var(--kopf); margin: 0 0 8px; }
h3 { font: 600 12px/1.3 var(--kopf); letter-spacing: .1em; text-transform: uppercase; color: var(--tinte3); margin: 0 0 8px; }
p { margin: 0; }
ol { padding-left: 1.3rem; margin: 10px 0; }
li { margin: 8px 0; color: var(--tinte2); }
.klein { font-size: 12.5px; color: var(--tinte2); }
.mitte { text-align: center; }
.warn { color: var(--warn); margin-top: 8px; }
.sym { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

button {
    display: block; width: 100%; min-height: 50px; padding: 10px 14px; margin-top: 10px;
    font: 600 15px/1.2 var(--text); color: var(--tinte); background: var(--karte2);
    border: 1px solid var(--linie); border-radius: 16px; cursor: pointer;
}
button.haupt { background: var(--limette); color: var(--limette-tinte); border-color: transparent; min-height: 56px; }
button.leise { background: none; border: 0; color: var(--tinte2); font-weight: 500; }
button:disabled { opacity: .45; }
button[aria-pressed="true"] { border-color: var(--limette); color: var(--tinte); box-shadow: inset 0 0 0 1px var(--limette); }

.pille {
    display: inline-flex; align-items: center; gap: 7px; width: auto; min-height: 34px; margin: 0; padding: 6px 12px;
    font: 600 12.5px/1 var(--text); color: var(--tinte2); background: var(--karte); border: 1px solid var(--linie); border-radius: 999px;
}
.pille i, .lage i { width: 8px; height: 8px; border-radius: 50%; background: var(--tinte3); flex: none; }
.pille[data-ton="gut"] i { background: var(--aqua); }
.pille[data-ton="scharf"] i { background: var(--limette); }
.pille[data-ton="warn"] i { background: var(--warn); }

.pegel {
    display: flex; gap: 16px; align-items: center; padding: 18px; margin-bottom: 12px; border-radius: 20px;
    background: linear-gradient(135deg, var(--pegel-a), var(--pegel-b)); border: 1px solid var(--linie);
}
.wasser {
    position: relative; flex: none; width: 132px; height: 168px; overflow: hidden;
    border-radius: 66px 66px 28px 28px; background: rgba(4, 16, 27, .55); border: 1px solid rgba(95, 214, 230, .25);
}
.fuellung { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(#43C9DB, #0B5C66); transition: height .6s ease; }
.welle { position: absolute; left: 0; bottom: 100%; margin-bottom: -1px; width: 200%; height: 12px; display: block; fill: #43C9DB; animation: welle 6s linear infinite; }
.welle.w2 { fill: rgba(67, 201, 219, .45); height: 15px; animation-duration: 9s; animation-direction: reverse; }
@keyframes welle { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .welle { animation: none; } }
.wasser-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #EAF6F8; text-align: center; padding: 0 8px; }
.prozent { font: 700 38px/1 var(--kopf); }
.prozent small { font-size: 18px; }
.prozent.leer { font: 500 14px/1.3 var(--text); color: #A9C7CE; }
.kwh { font-size: 11.5px; line-height: 14px; margin-top: 4px; opacity: .88; }
.pegel-rechts { min-width: 0; flex: 1; }
.lage { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tinte2); }
.lage i { background: var(--limette); }
.lage[data-ton="warn"] i { background: var(--warn); }
.km { font: 700 44px/1 var(--kopf); margin-top: 6px; }
.km small { font: 600 18px/1 var(--kopf); color: var(--tinte2); margin-left: 5px; }
.km-zeile { font-size: 12.5px; color: var(--tinte2); margin-top: 4px; }
.chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chip { font-size: 11.5px; font-weight: 600; color: var(--tinte2); padding: 5px 9px; background: var(--karte); border: 1px solid var(--linie); border-radius: 999px; white-space: nowrap; }

.kachel { background: var(--karte); border: 1px solid var(--linie); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.hinweise summary { text-align: left; }
.hinweise p { margin-top: 8px; }
.hinweise a { color: var(--aqua); }
.wert { font: 700 24px/1.2 var(--kopf); margin-bottom: 4px; }
.autobild { display: block; height: 118px; max-width: 100%; margin: 0 auto 4px; }
.raster { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.aktion {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 92px; margin: 0; padding: 8px; font-size: 14px; color: var(--tinte); min-width: 0;
}
.aktion .sym { color: var(--aqua); }
.aktion b { font-weight: 600; }
.aktion small { font-size: 12px; font-weight: 500; color: var(--tinte3); }
.aktion small:empty { display: none; }
.aktion.haupt { min-height: 92px; color: var(--limette-tinte); }
.aktion.haupt .sym, .aktion.haupt small { color: var(--limette-tinte); }
.aktion.leer { background: none; border-style: dashed; color: var(--tinte3); }
.aktion.leer .sym { color: var(--tinte3); }

.aufnahme { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.aufnahme canvas { flex: none; width: 96px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--karte2); }
.aufnahme b { display: block; font-size: 15px; font-weight: 600; }

.abstand { margin-top: 8px; }
.klein-wert { font-size: 18px; margin-top: 10px; }
.sitz { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.sitz span { flex: none; width: 84px; font-size: 14px; color: var(--tinte2); }
.sitz button { flex: 1; min-width: 0; min-height: 46px; margin: 0; padding: 6px; }
.ort { text-align: left; font-weight: 500; }
/* Zwischenstopps (N6): Ziel-Knopf + „+“; Zeilen mit ↑/↓/× (Grid statt Flex-gap, Chrome 74) */
.ort-zeile, .zw-zeile { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 6px; }
.zw-zeile { grid-template-columns: 1fr auto auto auto; margin-bottom: 6px; padding-left: 14px; border-radius: 12px; background: var(--karte2); }
.zw-titel { margin: 4px 0 6px; font-weight: 600; }
.zw-knopf { width: 48px; min-width: 48px; min-height: 48px; margin: 0; padding: 0; font-size: 22px; font-weight: 700; color: var(--aqua); }
.zw-knopf:disabled { color: var(--tinte3); }
.zw-drin { width: 48px; min-width: 48px; text-align: center; font-size: 20px; color: var(--aqua); }
#rt-quellen { margin: 4px 0 10px; }
#rt-eingabe { margin-top: 6px; }

.voll { position: fixed; inset: 0; z-index: 9; overflow-y: auto; background: var(--grund); padding: calc(10px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); }
.zurueck { display: flex; align-items: center; gap: 4px; width: auto; min-height: 44px; margin: 0 0 8px; background: none; border: 0; padding: 8px 0; color: var(--aqua); }
.zurueck .sym { width: 20px; height: 20px; margin-left: -4px; }
.live-text { margin-bottom: 10px; color: var(--warn); }
.live-bild { display: block; width: 100%; max-width: 40rem; margin: 0 auto; aspect-ratio: 4 / 3; background: #000; border-radius: 14px; }
.clip { background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 12px; margin-top: 10px; }
.clip b { display: block; font-size: 15px; font-weight: 600; }

.tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; gap: 2px; justify-content: center;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: var(--leiste); border-top: 1px solid var(--linie); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.tabs button {
    flex: 1; min-width: 0; max-width: 5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 62px; min-height: 0; margin: 0; padding: 0; font-size: 10.5px; color: var(--tinte3); background: none; border: 0; border-radius: 14px;
}
.tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs button[aria-current="true"] { color: var(--tinte); background: linear-gradient(var(--tab-an-a), var(--tab-an-b)); }
.tabs button[aria-current="true"] .sym { color: var(--aqua); }

.toast-platz {
    position: fixed; left: 0; right: 0; z-index: 8; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 6px;
    bottom: calc(86px + env(safe-area-inset-bottom)); padding: 0 16px;
}
.meldung, .arbeit {
    width: 100%; max-width: 28rem; padding: 10px 14px; font-size: 14px; border-radius: 14px; color: var(--tinte);
    background: var(--blatt); border: 1px solid var(--linie); box-shadow: 0 6px 24px rgba(0, 0, 0, .28); pointer-events: auto;
}
.arbeit { color: var(--aqua); }

.kamera video { display: block; width: 100%; border-radius: 16px; background: #000; margin-top: 10px; aspect-ratio: 4 / 3; object-fit: cover; }
details { margin-top: 14px; }
summary { color: var(--aqua); font-size: 14px; font-weight: 600; padding: 8px 0; cursor: pointer; text-align: center; }
label { display: block; font-size: 12.5px; color: var(--tinte2); margin-top: 6px; }
input { width: 100%; min-height: 50px; padding: 10px; font: inherit; font-size: 16px; color: var(--tinte); background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; }

.blatt { position: fixed; inset: 0; z-index: 10; background: var(--schleier); display: flex; align-items: flex-end; justify-content: center; }
.blatt > div { width: 100%; max-width: 30rem; background: var(--blatt); border-radius: 24px 24px 0 0; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); }
.klima-wert { font: 700 30px/1.2 var(--kopf); text-align: center; margin: 8px 0; }
.klima-wert[data-ton="warm"] { color: var(--koralle); }
.klima-wert[data-ton="kalt"] { color: var(--aqua); }
.balken { display: flex; gap: 3px; align-items: center; height: 44px; }
.balken button { flex: 1; min-width: 0; min-height: 0; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 4px; opacity: .35; background: var(--aqua); }
.balken button.neutral { background: var(--tinte2); height: 34px; }
.balken button.warm { background: var(--koralle); }
.balken button.an { height: 44px; opacity: 1; }
.reihe { display: flex; gap: 8px; margin-top: 10px; }
.reihe button { min-width: 0; min-height: 46px; margin: 0; padding: 8px 2px; font-size: 14px; }

/* ---------------------------------------------------------------- Hintergrundbilder (eigene Verläufe, nur diese App) */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body.hg-wellen::before, .hg-wellen { background: radial-gradient(120% 60% at 100% 0%, rgba(67, 201, 219, .2), transparent 60%), linear-gradient(160deg, #0B2B40, #071A2B 55%, #04101B); }
body.hg-nacht::before, .hg-nacht { background: radial-gradient(90% 50% at 50% 0%, rgba(95, 120, 230, .16), transparent 70%), linear-gradient(180deg, #070C1A, #03060E); }
body.hg-aurora::before, .hg-aurora { background: radial-gradient(70% 40% at 15% 5%, rgba(181, 242, 61, .16), transparent 70%), radial-gradient(80% 45% at 90% 15%, rgba(95, 214, 230, .2), transparent 70%), radial-gradient(70% 40% at 60% 35%, rgba(150, 110, 230, .14), transparent 70%), linear-gradient(180deg, #08202C, #04101B); }
body.hg-schlicht::before, .hg-schlicht { background: var(--grund); }
@media (prefers-color-scheme: light) {
    :root:not([data-thema="dunkel"]) body.hg-wellen::before, :root:not([data-thema="dunkel"]) .hg-wellen { background: radial-gradient(120% 60% at 100% 0%, rgba(0, 117, 138, .14), transparent 60%), linear-gradient(160deg, #E4F2F5, #EEF6F8); }
    :root:not([data-thema="dunkel"]) body.hg-nacht::before, :root:not([data-thema="dunkel"]) .hg-nacht { background: linear-gradient(180deg, #E6EBF5, #F3F5FA); }
    :root:not([data-thema="dunkel"]) body.hg-aurora::before, :root:not([data-thema="dunkel"]) .hg-aurora { background: radial-gradient(70% 40% at 15% 5%, rgba(120, 180, 20, .14), transparent 70%), radial-gradient(80% 45% at 90% 15%, rgba(0, 117, 138, .14), transparent 70%), linear-gradient(180deg, #EAF4F2, #EEF6F8); }
}
:root[data-thema="hell"] body.hg-wellen::before, :root[data-thema="hell"] .hg-wellen { background: radial-gradient(120% 60% at 100% 0%, rgba(0, 117, 138, .14), transparent 60%), linear-gradient(160deg, #E4F2F5, #EEF6F8); }
:root[data-thema="hell"] body.hg-nacht::before, :root[data-thema="hell"] .hg-nacht { background: linear-gradient(180deg, #E6EBF5, #F3F5FA); }
:root[data-thema="hell"] body.hg-aurora::before, :root[data-thema="hell"] .hg-aurora { background: radial-gradient(70% 40% at 15% 5%, rgba(120, 180, 20, .14), transparent 70%), radial-gradient(80% 45% at 90% 15%, rgba(0, 117, 138, .14), transparent 70%), linear-gradient(180deg, #EAF4F2, #EEF6F8); }

/* ---------------------------------------------------------------- Bereiche */
.titel { font: 700 22px/1.2 var(--kopf); margin: 4px 0 12px; }
.unter-titel { margin: -6px 0 12px; }
.abschnitt { margin: 18px 0 8px; }
.abschnitt-kopf { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 8px; }
.abschnitt-kopf h3 { margin: 0; }
.link { width: auto; min-height: 36px; margin: 0; padding: 4px 0; background: none; border: 0; color: var(--aqua); font-size: 13.5px; }
/* Einklappen (EINKLAPPEN_MUSTER): Kopf ≥ 56 px, ganz tippbar, Pfeil unten/oben, Zustand rechts */
details.klapp { margin-bottom: 10px; border-radius: 16px; background: var(--karte, rgba(255, 255, 255, .06)); border: 1px solid var(--linie, rgba(127, 127, 127, .25)); }
details.klapp > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 15.5px; color: var(--tinte); text-align: left; }
details.klapp > summary > .sym:first-child { color: var(--aqua); flex: none; }
details.klapp > summary .klapp-zustand { color: var(--tinte3); font-size: 13px; }
details.klapp > summary::-webkit-details-marker { display: none; }
details.klapp > summary > span { flex: 1; }
details.klapp > summary .klapp-zustand { opacity: .7; font-weight: 400; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.klapp > summary .pfeil { transform: rotate(90deg); transition: transform .15s; flex: none; }
details.klapp[open] > summary .pfeil { transform: rotate(-90deg); }
details.klapp > :not(summary) { margin: 0 12px 12px; }
details.klapp > .kachel { background: none; border: 0; box-shadow: none; padding: 0 2px; }
.updates h3 { display: flex; align-items: center; gap: 8px; }
.updates h3 .sym { color: var(--limette); }
.upd-zeile { padding-top: 10px; }
.upd-zeile + .upd-zeile { border-top: 1px solid var(--linie, rgba(127, 127, 127, .25)); margin-top: 10px; }
.upd-zeile .haupt { margin-top: 8px; width: 100%; }
.hinweis-band {
    display: flex; align-items: center; gap: 10px; text-align: left; margin: 0 0 12px; min-height: 52px;
    background: linear-gradient(90deg, rgba(181, 242, 61, .16), rgba(181, 242, 61, .04)); border-color: rgba(181, 242, 61, .35);
}
.hinweis-band span { flex: 1; }
.hinweis-band .sym { color: var(--limette); flex: none; }
.sym.pfeil { width: 18px; height: 18px; color: var(--tinte3); flex: none; }

/* Start: Auto mit runden Schnellknöpfen und Statuskacheln */
.auto-kachel { padding-bottom: 14px; }
.rund-reihe { display: flex; justify-content: space-between; gap: 4px; margin-top: 10px; }
.rund { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 0; min-height: 0; margin: 0; padding: 4px 0; background: none; border: 0; font-size: 12px; color: var(--tinte2); }
.rund > span { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--karte2); border: 1px solid var(--linie); }
.rund .sym { color: var(--aqua); }
.rund.an > span { background: var(--limette); border-color: transparent; }
.rund.an .sym { color: var(--limette-tinte); }
.rund b { font-weight: 600; text-align: center; line-height: 1.2; }
.stat-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; min-height: 92px; padding: 12px 14px; text-align: left; background: var(--karte); border-radius: 18px; }
.stat small { font: 600 11px/1.3 var(--kopf); letter-spacing: .1em; text-transform: uppercase; color: var(--tinte3); }
.stat b { font: 700 19px/1.25 var(--kopf); }
.stat .klein { font-weight: 500; }

/* Befehle */
.favoriten .raster { margin-top: 6px; }
.zeile-kopf { display: flex; align-items: center; gap: 8px; }
.zeile-kopf h3 { margin: 0; }
.stern-an { color: var(--limette); fill: var(--limette); width: 18px; height: 18px; }
.kategorien { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kategorien button { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; margin: 0; min-height: 66px; padding: 10px 12px; background: var(--karte); }
.kategorien .sym { grid-row: span 2; color: var(--aqua); }
.kategorien b { font-weight: 600; font-size: 14.5px; }
.kategorien small { font-size: 11.5px; color: var(--tinte3); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kategorien small:empty { display: none; }
.unter > .zurueck { margin-bottom: 0; }
.befehls-liste { padding: 6px 16px; }
.befehl-zeile { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--linie); }
.befehl-zeile:last-of-type { border-bottom: 0; }
.befehl-zeile > button:first-child { flex: 1; margin: 0; text-align: left; background: none; border: 0; padding: 12px 0; }
.stern { width: 46px; min-height: 46px; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--tinte3); }
.stern[aria-pressed="true"] { color: var(--limette); box-shadow: none; }
.stern[aria-pressed="true"] .sym { fill: var(--limette); }

/* Wächter */
.schalter-zeile { display: flex; align-items: center; gap: 12px; }
.schalter-zeile > div { flex: 1; }
.schalter-zeile b { font: 600 17px/1.3 var(--kopf); }
.schalter { position: relative; flex: none; width: 56px; min-height: 0; height: 32px; margin: 0; padding: 0; border-radius: 999px; background: var(--karte2); }
.schalter i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--tinte2); transition: left .2s; }
.schalter[aria-checked="true"] { background: var(--limette); border-color: transparent; }
.schalter[aria-checked="true"] i { left: 27px; background: var(--limette-tinte); }
.status-zeile { display: flex; align-items: center; gap: 8px; margin-top: 12px; font: 700 18px/1.3 var(--kopf); }
.status-zeile i { width: 9px; height: 9px; border-radius: 50%; background: var(--tinte3); }
.status-zeile[data-ton="scharf"] i { background: var(--limette); box-shadow: 0 0 10px var(--limette); }
.drei { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; border-top: 1px solid var(--linie); }
.drei > div { padding: 12px 4px 2px; text-align: center; }
.drei > div + div { border-left: 1px solid var(--linie); }
.drei b { display: block; font: 700 22px/1.2 var(--kopf); }
.drei small { font-size: 11.5px; color: var(--tinte3); }
.ereignisse { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.ereignis { flex: none; width: 148px; scroll-snap-align: start; background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; overflow: hidden; }
.ereignis canvas, .kamera-kachel canvas { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--karte2); }
.ereignis div { padding: 8px 10px 10px; }
.ereignis em { display: inline-block; font: 700 10px/1 var(--kopf); letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--limette-tinte); background: var(--limette); border-radius: 6px; padding: 3px 6px; }
.ereignis b, .kamera-kachel b { display: block; font-size: 13px; font-weight: 600; margin-top: 4px; }
.kameras { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kamera-kachel { position: relative; border-radius: 16px; overflow: hidden; background: var(--karte); border: 1px solid var(--linie); }
.kamera-kachel div { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; background: linear-gradient(transparent, rgba(4, 16, 27, .85)); color: #EAF6F8; }
.kamera-kachel b { margin: 0; }
.kamera-kachel span { font-size: 11.5px; opacity: .85; }

/* Reiter und Umschalter */
.reiter, .segment { display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--karte); border: 1px solid var(--linie); border-radius: 14px; }
.reiter button, .segment button { flex: 1; min-width: 0; min-height: 40px; margin: 0; padding: 6px 4px; font-size: 14px; background: none; border: 0; border-radius: 10px; color: var(--tinte2); }
.reiter button[aria-selected="true"], .segment button[aria-pressed="true"] { background: var(--aqua); color: #04101B; box-shadow: none; }

/* Fahrten */
.fahrt { background: var(--karte); border: 1px solid var(--linie); border-radius: 18px; overflow: hidden; margin-bottom: 10px; }
.mini-karte { display: block; width: 100%; height: 118px; background: linear-gradient(135deg, rgba(95, 214, 230, .1), rgba(19, 50, 72, .6)); }
.mini-karte .gitter { stroke: var(--linie); stroke-width: 1; }
.mini-karte .luftlinie { stroke: var(--aqua); stroke-width: 2.5; stroke-dasharray: 2 7; stroke-linecap: round; opacity: .8; }
.mini-karte .luftlinie-text { font: 600 10.5px var(--text); fill: var(--tinte3); }
.mini-karte .a { fill: var(--grund); stroke: var(--aqua); stroke-width: 3; }
.mini-karte .b { fill: var(--limette); }
.fahrt-text { padding: 10px 14px 12px; }
.fahrt-kopf { display: flex; justify-content: space-between; gap: 8px; }
.fahrt-kopf b { font-weight: 600; }
.fahrt-zahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.fahrt-zahlen small { display: block; font: 600 10px/1.2 var(--kopf); letter-spacing: .08em; text-transform: uppercase; color: var(--tinte3); }
.fahrt-zahlen b { font: 700 15px/1.3 var(--kopf); }

/* Tacho-Auswahl: große Kacheln */
.tacho-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.tacho-wahl button { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; min-height: 84px; padding: 12px; text-align: left; background: var(--karte); }
.tacho-wahl button b { font-size: 15.5px; font-weight: 700; }
.tacho-wahl button small { font-size: 12px; color: var(--tinte2); font-weight: 500; }
.tacho-wahl button[aria-pressed="true"] { border-color: var(--limette); box-shadow: inset 0 0 0 1px var(--limette); }
.tacho-wahl button em { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn); }
.tacho-wahl i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--karte2); color: var(--aqua); font: 700 14px var(--kopf); font-style: normal; }

/* Launcher: Leiste unten */
.leiste-zeile { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.leiste-zeile b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leiste-zeile button { width: 46px; min-height: 46px; margin: 0; padding: 0; font-size: 18px; }
select { width: 100%; min-height: 50px; padding: 10px; font: inherit; font-size: 16px; color: var(--tinte); background: var(--karte2); border: 1px solid var(--linie); border-radius: 12px; margin-top: 4px; }

/* Dateien */
.datei { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.datei b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datei .klein { grid-column: 1; }
.datei button { grid-row: span 2; width: auto; min-height: 44px; margin: 0; padding: 6px 12px; font-size: 13.5px; }

/* Regeln */
.wenn-dann { display: grid; gap: 10px; }
.wenn-dann > div { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: baseline; }
.wenn-dann small { font: 700 10.5px/1.2 var(--kopf); letter-spacing: .1em; text-transform: uppercase; color: var(--aqua); }
.wenn-dann p { font-size: 14px; color: var(--tinte2); }
.regel { display: flex; align-items: center; gap: 12px; background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 12px 14px; margin-bottom: 8px; }
.regel .sym { color: var(--aqua); flex: none; }
.regel b { display: block; font-weight: 600; }

/* Anzeige */
.hg-vorschau { height: 150px; border-radius: 16px; border: 1px solid var(--linie); display: flex; align-items: flex-end; padding: 14px; overflow: hidden; }
.hg-vorschau b { display: block; font: 700 18px/1.2 var(--kopf); }
.hg-wahl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.hg-wahl button { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 6px 2px 8px; min-height: 0; font-size: 12px; background: none; }
.hg-wahl i { display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; border: 1px solid var(--linie); }
.sprachen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sprachen button { margin: 0; min-height: 46px; }
.sprachen button:first-child { grid-column: span 2; }

/* Einstellungen */
.zeile-knopf { display: flex; align-items: center; gap: 12px; text-align: left; margin: 0 0 12px; min-height: 64px; padding: 12px 16px; background: var(--karte); border-radius: 18px; }
.zeile-knopf > .sym:first-child { color: var(--aqua); flex: none; }
.zeile-knopf span { flex: 1; min-width: 0; }
.zeile-knopf b { display: block; font-weight: 600; }
.zeile-knopf small { display: block; font-size: 12.5px; color: var(--tinte2); font-weight: 500; }

/* Protokoll */
.pr-zeile { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.pr-zeile b { font-weight: 600; font-size: 15px; }
.pr-zeile em { font-style: normal; font-size: 12px; font-weight: 700; align-self: center; padding: 3px 8px; border-radius: 8px; background: var(--karte2); color: var(--tinte2); }
.pr-zeile em[data-ton="ok"] { color: var(--aqua); }
.pr-zeile em[data-ton="nein"] { color: var(--koralle); }
.pr-zeile .klein { grid-column: span 2; }

/* Tiermodus */
.tier[data-ton="ok"] { border-color: rgba(181, 242, 61, .5); background: linear-gradient(135deg, rgba(181, 242, 61, .14), var(--karte)); }
.tier[data-ton="pruefen"] { border-color: rgba(255, 138, 107, .6); background: linear-gradient(135deg, rgba(255, 138, 107, .16), var(--karte)); }
.tier[data-ton="pruefen"] .wert { color: var(--koralle); }
#pr-filter { margin-top: 10px; }

/* Routenplaner im Handy (plan-ergebnis/1): große Zeilen, REGEL 50+ */
.karte-innen { background: var(--karte2); border-radius: 14px; padding: 14px; margin-top: 10px; }
.plan-gross { font-size: 22px; font-weight: 700; line-height: 1.25; margin: 4px 0 0; }
.etappe { background: var(--karte2); border-radius: 14px; padding: 12px 14px; margin-top: 8px; }
.etappe b { display: block; font-size: 16px; }
.frei { color: var(--aqua); }
.warn-rot { color: var(--koralle); font-weight: 600; }
.quellen { font-size: 11.5px; opacity: .7; margin-top: 8px; }

/* Fahrt auf der Karte (Community-Karte, Farben aus surfmate-dark.json) */
.strecken-karte { height: 150px; background: #0B2236; }
.strecken-karte .k-land { fill: #0B2236; }
.strecken-karte .k-wald { fill: #0F3140; }
.strecken-karte .k-gruen { fill: #10343F; }
.strecken-karte .k-ort { fill: #0E2A3C; }
.strecken-karte .k-wasser { fill: #06283A; }
.strecken-karte .k-weg { fill: none; stroke: #1D4A5C; stroke-width: 1.2; }
.strecken-karte .k-strasse { fill: none; stroke: #2A6474; stroke-width: 2.4; }
.strecken-karte .k-autobahn { fill: none; stroke: #3A8D9C; stroke-width: 3.4; }
.strecken-karte .strecke-schatten { fill: none; stroke: rgba(0, 0, 0, .4); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.strecken-karte .strecke { fill: none; stroke: var(--aqua); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.strecken-karte .karte-quelle { font: 9px var(--text); fill: var(--tinte3); }

/* Besitzer-Handy (Panoptes 0.1.38.8) */
#blatt-besitzer { z-index: 7; }   /* unter Meldung (8) und Rückfrage (10) */
.zeile-knopf.aktiv { border-color: var(--aqua); }
.bs-pruefzahl { font-size: 40px; letter-spacing: .12em; text-align: center; color: var(--limette); margin: 8px 0; }
.bs-code { font-family: ui-monospace, monospace; font-size: 32px; letter-spacing: .12em; text-align: center; overflow-wrap: anywhere; }
.bs-qr { width: min(80%, 320px); margin: 8px auto; border-radius: 12px; overflow: hidden; }
.bs-qr svg { display: block; width: 100%; height: auto; }
#bs-rest { font-weight: 600; color: var(--aqua); margin: 8px 0 0; }
#bs-rest.warn { color: var(--warn); }
.bs-zwei { display: flex; gap: 8px; }
.bs-zwei > button { flex: 1; }
.bs-arten { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.bs-arten > button, .bs-arten > span { width: auto; flex: 1 1 auto; margin: 0; }
.bs-recht { min-height: 52px; padding: 4px 0; }
.bs-recht span { font-size: 15px; }
.bs-feldblock { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.bs-feld { font: 600 15px/1.3 var(--text) !important; }
.bs-abschnitt { font: 600 12px/1.3 var(--kopf); letter-spacing: .1em; text-transform: uppercase; color: var(--tinte3); margin: 14px 0 0; }
.bs-zahlzeile { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.bs-zahlzeile .bs-stufe { width: 56px; flex: none; margin: 0; font-size: 20px; }
.bs-zahl { flex: 1; text-align: center; font-size: 17px; }
.leise-text { color: var(--tinte3); }

/* Community-Karte: Link sieht aus wie der Hauptknopf */
a.knopf-link { display: flex; align-items: center; justify-content: center; min-height: 56px; margin-top: 10px; padding: 10px 14px; border-radius: 16px;
    background: var(--limette); color: var(--limette-tinte); font: 600 15px/1.2 var(--text); text-decoration: none; }
#frage-text { white-space: pre-line; }
.bs-video { width: 100%; max-height: 50vh; border-radius: 12px; margin-top: 8px; background: #000; }
