/* ==========================================================================
   Lernbar – Design wie Babbelback und Klön-Café (gleiche Farben, Lexend für Überschriften)
   Lexend SemiBold lokal (siehe fonts/schrift.css), Systemschrift für Text,
   EKHN-Lila #5C2483 für Hauptknöpfe, helle Lila-Flächen und Textmarker.
   Teil 1: übernommen aus Babbelback V1.7.0 · Teil 2: Lernbar
   ========================================================================== */

:root {
  --ground: #F8F7F3;
  --surface: #FFFFFF;
  --line: #E6E3DA;
  --line-soft: #EFECE4;
  --line-strong: #DAD6CB;
  --ink: #23253A;
  --brand: #5C2483;        /* EKHN-Lila, ab 1.7.2 für farbige Buttons */
  --brand-hover: #4A1D6A;
  --muted: #5F6275;
  --accent: #DFCDF0;       /* Textmarker, Timer-Warnung – helles EKHN-Lila (ab 1.7.3, vorher Gelb) */
  --t-lila: #EEE6F6;
  --t-lila-2: #F6F1FA;
  --b-lila: #DCCDEB;
  --t-blue: #EAF1FA;
  --t-green: #E8F5EE;
  --t-green-2: #F3FAF6;
  --t-peach: #FCEEE4;
  --t-peach-2: #FDF5EF;
  --pink: #F4A3A8;
  --dot-green: #7CC4A0;
  --dot-peach: #EFA375;
  --ok: #2F7A55;
  --danger: #B3261E;
  --t-danger: #FBE9E7;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Lexend', var(--sans);
  --r-s: 10px; --r-m: 14px; --r-l: 18px; --r-xl: 20px;
  --shadow-s: 0 1px 2px rgba(35,37,58,.04);
  --shadow-m: 0 1px 2px rgba(35,37,58,.04), 0 12px 32px rgba(35,37,58,.06);
  --top: 0px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 16px); }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 .6em; }
