/* nfoutfit – Farben als Variablen, Hell/Dunkel wie nfcaltrack/nftravel:
   System-Voreinstellung, data-theme am <html> überschreibt.
   Grundgerüst aus nfsubs übernommen, Akzent Rosé. */
:root {
  --bg: #f6f7f9;
  --flaeche: #ffffff;
  --flaeche-2: #eef0f3;
  --text: #16181d;
  --leise: #5d636e;
  --rand: #e1e4e9;
  --akzent: #be185d;
  --akzent-text: #ffffff;
  --warn: #ea580c;
  --gefahr: #dc2626;
  --gut: #15803d;
  --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/nfcaltrack. Ä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: #14151b; --flaeche: #1d1f27; --flaeche-2: #262a32; --text: #e9eaee; --leise: #9aa1ad;
    --rand: #2d313a; --akzent: #f472b6; --akzent-text: #2a0717; --warn: #fb923c; --gefahr: #f87171;
    --gut: #4ade80; --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: #14151b; --flaeche: #1d1f27; --flaeche-2: #262a32; --text: #e9eaee; --leise: #9aa1ad;
  --rand: #2d313a; --akzent: #f472b6; --akzent-text: #2a0717; --warn: #fb923c; --gefahr: #f87171;
  --gut: #4ade80; --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; }
details:is(.karte, .mehr)[open] > :not(summary) { animation: aufklappen .3s var(--feder) both; }
@keyframes aufklappen { from { opacity: 0; transform: translateY(-.3rem); } to { opacity: 1; transform: none; } }

.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; flex-wrap: wrap; gap: .5rem; }
.zeile-form input { flex: 1; }
.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; }

/* --- 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; } }
  .dlg form { max-height: 92dvh; }
  .dlg menu { border-top: 1px solid var(--rand); }
  .dlg menu button { flex: 1; }
}
.dlg form { display: flex; flex-direction: column; max-height: calc(100dvh - 2rem); }
.dlg h3 { padding: 1rem 1rem 0; margin: 0 0 .6rem; }
.dlg-rumpf { padding: 0 1rem; overflow: auto; }
.dlg menu { 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; }


/* ========================================================================
   nfoutfit
   ======================================================================== */
.zahl { font-variant-numeric: tabular-nums; }
.seitenkopf.zeilig { flex-direction: row; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.seitenkopf.zeilig h2 { margin: 0; }
.abschnitt { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); margin: 1.2rem .2rem .45rem; font-weight: 600; }
.klein-segment { flex: none; }
.klein-segment span { padding: .3rem .8rem; }

/* --- Listen --- */
.liste { list-style: none; margin: 0; padding: 0; }
.gruppe { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 1rem; overflow: hidden; box-shadow: var(--schatten); margin-bottom: .9rem; }
.zeile { border-bottom: 1px solid var(--rand); }
.zeile:last-child { border-bottom: none; }
.zeile-inhalt { display: flex; align-items: center; gap: .7rem; padding: .65rem .85rem; color: inherit; text-decoration: none; }
a.zeile-inhalt:hover { background: var(--flaeche-2); }
.karte .liste .zeile-inhalt { padding-left: 0; padding-right: 0; }
.zeile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.zeile-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.zeile-unter { font-size: .8rem; color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.ort-treffer { justify-content: flex-start; border: none; border-radius: 0; min-height: 0; }

/* Marken für Merkmale und Hinweise */
.marke-klein { display: inline-block; font-size: .72rem; font-weight: 600; padding: .1rem .45rem; border-radius: .4rem; background: var(--flaeche-2); color: var(--leise); }
.merkmale { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }

/* --- Fotos --- */
/* Outfit-Fotos sind meist Spiegel-Selfies im Hochformat: alles in 3:4,
   der Ausschnitt sitzt oben (Gesicht und Oberteil wichtiger als Schuhe). */
.foto { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 30%; background: var(--flaeche-2); border-radius: .8rem; }
.foto.mini { width: 2.8rem; flex: none; border-radius: .5rem; }
.foto-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .55rem; }
.foto-kachel { position: relative; display: block; color: inherit; text-decoration: none; transition: transform .35s var(--feder); }
.foto-kachel:active { transform: scale(.96); transition-duration: .08s; }
.foto-kachel .foto { box-shadow: var(--schatten); }
.foto-kachel.ausgegraut .foto { filter: grayscale(.9); opacity: .55; }
.foto-unter {
  position: absolute; left: .35rem; bottom: .35rem; font-size: .7rem; font-weight: 600; padding: .1rem .4rem;
  border-radius: .4rem; background: rgb(0 0 0 / .5); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.favorit-punkt { position: absolute; right: .35rem; top: .35rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / .45); }
