/* InsurancePlanner – Gestaltung von nfjobs/nfballett/nfcaltrack übernommen
   (Klassisch und Liquid Glass, Animationen). Farben: Blau als Akzent, Grün
   für Erledigtes, Rot für Liegengebliebenes. Hell/Dunkel: System-
   Voreinstellung, data-theme überschreibt. */
:root {
  --bg: #f6f7f9;
  --flaeche: #ffffff;
  --flaeche-2: #eef0f3;
  --text: #16181d;
  --leise: #5d636e;
  --rand: #e1e4e9;
  --akzent: #1d4ed8;
  --akzent-text: #ffffff;
  --warn: #d97706;
  --gefahr: #dc2626;
  --gut: #047857;
  --offen: #b45309;
  --kalt: #64748b;
  --ring-grund: #e5e7eb;
  --schatten: 0 1px 2px rgb(0 0 0 / .05), 0 6px 20px rgb(0 0 0 / .05);
  /* Federnde Kurve mit leichtem Überschwingen für Dinge, die „einrasten“
     (Zeiger, Knöpfe, Hinweis) – wie nftravel. Ältere Browser ohne linear()
     bekommen eine ähnliche Bézierkurve. */
  --feder: cubic-bezier(.34, 1.3, .64, 1);
  /* Wie iOS-Blätter: schnell los, weich aus, ohne Überschwingen. */
  --blatt: cubic-bezier(.32, .72, 0, 1);
  color-scheme: light;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --feder: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017 19.4%,
      1.067, 1.099 24.3%, 1.108 26%, 1.103 27.9%, 1.071 34%, 1.009 41.6%, .993 45%,
      .987 48.2%, .992 55.5%, 1.001 63.8%, 1.003 72%, 1);
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14171f; --flaeche: #1d212b; --flaeche-2: #262a32; --text: #e9eaee; --leise: #9aa1ad;
    --rand: #2d313a; --akzent: #93c5fd; --akzent-text: #0b1e46; --warn: #fbbf24; --gefahr: #f87171;
    --gut: #34d399; --offen: #fbbf24; --kalt: #94a3b8; --ring-grund: #2d313a;
    --schatten: 0 1px 2px rgb(0 0 0 / .4), 0 6px 20px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14171f; --flaeche: #1d212b; --flaeche-2: #262a32; --text: #e9eaee; --leise: #9aa1ad;
  --rand: #2d313a; --akzent: #93c5fd; --akzent-text: #0b1e46; --warn: #fbbf24; --gefahr: #f87171;
  --gut: #34d399; --offen: #fbbf24; --kalt: #94a3b8; --ring-grund: #2d313a;
  --schatten: 0 1px 2px rgb(0 0 0 / .4), 0 6px 20px rgb(0 0 0 / .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* iOS-Home-Screen-App mit black-translucent: ist die Seite kürzer als der
   Bildschirm, rechnet Safari die Höhe ohne Statusleiste und die feste
   Tab-Leiste rutscht um diesen Betrag nach oben. Mindesthöhe inkl. Statusleiste
   behebt das. */
html { -webkit-text-size-adjust: 100%; min-height: calc(100% + env(safe-area-inset-top)); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--akzent); }
h2 { font-size: 1.25rem; margin: .2rem 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }

