/* KopfFrei. mit Clara V0.2 (E-014). Smartphone zuerst; ab 64rem Desktop-Aufbau.
   Farben, Schrift, Abstände und Radien ausschließlich aus den HBC-Tokens (/ci/hbc-tokens.css).
   KopfFrei = HBC Software Factory → Gold (data-brand am <html>); Clara = HBC AI → Petrol (data-brand="ai"). */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; font-family: var(--hbc-font); font-size: var(--hbc-text-small); line-height: 1.45; color: var(--hbc-text); background: var(--hbc-bg); overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: var(--hbc-focus-width) solid var(--hbc-accent); outline-offset: var(--hbc-focus-offset); border-radius: var(--hbc-radius-xs); }
.sprung { position: absolute; left: -999px; } .sprung:focus { left: var(--hbc-space-4); top: var(--hbc-space-4); z-index: var(--hbc-z-toast); background: var(--hbc-surface); padding: var(--hbc-space-2); }
.leise { color: var(--hbc-text-muted); }
svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Grundaufbau (Smartphone) ---------- */
#app { min-height: 100dvh; display: flex; flex-direction: column; }
#seite { display: none; }
#mitte { flex: 1; display: flex; flex-direction: column; min-width: 0; padding-bottom: calc(5.25rem + env(safe-area-inset-bottom)); }
#kopf { display: flex; align-items: center; gap: var(--hbc-space-3); padding: calc(var(--hbc-space-3) + env(safe-area-inset-top)) max(var(--hbc-space-5), env(safe-area-inset-right)) var(--hbc-space-2) max(var(--hbc-space-5), env(safe-area-inset-left)); position: sticky; top: 0; z-index: var(--hbc-z-header); background: var(--hbc-bg); }
.wortmarke { font-size: var(--hbc-text-h4); font-weight: var(--hbc-weight-extrabold); letter-spacing: -0.02em; }
.wortmarke span { color: var(--hbc-gold); }
#kopf #datum { flex: 1; text-align: right; font-size: var(--hbc-text-caption); }
#inhalt { flex: 1; padding: var(--hbc-space-2) max(var(--hbc-space-5), env(safe-area-inset-right)) var(--hbc-space-8) max(var(--hbc-space-5), env(safe-area-inset-left)); display: grid; gap: var(--hbc-space-3); align-content: start; outline: none; width: 100%; max-width: 46rem; margin: 0 auto; }
#hinweis { margin: 0 var(--hbc-space-5); padding: var(--hbc-space-3) var(--hbc-space-4); border-radius: var(--hbc-radius-sm); background: var(--hbc-surface); border: var(--hbc-border-hairline) solid var(--hbc-error); color: var(--hbc-error); font-weight: var(--hbc-weight-semibold); font-size: var(--hbc-text-caption); }

/* ---------- Untere Navigation mit Erfassungsknopf ---------- */
#leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--hbc-z-header); display: grid; grid-template-columns: 1fr 1fr 4.5rem 1fr 1fr; align-items: end; background: var(--hbc-surface); border-top: var(--hbc-border-hairline) solid var(--hbc-border); padding: var(--hbc-space-2) max(var(--hbc-space-2), env(safe-area-inset-right)) calc(var(--hbc-space-2) + env(safe-area-inset-bottom)) max(var(--hbc-space-2), env(safe-area-inset-left)); }
#leiste button { display: grid; justify-items: center; gap: 2px; padding: var(--hbc-space-1) 0; min-height: 3rem; font-size: var(--hbc-text-overline); font-weight: var(--hbc-weight-semibold); color: var(--hbc-text-muted); }
#leiste button[aria-current="page"] { color: var(--hbc-text); }
#leiste button[aria-current="page"] svg { stroke: var(--hbc-accent); }
#leiste .plus { width: 3.75rem; height: 3.75rem; margin: -1.5rem auto 0; border-radius: var(--hbc-radius-pill); background: var(--hbc-accent-fill); color: var(--hbc-on-accent); box-shadow: var(--hbc-shadow-md); display: grid; place-items: center; min-height: 0; }
#leiste .plus svg { width: 1.75rem; height: 1.75rem; stroke-width: 2.2; }
body.tastatur #leiste { display: none; }
body.tastatur #mitte { padding-bottom: var(--hbc-space-4); }

