/* Upswing OS, Konten und Verwaltung. Gestaltung wie die Bestell-Plattform: neutral, ruhig, Seitenleiste wie in macOS-Apps,
   Grund mit leichten Noppen. Farbe tragen nur Zustände (gut, warn, schlecht), Markenpunkte und Dienst-Logos. */
@font-face { font-family: "Inter"; src: url("/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --grund: #FFFFFF; --flaeche: #FFFFFF; --mulde: #F2F2F5; --tinte: #15161A; --leise: #666A73; --linie: #E2E2E7;
  --gut: #1F8F4E; --warn: #B7791F; --schlecht: #C2362B;
  --leiste: #F5F5F7; --leiste-breit: 228px; --wahl: rgba(21, 22, 26, .07); --griff: #FFFFFF;
  --stark: var(--tinte); --auf-stark: var(--grund);
  --noppe: 29,29,31; --noppe-kraft: 1;
  --claude: #D97757;
  /* Kurven: Ankommen, Gehen, Alltag, Landen (je Bewegung gewählt, keine Standardkurven) */
  --e-ein: cubic-bezier(0.05, 0.7, 0.1, 1); --e-aus: cubic-bezier(0.3, 0, 0.8, 0.15); --e-std: cubic-bezier(0.2, 0, 0, 1);
  --e-land: cubic-bezier(0.1, 0.75, 0.15, 1); --e-weg: cubic-bezier(0.55, 0, 0.9, 0.35);
  --e-feder: linear(0, 0.038, 0.129, 0.247, 0.373, 0.496, 0.607, 0.704, 0.785, 0.85, 0.901, 0.94, 0.968, 0.988, 1.001, 1.009, 1.013, 1.015, 1.015, 1.014, 1.012, 1.011, 1.009, 1.007, 1.005, 1.004, 1);
  interpolate-size: allow-keywords;
  --rand: 40px; --rund: 16px;
  --schatten: 0 1px 2px rgba(21,22,26,.05), 0 8px 24px -12px rgba(21,22,26,.14);
}
:root[data-theme="dunkel"] {
  color-scheme: dark;
  --grund: #0F0F11; --flaeche: #1B1B1E; --mulde: #26262A; --tinte: #F3F3F5; --leise: #9C9DA6; --linie: #2E2E33;
  --gut: #3CC774; --warn: #E3A948; --schlecht: #FF6257;
  --leiste: #151517; --wahl: rgba(255, 255, 255, .09); --griff: #3B3B42;
  --stark: #2B2B31; --auf-stark: #F3F3F5;
  --noppe: 255,255,255; --noppe-kraft: .55;
  --schatten: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -14px rgba(0, 0, 0, .75);
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .26s; animation-timing-function: linear; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
#noppen { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }
html { font-size: 15px; }
body { margin: 0; background: var(--grund); color: var(--tinte); font-family: "Inter", system-ui, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.022em; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: 1.9rem; letter-spacing: -0.028em; } h2 { font-size: 1.3rem; } h3 { font-size: 1.02rem; letter-spacing: -0.012em; }
p { margin: 0; } a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.leise { color: var(--leise); } .klein { font-size: .87rem; } .zahlen { font-variant-numeric: tabular-nums; }
.rechts { text-align: right; } .eng { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; border-radius: 6px; }
.ohne-skript { padding: 40px; text-align: center; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; }

/* ---------- Wortmarke ---------- */
.marke-wort { display: flex; align-items: center; text-decoration: none; }
.marke-wort img { display: block; height: 26px; width: auto; }
.marke-wort img.uw-dunkel { display: none; }
:root[data-theme="dunkel"] .marke-wort img.uw-hell { display: none; }
:root[data-theme="dunkel"] .marke-wort img.uw-dunkel { display: block; }

/* ---------- Tor: Anmeldung, Einladung, Passwort, Koppeln ---------- */
.tor { min-height: 100dvh; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center; padding: 40px 20px 22px; gap: 26px; }
.tor-mitte { width: min(400px, 100%); display: grid; gap: 26px; }
.tor-mitte.breit { width: min(520px, 100%); }
.tor .marke-wort { justify-content: center; }
.tor .marke-wort img { height: 30px; }
.tor-karte { padding: 30px 28px 26px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 20px; box-shadow: var(--schatten);
  transition: transform .36s var(--e-ein), opacity .16s linear; }
@starting-style { .tor-karte { opacity: 0; transform: translateY(10px) scale(.985); } }
.tor-karte h1 { font-size: 1.5rem; }
.tor-karte > p { color: var(--leise); margin-top: 8px; }
.tor-karte form { display: grid; }
.tor-karte .knopf.gross { margin-top: 22px; }
.tor-karte .oder { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; color: var(--leise); font-size: .84rem; }
.tor-karte .oder::before, .tor-karte .oder::after { content: ""; flex: 1; height: 1px; background: var(--linie); }
.tor-karte .oder + .knopf.gross { margin-top: 14px; }
.tor-neben { display: flex; justify-content: space-between; gap: 14px; margin-top: 18px; font-size: .9rem; }
.tor-neben a, .tor-fuss a, .verweis { color: var(--leise); text-decoration: none; background: none; border: 0; padding: 0; transition: color .15s var(--e-std); }
.tor-neben a:hover, .tor-fuss a:hover, .verweis:hover { color: var(--tinte); }
.tor-fuss { display: flex; gap: 20px; font-size: .84rem; color: var(--leise); }
.vorschau { padding: 16px 18px; border: 1px dashed color-mix(in srgb, var(--tinte) 28%, var(--linie)); border-radius: 16px; display: grid; gap: 10px; }
.vorschau b { font-weight: 600; font-size: .9rem; }
.vorschau div { display: flex; gap: 8px; flex-wrap: wrap; }
.codefeld { text-align: center; font-size: 1.5rem; letter-spacing: .32em; font-variant-numeric: tabular-nums; font-weight: 600; padding-left: calc(12px + .32em) !important; }

/* ---------- Rahmen: Leiste, Reiter, Menüs und Ansicht-Balken stehen in rahmen.css (Baustein rahmen.js) ---------- */
.bild, .knopf svg, .symbol-feld svg, .symbol { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.kreis { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--stark); color: var(--auf-stark); font-size: .8rem; font-weight: 650; letter-spacing: 0; }
.kreis.gross { width: 52px; height: 52px; font-size: 1.2rem; }

main { max-width: 1400px; margin: 0 auto; padding: 24px 18px 90px; outline: none; }
.ansicht { transition: opacity .16s linear, transform .34s var(--e-ein); }
@starting-style { .ansicht { opacity: 0; transform: translateY(8px); } }
@media (min-width: 900px) { main { padding: 40px var(--rand) 120px; } }

/* ---------- Bausteine ---------- */
.seitenkopf { display: flex; align-items: end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin-bottom: 28px; }
.seitenkopf p { max-width: 62ch; color: var(--leise); margin-top: 8px; font-size: .96rem; }
.seitenkopf .rechts-teil { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zurueck { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--leise); text-decoration: none; font-size: .9rem; transition: color .15s var(--e-std); }
.zurueck:hover { color: var(--tinte); }
.zurueck svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.kasten { padding: 20px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); min-width: 0; }
.kasten > h3 { margin-bottom: 12px; }
.kasten > h3 + p.leise { margin: -6px 0 14px; font-size: .9rem; }
.kasten-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.kasten-kopf h3 { margin: 0; }
.stapel { display: grid; gap: 14px; }
.raster { display: grid; gap: 14px; }
.raster.k4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.raster.k3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.raster.k2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.raster.k21 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .raster.k21 { grid-template-columns: minmax(0, 1fr); } }
.rollbar { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--tinte); font-weight: 560; text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--e-feder), background-color .15s var(--e-std), border-color .15s var(--e-std), color .15s var(--e-std), opacity .15s linear; }
.knopf:hover { border-color: color-mix(in srgb, var(--tinte) 35%, var(--linie)); }
.knopf:active { transform: scale(.965); transition-duration: .08s, .15s, .15s, .15s, .15s; transition-timing-function: var(--e-std); }
.knopf:disabled { opacity: .5; cursor: default; }
.knopf.haupt { background: var(--tinte); border-color: var(--tinte); color: var(--grund); }
.knopf.haupt:hover { background: color-mix(in srgb, var(--tinte) 88%, var(--leise)); border-color: transparent; }
.knopf.gross { padding: 13px 20px; font-size: 1.04rem; width: 100%; }
.knopf.gross:active { transform: scale(.985); }
.knopf.klein { padding: 6px 11px; font-size: .88rem; border-radius: 9px; }
.knopf.still { border-color: transparent; background: transparent; color: var(--leise); }
.knopf.still:hover { color: var(--tinte); background: var(--mulde); }
.knopf.gefahr { color: var(--schlecht); }
.knopf.haupt.gefahr { background: var(--schlecht); border-color: var(--schlecht); color: #fff; }
.knopf.wartet { pointer-events: none; opacity: .7; }
.knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }

