/* Lehrerplaner – Gestaltung angelehnt an die Walter-Gropius-Schule Erfurt (Anthrazit, Weiß, Rot) */
:root {
  --anthrazit: #535353;
  --dunkel: #2f2f2f;
  --rot: #c8102e;
  --rot-hell: #fbe9ec;
  --bg: #f3f3f1;
  --flaeche: #ffffff;
  --flaeche2: #f8f8f6;
  --linie: #dddcd7;
  --linie2: #ecebe7;
  --text: #222222;
  --text2: #6b6b6b;
  --ferien: #fff1c7;
  --ferien-text: #7a5a00;
  --feiertag: #fde3e3;
  --feiertag-text: #a3142a;
  --heute: #c8102e;
  --ok: #2e7d4f;
  --warn: #b26a00;
  --schatten: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
  --r: 10px;
  --font: Arial, "Helvetica Neue", Helvetica, system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dunkel"] {
  --anthrazit: #a8a8a8;
  --dunkel: #1b1b1b;
  --rot: #ff4d5e;
  --rot-hell: #3a1d21;
  --bg: #161616;
  --flaeche: #222222;
  --flaeche2: #1c1c1c;
  --linie: #3a3a3a;
  --linie2: #2c2c2c;
  --text: #ececec;
  --text2: #a4a4a4;
  --ferien: #3a3218;
  --ferien-text: #f0d27a;
  --feiertag: #3d1f23;
  --feiertag-text: #ff9aa6;
  --heute: #ff4d5e;
  --schatten: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 15px; color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%; }