/* ---------- Bausteine ---------- */
.karte { background: var(--hbc-surface); border-radius: var(--hbc-radius-lg); padding: var(--hbc-space-4); box-shadow: var(--hbc-shadow-sm); }
/* Begrüßung kompakt: Gruß, Claim, darunter das aufklappbare Tagesbriefing. */
.held { background: var(--hbc-bg); color: var(--hbc-text); border-radius: var(--hbc-radius-lg); padding: var(--hbc-space-3) var(--hbc-space-4) var(--hbc-space-1); display: grid; gap: 2px; box-shadow: var(--hbc-shadow-sm); }
.held h1 { font-size: var(--hbc-text-h4); font-weight: var(--hbc-weight-extrabold); letter-spacing: -0.02em; line-height: 1.2; }
.held .claim { font-size: var(--hbc-text-caption); color: var(--hbc-accent); font-weight: var(--hbc-weight-semibold); }
.brief { margin-top: var(--hbc-space-1); border-top: var(--hbc-border-hairline) solid var(--hbc-border); }
.brief summary { list-style: none; display: flex; align-items: center; gap: var(--hbc-space-2); min-height: 2.75rem; font-size: var(--hbc-text-caption); font-weight: var(--hbc-weight-semibold); color: var(--hbc-text); margin: 0; }
.brief summary::-webkit-details-marker { display: none; }
.brief summary span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief summary svg { width: 1.1rem; height: 1.1rem; color: var(--hbc-text-muted); transition: transform var(--hbc-duration-base) var(--hbc-ease); }
.brief[open] summary svg { transform: rotate(90deg); }
.brief[open] summary { margin-bottom: 0; }
.held .briefing { font-size: var(--hbc-text-small); color: var(--hbc-text-muted); padding-bottom: var(--hbc-space-3); }
h2 { font-size: var(--hbc-text-body-lg); font-weight: var(--hbc-weight-bold); letter-spacing: -0.01em; }
h3 { font-size: var(--hbc-text-overline); font-weight: var(--hbc-weight-bold); letter-spacing: 0.08em; text-transform: uppercase; color: var(--hbc-text-muted); margin-bottom: 0; }
h3.rot { color: var(--hbc-error); }
.titelzeile { display: flex; align-items: center; gap: var(--hbc-space-3); }
.titelzeile h1 { font-size: var(--hbc-text-h3); font-weight: var(--hbc-weight-extrabold); letter-spacing: -0.02em; flex: 1; }
.zurueck { display: inline-flex; align-items: center; gap: var(--hbc-space-1); color: var(--hbc-text-muted); font-weight: var(--hbc-weight-semibold); min-height: 2.75rem; }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: var(--hbc-space-2); min-height: 3rem; padding: 0 var(--hbc-space-5); border-radius: var(--hbc-radius-pill); border: var(--hbc-border-hairline) solid var(--hbc-border-strong); font-weight: var(--hbc-weight-bold); background: transparent; transition: background var(--hbc-duration-fast) var(--hbc-ease), color var(--hbc-duration-fast) var(--hbc-ease), transform var(--hbc-duration-fast) var(--hbc-ease); }
.knopf:active { transform: scale(0.98); }
.knopf.voll { background: var(--hbc-accent-fill); color: var(--hbc-on-accent); border-color: transparent; }
.knopf.voll:hover { background: var(--hbc-accent-fill-hover); color: var(--hbc-on-accent-hover); }
.knopf.breit { width: 100%; }
.knopf.klein { min-height: 2.5rem; padding: 0 var(--hbc-space-4); font-size: var(--hbc-text-caption); }
.knopf.warn { color: var(--hbc-error); border-color: var(--hbc-error); }
.knopf:disabled { opacity: 0.45; cursor: not-allowed; }
.rund { width: 2.75rem; height: 2.75rem; border-radius: var(--hbc-radius-pill); display: grid; place-items: center; flex: none; background: var(--hbc-surface); border: var(--hbc-border-hairline) solid var(--hbc-border); color: var(--hbc-accent); }
.reihe { display: flex; gap: var(--hbc-space-3); flex-wrap: wrap; align-items: center; }
.reihe > .wachs { flex: 1 1 8rem; }

