/* Schrift: Sparkassen-Hausschrift, wenn installiert; sonst die mitgelieferte humanistische Open Sans
   (Apache-2.0, app/static/fonts/LICENSE-OpenSans.txt) – auf allen Geräten gleich, auch im PDF. */
@font-face { font-family: "Protty Sans"; src: url(/static/fonts/OpenSans-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Protty Sans"; src: url(/static/fonts/OpenSans-Semibold.ttf) format("truetype"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Protty Sans"; src: url(/static/fonts/OpenSans-Bold.ttf) format("truetype"); font-weight: 700 800; font-display: swap; }
/* Farbschema angelehnt an das Sparkassen-Rot (HKS 13 ≈ #FF0000); kein offizielles Logo, keine Hausschrift. */
:root {
  --red: #FF0000; --red-brand: #FF0000; --red-dark: #C40000; --red-soft: #FFF0F0; --ink: #1A1A1A; --text: #333333; --grey: #6B6B6B;
  --line: #E3E3E3; --bg: #F4F4F4; --card: #FFFFFF; --ok: #1E7B34; --ok-soft: #E6F4E9; --warn: #9A5B00; --warn-soft: #FFF4DC;
  --info: #1D4E89; --info-soft: #E8F0FA; --radius: 14px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  --tabbar-h: 64px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }
a { color: var(--red-dark); }
h1 { font-size: 1.55rem; line-height: 1.2; margin: .3rem 0 .9rem; color: var(--ink); letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 .7rem; color: var(--ink); }
h3 { color: var(--ink); }
p { line-height: 1.5; }

/* Kopfzeile */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--red); color: #fff; padding-top: env(safe-area-inset-top); }
.topbar-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .7rem 16px; }
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: #fff; display: grid; place-items: center; flex: none; }
.logo::before { content: ""; width: 12px; height: 18px; border-radius: 6px; border: 3px solid var(--red); border-bottom-width: 3px; }
.brand-text { font-weight: 700; font-size: 1.05rem; line-height: 1.1; display: flex; flex-direction: column; }
.brand-text small { font-weight: 600; font-size: .8rem; }
.nav-top { margin-left: auto; display: flex; gap: .25rem; align-items: center; }
.nav-top a, .nav-logout { color: #fff; text-decoration: none; font-weight: 600; padding: .5rem .8rem; border-radius: 999px; background: none; border: 0; font: inherit; cursor: pointer; }
.nav-top a.active, .nav-top a:hover, .nav-logout:hover { background: rgba(255,255,255,.18); }
.netbar { background: #222; color: #fff; font-size: .82rem; text-align: center; padding: .45rem 16px; }

/* Untere Navigation (Handy) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .72rem; font-weight: 600; color: var(--grey); text-decoration: none; }
.tabbar a.active { color: var(--red); }
.ti { width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--i) center/contain no-repeat; mask: var(--i) center/contain no-repeat; }
.ti-list { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v2H4zm0 6h16v2H4zm0 6h10v2H4z'/%3E%3C/svg%3E"); }
.ti-phone { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8 1.5h8A2.5 2.5 0 0 1 18.5 4v16a2.5 2.5 0 0 1-2.5 2.5H8A2.5 2.5 0 0 1 5.5 20V4A2.5 2.5 0 0 1 8 1.5zM7.5 5v13h9V5zm3 14.6h3v1.4h-3z'/%3E%3C/svg%3E"); }
.ti-doc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h8l6 6v14H6zm7 1.5V9h5.5zM8 12h8v1.6H8zm0 4h8v1.6H8z'/%3E%3C/svg%3E"); }
.tab-rec { margin-top: -26px; }
.rec-btn { width: 62px; height: 62px; border-radius: 50%; background: var(--red); display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(255,0,0,.35); border: 4px solid #fff; }
.rec-btn span { width: 20px; height: 20px; border-radius: 50%; background: #fff; }
@media (min-width: 768px) { .tabbar { display: none !important; } body { padding-bottom: 32px; } }
@media (max-width: 767px) { .nav-top a { display: none; } }

/* Layout & Karten */
main { max-width: 960px; margin: 0 auto; padding: 18px 16px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card.click { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.card.click:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 8px 22px rgba(0,0,0,.08); }
.card.click:active { transform: scale(.99); }
.row { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--grey); font-size: .92rem; }
.small { font-size: .8rem; }
.back { display: inline-flex; align-items: center; gap: .3rem; color: var(--grey); text-decoration: none; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.back::before { content: "‹"; font-size: 1.4rem; line-height: 1; }

/* Startseite */
.hero { background: linear-gradient(135deg, #F00000 0%, #C40000 100%); color: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; box-shadow: var(--shadow); }
.hero h1 { color: #fff; margin: 0 0 .25rem; font-size: 1.35rem; }
.hero p { margin: 0; opacity: .92; font-size: .95rem; }
.hero .actions { margin: 0; }
.hero .btn.primary { background: #fff; color: var(--red-dark); }
.hero .btn.ghost { background: rgba(255,255,255,.16); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 8px; }
.stat { background: var(--card); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.45rem; color: var(--ink); }
.stat span { font-size: .78rem; color: var(--grey); }
.m-title { font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.m-meta { margin-top: .45rem; }
.empty { text-align: center; padding: 2rem 1rem; color: var(--grey); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; background: #EFEFEF; color: #444; white-space: nowrap; }
.chip.l1 { background: #EFEFEF; } .chip.l2 { background: var(--red-soft); color: var(--red-dark); } .chip.l3 { background: var(--red); color: #fff; }
.chip.entwurf { background: var(--warn-soft); color: var(--warn); } .chip.freigegeben { background: var(--ok-soft); color: var(--ok); }
.chip.fehler, .chip.blockiert { background: #2B2B2B; color: #fff; } .chip.lauf { background: var(--info-soft); color: var(--info); }

/* Schaltflächen & Formulare */
button, .btn, input, textarea, select { font-family: inherit; }
button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: .75rem 1.25rem; cursor: pointer; background: #ECECEC; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; transition: background .15s ease; }
button:hover, .btn:hover { background: #E2E2E2; }
button.primary, .btn.primary { background: var(--red); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--red-dark); }
button.danger { background: #fff; color: var(--red-dark); border: 1px solid #F3C2C2; }
button.small, .btn.small { min-height: 34px; padding: .35rem .8rem; font-size: .85rem; }
button:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
.actions.sticky { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); background: rgba(244,244,244,.94);
  backdrop-filter: blur(8px); padding: .6rem 0; margin-bottom: 0; z-index: 5; }
@media (min-width: 768px) { .actions.sticky { bottom: 0; } }
label { display: block; font-weight: 600; color: var(--ink); margin: 1rem 0 .4rem; font-size: .95rem; }
.field-hint { font-weight: 400; color: var(--grey); font-size: .82rem; }
input[type=text], input[type=password], input[type=url], textarea, select { width: 100%; font: inherit; font-size: 16px; padding: .75rem .85rem; border: 1px solid #D0D0D0;
  border-radius: 10px; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,0,0,.15); }
textarea { min-height: 6rem; resize: vertical; line-height: 1.45; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-weight: 500; }
.check input { margin-top: .15rem; width: 1.25rem; height: 1.25rem; accent-color: var(--red); flex: none; }
.levels { display: grid; gap: .55rem; }
.level { border: 2px solid var(--line); border-radius: 12px; padding: .75rem .9rem; margin: 0; cursor: pointer; display: flex; gap: .7rem; align-items: flex-start; font-weight: 500; }
.level:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.level input { accent-color: var(--red); margin-top: .2rem; }
.level b { display: block; color: var(--ink); }
.notice { border-radius: 10px; padding: .75rem .9rem; font-size: .9rem; margin: .8rem 0; line-height: 1.45; }
.notice.consent { background: var(--red-soft); color: var(--ink); }
.notice.info { background: var(--info-soft); color: var(--info); }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.dark { background: #2B2B2B; color: #fff; }
.drop { border: 2px dashed #CFCFCF; border-radius: 12px; padding: 1.2rem; text-align: center; color: var(--grey); background: #FAFAFA; }

/* Anmeldung */
.login { max-width: 420px; margin: 6vh auto 0; }
.login .card { padding: 26px 24px; }
.login .logo-big { width: 64px; height: 64px; border-radius: 18px; background: var(--red); display: grid; place-items: center; margin-bottom: 1rem; }
.login .logo-big::before { content: ""; width: 18px; height: 28px; border-radius: 9px; border: 4px solid #fff; }

/* Aufnahme */
.recorder { text-align: center; padding: 1.6rem 1rem 1.2rem; }
.rec-ring { width: 150px; height: 150px; border-radius: 50%; margin: 1.2rem auto .8rem; display: grid; place-items: center;
  background: radial-gradient(circle, var(--red-soft) 0 60%, transparent 61%); position: relative; }
.rec-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255,0,0,.25); transform: scale(var(--lvl, 1)); transition: transform .08s linear; }
.rec-ring span { width: 76px; height: 76px; border-radius: 50%; background: var(--red); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); } }
.timer { font-size: 3rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.meter { display: flex; gap: 3px; justify-content: center; align-items: flex-end; height: 36px; margin: .6rem 0; }
.meter i { width: 5px; border-radius: 3px; background: var(--red); opacity: .8; height: 4px; transition: height .08s linear; }
.stop-btn { width: 100%; max-width: 320px; min-height: 56px; font-size: 1.05rem; }
.progress { height: 6px; background: #EEE; border-radius: 3px; overflow: hidden; margin-top: .6rem; }
.progress span { display: block; height: 100%; background: var(--red); transition: width .3s; }

/* Status-Schritte */
.steps { display: flex; gap: 4px; margin: 1rem 0 .4rem; }
.steps div { flex: 1; text-align: center; font-size: .68rem; color: var(--grey); font-weight: 600; }
.steps div::before { content: ""; display: block; height: 5px; border-radius: 3px; background: #DDD; margin-bottom: .35rem; }
.steps div.done::before { background: var(--red); }
.steps div.now { color: var(--red-dark); }
.steps div.now::before { background: linear-gradient(90deg, var(--red) 0 50%, #DDD 50%); background-size: 200% 100%; animation: flow 1.2s linear infinite; }
@keyframes flow { to { background-position: -100% 0; } }

/* Tabs */
.tabs { display: flex; gap: .3rem; margin: 1.1rem 0 1rem; overflow-x: auto; background: #E9E9E9; border-radius: 999px; padding: 4px; }
.tabs button { flex: 1; min-height: 38px; background: none; padding: .45rem .9rem; color: var(--grey); white-space: nowrap; }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* Protokoll & Transkript */
.doc .sec { margin-bottom: 1.2rem; }
.doc .sec h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--red-dark); margin: 0 0 .4rem; }
.doc ul { margin: 0; padding-left: 1.2rem; } .doc li { margin: .25rem 0; line-height: 1.45; }
.doc p { margin: 0; }
.doc-head { border-bottom: 1px solid var(--line); padding-bottom: .8rem; margin-bottom: 1rem; }
.doc-head h2 { margin: 0 0 .2rem; font-size: 1.2rem; }
table.grid { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); padding: .5rem .45rem; text-align: left; vertical-align: top; }
table.grid th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--grey); }
table.grid input { width: 100%; border: 1px solid transparent; border-radius: 6px; font: inherit; padding: .35rem; background: #FAFAFA; }
table.grid input:focus { border-color: var(--red); outline: none; background: #fff; }
.ref { font-size: .7rem; font-weight: 700; background: #F0F0F0; color: #555; border-radius: 5px; padding: .05rem .35rem; text-decoration: none; vertical-align: 1px; }
a.ref:hover { background: var(--red-soft); color: var(--red-dark); }
.seg { display: grid; grid-template-columns: auto 1fr; gap: .2rem .7rem; padding: .7rem 0; border-bottom: 1px solid #F0F0F0; }
.seg:last-child { border-bottom: 0; }
.seg .who { font-weight: 700; color: var(--ink); }
.seg .t { grid-column: 2; line-height: 1.5; }
.seg.hl { background: var(--warn-soft); border-radius: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff; grid-row: span 2; }
.speaker-row { display: grid; grid-template-columns: 32px 1fr; gap: .7rem; align-items: center; margin: .55rem 0; }
.kv { display: grid; grid-template-columns: minmax(110px, 32%) 1fr; gap: .55rem 1rem; }
.kv dt { color: var(--grey); font-size: .88rem; } .kv dd { margin: 0; color: var(--ink); }
.tpl-sections { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.sec-row { display: grid; grid-template-columns: 1fr 9.5rem 44px; gap: .5rem; margin: .45rem 0; }
@media (max-width: 480px) { .sec-row { grid-template-columns: 1fr 7.5rem 44px; } .stats { gap: 6px; } .hero { padding: 16px; } }

#toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto;
  background: #1F1F1F; color: #fff; padding: .85rem 1.1rem; border-radius: 12px; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
#print-area { display: none; }
.spinner { display: inline-block; width: .95rem; height: .95rem; border: 2px solid rgba(0,0,0,.15); border-top-color: currentColor; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  body { background: #fff; padding: 0; } .topbar, main, #toast, .tabbar { display: none !important; }
  #print-area { display: block; font-size: 11pt; color: #000; } #print-area .ref { background: none; padding: 0; }
}
.actions.sticky { flex-wrap: nowrap; gap: .45rem; }
.actions.sticky > * { padding: .6rem .85rem; white-space: nowrap; font-size: .92rem; min-width: 0; }
.logo::before { box-shadow: 0 8px 0 -5px var(--red); }

/* Nach UX-Prüfung 23.11.2026 */
button.small, .btn.small { min-height: 44px; }
.tabs button { min-height: 44px; }
a.ref { padding: .3rem .45rem; margin: -.25rem 0; display: inline-block; }
:focus-visible { outline: 3px solid #1D4E89; outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
/* Kontrollkästchen, Optionsfelder und Auswahllisten brauchen einen deutlich sichtbaren Fokus (WCAG 2.4.7/2.4.13) */
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 3px solid #1D4E89; outline-offset: 2px; }
select:focus-visible { outline: 3px solid #1D4E89; outline-offset: 1px; }
.level:has(input:focus-visible) { box-shadow: 0 0 0 3px #1D4E89; }
html { scroll-padding-top: 88px; scroll-padding-bottom: 96px; }
input[type=file] { font: inherit; font-size: .9rem; max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: .8rem; padding: .55rem .9rem; border: 2px solid var(--red-ui);
  background: #fff; color: var(--red-ui); border-radius: 0; cursor: pointer; }
.steps div.open { color: var(--red-dark); }
.steps div.open::before { background: #fff; box-shadow: inset 0 0 0 2px var(--red); }
.stop-btn { background: #1A1A1A; color: #fff; } .stop-btn:hover { background: #000; }
main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
body:has(#tabbar[hidden]) .actions.sticky { bottom: env(safe-area-inset-bottom); }
body:has(#tabbar[hidden]) #toast { bottom: calc(76px + env(safe-area-inset-bottom)); }

/* Eckige Bedienelemente (Vorgabe Dirk, 23.11.2026): keine abgerundeten Buttons */
:root { --radius: 4px; }
button, .btn, .nav-top a, .nav-logout, .tabs, .tabs button, .chip, .rec-btn, .stop-btn,
.hero .btn, .actions.sticky > *, button.small, .btn.small { border-radius: 0 !important; }
input[type=text], input[type=password], input[type=url], textarea, select, .level, .notice, .drop, .stat, .card, .hero, #toast { border-radius: 4px; }
.tabs { padding: 0; background: none; border-bottom: 2px solid var(--line); gap: 0; }
.tabs button { border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button.active { background: none; box-shadow: none; color: var(--red); border-bottom-color: var(--red); }
.rec-btn { width: 58px; height: 58px; }
.rec-btn span { border-radius: 50%; }
.login .logo-big, .logo { border-radius: 4px; }

/* P1 nach Experten-Prüfung 2 */
.tabbar { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.ti-gear { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.4 13a7.5 7.5 0 0 0 0-2l2.1-1.6-2-3.5-2.5 1a7.4 7.4 0 0 0-1.7-1L15 3h-4l-.4 2.9a7.4 7.4 0 0 0-1.7 1l-2.5-1-2 3.5L6.6 11a7.5 7.5 0 0 0 0 2l-2.1 1.6 2 3.5 2.5-1a7.4 7.4 0 0 0 1.7 1L11 21h4l.4-2.9a7.4 7.4 0 0 0 1.7-1l2.5 1 2-3.5zM13 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7z'/%3E%3C/svg%3E"); }
dialog.dlg { border: 0; border-radius: 4px; padding: 20px; max-width: min(420px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.3); color: var(--text); }
dialog.dlg::backdrop { background: rgba(0,0,0,.45); }
dialog.dlg p { margin: 0 0 .4rem; line-height: 1.5; }
dialog.dlg .actions { justify-content: flex-end; margin-bottom: 0; }
button.danger-solid { background: #1A1A1A; color: #fff; border-radius: 0; } button.danger-solid:hover { background: #000; }

/* P2 nach Experten-Prüfung 2 */
.hero .btn.ghost { background: transparent; border: 2px solid #fff; color: #fff; }
.hero .btn.ghost:hover { background: rgba(255,255,255,.12); }
.steps div { font-size: .75rem; }
.link-btn { background: none; border: 0; padding: 0; min-height: 0; color: var(--red-dark); text-decoration: underline; font-weight: 600; font-size: inherit; cursor: pointer; }
.link-btn:hover { background: none; }
table.audit td:first-child { white-space: nowrap; }
@media (min-width: 768px) {
  .actions.sticky { justify-content: flex-end; }
  .actions.sticky > .primary { flex: 0 0 auto !important; min-width: 200px; }
  #tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
  #tpls .card { margin-bottom: 0; display: flex; flex-direction: column; } #tpls .card .actions { margin-top: auto; padding-top: .8rem; }
}
@media (min-width: 1100px) {
  main { max-width: 1240px; }
  .split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .split > #tx { position: sticky; top: 80px; max-height: calc(100vh - 170px); overflow: auto; margin-bottom: 12px; }
  .split .seg.hl { box-shadow: inset 3px 0 0 var(--red); background: var(--red-soft); }
}

/* Face ID / Passkeys */
.or { display: flex; align-items: center; gap: .8rem; color: var(--grey); font-size: .85rem; margin: .4rem 0 .9rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pk-btn { background: #fff; border: 2px solid var(--ink); color: var(--ink); }
.pk-btn:hover { background: #F4F4F4; }
.card.offer { border-left: 0; background: #fff; display: block; }
/* Installation: QR-Code am Computer, Anleitung am Handy */
.install-offer { display: flex !important; gap: 1.2rem; align-items: center; }
.install-offer img { width: 112px; height: 112px; flex: none; border: 1px solid var(--line); }
.qr-big { display: block; width: 220px; height: 220px; margin: .4rem auto .6rem; border: 1px solid var(--line); }
.install-steps { margin: .6rem 0 0; padding-left: 1.3rem; line-height: 1.55; }
.install-steps li { margin: .25rem 0; }
.install-url { text-align: center; font-weight: 600; word-break: break-all; margin: 0 0 .4rem; }
.ios-share { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -.15em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3.8 8.2 6.6 7.1 5.5 12 .6l4.9 4.9-1.1 1.1L13 3.8V15h-2zM5 9h4v1.6H6.6v10.8h10.8V10.6H15V9h4v14H5z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 3.8 8.2 6.6 7.1 5.5 12 .6l4.9 4.9-1.1 1.1L13 3.8V15h-2zM5 9h4v1.6H6.6v10.8h10.8V10.6H15V9h4v14H5z'/%3E%3C/svg%3E") center/contain no-repeat; }
@media (max-width: 520px) { .install-offer { display: block !important; } .install-offer img { display: none; } }

/* ===== Luftiges Layout + Typografie (23.11.2026) =====
   Schrift: Sparkassen-Hausschrift, falls auf dem Gerät installiert (lizenziert, nicht eingebettet);
   sonst humanistische Systemschriften mit ähnlicher Anmutung. */
:root {
  font-family: "Sparkasse Rg", "Sparkasse", "Protty Sans", "Open Sans", "Segoe UI", Arial, sans-serif;
  --bg: #F7F7F7; --line: #EBEBEB; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.05);
}
h1, h2, h3, .m-title, .timer, .brand-text { font-family: "Sparkasse Bd", "Sparkasse Rg", "Sparkasse", "Protty Sans", "Open Sans", "Segoe UI", Arial, sans-serif; }
body { font-size: 16px; line-height: 1.55; }
main { padding-top: 28px; padding-bottom: 32px; }
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; margin: .4rem 0 1.4rem; }
h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; margin: 2.2rem 0 .9rem; }
.card { padding: 22px 22px; margin-bottom: 14px; border: 0; }
.muted { color: #707070; }
label { margin: 1.2rem 0 .45rem; }
input[type=text], input[type=password], input[type=url], textarea, select { padding: .85rem .95rem; border-color: #DCDCDC; background: #FCFCFC; }
input:focus, textarea:focus, select:focus { background: #fff; }

/* Startseite: ruhig, eine klare Hauptaktion */
.hero { display: block; background: #fff; color: var(--ink); padding: 30px 24px 26px; box-shadow: var(--shadow); margin-bottom: 18px; }
.hero h1 { color: var(--ink); font-size: 1.75rem; margin: 0 0 1.3rem; }
.hero .eyebrow { margin: 0 0 .25rem; color: var(--red); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.hero .link-btn { display: inline-block; margin-top: 1rem; color: var(--grey); text-decoration: none; font-weight: 600; }
.hero .link-btn:hover { color: var(--red-dark); text-decoration: underline; }
.btn.big, button.big { width: 100%; min-height: 60px; font-size: 1.1rem; gap: .7rem; }
.rec-dot-sm { width: 14px; height: 14px; border-radius: 50%; background: #fff; display: inline-block; flex: none; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin: 2.2rem 0 .9rem; }
.list-head h2 { margin: 0; }
.stats { display: flex; gap: .5rem; margin: 0; }
#list .card { padding: 18px 22px; }
.m-title { font-size: 1.05rem; }
.m-meta { margin-top: .55rem; gap: .4rem .8rem; }

/* Neue Aufnahme: ein Tipp + Einwilligung, Details optional */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > .card { margin: 0; }
.quick { padding: 26px 22px; }
.consent { display: flex; gap: .85rem; align-items: flex-start; margin: 0 0 1.3rem; font-weight: 500; cursor: pointer; }
.consent input { width: 1.4rem; height: 1.4rem; margin-top: .1rem; accent-color: var(--red); flex: none; }
.consent b { display: block; color: var(--ink); }
.summary { text-align: center; margin: .9rem 0 0; }
details.card > summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style: none; display: flex; align-items: center; gap: .5rem; min-height: 28px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; background: #F0F0F0; font-weight: 700; flex: none; }
details.card[open] > summary::before { content: "−"; }
details.card[open] > summary { margin-bottom: .4rem; }

/* Aufnahme */
.recorder { padding: 1.2rem 0 1rem; }
.rec-ring { margin: 2rem auto 1rem; }
.timer { font-size: 3.4rem; letter-spacing: 0; }
.stop-btn { width: 100%; max-width: 360px; min-height: 60px; font-size: 1.1rem; margin-top: .6rem; }
.recorder details { margin-top: 1rem; }

/* Sitzung */
.steps { margin: 1.4rem 0 .4rem; }
.tabs { margin: 1.6rem 0 1.2rem; }
.doc .sec { margin-bottom: 1.6rem; }
.doc-head { padding-bottom: 1rem; margin-bottom: 1.4rem; }
.doc-head h2 { font-size: 1.35rem; }
.notice { padding: .9rem 1rem; }

/* Kopfzeile etwas ruhiger */
.topbar-inner { padding: .8rem 20px; }
@media (min-width: 768px) { main { padding-left: 24px; padding-right: 24px; } .hero { padding: 36px 32px; } .hero .btn.big { width: auto; min-width: 320px; } }

.hero .btn.primary { background: var(--red); color: #fff; }
.hero .btn.primary:hover { background: var(--red-dark); }

/* Anlagen */
.att-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.att-list li { display: grid; grid-template-columns: 44px 1fr auto auto; gap: .7rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--line); }
.att-list a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-list a:hover { color: var(--red-dark); text-decoration: underline; }
.ficon { width: 44px; height: 44px; display: grid; place-items: center; background: #F2F2F2; font-size: .7rem; font-weight: 700; color: var(--red-dark); letter-spacing: .04em; }
.icon-btn { min-width: 44px; padding: 0; background: none; }
label.btn { cursor: pointer; }
@media (max-width: 480px) { .att-list li { grid-template-columns: 40px 1fr auto; } .att-list li .muted { display: none; } }

/* Logo-Platz: offizielles Logo aus app/static/brand/ (nur mit Nutzungsfreigabe) */
body.has-brand .logo { width: auto; min-width: 34px; padding: 3px 6px; background: #fff var(--brand-logo) center/contain no-repeat; background-origin: content-box; width: 96px; }
body.has-brand .logo::before { display: none; }
body.has-brand .login .logo-big { background: #fff var(--brand-logo) center/contain no-repeat; width: 160px; height: 64px; }
body.has-brand .login .logo-big::before { display: none; }

/* Quelle: Raum oder Online-Meeting */
.src { display: grid; gap: .6rem; }
@media (min-width: 768px) { .src { grid-template-columns: 1fr 1fr; } }
.srcopt { display: flex; gap: .7rem; align-items: flex-start; border: 2px solid var(--line); padding: .9rem 1rem; margin: 0; cursor: pointer; font-weight: 500; }
.srcopt:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.srcopt input { accent-color: var(--red); margin-top: .2rem; }
.srcopt b { display: block; color: var(--ink); }

/* Logo der Kreissparkasse Köln (breites Format 910×294) */
body.has-brand .logo { width: 116px; height: 38px; padding: 4px 8px; }
body.has-brand .login .logo-big { width: 220px; height: 72px; padding: 8px 12px; margin-bottom: 1.4rem; }

/* Kopfzeile: weißes Logo freigestellt auf Rot (kein weißer Kasten) */
body.has-brand .logo { background: transparent var(--brand-logo-white) left center/contain no-repeat; width: 124px; height: 40px; padding: 0; }
body.has-brand .brand { gap: 1rem; }
body.has-brand .brand-text { border-left: 1px solid rgba(255,255,255,.5); padding-left: 1rem; }

/* Protty-Marke (Entwurf A3 „Tonwelle“) */
.logo { display: none; }
body.has-brand .logo { display: block; }
.pmark { width: 30px; height: 31px; flex: none; background: url(/static/brand/protty-mark-weiss.svg) center/contain no-repeat; }
.brand-text { font-size: 1.15rem; letter-spacing: -.01em; }
body.has-brand .brand-text { border-left: 0; padding-left: 0; }
body.has-brand .pmark { margin-left: .2rem; padding-left: 1rem; border-left: 1px solid rgba(255,255,255,.5); box-sizing: content-box; background-origin: content-box; }
.login .logo-big { display: none; }
body.has-brand .login .logo-big { display: block; }
.protty-head { display: flex; align-items: center; gap: .7rem; margin: .2rem 0 1.2rem; }
.protty-head span { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }

/* Anmeldung: ohne rote Kopfzeile und ohne Institutslogo, nur Protty */
body.is-login .topbar { display: none; }
body.is-login .login .logo-big { display: none !important; }
body.is-login .login { margin-top: 10vh; }

/* Farbe: Sparkassen-Rot HKS 13 – Bildschirmwert #FF0000 (RGB 255/0/0) für alle Markenflächen; kleine rote Texte in --red-dark */

/* ===== Barrierefreiheit (WCAG 2.2 AA / BFSG), 23.11.2026 =====
   Markenflächen in HKS-13-Rot (#FF0000). Text auf Rot bzw. roter Text in normaler Größe braucht 4,5:1 –
   dafür Bedien-Rot #E60000 (Weiß darauf 4,6:1) und Text-Rot #C40000 (5,9:1 auf Weiß). */
:root { --red-ui: #E60000; --red-text: #C40000; }
button.primary, .btn.primary, .hero .btn.primary { background: var(--red-ui); }
button.primary:hover, .btn.primary:hover, .hero .btn.primary:hover { background: var(--red-text); }
.hero .eyebrow, .tabs button.active, .tabbar a.active, .steps div.now, .steps div.open, .summary .link-btn,
.nav-top a.active { color: var(--red-text); }
.tabs button.active { border-bottom-color: var(--red-ui); }
.chip.l3 { background: var(--red-text); }
.brand-text small { display: inline-block; align-self: flex-start; background: #fff; color: var(--red-text); font-size: .72rem;
  font-weight: 700; padding: .05rem .4rem; margin-top: .15rem; letter-spacing: .02em; }
.back, .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
.hero .link-btn { margin-top: .4rem; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: #fff; color: var(--ink); padding: .8rem 1rem; font-weight: 700; }
.skip:focus { left: 12px; top: 12px; outline: 3px solid #1D4E89; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.consent input, .check input { min-width: 24px; min-height: 24px; }
@media (forced-colors: active) { .chip, .btn, button { border: 1px solid CanvasText; } }

/* Kopfzeile: Text auf HKS-13-Rot als Großschrift (>=18,7px fett, 3:1 erfüllt) */
.brand-text { font-size: 1.2rem; font-weight: 700; }
.nav-top a, .nav-logout { font-size: 1.17rem; font-weight: 700; }
.muted, .field-hint { color: #666666; }

/* Handy: kompakte Kopfzeile (kein Umbruch, nichts abgeschnitten) */
.sm-text { display: none; }
.topbar-inner { flex-wrap: nowrap; min-width: 0; }
.brand { min-width: 0; }
@media (max-width: 600px) {
  .lo-text { display: none; } .sm-text { display: inline; }
  body.has-brand .logo { width: 92px; height: 32px; }
  body.has-brand .brand { gap: .6rem; } body.has-brand .pmark { padding-left: .6rem; width: 26px; height: 27px; }
  .nav-logout { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
  .nav-logout::before { content: ""; width: 22px; height: 22px; background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h9v18h-9v-2h7V5h-7zM8.6 7.6 10 9l-2 2h8v2H8l2 2-1.4 1.4L4.2 12z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h9v18h-9v-2h7V5h-7zM8.6 7.6 10 9l-2 2h8v2H8l2 2-1.4 1.4L4.2 12z'/%3E%3C/svg%3E") center/contain no-repeat; }
}

/* Neue Funktionen (23.11.2026) */
.ti-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h18v18H3zm2 2v14h14V5zm3.4 6.6 2.1 2.1 5.1-5.1L17 10l-6.5 6.5L7 13z'/%3E%3C/svg%3E"); }
.ti-search { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3a7 7 0 0 1 5.6 11.2l5.6 5.6-1.4 1.4-5.6-5.6A7 7 0 1 1 10 3zm0 2a5 5 0 1 0 0 10 5 5 0 0 0 0-10z'/%3E%3C/svg%3E"); }
.tabbar a { font-size: .68rem; }
.marks { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; max-width: 420px; margin: 1.2rem auto .3rem; }
.marks button { background: #fff; border: 2px solid var(--ink); }
.marks button.flash { background: var(--ink); color: #fff; }
.rec-actions { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-top: .8rem; }
.rec-actions #pause { width: 100%; max-width: 360px; min-height: 52px; }
.rec-ring.paused span { animation: none; background: #9A9A9A; }
.chip.mk { background: #1A1A1A; color: #fff; }
.play { min-height: 32px; min-width: 44px; padding: 0 .6rem; margin-left: auto; background: #F0F0F0; font-size: .8rem; }
.seg .row { flex-wrap: wrap; }
.share { align-items: center; }
.card.prev summary { font-weight: 700; color: var(--ink); cursor: pointer; }
.card.prev ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.level.disabled { opacity: .55; cursor: not-allowed; }
.tasklist { list-style: none; margin: 0; padding: 0; }
.tasklist li { display: grid; grid-template-columns: 28px 1fr auto; gap: .7rem; align-items: start; background: #fff; padding: 14px 16px;
  border-bottom: 1px solid var(--line); }
.tasklist li:first-child { border-radius: 4px 4px 0 0; } .tasklist li:last-child { border-bottom: 0; }
.tasklist input { width: 24px; height: 24px; margin-top: .2rem; accent-color: var(--red-ui); }
.tasklist label { margin: 0; font-weight: 500; cursor: pointer; } .tasklist label b { display: block; color: var(--ink); }
.tasklist li.done label b { text-decoration: line-through; color: #777; }
.due { font-weight: 700; font-size: .9rem; text-align: right; white-space: nowrap; } .due small { display: block; font-size: .7rem; }
.due.late { color: var(--red-text); }
.hits { list-style: none; margin: .6rem 0 0; padding: 0; } .hits li { padding: .8rem 0; border-top: 1px solid var(--line); }
.hits p { margin: .3rem 0 0; font-size: .92rem; }
.answer { background: #F5F5F5; padding: 14px 16px; margin-top: .8rem; } .answer p:first-child { margin-top: 0; font-size: 1.02rem; color: var(--ink); }

/* Prüfrunde 3 (23.11.2026): Tablet, Navigation, Bedienung */
.tabbar a { font-size: .75rem; }
.nav-gear { display: none; }
@media (max-width: 1023px) {
  .nav-top a:not(.nav-gear) { display: none; }
  .nav-top a.nav-gear:not([hidden]) { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; }
  .nav-gear::before { content: ""; width: 24px; height: 24px; background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.4 13a7.5 7.5 0 0 0 0-2l2.1-1.6-2-3.5-2.5 1a7.4 7.4 0 0 0-1.7-1L15 3h-4l-.4 2.9a7.4 7.4 0 0 0-1.7 1l-2.5-1-2 3.5L6.6 11a7.5 7.5 0 0 0 0 2l-2.1 1.6 2 3.5 2.5-1a7.4 7.4 0 0 0 1.7 1L11 21h4l.4-2.9a7.4 7.4 0 0 0 1.7-1l2.5 1 2-3.5zM13 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.4 13a7.5 7.5 0 0 0 0-2l2.1-1.6-2-3.5-2.5 1a7.4 7.4 0 0 0-1.7-1L15 3h-4l-.4 2.9a7.4 7.4 0 0 0-1.7 1l-2.5-1-2 3.5L6.6 11a7.5 7.5 0 0 0 0 2l-2.1 1.6 2 3.5 2.5-1a7.4 7.4 0 0 0 1.7 1L11 21h4l.4-2.9a7.4 7.4 0 0 0 1.7-1l2.5 1 2-3.5zM13 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7z'/%3E%3C/svg%3E") center/contain no-repeat; }
  .nav-gear.active, .nav-gear:hover { background: rgba(255,255,255,.18); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .tabbar:not([hidden]) { display: grid !important; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }
  .actions.sticky { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); }
}
.rec-actions { gap: 2rem; }
.rec-actions .stop-btn { margin-top: .4rem; }
.marks button:disabled { opacity: .45; cursor: not-allowed; }
.level.disabled { opacity: 1; } .level.disabled > span:not(.lv-why), .level.disabled input { opacity: .5; }
.lv-why { display: block; color: #555; margin-top: .3rem; }
.level { flex-wrap: wrap; } .level > span:not(.lv-why) { flex: 1 1 0; min-width: 0; } .level > .lv-why { flex: 1 0 100%; margin: 0 0 0 1.95rem; }
/* Bearbeiten: Spalten nicht zusammendrücken (Tabelle scrollt seitlich) */
table.grid[data-t] td { min-width: 8rem; }
table.grid[data-t] td:has(input[data-c="was"]), table.grid[data-t] td:has(input[data-c="beschluss"]),
table.grid[data-t] td:has(input[data-c="begruendung"]) { min-width: 16rem; }
table.grid[data-t] td:has(input[data-c="bis"]), table.grid[data-t] td:has(input[data-c="nr"]) { min-width: 6.5rem; }
.play { min-height: 44px; }
.field-err { color: var(--red-text); font-weight: 700; margin: .6rem 0 0; }
input[aria-invalid="true"] { border-color: var(--red-ui); box-shadow: inset 0 0 0 1px var(--red-ui); }
#toast .toast-act { margin-left: .8rem; background: #fff; color: var(--ink); min-height: 36px; padding: .3rem .8rem; font-weight: 700; }
.home-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.home-chips a { text-decoration: none; }
.hits mark, .answer mark { background: #FFE08A; color: inherit; padding: 0 1px; }
.dlg ul { margin: .4rem 0; padding-left: 1.2rem; }

/* Kopfzeile Desktop (ab 1024 px): Marke nie stauchen, kurzer Demo-Hinweis, kompaktere Abstände – alles passt in 960 px */
.brand { flex: none; }
.brand-text small { white-space: nowrap; }
.nav-top { min-width: 0; }
@media (min-width: 1024px) {
  .lo-text { display: none; } .sm-text { display: inline; }
  .nav-top { gap: .1rem; }
  .nav-top a, .nav-logout { padding: .5rem .55rem; white-space: nowrap; }
  .nav-logout .lo-text { display: inline; }
}
/* Aktiver Menüpunkt in der roten Kopfzeile: weiße Fläche, rote Schrift (#C40000 auf Weiß 5,9:1) */
.nav-top a.active { background: #fff; color: var(--red-text); }
.nav-top a:not(.active):hover, .nav-logout:hover { background: rgba(255,255,255,.18); }
/* Desktop: Abmelden als Symbol (wie am Handy) – schafft Luft zwischen Marke und Navigation */
@media (min-width: 1024px) {
  .nav-top { gap: .2rem; padding-left: 1.5rem; }
  .nav-logout .lo-text { display: none; }
  .nav-logout { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; margin-left: .4rem; }
  .nav-logout::before { content: ""; width: 22px; height: 22px; background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h9v18h-9v-2h7V5h-7zM8.6 7.6 10 9l-2 2h8v2H8l2 2-1.4 1.4L4.2 12z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h9v18h-9v-2h7V5h-7zM8.6 7.6 10 9l-2 2h8v2H8l2 2-1.4 1.4L4.2 12z'/%3E%3C/svg%3E") center/contain no-repeat; }
}

/* ===== Kopf und Navigation – Neugestaltung 23.11.2026 =====
   < 1100 px: Marke + Kontoknopf oben, Navigation unten (Tabbar). ab 1100 px: Textnavigation mit Unterstrich, Aufnahme-Knopf, Konto. */
.ti-logout { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 3h9v18h-9v-2h7V5h-7zM8.6 7.6 10 9l-2 2h8v2H8l2 2-1.4 1.4L4.2 12z'/%3E%3C/svg%3E"); }
.topbar :focus-visible { outline: 3px solid #fff !important; outline-offset: 2px; }
.topbar-inner { max-width: 1280px; min-height: 64px; padding-top: 0; padding-bottom: 0; gap: 1.5rem; }
.brand { padding: .6rem 0; }
.nav-top { flex: 1; display: flex; align-items: center; gap: .75rem; margin-left: 0; min-width: 0; }
.nav-links { display: none; }
.nav-rec { display: none !important; }
.me-btn { margin-left: auto; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; flex: none;
  background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.85); font: 700 .95rem/1 inherit; letter-spacing: .04em; cursor: pointer;
  transition: background .15s, color .15s; }
.me-btn:hover, .me-btn:has(+ :popover-open), .me-btn[aria-expanded="true"] { background: #fff; color: var(--red-text); }
/* Kontomenü (Popover, liegt in der obersten Ebene) */
.me-menu { position: fixed; inset: auto; top: calc(env(safe-area-inset-top) + 68px); right: max(12px, calc((100vw - 1280px) / 2 + 20px));
  margin: 0; width: min(320px, calc(100vw - 24px)); padding: 0; border: 0; border-top: 4px solid var(--red-ui); background: #fff; color: var(--ink);
  box-shadow: 0 24px 48px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.08); opacity: 1; transform: none;
  transition: opacity .16s ease, transform .16s ease, overlay .16s allow-discrete, display .16s allow-discrete; }
.me-menu:not(:popover-open) { display: none; }
@starting-style { .me-menu:popover-open { opacity: 0; transform: translateY(-6px); } }
.me-menu.open { display: block; } /* Rückfall ohne Popover-Unterstützung */
.me-head { display: flex; gap: .8rem; align-items: center; padding: 18px 18px 12px; }
.me-head b { display: block; font-size: 1.05rem; }
.me-head span#me-meta { display: block; color: #5A5A5A; font-size: .85rem; margin-top: .15rem; }
.me-avatar { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--red-ui); color: #fff; font-weight: 700; }
.me-groups { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0 18px 14px; border-bottom: 1px solid var(--line); }
.me-groups .chip { font-size: .72rem; background: #F2F2F2; color: #333; }
.me-item { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 52px; padding: 0 18px; background: none; border: 0;
  border-bottom: 1px solid var(--line); color: var(--ink); font: 600 1rem inherit; text-decoration: none; text-align: left; cursor: pointer; }
.me-item:last-child { border-bottom: 0; }
.me-menu .me-item { justify-content: flex-start; text-align: left; }
/* Ruhebildschirm während der Aufnahme */
#dim { position: fixed; inset: 0; z-index: 10000; background: #000; color: #5C5C5C; touch-action: none; user-select: none;
  -webkit-user-select: none; -webkit-touch-callout: none; cursor: none; outline: none; }
#dim .dim-box { position: absolute; transform: translate(-50%, -50%); text-align: center; transition: left 2s, top 2s; width: min(15rem, 80vw); }
#dim #dim-tm { display: block; font-size: 2.4rem; font-weight: 300; letter-spacing: .04em; font-variant-numeric: tabular-nums; color: #6A6A6A; }
#dim p { margin: .4rem 0 0; font-size: .8rem; }
#dim #dim-warn { color: #B85C5C; max-width: 16rem; }
#dim .dim-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7A1010; margin-bottom: .5rem; animation: dimpulse 2.4s ease-in-out infinite; }
@keyframes dimpulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { #dim .dim-dot { animation: none; } #dim .dim-box { transition: none; } }
body.dimmed { overflow: hidden; }
.dim-btn { display: inline-flex; align-items: center; gap: .5rem; margin: 0 auto 1.2rem; background: #1A1A1A; color: #fff; border-color: #1A1A1A; }
.dim-btn:hover { background: #333; }
.memo-hint a { color: inherit; font-weight: 700; }
.bot-card { border-left: 4px solid var(--red-ui); }
.seg-form { grid-column: 2; } .seg-form textarea { min-height: 4.5rem; }
.seg-edit { font-size: 1rem; }
input[type=url][aria-invalid="true"] { border-color: var(--red-ui); box-shadow: inset 0 0 0 1px var(--red-ui); }
.me-item:hover, .me-item:focus-visible { background: #F7F7F7; }
.me-item .ti { width: 22px; height: 22px; color: #5A5A5A; }
.me-item#logout { color: var(--red-text); } .me-item#logout .ti { color: var(--red-text); }
/* Untere Navigation: ruhig, aktive Seite mit roter Markierung */
.tabbar { background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid rgba(0,0,0,.08); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.tabbar a { position: relative; height: 100%; justify-content: center; color: #5A5A5A; font-weight: 600; }
.tabbar a .ti { transition: transform .15s; }
.tabbar a.active { color: var(--red-text); }
.tabbar a.active:not(.tab-rec)::before { content: ""; position: absolute; top: 0; left: 26%; right: 26%; height: 3px; background: var(--red-ui); }
.tabbar a:active .ti { transform: scale(.9); }
.rec-btn { border-radius: 0 !important; width: 58px; height: 58px; box-shadow: 0 8px 20px rgba(230,0,0,.32); }
/* Tablet und kleiner Desktop (768–1099 px): weiterhin untere Navigation */
@media (min-width: 768px) and (max-width: 1099px) {
  .tabbar:not([hidden]) { display: grid !important; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }
  .actions.sticky { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); }
}
/* Langer Demo-Hinweis nur dort, wo Platz ist */
@media (max-width: 600px) { .lo-text { display: none; } .sm-text { display: inline; } }
@media (min-width: 601px) { .lo-text { display: inline; } .sm-text { display: none; } }
@media (min-width: 1100px) and (max-width: 1279px) { .lo-text { display: none; } .sm-text { display: inline; } }
/* Desktop ab 1100 px */
@media (min-width: 1100px) {
  .tabbar { display: none !important; } body { padding-bottom: 32px; }
  .actions.sticky { bottom: 0; }
  .topbar-inner { min-height: 72px; align-items: stretch; padding-left: 32px; padding-right: 32px; gap: 2.5rem; }
  .brand { align-self: center; }
  .nav-top { align-items: stretch; gap: 1rem; }
  .nav-links { display: flex; align-items: stretch; margin-right: auto; }
  .nav-top .nav-links a { position: relative; display: flex !important; align-items: center; padding: 0 .9rem; border-radius: 0; background: none;
    color: #fff; font-size: 1.17rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .nav-top .nav-links a[hidden] { display: none !important; }
  .nav-top .nav-links a::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: 0; height: 4px; background: #fff;
    transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
  .nav-top .nav-links a:hover { background: rgba(255,255,255,.12); }
  .nav-top .nav-links a:hover::after { transform: scaleX(.35); }
  .nav-top .nav-links a.active, .nav-top .nav-links a.active:hover { background: none; color: #fff; }
  .nav-top .nav-links a.active::after { transform: scaleX(1); }
  .nav-top a.nav-rec { display: inline-flex !important; align-self: center; align-items: center; gap: .55rem; height: 44px; padding: 0 1.1rem;
    background: #fff; color: var(--red-text); font-weight: 700; font-size: 1rem; text-decoration: none; border-radius: 0; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,.12); transition: transform .15s, box-shadow .15s; }
  .nav-top a.nav-rec:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.16); background: #fff; }
  .nav-top a.nav-rec .rec-dot-sm { background: var(--red-ui); }
  .me-btn { margin-left: 0; align-self: center; width: 44px; height: 44px; }
  .me-menu { top: 78px; right: max(16px, calc((100vw - 1280px) / 2 + 32px)); }
}
.me-item:focus-visible { outline: 3px solid var(--red-ui); outline-offset: -3px; }
@media (max-width: 1099px) { .me-menu::backdrop { background: rgba(0,0,0,.18); } }
@media (min-width: 1100px) and (max-width: 1279px) {
  .topbar-inner { gap: 1.25rem; padding-left: 24px; padding-right: 24px; }
  .nav-top { gap: .6rem; }
  .nav-top .nav-links a { padding: 0 .6rem; }
  .nav-top .nav-links a::after { left: .6rem; right: .6rem; }
  .nav-top a.nav-rec { padding: 0 .85rem; }
}

/* Prüfrunde 4 (23.11.2026): Felder, iOS, Gruppen, Pause, Anmeldeseite */
input[type=text], input[type=password], input[type=search], textarea, select { border-color: #8A8A8A; }
input[type=search] { -webkit-appearance: none; appearance: none; width: 100%; font: inherit; font-size: 16px; padding: .85rem .95rem;
  border: 1px solid #8A8A8A; border-radius: 0; background: #FCFCFC; }
table.grid input { font-size: 16px; border: 1px solid #8A8A8A; background: #fff; border-radius: 0; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.plain > legend { font-weight: 700; margin: 1.1rem 0 .4rem; padding: 0; }
p.label { font-weight: 700; margin: 1.1rem 0 .4rem; }
details > summary { min-height: 44px; display: flex; align-items: center; }
.pause-label { margin: .2rem 0 0; font-weight: 700; color: #5A5A5A; letter-spacing: .02em; }
.timer.paused { color: #8A8A8A; }
#toast .toast-x { margin-left: .4rem; background: transparent; color: #fff; min-height: 44px; min-width: 44px; padding: 0; font-weight: 700; }
#toast .toast-act { min-height: 44px; }
body.is-login::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--ink); z-index: 30; }
body.is-login { padding-top: env(safe-area-inset-top); }
#pview mark { background: #FFE08A; color: inherit; scroll-margin: 120px; }

/* Prüfrunde 5 (23.11.2026): Safe Area seitlich (iPhone quer), Kontoknopf 44 px, Popover-Rückfall */
.topbar-inner { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
@media (min-width: 1100px) { .topbar-inner { padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); } }
.me-menu { right: max(12px, env(safe-area-inset-right), calc((100vw - 1280px) / 2 + 20px)); }
#toast { left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); }
.me-btn { width: 44px; height: 44px; }
@supports not selector(:popover-open) { .me-menu { display: none; } .me-menu.open { display: block; } }
/* Schmale Handys: Aktionsleiste ohne Quetschen – Export bündelt Word/PDF, Hauptaktion schrumpft nie */
.exp-narrow { display: none; }
.actions.sticky > .primary { flex-shrink: 0; }
@media (max-width: 480px) { .actions.sticky > .exp-wide { display: none; } .actions.sticky > .exp-narrow:not([hidden]) { display: inline-flex; } }

/* Prüfrunde 6 (23.11.2026) */
.me-btn { font-size: 1.17rem; letter-spacing: .02em; font-weight: 700; }  /* große, fette Schrift (≥ 14 pt fett): Weiß auf #FF0000 erfüllt 3:1 */
.is-busy { opacity: .75; cursor: progress; }
.home-chips .chip { min-height: 44px; display: inline-flex; align-items: center; padding: 0 1rem; }
.netbar.moved { background: #1A1A1A; } .netbar.moved a { color: #fff; font-weight: 700; }
.dlg-status { margin: .6rem 0 0; font-weight: 600; }
.dlg textarea { width: 100%; }

/* Prüfrunde 7 (23.11.2026) */
body.no-rec .tab-rec, body.no-rec .nav-rec { display: none !important; }
.notice.pruef ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.ti-face { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h5v2H5v3H3zm13 0h5v5h-2V5h-3zM3 16h2v3h3v2H3zm16 0h2v5h-5v-2h3zM9 9h2v3H9zm4 0h2v3h-2zm-3.5 6h5a3 3 0 0 1-5 0z'/%3E%3C/svg%3E"); }

/* Formalgerüst Gremien (23.11.2026) */
.kopf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 1rem; }
.kopf-edit { margin-top: 1.4rem; padding-top: .6rem; border-top: 1px solid var(--line); }
#kopf-neu { margin-top: 1.2rem; } #kopf-neu.hl-formal { border-left: 3px solid var(--red-ui); padding-left: .8rem; }
.sec.kopf dl.kv { margin: 0; }
