/* ===================== UniFlow AI – Designsystem ===================== */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f1f3f9; --line: #e5e8f0; --line-strong: #d3d8e4;
  --text: #171a26; --text-2: #4b5168; --muted: #5f667d;
  --accent: #4f5bd5; --accent-strong: #3f4bc2; --accent-soft: #eceefc; --accent-text: #3a45b4;
  --ok: #1f9d5b; --ok-soft: #e3f6ec; --warn: #d9851e; --warn-soft: #fdf0dc; --bad: #c03535; --bad-soft: #fbe5e5; --info: #2f7fd1; --info-soft: #e4effb;
  --ok-text: #14733f; --warn-text: #8a4d03; --bad-text: #b3292d; --info-text: #1d5fa8;
  --ok-btn: #16793f; --bad-btn: #b3292d; --on-fill: #ffffff;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --sh-sm: none; --sh: 0 0 0 1px var(--line-strong); --sh-lg: 0 0 0 1px var(--line-strong);
  --sidebar: 248px; --sidebar-min: 68px; --header: 56px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --t: .16s ease;
}
:root[data-theme="dark"] {
  --bg: #0f1117; --surface: #171a23; --surface-2: #1f2330; --line: #262b3a; --line-strong: #333a4d;
  --text: #e8eaf2; --text-2: #b3b9cc; --muted: #8b93a9;
  --accent: #7b86f0; --accent-strong: #6a76e8; --accent-soft: #232848; --accent-text: #a9b1ff;
  --ok: #3fbf7c; --ok-soft: #173327; --warn: #e9a04a; --warn-soft: #3a2a14; --bad: #ef6b6b; --bad-soft: #3d1d1d; --info: #5aa0e8; --info-soft: #172a40;
  --ok-text: #3fbf7c; --warn-text: #e9a04a; --bad-text: #ef6b6b; --info-text: #5aa0e8;
  --ok-btn: #3fbf7c; --bad-btn: #ef6b6b; --on-fill: #0f1117;
  --sh-sm: none; --sh: 0 0 0 1px var(--line-strong); --sh-lg: 0 0 0 1px var(--line-strong);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #0f1117; --surface: #171a23; --surface-2: #1f2330; --line: #262b3a; --line-strong: #333a4d;
    --text: #e8eaf2; --text-2: #b3b9cc; --muted: #8b93a9;
    --accent: #7b86f0; --accent-strong: #6a76e8; --accent-soft: #232848; --accent-text: #a9b1ff;
    --ok: #3fbf7c; --ok-soft: #173327; --warn: #e9a04a; --warn-soft: #3a2a14; --bad: #ef6b6b; --bad-soft: #3d1d1d; --info: #5aa0e8; --info-soft: #172a40;
    --ok-text: #3fbf7c; --warn-text: #e9a04a; --bad-text: #ef6b6b; --info-text: #5aa0e8;
    --ok-btn: #3fbf7c; --bad-btn: #ef6b6b; --on-fill: #0f1117;
    --sh-sm: none; --sh: 0 0 0 1px var(--line-strong); --sh-lg: 0 0 0 1px var(--line-strong);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14.5px/1.5 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; }
a { color: var(--accent-text); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.1rem; } h3 { font-size: .95rem; } h4 { font-size: .85rem; color: var(--text-2); }
p { margin: .35rem 0; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .tiny { font-size: .8125rem; }
.ic { vertical-align: -3px; flex: none; }
/* Zahlen und Zeiten stehen in Tabellenziffern (gleich breite Ziffern); Fliesstext bleibt proportional, sonst werden Bindestriche weit */
.tbl, .imp-table, .kpi, .badge, .status-pill, .chip, .timer, .score, .legend2, .donut, .statbar, .sync-chip, .greet .date,
.week-strip .d, .cal-day .dh .n, .cal-month, .cal2-title, .cal2-dh, .cal2-axis, .cal2-ev, .day2-ev .m, .tt-head, .tt-axis, .tt-ev, .tt-blocked,
.mini-cal, .pkg .ps, .pkg .tl, .task-row .tt span, .task2 .m span, .todo-item .m span, .item .sub, .lib-item .dt, .lib-row, .doc-row .s,
.mod2 .pr, .mod2 .stats, .mod2 .next, .wt-w, .wt-row, .ann-item .s, .card-head .muted, .dl-chip, .hol-chip, .note-chip, .doc-tab, .page-head .sub { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
::placeholder { color: var(--muted); opacity: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- App-Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; transition: grid-template-columns var(--t); }
.shell.collapsed { grid-template-columns: var(--sidebar-min) 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: .75rem .6rem; gap: .25rem; overflow: hidden; z-index: 20; }
.brand { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem .9rem; font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--on-fill); display: grid; place-items: center; flex: none; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .55rem .7rem; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; white-space: nowrap; transition: background var(--t), color var(--t); }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent-text); }
.nav a .badge { margin-left: auto; }
.collapsed .brand span, .collapsed .nav a span, .collapsed .side-foot span { display: none; }
.collapsed .nav a { justify-content: center; padding: .6rem; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: .25rem; }
/* Einstellungen und Einklappen immer sichtbar: 100vh ist im iPad-Safari hoeher als der sichtbare Bereich, die Liste scrollt selbst */
.sidebar { height: 100vh; height: 100dvh; padding-bottom: calc(.75rem + env(safe-area-inset-bottom)); }
.nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.side-foot { flex: none; margin-top: 0; padding-top: .35rem; border-top: 1px solid var(--line); }
.side-foot > a, .side-foot > .btn { display: flex; align-items: center; justify-content: flex-start; gap: .65rem; width: 100%; height: auto; padding: .55rem .7rem; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; font-size: inherit; white-space: nowrap; }
.side-foot > a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.side-foot > a.active { background: var(--accent-soft); color: var(--accent-text); }
.collapsed .side-foot > a, .collapsed .side-foot > .btn { justify-content: center; padding: .6rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.header { position: sticky; top: 0; z-index: 15; height: var(--header); display: flex; align-items: center; gap: .6rem; padding: 0 1.1rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.header .search { flex: 1; max-width: 520px; position: relative; }
.header .search input { width: 100%; padding: .5rem .8rem .5rem 2.2rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); }
.header .search .ic { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); max-height: 60vh; overflow: auto; padding: .35rem; }
.search-pop a { display: flex; gap: .5rem; align-items: center; padding: .45rem .6rem; border-radius: var(--r-sm); color: var(--text); }
.search-pop a:hover { background: var(--surface-2); text-decoration: none; }
.sync-chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; color: var(--muted); white-space: nowrap; }
.content { padding: 1.4rem 1.6rem 3rem; max-width: 1480px; width: 100%; margin: 0 auto; animation: fade .18s ease; }
.content.wide { max-width: none; padding: .8rem 1.1rem 1rem; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head .sub { color: var(--muted); margin-top: .15rem; }
.actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* ---------- Komponenten ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .5rem .85rem; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 500; line-height: 1.2; transition: background var(--t), border-color var(--t), transform .08s ease; white-space: nowrap; }
.btn:hover { background: var(--surface-2); } .btn:active { transform: translateY(1px); } .btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-fill); } .btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); } .btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--bad-text); border-color: color-mix(in srgb, var(--bad) 40%, transparent); } .btn.danger:hover { background: var(--bad-soft); }
.btn.sm { padding: .3rem .6rem; font-size: .82rem; } .btn.icon { padding: .45rem; width: 34px; height: 34px; } .btn.icon.sm { width: 28px; height: 28px; padding: .25rem; }
.btn.ok { background: var(--ok-btn); border-color: var(--ok-btn); color: var(--on-fill); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; }
.card.pad-0 { padding: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.card-head h2 { display: flex; align-items: center; gap: .45rem; }
.grid { display: grid; gap: 1rem; } .grid > * { min-width: 0; } .grid.cols-2 { grid-template-columns: 1fr 1fr; } .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
.badge { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok-text); } .badge.warn { background: var(--warn-soft); color: var(--warn-text); } .badge.bad { background: var(--bad-soft); color: var(--bad-text); } .badge.info { background: var(--info-soft); color: var(--info-text); } .badge.neutral { background: var(--surface-2); color: var(--text-2); }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .8125rem; cursor: pointer; color: var(--text-2); }
.mod-colors { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .35rem; }
.mod-sw { position: relative; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 2px solid var(--surface); background: var(--sw); outline: 1px solid var(--line); cursor: pointer; overflow: hidden; }
.mod-sw.on { outline: 2px solid var(--text); } .mod-sw.used:not(.on) { opacity: .35; }
.mod-sw.own { background: var(--sw, conic-gradient(#e95905, #896301, #167535, #1f9682, #175ee8, #834bbf, #de5797, #e95905)); }
.mod-sw.own input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); font-weight: 600; }
.input, select.input, textarea.input { width: 100%; padding: .5rem .7rem; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); transition: border-color var(--t); }
.input:focus { outline: 3px solid var(--accent-soft); outline-offset: 0; border-color: var(--accent); }
label.field { display: block; margin: .55rem 0; font-size: .85rem; color: var(--text-2); } label.field > .input, label.field > select { margin-top: .25rem; }
.row { display: flex; gap: .6rem; align-items: center; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: .5rem; }
.tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: .6rem .85rem; color: var(--text-2); border-bottom: 2px solid transparent; cursor: pointer; font-weight: 500; white-space: nowrap; margin-bottom: -1px; }
.tabs button.active { color: var(--accent-text); border-bottom-color: var(--accent); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: .35rem .7rem; border-radius: 6px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.seg button.active { background: var(--surface); color: var(--text); outline: 1px solid var(--line-strong); outline-offset: -1px; }
.list { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: .75rem; padding: .6rem .5rem; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: var(--r-sm); transition: background var(--t); }
.item:last-child { border-bottom: 0; } .item:hover { background: var(--surface-2); }
.item .main { flex: 1; min-width: 0; } .item .title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .item .sub { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.progress.ok > i { background: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.empty .ic { color: var(--line-strong); margin-bottom: .5rem; }
.kpi { display: flex; flex-direction: column; gap: .15rem; } .kpi b { font-size: 1.35rem; font-weight: 700; } .kpi span { color: var(--muted); font-size: .8125rem; }
.skeleton { background: var(--surface-2); animation: sk 1.2s ease-in-out infinite; border-radius: var(--r-sm); min-height: 1em; }
@keyframes sk { 50% { opacity: .5; } }
table.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; } .tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: .45rem .5rem; border-bottom: 1px solid var(--line); font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; }
.tbl td { padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; } .tbl tr:hover td { background: var(--surface-2); } .tbl .input { padding: .3rem .5rem; } .tbl select.input { min-width: 72px; }
.modal { position: fixed; inset: 0; background: rgba(10, 12, 24, .45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; animation: fade .12s ease; }
.modal-box { background: var(--surface); border-radius: var(--r-lg); width: min(620px, 100%); max-height: 92vh; overflow: auto; padding: 1.3rem 1.4rem; border: 1px solid var(--line-strong); }
.modal-box h3 { margin-bottom: .6rem; } .modal-foot { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: .55rem 1rem; border-radius: 999px; z-index: 60; font-size: .9rem; animation: fade .15s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); border-left: 1px solid var(--line-strong); z-index: 40; display: flex; flex-direction: column; animation: slide .18s ease; }
@keyframes slide { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: .6rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 1rem 1.1rem; overflow: auto; flex: 1; }
.drawer-foot { padding: .8rem 1.1rem; border-top: 1px solid var(--line); display: flex; gap: .5rem; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .8125rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; }
.st-geplant { background: var(--info-soft); color: var(--info-text); } .st-in_bearbeitung { background: var(--accent-soft); color: var(--accent-text); } .st-erledigt { background: var(--ok-soft); color: var(--ok-text); } .st-teilweise { background: var(--warn-soft); color: var(--warn-text); } .st-nachholen { background: var(--bad-soft); color: var(--bad-text); } .st-verschoben, .st-uebersprungen, .st-frei, .st-leer { background: var(--surface-2); color: var(--muted); }

/* ---------- Dashboard ---------- */
.greet h1 { font-size: 1.6rem; } .greet .date { color: var(--muted); }
.today-card .pkg { display: block; margin-bottom: .5rem; }
.today-card .pkg:last-child { margin-bottom: 0; }
.mod-card { display: flex; flex-direction: column; gap: .55rem; cursor: pointer; transition: transform .12s ease, border-color .12s ease; position: relative; overflow: hidden; }
.mod-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mc, var(--accent)); }
.mod-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.mod-card .name { font-weight: 650; font-size: 1rem; line-height: 1.25; }
.mod-card .meta { display: flex; gap: .4rem; flex-wrap: wrap; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.week-strip .d { text-align: center; padding: .4rem .2rem; border-radius: var(--r-sm); background: var(--surface-2); font-size: .8125rem; display: flex; flex-direction: column; gap: .2rem; }
.week-strip .d b { font-size: .85rem; } .week-strip .d.today { outline: 2px solid var(--accent); }
.week-strip .d .m { color: var(--muted); font-size: .8125rem; }

/* ---------- Module ---------- */
.mod-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.mod-head .color { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.1rem; flex: none; }
.week-block { margin-bottom: .9rem; }
.week-block .wh { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; cursor: pointer; }
.week-block .wh h3 { flex: 1; } .week-block .wh .muted { font-size: .8125rem; }
.doc-row { display: grid; grid-template-columns: 24px 1fr auto; gap: .6rem; align-items: center; padding: .45rem .5rem; border-radius: var(--r-sm); cursor: pointer; }
.doc-row:hover { background: var(--surface-2); } .doc-row .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .doc-row .s { color: var(--muted); font-size: .8125rem; }
.doc-row.neu .t::after { content: "Neu"; margin-left: .5rem; font-size: .8125rem; background: var(--accent-soft); color: var(--accent-text); padding: 0 .4rem; border-radius: 999px; font-weight: 600; }
.doc-row.erledigt .t { color: var(--muted); text-decoration: line-through; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .7rem; }
.doc-card { border: 1px solid var(--line); border-radius: var(--r); padding: .8rem; cursor: pointer; background: var(--surface); display: flex; flex-direction: column; gap: .4rem; }
.doc-card:hover { border-color: var(--line-strong); } .doc-card .t { font-weight: 550; line-height: 1.3; }

/* ---------- Dateien ---------- */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .9rem; }
.filters select, .filters input { width: auto; }

