/* Stundenplan – hell und klar, mit kräftigen Fächerfarben wie im Schul-Stundenplan (Mathe blau, Deutsch gelb …).
   Erkennungszeichen: die "Abfahrtstafel" für Jetzt/Als Nächstes (dunkelblau, Raum und Zeit in schmaler
   Schildschrift). Schriften: Inter für alles, Barlow Condensed nur für Raum, Uhrzeiten und die Tafel.
   Uhrzeiten immer mit gleich breiten Ziffern (tabular-nums), damit sie exakt untereinander stehen. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(fonts/barlow-condensed-latin-600.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(fonts/barlow-condensed-latin-700.woff2) format("woff2");
}

:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #eceef4;
  --surface-3: #e1e4ee;
  --ink: #0c0f1d;
  --ink-2: #454b5e;
  --ink-3: #767d93;
  --line: #e1e4ec;
  --line-2: #cdd1de;
  --accent: #4338ff;
  --accent-2: #3022e6;
  --accent-ink: #ffffff;
  --accent-soft: #ebeaff;
  --accent-line: #c4c0ff;
  --hl: #ffd23f; /* Textmarker-Gelb */
  /* Die Tafel (Jetzt / Als Nächstes) – in beiden Farbschemata dunkelblau */
  --board: #121738;
  --board-2: #1d2453;
  --board-3: #2a336d;
  --board-ink: #f5f6ff;
  --board-dim: #a3a9d4;
  --ok: #0f9d58;
  --warn: #e0590c;
  --danger: #e11d48;
  --focus: #4338ff;
  --tint: 14%; /* Fachfarbe als zarter Hintergrund */
  --sc: var(--accent);
  --sc-ink: #fff;
  --sc-deep: var(--accent);
  --shadow-sm: 0 1px 2px rgb(12 15 29 / 0.06);
  --shadow: 0 1px 2px rgb(12 15 29 / 0.05), 0 8px 22px rgb(12 15 29 / 0.06);
  --shadow-lg: 0 22px 60px -18px rgb(12 15 29 / 0.32);
  --radius: 18px;
  --font-ui: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-sign: "Barlow Condensed", "Inter Variable", "Arial Narrow", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --side-w: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c15;
    --surface: #131726;
    --surface-2: #1a1f32;
    --surface-3: #242a40;
    --ink: #f2f3f9;
    --ink-2: #b3b8cc;
    --ink-3: #7c8299;
    --line: #22273a;
    --line-2: #30374f;
    --accent: #8f88ff;
    --accent-2: #aaa5ff;
    --accent-ink: #0a0c15;
    --accent-soft: #1f1d4a;
    --accent-line: #3f3b8f;
    --board: #171d42;
    --board-2: #222a5a;
    --board-3: #303a78;
    --ok: #34d17c;
    --warn: #ff8f45;
    --danger: #ff5a7a;
    --focus: #aaa5ff;
    --tint: 26%;
    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: 0 22px 60px -18px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0c15;
  --surface: #131726;
  --surface-2: #1a1f32;
  --surface-3: #242a40;
  --ink: #f2f3f9;
  --ink-2: #b3b8cc;
  --ink-3: #7c8299;
  --line: #22273a;
  --line-2: #30374f;
  --accent: #8f88ff;
  --accent-2: #aaa5ff;
  --accent-ink: #0a0c15;
  --accent-soft: #1f1d4a;
  --accent-line: #3f3b8f;
  --board: #171d42;
  --board-2: #222a5a;
  --board-3: #303a78;
  --ok: #34d17c;
  --warn: #ff8f45;
  --danger: #ff5a7a;
  --focus: #aaa5ff;
  --tint: 26%;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 22px 60px -18px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- Fächerfarben
   --sc   kräftige Farbe (Blöcke im Raster, Kennlinie)    --sc-ink  Schrift darauf
   --sc-soft  zarter Hintergrund                         --sc-text Schrift in Fachfarbe auf hellem Grund */

