/* Schulung Betreuer – Lebensfreude, Dein Pflegedienst
   Farben: Oliv & Honig (wie die Firmenwebsite) · Schrift: Poppins, lokal eingebunden (keine Google-Server) */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/poppins-light.woff2") format("woff2"), url("../fonts/poppins-light.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-regular.woff2") format("woff2"), url("../fonts/poppins-regular.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-medium.woff2") format("woff2"), url("../fonts/poppins-medium.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-semibold.woff2") format("woff2"), url("../fonts/poppins-semibold.woff") format("woff"); }

:root {
  --oliv: #2F3326;
  --oliv-text: #3E4234;
  --honig: #B98B3E;
  --honig-hell: #D6B57A;
  --salbei: #6B7A4B;
  --salbei-dunkel: #4F5C36;
  --creme: #F7F3EA;
  --sand: #EFE7D6;
  --weiss: #FFFFFF;
  --hell-text: #F4EFE3;
  --rand: #ECE4D3;
  --fehler: #9E412F;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--oliv-text);
  background: var(--creme);
  min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--oliv); text-underline-offset: 3px; }
a:hover { color: var(--honig); }
h1, h2, h3 { color: var(--oliv); font-weight: 500; line-height: 1.25; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin-bottom: 14px; }
h2 { font-size: clamp(1.3rem, 3.4vw, 1.7rem); margin: 36px 0 12px; }
h3 { font-size: 1.1rem; margin: 26px 0 6px; }
p { margin: 0 0 12px; text-wrap: pretty; }
b, strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--honig); outline-offset: 3px; border-radius: 4px; }
code { background: var(--sand); padding: 1px 6px; border-radius: 6px; font-size: .92em; }

/* Kopfbereich mit Logo */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--weiss); border-bottom: 1px solid var(--rand); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; max-width: 760px; margin: 0 auto; padding: 8px 20px; flex-wrap: wrap; }
.brand img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: .95rem; color: var(--oliv); font-weight: 500; }
.nav a:hover { color: var(--honig); }
.nav form { margin: 0; }
.nav button { margin: 0; min-height: 42px; padding: 0 18px; font-size: .92rem; }
@media (max-width: 560px) { .site-header { position: static; } .brand img { height: 42px; } .header-inner { min-height: 60px; } .nav { gap: 14px; width: 100%; justify-content: space-between; } }

main { flex: 1 0 auto; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; }
.center-logo { max-width: 760px; margin: 0 auto; padding: 36px 20px 0; }
.center-logo img { height: 64px; width: auto; }

/* Formulare */
label { display: block; margin: 16px 0 6px; font-weight: 500; color: var(--oliv); }
input:not([type=radio]):not([type=checkbox]), select {
  width: 100%; padding: 13px 14px; font: inherit; color: var(--oliv-text);
  border: 1.5px solid #D8CFBB; border-radius: 12px; background: var(--weiss);
}
input[type=file] { width: 100%; padding: 10px 0; font: inherit; }

/* Buttons wie auf der Website: Pillenform, Oliv */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; margin-top: 16px; border-radius: 999px;
  border: 2px solid var(--oliv); background: var(--oliv); color: var(--hell-text);
  font: inherit; font-weight: 500; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
