/* RBS – Regenbogenschule Steinfurt · sachlich, freundlich, reduziert
   Farben der Homepage: Gelb #ecbe12 · Orange #d37019 · Rot #c3002f · Lila #59237b · Blau #007fb3 · Grün #5da442 */

:root {
  --gelb: #ecbe12; --orange: #d37019; --rot: #c3002f; --lila: #59237b; --blau: #007fb3; --gruen: #5da442;
  --blau-dunkel: #00658f; --lila-hell: #f3edf7; --blau-hell: #e5f2f8;
  --text: #23262b; --text-leise: #5b6270; --bg: #f6f7f9; --karte: #fff; --rand: #e2e5ea;
  --radius: 14px; --radius-k: 9px;
  --schatten: 0 1px 2px rgba(20, 30, 50, .06), 0 2px 8px rgba(20, 30, 50, .04);
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--schrift); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--blau-dunkel); }
a:hover { color: var(--lila); }
h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 .6rem; color: var(--lila); font-weight: 650; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; color: var(--text); font-weight: 650; }
h3 { font-size: 1rem; margin: 1.2rem 0 .5rem; color: var(--text-leise); font-weight: 600; }
p { margin: 0 0 .8rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; border-radius: 4px; }
code { background: var(--bg); padding: .1em .35em; border-radius: 5px; font-size: .95em; word-break: break-all; }

/* ---------- Kopf ---------- */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1.25rem; background: #fff; }
.marke { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--text); min-width: 0; }
.marke .logo { height: 52px; width: auto; flex: none; }
.marke-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.marke-text strong { font-size: 1.1rem; color: var(--lila); }
.marke-text span { font-size: .85rem; color: var(--text-leise); }
.kopf-rechts { display: flex; align-items: center; gap: .9rem; }
.wer { color: var(--text-leise); font-size: .92rem; }
.regenbogen { display: flex; height: 5px; }
.regenbogen i { flex: 1; }
.regenbogen i:nth-child(1) { background: var(--rot); }
.regenbogen i:nth-child(2) { background: var(--orange); }
.regenbogen i:nth-child(3) { background: var(--gelb); }
.regenbogen i:nth-child(4) { background: var(--gruen); }
.regenbogen i:nth-child(5) { background: var(--blau); }
.regenbogen i:nth-child(6) { background: var(--lila); }