.sc-blue { --sc: #1f4fd8; --sc-ink: #fff; --sc-deep: #1a3fb0; }
.sc-yellow { --sc: #ffc619; --sc-ink: #3a2a00; --sc-deep: #7a5700; }
.sc-red { --sc: #d92636; --sc-ink: #fff; --sc-deep: #a3141f; }
.sc-green { --sc: #0f8a42; --sc-ink: #fff; --sc-deep: #0b6a32; }
.sc-orange { --sc: #ff7a1a; --sc-ink: #3b1600; --sc-deep: #a54406; }
.sc-teal { --sc: #0b7f7b; --sc-ink: #fff; --sc-deep: #075f5c; }
.sc-violet { --sc: #7a3ff2; --sc-ink: #fff; --sc-deep: #5426c4; }
.sc-pink { --sc: #c9216f; --sc-ink: #fff; --sc-deep: #9c1556; }
.sc-brown { --sc: #94562a; --sc-ink: #fff; --sc-deep: #6e3c16; }
.sc-sky { --sc: #3bb8f5; --sc-ink: #032c45; --sc-deep: #0a6aa0; }
.sc-lime { --sc: #8cc616; --sc-ink: #1f3200; --sc-deep: #4b7406; }
.sc-slate { --sc: #56607a; --sc-ink: #fff; --sc-deep: #3c445a; }
.sc-fuchsia { --sc: #b832d6; --sc-ink: #fff; --sc-deep: #8a1fa3; }
:root, .sc-blue, .sc-yellow, .sc-red, .sc-green, .sc-orange, .sc-teal, .sc-violet, .sc-pink, .sc-brown, .sc-sky, .sc-lime, .sc-slate, .sc-fuchsia {
  --sc-soft: color-mix(in srgb, var(--sc) var(--tint), var(--surface));
  --sc-text: var(--sc-deep);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]), :root:not([data-theme="light"]) :is(.sc-blue, .sc-yellow, .sc-red, .sc-green, .sc-orange, .sc-teal, .sc-violet, .sc-pink, .sc-brown, .sc-sky, .sc-lime, .sc-slate, .sc-fuchsia) {
    --sc-text: color-mix(in srgb, var(--sc) 45%, #fff);
  }
}
:root[data-theme="dark"], :root[data-theme="dark"] :is(.sc-blue, .sc-yellow, .sc-red, .sc-green, .sc-orange, .sc-teal, .sc-violet, .sc-pink, .sc-brown, .sc-sky, .sc-lime, .sc-slate, .sc-fuchsia) {
  --sc-text: color-mix(in srgb, var(--sc) 45%, #fff);
}

/* ---------------------------------------------------------------- Grundlagen */

* { box-sizing: border-box; }
/* "hidden" muss immer gewinnen – sonst überschreibt z. B. display:flex es und unsichtbare Ebenen schlucken Klicks */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-ui);
  font-feature-settings: "cv11", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  overscroll-behavior-y: contain;
}
body.focus-mode { padding-bottom: 24px; }
body.sheet-open { overflow: hidden; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.muted { color: var(--ink-3); }
.small { font-size: 0.85rem; }
.warn { color: var(--warn); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.sign { font-family: var(--font-sign); font-weight: 700; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

main { max-width: 760px; margin: 0 auto; outline: none; padding: 0 16px; }
.page { padding: 8px 0 24px; }
.page-title {
  font: 800 1.85rem/1.12 var(--font-ui);
  letter-spacing: -0.035em;
  margin: 12px 0 8px;
}
.page-lead { color: var(--ink-2); margin: 0 0 18px; font-size: 1rem; }
.page-foot { text-align: center; color: var(--ink-3); margin: 20px 0 0; font-size: 0.9rem; }
.page-foot a, .page-lead a { color: var(--accent); font-weight: 600; text-decoration: none; }
.empty-state { text-align: center; padding-top: 48px; }
.empty-state .btn { margin-top: 16px; }
/* Nur im Browser bzw. nur in der installierten App sichtbar */
[data-display="app"] .web-only, [data-display="web"] .app-only { display: none !important; }

/* ---------------------------------------------------------------- Kopf, Banner, Tabs */

.appbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  max-width: 760px; margin: 0 auto;
  padding: calc(6px + env(safe-area-inset-top)) 8px 6px 16px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
}
.appbar-title {
  font: 650 0.8rem/1.2 var(--font-ui);
  letter-spacing: 0.02em; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.focus-mode .appbar { visibility: hidden; height: calc(12px + env(safe-area-inset-top)); padding: 0; }
.appbar-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.account-btn { text-decoration: none; border-radius: 50%; }
.account-btn svg { width: 24px; height: 24px; }
.account-btn[aria-current] .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.account-btn:not(.is-account)[aria-current], .icon-btn[aria-current] { color: var(--accent); }

.icon-btn {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px;
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.spinning svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.banner {
  max-width: 728px; margin: 0 auto 8px; padding: 10px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--warn) 9%, var(--surface)); color: var(--ink);
  font-size: 0.9rem; border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
}
@media (max-width: 760px) { .banner { margin: 0 16px 8px; } }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
  padding: 0 6px env(safe-area-inset-bottom);
}
.focus-mode .tabbar { display: none; }
.tab-brand { display: none; }
.tabbar a[data-tab] {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 9px; color: var(--ink-3); text-decoration: none;
  font-size: 0.7rem; font-weight: 650; letter-spacing: 0.01em;
}
.tab-icon { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 15px; transition: background 0.2s var(--ease), color 0.2s; }
.tabbar svg { width: 23px; height: 23px; }
.tabbar a[aria-current] { color: var(--ink); }
.tabbar a[aria-current] .tab-icon { background: var(--accent-soft); color: var(--accent); }
.tabbar a:active .tab-icon { transform: scale(0.94); }
.badge {
  position: absolute; top: 3px; left: calc(50% + 9px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--danger); color: #fff; font: 700 11px/18px var(--font-ui); font-style: normal; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}

.pull {
  position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 50%; z-index: 40;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-lg);
  transform: translate(-50%, -48px); opacity: 0;
  transition: transform 0.2s var(--ease), opacity 0.2s, background 0.15s, color 0.15s;
}
.pull svg { width: 21px; height: 21px; }
.pull.ready { background: var(--accent); color: var(--accent-ink); }
.pull.spinning svg { animation: spin 0.8s linear infinite; }

/* ---------------------------------------------------------------- Bausteine */

.card {
  display: block; margin: 0 0 14px; padding: 18px;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.card-title { font: 700 1.05rem/1.25 var(--font-ui); letter-spacing: -0.015em; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card-accent { background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); border-color: var(--accent-line); }
.card > p + p { margin-top: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 20px; border: 0; border-radius: 14px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgb(12 15 29 / 0.1), 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgb(255 255 255 / 0.16);
  transition: transform 0.12s var(--ease), background 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: scale(0.97); }
.btn-block { width: 100%; margin-top: 6px; }
.btn-quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-sm); }
.btn-quiet:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: none; }
.btn-danger-quiet { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger-quiet:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 1.04rem; border-radius: 16px; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 0.9rem; border-radius: 11px; }
.btn:disabled { opacity: 0.55; cursor: progress; transform: none; }
.btn .icon { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.chip {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.74rem; font-weight: 650; vertical-align: 1px; white-space: nowrap;
}
.chip-warn, .chip-removed { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); box-shadow: none; }
.chip-added { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); box-shadow: none; }
.chip-changed { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.chip-live { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.chip-btn { cursor: pointer; border: 0; font-size: 0.9rem; padding: 6px 12px; }
.chip-subject { background: var(--sc-soft); color: var(--sc-text); box-shadow: none; }
.chip-type { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.course-text .chip-type { font-size: 0.7rem; margin-right: 2px; vertical-align: 1px; }

.segmented { display: flex; gap: 2px; padding: 3px; margin: 0 0 14px; background: var(--surface-2); border-radius: 13px; box-shadow: inset 0 0 0 1px var(--line); }
.segmented > button, .segmented > a {
  flex: 1; min-height: 36px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--ink-3); font-weight: 650; font-size: 0.92rem; cursor: pointer; text-decoration: none;
}
.segmented > [aria-pressed="true"], .segmented > [aria-current] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.seg-count { font-size: 0.75rem; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-3); color: var(--ink-2); line-height: 20px; }

.form { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 650; font-size: 0.9rem; margin-top: 6px; display: block; }
.field-label:first-child { margin-top: 0; }
.field-hint { color: var(--ink-3); font-size: 0.8rem; margin: -2px 0 2px; }
.field-hint .ok { color: var(--ok); font-weight: 650; }
.field-hint .warn { font-weight: 650; }
.field-row { display: flex; gap: 8px; }
input[type="text"], input[type="password"], input[type="search"], input[type="email"], input[type="date"], select, textarea.input {
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 14px; border-radius: 13px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input:disabled { opacity: 0.6; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.code-input { font: 700 1.6rem/1 var(--font-sign); letter-spacing: 0.4em; text-align: center; }
.form-error {
  margin-top: 6px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 8%, var(--surface)); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); font-size: 0.92rem;
}
.form-error a { color: var(--accent); font-weight: 650; }
.form-ok {
  margin-top: 6px; padding: 10px 12px; border-radius: 12px; font-size: 0.92rem;
  background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
}
.spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; vertical-align: -3px;
}
.route-empty .spinner { margin-right: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--ink-2); text-decoration: none; font-weight: 650; }
.check { display: flex; gap: 10px; align-items: center; margin: 14px 0 4px; font-weight: 650; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }

.help summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.help summary::-webkit-details-marker { display: none; }
.help summary::after { content: "+"; font: 300 1.5rem/1 var(--font-ui); color: var(--ink-3); transition: transform 0.2s var(--ease); }
.help[open] summary::after { transform: rotate(45deg); }
.help ul { padding-left: 18px; margin: 10px 0; }
.help li { margin-bottom: 8px; color: var(--ink-2); }
.help p { margin-top: 10px; color: var(--ink-2); }

.icon { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.12em; }
.link-btn { border: 0; background: none; padding: 4px 0; color: var(--accent); font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.eyebrow { font: 700 0.74rem/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow.is-today { color: var(--accent); }
.eyebrow-count { font-size: 0.84rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Kopf einer Ansicht + Wochenleiste */

.dayhead { display: flex; align-items: center; gap: 4px; margin: 4px -8px 12px; }
.dayhead-text { flex: 1; text-align: center; min-width: 0; }
.dayhead-title { font: 800 1.7rem/1.1 var(--font-ui); letter-spacing: -0.035em; }
.dayhead-sub { color: var(--ink-3); font-size: 0.9rem; margin-top: 3px; font-variant-numeric: tabular-nums; }
.dayhead-sub a { color: var(--accent); font-weight: 650; text-decoration: none; }
.nav-arrow {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  color: var(--ink-2); text-decoration: none;
}
.nav-arrow svg { width: 22px; height: 22px; }
.nav-arrow:hover { background: var(--surface); color: var(--ink); }

.weekstrip {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin: 0 0 16px; padding: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
}
.ws-day {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0 7px; border-radius: 14px; text-decoration: none; color: var(--ink-2);
  transition: background 0.15s;
}
.ws-day:hover { background: var(--surface-2); }
.ws-day.weekend { color: var(--ink-3); }
.ws-wd { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; }
.ws-num { font: 700 1.08rem/1.2 var(--font-ui); font-variant-numeric: tabular-nums; }
.ws-dots { display: flex; gap: 2px; height: 5px; }
.ws-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--sc); }
.ws-day.today .ws-num { color: var(--accent); }
.ws-day.sel { background: var(--ink); color: var(--bg); }
.ws-day.sel .ws-num { color: var(--bg); }
.ws-day.sel .ws-dots i { box-shadow: 0 0 0 1px var(--ink); }

/* ---------------------------------------------------------------- Die Tafel: Jetzt / Als Nächstes */

.board {
  position: relative; display: block; margin: 0 0 12px; padding: 16px 16px 16px;
  background: var(--board); color: var(--board-ink);
  border-radius: 22px; box-shadow: var(--shadow-lg);
  text-decoration: none; overflow: hidden; isolation: isolate;
}
.board::before {
  /* feines Raster wie auf einer Anzeigetafel */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image: radial-gradient(color-mix(in srgb, var(--board-ink) 9%, transparent) 1px, transparent 1.2px);
  background-size: 7px 7px;
  mask-image: linear-gradient(160deg, #000 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 70%);
}
.board-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.board-label {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 0.76rem/1.2 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--board-dim);
}
.board-now .board-label { color: var(--board-ink); }
.board-count {
  font: 700 1.15rem/1 var(--font-sign); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; white-space: nowrap;
  padding: 6px 11px 5px; border-radius: 10px; background: var(--board-2); color: var(--board-ink);
}
.board-soon .board-count, .board-now .board-count { background: var(--hl); color: #241a00; }
.board-entry { display: block; text-decoration: none; color: inherit; }
.board-entry + .board-entry { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--board-3); }
.board-title { display: flex; align-items: flex-start; gap: 10px; font: 750 1.32rem/1.2 var(--font-ui); letter-spacing: -0.025em; }
.board-swatch { flex-shrink: 0; width: 12px; height: 12px; margin-top: 0.42em; border-radius: 4px; background: var(--sc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 35%, transparent); }
.board-meta { color: var(--board-dim); font-size: 0.88rem; margin: 3px 0 0 22px; }
.board-cells { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 6px; margin-top: 14px; container-type: inline-size; }
.board-cell { min-width: 0; padding: 9px 12px 10px; border-radius: 12px; background: var(--board-2); position: relative; overflow: hidden; }
.board-cell small { display: block; font: 650 0.66rem/1.2 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--board-dim); }
.board-cell b {
  /* so groß, dass "11:00–12:30" in die Zelle passt */
  display: block; margin-top: 4px; font: 700 clamp(1.2rem, calc(10cqw - 4px), 2.3rem)/1 var(--font-sign); letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.board-cell b.is-long { font-size: clamp(1.05rem, calc(6.5cqw - 2px), 1.5rem); line-height: 1.2; white-space: normal; overflow-wrap: anywhere; }
.board-until { font-size: 0.62em; color: var(--board-dim); margin-left: 0.15em; }
.board-cell .room-ico { display: inline-block; width: 0.62em; height: 0.62em; margin-right: 0.12em; vertical-align: 0.06em; color: var(--sc); }
.board-progress { display: flex; align-items: center; gap: 10px; margin-top: 14px; font: 650 0.78rem/1 var(--font-ui); color: var(--board-dim); font-variant-numeric: tabular-nums; }
.board-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--board-2); overflow: hidden; }
.board-bar span { display: block; height: 100%; border-radius: 3px; background: var(--hl); transition: width 0.6s var(--ease); }
.board-foot { margin-top: 12px; color: var(--board-dim); font-size: 0.86rem; }
a.board:active, .board-entry:active { transform: scale(0.995); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hl); animation: live 1.8s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hl) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }

/* Fallblatt: Zeichen rollen durch, bis das richtige steht (Startbild, Beispiel auf der Startseite) */
.flaps { display: inline-flex; gap: 2px; }
.flap {
  position: relative; display: inline-block; height: 1.1em; width: 0.62em; overflow: hidden;
  border-radius: 0.09em; background: var(--board-2); text-align: center; line-height: 1.1em;
}
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgb(0 0 0 / 0.35); }
.flap > span { display: flex; flex-direction: column; animation: flap-roll calc(var(--n) * 55ms) steps(var(--n)) calc(var(--d, 0) * 1ms) both; }
.flap > span > i { font-style: normal; height: 1.1em; flex-shrink: 0; }
@keyframes flap-roll { from { transform: translateY(0); } to { transform: translateY(calc(var(--n) * -1.1em)); } }
.flap.space { background: transparent; width: 0.32em; }
.flap.space::after { display: none; }

/* ---------------------------------------------------------------- Heute: freier Tag, Feierabend */

.today-main, .today-aside { min-width: 0; }
.freeday {
  position: relative; margin: 4px 0 12px; padding: 22px 20px 20px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden;
}
.freeday::after {
  /* großer, angeschnittener Haken bzw. Mond als ruhiges Bildzeichen */
  content: ""; position: absolute; right: -38px; top: -48px; width: 124px; height: 124px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--hl) 85%, #fff), var(--hl) 60%);
  opacity: 0.9;
}
.freeday.is-done::after { background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 40%, #fff), var(--accent) 65%); opacity: 0.18; }
.freeday > * { position: relative; z-index: 1; }
.freeday-kicker { font: 700 0.74rem/1.2 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.freeday-title { font: 800 clamp(1.9rem, 8vw, 2.5rem)/1.05 var(--font-ui); letter-spacing: -0.045em; margin: 8px 0 10px; max-width: 12ch; }
.freeday-lead { color: var(--ink-2); font-size: 1.02rem; max-width: 30ch; }
.freeday-todos { margin-top: 16px; }
.freeday-todos .eyebrow { margin-bottom: 8px; }
.freeday .quickadd { margin-top: 14px; }
.next-day {
  display: flex; align-items: center; gap: 14px; margin: 0 0 12px; padding: 14px 16px;
  border-radius: 20px; background: var(--board); color: var(--board-ink); box-shadow: var(--shadow);
}
.next-day-text { flex: 1; min-width: 0; }
.next-day small { display: block; font: 700 0.7rem/1.2 var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--board-dim); }
.next-day b { display: block; margin-top: 4px; font: 700 1.55rem/1.05 var(--font-sign); letter-spacing: 0.01em; }
.next-day-in { flex-shrink: 0; font: 700 1.05rem/1 var(--font-sign); padding: 7px 11px 6px; border-radius: 10px; background: var(--board-2); white-space: nowrap; }
.next-day.is-far b { font-size: 1.3rem; }
.route-past { margin-top: 6px; }
.route-past > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 10px 2px; color: var(--ink-2); font-weight: 650; }
.route-past > summary::-webkit-details-marker { display: none; }
.route-past > summary::after { content: "+"; font: 300 1.4rem/1 var(--font-ui); color: var(--ink-3); }
.route-past[open] > summary::after { content: "–"; }

/* ---------------------------------------------------------------- Der Tag als Zeitleiste */

.route { margin: 18px 0 8px; }
.route-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 10px; }
.route-empty { color: var(--ink-3); padding: 18px 0; text-align: center; }
.route-empty.small { padding: 4px 0 8px; text-align: left; }

.route-list { list-style: none; margin: 0; padding: 0; position: relative; }
.stop a {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: start; column-gap: 12px;
  padding: 12px 12px 12px 14px; margin: 0 0 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm);
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
  transition: border-color 0.15s, transform 0.12s var(--ease);
}
.stop a::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--sc);
}
.stop a:active { transform: scale(0.99); }
.stop-time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; padding-top: 1px; }
.stop-time b { font: 700 1.25rem/1.05 var(--font-sign); letter-spacing: 0.01em; }
.stop-time span { font: 600 0.95rem/1.2 var(--font-sign); color: var(--ink-3); letter-spacing: 0.01em; }
.stop-allday { font-size: 0.72rem; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 3px; }
.stop-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.stop-title { font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.stop-meta { font-size: 0.84rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stop-room {
  align-self: center; display: inline-flex; align-items: center; gap: 3px; max-width: 9.5em;
  font: 700 1.05rem/1 var(--font-sign); letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
  padding: 7px 9px 6px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--sc-soft); color: var(--sc-text);
}
.stop-room .icon { width: 13px; height: 13px; flex-shrink: 0; }
.stop-room.is-inline { align-self: flex-start; max-width: 100%; margin-top: 4px; font-size: 0.98rem; white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
.stop-progress { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.stop-progress span { display: block; height: 100%; background: var(--sc); border-radius: 2px; }
.stop.past a { opacity: 0.52; box-shadow: none; }
.stop.current a { border-color: color-mix(in srgb, var(--sc) 55%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--sc) 55%, transparent), var(--shadow); }
.stop.cancelled .stop-title { text-decoration: line-through; text-decoration-thickness: 2px; }
.stop.cancelled a { opacity: 0.7; }
.stop.cancelled a::before { background: repeating-linear-gradient(-45deg, var(--sc) 0 4px, transparent 4px 8px); }
.stop a:hover { border-color: var(--line-2); }
.stop-note {
  font-size: 0.82rem; color: var(--ink-2); padding: 3px 8px; margin-top: 3px; border-radius: 7px;
  background: var(--surface-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stop-gap {
  display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; padding: 0 4px 0 14px;
  color: var(--ink-3); font-size: 0.82rem; font-variant-numeric: tabular-nums;
}
.stop-gap::after { content: ""; flex: 1; border-top: 1px dashed var(--line-2); }
.now-marker {
  display: flex; align-items: center; gap: 8px; margin: 2px 0 10px;
  color: var(--accent); font: 700 0.8rem/1 var(--font-ui); font-variant-numeric: tabular-nums;
}
.now-marker::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.now-marker::after { content: ""; flex: 1; height: 2px; border-radius: 1px; background: var(--accent); opacity: 0.55; }
.day-stamp { margin: 18px 0 0; text-align: center; color: var(--ink-3); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
@media (max-width: 360px) {
  .stop a { grid-template-columns: 46px minmax(0, 1fr); }
  .stop-room { grid-column: 2; justify-self: start; margin-top: 6px; }
}

/* ---------------------------------------------------------------- Wochenraster */

.grid {
  margin: 0 -8px 16px; padding: 0 0 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm);
  overflow: clip;
}
.grid-head, .grid-body, .grid-allday { display: grid; grid-template-columns: 38px repeat(var(--days), minmax(0, 1fr)); }
.grid-head {
  position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 5;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 6px 0; border-bottom: 1px solid var(--line);
}
.grid-head a {
  display: flex; flex-direction: column; align-items: center; margin: 0 2px; min-width: 0;
  color: var(--ink-3); text-decoration: none; padding: 4px 0; border-radius: 11px;
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.grid-head a b { font: 700 1.08rem/1.2 var(--font-ui); color: var(--ink); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.grid-head a.today { background: var(--ink); color: var(--bg); }
.grid-head a.today b { color: var(--bg); }
.grid-gutter { font-size: 0.6rem; color: var(--ink-3); text-align: right; padding: 4px 6px 0 0; }
.grid-allday { align-items: start; padding: 4px 0; border-bottom: 1px solid var(--line); }
.grid-allday > div { display: flex; flex-direction: column; gap: 2px; padding: 0 1px; min-width: 0; }
.ad {
  display: block; padding: 3px 5px; border-radius: 6px; font-size: 0.68rem; font-weight: 650;
  background: var(--sc); color: var(--sc-ink); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ad.cancelled { text-decoration: line-through; opacity: 0.6; }
.grid-body { padding-top: 10px; }
.hours { position: relative; }
.hours span {
  position: absolute; right: 6px; transform: translateY(-50%);
  font: 600 0.74rem/1 var(--font-sign); color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.hours .now-label {
  right: 2px; z-index: 3; padding: 2px 4px; border-radius: 5px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700;
}
.col {
  position: relative; border-left: 1px solid var(--line); min-width: 0;
  /* Volle Stunden durchgezogen, halbe Stunden fein gestrichelt */
  background-image:
    repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour)),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) / 2), color-mix(in srgb, var(--line) 55%, transparent) calc(var(--hour) / 2) calc(var(--hour) / 2 + 1px), transparent calc(var(--hour) / 2 + 1px) var(--hour));
}
.col.today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
/* Ein Termin im Raster. Name, Uhrzeit (Beginn–Ende) und Raum; wie viele Zeilen der Name bekommt, misst
   fitBlocks() (week.js) nach dem Zeichnen. Schmale Blöcke: Kürzel statt Name, Uhrzeit untereinander. */
.block {
  position: absolute; overflow: hidden; padding: 4px 4px 4px 6px; border-radius: 8px;
  background: var(--sc); color: var(--sc-ink); text-decoration: none; font-size: 0.7rem; line-height: 1.2;
  container-type: inline-size;
  display: flex; flex-direction: column; gap: 1px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.06);
}
.block:active { filter: brightness(0.95); }
/* Tutorium, Vorkurs, Info: zart statt kräftig – die eigentliche Veranstaltung bleibt der Blickfang */
.block.is-extra { background: var(--sc-soft); color: var(--sc-text); box-shadow: inset 3px 0 0 var(--sc), inset 0 0 0 1px color-mix(in srgb, var(--sc) 30%, transparent); }
.block > span { min-width: 0; flex-shrink: 0; }
.b-title {
  font-weight: 700; letter-spacing: -0.01em; overflow-wrap: break-word; hyphens: auto;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--lines, 2); overflow: hidden;
}
.b-short, .b-vt { display: none; }
.b-time { font: 600 0.78rem/1.15 var(--font-sign); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.b-to::before { content: "–"; }
.b-room { font: 700 0.8rem/1.15 var(--font-sign); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: auto; }
.b-sub { font-size: 0.64rem; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block.no-room .b-room, .block.no-time .b-time, .block.no-sub .b-sub { display: none; }
/* Kurzer, schmaler Termin: "11:30–12:15" etwas kleiner in einer Zeile statt untereinander */
.block.time-inline .b-time { font-size: 0.7rem; letter-spacing: -0.01em; }
.block.time-inline .b-to { display: inline; }
/* Sehr kurze Termine (unter 20 Minuten): eine kleine Zeile */
.block.is-tiny { flex-direction: row; align-items: center; gap: 4px; padding: 0 4px 0 6px; font-size: 0.6rem; line-height: 1; border-radius: 4px; }
.block.is-tiny .b-title { -webkit-line-clamp: 1; flex: 1; }
.block.is-tiny .b-time, .block.is-tiny .b-sub, .block.is-tiny .b-room { display: none; }
.block.is-tiny.is-exam::after, .block.is-tiny.has-note::after { display: none; }
@container (max-width: 96px) {
  .b-full { display: none; }
  .b-short { display: inline; }
}
/* Schmal: Beginn und Ende untereinander ("08:00" / "–10:30"), damit beides ganz zu lesen ist */
@container (max-width: 76px) {
  .b-to { display: block; }
  .b-title { font-size: 0.94em; letter-spacing: -0.02em; }
}
/* Sehr schmal (mehrere Termine nebeneinander): Kürzel und Uhrzeit hochkant */
@container (max-width: 26px) {
  .b-full, .b-room, .b-sub, .b-time { display: none; }
  .b-short { display: inline; }
  .b-vt { display: block; font: 600 0.95em/1.15 var(--font-sign); letter-spacing: 0.02em; }
  /* Die Ränder des Blocks mitnutzen (der Block selbst lässt sich hier nicht umstylen) */
  .b-title { display: block; writing-mode: vertical-rl; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 100%; font-size: 0.95em; line-height: 1.15; margin: 0 -3px 0 -5px; text-align: start; }
}
.block.past { opacity: 0.62; }
.block.current { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sc); z-index: 1; }
.block.cancelled .b-title { text-decoration: line-through; }
.block.cancelled { opacity: 0.5; background: repeating-linear-gradient(-45deg, var(--sc) 0 6px, color-mix(in srgb, var(--sc) 70%, var(--surface)) 6px 12px); }
/* Mehrere Termine gleichzeitig: Wären sie nebeneinander schmaler als gut lesbar (unter ca. 60 px), zeigt die
   Spalte statt der Streifen einen Sammelblock mit allen Terminen untereinander (cn-N = N nebeneinander). */
.col { container: day / inline-size; }
.block.clbox {
  display: none; gap: 2px; padding: 2px; z-index: 1;
  background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2);
}
.cl-row {
  display: flex; flex-direction: column; flex: 1 0 auto; /* füllen den Block, statt Leerraum zu lassen */ padding: 3px 3px 3px 5px; border-radius: 6px;
  background: var(--sc); color: var(--sc-ink); text-decoration: none; font-size: 0.66rem; line-height: 1.15;
}
.cl-row b { font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-time { font: 600 0.68rem/1.15 var(--font-sign); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.cl-row.past { opacity: 0.62; }
.cl-row.cancelled { opacity: 0.5; }
.cl-row.cancelled b { text-decoration: line-through; }
.cl-row.current { box-shadow: inset 0 0 0 2px var(--surface); }
.cl-more { flex-shrink: 0; padding: 1px 4px; font: 700 0.66rem/1.3 var(--font-ui); color: var(--ink-2); text-decoration: none; }
@container day (max-width: 123px) { .block.in-cl.cn-2 { display: none; } .block.clbox.cn-2 { display: flex; } }
@container day (max-width: 185px) { .block.in-cl.cn-3 { display: none; } .block.clbox.cn-3 { display: flex; } }
@container day (max-width: 247px) { .block.in-cl.cn-4 { display: none; } .block.clbox.cn-4 { display: flex; } }
@container day (max-width: 309px) { .block.in-cl.cn-5 { display: none; } .block.clbox.cn-5 { display: flex; } }
/* Breiter Sammelblock: Name links, Uhrzeit rechts in einer Zeile */
@container day (min-width: 150px) {
  .cl-row { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 6px; padding: 4px 6px 4px 7px; font-size: 0.74rem; }
  .cl-time { flex-shrink: 0; white-space: nowrap; font-size: 0.8rem; }
}
/* Sehr schmale Tagesspalten (kleines Handy, ganze Woche): weniger Rand, damit Kürzel und Uhrzeit waagerecht passen */
@container day (max-width: 50px) {
  .block:not(.clbox):not(.is-tiny) { padding: 3px 2px 3px 4px; }
  .block .b-time { font-size: 0.72rem; letter-spacing: 0; }
  .block .b-title { font-size: 0.64rem; letter-spacing: -0.02em; }
}
.nowline { position: absolute; left: -1px; right: 0; height: 2px; background: var(--accent); z-index: 2; pointer-events: none; }
.nowline::before { content: ""; position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.block.is-exam::after {
  content: "!"; position: absolute; right: 3px; top: 3px; width: 14px; height: 14px; border-radius: 4px;
  background: var(--ink); color: var(--bg); font: 800 0.62rem/14px var(--font-ui); text-align: center;
}
.block.has-note:not(.is-exam)::after {
  content: ""; position: absolute; right: 4px; top: 4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--sc-ink); opacity: 0.85;
}
.week-day { margin-top: 14px; }
.week-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.week-stats span {
  font-size: 0.8rem; font-weight: 650; color: var(--ink-2); padding: 4px 10px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums;
}
.week-stats span:first-child { background: var(--accent-soft); color: var(--accent); box-shadow: none; }

/* ---------------------------------------------------------------- Blatt (Details) */

.sheet-root {
  position: fixed; inset: 0; z-index: 50;
  background: rgb(8 10 14 / 0); transition: background 0.26s var(--ease);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-root.open { background: rgb(8 10 14 / 0.45); }
.sheet {
  width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink);
  border-radius: 26px 26px 0 0; box-shadow: 0 -12px 40px rgb(0 0 0 / 0.2);
  transform: translateY(105%); transition: transform 0.32s var(--ease);
  outline: none; padding-bottom: env(safe-area-inset-bottom);
}
.sheet-root.open .sheet { transform: translateY(0); }
.sheet.dragging { transition: none; }
.sheet-grip { display: grid; place-items: center; padding: 10px 0 4px; cursor: grab; touch-action: none; }
.sheet-grip span { width: 38px; height: 5px; border-radius: 3px; background: var(--line-2); }
.sheet-body { overflow-y: auto; padding: 0 20px 24px; position: relative; overscroll-behavior: contain; }
.sheet-x {
  position: absolute; right: 14px; top: 0; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: var(--surface-2); color: var(--ink-2); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.sheet-missing { padding: 24px 0; color: var(--ink-3); }
@media (min-width: 700px) {
  .sheet-root { align-items: center; }
  .sheet { border-radius: 26px; max-height: 86vh; }
  .sheet-grip { display: none; }
  .sheet-body { padding-top: 20px; }
  .sheet-x { top: 14px; }
}

.event { padding-top: 2px; }
.ev-status {
  display: inline-flex; align-items: center; gap: 7px; margin: 4px 48px 10px 0;
  font: 700 0.74rem/1.2 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
}
.ev-status.is-now { color: var(--accent); }
.ev-status.is-now .live-dot { background: var(--accent); }
.ev-status.is-cancelled { color: var(--danger); }
.event-title { display: flex; gap: 10px; font: 800 1.5rem/1.2 var(--font-ui); letter-spacing: -0.03em; margin-right: 40px; }
.event-title::before { content: ""; flex-shrink: 0; width: 6px; border-radius: 3px; background: var(--sc); }
.event-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ev-key { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin: 16px 0 4px; }
.ev-key > div { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); min-width: 0; container-type: inline-size; }
.ev-key small { display: block; font-size: 0.72rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; }
.ev-key b { display: block; font: 700 clamp(1.2rem, 17cqw, 1.9rem)/1.1 var(--font-sign); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; margin-top: 3px; overflow-wrap: anywhere; }
.ev-key span { display: block; font-size: 0.84rem; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.ev-key .ev-room { background: var(--sc); color: var(--sc-ink); }
.ev-key .ev-room small { color: inherit; opacity: 0.8; }
.facts { margin: 12px 0; padding: 2px 14px; background: var(--surface-2); border-radius: 16px; }
.fact { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.fact dt { width: 104px; flex-shrink: 0; color: var(--ink-3); font-size: 0.9rem; }
.fact dd { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.facts-plain { background: none; padding: 0; margin: 0 0 8px; }
.notes { background: var(--surface-2); border-radius: 16px; padding: 12px 14px; color: var(--ink-2); font-size: 0.94rem; }
.notes p { margin: 0 0 6px; overflow-wrap: anywhere; }
.notes p:last-child { margin: 0; }
.notes a { color: var(--accent); font-weight: 650; }
.event-next { margin: 22px 0 6px; }
.event-series { list-style: none; padding: 0; margin: 0; }
.event-series button {
  width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  padding: 11px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.event-series-room { font: 700 1rem/1 var(--font-sign); color: var(--ink-2); min-width: 3.5em; text-align: right; }
.personal { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.personal .eyebrow { display: block; margin-bottom: 6px; }
.note-input {
  width: 100%; min-height: 64px; padding: 10px 12px; border-radius: 13px; resize: vertical;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit;
}
.note-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.personal-tasks { margin-top: 14px; }
.personal .todo-list { margin-top: 6px; }
.personal-locked { margin-top: 18px; padding: 12px 14px; border-radius: 13px; background: var(--surface-2); color: var(--ink-2); font-size: 0.92rem; }
.sheet-form .event-title { margin: 6px 44px 10px 0; }
.sheet-form .event-title::before { display: none; }
.sheet-form textarea.input { min-height: 160px; }

/* ---------------------------------------------------------------- Hinweis unten */

.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: calc(100% - 32px); padding: 11px 16px; border-radius: 13px;
  background: var(--ink); color: var(--bg); font-size: 0.92rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 16px); opacity: 0; transition: transform 0.22s var(--ease), opacity 0.22s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: var(--danger); color: #fff; }
.focus-mode .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }

/* ---------------------------------------------------------------- To-dos & Notizen */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.quickadd {
  display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; margin: 0 0 16px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-sm);
}
.quickadd:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.quickadd input { border: 0; padding: 0; min-height: 44px; background: transparent; box-shadow: none !important; }
.quickadd .btn { min-height: 42px; padding: 8px 14px; border-radius: 12px; }
.quickadd-more { color: var(--ink-3); }
.todo-group { margin: 0 0 16px; }
.todo-group > .eyebrow { margin: 0 0 8px 2px; display: flex; gap: 8px; align-items: center; }
.todo-group.is-over > .eyebrow { color: var(--danger); }
.todo-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.todo {
  display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.todo-check {
  flex-shrink: 0; width: 50px; border: 0; background: none; cursor: pointer; position: relative;
}
.todo-check::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%);
  border-radius: 50%; box-shadow: inset 0 0 0 2px var(--sc); transition: background 0.15s, transform 0.2s var(--spring);
}
.todo-check[aria-pressed="true"]::before { background: var(--sc); }
.todo-check[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 11px; transform: translate(-50%, -62%) rotate(45deg);
  border: solid var(--sc-ink); border-width: 0 2.5px 2.5px 0;
}
.todo-check:active::before { transform: translate(-50%, -50%) scale(0.85); }
.todo-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 11px 14px 11px 0;
  border: 0; background: none; text-align: left; cursor: pointer; color: inherit; text-decoration: none;
}
.todo-text { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.todo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ink-3); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.todo-meta .dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--sc); margin-right: 2px; }
.todo-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.todo-meta .is-over { color: var(--danger); font-weight: 650; }
.todo-meta .is-today { color: var(--accent); font-weight: 650; }
.todo.is-done .todo-text { text-decoration: line-through; color: var(--ink-3); }
.todo.is-done { box-shadow: none; }
.todo-done { margin-top: 8px; }
.todo-done > summary { cursor: pointer; font-weight: 650; color: var(--ink-2); padding: 8px 2px; }
.todo-done .todo-list { margin-top: 6px; }
.deadlines { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 18px; padding: 2px 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.deadlines::-webkit-scrollbar { display: none; }
.deadline {
  flex: 0 0 auto; width: 184px; scroll-snap-align: start; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.deadline::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--sc); }
.deadline-days { display: flex; align-items: baseline; gap: 5px; }
.deadline-days b { font: 700 2rem/1 var(--font-sign); font-variant-numeric: tabular-nums; }
.deadline-days small { color: var(--ink-3); font-size: 0.8rem; font-weight: 650; }
.deadline-title { display: block; margin-top: 6px; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deadline-when { display: block; margin-top: 4px; color: var(--ink-3); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.deadline .chip { margin-top: 8px; }
.chip-exam { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip-deadline { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); color: var(--warn); box-shadow: none; }
.chip-talk { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.chip-task { background: var(--surface-2); color: var(--ink-2); }

.memo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; margin: 0 0 18px; }
.memo {
  display: flex; flex-direction: column; gap: 6px; min-height: 120px; padding: 14px; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); color: inherit;
  position: relative; overflow: hidden;
}
.memo.has-subject { background: linear-gradient(180deg, var(--sc-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--sc) 30%, var(--line)); }
.memo b { font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.memo p { color: var(--ink-2); font-size: 0.9rem; line-height: 1.45; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.memo small { margin-top: auto; color: var(--ink-3); font-size: 0.78rem; display: flex; gap: 6px; align-items: center; }
.memo-new { flex-direction: row; min-height: 60px; align-items: center; justify-content: center; border-style: dashed; color: var(--accent); font-weight: 650; box-shadow: none; background: transparent; }
@media (min-width: 560px) { .memo-new { flex-direction: column; min-height: 120px; } }
.memo-new svg { width: 26px; height: 26px; }
.lecture-notes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.lecture-note a {
  display: flex; gap: 12px; padding: 12px 14px; border-radius: 15px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.lecture-note a::before { content: ""; flex-shrink: 0; width: 5px; border-radius: 3px; background: var(--sc); }
.lecture-note span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lecture-note b { font-weight: 650; }
.lecture-note small { color: var(--ink-3); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.lecture-note p { color: var(--ink-2); font-size: 0.9rem; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.section-title { margin: 22px 0 10px; }
.locked {
  text-align: center; padding: 28px 20px 22px; border-radius: 24px; margin-bottom: 16px;
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 75%); border: 1px solid var(--accent-line);
}
.locked-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--accent); color: var(--accent-ink); margin-bottom: 14px; box-shadow: 0 10px 24px -10px var(--accent); }
.locked-icon svg { width: 28px; height: 28px; }
.locked h2 { font: 800 1.4rem/1.2 var(--font-ui); letter-spacing: -0.03em; margin-bottom: 8px; }
.locked p { color: var(--ink-2); max-width: 34ch; margin: 0 auto; }
.locked .actions { justify-content: center; margin-top: 18px; }
.subject-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.subject-pick label { display: inline-flex; }
.subject-pick input { position: absolute; opacity: 0; pointer-events: none; }
.subject-pick span {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); color: var(--ink-2); font-size: 0.86rem; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line);
}
.subject-pick span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--sc); }
.subject-pick .none span::before { display: none; }
.subject-pick input:checked + span { background: var(--sc-soft); color: var(--sc-text); box-shadow: inset 0 0 0 2px var(--sc); }
.subject-pick .none input:checked + span { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.subject-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.date-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.date-quick button { border: 0; cursor: pointer; padding: 7px 11px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 0.86rem; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.date-quick button[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }

/* ---------------------------------------------------------------- Suche */

.search-bar {
  position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 5;
  display: flex; align-items: center; gap: 8px; margin: 8px 0 16px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-sm);
}
.search-bar svg { width: 21px; height: 21px; color: var(--ink-3); flex-shrink: 0; }
.search-bar input { border: 0; background: transparent; padding-left: 0; min-height: 50px; font-size: 1.02rem; }
.search-bar input:focus-visible { outline: none; background: transparent; box-shadow: none; }
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.search-hint { margin-top: 8px; }
.results { margin-bottom: 18px; }
.results .eyebrow { margin-bottom: 8px; }
.result-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.result {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 15px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); text-decoration: none; color: inherit;
}
.result-bar { width: 5px; align-self: stretch; border-radius: 3px; background: var(--sc); }
.result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.result-text b { font-weight: 650; }
.result-text small { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result .stop-room { flex-shrink: 0; }
.result-jump { background: var(--accent-soft); border-color: var(--accent-line); }
.result-jump b { font-size: 1.05rem; }
.result-arrow { color: var(--accent); font: 700 1.2rem/1 var(--font-ui); }

/* Kopfzeile der Einstiegs- und Kontoseiten: Logo (oder Zurück) links, Kontostatus rechts */
.lp-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.03em; font-size: 1.1rem; text-decoration: none; color: var(--ink); }
.lp-logo { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; }
.lp-nav-actions { display: flex; align-items: center; gap: 8px; }
.lp-nav .btn { min-height: 40px; padding: 8px 14px; }
@media (max-width: 559px) { .lp-nav-start { display: none; } }