.feld { display: grid; gap: 6px; margin-top: 16px; }
.feld label, .feld .name { font-weight: 560; font-size: .92rem; }
.feld small { color: var(--leise); font-size: .84rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], textarea, select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche); outline: none;
  transition: border-color .15s var(--e-std), box-shadow .15s var(--e-std); }
input:focus, textarea:focus, select:focus { border-color: var(--tinte); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tinte) 12%, transparent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--leise) 70%, transparent); }
textarea { resize: vertical; min-height: 76px; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--leise) 50%), linear-gradient(135deg, var(--leise) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.suche { max-width: 280px; }
.fehler { color: var(--schlecht); font-size: .92rem; font-weight: 520; overflow: clip; transition: block-size .26s var(--e-ein), margin .26s var(--e-ein), opacity .14s linear; margin-top: 14px; }
.fehler:empty { block-size: 0; margin-top: 0; opacity: 0; }
.meldung { padding: 12px 14px; border-radius: 12px; background: var(--mulde); font-size: .93rem; }
.meldung.warn { background: color-mix(in srgb, var(--warn) 12%, var(--flaeche)); color: color-mix(in srgb, var(--warn) 70%, var(--tinte)); }
.meldung.gut { background: color-mix(in srgb, var(--gut) 11%, var(--flaeche)); }

.schalter { display: flex; align-items: flex-start; gap: 13px; padding: 12px 0; border-top: 1px solid var(--linie); cursor: pointer; }
.schalter:first-of-type { border-top: 0; }
.schalter input { position: absolute; opacity: 0; pointer-events: none; }
.schalter .kipp { flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--linie); position: relative; transition: background-color .22s var(--e-std); }
.schalter .kipp::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .34s var(--e-feder), width .16s var(--e-std); }
.schalter:active input:not(:disabled) + .kipp::after { width: 23px; }
.schalter:active input:not(:disabled):checked + .kipp::after { transform: translateX(11px); }
.schalter input:checked + .kipp { background: var(--gut); }
.schalter input:checked + .kipp::after { transform: translateX(16px); }
.schalter input:disabled + .kipp { opacity: .5; }
.schalter input:focus-visible + .kipp { outline: 2px solid var(--tinte); outline-offset: 2px; }
.schalter b { font-weight: 560; display: block; } .schalter small { color: var(--leise); display: block; font-size: .85rem; }