.favorit-punkt svg, .favorit-gross svg { width: 1rem; height: 1rem; fill: #fbbf24; stroke: #fbbf24; stroke-width: 1.5; stroke-linejoin: round; }
.favorit-gross svg { width: 1.4rem; height: 1.4rem; }

.detail-foto { margin: 0 auto .9rem; max-width: 26rem; }
.detail-foto .foto { border-radius: 1.1rem; box-shadow: var(--schatten); aspect-ratio: auto; max-height: 70dvh; object-fit: contain; background: transparent; }
.detail-titel { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.detail-titel h2 { margin: 0; }
.notiz { white-space: pre-wrap; margin: .4rem 0; }
.aktionen { display: flex; flex-direction: column; gap: .5rem; }
.aktionen button, .aktionen .knopf { justify-content: flex-start; }
:is(.aktionen, .vorschlag-fuss, .vorschlag, .karte) svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- Wetter --- */
.wetter { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; }
.wetter-symbol { font-size: 2.4rem; line-height: 1; }
.wetter-text { display: flex; flex-direction: column; min-width: 0; }
.wetter-grad { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.wetter-hinweis { flex: 1 1 100%; margin: .4rem 0 0; border-left-color: var(--akzent); }

/* --- Vorschläge: auf dem Handy nebeneinander zum Wischen --- */
.vorschlaege {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 19rem); gap: .8rem;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 1rem;
  margin: 0 -1rem .6rem; padding: .2rem 1rem 1rem; scrollbar-width: none;
}
.vorschlaege::-webkit-scrollbar { display: none; }
.vorschlag { scroll-snap-align: start; margin: 0; padding: .6rem; display: flex; flex-direction: column; gap: .55rem; }
.vorschlag-foto { display: block; }
.vorschlag-text { display: flex; flex-direction: column; gap: .1rem; padding: 0 .2rem; min-width: 0; }
.vorschlag-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vorschlag-fuss { display: flex; flex-direction: column; gap: .5rem; }
.vorschlag-fuss p { margin: 0; }
@media (min-width: 640px) {
  .vorschlaege { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0 0 .6rem; padding: .2rem 0 1rem; }
}
.gewaehlt { display: flex; flex-direction: column; gap: .6rem; }
.gewaehlt .seg-titel { margin: 0; }
.gewaehlt-foto { display: block; max-width: 22rem; width: 100%; margin: 0 auto; }

/* --- Auswahl-Chips (Wetter, Anlass) --- */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-wahl { position: relative; }
.chip-wahl input { position: absolute; opacity: 0; pointer-events: none; }
.chip-wahl .chip {
  display: inline-flex; align-items: center; border: 1px solid var(--rand); background: var(--flaeche-2); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .35s var(--feder);
}
.chip-wahl .chip:active { transform: scale(.94); transition-duration: .08s; }
.chip-wahl input:checked + .chip { background: var(--akzent); color: var(--akzent-text); border-color: transparent; font-weight: 600; }
.chip-wahl input:focus-visible + .chip { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* --- Formular --- */
.foto-feld {
  position: relative; display: grid; place-items: center; max-width: 18rem; width: 100%; margin: 0 auto; cursor: pointer;
  aspect-ratio: 3 / 4; border-radius: 1rem; border: 2px dashed var(--rand); background: var(--flaeche); overflow: hidden;
}
.foto-feld .foto { position: absolute; inset: 0; height: 100%; border-radius: 0; }
.foto-platzhalter { display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--leise); font-size: .9rem; text-align: center; padding: 1rem; }
.foto-platzhalter svg { width: 2.4rem; height: 2.4rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.foto-feld-knopf {
  position: absolute; bottom: .6rem; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font-size: .82rem; font-weight: 600; padding: .3rem .8rem; border-radius: 1rem; background: rgb(0 0 0 / .55); color: #fff;
}
.foto-feld:has(.foto[hidden]) .foto-feld-knopf { display: none; }
.formular-fuss { display: flex; gap: .5rem; position: sticky; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + .5rem); }
.formular-fuss button { flex: 1; }

/* --- Filter --- */
.werkzeug { display: flex; flex-direction: column; gap: .55rem; margin-bottom: .8rem; }
.filterreihe { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.filterreihe select { flex: 1; width: auto; padding: .45rem .5rem; font-size: .85rem !important; }
.filterreihe .haken { flex: 1; }

/* --- Plus-Knopf --- */
.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%; padding: 0;
  background: var(--akzent); color: var(--akzent-text); border: none; box-shadow: 0 6px 20px rgb(0 0 0 / .25); z-index: 5;
}
.fab:active { transform: scale(.9); }
.fab svg { width: 1.7rem; height: 1.7rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

.leer { text-align: center; padding: 2rem 1.2rem; }
.leer p { color: var(--leise); }
.leer-icon { width: 4rem; height: 4rem; margin: 0 auto .8rem; border-radius: 1.2rem; display: grid; place-items: center; background: color-mix(in srgb, var(--akzent) 14%, transparent); color: var(--akzent); }
.leer-icon svg { width: 2rem; height: 2rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.klein-knopf { min-height: 0; padding: .2rem .5rem; border: none; color: var(--akzent); background: transparent; margin-left: .3rem; }

/* --- Ü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. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
:root[data-bewegung="reduziert"] *, :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;
}

/* ==========================================================================
   Stil „Liquid Glass“ (Einstellungen → Darstellung, je Konto; data-stil="glas"
   am <html>) – dieselbe Gestaltung wie nftravel und nfcaltrack: 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 und Daten müssen sich gut lesen lassen.
   ========================================================================== */
:root[data-stil="glas"] {
  --bg: #fbeff4;
  --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(157 23 77 / .12), 0 1px 2px rgb(0 0 0 / .05);
  --hg-1: rgb(244 114 182 / .45); --hg-2: rgb(167 139 250 / .4); --hg-3: rgb(251 191 36 / .28); --hg-4: rgb(45 212 191 / .28);
}
: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: #0d0c16;
    --flaeche: rgb(32 31 46 / .46); --flaeche-2: rgb(255 255 255 / .07); --rand: rgb(255 255 255 / .14);
    --ring-grund: rgb(255 255 255 / .1);
    --glas-kopf: rgb(26 25 38 / .5); --glas-feld: rgb(15 14 24 / .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(190 24 93 / .42); --hg-2: rgb(109 40 217 / .36); --hg-3: rgb(217 119 6 / .2); --hg-4: rgb(13 148 136 / .24);
  }
  :root[data-stil="glas"][data-glas="getoent"]:not([data-theme="light"]) {
    --flaeche: rgb(30 29 42 / .8); --flaeche-2: rgb(255 255 255 / .1); --glas-kopf: rgb(26 25 38 / .82);
  }
}
:root[data-stil="glas"][data-theme="dark"] {
  --bg: #0d0c16;
  --flaeche: rgb(32 31 46 / .46); --flaeche-2: rgb(255 255 255 / .07); --rand: rgb(255 255 255 / .14);
  --ring-grund: rgb(255 255 255 / .1);
  --glas-kopf: rgb(26 25 38 / .5); --glas-feld: rgb(15 14 24 / .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(190 24 93 / .42); --hg-2: rgb(109 40 217 / .36); --hg-3: rgb(217 119 6 / .2); --hg-4: rgb(13 148 136 / .24);
}
:root[data-stil="glas"][data-theme="dark"][data-glas="getoent"] {
  --flaeche: rgb(30 29 42 / .8); --flaeche-2: rgb(255 255 255 / .1); --glas-kopf: rgb(26 25 38 / .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 {
  /* Über den Rand hinaus: In Safari (iOS 26) und In-App-Browsern zeichnet die
     Seite auch unter Adressleiste und eingeklappter Werkzeugleiste – mit
     inset: 0 blieben dort dunkle Streifen ohne Flecken. */
  content: ""; position: fixed; inset: -12rem 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) {
  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 { border-radius: 1.3rem; }
:root[data-stil="glas"] .zeile { border-bottom-color: color-mix(in srgb, var(--leise) 18%, transparent); }
:root[data-stil="glas"] a.zeile-inhalt:hover { background: color-mix(in srgb, var(--flaeche-2) 70%, transparent); }
:root[data-stil="glas"] .dlg[open]::backdrop { background: rgb(0 0 0 / .25); backdrop-filter: blur(6px); }
:root[data-stil="glas"] :is(.hinweis, .marke-klein) { background: var(--flaeche-2); }
/* Fotos im Glas: weicher gerundet, mit hellem Rand wie die Flächen. */
:root[data-stil="glas"] .foto { border-radius: 1.1rem; }
:root[data-stil="glas"] .foto.mini { border-radius: .6rem; }
:root[data-stil="glas"] .foto-kachel .foto { box-shadow: var(--glas-glanz), var(--schatten); }
:root[data-stil="glas"] .vorschlag { border-radius: 1.8rem; padding: .5rem; }
:root[data-stil="glas"] .vorschlag .foto { border-radius: 1.4rem; }
:root[data-stil="glas"] .foto-feld { border-radius: 1.6rem; background: var(--flaeche); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); }
:root[data-stil="glas"] :is(.foto-unter, .foto-feld-knopf, .favorit-punkt) { background: rgb(0 0 0 / .32); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25); -webkit-backdrop-filter: var(--glas-blur); backdrop-filter: var(--glas-blur); }
:root[data-stil="glas"] .foto-unter { border-radius: 999px; }
:root[data-stil="glas"] .chip-wahl .chip { border-radius: 999px; border-color: var(--rand); box-shadow: var(--glas-glanz); }
:root[data-stil="glas"] .chip-wahl input:checked + .chip { 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"] .leer-icon { border-radius: 1.4rem; box-shadow: var(--glas-glanz); }

/* 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)) {
  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, .chip.an) {
  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)); }
:root[data-stil="glas"] .formular-fuss { bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 1.1rem); }

/* 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: #1d1f27; --flaeche-2: #262a32; --glas-kopf: #1d1f27; }
  :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; }