/* Große Bildschirme: links eine Bildseite (Tafel, Fächer), rechts Einstieg bzw. Konto */
.focus-art { display: none; }
@media (min-width: 1024px) {
  body.has-art { --art-w: min(44vw, 620px); }
  body.has-art .focus-art {
    display: flex; position: fixed; inset: 0 auto 0 0; width: var(--art-w); z-index: 0; overflow: hidden; isolation: isolate;
    align-items: center; justify-content: center; padding: 48px; background: var(--board); color: var(--board-ink);
  }
  body.has-art .focus-art::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.6;
    background-image: radial-gradient(color-mix(in srgb, var(--board-ink) 10%, transparent) 1px, transparent 1.2px); background-size: 9px 9px;
    mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000, transparent 80%);
  }
  body.has-art .focus-art::after {
    content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; left: 50%; top: 45%; translate: -50% -50%; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 38%, transparent), transparent 65%);
  }
  body.has-art #view { max-width: none; margin: 0 0 0 var(--art-w); padding: 0 clamp(24px, 5vw, 72px); }
  body.has-art #view > .page { max-width: 600px; margin: 0 auto; }
  body.has-art .toast { left: calc(var(--art-w) + (100% - var(--art-w)) / 2); }
  .focus-art-in { width: min(100%, 420px); display: flex; flex-direction: column; gap: 36px; }
  .focus-art-brand { display: flex; align-items: center; gap: 12px; font: 800 1.25rem/1 var(--font-ui); letter-spacing: -0.03em; }
  .focus-art-brand img { width: 40px; height: 40px; border-radius: 12px; }
  .focus-art-stage { position: relative; padding: 64px 0; }
  .focus-art-stage .board { margin: 0; background: var(--board-2); box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.55); animation: rise 0.7s var(--ease) both; }
  .focus-art-stage .board-cell { background: var(--board-3); }
  .focus-art-stage .onb-chip { z-index: 1; }
  /* drei Fächer über, drei unter der Tafel – nichts verdeckt ihren Inhalt */
  .focus-art-stage .onb-chip:nth-of-type(1) { left: 2%; top: 6px; right: auto; bottom: auto; }
  .focus-art-stage .onb-chip:nth-of-type(2) { left: 38%; top: 22px; right: auto; bottom: auto; }
  .focus-art-stage .onb-chip:nth-of-type(3) { right: 2%; top: 4px; left: auto; bottom: auto; }
  .focus-art-stage .onb-chip:nth-of-type(4) { left: 6%; bottom: 14px; right: auto; top: auto; }
  .focus-art-stage .onb-chip:nth-of-type(5) { left: 44%; bottom: 2px; right: auto; top: auto; }
  .focus-art-stage .onb-chip:nth-of-type(6) { right: 0; bottom: 20px; left: auto; top: auto; }
  .focus-art-tag { font: 700 clamp(2rem, 3.2vw, 2.8rem)/1.05 var(--font-sign); letter-spacing: 0.01em; color: var(--board-ink); }
}