.tabelle { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabelle th { text-align: left; font-weight: 560; color: var(--leise); padding: 0 14px 9px 0; font-size: .8rem; white-space: nowrap; }
.tabelle td { padding: 10px 14px 10px 0; border-top: 1px solid var(--linie); vertical-align: middle; }
.tabelle th:last-child, .tabelle td:last-child { padding-right: 0; }
.tabelle th.rechts, .tabelle td.rechts { text-align: right; }
.tabelle td.zahlen { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabelle tr.klick { cursor: pointer; }
.tabelle tr.klick td { transition: background-color .12s var(--e-std); }
.tabelle tr.klick:hover td { background: color-mix(in srgb, var(--mulde) 60%, transparent); }
.tabelle td b { font-weight: 580; }
.tabelle td small { display: block; color: var(--leise); font-size: .82rem; }
.wer { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wer > div { min-width: 0; }
.wer b, .wer small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30ch; }

.punkt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--linie); flex: none; }
.punkt.an { background: var(--gut); } .punkt.aus { background: var(--schlecht); } .punkt.halb { background: var(--warn); }
.zustand { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.farbpunkt { display: inline-block; width: 10px; height: 10px; border-radius: 3.5px; background: var(--f, var(--linie)); flex: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tinte) 12%, transparent); }
.marke { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo { display: inline-block; width: 16px; height: 16px; flex: none; background-color: var(--tinte); -webkit-mask: var(--bild) center / contain no-repeat; mask: var(--bild) center / contain no-repeat; vertical-align: -3px; }
.logo.claude { --bild: url("/logo-claude.svg"); background-color: var(--claude); }
.logo.elevenlabs { --bild: url("/logo-elevenlabs.svg"); }
.dienst { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* Kennzahlen */
.kennzahl { display: grid; gap: 4px; }
.kennzahl .wort { color: var(--leise); font-size: .88rem; font-weight: 520; }
.kennzahl .wert { font-size: 2.15rem; font-weight: 650; letter-spacing: -0.035em; line-height: 1.08; font-variant-numeric: tabular-nums; }
.kennzahl .wert small { font-size: .5em; font-weight: 560; letter-spacing: -0.01em; color: var(--leise); margin-left: 4px; }
.wandel { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; color: var(--leise); min-height: 1.3em; }
.wandel b { font-weight: 600; font-variant-numeric: tabular-nums; }
.wandel.auf b { color: var(--gut); } .wandel.ab b { color: var(--schlecht); }
.reihe-klein { display: flex; gap: 8px 26px; flex-wrap: wrap; }
.reihe-klein div { display: grid; }
.reihe-klein b { font-size: 1.25rem; font-weight: 640; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.reihe-klein span { color: var(--leise); font-size: .82rem; }

/* Auswahl (Zeitraum) und Teile (Umschalter) */
.auswahl { position: relative; }
.auswahl > button svg { transition: transform .3s var(--e-ein); }
.auswahl.offen > button svg { transform: rotate(180deg); }
.auswahl-liste { position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; min-width: 190px; padding: 5px; display: grid; gap: 1px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 13px; box-shadow: 0 18px 44px -18px rgba(14,15,17,.4);
  transform-origin: 85% 0; transform: scale(.94) translateY(-4px); opacity: 0; visibility: hidden; transition: transform .12s var(--e-weg), opacity .1s linear, visibility 0s .12s; }
.auswahl.offen .auswahl-liste { transform: none; opacity: 1; visibility: visible; transition: transform .28s var(--e-ein), opacity .1s linear, visibility 0s; }
.auswahl-liste button { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 8px 11px; border: 0; border-radius: 9px; background: transparent; text-align: left; font-weight: 520; transition: background-color .12s var(--e-std); }
.auswahl-liste button:hover, .auswahl-liste button:focus-visible { background: var(--mulde); }
.auswahl-liste button.da { font-weight: 640; }
.auswahl-liste button.da::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tinte); }
.teile { position: relative; display: inline-flex; padding: 3px; border-radius: 11px; background: var(--wahl); isolation: isolate; }
.teile button { padding: 6px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--leise); font-weight: 560; font-size: .9rem; transition: color .15s var(--e-std); }
.teile button.da { color: var(--tinte); }
.teile .griff { position: absolute; top: 3px; bottom: 3px; left: 0; width: 10px; z-index: -1; border-radius: 8px; background: var(--griff); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); transition: transform .34s var(--e-ein), width .34s var(--e-ein); }