/* ---------- Kalender ---------- */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6rem; }
.cal-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-height: 260px; display: flex; flex-direction: column; overflow: hidden; }
.cal-day.today { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.cal-day.drop { background: var(--accent-soft); }
.cal-day .dh { padding: .55rem .7rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .4rem; cursor: pointer; }
.cal-day .dh b { font-size: .9rem; } .cal-day .dh .n { color: var(--muted); font-size: .8125rem; margin-left: auto; }
.cal-day .dh .sd { width: 9px; height: 9px; border-radius: 50%; }
.sd.geplant { background: var(--info); } .sd.in_bearbeitung { background: var(--accent); } .sd.erledigt { background: var(--ok); } .sd.teilweise { background: var(--warn); } .sd.nachholen { background: var(--bad); } .sd.frei, .sd.leer { background: var(--line-strong); }
.cal-day .db { padding: .5rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.pkg { border-radius: var(--r-sm); padding: .5rem .6rem; background: var(--surface-2); border-left: 4px solid var(--pc, var(--accent)); cursor: pointer; font-size: .83rem; outline: 1px solid transparent; transition: outline-color var(--t); }
.pkg:hover { outline-color: var(--line-strong); } .pkg.dragging { opacity: .5; }
.pkg .pt { font-weight: 600; line-height: 1.25; font-size: .8125rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .pkg .ps { color: var(--muted); font-size: .8125rem; display: flex; gap: .4rem; align-items: center; margin-top: .2rem; flex-wrap: wrap; } .pkg .ps:empty { display: none; }
.pkg.erledigt { opacity: .7; } .pkg.erledigt .pt { text-decoration: line-through; }
.pkg.nachholen { border-left-color: var(--bad); background: var(--bad-soft); } .pkg.teilweise { background: var(--warn-soft); }
.pkg .tl { display: flex; gap: .25rem; margin-top: .35rem; flex-wrap: wrap; }
.pkg .tl i { width: 18px; height: 18px; border-radius: 5px; display: inline-grid; place-items: center; font-size: .8125rem; font-style: normal; font-weight: 700; background: var(--surface); color: var(--text-2); border: 1px solid var(--line); }
.pkg .tl i.done { background: var(--ok-btn); color: var(--on-fill); border-color: var(--ok-btn); } .pkg .tl i.late { background: var(--bad-btn); color: var(--on-fill); border-color: var(--bad-btn); }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem; }
.cal-month .mh { text-align: center; color: var(--muted); font-size: .8125rem; font-weight: 600; padding: .2rem; }
.cal-month .md { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 86px; padding: .35rem .45rem; cursor: pointer; font-size: .8125rem; display: flex; flex-direction: column; gap: .2rem; }
.cal-month .md.other { opacity: .45; } .cal-month .md.today { border-color: var(--accent); }
.cal-month .md .n { font-weight: 600; display: flex; align-items: center; gap: .3rem; }
.cal-month .md .mp { display: flex; flex-wrap: wrap; gap: 2px; } .cal-month .md .mp span { width: 100%; height: 4px; border-radius: 2px; background: var(--pc); }
.cal-day-view .pkg { font-size: .95rem; }
.task-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .3rem; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row .chk { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line-strong); display: grid; place-items: center; cursor: pointer; flex: none; color: #fff; }
.task-row .chk.on { background: var(--ok-btn); border-color: var(--ok-btn); color: var(--on-fill); }
.task-row .tt { flex: 1; min-width: 0; } .task-row .tt b { display: block; font-weight: 550; } .task-row .tt span { color: var(--muted); font-size: .8125rem; }
.task-row.erledigt .tt b { text-decoration: line-through; color: var(--muted); } .task-row.nachholen .tt b { color: var(--bad-text); }
.legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .8125rem; color: var(--muted); } .legend span { display: inline-flex; align-items: center; gap: .3rem; }
.sugg li { display: grid; grid-template-columns: 1fr auto auto auto; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .86rem; }

/* ---------- Tests ---------- */
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; margin-bottom: .8rem; }
.q .qh { display: flex; justify-content: space-between; color: var(--muted); font-size: .8125rem; margin-bottom: .4rem; }
.q textarea { width: 100%; min-height: 80px; } .q .opt { display: flex; gap: .5rem; align-items: center; margin: .3rem 0; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.q .opt:hover { background: var(--surface-2); }
.q .fb { margin-top: .6rem; padding: .6rem .7rem; border-radius: var(--r-sm); background: var(--surface-2); font-size: .88rem; }
.q.good { border-color: var(--ok); } .q.bad { border-color: var(--bad); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.05rem; } .timer.low { color: var(--bad-text); }
.score { font-size: 2rem; font-weight: 800; }
.exam-focus .sidebar, .exam-focus .header { display: none; } .exam-focus .shell { grid-template-columns: 1fr; }
.fc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; min-height: 180px; display: flex; flex-direction: column; justify-content: center; text-align: center; font-size: 1.05rem; cursor: pointer; }
.fc-card .ans { margin-top: .8rem; color: var(--accent-text); }
/* Karteikarten "Frei üben" (Trainer wie FlashcardTrainerView auf dem iPad) */
.fc-count { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .8rem 0; font-variant-numeric: tabular-nums; }
.fc-pill { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .8rem; border-radius: 999px; font-size: .8rem; font-weight: 500; border: 1.5px solid; }
.fc-pill b { font-size: .95rem; font-weight: 700; }
.fc-pill.bad { color: var(--bad-text); border-color: var(--bad); background: color-mix(in srgb, var(--bad-soft) 60%, transparent); }
.fc-pill.ok { color: var(--ok-text); border-color: var(--ok); background: color-mix(in srgb, var(--ok-soft) 60%, transparent); }
.fc-pos { font-size: .95rem; }
.fc-stage { overflow: hidden; padding: .3rem; margin: 0 -.3rem; }
.fc-big { position: relative; display: flex; align-items: center; justify-content: center; min-height: 300px; padding: 3.5rem 1.75rem; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 4px 16px rgba(0,0,0,.08); cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform .25s ease, border-color .15s; }
.fc-big.dragging { transition: none; }
.fc-big:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fc-big.lean-ok { border: 2px solid var(--ok); } .fc-big.lean-bad { border: 2px solid var(--bad); }
.fc-text { font-size: 1.3rem; font-weight: 600; color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.fc-big.def .fc-text { font-size: 1.1rem; font-weight: 400; color: var(--text-2); }
.fc-side { position: absolute; top: .9rem; left: 1.1rem; font-size: .74rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fc-badge { position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); font-size: .82rem; font-weight: 650; border-radius: 999px; padding: .25rem .75rem; }
.fc-badge:empty { display: none; }
.lean-ok .fc-badge { color: var(--ok-text); background: var(--ok-soft); } .lean-bad .fc-badge { color: var(--bad-text); background: var(--bad-soft); }
.fc-tools { position: absolute; top: .25rem; right: .25rem; display: flex; align-items: center; }
.fc-tools .btn, .fc-bar .btn { min-height: 44px; }
.fc-bar { margin-top: .9rem; gap: .6rem; flex-wrap: wrap; } .fc-bar .btn { min-height: 48px; padding: 0 1rem; }
.btn.fc-on { color: var(--accent-text); background: var(--accent-soft); }
.item.fc-hidden .title { color: var(--muted); }
.fc-group { display: flex; align-items: center; gap: .45rem; margin: .9rem 0 .25rem; font-size: .86rem; }
.fc-group:first-of-type { margin-top: .3rem; }
.fc-group .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.fc-weeks { gap: .35rem; margin: .3rem 0 .5rem; }
.fc-badge-kind { font-size: .72rem; margin-left: .35rem; vertical-align: middle; }
.item.fc-edit { align-items: stretch; }
.item.fc-edit form.main { display: flex; flex-direction: column; gap: .45rem; }
.item.fc-edit .field { margin: 0; }
.fc-opt { margin-top: .9rem; display: flex; flex-direction: column; gap: .45rem; }
.fc-opt > small { font-size: .74rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fc-opt .chip { min-height: 44px; padding: 0 .9rem; }
.fc-seg { display: flex; } .fc-seg button { flex: 1; justify-content: center; min-height: 44px; }

/* ---------- Editor-Ansicht ---------- */
.doc-view { display: flex; flex-direction: column; height: calc(100vh - var(--header)); }
.doc-bar { display: flex; align-items: center; gap: .6rem; padding: .45rem .8rem; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.doc-bar .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.doc-panes { display: grid; grid-template-columns: 1fr; flex: 1; min-height: 0; gap: .4rem; padding: .4rem; }
.doc-panes.split { grid-template-columns: 1fr 1fr; } .doc-panes.notes { grid-template-columns: 1fr 340px; } .doc-panes.split.notes { grid-template-columns: 1fr 1fr 320px; }
.doc-pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.doc-pane > .ed, .doc-pane > .ed-host { flex: 1; min-height: 0; }
.ed-host { display: flex; flex-direction: column; min-height: 0; }
.notes-pane { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 0; }
.notes-pane textarea { flex: 1; border: 0; resize: none; padding: .9rem; background: transparent; outline: none; font-family: var(--font); line-height: 1.5; }
.notes-pane .nh { padding: .6rem .9rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.nonpdf { flex: 1; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; white-space: pre-wrap; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.pane-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r); }
.fullscreen-doc .sidebar, .fullscreen-doc .header { display: none; } .fullscreen-doc .shell { grid-template-columns: 1fr; } .fullscreen-doc .doc-view { height: 100vh; }

/* ---------- Mobile ---------- */
.mobile-nav { display: none; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar); transform: translateX(-100%); transition: transform var(--t); }
  .sidebar.open { transform: none; }
  .collapsed .brand span, .collapsed .nav a span, .collapsed .side-foot span { display: inline; } .collapsed .nav a, .collapsed .side-foot > a, .collapsed .side-foot > .btn { justify-content: flex-start; padding: .55rem .7rem; }
  .menu-btn { display: inline-flex; }
  .header { padding: 0 1.1rem; gap: .4rem; } .header .search { min-width: 0; } .header .search input { padding-left: 2rem; }
  .sync-chip { display: none; } #profileBtn { display: none; }
  .content, .content.wide { padding: 1rem 1.1rem 5rem; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 30; padding: .3rem .2rem calc(.3rem + env(safe-area-inset-bottom)); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .66rem; color: var(--muted); padding: .25rem; border-radius: var(--r-sm); }
  .mobile-nav a.active { color: var(--accent-text); background: var(--accent-soft); }
  .cal-week { grid-template-columns: 1fr; } .cal-day { min-height: 0; }
  .doc-panes.split, .doc-panes.notes, .doc-panes.split.notes { grid-template-columns: 1fr; }
  .doc-view { height: calc(100vh - var(--header)); }
  .header .search { max-width: none; }
  .page-head h1 { font-size: 1.25rem; }
  .drawer { width: 100%; }
}
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 19; }

/* ---------- Dokument-Tabs ---------- */
.doc-tabs { display: flex; align-items: center; gap: .2rem; padding: .3rem .6rem 0; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.doc-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem; border-radius: 10px 10px 0 0; background: var(--surface-2); color: var(--text-2); font-size: .84rem; max-width: 220px; cursor: pointer; border: 1px solid transparent; border-bottom: 0; white-space: nowrap; }
.doc-tab span { overflow: hidden; text-overflow: ellipsis; } .doc-tab.active { background: var(--accent); color: var(--on-fill); }
.doc-tab .x { opacity: .6; border-radius: 4px; display: inline-grid; place-items: center; width: 16px; height: 16px; } .doc-tab .x:hover { opacity: 1; background: rgba(0,0,0,.15); }
.doc-tab.home { max-width: none; }
.doc-view .doc-bar { padding: .3rem .6rem; }