button:hover, .btn:hover { background: #454a37; border-color: #454a37; color: var(--hell-text); }
button.sec, .btn.sec { background: transparent; color: var(--oliv); }
button.sec:hover, .btn.sec:hover { background: var(--oliv); color: var(--hell-text); }
button:disabled { opacity: .45; cursor: not-allowed; }

.err { color: var(--fehler); font-weight: 500; }
.ok { color: var(--salbei-dunkel); font-weight: 500; }
.muted { opacity: .8; font-size: .95rem; }

/* Karten, Fortschritt, Hinweise */
.card { background: var(--weiss); border-radius: var(--radius); padding: 22px 22px; margin: 14px 0; border: 1px solid var(--rand); }
.card a.title { font-weight: 500; font-size: 1.1rem; text-decoration: none; color: var(--oliv); }
.card a.title:hover { color: var(--honig); }
/* Ganze Kachel klickbar: Der Link der Überschrift wird über die ganze Karte gespannt (nur ein Link, gut für Tastatur und Screenreader). */
.card.clickable { position: relative; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card.clickable a.title::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.card.clickable:hover { border-color: var(--honig-hell); box-shadow: 0 6px 20px rgba(47,51,38,.08); transform: translateY(-1px); }
.card.clickable:has(a.title:hover) a.title { color: var(--honig); }
.card.clickable:has(a.title:focus-visible) { outline: 3px solid var(--honig); outline-offset: 3px; }
.card.clickable a.title:focus-visible { outline: none; }
.card.clickable form, .card.clickable button { position: relative; z-index: 2; }
.bar { height: 8px; background: var(--sand); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--honig); border-radius: 99px; }
.bar.big { height: 6px; margin-top: 6px; }
.bar.big i { opacity: .85; }
.progress-all { margin: 14px auto; padding: 10px 0; max-width: 520px; background: transparent; border: 0; box-shadow: none; text-align: center; }
.progress-head { display: flex; justify-content: center; align-items: baseline; gap: 10px; font-size: .92rem; }
.progress-head b { font-weight: 500; color: var(--oliv-text); }
.progress-pct { font-weight: 600; color: var(--honig); }
.progress-all p { font-size: .85rem; }
.progress-mini { margin: 0 auto 14px; max-width: 520px; text-align: center; }
.progress-mini .bar { height: 5px; }
.chip { display: inline-block; font-size: .8rem; padding: 2px 12px; border-radius: 99px; background: var(--sand); color: var(--oliv); font-weight: 500; vertical-align: middle; }
.chip.good { background: var(--salbei); color: var(--weiss); }
.callout { background: #FFF6E0; border-left: 4px solid var(--honig); padding: 14px 18px; border-radius: 12px; margin: 20px 0; color: var(--oliv); }
ul { padding-left: 22px; }
li { margin-bottom: 6px; }

/* Video und Audio */
.media { margin: 22px 0; }
.media figcaption { margin-bottom: 8px; color: var(--oliv); }
.media video { width: 100%; max-height: 70vh; border-radius: var(--radius); background: #000; }
.media audio { width: 100%; }
.media-missing { background: var(--sand); border-radius: var(--radius); padding: 22px; text-align: center; }
.transcript { margin-top: 10px; background: var(--weiss); border: 1px solid var(--rand); border-radius: 12px; padding: 10px 16px; }
.transcript summary { cursor: pointer; font-weight: 500; color: var(--oliv); }

.yt-box { background: var(--sand); border-radius: var(--radius); padding: 22px; }
.yt-box p { margin: 0 0 12px; }
.yt-box .btn, .yt-box button { margin-top: 6px; }
.yt-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Fragen */
.q { border: 1px solid var(--rand); border-radius: var(--radius); padding: 22px; margin: 26px 0; background: var(--weiss); }
.q legend { font-weight: 500; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--salbei-dunkel); padding: 0 6px; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid #E2D9C5; border-radius: 14px; margin: 10px 0; background: var(--creme); cursor: pointer; font-weight: 400; color: var(--oliv-text); }
.opt:hover { border-color: var(--honig-hell); }
.opt input { width: auto; margin-top: 6px; accent-color: var(--oliv); }
.opt.right { border-color: var(--salbei); background: #EEF1E4; }
.opt.wrong { border-color: var(--fehler); background: #F8EBE7; }
.fb { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--creme); border: 1px solid var(--rand); }

table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--rand); vertical-align: top; }

/* Fußbereich */
.site-footer { background: #252820; color: #CFC9B8; padding: 28px 20px; font-size: .9rem; }
.site-footer .footer-inner { max-width: 760px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer img { height: 44px; width: auto; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .card.clickable:hover { transform: none; } }

/* Datenschutz */
mark.ph { background: #FFE9A8; color: var(--oliv); padding: 0 .25em; border-radius: 4px; }
.site-footer a { color: inherit; text-decoration: underline; }
.check { display: flex; gap: .6em; align-items: flex-start; margin: 1em 0; }
.check input { width: auto; margin-top: .3em; flex: none; }
.check label { margin: 0; font-weight: 400; }

/* Lernbilder mit Hotspots */
.lernbild { margin: 1.4em 0; }
.lb-stage { position: relative; max-width: 640px; margin: 0 auto; }
.lb-stage img { display: block; width: 100%; height: auto; }
.lernbild figcaption { text-align: center; color: var(--oliv-text); font-size: .9rem; margin-top: .4em; }
.hs-dot { display: none; position: absolute; transform: translate(-50%, -50%); width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%;
  background: var(--weiss); color: var(--oliv); border: 2px solid var(--weiss); box-shadow: 0 2px 8px rgba(47,51,38,.35); font-size: 1.5rem; line-height: 1; font-weight: 600; cursor: pointer; }
.hs-dot.seen { background: var(--salbei-dunkel); color: var(--weiss); }
.hs-dot.on { background: var(--honig); color: var(--weiss); }
.hs-on .hs-dot { display: block; }
.hs-card { max-width: 640px; margin: .8em auto 0; background: var(--weiss); border-bottom: 4px solid var(--honig); border-radius: 10px; box-shadow: 0 4px 16px rgba(47,51,38,.18); padding: 1em 1.2em 1.1em; position: relative; }
.hs-card[hidden] { display: none; }
.hs-card h3 { margin: 0 0 .4em; font-size: 1.15rem; }
.hs-card p { margin: 0; }
.hs-nav { display: flex; justify-content: flex-end; gap: .5em; margin-top: .7em; }
.hs-nav button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; }
.hs-on .hs-list { display: none; }
.hs-list { max-width: 640px; margin: .8em auto 0; }

/* Hauptmenü und Untermenü */
.nav a.on { color: var(--honig); border-bottom: 2px solid var(--honig); }
.subnav { background: var(--creme); border-top: 1px solid var(--rand); }
.subnav-inner { display: flex; gap: 22px; flex-wrap: wrap; max-width: 760px; margin: 0 auto; padding: 8px 20px; }
.subnav a { text-decoration: none; font-size: .9rem; color: var(--oliv-text); padding: 2px 0; }
.subnav a:hover { color: var(--honig); }
.subnav a.on { color: var(--oliv); font-weight: 600; border-bottom: 2px solid var(--honig); }
@media (max-width: 560px) { .nav a { font-size: .9rem; } .site-header { position: static; } }

/* Zertifikat */
.cert-page { background: var(--creme); margin: 0; padding: 16px; }
.cert-tools { max-width: 1000px; margin: 0 auto 12px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cert { max-width: 1000px; margin: 0 auto; background: var(--weiss); border: 3px solid var(--honig); outline: 8px solid var(--weiss); box-shadow: 0 0 0 9px var(--oliv); padding: 40px 48px; text-align: center; }
.cert h1 { font-size: 2.6rem; letter-spacing: .12em; text-transform: uppercase; margin: .3em 0; color: var(--oliv); }
.cert-logo { display: block; margin: 0 auto; height: auto; max-width: 260px; }
.cert-lead { margin: 1em 0 .2em; color: var(--oliv-text); }
.cert-name { font-size: 2rem; font-weight: 600; margin: .1em 0; color: var(--oliv); }
.cert-block { font-size: 1.6rem; font-weight: 600; margin: .1em 0 .4em; color: var(--honig); }
.cert-muted { color: var(--oliv-text); font-size: .9rem; margin: .2em 0; }
.cert-foot { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; margin-top: 2.4em; text-align: left; font-size: .92rem; flex-wrap: wrap; }
.cert-sign { text-align: center; min-width: 220px; }
.cert-line { display: block; border-top: 1px solid var(--oliv); margin-bottom: .3em; height: 46px; border-top: 0; border-bottom: 1px solid var(--oliv); }
.cert-code { text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; }
.cert-code .cert-muted { font-family: "Poppins", system-ui, sans-serif; }
@page { size: A4 portrait; margin: 14mm; }
@page cert { size: A4 landscape; margin: 10mm; }
.cert { page: cert; }
@media print { .no-print { display: none !important; } .cert-page { background: #fff; padding: 0; } .cert { box-shadow: none; outline: 0; } }

/* Mitarbeiterliste */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin: 14px 0; }
.grid-cards .card { margin: 0; padding: 18px; overflow-wrap: anywhere; }
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 14px 0 8px; }
.filterbar input[type=search] { flex: 1 1 260px; margin: 0; }
.filterbar select { flex: 0 1 220px; margin: 0; }
.filterbar input[type=date] { flex: 0 0 auto; width: auto; margin: 0; }
.filterbar button { margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; }
.chips a.chip { text-decoration: none; }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 18px 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; align-items: end; margin-top: 10px; }
details.card > summary { cursor: pointer; }
details.lernstand { margin-top: .5em; font-size: .88rem; }
details.lernstand summary { cursor: pointer; color: var(--oliv-text); }
details.lernstand table { margin-top: .4em; }
details.lernstand th { text-align: left; font-size: .82rem; padding-top: .6em; }
details.lernstand td { padding: 2px 6px 2px 0; }
details.lernstand td:last-child { text-align: right; white-space: nowrap; }

/* Abschnitt bearbeiten */
.item-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; }
.item-sum { flex: 1 1 280px; overflow-wrap: anywhere; }
.item-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item-actions form { margin: 0; }
.item-actions button, .item-actions .btn { min-height: 40px; padding: 0 14px; margin: 0; }
details.del summary { cursor: pointer; padding: 6px 10px; color: var(--fehler); }
details.del form { margin: 6px 0 0; }
textarea { width: 100%; font: inherit; }
.check input:not([type=radio]):not([type=checkbox]) { flex: 1 1 auto; min-width: 0; }
.chip.warn { background: #F3D9CF; color: var(--fehler); }

/* Inhalte-Übersicht */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius); }
table.tbl th { text-align: left; font-size: .85rem; color: var(--oliv-text); padding: 10px 12px; border-bottom: 1px solid var(--rand); background: var(--creme); }
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--rand); vertical-align: top; }
table.tbl tr:last-child td { border-bottom: 0; }
.small { font-size: .85rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; min-width: 220px; }
.row-actions form.inline { margin: 0; }
.row-actions button, .row-actions .btn, .row-actions summary.btn { min-height: 36px; padding: 0 14px; font-size: .88rem; margin: 0; display: inline-flex; align-items: center; cursor: pointer; }
details.act { flex: 1 1 100%; }
details.act summary { list-style: none; display: inline-flex; }
details.act summary::-webkit-details-marker { display: none; }
details.act form { margin-top: 8px; background: var(--creme); padding: 12px; border-radius: 12px; }
.feedback { margin-top: 6px; padding: 8px 12px; background: #FFF6E0; border-left: 4px solid var(--honig); border-radius: 8px; font-size: .88rem; }
details.import summary { cursor: pointer; }
details.import h3 { margin: 1em 0 .4em; font-size: 1.05rem; }
td > .row-actions { min-width: 230px; }

/* Kompakte Tabellen (Zugänge und Rollen) */
table.tight td, table.tight th { padding: 8px 10px; font-size: .92rem; }
table.tight button, table.tight .btn { min-height: 32px; padding: 0 12px; font-size: .84rem; margin: 0; }
table.tight select { min-height: 34px; padding: 0 28px 0 10px; font-size: .88rem; width: auto; margin: 0; }
table.tight form.inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
table.tight .chip { white-space: nowrap; }
.js .role-save { display: none; }
.js .role-save.show { display: inline-flex; align-items: center; }
details.card { padding: 12px 18px; margin: 10px 0; }
details.card > summary { cursor: pointer; }
.grid-form label { font-size: .88rem; margin-top: 8px; }
/* Info-Symbol mit Hilfetext */
.info { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; border: 1.5px solid var(--oliv-text); color: var(--oliv-text); font-size: .75rem; font-weight: 600; cursor: help; vertical-align: middle; background: var(--weiss); }
.info:focus { outline: 2px solid var(--honig); outline-offset: 2px; }
.info-pop { display: none; position: absolute; z-index: 20; top: 26px; left: -10px; width: min(360px, 80vw); padding: 12px 14px; background: var(--weiss); border: 1px solid var(--rand); border-radius: 12px; box-shadow: 0 6px 20px rgba(47,51,38,.2); font-weight: 400; font-size: .85rem; line-height: 1.45; text-align: left; color: var(--oliv-text); }
.info:hover .info-pop, .info:focus .info-pop, .info:focus-within .info-pop { display: block; }
.info-row { display: block; margin-top: 6px; }

/* Dashboard */
.grid-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.grid-tiles .card { margin: 0; padding: 16px 18px; }
.tile .small { margin: .3em 0 0; }
.tile-badges { margin: .6em 0 0; display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 2; pointer-events: none; }
h3.grp { margin: 1.2em 0 .3em; font-size: 1rem; color: var(--oliv-text); text-transform: uppercase; letter-spacing: .06em; }
/* Dashboard: breit, etwa zwei Drittel des Bildschirms */
.grid-tiles.dash { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.grid-tiles .span { grid-column: 1 / -1; margin: .4em 0 0; }
.grid-tiles h2.span { margin-top: 1em; }
.grid-tiles h3.grp.span { margin: .2em 0 0; }
.tile-subs { margin: .5em 0 0; color: var(--oliv-text); }
.tile-group { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--honig); font-weight: 600; margin-bottom: .2em; }
.grid-tiles.dash .tile { min-height: 130px; }

/* Verwaltung: alle Seiten gleich breit, etwa zwei Drittel des Bildschirms (auf kleinen Bildschirmen volle Breite) */
:root { --wide: min(1500px, max(1060px, 68vw)); }
body.admin main, body.admin .header-inner, body.admin .subnav-inner, body.admin .footer-inner { max-width: var(--wide); }
/* Verwaltungskonten: Das Menü ist auf allen Seiten so breit wie auf den Verwaltungsseiten (eine Zeile), der Lerninhalt bleibt mittig und schmal. */
body.staff .header-inner, body.staff .subnav-inner { max-width: var(--wide); }
.nav { gap: 18px; }
/* Einfache Formulare nicht über die ganze Breite ziehen */
body.admin main > form:not(.filterbar):not(.grid-form):not(.inline):not(.wide), body.admin .card > form:not(.grid-form):not(.inline):not(.filterbar), body.admin details > form:not(.grid-form):not(.inline) { max-width: 720px; }
body.admin main > .callout { max-width: 900px; }

/* Mitarbeiter: Auswahl, Gruppen */
.grid-cards .card { position: relative; }
label.sel { position: absolute; top: 14px; right: 14px; margin: 0; }
label.sel input { width: 18px; height: 18px; min-width: 0; }
.chip.grp { background: #E4EAD3; color: var(--salbei-dunkel); }
.bulkbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; padding: 10px 14px; background: var(--weiss); border: 1px solid var(--rand); border-radius: 12px; }
.bulkbar select, .bulkbar input:not([type=checkbox]) { margin: 0; min-height: 36px; width: auto; max-width: 220px; }
.bulkbar button { margin: 0; min-height: 36px; padding: 0 14px; font-size: .88rem; }
.actionsbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.actionsbar form { margin: 0; }
.mig { padding: 8px 0; border-bottom: 1px solid var(--rand); }
.mig:last-of-type { border-bottom: 0; }
details.done summary { cursor: pointer; }
.chip.amber { background: #F6E2B3; color: #6B4A12; }
table.matrix td .chip { white-space: normal; }

/* Unterweisungsprotokoll und Druck */
.protokoll { background: var(--weiss); border: 1px solid var(--rand); border-radius: 12px; padding: 24px 28px; margin: 12px 0; }
.protokoll h2 { margin-top: 0; }
.protokoll table.meta { width: 100%; margin-bottom: 14px; }
.protokoll table.meta th { text-align: left; width: 190px; vertical-align: top; padding: 4px 8px 4px 0; font-weight: 600; }
.protokoll table.meta td { padding: 4px 0; }
.protokoll table.list { width: 100%; border-collapse: collapse; }
.protokoll table.list th, .protokoll table.list td { border: 1px solid var(--oliv-text); padding: 8px 10px; text-align: left; }
.protokoll table.list td.sig { width: 32%; height: 42px; }
.protokoll .sigrow { display: flex; gap: 40px; margin-top: 40px; }
.protokoll .sigrow > div { flex: 1; font-size: .85rem; }
.protokoll .sigrow .line { display: block; border-top: 1px solid var(--oliv); margin-bottom: 4px; height: 36px; border-top: 0; border-bottom: 1px solid var(--oliv); }
@media print {
  .site-header, .subnav, .site-footer, .no-print { display: none !important; }
  body.admin main, main { max-width: none !important; padding: 0 !important; }
  .protokoll { border: 0; padding: 0; }
  .protokoll table.list tr { break-inside: avoid; }
  main > h1 { display: none; }
}

/* Prüfungsmodus */
.exam-timer { position: sticky; top: 8px; z-index: 5; padding: 10px 16px; margin: 12px 0; }
.exam-timer.low { border-color: var(--fehler); background: #F8EBE7; }

/* Wiederherstellungscodes */
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.codes code { font-size: 1.05rem; letter-spacing: .06em; }

/* Vorlesen */
.vorlesen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 18px; padding: 10px 14px; background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius); }
.vorlesen[hidden], .vorlesen [hidden] { display: none; }
.vorlesen button { margin: 0; }
.vorlesen .vl-rate-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.vorlesen .vl-rate { width: auto; margin: 0; min-height: 36px; padding: 4px 28px 4px 10px; }
.vorlesen p { flex: 1 1 100%; margin: 0; }
.reading { background: #FFF4D6; outline: 3px solid #FFF4D6; border-radius: 6px; }

/* Sprachwahl (Flagge mit Auswahlliste) */
.langdd { position: relative; margin: 0; }
.langdd summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 5px 12px; border: 1.5px solid var(--oliv); border-radius: 99px; font-size: .9rem; background: transparent; color: var(--oliv); user-select: none; }
.langdd summary::-webkit-details-marker { display: none; }
.langdd summary:hover { background: var(--sand); }
.langdd[open] summary { background: var(--sand); }
.langdd .flag { display: block; width: 24px; height: 16px; border-radius: 2px; flex: 0 0 auto; }
.langdd .flag-text { display: inline-flex; align-items: center; justify-content: center; font-size: .65rem; font-weight: 600; background: var(--sand); color: var(--oliv); }
.langdd-caret { font-size: .8em; opacity: .7; }
.langdd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 190px; background: var(--weiss); border: 1px solid var(--rand); border-radius: 14px; box-shadow: 0 8px 24px rgba(47,51,38,.18); padding: 6px; margin: 0; }
.langdd-menu ul { list-style: none; margin: 0; padding: 0; }
.langdd-menu button { display: flex; align-items: center; gap: 10px; width: 100%; justify-content: flex-start; margin: 0; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--oliv-text); font-weight: 400; text-align: left; min-height: 0; }
.langdd-menu button:hover { background: var(--sand); color: var(--oliv-text); }
.langdd-menu button[aria-current] { font-weight: 600; background: var(--sand); }
@media (max-width: 560px) { .langdd-name { display: none; } .langdd-menu { left: 0; right: auto; } }