/* Diagramm: Säulen je Tag oder Woche */
.diagramm-rahmen { position: relative; padding-top: 6px; }
.diagramm { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 3px; height: 190px; border-bottom: 1px solid var(--linie); }
.diagramm.dicht { gap: 1px; }
.saeule { position: relative; height: 100%; display: flex; flex-direction: column-reverse; }
.saeule::before { content: ""; position: absolute; inset: 0 -2px; }
.saeule i { display: block; height: calc(var(--h, 0) * 100%); min-height: 0; background: var(--tinte); transition: height .52s var(--e-land) calc(var(--i, 0) * 7ms), opacity .15s linear, background-color .2s linear; }
.saeule i:last-child { border-radius: 3px 3px 0 0; }
.saeule i.zwei { background: var(--claude); }
.saeule.null i:first-child { min-height: 2px; opacity: .16; }
.diagramm:hover .saeule i { opacity: .38; }
.diagramm:hover .saeule:hover i { opacity: 1; }
@starting-style { .saeule i { height: 0; } }
.achse { display: flex; justify-content: space-between; margin-top: 7px; color: var(--leise); font-size: .78rem; font-variant-numeric: tabular-nums; }
.spitze { position: absolute; top: -8px; left: 0; z-index: 3; padding: 7px 10px; border-radius: 10px; background: var(--stark); color: var(--auf-stark); font-size: .82rem; white-space: nowrap; pointer-events: none; display: grid;
  opacity: 0; transition: opacity .1s linear, transform .18s var(--e-std); }
.spitze.da { opacity: 1; }
.spitze b { font-weight: 620; font-variant-numeric: tabular-nums; }
.spitze span { opacity: .72; }
.legende { display: flex; gap: 16px; font-size: .82rem; color: var(--leise); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 9px; height: 9px; border-radius: 3px; background: var(--tinte); }
.legende i.zwei { background: var(--claude); }