/* Erfassen */
.erfassen { display: grid; gap: var(--hbc-space-2); }
.erfassen textarea, .feld input, .feld select, .feld textarea, .suche input { width: 100%; font-size: 1rem; border: var(--hbc-border-hairline) solid var(--hbc-border-strong); border-radius: var(--hbc-radius-md); background: var(--hbc-bg); padding: var(--hbc-space-3) var(--hbc-space-4); }
/* Eine Zeile zum Schreiben, die mit dem Text wächst; rechts der Knopf zum Erkennen. */
.eingabe { position: relative; }
.erfassen textarea { min-height: 3rem; max-height: 10.5rem; resize: none; line-height: 1.4; padding-right: 3.5rem; display: block; }
.eingabe .senden { position: absolute; right: var(--hbc-space-1); bottom: var(--hbc-space-1); width: 2.5rem; height: 2.5rem; border-radius: var(--hbc-radius-pill); display: grid; place-items: center; color: var(--hbc-text); }
.eingabe .senden::after { content: ""; position: absolute; inset: -4px; } /* Tippfläche 48 px */
.eingabe textarea:not(:placeholder-shown) + .senden { background: var(--hbc-text); color: var(--hbc-bg); }
.eingabe .senden:disabled { opacity: 0.45; }
/* Zwei gleichwertige große Knöpfe: Einsprechen (dunkel) und Clara (Gold). */
.paar { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hbc-space-3); }
.knopf.gross { min-height: 3.5rem; padding: 0 var(--hbc-space-3); font-size: var(--hbc-text-body); border-color: transparent; min-width: 0; }
.knopf.gross svg { width: 1.4rem; height: 1.4rem; }
.knopf.dunkel { background: var(--hbc-text); color: var(--hbc-bg); }
.erfassen .mikro.an { background: var(--hbc-error); color: var(--hbc-white); animation: puls 1.4s var(--hbc-ease) infinite; }
@keyframes puls { 50% { box-shadow: 0 0 0 10px transparent; transform: scale(1.06); } 0%, 100% { box-shadow: 0 0 0 0 var(--hbc-border-strong); } }
.erfassen .status { font-size: var(--hbc-text-caption); } .status:empty { display: none; }
#dyn { display: grid; gap: var(--hbc-space-3); align-content: start; }