/* ---------------------------------------------------------------- Einstieg in Schritten (#/start) */

.onb {
  max-width: 480px; margin: 0 auto; min-height: calc(100vh - 36px - env(safe-area-inset-top)); min-height: calc(100dvh - 36px - env(safe-area-inset-top));
  display: flex; flex-direction: column; padding-bottom: 8px;
}
.onb-top { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; min-height: 44px; margin: 2px 0 6px; }
.onb-back { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: 1.9rem; line-height: 1; }
.onb-back:hover { background: var(--surface); }
.onb-dots { display: flex; justify-content: center; gap: 7px; }
.onb-dots a { width: 8px; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--ink-3) 45%, transparent); transition: width 0.3s var(--ease), background 0.3s; }
.onb-dots a.on { width: 26px; background: var(--accent); }
.onb-skip { justify-self: end; padding: 8px 4px; color: var(--ink-3); font-weight: 650; font-size: 0.9rem; text-decoration: none; }
.onb-slide { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 8px 0 12px; }
.onb-slide > * { animation: rise 0.55s var(--ease) both; }
.onb-slide > :nth-child(2) { animation-delay: 0.06s; }
.onb-slide > :nth-child(3) { animation-delay: 0.12s; }
.onb-slide > :nth-child(4) { animation-delay: 0.18s; }
.onb-slide > :nth-child(5) { animation-delay: 0.24s; }
.onb-title { font: 850 clamp(1.9rem, 8.5vw, 2.4rem)/1.08 var(--font-ui); letter-spacing: -0.045em; margin: 18px 0 10px; }
.onb-lead { color: var(--ink-2); font-size: 1.05rem; line-height: 1.5; max-width: 30em; margin: 0 auto; }
.onb-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 0 calc(6px + env(safe-area-inset-bottom)); }
.onb-actions .btn { margin: 0; }
.onb-link { align-self: center; padding: 10px 12px; color: var(--ink-2); font-weight: 650; text-decoration: none; }
.onb-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.onb .legal-links { margin-top: 4px; }