/* Liegende Balken (Filmarten, Kosten je Konto) */
.balkenliste { display: grid; gap: 13px; }
.balkenzeile { display: grid; gap: 5px; }
.balkenzeile .oben { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.balkenzeile .oben b { font-weight: 580; }
.balkenzeile .oben span { color: var(--leise); font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bahn { display: flex; height: 7px; border-radius: 4px; background: var(--mulde); overflow: clip; }
.bahn i { display: block; width: calc(var(--b, 0) * 100%); background: var(--tinte); border-radius: 4px; transition: width .56s var(--e-land) calc(var(--i, 0) * 34ms); }
.bahn i.zwei { background: var(--claude); border-radius: 0 4px 4px 0; }
.bahn i.erst { border-radius: 4px 0 0 4px; }
.bahn.warn i { background: var(--warn); } .bahn.voll i { background: var(--schlecht); }
@starting-style { .bahn i { width: 0; } }
.trichter { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.trichter div { display: grid; gap: 2px; padding-left: 12px; border-left: 2px solid var(--linie); }
.trichter b { font-size: 1.3rem; font-weight: 640; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.trichter span { color: var(--leise); font-size: .82rem; }
@media (max-width: 620px) { .trichter { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; } }

/* Listen: Verlauf, Geräte, Sitzungen */
.liste { display: grid; }
.liste > .zeile { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--linie); min-width: 0; }
.liste > .zeile:first-child { border-top: 0; padding-top: 2px; }
.liste > .zeile:last-child { padding-bottom: 2px; }
.zeile .mitte { flex: 1; min-width: 0; display: grid; }
.zeile .mitte b { font-weight: 570; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .mitte small { color: var(--leise); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zeile .hinten { color: var(--leise); font-size: .84rem; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.zeile .symbol-feld { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--mulde); color: var(--leise); flex: none; }
.zeile.neu { animation: zeile-neu .5s var(--e-ein); }
@keyframes zeile-neu { from { opacity: 0; transform: translateY(-6px); } }
.leer { padding: 26px 10px; text-align: center; color: var(--leise); }
.mehr { margin-top: 14px; display: flex; justify-content: center; }
.paar { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 16px; font-size: .93rem; }
.paar dt { color: var(--leise); } .paar dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kopierfeld { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 12px; border-radius: 11px; background: var(--mulde); }
.kopierfeld code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .84rem; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0 4px; }
.codes code { padding: 9px 10px; border-radius: 9px; background: var(--mulde); text-align: center; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .95rem; letter-spacing: .04em; }
.qr { display: block; width: 188px; height: 188px; margin: 14px auto 6px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--linie); }
.qr rect, .qr path { fill: #15161A; }
.lesetext { max-width: 68ch; display: grid; gap: 14px; }
.lesetext h2 { margin-top: 14px; font-size: 1.1rem; }
.lesetext p, .lesetext li { color: color-mix(in srgb, var(--tinte) 86%, var(--leise)); }
.lesetext ul { margin: 0; padding-left: 20px; display: grid; gap: 5px; }

/* Fenster und Hinweis */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); box-shadow: 0 30px 80px -20px rgba(14,15,17,.45); background: var(--flaeche); color: var(--tinte); }
dialog.breit { width: min(720px, calc(100vw - 32px)); }
dialog { opacity: 0; transform: translateY(10px) scale(.985); transition: opacity .12s linear, transform .14s var(--e-weg), overlay .14s allow-discrete, display .14s allow-discrete; }
dialog::backdrop { background: rgba(14,15,17,0); backdrop-filter: blur(0); transition: background-color .18s linear, backdrop-filter .18s linear, overlay .18s allow-discrete, display .18s allow-discrete; }
dialog[open] { opacity: 1; transform: none; transition: opacity .16s linear, transform .34s var(--e-ein), overlay .34s allow-discrete, display .34s allow-discrete; }
dialog[open]::backdrop { background: rgba(14,15,17,.38); backdrop-filter: blur(3px); transition-duration: .28s; }
@starting-style { dialog[open] { opacity: 0; transform: translateY(14px) scale(.975); } dialog[open]::backdrop { background: rgba(14,15,17,0); backdrop-filter: blur(0); } }
dialog form { padding: 24px; display: grid; }
dialog h2 { font-size: 1.22rem; }
dialog form > p { color: var(--leise); margin-top: 8px; }
dialog .fuss { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
dialog .zusatz { margin-top: 16px; }
.hinweis { position: fixed; left: 50%; bottom: 28px; z-index: 60; max-width: min(520px, calc(100vw - 32px)); padding: 11px 18px; border-radius: 13px; background: var(--stark); color: var(--auf-stark); font-weight: 540; box-shadow: 0 18px 40px -16px rgba(0,0,0,.5);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: transform .16s var(--e-weg), opacity .12s linear; }
.hinweis.da { transform: translate(-50%, 0); opacity: 1; transition: transform .4s var(--e-feder), opacity .12s linear; }
.hinweis.schlecht { background: var(--schlecht); color: #fff; }

@media (max-width: 899px) {
  .hinweis { bottom: calc(20px + env(safe-area-inset-bottom)); }
  .kennzahl .wert { font-size: 1.8rem; }
  .diagramm { height: 150px; }
  .paar { grid-template-columns: 1fr; gap: 2px 0; } .paar dd { margin-bottom: 8px; }
}
@media (pointer: coarse) { .knopf.klein { min-height: 40px; } .auswahl-liste button { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01s !important; transition-delay: 0s !important; animation-duration: .01s !important; }
}

/* Verwaltung: Wechsel an Ort und Stelle */
.stapel > * { transition: opacity .18s linear; }
.stapel.laedt > :not(.seitenkopf) { opacity: .5; transition-delay: .14s; }
.frisch { animation: frisch .24s linear; }
@keyframes frisch { from { opacity: 0; } }
a.zeile { color: inherit; text-decoration: none; }
a.zeile .mitte b { text-decoration: underline transparent 1px; text-underline-offset: 3px; transition: text-decoration-color .15s var(--e-std); }
a.zeile:hover .mitte b, a.zeile:focus-visible .mitte b { text-decoration-color: currentColor; }
.knoepfe.hoch { flex-direction: column; align-items: stretch; }
.knoepfe.hoch .knopf { justify-content: flex-start; }
.knoepfe.mitte-teil { justify-content: center; margin-top: 14px; }
.knoepfe.mitte-teil:has(> [hidden]) { display: none; }
.mailtext { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: .84rem/1.55 ui-monospace, "SF Mono", Menlo, monospace; max-height: 52vh; overflow: auto; padding: 14px; border-radius: 10px; background: var(--mulde); }
.bahn.claude i { background: var(--claude); }

/* ---------- Suche ---------- */
.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
mark { background: color-mix(in srgb, var(--warn) 34%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
kbd { font: inherit; font-size: .74rem; font-weight: 560; color: var(--leise); border: 1px solid var(--linie); border-radius: 6px; padding: 1px 6px; background: var(--mulde); }
.stapel { grid-template-columns: minmax(0, 1fr); }

/* Suchleiste oben rechts (Desktop) und Lupe in der Kopfzeile (Handy); die Plätze liefert rahmen.css */
.suchleiste { display: flex; align-items: center; gap: 10px; width: min(100%, 340px); height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--linie); border-radius: 10px; background: var(--flaeche); color: var(--leise); font-size: .92rem; text-align: left;
  transition: border-color .15s var(--e-std), color .15s var(--e-std), transform .35s var(--e-feder); }
.suchleiste:hover { border-color: color-mix(in srgb, var(--tinte) 28%, var(--linie)); color: var(--tinte); }
.suchleiste:active { transform: scale(.985); transition-duration: .15s, .15s, .08s; }
.suchleiste:focus-visible, .lupe-knopf:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; }
.suchleiste-text { flex: 1; }
.lupe-knopf { margin-left: auto; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--tinte); }
.lupe-knopf:active { background: var(--wahl); }
@media (min-width: 900px) { .lupe-knopf { display: none; } }

/* Suchfeld über den Listen */
.suchzeile-liste { max-width: 440px; }
.suchfeld { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 8px 0 12px; border: 1px solid var(--linie); border-radius: 11px; background: var(--flaeche);
  transition: border-color .15s var(--e-std), box-shadow .15s var(--e-std); }
.suchfeld:focus-within { border-color: var(--tinte); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tinte) 12%, transparent); }
.suchfeld-lupe { color: var(--leise); }
.suchfeld input[type=search], .suchfeld input[type=search]:focus { flex: 1; min-width: 0; width: auto; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; -webkit-appearance: none; appearance: none; }
.suchfeld input::-webkit-search-cancel-button, .suchfeld input::-webkit-search-decoration { display: none; -webkit-appearance: none; }
.suchfeld-zahl { font-size: .8rem; color: var(--leise); font-variant-numeric: tabular-nums; white-space: nowrap; }
.suchfeld-x { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--leise); transition: background-color .12s var(--e-std), color .12s var(--e-std); }
.suchfeld-x:hover { background: var(--mulde); color: var(--tinte); }
.kein-treffer { display: grid; justify-items: center; gap: 2px; padding-bottom: 16px; }
.kein-treffer .leer { padding-bottom: 10px; }
.mehr-laden { display: flex; justify-content: center; margin-top: 14px; }
.mehr-laden:empty { display: none; }