/* Kennzahlen (flach: Zahl und Wort in einer Zeile) und Filter */
.zahlen { display: flex; gap: var(--hbc-space-2); }
.zahl { flex: 1 1 auto; background: var(--hbc-surface); border-radius: var(--hbc-radius-md); padding: 0 var(--hbc-space-2) 0 var(--hbc-space-3); height: 2.75rem; text-align: left; box-shadow: var(--hbc-shadow-sm); display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.zahl b { font-size: var(--hbc-text-h4); font-weight: var(--hbc-weight-extrabold); line-height: 2.75rem; }
.zahl span { font-size: var(--hbc-text-overline); color: var(--hbc-text-muted); font-weight: var(--hbc-weight-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.zahl.rot b { color: var(--hbc-error); }
.chips { display: flex; gap: var(--hbc-space-2); overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--hbc-space-5)); padding: 2px var(--hbc-space-5); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 2.5rem; padding: 0 var(--hbc-space-4); border-radius: var(--hbc-radius-pill); border: var(--hbc-border-hairline) solid var(--hbc-border-strong); font-weight: var(--hbc-weight-semibold); font-size: var(--hbc-text-caption); }
.chip[aria-pressed="true"] { background: var(--hbc-text); color: var(--hbc-bg); border-color: transparent; }
.suche { position: relative; } .suche svg { position: absolute; left: var(--hbc-space-4); top: 50%; transform: translateY(-50%); width: 1.25rem; height: 1.25rem; color: var(--hbc-text-muted); }
.suche input { padding-left: 2.75rem; background: var(--hbc-surface); }

/* Aufgaben */
.gruppe { display: grid; gap: var(--hbc-space-1); }
.liste { display: grid; gap: var(--hbc-space-2); }
/* Flache Karten: Die Tippfläche des Hakens (44 px) bestimmt die Mindesthöhe. */
.aufgabe { display: flex; align-items: center; gap: var(--hbc-space-2); background: var(--hbc-surface); border-radius: var(--hbc-radius-md); padding: var(--hbc-space-1) var(--hbc-space-4) var(--hbc-space-1) var(--hbc-space-1); box-shadow: var(--hbc-shadow-sm); }
.aufgabe.neu { outline: var(--hbc-focus-width) solid var(--hbc-accent-fill); }
.haken { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; flex: none; }
.haken i { width: 1.6rem; height: 1.6rem; border-radius: var(--hbc-radius-pill); border: var(--hbc-focus-width) solid var(--hbc-border-strong); display: grid; place-items: center; transition: background var(--hbc-duration-fast) var(--hbc-ease); }
.haken svg { width: 1rem; height: 1rem; stroke-width: 3; opacity: 0; }
.aufgabe.erledigt .haken i { background: var(--hbc-success); border-color: transparent; color: var(--hbc-surface); } .aufgabe.erledigt .haken svg { opacity: 1; }
.aufgabe .text { flex: 1; min-width: 0; text-align: left; padding: var(--hbc-space-1) 0; display: grid; gap: 0; min-height: 2.75rem; align-content: center; }
.aufgabe .titel { font-weight: var(--hbc-weight-semibold); font-size: var(--hbc-text-body); line-height: 1.25; overflow-wrap: anywhere; }
.aufgabe.erledigt .titel { text-decoration: line-through; color: var(--hbc-text-muted); }
.aufgabe .meta { font-size: var(--hbc-text-caption); color: var(--hbc-text-muted); display: block; }
.meta .rot { color: var(--hbc-error); font-weight: var(--hbc-weight-semibold); }
.meta .prio { color: var(--hbc-accent); font-weight: var(--hbc-weight-bold); }
.leer { color: var(--hbc-text-muted); padding: var(--hbc-space-4); text-align: center; background: var(--hbc-surface); border-radius: var(--hbc-radius-md); }
.geruest { height: 4rem; border-radius: var(--hbc-radius-md); background: var(--hbc-surface-alt); animation: atmen 1.2s ease-in-out infinite alternate; }
@keyframes atmen { to { opacity: 0.45; } }

/* Planung */
.tage { display: grid; gap: var(--hbc-space-4); }
.tag h3 b { color: var(--hbc-text); }
.tag.heute h3 b { color: var(--hbc-accent); }

/* Mehr */
.menue { display: grid; gap: var(--hbc-space-2); }
.menue button { display: flex; align-items: center; gap: var(--hbc-space-3); width: 100%; min-height: 3.5rem; padding: 0 var(--hbc-space-4); background: var(--hbc-surface); border-radius: var(--hbc-radius-md); font-weight: var(--hbc-weight-semibold); font-size: var(--hbc-text-body); text-align: left; box-shadow: var(--hbc-shadow-sm); }
.menue button span { flex: 1; } .menue button em { font-style: normal; color: var(--hbc-text-muted); font-size: var(--hbc-text-caption); }
.fuss { text-align: center; display: grid; gap: var(--hbc-space-2); justify-items: center; color: var(--hbc-text-muted); font-size: var(--hbc-text-caption); padding: var(--hbc-space-4) 0; }
.fuss img { height: 20px; }
.feld { display: grid; gap: var(--hbc-space-1); font-size: var(--hbc-text-caption); color: var(--hbc-text-muted); font-weight: var(--hbc-weight-semibold); }
.formular { display: grid; gap: var(--hbc-space-4); }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: var(--hbc-space-3); }
details summary { cursor: pointer; font-weight: var(--hbc-weight-bold); min-height: 2.75rem; display: flex; align-items: center; }
details[open] summary { margin-bottom: var(--hbc-space-3); }