/* Handy: Tabellen der Verwaltung als Karten, nichts läuft nach rechts heraus */
.toast { position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 80; padding: 12px 16px; border-radius: 14px; background: var(--oliv); color: var(--hell-text); box-shadow: 0 8px 24px rgba(47,51,38,.3); font-weight: 500; cursor: pointer; }
.toast.err { background: var(--fehler); }
@media (max-width: 700px) {
  .table-wrap { overflow: visible; }
  table.tbl, table.tbl tbody, table.tbl tr, table.tbl td { display: block; width: 100%; }
  table.tbl { background: transparent; border: 0; border-radius: 0; }
  table.tbl thead { display: none; }
  table.tbl tr { background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 12px; }
  table.tbl td { border: 0; padding: 6px 0; min-width: 0; overflow-wrap: anywhere; }
  table.tbl tr:last-child td { border-bottom: 0; }
  table.tbl td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; opacity: .65; margin-bottom: 2px; }
  td > .row-actions, .row-actions { min-width: 0; }
  table.tbl input:not([type=checkbox]):not([type=radio]), table.tbl select { max-width: 100%; }
  table.tbl td input[size] { width: 100%; }
}

/* Hamburger-Menü (Verwaltungskonten, schmale Bildschirme) */
.nav-toggle { display: none; }
@media (max-width: 900px) {
  html.js-nav body.staff .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 46px; height: 42px; padding: 0 12px; margin: 0; background: transparent; border: 1.5px solid var(--oliv); border-radius: 12px; cursor: pointer; }
  .nav-toggle span { display: block; height: 2px; width: 100%; background: var(--oliv); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .site-header.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  html.js-nav body.staff .site-header:not(.open) .nav,
  html.js-nav body.staff .site-header:not(.open) .subnav { display: none; }
  html.js-nav body.staff .site-header .header-inner { flex-wrap: wrap; }
  html.js-nav body.staff .site-header .nav { flex-direction: column; align-items: stretch; width: 100%; gap: 0; margin-top: 8px; }
  html.js-nav body.staff .site-header .nav > a { padding: 12px 4px; border-bottom: 1px solid var(--rand); font-size: 1rem; }
  html.js-nav body.staff .site-header .nav > a.on { border-bottom: 1px solid var(--rand); border-left: 3px solid var(--honig); padding-left: 10px; }
  html.js-nav body.staff .site-header .nav > .langdd { margin: 12px 0 4px; }
  html.js-nav body.staff .site-header .nav > .langdd .langdd-name { display: inline; }
  html.js-nav body.staff .site-header .nav > .langdd .langdd-menu { left: 0; right: auto; }
  html.js-nav body.staff .site-header .nav > form:last-child { margin: 8px 0 6px; }
  html.js-nav body.staff .site-header .subnav-inner { flex-direction: column; gap: 0; }
  html.js-nav body.staff .site-header .subnav a { padding: 10px 0; border-bottom: 1px solid var(--rand); }
  html.js-nav body.staff .site-header .subnav a.on { border-bottom: 1px solid var(--rand); }
}