/* Schritt 1: App-Symbol mit schwebenden Fächern */
.onb-hero { position: relative; width: min(300px, 82vw); height: 230px; margin: 0 auto; }
.onb-icon {
  position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; border-radius: 30px; transform: translate(-50%, -50%);
  box-shadow: 0 24px 50px -16px color-mix(in srgb, var(--accent) 70%, transparent);
  animation: pop 0.7s var(--spring) both;
}
.onb-chip {
  position: absolute; padding: 6px 12px; border-radius: 999px; background: var(--sc); color: var(--sc-ink);
  font: 700 0.84rem/1 var(--font-ui); box-shadow: var(--shadow);
  animation: chip-in 0.6s var(--spring) both, float 5s ease-in-out infinite;
  animation-delay: calc(0.25s + var(--k) * 0.08s), calc(var(--k) * -0.8s);
}
.onb-chip:nth-of-type(1) { left: 2%; top: 8%; }
.onb-chip:nth-of-type(2) { right: 0; top: 2%; }
.onb-chip:nth-of-type(3) { left: -2%; top: 46%; }
.onb-chip:nth-of-type(4) { right: 2%; top: 50%; }
.onb-chip:nth-of-type(5) { left: 12%; bottom: 2%; }
.onb-chip:nth-of-type(6) { right: 10%; bottom: 0; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(0.6); opacity: 0; } }
@keyframes chip-in { from { opacity: 0; scale: 0.6; } }
@keyframes float { 50% { translate: 0 -7px; } }

/* Schritt 2: was die App kann */
.onb-features { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.onb-features li {
  display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  animation: rise 0.5s var(--ease) both; animation-delay: calc(0.15s + var(--k) * 0.08s);
}
.onb-feature-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--sc); color: var(--sc-ink); }
.onb-feature-icon svg { width: 24px; height: 24px; }
.onb-features b { display: block; font-weight: 750; letter-spacing: -0.01em; }
.onb-features small { display: block; color: var(--ink-2); font-size: 0.88rem; line-height: 1.4; margin-top: 2px; }

/* Schritt 3 und 4: Symbol oben */
.onb-badge {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 20px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 16px 32px -14px var(--accent);
  animation: pop-in 0.6s var(--spring) both;
}
.onb-badge svg { width: 32px; height: 32px; }
@keyframes pop-in { from { transform: scale(0.6); opacity: 0; } }
.onb-pros { list-style: none; padding: 0; margin: 20px auto 0; display: flex; flex-direction: column; gap: 10px; text-align: left; max-width: 340px; }
.onb-pros li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; animation: rise 0.5s var(--ease) both; animation-delay: calc(0.15s + var(--k) * 0.07s); }
.onb-pros .icon { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--ok); color: #fff; flex-shrink: 0; margin-top: -1px; }
.onb-risk {
  display: flex; gap: 10px; align-items: flex-start; text-align: left; margin: 20px auto 0; max-width: 360px; padding: 12px 14px; border-radius: 15px; font-size: 0.88rem;
  background: color-mix(in srgb, var(--warn) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent);
}
.onb-risk .icon { color: var(--warn); width: 18px; height: 18px; margin-top: 1px; }
.onb-risk.is-info { background: var(--accent-soft); border-color: var(--accent-line); }
.onb-risk.is-info .icon { color: var(--accent); }
.onb-setup { justify-content: flex-start; text-align: left; }
.onb-setup .onb-badge { margin: 8px 0 0; }
.onb-setup .onb-title { margin-top: 14px; }
.onb-setup .onb-lead { margin: 0; }
.onb-steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 8px; }
.onb-steps li { counter-increment: step; display: flex; gap: 12px; align-items: center; font-size: 0.95rem; color: var(--ink-2); }
.onb-steps li::before {
  content: counter(step); flex-shrink: 0; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: var(--board); color: var(--board-ink); font: 700 1.1rem/1 var(--font-sign);
}
.onb-guest { color: var(--ink-3); font-size: 0.86rem; margin-top: 4px; }
/* "Gut zu wissen": Die App kennt nur, was im Kalender der Hochschule steht */
.onb-notice {
  display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 12px 14px; border-radius: 15px;
  font-size: 0.88rem; line-height: 1.45; color: var(--ink-2); background: var(--accent-soft);
}
.onb-notice .icon { flex: none; color: var(--accent); width: 18px; height: 18px; margin-top: 1px; }
.onb-notice b { color: var(--ink); }

/* ---------------------------------------------------------------- Link eingeben & Assistent */

.welcome { padding-top: 4px; }
.welcome .page-title { font-size: 2rem; }