/* --- Kopf --- */
.kopf {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: .5rem;
  padding: calc(.45rem + env(safe-area-inset-top)) .75rem .45rem;
  background: var(--flaeche); border-bottom: 1px solid var(--rand);
  transition: box-shadow .25s ease, background-color .25s ease;
}
.gescrollt .kopf { box-shadow: 0 6px 20px rgb(0 0 0 / .08); }
.marke { display: flex; align-items: center; gap: .45rem; font-weight: 650; color: var(--text); text-decoration: none; }
.punkt { width: .7rem; height: .7rem; border-radius: 50%; background: var(--akzent); }
.offline-badge { margin-left: auto; font-size: .75rem; background: var(--warn); color: #fff; padding: .1rem .45rem; border-radius: 1rem; }

.inhalt { max-width: 40rem; margin: 0 auto; padding: .75rem 1rem 6rem; }

/* --- Tab-Leiste unten (wie eine App) --- */
:root { --tabs-h: 3.6rem; }
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--flaeche); border-top: 1px solid var(--rand);
}
.tabs a {
  flex: 1; max-width: 10rem; height: var(--tabs-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  color: var(--leise); text-decoration: none; font-size: .72rem;
  -webkit-tap-highlight-color: transparent;
}
.tabs svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.aktiv { color: var(--akzent); font-weight: 600; }
.tabs a { transition: color .2s ease, transform .35s var(--feder); }
.tabs a:active { transform: scale(.92); transition-duration: .08s; }
/* Zeiger am aktiven Reiter (lib/darstellung.js, zeigerSetzen): oben ein
   Strich, er gleitet beim Wechsel hinüber. */
.mit-zeiger a { position: relative; z-index: 1; }
.tab-zeiger {
  position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: var(--akzent); border-radius: 2px; pointer-events: none;
}
.tab-zeiger.bereit { transition: transform .45s var(--feder), width .45s var(--feder); }
/* Mit Tab-Leiste: Inhalt, „+“ und Meldungen darüber. */
body:has(.tabs:not([hidden])) { padding-bottom: 0; }
body:has(.tabs:not([hidden])) .inhalt { padding-bottom: calc(var(--tabs-h) + 6rem + env(safe-area-inset-bottom)); }
body:has(.tabs:not([hidden])) .fab { bottom: calc(var(--tabs-h) + 1rem + env(safe-area-inset-bottom)); }
body:has(.tabs:not([hidden])) .toast { bottom: calc(var(--tabs-h) + 5.5rem + env(safe-area-inset-bottom)); }

/* --- Karten und Formulare --- */
.karte {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 1rem;
  padding: 1rem; margin: 0 0 .9rem; box-shadow: var(--schatten);
}
.karte.schmal { max-width: 26rem; margin: 2rem auto; }
.karte.deaktiviert { opacity: .7; }
details.karte > summary { cursor: pointer; list-style: none; }
details.karte > summary::-webkit-details-marker { display: none; }
details.karte > summary h3 { display: inline; }
details.karte > summary::after { content: '+'; float: right; color: var(--leise); font-size: 1.2rem; line-height: 1; }
details.karte[open] > summary::after { content: '−'; }
details.karte[open] > summary { margin-bottom: .6rem; }

.formular { display: flex; flex-direction: column; gap: .7rem; }
.feld { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; color: var(--leise); }
.feld > span:first-child { font-weight: 550; }
.raster2, .raster3 { display: grid; gap: .6rem; grid-template-columns: 1fr 1fr; }
.raster3 { grid-template-columns: 1fr 1fr 1fr; }

input, select, textarea, button, .knopf {
  font: inherit; color: var(--text); border-radius: .65rem;
}
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid var(--rand); background: var(--bg);
  font-size: 16px; /* iOS zoomt sonst beim Fokus */
}
textarea { resize: vertical; min-height: 5rem; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--akzent); outline-offset: -1px; }
button, .knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .55rem .9rem; border: 1px solid var(--rand); background: var(--flaeche-2);
  cursor: pointer; text-decoration: none; font-size: .95rem; min-height: 2.5rem;
  transition: background-color .15s ease, border-color .15s ease, transform .35s var(--feder);
}
/* Beim Drücken sofort klein, beim Loslassen federnd zurück. */
button:active:not(:disabled), .knopf:active { transform: scale(.95); transition-duration: .08s; }
button:disabled { opacity: .5; cursor: default; }
button.primaer, .knopf.primaer { background: var(--akzent); color: var(--akzent-text); border-color: transparent; font-weight: 600; }
button.gefahr { color: var(--gefahr); }
button.leicht { background: transparent; }
button.breit { width: 100%; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .5rem; }
.knopfreihe.klein button { padding: .3rem .55rem; min-height: 2rem; font-size: .85rem; }
.chip { padding: .3rem .7rem; min-height: 2rem; border-radius: 1rem; font-size: .85rem; }
.schritte { display: flex; flex-wrap: wrap; gap: .4rem; }
.haken { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.haken input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; flex: none; }
.zeile-form { display: flex; gap: .5rem; }
.zeile-form input { flex: 1; }
.training { margin: -.4rem 0 .8rem; }
.training-fuss { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .3rem .3rem 0; }
.token-feld { word-break: break-all; user-select: all; }
.link-feld { font-family: ui-monospace, monospace; font-size: .8rem !important; }