/* Palette */
dialog.palette { margin: 11vh auto auto; max-height: min(580px, 78dvh); overflow: hidden; transform: translateY(6px) scale(.992); }
dialog.palette[open] { display: flex; flex-direction: column; transform: none; transition: opacity .16s linear, transform .2s var(--e-ein), overlay .2s allow-discrete, display .2s allow-discrete; }
@starting-style { dialog.palette[open] { opacity: 0; transform: translateY(6px) scale(.992); } }
dialog.palette { width: min(640px, calc(100vw - 32px)); }
.pal-kopf { display: flex; align-items: center; gap: 10px; flex: none; height: 56px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--linie); }
.pal-lupe { color: var(--leise); }
dialog.palette .pal-eingabe, dialog.palette .pal-eingabe:focus { flex: 1; min-width: 0; width: auto; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 16px; }
.pal-zu { display: inline-flex; align-items: center; gap: 6px; min-width: 38px; height: 38px; justify-content: center; padding: 0 8px; border: 0; border-radius: 9px; background: transparent; color: var(--leise); transition: background-color .12s var(--e-std), color .12s var(--e-std); }
.pal-zu:hover, .pal-zu:focus-visible { background: var(--mulde); color: var(--tinte); }
.pal-esc { font-size: .72rem; font-weight: 560; }
.pal-liste { flex: 1; min-height: 220px; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px 10px; transition: opacity .14s linear; }
.pal-liste.laedt { opacity: .55; }
.pal-titel { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px 4px; font-size: .76rem; font-weight: 600; color: var(--leise); }
.pal-zahl { font-variant-numeric: tabular-nums; font-weight: 560; }
.pal-klein { border: 0; background: transparent; padding: 0 2px; color: var(--leise); font-size: .76rem; font-weight: 560; border-radius: 6px; }
.pal-klein:hover, .pal-klein:focus-visible { color: var(--tinte); }
.pal-zeile { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 7px 10px; border-radius: 10px; cursor: pointer; transition: background-color .1s var(--e-std); }
.pal-zeile.aktiv { background: var(--wahl); }
.pal-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--mulde); color: var(--leise); }
.pal-text { flex: 1; min-width: 0; }
.pal-text b, .pal-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-text b { font-weight: 560; font-size: .95rem; }
.pal-text small { color: var(--leise); font-size: .82rem; }
.pal-pfeil { flex: none; display: grid; opacity: 0; color: var(--leise); transform: rotate(-90deg); transition: opacity .12s linear; }
.pal-zeile.aktiv .pal-pfeil { opacity: 1; }
.pal-zeile.alle { min-height: 38px; padding-left: 52px; color: var(--leise); }
.pal-zeile.alle .pal-text b { font-weight: 500; font-size: .88rem; }
.pal-skelett { padding: 8px 2px 0; }
.pal-skelett i { display: block; height: 46px; margin: 4px 0; border-radius: 10px; background: var(--mulde); opacity: .6; }
.pal-leer { padding: 30px 10px; text-align: center; color: var(--leise); overflow-wrap: anywhere; }
.pal-fuss { display: flex; gap: 16px; flex: none; padding: 9px 16px; border-top: 1px solid var(--linie); color: var(--leise); font-size: .78rem; }
.pal-fuss kbd { margin-right: 3px; }
@media (max-width: 899px) {
  dialog.palette { width: 100vw; max-width: 100vw; margin: 0; border-radius: 0 0 18px 18px; max-height: min(100dvh, 640px); padding-top: env(safe-area-inset-top); }
  .pal-fuss, .pal-esc { display: none; }
  .pal-kopf { height: 58px; }
  .pal-zu { min-width: 44px; height: 44px; }
  .pal-liste { min-height: 200px; }
  .suchfeld input[type=search] { font-size: 16px; }
}