.wizard { padding-top: 4px; }
.wiz-progress { display: flex; gap: 6px; margin: 4px 0 12px; }
.wiz-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background 0.3s; }
.wiz-progress span.on { background: var(--accent); }
.wiz-subject {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 5px 12px 5px 10px; border-radius: 999px;
  font: 650 0.9rem/1.2 var(--font-ui);
  background: var(--sc-soft); color: var(--sc-text);
}
.wiz-subject::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--sc); }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s var(--ease);
}
.choice:active { transform: scale(0.985); }
.choice-badge {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font: 700 1.6rem/1 var(--font-sign); background: var(--surface-2); color: var(--ink);
}
.choice-text { display: flex; flex-direction: column; min-width: 0; }
.choice-text b { font-size: 1rem; font-weight: 650; }
.choice-text small { color: var(--ink-3); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.choice.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.choice.on .choice-badge { background: var(--accent); color: var(--accent-ink); }
.choice-all .choice-badge { font-size: 1.2rem; color: var(--ink-3); }

.courses { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.course-family { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 10px 6px 4px; }
.course-family-title { font: 650 0.98rem/1.2 var(--font-ui); padding: 2px 10px 6px; }
.course-family .course { box-shadow: none; border: 0; background: transparent; border-top: 1px solid var(--line); border-radius: 0; }
.course {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; cursor: pointer; box-shadow: var(--shadow-sm);
}
.course-check {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px; position: relative;
  box-shadow: inset 0 0 0 2px var(--line-2); transition: background 0.15s, box-shadow 0.15s;
}
.course.on .course-check { background: var(--sc); box-shadow: none; }
.course.on .course-check::after {
  content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px;
  border: solid var(--sc-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.course-text { display: flex; flex-direction: column; min-width: 0; }
.course-text b { font-weight: 600; }
.course-text small { color: var(--ink-3); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.course:not(.on) .course-text b { text-decoration: line-through; color: var(--ink-3); text-decoration-thickness: 2px; }
.courses-sep { margin: 22px 0 8px; }

.names { display: flex; flex-direction: column; gap: 8px; }
.name-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 78px; grid-template-areas: "full full" "input preview" "colors colors";
  gap: 8px 10px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
}
.name-full { grid-area: full; font-size: 0.86rem; color: var(--ink-2); font-weight: 650; }
.name-row input { grid-area: input; min-height: 42px; font-weight: 650; }
.name-preview {
  grid-area: preview; align-self: stretch; position: relative; padding: 6px 6px 6px 8px; border-radius: 9px; font-size: 0.74rem; font-weight: 700; line-height: 1.2;
  background: var(--sc); color: var(--sc-ink);
  overflow-wrap: anywhere; overflow: hidden; max-height: 58px;
}
.color-pick { grid-area: colors; }
.color-pick summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 6px 10px 6px 6px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 650; color: var(--ink-2); background: var(--surface-2);
}
.color-pick summary::-webkit-details-marker { display: none; }
.color-pick summary::after { content: "▾"; font-size: 0.8em; color: var(--ink-3); }
.color-pick[open] summary::after { content: "▴"; }
.swatch-dot { width: 18px; height: 18px; border-radius: 6px; background: var(--sc); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.swatch {
  width: 28px; height: 28px; border-radius: 9px; border: 0; padding: 0; cursor: pointer; background: var(--sc);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); transition: transform 0.15s var(--spring);
}
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sc); transform: scale(0.9); }
.swatch:hover { transform: scale(1.08); }

.wiz-nav {
  position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 10px;
  margin: 18px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.wiz-nav .btn { min-width: 120px; }

.done { text-align: center; min-height: 72vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.done .btn-block { max-width: 420px; }
.done .page-lead { margin: 6px auto 8px; max-width: 32ch; }
.done .btn { margin-top: 22px; }
.done-check { width: 84px; height: 84px; }
.done-check circle { fill: var(--accent); }
.done-check path {
  fill: none; stroke: var(--accent-ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 48; stroke-dashoffset: 48; animation: draw 0.5s var(--ease) 0.15s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.install-tip {
  display: flex; gap: 12px; align-items: center; text-align: left; max-width: 420px; margin-top: 18px; padding: 12px 14px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit;
}
.install-tip b { display: block; }
.install-tip small { color: var(--ink-3); }

/* ---------------------------------------------------------------- Mehr & Konto */

.cal-list { list-style: none; padding: 0; margin: 0 0 4px; }
.cal-list li { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); }
.cal-list li:last-child { border-bottom: 0; }
.cal-pick {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border: 0; background: none; text-align: left; cursor: pointer;
}
.cal-text { min-width: 0; display: flex; flex-direction: column; }
.cal-text b, .cal-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-text b { font-weight: 650; }
.cal-text small { color: var(--ink-3); }
.radio { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--line-2); }
.cal-list li.active .radio { box-shadow: inset 0 0 0 7px var(--accent); }
.avatar {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font: 800 1.15rem/1 var(--font-ui); background: var(--accent); color: var(--accent-ink);
}
.avatar-sm { width: 28px; height: 28px; font-size: 0.8rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.45rem; }
.changes { list-style: none; padding: 0; margin: 0 0 8px; }
.changes li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.changes li a { font-weight: 650; text-decoration: none; }
.changes li small { flex-basis: 100%; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.changes li.new { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.advanced summary { cursor: pointer; font-weight: 650; }
.advanced[open] summary { margin-bottom: 8px; }
.advanced .btn-danger-quiet { margin-top: 16px; }
.more .segmented { margin-bottom: 4px; }
.more .field-label { margin: 8px 0 6px; }
.row-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.row-link b { display: block; font-weight: 700; }
.row-link small { display: block; color: var(--ink-3); font-size: 0.86rem; }
.row-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
}
.row-icon svg { width: 22px; height: 22px; }
.row-arrow { margin-left: auto; font-size: 1.6rem; line-height: 1; color: var(--ink-3); }
.install-card { background: linear-gradient(135deg, var(--board), var(--board-2)); color: var(--board-ink); border-color: transparent; }
.install-card small { color: var(--board-dim); }
.install-card .row-icon { background: var(--hl); color: #241a00; }
.install-card .row-arrow { color: var(--board-dim); }

.recovery { text-align: center; }
.recovery-code {
  font-size: 1.35rem; font-weight: 700; padding: 18px 10px; margin-bottom: 12px; border-radius: 15px;
  background: var(--accent-soft); color: var(--accent); border: 1px dashed var(--accent-line); user-select: all; overflow-wrap: anywhere;
}
.recovery .check { justify-content: center; }

.acc-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 60%;
  padding: 4px 12px 4px 4px; border-radius: 999px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-weight: 650; font-size: 0.9rem;
}
.acc-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-head { display: flex; align-items: center; gap: 14px; }
.acc-head b { display: block; font: 800 1.2rem/1.25 var(--font-ui); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.acc-head small { display: block; color: var(--ink-2); font-size: 0.88rem; margin-top: 2px; }
.acc-head.is-account { background: linear-gradient(160deg, var(--accent-soft), var(--surface) 75%); border-color: var(--accent-line); }
.acc-ok { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.acc-guest {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line);
}
.acc-guest svg { width: 24px; height: 24px; }
.acc-facts { list-style: none; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.acc-facts li { padding: 12px 12px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; min-width: 0; }
.acc-facts b { font: 700 1.9rem/1 var(--font-sign); font-variant-numeric: tabular-nums; }
.acc-facts span { font-size: 0.8rem; color: var(--ink-2); margin-top: 4px; overflow-wrap: anywhere; hyphens: auto; }
.sec-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sec-row:first-of-type { padding-top: 4px; }
.sec-row > div { flex: 1; min-width: 0; }
.sec-row b { display: block; font-weight: 700; }
.sec-row small { display: block; color: var(--ink-3); font-size: 0.85rem; }
.sec-row small.ok { color: var(--ok); font-weight: 650; }
.sec-row small.warn { color: var(--warn); font-weight: 650; }
.sec-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--ink-2); }
.sec-icon svg { width: 20px; height: 20px; }
.benefits { list-style: none; padding: 0; margin: 6px 0 12px; display: flex; flex-direction: column; gap: 9px; }
.benefits li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 0.95rem; }
.benefits .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--ok); flex-shrink: 0; }
.help .benefits { margin-top: 12px; }
.signed-in {
  display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; padding: 10px 14px; border-radius: 15px;
  background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line));
  font-size: 0.95rem;
}
.signed-in .icon { margin-left: auto; width: 20px; height: 20px; color: var(--ok); }
.guest-note p { color: var(--ink-2); font-size: 0.92rem; }
.guest-note .actions { margin-top: 10px; }
.method-list { display: flex; flex-direction: column; gap: 8px; }
.method {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.method b { display: block; font-weight: 700; }
.method small { display: block; color: var(--ink-3); font-size: 0.86rem; }
.push-state { display: flex; align-items: center; gap: 8px; font-weight: 650; margin-top: 8px; }
.push-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.push-dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.push-devices { margin-top: 10px; }
.sub-url {
  margin: 8px 0 4px; padding: 10px 12px; border-radius: 11px; font-size: 0.8rem;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow-wrap: anywhere; user-select: all;
}
.sub-hint { margin-top: 10px; }

/* ---------------------------------------------------------------- Spruch des Tages & Neuigkeiten */

.popup-root {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: rgb(8 10 22 / 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.25s ease both;
}
.popup-root.is-closing { animation: fade-out 0.18s ease both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.popup {
  position: relative; width: min(100%, 420px); max-height: calc(100dvh - 40px); overflow-y: auto; outline: none;
  padding: 26px 22px 20px; border-radius: 28px; background: var(--surface); color: var(--ink);
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / 0.6); animation: pop-up 0.45s var(--spring) both;
}
@keyframes pop-up { from { transform: translateY(24px) scale(0.96); opacity: 0; } }
.popup-x {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); cursor: pointer;
}
.popup-x svg { width: 18px; height: 18px; }
.popup-x:hover { color: var(--ink); }
.daily-kicker { font: 700 0.74rem/1.3 var(--font-ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding-right: 40px; }
/* Spruch: wie ein Zettel auf der Anzeigetafel – dunkel, mit Textmarker-Gelb */
.is-daily .popup { background: var(--board); color: var(--board-ink); overflow: hidden; isolation: isolate; }
.is-daily .popup::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.6;
  background-image: radial-gradient(color-mix(in srgb, var(--board-ink) 10%, transparent) 1px, transparent 1.2px); background-size: 8px 8px;
  mask-image: linear-gradient(160deg, #000, transparent 75%); -webkit-mask-image: linear-gradient(160deg, #000, transparent 75%);
}
.is-daily .popup::after {
  content: ""; position: absolute; z-index: -1; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--hl) 55%, transparent), transparent 70%);
}
.is-daily .popup-x { background: var(--board-2); color: var(--board-dim); }
.is-daily .daily-kicker { color: var(--board-dim); }
.daily-hello { font: 800 1.5rem/1.15 var(--font-ui); letter-spacing: -0.03em; margin: 8px 0 14px; }
.daily-phrase {
  margin: 0 0 22px; font: 700 clamp(1.5rem, 6.5vw, 1.9rem)/1.2 var(--font-sign); letter-spacing: 0.005em;
  animation: rise 0.6s var(--ease) 0.15s both;
}
.daily-phrase::before { content: "„"; color: var(--hl); }
.daily-phrase::after { content: "“"; color: var(--hl); }
.is-daily .btn { background: var(--hl); color: #241a00; box-shadow: none; }
.news-title { font: 800 1.45rem/1.15 var(--font-ui); letter-spacing: -0.03em; margin: 6px 0 10px; }
.news-head { font: 700 0.8rem/1.3 var(--font-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 14px 0 6px; }
.news-list { margin: 0 0 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.45; }
.is-news .btn { margin-top: 16px; }
.news-note { margin-top: 14px; padding: 2px 14px 12px; border-radius: 14px; background: var(--accent-soft); }
.news-note p { margin: 0; color: var(--ink-2); font-size: 0.95rem; line-height: 1.45; }

/* Neue Veranstaltungen im Plan (Heute) */
.new-mods { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.new-mod-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.new-mod-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: start; padding-top: 10px; border-top: 1px solid var(--line); }
.new-mod-swatch { width: 12px; height: 12px; margin-top: 5px; border-radius: 4px; background: var(--sc); }
.new-mod-text b { display: block; font-weight: 700; }
.new-mod-text small { display: block; color: var(--ink-3); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.new-mod-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.new-mods > .actions { margin-top: 12px; }

/* Herkunft der Angaben (unter jedem Termin): leise, aber immer da */
.ev-source { display: flex; gap: 8px; align-items: flex-start; margin: 20px 0 0; color: var(--ink-3); font-size: 0.82rem; line-height: 1.4; }
.ev-source .icon { flex: none; width: 15px; height: 15px; margin-top: 1px; }

/* Ausgefallene oder gestrichene Termine: Hinweis auf mögliche Ersatzveranstaltung */
.ev-cancel-note {
  margin: 12px 0 0; padding: 11px 13px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; color: var(--ink-2);
  background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 22%, transparent);
}

/* ---------------------------------------------------------------- Wartungsarbeiten */

.maint { max-width: 520px; margin: 0 auto; min-height: calc(100dvh - 60px); display: flex; flex-direction: column; justify-content: center; text-align: center; padding-bottom: 24px; }
.maint-board { padding: 18px 16px 22px; margin: 0 auto 22px; width: 100%; }
.maint-board .board-top { justify-content: center; }
.maint-flaps { justify-content: center; font: 700 clamp(30px, 10vw, 50px)/1 var(--font-sign); gap: 3px; }
.maint-flaps .flap { background: var(--board-2); width: 0.66em; border-radius: 6px; box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.25); }
.maint .page-lead { margin: 0 auto 12px; max-width: 30em; }
.maint-until { display: inline-block; margin: 0 auto 12px; padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.maint .actions { justify-content: center; margin-top: 18px; }
.maint .legal-links { margin-top: 28px; }

/* ---------------------------------------------------------------- Problem melden */

.fb-text { min-height: 120px; }
.fb-info summary { cursor: pointer; color: var(--ink-2); font-size: 0.88rem; font-weight: 650; margin: 2px 0 6px; }
.fb-info .fact dt { width: 96px; font-size: 0.84rem; }
.fb-info .fact dd { font-size: 0.84rem; color: var(--ink-2); }
.feedback .page-foot .icon { color: var(--ok); vertical-align: -0.15em; }
.feedback .done .btn-ghost { margin-top: 6px; }
.fb-list { list-style: none; padding: 0; margin: 0; }
.fb-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.fb-item:last-child { border-bottom: 0; }
.fb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.82rem; color: var(--ink-3); }
.fb-msg { margin: 6px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-item .actions { margin-top: 8px; }
.fb-item.is-done .fb-msg { color: var(--ink-3); }
.fb-item details summary { cursor: pointer; font-size: 0.82rem; color: var(--ink-3); }
.fb-done-list > summary { cursor: pointer; font-weight: 650; color: var(--ink-2); margin-top: 10px; }

/* ---------------------------------------------------------------- Impressum & Datenschutz */

.legal-text { padding: 22px 20px; overflow-wrap: anywhere; hyphens: auto; }
.legal-text h1 { font: 800 1.6rem/1.2 var(--font-ui); letter-spacing: -0.03em; margin: 0 0 6px; }
.legal-text h2 { font: 750 1.15rem/1.3 var(--font-ui); letter-spacing: -0.015em; margin: 30px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: calc(70px + env(safe-area-inset-top)); }
.legal-text h3 { font: 700 1rem/1.35 var(--font-ui); margin: 20px 0 6px; }
.legal-text h4 { font: 650 0.94rem/1.35 var(--font-ui); margin: 14px 0 4px; color: var(--ink-2); }
.legal-text p, .legal-text li { color: var(--ink-2); font-size: 0.94rem; line-height: 1.6; }
.legal-text p + p { margin-top: 8px; }
.legal-text ul { padding-left: 20px; margin: 8px 0; }
.legal-text li { margin-bottom: 6px; }
.legal-text a { color: var(--accent); }
.legal-meta { color: var(--ink-3); font-size: 0.86rem; }
.legal-toc { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 4px; padding: 12px 14px; border-radius: 13px; background: var(--surface-2); }
.legal-toc a { color: var(--ink); font-weight: 650; font-size: 0.92rem; text-decoration: none; }
.legal-source { margin-top: 16px !important; font-size: 0.8rem !important; color: var(--ink-3) !important; }
.legal-lang { margin: 6px 0 10px; color: var(--ink-3); font-size: 0.9rem; }
.legal-links { text-align: center; margin: 18px 0 4px; font-size: 0.84rem; color: var(--ink-3); }
.legal-links a { color: var(--ink-2); text-decoration: none; font-weight: 650; }
.form-note { margin-top: 8px; }
.form-note a { color: var(--accent); font-weight: 650; }

/* ---------------------------------------------------------------- Überwachung (#/admin) */

.adm-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.adm-link .row-icon { margin: 0; flex-shrink: 0; }
.adm-link b { display: block; font-weight: 700; }
.adm-link small { display: block; color: var(--ink-3); font-size: 0.86rem; }
.adm-arrow { margin-left: auto; font-size: 1.6rem; line-height: 1; color: var(--ink-3); }
/* Nutzer verwalten auf der Admin-Seite */
.adm-user-list { list-style: none; padding: 0; margin: 12px 0 4px; max-height: 340px; overflow-y: auto; }
.adm-user-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.adm-user-list li:first-child { border-top: 0; }
.adm-user-list li > div { flex: 1; min-width: 0; }
.adm-user-list b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-user-list small { display: block; color: var(--ink-3); font-size: 0.84rem; }
.adm-user-list .avatar { width: 34px; height: 34px; font-size: 0.9rem; flex-shrink: 0; }
.adm-user-del { color: var(--danger); }

/* Wartungsmodus auf der Admin-Seite */
.adm-maint .field-label { margin-top: 12px; }
.adm-maint textarea.input { min-height: 72px; }
.adm-maint select { width: 100%; }
.adm-maint.is-on { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: color-mix(in srgb, var(--danger) 5%, var(--surface)); }
.adm-maint-msg { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.adm-status { display: flex; gap: 14px; align-items: flex-start; }
.adm-status b { display: block; font-size: 1.05rem; font-weight: 700; }
.adm-status small { display: block; color: var(--ink-2); font-size: 0.88rem; margin-top: 2px; }
.adm-status ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 0.92rem; }
.adm-status li { margin-bottom: 4px; }
.adm-status li.error { color: var(--danger); }
.adm-dot { flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.adm-status.ok { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.adm-status.warn .adm-dot { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 20%, transparent); }
.adm-status.warn { border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); }
.adm-status.error .adm-dot { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 20%, transparent); }
.adm-status.error { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.kpi { padding: 12px 14px; border-radius: 13px; background: var(--surface-2); display: flex; flex-direction: column; }
.kpi b { font: 700 1.9rem/1.05 var(--font-sign); font-variant-numeric: tabular-nums; }
.kpi span { font-weight: 650; font-size: 0.88rem; }
.kpi small { color: var(--ink-3); font-size: 0.76rem; }
.adm-row { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.adm-row:last-of-type { border-bottom: 0; }
.adm-row-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.adm-row-text b { font: 700 1.5rem/1.1 var(--font-sign); font-variant-numeric: tabular-nums; }
.adm-row-text span { font-weight: 650; font-size: 0.9rem; }
.adm-row-text small { color: var(--ink-3); font-size: 0.8rem; }
.spark { flex: 0 0 46%; height: 40px; display: flex; align-items: flex-end; gap: 2px; }
.spark i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--ink-3) 45%, transparent); }
.spark i:last-child { background: var(--ink-2); }
.spark.accent i { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.spark.accent i:last-child { background: var(--accent); }
.adm-feeds { list-style: none; padding: 0; margin: 0; }
.adm-feeds li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.adm-feeds li:last-child { border-bottom: 0; }
.adm-feeds .adm-dot { width: 10px; height: 10px; margin-top: 7px; box-shadow: none; }
.adm-feeds li.has-error .adm-dot { background: var(--danger); }
.adm-feeds b { font-weight: 700; }
.adm-feeds small { display: block; color: var(--ink-3); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.adm-feeds small.warn { color: var(--warn); }
.meter { display: inline-block; width: 70px; height: 6px; border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); vertical-align: middle; margin-left: 6px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }
.admin .facts-plain .fact dt { width: 120px; }
.admin code { font-size: 0.9em; }

/* ---------------------------------------------------------------- Startbild der installierten App */

.splash { display: none; }
[data-display="app"] .splash {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--board); color: var(--board-ink);
  animation: splash-out 0.42s var(--ease) 1.3s forwards;
}
.splash .flaps { font: 700 clamp(30px, 9.6vw, 52px)/1 var(--font-sign); gap: 3px; }
.splash .flap { background: var(--board-2); width: 0.66em; border-radius: 6px; box-shadow: inset 0 -1px 0 rgb(0 0 0 / 0.25); }
.splash-sub {
  font: 600 0.95rem/1.2 var(--font-ui); letter-spacing: 0.02em; color: var(--board-dim);
  opacity: 0; animation: fade-up 0.5s var(--ease) 0.75s forwards;
}
.splash.skip { animation: splash-out 0.2s var(--ease) forwards; }
@keyframes splash-out { to { opacity: 0; visibility: hidden; transform: scale(1.04); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- Bewegung */

#view.enter-next { animation: enter-next 0.24s var(--ease); }
#view.enter-prev { animation: enter-prev 0.24s var(--ease); }
@keyframes enter-next { from { transform: translateX(28px); opacity: 0; } }
@keyframes enter-prev { from { transform: translateX(-28px); opacity: 0; } }
#view { touch-action: pan-y; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-display="app"] .splash { animation: splash-out 0.2s ease 0.3s forwards !important; }
}

/* ---------------------------------------------------------------- Größere Bildschirme */

@media (min-width: 700px) {
  .grid { margin: 0 0 16px; }
  .grid-head, .grid-body, .grid-allday { grid-template-columns: 52px repeat(var(--days), minmax(0, 1fr)); }
  .block { font-size: 0.78rem; padding: 5px 6px 5px 8px; }
  .b-time { font-size: 0.86rem; }
  .b-room { font-size: 0.9rem; }
  .hours span { font-size: 0.8rem; }
  .board { padding: 18px 20px 20px; }
  .board-title { font-size: 1.5rem; }
  .deadlines { margin: 0 0 18px; padding: 2px 0 6px; flex-wrap: wrap; overflow: visible; }
}

/* Desktop: Navigation als Seitenleiste, mehr Platz für Woche und Heute */
@media (min-width: 1024px) {
  body { padding-left: var(--side-w); padding-bottom: 0; }
  body.focus-mode { padding-left: 0; }
  .tabbar {
    top: 0; bottom: 0; right: auto; width: var(--side-w);
    display: flex; flex-direction: column; gap: 2px; padding: 18px 14px;
    background: var(--surface); border-top: 0; border-right: 1px solid var(--line);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  .tab-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 22px; font-weight: 800; font-size: 1.08rem; letter-spacing: -0.03em; text-decoration: none; color: var(--ink); }
  .tab-brand img { width: 32px; height: 32px; border-radius: 9px; }
  .tabbar a[data-tab] { flex-direction: row; gap: 10px; padding: 4px 6px; border-radius: 14px; font-size: 0.95rem; font-weight: 650; color: var(--ink-2); }
  .tabbar a[data-tab]:hover { background: var(--surface-2); }
  .tab-icon { width: 38px; height: 34px; border-radius: 11px; }
  .tabbar a[aria-current] { background: var(--accent-soft); color: var(--accent); }
  .tabbar a[aria-current] .tab-icon { background: transparent; }
  .badge { position: static; margin-left: auto; box-shadow: none; }
  .appbar { max-width: none; margin: 0; padding: 14px 24px 10px 32px; }
  .appbar-title { font-size: 0.86rem; }
  main { max-width: 1180px; padding: 0 32px; }
  .page { max-width: 760px; margin-inline: auto; }
  .today-page { margin-inline: auto; }
  .banner { margin: 0 32px 8px; max-width: 760px; }
  .toast { bottom: 28px; left: calc(50% + var(--side-w) / 2); }
  .focus-mode .toast { left: 50%; }
  .today-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 28px; align-items: start; max-width: 1100px; }
  .today-page:has(> .today-aside:empty) { grid-template-columns: minmax(0, 760px); }
  .today-page > .dayhead, .today-page > .weekstrip { grid-column: 1 / -1; }
  .today-page > .weekstrip { max-width: 560px; }
  .today-page > .dayhead { justify-content: flex-start; margin: 4px 0 14px; }
  .today-page .dayhead-text { flex: 0 1 auto; text-align: left; order: -1; margin-right: auto; }
  .today-aside { position: sticky; top: 80px; }
  .today-aside:empty { display: none; }
  .grid-head { top: 60px; }
  .search-bar { top: 60px; }
  .sheet-root { padding-left: var(--side-w); }
  .focus-mode .sheet-root { padding-left: 0; }
}