/* ---------- Blatt (von unten) ---------- */
#blatt { position: fixed; inset: 0; z-index: var(--hbc-z-dialog); display: flex; align-items: flex-end; justify-content: center; }
.schleier { position: absolute; inset: 0; background: var(--hbc-overlay); animation: ein var(--hbc-duration-base) var(--hbc-ease); }
.bogen { position: relative; width: 100%; max-width: 40rem; max-height: calc(var(--vvh, 100dvh) - var(--hbc-space-6)); overflow-y: auto; background: var(--hbc-bg); border-radius: var(--hbc-radius-xl) var(--hbc-radius-xl) 0 0; padding: var(--hbc-space-5) max(var(--hbc-space-5), env(safe-area-inset-right)) calc(var(--hbc-space-5) + env(safe-area-inset-bottom)) max(var(--hbc-space-5), env(safe-area-inset-left)); display: grid; gap: var(--hbc-space-4); animation: hoch var(--hbc-duration-slow) var(--hbc-ease); overscroll-behavior: contain; }
.bogen::before { content: ""; width: 2.5rem; height: 4px; border-radius: var(--hbc-radius-pill); background: var(--hbc-border-strong); justify-self: center; margin-top: calc(-1 * var(--hbc-space-2)); }
@keyframes hoch { from { transform: translateY(100%); } } @keyframes ein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.vorschlag { background: var(--hbc-surface); border-radius: var(--hbc-radius-md); padding: var(--hbc-space-3); display: grid; gap: var(--hbc-space-2); box-shadow: var(--hbc-shadow-sm); }
.vorschlag .kopfzeile { display: flex; gap: var(--hbc-space-2); align-items: center; }
.vorschlag input, .vorschlag select { font-size: 1rem; border: var(--hbc-border-hairline) solid var(--hbc-border); border-radius: var(--hbc-radius-sm); background: var(--hbc-bg); padding: var(--hbc-space-2) var(--hbc-space-3); width: 100%; min-height: 2.75rem; }
.vorschlag input.titel { font-weight: var(--hbc-weight-semibold); border-color: transparent; background: transparent; padding-left: 0; }
.vorschlag input.titel:focus { background: var(--hbc-bg); padding-left: var(--hbc-space-3); }
.vorschlag .hinweis { font-size: var(--hbc-text-caption); color: var(--hbc-error); }
.vorschlag .verstanden { font-size: var(--hbc-text-caption); color: var(--hbc-text-muted); }
.verfahren { font-size: var(--hbc-text-caption); color: var(--hbc-text-muted); }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(6rem + env(safe-area-inset-bottom)); z-index: var(--hbc-z-toast); background: var(--hbc-text); color: var(--hbc-bg); border-radius: var(--hbc-radius-pill); padding: var(--hbc-space-3) var(--hbc-space-5); box-shadow: var(--hbc-shadow-lg); display: flex; gap: var(--hbc-space-4); align-items: center; max-width: calc(100vw - 2rem); font-weight: var(--hbc-weight-semibold); animation: ein var(--hbc-duration-base) var(--hbc-ease); }
#toast.fehler { background: var(--hbc-error); color: var(--hbc-white); }
#toast button { color: var(--hbc-gold); font-weight: var(--hbc-weight-extrabold); min-height: 2rem; }