/* ---------- Bibliothek ---------- */
.lib { display: grid; grid-template-columns: 210px 1fr; gap: 1rem; }
.lib-nav { display: flex; flex-direction: column; gap: .2rem; }
.lib-nav a { display: flex; align-items: center; gap: .55rem; padding: .5rem .7rem; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; }
.lib-nav a.active { background: var(--accent-soft); color: var(--accent-text); } .lib-nav a:hover { text-decoration: none; background: var(--surface-2); }
.lib-crumbs { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; font-size: .9rem; } .lib-crumbs a { color: var(--accent-text); } .lib-crumbs b { font-size: 1.3rem; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.2rem 1rem; }
.lib-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; cursor: pointer; position: relative; }
.lib-folder { width: 112px; height: 86px; border-radius: 12px; position: relative; background: var(--fc, #4f8ef7); }
.lib-folder::before { content: ""; position: absolute; left: 0; top: -10px; width: 46px; height: 16px; border-radius: 8px 8px 0 0; background: var(--fc, #4f8ef7); filter: brightness(1.1); }
.lib-folder::after { content: ""; position: absolute; left: 0; right: 0; top: 6px; bottom: 0; border-radius: 10px; background: rgba(255,255,255,.16); }
.lib-thumb { width: 112px; height: 86px; border-radius: 6px; background: #fff; border: 1px solid var(--line-strong); overflow: hidden; display: grid; place-items: center; position: relative; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lib-thumb.notebook { background: repeating-linear-gradient(#fff 0 9px, #e6e9f0 9px 10px); } .lib-thumb.whiteboard { background: #fafbfd; } .lib-thumb .ph { color: var(--line-strong); }
.lib-star { position: absolute; top: 4px; right: 6px; color: #fff; opacity: .9; } .lib-thumb .lib-star { color: var(--line-strong); } .lib-item.fav .lib-star { color: var(--warn-text); }
.lib-item .nm { font-size: .88rem; font-weight: 500; line-height: 1.25; display: flex; align-items: center; gap: .2rem; max-width: 150px; } .lib-item .nm span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lib-item .dt { color: var(--muted); font-size: .8125rem; }
.lib-item .menu-btn2 { color: var(--accent-text); display: inline-grid; place-items: center; }
.lib-list .lib-row { display: grid; grid-template-columns: 44px 1fr 110px 120px 90px 36px; gap: .6rem; align-items: center; padding: .45rem .5rem; border-bottom: 1px solid var(--line); cursor: pointer; font-size: .88rem; }
.lib-list .lib-row:hover { background: var(--surface-2); } .lib-list .lib-row .mini { width: 36px; height: 36px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; } .lib-list .lib-row .mini img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lib-list .lib-row .mini.folder { background: var(--fc, #4f8ef7); color: #fff; }
.lib-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
@media (max-width: 900px) { .lib { grid-template-columns: 1fr; } .lib-nav { flex-direction: row; overflow-x: auto; } .lib-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } .lib-folder, .lib-thumb { width: 96px; height: 74px; } .lib-list .lib-row { grid-template-columns: 36px 1fr 36px; } .lib-list .lib-row .hide-m { display: none; } }

/* ---------- Stundenplan ---------- */
.tt-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
.tt-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(120px, 1fr)); min-width: 900px; }
.tt-head { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); padding: .45rem .3rem; text-align: center; font-size: .82rem; font-weight: 600; }
.tt-head.today { color: var(--accent-text); } .tt-head .d { font-weight: 400; color: var(--muted); display: block; font-size: .8125rem; }
.tt-axis { position: relative; border-right: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }
.tt-axis span { position: absolute; right: 4px; transform: translateY(-50%); }
.tt-col { position: relative; border-right: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hour, 56px); }
.tt-col.today { background-color: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
.tt-free { position: absolute; left: 2px; right: 2px; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--ok) 14%, transparent) 6px 8px); border-radius: 6px; pointer-events: none; }
.tt-blocked { position: absolute; left: 2px; right: 2px; background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(120,120,120,.18) 5px 7px); border-radius: 6px; font-size: .8125rem; color: var(--muted); padding: .1rem .3rem; }
.tt-ev { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: .25rem .4rem; font-size: .8125rem; line-height: 1.2; background: var(--ec, var(--accent)); color: #fff; cursor: pointer; overflow: hidden; border-left: 3px solid rgba(0,0,0,.18); }
.tt-ev b { display: block; font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tt-ev small { opacity: .9; }
.tt-ev.nicht_teilnahme { opacity: .45; text-decoration: line-through; } .tt-ev.ausfall { background: var(--surface-2) !important; color: var(--muted); border: 1px dashed var(--line-strong); text-decoration: line-through; } .tt-ev.verschoben { opacity: .35; }
/* Ausfall am Termin: Warnzeichen mit "Ausfall?" (aus einer Ankuendigung erkannt) bzw. "fällt aus" */
.cx-mark { display: inline-flex; align-items: center; gap: .2rem; flex: none; font-size: .66rem; font-weight: 700; line-height: 1.3; color: var(--warn-text); background: var(--warn-soft); border-radius: 999px; padding: .05rem .35rem; white-space: nowrap; text-decoration: none; }
.tt-ev .cx-mark, .cal2-ev .cx-mark { position: absolute; top: 3px; right: 3px; }
.tt-ev.cx-unsure, .cal2-ev.cx-unsure, .day2-ev.cx-unsure { box-shadow: inset 0 0 0 2px var(--warn); }
.day2-ev .cx-src { display: block; font-size: .74rem; color: var(--warn-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Sitzungsthema aus Stud.IP (02.11.2026): dezent, eine Zeile */
.day2-ev .tp-src { display: block; font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-box { background: var(--warn-soft); border: 1px solid var(--warn); } .cx-box .cx-title { color: var(--warn-text); }
.tt-ev.study { background: var(--surface); color: var(--text); border: 1px solid var(--pc, var(--accent)); border-left: 4px solid var(--pc, var(--accent)); } .tt-ev.study.erledigt { opacity: .6; } .tt-ev.study.nachholen { border-color: var(--bad); }
.tt-legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .8125rem; color: var(--muted); margin: .5rem 0; } .tt-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: .25rem; }
.tt-day { position: relative; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hour, 56px); min-height: 400px; }
.imp-table { width: 100%; border-collapse: collapse; font-size: .82rem; } .imp-table td, .imp-table th { padding: .3rem .25rem; border-bottom: 1px solid var(--line); vertical-align: middle; } .imp-table input, .imp-table select { padding: .2rem .3rem; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-size: .8125rem; max-width: 100%; }
.imp-table tr.unc { background: var(--warn-soft); } .imp-table tr.off { opacity: .5; }

/* ---------- Lernpaket-Karten (Übersicht), Testkarten ---------- */
.pkg-card { border: 1px solid var(--line); border-left: 4px solid var(--pc, var(--accent)); border-radius: var(--r); padding: .7rem .9rem; margin-bottom: .6rem; background: var(--surface); }
.test-card { position: relative; border-top: 4px solid var(--mc, var(--accent)); }
.test-head-r { gap: .15rem; margin: -.35rem -.45rem -.35rem 0; }
.test-del { width: 40px; height: 40px; color: var(--muted); }
.test-del:hover, .test-del:active { color: var(--bad-text); background: var(--surface-2); }
.pkg.uni { background: color-mix(in srgb, var(--pc) 12%, var(--surface)); cursor: default; }
.kpi a { font-weight: 600; }

/* ---------- Zeitmesser ---------- */
.timer-widget { position: fixed; right: 1rem; bottom: 1rem; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); z-index: 45; padding: .8rem; animation: fade .15s ease; border-color: var(--line-strong); }
.timer-widget { width: min(320px, calc(100vw - 2rem)); }
.timer-widget > .row.between { flex-wrap: nowrap; gap: .4rem; align-items: center; }
.timer-widget .seg { flex: 1; min-width: 0; display: flex; }
.timer-widget .seg button { flex: 1 1 0; min-width: 0; padding: .3rem .35rem; font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-widget [data-t=close] { flex: none; }
.timer-widget .row:not(.between) { flex-wrap: wrap; gap: .35rem; }
.timer-widget .big { font-size: 2rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; margin: .3rem 0; }
.timer-widget .big.done { color: var(--bad-text); }
.timer-pill { position: fixed; right: 1rem; bottom: 1rem; background: var(--accent); color: var(--on-fill); border-radius: 999px; padding: .4rem .8rem; font-variant-numeric: tabular-nums; z-index: 45; cursor: pointer; font-weight: 600; }

/* ===================== Vorlagen-Design 2.2 (Lernkalender, Bibliothek, Module) ===================== */
.page-head h1 { font-size: 1.9rem; letter-spacing: -.02em; font-weight: 700; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .8125rem; display: grid; place-items: center; flex: none; cursor: default; }
.header .search .kbd { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: .8125rem; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 .35rem; background: var(--surface); }
.sync-chip .ok { color: var(--ok-text); }
.sync-chip.offline { color: var(--warn-text); font-weight: 600; }
.pwa-hint { margin-bottom: 1rem; border-color: var(--accent-soft); }
.seg.pill { background: var(--surface-2); padding: 4px; border-radius: 10px; } .seg.pill button { padding: .4rem .9rem; border-radius: 8px; display: inline-flex; align-items: center; gap: .3rem; }
.seg.pill button.active { background: var(--accent); color: var(--on-fill); outline: 0; }
.cal2 { display: grid; grid-template-columns: minmax(0, 1fr) 286px; gap: 1rem; align-items: start; }
.cal2-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .9rem 1rem 1rem; min-width: 0; }
.cal2-side { display: flex; flex-direction: column; gap: .9rem; }
.cal2-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .9rem; }
.cal2-title { display: flex; align-items: center; gap: .5rem; font-weight: 650; font-size: 1rem; min-width: 250px; justify-content: center; }
.cal2-grid { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); gap: 0 6px; }
.cal2-dh { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .3rem; text-align: center; margin-bottom: .6rem; cursor: pointer; }
.cal2-dh:hover { background: var(--surface-2); } .cal2-dh.today { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.cal2-dh .wd { font-size: .8125rem; color: var(--muted); } .cal2-dh.today .wd { color: inherit; } .cal2-dh .dn { font-weight: 700; font-size: 1rem; }
.cal2-dh .pm { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .1rem .35rem; font-size: .8125rem; color: var(--muted); margin-top: .2rem; }
.ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(var(--rc, var(--ok)) calc(var(--p, 0) * 1%), var(--line) 0); display: inline-grid; place-items: center; flex: none; }
.ring::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); }
.cal2-dh.today .ring::after { background: var(--accent-soft); }
.cal2-axis { position: relative; font-size: .8125rem; color: var(--muted); } .cal2-axis span { position: absolute; right: 6px; transform: translateY(-50%); white-space: nowrap; }
.cal2-col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% var(--hour, 60px); border-radius: 4px; }
.cal2-col.today { background-color: color-mix(in srgb, var(--accent-soft) 40%, transparent); } .cal2-col.drop { background-color: var(--accent-soft); }
.cal2-ev { position: absolute; left: 3px; right: 3px; border-radius: 10px; padding: .35rem .5rem; background: color-mix(in srgb, var(--ec) 13%, var(--surface)); border-left: 3px solid var(--ec); font-size: .8125rem; line-height: 1.25; overflow: hidden; cursor: pointer; color: var(--text); outline: 1px solid transparent; transition: outline-color var(--t); }
.cal2-ev:hover { outline-color: var(--line-strong); z-index: 2; } .cal2-ev .t { color: var(--text-2); font-size: .8125rem; } .cal2-ev b { display: block; font-size: .8125rem; margin: .1rem 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cal2-ev .r { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal2-ev.study { background: color-mix(in srgb, var(--info) 10%, var(--surface)); border-left-color: var(--ec, var(--info)); }
.cal2-ev .foot { display: flex; align-items: center; justify-content: space-between; margin-top: .3rem; gap: .3rem; } .cal2-ev .foot .status-pill { font-size: .8125rem; padding: .05rem .4rem; }
.cal2-ev .chk { width: 16px; height: 16px; border: 1.5px solid var(--line-strong); border-radius: 4px; background: var(--surface); display: grid; place-items: center; color: #fff; flex: none; } .cal2-ev .chk.on { background: var(--ok-btn); border-color: var(--ok-btn); color: var(--on-fill); }
.cal2-ev.erledigt { opacity: .75; } .cal2-ev.nachholen { border-left-color: var(--bad); background: var(--bad-soft); } .cal2-ev.off { opacity: .45; text-decoration: line-through; } .cal2-ev.dragging { opacity: .5; }
.cal2-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--accent); z-index: 3; pointer-events: none; } .cal2-now::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cal2-add { position: absolute; left: 50%; transform: translateX(-50%); bottom: 8px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-fill); display: grid; place-items: center; cursor: pointer; border: 0; z-index: 2; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.1rem; }
.side-card h2 { font-size: 1rem; margin-bottom: .75rem; display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.donut-wrap { display: flex; align-items: center; gap: 1rem; }
.donut { width: 104px; height: 104px; border-radius: 50%; background: conic-gradient(var(--seg)); display: grid; place-items: center; flex: none; }
.donut i { width: 76px; height: 76px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; font-style: normal; font-size: .8125rem; color: var(--muted); line-height: 1.15; } .donut i b { display: block; font-size: .98rem; color: var(--text); }
.legend2 { display: flex; flex-direction: column; gap: .4rem; font-size: .8125rem; flex: 1; } .legend2 div { display: flex; align-items: center; gap: .45rem; } .legend2 .dot { width: 9px; height: 9px; } .legend2 b { margin-left: auto; }
.todo-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 12px; margin-bottom: .5rem; cursor: pointer; } .todo-item:hover { background: var(--surface-2); } .todo-item:last-child { margin-bottom: 0; }
.todo-item .ic-c { display: grid; place-items: center; flex: none; color: var(--bad-text); } .todo-item .m { flex: 1; min-width: 0; } .todo-item .m b { display: block; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .todo-item .m span { color: var(--muted); font-size: .8125rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; } .quick-grid .btn { justify-content: flex-start; padding: .6rem .7rem; }
.mini-cal .mh { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .8125rem; color: var(--muted); margin-bottom: .2rem; }
.mini-cal .md { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; } .mini-cal .md a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .25rem 0 .15rem; border-radius: 8px; font-size: .8125rem; color: var(--text); min-height: 32px; } .mini-cal .md a:hover { background: var(--surface-2); text-decoration: none; }
.mini-cal .md a.other { color: var(--muted); font-weight: 400; } .mini-cal .md a.today { background: var(--accent); color: var(--on-fill); font-weight: 700; } .mini-cal .md a.sel { background: var(--accent-soft); color: var(--accent-text); }
.mini-cal .md a .dots { display: flex; gap: 2px; height: 4px; } .mini-cal .md a .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--dc, var(--accent)); } .mini-cal .md a.today .dots i { background: var(--on-fill); }
.day2 { position: relative; }
.day2-ev { position: absolute; left: 60px; right: 8px; border-radius: 12px; padding: .55rem .9rem; background: color-mix(in srgb, var(--ec) 10%, var(--surface)); border-left: 4px solid var(--ec); display: flex; align-items: center; gap: .8rem; cursor: pointer; overflow: hidden; outline: 1px solid transparent; transition: outline-color var(--t); }
.day2-ev:hover { outline-color: var(--line-strong); z-index: 2; } .day2-ev.off { opacity: .5; text-decoration: line-through; }
.day2-ev .ib { width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--ec) 18%, var(--surface)); color: var(--ec); display: grid; place-items: center; flex: none; }
.day2-ev .m { flex: 1; min-width: 0; } .day2-ev .m b { display: block; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .day2-ev .m span { color: var(--text-2); font-size: .82rem; }
.day2-ev .bd { display: flex; gap: .4rem; flex: none; align-items: center; } .day2-ev .badge.kind { background: color-mix(in srgb, var(--ec) 18%, var(--surface)); color: var(--ec); }
.day2-ev.study { background: color-mix(in srgb, var(--info) 8%, var(--surface)); border-left-color: var(--ec, var(--info)); } .day2-ev.study .ib { background: var(--info-soft); color: var(--info-text); }
.day2-free { position: absolute; left: 60px; right: 8px; border-radius: 10px; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--ok) 12%, transparent) 6px 8px); pointer-events: none; }
.task2 { display: flex; align-items: flex-start; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); } .task2:last-child { border-bottom: 0; }
.task2 .chk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: #fff; cursor: pointer; flex: none; margin-top: .1rem; } .task2 .chk.on { background: var(--accent); border-color: var(--accent); color: var(--on-fill); }
.task2 .m { flex: 1; min-width: 0; } .task2 .m b { display: block; font-size: .86rem; font-weight: 550; } .task2 .m span { color: var(--muted); font-size: .8125rem; display: block; } .task2.erledigt .m b { text-decoration: line-through; color: var(--muted); }
.chips { display: flex; gap: .5rem; flex-wrap: wrap; } .chips .chip { padding: .45rem .95rem; font-size: .86rem; border-radius: 10px; background: var(--surface-2); border-color: transparent; color: var(--text-2); } .chips .chip.on { background: var(--accent-soft); color: var(--accent-text); }
.search-inline { position: relative; } .search-inline input { padding-left: 2.1rem; width: 230px; } .search-inline .ic { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem; }
.folder-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem 1.2rem 1.1rem; cursor: pointer; overflow: hidden; transition: transform .12s ease, border-color .12s ease; }
.folder-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.folder-card .wave { display: none; }
.folder-card .fold { position: relative; width: 92px; height: 70px; margin: .4rem 0 1.5rem 2.6rem; }
.folder-card .fold::before { content: ""; position: absolute; left: 0; top: -11px; width: 40px; height: 20px; background: var(--fc); border-radius: 8px 8px 0 0; filter: brightness(.9); }
.folder-card .fold::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--fc) 84%, #fff); border-radius: 8px 10px 10px 10px; }
.folder-card .ini { position: absolute; left: 1.2rem; top: 7rem; width: 44px; height: 44px; border-radius: 12px; background: var(--fc); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .9rem; z-index: 1; }
.folder-card .row2 { display: flex; align-items: flex-start; gap: .6rem; padding-left: 3.5rem; min-height: 44px; }
.folder-card .nm { font-weight: 650; font-size: 1.02rem; line-height: 1.25; flex: 1; } .folder-card .cnt { color: var(--muted); font-size: .8125rem; padding-left: 3.5rem; margin-top: .15rem; }
.folder-card .kebab { color: var(--muted); background: none; border: 0; padding: .2rem; cursor: pointer; border-radius: 6px; display: grid; place-items: center; } .folder-card .kebab:hover { background: var(--surface-2); color: var(--text); }
.quick-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.2rem 1.2rem; margin-top: 1.4rem; }
.quick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.quick-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; } .quick-item:hover { background: var(--surface-2); }
.quick-item .fi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; } .quick-item .m { min-width: 0; } .quick-item .m b { display: block; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .quick-item .m span { color: var(--muted); font-size: .8125rem; }
.mod2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.mod2 { position: relative; display: block; color: inherit; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--mc) 22%, var(--line)); padding: 1.2rem 1.3rem 1.1rem; background: color-mix(in srgb, var(--mc) 7%, var(--surface)); overflow: hidden; transition: transform .12s ease, border-color .12s ease; }
.mod2:hover { transform: translateY(-2px); border-color: var(--mc); text-decoration: none; }
.mod2 .deco { position: absolute; right: 1rem; top: .9rem; color: var(--mc); opacity: .18; }
.mod2 .hd { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; padding-right: 2.5rem; } .mod2 .ini { width: 48px; height: 48px; border-radius: 12px; background: var(--mc); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 1rem; flex: none; }
.mod2 .nm { font-weight: 700; font-size: 1.12rem; line-height: 1.2; }
.mod2 .desc { color: var(--text-2); font-size: .86rem; min-height: 2.6em; margin-bottom: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod2 .pr { display: flex; justify-content: space-between; font-size: .8125rem; margin-bottom: .35rem; color: var(--text-2); } .mod2 .pr b { color: var(--mc); } .mod2 .pr strong { color: var(--text); }
.mod2 .progress { height: 7px; background: color-mix(in srgb, var(--mc) 15%, var(--surface)); } .mod2 .progress > i { background: var(--mc); }
.mod2 .next { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; margin: .9rem 0; display: flex; align-items: center; gap: .7rem; } .mod2 .next .ic { color: var(--mc); } .mod2 .next .m { flex: 1; min-width: 0; } .mod2 .next .m small { display: block; color: var(--muted); font-size: .8125rem; } .mod2 .next .m b { display: block; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mod2 .next .m span { color: var(--text-2); font-size: .8125rem; }
.mod2 .stats { display: flex; justify-content: space-between; gap: .5rem; } .mod2 .stats div { display: flex; align-items: center; gap: .45rem; font-size: .8125rem; color: var(--muted); } .mod2 .stats .ic { color: var(--text-2); } .mod2 .stats b { font-size: 1.05rem; color: var(--text); display: block; line-height: 1; margin-bottom: .1rem; }
.mod2-list .lib-row { grid-template-columns: 44px 1fr 120px 120px 120px 36px; }
@media (max-width: 1100px) { .cal2 { grid-template-columns: 1fr; } .cal2-side { flex-direction: row; flex-wrap: wrap; } .cal2-side > * { flex: 1 1 260px; } }
@media (max-width: 900px) { .cal2-grid { grid-template-columns: 36px repeat(7, minmax(90px, 1fr)); } .cal2-ev { padding: .3rem .25rem; left: 2px; right: 2px; } .cal2-dh .pm { column-gap: .25rem; } .cal2-dh .ring { width: 14px; height: 14px; } .cal2-dh .ring::after { width: 8px; height: 8px; } .cal2-main { overflow-x: auto; } .cal2-title { min-width: 0; } .search-inline input { width: 150px; } }

/* ---- Dokumentansicht: kein Scrollen der ganzen Seite, keine wechselnden Leistenhoehen ---- */
html:has(body.doc-open), body.doc-open { overflow: hidden; overscroll-behavior: none; height: 100%; }
body.doc-open .doc-view { height: calc(100vh - var(--header)); height: calc(100dvh - var(--header)); }
body.doc-open .mobile-nav { display: none; }
.doc-view .doc-bar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; flex: none; }
.doc-view .doc-bar::-webkit-scrollbar { display: none; }
.doc-view .doc-bar > * { flex: none; }
.doc-view .doc-bar .spacer { flex: 1 1 auto; }
#docStatus { width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
@media (max-width: 1100px) { #docStatus { display: none; } }
.doc-tabs { flex: none; }

/* ---- Tablet-Schreibmodus: Dokument bekommt den Bildschirm ---- */
body.doc-open .header { display: none; }
body.doc-open .doc-view, body.fullscreen-doc .doc-view { height: 100vh; height: 100dvh; }
@media (min-width: 901px) {
  body.doc-open .shell, body.doc-open .shell.collapsed { grid-template-columns: var(--sidebar-min) 1fr; }
  body.doc-open .brand span, body.doc-open .nav a span, body.doc-open .side-foot span, body.doc-open .nav a .badge { display: none; }
  body.doc-open .nav a, body.doc-open .side-foot > a { justify-content: center; padding: .6rem; }
  body.doc-open #collapseBtn { display: none; }
}
body.fullscreen-doc.doc-open .shell { grid-template-columns: 1fr; }
.doc-top { display: flex; align-items: center; gap: .3rem; height: 46px; flex: none; padding: 0 .5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.doc-top > .btn, .doc-top > select { flex: none; }
.doc-top .doc-tabs { flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; height: 100%; align-items: center; gap: .3rem; overflow-x: auto; scrollbar-width: none; }
.doc-top .doc-tabs::-webkit-scrollbar { display: none; }
.doc-top .doc-tab { border-radius: 9px; border: 0; height: 32px; padding: 0 .65rem; font-size: .82rem; max-width: 210px; background: transparent; color: var(--text-2); }
.doc-top .doc-tab:hover { background: var(--surface-2); }
.doc-top .doc-tab.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.doc-top .doc-state { width: auto; padding: .2rem .4rem; font-size: .8125rem; height: 32px; }
.doc-menu { display: none !important; }
@media (max-width: 1100px) { .doc-top .hide-s { display: none; } }
@media (max-width: 900px) { .doc-menu { display: inline-flex !important; } }
.fs-exit { display: none; }
body.fullscreen-doc .doc-top { display: none; }
body.fullscreen-doc .fs-exit { display: inline-flex; position: fixed; top: 10px; right: 12px; z-index: 40; align-items: center; gap: .35rem; padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 600 .82rem var(--font); cursor: pointer; color: var(--text); }
/* geteilte Ansicht: Werkzeuge nur einmal, Skript (zweites Dokument) auf der Seite der freien Hand, 35/65 */
.doc-panes.split { grid-template-columns: 65fr 35fr; }
.doc-panes.split.hand-right { grid-template-columns: 35fr 65fr; } .doc-panes.split.hand-right #paneB { order: -1; }
.doc-panes.split #paneB .ed-main, .doc-panes.split #paneB .ed-ctx { display: none; }
.doc-panes.split.notes { grid-template-columns: 65fr 35fr 300px; } .doc-panes.split.notes.hand-right { grid-template-columns: 35fr 65fr 300px; }
@media (pointer: coarse) { .doc-top { height: 52px; } .doc-top .doc-tab, .doc-top .doc-state { height: 38px; } }

/* ---- Lernkalender fuers Tablet ---- */
.cal2.wk.side-off { grid-template-columns: minmax(0, 1fr); } .cal2.wk.side-off .cal2-side { display: none; }
.cal2-free { position: absolute; left: 2px; right: 2px; border-radius: 8px; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--ok) 14%, transparent) 6px 8px); pointer-events: none; }
.cal2-ev { z-index: 1; } .cal2-ev .t .ic { vertical-align: -1px; }
.cal2-ev.study { border: 1px dashed color-mix(in srgb, var(--info) 60%, transparent); border-left: 3px solid var(--ec, var(--info)); background: color-mix(in srgb, var(--info) 7%, var(--surface)); }
.cal2-ev b { overflow-wrap: anywhere; }
.cal2-dh .pm span { overflow: hidden; text-overflow: ellipsis; }
.cal2-legend { display: flex; gap: .4rem 1.1rem; flex-wrap: wrap; font-size: .8125rem; color: var(--muted); margin-top: .7rem; }
.cal2-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: .3rem; }
.lg-uni { background: color-mix(in srgb, var(--accent) 25%, var(--surface)); border-left: 3px solid var(--accent); }
.lg-study { border: 1px dashed var(--info); border-left: 3px solid var(--info); background: color-mix(in srgb, var(--info) 8%, var(--surface)); }
.lg-free { background: repeating-linear-gradient(135deg, transparent 0 3px, color-mix(in srgb, var(--ok) 40%, transparent) 3px 4px); border: 1px solid var(--line); }
.lg-off { background: var(--surface-2); border: 1px solid var(--line-strong); opacity: .6; }
/* ---- Tests & Wiederholung ---- */
.statbar { display: flex; gap: .5rem 1.6rem; flex-wrap: wrap; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .6rem 1rem; margin-bottom: 1rem; font-size: .9rem; color: var(--text-2); }
.statbar b { color: var(--text); font-size: 1.05rem; margin-right: .15rem; } .statbar a { color: var(--accent-text); }
.test-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 1366px) { .test-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .test-grid { grid-template-columns: 1fr; } }
.test-go { min-height: 40px; padding: .5rem 1rem; }
/* ---- Einstellungen: Kategorien ---- */
.set-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.set-nav { display: flex; flex-direction: column; gap: .2rem; position: sticky; top: calc(var(--header) + 1rem); }
.set-nav button { display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; border: 0; background: transparent; border-radius: var(--r-sm); color: var(--text-2); font-weight: 500; cursor: pointer; text-align: left; min-height: 44px; }
.set-nav button:hover { background: var(--surface-2); } .set-nav button.active { background: var(--accent-soft); color: var(--accent-text); }
@media (max-width: 820px) { .set-layout { grid-template-columns: 1fr; } .set-nav { flex-direction: row; overflow-x: auto; position: static; } .set-nav button span { white-space: nowrap; } }