/* Untermenü im Hamburger-Menü: unter dem aktiven Eintrag eingerückt statt am Ende */
.nav-sub { display: none; }
@media (max-width: 900px) {
  html.js-nav body.staff .site-header .nav-sub { display: flex; flex-direction: column; margin: 0 0 6px 4px; padding: 4px 0 6px 12px; border-left: 3px solid var(--honig); background: var(--creme); border-radius: 0 12px 12px 0; }
  html.js-nav body.staff .site-header .nav-sub a { padding: 10px 6px; font-size: .95rem; font-weight: 400; color: var(--oliv-text); border-bottom: 1px solid var(--rand); text-decoration: none; }
  html.js-nav body.staff .site-header .nav-sub a:last-child { border-bottom: 0; }
  html.js-nav body.staff .site-header .nav-sub a.on { font-weight: 600; color: var(--oliv); }
  html.js-nav body.staff .site-header .subnav { display: none !important; }
}

/* Vorschau der Claude-Übersetzung: links Deutsch, rechts bearbeitbarer Text */
table.ai-prev { table-layout: fixed; }
table.ai-prev th:first-child, table.ai-prev td:first-child { width: 46px; }
table.ai-prev td { overflow-wrap: anywhere; }
table.ai-prev textarea { width: 100%; min-height: 4.5em; margin: 0; resize: vertical; font-size: .95rem; }
@media (max-width: 700px) { table.ai-prev td:first-child { display: none; } table.ai-prev textarea { min-height: 9em; } }