a { color: var(--ink); text-underline-offset: 3px; }
code { font-family: ui-monospace, Menlo, monospace; font-size: .88em; background: var(--line-soft); padding: 1px 6px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid #4A6FA5; outline-offset: 2px; }
.display { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.mark { background: linear-gradient(transparent 55%, var(--accent) 55%, var(--accent) 92%, transparent 92%); padding: 0 2px; }

/* ---------- Buttons ---------- */
.btn {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--ground); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-quiet:hover { background: var(--line-soft); }
.btn-danger { color: var(--danger); border-color: #F0C9C5; background: var(--surface); }
.btn-danger:hover { background: var(--t-danger); }
.btn-done { background: var(--t-green); border-color: #CFE9DB; }
.btn-parking { background: var(--t-peach); border-color: #F4D9C6; }
.btn-small { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-big { height: 50px; padding: 0 20px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn svg { flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-col { display: flex; flex-direction: column; gap: 8px; }

/* Pill-Knöpfe auf Karten */
.pill {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 11px;
  border-radius: 999px; border: 1px solid #EDEAE2; background: var(--surface);
}
.pill:hover { border-color: var(--line-strong); }
.pill:disabled { cursor: default; opacity: .7; }
.pill svg { width: 15px; height: 15px; }
.pill.on { background: var(--t-lila); border-color: var(--b-lila); }
.pill.like.on svg path { fill: var(--pink); }
.icon-btn {
  font: inherit; cursor: pointer; width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--muted);
}
.icon-btn:hover { background: var(--line-soft); color: var(--ink); }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
input[type=text], input[type=password], input[type=url], input[type=number], input[type=email], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; width: 100%; min-height: 44px;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-color: #8A93B8; outline: 3px solid rgba(74,111,165,.18); outline-offset: 0; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }
.check small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; margin: 0; }
.msg { border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 16px; }
.msg-ok { background: var(--t-green); }
.msg-error { background: var(--t-danger); color: #7A1B15; }
.msg-info { background: var(--t-lila); }
.badge { display: inline-flex; align-items: center; font-family: var(--sans); font-size: 12.5px; font-weight: 600; padding: 1px 9px; border-radius: 999px; background: var(--line-soft); line-height: 1.6; }
.b-blue { background: var(--t-blue); } .b-green { background: var(--t-green); } .b-peach { background: var(--t-peach); } .b-lila { background: var(--t-lila); }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; flex: none; }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.panel-title { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-title { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; margin: 4px 0; }

/* ==========================================================================
   Einfache Seiten
   ========================================================================== */
.sitebar { background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); }
.sitebar-in { max-width: 1100px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-word { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.sitenav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sitenav > a { text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 10px; color: var(--muted); }
.sitenav > a:hover { background: var(--line-soft); color: var(--ink); }
.sitenav > a[aria-current="page"] { color: var(--ink); background: var(--line-soft); font-weight: 600; }
.sitenav .logout { margin: 0; }
.who { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; font-size: 14px; font-weight: 500; }
.avatar { width: 30px; height: 30px; border-radius: 999px; background: var(--t-green); display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 600; flex: none; color: var(--ink); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px 24px; }
.wrap-narrow { max-width: 520px; margin: 0 auto; }
.page-title { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 4vw, 34px); letter-spacing: -.02em; line-height: 1.2; margin: 0 0 6px; }
.lead { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.hero { text-align: center; padding: 24px 0 8px; }
.hero .logo { margin-bottom: 10px; }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 6vw, 48px); letter-spacing: -.03em; line-height: 1.1; }
.hero p { color: var(--muted); font-size: 17px; margin: 8px 0 0; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* Board-Liste */
.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.board-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.board-row:hover { border-color: var(--line-strong); }
.board-link { display: flex; flex-direction: column; text-decoration: none; flex: 1 1 280px; min-width: 0; }
.board-link strong { font-size: 16px; font-weight: 600; }
.board-link small { color: var(--muted); font-size: 13px; }
.board-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.board-actions form { margin: 0; }
details.more > summary { list-style: none; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] .more-body { display: flex; }
.more-body { display: none; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 10px; width: 100%; }

/* Tabellen (Benutzerverwaltung) */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.list th { text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FCFBF8; }
table.list td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list .person { display: flex; align-items: center; gap: 10px; }
table.list .person small { display: block; color: var(--muted); font-size: 12.5px; }
.row-inactive td { color: var(--muted); }
.row-inactive .avatar { background: var(--line-soft); }
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.actions-cell form { margin: 0; }
.secret { font-family: ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: .04em; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px 14px; display: inline-block; user-select: all; }

/* Textseite (Datenschutz) */
.text-seite { max-width: 780px; }
.text-seite h2 { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -.01em; margin: 36px 0 8px; }
.text-seite h3 { font-size: 16px; font-weight: 700; margin: 22px 0 6px; }
.text-seite p, .text-seite li { font-size: 15.5px; line-height: 1.65; }
.text-seite ul { padding-left: 1.3em; }
.text-seite li { margin-bottom: 6px; }
.text-seite address { font-style: normal; font-size: 15px; line-height: 1.6; margin: 0 0 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); }
.kurz { background: var(--t-lila-2); border: 1px solid var(--b-lila); border-radius: var(--r-l); padding: 20px 24px; margin: 24px 0; }
.kurz h2 { margin: 0 0 6px; }

/* Footer */
.fuss { border-top: 1px solid var(--line); margin-top: 48px; }
.fuss-in { max-width: 1360px; margin: 0 auto; padding: 24px 24px 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; font-size: 13px; color: var(--muted); }
.fuss-in img { width: 200px; height: auto; display: block; }
.fuss-in p { margin: 0; }
.fuss-in a { color: var(--muted); }
.page-simple .fuss-in { max-width: 1100px; }


/* Kommentare */
.comments { border-top: 1px solid var(--line-soft); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.comments-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.comments-head h3 { font-size: 14px; font-weight: 600; }
.comments-head h3 span { font-weight: 400; color: var(--muted); }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment .avatar { width: 30px; height: 30px; font-size: 12px; }
.bubble { background: var(--ground); border-radius: 4px 14px 14px 14px; padding: 8px 12px; min-width: 0; flex: 0 1 auto; }
.comment.is-mine .bubble { background: var(--t-lila-2); }
.bubble p { margin: 0; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble small { font-size: 12px; color: var(--muted); }
.comment-form { display: flex; gap: 10px; align-items: flex-end; }
.comment-form textarea { flex: 1 1 auto; min-width: 0; resize: none; font-size: 14.5px; border-radius: 14px; min-height: 48px; }
.comment-form .btn { height: 46px; }
.card .comments { padding-top: 12px; gap: 10px; }
.card .comment-form { flex-direction: column; align-items: stretch; }
.card .comment-form .btn { height: 38px; align-self: flex-end; }

/* Sammlung */
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; box-shadow: var(--shadow-s); }
.composer textarea { border: 0; padding: 4px 6px; min-height: 52px; font-size: 16px; resize: none; background: transparent; }
.composer textarea:focus { outline: none; }
.composer:focus-within { border-color: #8A93B8; box-shadow: 0 0 0 3px rgba(74,111,165,.15); }
.composer-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.charcount { font-size: 12.5px; color: var(--muted); padding-left: 6px; }
.phase-note { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 12px; background: #EEECE5; }
.segmented button { font: inherit; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(35,37,58,.1); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-s); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(35,37,58,.06); }
.card.is-mine { border-color: var(--b-lila); }
.card.is-new { animation: pop .45s ease-out; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.card-text { margin: 0; font-size: 15.5px; line-height: 1.45; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.card-meta { font-size: 12.5px; color: var(--muted); }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.card-actions .push { margin-left: auto; display: flex; gap: 4px; align-items: center; }

/* ---------- Dialoge ---------- */
.dlg { width: min(480px, calc(100vw - 24px)); padding: 24px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(35,37,58,.22); }
.dlg-wide { width: min(880px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(35,37,58,.35); backdrop-filter: blur(2px); }
.dlg h2 { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.02em; line-height: 1.3; }
.dlg-card-text { margin: 0; font-size: 15px; background: var(--ground); border-radius: 12px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 30vh; overflow: auto; }
.dlg hr { border: 0; border-top: 1px solid var(--line-soft); width: 100%; margin: 4px 0; }
.dlg .btn-row .btn-big { flex: 1 1 140px; }
.invite-grid { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: center; }
.qr-box { margin: 0; flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr-box canvas { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 14px; image-rendering: pixelated; background: #fff; }
.invite-info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.invite-code { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 7vw, 60px); letter-spacing: .04em; line-height: 1.05; margin: 0; font-variant-numeric: tabular-nums; }
.invite-url { font-family: var(--display); font-weight: 600; font-size: 20px; white-space: nowrap; overflow-x: auto; background: var(--ground); border-radius: 12px; padding: 10px 14px; user-select: all; margin: 0 0 6px; width: 100%; }
@media (max-width: 760px) { .invite-url { white-space: normal; overflow-wrap: anywhere; font-size: 17px; } }
.invite-access { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.invite-access b { color: var(--ink); }
.join-panel { max-width: 560px; margin: 28px auto 0; text-align: center; }
.join-panel .panel-title { justify-content: center; }
.join-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.code-input { font-family: var(--display) !important; font-weight: 600; font-size: 30px !important; letter-spacing: .12em; text-align: center; width: 230px !important; height: 60px; border-radius: 14px !important; font-variant-numeric: tabular-nums; }
.join-form .btn-big { height: 60px; }
.login-wrap { max-width: 560px; margin: 20px auto 0; }

/* ---------- Hinweise ---------- */
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 18px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(35,37,58,.25); max-width: calc(100vw - 30px); text-align: center; }
.toast.bad { background: var(--danger); }
.conn { position: fixed; right: 14px; bottom: 14px; z-index: 79; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 6px 12px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   Teil 2: Lernbar (ab V1.0.0)
   ========================================================================== */
.brand-claim { font-size: 13px; color: var(--muted); margin-left: 4px; white-space: nowrap; }
@media (max-width: 560px) { .brand-claim { display: none; } }
.b-grey { background: var(--line-soft); color: var(--muted); }
.warn-text { color: #8A4B12; font-weight: 600; }
.msg-warn { background: #FCEEE4; border: 1px solid #F4D9C6; }
.msg a { color: inherit; font-weight: 600; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.center-panel { text-align: center; margin-top: 24px; }
.center-panel .join-form { margin-top: 18px; }
.lock-big { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 999px; background: var(--t-lila); color: var(--brand); margin-bottom: 10px; }
.stack-s { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form input[type=text], .inline-form input[type=email] { flex: 1 1 260px; width: auto; }
.inline-form select { flex: 0 1 auto; width: auto; }
.new-course { display: flex; flex-direction: column; gap: 10px; }
.new-course .panel-title { margin: 0; }
.code-chip { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .06em; background: var(--t-lila-2); border: 1px solid var(--b-lila); border-radius: 10px; padding: 4px 10px; font-size: 14px; }
.join-list { max-width: 720px; margin: 36px auto 0; display: flex; flex-direction: column; gap: 12px; }
.hero h1 .mark { padding: 0; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Diktieren: Knopf je Feld und gemeinsame Leiste unten ---------- */
.mic { display: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); }
.diktat-ok .mic { display: inline-flex; }
.mic:hover { background: var(--ground); }
.mic:disabled { opacity: .5; cursor: wait; }
.mic.nimmt-auf { background: #B3261E; border-color: #B3261E; color: #fff; animation: rec 1.4s ease-in-out infinite; }
@keyframes rec { 0%, 100% { box-shadow: 0 0 0 0 rgba(179,38,30,.35); } 50% { box-shadow: 0 0 0 6px rgba(179,38,30,0); } }
.diktat-panel { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70;
  width: min(640px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-l);
  box-shadow: 0 18px 48px rgba(35,37,58,.18); padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.diktat-panel[hidden] { display: none; }
.diktat-zeile { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; }
.diktat-zeile .diktat-status { flex: 1 1 200px; }
.diktat-uhr { font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; color: #B3261E; }
.diktat-pegel { width: 90px; height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; display: inline-block; }
.diktat-pegel-balken { display: block; width: 100%; height: 100%; background: var(--ok); transform-origin: left center; transform: scaleX(0); }
.diktat-status { font-size: 14px; margin: 0; }
.diktat-hinweis { font-size: 12px; color: var(--muted); margin: 0; }
.diktat-panel progress { width: 100%; height: 6px; accent-color: var(--brand); }
.diktat-details { font-size: 12.5px; color: var(--muted); }
.diktat-details summary { cursor: pointer; }
.diktat-log { white-space: pre-wrap; font-size: 11.5px; max-height: 160px; overflow: auto; background: var(--ground); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.dlg-list { padding-left: 1.2em; margin: 8px 0 14px; font-size: 14px; }
.dlg-list li { margin-bottom: 4px; }

/* ---------- Bearbeiten (Kursleitung) ---------- */
.crumbs { font-size: 13.5px; color: var(--muted); margin: 0 0 6px; }
.crumbs a { color: var(--muted); }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.meta-line a { color: var(--ink); }
.meta-line svg { flex: none; }
.edit-head { margin-bottom: 18px; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.jump a { font-size: 13.5px; font-weight: 500; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.jump a:hover { border-color: var(--line-strong); }
.edit-grid { display: flex; flex-direction: column; gap: 20px; }
.edit-grid > .panel { scroll-margin-top: 80px; }
.act { margin: 0; display: inline-flex; }
.btn-icon { width: 36px; padding: 0; }
.is-hidden { visibility: hidden; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.mod-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mod-kids > .mod-list { margin: 0 0 0 28px; padding-left: 14px; border-left: 2px solid var(--b-lila); }
.mod-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.mod-row.is-draft .mod-title strong { color: var(--muted); }
.mod-title { display: flex; flex-direction: column; gap: 2px; text-decoration: none; flex: 1 1 260px; min-width: 0; }
.mod-title strong { font-size: 15.5px; }
.mod-title small { font-size: 12.5px; color: var(--muted); }
.add-row { padding-top: 14px; border-top: 1px dashed var(--line); margin-top: 6px; }
.form-grid.add-row { align-items: end; }
.upload-note { grid-column: 1 / -1; }
.ev-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.ev-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.ev-main { display: flex; flex-direction: column; flex: 1 1 240px; min-width: 0; }
.ev-main small { color: var(--muted); font-size: 13px; }
.ev-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--line-soft); white-space: nowrap; }
.k-presence { background: var(--t-peach); } .k-online { background: var(--t-blue); } .k-self { background: var(--t-green); }
details.ev-form > summary, details.add-blk > summary { list-style: none; display: inline-flex; }
details.ev-form > summary::-webkit-details-marker, details.add-blk > summary::-webkit-details-marker { display: none; }
details.ev-form[open] > summary, details.add-blk[open] > summary { background: var(--t-lila); border-color: var(--b-lila); }
details.ev-form > form, details.add-blk > form { margin-top: 14px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-m); }
.zugang-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.zugang-tools input[type=date] { width: auto; min-height: 36px; padding: 4px 10px; }
.team-list { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.team-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.manage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.manage-grid h3 { font-size: 15px; margin: 0 0 4px; }
.manage-grid .hint { margin-bottom: 10px; }

/* Texteditor */
.rte { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); overflow: hidden; }
.rte:focus-within { border-color: #8A93B8; box-shadow: 0 0 0 3px rgba(74,111,165,.18); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line-soft); background: #FCFBF8; }
.rte-btn { font: inherit; font-size: 13px; font-weight: 500; height: 32px; min-width: 32px; padding: 0 9px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; }
.rte-btn:hover, .rte-btn:focus-visible { background: var(--surface); border-color: var(--line); }
.rte-sep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.rte-push { margin-left: auto; }
.rte-area { min-height: 140px; padding: 12px 16px; font-weight: 400; font-size: 15.5px; line-height: 1.6; outline: none; }
.rte-area > :first-child { margin-top: 0; }

/* Inhalte im Modul-Editor */
.blk-list { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 14px; }
.blk { border: 1px solid var(--line); border-radius: var(--r-l); padding: 14px; background: #FDFCFA; scroll-margin-top: 80px; }
.blk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.blk-media { display: grid; grid-template-columns: minmax(140px, 240px) 1fr; gap: 16px; align-items: start; }
.blk-media img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.blk-video img, .video-ph { aspect-ratio: 16 / 9; object-fit: cover; }
.video-ph { display: grid; place-items: center; width: 100%; border-radius: 10px; background: linear-gradient(135deg, var(--t-lila), var(--t-blue)); color: var(--ink); }
.file-ico { color: var(--brand); display: inline-flex; }
.add-blocks { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; padding-top: 16px; border-top: 1px dashed var(--line); }
.add-blocks h3 { width: 100%; font-size: 15px; margin: 0; }
details.add-blk[open] { width: 100%; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.pager .btn span { max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Kursansicht ---------- */
.viewbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin: -8px 0 20px; border-radius: var(--r-m); background: var(--t-lila-2); border: 1px solid var(--b-lila); font-size: 14px; }
.viewbar span { flex: 1 1 240px; }
.course-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 20px; }
.course-hero-text { flex: 1 1 420px; min-width: 0; }
.course-hero .lead { margin: 2px 0 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 24px; overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; font-weight: 600; font-size: 14.5px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.prose { font-size: 16.5px; line-height: 1.7; max-width: 72ch; overflow-wrap: anywhere; }
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 23px; letter-spacing: -.01em; line-height: 1.3; margin: 1.4em 0 .4em; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 1.2em 0 .3em; }
.prose p, .prose ul, .prose ol { margin: 0 0 .9em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .3em; }
.prose blockquote { margin: 0 0 1em; padding: 4px 0 4px 18px; border-left: 4px solid var(--b-lila); color: #3B3E52; }
.prose a { color: var(--brand); font-weight: 500; }
.prose > :first-child { margin-top: 0; }
.course-desc { margin-bottom: 28px; }
.mod-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.mod-cards.is-sub { margin: 10px 0 4px 26px; padding-left: 14px; border-left: 2px solid var(--b-lila); gap: 8px; }
.mod-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-s); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.mod-card:hover { border-color: var(--b-lila); box-shadow: 0 8px 22px rgba(35,37,58,.07); transform: translateY(-1px); }
.mod-num { font-family: var(--display); font-weight: 600; font-size: 15px; min-width: 2.2em; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--t-lila); color: var(--brand); flex: none; }
.mod-name { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; flex: 1 1 auto; min-width: 0; }
.is-sub .mod-name { font-family: var(--sans); font-size: 15.5px; }
.is-sub .mod-num { font-size: 13px; height: 28px; background: var(--line-soft); color: var(--muted); }
.mod-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.mod-go { color: var(--brand); display: inline-flex; }
.mod-card.is-locked { background: #F3F1EC; border-style: dashed; box-shadow: none; color: #8B8E9E; }
.mod-card.is-locked .mod-num { background: #E7E4DC; color: #8B8E9E; }
.mod-card.is-locked.is-preview { color: var(--muted); }
.ev-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ev-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ev-card.is-past { opacity: .62; }
.ev-title { font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; margin: 4px 0 2px; }
.ev-when { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin: 0; }
.ev-desc { font-size: 14.5px; margin: 4px 0; }
.file-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.file-group { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-top: 12px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); text-decoration: none; color: var(--ink); }
.file-row:hover { border-color: var(--b-lila); }
.file-row svg { color: var(--brand); flex: none; }
.file-row span { display: flex; flex-direction: column; min-width: 0; }
.file-row small { color: var(--muted); font-size: 12.5px; }
.access-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 40px; padding-top: 16px; border-top: 1px dashed var(--line); }
.access-note form { margin: 0; }

/* ---------- Modul: Inhalt ---------- */
.module-page { max-width: 860px; }
.module-page.is-wide { max-width: none; }
.blocks { display: flex; flex-direction: column; gap: 0; }
/* Inhalte deutlich voneinander abgrenzen: viel Luft und eine feine Trennlinie zwischen Text, Bild, PDF und Video */
.blocks > * + * { margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--line); }
.fig { margin: 0; }
.fig img { display: block; max-width: 100%; height: auto; border-radius: var(--r-l); border: 1px solid var(--line); background: #fff; }
.fig figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.video { margin: 0; }
.video-start { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-l); overflow: hidden; cursor: pointer; background: var(--ink); aspect-ratio: 16 / 9; }
.video-start img, .video-start .video-ph { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.video-start img { opacity: .9; transition: opacity .2s; }
.video-start:hover img { opacity: 1; }
.video-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 999px; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .15s; }
.video-play svg { margin-left: 4px; }
.video-start:hover .video-play, .video-start:focus-visible .video-play { transform: scale(1.06); }
.video-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-l); background: #000; }
.video figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; font-size: 15px; }
.sub-mods { margin-top: 36px; }
.sub-mods .mod-cards.is-sub { margin-left: 0; padding-left: 0; border: 0; }
.exchange-cta { display: flex; align-items: center; gap: 14px; margin-top: 36px; padding: 18px 20px; border-radius: var(--r-l); background: var(--t-lila-2); border: 1px solid var(--b-lila); text-decoration: none; color: var(--ink); }
.exchange-cta:hover { background: var(--t-lila); }
.exchange-cta > svg:first-child { color: var(--brand); flex: none; }
.exchange-cta span { display: flex; flex-direction: column; flex: 1 1 auto; }
.exchange-cta small { color: var(--muted); }

/* ---------- Modul: Austausch ---------- */
.xboard { display: flex; flex-direction: column; gap: 16px; }
.composer { max-width: 760px; margin: 0; }
.composer-row { flex-wrap: wrap; }
.composer-tools { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.name-field input { min-height: 38px; height: 38px; padding: 6px 12px; font-size: 14px; width: 220px; }
.xboard-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.inline-check { font-size: 13.5px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.xcards { columns: 300px auto; column-gap: 16px; }
.xcards > .empty { column-span: all; }
.xcard { break-inside: avoid; margin: 0 0 16px; background: #FFFDF6; border: 1px solid #EFE7CF; border-radius: 6px 6px 16px 6px; padding: 16px 16px 12px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: 0 1px 2px rgba(35,37,58,.05), 0 8px 18px rgba(35,37,58,.05); }
.xcard:nth-child(3n+2) { background-color: #F7FBFF; border-color: #DCE8F5; }
.xcard:nth-child(3n) { background-color: #F7FCF9; border-color: #D8EEE1; }
.xcard.is-mine { outline: 2px solid var(--b-lila); outline-offset: -1px; }
.xcard.is-lead { border-top: 4px solid var(--brand); }
.xcard.is-hidden { opacity: .55; background-image: repeating-linear-gradient(45deg, transparent 0 8px, rgba(35,37,58,.04) 8px 16px); }
.xcard .card-text { line-height: 1.5; }
.pill.is-on { background: #FDECEE; border-color: #F4A3A8; color: #B3261E; }
.pill-danger { color: var(--danger); }
.card-actions .push { margin-left: auto; display: flex; gap: 4px; }
.comments { padding-top: 10px; gap: 10px; }
.comments[hidden] { display: none; }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.comment .bubble { background: rgba(255,255,255,.85); }
.comment .bubble small { display: block; }
.comment-form { flex-direction: column; align-items: stretch; gap: 8px; }
.comment-form textarea { min-height: 44px; }
.comment-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.toast[hidden] { display: none; }

/* ---------- Handy ---------- */
@media (max-width: 760px) {
  .wrap { padding: 22px 16px 16px; }
  .sitebar-in { padding: 10px 16px; }
  .who-name { display: none; }
  .blk-media { grid-template-columns: 1fr; }
  .mod-row { padding: 10px 12px; }
  .mod-kids > .mod-list, .mod-cards.is-sub { margin-left: 10px; }
  .mod-card { padding: 14px; gap: 10px; }
  .mod-name { font-size: 16px; }
  .name-field, .name-field input { width: 100%; }
  .composer-tools { width: 100%; justify-content: flex-end; }
  .xcards { columns: 1; }
  .course-hero .btn { width: 100%; }
}
@media print {
  .sitebar, .tabs, .jump, .pager, .viewbar, .composer, .xboard-tools, .card-actions, .comment-form, .access-note, .mic, .diktat-panel { display: none !important; }
  body { background: #fff; }
}

input[type=file] { font: inherit; font-size: 14px; font-weight: 400; padding: 8px 0; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; height: 36px; padding: 0 12px; margin-right: 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; }

/* ---------- Modulstatus (1.1.0): Entwurf blau, aktiv grün, geschlossen dunkles Orange – weiße Schrift, Kontrast mindestens 4,5 : 1 ---------- */
.st { display: inline-flex; align-items: center; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 10px; border-radius: 999px; color: #fff; line-height: 1.6; white-space: nowrap; }
.st-draft { background: #1F65A6; } .st-active { background: #23773A; } .st-closed { background: #A64B0A; }
.st-big { font-size: 13.5px; padding: 4px 14px; }
.mod-row { border-left-width: 6px; }
.mod-row.is-draft { border-left-color: #1F65A6; background: #F6F9FD; }
.mod-row.is-active { border-left-color: #23773A; }
.mod-row.is-closed { border-left-color: #A64B0A; background: #FDF8F4; }
.mod-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.mod-when { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.mod-head-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 8px; }
.mod-head-status .mod-when { font-size: 14px; }
.mod-status-form { gap: 6px; }
.mod-status-form select { min-height: 34px; height: 34px; padding: 0 10px; font-size: 13.5px; width: auto; }
.st-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.st-pick legend { font-size: 13.5px; font-weight: 600; margin: 0 0 6px; padding: 0; }
.form .st-opt { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; row-gap: 4px; flex: 1 1 190px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-m); cursor: pointer; font-weight: 500; }
.st-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.st-opt .st { justify-self: start; }
.st-opt small { grid-column: 2; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.st-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mod-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px; margin: 4px 0 20px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.mod-info p { margin: 0; }
.mod-info .mod-head-status { margin: 0; }
.mod-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; font-family: var(--sans); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.mod-card.is-locked .mod-sub .ev-kind { opacity: .8; }

/* Pflicht/freiwillig (1.2.0): bewusst ohne Statusfarben, damit es nicht mit Entwurf/aktiv/geschlossen verwechselt wird */
.duty { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; line-height: 1.6; white-space: nowrap; }
.duty-yes { border: 1.5px solid var(--ink); color: var(--ink); background: var(--surface); }
.duty-no { border: 1.5px dashed var(--line-strong); color: var(--muted); background: var(--surface); }
/* mehr Luft zwischen Erklärtext und erster Veranstaltung */
#module > .hint { margin-bottom: 24px; }

/* Reiter Inhalt | Austausch (1.3.0): als große, gut sichtbare Schaltflächen */
.tabs.tabs-mod { gap: 8px; padding: 6px; margin: 4px 0 28px; border: 1px solid var(--b-lila); border-radius: var(--r-l); background: var(--t-lila-2); }
.tabs.tabs-mod a { flex: 1 1 0; justify-content: center; gap: 8px; padding: 13px 18px; margin: 0; border: 0; border-radius: 12px; font-size: 16px; color: var(--brand); background: transparent; }
.tabs.tabs-mod a:hover { background: var(--t-lila); color: var(--brand-hover); }
.tabs.tabs-mod a[aria-current="page"] { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(92,36,131,.25); }
.tabs.tabs-mod a[aria-current="page"] .badge { background: #fff; color: var(--brand); }
.tabs.tabs-mod a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
/* Trennlinien durchgehend: Textblöcke selbst volle Breite, die Lesebreite gilt nur für ihren Inhalt */
.blocks > .prose { max-width: none; }
.blocks > .prose > * { max-width: 72ch; }

/* ===== 1.4.0 ===== */
/* Veranstaltungsliste (Bearbeiten): mehr Luft, Verschieben per Ziehgriff */
.mod-list { gap: 16px; }
.mod-row { padding: 16px 18px 16px 10px; gap: 10px 16px; flex-wrap: nowrap; }
.mod-row .mod-actions { flex: 0 1 auto; }
.mod-kids > .mod-list { margin-top: -4px; }
.drag-handle { flex: none; align-self: stretch; display: grid; place-items: center; width: 30px; min-height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: grab; touch-action: none; }
.drag-handle:hover { background: var(--line-soft); color: var(--ink); }
.drag-handle:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; color: var(--brand); }
.mod-row.is-dragging { box-shadow: 0 12px 30px rgba(35,37,58,.18); border-color: var(--brand); position: relative; z-index: 2; }
.mod-row.is-dragging .drag-handle { cursor: grabbing; color: var(--brand); }
body.is-sorting, body.is-sorting * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.drag-hint { margin: 0 0 12px; }
@media (max-width: 760px) { .mod-row { flex-wrap: wrap; } .mod-row .mod-actions { flex: 1 1 100%; } }

/* Neue Veranstaltung / Veranstaltungsdaten: Titel, Art, Teilnahme, Einordnung nebeneinander */
.mod-add { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: end; }
.mod-add label { display: flex; flex-direction: column; margin: 0; }
@media (min-width: 900px) {
  .mod-add { grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) auto; }
  .form-grid.mod-kopf { grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); }
  .mod-add select, .mod-kopf select { font-size: 14px; padding-left: 10px; padding-right: 28px; text-overflow: ellipsis; }
}

/* Inhaltsseite so breit wie der Austausch; Textblöcke nutzen die volle Breite */
.blocks > .prose > * { max-width: none; }
/* Zwischen Videobeschreibung und Trennlinie zusätzlich ungefähr zwei Leerzeilen */
.video { padding-bottom: 48px; }
/* Videos: auf dem Desktop zwei nebeneinander, darunter jeweils eine durchgehende Trennlinie */
.video-row { display: grid; grid-template-columns: 1fr; }
.video-row > * + * { margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .video-row { grid-template-columns: 1fr 1fr; column-gap: 32px; align-items: start; }
  .video-row > * + * { margin-top: 0; padding-top: 0; border-top: 0; }
}

/* Unten in der Veranstaltung nur der Weg zurück */
.pager.pager-back { justify-content: center; }

/* ---------- 1.5.0: Abstand Zugangslink, Austausch-Zähler mit „neu“, Video-Platzhalter, Materialpool mit Download ---------- */
.mod-info { gap: 8px; }
.mod-info .ev-desc { margin-top: 4px; }
.mod-info .mod-link { margin-top: 14px; }

.act-count { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.new-pill { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: #F5A06A; color: #3A1A05; font-size: 12.5px; font-weight: 700; line-height: 1.6; white-space: nowrap; text-decoration: none; }
.new-pill-big { font-size: 13px; padding: 4px 12px; margin: 0; }
a.new-pill:hover { background: #EE8B4C; }
.panel-title .new-pill { font-family: var(--sans); letter-spacing: 0; }
.mod-act { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.mod-act .act-count { margin-left: 4px; }
.tabs.tabs-mod a .new-pill { margin-left: 2px; }
.btn-fresh { border-color: #F5A06A; background: #FDF1E8; }
.btn-fresh:hover { background: #FBE3D2; }
.mod-card .mod-meta { gap: 6px; }

.video-start { background: var(--t-lila); }
.video-start .video-ph { display: grid; place-items: end start; padding: 18px 20px; box-sizing: border-box;
  background: radial-gradient(circle at 85% 20%, rgba(255,255,255,.55) 0 18%, transparent 19%), linear-gradient(135deg, var(--t-lila) 0%, var(--b-lila) 100%); }
.video-ph-title { max-width: 70%; text-align: left; font-family: var(--display); font-weight: 600; font-size: clamp(15px, 2.2vw, 20px); line-height: 1.3; color: var(--brand); }
.video-ph-edit { display: grid; place-items: center; align-content: center; gap: 6px; aspect-ratio: 16 / 9; border-radius: var(--r-m); background: linear-gradient(135deg, var(--t-lila) 0%, var(--b-lila) 100%); color: var(--brand); }
.video-ph-edit small { font-size: 12.5px; color: var(--muted); }
.thumb-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 10px; }
.thumb-own { flex: 1 1 100%; }
.thumb-own[open] summary { margin-bottom: 10px; }
.thumb-own summary { list-style: none; display: inline-flex; }
.thumb-own summary::-webkit-details-marker { display: none; }

.file-item { display: flex; align-items: center; gap: 10px; }
.file-item .file-row { flex: 1 1 auto; min-width: 0; }
.file-dl { flex: none; }
.file-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex: none; background: var(--line-soft); }
.mat-hint { margin: 0 0 10px; }
@media (max-width: 560px) { .file-item { flex-wrap: wrap; } .file-dl { margin-left: auto; } }

/* ---------- 1.5.2: Kursreiter „Veranstaltungen“ / „Material“ als farbige Knöpfe ---------- */
.tabs.tabs-course { gap: 10px; border-bottom: 0; margin: 4px 0 26px; padding: 2px; overflow: visible; flex-wrap: wrap; }
.tabs.tabs-course a { gap: 8px; padding: 10px 18px; margin: 0; border: 1px solid var(--b-lila); border-radius: 12px; background: var(--t-lila-2); color: var(--brand); font-size: 15px; transition: background .15s, box-shadow .15s; }
.tabs.tabs-course a:hover { background: var(--t-lila); color: var(--brand-hover); }
.tabs.tabs-course a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(92,36,131,.25); }
.tabs.tabs-course a .badge { background: #fff; color: var(--brand); }
.tabs.tabs-course a[aria-current="page"] .badge { background: rgba(255,255,255,.92); }
.tabs.tabs-course a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
/* 1.5.3: Knöpfe neben Material-Einträgen gleich breit, damit die Zeilen bündig sind */
.file-item .file-dl { min-width: 172px; justify-content: center; }
@media (max-width: 560px) { .file-item .file-dl { min-width: 0; } }