/* Schmal: das Reiterband bleibt in der Karte und rollt bei Bedarf */
.kasten-kopf .knoepfe { max-width: 100%; min-width: 0; }
.kasten-kopf .teile { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.kasten-kopf .teile::-webkit-scrollbar { display: none; }
.teile button { white-space: nowrap; }


/* Admin-Bereich unter 900 px: Tabellen als Karten, kein Querwischen. Die Beschriftung kommt aus data-label der Zellen. */
@media (max-width: 899px) {
  .rm-admin .rollbar { overflow: visible; margin: 0; padding: 0; }
  .rm-admin .tabelle, .rm-admin .tabelle tbody { display: block; }
  .rm-admin .tabelle thead { display: none; }
  .rm-admin .tabelle tr { display: grid; gap: 2px; margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--linie); border-radius: 16px; background: var(--flaeche); }
  .rm-admin .tabelle tr:last-child { margin-bottom: 0; }
  .rm-admin .tabelle td, .rm-admin .tabelle td:last-child { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 5px 0; border-top: 0; min-width: 0; text-align: right; }
  .rm-admin .tabelle td::before { content: attr(data-label); flex: none; max-width: 42%; color: var(--leise); font-size: .8rem; font-weight: 560; text-align: left; }
  .rm-admin .tabelle td:first-child { display: block; text-align: left; padding-top: 2px; }
  .rm-admin .tabelle td:first-child::before { content: none; }
  .rm-admin .tabelle td:empty { display: none; }
  .rm-admin .tabelle td > * { min-width: 0; }
  .rm-admin .tabelle td.rechts, .rm-admin .tabelle td.zahlen { text-align: right; }
}