.cal2-ev.narrow { padding: .3rem .3rem; } .cal2-ev.narrow b { display: block; font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; } .cal2-ev.narrow .r, .cal2-ev.narrow .t .ic { display: none; } .cal2-ev.narrow .t { white-space: nowrap; overflow: hidden; }
.set-body { min-width: 0; } .set-body .grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); } .set-body .grid > * { min-width: 0; } .set-body .span-2 { grid-column: 1 / -1; } .set-body .card .row { flex-wrap: wrap; }

/* ---- Skriptsuche-Hinweis und ziehbarer Trenner der geteilten Ansicht ---- */
.doc-panes { position: relative; }
/* zweites Dokument: Titel und Schliessen, auch im Vollbild sichtbar */
.pane-bar { display: flex; align-items: center; gap: .4rem; min-height: 34px; padding: 0 .1rem .3rem; font-size: .82rem; color: var(--muted); }
.pane-bar .t { flex: 1; min-width: 0; display: flex; align-items: center; gap: .35rem; white-space: nowrap; overflow: hidden; }
.pane-bar .t b { overflow: hidden; text-overflow: ellipsis; color: var(--text); font-weight: 600; }
.pane-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane-body > .ed-host, .pane-body > .pane-empty { flex: 1; min-height: 0; }
.split-handle { cursor: col-resize; display: flex; align-items: center; justify-content: center; touch-action: none; border-radius: 6px; }
.split-handle i { width: 4px; height: 48px; border-radius: 4px; background: var(--line-strong); }
.split-handle:hover i, .split-handle:active i { background: var(--accent); }
.script-hint { position: absolute; top: 120px; right: 22px; z-index: 30; display: flex; align-items: center; gap: .6rem; max-width: min(440px, 80%); padding: .5rem .55rem .5rem .8rem; background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 12px; font-size: .82rem; }
.script-hint > .ic { color: var(--accent-text); flex: none; }
.script-hint .m { display: flex; flex-direction: column; min-width: 0; } .script-hint .m span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.ed-inking .script-hint { opacity: .25; pointer-events: none; }