/* ---------- Clara ---------- */
#clara { position: fixed; inset: 0; z-index: var(--hbc-z-overlay); background: var(--hbc-bg); display: flex; flex-direction: column; padding: calc(var(--hbc-space-4) + env(safe-area-inset-top)) max(var(--hbc-space-5), env(safe-area-inset-right)) calc(var(--hbc-space-4) + env(safe-area-inset-bottom)) max(var(--hbc-space-5), env(safe-area-inset-left)); gap: var(--hbc-space-4); height: var(--vvh, 100dvh); }
#clara .kopfzeile { display: flex; align-items: center; gap: var(--hbc-space-3); }
#clara .kopfzeile div { flex: 1; } #clara .kopfzeile h2 { font-size: var(--hbc-text-h4); }
.reiter { display: grid; grid-template-columns: 1fr 1fr; background: var(--hbc-surface-alt); border-radius: var(--hbc-radius-pill); padding: 3px; }
.reiter button { min-height: 2.5rem; border-radius: var(--hbc-radius-pill); font-weight: var(--hbc-weight-bold); font-size: var(--hbc-text-caption); }
.reiter button[aria-selected="true"] { background: var(--hbc-surface); box-shadow: var(--hbc-shadow-sm); }
.verlauf { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: var(--hbc-space-2); min-height: 0; }
.blase { max-width: 85%; padding: var(--hbc-space-3) var(--hbc-space-4); border-radius: var(--hbc-radius-lg); background: var(--hbc-surface); align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; }
.blase.ich { align-self: flex-end; background: var(--hbc-accent-fill); color: var(--hbc-on-accent); }
.blase.wartet { color: var(--hbc-text-muted); font-style: italic; }
.gespraech { display: grid; gap: var(--hbc-space-3); justify-items: center; text-align: center; padding: var(--hbc-space-4) 0; }
.welle { width: 6rem; height: 6rem; border-radius: var(--hbc-radius-pill); background: var(--hbc-surface); display: grid; place-items: center; color: var(--hbc-accent); box-shadow: var(--hbc-shadow-md); }
.welle svg { width: 2.5rem; height: 2.5rem; }
.welle.an { background: var(--hbc-accent-fill); color: var(--hbc-on-accent); animation: puls 1.6s var(--hbc-ease) infinite; }
.schreiben { display: flex; gap: var(--hbc-space-2); align-items: flex-end; }
.schreiben textarea { flex: 1; font-size: 1rem; min-height: 3rem; max-height: 8rem; resize: none; border: var(--hbc-border-hairline) solid var(--hbc-border-strong); border-radius: var(--hbc-radius-lg); background: var(--hbc-surface); padding: var(--hbc-space-3) var(--hbc-space-4); }
.schreiben button { width: 3rem; height: 3rem; border-radius: var(--hbc-radius-pill); background: var(--hbc-accent-fill); color: var(--hbc-on-accent); display: grid; place-items: center; flex: none; }

/* Niedrige Bildschirme: Erfassen bleibt ohne Scrollen erreichbar */
@media (max-height: 43.75rem) and (max-width: 63.99rem) { .karte { padding: var(--hbc-space-3); } .knopf.gross { min-height: 3.25rem; } }

/* Zugang */
.zugang { min-height: 60dvh; display: grid; place-content: center; gap: var(--hbc-space-4); text-align: center; }

/* ---------- Dunkel ---------- */
[data-theme="dark"] .held { background: var(--hbc-surface); }

