/* DAScampus – Gestaltung
   Idee: Schreibtinte und Stundenplan. Königsblaue Tinte als Markenfarbe, eine kühle helle Fläche,
   Stundennummern als große Ziffern an einer Zeitleiste, Vertretungen gelb wie auf dem
   ausgehängten Vertretungsplan. Schriften liegen auf dem eigenen Server (keine Google-Anfragen, DSGVO).
   Keine Build-Pipeline nötig – die Datei wird so hochgeladen. */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Ziffern: Atkinson zeichnet die Null mit Schrägstrich – für Daten und Uhrzeiten wirkt das technisch,
   deshalb kommen 0–9 im Fließtext aus der Bricolage. */
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2"); unicode-range: U+0030-0039; }
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2"); unicode-range: U+0030-0039; }
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-002F, U+003A-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-002F, U+003A-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ground: #f4f8fc;      /* Fläche */
  --surface: #ffffff;     /* Papier */
  --sunken: #f6f9fc;
  --ink: #14212e;         /* Text */
  --muted: #5b6b7c;
  --line: #dbe5ee;
  --line-strong: #b8c8d8;
  --brand: #1f8dd6;       /* Königsblaue Tinte */
  --brand-deep: #1573ad;  /* Kopfzeile */
  --brand-ink: #ffffff;
  --accent: #e4f2fb;      /* Tinte, stark verdünnt */
  --marker: #ffe45c;      /* Textmarker – Vertretungen */
  --marker-ink: #3d3200;
  --ok: #1c7c52; --warn: #8f5b00; --bad: #c8352a;
  --r-lg: 14px; --r-md: 10px; --r-sm: 7px;
  --head: "Bricolage Grotesque", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --body: "DAS Text", "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 0 rgba(21, 115, 173, .06);
  --lift: 0 6px 22px -10px rgba(21, 115, 173, .35);
  color-scheme: light;
  /* ältere Namen, die einzelne Seiten noch verwenden */
  --bg: var(--ground); --radius: var(--r-lg);
}
@media (prefers-color-scheme: dark) and (max-width: 0px) {
  :root:not([data-theme="light"]) {
    --ground: #0f1524; --surface: #182035; --sunken: #141b2d; --ink: #e7ebf5; --muted: #9ba6bd; --line: #2a3550; --line-strong: #3a4766;
    --brand: #8fa8ff; --brand-deep: #0b1638; --brand-ink: #0c1530; --accent: #22305a;
    --marker: #f2d44a; --marker-ink: #2b2300; --ok: #5fcf98; --warn: #e8b552; --bad: #ff8a7d;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3); --lift: 0 8px 26px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="never-dark"] {
  --ground: #0f1524; --surface: #182035; --sunken: #141b2d; --ink: #e7ebf5; --muted: #9ba6bd; --line: #2a3550; --line-strong: #3a4766;
  --brand: #8fa8ff; --brand-deep: #0b1638; --brand-ink: #0c1530; --accent: #22305a;
  --marker: #f2d44a; --marker-ink: #2b2300; --ok: #5fcf98; --warn: #e8b552; --bad: #ff8a7d;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3); --lift: 0 8px 26px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--body); background: var(--ground); color: var(--ink); }
a { color: var(--brand); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.01em; line-height: 1.15; }
h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; margin: 0 0 6px; }
h2 { font-size: 20px; font-weight: 650; margin: 28px 0 12px; }
h3 { font-size: 16px; font-weight: 650; margin: 22px 0 8px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.big { font-family: var(--head); font-size: 32px; font-weight: 700; }
svg { flex: 0 0 auto; }

/* --- Kopfzeile ----------------------------------------------------------------- */
header.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; }
header.top .bar { max-width: 1180px; margin: 0 auto; padding: 8px 20px; display: flex; gap: 14px; align-items: center; min-height: 58px; }
header.top a, header.top select, header.top button { color: inherit; }
.brand { text-decoration: none; display: flex; align-items: center; }
.wm { font-family: var(--head); font-size: 21px; font-weight: 400; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.wm b { font-weight: 800; letter-spacing: -.01em; }
header.top .wm b { color: #fff; }
header.top .wm { color: #dcefff; }
header.top .school { color: #dcefff; font-size: 13.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.18); }
header.top form select { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-sm); padding: 4px 8px; font: inherit; font-size: 14px; }
header.top .spacer { flex: 1; }
.mainnav { display: flex; gap: 2px; margin-left: 6px; }
.mainnav a { text-decoration: none; color: #eef8ff; padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: 15px; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.mainnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.mainnav a.active { background: #fff; color: var(--brand-deep); }
.nbadge { background: var(--marker); color: var(--marker-ink); border-radius: 999px; font-size: 12px; padding: 0 7px; line-height: 19px; font-weight: 700; }
.nbadge[hidden] { display: none; }
.lang { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; color: #dcefff; }
.lang svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.lang select { width: auto; background: transparent; border: 0; padding: 4px 2px; font: inherit; font-size: 14px; color: #fff; cursor: pointer; }
.lang select option { color: #141c2f; }
.me { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 3px 10px 3px 3px; border-radius: 999px; max-width: 220px; }
.me:hover { background: rgba(255,255,255,.08); }
.me-ava { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--brand-deep); display: grid; place-items: center; font: 700 13px/1 var(--head); flex: 0 0 auto; }
.me-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { background: none; border: 0; padding: 7px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: #eef8ff; }
.icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.icon-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1100px) { header.top .school, .me-name { display: none; } .me { padding-right: 3px; } }
@media (max-width: 760px) {
  header.top { position: static; }
  header.top .bar { flex-wrap: wrap; padding: 8px 12px 0; gap: 8px; }
  .mainnav { order: 10; width: calc(100% + 24px); margin: 4px -12px 0; padding: 6px 12px 10px; overflow-x: auto; scrollbar-width: none; }
  .mainnav::-webkit-scrollbar { display: none; }
}

main { max-width: 1180px; margin: 0 auto; padding: 30px 20px 72px; }
@media (max-width: 760px) { main { padding: 20px 14px 56px; } }

/* --- Bausteine ------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; }
.grid2 + .grid2, .grid2 + .card, .card + .grid2 { margin-top: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 180px; }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi .card { margin: 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; color: var(--muted); font-weight: 700; background: var(--sunken); }
thead th:first-child { border-top-left-radius: var(--r-sm); } thead th:last-child { border-top-right-radius: var(--r-sm); }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 45%, transparent); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: center; font-family: var(--head); font-variant-numeric: tabular-nums; }
td.excluded { color: var(--muted); }
td.selected { font-weight: 700; }
.table-wrap { overflow-x: auto; }

label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=search], input[type=tel], input[type=url], input:not([type]), select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type=file] { font: inherit; font-size: 14px; padding: 10px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); width: 100%; background: var(--sunken); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 17px; height: 17px; }
input.grade { width: 4.4em; text-align: center; padding: 7px; }
textarea { min-height: 220px; line-height: 1.5; }
.checks label, label.checks { font-weight: 400; display: flex; gap: 9px; align-items: center; margin: 8px 0; }

.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 999px; padding: 10px 20px; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: color-mix(in srgb, var(--brand) 86%, #000); }
.btn.secondary { background: var(--surface); color: var(--brand); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--brand); background: var(--accent); }
.btn.small { padding: 6px 13px; font-size: 14px; }
button.link { background: none; border: 0; font: inherit; cursor: pointer; color: var(--brand); padding: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.linkbtn:hover { color: var(--brand); text-decoration: underline; }

.flash { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--r-md); padding: 11px 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.flash.errors, .errors { color: var(--bad); }
.flash.errors { border-left-color: var(--bad); }
.notice { border-left: 4px solid var(--warn); background: var(--surface); padding: 11px 16px; border-radius: var(--r-sm); margin: 12px 0; }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--sunken); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: transparent; }
.pill.warn { color: var(--marker-ink); background: var(--marker); border-color: transparent; }
.pill.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: transparent; }
.pill.active { background: var(--accent); color: var(--brand); border-color: transparent; }
.chip { display: inline-block; font: 700 13px/1 var(--body); padding: 5px 10px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); vertical-align: 2px; margin-left: 6px; }
.letter-body { white-space: pre-wrap; }
.back { margin: 0 0 10px; }
.back a { text-decoration: none; font-weight: 700; }

/* --- Anmeldung ------------------------------------------------------------------ */
.login-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: center; max-width: 900px; margin: 6vh auto 0; }
.login { margin: 0; padding: 28px; }
.login h1 { font-size: 28px; }
.login .btn { width: 100%; justify-content: center; margin-top: 8px; }
.login-brand { color: var(--brand-deep); }
.wm.big { font-size: clamp(44px, 7vw, 76px); color: var(--brand); display: block; margin-bottom: 26px; }
.wm.big b { color: var(--brand-deep); }
.login-plan { display: grid; gap: 7px; max-width: 320px; }
.lp-row { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; }
.lp-row b { font: 700 22px/1 var(--head); color: var(--muted); text-align: right; }
.lp-row span { display: block; border-left: 5px solid var(--c); background: color-mix(in srgb, var(--c) 11%, var(--surface)); border-radius: var(--r-sm); padding: 6px 12px; font-weight: 700; color: var(--ink); }
.lp-row span.lp-sport { display: flex; align-items: center; gap: 8px; color: #b35a14; }
.picto { width: 20px; height: 20px; flex: none; }
.lp-sports { display: flex; justify-content: space-between; margin: 14px 0 0 44px; color: var(--brand); opacity: .75; }
.lp-sports .picto { width: 30px; height: 30px; stroke-width: 1.7; }
.lp-row i { display: block; height: 32px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); }
@media (prefers-color-scheme: dark) and (max-width: 0px) { :root:not([data-theme="light"]) .login-brand, :root:not([data-theme="light"]) .wm.big b { color: #fff; } }
:root[data-theme="never-dark"] .login-brand, :root[data-theme="never-dark"] .wm.big b { color: #fff; }
@media (max-width: 760px) { .login-wrap { grid-template-columns: 1fr; gap: 16px; margin-top: 2vh; } .login-plan { display: none; } .wm.big { margin: 0; } }

/* --- Startseite ------------------------------------------------------------------ */
.hello { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 22px; }
.hello h1 { margin: 0; }
.today-line { margin: 0; color: var(--muted); font-size: 17px; }
.home.has-plan { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr); gap: 22px; align-items: start; }
.home.has-plan.multi { grid-template-columns: 1fr; }
.home.has-plan:not(.multi) .tiles { grid-template-columns: 1fr; gap: 8px; }
@media (max-width: 900px) { .home.has-plan { grid-template-columns: 1fr; } .home.has-plan:not(.multi) .tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--brand); box-shadow: var(--lift); }
.t-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; }
.tile svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.t-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.t-title { font-weight: 700; line-height: 1.3; }
.t-text { color: var(--muted); font-size: 14px; line-height: 1.35; }
.tile.accent { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tile.accent .t-icon { background: rgba(255,255,255,.16); color: inherit; }
.tile.accent .t-text { color: inherit; opacity: .85; }
.badge { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--marker); color: var(--marker-ink); font: 700 14px/26px var(--head); text-align: center; flex: 0 0 auto; }

/* --- Stundenplan ------------------------------------------------------------------ */
.tt-toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 18px; }
.tt-toolbar h1 { margin: 0; display: flex; align-items: center; gap: 4px; }
.tt-for { display: flex; gap: 8px; flex-wrap: wrap; }
.tt-for select { width: auto; min-width: 230px; font-weight: 700; border-radius: 999px; padding: 8px 14px; }
.tt-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.tt-nav .btn.small { padding: 7px 13px; }
.tt-seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.tt-seg a { padding: 4px 13px; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--muted); border-radius: 999px; }
.tt-seg a.active { background: var(--brand); color: var(--brand-ink); }
.tt-weektype { display: inline-block; margin-left: 10px; padding: 5px 10px; border-radius: 999px; font: 700 13px/1 var(--body); background: var(--brand); color: var(--brand-ink); vertical-align: middle; }
.tt-date { margin: 4px 0 14px; font-size: 21px; }

/* Zeitleiste: große Stundenziffern links, verbunden durch eine feine Linie */
.tt-day { display: flex; flex-direction: column; gap: 8px; position: relative; }
.tt-row { display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: stretch; position: relative; }
.tt-time { display: flex; flex-direction: column; align-items: flex-end; padding: 2px 14px 0 0; border-right: 2px solid var(--line); line-height: 1.25; font: 500 13px/1.25 var(--head); font-variant-numeric: tabular-nums; color: var(--muted); position: relative; }
.tt-time strong { font: 700 28px/1 var(--head); color: var(--ink); letter-spacing: -.02em; margin-bottom: 3px; }
.tt-row.free .tt-time strong { color: var(--line-strong); }
.tt-row.free .tt-slot { border: 1.5px dashed var(--line); border-radius: var(--r-md); min-height: 34px; }
.tt-row.now .tt-time { border-right-color: var(--brand); }
.tt-row.now .tt-time strong { color: var(--brand); }
.tt-row.now .tt-time::after { content: ""; position: absolute; right: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.tt-row.now .tt-card { box-shadow: var(--lift); }
.tt-slot { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tt-card { --c: var(--brand); border-left: 6px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); border-radius: var(--r-md); padding: 10px 14px; }
.tt-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tt-subj { font: 700 18px/1.25 var(--head); }
.tt-meta { display: flex; flex-wrap: wrap; gap: 3px 16px; font-size: 14px; color: var(--muted); margin-top: 2px; }
.tt-room { display: inline-flex; align-items: center; gap: 4px; }
.tt-card svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-badge { font-size: 12.5px; font-weight: 700; border-radius: 4px; padding: 1px 8px; white-space: nowrap; }
.tt-badge.bad { background: var(--bad); color: #fff; }
/* Vertretung: wie mit dem Textmarker angestrichen */
.tt-badge.warn { background: var(--marker); color: var(--marker-ink); transform: rotate(-1.5deg); border-radius: 3px 6px 4px 7px; }
.tt-substitute, .tt-changed { background: color-mix(in srgb, var(--marker) 16%, var(--surface)); }
.tt-cancelled { background: var(--sunken); border-left-color: var(--line-strong); }
.tt-cancelled .tt-subj, .tt-cancelled .tt-meta { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.tt-covered { opacity: .62; }
.tt-note { font-size: 13.5px; margin-top: 5px; color: var(--muted); }
.tt-topic, .tt-hw { display: flex; gap: 7px; align-items: flex-start; font-size: 14px; margin-top: 7px; line-height: 1.4; }
.tt-topic svg, .tt-hw svg { margin-top: 2px; color: var(--c); }
.tt-hw { background: var(--surface); border: 1px solid color-mix(in srgb, var(--c) 25%, var(--line)); border-radius: var(--r-sm); padding: 6px 9px; }
.tt-rec { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 13.5px; font-weight: 700; text-decoration: none; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); }
.tt-rec:hover { border-color: var(--brand); }
.tt-rec.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.tt-empty { padding: 10px 0; }
.tt-holiday { padding: 18px; border-radius: var(--r-md); background: color-mix(in srgb, var(--marker) 35%, var(--surface)); color: var(--marker-ink); font-weight: 700; margin: 0; }
@media (prefers-color-scheme: dark) and (max-width: 0px) { :root:not([data-theme="light"]) .tt-holiday { color: var(--ink); } }
:root[data-theme="never-dark"] .tt-holiday { color: var(--ink); }

.tt-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tt-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; min-width: 0; }
.tt-col.today { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.tt-colhead { font: 700 16px/1.2 var(--head); margin: 2px 2px 10px; }
.tt-col .tt-row { grid-template-columns: 24px 1fr; gap: 8px; }
.tt-col .tt-time { border-right: 0; padding: 4px 0 0; align-items: center; }
.tt-col .tt-time strong { font-size: 17px; }
.tt-col .tt-card { padding: 8px 10px; }
.tt-col .tt-subj { font-size: 15.5px; }
.tt-col .tt-meta { font-size: 13px; gap: 0 10px; }
.tt-col .tt-rec { font-size: 12.5px; padding: 2px 8px 2px 6px; }
.tt-day.compact .tt-time span { display: none; }
.tt-day.compact .tt-time span:first-of-type { display: block; }
.tt-col .tt-day.compact .tt-time span { display: none; }
@media (max-width: 900px) { .tt-week { grid-template-columns: 1fr; } }

.tt-home { display: grid; gap: 18px; }
.tt-home.multi { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.tt-homecard { margin: 0; padding: 20px 20px 16px; }
.tt-homehead, .tt-homefoot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tt-homehead { margin-bottom: 14px; }
.tt-homehead a { text-decoration: none; color: var(--ink); }
.tt-hometitle { font: 700 22px/1.2 var(--head); }
.tt-homefoot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; font-weight: 700; }
.tt-homefoot a { text-decoration: none; }
.tt-homecard .tt-row { grid-template-columns: 62px 1fr; }
.tt-row-cancel td { color: var(--muted); }
@media (max-width: 560px) {
  .tt-row, .tt-homecard .tt-row { grid-template-columns: 48px 1fr; gap: 10px; }
  .tt-time { padding-right: 10px; }
  .tt-time strong { font-size: 23px; }
  .tt-homecard { padding: 16px 14px 12px; }
}

/* Klassenbuch: Anwesenheit als Umschalter */
.att td { vertical-align: middle; }
.att-opts { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; background: var(--sunken); }
.seg label { margin: 0; font-weight: 700; font-size: 13.5px; position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 4px 11px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); }
.seg .s-present input:checked + span { background: var(--surface); color: var(--ok); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg .s-absent input:checked + span { background: var(--bad); color: #fff; }
.seg .s-late input:checked + span { background: var(--marker); color: var(--marker-ink); }
.att-opts input.mins { width: 5em; }
.att-opts:not(:has(.s-late input:checked)) input.mins { display: none; }
.att td:first-child { padding-top: 12px; padding-bottom: 12px; }
.att tr:has(.s-absent input:checked) td:first-child { color: var(--bad); font-weight: 700; }
.savebar { position: sticky; bottom: 16px; margin-top: 18px; z-index: 5; }
.savebar .btn { box-shadow: var(--lift); padding: 12px 24px; }
@media (max-width: 560px) { .att td { display: block; border: 0; padding: 4px 0; } .att tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; } .att-opts { justify-content: flex-start; } }

/* Untis-Import */
.weeks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.week-cell { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; background: var(--surface); }
.week-cell.current { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.week-cell.holiday { background: repeating-linear-gradient(135deg, var(--surface) 0 7px, var(--sunken) 7px 14px); }
.week-cell select { margin-top: 6px; padding: 5px 8px; font-size: 14px; }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.cred code { font-size: 1.05rem; font-weight: 700; color: var(--brand-deep); }
@media print {
  body { background: #fff; }
  .no-print, header, .mainnav, footer, .flash { display: none !important; }
  .cred { break-inside: avoid; border: 1px dashed #999; box-shadow: none; }
}

/* --- Teams / Chat (zweispaltig wie Teams) -------------------------------------------- */
main.wide { max-width: none; padding: 0; }
main.wide > .grouptabs, main.wide > .modtabs { padding-left: 16px; padding-right: 16px; margin-bottom: 0; }
body.wide { height: 100vh; display: flex; flex-direction: column; }
body.wide > main { flex: 1; min-height: 0; max-width: none; padding: 0; width: 100%; }
.collab { display: grid; grid-template-columns: 290px 1fr; height: 100%; min-height: 0; }
.c-side { border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding-bottom: 24px; }
.c-side-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 14px 10px; gap: 8px; }
.c-side-head h1, .c-side-head h2 { font-size: 22px; margin: 0; }
.c-team summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px; cursor: pointer; font-weight: 700; }
.c-team summary:hover { background: var(--sunken); }
.c-team summary::-webkit-details-marker { display: none; }
.c-tname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-chan { display: flex; justify-content: space-between; padding: 6px 14px 6px 56px; text-decoration: none; color: var(--muted); font-size: 14.5px; }
.c-chan:hover { background: var(--sunken); }
.c-chan.active { background: var(--accent); color: var(--brand); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.c-chan.unread { color: var(--ink); font-weight: 700; }
.c-ava { width: 32px; height: 32px; border-radius: 9px; color: #fff; display: inline-grid; place-items: center; font: 700 13px/1 var(--head); flex: 0 0 auto; }
.c-ava.big { width: 42px; height: 42px; font-size: 16px; border-radius: 11px; }
.c-ava.sm { width: 26px; height: 26px; border-radius: 50%; font-size: 11px; vertical-align: middle; }
.c-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--ground); }
.c-main.c-scroll { overflow-y: auto; }
.c-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.c-title { display: flex; gap: 12px; align-items: center; }
.c-tname-big { font: 700 19px/1.2 var(--head); }
.c-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.c-tabs::-webkit-scrollbar { display: none; }
.c-tabs a { white-space: nowrap; flex: 0 0 auto; }
.c-main { min-width: 0; }
.c-tabs a { text-decoration: none; color: var(--muted); padding: 8px 10px; border-bottom: 3px solid transparent; font-weight: 700; font-size: 14.5px; }
.c-tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.c-chanbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 20px; }
.c-chanbar .pill { text-decoration: none; cursor: pointer; font-size: 13.5px; padding: 3px 11px; }
.c-inline { position: relative; }
.c-inline summary { list-style: none; }
.c-inline summary::-webkit-details-marker { display: none; }
.c-inline[open] form, .c-pop { position: absolute; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; min-width: 280px; box-shadow: var(--lift); }
.c-inline.right .c-pop { right: 0; }
.c-pop form { position: static; border: 0; box-shadow: none; padding: 0; margin-bottom: 8px; min-width: 0; }
.c-feed { flex: 1; overflow-y: auto; padding: 8px 20px 18px; }
.c-empty { text-align: center; margin-top: 10vh; }
.c-post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin: 14px 0; box-shadow: var(--shadow); max-width: 900px; }
.c-post-main { display: flex; gap: 12px; padding: 14px 16px 10px; }
.c-body { flex: 1; min-width: 0; }
.c-meta { font-size: 14px; margin-bottom: 2px; }
.c-text { overflow-wrap: anywhere; }
.c-actions { display: inline-flex; gap: 14px; margin-top: 4px; }
.c-translation { margin-top: 8px; padding: 7px 11px; border-left: 3px solid var(--brand); background: var(--accent); border-radius: var(--r-sm); font-size: 15px; }
.c-replies { border-top: 1px solid var(--line); background: var(--sunken); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.c-replies:empty { display: none; }
.c-reply { display: flex; gap: 10px; padding: 10px 16px 8px 60px; }
.c-replyform { padding: 6px 16px 12px 60px; }
.c-replyform summary { cursor: pointer; color: var(--brand); font-size: 14px; font-weight: 700; list-style: none; }
.c-compose textarea { min-height: 0; resize: vertical; }
.c-compose-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.c-compose-main { padding: 12px 20px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.c-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.c-files img { max-width: 260px; max-height: 200px; border-radius: var(--r-md); border: 1px solid var(--line); }
.c-file { display: inline-block; padding: 6px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; font-size: 14px; background: var(--sunken); }
.c-pad { padding: 18px 20px; }
.c-cand { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.c-conv { display: flex; gap: 10px; align-items: center; padding: 10px 14px; text-decoration: none; color: var(--ink); }
.c-conv:hover { background: var(--sunken); }
.c-conv.active { background: var(--accent); box-shadow: inset 3px 0 0 var(--brand); }
.c-conv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.c-conv-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-msg { display: flex; gap: 8px; margin: 10px 0; align-items: flex-end; }
.c-msg.mine { justify-content: flex-end; }
.c-bubble { max-width: min(640px, 80%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 13px; }
.c-msg.mine .c-bubble { background: var(--brand); color: var(--brand-ink); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.c-msg.mine .c-bubble a, .c-msg.mine .c-bubble .muted, .c-msg.mine .c-bubble .linkbtn { color: inherit; opacity: .85; }
.c-msg.mine .c-translation { background: rgba(255,255,255,.14); border-left-color: rgba(255,255,255,.6); }
.c-people { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 10px; }
@media (max-width: 760px) {
  /* Sicherheitsnetz: nichts darf die Seite seitlich verschiebbar machen (Handy) */
  html, body { overflow-x: clip; }
  body.wide { height: auto; display: block; }
  .collab { grid-template-columns: 1fr; height: auto; }
  .c-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .c-feed { max-height: 60vh; }
  .c-reply, .c-replyform { padding-left: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .tile, .btn, .tt-rec, .seg span { transition: background-color .12s ease, border-color .12s ease, box-shadow .15s ease, color .12s ease; }
}

/* --- v0.6: Glocke, Kalender, Prüfungsplan, Notenbuch, Einträge -------------------- */
.bell { position: relative; }
.bell .nbadge { position: absolute; top: -2px; right: -4px; font-size: 11px; line-height: 16px; padding: 0 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.chips label { margin: 0; padding: 4px 10px 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; }
.chips label:has(input:checked) { border-color: var(--brand); background: var(--accent); color: var(--brand); font-weight: 700; }
.inline-form { display: inline; }
details > summary.linkbtn { list-style: none; cursor: pointer; display: inline-block; margin: 2px 0; font-weight: 700; color: var(--brand); }
details > summary.linkbtn::-webkit-details-marker { display: none; }
details.card > summary { font-size: 15px; }
details[open] > summary.linkbtn { margin-bottom: 8px; }
.decide { margin-top: 6px; display: grid; gap: 6px; max-width: 420px; }
.decide .row > * { flex: 1 1 140px; }
.notice-list { padding: 6px; }
.notice-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.notice-item:hover { background: var(--sunken); }
.notice-item.unread { box-shadow: inset 3px 0 0 var(--brand); background: color-mix(in srgb, var(--accent) 50%, transparent); }
.home-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 22px; align-items: start; }
.home-more .card { margin: 0; }
.news-item { padding: 10px 0; border-top: 1px solid var(--line); }
.news-item:first-of-type { border-top: 0; padding-top: 0; }
.news-item p { margin: 4px 0 0; }
.cal-list { padding: 8px 16px; }
.cal-list.compact { padding: 0; }
.cal-item { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.cal-item:first-child { border-top: 0; }
.cal-item form { margin-left: auto; }
.cal-date { flex: 0 0 46px; text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
.cal-date strong { font: 700 22px/1 var(--head); }
.cal-date span { font-size: 12.5px; color: var(--muted); text-transform: none; }
.cal-body { min-width: 0; }
.cal-exam .cal-date strong { color: var(--bad); }
.cal-holiday .cal-body strong { color: var(--marker-ink); background: var(--marker); padding: 0 6px; border-radius: 4px; }
.exam-weeks { display: grid; gap: 14px; }
.exam-week { display: grid; grid-template-columns: 90px repeat(5, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.exam-weekhead { font: 700 14px/1.2 var(--head); color: var(--muted); padding-top: 6px; }
.exam-day { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; min-height: 64px; background: var(--surface); }
.exam-day.today { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.exam-day.holiday { background: repeating-linear-gradient(135deg, var(--surface) 0 7px, var(--sunken) 7px 14px); }
.exam-date { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.exam-item { --c: var(--brand); margin-top: 6px; padding: 5px 8px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); border-radius: 6px; display: flex; flex-direction: column; font-size: 13.5px; }
.exam-item.major { background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.exam-block { margin-top: 4px; padding: 2px 6px; border-radius: 4px; background: var(--sunken); }
.exam-block.hard { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }
@media (max-width: 900px) { .exam-week { grid-template-columns: 1fr; } .exam-weekhead { padding-top: 0; } }
.tt-exam { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--bad); border-radius: 4px; padding: 1px 8px; }
.grade-chip { display: inline-block; min-width: 30px; text-align: center; margin: 0 4px 4px 0; padding: 2px 6px; border-radius: 6px; background: var(--sunken); border: 1px solid var(--line); font: 700 14px/1.3 var(--head); }
.gradebook th { white-space: nowrap; font-weight: 700; line-height: 1.25; }
.gradebook td, .gradebook th { padding: 6px 6px; }
.gradebook .col-written { box-shadow: inset 0 -3px 0 var(--brand); }
.gradebook .new-col { background: color-mix(in srgb, var(--marker) 18%, var(--surface)); }
.gradebook input.grade { width: 3.6em; padding: 6px 4px; }
.new-col-meta { border: 1px dashed var(--line-strong); border-radius: var(--r-md); margin: 14px 0; padding: 4px 14px 12px; }
.new-col-meta legend { font-weight: 700; padding: 0 6px; }
select[multiple] { min-height: 140px; }

/* --- Stufe 2: gemeinsame Bausteine ------------------------------------------------------- */
.actions-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; flex: 0 1 auto !important; }
.actions-right form { margin: 0; }
textarea.short { min-height: 84px; }
.kpi-n { font: 700 30px/1.1 var(--head); }
.kpi-n small { font-size: 16px; color: var(--muted); font-weight: 600; }
.reply-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.reply-head h2, .reply-head h3 { margin: 0; }
.ok-mark { color: var(--ok); font-weight: 700; }
.req { color: var(--bad); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); }
.btn.ok-btn { background: var(--ok); border-color: var(--ok); color: #fff; }
.hour-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hour-line:first-of-type { border-top: 0; }
.hour-line form { margin: 0; }
.inline-book { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-book select, .inline-book input { width: auto; padding: 6px 9px; font-size: 14px; }
.inline-book label { margin: 0; }
a.linkrow { text-decoration: none; color: inherit; }
a.linkrow:hover .cal-body { color: var(--brand); }

/* Elternbriefe */
.letter-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.lf-list { display: grid; gap: 10px; margin-bottom: 12px; }
.lf-row { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 4px 14px 8px; margin: 0; background: var(--sunken); }
.lf-grid { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 12px; }
.lf-foot { display: flex; justify-content: space-between; align-items: center; }
.lf-answer { margin: 6px 0 4px; }
fieldset.plain { border: 0; padding: 0; margin: 14px 0 4px; }
fieldset.plain legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 6px; }
.sigpad { position: relative; max-width: 520px; }
.sigpad canvas { display: block; width: 100%; height: 150px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); background: #fff; touch-action: none; cursor: crosshair; }
.sigpad [data-clear] { position: absolute; right: 10px; bottom: 8px; }
.sig-thumb { height: 28px; max-width: 110px; background: #fff; border-radius: 4px; border: 1px solid var(--line); vertical-align: middle; }
.sig-thumb.big { height: 60px; max-width: 220px; margin-right: 10px; }
.reply-summary { display: grid; grid-template-columns: minmax(140px, 32%) 1fr; gap: 6px 14px; margin: 12px 0; }
.reply-summary dt { color: var(--muted); font-size: 14px; }
.reply-summary dd { margin: 0; font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 40%) 1fr 34px; gap: 10px; align-items: center; margin: 6px 0; font-size: 14px; }
.meter { height: 10px; background: var(--sunken); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar-row b { text-align: right; font-family: var(--head); }
@media (max-width: 640px) { .lf-grid, .reply-summary { grid-template-columns: 1fr; } }

/* Sprechstunden und Sprechabend */
.appt-list { display: grid; }
.appt { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.appt:first-child, h2 + .appt, .reply-head + .appt { border-top: 0; }
.appt-when { flex: 0 0 82px; display: flex; flex-direction: column; line-height: 1.15; }
.appt-when strong { font: 700 18px/1.1 var(--head); }
.appt-when span { font-size: 13px; color: var(--muted); }
.appt-body { flex: 1; min-width: 0; }
.appt > form, .appt-cancel { margin-left: auto; }
.appt-cancel form { display: flex; gap: 6px; margin-top: 6px; }
.appt-cancel input { padding: 6px 9px; font-size: 14px; }
.teacher-list { display: grid; }
.teacher-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.teacher-row:first-child { border-top: 0; }
.tr-who { min-width: 200px; flex: 1; }
.tr-hours { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hour-chip { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: 14px; }
.hour-chip:hover { border-color: var(--brand); background: var(--accent); }
.hour-chip .small { color: var(--brand); font-weight: 700; }
.slot-days { display: grid; gap: 12px; }
.slot-day { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.slot-date { font-weight: 700; padding-top: 6px; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot { margin: 0; font-weight: 400; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span { display: inline-block; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: 600 14px/1.2 var(--head); cursor: pointer; background: var(--surface); }
.slot input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.slot input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
input.cell { padding: 6px 8px; font-size: 14px; min-width: 90px; }
input.cell.warn-cell { background: color-mix(in srgb, var(--marker) 45%, var(--surface)); }
@media (max-width: 640px) { .slot-day { grid-template-columns: 1fr; } .tr-hours { justify-content: flex-start; } }

/* Tagesmeldung */
.daynote p { margin: 0 0 6px; } .daynote p:last-child { margin-bottom: 0; }
.daily-banner { display: flex; gap: 14px; align-items: flex-start; background: var(--marker); color: var(--marker-ink); border-radius: var(--r-lg); padding: 12px 16px; margin: -6px 0 20px; }
.daily-banner p { margin: 0; } .daily-banner p + p { margin-top: 4px; }
.db-label { display: inline-flex; gap: 6px; align-items: center; font: 700 15px/1.4 var(--head); white-space: nowrap; }
.db-label svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.db-body { flex: 1; min-width: 0; white-space: pre-wrap; }
.db-more { color: inherit; font: 700 22px/1 var(--head); text-decoration: none; }
.monitor-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.monitor-line:first-of-type { border-top: 0; }
.monitor-line strong { min-width: 140px; }
.monitor-line input { flex: 1 1 260px; width: auto; font-size: 13px; padding: 7px 9px; }
.monitor-line form { margin: 0; }
.tile.danger { background: var(--bad); border-color: var(--bad); color: #fff; }

/* Monitor (Bildschirm im Foyer/Lehrerzimmer) */
body.monitor { background: #0d1a44; color: #f2f5ff; height: 100vh; display: flex; flex-direction: column; overflow: hidden; font-size: clamp(16px, 1.35vw, 26px); }
.mon-head { display: flex; align-items: baseline; gap: 1.2em; padding: .7em 1.4em; background: #1573ad; }
.mon-head .wm { font: 700 1.25em/1 var(--head); color: #dcefff; } .mon-head .wm b { color: #fff; }
.mon-school { opacity: .8; } .mon-kind { font-weight: 700; color: var(--marker); }
.mon-clock { margin-left: auto; font: 700 1.6em/1 var(--head); }
.mon-main { flex: 1; overflow: hidden; padding: .8em 1.4em; max-width: none; margin: 0; width: 100%; }
.mon-day { min-width: 0; }
.mon-days { display: grid; gap: 1.6em; }
.mon-days-2 { grid-template-columns: 1fr 1fr; }
.mon-day h1 { font-size: 1.5em; color: #fff; margin: 0 0 .4em; }
.mon-note { background: var(--marker); color: #2b2300; border-radius: 10px; padding: .5em .8em; margin-bottom: .6em; font-weight: 700; }
.mon-note p { margin: 0; white-space: pre-wrap; } .mon-note .mon-note-tr { font-weight: 400; opacity: .85; margin-top: .2em; }
.mon-absent { margin: 0 0 .6em; color: #c9d4ff; }
.mon-table { font-size: 1em; }
.mon-table th { background: transparent; color: #dcefff; font-size: .75em; border-bottom: 2px solid #2b3f86; }
.mon-table td { border-bottom: 1px solid #22346f; padding: .32em .5em; }
.mon-table tr.grp td { border-top: 2px solid #3a5099; }
.mon-table tr.cancel td { color: #ffb3aa; }
.mon-table tbody tr:hover td { background: transparent; }
.mon-table .dim, .mon-table s.dim { opacity: .6; }
.mon-pill { display: inline-block; font-size: .78em; font-weight: 700; padding: .05em .55em; border-radius: 99px; background: var(--marker); color: #2b2300; }
.mon-pill.bad { background: #ff8a7d; color: #3b0700; }
.mon-foot { padding: .3em 1.4em; font-size: .7em; opacity: .6; }
@media (max-width: 900px) { .mon-days-2 { grid-template-columns: 1fr; } body.monitor { overflow: auto; height: auto; } .mon-main { overflow: visible; } }

/* Feueralarm */
.fire-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.fire-head.active { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border: 2px solid var(--bad); border-radius: var(--r-lg); padding: 12px 16px; }
.fire-head h1 { margin: 0; }
.period-pick { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; }
.period-pick label { margin: 0; font-weight: 400; } .period-pick select { width: auto; padding: 6px 9px; font-size: 14px; }
.fire-kpi { margin-bottom: 14px; }
.fire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.fire-class { margin: 0; padding: 14px 16px; border-left: 6px solid var(--line-strong); }
.fire-class.ok { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.fire-class.bad { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 7%, var(--surface)); }
.fire-class.away { opacity: .7; }
.fire-class header { display: flex; justify-content: space-between; align-items: baseline; }
.fc-name { font: 700 22px/1 var(--head); }
.fc-count { font-family: var(--head); color: var(--muted); } .fc-count b { font-size: 22px; color: var(--ink); }
.fc-where { margin-top: 6px; }
.fc-room { font-weight: 700; background: var(--accent); color: var(--brand); padding: 0 6px; border-radius: 4px; }
.fc-absent { margin: 8px 0 0; padding-left: 18px; }
.fc-check { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.fc-check form { margin: 0; }
.fc-missing { display: flex; gap: 6px; flex: 1 1 100%; }
.fc-missing input { padding: 6px 9px; font-size: 14px; }

/* AGs */
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ag-card { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ag-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ag-card h2 { margin: 0; font-size: 19px; }
.ag-card a { text-decoration: none; }
.ag-card p { margin: 2px 0; }
.ag-child { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); margin: 0; }
.ag-child form { margin: 0; }

/* Zeugnisse */
.term-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.term-tools form { margin: 0; }
.term-tools input[type=date] { width: auto; padding: 6px 9px; font-size: 14px; }
table.matrix td, table.matrix th { padding: 6px 7px; }
table.matrix td.num { font-weight: 700; }
td.cell-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
td.cell-miss { color: var(--marker-ink); background: color-mix(in srgb, var(--marker) 45%, transparent); }
.rc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.rc-card { margin: 0; }
.rc-card label { margin-top: 10px; }
.rc-links { font-size: 14px; }
.suggest { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.suggest .linkbtn { color: var(--brand); }
.sticky-save { position: sticky; bottom: 12px; text-align: right; }
.sticky-save .btn { box-shadow: var(--lift); }
@media (max-width: 520px) { .rc-list { grid-template-columns: 1fr; } }

@media print {
  .noprint, .actions-right, .period-pick, .tile, .back { display: none !important; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .fire-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Module: Reiter im Modul, Tabelle „Module & Kacheln“ ---------------------------------- */
.modtabs { display: flex; gap: 4px; flex-wrap: wrap; margin: -8px 0 22px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; box-shadow: var(--shadow); }
.modtabs a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14.5px; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.modtabs a:hover { color: var(--brand); background: var(--accent); }
.modtabs a.active { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 640px) { .modtabs { border-radius: var(--r-md); width: 100%; overflow-x: auto; flex-wrap: nowrap; } }
.mod-matrix td.num { text-align: center; }
.mod-matrix th.num { font-size: 12px; white-space: normal; min-width: 72px; }
.mod-name { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.mod-name svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mod-name a { color: var(--ink); text-decoration: none; }
.mod-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.mod-settings .card { margin: 0; }
.mod-settings h3 { display: flex; gap: 8px; align-items: center; }
.mod-settings h3 svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mod-setting { padding: 4px 0; border-top: 1px solid var(--line); }
.mod-setting:first-of-type { border-top: 0; }
.mod-setting .small { margin: 0 0 6px 26px; }
@media (max-width: 520px) { .mod-settings { grid-template-columns: 1fr; } }

/* Passwort vergessen: nur die Karte, mittig */
.login-wrap.single { grid-template-columns: minmax(0, 440px); justify-content: center; }

/* --- Office-Editor -------------------------------------------------------------------------- */
.office { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.office-bar { display: flex; gap: 12px; align-items: center; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.office-bar .spacer { flex: 1; }
.office-name { font: 700 16px/1.2 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.office-bar input.office-newname { width: auto; flex: 0 1 340px; min-width: 200px; padding: 6px 10px; font-weight: 700; }
.office-status { font-size: 13.5px; color: var(--muted); }
.office-status.ok { color: var(--ok); } .office-status.warn { color: var(--warn); } .office-status.bad { color: var(--bad); }
.office-frame { flex: 1; width: 100%; border: 0; background: #fff; min-height: 400px; }
.office-conflict { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 16px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-bottom: 1px solid var(--bad); }
.office-versions { position: relative; }
.office-vlist { position: absolute; right: 0; top: 28px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--lift); padding: 8px 12px; min-width: 320px; }
.office-vlist form { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.office-vlist form:first-child { border-top: 0; }
.office-new { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

.office-conflict[hidden] { display: none; }

/* Reaktionen unter Nachrichten und Beiträgen */
.c-reacts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.c-reacts:empty { display: none; }
.c-react { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.c-react span { font-size: 15px; font-weight: 400; }
.c-react.mine { border-color: var(--brand); background: var(--accent); color: var(--brand); }
.c-react:disabled { cursor: default; opacity: 1; }
.c-react:not(:disabled):hover { border-color: var(--brand); }
.c-react-add { position: relative; display: inline-block; }
.c-react-add > summary { list-style: none; display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px; border-radius: 999px;
  border: 1px dashed var(--line); color: var(--muted); cursor: pointer; font-size: 15px; opacity: .8; }
.c-react-add > summary::-webkit-details-marker { display: none; }
.c-react-add > summary small { font-size: 11px; margin-left: 1px; }
.c-react-add > summary:hover, .c-react-add[open] > summary { opacity: 1; border-color: var(--brand); color: var(--brand); }
.c-react-pick { position: absolute; z-index: 30; bottom: calc(100% + 6px); left: 0; display: flex; gap: 2px; padding: 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 8px 24px rgba(10, 20, 50, .18); }
.c-react-pick button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; font-size: 20px; cursor: pointer; line-height: 1; }
.c-react-pick button:hover, .c-react-pick button:focus-visible { background: var(--accent); transform: scale(1.15); }
.c-msg.mine .c-reacts { justify-content: flex-end; }
.c-msg.mine .c-react-pick { left: auto; right: 0; }
.c-msg.mine .c-bubble .c-react { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: inherit; }
.c-msg.mine .c-bubble .c-react.mine { background: rgba(255,255,255,.32); border-color: rgba(255,255,255,.8); }
.c-msg.mine .c-bubble .c-react-add > summary { border-color: rgba(255,255,255,.45); color: inherit; }
.c-msg.mine .c-react-pick button { color: initial; }

/* Oberstufenwahl */
.ch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.ch-side { position: sticky; top: 72px; }
@media (max-width: 900px) { .ch-layout { grid-template-columns: 1fr; } .ch-side { position: static; } }
.ch-group h2 { margin-top: 0; }
.ch-subject { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.ch-subject:first-of-type { border-top: 0; }
.ch-subject.on .ch-name b { color: var(--brand); }
.ch-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--sunken); }
.ch-seg label { margin: 0; font-weight: 400; }
.ch-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ch-seg span { display: inline-block; padding: 5px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; white-space: nowrap; color: var(--muted); }
.ch-seg span small { opacity: .75; }
.ch-seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(10, 20, 50, .15); }
.ch-seg input[value="E"]:checked + span { background: var(--brand); color: var(--brand-ink); }
.ch-seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.ch-seg input:disabled + span { cursor: default; }
.ch-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ch-num { background: var(--sunken); border-radius: var(--r-sm); padding: 8px; text-align: center; }
.ch-num b { display: block; font-size: 24px; line-height: 1.1; }
.ch-num span { font-size: 12px; color: var(--muted); }
.ch-num.low b { color: var(--bad); }
.ch-field { margin: 7px 0; font-size: 13px; }
.ch-field-head { display: flex; justify-content: space-between; color: var(--muted); }
.ch-field .meter i { background: var(--warn); }
.ch-field.ok .meter i { background: var(--ok); }
.ch-msgs { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.ch-msg { display: flex; gap: 8px; padding: 5px 0; align-items: flex-start; }
.ch-ico { flex: 0 0 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; margin-top: 1px; }
.ch-msg.error .ch-ico { background: var(--bad); }
.ch-msg.warning .ch-ico { background: var(--warn); }
.ch-msg.ok .ch-ico { background: var(--ok); }
.ch-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ch-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.ch-status-actions { margin-left: auto; display: inline-flex; gap: 8px; }
.ch-status-actions form { margin: 0; }
.ch-exams { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.ch-row:hover { border-color: var(--brand); }
.ch-offer input[type=number] { width: 64px; display: inline-block; }
.ch-offer-cell { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.ch-tally { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.ch-tally a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; background: var(--surface); }
.ch-tally a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.ch-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 24px; }
.ch-bar { display: grid; grid-template-columns: 70px 1fr 32px; gap: 8px; align-items: center; font-size: 14px; }
.ch-bar-t { height: 10px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.ch-bar-t span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.ch-bar b { text-align: right; }
.ch-matrix th.rot { height: 90px; vertical-align: bottom; white-space: nowrap; }
.ch-matrix th.rot span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; }
.ch-matrix tbody th { text-align: left; white-space: nowrap; font-size: 13px; }
.ch-matrix td.diag { background: var(--sunken); color: var(--muted); }
@media print { .ch-layout { display: block; } .ch-seg input:not(:checked) + span { display: none; } }
/* Ohne Reaktionen sitzt der Auswahl-Knopf auf dem Rand der Blase und erscheint am Desktop erst beim Überfahren */
.c-bubble, .c-body { position: relative; }
.c-reacts:not(:has(.c-react)) { position: absolute; right: 10px; bottom: -14px; margin: 0; z-index: 2; }
.c-msg.mine .c-reacts:not(:has(.c-react)) { right: auto; left: 10px; }
.c-reacts:not(:has(.c-react)) .c-react-add > summary { background: var(--surface); border-style: solid; }
.c-msg.mine .c-bubble .c-reacts:not(:has(.c-react)) .c-react-add > summary { background: var(--surface); color: var(--muted); border-color: var(--line); }
.c-msg { margin-bottom: 16px; }
@media (hover: hover) {
  .c-reacts .c-react-add:not([open]) { opacity: 0; transition: opacity .12s; }
  .c-bubble:hover .c-react-add, .c-body:hover .c-react-add, .c-react-add:focus-within { opacity: 1; }
}
.school-line { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.ch-offer tbody tr:not(:has(input[type=checkbox]:checked)) td { opacity: .5; }

/* Mein Konto / Profilbild */
.pf-photo { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.pf-pic { width: 128px; height: 128px; border-radius: 50%; overflow: hidden; background: var(--accent); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.pf-pic img { width: 100%; height: 100%; object-fit: cover; }
.pf-initials { font-size: 44px; font-weight: 700; color: var(--brand); }
.pf-body { flex: 1 1 260px; }
.pf-body h2 { margin-top: 0; }
.pf-consent { margin: 10px 0 0; padding: 10px 12px; background: var(--marker); color: var(--marker-ink); border-radius: var(--r-sm); }
img.c-ava-img { object-fit: cover; padding: 0; background: var(--sunken); }
.me-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.c-orig-toggle { font-size: 12.5px; margin-top: 2px; }
.c-auto .c-tr { }

/* Krankmeldung Personal */
.sa-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.sa-row:first-of-type { border-top: 0; }
.sa-row > div:first-child { flex: 1 1 220px; }
.sa-row form { margin: 0; }
.sa-inline { display: inline-flex; gap: 6px; align-items: center; }
.sa-inline input { width: auto; }
.sa-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; align-items: center; }
.sa-days a { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: 14px; }
.sa-days a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.sa-days a b { font-size: 13px; }
.sa-pick input { width: auto; padding: 4px 8px; }
.sa-person header { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }
.sa-note { background: var(--sunken); padding: 8px 12px; border-radius: var(--r-sm); white-space: pre-line; }
.sa-lessons td { padding: 5px 8px; }
.sa-lessons tr.st-cancelled td { opacity: .6; }

/* Benutzerverwaltung */
.us-filter { max-width: 640px; align-items: end; }
.us-table td { vertical-align: middle; }
.us-table tr.us-off td { opacity: .55; }
.us-pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 12px 0; }
.us-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.us-btns form { margin: 0; }
.linkbtn.danger { color: var(--bad); }
h1 .c-ava.big { vertical-align: middle; margin-right: 6px; }
.imp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.imp-map label { margin: 0; font-weight: 400; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.imp-map label span { font-weight: 700; font-size: 13px; }
.imp-table tr.imp-skip td { opacity: .55; }
.imp-prob { color: var(--warn); }
.code-block { background: var(--sunken); padding: 10px 12px; border-radius: var(--r-sm); font-size: 12.5px; overflow-x: auto; white-space: pre; }
.ad-steps li { margin: 6px 0; }

/* Kalender: Monat, Woche, Tag */
:root { --k-event: #2f5bd3; --k-parents_evening: #8a4fbf; --k-conference: #0f8a8a; --k-trip: #2e8b46; --k-sports: #d0661a; --k-project: #c4417a; --k-deadline: #c8352a; --k-exam: #b58900; --k-holiday: #8a94a8; }
.cv-h1 { margin-bottom: 4px; }
.cv-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 14px; }
.cv-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cv-title { margin: 0 0 0 8px; font-size: 20px; }
.cv-views { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--sunken); }
.cv-views a { padding: 5px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.cv-views a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 20, 50, .15); }
[class*="k-"] { --k: var(--k-event); }
.k-event { --k: var(--k-event); } .k-parents_evening { --k: var(--k-parents_evening); } .k-conference { --k: var(--k-conference); }
.k-trip { --k: var(--k-trip); } .k-sports { --k: var(--k-sports); } .k-project { --k: var(--k-project); } .k-deadline { --k: var(--k-deadline); }
.k-exam { --k: var(--k-exam); } .k-holiday { --k: var(--k-holiday); }

.cv-month { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cv-head, .cv-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cv-head div { padding: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); background: var(--sunken); }
.cv-day { position: relative; min-height: 112px; padding: 4px 5px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cv-week .cv-day:last-child { border-right: 0; }
.cv-week:last-child .cv-day { border-bottom: 0; }
.cv-day.we { background: color-mix(in srgb, var(--sunken) 55%, var(--surface)); }
.cv-day.out { background: var(--sunken); }
.cv-day.out .cv-num { color: var(--muted); opacity: .6; }
.cv-day.hol { background: repeating-linear-gradient(135deg, var(--surface) 0 8px, color-mix(in srgb, var(--k-holiday) 10%, var(--surface)) 8px 16px); }
.cv-num { align-self: flex-start; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 13.5px; font-weight: 700; color: var(--ink); text-decoration: none; }
.cv-num:hover { background: var(--accent); }
.cv-day.today .cv-num { background: var(--brand); color: var(--brand-ink); }
.cv-hol { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-chip { display: block; font-size: 12px; line-height: 1.3; padding: 2px 6px; border-radius: 5px; text-decoration: none; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--k) 13%, var(--surface)); border-left: 3px solid var(--k); }
.cv-chip:hover { background: color-mix(in srgb, var(--k) 22%, var(--surface)); }
.cv-chip.multi { border-radius: 5px 0 0 5px; }
.cv-chip.cont { border-left-style: dashed; opacity: .85; }
.cv-chip b { font-weight: 700; }
.cv-chip .who { color: var(--muted); }
.cv-more { font-size: 11.5px; color: var(--brand); text-decoration: none; font-weight: 600; }
.cv-dots { display: none; gap: 3px; }
.cv-dots i, .cv-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--k); display: inline-block; }
.cv-add { position: absolute; top: 4px; right: 6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 700; }
.cv-day:hover .cv-add, .cv-add:focus { opacity: 1; background: var(--accent); color: var(--brand); }
.cv-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.cv-legend span { display: inline-flex; align-items: center; gap: 5px; }

.cv-grid { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cv-gh { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--sunken); text-decoration: none; color: var(--ink); }
.cv-gh:first-child { border-left: 0; }
.cv-gh span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.cv-gh b { font-size: 19px; }
.cv-gh.today b { color: var(--brand); }
.cv-allday-l { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; font-size: 11px; }
.cv-allday { padding: 4px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-height: 30px; min-width: 0; }
.cv-allday.hol { background: repeating-linear-gradient(135deg, var(--surface) 0 8px, color-mix(in srgb, var(--k-holiday) 10%, var(--surface)) 8px 16px); }
.cv-hours div { height: 48px; border-bottom: 1px solid var(--line); position: relative; }
.cv-hours span { position: absolute; top: -8px; right: 6px; font-size: 11px; color: var(--muted); background: var(--surface); padding: 0 2px; }
.cv-hours div:first-child span { top: 2px; }
.cv-col { position: relative; border-left: 1px solid var(--line); }
.cv-col.we { background: color-mix(in srgb, var(--sunken) 55%, var(--surface)); }
.cv-col.today { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.cv-slot { height: 48px; border-bottom: 1px solid var(--line); }
.cv-slot { background-image: linear-gradient(to bottom, transparent calc(50% - .5px), color-mix(in srgb, var(--line) 45%, transparent) calc(50% - .5px), color-mix(in srgb, var(--line) 45%, transparent) calc(50% + .5px), transparent calc(50% + .5px)); }
.cv-ev { position: absolute; left: 3px; right: 3px; overflow: hidden; padding: 3px 6px; border-radius: 6px; font-size: 12px; line-height: 1.3; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--k) 16%, var(--surface)); border-left: 3px solid var(--k); box-shadow: 0 1px 2px rgba(10, 20, 50, .08); z-index: 1; }
.cv-ev:hover { z-index: 2; box-shadow: 0 4px 12px rgba(10, 20, 50, .18); }
.cv-ev b { display: block; font-size: 11px; color: var(--k); }
.cv-ev .loc { display: block; color: var(--muted); font-size: 11px; }
.cv-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 3; }
.cv-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.cv-details { margin-top: 16px; }
.cv-detail { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-left: 4px solid var(--k); background: color-mix(in srgb, var(--k) 6%, var(--surface)); border-radius: var(--r-sm); margin: 8px 0; }
.cv-detail:target { outline: 2px solid var(--k); }
.cv-desc { margin: 6px 0 0; white-space: pre-line; }

@media (max-width: 760px) {
  .cv-day { min-height: 62px; padding: 3px; }
  .cv-day .cv-chip, .cv-day .cv-hol, .cv-day .cv-more { display: none; }
  .cv-dots { display: flex; margin-top: auto; }
  .cv-num { width: 24px; height: 24px; font-size: 12.5px; }
  .cv-head div { padding: 6px 2px; text-align: center; font-size: 11px; }
  .cv-grid:not(.one) { grid-template-columns: 40px repeat(var(--cols), minmax(0, 1fr)); font-size: 11px; }
  .cv-grid:not(.one) .cv-ev { font-size: 10.5px; padding: 2px 3px; }
  .cv-grid:not(.one) .cv-ev .loc, .cv-grid:not(.one) .cv-chip { display: none; }
  .cv-hours span { font-size: 10px; right: 2px; }
  .cv-title { font-size: 17px; margin-left: 4px; }
}
.cv-col.hol { background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--k-holiday) 8%, transparent) 10px 20px); }
.sa-lessons { width: auto; min-width: min(100%, 560px); }
.hello-meta { text-align: right; }
.hello-meta .school-line { margin-top: 1px; }
@media (max-width: 640px) { .hello-meta { text-align: left; } }

/* Anhänge im Chat/Kanal: Vorschau, Drag & Drop */
.c-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.c-file { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 3px 4px 3px 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); font-size: 13px; }
.c-file img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; display: block; }
.c-file-ic { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; }
.c-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.c-file-x { border: 0; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.c-file-x:hover { background: var(--accent); color: var(--bad); }
body.c-dragging .c-compose.c-drop-target { position: relative; outline: 3px dashed var(--brand); outline-offset: -6px; background: var(--accent); }
body.c-dragging .c-compose.c-drop-target::after { content: attr(data-drop-hint); position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--accent) 85%, transparent); pointer-events: none; border-radius: inherit; }
/* Profil- und Teambild: Ablegen/Einfügen */
[data-paste-image] { border-radius: var(--r-md); transition: background .15s; }
[data-paste-image].drag { background: var(--accent); outline: 3px dashed var(--brand); outline-offset: 4px; }
.tm-image { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.tm-image form { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tm-image .small { flex-basis: 100%; }
.tm-pic img, .tm-pic .c-ava { width: 64px; height: 64px; border-radius: 14px; font-size: 22px; object-fit: cover; }
[hidden] { display: none !important; }
.tm-image label.btn, .tm-image button.btn { display: inline-flex; width: auto; margin: 0; }
.tm-image > div:last-child { flex: 1; min-width: 0; }
.tm-image form > label.btn, .tm-image form > button.btn { flex: 0 0 auto; width: max-content !important; }

/* Klassenbuch / Kursbuch */
.bk-filter { max-width: 720px; align-items: end; }
.bk-day h2 { margin-top: 0; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.bk-table td { vertical-align: top; }
.bk-table tr.bk-cancelled td { opacity: .55; }
.bk-table tr.bk-missing td { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.bk-miss { color: var(--bad); font-weight: 700; font-size: 13px; }
.bk-abs { display: inline-block; padding: 0 6px; margin: 1px 2px 1px 0; border-radius: 999px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); font-size: 12px; }
.bk-abs.late { background: var(--marker); color: var(--marker-ink); }
.bk-group { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.bk-group b { font-size: 18px; }
.bk-group:hover { border-color: var(--brand); }
/* Hausaufgaben */
.hw-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.hw-item:first-child { border-top: 0; }
.hw-check { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--line-strong, var(--line)); background: var(--surface); font-size: 17px; font-weight: 700; color: #fff; cursor: pointer; display: grid; place-items: center; }
.hw-done .hw-check { background: var(--ok); border-color: var(--ok); }
.hw-done .hw-text { text-decoration: line-through; color: var(--muted); }
.hw-late .hw-check { border-color: var(--bad); }
.hw-late-text, .hw-late { color: var(--bad); font-weight: 700; }
.hw-text { white-space: pre-line; }

/* Klassenleitung */
.cl-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 16px; border-bottom: 1px solid var(--line); }
.cl-tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.cl-tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.cl-listopts .chips { margin-bottom: 8px; }
.cl-print { width: 100%; }
.cl-print td.blank, .cl-print th.blank { width: 44px; border-left: 1px solid var(--line); }
.cl-print td { border-bottom: 1px solid var(--line); }
.print-only { display: none; }
.gs-table th { text-align: center; font-size: 13px; }
.gs-table td.gs-name { white-space: nowrap; font-weight: 600; position: sticky; left: 0; background: var(--surface); }
.gs-cell { text-align: center; font-size: 12.5px; border-left: 1px solid var(--line); min-width: 64px; }
.gs-grades span { display: inline-block; margin: 0 2px; }
.gs-grades span.w { font-weight: 700; text-decoration: underline; }
.gs-avg { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.gs-avg b { color: var(--ink); }
.st-wrap { margin: 10px 0; }
.st-board { text-align: center; padding: 6px; border-radius: 6px; background: #2f4f3a; color: #fff; font-weight: 700; letter-spacing: .1em; margin: 0 auto 14px; max-width: 60%; }
.st-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px; }
.st-seat { min-height: 54px; border: 2px dashed var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 4px; background: var(--surface); }
.st-st { display: inline-block; padding: 6px 8px; border-radius: 8px; background: var(--accent); color: var(--brand); font-weight: 700; font-size: 13px; cursor: grab; text-align: center; line-height: 1.2; user-select: none; }
.st-st small { font-weight: 400; color: var(--muted); }
.st-st.sel, .st-st.dragging { outline: 3px solid var(--brand); }
.st-pool { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunken); min-height: 56px; }
.du-now td { background: var(--accent); }
.ho-item label { margin-top: 0; }
.ho-old { background: var(--sunken); padding: 6px 10px; border-radius: 6px; margin: 4px 0; }
.li-card header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.li-card h2 { margin: 0; font-size: 17px; }
.li-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; margin-top: 10px; }
.li-check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 0; padding: 4px 0; }
.li-text { display: flex; flex-direction: column; gap: 2px; font-weight: 400; margin: 0; font-size: 13px; }
@media print {
  .print-only { display: block; }
  .cl-tabs, .noprint, header.top, .back { display: none !important; }
  .st-seat { border: 1px solid #999; }
  .st-st { background: none; color: #000; }
  .gs-table { font-size: 9pt; }
}
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.dir-card { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.dir-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dir-contact { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.dir-contact a { overflow-wrap: anywhere; }
.gs-table td.gs-name { max-width: 200px; }
.dir-body { align-items: flex-start; }

/* ---------- Räume & Geräte ---------- */
.rs-pick { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.rs-pick select { width: auto; min-width: 160px; }
table.rs-grid { table-layout: fixed; min-width: 640px; }
table.rs-grid th, table.rs-grid td { padding: 0; height: 40px; border: 1px solid var(--line); text-align: center; font-size: 13px; }
table.rs-grid thead th { padding: 6px 4px; }
table.rs-grid th.rs-p { width: 72px; padding: 2px 6px; text-align: left; background: var(--sunken); }
table.rs-grid th.rs-p span { display: block; }
.rs-lesson { background: var(--sunken); color: var(--muted); }
.rs-booked { background: var(--accent); color: var(--brand); padding: 2px 4px !important; position: relative; }
.rs-booked.mine { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.rs-booked .rs-x { position: absolute; top: 1px; right: 4px; margin: 0; }
.rs-off { background: repeating-linear-gradient(45deg, var(--sunken) 0 6px, transparent 6px 12px); color: var(--muted); }
.rs-past { background: transparent; }
.rs-free a { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 38px; text-decoration: none; color: transparent; font-weight: 700; font-size: 18px; }
.rs-free a:hover, .rs-free a:focus-visible { color: var(--brand); background: var(--accent); }
.rs-legend { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.rs-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); vertical-align: -2px; }
.rs-item summary { cursor: pointer; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rs-item.inactive { opacity: .65; }
.rs-import { margin-top: 6px; }
.rs-return { display: flex; gap: 6px; margin: 0 0 4px; }
.rs-return input { min-width: 140px; }

/* ---------- Mängelmeldungen ---------- */
.rp-filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.rp-filter .pill { text-decoration: none; font-size: 13.5px; padding: 4px 11px; }
a.rp-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; text-decoration: none; color: inherit; padding: 10px 14px; margin-bottom: 8px; }
a.rp-item:hover { border-color: var(--brand); }
.rp-item img, .rp-noimg { width: 64px; height: 48px; object-fit: cover; border-radius: var(--r-sm); background: var(--sunken); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.rp-item.prio-urgent { border-left: 3px solid var(--bad); }
.rp-st-new { color: var(--brand); background: var(--accent); border-color: transparent; }
.rp-st-approval { color: var(--marker-ink); background: var(--marker); border-color: transparent; }
.rp-st-approved, .rp-st-in_progress { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: transparent; }
.rp-st-rejected { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: transparent; }
.rp-photo { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
[data-paste-image].drag .rp-photo { border-color: var(--brand); background: var(--accent); }
.rp-preview img { max-height: 120px; max-width: 220px; border-radius: var(--r-sm); display: block; }
.rp-photo label.btn { margin: 0; }
.rp-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.rp-detail aside .card { margin-bottom: 14px; }
.rp-detail aside label:first-of-type { margin-top: 4px; }
.rp-big { max-width: 100%; max-height: 420px; border-radius: var(--r-md); border: 1px solid var(--line); display: block; margin: 8px 0 14px; }
.rp-c { padding: 8px 0; border-bottom: 1px solid var(--line); }
.rp-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14.5px; }
.rp-dl dt { color: var(--muted); } .rp-dl dd { margin: 0; }
@media (max-width: 860px) { .rp-detail { grid-template-columns: 1fr; } }

/* ---------- Termine mit Teilnehmenden ---------- */
.ev-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Umfragen ---------- */
.sv-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 12px 16px; margin-bottom: 8px; }
a.sv-item:hover { border-color: var(--brand); }
.sv-q { padding: 4px 0 10px; border-bottom: 1px solid var(--line); }
.sv-q:last-of-type { border-bottom: 0; }
.sv-q.has-error legend, .sv-q.has-error > label { color: var(--bad); }
.sv-q .error { color: var(--bad); margin: 4px 0 0; }
.sv-scale-l { align-self: center; }
.sv-bar { display: grid; grid-template-columns: minmax(90px, 220px) 1fr 90px; gap: 10px; align-items: center; margin: 5px 0; font-size: 14.5px; }
.sv-track { height: 14px; background: var(--sunken); border-radius: 7px; overflow: hidden; }
.sv-track span { display: block; height: 100%; background: var(--brand); border-radius: 7px; }
.sv-n { text-align: right; font-weight: 700; }
.sv-text { margin: 6px 0; padding: 8px 12px; background: var(--sunken); border-radius: var(--r-sm); white-space: pre-wrap; }
@media print { .sv-res { break-inside: avoid; } .sv-track span { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Dokumente ---------- */
.dc-folder header { margin-bottom: 6px; }
.dc-edit { text-align: left; }
.dc-edit[open] { position: relative; }
.dc-edit[open] > form:first-of-type { min-width: min(520px, 80vw); }
table.dc-files td { padding: 7px 8px; }
.dc-up { margin-top: 10px; }
.chips a.pill { text-decoration: none; }
@media (max-width: 640px) { .rs-mine td:nth-child(4) { display: none; } .rs-mine td { padding: 8px 6px; } }

/* ---------- Projekttage ---------- */
.pj-kid h2 { margin-top: 0; }
.pj-wishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; align-items: end; }
.pj-wishes label { margin-top: 8px; }
.pj-save { display: flex; gap: 10px; align-items: center; padding-top: 12px; grid-column: 1 / -1; }
.pj-result { font-size: 17px; margin: 4px 0; }
.pj-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.pj-actions form { display: flex; gap: 10px; align-items: center; margin: 0; }
.pj-actions label.checks { margin: 0; font-size: 14px; }
.pj-table summary { margin: 8px 0; }
tr.pj-open td:first-child { color: var(--bad); font-weight: 700; }
.pj-hit { font-weight: 700; color: var(--ok); }
.pj-move { display: flex; gap: 6px; align-items: center; margin: 0; }
.pj-move select { min-width: 180px; padding: 5px 8px; font-size: 14px; }
@media print { .pj-list { break-after: page; } }

/* ---------- Klasseneinteilung ---------- */
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.cp-class { margin: 0; }
.cp-class h2 { margin: 0; display: flex; justify-content: space-between; align-items: baseline; }
.cp-list { list-style: none; margin: 8px 0 0; padding: 0; }
.cp-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.cp-list li form { margin: 0 0 0 auto; display: flex; gap: 4px; align-items: center; }
.cp-list select { padding: 2px 6px; font-size: 13px; width: auto; }
.cp-ico { width: 18px; text-align: center; font-weight: 700; color: var(--ok); }
.cp-miss .cp-ico { color: var(--bad); }
.cp-name { flex: 1; min-width: 0; }
@media print { .cp-grid { display: block; } .cp-class { break-inside: avoid; margin-bottom: 10px; } }

/* ---------- Bücher ---------- */
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 10px; }
.bk-grid .sv-item { margin: 0; }
.bk-filter { margin-bottom: 12px; }
.bx-item { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 16px; margin-bottom: 8px; }
.bx-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
.bx-gone { opacity: .6; }
button.ag-paid { cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; }

/* ---------- Bereiche: Reiter oben, Suche auf der Startseite ---------- */
.grouptabs { display: flex; gap: 2px; flex-wrap: wrap; margin: -10px 0 16px; border-bottom: 1px solid var(--line); }
.grouptabs a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; padding: 9px 14px 10px; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.grouptabs a:hover { color: var(--brand); }
.grouptabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.grouptabs + .modtabs { margin-top: 0; }
@media (max-width: 640px) { .grouptabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }
.tile-search { margin: -8px 0 18px; }
.tile-search input { max-width: 460px; padding-left: 40px; border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23586379' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center / 18px; }
.tile-none { grid-column: 1 / -1; }
.tiles .tile[hidden] { display: none; }

/* ---------- Push-Nachrichten im Profil ---------- */
.pf-push-state { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.pf-devices { list-style: none; padding: 0; margin: 0 0 10px; }
.pf-devices li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pf-devices li form { margin: 0 0 0 auto; }
.pf-push-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 18px; }
.pf-push-cats label.checks { align-items: flex-start; }
.pf-push-cats input { margin-top: 3px; }

/* ---------- Karte „Als App installieren“ (Startseite) ---------- */
.install-card { margin-top: 22px; border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.install-card[hidden] { display: none; }
.ic-head { display: flex; gap: 14px; align-items: center; }
.ic-head img { border-radius: 14px; flex: 0 0 auto; }
.ic-head h2 { margin: 0; }
.ic-head p { margin: 2px 0 0; }
.ic-later { margin-left: auto; align-self: flex-start; }
.ic-pros { list-style: none; padding: 0; margin: 14px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 18px; font-size: 14.5px; }
.ic-how { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; background: var(--sunken); border-radius: var(--r-md); font-size: 14.5px; }
.ic-how .btn { align-self: flex-start; }
:root { --k-team: #6b5bd2; } .k-team { --k: var(--k-team); }
/* Zelt-A in der Wortmarke */
.wm-a { display: inline-block; width: .74em; height: .87em; vertical-align: -.02em; margin: 0 .01em 0 .02em; color: var(--tent, #f2d44a); overflow: visible; }
.wm.big .wm-a { --tent: #e0a800; }
@media (prefers-color-scheme: dark) and (max-width: 0px) { :root:not([data-theme="light"]) .wm.big .wm-a { --tent: #f2d44a; } }
:root[data-theme="never-dark"] .wm.big .wm-a { --tent: #f2d44a; }

/* ---------- Pausenaufsichten ---------- */
table.sup-grid td, table.sup-grid th { vertical-align: top; }
.sup-time b { display: block; } .sup-time span { display: block; font-weight: 400; }
.sup-item { padding: 2px 0; }
.sup-item.me b { color: var(--brand); }
.sup-item.off b { color: var(--bad); text-decoration: line-through; }
.sv-mine { margin: 0; padding-left: 18px; }
.sup-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.tt-sup { margin: 8px 0 0; padding: 8px 10px; background: color-mix(in srgb, var(--marker) 30%, var(--surface)); border-radius: var(--r-sm); font-size: 14px; }
/* Schuljahreswechsel */
.sy-steps { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 16px; counter-reset: s; }
.sy-steps li { counter-increment: s; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 14px; }
.sy-steps li::before { content: counter(s) '. '; }
.sy-steps li.done { color: var(--ok); } .sy-steps li.done::before { content: '✓ '; }
.sy-steps li.now { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

/* ---------- Notenspiegel ---------- */
.gs-dist { display: flex; gap: 2px; align-items: flex-end; height: 46px; min-width: 150px; }
.gs-dist span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; min-width: 12px; }
.gs-dist i { display: block; width: 100%; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 1px; opacity: .85; }
.gs-dist b { font-size: 10px; font-weight: 400; color: var(--muted); line-height: 1.2; }
.gs-dist em { position: absolute; top: -2px; font-style: normal; font-size: 10px; font-weight: 700; color: var(--ink); }
table.gs-table td { vertical-align: middle; }
tr.gs-warn td:last-child { color: var(--bad); font-weight: 700; }
tr.gs-total td { background: var(--sunken); }
@media print { .gs-dist i { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* --- Bereiche (v0.19) ------------------------------------------------------------- */
.tile-wide { grid-column: 1 / -1; align-items: flex-start; }
.home > *, .tiles > * { min-width: 0; }
.tile-wide .t-body { overflow: hidden; }
.t-events { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 6px; }
.t-ev { font-size: 14.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-ev b { display: inline-block; min-width: 64px; color: var(--brand); font-weight: 700; }
.tile.accent .t-ev b { color: inherit; }
.tt-daily { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 12px; padding: 10px 12px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--marker) 22%, var(--surface)); border-left: 4px solid var(--marker); }
.tt-daily svg { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; margin-top: 1px; }
.tt-daily p { margin: 0; }
.tt-daily p + p { margin-top: 4px; }
.tt-course { display: inline-block; margin: 8px 8px 0 0; font-size: 13.5px; font-weight: 700; text-decoration: none; }
.grouptabs .gt-home { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); padding-left: 0; margin-right: 6px; }
.grouptabs .gt-home svg { width: 19px; height: 19px; stroke: var(--brand); fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.grouptabs .gt-home:hover { color: var(--brand); }
@media (max-width: 640px) { .grouptabs .gt-home span { display: none; } }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 22px; }
.course-card { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); border-left: 6px solid var(--c); margin: 0; }
.course-card:hover { border-color: var(--brand); border-left-color: var(--c); box-shadow: var(--lift); }
.cc-subj { font: 700 18px/1.25 var(--head); }
.cc-class { font-weight: 700; color: var(--muted); }
.course-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 6px 0 18px; }
.course-act { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); margin: 0; }
.course-act:hover { border-color: var(--brand); }
.course-act b { color: var(--brand); }

.home.has-plan.searching { grid-template-columns: 1fr; }
.home.searching .tiles { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important; }

/* --- Profil: Darstellung, Installation (v0.20) -------------------------------------- */
.pf-theme { border: 0; padding: 0; margin: 4px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.pf-theme legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.pf-theme-opt { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px 6px 8px; cursor: pointer; font-weight: 600; margin: 0; }
.pf-theme-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.pf-theme-opt input { margin: 0; }
.pf-swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); }
.pf-theme-light .pf-swatch { background: #f4f6fb; }
.pf-theme-dark .pf-swatch { background: #182035; }
.pf-theme-auto .pf-swatch { background: linear-gradient(135deg, #f4f6fb 50%, #182035 50%); }
.pf-install { margin: 14px 0 4px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; background: var(--sunken); }
.pf-install summary { cursor: pointer; }
.pf-install [data-how] { margin: 8px 0; font-size: 14.5px; }
.pf-install .btn { margin-top: 10px; }
.pf-welcome { border-left: 4px solid var(--marker); }

/* --- Vertretungsplanung (v0.21) ------------------------------------------------------ */
.cv-day { margin-top: 6px; }
.cv-who > div { margin: 3px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.cv-actions form { display: inline-flex; gap: 8px; margin: 0; }
.cv-table td { vertical-align: top; }
.cv-table .cv-select { min-width: 280px; max-width: 520px; }
.cv-table input { margin-bottom: 4px; }
.cv-table .cv-room { max-width: 140px; }
.cv-n-open { color: var(--bad); }
tr.cv-open td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
tr.cv-draft td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
tr.cv-planned:not(.cv-draft) td:first-child, tr.cv-untis td:first-child { box-shadow: inset 4px 0 0 var(--ok); }
.cv-why { display: block; margin-top: 3px; font-style: italic; }
.cv-ai { border-left: 4px solid var(--brand); }
@media print { .cv-table select { border: 0; appearance: none; padding: 0; } }

/* --- Teams: Editor, Bearbeiten, Office im Beitrag (v0.22) ---------------------------- */
.rte { border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.rte:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.rte-bar button { border: 0; background: none; color: var(--ink); min-width: 30px; height: 28px; border-radius: 6px; cursor: pointer; font: 600 14px/1 var(--body); padding: 0 6px; }
.rte-bar button:hover { background: var(--accent); color: var(--brand); }
.rte-sep { width: 1px; background: var(--line); margin: 4px 4px; }
.rte-area { min-height: 64px; max-height: 40vh; overflow-y: auto; padding: 9px 12px; outline: none; line-height: 1.5; }
.rte-area[data-small] { min-height: 40px; }
.rte-area.empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; position: absolute; }
.rte-area p, .c-rich p { margin: 0 0 .45em; }
.rte-area p:last-child, .c-rich p:last-child { margin-bottom: 0; }
.rte-area ul, .rte-area ol, .c-rich ul, .c-rich ol { margin: .3em 0 .5em; padding-left: 1.4em; }
.rte-area blockquote, .c-rich blockquote { margin: .4em 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.rte-area h3, .c-rich h3 { font-size: 17px; margin: .4em 0 .3em; }
.rte-area code, .c-rich code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92em; background: var(--sunken); padding: 1px 5px; border-radius: 4px; }
.rte-area pre, .c-rich pre { background: var(--sunken); padding: 8px 10px; border-radius: 6px; overflow-x: auto; }
.c-tools { display: inline-flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.c-send-hint { margin-left: auto; }
@media (max-width: 640px) { .c-send-hint { display: none; } }
.c-office { position: relative; display: inline-block; }
.c-office summary { list-style: none; cursor: pointer; }
.c-office summary::-webkit-details-marker { display: none; }
.c-office-menu { position: absolute; bottom: 100%; left: 0; z-index: 5; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--lift); white-space: nowrap; }
.c-office-menu .linkbtn { text-align: left; padding: 5px 8px; }
.c-office-files:empty { display: none; }
.c-office-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.c-editform { margin: 6px 0; }
.c-edit-files { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; align-items: center; }
.c-msgedit { margin: 4px 0; min-width: min(420px, 70vw); }
.c-msgedit textarea { width: 100%; }
.c-msgedit div { display: flex; gap: 6px; justify-content: flex-end; margin-top: 4px; }
.c-filechans { margin: 0 0 8px; padding: 0; border: 0; }

/* Kurzumfrage in Teambeiträgen */
.c-poll { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunken); padding: 10px 12px; margin: 6px 0; max-width: 560px; }
.c-poll-q { font-family: var(--head); font-weight: 700; font-size: 1.05rem; margin-bottom: 2px; }
.c-poll-res { list-style: none; padding: 0; margin: 8px 0 4px; display: grid; gap: 8px; }
.c-poll-row { display: flex; justify-content: space-between; gap: 10px; }
.c-poll-res li.mine .c-poll-row > span:first-child { font-weight: 700; color: var(--brand); }
.c-poll-bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 3px; }
.c-poll-bar span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.c-poll-form { display: grid; gap: 4px; margin-top: 8px; justify-items: start; }
.c-poll-change summary { margin-top: 6px; cursor: pointer; }
.c-poll-toggle { margin-top: 4px; }
.c-poll-new { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 8px 10px; margin: 6px 0; display: grid; gap: 6px; }
.c-poll-new legend { font-weight: 700; font-size: .9rem; padding: 0 4px; }
.c-poll-new input[type=text] { width: 100%; }
.c-poll-opts { display: grid; gap: 6px; }
.c-poll-new-bar { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }

/* Office-Fenster (eigenes Browserfenster) */
body.office-window { height: 100vh; margin: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--surface); }
body.office-window .office { flex: 1; min-height: 0; }
body.office-window .office-bar { border-top: 4px solid var(--app, var(--brand)); }
body.app-word { --app: #2b579a; } body.app-excel { --app: #217346; } body.app-ppt { --app: #b7472a; }
.office-app { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--app, var(--brand)); color: #fff; font: 800 16px/1 var(--head); flex: none; }
.office-lock { padding: 8px 16px; background: color-mix(in srgb, var(--marker) 35%, var(--surface)); border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.office-ask { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; max-width: 540px; background: var(--surface); color: var(--ink); box-shadow: var(--lift); }
.office-ask::backdrop { background: rgba(10, 20, 50, .35); }
.office-ask-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.c-tools [data-poll-toggle] { color: var(--brand); font-weight: 700; }

/* Co-Teacher */
.ct-ava { background: linear-gradient(135deg, #1f8dd6, #8a4fbf) !important; color: #fff; font-size: 17px; display: inline-grid; place-items: center; }
.ct-ava.big { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; }
.c-coteacher { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.ct-feed { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.ct-msg { display: flex; gap: 10px; margin: 6px 0; align-items: flex-start; }
.ct-me { justify-content: flex-end; }
.ct-bubble { max-width: min(760px, 85%); padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); line-height: 1.5; }
.ct-me .ct-bubble { background: var(--accent); border-color: transparent; white-space: pre-wrap; }
.ct-bubble p { margin: 0 0 6px; } .ct-bubble ul { margin: 4px 0 6px; padding-left: 20px; }
.ct-ref { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; margin: 0 1px; border-radius: 9px; background: var(--accent); color: var(--brand); font-size: 11px; font-weight: 700; text-decoration: none; vertical-align: super; line-height: 1; }
.ct-sources { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ct-src { font-size: 12.5px; padding: 3px 9px; border-radius: 99px; background: var(--sunken); border: 1px solid var(--line); text-decoration: none; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ct-src:hover { border-color: var(--brand); }
.ct-welcome { max-width: 640px; margin: 20px auto; text-align: center; }
.ct-examples { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.ct-examples .pill { cursor: pointer; border: 1px solid var(--line); }
.ct-dots i { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--muted); animation: ctdot 1s infinite; }
.ct-dots i:nth-child(2) { animation-delay: .15s; } .ct-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ctdot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Kachel mit Zusatzlink (z. B. Chat → Co-Teacher) */
.tile-box { position: relative; display: grid; }
.tile-box > .tile { height: 100%; padding-bottom: 38px; }
.tile-extra { position: absolute; left: 62px; bottom: 10px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; text-decoration: none;
  color: #fff; background: linear-gradient(135deg, #1f8dd6, #8a4fbf); }
.tile-extra:hover { filter: brightness(1.1); }
/* Co-Teacher in der Chatliste: immer unten, leicht abgesetzt */
.c-side { display: flex; flex-direction: column; }
.c-coteacher { margin-top: auto !important; background: linear-gradient(135deg, color-mix(in srgb, #1f8dd6 9%, var(--surface)), color-mix(in srgb, #8a4fbf 12%, var(--surface))); }
.c-coteacher.active { background: linear-gradient(135deg, color-mix(in srgb, #1f8dd6 18%, var(--surface)), color-mix(in srgb, #8a4fbf 22%, var(--surface))); }
.c-side > * { flex-shrink: 0; }

/* ---- Aufgabenpool und Lernen ---------------------------------------------------------------- */
label.check { font-weight: 400; display: inline-flex; gap: 8px; align-items: center; margin: 8px 0; }
button.link.bad, .link.bad { color: var(--bad); }
.ok-text { color: var(--ok); } .bad-text { color: var(--bad); }
.pz-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; }
.pz-head > div:first-child { flex: 1 1 320px; }
.pz-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pz-crumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; color: var(--muted); }
.pz-crumbs a { color: var(--muted); }
.pz-grades { margin: 6px 0 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.pz-grades .pill { text-decoration: none; font-size: 14px; padding: 4px 12px; }
.pz-grades .pz-empty { opacity: .55; }
.pz-grade h2 { margin-top: 20px; }
.pz-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pz-area { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); margin: 0; border-left: 5px solid var(--brand); }
.pz-area:hover { border-color: var(--brand); box-shadow: var(--lift); }
.pz-list { list-style: none; padding: 0; margin: 0; }
.pz-list > li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.pz-list > li:last-child { border-bottom: 0; }
.pz-how { padding-left: 22px; } .pz-how li { margin: 6px 0; }
.pz-pre { white-space: pre-wrap; }
.pz-rows { list-style: none; padding: 0; margin: 10px 0; }
.pz-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 6px; background: var(--surface); flex-wrap: wrap; }
.pz-row.dragging { opacity: .5; }
.pz-row.pz-off { opacity: .6; border-style: dashed; }
.pz-grip { cursor: grab; color: var(--muted); user-select: none; font-size: 18px; line-height: 1; }
.pz-n { font: 700 15px/1 var(--head); color: var(--muted); min-width: 1.4em; text-align: right; }
.pz-type { font-size: 18px; width: 1.4em; text-align: center; }
.pz-title { font-weight: 700; flex: 1 1 200px; }
.pz-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.pz-meta-r { white-space: nowrap; }
.pz-move .link { padding: 0 4px; color: var(--muted); }
.pz-newtask { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.pz-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 960px) { .pz-cols { grid-template-columns: 1fr; } }
.pz-side .card h2 { font-size: 17px; }
.pz-code { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; width: 100%; }
.pz-prompt { min-height: 50vh; }
.pz-tools { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.pz-tools .btn.small { padding: 4px 10px; font-size: 13px; }
.pz-files { list-style: none; padding: 0; margin: 0 0 8px; } .pz-files li { padding: 3px 0; word-break: break-all; }
.pz-drop { border: 2px dashed var(--line-strong); border-radius: var(--r-md); padding: 10px 12px; }
.pz-drop.over { border-color: var(--brand); background: var(--accent); }
.pz-inline-up { display: inline; }
.pz-howto { background: var(--sunken); border-radius: var(--r-md); padding: 10px 14px; margin: 10px 0; }
.pz-howto ol { margin: 6px 0 0; padding-left: 20px; }
.pz-pairs { width: 100%; border-collapse: collapse; } .pz-pairs td { padding: 3px 4px 3px 0; } .pz-pairs input { width: 100%; }
.pz-matrix td, .pz-matrix th { text-align: center; } .pz-matrix td:first-child, .pz-matrix th:first-child { text-align: left; white-space: nowrap; }
.pz-matrix a { text-decoration: none; font-weight: 700; } .pz-matrix .pz-todo { background: var(--marker); color: var(--marker-ink); border-radius: 6px; padding: 1px 6px; }
.pz-pdf { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.pz-sol { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); font-weight: 700; padding: 0 5px; border-radius: 5px; }
.pz-sol-box { color: var(--ok); font-size: 1.1em; }
.pz-previewbar { border-left-color: var(--marker); }
.pz-chatlog p { margin: 6px 0; } .pz-chatlog p.me { color: var(--brand); }

/* Inhalte (kompatibel zu EDS: Kästen, Tipps, Hörstücke) */
.eds-content { overflow-wrap: anywhere; }
.eds-content img { max-width: 100%; height: auto; }
.eds-content img.pz-svg { background: #fff; border-radius: 6px; }
.eds-content table { border-collapse: collapse; margin: 8px 0; }
.eds-content table td, .eds-content table th { padding: 4px 8px; vertical-align: top; }
.eds-content table.eds-table td, .eds-content table.eds-table th, .eds-content table[border] td, .eds-content table[border] th { border: 1px solid var(--line-strong); }
.eds-box { border-radius: var(--r-md); padding: 10px 14px; margin: 12px 0; border-left: 5px solid; }
.eds-box > strong:first-child { display: block; margin-bottom: 2px; }
.eds-box > *:last-child { margin-bottom: 0; }
.eds-box-definition, .eds-box-merke { background: color-mix(in srgb, #ffd43b 22%, var(--surface)); border-color: #e0a800; }
.eds-box-beispiel { background: color-mix(in srgb, #4dabf7 16%, var(--surface)); border-color: #1c7ed6; }
.eds-box-warnung, .eds-box-achtung { background: color-mix(in srgb, #ff6b6b 14%, var(--surface)); border-color: #e03131; }
.eds-box-glossar { background: var(--sunken); border-color: var(--line-strong); }
details.eds-tipp { background: var(--sunken); border-radius: var(--r-md); padding: 6px 12px; margin: 10px 0; }
details.eds-tipp > summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.eds-hoerstueck { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--sunken); border-radius: var(--r-md); padding: 8px 12px; margin: 10px 0; }
.eds-hoerstueck audio { max-width: 100%; }

/* Lernen */
.lz-progress { min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.lz-topic .meter { margin-top: 6px; }
.lz-topic.lz-done { border-left-color: var(--ok); }
.lz-task { scroll-margin-top: 70px; }
.lz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lz-head h2 { margin: 0; font-size: 19px; }
.lz-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--brand); font: 700 15px/1 var(--head); flex: 0 0 auto; }
.lz-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.lz-feedback { margin-top: 12px; background: var(--sunken); border-radius: var(--r-md); padding: 10px 14px; }
.lz-feedback p { margin: 0 0 6px; }
.lz-dsl input.pz-gap { width: auto; display: inline-block; padding: 3px 7px; margin: 2px 2px; border-radius: 6px; font: inherit; min-width: 4ch; }
.lz-dsl select.pz-select { width: auto; display: inline-block; padding: 3px 6px; margin: 2px; font: inherit; }
.pz-choice { display: inline-flex; align-items: center; margin-right: 6px; border-radius: 6px; padding: 1px 3px; }
.pz-choice input { width: 18px; height: 18px; margin: 0; }
.lz-ok { outline: 2px solid var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)) !important; }
.lz-bad { outline: 2px solid var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)) !important; }
.lz-match { display: grid; gap: 8px; margin: 10px 0; }
.lz-match-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.3fr); gap: 10px; align-items: center; }
.lz-left { font-weight: 700; } .lz-left img { max-height: 90px; max-width: 100%; }
@media (max-width: 600px) { .lz-match-row { grid-template-columns: 1fr; gap: 2px; } .lz-match-row > span[aria-hidden] { display: none; } }
.lz-order { list-style: none; padding: 0; margin: 10px 0; counter-reset: lzo; }
.lz-order li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 6px; background: var(--surface); counter-increment: lzo; cursor: grab; }
.lz-order li::before { content: counter(lzo) "."; font-weight: 700; color: var(--muted); min-width: 1.6em; }
.lz-order li.dragging { opacity: .5; }
.lz-otext { flex: 1; }
.lz-text { width: 100%; font: inherit; }
.lz-chat { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--sunken); border-radius: var(--r-md); margin: 10px 0; min-height: 80px; }
.lz-msg { margin: 0; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); max-width: 85%; align-self: flex-start; white-space: pre-wrap; }
.lz-msg.me { align-self: flex-end; background: var(--accent); border-color: transparent; }
.lz-chat-form { display: flex; gap: 8px; } .lz-chat-form input { flex: 1; }
.lz-applet { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.lz-rec { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.lz-file { margin-top: 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lz-medium { background: var(--sunken); border-radius: var(--r-md); padding: 10px 14px; margin: 6px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.lz-medium video { width: 100%; max-height: 70vh; border-radius: var(--r-sm); background: #000; }
.lz-video { position: relative; padding-top: 56.25%; } .lz-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--r-sm); }
.pz-asrow { display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; }
.pz-asrow .spacer { flex: 1; }
.lz-medium .btn { align-self: flex-start; }
.lz-status { white-space: nowrap; }
.c-hint { margin: 8px auto 12px; max-width: 560px; text-align: center; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; color: var(--muted); }
/* Dateien ansehen, Leuchtkasten, Zurück in der App */
.app-back { font-size: 30px; line-height: 1; color: #fff; text-decoration: none; padding: 0 6px 4px 0; }
.fv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fv-name { overflow-wrap: anywhere; }
.fv-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; display: grid; place-items: center; }
.fv-body img, .fv-body video { max-width: 100%; max-height: 80vh; border-radius: var(--r-sm); }
.fv-body iframe { width: 100%; height: 80vh; border: 0; background: #fff; }
.fv-body audio { width: 100%; }
dialog.dc-lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
dialog.dc-lightbox::backdrop { background: rgba(5, 10, 25, .88); }
dialog.dc-lightbox img { position: absolute; inset: 0; margin: auto; max-width: 96vw; max-height: 86vh; object-fit: contain; border-radius: 6px; background: #fff; }
.dc-lb-x, .dc-lb-dl { position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #111;
  font: 700 22px/46px var(--body); text-align: center; text-decoration: none; cursor: pointer; }
.dc-lb-x { top: max(14px, env(safe-area-inset-top)); right: 14px; }
.dc-lb-dl { bottom: max(14px, env(safe-area-inset-bottom)); right: 14px; }
/* Fundsachen, Nachhilfe */
.lf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.lf-item { margin: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.lf-photo { display: block; aspect-ratio: 4 / 3; background: var(--sunken); }
.lf-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lf-nophoto { display: grid; place-items: center; color: var(--line-strong); } .lf-nophoto svg { width: 48px; height: 48px; }
.lf-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.lf-body p { margin: 0; }
.lf-claim details summary { list-style: none; display: inline-flex; } .lf-claim details summary::-webkit-details-marker { display: none; }
.lf-claim details[open] { display: flex; flex-direction: column; gap: 6px; }
.lf-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.lf-actions details[open] { flex-basis: 100%; } .lf-actions details form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.lf-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .lf-inline input { width: auto; flex: 1 1 140px; }
.tu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.tu-item { margin: 0; border-left: 6px solid var(--c); display: flex; flex-direction: column; gap: 6px; }
.tu-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tu-note { white-space: pre-wrap; margin: 0; }
.tu-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.tu-mine { display: flex; flex-direction: column; gap: 6px; }
/* DFU: Fachbegriffe und Trainer */
.pz-vocab { width: 100%; border-collapse: collapse; }
.pz-vocab td, .pz-vocab th { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.pz-vprint { margin-bottom: 18px; }
@media print { .pz-vprint { font-size: 11pt; } .pz-vprint tr { break-inside: avoid; } }
.pz-vrow[open] { min-width: 300px; }
.pz-vform { display: flex; flex-direction: column; gap: 4px; margin: 6px 0; }
.lz-glossary { margin-top: 10px; background: color-mix(in srgb, #4dabf7 8%, var(--surface)); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 12px; }
.lz-glossary summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.lz-glossary dl { margin: 6px 0 2px; display: grid; gap: 8px; }
.lz-glossary dt { font-weight: 700; }
.lz-glossary dd { margin: 0; display: flex; flex-direction: column; gap: 1px; font-size: 14.5px; }
.lz-tr { color: var(--brand); } .lz-ex { font-style: italic; } .lz-ph { color: var(--muted); font-size: 13.5px; }
.lz-dfu { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lz-dfu h2 { margin: 0 0 4px; }
.vt-modes { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 8px; }
.vt-modes .pill { cursor: pointer; font-size: 14px; padding: 6px 12px; }
.vt-stage { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.vt-card { width: 100%; max-width: 560px; min-height: 140px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
  border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 18px; }
.vt-back { border-style: solid; background: var(--sunken); }
.vt-big { font: 700 clamp(22px, 4vw, 30px)/1.25 var(--head); margin: 0; }
.vt-term { font: 700 24px/1.25 var(--head); margin: 0; }
.vt-tr { color: var(--brand); margin: 0; font-weight: 700; } .vt-ex { font-style: italic; margin: 0; } .vt-ph { color: var(--muted); margin: 0; font-size: 14px; }
.vt-detail { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.vt-btns, .vt-opts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.vt-opts .btn { min-width: 160px; justify-content: center; }
.vt-art .btn { min-width: 90px; font-size: 18px; }
.vt-gap { font-size: 19px; max-width: 620px; margin: 0; } .vt-blank { display: inline-block; min-width: 4ch; border-bottom: 2px solid var(--brand); color: transparent; }
.vt-write { display: flex; gap: 8px; width: 100%; max-width: 420px; } .vt-write input { flex: 1; font-size: 18px; }
.vt-done { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.vt-box { color: var(--ok); letter-spacing: 1px; white-space: nowrap; }
.vt-round { text-align: center; }
.pz-voices select { min-width: 150px; } .pz-vsel { display: flex; gap: 4px; align-items: center; } .pz-voices th { white-space: nowrap; }
.say { border: 0; background: none; cursor: pointer; padding: 0 4px 0 0; font-size: 15px; line-height: 1; vertical-align: baseline; } .say.busy { opacity: .4; } .say:hover { transform: scale(1.15); }
/* Aufgaben als aufklappbare Karten: Kopf in DAScampus-Blau, Inhalt auf Weiß */
.lz-task { padding: 0; overflow: hidden; background: var(--surface); }
.lz-task > .lz-head { margin: 0; padding: 12px 18px; background: var(--brand-deep); color: #fff; cursor: pointer; user-select: none; }
.lz-task > .lz-head h2 { color: #fff; }
.lz-task > .lz-head .muted { color: rgba(255,255,255,.75); }
.lz-task > .lz-head .lz-n { background: #fff; color: var(--brand-deep); }
.lz-task > .lz-head:hover { background: color-mix(in srgb, var(--brand-deep) 88%, #fff); }
.lz-task > .lz-head:focus-visible { outline: 3px solid var(--marker); outline-offset: -3px; }
.lz-chev { font-size: 18px; transition: transform .15s ease; margin-left: 4px; }
.lz-task:not(.lz-open) .lz-chev { transform: rotate(-90deg); }
.lz-body { padding: 16px 18px 18px; }
.lz-task:not(.lz-open) > .lz-body { display: none; }
.lz-head .spacer, .row .spacer, .pz-asrow .spacer { flex: 1 1 auto; }
.pz-teacherbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--marker); border-radius: var(--r-md); padding: 8px 12px; margin-bottom: 14px; }
.pz-teacherbar .spacer { flex: 1 1 auto; }

/* Aufgaben: Kopf immer im DAScampus-Blau, Inhalt immer weiß – auch im dunklen Modus (wie ein Arbeitsblatt) */
.lz-task { background: #fff; border-color: #d8dfeb; }
.lz-task > .lz-head { background: #1573ad; }
.lz-task > .lz-head .lz-n { color: #1573ad; }
.lz-task > .lz-body {
  --ground: #f5f7fb; --surface: #ffffff; --sunken: #f6f9fc; --ink: #14212e; --muted: #5b6b7c; --line: #dbe5ee; --line-strong: #b8c8d8;
  --brand: #1f8dd6; --brand-deep: #1573ad; --brand-ink: #ffffff; --accent: #e4f2fb;
  --marker: #ffe45c; --marker-ink: #3d3200; --ok: #1c7c52; --warn: #8f5b00; --bad: #c8352a;
  color-scheme: light; background: #fff; color: var(--ink);
}

/* Wochenansicht: Trennlinie zwischen den Stunden, Uhrzeit unter der Stundenzahl */
.tt-col .tt-day { gap: 0; }
.tt-col .tt-row { grid-template-columns: 40px 1fr; padding: 6px 0; border-top: 1px solid var(--line); box-sizing: border-box; }
.tt-col .tt-row:first-child { border-top: 0; padding-top: 0; }
.tt-col .tt-day.compact .tt-time span:first-of-type { display: block; font-size: 11px; letter-spacing: -.01em; margin-top: 1px; }
.tt-col .tt-row.free .tt-slot { min-height: 30px; }

/* Texteditor-Fenster (.txt, Quelltext) */
body.office-window.app-text { --app: #586379; }
.te-area { flex: 1; width: 100%; min-height: 300px; border: 0; border-radius: 0; resize: none; padding: 14px 18px; margin: 0;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; tab-size: 4; white-space: pre; overflow: auto;
  background: var(--surface); color: var(--ink); }
.te-area.wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.te-area:focus { outline: none; box-shadow: none; }
.te-foot { padding: 4px 18px; border-top: 1px solid var(--line); background: var(--sunken); }
.te-wrap { margin: 0; }

/* ---- Kurs: Noten (Desto-Stil) und Aufgaben ---- */
.gr-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.gr-bar .spacer { flex: 1; }
.gr-wrap { padding: 0; }
.gr-table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.gr-table th, .gr-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.gr-table th:first-child, .gr-table td.gr-name { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.gr-cat { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.gr-written { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.gr-other { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.gr-cat.gr-written { border-top: 3px solid var(--brand); }
.gr-cat.gr-other { border-top: 3px solid var(--accent); }
.gr-head { all: unset; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 2px 4px; border-radius: var(--r-sm); }
.gr-head:hover, .gr-head:focus-visible { background: var(--sunken); outline: 2px solid var(--line-strong); }
.gr-head .small { font-weight: 400; }
.gr-cell { all: unset; cursor: pointer; display: inline-block; min-width: 2.2em; padding: 3px 6px; border-radius: var(--r-sm); font-weight: 700; text-align: center; }
.gr-cell:hover, .gr-cell:focus-visible { background: var(--surface); outline: 2px solid var(--brand); }
.gr-cell.empty { color: var(--muted); font-weight: 400; }
.gr-coll { border-left: 1px dashed var(--line-strong); }
.gr-avg { font-weight: 700; border-left: 2px solid var(--line-strong); }
.gr-term { border-left: 2px solid var(--line-strong); }
.gr-term input.grade { width: 4.2em; text-align: center; }
dialog.gr-dlg { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); background: var(--surface); color: var(--ink); box-shadow: 0 18px 50px rgba(0,0,0,.25); }
dialog.gr-dlg::backdrop { background: rgba(10, 20, 40, .45); }
dialog.gr-dlg h2 { margin: 0 0 10px; }
.gr-dlg input.grade.big { font-size: 1.5rem; width: 5em; text-align: center; font-weight: 700; }
.gr-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); margin: 8px 0; }
.gr-li { display: grid; grid-template-columns: 1fr 5em 1.4fr; gap: 6px; align-items: center; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.gr-li:last-child { border-bottom: 0; }
.gr-li input.grade { width: 100%; text-align: center; }
.gr-picks { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.gr-picks button { min-width: 2.4em; padding: 3px 6px; border: 1px solid var(--line-strong); background: var(--sunken); color: var(--ink); border-radius: var(--r-sm); cursor: pointer; font-weight: 700; }
.gr-picks button:hover { background: var(--brand); color: var(--brand-ink); }
.gr-dlg-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.gr-dlg-btns .left { margin-right: auto; }
.gr-entries { list-style: none; margin: 6px 0 10px; padding: 0; }
.gr-entries li { display: flex; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--line); }
.gr-entries li button { margin-left: auto; }
.gr-catpick { border: 0; padding: 0; margin: 0 0 8px; display: flex; gap: 14px; align-items: center; }
.gr-catpick legend { float: left; margin-right: 10px; }
.gr-sub + .gr-sub { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pz-meter { display: inline-block; vertical-align: middle; width: 120px; height: 8px; border-radius: 4px; background: var(--sunken); overflow: hidden; margin-right: 6px; }
.pz-meter i { display: block; height: 100%; background: var(--ok); }
.pz-heat { background: color-mix(in srgb, var(--ok) calc(var(--p, 0) * .28%), transparent); }
@media (max-width: 640px) { .gr-li { grid-template-columns: 1fr 4em; } .gr-li input[type=text]:not(.grade) { grid-column: 1 / -1; } }
.gr-dlg label { display: block; }
.gr-dlg label > input:not([type=radio]), .gr-dlg label > select { display: block; width: 100%; margin-top: 4px; }
.gr-dlg label > input.grade.big { width: 5em; }
.gr-li { padding: 2px 8px; }
.gr-li input.grade { padding: 4px 6px; min-height: 0; height: 32px; }
.pz-asrow select { width: 100%; }
.gr-li > input.grade { margin-top: 0; }
form.pz-asrow { display: block; }
.gr-dlg label.gr-li { display: grid; }
.gr-dlg label.gr-li > input.grade { width: 100%; margin-top: 0; }

/* Oberstufenwahl: Rückfragen */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ch-thread h2 { display: flex; align-items: center; gap: 10px; }
.ch-thread-list { list-style: none; margin: 10px 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ch-thread-list li { max-width: 80%; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--sunken); }
.ch-thread-list li.coord { align-self: flex-end; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.ch-msg-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.ch-msg-body { white-space: pre-line; margin-top: 2px; }
.ch-tally a.ch-q { color: var(--marker-ink); background: var(--marker); }
@media (max-width: 640px) { .ch-thread-list li { max-width: 100%; } }
.ch-radio { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }
.ch-radio label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
/* Dateien in eigenen Chatnachrichten: Farbe der Blase übernehmen (sonst im Dunkelmodus dunkel auf dunkel) */
.c-msg.mine .c-bubble .c-file { background: color-mix(in srgb, var(--brand-ink) 12%, transparent); border-color: color-mix(in srgb, var(--brand-ink) 32%, transparent); color: var(--brand-ink); }
.c-msg.mine .c-bubble .c-file .muted, .c-msg.mine .c-bubble .c-file-name { color: inherit; }
.c-msg.mine .c-bubble .c-file:hover { background: color-mix(in srgb, var(--brand-ink) 22%, transparent); }
.c-msg.mine .c-bubble .c-files img { border-color: color-mix(in srgb, var(--brand-ink) 32%, transparent); }
/* Chat: Reiter „Medien“ */
.c-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 18px; }
.c-media-grid a { display: block; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); background: var(--sunken); }
.c-media-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-link-cell { word-break: break-all; }
.c-files { align-items: flex-start; }
/* Chat: ungelesene Verläufe und Linie „Neue Nachrichten“ */
.c-conv.unread .c-conv-text strong { font-weight: 800; color: var(--ink); }
.c-conv.unread .c-conv-text .muted { color: var(--ink); }
.c-conv .nbadge { margin-left: auto; flex: 0 0 auto; }
.c-newline { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--bad); font-size: 12.5px; font-weight: 700; }
.c-newline::before, .c-newline::after { content: ''; flex: 1; height: 1px; background: color-mix(in srgb, var(--bad) 55%, transparent); }

/* Videoanruf im Chat */
.c-headbtns { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.c-callbar { display: flex; gap: 8px; align-items: center; padding: 8px 20px; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); font-size: 14px; }
.c-callbar b { margin-left: auto; color: var(--ok); }
.c-callbar[hidden] { display: none; }
.call { display: flex; flex-direction: column; height: calc(100vh - 90px); height: calc(100dvh - 90px); min-height: 420px; background: #0d1424; color: #eef2ff; border-radius: var(--r-lg); overflow: hidden; }
.call-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(255,255,255,.05); }
.call-back { color: #cfd8ff; text-decoration: none; font-weight: 700; }
.call-status { color: #aab4d6; }
.call-lobby { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; padding: 24px; align-items: center; flex: 1; }
.call-lobby h1 { color: #fff; margin-top: 0; }
.call-lobby .muted, .call-lobby summary { color: #aab4d6; }
.call-lobby-side .checks { color: #eef2ff; }
.call-room { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.call-room[hidden], .call-lobby[hidden] { display: none; }
.call-grid { flex: 1; min-height: 0; overflow: auto; display: grid; gap: 8px; padding: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-content: center; }
.call-grid[data-n="1"] { grid-template-columns: minmax(0, 900px); justify-content: center; }
.call-tile { position: relative; background: #1b2540; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; min-height: 0; width: 100%; align-self: center; }
.call-tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #1b2540; }
.call-tile.self video { transform: scaleX(-1); }
.call-tile.self.back video { transform: none; }
.call-tile.nocam video { visibility: hidden; }
.call-tile.nocam::after { content: '📷✕'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; opacity: .6; }
.call-tile.lobby { max-width: 640px; width: 100%; }
.call-name { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.55); color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 13px; }
.call-state { position: absolute; inset: 0; display: grid; place-items: center; color: #cfd8ff; font-size: 14px; pointer-events: none; }
.call-tile.failed .call-state { color: #ffb4ab; }
.call-msg { text-align: center; color: #ffd27a; margin: 4px 0; }
.call-bar { display: flex; justify-content: center; gap: 10px; padding: 12px; background: rgba(255,255,255,.05); flex-wrap: wrap; }
.call-btn { border: 0; border-radius: 999px; min-width: 48px; height: 48px; padding: 0 14px; font-size: 20px; background: #2a3658; color: #fff; cursor: pointer; }
.call-btn.off { background: #8e2b25; }
.call-btn.on { background: var(--ok); }
.call-btn.hangup { background: #c8372d; font-size: 15px; font-weight: 700; }
.call-btn[hidden] { display: none; }
@media (max-width: 760px) {
  .call { border-radius: 0; height: calc(100dvh - 120px); }
  .call-lobby { grid-template-columns: 1fr; padding: 14px; }
  .call-grid { grid-template-columns: 1fr 1fr; }
  .call-grid[data-n="1"], .call-grid[data-n="2"] { grid-template-columns: 1fr; }
  .call-tile { aspect-ratio: 3 / 4; }
}
/* zu zweit: Gegenüber groß, eigenes Bild klein in der Ecke */
.call-grid[data-n="2"] { display: flex; position: relative; }
.call-grid[data-n="2"] { overflow: hidden; }
.call-grid[data-n="2"] .call-tile:not(.self) { flex: 1; aspect-ratio: auto; min-height: 0; align-self: stretch; }
.call-grid[data-n="2"] .call-tile:not(.self) video { object-fit: contain; background: #0d1424; }
.call-grid[data-n="2"] .call-tile.self { position: absolute; right: 18px; bottom: 18px; width: 26%; max-width: 220px; min-width: 110px; z-index: 2; box-shadow: 0 6px 20px rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.25); }
.call-grid[data-n="2"] .call-tile.self .call-name { display: none; }
@media (max-width: 760px) { .call-grid[data-n="2"] .call-tile:not(.self) video { object-fit: cover; } .call-grid[data-n="2"] .call-tile.self { aspect-ratio: 3 / 4; width: 30%; } }
.call-busy { background: #4a3a10; border: 1px solid #c9a227; color: #ffe9a8; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.call-busy ul { margin: 4px 0 6px; padding-left: 18px; }

/* Kursnotizbuch (Reiter im Team) */
ul.plain { list-style: none; padding: 0; margin: 0; } ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cn-areas { margin: 8px 0 14px; padding-left: 18px; } .cn-areas li { margin: 3px 0; }
.cn-open { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cn-open-main { display: flex; gap: 14px; align-items: center; } .cn-open h2 { margin: 0 0 2px; }
.cn-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: #7719aa; color: #fff; font: 800 26px/1 var(--head); flex: none; }
.cn-task summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; cursor: pointer; }
.cn-task-table { width: 100%; margin: 10px 0; border-collapse: collapse; } .cn-task-table th, .cn-task-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.cn-danger { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }

/* Vortrag / Live-Unterricht (public/js/live.js) – im Notizbuch schwebend, im Chat groß */
.lv { color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.25); overflow: hidden; display: flex; flex-direction: column; }
.lv-stage { position: relative; background: #111; aspect-ratio: 16 / 9; }
.lv-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #111; }
.lv.host .lv-video { transform: scaleX(-1); }
.lv-who { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12.5px; padding: 3px 8px; border-radius: 6px; }
.lv-who:empty { display: none; }
.lv-state { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 14px; text-align: center; padding: 12px; background: rgba(0,0,0,.45); }
.lv-state[hidden] { display: none; }
.lv-speaking { padding: 6px 10px; font-size: 13.5px; font-weight: 600; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ink); }
.lv-speaking.me { background: var(--ok); color: #fff; }
.lv-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; align-items: center; }
.lv-btn { border: 1px solid var(--line); background: var(--sunken); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 36px; }
.lv-btn.on { background: #fff4c2; border-color: #e0b100; color: #6b4e00; }
.lv-btn.off { opacity: .55; text-decoration: line-through; }
.lv-btn.end { margin-left: auto; background: #d13438; border-color: #d13438; color: #fff; }
.lv-queue { border-top: 1px solid var(--line); padding: 6px 8px; max-height: 200px; overflow-y: auto; }
.lv-queue[hidden] { display: none; }
.lv-q { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 2px; font-size: 14px; }
.lv-q.now { font-weight: 700; } .lv-q.muted { color: var(--muted); }
.lv-q .lv-btn { padding: 3px 10px; min-height: 0; font-size: 13px; }
.nb-livedock { position: fixed; right: 16px; bottom: 16px; z-index: 55; width: min(320px, calc(100vw - 32px)); }
.nb-livedock:empty { display: none; }
.nb-livedock .lv.big { width: min(560px, calc(100vw - 32px)); }
.nb-livedock:has(.lv.big) { width: auto; }
.nb-livedock.min .lv-stage, .nb-livedock.min .lv-queue { display: none; }
.nb-livebar { position: fixed; z-index: 54; left: 50%; top: 108px; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; background: var(--surface); border: 2px solid #d13438;
  border-radius: 999px; padding: 6px 8px 6px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-weight: 600; max-width: calc(100vw - 24px); }
.nb-livebar[hidden] { display: none; }
.nb-live-dot { width: 10px; height: 10px; border-radius: 50%; background: #d13438; animation: lvpulse 1.4s infinite; flex: none; }
@keyframes lvpulse { 50% { opacity: .3; } }
.nb-live-btn.on { background: #fde8e8; border-color: #d13438; }
.call-live { width: 100%; max-width: 1000px; margin: 0 auto; align-self: center; }
.call-live .lv { width: 100%; }
.call-live .lv-stage { max-height: calc(100dvh - 260px); }
.call-live .lv { box-shadow: none; }
.call-mode { margin: 12px 0; } .call-mode label { display: block; margin: 4px 0; }
/* Aufbewahrungsfrist in Klassen-/Kursteams */
.c-retention { border-left-color: #c98a00; background: #fff8e6; display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.c-retention-row { color: #8a5a00; margin-top: 2px; }
.c-retention-row form.inline { display: inline; margin-left: 6px; }
@media (prefers-color-scheme: dark) and (max-width: 0px) { :root:not([data-theme="light"]) .c-retention { background: #3a2f12; } :root:not([data-theme="light"]) .c-retention-row { color: #f0c060; } }
:root[data-theme="never-dark"] .c-retention { background: #3a2f12; } :root[data-theme="never-dark"] .c-retention-row { color: #f0c060; }
.c-retention .linkbtn { color: var(--brand); font-weight: 600; text-decoration: underline; }

/* --- EDScampus: Beurlaubungen ------------------------------------------------------- */
/* Auf dem Handy stehen die Angaben einer Beurlaubung untereinander statt in vier engen Spalten */
@media (max-width: 640px) {
  table.sl-table, table.sl-table tbody, table.sl-table tr, table.sl-table td { display: block; width: 100%; }
  table.sl-table th { display: none; }
  table.sl-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.sl-table tr:last-child { border-bottom: 0; }
  table.sl-table td { border: 0; padding: 2px 0; }
}

/* EDScampus: Personenauswahl beim Tippen (Chat, Geschwisterkind) */
.pp-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); padding: 5px 8px; background: var(--surface); }
.pp-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.pp-box input[type=search] { border: 0; box-shadow: none; flex: 1 1 180px; min-width: 140px; padding: 6px 2px; margin: 0; outline: 0; background: transparent; }
.pp-chips { display: contents; }
.pp-chip { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--brand) 13%, var(--surface)); color: var(--ink); border-radius: 999px; padding: 3px 4px 3px 10px; font-weight: 600; font-size: 14px; }
.pp-chip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 12px; padding: 2px 6px; border-radius: 999px; }
.pp-chip button:hover { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--ink); }
.pick-list { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); box-shadow: 0 8px 24px rgba(15, 40, 70, .12); margin-top: 4px; max-height: 340px; overflow: auto; }
.pick-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.pick-item:hover, .pick-item.active { background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.pick-item .muted { margin-left: auto; text-align: right; }
.pick-empty { padding: 10px 12px; }
.adm-sibling { margin-bottom: 8px; }

/* EDScampus: Kurstermine und Kursbuch mit Eintragsdialog */
.cc-slots { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .3px; color: var(--brand-dark, #1573ad); background: color-mix(in srgb, var(--brand) 10%, transparent); border-radius: 6px; padding: 1px 7px; margin: 2px 0; }
.bk-timeline tr.bk-row[data-lesson] { cursor: pointer; }
.bk-timeline tr.bk-row[data-lesson]:hover td, .bk-timeline tr.bk-row[data-lesson]:focus td { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.bk-timeline tr.bk-row[data-lesson]:focus { outline: 2px solid var(--brand); outline-offset: -2px; }
.bk-timeline tr.bk-cancel td { color: var(--muted); }
.bk-timeline tr.bk-cancel td:first-child, .bk-timeline tr.bk-cancel td:nth-child(2) { text-decoration: line-through; }
.bk-timeline tr.bk-open td:first-child { box-shadow: inset 3px 0 0 #e0782b; }
.bk-timeline tr.bk-today td:first-child { font-weight: 700; }
.bk-timeline .nowrap { white-space: nowrap; }
.lesson-dlg { width: min(1040px, 96vw); height: min(860px, 92vh); padding: 0; border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(10, 30, 60, .3); overflow: hidden; }
.lesson-dlg[open] { display: flex; flex-direction: column; }
.lesson-dlg::backdrop { background: rgba(15, 35, 60, .45); }
.lesson-dlg .ld-head { padding-right: 46px; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.lesson-dlg iframe { flex: 1; width: 100%; border: 0; background: var(--ground, #f4f8fc); }
body.embed { background: var(--ground, #f4f8fc); }
.embed-main { padding: 14px 18px 80px; max-width: none; }
.embed-main h1 { font-size: 22px; margin-top: 0; }
@media (max-width: 640px) { .lesson-dlg { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; } }
.lesson-dlg .ld-head .icon-btn { color: var(--ink); background: transparent; border: 0; font-size: 18px; cursor: pointer; width: 36px; height: 36px; border-radius: 8px; }
.lesson-dlg .ld-head .icon-btn:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }

/* EDScampus: Benutzer wechseln (Testhilfe) */
.hello h1 { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hello-switch { font-size: 14px; font-weight: 600; }
.switch-bar { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; background: #e0782b; color: #fff; padding: 7px 14px; font-weight: 600; font-size: 14px; }
.switch-bar a { color: #fff; text-decoration: underline; }
.switch-bar form { margin: 0; }
.switch-bar button { background: #fff; color: #b35a14; border: 0; border-radius: 999px; padding: 4px 12px; font-weight: 700; cursor: pointer; }
.la-card.la-open { border-left: 4px solid #e0782b; }

/* EDScampus: Online-Punkt im Chat */
.c-ava-wrap { position: relative; display: inline-flex; flex: none; }
.c-online { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22b45a; border: 2px solid var(--surface, #fff); }
.c-online.inline { position: static; display: inline-block; width: 9px; height: 9px; border-width: 0; margin: 0 2px 0 4px; vertical-align: middle; }
.c-online[hidden], .c-online-text[hidden] { display: none; }

/* EDScampus: Chat und Teams auf dem Handy – Liste als Schublade (☰), Verlauf nutzt den ganzen Bildschirm */
.c-burger { display: none; }
.c-side-backdrop { display: none; }
@media (max-width: 760px) {
  .c-burger { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; margin-right: 4px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 20px; cursor: pointer; }
  .collab:has(.c-head) { display: block; height: calc(100dvh - var(--top-h, 56px)); }
  .collab:has(.c-head) > .c-side { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(86vw, 340px); max-height: none;
    border-right: 1px solid var(--line); border-bottom: 0; box-shadow: 8px 0 30px rgba(10, 30, 60, .25); transform: translateX(-105%); transition: transform .22s ease; }
  .collab.side-open:has(.c-head) > .c-side { transform: none; }
  .collab.side-open:has(.c-head) .c-side-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15, 35, 60, .4); }
  .collab:has(.c-head) > .c-main { display: flex; flex-direction: column; height: 100%; min-height: 0; }
  .collab:has(.c-head) .c-head { padding: 8px 10px; gap: 6px; }
  .collab:has(.c-head) .c-head .c-title { gap: 8px; min-width: 0; }
  .collab:has(.c-head) .c-head .c-tname-big { font-size: 17px; }
  .collab:has(.c-head) .c-feed { flex: 1 1 auto; max-height: none; min-height: 0; }
}
.tt-actions { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; }
.tt-actions .tt-rec, .tt-actions .tt-course { margin-top: 0; }

/* EDScampus: Hinweise als Schublade von rechts */
.notice-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(420px, 92vw); background: var(--surface); box-shadow: -10px 0 34px rgba(10, 30, 60, .22);
  transform: translateX(105%); transition: transform .24s ease; display: flex; flex-direction: column; visibility: hidden; }
.notice-drawer.open { transform: none; visibility: visible; }
.nd-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.nd-head b { font-size: 18px; flex: 1; }
.nd-head form { margin: 0; }
.nd-head .icon-btn { color: var(--ink); background: transparent; border: 0; font-size: 18px; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; }
.nd-body { flex: 1; overflow-y: auto; }
.nd-backdrop { position: fixed; inset: 0; z-index: 75; background: rgba(15, 35, 60, .35); }
@media (prefers-reduced-motion: reduce) { .notice-drawer { transition: none; } }
.course-switch { width: auto; min-width: 220px; max-width: 340px; margin: 0; font-weight: 600; }

/* EDScampus: digitale Prüfungen */
.dx-task .dx-prompt { margin: 8px 0 10px; white-space: normal; font-size: 16px; }
.dx-opts li { margin: 3px 0; }
.dx-opts li.ok { color: var(--ok, #0f7b3c); font-weight: 700; }
.dx-opts li.chosen { text-decoration: underline; }
.dx-opt { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); margin: 6px 0; cursor: pointer; }
.dx-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.dx-given { background: var(--sunken, #f3f6fa); border-radius: var(--r-sm); padding: 8px 12px; }
.dx-bar { position: sticky; top: 0; z-index: 30; display: flex; gap: 16px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 16px; margin-bottom: 14px; box-shadow: 0 4px 14px rgba(15, 40, 70, .08); }
.dx-time { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand); }
.dx-bar.dx-hurry .dx-time { color: #c0392b; }
@media (max-width: 640px) { .c-headbtns .c-btnlbl { display: none; } }

/* EDScampus: Sprachanruf und Notizbuch im Anruf */
.call-tile .call-avatar { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; }
.call-tile .call-avatar span { width: 96px; height: 96px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 36px; font-weight: 800; display: flex; align-items: center; justify-content: center; transition: box-shadow .15s; }
.call-tile.nocam .call-avatar, .call-tile.novid .call-avatar { display: flex; }
.call-tile.nocam video, .call-tile.novid video { visibility: hidden; }
.call-tile.speaking .call-avatar span { box-shadow: 0 0 0 5px #7fd17f, 0 0 22px #7fd17f; }
.call-tile.speaking { outline: 3px solid #7fd17f; outline-offset: -3px; }
.call-room.with-nb { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; height: calc(100vh - 150px); }
.call-room.with-nb .call-nb { grid-column: 1; grid-row: 1 / span 2; display: block; }
.call-room.with-nb .call-grid { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.call-room.with-nb .call-grid .call-tile { aspect-ratio: 4 / 3; min-height: 0; flex: none; }
.call-room.with-nb .call-bar { grid-column: 2; grid-row: 2; flex-wrap: wrap; }
.call-nb { display: none; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.call-nb iframe { width: 100%; height: 100%; border: 0; display: block; }
.call-btn.on { background: var(--brand); color: #fff; }
@media (max-width: 800px) {
  .call-room.with-nb { grid-template-columns: 1fr; grid-template-rows: 58vh auto auto; height: auto; }
  .call-room.with-nb .call-nb { grid-row: 1; grid-column: 1; }
  .call-room.with-nb .call-grid { grid-column: 1; grid-row: 2; flex-direction: row; }
  .call-room.with-nb .call-grid .call-tile { width: 140px; }
  .call-room.with-nb .call-bar { grid-column: 1; grid-row: 3; }
}
.call-tile:has(.call-avatar).nocam::after, .call-tile:has(.call-avatar).novid::after { content: none; }
.call-room.with-nb .call-grid .call-tile.self { position: relative; right: auto; bottom: auto; width: 100%; max-width: none; min-width: 0; box-shadow: none; border: 0; }

/* EDScampus: Klassenteams in der Teamleiste gruppiert */
.c-group > summary, .c-subgroup > summary { cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-weight: 700; color: var(--ink-2, #3b4a63); list-style: none; }
.c-group > summary::-webkit-details-marker, .c-subgroup > summary::-webkit-details-marker { display: none; }
.c-group > summary::before, .c-subgroup > summary::before { content: '▸'; font-size: 11px; width: 10px; }
.c-group[open] > summary::before, .c-subgroup[open] > summary::before { content: '▾'; }
.c-group > summary { border-top: 1px solid var(--line); margin-top: 6px; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.c-subgroup { margin-left: 8px; }
.c-subgroup > summary { font-size: 13px; padding: 6px 12px; }
.c-group .nbadge, .c-subgroup .nbadge { margin-left: auto; }
.tt-card.tt-link { cursor: pointer; }
.tt-card.tt-link:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c, var(--brand)) 45%, transparent); }
a.tt-subj { color: inherit; text-decoration: none; }
a.tt-subj:hover { text-decoration: underline; }

/* EDScampus: Beurlaubungen – Ansichten, ganze Zeile klickbar, Dialog, Kalender */
.seg a { display: inline-block; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--ink-2, #3b4a63); text-decoration: none; }
.seg a.active { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(15, 40, 70, .15); }
tr.ld-click { cursor: pointer; }
tr.ld-click:hover td { background: color-mix(in srgb, var(--brand) 6%, transparent); }
tr.ld-click:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
dialog.ld-dlg { border: 0; border-radius: var(--r-lg); padding: 22px 24px 10px; width: min(980px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); background: var(--ground, #f4f7fb); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
dialog.ld-dlg::backdrop { background: rgba(15, 35, 60, .45); }
.ld-x { position: sticky; top: 0; float: right; z-index: 2; border: 0; background: var(--surface); border-radius: 50%; width: 36px; height: 36px; font-size: 18px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.ld-full { text-align: right; margin: 6px 0 0; }
.ld-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.ld-name { margin: 0; font-size: 22px; }
.ld-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.ld-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 12px; }
.ld-grid .ld-box { margin-bottom: 0; }
.ld-box h3 { margin: 0 0 8px; font-size: 15px; }
.ld-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
.ld-dl dt { color: var(--muted); font-size: 13px; }
.ld-dl dd { margin: 0; }
.ld-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; }
.ld-fact { background: var(--sunken, #f3f6fa); border-radius: var(--r-sm); padding: 8px 10px; display: flex; flex-direction: column; }
.ld-fact b { font-size: 22px; line-height: 1.1; color: var(--brand); }
.ld-fact span { font-size: 12px; color: var(--muted); }
.ld-fact.warn { background: #fff3e0; }
.ld-fact.warn b { color: #b35c00; }
.ld-exams ul { margin: 4px 0; padding-left: 18px; }
.ld-days { border-collapse: collapse; width: 100%; font-size: 13px; }
.ld-days th { text-align: left; white-space: nowrap; padding: 3px 10px 3px 0; color: var(--muted); font-weight: 600; vertical-align: top; }
.ld-days td { padding: 3px 0; }
.ld-lesson { display: inline-block; background: var(--sunken, #f3f6fa); border-radius: 6px; padding: 1px 6px; margin: 1px 3px 1px 0; }
@media (max-width: 720px) { .ld-grid { grid-template-columns: 1fr; } .ld-facts { grid-template-columns: repeat(3, 1fr); gap: 6px; } .ld-fact { padding: 6px 8px; } .ld-fact b { font-size: 18px; } dialog.ld-dlg { padding: 16px 12px 8px; width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; } }
.cal-nav { display: flex; gap: 10px; align-items: center; }
.cal-month { min-width: 150px; text-align: center; font-size: 17px; }
.lc-wrap { padding: 0; }
.lc { border-collapse: collapse; font-size: 12px; min-width: 100%; }
.lc th, .lc td { border-bottom: 1px solid var(--line); padding: 0; text-align: center; min-width: 24px; height: 30px; }
.lc thead th { font-weight: 600; color: var(--muted); padding: 4px 0; line-height: 1.1; }
.lc thead th span { display: block; font-size: 10px; }
.lc .lc-name { text-align: left; padding: 4px 10px; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; font-weight: 600; font-size: 13px; min-width: 170px; }
.lc .lc-off { background: var(--sunken, #f3f6fa); }
.lc .lc-today { box-shadow: inset 2px 0 0 var(--brand), inset -2px 0 0 var(--brand); }
.lc-bar { display: block; height: 18px; margin: 0 -1px; cursor: pointer; }
.lc-bar.start { margin-left: 3px; border-top-left-radius: 9px; border-bottom-left-radius: 9px; }
.lc-bar.ok { background: #2e9d5b; }
.lc-bar.open { background: #f0a43a; }
.lc-bar:hover { filter: brightness(1.1); }
.lc-key { display: inline-block; width: 14px; height: 10px; border-radius: 5px; vertical-align: middle; margin-left: 8px; }
.lc-key.ok { background: #2e9d5b; } .lc-key.open { background: #f0a43a; }

/* EDScampus: ganze Zeile anklickbar */
table.rowlink tbody tr:has(td a[href]), table.rowlink tr:has(> td a[href]), tr.bk-own { cursor: pointer; }
table.rowlink tr:has(> td a[href]):hover > td, tr.bk-own:hover > td { background: color-mix(in srgb, var(--brand) 6%, transparent); }
tr.bk-own:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.bk-mine { color: var(--brand); font-size: 12px; }
tr.bk-own .bk-miss { text-decoration: underline; }

/* EDScampus: Gesamtqualifikation */
.ab-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.ab-num { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; display: flex; flex-direction: column; }
.ab-num b { font-size: 26px; color: var(--brand); }
.ab-num span { font-size: 12.5px; color: var(--muted); }
.ab-num.bad b { color: #c0392b; }
.ab-table tr.ab-lk td { background: color-mix(in srgb, var(--brand) 5%, transparent); }
.ab-pt { display: inline-block; min-width: 26px; padding: 1px 4px; border-radius: 6px; color: var(--muted); }
.ab-pt.in { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--ink, #1c2a3d); font-weight: 700; }
.ab-pt.low { color: #c0392b; }
.ab-pick { margin-left: 4px; vertical-align: middle; }
.cd-table select { width: 64px; }
.cd-assess td { border-top: 0; padding-top: 0; }
.pm-risk { color: var(--bad, #c0392b); }

/* EDScampus: KOL */
.kol-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0; counter-reset: k; }
.kol-steps li { counter-increment: k; padding: 5px 12px 5px 8px; border-radius: 999px; background: var(--sunken, #eef2f7); font-size: 13px; color: var(--muted); }
.kol-steps li::before { content: counter(k); display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: #fff; text-align: center; font-size: 11px; line-height: 18px; margin-right: 6px; font-weight: 700; }
.kol-steps li.done { background: color-mix(in srgb, var(--ok, #2e9d5b) 16%, var(--surface)); color: var(--ink, #1c2a3d); }
.kol-steps li.done::before { content: '✓'; background: var(--ok, #2e9d5b); color: #fff; }
.kd-grid { border-collapse: collapse; width: 100%; font-size: 13px; }
.kd-grid th, .kd-grid td { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; }
.kd-grid thead th { background: var(--sunken, #f3f6fa); }
.kd-grid tbody th { width: 70px; text-align: left; white-space: nowrap; }
.kd-cell { min-width: 150px; }
.kd-mine { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.kd-conflict, tr.kd-conflict td { background: #fdecea !important; }
.kd-break td, .kd-break th { background: var(--sunken, #f3f6fa); }
@media print { .kd-grid { font-size: 10pt; } }
.k-kol { --k: #6b4fd8; }

/* ===== v0.27 Aufgabentypen aus EDS: sort, highlight, choice, video, drawing, python, speaking ===== */
.lz-sort-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; padding: 10px; border: 2px dashed var(--line-strong); border-radius: var(--r-md); background: var(--sunken); margin: 10px 0; }
.lz-sort-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.lz-sort-cat { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 8px; min-height: 90px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; }
.lz-sort-cat > b { font-family: var(--head); font-size: .95rem; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.lz-sort-cat.is-target { outline: 2px dashed var(--brand); }
.lz-card { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); cursor: grab; user-select: none; line-height: 1.35; box-shadow: var(--shadow); }
.lz-card.is-picked { outline: 3px solid var(--brand); }
.lz-card.dragging { opacity: .5; }
.lz-sort-order .lz-card { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.lz-sort-order .lz-card .pz-move { margin-left: auto; white-space: nowrap; }
.lz-sort-order .lz-card::before { content: attr(data-pos); font-weight: 700; color: var(--muted); min-width: 1.4em; }
.lz-hl-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; align-items: center; }
.lz-hl-bar button[aria-pressed="true"] { outline: 3px solid var(--ink); }
.lz-hl-text { line-height: 1.9; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.lz-hl-text .eds-nr { color: var(--muted); font-size: .8em; user-select: none; display: inline-block; min-width: 2.2em; }
.lz-hl-auto { counter-reset: hlz; }
mark.hl { border-radius: 3px; padding: 1px 0; cursor: pointer; color: inherit; }
.hl-gelb { background: #fff176; } .hl-gruen { background: #a5e8b8; } .hl-blau { background: #b3d9ff; } .hl-rosa { background: #f9c2dc; } .hl-orange { background: #ffd199; }
.lz-hl-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid rgba(0,0,0,.15); }
mark.hl.is-bad { outline: 2px solid var(--bad); }
mark.hl.is-ok { outline: 2px solid var(--ok); }
mark.hl.is-sol { outline: 2px dashed var(--ok); background: transparent; }
mark.hl[data-note]::after { content: '✎'; font-size: .75em; vertical-align: super; color: var(--muted); }
.lz-chs-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.lz-chs-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.lz-chs-opt.is-mine { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.lz-chs-opt.is-full { opacity: .6; }
.lz-chs-opt .grow { flex: 1; }
.lz-video-box { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--r-md); overflow: hidden; }
.lz-video-box > div, .lz-video-box iframe, .lz-video-box video { width: 100%; height: 100%; display: block; border: 0; }
.lz-video-check { margin-top: 10px; border: 2px solid var(--brand); }
.lz-video-check input[type=text] { width: 140px; display: inline-block; margin: 0 4px; }
.lz-draw { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunken); padding: 8px; }
.lz-draw canvas { width: 100%; height: auto; background: #fff; border-radius: var(--r-sm); touch-action: none; display: block; cursor: crosshair; }
.lz-draw-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.lz-draw-bar .sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.lz-draw-bar .sw[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.lz-draw-bar button[aria-pressed="true"]:not(.sw) { background: var(--accent); }
.lz-py-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; tab-size: 4; width: 100%; background: #0f1b2a; color: #e6eef7; border-radius: var(--r-md); padding: 10px; line-height: 1.45; }
.lz-py-out { min-height: 2.5em; max-height: 320px; overflow: auto; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; font-size: 13px; white-space: pre-wrap; }
.lz-py-out .err { color: var(--bad); }
.lz-py-out .ok { color: var(--ok); font-weight: 700; }
.eds-speaking .sp-intro { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eds-speaking .sp-load, .eds-speaking .sp-wifi, .eds-speaking .sp-status, .eds-speaking .sp-talk, .eds-speaking .sp-review, .eds-speaking .card { margin-top: 10px; }
.eds-speaking .sp-wifi { padding: 10px 12px; border-radius: 8px; background: #fffbeb; border-left: 4px solid #d97706; line-height: 1.45; }
.eds-speaking .sp-load-track { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.eds-speaking .sp-load-bar { height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.eds-speaking .sp-load.is-unknown .sp-load-bar { width: 30% !important; animation: sp-wander 1.2s ease-in-out infinite; }
@keyframes sp-wander { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.eds-speaking .sp-status { padding: 8px 12px; border-radius: 8px; background: var(--accent); }
.eds-speaking .sp-status.is-err { background: #fef2f2; color: #991b1b; }
.eds-speaking .sp-chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.eds-speaking .sp-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; line-height: 1.4; }
.eds-speaking .sp-q { align-self: flex-start; background: #f1f5f9; }
.eds-speaking .sp-a { align-self: flex-end; background: #dcfce7; }
.eds-speaking .sp-a.is-pending { background: #f8fafc; color: #64748b; font-style: italic; }
.eds-speaking .sp-a.is-failed { background: #fef2f2; color: #991b1b; }
.eds-speaking .sp-meta { display: block; font-size: 12px; color: #64748b; margin-top: 2px; }
.eds-speaking .sp-note { color: #92400e; background: #fffbeb; padding: 6px 10px; border-radius: 8px; margin: 0; }
.eds-speaking .sp-dock { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
.eds-speaking .sp-orb { --lvl: 0; width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto; background: #cbd5e1; transform: scale(calc(1 + var(--lvl) * .5)); transition: transform .08s, background .2s; }
.eds-speaking .sp-dock[data-state="listening"] .sp-orb { background: #60a5fa; }
.eds-speaking .sp-dock[data-state="speaking"] .sp-orb { background: #ef4444; }
.eds-speaking .sp-dock[data-state="asking"] .sp-orb { background: #a78bfa; }
.eds-speaking .sp-state { display: flex; flex-direction: column; min-width: 160px; flex: 1 1 160px; }
.eds-speaking .sp-state span { font-size: 13px; color: #475569; }
.eds-speaking .sp-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.eds-speaking .sp-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.eds-speaking .sp-item-q { font-weight: 600; }
.eds-speaking .sp-item-a { margin: 4px 0; padding: 6px 10px; background: #f8fafc; border-radius: 8px; }
.eds-speaking .sp-item-a.is-empty { color: #94a3b8; font-style: italic; }
.eds-speaking .sp-item-actions { display: flex; gap: 8px; align-items: center; }
.eds-speaking .sp-type { width: 100%; margin-top: 4px; }
.pz-bericht { border-left: 4px solid var(--brand); padding: 8px 12px; background: var(--sunken); border-radius: var(--r-sm); }
.pz-bericht .bad { color: var(--bad); }