/* Sprachwahl auf den Anmeldeseiten: rechts über dem Inhalt */
.guest-lang { display: flex; justify-content: flex-end; width: 100%; max-width: 760px; margin: 14px auto 0; padding: 0 20px; }

/* Übersetzungshilfe unter dem deutschen Text */
.hilfe { color: var(--oliv-text); font-size: .93rem; opacity: .9; border-left: 3px solid var(--sand-dark, #E2D9C5); padding-left: 10px; margin: .2em 0 .9em; }
span.hilfe, small.hilfe { display: block; margin: .3em 0 .2em; }
.opt .hilfe { margin: .15em 0 0; flex-basis: 100%; }
.opt { flex-wrap: wrap; }
.hilfe-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; }
.hilfe-bar[hidden] { display: none; }
.hilfe-bar button { margin: 0; min-height: 36px; padding: 0 14px; font-size: .88rem; }
html.hilfe-off .hilfe { display: none; }

/* Hotspot-Editor im Abschnittseditor */
.hs-edit-stage { cursor: crosshair; margin: .6em 0; border: 1px dashed var(--oliv-text, #777); border-radius: 8px; overflow: hidden; max-width: 760px; }
.hs-edit-stage .hs-dot { display: block; width: 34px; min-width: 34px; height: 34px; min-height: 34px; font-size: 1rem; background: var(--honig); color: var(--weiss); cursor: grab; touch-action: none; }
.hs-edit-stage .hs-dot:active { cursor: grabbing; }
.hs-edit-stage .hs-dot.on { background: var(--salbei-dunkel); outline: 3px solid var(--honig); }
.hs-row { display: grid; grid-template-columns: 2.2em 1fr 1fr; gap: .4em .6em; align-items: start; margin: .5em 0; padding: .7em; max-width: 760px; }
.hs-row .hs-num { font-weight: 700; padding-top: .5em; }
.hs-row .hs-xy { display: contents; }
.hs-row .hs-wide { grid-column: 2 / -1; }
.hs-row input, .hs-row textarea { margin: 0; }
.hs-row label { font-size: .85rem; margin: 0 0 .15em; }
.hs-edit.js .hs-xy { display: none; }
.hs-edit.js .hs-row.hs-missing { border-left: 4px solid var(--honig); }

/* Personenverwaltung: Knöpfe ordentlich in einer Reihe, auf Karten unten, kleine Knöpfe statt großer Pillen */
.row-actions form.inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card-actions { margin-top: 12px; align-items: center; min-width: 0; }
.grid-cards .card-actions { gap: 6px; }
.grid-cards .card-actions .btn, .grid-cards .card-actions button { min-height: 36px; padding: 0 10px; font-size: .85rem; }
table.tight .row-actions { min-width: 0; gap: 6px; }
table.tight .row-actions .btn { min-height: 32px; padding: 0 12px; font-size: .84rem; }
.card-actions form.inline, table.tight .row-actions form.inline { display: contents; }

/* Schulungsübersicht: auf dem Desktop breit, kleine Kacheln (vier bis fünf nebeneinander) */
body.katalog main, body.katalog .header-inner, body.katalog .subnav-inner, body.katalog .footer-inner { max-width: var(--wide); }
body.katalog main > .callout { max-width: 900px; }
.grid-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 10px 0 20px; }
.grid-blocks .card { margin: 0; padding: 14px 16px; display: flex; flex-direction: column; min-width: 0; }
.block-tile a.title { font-size: 1.02rem; line-height: 1.3; }
.block-tile .chip { font-size: .72rem; padding: 1px 9px; margin: .35em .25em 0 0; }
.tile-intro { margin: .45em 0 0; font-size: .86rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.block-tile .bar { margin-top: auto; }
.block-tile .tile-intro + .hilfe, .block-tile .hilfe { font-size: .8rem; }
.tile-count { margin: .4em 0 0; }
.block-tile .tile-intro ~ .bar { margin-top: 12px; }

/* Themenseite: Abschnitte als Raster, Ergebnis schmal; Lernseiten etwas breiter */
.grid-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 10px 0 20px; }
.grid-sections .card { margin: 0; padding: 14px 18px; }
body.katalog .result-card { max-width: 760px; }
body.lesen main, body.lesen .footer-inner { max-width: 960px; }
body.lesen:not(.staff) .header-inner, body.lesen:not(.staff) .subnav-inner { max-width: 960px; }
.grid-sections a.title { font-size: 1.02rem; line-height: 1.35; }

/* Handy: Lerntext im Blocksatz und 0,5 pt größer (Silbentrennung, damit die Wortabstände klein bleiben) */
@media (max-width: 700px) {
  body.lesen #lesbar { font-size: calc(17px + 0.5pt); }
  body.lesen #lesbar p:not(.muted):not(.small):not(.hilfe):not(.fb), body.lesen #lesbar li, body.lesen #lesbar .callout {
    text-align: justify; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word;
  }
  body.lesen #lesbar .opt, body.lesen #lesbar figcaption, body.lesen #lesbar .hilfe { text-align: left; hyphens: manual; }
}

.cat-head { font-size: 1.15rem; margin: 22px 0 2px; }
.cat-sub { margin: 0 0 6px; }

/* Startseite: Begrüßung links, alles andere zentriert */
.home-center { text-align: center; }
.home-center .callout { margin-left: auto; margin-right: auto; }
.home-center .grid-blocks .card { text-align: left; }

.pflicht-label { margin: -4px 0 10px; }

/* Piktogramm in den Kacheln der Übersicht, Titelfoto auf der Themenseite */
.tile-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--sand); margin: 0 auto 10px; flex: none; }
.tile-icon img { display: block; }
.block-hero { margin: 4px 0 16px; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.block-hero img { display: block; width: 100%; aspect-ratio: 5 / 2; object-fit: cover; }

/* Texte der Klickpunkte: Zeilenumbrüche und Aufzählungspunkte aus der Inhaltsdatei zeigen */
.hs-card .hs-text, .hs-list .hs-t { white-space: pre-line; }

/* Inhalteliste: Gruppenüberschriften */
.tbl .grp-row th { background: var(--sand); text-align: left; padding: 10px 14px; font-size: 1rem; }
.tbl .grp-row .grp-name { font-weight: 600; color: var(--oliv); margin-right: .6em; }

/* Gesperrte Themenblöcke (Teilnehmer: erst den vorherigen abschließen) */
.block-tile.locked { opacity: .5; filter: grayscale(1); cursor: not-allowed; }
.block-tile.locked .title { color: var(--oliv-text); font-size: 1.02rem; line-height: 1.3; }
.block-tile .lock-note { margin: .3em 0 0; color: var(--oliv-text); }

/* Folien */
.folien-on .folie { display: none; }
.folien-on .folie.on { display: block; }
.folien-bar { height: 4px; background: var(--sand); border-radius: 2px; margin: 0 0 14px; overflow: hidden; }
.folien-bar span { display: block; height: 100%; width: 0; background: var(--salbei); border-radius: 2px; transition: width .25s; }
.folien-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 8px; }
.folien-nav button { margin: 0; }
.folien-nav button[hidden] { visibility: hidden; display: inline-block; }
.folien-nav .fn-pos { color: var(--oliv-text); font-size: .9rem; text-align: center; flex: 1; }
.folie-abschluss[hidden] { display: none; }
@media print { .folien-on .folie { display: block; } .folien-bar, .folien-nav { display: none; } .folie-abschluss[hidden] { display: block; } }