/* Segmentierte Auswahl (Slots, Darstellung) */
.segment { display: flex; background: var(--flaeche-2); border-radius: .7rem; padding: .2rem; gap: .2rem; }
.segment label { flex: 1; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span {
  display: block; text-align: center; padding: .4rem .2rem; border-radius: .5rem; cursor: pointer;
  font-size: .85rem; color: var(--leise);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .35s var(--feder);
}
.segment span:active { transform: scale(.95); transition-duration: .08s; }
.seg-titel { font-size: .85rem; color: var(--leise); margin: .8rem 0 .3rem; }
.seg-titel:first-of-type { margin-top: .2rem; }
.segment input:checked + span { background: var(--flaeche); color: var(--text); font-weight: 600; box-shadow: var(--schatten); }
.segment input:focus-visible + span { outline: 2px solid var(--akzent); }

.leise { color: var(--leise); }
.klein { font-size: .82rem; }
.mitte { text-align: center; }
.fehlertext { color: var(--gefahr); margin: 0; }
.hinweis { background: var(--flaeche-2); border-left: 3px solid var(--warn); padding: .5rem .7rem; border-radius: .4rem; font-size: .9rem; }
.leer-hinweis { padding: 1rem 0; }
.unsichtbar { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.seitenkopf { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .6rem; }
.zurueck { font-size: .9rem; text-decoration: none; }
.seitenkopf.zeilig { flex-direction: row; justify-content: space-between; align-items: center; }
.seitenkopf h2 { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }

/* --- Listen und Zeilen (wie nfcaltrack) --- */
.liste { list-style: none; margin: 0; padding: 0; }
.zeile { position: relative; border-bottom: 1px solid var(--rand); overflow: hidden; transition: opacity .3s ease; }
.zeile:last-child { border-bottom: none; }
.zeile-inhalt {
  position: relative; display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem;
  background: var(--flaeche); width: 100%; color: inherit; text-decoration: none;
}
.karte .liste .zeile-inhalt { padding-left: 0; padding-right: 0; }
.zeile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zeile-titel { overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: .35rem; }
.zeile-link { color: inherit; text-decoration: none; }
.zeile.weg { opacity: .35; }
details.karte[open] > :not(summary) { animation: aufklappen .3s var(--feder) both; }
@keyframes aufklappen { from { opacity: 0; transform: translateY(-.3rem); } to { opacity: 1; transform: none; } }

.fab {
  position: fixed; right: max(1.2rem, calc(50vw - 19rem)); bottom: calc(1.2rem + env(safe-area-inset-bottom));
  width: 3.6rem; height: 3.6rem; border-radius: 50%; font-size: 2rem; line-height: 1;
  background: var(--akzent); color: var(--akzent-text); border: none; box-shadow: 0 6px 20px rgb(0 0 0 / .25);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; z-index: 5;
}
.fab:active { transform: scale(.9); }

/* --- Dialog --- */
.dlg {
  border: 1px solid var(--rand); border-radius: 1rem; padding: 0; background: var(--flaeche); color: var(--text);
  width: min(30rem, calc(100vw - 1.5rem)); max-height: calc(100dvh - 2rem);
}
/* Auf- UND Zugehen wie nftravel: @starting-style liefert den Ausgangszustand
   beim Öffnen, `display`/`overlay` mit allow-discrete halten den Dialog beim
   Schließen so lange in der Oberfläche, bis er ausgeblendet ist (lib/dom.js
   entfernt ihn erst danach). Browser ohne das öffnen und schließen einfach
   ohne Übergang. */
.dlg {
  opacity: 0; transform: translateY(.6rem) scale(.96);
  transition: opacity .2s ease, transform .4s var(--feder),
    overlay .4s allow-discrete, display .4s allow-discrete;
}
.dlg[open] { opacity: 1; transform: none; }
@starting-style { .dlg[open] { opacity: 0; transform: translateY(.6rem) scale(.96); } }
.dlg::backdrop {
  background: rgb(0 0 0 / 0); backdrop-filter: blur(0);
  transition: background-color .25s ease, backdrop-filter .25s ease,
    overlay .4s allow-discrete, display .4s allow-discrete;
}
.dlg[open]::backdrop { background: rgb(0 0 0 / .45); backdrop-filter: blur(2px); }
@starting-style { .dlg[open]::backdrop { background: rgb(0 0 0 / 0); backdrop-filter: blur(0); } }

/* Handy: Blatt von unten wie in nftravel, Knöpfe als feste Fußzeile. */
@media (max-width: 560px) {
  .dlg {
    width: 100vw; max-width: 100vw; max-height: 92dvh;
    margin: auto 0 0; border-radius: 1rem 1rem 0 0; border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%); opacity: 1;
    transition: transform .45s var(--blatt), overlay .45s allow-discrete, display .45s allow-discrete;
  }
  .dlg[open] { transform: none; }
  @starting-style { .dlg[open] { transform: translateY(100%); opacity: 1; } }
  /* Tastatur offen (lib/dom.js): Blatt sitzt auf der Tastatur. */
  .dlg { margin-bottom: var(--tastatur, 0px); }
  .dlg { max-height: min(92dvh, calc(var(--sichtbar, 100dvh) - 1rem)); }
  .dlg menu { border-top: 1px solid var(--rand); }
  .dlg menu button { flex: 1; }
}
/* Höhe begrenzt nur der Dialog selbst (samt Rand und Safe-Area-Polster);
   das Formular füllt ihn, nur der Rumpf scrollt – die Knöpfe bleiben stehen. */
.dlg[open] { display: flex; flex-direction: column; overflow: hidden; }
.dlg form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.dlg h3 { padding: 1rem 1rem 0; margin: 0 0 .6rem; flex: none; }
.dlg-rumpf { padding: 0 1rem; overflow: auto; flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
.dlg menu { flex: none; display: flex; gap: .5rem; justify-content: flex-end; padding: .8rem 1rem; margin: 0; flex-wrap: wrap; }
.dlg menu .gefahr { margin-right: auto; }
.vorschau { font-variant-numeric: tabular-nums; margin: 0; }

/* --- Toast --- */
.toast {
  position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom)); transform: translate(-50%, 1rem);
  background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: .8rem; opacity: 0;
  transition: opacity .2s, transform .45s var(--feder); z-index: 50; display: flex; gap: .8rem; align-items: center;
  max-width: calc(100vw - 2rem); margin: 0;
}
.toast.zeigen { opacity: 1; transform: translate(-50%, 0); }
.toast:not(.zeigen) { transform: translate(-50%, 1rem) scale(.92); }
.toast.fehler { background: var(--gefahr); color: #fff; }
.toast-aktion { background: transparent; color: inherit; border: 1px solid currentColor; min-height: 0; padding: .2rem .6rem; }

.kreisel {
  width: 1rem; height: 1rem; flex: none; border-radius: 50%;
  border: 2px solid var(--ring-grund); border-top-color: var(--akzent); animation: drehen .8s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .kreisel { animation-duration: 2.4s; } }

/* --- Übergänge beim Umschalten (lib/darstellung.js, mitUebergang) ---
   Hell/Dunkel: die neue Darstellung wächst als Kreis aus der angetippten
   Auswahl. Andere Wechsel blenden einfach über. */
.vt-kreis::view-transition-old(root), .vt-kreis::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-kreis::view-transition-new(root) { animation: kreis .55s cubic-bezier(.4, 0, .2, 1); }
@keyframes kreis {
  from { clip-path: circle(0 at var(--vt-x) var(--vt-y)); }
  to { clip-path: circle(var(--vt-r) at var(--vt-x) var(--vt-y)); }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }

/* Ruhe: Gerät („Bewegung reduzieren“) oder Konto (Einstellungen →
   Animationen: Reduziert). Übergänge laufen dann praktisch sofort; nur der
   Ladekreisel dreht weiter, sonst sähe Warten wie Hängen aus. */
@media (prefers-reduced-motion: reduce) {
  *:not(.kreisel), *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
:root[data-bewegung="reduziert"] *:not(.kreisel), :root[data-bewegung="reduziert"] *::before,
:root[data-bewegung="reduziert"] *::after, :root[data-bewegung="reduziert"] ::backdrop {
  animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important;
}

/* „+“-Knopf: Symbol als SVG, genau mittig. */
.fab { padding: 0; }
.fab-plus svg { width: 1.7rem; height: 1.7rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

/* ==========================================================================
   Stil „Liquid Glass“ (Einstellungen → Darstellung, je Konto; data-stil="glas"
   am <html>) – dieselbe Gestaltung wie nftravel: farbige Flecken im
   Hintergrund, Flächen aus Milchglas mit hellem Glanzrand, Pillen-Knöpfe,
   schwebende Leisten. „Getönt“ (data-glas) macht das Glas deckender, wie die
   Wahl in iOS 26.1. Eingabefelder bleiben fast deckend: Beträge müssen
   sich gut lesen lassen.
   ========================================================================== */
:root[data-stil="glas"] {
  --bg: #f1f2fb;
  --flaeche: rgb(255 255 255 / .5);
  --flaeche-2: rgb(255 255 255 / .4);
  --rand: rgb(255 255 255 / .62);
  --ring-grund: rgb(255 255 255 / .55);
  --glas-kopf: rgb(255 255 255 / .55);
  --glas-feld: rgb(255 255 255 / .8);
  --glas-glanz: inset 0 1px 0 rgb(255 255 255 / .85), inset 0 -1px 0 rgb(255 255 255 / .25);
  --glas-blur: saturate(180%) blur(22px);
  --schatten: 0 8px 32px rgb(31 38 135 / .12), 0 1px 2px rgb(0 0 0 / .05);
  --hg-1: rgb(96 165 250 / .42); --hg-2: rgb(56 189 248 / .3); --hg-3: rgb(45 212 191 / .26); --hg-4: rgb(167 139 250 / .3);
}
:root[data-stil="glas"][data-glas="getoent"] {
  --flaeche: rgb(255 255 255 / .78); --flaeche-2: rgb(255 255 255 / .62); --glas-kopf: rgb(255 255 255 / .8);
}
@media (prefers-color-scheme: dark) {
  :root[data-stil="glas"]:not([data-theme="light"]) {
    --bg: #0c0d16;
    --flaeche: rgb(30 34 44 / .46); --flaeche-2: rgb(255 255 255 / .07); --rand: rgb(255 255 255 / .14);
    --ring-grund: rgb(255 255 255 / .1);
    --glas-kopf: rgb(24 27 36 / .5); --glas-feld: rgb(14 16 22 / .7);
    --glas-glanz: inset 0 1px 0 rgb(255 255 255 / .16), inset 0 -1px 0 rgb(255 255 255 / .04);
    --schatten: 0 8px 32px rgb(0 0 0 / .45);
    --hg-1: rgb(37 99 235 / .36); --hg-2: rgb(14 165 233 / .24); --hg-3: rgb(13 148 136 / .2); --hg-4: rgb(124 58 237 / .26);
  }
  :root[data-stil="glas"][data-glas="getoent"]:not([data-theme="light"]) {
    --flaeche: rgb(28 31 40 / .8); --flaeche-2: rgb(255 255 255 / .1); --glas-kopf: rgb(24 27 36 / .82);
  }
}
:root[data-stil="glas"][data-theme="dark"] {
  --bg: #0c0d16;
  --flaeche: rgb(30 34 44 / .46); --flaeche-2: rgb(255 255 255 / .07); --rand: rgb(255 255 255 / .14);
  --ring-grund: rgb(255 255 255 / .1);
  --glas-kopf: rgb(24 27 36 / .5); --glas-feld: rgb(14 16 22 / .7);
  --glas-glanz: inset 0 1px 0 rgb(255 255 255 / .16), inset 0 -1px 0 rgb(255 255 255 / .04);
  --schatten: 0 8px 32px rgb(0 0 0 / .45);
  --hg-1: rgb(37 99 235 / .36); --hg-2: rgb(14 165 233 / .24); --hg-3: rgb(13 148 136 / .2); --hg-4: rgb(124 58 237 / .26);
}
:root[data-stil="glas"][data-theme="dark"][data-glas="getoent"] {
  --flaeche: rgb(28 31 40 / .8); --flaeche-2: rgb(255 255 255 / .1); --glas-kopf: rgb(24 27 36 / .82);
}

/* Hintergrund: weiche Farbflecken, an denen sich das Glas bricht. Als
   festes Pseudo-Element statt background-attachment: fixed – das ignoriert
   Safari auf iOS. */
:root[data-stil="glas"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38rem 30rem at 0% 0%, var(--hg-1), transparent 70%),
    radial-gradient(34rem 28rem at 100% 18%, var(--hg-2), transparent 70%),
    radial-gradient(36rem 30rem at 10% 75%, var(--hg-3), transparent 70%),
    radial-gradient(30rem 26rem at 95% 100%, var(--hg-4), transparent 70%),
    var(--bg);
}

/* Glasflächen. Nur die großen bekommen Unschärfe – eine pro Zeile wäre auf
   dem Handy beim Scrollen spürbar. Zeilen darin sind nur durchscheinend. */
:root[data-stil="glas"] :is(.karte, .dlg, .gruppe-liste, .kachel) {
  background: var(--flaeche); border-color: var(--rand);
  box-shadow: var(--glas-glanz), var(--schatten);
  -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
}
:root[data-stil="glas"] :is(.karte, .dlg) { border-radius: 1.6rem; }
:root[data-stil="glas"] .gruppe-liste { border-radius: 1.3rem; }
:root[data-stil="glas"] .zeile { border-bottom-color: color-mix(in srgb, var(--leise) 18%, transparent); }
:root[data-stil="glas"] .zeile-inhalt { background: transparent; }
/* Beim Wischen deckend, sonst schiene das Rot zum Löschen durch die Zeile. */
:root[data-stil="glas"] .zeile.wischt .zeile-inhalt { background: var(--glas-feld); }
:root[data-stil="glas"] .dlg[open]::backdrop { background: rgb(0 0 0 / .25); backdrop-filter: blur(6px); }
:root[data-stil="glas"] .hinweis { background: var(--flaeche-2); }

/* Kopf: Glasleiste, unter der die Seite verschwimmt. */
:root[data-stil="glas"] .kopf {
  background: var(--glas-kopf); border-bottom-color: var(--rand);
  -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
}
:root[data-stil="glas"].gescrollt .kopf { box-shadow: var(--glas-glanz), 0 8px 24px rgb(0 0 0 / .1); }

/* Knöpfe als Glas-Pillen. Das Licht sitzt dort, wo Finger oder Maus sind
   (lib/darstellung.js) und leuchtet beim Drücken auf. :where hält die Regel
   schwach, damit die Sonderfälle darunter sie ohne Klimmzüge überschreiben. */
:root[data-stil="glas"] :where(button, .knopf, .chip):not(:where(.klein-knopf, .toast-aktion, .fab, .zeile-inhalt, .haken-knopf, .leer-zeile, .tag, .doku-oeffnen, .doku-weg)) {
  border-radius: 999px; border-color: var(--rand);
  background-color: var(--flaeche-2);
  background-image: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%),
    rgb(255 255 255 / var(--licht, 0)), transparent 70%);
  box-shadow: var(--glas-glanz);
  transition: background-color .2s ease, border-color .2s ease, --licht .3s ease, transform .4s var(--feder), box-shadow .2s ease;
}
:root[data-stil="glas"] :is(button, .knopf, .chip, .tabs a):hover { --licht: .35; }
:root[data-stil="glas"] :is(button, .knopf, .chip):not(:disabled):active { --licht: .7; transform: scale(1.05); transition-duration: .15s; }
:root[data-stil="glas"] button.leicht { background-color: transparent; box-shadow: none; border-color: transparent; }
:root[data-stil="glas"] :is(button.primaer, .knopf.primaer) {
  background-color: var(--akzent); color: var(--akzent-text); border-color: transparent;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 6px 18px color-mix(in srgb, var(--akzent) 35%, transparent);
}
:root[data-stil="glas"] .fab {
  background-image: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgb(255 255 255 / var(--licht, .25)), transparent 70%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 10px 28px color-mix(in srgb, var(--akzent) 40%, rgb(0 0 0 / .25));
  transition: --licht .3s ease, transform .4s var(--feder);
}
:root[data-stil="glas"] .fab:active { --licht: .6; transform: scale(1.08); }