.burger { width: 46px; height: 46px; border: 1px solid var(--rand); border-radius: 12px; background: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
.burger:hover { border-color: var(--blau); }

/* ---------- Reiter ---------- */
.reiter { display: flex; align-items: flex-end; gap: .25rem; padding: .9rem 0 0; width: 85%; margin: 0 auto; border-bottom: 2px solid var(--blau); }
.reiter a, .reiter-menue-knopf { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem 1.1rem; border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; text-decoration: none; color: var(--blau-dunkel); background: transparent; white-space: nowrap; font: inherit; font-weight: 600; cursor: pointer; }
.reiter a:hover, .reiter-menue-knopf:hover { background: var(--blau-hell); color: var(--blau-dunkel); }
.reiter > a.aktiv, .reiter-menue-knopf.aktiv { background: var(--blau); color: #fff; }
.reiter .zahl { background: var(--rot); color: #fff; border-radius: 999px; font-size: .78rem; padding: 0 .45rem; min-width: 1.3rem; text-align: center; }
.reiter-menue { position: relative; margin-left: auto; }
.reiter-menue-knopf .pfeil { font-size: .8rem; }
.reiter-menue-liste { position: absolute; right: 0; top: 100%; z-index: 30; min-width: 220px; padding: .3rem 0; background: #fff; border: 1px solid var(--rand); border-top: 3px solid var(--blau); border-radius: 0 0 10px 10px; box-shadow: 0 10px 28px rgba(20, 30, 50, .14); }
.reiter-menue-liste a { display: flex; width: 100%; border-radius: 0; padding: .65rem 1rem; color: var(--text); font-weight: 520; }
.reiter-menue-liste a.aktiv { background: var(--blau-hell); color: var(--blau-dunkel); font-weight: 700; }

/* ---------- Burgermenü ---------- */
.burger-menue { position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 88vw); background: #fff; z-index: 50; box-shadow: -6px 0 24px rgba(0, 0, 0, .12); padding: 1rem; overflow-y: auto; }
.burger-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; color: var(--lila); }
.burger-menue nav a { display: block; padding: .8rem .9rem; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 520; }
.burger-menue nav a:hover { background: var(--blau-hell); color: var(--blau-dunkel); }
.burger-menue hr { border: 0; border-top: 1px solid var(--rand); margin: .6rem 0; }
.schleier { position: fixed; inset: 0; background: rgba(20, 25, 35, .3); z-index: 40; }
.schliessen { border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--text-leise); padding: .2rem .5rem; border-radius: 8px; }
.schliessen:hover { background: var(--bg); color: var(--text); }

/* ---------- Inhalt, Karten ---------- */
.inhalt { width: 85%; margin: 0 auto; padding: 1rem 0 4rem; }
.angaben dd.dezent { font-size: .88rem; color: var(--text-leise); }
.angaben dd.dezent a { color: var(--text-leise); }
.angaben dd.dezent a:hover { color: var(--blau-dunkel); }
.inhalt.schmal { width: auto; max-width: 560px; padding: 1rem .9rem 3rem; }
.karte { background: var(--karte); border: 1px solid var(--rand); border-radius: var(--radius); padding: 1.2rem 1.3rem; margin-bottom: 1rem; box-shadow: var(--schatten); }
.karte.laden { color: var(--text-leise); text-align: center; }
.seitenkopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin: .6rem 0 1rem; }
.seitenkopf h1 { margin: 0; }
.seitenkopf .aktionen { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 1rem; }
.klein { font-size: .9rem; color: var(--text-leise); }
.leer { color: var(--text-leise); font-style: italic; margin: .4rem 0; }
.zurueck { display: inline-block; margin: .2rem 0 .4rem; color: var(--text-leise); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: .3rem 0; }
.zurueck:hover { color: var(--blau-dunkel); }
.text-block { white-space: pre-wrap; overflow-wrap: anywhere; }
.hinweis { background: var(--blau-hell); border-left: 4px solid var(--blau); padding: .7rem .9rem; border-radius: var(--radius-k); margin: 0 0 1rem; }
.hinweis.fehler { background: #fbe6ea; border-color: var(--rot); color: #8a0022; }
.rot { color: var(--rot); }

/* ---------- Knöpfe ---------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .55rem 1rem; border: 1px solid var(--rand); border-radius: 10px; background: #fff; color: var(--text); font: inherit; font-weight: 560; cursor: pointer; text-decoration: none; min-height: 42px; }
.knopf:hover { border-color: var(--blau); color: var(--blau-dunkel); }
.knopf.primaer { background: var(--blau); border-color: var(--blau); color: #fff; }
.knopf.primaer:hover { background: var(--blau-dunkel); border-color: var(--blau-dunkel); color: #fff; }
.knopf.gruen { background: #e8f3e3; border-color: #bfdcb1; color: #2f5d20; }
.knopf.gruen:hover { background: var(--gruen); color: #fff; }
.knopf.rot { color: var(--rot); }
.knopf.rot:hover { border-color: var(--rot); }
.knopf.leise { background: transparent; border-color: transparent; color: var(--text-leise); }
.knopf.leise:hover { background: var(--bg); color: var(--text); }
.knopf.leise.rot { color: var(--rot); }
.knopf.mini { padding: .25rem .6rem; min-height: 32px; font-size: .86rem; font-weight: 520; }
.knopf.gross { width: 100%; padding: .9rem 1.2rem; font-size: 1.08rem; min-height: 54px; margin: .4rem 0; }
.knopf:disabled { opacity: .6; cursor: wait; }
.knopf.arbeitet::after { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: drehen .7s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0; align-items: center; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--text-leise); border: 1px solid transparent; }
.f-neu, .m-neu { background: #fbe6ea; color: #9e0026; }
.f-wir, .m-in_bearbeitung { background: #fbeee2; color: #8f4a0d; }
.f-it { background: var(--blau-hell); color: #005a80; }
.f-wartet { background: #fdf5d6; color: #6e5600; }
.f-abgeschlossen, .m-erledigt { background: #e8f3e3; color: #3b6e2a; }
.m-gesehen { background: var(--lila-hell); color: var(--lila); }
.m-abgelehnt { background: #eceef1; color: #4b525d; }
.p-hoch { background: #fbeee2; color: #8f4a0d; border-color: #f0c9a4; }
.p-dringend { background: var(--rot); color: #fff; }
.p-niedrig { background: #eceef1; color: #4b525d; }
.z-in_betrieb { background: #e8f3e3; color: #3b6e2a; }
.z-eingeschraenkt { background: #fdf5d6; color: #6e5600; }
.z-defekt { background: #fbe6ea; color: #9e0026; }
.z-in_reparatur { background: #fbeee2; color: #8f4a0d; }
.neu-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--rot); flex: none; }

/* ---------- Listen ---------- */
.liste { display: flex; flex-direction: column; }
.zeile { display: flex; align-items: center; gap: .7rem; padding: .75rem .6rem; border-bottom: 1px solid var(--rand); text-decoration: none; color: var(--text); border-radius: 8px; flex-wrap: wrap; }
.zeile:last-child { border-bottom: 0; }
a.zeile:hover { background: var(--blau-hell); }
.zeile.erledigt { opacity: .6; }
.zeile.erledigt strong { text-decoration: line-through; }
.z-haupt { flex: 1 1 240px; display: flex; flex-direction: column; min-width: 0; }
.z-haupt small { color: var(--text-leise); overflow-wrap: anywhere; }
.z-rechts { color: var(--text-leise); font-size: .88rem; white-space: nowrap; }
.z-rechts.rot { color: var(--rot); font-weight: 600; }
.zeile input[type=checkbox] { width: 22px; height: 22px; }
.gruppe { margin: 1rem 0 .2rem; padding-left: .6rem; color: var(--lila); }
.raum-kurz { min-width: 3.2rem; text-align: center; font-weight: 700; color: var(--lila); background: var(--lila-hell); border-radius: 8px; padding: .3rem .5rem; }
.datei-symbol { font-size: .7rem; font-weight: 700; background: var(--lila-hell); color: var(--lila); border-radius: 6px; padding: .35rem .45rem; min-width: 3rem; text-align: center; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--rand); background: #fff; border-radius: 999px; padding: .35rem .9rem; font: inherit; cursor: pointer; color: var(--text); }
.chip.aktiv { background: var(--lila); border-color: var(--lila); color: #fff; }
.chips.gross .chip { padding: .7rem 1rem; font-size: 1rem; }
.filterzeile { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: .6rem; }

/* ---------- Kacheln ---------- */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; }
.kachel { display: flex; flex-direction: column; padding: .9rem 1rem; border-radius: 12px; border: 1px solid var(--rand); border-top: 5px solid var(--rand); text-decoration: none; color: var(--text); background: #fff; }
.kachel strong { font-size: 1.8rem; line-height: 1.1; }
.kachel span { color: var(--text-leise); font-size: .9rem; }
.kachel:hover { box-shadow: var(--schatten); }
.k-neu { border-top-color: var(--rot); }
.k-wir { border-top-color: var(--orange); }
.k-it { border-top-color: var(--blau); }
.k-wartet { border-top-color: var(--gelb); }

/* ---------- Angaben, Zeitleiste ---------- */
.angaben { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0 0 1rem; }
.angaben dt { color: var(--text-leise); }
.angaben dd { margin: 0; }
.zeitleiste { list-style: none; margin: 1rem 0 0; padding: 0 0 0 1.1rem; border-left: 3px solid var(--rand); }
.zeitleiste li { position: relative; padding: 0 0 1.1rem .6rem; }
.zeitleiste li::before { content: ""; position: absolute; left: -1.62rem; top: .35rem; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--blau); }
.zeitleiste li.mit-status::before { background: var(--blau); }
.zeitleiste li.fuer-melder::before { border-color: var(--gruen); }
.zeitleiste li.ist-mail::before { border-color: var(--lila); }
details.mailtext { margin-top: .3rem; }
details.mailtext summary { cursor: pointer; color: var(--blau-dunkel); font-size: .9rem; }

/* ---------- Die vier Aktionen am Fall ---------- */
.fall-aktionen { display: grid; grid-template-columns: repeat(5, 1fr); gap: .7rem; margin-bottom: 1rem; }
.aktion { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: .9rem 1rem; border: 1px solid var(--rand); border-top: 5px solid var(--blau); border-radius: 12px; background: #fff; font: inherit; color: var(--text); cursor: pointer; text-align: left; box-shadow: var(--schatten); }
.aktion:hover { background: var(--blau-hell); }
.aktion .symbol { font-size: 1.4rem; line-height: 1; color: var(--blau); }
.aktion strong { font-size: 1.02rem; }
.aktion small { color: var(--text-leise); font-size: .85rem; }
.aktion.a-ki { border-top-color: var(--gelb); }
.aktion.a-ki .symbol { color: #b38f00; }
.aktion.aus { opacity: .55; }
.aktion.a-andere { border-top-color: var(--lila); }
.aktion.a-andere .symbol { color: var(--lila); }
.aktion.a-eintrag { border-top-color: var(--orange); }
.aktion.a-eintrag .symbol { color: var(--orange); }
.aktion.a-abschluss { border-top-color: var(--gruen); }
.aktion.a-abschluss .symbol { color: var(--gruen); }
@media (max-width: 1000px) { .fall-aktionen { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .fall-aktionen { grid-template-columns: 1fr 1fr; } }
input[readonly] { background: var(--bg); color: var(--text-leise); }
.zl-kopf { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; color: var(--text-leise); font-size: .86rem; }
.zl-aktionen { display: flex; gap: .3rem; }
.zeitleiste .art { display: block; color: var(--text-leise); }

/* ---------- Formulare ---------- */
.feld { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; flex: 1; }
.feld label, .label { font-weight: 600; font-size: .92rem; }
.hilfe { color: var(--text-leise); font-size: .85rem; }
input[type=text], input[type=email], input[type=search], input[type=password], input[type=number], input[type=date], input[type=file], select, textarea {
  font: inherit; color: var(--text); padding: .6rem .75rem; border: 1px solid #cfd4db; border-radius: 10px; background: #fff; width: 100%; min-height: 44px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blau); outline: 3px solid rgba(0, 127, 179, .18); outline-offset: 0; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.inline-form > select, .inline-form > input { flex: 1 1 200px; width: auto; }
.oder { color: var(--text-leise); }
.suche { max-width: 360px; }
.schalter-zeile { display: flex; align-items: center; gap: .55rem; margin: .5rem 0; cursor: pointer; }
.schalter-zeile input { width: 20px; height: 20px; accent-color: var(--blau); flex: none; }
.schalter-zeile.gross { font-size: 1.05rem; font-weight: 550; padding: .3rem 0; }
.einrueck { margin: 0 0 1rem 1.9rem; padding-left: 1rem; border-left: 3px solid var(--blau-hell); }
.code-eingabe { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; max-width: 240px; margin: .5rem auto; display: block; }
.code-eingabe.klein { font-size: 1.1rem !important; max-width: 140px; margin: 0; letter-spacing: .25em; }
.hochladen { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--rand); }
.hochladen input[type=file] { flex: 1 1 240px; }
.hochladen input[type=text] { flex: 1 1 200px; width: auto; }
.hochladen .hilfe { flex-basis: 100%; }
.ki-leiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; background: var(--lila-hell); border-radius: 10px; padding: .7rem .8rem; margin-bottom: 1rem; }
.ki-leiste > span { flex: 1 1 200px; color: var(--lila); }
.ki-leiste > input { flex: 1 1 240px; width: auto; }
ul.einfach { padding-left: 1.2rem; color: var(--text-leise); font-size: .9rem; }

/* ---------- Tabelle ---------- */
.tabelle-rahmen { overflow-x: auto; margin-top: .8rem; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabelle th { text-align: left; background: var(--blau-hell); padding: .5rem .6rem; font-weight: 600; }
.tabelle td { padding: .45rem .6rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle tr:nth-child(even) td { background: #fafbfc; }
.tabelle tr.fehlschlag td { color: var(--rot); }

/* ---------- Dialog ---------- */
.dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, 94vw); max-height: 92vh; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--text); }
.dialog.breit { width: min(760px, 96vw); }
.dialog::backdrop { background: rgba(20, 25, 35, .45); }
.dialog-kopf { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem .4rem; border-top: 5px solid var(--blau); }
.dialog-kopf h2 { margin: 0; color: var(--lila); }
.dialog-inhalt { padding: .6rem 1.2rem; overflow-y: auto; max-height: calc(92vh - 140px); }
.dialog-fuss { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; padding: .8rem 1.2rem 1rem; border-top: 1px solid var(--rand); }
.zf-einrichten ol { padding-left: 1.2rem; }
.zf-einrichten li { margin-bottom: 1rem; }
.qr { display: block; margin: .6rem 0; width: 200px; height: auto; image-rendering: pixelated; }
.qr.gross { width: 260px; margin: 1rem auto; }
.qr-blatt { text-align: center; }
.qr-logo { height: 90px; }
.qr-blatt .url { word-break: break-all; }

/* ---------- Toast ---------- */
.meldung-toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--text); color: #fff; padding: .75rem 1.2rem; border-radius: 12px; z-index: 100; max-width: min(560px, 92vw); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.meldung-toast.ok { background: #2f5d20; }
.meldung-toast.fehler { background: #9e0026; }
.meldung-toast.hinweis { background: var(--lila); }

/* ---------- Anmeldung ---------- */
.anmeldung { max-width: 460px; margin: 2rem auto; text-align: center; padding: 2rem 1.5rem; }
.anmelde-logo { width: 160px; height: auto; margin-bottom: 1rem; }
.anmeldung .knopf.leise { margin-top: .3rem; }

/* ---------- Meldeseite ---------- */
.kopf.schmal { justify-content: center; }
.melder-kopf { display: flex; justify-content: space-between; align-items: center; gap: .5rem; color: var(--text-leise); font-size: .92rem; margin-bottom: .6rem; }
.raum-suche { margin-bottom: .7rem; }
.raum-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: .4rem; }
.raum-knopf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: .45rem .3rem; border: 1px solid var(--rand); border-bottom: 4px solid var(--blau); border-radius: 10px; background: #fff; font: inherit; color: var(--text); cursor: pointer; text-align: center; min-height: 52px; min-width: 0; }
.raum-knopf:nth-child(6n+1) { border-bottom-color: var(--rot); }
.raum-knopf:nth-child(6n+2) { border-bottom-color: var(--orange); }
.raum-knopf:nth-child(6n+3) { border-bottom-color: var(--gelb); }
.raum-knopf:nth-child(6n+4) { border-bottom-color: var(--gruen); }
.raum-knopf:nth-child(6n+5) { border-bottom-color: var(--blau); }
.raum-knopf:nth-child(6n+6) { border-bottom-color: var(--lila); }
.raum-knopf strong { font-size: 1.05rem; line-height: 1.2; }
.raum-knopf span { font-size: .68rem; color: var(--text-leise); line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.raum-knopf:hover, .wahl-knopf:hover { background: var(--blau-hell); }
.raum-titel { margin: .3rem 0 .8rem; }
.wahl-liste { display: flex; flex-direction: column; gap: .5rem; }
.wahl-knopf { display: flex; flex-direction: column; align-items: flex-start; padding: .9rem 1rem; border: 1px solid var(--rand); border-radius: 12px; background: #fff; font: inherit; color: var(--text); cursor: pointer; text-align: left; min-height: 58px; }
.wahl-knopf span { color: var(--text-leise); font-size: .88rem; }
.meldung-liste { list-style: none; padding: 0; margin: 0; }
.meldung-eintrag { display: flex; flex-direction: column; gap: .15rem; padding: .7rem 0; border-bottom: 1px solid var(--rand); }
.meldung-eintrag:last-child { border-bottom: 0; }
.meldung-eintrag small { color: var(--text-leise); }
.meldung-eintrag .eigene { color: var(--lila); font-weight: 600; }
.me-kopf { display: flex; justify-content: space-between; align-items: center; }
.pille { font-size: .8rem; font-weight: 600; padding: .1rem .6rem; border-radius: 999px; }
.p-offen { background: #fbeee2; color: #8f4a0d; }
.p-erledigt { background: #e8f3e3; color: #3b6e2a; }
.antwort { background: var(--lila-hell); border-radius: 8px; padding: .5rem .7rem; margin-top: .3rem; }
.hinweis-karte { border-left: 5px solid var(--gelb); }
.danke .haken { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 50%; background: var(--gruen); color: #fff; font-size: 2.6rem; line-height: 72px; }

/* ---------- Klein ---------- */
@media (max-width: 640px) {
  .kopf { padding: .5rem .8rem; }
  .marke .logo { height: 42px; }
  .wer { display: none; }
  .inhalt { width: auto; padding: .8rem .7rem 3rem; }
  .reiter { width: auto; padding: .6rem .5rem 0; flex-wrap: wrap; }
  .reiter a, .reiter-menue-knopf { padding: .55rem .7rem; }
  .karte { padding: 1rem; }
  .zwei { grid-template-columns: 1fr; }
  .angaben { grid-template-columns: 1fr; gap: 0; }
  .angaben dd { margin-bottom: .5rem; }
  h1 { font-size: 1.35rem; }
}

/* ---------- Druck (QR-Code für die Raumtür) ---------- */
@media print {
  body.druck-qr > *:not(dialog) { display: none !important; }
  body.druck-qr .dialog { box-shadow: none; width: 100%; max-height: none; position: static; }
  body.druck-qr .dialog-kopf, body.druck-qr .dialog-fuss { display: none; }
  body.druck-qr .dialog-inhalt { max-height: none; overflow: visible; }
  body.druck-qr .qr.gross { width: 9cm; }
  body.druck-qr .qr-blatt h2 { font-size: 26pt; }
}

/* ---------- Formatierter Text: Editor und Anzeige ---------- */
.editor { border: 1px solid #cfd4db; border-radius: 10px; background: #fff; overflow: hidden; }
.editor:focus-within { border-color: var(--blau); outline: 3px solid rgba(0, 127, 179, .18); }
.editor.gesperrt { opacity: .6; }
.editor-leiste { display: flex; flex-wrap: wrap; gap: .15rem; padding: .3rem .35rem; background: var(--bg); border-bottom: 1px solid var(--rand); }
.editor-leiste button { font: inherit; font-size: .85rem; min-width: 2rem; height: 2rem; padding: 0 .5rem; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; }
.editor-leiste button:hover { background: #fff; border-color: var(--rand); }
.editor-leiste button.an { background: var(--blau-hell); border-color: #b9dbea; color: var(--blau-dunkel); }
.editor-leiste .ed-bold { font-weight: 800; }
.editor-leiste .ed-italic { font-style: italic; font-family: Georgia, serif; }
.editor-leiste .ed-underline { text-decoration: underline; }
.editor-leiste .ed-strikeThrough { text-decoration: line-through; }
.editor-leiste .trenner { width: 1px; margin: .3rem .25rem; background: var(--rand); }
.editor-flaeche { padding: .6rem .8rem; outline: none; overflow-y: auto; max-height: 55vh; line-height: 1.5; }
.editor-flaeche:empty::before { content: attr(data-platzhalter); color: #9aa1ab; }
.editor-flaeche p, .reich p { margin: 0 0 .6rem; }
.editor-flaeche > :last-child, .reich > :last-child { margin-bottom: 0; }
.editor-flaeche h3, .reich h3 { font-size: 1.05rem; margin: .8rem 0 .4rem; color: var(--lila); }
.editor-flaeche h4, .reich h4 { font-size: 1rem; margin: .7rem 0 .3rem; }
.editor-flaeche ul, .editor-flaeche ol, .reich ul, .reich ol { margin: 0 0 .6rem; padding-left: 1.5rem; }
.editor-flaeche blockquote, .reich blockquote { margin: 0 0 .6rem; padding: .3rem .8rem; border-left: 4px solid var(--lila-hell); color: var(--text-leise); }
.reich { overflow-wrap: anywhere; }
.zeitleiste .reich { margin-top: .2rem; }
.karte > .reich { margin-top: .5rem; }

.geraete-filter { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.geraete-filter .suche { max-width: none; }
.treffer { display: block; margin: .2rem 0 .3rem; }
@media (max-width: 800px) { .geraete-filter { grid-template-columns: 1fr 1fr; } .geraete-filter .suche { grid-column: 1 / -1; } }