/* Reiterband, das über den Rand läuft: weicher Verlauf am Rand zeigt, dass man wischen kann (nur wo es wirklich überläuft) */
@property --rand-l { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --rand-r { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes rand-hinweis { 0% { --rand-l: 0px; --rand-r: 28px; } 8% { --rand-l: 28px; --rand-r: 28px; } 92% { --rand-l: 28px; --rand-r: 28px; } 100% { --rand-l: 28px; --rand-r: 0px; } }
@supports (animation-timeline: scroll()) {
  @media (max-width: 899px) {
    .kasten-kopf .teile { animation: rand-hinweis linear both; animation-timeline: scroll(self inline); transition: none;
      -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--rand-l), #000 calc(100% - var(--rand-r)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--rand-l), #000 calc(100% - var(--rand-r)), transparent 100%); }
  }
}

/* ---------- Mac koppeln (Code im Browser), Anträge, Darstellung, zweiter Schritt ---------- */
.kopplung-platz { display: grid; gap: 12px; margin-top: 14px; }
.kopplung-code { margin: 0; padding: 18px 16px; border-radius: 14px; background: var(--mulde); text-align: center; font-size: 2rem; font-weight: 600; letter-spacing: .14em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; user-select: all; }
.antraege .zeile { flex-wrap: wrap; }
.antraege .zeile .mitte b, .antraege .zeile .mitte small { white-space: normal; overflow: visible; }
.antrag-stand { font-size: .84rem; color: var(--leise); }
.thema { display: inline-grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px; border-radius: 12px; background: var(--mulde); margin-top: 6px; }
.thema button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--leise); font: inherit; font-size: .88rem; font-weight: 560; cursor: pointer;
  transition: background-color .15s var(--e-std), color .15s var(--e-std); }
.thema button.da { background: var(--flaeche); color: var(--tinte); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.thema button:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; }
.thema .symbol, .thema .bild { width: 16px; height: 16px; }
dialog.faktor-frisch { width: min(420px, calc(100vw - 32px)); }
@media (max-width: 899px) {
  .kopplung-code { font-size: 1.6rem; }
  .thema { display: grid; }
  .thema button { min-height: 44px; }
  .antraege .zeile .knoepfe { width: 100%; }
}
.zeile.mit-aktion { flex-wrap: wrap; }
@media (max-width: 899px) { .zeile.mit-aktion .knoepfe { width: 100%; } .zeile.mit-aktion .knoepfe .knopf { min-height: 44px; } }

/* Geräteliste am Handy: langer Text bricht um, der Knopf bleibt im Kasten */
@media (max-width: 899px) {
  .liste .zeile { flex-wrap: wrap; }
  .liste .zeile .mitte { flex: 1 1 60%; }
  .liste .zeile .mitte b, .liste .zeile .mitte small { white-space: normal; }
  .liste .zeile .hinten { white-space: normal; text-align: left; flex: 1 1 100%; }
}

/* B 7: laufende Gründe unter dem neuen Passwort, Platz für eine sichtbare Turnstile-Aufgabe (nur wenn Cloudflare eine verlangt) */
.pw-gruende { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; color: var(--schlecht); font-size: .84rem; }
.pw-gruende:empty { display: none; }
.ts-box { position: fixed; inset: auto 0 24px 0; display: flex; justify-content: center; z-index: 50; pointer-events: none; }
.ts-box > * { pointer-events: auto; }