/* ---------------------------------------------------------------- Ausfälle und Änderungen (flags.js)
   rot = fällt aus, orange = geändert (verlegt, anderer Raum, Ersatztermin), blau = zusätzlich, grün = neu */
.tone-bad { --tone: var(--danger); }
.tone-warn { --tone: var(--warn); }
.tone-info { --tone: var(--accent); }
.tone-good { --tone: var(--ok); }
.flag-chip { display: inline-flex; align-items: center; gap: 3px; background: color-mix(in srgb, var(--tone) 13%, var(--surface)); color: var(--tone); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 35%, transparent); }
.flag-chip svg { width: 12px; height: 12px; flex-shrink: 0; }
/* Liste: Ausfall rot umrandet und durchgestrichen, Änderung orange umrandet */
.stop.cancelled a { opacity: 0.88; border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.stop.cancelled .stop-time, .stop.cancelled .stop-meta, .stop.cancelled .stop-room { opacity: 0.6; }
.stop.has-flag.tone-warn a, .stop.has-flag.tone-good a, .stop.has-flag.tone-info a { border-color: var(--tone); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tone) 70%, transparent); }
/* Statt der Veranstaltung ein eigener Termin */
.stop.replaced a { opacity: 0.5; box-shadow: none; }
.stop.replaced .stop-title { text-decoration: line-through; text-decoration-thickness: 2px; }
.chip-replaced { background: var(--surface-3); color: var(--ink-2); box-shadow: none; }
/* Eigene Einträge: gestrichelter Rand; Lernzeit in der Farbe des Fachs */
.chip-own { background: var(--sc-soft); color: var(--sc-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc) 40%, transparent); }
.stop.is-own a { border-style: dashed; border-color: color-mix(in srgb, var(--sc) 60%, var(--line-2)); }
.stop.is-own a::before { background: repeating-linear-gradient(180deg, var(--sc) 0 6px, transparent 6px 10px); }
.stop.is-done .stop-title { text-decoration: line-through; color: var(--ink-3); }