/* Eingaben fast deckend. */
:root[data-stil="glas"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) {
  background: var(--glas-feld); border-color: var(--rand); border-radius: .9rem;
}
:root[data-stil="glas"] .segment { border-radius: 999px; background: var(--flaeche-2); box-shadow: var(--glas-glanz); }
:root[data-stil="glas"] .segment span { border-radius: 999px; }
:root[data-stil="glas"] .segment input:checked + span { background: var(--glas-feld); box-shadow: var(--glas-glanz), 0 2px 8px rgb(0 0 0 / .08); }

/* Hinweis unten als Glas-Pille. */
:root[data-stil="glas"] .toast:not(.fehler) {
  background: var(--glas-kopf); color: var(--text); border: 1px solid var(--rand); border-radius: 999px;
  box-shadow: var(--glas-glanz), var(--schatten);
  -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
}
:root[data-stil="glas"] .toast.fehler { border-radius: 999px; }

/* Reiterleiste schwebt als Pille über dem Inhalt, wie in iOS 26. Der Zeiger
   ist eine hellere Pille hinter dem aktiven Reiter. */
:root[data-stil="glas"] .tabs {
  left: .7rem; right: .7rem; bottom: calc(.5rem + env(safe-area-inset-bottom));
  max-width: 26rem; margin: 0 auto; padding: .25rem;
  border: 1px solid var(--rand); border-radius: 2rem;
  background: var(--glas-kopf); box-shadow: var(--glas-glanz), 0 10px 30px rgb(0 0 0 / .18);
  -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur);
}
:root[data-stil="glas"] .tabs a { height: calc(var(--tabs-h) - .5rem); border-radius: 1.8rem; }
:root[data-stil="glas"] .tab-zeiger {
  top: .25rem; bottom: .25rem; height: auto; border-radius: 1.8rem;
  background: color-mix(in srgb, var(--akzent) 20%, transparent);
  box-shadow: var(--glas-glanz), 0 2px 10px rgb(0 0 0 / .08);
}
:root[data-stil="glas"] body:has(.tabs:not([hidden])) .inhalt { padding-bottom: calc(var(--tabs-h) + 7rem + env(safe-area-inset-bottom)); }
:root[data-stil="glas"] body:has(.tabs:not([hidden])) .fab { bottom: calc(var(--tabs-h) + 1.6rem + env(safe-area-inset-bottom)); }
:root[data-stil="glas"] body:has(.tabs:not([hidden])) .toast { bottom: calc(var(--tabs-h) + 6.2rem + env(safe-area-inset-bottom)); }

