/*
 * Top 5 - Gestaltung nach design/entwurf-1.html (Designsprache von kaiuni 0.7).
 * Farben mit light-dark(): Hell/Dunkel folgt dem System.
 * Ich = Akzent blau, der andere = k3 (petrol).
 */
:root {
  color-scheme: light dark;
  --grund: light-dark(#f2f2f0, #000000);
  --flaeche: light-dark(#ffffff, #1c1c1e);
  --blatt: light-dark(#f2f2f0, #1c1c1e);
  --blatt-gruppe: light-dark(#ffffff, #2c2c2e);
  --fuellung: light-dark(rgb(118 118 128 / .12), rgb(118 118 128 / .24));
  --fuellung-stark: light-dark(rgb(118 118 128 / .2), rgb(118 118 128 / .36));
  --trenner: light-dark(rgb(60 60 67 / .17), rgb(84 84 88 / .6));
  --text: light-dark(#111113, #f5f5f7);
  --text-2: light-dark(#636368, #a1a1a6);
  --text-3: light-dark(#aeaeb2, #5f5f64);
  --akzent: light-dark(#0b63ce, #4aa3ff);
  --akzent-knopf: light-dark(#0b63ce, #1f6fd6);
  --akzent-zart: light-dark(rgb(11 99 206 / .1), rgb(74 163 255 / .18));
  --gruen: light-dark(#1a7f37, #30d158);
  --gruen-zart: light-dark(rgb(26 127 55 / .1), rgb(48 209 88 / .16));
  --rot: light-dark(#d70015, #ff6961);
  --feld-rand: light-dark(#86868b, #7c7c80);
  --glas: light-dark(rgb(250 250 250 / .74), rgb(36 36 38 / .72));
  --glas-kante: light-dark(rgb(0 0 0 / .07), rgb(255 255 255 / .1));
  --schatten: light-dark(rgb(0 0 0 / .12), rgb(0 0 0 / .6));
  --schleier: light-dark(rgb(0 0 0 / .26), rgb(0 0 0 / .6));
  --k3: #0b7a6e;
  --k3-text: light-dark(#0b7a6e, #3fc8b6);
  --k3-zart: light-dark(rgb(11 122 110 / .1), rgb(63 200 182 / .16));
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rand: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--grund); color: var(--text); font: 16px/1.375 var(--schrift); letter-spacing: -.006em; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.s { width: 20px; height: 20px; }

.t-gross { font-size: 34px; line-height: 41px; font-weight: 700; letter-spacing: -.022em; }
.t-titel1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.02em; }
.t-kopf { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
.t-neben { font-size: 15px; line-height: 20px; color: var(--text-2); }
.t-fuss { font-size: 13px; line-height: 18px; color: var(--text-2); }
.eyebrow { font-size: 13px; line-height: 18px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--akzent); }

/* ---- Raster ---- */
.app { max-width: 720px; margin: 0 auto; padding: 0 var(--rand) calc(110px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { :root { --rand: 40px; } }
@media (min-width: 900px) {
  :root { --rand: 48px; }
  .app { max-width: 1120px; }
  .zwei { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 48px; align-items: start; }
  .zwei > .liste { position: sticky; top: 24px; }
  .nur-handy { display: none !important; }
}
@media (max-width: 899px) {
  .zwei[data-ansicht="thema"] > .liste { display: none; }
  .zwei[data-ansicht="liste"] > .detail { display: none; }
  .nur-breit { display: none !important; }
}
.kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: calc(24px + env(safe-area-inset-top)) 0 20px; }
.kopf-knoepfe { display: flex; gap: 10px; padding-top: 2px; }
.status { display: flex; align-items: center; gap: 7px; margin-top: 2px; font-size: 15px; color: var(--text-2); }
.punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--gruen); flex: none; }

/* ---- Knoepfe ---- */
.knopf { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border: 0; border-radius: 25px; background: var(--fuellung); color: var(--akzent); font-size: 17px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: transform .12s, filter .12s; }
.knopf.haupt { background: var(--akzent-knopf); color: #fff; }
.knopf.gruen { background: var(--gruen); color: #fff; }
@media (prefers-color-scheme: dark) { .knopf.gruen { background: #1a7f37; } }
.knopf.text { background: none; }
.knopf.rot { color: var(--rot); }
.knopf.voll { width: 100%; }
.knopf:active { transform: scale(.97); filter: brightness(.94); }
.knopf:disabled { background: var(--fuellung); color: var(--text-2); cursor: default; }
.rund { width: 40px; height: 40px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--fuellung); color: var(--text); cursor: pointer; flex: none; }
.rund.akzent { background: var(--akzent-knopf); color: #fff; }
.rund:active { transform: scale(.94); }

/* Schwebende Hauptaktion unten (Daumenbereich) */
.schwebe { position: fixed; z-index: 30; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 5px; border-radius: 32px; box-shadow: 0 0 0 .5px var(--glas-kante), 0 10px 32px var(--schatten); display: flex; gap: 6px; }
.glas { background: var(--glas); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); }
.schwebe .knopf { height: 52px; padding: 0 26px; border-radius: 26px; }
@media (min-width: 900px) { .schwebe.liste-aktion { display: none; } }

/* ---- Segment ---- */
.segment { display: flex; padding: 2px; border-radius: 10px; background: var(--fuellung); margin-bottom: 16px; }
.segment button { flex: 1; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text); }
.segment button[aria-pressed="true"] { background: light-dark(#fff, #636366); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }

/* ---- Themen-Karten ---- */
.themen { display: flex; flex-direction: column; gap: 10px; }
.thema-karte { position: relative; width: 100%; text-align: left; border: 0; cursor: pointer; background: var(--flaeche); border-radius: 22px; padding: 16px 18px 16px 20px; display: flex; flex-direction: column; gap: 10px; transition: background .15s; }
.thema-karte:active { background: var(--fuellung-stark); }
.thema-karte[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--akzent); }
.thema-karte .neu { position: absolute; left: 7px; top: 24px; width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); }
.tk-oben { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tk-oben .t-kopf { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.etikett { font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.etikett.auf { background: var(--gruen-zart); color: var(--gruen); }
.fortschritt { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); }
.fortschritt span { display: inline-flex; align-items: center; gap: 6px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--fuellung-stark); }
.dots.ich i.an { background: var(--akzent); }
.dots.er i.an { background: var(--k3); }

.leer { text-align: center; padding: 48px 24px; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.leer .gross5 { font-size: 64px; font-weight: 800; letter-spacing: -.04em; color: var(--text-3); line-height: 1; }

/* ---- Thema ---- */
.detail-kopf { display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 0 8px; }
@media (min-width: 900px) { .detail-kopf { padding-top: 24px; } .detail-kopf .zurueck { visibility: hidden; } }
.zurueck { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--akzent); font-size: 17px; cursor: pointer; padding: 8px 4px 8px 0; }
.thema-titel { margin: 6px 0 4px; }
.von { margin-bottom: 20px; }
.hinweis { background: var(--fuellung); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 28px; font-size: 15px; line-height: 21px; }
.hinweis b { font-weight: 600; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: baseline; margin: 0 4px 10px; }
.abschnitt-kopf h2 { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -.016em; }
.gespeichert { font-size: 13px; color: var(--gruen); display: inline-flex; align-items: center; gap: 4px; opacity: 0; transition: opacity .3s; }
.gespeichert.an { opacity: 1; }

.plaetze { background: var(--flaeche); border-radius: 22px; overflow: hidden; }
.platz { position: relative; display: flex; align-items: center; gap: 4px; min-height: 60px; padding: 0 14px 0 6px; }
.platz + .platz::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; border-top: .5px solid var(--trenner); }
.platz .nr { width: 48px; text-align: center; font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--akzent); font-variant-numeric: tabular-nums; }
.platz input { flex: 1; min-width: 0; height: 52px; border: 0; background: none; font-size: 17px; outline: none; }
.platz input::placeholder { color: var(--text-3); }
.platz:focus-within { background: var(--akzent-zart); }
.platz.fest .nr { color: var(--text-3); }
.fussnote { font-size: 13px; line-height: 18px; color: var(--text-2); margin: 10px 4px 0; }

.verdeckt { margin-top: 28px; background: var(--flaeche); border-radius: 22px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.verdeckt .avatar, .avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; font-size: 16px; }
.avatar.ich { background: var(--akzent-knopf); }
.avatar.er { background: var(--k3); }
.verdeckt .zt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.verdeckt .schloss { color: var(--text-3); }
.aktion-unten { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 899px) { .aktion-unten.schwebt { position: fixed; z-index: 30; left: var(--rand); right: var(--rand); bottom: calc(14px + env(safe-area-inset-bottom)); margin: 0; } .aktion-unten.schwebt .knopf { box-shadow: 0 10px 28px var(--schatten); } }

/* Vergleich */
.vergleich { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .vergleich { grid-template-columns: 1fr; } }
.spalte { background: var(--flaeche); border-radius: 22px; overflow: hidden; }
.spalte-kopf { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; font-weight: 600; }
.spalte-kopf .avatar { width: 28px; height: 28px; font-size: 13px; }
.v-platz { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 10px; position: relative; }
.v-platz + .v-platz::before { content: ""; position: absolute; top: 0; left: 46px; right: 0; border-top: .5px solid var(--trenner); }
.v-platz .nr { width: 26px; text-align: center; font-size: 20px; font-weight: 800; flex: none; }
.spalte.ich .nr { color: var(--akzent); }
.spalte.er .nr { color: var(--k3-text); }
.v-platz .txt { flex: 1; min-width: 0; font-size: 16px; }
.v-platz .txt.leer-txt { color: var(--text-3); }
.v-platz.beide { background: var(--gruen-zart); }
.v-platz .beide-marke { font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--gruen); text-transform: uppercase; }
.gemeinsam { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text-2); padding: 0 4px; }

/* ---- Blaetter ---- */
.schleier { position: fixed; inset: 0; z-index: 50; background: var(--schleier); display: flex; align-items: flex-end; justify-content: center; padding: 8px; animation: ein .2s; }
@media (min-width: 600px) { .schleier { align-items: center; } }
.blatt { width: 100%; max-width: 540px; max-height: calc(100dvh - 40px); overflow: auto; background: var(--blatt); border-radius: 32px; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 20px 60px var(--schatten); animation: hoch .28s cubic-bezier(.2,.9,.3,1); }
@media (min-width: 600px) { .blatt { border-radius: 28px; padding-bottom: 24px; } }
.blatt-kopf { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 52px; margin-bottom: 8px; }
.blatt-kopf h2 { font-size: 17px; font-weight: 600; }
.blatt-kopf .knopf { height: 36px; padding: 0 6px; justify-self: start; }
.blatt-kopf .rechts { justify-self: end; }
.feldgruppe { background: var(--blatt-gruppe); border-radius: 18px; overflow: hidden; margin-bottom: 8px; }
.feld { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; position: relative; }
.feld + .feld::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--trenner); }
.feld label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.feld input, .feld textarea { border: 0; background: none; outline: none; font-size: 17px; padding: 2px 0; resize: none; }
.feld textarea { min-height: 72px; line-height: 23px; }
.feld .praefix { display: flex; align-items: baseline; gap: 6px; }
.feld .praefix b { font-size: 17px; color: var(--akzent); font-weight: 700; }
.feld .optional { color: var(--text-3); font-weight: 400; }
.blatt .fussnote { margin: 4px 16px 18px; }
.zentriert { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px 8px; }
.symbol-rund { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--akzent-zart); color: var(--akzent); margin-bottom: 4px; }
.symbol-rund .i { width: 32px; height: 32px; }
.zentriert .knopf { margin-top: 10px; }
.zeilen { background: var(--blatt-gruppe); border-radius: 18px; overflow: hidden; margin-bottom: 18px; }
.zeile { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; width: 100%; border: 0; background: none; text-align: left; font-size: 17px; }
.zeile + .zeile::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--trenner); }
.zeile .zt { flex: 1; }
.zeile .wert { color: var(--text-2); }
button.zeile { cursor: pointer; color: var(--akzent); }
button.zeile.rot { color: var(--rot); }
.schalter { appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fuellung-stark); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.schalter::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / .2); transition: transform .2s; }
.schalter:checked { background: #34c759; }
.schalter:checked::after { transform: translateX(20px); }
.blatt-abschnitt { font-size: 13px; color: var(--text-2); margin: 0 16px 6px; text-transform: uppercase; letter-spacing: .03em; }

/* ---- Toast ---- */
.toast { position: fixed; z-index: 60; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translateX(-50%); background: var(--glas); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 0 0 .5px var(--glas-kante), 0 10px 32px var(--schatten); border-radius: 22px; padding: 10px 18px; font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; animation: runter .3s; max-width: calc(100% - 32px); }
.toast .i { color: var(--gruen); }

.app-symbol { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(145deg, #1f6fd6, #0b7a6e); display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; flex: none; letter-spacing: -.04em; }

/* ---- Anmelden ---- */
.anmelden { max-width: 380px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 14px; padding: 24px var(--rand); text-align: center; }
.anmelden .app-symbol { width: 84px; height: 84px; border-radius: 20px; font-size: 44px; margin: 0 auto 8px; }
.anmelden .feldgruppe { text-align: left; }
.anmelden .segment { margin: 6px 0 0; }

@keyframes ein { from { opacity: 0; } }
@keyframes hoch { from { transform: translateY(40px); opacity: 0; } }
@keyframes runter { from { transform: translate(-50%, -20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- Nur in der App ---- */
.toast.fehler .i { color: var(--rot); }
.laden { min-height: 100dvh; display: grid; place-items: center; color: var(--text-2); }
.allein { margin-top: 28px; background: var(--flaeche); border-radius: 22px; padding: 18px 20px; font-size: 15px; line-height: 21px; color: var(--text-2); }
.allein b { color: var(--text); }
.zeile .t-fuss { display: block; }
.blatt .fehlertext, .anmelden .fehlertext { color: var(--rot); text-align: center; font-size: 15px; margin: 4px 0 8px; }
.knopf.klein-text { height: 40px; font-size: 15px; font-weight: 500; }
.zurueck { text-decoration: none; }

/* Umsortieren: Griff rechts, gezogene Zeile hebt sich ab */
.platz { padding-right: 0; }
.platz .greifer { width: 48px; height: 56px; flex: none; border: 0; background: none; color: var(--text-3); display: grid; place-items: center; cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
.platz .greifer:active { cursor: grabbing; color: var(--akzent); }
.plaetze.beim-ziehen { overflow: visible; }
.plaetze.beim-ziehen .platz { transition: transform .15s ease; }
.plaetze.beim-ziehen .platz::before { opacity: 0; }
.platz.zieht { z-index: 2; transition: none !important; background: var(--flaeche); border-radius: 14px; box-shadow: 0 8px 24px var(--schatten); }
.platz.zieht .greifer { color: var(--akzent); }
@media (hover: hover) { .platz .greifer:hover { color: var(--text-2); } }