/* Vorlesen: dezent */
.vorlesen { background: none; border: 0; padding: 0; margin: 0 0 10px; justify-content: flex-end; gap: 8px 12px; font-size: .85rem; }
.vorlesen button { background: transparent; color: var(--oliv-text); border: 1px solid var(--rand); min-height: 32px; padding: 3px 14px; font-size: .85rem; font-weight: 400; }
.vorlesen button:hover { background: var(--sand); }
.vorlesen .vl-rate-label { font-size: .85rem; color: var(--oliv-text); }
.vorlesen .vl-rate { min-height: 32px; font-size: .85rem; padding: 2px 26px 2px 8px; }

/* Vorlesen als Lautsprecher-Symbol; das Tempo erscheint beim Darüberfahren oder während des Lesens */
.vorlesen { gap: 6px; }
.vorlesen .vl-play, .vorlesen .vl-stop { display: inline-flex; align-items: center; justify-content: center; width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; border: 0; color: var(--oliv-text); }
.vorlesen .vl-play .ic-pause { display: none; }
.vorlesen .vl-play[data-state="playing"] .ic-speaker { display: none; }
.vorlesen .vl-play[data-state="playing"] .ic-pause { display: inline-flex; }
.vorlesen .vl-play[data-state="playing"] { background: var(--sand); }
.vorlesen .vl-rate-label { display: none; }
.vorlesen:hover .vl-rate-label, .vorlesen:focus-within .vl-rate-label, .vorlesen.vl-active .vl-rate-label { display: inline-flex; }
.vorlesen .vl-stop[hidden] { display: none; }