/* Blatt von unten auf dem Handy: oben stark gerundet. */
@media (max-width: 560px) {
  :root[data-stil="glas"] .dlg { border-radius: 1.8rem 1.8rem 0 0; }
  :root[data-stil="glas"] .dlg menu { border-top-color: var(--rand); }
}

/* Barrierefreiheit: „Transparenz reduzieren“ → deckende Flächen. */
@media (prefers-reduced-transparency: reduce) {
  :root[data-stil="glas"] { --flaeche: #ffffff; --flaeche-2: #eef0f3; --glas-kopf: #ffffff; }
  :root[data-stil="glas"][data-theme="dark"] { --flaeche: #1e2128; --flaeche-2: #262a32; --glas-kopf: #1e2128; }
  :root[data-stil="glas"] * { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}

/* --licht als echte Zahl, damit der Glanz weich ein- und ausblendet statt
   zu springen. Ohne @property (ältere Browser) springt er eben. */
@property --licht { syntax: "<number>"; inherits: false; initial-value: 0; }

.liste-kopf { list-style: none; padding: .2rem .2rem .3rem; }

/* „+“-Menü (lib/ui.js, plusKnopf): Knöpfe schweben gestaffelt über dem „+“ auf. */
.fab-plus svg { transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
.fab-plus.offen svg { transform: rotate(45deg); }
.fab-plus.offen { z-index: 7; }
.speeddial-schleier {
  position: fixed; inset: 0; z-index: 6; background: rgb(0 0 0 / .35);
  opacity: 0; transition: opacity .2s ease-out;
}
.speeddial-schleier.offen { opacity: 1; }
.speeddial {
  position: fixed; z-index: 7; display: flex; flex-direction: column; align-items: flex-end; gap: .6rem;
  pointer-events: none;
}
.speeddial.offen { pointer-events: auto; }
/* Keyframes statt transition: die allgemeine Knopf-Regel im Glas-Stil
   überschreibt `transition`. Nacheinander von unten nach oben; nur opacity +
   transform, damit es flüssig bleibt. */
.speeddial-knopf {
  padding: .65rem 1.1rem; border: 1px solid var(--rand); border-radius: 999px;
  background: var(--flaeche); color: var(--text); font-weight: 600; white-space: nowrap;
  box-shadow: 0 6px 18px rgb(0 0 0 / .25);
  opacity: 0;
}
@keyframes speeddial-rein {
  from { opacity: 0; transform: translate3d(0, .9rem, 0); }
  to { opacity: 1; transform: none; }
}
.speeddial.offen .speeddial-knopf { animation: speeddial-rein .16s cubic-bezier(.2, .8, .2, 1) both; }
.speeddial.offen .speeddial-knopf:nth-last-child(1) { animation-delay: 0s; }
.speeddial.offen .speeddial-knopf:nth-last-child(2) { animation-delay: .04s; }
.speeddial.offen .speeddial-knopf:nth-last-child(3) { animation-delay: .08s; }
/* Schließen: alle zusammen kurz ausblenden. */
.speeddial:not(.offen) .speeddial-knopf { opacity: 0; transition: opacity .12s ease-out !important; }
.speeddial-knopf:active { transform: scale(.96); }
:root[data-stil="glas"] .speeddial-knopf { background: var(--flaeche); background-image: none; }


/* ==========================================================================
   InsurancePlanner: Fortschritt, Termin-Zeilen mit Haken, Kalender, Erledigt
   ========================================================================== */
.gruppe-liste { background: var(--flaeche); border: 1px solid var(--rand); border-radius: .9rem; overflow: hidden; box-shadow: var(--schatten); margin: 0; }
.klein-knopf { min-height: 2rem; padding: .25rem .7rem; font-size: .85rem; }
.karten-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .25rem; }
.karten-kopf h3 { margin: 0; }
.werkzeuge { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .9rem; }
.chip.gewaehlt { background: var(--akzent); color: var(--akzent-text); border-color: transparent; font-weight: 600; }
:root[data-stil="glas"] .chip.gewaehlt { background-color: var(--akzent); color: var(--akzent-text); }
.fuer-wahl { margin: 0 0 .9rem; }
.werkzeuge .fuer-wahl { margin: 0; }

/* Personen: Kürzel im Farbkreis, Farbe je Konto. */
:root { --p0: #2563eb; --p1: #db2777; --p2: #059669; --p3: #d97706; --p4: #7c3aed; --p5: #0891b2; }
.person-marke {
  flex: none; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; margin-top: .1rem; border-radius: 50%;
  font-size: .66rem; font-weight: 750; letter-spacing: .02em; color: #fff; background: var(--pf, var(--leise));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .3);
}
.p-0 { --pf: var(--p0); } .p-1 { --pf: var(--p1); } .p-2 { --pf: var(--p2); }
.p-3 { --pf: var(--p3); } .p-4 { --pf: var(--p4); } .p-5 { --pf: var(--p5); }

/* --- Fortschritt heute: Ring mit „2/5“ --- */
.fortschritt { display: flex; align-items: center; gap: .9rem; }
.fortschritt-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.ring { position: relative; flex: none; width: 3.5rem; height: 3.5rem; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring-grund { stroke: var(--ring-grund); }
.ring-wert { stroke: var(--akzent); stroke-linecap: round; transition: stroke .4s ease; }
.ring.voll .ring-wert { stroke: var(--gut); }
.ring-zahl { position: absolute; inset: 0; display: grid; place-items: center; font-size: .78rem; font-weight: 750; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-bewegung="reduziert"]) .ring.voll { animation: ring-pop .6s var(--feder) .5s both; }
}
@keyframes ring-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: none; } }

/* --- Tage --- */
.tag-karte { padding-bottom: .5rem; }
.tag-karte.ist-heute h3 { color: var(--akzent); }
.ueberfaellig-karte { border-left: 4px solid var(--gefahr); }
.ueberfaellig-karte h3 { color: var(--gefahr); }
:root[data-stil="glas"] .ueberfaellig-karte { border-left: 1px solid var(--rand); box-shadow: var(--glas-glanz), inset 4px 0 0 var(--gefahr), var(--schatten); }
.spaeter-link { display: block; text-align: center; margin: .2rem 0 .8rem; text-decoration: none; }
.leer-zeile {
  width: 100%; justify-content: space-between; margin: .35rem 0 .4rem; padding: .65rem .8rem;
  background: transparent; border: 1px dashed color-mix(in srgb, var(--leise) 35%, transparent); border-radius: .9rem;
}
.leer-plus { color: var(--akzent); font-weight: 600; font-size: .88rem; }

/* --- Termin-Zeile: Haken | Uhrzeit | Was / Notiz | Person --- */
.termin-zeile { align-items: flex-start; gap: .35rem; padding-top: .45rem; padding-bottom: .45rem; }
.gruppe-liste .termin-zeile { padding-left: .35rem; padding-right: .8rem; }
.termin-text {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 4.1rem 1fr; column-gap: .4rem; align-items: baseline;
  padding: .35rem 0; cursor: pointer; border-radius: .5rem; -webkit-tap-highlight-color: transparent;
}
.termin-text:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.termin-text > * { grid-column: 2; min-width: 0; }
.termin-text > .termin-zeit { grid-column: 1; grid-row: 1 / span 2; }
.termin-text:has(> .termin-zeit[hidden]) { grid-template-columns: 1fr; column-gap: 0; }
.termin-text:has(> .termin-zeit[hidden]) > * { grid-column: 1; }
.termin-zeit { font-weight: 680; font-size: .9rem; color: var(--akzent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.termin-zeit.ganztags { font-size: .74rem; font-weight: 600; color: var(--leise); }
.termin-titel { white-space: normal; font-weight: 560; line-height: 1.3; overflow-wrap: anywhere; transition: color .25s ease; }
.termin-notiz { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.erledigt-info { color: var(--gut); font-weight: 550; margin-top: .1rem; }
.ueberfaellig .termin-zeit { color: var(--gefahr); }
.termin.abgehakt .termin-titel { color: var(--leise); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--leise) 70%, transparent); }
.termin.abgehakt .termin-zeit { color: var(--leise); }

/* Haken: großes Ziel für den Daumen, Kreis füllt sich grün, Strich zeichnet sich. */
.haken-knopf {
  flex: none; width: 2.6rem; height: 2.6rem; min-height: 0; margin: -.05rem 0 0 -.4rem; padding: 0;
  background: transparent; border: none; border-radius: 50%; -webkit-tap-highlight-color: transparent;
}
.haken-knopf svg { width: 1.6rem; height: 1.6rem; overflow: visible; }
.haken-kreis { fill: transparent; stroke: color-mix(in srgb, var(--leise) 65%, transparent); stroke-width: 1.8; transition: fill .25s ease, stroke .25s ease; }
.haken-strich { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .3s ease .08s; }
.haken-knopf:hover .haken-kreis { stroke: var(--gut); }
.ueberfaellig .haken-kreis { stroke: color-mix(in srgb, var(--gefahr) 70%, transparent); }
.abgehakt .haken-kreis { fill: var(--gut); stroke: var(--gut); }
.abgehakt .haken-strich { stroke-dashoffset: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .haken-strich { stroke: #0b1a12; } }
:root[data-theme="dark"] .haken-strich { stroke: #0b1a12; }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-bewegung="reduziert"]) .abgehakt .haken-knopf svg { animation: haken-pop .45s var(--feder); }
}
@keyframes haken-pop { 0% { transform: scale(.7); } 100% { transform: none; } }
.haken-knopf:active:not(:disabled) svg { transform: scale(.88); }
.haken-knopf:disabled { opacity: 1; }

/* --- Kalender --- */
.monat-titel { margin: 0; }
.monat-knoepfe { gap: .3rem; flex-wrap: nowrap; }
.rund { width: 2.4rem; height: 2.4rem; min-height: 0; padding: 0; border-radius: 50%; font-size: 1.35rem; line-height: 1; }
.monat-karte { padding: .55rem .45rem .45rem; touch-action: pan-y; }
.monat { display: grid; grid-template-columns: repeat(7, 1fr); gap: .15rem; }
.wt { text-align: center; font-size: .7rem; font-weight: 650; color: var(--leise); padding: .1rem 0 .25rem; }
.tag {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .2rem;
  min-height: 3rem; padding: .35rem 0 .3rem; background: transparent; border: none; border-radius: .8rem;
  font-size: .95rem; transition: background-color .2s ease, color .2s ease, transform .35s var(--feder);
}
.tag-zahl { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; font-variant-numeric: tabular-nums; line-height: 1; }
.tag.fremd { opacity: .35; }
.tag.we .tag-zahl { color: var(--leise); }
.tag.heute .tag-zahl { color: var(--akzent); font-weight: 750; box-shadow: inset 0 0 0 1.5px var(--akzent); }
.tag.gewaehlt .tag-zahl { background: var(--akzent); color: var(--akzent-text); font-weight: 700; box-shadow: none; }
.tag:hover:not(.gewaehlt) { background: var(--flaeche-2); }
.punkte-reihe { display: flex; gap: 3px; height: 5px; }
.pkt { width: 5px; height: 5px; border-radius: 50%; background: var(--akzent); }
.pkt.fertig { background: color-mix(in srgb, var(--gut) 60%, transparent); }
.tag.rueckstand .pkt:not(.fertig) { background: var(--gefahr); }

/* --- Erledigt --- */
.gruppe { margin-bottom: 1rem; }
.gruppe-titel { display: flex; align-items: baseline; gap: .5rem; font-size: .95rem; margin: .2rem .35rem .45rem; }
:root[data-stil="glas"] .gruppe-liste { border-radius: 1.3rem; }

/* --- Dialog „Termin“ --- */
.schnellwahl { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: -.3rem; }
.zeit-zeile { display: flex; align-items: flex-end; gap: .5rem; }
.zeit-zeile .feld { flex: 1; }
.zeit-zeile .klein-knopf { margin-bottom: .3rem; }
.feld .segment { flex-wrap: wrap; }
.feld .segment span { color: var(--leise); }
.feld .segment input:checked + span { color: var(--text); }
input[type=date], input[type=time] { min-height: 2.75rem; -webkit-appearance: none; appearance: none; text-align: left; }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; }

@media (max-width: 380px) {
  .termin-text { grid-template-columns: 3.4rem 1fr; }
  .tag { min-height: 2.7rem; }
}
.seitenkopf > p { margin: 0; }
.termin-datum { display: block; font-size: .72rem; font-weight: 650; line-height: 1.2; }

/* ==========================================================================
   Dokumente: Marke in der Zeile, Liste im Termin, Betrachter
   ========================================================================== */
/* Strich-Symbole (lib/dokumente.js, symbol) wie die Reiter. */
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.12em; }
.anhang-marke {
  display: inline-flex; align-items: center; gap: .15rem; margin-left: .35rem; vertical-align: .05em;
  font-size: .72rem; font-weight: 650; color: var(--leise); white-space: nowrap; text-decoration: none;
}
.anhang-marke .icon { width: .95em; height: .95em; }

.dokumente-feld { display: flex; flex-direction: column; gap: .5rem; color: var(--text); font-size: 1rem; }
.doku-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.doku-liste:empty { display: none; }
.doku {
  display: flex; align-items: center; gap: .3rem; padding: .3rem .3rem .3rem .4rem;
  border: 1px solid var(--rand); border-radius: .8rem; background: var(--bg);
}
:root[data-stil="glas"] .doku { background: var(--glas-feld); border-radius: 1rem; }
.doku-oeffnen {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; justify-content: flex-start; text-align: left;
  padding: .15rem; min-height: 0; border: none; background: transparent; color: inherit; font-size: .92rem;
}
.doku-text { display: flex; flex-direction: column; min-width: 0; }
.doku-name { font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doku-weg {
  flex: none; width: 2.2rem; height: 2.2rem; min-height: 0; padding: 0; border: none; border-radius: 50%;
  background: transparent; color: var(--leise);
}
.doku-weg:hover { color: var(--gefahr); background: color-mix(in srgb, var(--gefahr) 10%, transparent); }
.doku-weg .icon { width: 1.1rem; height: 1.1rem; }
.doku-icon {
  flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: .55rem;
  font-size: .62rem; font-weight: 800; letter-spacing: .03em; color: #fff; background: var(--kalt);
}
.doku-icon.a-pdf { background: #dc2626; }
.doku-icon.a-wort { background: #2563eb; }
.doku-icon.a-tabelle { background: #16a34a; }
.doku-bild { object-fit: cover; background: var(--flaeche-2); }
.doku-hinzu { align-self: flex-start; position: relative; }
.doku.laedt { opacity: .85; }
.balken { display: block; height: .3rem; margin-top: .3rem; border-radius: 1rem; background: var(--ring-grund); overflow: hidden; width: 9rem; max-width: 100%; }
.balken-wert { display: block; height: 100%; width: 0; background: var(--akzent); border-radius: inherit; transition: width .2s ease; }

/* Betrachter: Vollbild über der App, dunkel wie eine Fotoansicht. */
.betrachter {
  position: fixed; inset: 0; z-index: 60; flex-direction: column;
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: none;
  background: rgb(12 14 20 / .96); color: #f1f3f7;
  opacity: 0; transform: scale(.98); transition: opacity .2s ease, transform .3s var(--blatt);
}
.betrachter[open] { display: flex; }
.betrachter::backdrop { background: transparent; }
.betrachter.offen { opacity: 1; transform: none; }
@supports (backdrop-filter: blur(1px)) { .betrachter { background: rgb(12 14 20 / .88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); } }
.betrachter-offen, .betrachter-offen body { overflow: hidden; }
.betrachter-kopf {
  display: flex; align-items: center; gap: .5rem; flex: none;
  padding: calc(.4rem + env(safe-area-inset-top)) .5rem .4rem;
}
.betrachter-titel { flex: 1; min-width: 0; text-align: center; font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.betrachter .betrachter-knopf {
  flex: none; width: 2.6rem; height: 2.6rem; min-height: 0; padding: 0; border-radius: 50%;
  background: rgb(255 255 255 / .12); background-image: none; border: 1px solid rgb(255 255 255 / .16); color: #fff; box-shadow: none;
}
.betrachter-knopf .icon { width: 1.25rem; height: 1.25rem; }
.betrachter-rumpf {
  flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  padding: .3rem .5rem calc(1rem + env(safe-area-inset-bottom));
}
.betrachter-bild { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; border-radius: .4rem; }
.pdf-seite { max-width: 100%; height: auto; background: #fff; border-radius: .2rem; box-shadow: 0 4px 18px rgb(0 0 0 / .4); }
.betrachter .leise { color: rgb(241 243 247 / .65); }
.betrachter-text {
  width: 100%; max-width: 50rem; margin: 0; padding: 1rem; white-space: pre-wrap; overflow-wrap: anywhere;
  background: #fff; color: #111; border-radius: .4rem; font: .85rem/1.45 ui-monospace, monospace;
}
.betrachter-laedt { margin: auto; display: flex; align-items: center; gap: .6rem; }
.betrachter-sonst { margin: auto; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; padding: 1rem; max-width: 22rem; }
.betrachter-sonst .doku-icon { width: 4.2rem; height: 4.2rem; font-size: .9rem; border-radius: .9rem; margin-bottom: .4rem; }
.betrachter-sonst .doku-name { white-space: normal; overflow-wrap: anywhere; margin: 0; }
.betrachter-sonst .knopfreihe { justify-content: center; margin-top: .8rem; }
.betrachter-sonst button:not(.primaer) { background: rgb(255 255 255 / .12); color: #fff; border-color: rgb(255 255 255 / .16); }

/* Verwaltung: Name oben, Knöpfe darunter – nebeneinander wird es zu eng. */
.benutzer-zeile { flex-wrap: wrap; row-gap: .3rem; }
.benutzer-zeile .zeile-text { flex-basis: 100%; }
.benutzer-zeile .knopfreihe { margin-left: -.55rem; }
