/* Wann? – kühles Papier, Tintenblau, Abreißkalender-Kacheln als Erkennungszeichen.
   Keine externen Schriften: Systemschrift, Zahlen in der runden Variante (iOS: SF Pro Rounded). */
:root {
  --papier: #EEF1F6; --karte: #FFFFFF; --flaeche: #F5F7FB; --linie: #DCE1EB; --linie-2: #C9D0DE;
  --tinte: #18213A; --tinte-2: #4A536B; --tinte-3: #737C91;
  --indigo: #3730A3; --indigo-2: #2B2585; --indigo-hell: #E8E9FF; --indigo-text: #3730A3;
  --ja: #0F8A55; --ja-hell: #DCF2E7; --ja-mittel: #9BD7B9;
  --vl: #B57A00; --vl-hell: #FBF0D2; --vl-mittel: #F1CF7A;
  --nein: #8D95A8; --nein-hell: #EEF0F5;
  --rot: #C2412D; --rot-hell: #FBE6E2;
  --r-gross: 20px; --r: 14px; --r-klein: 10px;
  --schrift: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --rund: ui-rounded, 'SF Pro Rounded', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --leiste-h: 76px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --papier: #0E1322; --karte: #161D31; --flaeche: #1B2339; --linie: #273150; --linie-2: #34406A;
    --tinte: #E9EDF7; --tinte-2: #B4BCD2; --tinte-3: #8B94AD;
    --indigo: #7C77F0; --indigo-2: #938FF5; --indigo-hell: #25284F; --indigo-text: #A9A6FF;
    --ja: #3CC487; --ja-hell: #12382B; --ja-mittel: #1F6B4A;
    --vl: #F0B43C; --vl-hell: #3A2E10; --vl-mittel: #7A5D19;
    --nein: #6F7894; --nein-hell: #1E2640; --rot: #F07A66; --rot-hell: #3A1C18;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--tinte); font: 16px/1.5 var(--schrift); -webkit-font-smoothing: antialiased; }
body.ohne-scroll { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--rund); }
h1 { font-size: clamp(26px, 6vw, 34px); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: 18px; font-weight: 750; letter-spacing: -0.01em; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
a { color: var(--indigo-text); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; }
.klein { font-size: 14px; color: var(--tinte-2); }
.klein .ic { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Laden */
.laden-punkt { width: 36px; height: 36px; margin: 80px auto; border-radius: 50%; border: 3px solid var(--linie); border-top-color: var(--indigo); animation: dreh 0.8s linear infinite; }
.laden-punkt.voll { margin-top: 40vh; }
@keyframes dreh { to { transform: rotate(360deg); } }
.leer-seite { text-align: center; padding: 80px 20px; display: grid; gap: 14px; justify-items: center; }
.leer-seite p { color: var(--tinte-2); max-width: 46ch; }

/* Marke */
.marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinte); font-family: var(--rund); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.marke-zeichen { width: 32px; height: 32px; border-radius: 9px; background: var(--indigo); color: #fff; display: grid; place-items: center; font-size: 17px; position: relative; overflow: hidden; }
.marke-zeichen::before { content: ''; position: absolute; inset: 0 0 auto; height: 8px; background: rgba(0, 0, 0, .22); }
.marke.gross { font-size: 24px; } .marke.gross .marke-zeichen { width: 40px; height: 40px; font-size: 21px; border-radius: 11px; }

/* Abreißkalender-Kachel: das wiedererkennbare Element */
.kachel { width: 64px; flex: none; border-radius: 12px; background: var(--karte); border: 1px solid var(--linie-2); display: grid; grid-template-rows: auto 1fr auto; text-align: center; overflow: hidden; box-shadow: 0 1px 0 var(--linie); }
.k-monat { background: var(--indigo); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 0 2px; letter-spacing: .02em; }
.k-tag { font-family: var(--rund); font-size: 30px; font-weight: 800; line-height: 1; padding: 6px 0 0; font-variant-numeric: tabular-nums; }
.k-wtag { font-size: 12.5px; color: var(--tinte-2); padding: 2px 0 7px; font-weight: 600; }
.kachel.klein { width: 46px; border-radius: 10px; }
.kachel.klein .k-monat { font-size: 10.5px; padding: 2px 0 1px; }
.kachel.klein .k-tag { font-size: 21px; padding-top: 4px; }
.kachel.klein .k-wtag { font-size: 11px; padding-bottom: 5px; }
.text-kachel { place-items: center; display: grid; height: 58px; color: var(--indigo-text); background: var(--indigo-hell); border-color: transparent; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--linie-2); background: var(--karte); color: var(--tinte); font-weight: 650; font-size: 15.5px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.knopf:hover { border-color: var(--indigo); }
.knopf:active { transform: scale(.98); }
.knopf:disabled { opacity: .5; cursor: default; transform: none; }
.knopf.primaer { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.knopf.primaer:hover { background: var(--indigo-2); }
.knopf.leise { background: transparent; border-color: transparent; color: var(--indigo-text); padding-left: 10px; padding-right: 10px; }
.knopf.leise:hover { background: var(--indigo-hell); }
.knopf.klein { min-height: 36px; padding: 6px 12px; font-size: 14.5px; border-radius: 10px; }
.knopf.gross { min-height: 52px; padding: 14px 22px; font-size: 17px; border-radius: 14px; }
.knopf.breit { width: 100%; }
.knopf.whatsapp { background: #1FA855; border-color: #1FA855; color: #fff; }
.icon-knopf { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--tinte-2); cursor: pointer; flex: none; }
.icon-knopf:hover { background: var(--flaeche); color: var(--tinte); }
.icon-knopf.mini { width: 32px; height: 32px; } .icon-knopf.mini .ic { width: 17px; height: 17px; }
.icon-knopf.primaer { background: var(--indigo); color: #fff; } .icon-knopf.primaer:disabled { opacity: .35; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.knopfreihe.rechts { justify-content: flex-end; }
.leise-link { display: block; text-align: center; margin-top: 14px; font-size: 15px; }

/* Karten & Formulare */
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-content: start; min-width: 0; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.feld { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.feld > span { font-weight: 650; font-size: 15px; }
.feld em { font-style: normal; font-weight: 400; color: var(--tinte-3); font-size: 14px; margin-left: 4px; }
.feld small { color: var(--tinte-3); font-size: 13.5px; }
input:not([type=checkbox]):not([type=radio]), textarea, select { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--linie-2); border-radius: 12px; background: var(--karte); font-size: 16px; }
textarea { resize: vertical; min-height: 72px; line-height: 1.45; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-hell); }
input[aria-invalid=true] { border-color: var(--rot); }
input:disabled, textarea:disabled { opacity: .55; }
.feld-paar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.feld-paar .feld.kurz { max-width: 120px; }
.feld-paar:has(.kurz) { grid-template-columns: 1fr auto; }
.formular { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.fehler { color: var(--rot); background: var(--rot-hell); padding: 10px 14px; border-radius: 12px; font-size: 15px; }
.erfolg { color: var(--ja); display: flex; gap: 8px; align-items: center; font-weight: 600; }
.hinweis { display: flex; gap: 8px; align-items: flex-start; background: var(--flaeche); padding: 10px 12px; border-radius: 12px; }
.hinweis .ic { margin-top: 2px; }
.rechtlich { font-size: 13px; color: var(--tinte-3); }
.haken { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.haken input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--indigo); }
.freitext { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--tinte-2); }

/* Segmente, Chips, Schalter */
.segment { display: inline-flex; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segment button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--tinte-2); display: inline-flex; gap: 6px; align-items: center; }
.segment button.an { background: var(--karte); color: var(--tinte); box-shadow: 0 1px 2px rgba(24, 33, 58, .12); }
.segment .zahl { font-size: 13px; background: var(--linie); border-radius: 99px; padding: 0 7px; color: var(--tinte-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--linie-2); background: var(--karte); font-weight: 600; font-size: 15px; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip.an { background: var(--indigo-hell); border-color: var(--indigo); color: var(--indigo-text); }
.chip.still { background: var(--flaeche); border-style: dashed; color: var(--tinte-2); cursor: default; }
.chip.mini { min-height: 32px; padding: 4px 10px; font-size: 13.5px; font-weight: 600; color: var(--tinte-2); }
.chip.zeit { padding-right: 4px; }
.chip.zeit button { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; cursor: pointer; color: inherit; }
.chip.zeit button .ic { width: 15px; height: 15px; }
.chip.zeit button:hover { background: rgba(55, 48, 163, .12); }
.schalter-zeile { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--linie); cursor: pointer; position: relative; }
.schalter-zeile.aus { opacity: .5; cursor: default; }
.sz-text { display: grid; gap: 2px; } .sz-text small { color: var(--tinte-3); font-size: 14px; }
.schalter-zeile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter { width: 50px; height: 30px; border-radius: 99px; background: var(--linie-2); position: relative; transition: background .15s; }
.schalter::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s; }
.schalter-zeile input:checked + .schalter { background: var(--ja); }
.schalter-zeile input:checked + .schalter::after { transform: translateX(20px); }
.schalter-zeile input:focus-visible + .schalter { outline: 3px solid var(--indigo); outline-offset: 2px; }
.schalter-mehr { padding: 0 0 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.schalter-mehr input[type=datetime-local] { max-width: 320px; }
.zahl-feld { display: inline-flex; align-items: center; gap: 10px; }
.zahl-feld input { width: 110px !important; }
.zahl-feld span { color: var(--tinte-2); }
.sprachwahl { display: inline-flex; gap: 2px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px; padding: 2px; }
.sprachwahl button { border: 0; background: transparent; padding: 5px 9px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--tinte-3); letter-spacing: .02em; }
.sprachwahl button.an { background: var(--karte); color: var(--tinte); box-shadow: 0 1px 2px rgba(24, 33, 58, .12); }
details.aufklapp summary { cursor: pointer; color: var(--indigo-text); font-weight: 600; font-size: 15px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.aufklapp summary::-webkit-details-marker { display: none; }
details.aufklapp summary::before { content: '+'; font-size: 18px; width: 18px; text-align: center; }
details.aufklapp[open] summary::before { content: '–'; }
details.aufklapp[open] { display: grid; gap: 12px; }
.anleitung-liste { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; color: var(--tinte-2); }

/* Avatare */
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 750; flex: none; color: #fff; letter-spacing: .02em; }
.av0 { background: #3730A3; } .av1 { background: #0F8A55; } .av2 { background: #B5530B; } .av3 { background: #9D2E7A; }
.av4 { background: #1D6E8C; } .av5 { background: #6B4FB8; } .av6 { background: #8A6A00; } .av7 { background: #A33A3A; }

/* ---------- Öffentliche Seite ---------- */
.oeffentlich { min-height: 100vh; display: flex; flex-direction: column; }
.oben { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; max-width: 760px; width: 100%; margin: 0 auto; }
.spalte-schmal { max-width: 760px; width: 100%; margin: 0 auto; padding: 4px 16px calc(var(--leiste-h) + 40px); display: grid; gap: 16px; flex: 1; align-content: start; }
.fuss { text-align: center; padding: 20px 16px calc(var(--leiste-h) + 20px); font-size: 13px; color: var(--tinte-3); display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.fuss a { color: var(--tinte-3); }
.umfrage-kopf { display: grid; gap: 10px; padding: 8px 4px 4px; }
.von { color: var(--indigo-text); font-weight: 650; font-size: 15px; }
.eckdaten { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.eck { display: inline-flex; align-items: center; gap: 6px; background: var(--karte); border: 1px solid var(--linie); padding: 6px 12px 6px 10px; border-radius: 99px; font-size: 14.5px; color: var(--tinte-2); text-decoration: none; max-width: 100%; }
.eck span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eck .ic { width: 17px; height: 17px; color: var(--indigo-text); }
a.eck:hover { border-color: var(--indigo); color: var(--tinte); }
.anleitung { display: grid; gap: 8px; padding: 0 4px; color: var(--tinte-2); font-size: 15.5px; }
.anleitung p { display: flex; gap: 8px; align-items: flex-start; }
.anleitung .ic { width: 18px; height: 18px; margin-top: 3px; color: var(--tinte-3); }
.anleitung .schon { background: var(--ja-hell); color: var(--tinte); padding: 10px 12px; border-radius: 12px; font-weight: 600; }
.anleitung .schon .ic { color: var(--ja); }
.hinweis-band { display: flex; gap: 10px; align-items: center; background: var(--flaeche); border: 1px solid var(--linie); padding: 12px 16px; border-radius: var(--r); font-weight: 600; color: var(--tinte-2); }

.optionen { display: grid; gap: 12px; }
.gruppe { display: grid; grid-template-columns: 64px 1fr; gap: 14px; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 14px; }
.gruppe.ohne-datum { grid-template-columns: 1fr; }
.gruppe .kachel { position: sticky; top: 12px; align-self: start; }
.gruppe-zeilen { display: grid; gap: 10px; min-width: 0; }
.gruppe-titel { font-weight: 700; font-size: 15px; color: var(--tinte-2); padding-top: 2px; }
.option { display: grid; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--flaeche); border: 1.5px solid transparent; transition: background .15s, border-color .15s; }
.option.w-ja { background: var(--ja-hell); border-color: var(--ja-mittel); }
.option.w-vielleicht { background: var(--vl-hell); border-color: var(--vl-mittel); }
.option.w-nein { background: var(--nein-hell); }
.option-info { display: grid; gap: 6px; min-width: 0; }
.option-text { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.option-text b { font-size: 17px; font-variant-numeric: tabular-nums; font-family: var(--rund); font-weight: 750; overflow-wrap: anywhere; }
.option-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 14px; color: var(--tinte-2); }
.zaehl { display: inline-flex; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; font-weight: 650; }
.zaehl > span { display: inline-flex; gap: 3px; align-items: center; }
.zaehl .ic { width: 16px; height: 16px; }
.z-ja { color: var(--ja); } .z-vl { color: var(--vl); } .z-leer { color: var(--tinte-3); font-weight: 400; }
.plaetze { font-weight: 650; color: var(--ja); } .plaetze.voll { color: var(--rot); }
.abzeichen { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; padding: 2px 8px 2px 6px; border-radius: 99px; }
.abzeichen.stern { background: var(--indigo-hell); color: var(--indigo-text); }
.abzeichen .ic { width: 14px; height: 14px; fill: currentColor; }
.balken { height: 6px; border-radius: 99px; background: var(--linie); display: flex; overflow: hidden; }
.balken.gross { height: 10px; flex: 1; }
.balken i { display: block; height: 100%; transition: width .3s; }
.b-ja { background: var(--ja); } .b-vl { background: var(--vl-mittel); }
.wahl { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.wahl:has(.wahl-vielleicht) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr); }
.wahl button { min-height: 46px; border-radius: 11px; border: 1.5px solid var(--linie-2); background: var(--karte); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 15px; cursor: pointer; color: var(--tinte-2); padding: 6px 8px; transition: background .12s, border-color .12s, color .12s, transform .1s; }
.wahl button:active { transform: scale(.97); }
.wahl button:disabled { opacity: .4; cursor: not-allowed; }
.wahl button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wahl-ja:hover { border-color: var(--ja); color: var(--ja); }
.wahl-vielleicht:hover { border-color: var(--vl); color: var(--vl); }
.wahl-nein:hover { border-color: var(--nein); }
.wahl-ja.an { background: var(--ja); border-color: var(--ja); color: #fff; }
.wahl-vielleicht.an { background: var(--vl); border-color: var(--vl); color: #fff; }
.wahl-nein.an { background: var(--tinte-2); border-color: var(--tinte-2); color: var(--karte); }
.meine { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 14.5px; }
.meine.w-ja { color: var(--ja); } .meine.w-vielleicht { color: var(--vl); }
.option.best { position: relative; }
@media (min-width: 620px) {
  .option { grid-template-columns: minmax(0, 1fr) 350px; align-items: center; }
  .gruppe { grid-template-columns: 72px 1fr; padding: 16px; }
  .gruppe.ohne-datum { grid-template-columns: 1fr; }
  .kachel:not(.klein) { width: 72px; }
}

.danke { text-align: center; justify-items: center; padding: 28px 20px; animation: auftauchen .35s ease-out; }
.danke-haken { width: 64px; height: 64px; border-radius: 50%; background: var(--ja); color: #fff; display: grid; place-items: center; }
.danke-haken .ic { width: 34px; height: 34px; stroke-width: 2.6; }
.danke p { color: var(--tinte-2); max-width: 44ch; }
.meine-liste { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; text-align: left; width: 100%; max-width: 420px; }
.meine-liste li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; font-weight: 600; }
.meine-liste li.w-ja { background: var(--ja-hell); } .meine-liste li.w-ja .ic { color: var(--ja); }
.meine-liste li.w-vielleicht { background: var(--vl-hell); } .meine-liste li.w-vielleicht .ic { color: var(--vl); }
.danke .knopfreihe { justify-content: center; }
.danke .aufklapp { text-align: left; width: 100%; max-width: 420px; }
@keyframes auftauchen { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.festgelegt { border: 2px solid var(--ja); background: linear-gradient(var(--ja-hell), var(--karte) 70%); }
.fest-label { color: var(--ja); font-weight: 750; font-size: 15px; display: flex; gap: 6px; align-items: center; }
.fest-zeile { display: flex; gap: 16px; align-items: center; }
.fest-zeile h2 { font-size: 21px; } .fest-zeile h3 { font-size: 18px; }
.fest-zeile .klein { display: flex; align-items: center; margin-top: 4px; }

.formular h2 { margin-bottom: -4px; }
.avatar-reihe { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.av-name { display: inline-flex; gap: 6px; align-items: center; font-size: 14.5px; font-weight: 600; }
.mehr-zahl { font-weight: 700; color: var(--tinte-3); align-self: center; }

.leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, calc((100vw - 728px) / 2)) calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--karte) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--linie); }
.leiste .knopf { min-width: 150px; min-height: 50px; font-size: 16.5px; }
.leiste-zahl { font-weight: 650; color: var(--tinte-2); font-variant-numeric: tabular-nums; }

/* Matrix */
.matrix-rahmen { overflow-x: auto; margin: 0 -20px; padding: 0 20px; -webkit-overflow-scrolling: touch; }
.matrix { border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 100%; }
.matrix th, .matrix td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.matrix thead th { vertical-align: bottom; font-weight: 600; min-width: 64px; }
.matrix thead th.best { color: var(--indigo-text); }
.m-tag { display: block; font-size: 12.5px; color: var(--tinte-2); } .m-zeit { display: block; font-weight: 750; font-variant-numeric: tabular-nums; }
.m-text { display: block; max-width: 140px; white-space: normal; font-weight: 650; }
.matrix .m-name { min-width: 128px; position: sticky; left: 0; background: var(--karte); text-align: left; z-index: 1; padding-left: 0; max-width: 46vw; }
.m-person { display: flex; gap: 8px; align-items: center; } .m-person > span { display: grid; min-width: 0; } .m-person b { overflow: hidden; text-overflow: ellipsis; } .m-person small { color: var(--tinte-3); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.matrix td .ic { width: 18px; height: 18px; }
.m-ja { background: var(--ja-hell); color: var(--ja); } .m-vielleicht { background: var(--vl-hell); color: var(--vl); }
.m-nein { color: var(--nein); } .m-leer { color: var(--tinte-3); }
.m-strich { display: inline-block; width: 10px; height: 2px; background: var(--nein); border-radius: 2px; vertical-align: middle; }
.matrix tr.ich th, .matrix tr.ich td { font-weight: 700; }
.matrix tr.ich .m-name { box-shadow: inset 3px 0 0 var(--indigo); padding-left: 8px; }
.matrix tfoot td { font-weight: 750; font-variant-numeric: tabular-nums; } .matrix tfoot td small { font-weight: 500; color: var(--vl); margin-left: 2px; }
.matrix tfoot td.best { color: var(--indigo-text); }
.matrix tbody tr:hover td, .matrix tbody tr:hover th { filter: brightness(.98); }

/* Kommentare */
.kommentar-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.kommentar-liste li { display: flex; gap: 10px; }
.kommentar-liste li > div { min-width: 0; flex: 1; }
.k-kopf { display: flex; gap: 8px; align-items: baseline; font-size: 14.5px; }
.k-kopf time { color: var(--tinte-3); font-size: 13px; } .k-kopf .icon-knopf { margin-left: auto; }
.kommentar-liste .freitext { color: var(--tinte); font-size: 15px; }
.kommentar-form { display: grid; gap: 8px; }
.kommentar-eingabe { display: flex; gap: 8px; align-items: flex-end; }
.kommentar-eingabe textarea { min-height: 48px; }

/* ---------- Verwaltung ---------- */
.verwaltung { min-height: 100vh; }
.kopfleiste { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px max(16px, calc((100vw - 1120px) / 2)); background: var(--karte); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 15; }
.haupt-nav { display: flex; gap: 4px; align-items: center; }
.haupt-nav > a { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--tinte-2); padding: 8px 12px; border-radius: 10px; font-weight: 650; min-height: 40px; }
.haupt-nav > a.an { color: var(--tinte); background: var(--flaeche); }
.haupt-nav > a:hover { color: var(--tinte); }
.haupt-nav .avatar { width: 26px; height: 26px; font-size: 11px; }
.inhalt { max-width: 1120px; margin: 0 auto; padding: 24px 16px 120px; }
.seiten-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.seiten-kopf p { color: var(--tinte-2); margin-top: 6px; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; color: var(--tinte-2); text-decoration: none; font-weight: 600; font-size: 15px; margin-bottom: 12px; padding: 4px 0; }
.zurueck .ic { width: 18px; height: 18px; } .zurueck:hover { color: var(--indigo-text); }
.nur-breit { display: inline; }
.unten-hinweis { max-width: 1088px; margin: -80px auto 40px; padding: 12px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--tinte-2); font-size: 14.5px; }

.tab-zeile { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.suche { max-width: 260px; min-height: 42px !important; }
.umfrage-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.umfrage-zeile { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--r-gross); text-decoration: none; color: var(--tinte); transition: border-color .15s; }
.umfrage-zeile:hover { border-color: var(--indigo); }
.uz-mitte { display: grid; gap: 4px; flex: 1; min-width: 0; }
.uz-mitte > b { font-size: 17px; font-family: var(--rund); font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uz-unter { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--tinte-2); }
.uz-unter > span { display: inline-flex; gap: 5px; align-items: center; }
.uz-unter .ic { width: 15px; height: 15px; }
.u-fest { color: var(--ja); font-weight: 650; }
.uz-rechts { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.antwort-zahl { display: inline-flex; gap: 5px; align-items: center; font-weight: 750; font-variant-numeric: tabular-nums; font-family: var(--rund); font-size: 17px; }
.antwort-zahl .ic { width: 17px; height: 17px; color: var(--tinte-3); }
.status-pille { font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--flaeche); color: var(--tinte-2); white-space: nowrap; }
.status-pille.offen { background: var(--ja-hell); color: var(--ja); }
.status-pille.fest { background: var(--indigo-hell); color: var(--indigo-text); }
.leer { justify-items: center; text-align: center; padding: 44px 24px; }
.leer p { color: var(--tinte-2); max-width: 46ch; }
.leer-kacheln { display: flex; gap: 10px; margin-bottom: 6px; }
.leer-kacheln .kachel:nth-child(1) { transform: rotate(-6deg); } .leer-kacheln .kachel:nth-child(3) { transform: rotate(5deg); }
.leer-zeile { color: var(--tinte-3); padding: 30px 0; text-align: center; }

.kopf-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--tinte-2); margin-bottom: 8px; }
.kopf-meta > span { display: inline-flex; gap: 4px; align-items: center; } .kopf-meta .ic { width: 15px; height: 15px; }
.kopf-aktionen { display: flex; gap: 8px; }
.auswertung > .freitext { margin: -6px 0 10px; max-width: 72ch; }
.auswertung > .eckdaten { margin-bottom: 18px; }
.auswertung > .festgelegt { margin-bottom: 18px; }
.raster-zwei { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; margin-bottom: 18px; }
.spalte-rechts, .spalte-links { display: grid; gap: 18px; min-width: 0; }
.menue-rahmen { position: relative; }
.menue { position: absolute; right: 0; top: calc(100% + 6px); background: var(--karte); border: 1px solid var(--linie); border-radius: var(--r); box-shadow: 0 12px 32px rgba(24, 33, 58, .16); padding: 6px; min-width: 240px; z-index: 30; display: grid; animation: auftauchen .15s ease-out; }
.menue a, .menue button { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 9px; border: 0; background: transparent; text-decoration: none; color: var(--tinte); font-weight: 600; font-size: 15px; cursor: pointer; text-align: left; }
.menue a:hover, .menue button:hover { background: var(--flaeche); }
.menue .gefahr { color: var(--rot); }
.noch-leer { display: grid; gap: 12px; justify-items: start; color: var(--tinte-2); }
.rangliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rangliste li { display: grid; gap: 8px; padding: 12px; border-radius: var(--r); border: 1.5px solid transparent; }
.rangliste li.best { background: var(--flaeche); border-color: var(--linie); }
.rangliste li.gewaehlt { border-color: var(--ja); background: var(--ja-hell); }
.r-kopf { display: flex; gap: 12px; align-items: center; }
.r-text { flex: 1; display: grid; gap: 2px; justify-items: start; min-width: 0; }
.r-text b { font-family: var(--rund); font-weight: 750; font-size: 16.5px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.r-balken { display: flex; align-items: center; gap: 10px; }
.r-zahl { font-family: var(--rund); font-weight: 800; font-size: 17px; min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.r-zahl small { color: var(--vl); font-weight: 650; font-size: 14px; }
.r-namen { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.r-namen span { font-size: 13px; padding: 1px 8px; border-radius: 99px; }
.n-ja { background: var(--ja-hell); color: var(--ja); } .n-vl { background: var(--vl-hell); color: var(--vl); }
.regeln ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14.5px; color: var(--tinte-2); }
.regeln .knopf { justify-self: start; }
.einladung-liste, .konto-liste { list-style: none; margin: 0; padding: 0; display: grid; }
.einladung-liste li, .konto-liste li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--linie); font-size: 14.5px; }
.konto-liste li > span:not(.avatar) { flex: 1; display: grid; min-width: 0; } .konto-liste small { color: var(--tinte-3); }
.e-adresse { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-status { font-size: 12.5px; font-weight: 700; color: var(--tinte-3); }
.e-status.ok { color: var(--ja); } .e-status.fehler { color: var(--rot); }

/* Dialog */
.dialog-hinter { position: fixed; inset: 0; background: rgba(14, 19, 34, .45); z-index: 50; display: grid; place-items: center; padding: 16px; animation: einblenden .15s; }
.dialog { background: var(--karte); border-radius: 22px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; display: grid; gap: 16px; animation: auftauchen .2s ease-out; }
.dialog-kopf { display: flex; justify-content: space-between; align-items: center; margin: -6px -8px -4px 0; }
.dialog > p { color: var(--tinte-2); }
@keyframes einblenden { from { opacity: 0; } }
.link-feld { display: flex; gap: 8px; } .link-feld input { font-size: 15px; }
.teilen-knoepfe { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.qr { display: grid; justify-items: center; gap: 8px; padding: 12px; background: #fff; border-radius: var(--r); }
.qr .klein { color: #4A536B; }

/* Editor */
.editor { min-width: 0; max-width: 760px; margin: 0 auto; display: grid; gap: 16px; padding-bottom: calc(var(--leiste-h) + 20px); }
.editor-kopf { display: grid; gap: 14px; }
.editor-kopf .zurueck { margin-bottom: -6px; }
.schritte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.schritte button { width: 100%; display: flex; gap: 8px; align-items: center; border: 0; background: transparent; padding: 8px 0 10px; border-bottom: 3px solid var(--linie); cursor: pointer; font-weight: 650; color: var(--tinte-3); font-size: 14.5px; text-align: left; }
.schritte li.an button { border-color: var(--indigo); color: var(--tinte); }
.schritte li.fertig button { border-color: var(--ja-mittel); color: var(--tinte-2); }
.s-nr { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--linie); color: var(--tinte-2); flex: none; font-family: var(--rund); font-weight: 800; }
.s-nr .ic { width: 14px; height: 14px; stroke-width: 3; }
.an .s-nr { background: var(--indigo); color: #fff; } .fertig .s-nr { background: var(--ja); color: #fff; }
.typ-wahl { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.typ-wahl legend { font-weight: 650; font-size: 15px; margin-bottom: 8px; padding: 0; }
.typ { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r); border: 1.5px solid var(--linie); cursor: pointer; transition: border-color .15s, background .15s; }
.typ:hover { border-color: var(--linie-2); }
.typ.an { border-color: var(--indigo); background: var(--indigo-hell); }
.typ input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.typ:has(input:focus-visible) { outline: 3px solid var(--indigo); outline-offset: 2px; }
.typ > span:last-child { display: grid; gap: 2px; } .typ small { color: var(--tinte-2); font-size: 14px; }
.typ-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--flaeche); color: var(--indigo-text); flex: none; }
.typ.an .typ-icon { background: var(--indigo); color: #fff; }
.kalender-karte .karte-kopf h2 { flex: 1; }
.monat-nav { display: flex; align-items: center; gap: 4px; }
.monat-nav b { min-width: 150px; text-align: center; font-family: var(--rund); font-size: 16px; }
.kalender { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.kw { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--tinte-3); padding: 4px 0; }
.tag { aspect-ratio: 1; max-height: 58px; border-radius: 12px; border: 1.5px solid transparent; background: var(--flaeche); font-family: var(--rund); font-weight: 700; font-size: 17px; cursor: pointer; font-variant-numeric: tabular-nums; transition: background .12s, transform .1s; color: var(--tinte); }
.tag:hover { border-color: var(--indigo); }
.tag:active { transform: scale(.94); }
.tag.fremd { color: var(--tinte-3); background: transparent; }
.tag.heute { border-color: var(--linie-2); }
.tag.vorbei { color: var(--linie-2); background: transparent; cursor: default; }
.tag.vorbei:hover { border-color: transparent; }
.tag.an { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.tag-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tag-liste > li { display: flex; gap: 14px; padding-top: 14px; border-top: 1px solid var(--linie); }
.tag-liste > li:first-child { border-top: 0; padding-top: 0; }
.tag-zeiten { flex: 1; display: grid; gap: 10px; min-width: 0; }
.tz-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.zeit-neu { display: inline-flex; gap: 6px; align-items: center; }
.zeit-neu input { width: 128px !important; min-height: 40px !important; padding: 6px 10px !important; border-radius: 99px !important; }
.schnell { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-zeiten .knopf.leise { justify-self: start; }
.text-optionen { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: opt; }
.text-optionen li { display: flex; gap: 8px; align-items: center; }
.text-optionen li::before { counter-increment: opt; content: counter(opt); width: 26px; flex: none; text-align: center; font-family: var(--rund); font-weight: 800; color: var(--tinte-3); }
.text-optionen .kap { width: 100px !important; flex: none; }
.modus-wahl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 4px; color: var(--tinte-2); font-weight: 600; }
.einstellungen-liste { gap: 0; }
.einstellungen-liste h2 { margin: 22px 0 6px; } .einstellungen-liste h2:first-child { margin-top: 0; }
.einstellungen-liste > .feld { margin-top: 14px; }
.einstellungen-liste > .hinweis { margin: 4px 0 8px; }
.editor-leiste .knopf { min-width: 120px; }
.editor > .fehler, .editor > .hinweis { margin: 0; }

/* Anmelden */
.anmelde-seite { min-height: 100vh; display: grid; place-content: center; padding: 24px 16px; gap: 18px; justify-items: center; }
.anmelde-kopf { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 420px; }
.anmelde-karte { width: min(420px, calc(100vw - 32px)); padding: 26px; gap: 10px; }
.anmelde-karte > p { color: var(--tinte-2); margin-bottom: 8px; }
.fuss-klein { font-size: 13px; } .fuss-klein a { color: var(--tinte-3); }
.einstellungen .raster-zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lesetext { gap: 10px; } .lesetext h1 { margin-bottom: 10px; } .lesetext h2 { margin-top: 12px; font-size: 17px; } .lesetext p { color: var(--tinte-2); max-width: 68ch; }

/* Toasts */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--leiste-h) + 16px + env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--tinte); color: var(--karte); padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: 0 10px 30px rgba(14, 19, 34, .25); animation: auftauchen .2s ease-out; }
.toast.ok .ic { color: var(--ja-mittel); } .toast.fehler .ic { color: #FFB4A6; }

@media (max-width: 900px) {
  .raster-zwei, .einstellungen .raster-zwei { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .karte { padding: 16px; border-radius: 18px; }
  .matrix-rahmen { margin: 0 -16px; padding: 0 16px; }
  .gruppe { grid-template-columns: 46px minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
  .gruppe-zeilen { display: contents; }
  .gruppe .kachel { position: static; width: 46px; border-radius: 10px; }
  .gruppe .kachel .k-monat { font-size: 10.5px; padding: 2px 0 1px; }
  .gruppe .kachel .k-tag { font-size: 21px; padding-top: 4px; }
  .gruppe .kachel .k-wtag { font-size: 11px; padding-bottom: 5px; }
  .gruppe-titel { align-self: center; font-family: var(--rund); font-size: 17px; color: var(--tinte); font-weight: 800; }
  .gruppe .option { grid-column: 1 / -1; }
  .feld-paar, .feld-paar:has(.kurz) { grid-template-columns: 1fr; }
  .feld-paar .feld.kurz { max-width: none; }
  .nur-breit { display: none; }
  .seiten-kopf { align-items: stretch; }
  .seiten-kopf > .knopf { width: 100%; }
  .kopf-aktionen { width: 100%; } .kopf-aktionen > .knopf.primaer { flex: 1; }
  .umfrage-zeile { padding: 12px; gap: 12px; }
  .uz-rechts .status-pille { display: none; }
  .schritte span:not(.s-nr) { font-size: 13px; }
  .monat-nav b { min-width: 120px; font-size: 15px; }
  .tag { border-radius: 10px; font-size: 16px; }
  .wahl button { font-size: 14px; gap: 4px; }
  .leiste .knopf { min-width: 0; flex: 1; max-width: 220px; }
  .tag-liste > li .kachel { display: none; }
}
@media (max-width: 380px) {
  .wahl button span { display: none; }
  .wahl button .ic { width: 22px; height: 22px; }
}
@media print {
  .leiste, .oben, .fuss, .kopfleiste, .kopf-aktionen, .zurueck, .kommentar-form { display: none !important; }
  body { background: #fff; } .karte { border-color: #ccc; break-inside: avoid; }
}