/* Wochenraster */
.block.cancelled {
  opacity: 1; color: var(--ink-2);
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--sc) 30%, var(--surface)) 0 6px, color-mix(in srgb, var(--sc) 14%, var(--surface)) 6px 12px);
  box-shadow: inset 0 0 0 2px var(--danger);
}
.block.cancelled .b-title { text-decoration-thickness: 2px; text-decoration-color: var(--danger); }
.block.has-flag:not(.cancelled) { box-shadow: inset 0 0 0 2px var(--tone), inset 0 0 0 3px color-mix(in srgb, var(--surface) 70%, transparent); }
.block.has-flag.current:not(.cancelled) { box-shadow: inset 0 0 0 2px var(--tone), 0 0 0 2px var(--surface), 0 0 0 4px var(--sc); }
.b-flag {
  position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tone); color: #fff; box-shadow: 0 0 0 1.5px var(--surface);
}
.b-flag svg { width: 11px; height: 11px; }
.block.replaced { opacity: 0.42; }
.block.replaced .b-title { text-decoration: line-through; }
.block.is-own { background: var(--surface); color: var(--ink); box-shadow: none; outline: 2px dashed var(--sc); outline-offset: -2px; }
.block.is-study { background: var(--sc-soft); color: var(--sc-text); }
.block.is-done { opacity: 0.55; }
.cl-row.cancelled { box-shadow: inset 0 0 0 2px var(--danger); opacity: 0.75; }
.cl-row.has-flag:not(.cancelled) { box-shadow: inset 0 0 0 2px var(--tone); }
.cl-row.replaced { opacity: 0.42; }
.cl-row.is-own { background: var(--surface); color: var(--ink); outline: 2px dashed var(--sc); outline-offset: -2px; }

/* Termin-Blatt: Hinweis-Kasten, ersetzt, eigene Pläne */
.ev-flag {
  display: flex; gap: 11px; align-items: flex-start; margin: 12px 0 0; padding: 12px 13px; border-radius: 14px;
  background: color-mix(in srgb, var(--tone) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent);
}
.ev-flag-icon { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--tone); color: #fff; }
.ev-flag-icon svg { width: 16px; height: 16px; }
.ev-flag b { display: block; color: var(--tone); font-weight: 750; }
.ev-flag span { display: block; font-weight: 650; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.ev-flag p { margin: 4px 0 0; font-size: 0.86rem; line-height: 1.45; color: var(--ink-2); }
.ev-replaced { margin: 12px 0 0; padding: 11px 13px; border-radius: 14px; background: var(--surface-2); font-size: 0.9rem; }
.ev-replaced p { margin: 0 0 4px; }
.ev-replaced .actions { margin: 0; }
.ev-plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 14px 0 4px; }
.plan-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 13px; text-align: left;
  border: 1px dashed var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit;
}
.plan-btn span { font-weight: 700; font-size: 0.92rem; }
.plan-btn small { color: var(--ink-3); font-size: 0.78rem; line-height: 1.3; }
.plan-btn:hover { border-color: var(--accent-line); background: var(--accent-soft); }

/* Eintragen: Auswahl und Formular */
.add-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.add-choice {
  display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 15px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-align: left; font: inherit; cursor: pointer;
}
.add-choice:hover { border-color: var(--accent-line); }
.add-choice b { display: block; font-weight: 700; }
.add-choice small { display: block; color: var(--ink-3); font-size: 0.84rem; }
.add-icon { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; }
.add-icon svg { width: 22px; height: 22px; }
.add-icon.is-event { background: var(--surface-3); color: var(--ink); }
.add-icon.is-study { background: color-mix(in srgb, #7a3ff2 14%, var(--surface)); color: #7a3ff2; }
.add-icon.is-todo { background: var(--accent-soft); color: var(--accent); }
.entry-when { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.entry-when label:first-child { grid-column: 1 / -1; }
@media (min-width: 520px) { .entry-when { grid-template-columns: 1.4fr 1fr 1fr; } .entry-when label:first-child { grid-column: auto; } }
.entry-when label { display: flex; flex-direction: column; min-width: 0; }
.entry-when input { min-width: 0; }
.entry-replaces { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 0.88rem; line-height: 1.4; }
.entry-replaces i { flex: none; width: 5px; align-self: stretch; border-radius: 3px; background: repeating-linear-gradient(-45deg, var(--sc) 0 4px, transparent 4px 8px); }
.seg-radio { flex: 1; display: flex; position: relative; }
.seg-radio input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg-radio span { flex: 1; min-height: 36px; padding: 6px 8px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3); font-weight: 650; font-size: 0.92rem; text-align: center; }
.seg-radio input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.seg-radio input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }

/* Schwebender Knopf "+" (Heute, Tag, Woche) */
.fab {
  position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 25;
  width: 56px; height: 56px; border-radius: 18px; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--accent) 70%, transparent), var(--shadow);
  transition: transform 0.15s var(--ease);
}
.fab svg { width: 26px; height: 26px; }
.fab:active { transform: scale(0.94); }
.sheet-open .fab { visibility: hidden; }
@media (min-width: 1024px) { .fab { bottom: 28px; right: 32px; } }

/* Glocke oben rechts */
.bell-btn { position: relative; }
.bell-btn .badge { position: absolute; top: 3px; right: 2px; left: auto; margin: 0; min-width: 17px; height: 17px; font-size: 10px; line-height: 17px; box-shadow: 0 0 0 2px var(--bg, var(--surface)); }
.bell-btn[aria-current] { background: var(--accent-soft); color: var(--accent); }

/* Mitteilungen */
.inbox-tools { display: flex; gap: 8px; justify-content: flex-end; margin: -4px 0 6px; }
.btn.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 0.86rem; }
.inbox-section { margin: 14px 0 6px; }
.inbox-lead { margin: -2px 0 8px; }
.inbox-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.inbox-item { position: relative; display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.inbox-item::before { content: ""; width: 4px; flex: none; background: var(--tone); }
.inbox-item.is-plan { border-style: dashed; }
.inbox-main { flex: 1; min-width: 0; display: flex; gap: 11px; align-items: flex-start; padding: 12px 6px 12px 11px; color: inherit; text-decoration: none; }
.inbox-icon { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 14%, var(--surface)); color: var(--tone); }
.inbox-icon svg { width: 17px; height: 17px; }
.inbox-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-text b { font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.inbox-when { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.inbox-when i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); flex: none; }
.inbox-detail { color: var(--ink-3); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.inbox-ago { flex: none; color: var(--ink-3); font-size: 0.76rem; white-space: nowrap; padding-top: 2px; }
.inbox-del { flex: none; width: 44px; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.inbox-del svg { width: 18px; height: 18px; }
.inbox-del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.inbox-empty { text-align: center; padding: 34px 12px 18px; }
.inbox-empty-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.inbox-empty-icon svg { width: 32px; height: 32px; }
#inbox-settings { margin-top: 22px; }

/* Lernzeit mit Timer */
.focus-page { text-align: center; max-width: 480px; margin-inline: auto; padding-bottom: 32px; display: flex; flex-direction: column; align-items: center; }
.focus-page .back-link { align-self: flex-start; }
.focus-kicker { margin: 8px 0 4px; color: var(--sc-text); font-weight: 700; font-size: 0.86rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.focus-title { margin: 0 0 18px; font: 800 clamp(1.5rem, 6vw, 2rem)/1.15 var(--font-ui); letter-spacing: -0.03em; }
.focus-ring { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin: 0 auto 22px; }
.focus-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.focus-track { fill: none; stroke: var(--surface-2); stroke-width: 14; }
.focus-bar { fill: none; stroke: var(--sc); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 0.9s linear; }
.focus-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.focus-time { font: 700 clamp(2.6rem, 13vw, 3.6rem)/1 var(--font-sign); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.focus-center small { color: var(--ink-3); font-weight: 650; font-size: 0.9rem; }
.focus-page.is-paused .focus-bar { stroke: var(--ink-3); }
.focus-page.is-finished .focus-bar { stroke: var(--ok); }
.focus-page.is-finished .focus-time { color: var(--ok); }
.focus-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.focus-note { margin: 18px auto 0; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); max-width: 30em; font-size: 0.92rem; }
.focus-hint { margin-top: 18px; max-width: 30em; }
.board.is-study .board-label { color: var(--hl); }
@media (prefers-reduced-motion: reduce) { .focus-bar { transition: none; } }