/* ---------- Desktop ---------- */
@media (min-width: 64rem) {
  #app { display: grid; grid-template-columns: 16rem minmax(0, 1fr); min-height: 100vh; }
  #app.mit-clara { grid-template-columns: 16rem minmax(0, 1fr) 23rem; }
  #seite { display: flex; flex-direction: column; gap: var(--hbc-space-4); padding: var(--hbc-space-8) var(--hbc-space-5); position: sticky; top: 0; height: 100vh; border-right: var(--hbc-border-hairline) solid var(--hbc-border); }
  #seite .wortmarke { font-size: var(--hbc-text-h3); }
  .claim-klein { font-size: var(--hbc-text-caption); color: var(--hbc-accent); font-weight: var(--hbc-weight-semibold); margin-top: calc(-1 * var(--hbc-space-3)); }
  #seitennav { display: grid; gap: 2px; flex: 1; align-content: start; margin-top: var(--hbc-space-2); }
  #seitennav button { display: flex; align-items: center; gap: var(--hbc-space-3); min-height: 2.75rem; padding: 0 var(--hbc-space-3); border-radius: var(--hbc-radius-sm); font-weight: var(--hbc-weight-semibold); color: var(--hbc-text-muted); width: 100%; text-align: left; }
  #seitennav button[aria-current="page"] { background: var(--hbc-surface); color: var(--hbc-text); box-shadow: var(--hbc-shadow-sm); }
  #seitennav button[aria-current="page"] svg { stroke: var(--hbc-accent); }
  #seitennav hr { border: 0; border-top: var(--hbc-border-hairline) solid var(--hbc-border); margin: var(--hbc-space-2) 0; width: 100%; }
  .absender { display: grid; gap: var(--hbc-space-1); font-size: var(--hbc-text-overline); color: var(--hbc-text-muted); }
  .absender img { height: 18px; width: auto; max-width: 100%; justify-self: start; margin-bottom: var(--hbc-space-2); }
  #leiste, #kopf .wortmarke { display: none; }
  #mitte { padding-bottom: 0; }
  #kopf { padding: var(--hbc-space-6) var(--hbc-space-8) var(--hbc-space-2); }
  #kopf #datum { text-align: left; font-size: var(--hbc-text-small); }
  #inhalt { max-width: 62rem; padding: var(--hbc-space-2) var(--hbc-space-8) var(--hbc-space-12); margin: 0; }
  .chips { margin: 0; padding: 2px 0; flex-wrap: wrap; }
  .zweispaltig { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--hbc-space-5); align-items: start; }
  /* Sieben Tage nebeneinander, wenn Platz ist; mit geöffneter Clara-Leiste bricht das Raster in zwei Reihen um. */
  .tage.woche { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: var(--hbc-space-3); align-items: start; }
  .tage.woche .tag { background: var(--hbc-surface-alt); border-radius: var(--hbc-radius-md); padding: var(--hbc-space-3); min-height: 12rem; }
  .tage.woche .tag.leer-tag { display: block; }
  .tage.woche .tag, .tage.woche .liste, .tage.woche .aufgabe { min-width: 0; }
  .tage.woche .aufgabe { padding: var(--hbc-space-2) var(--hbc-space-2) var(--hbc-space-2) var(--hbc-space-1); gap: 0; }
  .tage.woche .aufgabe .meta { display: none; }
  .tage.woche .aufgabe .titel { hyphens: auto; overflow-wrap: break-word; font-weight: var(--hbc-weight-medium); }
  .tage.woche .aufgabe .titel { font-size: var(--hbc-text-caption); }
  .tage.woche .haken { width: 2rem; height: 2rem; } .tage.woche .haken i { width: 1.25rem; height: 1.25rem; }
  #clara { position: sticky; top: 0; height: 100vh; inset: auto; z-index: auto; border-left: var(--hbc-border-hairline) solid var(--hbc-border); padding: var(--hbc-space-6) var(--hbc-space-5); }
  #blatt { align-items: center; }
  .bogen { border-radius: var(--hbc-radius-xl); max-height: 86vh; animation-name: ein; }
  .bogen::before { display: none; }
  #toast { bottom: var(--hbc-space-8); }
}
@media (max-width: 63.99rem) { .tage .tag.leer-tag { display: none; } }