/* Feiertage / vorlesungsfreie Zeit (gruen) und Learnweb-Fristen in den Kalendern */
.hol-chip { display: block; margin-top: .2rem; padding: .05rem .35rem; border-radius: 6px; background: var(--ok-soft); color: var(--ok-text); font-size: .8125rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hol-chip.vorlesungsfrei { font-weight: 500; }
/* Hinweise antippbar (03.11.2026): Feiertag/vorlesungsfrei, Fristen und Hinweise oeffnen das Detail */
.hol-chip[data-chip], .dl-chip[data-chip], .note-chip[data-chip] { cursor: pointer; }
.hol-chip[data-chip]:focus-visible, .dl-chip[data-chip]:focus-visible, .note-chip[data-chip]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hint-detail { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.hint-row { display: flex; gap: .5rem; align-items: baseline; color: var(--text); } .hint-row svg { color: var(--muted); flex: none; position: relative; top: 2px; }
.hint-quote { margin: 0; padding: .6rem .75rem; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); align-self: stretch; }
.hint-decide { align-self: stretch; padding: .7rem .8rem; border-radius: var(--r); background: var(--warn-soft); }
.is-hol { background-color: color-mix(in srgb, var(--ok) 11%, var(--surface)) !important; border-color: color-mix(in srgb, var(--ok) 45%, transparent) !important; }
.is-free { background-color: color-mix(in srgb, var(--ok) 5%, var(--surface)) !important; }
.cal2-col.is-hol, .tt-col.is-hol { background-image: none; }
.dl-chip { display: block; margin-top: .2rem; padding: .05rem .3rem; border-left: 3px solid var(--dc); border-radius: 4px; background: var(--surface-2); color: var(--text); font-size: .8125rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-chip:hover { text-decoration: none; background: var(--line); }
.cal-day-extras { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; } .cal-day-extras .hol-chip, .cal-day-extras .dl-chip { font-size: .8125rem; margin: 0; padding: .2rem .5rem; }
.cal2-legend .lg-hol { background: var(--ok-soft); border: 1px solid var(--ok); } .cal2-legend .lg-dl { background: var(--surface-2); border-left: 3px solid var(--bad); }
.cal2-dh .hol-chip, .tt-head .hol-chip, .cal-month .hol-chip { white-space: normal; hyphens: auto; line-height: 1.15; }
.mini-cal .md a.hol { background: var(--ok-soft); color: var(--ok-text); font-weight: 700; } .mini-cal .md a.vfrei { color: var(--ok-text); }
/* Hinweise aus Ankuendigungen der Lehrenden */
.note-chip { display: flex; align-items: center; gap: .2rem; margin-top: .2rem; padding: .05rem .3rem; border-radius: 4px; background: var(--info-soft, var(--accent-soft)); color: var(--text); font-size: .8125rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-chip.k-ausfall, .note-chip.k-verlegt { background: var(--warn-soft); } .note-chip:hover { text-decoration: none; filter: brightness(.96); }
.cal-day-extras .note-chip { font-size: .8125rem; margin: 0; padding: .2rem .5rem; }
.ann-item { padding: .55rem .2rem; border-bottom: 1px solid var(--line); } .ann-item:last-child { border-bottom: 0; }
.ann-item summary { cursor: pointer; list-style: none; } .ann-item summary::-webkit-details-marker { display: none; }
.ann-item .t { font-weight: 600; overflow-wrap: anywhere; } .ann-item .s { color: var(--muted); font-size: .8125rem; }
.ann-item .body { white-space: pre-line; font-size: .875rem; line-height: 1.6; margin: .4rem 0; max-width: 70ch; overflow-wrap: anywhere; }
.ann-dates { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; } .ann-dates .note-chip { margin: 0; }
.cal2-legend .lg-note { background: var(--info-soft); border: 1px solid var(--info); }

/* Word-Ansicht (views-doc.js, app/docx_view.py) */
.docx-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.textpages { font-family: inherit; font-size: .95rem; }
.textpages .textpage { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.textpages .textpage h4 { margin: 0 0 .3rem; font-weight: 600; }
.docx-bar { display: flex; align-items: center; gap: .5rem; padding: .4rem .2rem; }
.docx-bar .spacer { flex: 1; }
.docx-view { flex: 1; overflow: auto; background: #fff; color: #1d2130; max-width: 820px; width: 100%; margin: 0 auto; padding: 2.4rem 2.6rem; border: 1px solid var(--line-strong); border-radius: 4px; line-height: 1.5; font-family: Calibri, "Segoe UI", Arial, sans-serif; font-size: 11pt; }
.docx-view h1 { font-size: 1.7em; margin: .6em 0 .3em; } .docx-view h2 { font-size: 1.4em; margin: .6em 0 .3em; } .docx-view h3 { font-size: 1.2em; }
.docx-view p { margin: 0 0 .55em; } .docx-view img { max-width: 100%; height: auto; }
.docx-view .dx-table { border-collapse: collapse; margin: .5em 0; width: 100%; } .docx-view .dx-table td { border: 1px solid #c8ccd6; padding: .25em .45em; vertical-align: top; }
.docx-view .dx-table td p { margin: 0; } .docx-view .dx-tab { display: inline-block; width: 2.2em; } .docx-view .dx-page { border: 0; border-top: 1px dashed #c8ccd6; margin: 1.4em 0; }
.docx-view .dx-math { font-family: "Cambria Math", serif; } .docx-view .dx-missing { color: #8a8f9c; font-style: italic; }

.sl-devs { display: flex; flex-direction: column; gap: .35rem; margin-top: .4rem; }
.sl-dev { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .5rem; color: var(--text); }

/* Community Teil 2: Fragen, Gemerkt, Mitteilungen (views-qa.js) */
.qa-tabs { margin: .2rem 0 1rem; }
.qa { display: flex; flex-direction: column; gap: .6rem; }
.qa-list { display: flex; flex-direction: column; gap: .35rem; }
.qa-item { display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; text-align: left; width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm, 8px); background: var(--surface); color: var(--text); cursor: pointer; }
.qa-item:hover, .qa-item:focus-visible { border-color: var(--accent); }
.qa-item.unread { border-left: 3px solid var(--accent); background: var(--accent-soft); }
.qa-form { display: flex; flex-direction: column; gap: .35rem; margin-top: .4rem; }
.qa-new > summary { list-style: none; display: inline-flex; } .qa-new > summary::-webkit-details-marker { display: none; }
.qa-body-text { margin: .5rem 0; line-height: 1.5; }
.qa-answers { display: flex; flex-direction: column; gap: .5rem; }
.qa-answer { border: 1px solid var(--line); border-radius: 8px; padding: .55rem .7rem; }
.qa-answer.accepted { border-color: var(--ok, #22a55b); background: color-mix(in srgb, var(--ok, #22a55b) 8%, transparent); }
.notif-btn { position: relative; }
.notif-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; text-align: center; background: var(--bad-btn); color: var(--on-fill); font-size: .8125rem; line-height: 18px; font-weight: 700; }

/* Barrierefreiheit (28.10.2026): sichtbarer Fokus fuer die Tastatur, Sprunglink zum Inhalt */
:focus-visible { outline: 2px solid var(--accent, #4f5bd5); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent, #4f5bd5); outline-offset: 2px; }
.skip-link { position: absolute; left: -9999px; top: .5rem; z-index: 1000; background: var(--surface); color: var(--text); padding: .5rem .8rem; border-radius: 8px; border: 1px solid var(--line-strong); }
.skip-link:focus { left: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Lernfortschritt & Wochentests (Seitenmarker) */
.doc-lecmark.warn { color: var(--warn-text); }
.wt-box .card-head { margin-bottom: .4rem; }
.wt-list { display: flex; flex-direction: column; }
.wt-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--line); }
.wt-row:first-child { border-top: 0; }
.wt-w { font-weight: 600; font-size: .85rem; color: var(--text-2); }
.wt-t { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.wt-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-a { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.wt-row.wt-st-leer .wt-t b { color: var(--muted); font-weight: 500; }
.wt-warn { background: var(--warn-soft); color: var(--warn-text); border-radius: 10px; padding: .45rem .7rem; font-size: .85rem; margin-bottom: .5rem; }
.wt-facts { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: .55rem .9rem; align-items: start; }
.wt-facts > span { color: var(--muted); font-size: .85rem; padding-top: .3rem; }
.wt-marks { display: flex; flex-direction: column; gap: .3rem; }
.wt-mark { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; }
.wt-mark.review { border-color: var(--warn); background: var(--warn-soft); }
@media (max-width: 640px) {
  .wt-row { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
  .wt-a { justify-content: flex-start; }
  .wt-facts { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .wt-facts > span { padding-top: .5rem; }
}
@media (max-width: 640px) { .seg.pill { max-width: 100%; } .seg.pill button { padding: .4rem .5rem; white-space: nowrap; } .seg.pill button .ic { display: none; } }

/* === Übersicht (Design 2) === */
/* Startseite (views-home.js): beantwortet "Was mache ich heute?". Flach: keine Schatten, keine Verläufe; Nebentext in
   --text-2 (nicht --muted), damit der Kontrast auch unabhängig von den globalen Variablen >= 4,5:1 bleibt. */
.ov .card, .ov .btn, .ov .pkg-card, .ov .pwa-hint { box-shadow: none; }
.ov .muted, .ov .item .sub, .ov .ann-item .s, .ov .week-strip .d .m, .ov-t2 { color: var(--text-2); }
.ov .page-head { margin-bottom: .9rem; }
.ov .greet .date { color: var(--text-2); }
.ov-stats { display: flex; flex-wrap: wrap; gap: .15rem 1.6rem; margin: -.4rem 0 1.1rem; font-size: .92rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ov-stats b { color: var(--text); font-weight: 700; }

.ov-top { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; align-items: stretch; }
.ov-top > * { min-width: 0; }
.ov-focus { flex: 1 1 320px; display: flex; flex-wrap: wrap; gap: 1.2rem 1.6rem; padding: 1.4rem 1.5rem; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--text); }
.ov-top { container-type: inline-size; }
.ov-top.solo .ov-focus { flex-basis: 100%; }
.ov-main { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: .7rem; }
.ov-aside { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .55rem; padding-top: 1rem; border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.ov-aside h2 { display: flex; align-items: center; gap: .45rem; font-size: 1.05rem; }
.ov-aside p { margin: 0; color: var(--text-2); }
@container (min-width: 640px) { .ov-aside { flex: 0 1 280px; padding: 0 0 0 1.6rem; border-top: 0; border-left: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); } }
.ov-plan { flex: 1.7 1 440px; display: flex; flex-direction: column; }
.ov-kicker { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-text); }
.ov-big { display: flex; align-items: baseline; gap: .2rem .7rem; flex-wrap: wrap; }
.ov-big b { font-size: 4rem; line-height: 1; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ov-big span { font-size: 1.25rem; font-weight: 650; }
.ov-head { display: flex; align-items: center; gap: .55rem; font-size: 1.55rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.ov-lead { margin: 0; color: var(--text-2); }
.ov-lead .dot { display: inline-block; margin-right: .3rem; vertical-align: 0; }
.ov-nowrap { font-weight: 600; color: var(--text); }
.ov-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.ov-actions .btn { min-height: 44px; padding: .65rem 1.1rem; font-size: 1rem; }
.ov-next { display: flex; flex-direction: column; gap: .1rem; margin-top: auto; padding-top: .8rem; border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: .9rem; }
.ov-link { display: block; padding: .2rem 0; border: 0; background: none; font: inherit; text-align: left; color: var(--text); cursor: pointer; border-radius: 4px; }
.ov-link:hover { text-decoration: underline; }
.ov-link .dot { display: inline-block; margin-right: .3rem; }

.ov-pkg { border: 0; border-left: 4px solid var(--pc, var(--accent)); background: color-mix(in srgb, var(--pc, var(--accent)) 9%, var(--surface)); padding: .8rem 1rem; margin-bottom: .6rem; }
.ov-pkg-t .row { flex-wrap: wrap; gap: 0 .6rem; }
.ov-pkg-sub { margin: .15rem 0 0 1.1rem; color: var(--text-2); }
.ov-tasks { display: flex; flex-direction: column; gap: .3rem; margin: .55rem 0 .6rem 1.1rem; }
.ov-task-t { flex: 1; min-width: 0; }
.ov-done .ov-task-t { text-decoration: line-through; color: var(--text-2); }
.ov-none { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .6rem; }
.ov-none p { margin: 0; font-size: 1.05rem; font-weight: 600; }
.ov-sec { display: flex; align-items: center; justify-content: space-between; margin: .9rem 0 .25rem; }
.ov-sec h3 { display: flex; align-items: center; gap: .4rem; }
.ov-ev { display: flex; align-items: center; gap: .6rem; padding: .5rem .3rem; border-radius: var(--r-sm); font-size: .9rem; cursor: pointer; }
.ov-ev:hover { background: var(--surface-2); }
.ov-ev b { min-width: 92px; flex: none; font-variant-numeric: tabular-nums; }
.ov-ev-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-ev-r { max-width: 35%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-off .ov-ev-t { text-decoration: line-through; color: var(--text-2); }

.ov .pwa-hint { margin: 0 0 1rem; border: 0; background: var(--surface-2); padding: .8rem 1rem; }
.ov-rest { display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; }
.ov-rest > .ov-card { flex: 1 1 280px; min-width: 0; }
/* Nächste Klausuren (exams.js, 04.11.2026): eigene Farbe wie die Klausur-Pins auf dem iPad */
.ov-exams { margin-bottom: 1rem; --exam: #8a2be2; --exam-soft: #f1e6fc; }
.ov-exam { align-items: flex-start; gap: .8rem; }
.ov-exam-day { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 3.6rem; padding: .3rem .4rem; border-radius: var(--r-sm, 8px); background: var(--exam-soft); color: var(--exam); font-size: .78rem; font-weight: 600; line-height: 1.2; }
.ov-exam-day b { font-size: .95rem; font-weight: 700; }
.ov-exam-src { font-size: .8rem; }
.badge.ov-exam-in { background: var(--exam-soft); color: var(--exam); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ov-exams { --exam: #c58cf5; --exam-soft: #2f1d42; } }
:root[data-theme="dark"] .ov-exams { --exam: #c58cf5; --exam-soft: #2f1d42; }
.ov-mod-bar { height: 5px; margin-top: .4rem; background: color-mix(in srgb, var(--mc, var(--accent)) 16%, var(--surface)); }
.ov-mod-bar > i { background: var(--mc, var(--accent)); }
/* Lernstand je Modul (docs/LERNSTAND-2026-11-04.md, mastery.js): Ring in Modulfarbe (conic-gradient, Loch per mask), Zahl, Begruendung; ohne Lernstand grau */
.mastery { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; color: var(--text); font-variant-numeric: tabular-nums; }
.mastery .ring { flex: none; width: 36px; height: 36px; border-radius: 50%; background: conic-gradient(var(--mc, var(--accent)) calc(var(--p, 0) * 1%), var(--line) 0); -webkit-mask: radial-gradient(circle, transparent 13px, #000 14px); mask: radial-gradient(circle, transparent 13px, #000 14px); }
.mastery.sm .ring { width: 18px; height: 18px; -webkit-mask: radial-gradient(circle, transparent 6px, #000 7px); mask: radial-gradient(circle, transparent 6px, #000 7px); }
.mastery .t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; } .mastery .t b { font-size: .85rem; } .mastery.sm .t b { font-size: .78rem; } .mastery .t small { color: var(--muted); font-size: .78rem; }
.mastery.none { color: var(--muted); } .mastery.none .t b { color: var(--muted); font-weight: 600; } .mastery.none .ring { background: var(--line); }
.mod2-mastery { margin: .6rem 0 .2rem; } .ov-mastery { margin-top: .45rem; }
.ov-foot { margin-top: .4rem; }
.ov .week-strip .d .m { font-size: .76rem; }

/* Dunkel: weisse Schrift auf dem hellen Akzent hat nur 3,2:1, dunkle Schrift gut 5:1 */
:root[data-theme="dark"] .ov .btn.primary { color: #0f1117; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) .ov .btn.primary { color: #0f1117; } }
@media (max-width: 640px) { .ov .page-head .actions { display: none; } }
@media (max-width: 480px) {
  .ov .page-head { margin-bottom: .6rem; }
  .ov-stats { margin-bottom: .8rem; gap: .1rem 1.1rem; font-size: .88rem; }
  .ov-top { gap: .8rem; }
  .ov-focus { padding: 1rem 1.1rem; gap: .8rem; }
  .ov-main { gap: .5rem; }
  .ov-big b { font-size: 3rem; }
  .ov-big span { font-size: 1.1rem; }
  .ov-head { font-size: 1.3rem; }
  .ov-next { padding-top: .5rem; }
}

/* === Einstellungen und Tarife (Design 3) === */
/* Ohne Schatten, ohne Verlauf, Schrift mindestens 4,5:1 (eigene Tokens, die globalen Variablen bleiben unberuehrt) */
.set-page, .abo { --d3-ink-2: #454b61; --d3-ok: #146c3f; --d3-ok-bg: #e3f6ec; --d3-warn: #8a4b00; --d3-warn-bg: #fdf0dc; --d3-info: #1f5fa8; --d3-info-bg: #e4effb; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .set-page, :root:not([data-theme="light"]) .abo { --d3-ink-2: #c0c6d8; --d3-ok: #6fd9a1; --d3-ok-bg: #173327; --d3-warn: #f0b45f; --d3-warn-bg: #3a2a14; --d3-info: #86bdf5; --d3-info-bg: #172a40; } }
:root[data-theme="dark"] .set-page, :root[data-theme="dark"] .abo { --d3-ink-2: #c0c6d8; --d3-ok: #6fd9a1; --d3-ok-bg: #173327; --d3-warn: #f0b45f; --d3-warn-bg: #3a2a14; --d3-info: #86bdf5; --d3-info-bg: #172a40; }
.set-page .badge.ok, .abo .badge.ok { background: var(--d3-ok-bg); color: var(--d3-ok); }
.set-page .badge.warn, .abo .badge.warn { background: var(--d3-warn-bg); color: var(--d3-warn); }
.set-page .badge.info, .abo .badge.info { background: var(--d3-info-bg); color: var(--d3-info); }
.set-page .badge.neutral, .abo .badge.neutral { background: var(--surface-2); color: var(--d3-ink-2); }

/* Einstellungen: Reiter oben (statt 240 px Seitenleiste), darunter volle Breite */
.set-page .set-layout { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.set-page .set-nav { flex-direction: row; overflow-x: auto; position: static; gap: .25rem; border-bottom: 1px solid var(--line); padding-bottom: .5rem; scrollbar-width: none; }
.set-page .set-nav::-webkit-scrollbar { display: none; }
.set-page .set-nav button { flex: none; min-height: 40px; padding: .45rem .8rem; color: var(--d3-ink-2); }
.set-page .set-nav button span { white-space: nowrap; }
.set-page .set-nav button.active { color: var(--accent-text); }
.set-page .card { box-shadow: none; }
.set-page .page-head { margin-bottom: .8rem; }
.set-page .muted, .set-page p.muted { color: var(--d3-ink-2); }

/* Erster Bildschirm: Modulliste links, Semester und Lernzeiten rechts */
.set2 { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1rem; align-items: start; }
.set2-single { grid-template-columns: minmax(0, 36rem); }
.set2-main, .set2-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.set2-side .card, .set2-main .card { padding: 1rem 1.1rem; }
.set2 .card-head { margin-bottom: .6rem; }
.set2 .card-head h2 { font-size: 1rem; }
.set-term { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .7rem; }
.set-term .field { margin: .3rem 0; min-width: 0; color: var(--d3-ink-2); }
.set-term .set-term-name { grid-column: 1 / -1; }
.set-term .input { width: 100%; }
.set-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .35rem .9rem; margin: 0 0 .8rem; font-size: .88rem; }
.set-facts dt { color: var(--d3-ink-2); }
.set-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.set-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.set-mods .seg button { white-space: nowrap; }
.set-mods > .row.wrap > label.field { flex-wrap: wrap; }
.set-mods .card.flat { padding: .6rem .8rem; }
.set-mods [data-open] { min-height: 32px; }
.set-mods .card.flat .small { color: var(--d3-ink-2); }
@media (max-width: 1040px) {
  .set2 { grid-template-columns: minmax(0, 1fr); }
  .set2-side { order: -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .set2-single { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .set2-side { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .set-mods [data-open] { gap: .4rem; }
  .set2-side .card { padding: .8rem .9rem; }
  .set2-side .card-head { margin-bottom: .3rem; }
  .set-term { gap: 0 .6rem; }
  .set-term .field { margin: .15rem 0; }
  .set-facts { gap: .2rem .6rem; margin-bottom: .6rem; }
}

/* Abo & Tarife: Karten behalten ihre eigene Hoehe, Inhalt beginnt oben */
.abo .badge { white-space: normal; }
.abo-now { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); padding: 1rem 1.2rem; display: grid; gap: .7rem; margin-bottom: 1.4rem; }
.abo-now > * { margin: 0; }
.abo-note { display: flex; gap: .7rem; align-items: flex-start; color: var(--text); }
.abo-note > svg { flex: none; margin-top: .15rem; color: var(--accent-text); }
.abo-note > div { flex: 1; min-width: 0; }
.abo-note b { display: block; font-size: 1.02rem; }
.abo-note p { margin: .15rem 0 0; color: var(--d3-ink-2); font-size: .88rem; line-height: 1.45; }
.abo-note.warn > svg { color: var(--d3-warn); }
.abo-flash { color: var(--d3-ink-2); font-size: .88rem; } .abo-flash.ok { color: var(--d3-ok); }
.abo-term { color: var(--d3-ink-2); font-size: .9rem; }
.abo-term b { color: var(--text); }
.abo-quotas { align-items: start; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .8rem 1.4rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.abo-q { display: grid; grid-template-columns: auto 1fr; gap: .1rem .5rem; align-items: baseline; font-size: .86rem; }
.abo-q-l { grid-column: 1 / -1; color: var(--d3-ink-2); }
.abo-q b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.abo-q-n { color: var(--d3-ink-2); }
.abo-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: .2rem; }
.abo-bar i { display: block; height: 100%; background: var(--accent); }
.abo-bar.full i { background: var(--bad); }
.abo-h { font-size: 1.05rem; margin: 0 0 .7rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: .9rem; align-items: start; }
@media (min-width: 1240px) { .plans { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plan { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); padding: 1rem; display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.plan.is-current { border: 2px solid var(--accent); padding: calc(1rem - 1px); }
.plan header { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; }
.plan h2 { font-size: 1.05rem; }
.plan-price b { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-price span { color: var(--d3-ink-2); font-size: .85rem; }
.plan-act { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-height: 2rem; }
.plan-act .btn { min-height: 36px; }
.plan-act .btn:disabled { opacity: 1; color: var(--d3-ink-2); background: var(--surface-2); border-color: var(--line-strong); cursor: default; }
.plan-hint { color: var(--d3-ink-2); font-size: .82rem; line-height: 1.35; }
.plan-pos { margin: 0; color: var(--d3-ink-2); font-size: .88rem; line-height: 1.45; }
.plan-facts { display: grid; gap: .3rem; padding: .6rem 0; border-top: 1px solid var(--line); font-size: .84rem; line-height: 1.4; }
.plan-facts svg, .plan-list svg { vertical-align: -2px; margin-right: .15rem; }
.plan-list { list-style: none; padding: .6rem 0 0; margin: 0; display: grid; gap: .4rem; border-top: 1px solid var(--line); font-size: .84rem; line-height: 1.4; }
.plan-list li.off { color: var(--d3-ink-2); }
.abo-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: .9rem; margin-top: 1.4rem; align-items: start; }
.abo-info { border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; }
.abo-info header { flex-wrap: wrap; display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .5rem; }
.abo-info .badge { white-space: normal; }
.abo-info h2 { display: flex; align-items: center; gap: .45rem; font-size: 1rem; }
.abo-info p { margin: .4rem 0 0; color: var(--d3-ink-2); font-size: .86rem; line-height: 1.5; }
@media (max-width: 640px) {
  .abo-now { padding: .9rem; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan.is-current { order: -1; }
  .abo-quotas { grid-template-columns: minmax(0, 1fr); }
  .abo-more { grid-template-columns: minmax(0, 1fr); }
  .plan-act .btn { flex: 1 1 auto; }
}
.abo .page-head .sub, .set-page .page-head .sub { color: var(--d3-ink-2); }
.set-page .seg button.active { box-shadow: none; outline: 1px solid var(--line-strong); outline-offset: -1px; }

/* ---------- Bewegung (motion.js; Vorbild motion-primitives, eigene Umsetzung, Auftrag 03.11.2026) ----------
   Kurz (0.18-0.35 s), ohne Ueberschwingen, nichts verzoegert die Bedienung. Reduzierte Bewegung: nur Ueberblendung. */
@keyframes uf-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes uf-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes uf-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes uf-shimmer { from { background-position: 100% center; } to { background-position: 0% center; } }
/* animated-group: Karten der Seite erscheinen leicht gestaffelt (nur beim ersten Erscheinen, siehe staggerOnce) */
.uf-stagger > * { animation: uf-rise .32s cubic-bezier(.2, 0, 0, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
/* Seite, die nur neu gezeichnet wird (Reiterwechsel): kein Einblenden der ganzen Seite, nur des Reiterinhalts */
.content.no-enter { animation: none; }
/* transition-panel: Inhalt eines Reiters blendet leicht steigend ein */
.uf-panel-in { animation: uf-rise .24s cubic-bezier(.2, 0, 0, 1) both; }
/* disclosure: aufgeklappter Text in Neuigkeiten/Ankuendigungen; Pfeil der Wochenbloecke dreht */
.ann-item[open] > .body, .ann-item[open] > a { animation: uf-reveal .22s cubic-bezier(.2, 0, 0, 1) both; }
.week-block .wh > svg:first-child { transition: transform .22s cubic-bezier(.2, 0, 0, 1); }
.week-block.closed .wh > svg:first-child { transform: rotate(-90deg); }
/* Reiter: Farbe und Unterstrich blenden ueber statt zu springen */
.tabs button { transition: color .18s ease, border-color .18s ease; }
/* Druck-Rueckmeldung: Karte gibt leicht nach (Aussehen sonst unveraendert) */
.mod2:active { transform: scale(.98); }
/* text-shimmer: Lade-Text mit dezent wanderndem Lichtstreif */
.uf-shimmer { display: inline-block; color: transparent; background-image: linear-gradient(90deg, transparent calc(50% - 3em), var(--text), transparent calc(50% + 3em)), linear-gradient(var(--muted), var(--muted));
  background-size: 250% 100%, auto; background-repeat: no-repeat, padding-box; -webkit-background-clip: text; background-clip: text; animation: uf-shimmer 1.8s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  /* die allgemeine Regel oben schaltet alles ab; hier bleibt nur die Ueberblendung */
  .uf-stagger > *, .uf-panel-in { animation: uf-fade-in .2s ease both !important; }
  .mod2:active { transform: none; }
  .uf-shimmer { color: var(--muted); background: none; }
}

/* Neuigkeiten, Schwarzes Brett, "Aus Stud.IP" (news.js, bulletin.js, studip-texts.js) */
.news-item summary { display: flex; align-items: flex-start; gap: .65rem; }
.news-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.news-ic.tone-info { background: var(--info-soft); color: var(--info-text); } .news-ic.tone-ok { background: var(--ok-soft); color: var(--ok-text); } .news-ic.tone-warn { background: var(--warn-soft); color: var(--warn-text); }
.news-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.news-top { display: flex; align-items: center; gap: .4rem; color: var(--text-2); font-size: .8125rem; } .news-who { font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; } .news-time { color: var(--muted); white-space: nowrap; }
.news-top > svg { color: var(--muted); transition: transform .22s cubic-bezier(.2, 0, 0, 1); } .news-item[open] .news-top > svg { transform: rotate(180deg); }
.news-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .15rem; }
.news-more { padding-left: 2.1rem; } .news-more .body { max-width: 70ch; }
.news-bulletin { display: flex; align-items: center; gap: .5rem; min-height: 44px; border-top: 1px solid var(--line); color: var(--accent-text); font-size: .8125rem; font-weight: 600; } .news-bulletin span { flex: 1; } .news-bulletin:hover { text-decoration: none; }
.bb-card { margin-top: 1rem; }
.bb-entry { padding: .55rem .2rem; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; } .bb-entry:last-child { border-bottom: 0; } .bb-entry:hover { background: var(--surface-2); }
.bb-head { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; } .bb-title { overflow-wrap: anywhere; } .bb-date { color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.bb-text, .bb-reader { white-space: pre-line; overflow-wrap: anywhere; font-size: .8125rem; line-height: 1.5; max-width: 70ch; margin-top: .25rem; } .bb-reader { font-size: .9rem; line-height: 1.65; max-height: 60vh; overflow: auto; }
.st-card { margin-bottom: 1rem; }
.st-head, .st-line, .st-item { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.st-head > svg { color: var(--muted); transition: transform .2s ease; } .st-head[aria-expanded="true"] > svg { transform: rotate(90deg); } .st-head .muted { margin-left: auto; text-align: right; }
.st-group { border-top: 1px solid var(--line); } .st-line > span { flex: 1; font-variant-numeric: tabular-nums; } .st-line[aria-expanded="true"] > svg:last-child { transform: rotate(90deg); }
.st-items { padding: 0 0 .4rem 1.6rem; } .st-item { flex-direction: column; align-items: flex-start; gap: .1rem; padding: .35rem 0; } .st-item b { font-weight: 550; overflow-wrap: anywhere; }
.st-comment { margin-bottom: .8rem; }
/* Frühere Semester in der Bibliothek (app/static/older-semesters.js) */
.older-cur { font-size: 1.02rem; margin: 0 0 .7rem; }
.older-sem { margin-top: 1.4rem; display: grid; gap: .6rem; }
.older-sem h2 { font-size: 1.02rem; margin: 0; }
.older-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r, 14px); padding: .35rem .9rem; }
.older-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.older-toggle { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 220px; min-height: 44px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left; font: inherit; padding: 0; }
.older-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.older-t { display: grid; gap: .1rem; }
.older-courses { padding: .2rem 0 .3rem 1.6rem; }
.older-course { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: .25rem 0; }
.older-course:last-child { border-bottom: 0; }
.older-ct { display: grid; gap: .1rem; flex: 1; min-width: 200px; min-height: 44px; align-content: center; color: var(--text); text-decoration: none; }
a.older-ct:hover { text-decoration: none; color: var(--accent-text); }
.older-card .btn, .older-head-card .btn { min-height: 44px; }
.older-head-card { margin-bottom: 1rem; }
.older-missing { margin-top: .7rem; display: grid; gap: .1rem; }
.older-file { display: flex; align-items: center; gap: .5rem; color: var(--text-2); font-size: .85rem; padding: .25rem 0; }

.sync-chip .bad { color: var(--warn-text); }

/* ===================== Neugestaltung wie iPad (04.11.2026) ===================== */
/* Farben der Pillen und Arten (hell); dunkel weiter unten */
:root {
  --pill-blue: #2f6fd1; --pill-blue-soft: #e8f0fc; --pill-blue-text: #1d5fa8;
  --pill-peach: #e39a5c; --pill-peach-soft: #fdf1e7; --pill-peach-text: #8a4a14;
  --k-eigene: #7c5bd9; --k-eigene-soft: #efe9fc; --k-eigene-text: #5b3db8;
  --k-uebung: #3d7bd6; --k-uebung-soft: #e6effb; --k-uebung-text: #24589f;
  --k-vorlesung: #3f9a6b; --k-vorlesung-soft: #e3f3ea; --k-vorlesung-text: #22704a;
}
:root[data-theme="dark"] {
  --pill-blue: #6ea3ec; --pill-blue-soft: #1a2b42; --pill-blue-text: #9cc2f5;
  --pill-peach: #e9a46b; --pill-peach-soft: #3a2616; --pill-peach-text: #f2c39b;
  --k-eigene: #a98cf0; --k-eigene-soft: #2a2142; --k-eigene-text: #c7b4fa;
  --k-uebung: #6ea3ec; --k-uebung-soft: #1a2b42; --k-uebung-text: #9cc2f5;
  --k-vorlesung: #5cc08c; --k-vorlesung-soft: #17321f; --k-vorlesung-text: #8ad8ae;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --pill-blue: #6ea3ec; --pill-blue-soft: #1a2b42; --pill-blue-text: #9cc2f5;
    --pill-peach: #e9a46b; --pill-peach-soft: #3a2616; --pill-peach-text: #f2c39b;
    --k-eigene: #a98cf0; --k-eigene-soft: #2a2142; --k-eigene-text: #c7b4fa;
    --k-uebung: #6ea3ec; --k-uebung-soft: #1a2b42; --k-uebung-text: #9cc2f5;
    --k-vorlesung: #5cc08c; --k-vorlesung-soft: #17321f; --k-vorlesung-text: #8ad8ae;
  }
}

/* ---------- Seitenleiste: Gruppen, Pillen, Konto (shell-nav.js) ---------- */
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group + .nav-group { margin-top: .55rem; }
.nav-label { padding: .35rem .7rem .2rem; font-size: .7rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.nav a.nav-pill { border: 1.5px solid var(--pc); border-radius: 999px; color: var(--text); margin: 1px 0; }
.nav a.nav-pill .ic { color: var(--pc-text); }
.nav a.nav-pill.blue { --pc: var(--pill-blue); --pc-soft: var(--pill-blue-soft); --pc-text: var(--pill-blue-text); }
.nav a.nav-pill.peach { --pc: var(--pill-peach); --pc-soft: var(--pill-peach-soft); --pc-text: var(--pill-peach-text); }
.nav a.nav-pill:hover { background: var(--pc-soft); color: var(--text); }
.nav a.nav-pill.active { background: var(--pc-soft); color: var(--pc-text); font-weight: 600; }
.side-acct { display: flex; flex-direction: column; gap: .5rem; padding: .6rem; margin: .1rem 0 .35rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.side-acct:empty { display: none; }
.side-acct-who { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: 0 .1rem; border: 0; background: none; text-align: left; cursor: pointer; border-radius: var(--r-sm); min-width: 0; }
.side-acct-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.side-acct-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-acct-t b { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-acct-t small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-acct-cta { width: 100%; border-radius: 999px; min-height: 40px; font-weight: 600; }
.side-acct-cta:hover { text-decoration: none; }
.collapsed .nav-label { visibility: hidden; height: .55rem; padding: 0; border-top: 1px solid var(--line); margin: .2rem .4rem 0; }
.collapsed .nav a.nav-pill { border-radius: var(--r-sm); }
.collapsed .side-acct { padding: .3rem; align-items: center; background: none; border-color: transparent; }
.collapsed .side-acct-t, .collapsed .side-acct-cta { display: none; }
@media (max-width: 900px) {
  .collapsed .nav-label { visibility: visible; height: auto; padding: .35rem .7rem .2rem; border: 0; margin: 0; }
  .collapsed .side-acct { padding: .6rem; align-items: stretch; background: var(--surface-2); border-color: var(--line); }
  .collapsed .side-acct-t { display: flex; } .collapsed .side-acct-cta { display: inline-flex; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  body.doc-open .nav-label { visibility: hidden; height: .55rem; padding: 0; }
  body.doc-open .side-acct-t, body.doc-open .side-acct-cta { display: none; }
}

/* ---------- Lernstand-Kachel (mastery.js masteryTile) ---------- */
.ls-tile { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--mc, var(--accent)) 30%, var(--line)); background: linear-gradient(100deg, color-mix(in srgb, var(--mc, var(--accent)) 11%, var(--surface)), color-mix(in srgb, var(--mc, var(--accent)) 3%, var(--surface))); color: var(--text); }
.ls-star { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: color-mix(in srgb, var(--mc, var(--accent)) 80%, var(--text)); background: color-mix(in srgb, var(--mc, var(--accent)) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--mc, var(--accent)) 28%, transparent); }
.ls-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ls-t b { font-size: .92rem; } .ls-t small { color: var(--text-2); font-size: .8rem; overflow-wrap: anywhere; }
.ls-ring { flex: none; position: relative; width: 52px; height: 52px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.ls-ring i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--mc, var(--accent)) calc(var(--p, 0) * 1%), var(--line) 0); -webkit-mask: radial-gradient(circle, transparent 21px, #000 22px); mask: radial-gradient(circle, transparent 21px, #000 22px); }
.ls-ring b { position: relative; font-size: .78rem; font-weight: 700; }
.ls-tile.none { border-color: var(--line); background: var(--surface-2); }
.ls-tile.none .ls-star { color: var(--muted); background: var(--surface); border-color: var(--line); }
.ls-tile.none .ls-t b { color: var(--text-2); } .ls-tile.none .ls-ring b { color: var(--muted); font-weight: 600; }
.ls-tile.lg { padding: .9rem 1rem; } .ls-tile.lg .ls-star { width: 42px; height: 42px; } .ls-tile.lg .ls-t b { font-size: 1rem; }
.ls-tile.lg .ls-ring { width: 62px; height: 62px; } .ls-tile.lg .ls-ring i { -webkit-mask: radial-gradient(circle, transparent 26px, #000 27px); mask: radial-gradient(circle, transparent 26px, #000 27px); } .ls-tile.lg .ls-ring b { font-size: .88rem; }
.mod-ls { margin-bottom: 1rem; }
.ov-mod .ov-mastery { margin-top: .55rem; } .ov-mod .ls-tile { padding: .55rem .65rem; } .ov-mod .ls-ring { width: 44px; height: 44px; } .ov-mod .ls-ring i { -webkit-mask: radial-gradient(circle, transparent 17px, #000 18px); mask: radial-gradient(circle, transparent 17px, #000 18px); }
.mod2 .mod2-mastery { margin: .7rem 0 .4rem; }

/* ---------- Karteikarten: Kacheln, Wochenfilter, Wiederholung, Trainer ---------- */
.fc-page { max-width: 1240px; } .fc-page.fc-narrow { max-width: 860px; }
.fc-sum { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.fc-sum-due { display: flex; align-items: baseline; gap: .45rem; } .fc-sum-due b { font-size: 2.1rem; line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums; } .fc-sum-due span { font-weight: 600; font-size: 1rem; }
.fc-sum-sep { width: 1px; align-self: stretch; background: var(--line); }
.fc-weekseg { max-width: 100%; overflow-x: auto; margin-bottom: .4rem; scrollbar-width: none; } .fc-weekseg::-webkit-scrollbar { display: none; }
.fc-weekseg button { min-height: 40px; padding: .4rem 1rem; white-space: nowrap; }
.fc-weekseg button.active { font-weight: 650; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.fc-sec .fc-group { margin: 1.2rem 0 .6rem; font-size: inherit; flex-wrap: wrap; } .fc-sec .fc-group h2 { font-size: 1.1rem; }
.fc-sec .fc-group .dot { width: 11px; height: 11px; }
.fc-count-b { min-width: 1.6rem; text-align: center; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: .82rem; font-variant-numeric: tabular-nums; }
.fc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 1rem; }
.fc-tile { --kc: var(--k-eigene); --kc-soft: var(--k-eigene-soft); --kc-text: var(--k-eigene-text); position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1.1rem 1.1rem .95rem; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--kc); border-radius: var(--r-lg); min-width: 0; }
.fc-tile.k-uebung { --kc: var(--k-uebung); --kc-soft: var(--k-uebung-soft); --kc-text: var(--k-uebung-text); }
.fc-tile.k-vorlesung { --kc: var(--k-vorlesung); --kc-soft: var(--k-vorlesung-soft); --kc-text: var(--k-vorlesung-text); }
.fc-tile-hd { display: flex; gap: .75rem; align-items: flex-start; }
.fc-tile-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--kc-soft); color: var(--kc-text); }
.fc-tile-t { min-width: 0; }
.fc-tile-name { display: block; font-weight: 650; font-size: 1.05rem; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; }
.fc-tile-name:hover { color: var(--accent-text); }
.fc-tile-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.fc-tag { display: inline-flex; align-items: center; padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.fc-tag.kind { background: var(--kc-soft); color: var(--kc-text); } .fc-tag.soft { font-weight: 500; }
.fc-tile-due { display: flex; align-items: baseline; gap: .45rem; font-variant-numeric: tabular-nums; }
.fc-tile-due b { font-size: 2.3rem; line-height: 1; color: var(--accent-text); } .fc-tile-due > span:not(.muted) { font-weight: 600; font-size: 1rem; }
.fc-tile-due.zero b { color: var(--muted); } .fc-tile-due.zero > span:not(.muted):not(.spacer) { color: var(--muted); }
.fc-boxes-hd { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-bottom: .35rem; } .fc-boxes-hd b { color: var(--text-2); font-weight: 600; }
.fc-boxes-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; height: 40px; }
.fc-box { position: relative; display: flex; align-items: flex-end; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.fc-box i { display: block; width: 100%; background: var(--kc); border-radius: 6px 6px 0 0; }
.fc-boxes-n { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; text-align: center; font-size: .82rem; color: var(--text-2); margin-top: .25rem; font-variant-numeric: tabular-nums; }
.fc-tile-go { display: flex; gap: .6rem; align-items: stretch; margin-top: .2rem; }
.fc-go { flex: 1; min-height: 52px; font-size: 1.05rem; font-weight: 600; border-radius: var(--r); }
.fc-go:hover { text-decoration: none; }
.fc-menu { position: relative; }
.fc-more { width: 52px; height: 52px; padding: 0; border-radius: var(--r); background: var(--surface-2); border-color: transparent; color: var(--text-2); }
.fc-menu-pop { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 25; min-width: 210px; padding: .35rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.14); display: flex; flex-direction: column; }
.fc-menu-pop [role=menuitem] { display: flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 .7rem; border: 0; background: none; border-radius: var(--r-sm); text-align: left; cursor: pointer; color: var(--text); white-space: nowrap; }
.fc-menu-pop [role=menuitem]:hover, .fc-menu-pop [role=menuitem]:focus-visible { background: var(--surface-2); }
.fc-menu-pop [role=menuitem].danger { color: var(--bad-text); }
.fc-tile-foot { margin-top: -.25rem; }
/* Wiederholung "Heute fällig" und Trainer: grosse Karte, Fortschritt, grosse Knoepfe */
.fc-rev { padding: 1.2rem 1.3rem 1.3rem; }
.fc-rev-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.fc-rev-head h2 { font-size: 1.15rem; }
.fc-rev-pos { display: flex; flex-direction: column; gap: .1rem; margin: 1rem 0 .55rem; } .fc-rev-pos b { font-size: 1.15rem; }
.fc-prog { height: 6px; margin-bottom: 1rem; }
.fc-big2 { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: .6rem; min-height: 280px; padding: 3rem 1.6rem 2rem; text-align: center; border-radius: var(--r-lg); box-shadow: 0 4px 18px rgba(0,0,0,.06); font-size: 1rem; }
.fc-big2:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fc-lab { position: absolute; top: 1rem; left: 1.2rem; display: inline-flex; align-items: center; gap: .45rem; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.fc-lab i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.fc-lab.ans { position: static; justify-content: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line-strong); color: var(--ok-text); }
.fc-q { font-size: 1.6rem; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.fc-big2.shown .fc-q { font-size: 1.25rem; }
.fc-a { font-size: 1.15rem; color: var(--text); overflow-wrap: anywhere; }
.fc-hint { text-align: center; margin: .8rem 0 .7rem; }
.fc-show { width: 100%; min-height: 56px; font-size: 1.1rem; font-weight: 600; border-radius: var(--r-lg); }
.fc-judge { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .9rem; }
.fc-judge .btn { min-height: 56px; font-size: 1.05rem; font-weight: 600; border-radius: var(--r-lg); }
.fc-judge .fc-no { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad-text); }
.fc-judge .fc-no:hover { background: color-mix(in srgb, var(--bad-soft) 70%, var(--bad) 12%); }
.fc-judge .fc-yes { background: var(--ok-btn); border-color: var(--ok-btn); color: var(--on-fill); }
.fc-judge .fc-yes:hover { filter: brightness(1.05); }
#fcTr .fc-count { margin: .9rem 0 .5rem; flex-wrap: wrap; } #fcTr .fc-pos { font-size: 1.1rem; }
#fcTr .fc-big { min-height: 320px; } #fcTr .fc-text { font-size: 1.55rem; }
#fcTr .fc-bar { justify-content: center; }
@media (max-width: 520px) {
  .fc-sum-sep { display: none; } .fc-sum .btn { width: 100%; }
  .fc-q { font-size: 1.3rem; } .fc-big2 { min-height: 220px; padding: 2.8rem 1rem 1.4rem; }
  .fc-judge { gap: .5rem; } .fc-judge .btn { font-size: .95rem; padding: 0 .5rem; }
  #fcTr .fc-text { font-size: 1.25rem; } #fcTr .fc-big { min-height: 240px; }
}

/* ---------- Testergebnis und KI-Hilfe zur Aufgabe (test-result.js) ---------- */
.tr-head { margin-bottom: 1rem; padding: 1.2rem 1.3rem; --tc: var(--ok); --tc-soft: var(--ok-soft); --tc-text: var(--ok-text); }
.tr-head.bad { --tc: var(--bad); --tc-soft: var(--bad-soft); --tc-text: var(--bad-text); }
.tr-top { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.tr-ring { position: relative; flex: none; width: 84px; height: 84px; display: grid; place-items: center; color: var(--tc-text); }
.tr-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--tc) calc(var(--p, 0) * 1%), var(--line) 0); -webkit-mask: radial-gradient(circle, transparent 34px, #000 35px); mask: radial-gradient(circle, transparent 34px, #000 35px); }
.tr-num { display: flex; flex-direction: column; gap: .2rem; min-width: 0; font-variant-numeric: tabular-nums; }
.tr-pct { font-size: 2.2rem; line-height: 1.05; color: var(--tc-text); margin-right: .4rem; }
.tr-status { align-self: flex-start; display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem; border-radius: 999px; background: var(--tc-soft); color: var(--tc-text); font-size: .82rem; font-weight: 600; }
.tr-sum { margin: .9rem 0 0; font-size: .98rem; }
.tr-weak { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .7rem; }
.tr-topic { padding: .2rem .65rem; border-radius: 999px; background: var(--warn-soft); color: var(--warn-text); font-size: .82rem; font-weight: 600; }
.tr-ask { margin-top: .8rem; min-height: 44px; }
.drawer.tr-drawer { width: min(480px, 100%); }
.tr-ai { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.tr-ai-hd { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.tr-ai-hd h2 { font-size: 1.1rem; }
.tr-ai-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.tr-ai-body { flex: 1; overflow: auto; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.tr-ai-ctx { background: var(--surface-2); border-radius: var(--r); padding: .85rem .95rem; display: flex; flex-direction: column; gap: .5rem; }
.tr-ai-mine { display: flex; gap: .45rem; align-items: flex-start; padding: .45rem .6rem; border-radius: var(--r-sm); font-size: .9rem; }
.tr-ai-mine.ok { background: var(--ok-soft); color: var(--ok-text); } .tr-ai-mine.bad { background: var(--bad-soft); color: var(--bad-text); }
.tr-ai-mine .ic { margin-top: .15rem; }
.tr-ai-me { align-self: flex-end; max-width: 85%; background: var(--accent); color: var(--on-fill); padding: .6rem .85rem; border-radius: 14px 14px 4px 14px; overflow-wrap: anywhere; }
.tr-ai-bot { background: var(--surface-2); padding: .75rem .9rem; border-radius: 14px 14px 14px 4px; overflow-wrap: anywhere; }
.tr-ai-bot > :first-child { margin-top: 0; } .tr-ai-bot > :last-child { margin-bottom: 0; }
.tr-ai-sugg { display: flex; flex-wrap: wrap; gap: .4rem; padding: .2rem 1rem .7rem; }
.tr-ai-sugg .chip { min-height: 40px; padding: 0 .8rem; }
.tr-ai-in { display: flex; gap: .5rem; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.tr-ai-in .input { flex: 1; min-height: 44px; } .tr-ai-in .btn.icon { width: 44px; height: 44px; }
/* Schublade auf dem Telefon: unten liegt die Leiste mit fuenf Zielen, der Kontoblock bleibt darueber sichtbar; Einklappen gibt es dort nicht */
@media (max-width: 900px) {
  .sidebar { padding-bottom: calc(4.4rem + env(safe-area-inset-bottom)); }
  .sidebar #collapseBtn { display: none; }
}
.item.ov-mod { align-items: flex-start; } .item.ov-mod > .dot { margin-top: .5rem; }
.collapsed .side-acct .side-acct-av { display: grid; } .collapsed .side-acct-who { justify-content: center; padding: 0; }

/* ---- Studienverlauf (05.11.2026, study-plan.js / study-plan-logic.js; Vorlage StudyPlanPage.swift) ---- */
.sp-page .sp-stack { display: flex; flex-direction: column; gap: 1rem; }
.sp-head { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.2rem; align-items: center; }
.sp-ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; }
.sp-ring > div { width: 80px; height: 80px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.sp-ring b { font-size: 1.5rem; font-variant-numeric: tabular-nums; } .sp-ring small { font-size: .7rem; color: var(--muted); }
.sp-head-t h2 { font-size: 1.1rem; letter-spacing: -.01em; margin: 0 0 .15rem; }
.sp-done { color: var(--ok-text); font-weight: 600; font-size: .82rem; margin-top: .2rem; }
.sp-notes { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; } .sp-notes .badge { white-space: normal; }
.sp-disc { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: .4rem; margin: .4rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.sp-disc svg { flex: none; margin-top: .1rem; }
.sp-po { display: flex; flex-direction: column; gap: .7rem; background: var(--info-soft); border-color: transparent; }
.sp-po-t { display: flex; gap: .8rem; align-items: flex-start; } .sp-po-t svg { flex: none; color: var(--info-text); margin-top: .15rem; }
.sp-err { color: var(--bad-text); } .sp-ok { color: var(--ok-text); } .sp-bad { color: var(--bad-text); } .sp-warn { color: var(--warn-text); font-weight: 600; }
.sp-backlog ul { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; }
.sp-backlog li { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .6rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.sp-backlog li:first-child { border-top: 0; }
.sp-link { border: 0; background: none; padding: 0; color: var(--text); cursor: pointer; text-align: left; font: inherit; } .sp-link:hover b { text-decoration: underline; }
.sp-arrow { color: var(--warn-text); font-size: .85rem; margin-left: auto; }
.sp-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 270px); gap: .75rem; overflow-x: auto; padding: 2px 2px .8rem; align-items: start; scroll-snap-type: x proximity; }
.sp-sem { background: color-mix(in srgb, var(--surface-2) 70%, var(--bg)); border: 1px solid var(--line); border-radius: 14px; padding: .65rem; display: flex; flex-direction: column; gap: .6rem; scroll-snap-align: start; min-width: 0; }
.sp-sem.current { background: color-mix(in srgb, var(--accent) 7%, var(--bg)); border: 1.5px solid color-mix(in srgb, var(--accent) 55%, var(--line)); }
.sp-sem-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; padding: 0 .1rem; }
.sp-sem-head b { font-size: 1rem; } .sp-sem-head small { display: block; color: var(--muted); font-size: .78rem; font-weight: 400; }
.sp-mods { display: flex; flex-direction: column; gap: .5rem; }
.sp-none { margin: 0; padding: .4rem 0; color: var(--muted); font-size: .8rem; }
.sp-mod { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem .6rem .85rem; cursor: pointer; overflow: hidden; min-width: 0; width: 100%; }
.sp-mod::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3.5px; background: var(--ac, var(--line-strong)); }
.sp-mod:hover { border-color: var(--line-strong); } .sp-mod:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent); }
.sp-mod.failed { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.sp-mod-top { display: flex; gap: .5rem; align-items: baseline; justify-content: space-between; width: 100%; }
.sp-mod-title { font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; } .sp-mod.passed .sp-mod-title { color: var(--text-2); }
.sp-lp { font-size: .78rem; font-weight: 650; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-tags { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.sp-tag { font-size: .72rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.sp-tag.line { background: transparent; border: 1px solid var(--line-strong); } .sp-tag.lav { background: #ece6fb; color: #5b3fa8; } .sp-tag.teal { background: #dcf3ef; color: #146b5e; } .sp-tag.butter { background: #fbf0cc; color: #7a5a00; }
.sp-pill { display: inline-flex; gap: .3rem; align-items: flex-start; font-size: .75rem; font-weight: 600; padding: .12rem .5rem; border-radius: 9px; line-height: 1.3; }
.sp-pill svg { flex: none; margin-top: .12rem; }
.sp-pill.ok { background: var(--ok-soft); color: var(--ok-text); } .sp-pill.info { background: var(--info-soft); color: var(--info-text); } .sp-pill.bad { background: var(--bad-soft); color: var(--bad-text); } .sp-pill.warn { background: var(--warn-soft); color: var(--warn-text); } .sp-pill.neutral { background: var(--surface-2); color: var(--text-2); }
.sp-reason { font-size: .75rem; color: var(--muted); line-height: 1.35; }
.sp-last { display: inline-flex; gap: .25rem; align-items: center; font-size: .75rem; color: var(--bad-text); }
.sp-notice { display: flex; gap: .9rem; align-items: flex-start; max-width: 720px; }
.sp-notice-ic { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.sp-notice.bad .sp-notice-ic { background: var(--bad-soft); color: var(--bad-text); }
.sp-notice-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5rem; } .sp-notice-t h3 { margin: 0; font-size: 1rem; } .sp-notice-t p { margin: 0; }
.sp-status { display: flex; align-items: center; gap: .5rem; color: var(--text-2); font-size: .85rem; } .sp-status.bad { color: var(--bad-text); }
.sp-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: sp-rot .8s linear infinite; flex: none; }
@keyframes sp-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sp-spin { animation: none; border-top-color: var(--line-strong); } }
.sp-link-row { display: flex; gap: .5rem; flex-wrap: wrap; } .sp-link-row .input { flex: 1; min-width: 220px; }
.sp-proglist { max-height: 55vh; overflow: auto; margin-top: .6rem; }
.sp-prog { list-style: none; margin: 0; padding: 0; } .sp-prog li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .55rem .1rem; border-bottom: 1px solid var(--line); }
.sp-prog li.off { opacity: .65; } .sp-prog-t small { display: block; color: var(--muted); font-size: .75rem; } .sp-prog-po { display: flex; gap: .35rem; flex-wrap: wrap; }
.sp-modal .modal-box { width: min(760px, 100%); }
.sp-detail { display: flex; flex-direction: column; gap: 1rem; } .sp-detail h2 { margin: 0 0 .4rem; font-size: 1.35rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.sp-sec h4 { display: flex; gap: .4rem; align-items: center; margin: 0 0 .4rem; font-size: .82rem; color: var(--text-2); }
.sp-sec .card.flat { padding: .8rem .9rem; }
.sp-tries { margin-top: .5rem; } .sp-try { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; padding: .4rem 0; border-top: 1px solid var(--line); font-size: .85rem; } .sp-grade { font-variant-numeric: tabular-nums; }
.sp-lastw { display: flex; gap: .4rem; align-items: flex-start; margin: .6rem 0 0; padding: .5rem .6rem; border-radius: var(--r-sm); background: var(--bad-soft); color: var(--bad-text); font-weight: 600; font-size: .85rem; }
.sp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; margin: 0; }
.sp-facts dt, .sp-pre dt { font-size: .72rem; font-weight: 600; color: var(--muted); } .sp-facts dd, .sp-pre dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
.sp-pre { margin-top: .9rem; }
.sp-text summary { cursor: pointer; font-weight: 600; padding: .4rem 0; } .sp-text { border-bottom: 1px solid var(--line); }
.sp-long { white-space: pre-wrap; color: var(--text-2); line-height: 1.55; padding: .2rem 0 .7rem; overflow-wrap: anywhere; }
.sp-src { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; } .sp-src p { margin: 0; display: flex; gap: .35rem; align-items: flex-start; }
.sp-set { display: flex; flex-direction: column; gap: 1rem; }
.sp-count { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .4rem; } .sp-count b.ok { color: var(--ok-text); }
.sp-electives { margin-top: .6rem; max-height: 38vh; overflow: auto; display: flex; flex-direction: column; }
.sp-el { display: flex; gap: .6rem; align-items: flex-start; padding: .5rem .1rem; border-top: 1px solid var(--line); cursor: pointer; } .sp-el small { display: block; color: var(--muted); font-size: .75rem; }
@media (max-width: 760px) {
  .sp-head { grid-template-columns: 1fr; justify-items: start; }
  .sp-board { display: flex; flex-direction: column; align-items: stretch; overflow: visible; }
  .sp-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .sp-arrow { margin-left: 0; width: 100%; }
}
/* Studienverlauf selbst gestalten (05.11.2026): Plaetze, Menue, Ziehen, Bereiche, Auswahl, Gesamtansicht */
.sp-tag.sky { background: var(--info-soft); color: var(--info-text); }
:root[data-theme="dark"] .sp-tag.lav { background: #2c2548; color: #c9b8ff; } :root[data-theme="dark"] .sp-tag.teal { background: #15332e; color: #7fd9c8; } :root[data-theme="dark"] .sp-tag.butter { background: #3a3114; color: #f0d27a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) .sp-tag.lav { background: #2c2548; color: #c9b8ff; } :root:not([data-theme="light"]):not([data-theme="dark"]) .sp-tag.teal { background: #15332e; color: #7fd9c8; } :root:not([data-theme="light"]):not([data-theme="dark"]) .sp-tag.butter { background: #3a3114; color: #f0d27a; } }
.sp-hint { display: inline-flex; gap: .3rem; align-items: flex-start; font-size: .75rem; color: var(--warn-text); line-height: 1.35; } .sp-hint svg { flex: none; margin-top: .1rem; }
.sp-sem-lp { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; } .sp-sem-lp small { font-size: .72rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.sp-sem.over { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.sp-card { position: relative; min-width: 0; }
.sp-card .sp-mod { padding-right: 2.2rem; }
.sp-card.can-drag .sp-mod { cursor: grab; } .sp-card.dragging { opacity: .45; }
.sp-more { position: absolute; top: .35rem; right: .3rem; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.sp-more:hover, .sp-more[aria-expanded="true"] { background: var(--surface-2); color: var(--text); } .sp-more:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 0; color: var(--text); }
.sp-card .sp-mod-top { padding-right: .1rem; }
.sp-lock { position: absolute; right: .55rem; bottom: .5rem; color: var(--ok-text); opacity: .7; }
.sp-slot { all: unset; box-sizing: border-box; display: flex; gap: .6rem; align-items: flex-start; width: 100%; padding: .55rem .7rem; border-radius: 10px; border: 1.2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--surface) 60%, var(--bg)); cursor: pointer; }
div.sp-slot { cursor: default; }
button.sp-slot:hover { background: var(--surface); border-color: var(--accent); } .sp-slot:focus-visible { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.sp-slot-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.sp-slot-t { display: flex; flex-direction: column; gap: .3rem; min-width: 0; } .sp-slot-t b { font-weight: 600; font-size: .86rem; line-height: 1.3; overflow-wrap: anywhere; } .sp-slot-t small { font-size: .75rem; color: var(--text-2); }
.sp-tools { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.sp-board [data-drop].drop-ready, .sp-ov [data-drop].drop-ready { outline: 1.5px dashed color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: -2px; }
.sp-board [data-drop].drop-on, .sp-ov [data-drop].drop-on { outline: 2px solid var(--accent); outline-offset: -2px; background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.sp-ghost { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; opacity: .92; box-shadow: 0 12px 28px rgba(0,0,0,.22); border-radius: 10px; }
body .sp-dragging { user-select: none; -webkit-user-select: none; }
.sp-menu-pop { position: fixed; z-index: 70; min-width: 220px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: .3rem; box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.sp-menu { display: flex; flex-direction: column; } .sp-menu button { all: unset; box-sizing: border-box; display: flex; gap: .55rem; align-items: center; padding: .5rem .65rem; border-radius: 8px; cursor: pointer; font-size: .875rem; color: var(--text); min-height: 36px; }
.sp-menu button:hover, .sp-menu button:focus-visible { background: var(--accent-soft); color: var(--accent-text); } .sp-menu button.danger { color: var(--bad-text); } .sp-menu button.danger:hover, .sp-menu button.danger:focus-visible { background: var(--bad-soft); }
.sp-ro { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; background: var(--warn-soft); border-color: transparent; color: var(--warn-text); } .sp-ro > span { flex: 1; min-width: 14rem; color: var(--text); }
.sp-areas { display: flex; flex-direction: column; gap: .8rem; } .sp-areas .card-head { margin: 0; } .sp-areas h2 { display: flex; gap: .4rem; align-items: center; font-size: 1rem; margin: 0; }
.sp-groups { display: flex; flex-direction: column; gap: .4rem; }
.sp-group { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; } .sp-group.open b { color: var(--warn-text); }
.sp-area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.sp-area { background: var(--surface-2); border-radius: 10px; padding: .6rem .7rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.sp-area-h { display: flex; gap: .4rem; align-items: baseline; justify-content: space-between; } .sp-area-h b { font-size: .85rem; overflow-wrap: anywhere; } .sp-area small { color: var(--text-2); font-size: .75rem; font-variant-numeric: tabular-nums; }
.sp-rule summary { cursor: pointer; font-size: .75rem; color: var(--muted); } .sp-rule p { margin: .3rem 0 0; font-size: .75rem; color: var(--text-2); line-height: 1.4; }
.sp-excl h3 { font-size: .8rem; color: var(--text-2); margin: 0 0 .3rem; } .sp-excl ul { list-style: none; margin: 0; padding: 0; } .sp-excl li { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: .35rem 0; border-top: 1px solid var(--line); font-size: .875rem; }
.sp-ch { display: flex; flex-direction: column; gap: .8rem; } .sp-ch-line { margin: 0; } .sp-ch-head p { margin: 0 0 .2rem; }
.sp-field { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--text-2); margin-bottom: .5rem; }
.sp-ch-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.sp-opts { list-style: none; margin: 0; padding: 0; } .sp-opt + .sp-opt { border-top: 1px solid var(--line); }
.sp-opt-h { all: unset; box-sizing: border-box; display: flex; gap: .6rem; align-items: flex-start; width: 100%; padding: .6rem .8rem; cursor: pointer; min-height: 48px; }
.sp-opt-h:hover { background: var(--surface-2); } .sp-opt-h:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: -3px; }
.sp-opt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; } .sp-opt-t b { font-weight: 600; overflow-wrap: anywhere; } .sp-opt-t small { color: var(--muted); font-size: .75rem; }
.sp-chev { color: var(--muted); }
.sp-opt-b { padding: 0 .8rem .8rem; display: flex; flex-direction: column; gap: .45rem; align-items: flex-start; } .sp-opt-b p { margin: 0; font-size: .82rem; color: var(--text-2); line-height: 1.45; }
.sp-custom { background: var(--surface-2); border-radius: 12px; padding: .7rem .8rem; } .sp-custom h3 { margin: 0 0 .2rem; font-size: .9rem; } .sp-custom p { margin: 0 0 .5rem; }
.sp-custom-row { display: flex; gap: .5rem; flex-wrap: wrap; } .sp-custom-row .input:first-child { flex: 1; min-width: 200px; } .sp-lp-in { width: 5.5rem; }
.sp-custom-list { list-style: none; margin: 0; padding: 0; } .sp-custom-list li { display: flex; gap: .6rem; align-items: center; justify-content: space-between; padding: .4rem 0; border-top: 1px solid var(--line); } .sp-custom-list li:first-child { border-top: 0; } .sp-custom-list small { display: block; color: var(--muted); font-size: .75rem; }
.sp-tracks { display: flex; flex-direction: column; gap: .5rem; }
.sp-track { all: unset; box-sizing: border-box; display: flex; gap: .6rem; align-items: center; justify-content: space-between; padding: .7rem .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.sp-track:hover { border-color: var(--line-strong); } .sp-track:focus-visible { outline: 3px solid var(--accent-soft); border-color: var(--accent); } .sp-track.on { border-color: var(--accent); }
.sp-track span { display: flex; flex-direction: column; gap: .2rem; } .sp-track small { color: var(--muted); font-size: .78rem; } .sp-track .sp-rule-t { color: var(--text-2); }
.sp-mv-t { margin: 0 0 .1rem; font-size: 1.05rem; } .sp-mv > p { margin: 0 0 .7rem; }
.sp-moves { list-style: none; margin: 0 0 .8rem; padding: 0; border: 1px solid var(--line); border-radius: 12px; max-height: 55vh; overflow: auto; }
.sp-moves li + li { border-top: 1px solid var(--line); }
.sp-move { all: unset; box-sizing: border-box; display: flex; gap: .6rem; align-items: center; justify-content: space-between; width: 100%; padding: .55rem .8rem; min-height: 48px; cursor: pointer; }
.sp-move:hover { background: var(--surface-2); } .sp-move:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: -3px; } .sp-move.here { background: var(--accent-soft); cursor: default; } .sp-move.here svg { color: var(--accent-text); }
.sp-move span { display: flex; flex-direction: column; gap: .15rem; } .sp-move small { font-size: .78rem; color: var(--muted); }
.sp-det-act { flex-wrap: wrap; justify-content: flex-start; border-top: 1px solid var(--line); padding-top: .8rem; } .btn.danger-text { color: var(--bad-text); }
/* Gesamtansicht: alle Semester auf einen Blick, Groesse aus overviewLayout (study-plan-logic.js) */
.sp-page.sp-ov-on { padding-bottom: .6rem; } .sp-page.sp-ov-on .page-head { margin-bottom: .6rem; } .sp-page.sp-ov-on .page-head .sub { display: none; }
.sp-ov-bar { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin-bottom: .5rem; } .sp-ov-done { color: var(--ok-text); font-weight: 600; font-size: .84rem; white-space: nowrap; }
.sp-ov-host { width: 100%; }
.sp-ov.cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: var(--rowh); gap: 6px; }
.sp-ov-col { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 4px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 70%, var(--bg)); overflow: hidden; }
.sp-ov-col.current { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.sp-ov-col.over { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.sp-ov-h { display: flex; gap: 4px; align-items: baseline; min-height: 22px; padding: 0 2px; font-size: 11.5px; } .sp-ov-h b { flex: 1; min-width: 0; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-ov-f { font-weight: 700; color: var(--text-2); } .sp-ov-lp { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; } .sp-ov-lp.over { color: var(--warn-text); } .sp-ov-lp small { font-weight: 600; margin-left: 2px; color: var(--accent-text); }
.sp-ov-chips { display: flex; flex-direction: column; gap: 3px; min-height: 0; flex: 1; }
.sp-chip { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 3px; height: var(--chip); padding: 0 5px; border-radius: 6px; border: .8px solid var(--line); background: var(--surface); font-size: var(--cf); font-weight: 600; line-height: 1; color: var(--text); cursor: pointer; min-width: 0; }
.sp-chip .dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ac, var(--line-strong)); }
.sp-chip .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sp-chip .n { flex: none; color: var(--muted); font-size: calc(var(--cf) * .92); font-variant-numeric: tabular-nums; } .sp-chip .w { flex: none; color: var(--warn-text); display: inline-flex; }
.sp-chip.t-ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); } .sp-chip.t-ok .dot { background: var(--ok); } .sp-chip.passed .t { color: var(--text-2); }
.sp-chip.t-info { background: color-mix(in srgb, var(--info) 12%, var(--surface)); } .sp-chip.t-info .dot { background: var(--info); }
.sp-chip.t-bad { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); } .sp-chip.t-bad .dot { background: var(--bad); }
.sp-chip.t-warn { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); } .sp-chip.t-warn .dot { background: var(--warn); }
.sp-chip.slot { background: transparent; border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); color: var(--accent-text); } .sp-chip.slot .n { color: var(--accent-text); }
button.sp-chip:hover { border-color: var(--line-strong); } .sp-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; } .sp-chip[draggable="true"] { cursor: grab; } .sp-chip.dragging { opacity: .45; }
.sp-ov.stack { display: flex; flex-direction: column; gap: 6px; }
.sp-ov.stack .sp-ov-col { padding: 4px 6px 5px; gap: 3px; } .sp-ov.stack .sp-ov-h { min-height: 0; height: 16px; align-items: center; } .sp-ov.stack .sp-ov-chips { flex: none; flex-direction: row; flex-wrap: wrap; gap: 4px; }
.sp-ov.stack .sp-chip { max-width: var(--cmax); }
@media (max-width: 600px) {
  .sp-ov-tip { display: none; }
  .sp-page.sp-ov-on { padding-top: .7rem; } .sp-page.sp-ov-on .page-head { flex-wrap: nowrap; align-items: center; margin-bottom: .4rem; } .sp-page.sp-ov-on .page-head h1 { font-size: 1.15rem; }
  .sp-page.sp-ov-on #spActions { flex-wrap: nowrap; gap: .3rem; } .sp-page.sp-ov-on #spActions .btn { padding: .4rem .5rem; }
  .sp-page.sp-ov-on #spActions .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .sp-ov-bar .seg.pill button { padding: .3rem .7rem; }
}
@media (max-width: 600px) { .sp-tools { flex-direction: column; align-items: stretch; } .sp-tools .seg { align-self: flex-start; } }
@media (prefers-reduced-motion: reduce) { .sp-ghost { box-shadow: none; } }

/* Module je Semester (app/static/module-semesters.js, 05.11.2026): Hinweis zum Abgleich und Semester-Ueberschriften */
.sem-hint { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; padding: .55rem .8rem; border-radius: var(--r, 14px);
  background: var(--surface2, var(--surface)); border: 1px solid var(--line); color: var(--text2, var(--text)); font-size: .9rem; }
.sem-hint svg { flex: none; }
.sem-head { font-size: 1.02rem; margin: 1.2rem 0 .7rem; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.mod-older .older-ct .dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; vertical-align: middle; }
/* Raumfinder (05.11.2026, rooms.js): Raumangabe als Link in Stundenplan, Lernkalender und Klausuren (rooms-logic.js roomLink) */
.room-link { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .2rem; margin: -.1rem -.2rem; border: 0; background: none;
  color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; border-radius: 6px; min-height: 28px; }
.room-link:hover span, .room-link:focus-visible span { text-decoration: underline; }
.room-link svg { flex: none; }
.ov-exam-room { padding: 0 .8rem .5rem calc(58px + 1.6rem); margin-top: -.3rem; }