/* Folien als schwebende Karten, Vorlesen unten rechts an der Karte */
.folien-on { position: relative; }
.folien-on .folie.on { background: #FFFBF1; border-radius: var(--radius); padding: 24px 26px 58px; margin: 6px 0 4px; min-height: 220px;
  box-shadow: 0 14px 34px rgba(47,51,38,.15), 0 3px 8px rgba(47,51,38,.09); border: 1px solid #E6DAC0; }
.folien-on .folie .q { border: 0; box-shadow: none; padding: 0; margin: 0; background: transparent; }
.folien-on .folie > :first-child { margin-top: 0; }
.folien-on .vl-corner { position: absolute; right: 12px; bottom: 10px; margin: 0; z-index: 2; }
.folien-on .vl-corner:hover, .folien-on .vl-corner:focus-within, .folien-on .vl-corner.vl-active { background: var(--weiss); border-radius: 22px; box-shadow: 0 2px 10px rgba(47,51,38,.12); padding: 0 4px 0 12px; }
.folien-nav { margin-top: 26px; }
@media (max-width: 700px) { .folien-on .folie.on { padding: 18px 16px 56px; } }
@media print { .folien-on .folie.on { box-shadow: none; border: 0; padding: 0; } .folien-on .vl-corner { display: none; } }

/* Antwortfelder: Auswahlkreis oben links am Text, Text bricht nie unter den Kreis */
.opt span { flex: 1 1 0; min-width: 0; }
.opt input { flex: none; margin-top: .42em; }
/* Überschriften der Folien mit Abstand zum Text */
.folie h3 { margin: 0 0 .7em; font-size: 1.2rem; }
.folie h3:not(:first-child) { margin-top: 1.4em; }
.folie p, .folie ul { margin-top: 0; }