a { color: var(--rot); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.muted { color: var(--text2); }
.klein { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- Kopfleiste ---------- */
.kopf { position: sticky; top: 0; z-index: 20; background: var(--dunkel); color: #fff; display: flex; align-items: center; gap: 18px; padding: 0 18px; height: 56px; }
.marke { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.marke .zeichen { width: 30px; height: 30px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; }
.marke .zeichen i { display: block; background: #fff; }
.marke .zeichen i:nth-child(2) { background: var(--rot); }
.marke .zeichen i:nth-child(3) { background: #9a9a9a; }
.marke .zeichen i:nth-child(4) { background: transparent; border: 2px solid #fff; }
.marke img { height: 32px; }
.marke small { display: block; font-weight: 400; font-size: 11px; opacity: .7; letter-spacing: .04em; text-transform: uppercase; }
.nav { display: flex; gap: 2px; height: 100%; }
.nav button { background: none; border: 0; color: #d9d9d9; padding: 0 14px; height: 100%; cursor: pointer; display: flex; align-items: center; gap: 8px; border-bottom: 3px solid transparent; }
.nav button:hover { color: #fff; }
.nav button.aktiv { color: #fff; border-bottom-color: var(--rot); }
.nav svg { width: 18px; height: 18px; }
.kopf .rechts { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.sync { display: flex; align-items: center; gap: 6px; color: #cfcfcf; white-space: nowrap; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: #6fbf8c; display: inline-block; }
.sync.offen i { background: #f2c230; }
.sync.fehler i { background: #ff5b6b; }

/* Mobile Navigation unten */
.navunten { display: none; }

main { padding: 20px; max-width: 1500px; margin: 0 auto; }

/* ---------- Bausteine ---------- */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); box-shadow: var(--schatten); }
.pad { padding: 16px; }
.leiste { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.leiste .titel { font-size: 20px; font-weight: 700; margin-right: 6px; }
.fuell { flex: 1; }
.btn { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--linie); background: var(--flaeche); border-radius: 8px; padding: 7px 12px; cursor: pointer; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--anthrazit); }
.btn.haupt { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn.haupt:hover { filter: brightness(1.08); }
.btn.dunkel { background: var(--dunkel); border-color: var(--dunkel); color: #fff; }
.btn.leise { background: none; border-color: transparent; }
.btn.leise:hover { background: var(--flaeche2); border-color: var(--linie); }
.btn.gefahr { color: var(--rot); }
.btn.icon { padding: 7px 9px; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: default; }
.gruppe { display: inline-flex; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; background: var(--flaeche); }
.gruppe button { border: 0; background: none; padding: 7px 12px; cursor: pointer; border-right: 1px solid var(--linie); }
.gruppe button:last-child { border-right: 0; }
.gruppe button.aktiv { background: var(--dunkel); color: #fff; }
.gruppe svg { width: 16px; height: 16px; display: block; }

input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=url], select, textarea {
  border: 1px solid var(--linie); background: var(--flaeche); border-radius: 8px; padding: 8px 10px; width: 100%; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--anthrazit); box-shadow: 0 0 0 3px rgba(83,83,83,.15); }
textarea { resize: vertical; min-height: 70px; }
label.feld { display: block; margin-bottom: 12px; }
label.feld > span { display: block; font-size: 12px; color: var(--text2); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .05em; }
.zeile { display: flex; gap: 12px; }
.zeile > * { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; margin-bottom: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--rot); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: var(--flaeche2); border: 1px solid var(--linie); }
.punkt { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.leer { text-align: center; padding: 40px 20px; color: var(--text2); }
.leer svg { width: 40px; height: 40px; opacity: .4; display: block; margin: 0 auto 10px; }

/* ---------- Anmeldung ---------- */
.anmeldung { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.anmeldung .bild { background: var(--dunkel); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.anmeldung .bild h1 { font-size: 44px; line-height: 1.05; margin-top: 30px; }
.anmeldung .bild p { color: #bdbdbd; max-width: 420px; line-height: 1.5; }
.anmeldung .bauhaus { position: absolute; right: -60px; bottom: -60px; width: min(360px, 42vh); height: min(360px, 42vh); opacity: .9; z-index: 0; }
.anmeldung .bild > div:not(.bauhaus) { position: relative; z-index: 1; }
.anmeldung .form { display: flex; align-items: center; justify-content: center; padding: 30px; }
.anmeldung .form .karte { width: 100%; max-width: 380px; padding: 28px; }
.anmeldung .form h2 { margin-bottom: 18px; }
.meldung { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; background: var(--rot-hell); color: var(--rot); }
.meldung.ok { background: #e5f3ea; color: var(--ok); }

/* ---------- Woche ---------- */
.woche { display: grid; border: 1px solid var(--linie); border-radius: var(--r); overflow: hidden; background: var(--flaeche); box-shadow: var(--schatten); }
.woche .kz { background: var(--flaeche2); border-right: 1px solid var(--linie); border-bottom: 1px solid var(--linie2); padding: 8px; font-size: 12px; color: var(--text2); text-align: right; }
.woche .kz b { display: block; font-size: 15px; color: var(--text); }
.woche .tk { padding: 10px; border-bottom: 1px solid var(--linie); border-right: 1px solid var(--linie2); background: var(--flaeche2); min-width: 0; }
.woche .tk .tag { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); }
.woche .tk .datum { font-size: 20px; font-weight: 700; }
.woche .tk.heute .datum { color: var(--heute); }
.woche .tk.heute { box-shadow: inset 0 3px 0 var(--heute); }
.woche .ganz { padding: 4px; border-bottom: 1px solid var(--linie); border-right: 1px solid var(--linie2); min-height: 30px; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; }
.woche .zelle { border-right: 1px solid var(--linie2); border-bottom: 1px solid var(--linie2); padding: 3px; min-height: 64px; position: relative; cursor: pointer; min-width: 0; }
.woche .zelle:hover { background: var(--flaeche2); }
.woche .zelle.frei { background: repeating-linear-gradient(-45deg, transparent 0 8px, var(--linie2) 8px 9px); cursor: default; }
.woche .zelle.jetzt { box-shadow: inset 3px 0 0 var(--heute); }
.std { border-radius: 7px; padding: 6px 8px; height: 100%; border-left: 4px solid var(--farbe, #888); background: color-mix(in srgb, var(--farbe, #888) 13%, var(--flaeche)); font-size: 13px; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.std .k { font-weight: 700; display: flex; justify-content: space-between; gap: 6px; }
.std .k span { font-weight: 400; color: var(--text2); font-size: 12px; }
.std .fa { color: var(--text2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -2px; }
.std .th { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.std .ha { color: var(--text2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.std.ausfall { opacity: .55; }
.std.ausfall .k b { text-decoration: line-through; }
.std.extra { border-left-style: dashed; }
.std .marken { display: flex; gap: 4px; margin-top: auto; }
.std .marken i { font-style: normal; font-size: 10px; padding: 0 5px; border-radius: 4px; background: var(--flaeche); border: 1px solid var(--linie); color: var(--text2); }
.band { font-size: 12px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band.ferien { background: var(--ferien); color: var(--ferien-text); }
.band.feiertag { background: var(--feiertag); color: var(--feiertag-text); }
.band.termin { background: var(--flaeche2); border-left: 3px solid var(--farbe, var(--anthrazit)); }
.band.extern { background: var(--flaeche2); border-left: 3px dotted var(--farbe, var(--anthrazit)); color: var(--text2); }
.band.auf { background: var(--flaeche2); border-left: 3px solid var(--warn); }
.band.geb { background: var(--flaeche2); border-left: 3px solid #9b59b6; }
.tagesliste { display: none; }

/* ---------- Monat ---------- */
.monat { display: grid; grid-template-columns: 44px repeat(7, 1fr); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); overflow: hidden; box-shadow: var(--schatten); }
.monat .wt { padding: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); background: var(--flaeche2); border-bottom: 1px solid var(--linie); }
.monat .kw { font-size: 11px; color: var(--text2); padding: 8px 4px; text-align: center; border-right: 1px solid var(--linie2); border-bottom: 1px solid var(--linie2); background: var(--flaeche2); }
.monat .tag { min-height: 108px; border-right: 1px solid var(--linie2); border-bottom: 1px solid var(--linie2); padding: 5px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.monat .tag:hover { background: var(--flaeche2); }
.monat .tag.fremd { opacity: .45; }
.monat .tag.ferien { background: color-mix(in srgb, var(--ferien) 55%, var(--flaeche)); }
.monat .tag.feiertag { background: color-mix(in srgb, var(--feiertag) 55%, var(--flaeche)); }
.monat .tag.we { background: var(--flaeche2); }
.monat .tag .nr { font-size: 13px; font-weight: 700; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.monat .tag.heute .nr { background: var(--heute); color: #fff; }
.monat .mehr { font-size: 11px; color: var(--text2); }

/* ---------- Jahr ---------- */
.jahr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.mini { padding: 12px; }
.mini h3 { font-size: 14px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.mini .g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: 12px; text-align: center; }
.mini .g b { font-weight: 400; color: var(--text2); font-size: 10px; }
.mini .g span { padding: 4px 0; border-radius: 4px; cursor: pointer; }
.mini .g span.we { color: var(--text2); }
.mini .g span.ferien { background: var(--ferien); color: var(--ferien-text); }
.mini .g span.feiertag { background: var(--feiertag); color: var(--feiertag-text); font-weight: 700; }
.mini .g span.beweglich { background: var(--ferien); color: var(--ferien-text); outline: 2px dashed var(--ferien-text); outline-offset: -2px; }
.mini .g span.termin { box-shadow: inset 0 -2px 0 var(--rot); }
.mini .g span.heute { background: var(--heute); color: #fff; }
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text2); align-items: center; }
.legende i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }
.ferienliste { columns: 2; font-size: 14px; }
.ferienliste div { break-inside: avoid; padding: 4px 0; border-bottom: 1px solid var(--linie2); display: flex; justify-content: space-between; gap: 10px; }

/* ---------- Klassen ---------- */
.klassen { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.klasse-karte { padding: 16px; cursor: pointer; border-top: 5px solid var(--farbe); transition: transform .12s; }
.klasse-karte:hover { transform: translateY(-2px); }
.klasse-karte .n { font-size: 24px; font-weight: 700; }
.klasse-karte .f { color: var(--text2); margin-top: 2px; }
.klasse-karte .z { display: flex; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--text2); }
.klasse-kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.klasse-kopf .farbe { width: 14px; height: 40px; border-radius: 4px; background: var(--farbe); }
.klasse-kopf .n { font-size: 26px; font-weight: 700; }
.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin-bottom: 14px; overflow-x: auto; }
.reiter button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--text2); border-bottom: 3px solid transparent; white-space: nowrap; }
.reiter button.aktiv { color: var(--text); border-bottom-color: var(--rot); font-weight: 700; }

table.tab { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.tab th, table.tab td { padding: 7px 8px; border-bottom: 1px solid var(--linie2); text-align: left; vertical-align: middle; }
table.tab th { font-size: 12px; color: var(--text2); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; background: var(--flaeche2); position: sticky; top: 0; z-index: 1; }
table.tab tr:hover td { background: var(--flaeche2); }
table.tab input { padding: 5px 7px; }
.scroll { overflow: auto; max-width: 100%; }

/* Notenbuch */
.noten { border-collapse: separate; border-spacing: 0; font-size: 14px; }
.noten th, .noten td { border-bottom: 1px solid var(--linie2); border-right: 1px solid var(--linie2); padding: 0; text-align: center; height: 36px; background: var(--flaeche); }
.noten th { background: var(--flaeche2); font-size: 12px; font-weight: 700; padding: 6px 4px; vertical-align: bottom; position: sticky; top: 0; z-index: 2; cursor: pointer; min-width: 58px; }
.noten th .art { display: block; font-weight: 400; color: var(--text2); font-size: 10px; text-transform: uppercase; }
.noten th .dt { display: block; font-weight: 400; color: var(--text2); font-size: 11px; }
.noten td.name, .noten th.name { text-align: left; padding: 0 10px; position: sticky; left: 0; z-index: 1; white-space: nowrap; min-width: 170px; }
.noten th.name { z-index: 3; cursor: default; }
.noten td input { border: 0; width: 100%; height: 100%; text-align: center; background: transparent; border-radius: 0; padding: 0; font-weight: 700; }
.noten td input:focus { background: var(--rot-hell); box-shadow: none; }
.noten td.schnitt { font-weight: 700; background: var(--flaeche2); min-width: 64px; }
.noten td.schnitt.gesamt { background: var(--dunkel); color: #fff; }
.noten tfoot td { background: var(--flaeche2); font-size: 12px; color: var(--text2); }
.n1 { color: #1e7a45; } .n2 { color: #4e8a2a; } .n3 { color: #8a7a00; } .n4 { color: #b26a00; } .n5 { color: #c8102e; } .n6 { color: #8b0000; }
:root[data-theme="dunkel"] .n1 { color: #6fd39a; } :root[data-theme="dunkel"] .n2 { color: #a5d46a; } :root[data-theme="dunkel"] .n3 { color: #e3d15e; } :root[data-theme="dunkel"] .n4 { color: #f0a54a; } :root[data-theme="dunkel"] .n5 { color: #ff6b7a; } :root[data-theme="dunkel"] .n6 { color: #ff4040; }

/* Anwesenheit */
.anw { display: grid; grid-template-columns: 1fr auto; gap: 0; }
.anw .s { padding: 8px 4px; border-bottom: 1px solid var(--linie2); display: flex; align-items: center; gap: 10px; }
.anw .b { padding: 6px 4px; border-bottom: 1px solid var(--linie2); display: flex; gap: 4px; }
.status button { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 7px; min-width: 40px; height: 34px; cursor: pointer; font-weight: 700; font-size: 13px; }
.status button.an { background: var(--dunkel); color: #fff; border-color: var(--dunkel); }
.status button.an.f { background: var(--rot); border-color: var(--rot); }
.status button.an.e { background: var(--warn); border-color: var(--warn); }
.status button.an.v { background: #7a6a00; border-color: #7a6a00; }
.matrix td.st { text-align: center; font-weight: 700; font-size: 12px; }
.matrix td.st.f { color: var(--rot); } .matrix td.st.e { color: var(--warn); } .matrix td.st.v { color: #7a6a00; }

/* Sitzplan */
.sitzplan { display: grid; gap: 8px; }
.tafel { text-align: center; background: var(--dunkel); color: #fff; border-radius: 6px; padding: 6px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px; }
.platz { min-height: 58px; border: 2px dashed var(--linie); border-radius: 8px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 13px; padding: 4px; cursor: pointer; background: var(--flaeche); user-select: none; -webkit-user-select: none; }
.platz.belegt { border-style: solid; border-color: var(--farbe, var(--anthrazit)); background: color-mix(in srgb, var(--farbe, #888) 10%, var(--flaeche)); font-weight: 700; }
.platz.belegt small { display: block; font-weight: 400; color: var(--text2); }
.platz.gewaehlt, .schueler-chip.gewaehlt { outline: 3px solid var(--rot); outline-offset: 1px; }
.platz.drueber { background: var(--rot-hell); }
.platz.kein { border: 0; background: none; cursor: pointer; opacity: .35; }
.schueler-chip { display: inline-block; padding: 6px 10px; border-radius: 99px; background: var(--flaeche2); border: 1px solid var(--linie); margin: 3px; cursor: grab; font-size: 13px; user-select: none; -webkit-user-select: none; }

/* Zufall */
.zufall { font-size: 46px; font-weight: 700; text-align: center; padding: 34px 10px; min-height: 140px; }
.gruppen { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.gruppen .karte { padding: 10px 12px; }
.gruppen h3 { font-size: 13px; color: var(--text2); text-transform: uppercase; margin-bottom: 6px; }

/* Aufgaben */
.aufgabe { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--linie2); }
.aufgabe:last-child { border-bottom: 0; }
.aufgabe .t { flex: 1; min-width: 0; }
.aufgabe.erledigt .t { text-decoration: line-through; color: var(--text2); }
.aufgabe .faellig { font-size: 12px; color: var(--text2); }
.aufgabe .faellig.ueber { color: var(--rot); font-weight: 700; }
.haken { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--anthrazit); background: none; cursor: pointer; flex: none; display: grid; place-items: center; padding: 0; }
.haken.an { background: var(--ok); border-color: var(--ok); }
.haken svg { width: 14px; height: 14px; color: #fff; }
.abschnitt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); margin: 18px 0 6px; font-weight: 700; }

/* Einstellungen */
.einst { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.einst nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.einst nav button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--text2); }
.einst nav button.aktiv { background: var(--flaeche); color: var(--text); font-weight: 700; box-shadow: var(--schatten); }
.einst section { margin-bottom: 20px; }
.einst section > h3 { margin-bottom: 4px; }
.einst section > p.muted { margin: 0 0 14px; font-size: 14px; }
.plan { border-collapse: separate; border-spacing: 4px; width: 100%; }
.plan th { font-size: 12px; color: var(--text2); font-weight: 700; text-transform: uppercase; }
.plan td.z { font-size: 12px; color: var(--text2); white-space: nowrap; text-align: right; padding-right: 6px; }
.plan td.c { height: 50px; border: 1px dashed var(--linie); border-radius: 7px; cursor: pointer; padding: 4px 6px; font-size: 13px; vertical-align: top; }
.plan td.c:hover { border-color: var(--anthrazit); }
.plan td.c.voll { border: 0; background: color-mix(in srgb, var(--farbe) 16%, var(--flaeche)); border-left: 4px solid var(--farbe); }
.plan td.c .ab { font-size: 11px; color: var(--text2); }
.adresse { display: flex; gap: 8px; }
.adresse input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; }
.farben { display: flex; gap: 6px; flex-wrap: wrap; }
.farben button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.farben button.an { border-color: var(--text); box-shadow: inset 0 0 0 2px var(--flaeche); }

/* Anleitung mit Bildern */
.anleitung { margin: -4px 0 14px; font-size: 14px; }
.anleitung summary { cursor: pointer; color: var(--rot); font-weight: 700; }
.anleitung ol { padding-left: 20px; margin: 10px 0 4px; }
.anleitung li { margin-bottom: 12px; }
.anleitung img { display: block; max-width: 100%; margin-top: 6px; border: 1px solid var(--linie); border-radius: 8px; }

/* ---------- Dialog ---------- */
.hinter { position: fixed; inset: 0; background: rgba(20,20,20,.45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow: auto; animation: ein .12s; }
.dialog { background: var(--flaeche); border-radius: 14px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.3); animation: hoch .15s; }
.dialog.breit { max-width: 860px; }
.dialog .dk { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; }
.dialog .dk h2 { font-size: 18px; flex: 1; }
.dialog .di { padding: 6px 18px 12px; }
.dialog .df { display: flex; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--linie2); }

@keyframes ein { from { opacity: 0; } }
@keyframes hoch { from { transform: translateY(10px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--dunkel); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 60; font-size: 14px; box-shadow: var(--schatten); animation: hoch .15s; }

/* ---------- Mobil / Tablet ---------- */
@media (max-width: 1100px) {
  .jahr { grid-template-columns: repeat(3, 1fr); }
  .nav button span { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  main { padding: 12px 12px 90px; }
  .kopf { height: 50px; padding: 0 12px; }
  .kopf .nav { display: none; }
  .marke small { display: none; }
  .navunten { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--dunkel); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .navunten button { flex: 1; background: none; border: 0; color: #bdbdbd; padding: 8px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; cursor: pointer; }
  .navunten button.aktiv { color: #fff; }
  .navunten button.aktiv svg { color: var(--rot); }
  .navunten svg { width: 22px; height: 22px; }
  .woche { display: none; }
  .tagesliste { display: block; }
  .tagesliste .tagblock { margin-bottom: 14px; }
  .tagesliste .tagkopf { display: flex; align-items: baseline; gap: 8px; margin: 4px 2px 8px; }
  .tagesliste .tagkopf b { font-size: 18px; }
  .tagesliste .tagkopf.heute b { color: var(--heute); }
  .tagesliste .eintrag { display: flex; gap: 10px; align-items: stretch; margin-bottom: 6px; }
  .tagesliste .eintrag .zeit { width: 48px; font-size: 12px; color: var(--text2); text-align: right; padding-top: 6px; flex: none; }
  .tagesliste .eintrag .std { flex: 1; min-height: 52px; }
  .tagesliste .bands { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
  .monat { grid-template-columns: 26px repeat(7, 1fr); }
  .monat .tag { min-height: 58px; padding: 3px; }
  .monat .tag .band { font-size: 0; padding: 0; height: 5px; border-radius: 3px; }
  .monat .kw { font-size: 9px; padding: 6px 1px; }
  .monat .wt { padding: 6px 2px; font-size: 10px; text-align: center; }
  .jahr { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mini { padding: 8px; }
  .ferienliste { columns: 1; }
  .anmeldung { grid-template-columns: 1fr; }
  .anmeldung .bild { padding: 28px; min-height: 230px; }
  .anmeldung .bild h1 { font-size: 30px; margin-top: 16px; }
  .anmeldung .bauhaus { width: 200px; height: 200px; right: -40px; bottom: -40px; }
  .einst { grid-template-columns: 1fr; }
  .einst nav { position: static; flex-direction: row; overflow-x: auto; }
  .einst nav button { white-space: nowrap; }
  .zeile { flex-direction: column; gap: 0; }
  .leiste .titel { font-size: 17px; width: 100%; }
  .klasse-kopf .n { font-size: 22px; }
  .zufall { font-size: 32px; }
  .dialog { border-radius: 14px; }
  .hinter { padding-top: 3vh; }
  .sync span { display: none; }
}

/* ---------- Druck ---------- */
@media print {
  .kopf, .navunten, .leiste .btn, .leiste .gruppe, .reiter, .nicht-drucken { display: none !important; }
  main { padding: 0; max-width: none; }
  body { background: #fff; }
  .karte, .woche, .monat { box-shadow: none; }
  .jahr { grid-template-columns: repeat(4, 1fr); }
  .noten th, table.tab th { position: static; }
}

/* ================= Papier-Planer ================= */
body.papier { position: fixed; inset: 0; width: 100%; background: #3a3835; color: #2b2b2b; overflow: hidden; height: 100vh; height: 100dvh; margin: 0; -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
body.papier input, body.papier textarea, body.papier select { -webkit-user-select: text; user-select: text; }
.pleiste { height: 52px; display: flex; align-items: center; gap: 6px; padding: 0 10px; padding-top: env(safe-area-inset-top); background: #2a2927; color: #eee; box-sizing: content-box; overflow-x: auto; scrollbar-width: none; }
.pleiste::-webkit-scrollbar { display: none; }
.pleiste .marke { display: flex; align-items: center; margin-right: 4px; }
.pleiste .marke svg, .pleiste .marke img { height: 26px; width: auto; }
.gruppe-wz { display: flex; gap: 2px; padding: 0 6px; border-right: 1px solid #45433f; }
.wz { min-width: 38px; height: 38px; border: 0; border-radius: 9px; background: transparent; color: #ddd; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0 6px; font: inherit; font-size: 14px; flex-shrink: 0; }
.wz:hover { background: #3a3936; }
.wz.an { background: #4a4844; box-shadow: inset 0 0 0 2px #eee; }
.wz.text { padding: 0 12px; border: 1px solid #55534f; }
.wz svg { width: 20px; height: 20px; }
.wz.spiegel svg { transform: scaleX(-1) rotate(-30deg); }
.wz .farbe { width: 20px; height: 20px; border-radius: 50%; display: block; box-shadow: 0 0 0 1px #0006; }
.wz .farbe.marker { border-radius: 4px; width: 14px; height: 22px; }
.wz .strich { width: 22px; background: #ddd; border-radius: 4px; display: block; }
.pleiste .fuell { flex: 1; min-width: 6px; }
.nav-b { display: flex; align-items: center; gap: 4px; }
.titel-b { font-weight: 700; font-size: 15px; white-space: nowrap; padding: 0 6px; min-width: 120px; text-align: center; }
.sync { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #aaa; white-space: nowrap; padding: 0 6px; }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: #6fbf73; display: block; }
.sync.offen i { background: #e3a33b; }
.tisch { position: relative; height: calc(100vh - 52px - env(safe-area-inset-top)); height: calc(100dvh - 52px - env(safe-area-inset-top)); display: flex; align-items: center; justify-content: center; padding-right: 56px; box-sizing: border-box; }
.buch { display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 6px 18px #0007); transition: transform .12s ease, opacity .12s ease; }
.buch .seite { transition: transform .18s ease-in, opacity .18s ease-in; }
.buch.blaettern-l .seite:last-child { transform-origin: left center; transform: perspective(2200px) rotateY(-70deg); opacity: .5; }
.buch.blaettern-r .seite:first-child { transform-origin: right center; transform: perspective(2200px) rotateY(70deg); opacity: .5; }
.ecke { position: absolute; bottom: 0; width: 44px; height: 44px; z-index: 3; cursor: pointer; touch-action: none; }
.ecke.rechts { right: 0; background: linear-gradient(135deg, #fbf8f1 0, #e2dbcd 44%, #bdb4a3 50%, #3a3835 50%); filter: drop-shadow(-2px -2px 2px #0002); }
.ecke.links { left: 0; background: linear-gradient(225deg, #fbf8f1 0, #e2dbcd 44%, #bdb4a3 50%, #3a3835 50%); filter: drop-shadow(2px -2px 2px #0002); }
.ecke:hover { width: 60px; height: 60px; }
.schnitt { position: absolute; top: 12px; bottom: 60px; width: 18px; z-index: 2; cursor: pointer; touch-action: none; }
.schnitt.rechts { right: 0; background: repeating-linear-gradient(90deg, transparent 0 3px, #e4ded2 3px 4px); }
.schnitt.links { left: 0; background: repeating-linear-gradient(90deg, #e4ded2 0 1px, transparent 1px 4px); }
.schnitt:hover { background-color: #0000000a; }
.seite { position: relative; background: #fffdf8; overflow: hidden; flex-shrink: 0; }
.buch.doppel .seite:first-child { border-radius: 6px 0 0 6px; background: linear-gradient(to left, #e9e4d9 0, #fffdf8 26px); }
.buch.doppel .seite:last-child { border-radius: 0 6px 6px 0; background: linear-gradient(to right, #e9e4d9 0, #fffdf8 26px); }
.buch:not(.doppel) .seite { border-radius: 6px; }
.seite.leer-s { background: #f1ede4 !important; }
.seite .druck, .seite .druck svg, .seite canvas, .seite .werte { position: absolute; inset: 0; width: 100%; height: 100%; }
.seite canvas { touch-action: none; }
.seite .werte { pointer-events: none; }
.nw { position: absolute; transform: translateX(-100%); color: #1f7a45; font-weight: 700; line-height: 1; background: #fffdf8cc; padding: 0 1px; border-radius: 2px; }
.nw.fragl { color: #c8102e; }
.nw.fest { color: #555; }
.schnitt-w { position: absolute; font-weight: 700; color: #3c3a36; }
.schnitt-w.klein-w { font-weight: 600; color: #6b6760; }
.tisch { gap: 0; padding-right: 0 !important; touch-action: none; overflow: hidden; }
.register { width: 52px; display: flex; flex-direction: column; gap: 4px; padding: 10px 0; box-sizing: border-box; overflow-y: auto; scrollbar-width: none; flex-shrink: 0; align-self: center; }
.register::-webkit-scrollbar { display: none; }
.register.links { align-items: flex-end; }
.reiter-b { --farbe: #888; flex: 1 1 0; min-height: 44px; max-height: 120px; width: 44px; border: 0; border-radius: 0 10px 10px 0; background: var(--farbe); color: #fff; cursor: pointer; padding: 4px 2px; display: flex; align-items: center; justify-content: center; opacity: .75; box-shadow: 2px 2px 6px #0004; font: inherit; overflow: hidden; }
.register.links .reiter-b { border-radius: 10px 0 0 10px; box-shadow: -2px 2px 6px #0004; }
.reiter-b span { writing-mode: vertical-rl; font-size: 13px; font-weight: 700; line-height: 1.1; text-align: center; white-space: nowrap; }
.register.links .reiter-b span { transform: rotate(180deg); }
.reiter-b.an { opacity: 1; width: 52px; }
.notenwahl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.notenwahl .btn { justify-content: center; font-size: 17px; min-height: 46px; }
.einst-a { margin-bottom: 18px; }
.einst-a h3 { font-size: 15px; margin: 0 0 8px; }
label.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
label.check input { width: auto; }
.breiten-kurz, .titel-b .kurz { display: none; }
@media (max-width: 1050px) { .breiten-voll, .titel-b .lang, .sync span, .pleiste .marke { display: none; } .breiten-kurz, .titel-b .kurz { display: flex; } .titel-b { min-width: 0; } .gruppe-wz { padding: 0 3px; } .wz { min-width: 34px; } }
@media (max-width: 640px) { .gruppe-wz:has(.marker) { display: none; } }
.kw-nav { position: absolute; z-index: 4; display: flex; align-items: center; gap: .35em; color: #3c3a36; }
.kw-nav .kw-t { white-space: nowrap; padding: 0 .2em; }
.kw-nav .kw-t b { margin-right: .25em; }
.kwb { border: 1px solid #cfc9bd; background: #fff; color: #3c3a36; border-radius: .45em; height: 1.9em; min-width: 1.9em; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: .9em; padding: 0 .4em; touch-action: manipulation; }
.kwb:hover { background: #f3efe6; }
.kwb svg { width: 1.1em; height: 1.1em; }
.kwb.text { padding: 0 .7em; font-weight: 600; }
.kwb.aus { opacity: .45; }
.wz.untis-hinweis { background: #c8102e; color: #fff; border: 0; font-weight: 700; padding: 0 12px; }
.wz.untis-hinweis:hover { background: #a50d26; }
.farbwahl { display: flex; flex-wrap: wrap; gap: 8px; }
.farbknopf { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px #0002; position: relative; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; color: #555; background: #f1eee8; }
.farbknopf.an { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #2f2f2f; }
.farbknopf.eigen input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.punkt-knopf { width: 18px; height: 18px; border-radius: 50%; border: 0; cursor: pointer; flex: none; box-shadow: inset 0 0 0 1px #0002; }
.reiter-b.zieht { opacity: 1; z-index: 5; box-shadow: 4px 6px 16px #0008; transition: none; position: relative; }
.ordnen { display: inline-flex; gap: 0; }
.ordnen .btn.icon { padding: 4px; min-height: 30px; }
.ordnen .btn:disabled { opacity: .25; }
.tagliste { display: flex; flex-direction: column; gap: 6px; }
.tagstunde { display: grid; grid-template-columns: 30px 104px 6px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 1px solid #e4dfd5; background: #fffdf8; border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; font-size: 16px; color: #2b2b2b; }
.tagstunde:hover:not(:disabled) { background: #f6f2ea; }
.tagstunde:disabled { cursor: default; }
.tagstunde i { width: 6px; height: 24px; border-radius: 3px; display: block; }
.tagstunde .nr { font-weight: 700; color: #6d6961; }
.tagstunde .zeit, .tagstunde .raum { color: #6d6961; font-size: 14px; }
.tagstunde.entf b { text-decoration: line-through; color: #c8102e; }
.tagstunde.entf .raum { color: #c8102e; }
.tagfrei { background: #fff1c7; color: #8a6500; padding: 8px 12px; border-radius: 8px; font-weight: 700; margin-top: 0; }
.tagfrei.fei { background: #fde3e3; color: #c8102e; }
.zoom-zurueck { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; border: 0; border-radius: 22px; background: #2a2927e6; color: #fff; font: inherit; font-weight: 700; padding: 11px 20px; box-shadow: 0 4px 14px #0006; cursor: pointer; }
.anleitung a { color: #c8102e; font-weight: 700; }
.anleitung li img { max-width: min(100%, 560px) !important; height: auto; display: block; margin: 8px 0 14px; border-radius: 8px; border: 1px solid #e4dfd5; }
.schritte { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
@media (max-width: 760px) { .schritte { grid-template-columns: 1fr; } }
.schritt { border: 1px solid #e4dfd5; border-radius: 12px; padding: 12px; background: #fffdf8; display: flex; flex-direction: column; }
.schritt-kopf { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.schritt-nr { width: 30px; height: 30px; border-radius: 50%; background: #c8102e; color: #fff; font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.schritt p { margin: 8px 0 10px; font-size: 14px; line-height: 1.45; color: #3c3a36; flex: 1; }
.schritt img { width: 100%; height: auto; display: block; border-radius: 8px; border: 1px solid #e4dfd5; margin: 0 !important; max-width: none !important; }
.schritt-link { align-self: flex-start; text-decoration: none; color: #fff !important; }
.schritt a.hier { color: #fff !important; background: #c8102e; padding: 3px 10px; border-radius: 6px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.konten-wrap { overflow-x: auto; }
table.konten { width: 100%; border-collapse: collapse; font-size: 14px; }
table.konten th { text-align: left; font-size: 12px; color: #6d6961; font-weight: 600; padding: 6px 8px; border-bottom: 2px solid #e4dfd5; }
table.konten td { padding: 8px; border-bottom: 1px solid #eee9df; vertical-align: middle; white-space: nowrap; }
table.konten tr.gesperrt td { color: #8a867e; }
table.konten td.aktionen { text-align: right; }
table.konten td.aktionen .btn { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.gefahr-t { color: #c8102e !important; }
.marke-g { margin-left: 8px; background: #fde3e3; color: #c8102e; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }
.schritt img { cursor: zoom-in; }
.bild-gross { position: fixed; inset: 0; z-index: 200; background: #000c; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; cursor: zoom-out; }
.bild-gross img { max-width: 96vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 10px 40px #0008; }
.bild-gross span { color: #ddd; font-size: 14px; }
/* Aufbau als Spalte: Leiste oben, Tisch füllt den Rest (auch auf dem Handy) */
body.papier { display: flex; flex-direction: column; }
body.papier .pleiste { touch-action: none; }
body.papier .pleiste { flex: none; }
body.papier .tisch { flex: 1 1 auto; height: auto !important; min-height: 0; }
.tisch.ueber { align-items: flex-start; padding-top: 10px; }
.tisch.ueber .register { align-self: flex-start; }
.hinter, .hinter * { touch-action: manipulation; }
@media (max-width: 700px) {
  .pleiste { flex-wrap: wrap; height: auto; padding: 4px 6px; padding-top: calc(4px + env(safe-area-inset-top)); row-gap: 2px; overflow: visible; }
  .pleiste .fuell { display: none; }
  .nav-b { margin-left: auto; }
}
@media (max-height: 460px) { .pleiste { height: 44px; } .wz { height: 34px; min-width: 32px; } }
/* beim Zoomen: Register bleiben am Bildschirmrand über der Seite */
.tisch.gezoomt .register { position: absolute; top: 10px; z-index: 6; height: calc(100% - 20px) !important; }
.tisch.gezoomt .register.links { left: 0; }
.tisch.gezoomt #register { right: 0; }
.tisch.gezoomt .reiter-b { opacity: .92; }
.tisch.gezoomt .register.links { align-items: flex-start; }
.tisch.gezoomt .register.links .reiter-b { border-radius: 0 10px 10px 0; }
.tisch.gezoomt #register { align-items: flex-end; }
.tisch.gezoomt #register .reiter-b { border-radius: 10px 0 0 10px; }

/* Fenster passen immer auf den Bildschirm */
.dialog, .dialog.breit { max-width: min(860px, calc(100vw - 16px)); min-width: 0; box-sizing: border-box; }
.dialog .di { overflow-wrap: anywhere; }
.dialog img { max-width: 100%; height: auto; }
.schritte { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)) !important; }
.schritt { min-width: 0; }
@media (max-width: 600px) { .hinter { padding: 8px 8px 16px !important; } .dialog .dk, .dialog .di, .dialog .df { padding-left: 12px; padding-right: 12px; } .df { flex-wrap: wrap; } }
/* ---------- Werkzeuge ---------- */
.aufklapp { position: fixed; z-index: 120; background: #2f2e2b; color: #eee; border-radius: 14px; padding: 12px; box-shadow: 0 12px 34px #0009; min-width: 200px; max-width: calc(100vw - 16px); }
.auf-titel { font-size: 12px; font-weight: 700; color: #aaa; text-transform: uppercase; letter-spacing: .05em; margin: 2px 2px 8px; }
.palette { display: grid; grid-template-columns: repeat(8, 32px); gap: 8px; margin-bottom: 10px; }
.pfarbe { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px #0004; }
.pfarbe.an { box-shadow: 0 0 0 3px #2f2e2b, 0 0 0 5px #fff; }
.eigene-farbe { display: flex; align-items: center; gap: 10px; font-size: 14px; margin: 0 2px 12px; cursor: pointer; }
.eigene-farbe input { width: 40px; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; }
.staerke { display: flex; align-items: center; gap: 12px; padding: 0 2px; }
.staerke input { flex: 1; accent-color: #c8102e; }
.vorschau-strich { width: 56px; border-radius: 6px; display: block; }
.auswahlliste { display: flex; flex-direction: column; gap: 2px; }
.auswahlliste.raster { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.auswahlliste button { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; color: #eee; font: inherit; font-size: 15px; padding: 9px 12px; border-radius: 9px; cursor: pointer; text-align: left; }
.auswahlliste button:hover { background: #45433f; }
.auswahlliste button.an { background: #55524c; }
.auswahlliste svg { width: 20px; height: 20px; flex: none; }
.radpunkt { border-radius: 50%; border: 2px solid #ddd; display: inline-block; flex: none; }
.wz.mit-pfeil { position: relative; }
.wz.mit-pfeil.an::after { content: ""; position: absolute; right: 3px; bottom: 3px; border: 4px solid transparent; border-top-color: #bbb; transform: translateY(3px); }
.wz.klein { min-width: 30px; padding: 0 3px; }
.wz .farbe.gross { width: 24px; height: 24px; }
.farbwahl-k { position: relative; }
.farbwahl-k .regenbogen { position: absolute; right: 2px; bottom: 2px; width: 11px; height: 11px; border-radius: 50%; background: conic-gradient(#c8102e, #e36414, #d4a017, #5aa832, #0f8a7a, #6b3fa0, #c8102e); box-shadow: 0 0 0 2px #2a2927; }
.auswahl { position: absolute; z-index: 4; border: 2px dashed #c8102e; border-radius: 6px; pointer-events: none; background: #c8102e0d; }
.auswahl-leiste { position: absolute; left: 0; bottom: calc(100% + 6px); display: flex; gap: 4px; pointer-events: auto; }
.auswahl-leiste button { background: #2a2927; color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.auswahl-leiste button:last-child { background: #c8102e; }
@media (max-width: 700px) { .farben-g .wz.klein:nth-of-type(n+4) { display: none; } .palette { grid-template-columns: repeat(6, 32px); } }
/* ---------- Schulgebäude ---------- */
.geb-leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.geb-etagen button { padding: 6px 10px; }
.geb-wrap { position: relative; width: 100%; height: min(62vh, 560px); background: radial-gradient(ellipse at 50% 40%, #fbf9f4, #e9e4da); border-radius: 12px; overflow: hidden; }
.geb-cv { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.geb-info { min-height: 22px; margin-top: 8px; font-size: 14px; color: #55524c; }
.geb-leiste .btn.an { background: #2a2927; color: #fff; }
.geb-finden { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.geb-finden input { width: 200px; padding: 6px 10px; }
.chip { border: 1px solid #d9d3c7; background: #fff; color: #3c3a36; border-radius: 16px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { background: #f3efe6; }
.chip.an { background: #c8102e; border-color: #c8102e; color: #fff; }
.geb-vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.geb-wrap{position:relative}
.geb-hilfe{position:absolute;left:10px;bottom:8px;right:10px;font-size:12px;color:#6b665e;pointer-events:none;text-shadow:0 0 4px #f4f1ea}
.geb-chips{display:contents}
.geb-vorschlaege{margin-bottom:14px}
.geb-beleg select,.geb-beleg input[type=date]{height:38px;border:1px solid var(--linie,#ccc);border-radius:8px;padding:0 8px;font:inherit;background:#fff}
.geb-beleg{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.geb-beleg select{width:auto!important;flex:0 1 auto}.geb-beleg input[type=date]{width:auto!important;flex:0 0 auto}
.geb-datumbox{display:inline-flex;align-items:center;gap:2px;position:relative;border:1px solid var(--linie,#ccc);border-radius:8px;background:#fff}
.geb-datumbox .btn{height:36px;min-width:36px;font-size:20px;padding:0 8px}
.geb-datumbox .geb-datum{font-size:15px;min-width:180px}
.geb-datum-versteckt{position:absolute;left:50%;bottom:0;width:1px!important;height:1px!important;opacity:0;pointer-events:none;border:0;padding:0}
.beleg-tab{width:100%;border-collapse:collapse;font-size:15px}
.beleg-tab th{text-align:left;font-weight:600;color:#6b665e;font-size:13px;padding:6px 8px;border-bottom:1px solid #ddd}
.beleg-tab td{padding:7px 8px;border-bottom:1px solid #eee}
.beleg-tab tr.jetzt td{background:#fbe3e6;font-weight:600}
.beleg-tab tr.aus td{color:#999;text-decoration:line-through}
.geb-datumbox select{border:0!important;background:transparent!important;height:36px;font-size:15px}
.geb-lehrer{margin-top:6px}.geb-lehrer input{width:100%}.geb-lehrer .geb-vorschlaege{margin-top:8px}
.chip.eigen{display:inline-flex;align-items:center;gap:2px;padding-right:4px}
.chip.eigen button{border:0;background:none;font:inherit;color:inherit;cursor:pointer;padding:0}
.chip.eigen .weg{opacity:.55;margin-left:6px;font-size:12px}
.chip.eigen .weg:hover{opacity:1}
.chip.neu{border-style:dashed}
.geb-neuart{display:flex;gap:8px;margin:-4px 0 12px}
.geb-neuart input{flex:1}
.geb-modus{display:inline-flex;gap:0;margin:0 0 8px;border-bottom:1px solid #ddd;width:100%}
.geb-modus button{border:0;background:none;font:inherit;font-size:15px;padding:6px 14px;color:#6b665e;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-1px}
.geb-modus button.an{color:#2a2927;font-weight:600;border-bottom-color:#c8102e}
.vl-wrap{position:relative;width:100%}
.vl-wrap>input{width:100%}
.vl-box{display:none;margin-top:4px;max-height:240px;overflow-y:auto;-webkit-overflow-scrolling:touch;border:1px solid #d8d3ca;border-radius:10px;background:#fff;box-shadow:0 6px 18px rgba(0,0,0,.12)}
.vl-ein{display:flex;justify-content:space-between;gap:12px;width:100%;text-align:left;border:0;border-bottom:1px solid #f0ece5;background:none;font:inherit;font-size:16px;padding:11px 14px;color:#2a2927;cursor:pointer}
.vl-ein:last-child{border-bottom:0}
.vl-ein:hover,.vl-ein:active{background:#f6f2ea}
.vl-neben{color:#9a948a;font-size:13px}
.geb-teilen{margin-top:14px;border-top:1px solid #eee;padding-top:10px}
.geb-teilen summary{cursor:pointer;font-size:14px;color:#6b665e}
.geb-teilen-zeile{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px}
.geb-teilen-zeile select{width:auto;height:38px}
.geb-grundriss{width:100%;max-height:300px;margin-top:4px;background:#f7f4ee;border-radius:8px}
.geb-grundriss .g-raum{fill:#e6e1d6;stroke:#b9b2a5;stroke-width:1}
.geb-grundriss .g-raum.ich{fill:#f6d5da}
.geb-grundriss .g-wand{stroke:#c8102e;stroke-width:5;stroke-linecap:round}
.geb-grundriss .g-wand.weg{stroke:#9a948a;stroke-width:3;stroke-dasharray:6 6}
.geb-grundriss .g-fang{stroke:rgba(0,0,0,.001);stroke-width:22;cursor:pointer;pointer-events:stroke}
