/* Mitschrift – Stylesheet
   Leitidee: ruhiger Arbeitsplatz wie ein Schreibtisch mit Papierbogen; ein einziges Akzentrot
   (Paragrafen-Rot, angelehnt an die roten Gesetzessammlungen) markiert Normen, Live-Zustände und Aktionen. */

@font-face { font-family: 'Plex'; src: url(../fonts/plex-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex'; src: url(../fonts/plex-400i.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Plex'; src: url(../fonts/plex-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex'; src: url(../fonts/plex-600.woff2) format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Serif4'; src: url(../fonts/serif.woff2) format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Serif4'; src: url(../fonts/serif-italic.woff2) format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }

@counter-style schema-alpha { system: extends lower-alpha; suffix: ") "; }
@counter-style schema-double { system: alphabetic; symbols: aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss tt uu vv ww xx yy zz; suffix: ") "; }

:root {
  --desk: #eceef1; --paper: #ffffff; --sb: #f5f6f8; --raise: #ffffff;
  --ink: #1d2230; --ink-2: #4a5263; --ink-3: #8a91a0; --line: #d7dbe2; --line-2: #e6e9ee;
  --accent: #1f7cf0; --accent-2: #1767d4; --accent-soft: #e8f2ff; --on-accent: #fff;
  --live: #1f7a4d; --live-soft: #e2f3ea; --warn: #b45309; --warn-soft: #fdf0dd;
  --co-def: #2f6fb3; --co-merke: #c98a0b; --co-problem: #b4232a; --co-schema: #2f7d4f; --co-fall: #6b7280;
  --co-hinweis: #d99a06; --co-merke: #e8700a; --co-klausur: #d6336c; --co-beispiel: #1f9d74; --co-entscheidung: #2e9a52; --co-fallgruppe: #13a2a0; --co-frage: #8b5cf6; --co-formulierung: #4a7fe0; --co-def: #3478d6; --co-problem: #dc3b44; --co-schema: #c99a0a;
  --hover: rgba(29, 34, 48, .06); --shadow: 0 1px 2px rgba(20, 24, 33, .06), 0 8px 24px rgba(20, 24, 33, .08);
  --sans: 'Plex', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Serif4', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --sb-w: 268px; --r: 8px;
  color-scheme: light;
}
[data-theme="dark"] {
  --desk: #15171c; --paper: #1d2027; --sb: #191b21; --raise: #23262e;
  --ink: #e6e8ec; --ink-2: #b0b6c2; --ink-3: #7c8393; --line: #333843; --line-2: #2a2e37;
  --accent: #5aa9ff; --accent-2: #84bfff; --accent-soft: #182a44; --on-accent: #08111f;
  --live: #4cc38a; --live-soft: #1d3329; --warn: #f0a548; --warn-soft: #3a2c18;
  --co-def: #6ea8ea; --co-merke: #e5b64a; --co-problem: #ec6b70; --co-schema: #5fbf87; --co-fall: #9aa1ae;
  --co-hinweis: #f0bf45; --co-merke: #f59a4a; --co-klausur: #f06595; --co-beispiel: #4cc79a; --co-entscheidung: #5cc47e; --co-fallgruppe: #3fcfcc; --co-frage: #a98bfa; --co-formulierung: #7ea6f2; --co-def: #6ea8ea; --co-problem: #f06b72; --co-schema: #e8c04a;
  --hover: rgba(255, 255, 255, .06); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --desk: #15171c; --paper: #1d2027; --sb: #191b21; --raise: #23262e;
    --ink: #e6e8ec; --ink-2: #b0b6c2; --ink-3: #7c8393; --line: #333843; --line-2: #2a2e37;
    --accent: #5aa9ff; --accent-2: #84bfff; --accent-soft: #182a44; --on-accent: #08111f;
    --live: #4cc38a; --live-soft: #1d3329; --warn: #f0a548; --warn-soft: #3a2c18;
    --co-def: #6ea8ea; --co-merke: #e5b64a; --co-problem: #ec6b70; --co-schema: #5fbf87; --co-fall: #9aa1ae;
  --co-hinweis: #f0bf45; --co-merke: #f59a4a; --co-klausur: #f06595; --co-beispiel: #4cc79a; --co-entscheidung: #5cc47e; --co-fallgruppe: #3fcfcc; --co-frage: #a98bfa; --co-formulierung: #7ea6f2; --co-def: #6ea8ea; --co-problem: #f06b72; --co-schema: #e8c04a;
    --hover: rgba(255, 255, 255, .06); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 var(--sans); color: var(--ink); background: var(--desk); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
mark { background: #fff1a6; color: #1d2230; border-radius: 2px; padding: 0 1px; }
code { font-family: var(--mono); font-size: .92em; }
kbd { font: 11px var(--sans); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ic.big { width: 34px; height: 34px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.spacer { flex: 1; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Bedienelemente ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line); background: var(--raise); border-radius: var(--r); font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--ink-3); }
.btn .ic { width: 16px; height: 16px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { background: transparent; border-color: var(--co-problem); color: var(--co-problem); }
.btn-danger:hover:not(:disabled) { background: var(--co-problem); color: #fff; }
.btn-ghost-danger { background: transparent; border-color: transparent; color: var(--co-problem); }
.btn-ghost-danger:hover:not(:disabled) { border-color: var(--co-problem); }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; background: transparent; border-radius: 7px; color: var(--ink-2); padding: 0; text-decoration: none; }
.icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.icon-btn.sm { width: 28px; height: 28px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }
.icon-btn.on { color: var(--accent); background: var(--accent-soft); }
.seg { display: inline-flex; background: var(--hover); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 6px; padding: 5px 12px; font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--raise); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.seg-sm button { padding: 3px 10px; font-size: 13px; }
.seg-sm .ic { width: 15px; height: 15px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--raise); text-decoration: none; color: var(--ink-2); white-space: nowrap; }
button.chip:hover, a.chip:hover { border-color: var(--accent); color: var(--accent); }
a.chip[style] { border-left: 3px solid var(--c); }
.badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 99px; white-space: nowrap; }
.badge.ausfall { background: var(--accent-soft); color: var(--accent); }
.badge.entschuldigt { background: var(--warn-soft); color: var(--warn); }
.badge.frei { background: var(--hover); color: var(--ink-3); }
.badge.live { background: var(--live-soft); color: var(--live); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .12); flex: none; display: inline-block; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); flex: 1; }
input[type=text], input[type=search], input[type=date], input[type=time], input:not([type]), input[type=password], select, textarea {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); min-width: 0; }
textarea { height: auto; padding: 8px 10px; line-height: 1.5; resize: vertical; } /* mehrzeilige Felder: Höhe nach rows */
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }

/* ---------- Grundlayout ---------- */
#app { display: grid; grid-template-columns: var(--sb-w) 1fr; height: 100vh; }
body.sb-hidden #app, body.focus-mode #app { grid-template-columns: 0 1fr; }
body.sb-hidden #sidebar, body.focus-mode #sidebar { visibility: hidden; }
#main { min-width: 0; height: 100vh; overflow: hidden; position: relative; }
.view { height: 100%; overflow: auto; }
.view-note { overflow: hidden; }
.sb-show { position: fixed; left: 10px; top: 10px; z-index: 30; display: none; background: var(--raise); box-shadow: var(--shadow); }
body.sb-hidden .sb-show { display: grid; }
body.sb-hidden[data-route=note] .sb-show { top: 6px; left: 6px; }
body.focus-mode .sb-show { display: none; }
body.resizing { user-select: none; }
body.resizing.rx { cursor: col-resize; }
body.resizing.ry { cursor: row-resize; }
body.resizing iframe, body.resizing .pdf-scroll { pointer-events: none; }

/* ---------- Seitenleiste ---------- */
#sidebar { background: var(--sb); border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow: hidden; }
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 8px 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; text-decoration: none; letter-spacing: -.01em; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; font: 700 17px var(--serif); }
.sb-search { margin: 4px 12px 8px; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink-3); }
.sb-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sb-search input { border: 0; height: 30px; padding: 0; flex: 1; background: transparent; box-shadow: none !important; }
.sb-search .ic { width: 16px; height: 16px; }
.sb-nav { display: flex; flex-direction: column; padding: 2px 8px 8px; gap: 1px; }
.sb-nav a, .sb-foot-link { display: flex; align-items: center; gap: 10px; padding: 6px 9px; border-radius: 7px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.sb-nav a:hover, .sb-foot-link:hover { background: var(--hover); color: var(--ink); }
.sb-nav a.active, .sb-foot-link.active { background: var(--raise); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.sb-nav .ic, .sb-foot-link .ic { width: 17px; height: 17px; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 12px; border-top: 1px solid var(--line-2); }
.sb-section { margin-top: 10px; }
.sb-title { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 4px 9px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.tc-head { display: flex; align-items: center; border-radius: 7px; }
.tc-head:hover { background: var(--hover); }
.tc-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 6px 4px 6px 4px; text-align: left; }
.tc-toggle .chev { width: 14px; height: 14px; color: var(--ink-3); transition: transform .15s; }
.tc.open .chev { transform: rotate(90deg); }
.tc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tc-count { font-size: 12px; color: var(--ink-3); }
.tc-add { opacity: 0; }
.tc-head:hover .tc-add, .tc-add:focus-visible { opacity: 1; }
.tc-notes { display: none; padding: 1px 0 6px 25px; }
.tc.open .tc-notes { display: block; }
.tc-empty { font-size: 12px; color: var(--ink-3); padding: 3px 9px; }
.tn { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; text-decoration: none; color: var(--ink-2); font-size: 13px; }
.tn:hover { background: var(--hover); color: var(--ink); }
.tn.active { background: var(--accent-soft); color: var(--accent); }
.tn-date { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.tn-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; opacity: .85; }
.tn-b .ic { width: 13px; height: 13px; color: var(--ink-3); }
#tree-extras .tn { padding-left: 12px; }
.sb-foot { border-top: 1px solid var(--line-2); padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.sb-foot-row { display: flex; gap: 2px; padding: 0 2px; }
#trash-count { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.logout-form { margin: 0 0 0 auto; }
.rec-indicator { margin: 0 12px 8px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 500; text-align: left; }
.rec-indicator.is-paused { background: var(--warn); }
.rec-indicator .ri-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rec-indicator .ri-time { font-variant-numeric: tabular-nums; }
.ri-dot, .pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; animation: pulse 1.6s ease-in-out infinite; }
.rec-indicator.is-paused .ri-dot { animation: none; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- Seiten allgemein ---------- */
.page, .files-page { max-width: 1040px; margin: 0 auto; padding: 32px 36px 60px; }
.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1, .plan-title { font: 600 26px/1.2 var(--serif); margin: 0; letter-spacing: -.01em; }
.page-tools { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.panel-title { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 10px; }
.empty-page, .loading-page { max-width: 520px; margin: 18vh auto; text-align: center; color: var(--ink-2); padding: 0 20px; }
.empty-page h1 { font: 600 24px var(--serif); color: var(--ink); }
.empty { padding: 40px 0; text-align: center; }

/* ---------- Startseite ---------- */
.start { max-width: 1080px; margin: 0 auto; padding: 44px 40px 60px; }
.hero { position: relative; padding: 4px 0 34px 26px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.hero::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 38px; width: 5px; border-radius: 3px; background: var(--c, var(--accent)); }
.hero-state { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.hero-state.live { color: var(--live); }
.hero-title { font: 600 clamp(34px, 5vw, 56px)/1.05 var(--serif); margin: 0 0 14px; letter-spacing: -.02em; max-width: 18ch; }
.hero-when { font-size: 19px; margin: 0 0 6px; color: var(--ink-2); }
.hero-when strong { color: var(--ink); font-weight: 600; }
.hero-meta { margin: 0; color: var(--ink-3); font-size: 15px; }
.hero-hint { margin: 16px 0 0; font-size: 13px; color: var(--ink-3); }
.hero-progress { height: 4px; border-radius: 4px; background: var(--line-2); max-width: 420px; margin: 10px 0 12px; overflow: hidden; }
.hero-progress span { display: block; height: 100%; background: var(--live); }
.hero-actions { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.start-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.lec-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px 9px 12px; border: 0; border-left: 3px solid var(--c); background: transparent; text-align: left; border-radius: 0 7px 7px 0; margin-bottom: 4px; }
.lec-row:hover { background: var(--hover); }
.lec-row.past { opacity: .5; }
.lec-row.is-ausfall .lec-name, .lec-row.is-entschuldigt .lec-name { text-decoration: line-through; }
.lec-time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 500; min-width: 44px; }
.lec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lec-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lec-sub { font-size: 12px; color: var(--ink-3); }
.lec-note .ic { width: 15px; height: 15px; color: var(--ink-3); }
.recent-row { display: flex; flex-direction: column; padding: 8px 10px 8px 12px; border-left: 3px solid var(--c); text-decoration: none; border-radius: 0 7px 7px 0; margin-bottom: 4px; }
.recent-row:hover { background: var(--hover); }
.recent-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-sub { font-size: 12px; color: var(--ink-3); }

/* ---------- Stundenplan ---------- */
.plan { padding: 24px 28px 40px; min-width: 760px; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.plan-nav, .plan-tools { display: flex; align-items: center; gap: 6px; }
.plan-title { margin-left: 10px; font-size: 22px; }
.plan-title .kw { font: 500 13px var(--sans); color: var(--ink-3); margin-left: 6px; }
.plan-grid-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.plan-grid { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); }
.pg-times .pg-body { position: relative; }
.pg-hour { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pg-hour:first-child { transform: none; }
.pg-dayhead-spacer, .pg-dayhead { height: 58px; border-bottom: 1px solid var(--line); }
.pg-col { border-left: 1px solid var(--line-2); min-width: 0; }
.pg-dayhead { width: 100%; border-top: 0; border-left: 0; border-right: 0; background: transparent; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 0 12px; text-align: left; }
.pg-dayhead:hover { background: var(--hover); }
.dh-wd { font-weight: 600; }
.dh-date { font-size: 12px; color: var(--ink-3); }
.pg-col.today .dh-wd { color: var(--accent); }
.pg-col.today .pg-body { background: color-mix(in srgb, var(--accent) 3%, transparent); }
.pg-col.free .pg-body { background: repeating-linear-gradient(135deg, transparent 0 8px, var(--line-2) 8px 9px); }
.pg-body { position: relative; background-image: linear-gradient(var(--line-2) 1px, transparent 1px); background-size: 100% 63px; }
.pg-ev { position: absolute; left: 5px; right: 5px; border: 0; border-radius: 7px; padding: 6px 8px 6px 11px; text-align: left; overflow: hidden; display: flex; flex-direction: column; gap: 1px;
  background: color-mix(in srgb, var(--c) 13%, var(--paper)); border-left: 4px solid var(--c); color: var(--ink); }
.pg-ev:hover { background: color-mix(in srgb, var(--c) 22%, var(--paper)); }
.ev-time { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ev-name { font-weight: 600; font-size: 13px; line-height: 1.25; }
.ev-meta { font-size: 12px; color: var(--ink-2); }
.ev-status { font-size: 11px; font-weight: 600; margin-top: 2px; }
.ev-note { position: absolute; right: 6px; top: 5px; }
.ev-note .ic { width: 14px; height: 14px; color: var(--ink-2); }
.pg-ev.is-ausfall, .pg-ev.is-entschuldigt, .pg-ev.is-frei { background: repeating-linear-gradient(135deg, var(--paper) 0 6px, color-mix(in srgb, var(--c) 8%, var(--paper)) 6px 12px); border-left-style: dashed; }
.pg-ev.is-ausfall .ev-name, .pg-ev.is-entschuldigt .ev-name, .pg-ev.is-frei .ev-name { text-decoration: line-through; color: var(--ink-2); }
.pg-ev.is-ausfall .ev-status { color: var(--accent); }
.pg-ev.is-entschuldigt .ev-status { color: var(--warn); }
.pg-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 3; pointer-events: none; }
.pg-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.plan-stats { margin-top: 22px; }
.stat-list { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.stat { display: flex; align-items: center; gap: 8px; }
.stat .dot { background: var(--c); }
.stat-name { font-weight: 500; }

/* Verwaltung */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { border: 0; background: transparent; padding: 8px 12px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.course-card { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.cc-row { display: flex; gap: 8px; }
.cc-row input { flex: 1; }
.cc-name { flex: 3 !important; font-weight: 600; }
.cc-short { max-width: 120px; }
.cc-slots-head, .slot-row { display: grid; grid-template-columns: 64px 92px 92px 1fr 132px 132px 28px; gap: 6px; align-items: center; }
.cc-slots-head { font-size: 11px; color: var(--ink-3); padding: 0 2px; }
.slot-row select, .slot-row input { height: 30px; padding: 0 6px; font-size: 13px; }
.cc-slots { display: flex; flex-direction: column; gap: 6px; }
.cc-actions { display: flex; gap: 6px; align-items: center; }
.form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.sub-title { font-size: 13px; font-weight: 600; margin: 18px 0 8px; }
.break-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.break-row input:not([type=date]) { flex: 1; }

/* ---------- Dateien ---------- */
.dropzone-line { border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px; text-align: center; color: var(--ink-3); margin-bottom: 16px; font-size: 13px; }
.dropzone-line.over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.file-table { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; }
.ft-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr) 80px 100px 36px; gap: 12px; padding: 9px 14px; align-items: center; border-top: 1px solid var(--line-2); }
.ft-row:first-child { border-top: 0; }
.ft-head { font-size: 12px; color: var(--ink-3); font-weight: 600; background: var(--sb); }
.ft-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ft-name a { text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-name a:hover { text-decoration: underline; }
.ft-name img { width: 36px; height: 28px; object-fit: cover; border-radius: 4px; }
.ft-name .ic { color: var(--accent); }
.ft-links { display: flex; gap: 4px; flex-wrap: wrap; }
.ft-size, .ft-date { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.file-table > .muted { padding: 24px; margin: 0; }
.picker-filter { width: 100%; margin-bottom: 12px; }
.picker-list { max-height: 56vh; overflow: auto; }
.pk-row { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line-2); }
.pk-icon .ic { color: var(--accent); }
.pk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pk-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-sub { font-size: 12px; color: var(--ink-3); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pk-act { display: flex; gap: 6px; }

/* ---------- Suche / Papierkorb ---------- */
.s-sec { margin-bottom: 26px; }
.s-hit, .t-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-left: 3px solid var(--c, var(--line)); border-radius: 0 8px 8px 0; text-decoration: none; margin-bottom: 6px; background: var(--paper); }
.s-hit:hover { background: var(--raise); box-shadow: var(--shadow); }
.s-title { font-weight: 600; }
.s-meta { font-size: 12px; color: var(--ink-3); }
.s-snip { font-size: 13px; color: var(--ink-2); }
.t-row { flex-direction: row; align-items: center; gap: 8px; }
.t-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* ---------- Mitschrift-Layout ---------- */
.note-layout { display: grid; grid-template-columns: minmax(380px, 1fr) 7px var(--right-w, 44%); height: 100%; }
.note-layout.right-hidden { grid-template-columns: 1fr 0 0; }
.note-layout.right-hidden .right-pane, .note-layout.right-hidden .gutter-v { display: none; }
body.focus-mode .note-layout { grid-template-columns: 1fr 0 0; }
body.focus-mode .right-pane, body.focus-mode .gutter-v { display: none; }
.ed-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.ed-scroll { flex: 1; overflow-y: auto; padding: 22px 28px 80px 58px; } /* links Platz für den Baustein-Griff */
.gutter { background: var(--desk); position: relative; z-index: 2; }
.gutter::after { content: ''; position: absolute; background: var(--line); border-radius: 2px; }
.gutter-v { cursor: col-resize; border-left: 1px solid var(--line-2); }
.gutter-v::after { left: 2px; top: 50%; width: 3px; height: 36px; margin-top: -18px; }
.gutter-h { cursor: row-resize; height: 7px; border-top: 1px solid var(--line-2); }
.gutter-h::after { top: 2px; left: 50%; height: 3px; width: 36px; margin-left: -18px; }
.gutter:hover::after { background: var(--accent); }
.right-pane { display: grid; grid-template-rows: var(--pdf-h, 62%) 7px minmax(0, 1fr); min-width: 0; min-height: 0; background: var(--paper); }
.note-layout.law-collapsed .right-pane { grid-template-rows: minmax(0, 1fr) 7px 41px; }
.note-layout.law-collapsed .law-body { display: none; }
.note-layout.law-collapsed [data-a=collapse] .ic { transform: rotate(180deg); }

/* Werkzeugleiste */
.toolbar { display: flex; align-items: center; gap: 2px; padding: 6px 10px; background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; position: relative; z-index: 4; }
body.sb-hidden .toolbar { padding-left: 46px; }
.toolbar.disabled .tb-group:not(:nth-last-child(2)) { opacity: .35; pointer-events: none; }
.tb-group { display: flex; align-items: center; gap: 1px; padding-right: 6px; margin-right: 4px; border-right: 1px solid var(--line-2); }
.tb-group:last-of-type { border-right: 0; }
.tb-spacer { flex: 1; }
.tb { height: 30px; min-width: 30px; border: 0; background: transparent; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--ink-2); padding: 0 5px; position: relative; }
.tb:hover { background: var(--hover); color: var(--ink); }
.tb.on { background: var(--accent-soft); color: var(--accent); }
.tb .ic { width: 17px; height: 17px; }
.tb-txt { font: 15px var(--serif); min-width: 14px; }
.tb-wide { padding: 0 8px; font-size: 13px; font-weight: 500; }
.tb-drop { min-width: 16px; width: 16px; padding: 0; margin-left: -3px; }
.tb-drop .ic { width: 12px; height: 12px; }
.tb-swatch { position: absolute; left: 7px; right: 7px; bottom: 3px; height: 3px; border-radius: 2px; }
.tb-block { height: 30px; font-size: 13px; padding: 0 6px; width: 132px; }
.tb-normcount { font-size: 12px; color: var(--accent); display: inline-block; min-width: 2.2ch; text-align: left; font-variant-numeric: tabular-nums; }
[data-cmd=normlist] { font: 600 16px var(--serif); color: var(--accent); }

/* Papierbogen */
.sheet { max-width: 860px; margin: 0 auto; background: var(--paper); border-radius: 4px; box-shadow: var(--shadow); padding: 44px 64px 64px; position: relative; min-height: calc(100% - 20px); border-top: 4px solid var(--c); }
.note-head { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.title-row { display: flex; align-items: flex-start; gap: 10px; }
.head-actions { flex: none; display: flex; align-items: center; gap: 2px; padding-top: 7px; }
.note-title { flex: 1; min-width: 0; width: 100%; border: 0 !important; box-shadow: none !important; padding: 0; height: auto; font: 600 30px/1.2 var(--serif); letter-spacing: -.015em; background: transparent; }
.note-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.meta-date, .meta-course { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; padding: 0 0 0 8px; height: 30px; }
.meta-date .ic { width: 15px; height: 15px; color: var(--ink-3); }
.meta-date input, .meta-course select { border: 0; height: 28px; background: transparent; padding: 0 6px 0 0; font-size: 13px; box-shadow: none !important; }
.meta-course select { max-width: 230px; }
.meta-chip { padding: 4px 9px; border-radius: 7px; background: var(--hover); }
.save-state { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ss-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); flex: none; }
.save-state[data-s=dirty] .ss-dot, .save-state[data-s=saving] .ss-dot { background: var(--co-merke); }
.save-state[data-s=error], .save-state[data-s=conflict] { color: var(--accent); font-weight: 600; }
.save-state[data-s=error] .ss-dot, .save-state[data-s=conflict] .ss-dot { background: var(--accent); }
.save-state[data-s=offline] { color: var(--warn); font-weight: 500; }
.save-state[data-s=offline] .ss-dot { background: var(--warn); }
.note-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tab-count { font-size: 11px; color: var(--ink-3); }

/* Listener */
.rec { display: flex; align-items: center; gap: 6px; }
.rec-main { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px 0 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--raise); font-weight: 600; }
.rec-main:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.rec-main .ic { width: 17px; height: 17px; }
.rec.is-rec .rec-main { background: var(--accent); border-color: var(--accent); color: #fff; }
.rec.is-paused .rec-main { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 0; }
.rec.is-rec .rec-time { color: var(--accent); }
.rec-meter { width: 40px; height: 4px; border-radius: 3px; background: var(--line-2); overflow: hidden; display: none; }
.rec.is-rec .rec-meter { display: inline-block; }
.rec-meter span { display: block; height: 100%; background: var(--live); transform-origin: left; transform: scaleX(0); transition: transform .2s; }
.rec-stop { display: none !important; }
.rec.is-rec .rec-stop, .rec.is-paused .rec-stop { display: inline-grid !important; }
.rec-status { font-size: 12px; color: var(--ink-3); min-width: 0; white-space: nowrap; }
.rec.is-rec .rec-main::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; order: -1; }
.live-caption { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%); width: min(760px, calc(100% - 48px)); margin: 0; padding: 10px 16px; border-radius: 10px; background: rgba(20, 22, 28, .9); color: #f2f3f5; font-size: 14px; line-height: 1.45; z-index: 5; box-shadow: var(--shadow); max-height: 4.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.lc-final { opacity: .7; }
.lc-interim { color: #fff; }
.ed-status { display: flex; gap: 10px; padding: 4px 14px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line-2); background: var(--paper); }

/* Inhalt des Bogens */
.sheet-content { font: 17px/1.68 var(--serif); color: var(--ink); outline: none; min-height: 50vh; word-wrap: break-word; }
.sheet-content:empty::before { content: 'Mitschrift beginnen …'; color: var(--ink-3); }
.sheet-content > *:first-child { margin-top: 0; }
.sheet-content p { margin: 0 0 .65em; }
.sheet-content h1 { font: 650 1.55em/1.25 var(--serif); margin: 1.3em 0 .45em; letter-spacing: -.01em; }
.sheet-content h2 { font: 650 1.28em/1.3 var(--serif); margin: 1.2em 0 .4em; }
.sheet-content h3 { font: 600 1.08em/1.35 var(--sans); margin: 1.1em 0 .35em; }
.sheet-content h4 { font: 600 1em var(--sans); margin: 1em 0 .3em; }
.sheet-content ul, .sheet-content ol { margin: 0 0 .7em; padding-left: 1.6em; }
.sheet-content li { margin: .12em 0; }
.sheet-content li > p { margin: 0; }
.sheet-content a { color: var(--co-def); }
.sheet-content blockquote { margin: .8em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--line); color: var(--ink-2); }
.sheet-content pre { font: 13px/1.5 var(--mono); background: var(--hover); padding: 10px 12px; border-radius: 6px; white-space: pre-wrap; }
.sheet-content hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.sheet-content img { max-width: 100%; height: auto; border-radius: 4px; display: block; margin: .6em 0; }
.sheet-content img.fl-left { float: left; margin: .2em 1.2em .6em 0; }
.sheet-content img.fl-right { float: right; margin: .2em 0 .6em 1.2em; }
.sheet-content img.fl-center { margin-left: auto; margin-right: auto; }
.sheet-content img.selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.sheet-content table { border-collapse: collapse; width: 100%; margin: .8em 0; font-size: .92em; }
.sheet-content th, .sheet-content td { border: 1px solid var(--line); padding: 6px 9px; vertical-align: top; min-width: 40px; }
.sheet-content th { background: var(--hover); font-family: var(--sans); font-weight: 600; text-align: left; }
.sheet-content [style*="background-color"]:not([style*="transparent"]) { color: #1d2230; border-radius: 2px; }
.sheet-content .ts { font: 600 .72em var(--sans); color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 1px 5px; vertical-align: .12em; white-space: nowrap; }
.sheet-content ul.checklist { list-style: none; padding-left: 1.7em; }
.sheet-content ul.checklist > li { position: relative; }
.sheet-content ul.checklist > li::before { content: ''; position: absolute; left: -1.55em; top: .32em; width: 1em; height: 1em; border: 1.5px solid var(--ink-3); border-radius: 4px; cursor: pointer; }
.sheet-content ul.checklist > li[data-checked=true] { color: var(--ink-3); text-decoration: line-through; }
.sheet-content ul.checklist > li[data-checked=true]::before { background: var(--live) no-repeat center/72% url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); border-color: var(--live); }
.sheet-content ol.schema { list-style: upper-latin; padding-left: 1.9em; }
.sheet-content ol.schema ol { list-style: upper-roman; padding-left: 1.9em; }
.sheet-content ol.schema ol ol { list-style: decimal; }
.sheet-content ol.schema ol ol ol { list-style: schema-alpha; }
.sheet-content ol.schema ol ol ol ol { list-style: schema-double; padding-left: 2.3em; }
.sheet-content ol.schema > li::marker { font-weight: 700; }
.sheet-content ol.schema > li > ol > li::marker { font-weight: 600; }
.callout { --co: var(--co-hinweis); --ct-l: 'H'; --ct-n: 'Hinweis'; position: relative; margin: 1em 0; padding: 2em 1.1em .5em; border-left: 3px solid var(--co); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--co) 7%, var(--paper)); }
/* Kopfzeile: Buchstaben-Symbol + Typ (anklickbar, öffnet „Inhaltsblocktyp ändern“) */
.callout::before { content: var(--ct-l); position: absolute; left: 1.05rem; top: .55em; width: 17px; height: 17px; border-radius: 4px; display: grid; place-items: center; font: 700 10.5px/1 var(--sans); color: var(--co); background: color-mix(in srgb, var(--co) 16%, var(--paper)); box-shadow: inset 2px 0 0 var(--co); cursor: pointer; }
.callout::after { content: var(--ct-n) '  ▾'; position: absolute; left: calc(1.05rem + 24px); top: .55em; line-height: 17px; font: 600 11.5px var(--sans); color: var(--co); cursor: pointer; white-space: pre; opacity: .95; }
.callout[data-type=def] { --co: var(--co-def); --ct-l: 'D'; --ct-n: 'Definition'; }
.callout[data-type=problem] { --co: var(--co-problem); --ct-l: 'P'; --ct-n: 'Problem / Streit'; }
.callout[data-type=hinweis] { --co: var(--co-hinweis); --ct-l: 'H'; --ct-n: 'Hinweis'; }
.callout[data-type=merke] { --co: var(--co-merke); --ct-l: 'M'; --ct-n: 'Merke'; }
.callout[data-type=klausur] { --co: var(--co-klausur); --ct-l: 'K'; --ct-n: 'Klausurrelevant'; }
.callout[data-type=beispiel], .callout[data-type=fall] { --co: var(--co-beispiel); --ct-l: 'B'; --ct-n: 'Beispiel'; }
.callout[data-type=schema] { --co: var(--co-schema); --ct-l: 'S'; --ct-n: 'Schema'; }
.callout[data-type=entscheidung] { --co: var(--co-entscheidung); --ct-l: 'E'; --ct-n: 'Entscheidung'; }
.callout[data-type=fallgruppe] { --co: var(--co-fallgruppe); --ct-l: 'F'; --ct-n: 'Fallgruppe'; }
.callout[data-type=frage] { --co: var(--co-frage); --ct-l: 'F'; --ct-n: 'Frage'; }
.callout[data-type=formulierung] { --co: var(--co-formulierung); --ct-l: 'F'; --ct-n: 'Formulierung'; }
.callout > *:last-child { margin-bottom: .3em; }
.sheet-content blockquote.norm-quote { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--paper)); padding: .6em 1em; border-radius: 0 7px 7px 0; font-size: .93em; }
.sheet-content blockquote.tr-quote { border-left-color: var(--live); font-style: italic; }
/* Normen: farbiges Rechteck je Gesetzbuch (Ebene hinter dem Text) */
.norm-layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.norm-box { position: absolute; border: 1.5px solid var(--nc); border-radius: 4px; background: color-mix(in srgb, var(--nc) 11%, transparent); }
.editor, .tr-list, .an-out, .fr-out > * { position: relative; z-index: 1; }

/* Rechtschreibung */
::highlight(spell-err) { text-decoration: underline wavy #e5484d; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
::highlight(spell-style) { text-decoration: underline wavy #e5a50a; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.sp-demo-err { text-decoration: underline wavy #e5484d; } .sp-demo-style { text-decoration: underline wavy #e5a50a; }

/* Griff zum Entfernen von Bausteinen */
.block-handle { position: absolute; z-index: 7; display: flex; flex-direction: column; gap: 2px; background: var(--raise); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 2px; }
.block-handle button { width: 30px; height: 28px; border: 0; background: transparent; border-radius: 6px; color: var(--ink-2); display: grid; place-items: center; }
.block-handle button:hover { background: var(--hover); color: var(--ink); }
.block-handle button[data-h=del]:hover { background: var(--accent-soft); color: var(--accent); }
.block-handle .ic { width: 16px; height: 16px; }
.block-handle.inside { opacity: .92; }
.sheet-content .block-hover { outline: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; border-radius: 4px; }

/* schwebende Werkzeuge */
.float-tools { position: absolute; z-index: 6; display: flex; align-items: center; gap: 2px; background: var(--raise); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 3px; font-size: 12px; }
.float-tools button { border: 0; background: transparent; border-radius: 5px; padding: 4px 7px; color: var(--ink-2); display: inline-flex; align-items: center; }
.float-tools button:hover { background: var(--hover); color: var(--ink); }
.float-tools .ic { width: 14px; height: 14px; }
.ft-sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }
.tbl-picker { padding: 6px; }
.tp-grid { display: grid; grid-template-columns: repeat(8, 18px); gap: 3px; }
.tp-grid span { width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.tp-grid span.on { background: var(--accent-soft); border-color: var(--accent); }
.tp-label { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.menu-outline { max-height: 60vh; overflow: auto; min-width: 240px; }
.ol-h2 { padding-left: 12px; } .ol-h3 { padding-left: 24px; color: var(--ink-2); }

/* Transkript */
.transcript-view { min-height: 50vh; display: flex; flex-direction: column; }
.tr-tools { display: flex; gap: 6px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.tr-filter { width: 220px; }
.tr-list { font: 15.5px/1.6 var(--serif); }
.tr-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; padding: 4px 0; align-items: start; border-radius: 6px; }
.tr-row:hover { background: var(--hover); }
.tr-row time { font: 500 12px/2 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; padding-left: 4px; }
.tr-text { margin: 0; outline: none; }
.tr-text[contenteditable=true] { background: var(--paper); box-shadow: 0 0 0 2px var(--accent-soft); border-radius: 4px; }
.tr-act { display: flex; opacity: 0; }
.tr-row:hover .tr-act { opacity: 1; }
.tr-row.marker { display: block; text-align: center; font: 600 11.5px var(--sans); color: var(--ink-3); padding: 10px 0; }
.tr-row.marker span { padding: 2px 10px; border-radius: 99px; background: var(--hover); }
.tr-interim { color: var(--ink-3); font: italic 15.5px/1.6 var(--serif); margin: 4px 0 0 56px; min-height: 1.6em; }
.tr-empty { text-align: center; color: var(--ink-2); padding: 50px 20px; }
.tr-empty .ic { color: var(--ink-3); }

/* Auswertung */
.analysis .an-src { margin-bottom: 16px; }
.an-out { font: 15.5px/1.6 var(--serif); }
.an-out h3 { font: 600 14px var(--sans); margin: 1.4em 0 .5em; }
.an-out ul { padding-left: 1.3em; margin: 0; }
.an-out li { margin-bottom: .35em; }
.an-out .ts { font: 600 11px var(--sans); color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 1px 5px; }
.an-stats { font: 13px var(--sans); color: var(--ink-3); margin: 0; }
.an-kw .chip, .an-norms .chip { margin: 0 2px 4px 0; font-size: 13px; }
.an-norms .chip small { color: var(--ink-3); }

/* ---------- PDF-Bereich ---------- */
.pdf-panel { display: flex; flex-direction: column; min-height: 0; position: relative; background: var(--paper); }
.pdf-head, .pdf-tools, .law-head { display: flex; align-items: center; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--line-2); min-height: 40px; }
.pdf-name { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; font-weight: 600; max-width: 46%; padding: 4px 6px; border-radius: 6px; min-width: 0; }
.pdf-name:hover { background: var(--hover); }
.pdf-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-name .ic { width: 14px; height: 14px; color: var(--ink-3); }
.pdf-count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pdf-tools { min-height: 36px; font-size: 13px; color: var(--ink-2); }
.pdf-pager { display: inline-flex; align-items: center; gap: 5px; }
.pdf-page { width: 44px; height: 26px; text-align: center; padding: 0 4px; }
.pdf-zoom { border: 0; background: transparent; font-size: 12px; min-width: 48px; border-radius: 5px; padding: 4px; font-variant-numeric: tabular-nums; }
.pdf-zoom:hover { background: var(--hover); }
.pdf-panel.empty .pdf-tools { display: none; }
.pdf-search { padding: 8px; border-bottom: 1px solid var(--line-2); max-height: 40%; overflow: auto; }
.pdf-search input { width: 100%; height: 30px; }
.pdf-hit { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 5px 6px; border-radius: 5px; font-size: 12.5px; color: var(--ink-2); }
.pdf-hit:hover { background: var(--hover); }
.pdf-hit span { font-weight: 600; color: var(--ink); margin-right: 6px; }
.pdf-results .muted { font-size: 12px; margin: 6px 4px; }
.pdf-temp { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 500; }
.pdf-temp span { flex: 1; }
.pdf-progress { height: 3px; background: var(--line-2); }
.pdf-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.pdf-scroll { flex: 1; overflow: auto; background: var(--desk); padding: 12px 0; outline: none; position: relative; }
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 100%; }
.pdf-page-box { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); flex: none; }
.pdf-page-box canvas { position: absolute; inset: 0; display: block; }
.pdf-pno { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #b8bcc5; font-size: 13px; }
.pdf-scroll.night .pdf-page-box { background: #222; }
.pdf-scroll.night canvas { filter: invert(.9) hue-rotate(180deg); }
.pdf-loading { margin: auto; color: var(--ink-3); text-align: center; padding: 40px 20px; }
.pdf-loading.err { color: var(--accent); }
.pdf-empty { margin: auto 16px 8px; max-width: 360px; width: calc(100% - 32px); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-2); }
.pdf-empty:hover { border-color: var(--accent); color: var(--accent); }
.pdf-empty span { font-size: 13px; color: var(--ink-3); }
.pdf-empty-lib { margin: 0 auto auto; }
.pdf-drop { position: absolute; inset: 6px; border: 2px dashed var(--accent); border-radius: 12px; background: color-mix(in srgb, var(--accent-soft) 88%, transparent); color: var(--accent); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; z-index: 10; pointer-events: none; }
.pdf-drop .ic { width: 34px; height: 34px; }
.pdf-drop span { font-size: 13px; }
.pdf-panel.dragging .pdf-drop { display: flex; }
.textLayer { position: absolute; inset: 0; overflow: hidden; line-height: 1; text-align: initial; opacity: 1; z-index: 2; forced-color-adjust: none; }
.textLayer span, .textLayer br { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0 0; }
.textLayer ::selection { background: rgba(47, 111, 179, .32); }
.textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: -1; cursor: default; user-select: none; }

/* ---------- Gesetzesbereich ---------- */
.law-panel { display: flex; flex-direction: column; min-height: 0; background: var(--paper); }
.law-head { gap: 8px; }
.law-form { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; }
.law-form input { flex: 1; height: 30px; min-width: 0; }
.law-body { flex: 1; min-height: 0; position: relative; }
.law-text { position: absolute; inset: 0; overflow: auto; padding: 14px 18px 20px; }
.law-home, .law-msg, .law-loading { color: var(--ink-2); font-size: 13.5px; }
.law-msg .ic { color: var(--accent); width: 16px; height: 16px; }
.law-links { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.law-hist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.law-norm header h3 { font: 600 19px var(--serif); margin: 0; display: inline-block; padding: 1px 8px; border: 1.5px solid var(--nc, var(--accent)); border-radius: 5px; background: color-mix(in srgb, var(--nc, var(--accent)) 11%, transparent); }
.law-title { margin: 2px 0 12px; font-weight: 600; }
.law-content { font: 15px/1.62 var(--serif); }
.law-content .abs { margin: 0 0 .6em; padding: 2px 8px; border-radius: 5px; border-left: 3px solid transparent; }
.law-content .abs.hit { background: color-mix(in srgb, #fff2a0 70%, var(--paper)); border-left-color: var(--co-merke); }
[data-theme=dark] .law-content .abs.hit { background: #3a3317; }
.law-content dl { margin: .3em 0 .5em; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; }
.law-content dt { font-weight: 600; } .law-content dd { margin: 0; }
.law-foot { display: flex; align-items: center; gap: 4px; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }

/* ---------- Dialoge, Menüs, Toasts ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(15, 17, 22, .42); display: grid; place-items: center; z-index: 180; padding: 20px; animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--paper); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); width: min(480px, 100%); max-height: 88vh; display: flex; flex-direction: column; }
.modal.wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 6px 22px; }
.modal-head h2 { margin: 0; font: 600 19px var(--serif); }
.modal-body { padding: 8px 22px 16px; overflow: auto; }
.modal-body > p:first-child { margin-top: 4px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.menu { position: fixed; z-index: 200; min-width: 200px; max-width: 340px; background: var(--raise); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 5px; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 6px 9px; border-radius: 6px; text-align: left; }
.menu-item:hover:not(:disabled) { background: var(--hover); }
.menu-item.active { color: var(--accent); font-weight: 600; }
.menu-item.danger { color: var(--co-problem); }
.menu-item .ic { width: 16px; height: 16px; }
.menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.menu-hint { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.menu-sep { height: 1px; background: var(--line-2); margin: 4px 2px; }
.menu-head { padding: 7px 9px 6px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 250; max-width: 400px; }
.toast { background: #23262e; color: #f2f3f5; padding: 10px 14px; border-radius: 9px; box-shadow: var(--shadow); font-size: 13.5px; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
.toast.in { opacity: 1; transform: none; }
.toast.err { background: var(--accent); color: #fff; }

/* Einstellungen */
.law-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin: 12px 0; }
.lc-row { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 8px; }
.lc-row:hover { background: var(--hover); }
.lc-row input[type=color] { width: 30px; height: 30px; }
.lc-sample { flex: 1; font: 15px var(--serif); padding: 0 6px; border: 1.5px solid var(--nc); border-radius: 4px; background: color-mix(in srgb, var(--nc) 11%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-add { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.lc-add select, .lc-add input { width: 200px; }
.dict-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-x { border: 0; background: transparent; color: var(--ink-3); padding: 0 0 0 4px; font-size: 14px; line-height: 1; }
.chip-x:hover { color: var(--accent); }
.big-check { font-size: 14px; color: var(--ink); margin: 6px 0 12px; }
.settings .seg { margin-bottom: 4px; }
.marker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.marker-set { display: flex; align-items: center; gap: 8px; }
.marker-set input { flex: 1; }
.feature-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; color: var(--ink-3); }
.feature-list li { display: flex; gap: 8px; align-items: center; }
.feature-list li.on { color: var(--ink); }
.feature-list li.on .ic { color: var(--live); }

/* ---------- Login ---------- */
.login-body { overflow: auto; display: grid; place-items: center; min-height: 100vh; }
.login { width: min(380px, calc(100% - 40px)); padding: 36px 32px; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); }
.login-mark { width: 46px; height: 46px; border-radius: 11px; background: var(--accent); color: #fff; display: grid; place-items: center; font: 700 30px var(--serif); margin-bottom: 18px; }
.login h1 { font: 600 28px var(--serif); margin: 0; }
.login-sub { color: var(--ink-3); margin: 2px 0 22px; }
.login form { display: flex; flex-direction: column; gap: 14px; }
.login label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); }
.login input { height: 40px; }
.login .btn { height: 42px; justify-content: center; margin-top: 4px; }
.login-error { color: var(--accent); margin: 0; font-weight: 500; }
.login-alert { background: var(--warn-soft); color: var(--warn); border-radius: 9px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.login-alert code { word-break: break-all; }

/* ---------- Schmale Fenster ---------- */
@media (max-width: 1100px) {
  .start-grid { grid-template-columns: 1fr 1fr; }
  .sheet { padding: 32px 36px 48px; }
}
@media (max-width: 860px) {
  :root { --sb-w: 240px; }
  .note-layout { grid-template-columns: 1fr 0 0; }
  .note-layout .right-pane, .note-layout .gutter-v { display: none; }
  .start-grid { grid-template-columns: 1fr; }
  .ed-scroll { padding: 12px; }
  .sheet { padding: 24px 20px 40px; }
  .ft-row { grid-template-columns: minmax(0, 1fr) 80px 36px; }
  .ft-links, .ft-date { display: none; }
}

/* ---------- Druck ---------- */
@media print {
  body { overflow: visible; background: #fff; }
  #sidebar, .sb-show, .toolbar, .right-pane, .gutter, .note-bar, .ed-status, .live-caption, .float-tools, .meta-course select, [data-a=notemenu], #toasts { display: none !important; }
  #app, .note-layout { display: block; height: auto; }
  #main, .view, .ed-scroll, .ed-pane { height: auto; overflow: visible; padding: 0; display: block; }
  .sheet { box-shadow: none; max-width: none; padding: 0; border: 0; }
  .sheet-content { font-size: 11.5pt; color: #000; }
  .note-title { font-size: 20pt; }
  .norm-layer, .block-handle { display: none !important; }
  ::highlight(spell-err), ::highlight(spell-style) { text-decoration: none; }
  .callout { break-inside: avoid; }
}

/* =====================================================================
   Smartphone-Oberfläche (html.is-mobile, per JS erkannt)
   ===================================================================== */
#tabbar, .rec-indicator-m { display: none; }
.fab { display: none; }

/* Fächer als Notizbücher (auch am Desktop unter #/courses) */
.nb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.nb { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.nb-cover { position: relative; aspect-ratio: 3 / 4; border-radius: 6px 12px 12px 6px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 14px 12px 12px 22px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 88%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 78%, #000) 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15), 0 6px 16px color-mix(in srgb, var(--c) 30%, transparent); transition: transform .15s; }
.nb:active .nb-cover { transform: scale(.97); }
@media (hover: hover) { .nb:hover .nb-cover { transform: translateY(-2px); } }
.nb-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 11px; background: rgba(0, 0, 0, .18); box-shadow: inset -1px 0 0 rgba(255, 255, 255, .25); }
.nb-short { font: 650 clamp(22px, 7vw, 30px)/1.05 var(--serif); letter-spacing: -.01em; overflow-wrap: anywhere; text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.nb-count { font: 600 26px/1 var(--sans); display: flex; flex-direction: column; }
.nb-count small { font-size: 11px; font-weight: 500; opacity: .85; margin-top: 3px; }
.nb-name { font-weight: 600; font-size: 13.5px; line-height: 1.25; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nb-sub { font-size: 12px; color: var(--ink-3); }
.nb-sub b { color: var(--live); }

/* Fachseite */
.m-course { max-width: 760px; margin: 0 auto; padding: 0 0 120px; }
.mc-head { display: flex; align-items: flex-start; gap: 6px; padding: 18px 16px 16px 8px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, var(--desk)), var(--desk)); border-top: 5px solid var(--c); }
.mc-back { margin-top: 2px; }
.mc-title h1 { font: 650 24px/1.2 var(--serif); margin: 0; letter-spacing: -.01em; }
.mc-title p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.mc-slots { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.mc-next { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: calc(100% - 32px); margin: 4px 16px 6px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; background: var(--paper); text-align: left; }
.mc-next span { display: flex; flex-direction: column; font-size: 14px; }
.mc-next small { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.mc-next b { color: var(--accent); font-size: 14px; white-space: nowrap; }
.mc-sec { padding: 14px 16px 0; }
.mc-empty { padding: 8px 2px; }
.cn-list { background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.cn-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; text-decoration: none; border-top: 1px solid var(--line-2); min-height: 58px; -webkit-tap-highlight-color: transparent; }
.cn-row:first-child { border-top: 0; }
.cn-row:active { background: var(--hover); }
.cn-date { width: 44px; height: 44px; flex: none; border-radius: 10px; background: color-mix(in srgb, var(--c) 13%, var(--paper)); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.cn-date b { font: 650 18px var(--sans); }
.cn-date small { font-size: 10.5px; color: var(--ink-2); margin-top: 2px; }
.cn-date .ic { color: var(--c); }
.cn-pdf { background: var(--accent-soft); } .cn-pdf .ic { color: var(--accent); }
.cn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cn-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-sub { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.cn-sub .ic { width: 13px; height: 13px; }
.cn-chev { color: var(--ink-3); width: 16px; height: 16px; }

/* Stundenplan: Tagesansicht */
.m-plan { padding: 0 14px 120px; max-width: 760px; margin: 0 auto; }
.m-plan-top { position: sticky; top: 0; z-index: 5; margin: 0 -14px 4px; padding: 10px 14px 8px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-2); }
.m-plan-head { display: flex; align-items: center; gap: 2px; }
.m-plan-head h1 { flex: 1; margin: 0; font: 650 21px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-plan-head .kw { font: 500 12px var(--sans); color: var(--ink-3); margin-left: 4px; }
.m-today { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; margin-right: 4px; }
.m-week { display: grid; grid-template-columns: 26px minmax(0, 1fr) 26px; align-items: center; margin-top: 8px; }
.m-wk { border: 0; background: transparent; color: var(--ink-3); height: 44px; display: grid; place-items: center; padding: 0; }
.m-wk .ic { width: 18px; height: 18px; }
.m-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.m-days button { border: 0; background: transparent; border-radius: 12px; padding: 4px 0 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--ink-3); -webkit-tap-highlight-color: transparent; }
.m-days span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.m-days b { font-size: 16px; font-weight: 600; color: var(--ink); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; transition: background .15s; }
.m-days i { font-style: normal; font-size: 9px; line-height: 1; height: 9px; color: var(--accent); letter-spacing: 1px; }
.m-days button.today b { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.m-days button.on b { background: var(--accent); color: #fff; box-shadow: none; }
.m-days button.free b { color: var(--ink-3); }
.m-dayhead { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 10px; }
.m-dayhead h2 { margin: 0; font: 600 17px var(--serif); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-daysum { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-3); }
.m-daysum:empty { display: none; }
.m-agenda { position: relative; display: flex; flex-direction: column; gap: 8px; }
.m-agenda::before { content: ''; position: absolute; left: 51px; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: var(--line-2); }
.m-agenda:has(.m-empty)::before { display: none; }
.m-ev { position: relative; display: flex; align-items: stretch; gap: 14px; width: 100%; text-align: left; border: 0; background: transparent; padding: 0; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.m-ev::before { content: ''; position: absolute; left: 47px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--c); z-index: 1; }
.m-ev.live::before { background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.m-ev-time { display: flex; flex-direction: column; width: 40px; flex: none; padding-top: 9px; text-align: right; font-variant-numeric: tabular-nums; }
.m-ev-time b { font-size: 14px; } .m-ev-time small { color: var(--ink-3); font-size: 11.5px; }
.m-ev-card { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; margin-left: 12px; padding: 11px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 11%, var(--paper)); border: 1px solid color-mix(in srgb, var(--c) 18%, transparent); }
.m-ev:active .m-ev-card { filter: brightness(.96); }
.m-ev.past { opacity: .5; }
.m-ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-ev-name { font-weight: 600; font-size: 15px; line-height: 1.25; }
.m-ev-meta { font-size: 13px; color: var(--ink-2); }
.m-ev-status { font-size: 12px; font-weight: 600; }
.m-ev.is-ausfall .m-ev-card, .m-ev.is-entschuldigt .m-ev-card, .m-ev.is-frei .m-ev-card { background: repeating-linear-gradient(135deg, var(--paper) 0 6px, color-mix(in srgb, var(--c) 8%, var(--paper)) 6px 12px); border-style: dashed; }
.m-ev.is-ausfall .m-ev-name, .m-ev.is-entschuldigt .m-ev-name { text-decoration: line-through; color: var(--ink-2); }
.m-ev.is-ausfall .m-ev-status { color: var(--accent); } .m-ev.is-entschuldigt .m-ev-status { color: var(--warn); }
.m-ev-note .ic { width: 16px; height: 16px; color: var(--ink-3); }
.m-gap { display: flex; align-items: center; gap: 6px; margin-left: 66px; font-size: 12px; color: var(--ink-3); padding: 0 2px; }
.m-gap .ic { width: 13px; height: 13px; }
.m-now { position: relative; height: 2px; margin: 2px 0 2px 46px; background: var(--accent); border-radius: 1px; z-index: 2; }
.m-now::before { content: ''; position: absolute; left: -1px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.m-now span { position: absolute; right: 0; top: -9px; font-size: 10.5px; font-weight: 700; color: var(--accent); background: var(--bg); padding: 0 4px; }
.m-empty { text-align: center; padding: 34px 20px; border: 1.5px dashed var(--line); border-radius: 16px; color: var(--ink-2); }
.m-empty .ic { color: var(--ink-3); }
.m-empty-h { font: 600 18px var(--serif); color: var(--ink); margin: 8px 0 4px; }
.m-empty .btn { margin-top: 8px; }

/* ---------- Gerüst ---------- */
html.is-mobile, html.is-mobile body { height: 100%; }
html.is-mobile body { overflow: hidden; -webkit-tap-highlight-color: transparent; }
html.is-mobile #app { display: block; height: 100dvh; }
html.is-mobile #sidebar, html.is-mobile .sb-show { display: none !important; }
html.is-mobile #main { height: calc(100dvh - 58px - env(safe-area-inset-bottom)); padding-top: env(safe-area-inset-top); }
html.is-mobile.kb-open #main { height: 100dvh; }
html.is-mobile #tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); }
html.is-mobile.kb-open #tabbar { display: none; }
#tabbar a, #tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: var(--ink-3); text-decoration: none; font-size: 10.5px; font-weight: 500; }
#tabbar .ic { width: 23px; height: 23px; }
#tabbar .on { color: var(--accent); }
html.is-mobile .rec-indicator-m:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; margin: 0; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 41; box-shadow: var(--shadow); }
html.is-mobile.kb-open .rec-indicator-m, html.is-mobile body[data-route=note] .rec-indicator-m { display: none !important; }
html.is-mobile .fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 39; width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--accent); color: #fff; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 45%, transparent); }
html.is-mobile .fab .ic { width: 26px; height: 26px; }
html.is-mobile input, html.is-mobile select, html.is-mobile textarea { font-size: 16px; } /* verhindert Zoom auf iOS */
html.is-mobile .btn { min-height: 38px; }
html.is-mobile .icon-btn { width: 40px; height: 40px; }
html.is-mobile .icon-btn.sm { width: 36px; height: 36px; }
html.is-mobile #toasts { left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); max-width: none; }

/* Seiten */
html.is-mobile .page, html.is-mobile .files-page { padding: 18px 16px 110px; }
html.is-mobile .page-head h1 { font-size: 24px; }
html.is-mobile .page-head { flex-direction: column; align-items: stretch; gap: 10px; }
html.is-mobile .page-tools { margin-left: 0; }
html.is-mobile #m-search { width: 100%; height: 44px; border-radius: 12px; }
html.is-mobile .start { padding: 20px 16px 110px; }
html.is-mobile .hero { padding: 0 0 22px 16px; margin-bottom: 20px; }
html.is-mobile .hero-title { font-size: 34px; }
html.is-mobile .hero-when { font-size: 16px; }
html.is-mobile .hero-actions .btn { flex: 1; justify-content: center; }
html.is-mobile .start-grid { grid-template-columns: 1fr; gap: 24px; }
html.is-mobile .lec-row, html.is-mobile .recent-row { min-height: 52px; }
html.is-mobile .ft-row { grid-template-columns: minmax(0, 1fr) 64px 36px; }
html.is-mobile .ft-links, html.is-mobile .ft-date, html.is-mobile .ft-head { display: none; }
html.is-mobile .dropzone-line { display: none; }

/* Notiz: nur Text + Editor */
html.is-mobile .note-layout, html.is-mobile .note-layout.right-hidden { display: flex; flex-direction: column; height: 100%; }
html.is-mobile .ed-pane { flex: 1; min-height: 0; }
html.is-mobile .m-appbar { display: flex; align-items: center; gap: 4px; height: 50px; padding: 0 4px; background: var(--paper); border-bottom: 1px solid var(--line-2); flex: none; }
html.is-mobile .m-appbar-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
html.is-mobile .toolbar { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 4px 6px; gap: 0; flex: none; }
html.is-mobile .toolbar::-webkit-scrollbar { display: none; }
html.is-mobile .tb-group { flex: none; }
html.is-mobile .tb { height: 38px; min-width: 38px; }
html.is-mobile .tb-spacer, html.is-mobile [data-cmd=focus], html.is-mobile [data-cmd=right] { display: none; }
html.is-mobile .tb-block { width: 118px; height: 36px; }
html.is-mobile .ed-scroll { padding: 0 0 40px; background: var(--paper); }
html.is-mobile .sheet { max-width: none; border-radius: 0; box-shadow: none; padding: 16px 16px 60px; min-height: 100%; border-top: 3px solid var(--c); }
html.is-mobile .note-title { font-size: 24px; }
html.is-mobile .note-meta { gap: 6px; }
html.is-mobile .meta-course select { max-width: 52vw; }
html.is-mobile [data-a=notemenu] { display: none; }
html.is-mobile .sheet-content { font-size: 17px; line-height: 1.6; min-height: 40vh; }
html.is-mobile .sheet-content table { display: block; overflow-x: auto; }
html.is-mobile .tr-row { grid-template-columns: 40px 1fr auto; }
html.is-mobile .tr-act { opacity: 1; }
html.is-mobile .tr-filter { width: 100%; }
html.is-mobile .live-caption { bottom: 40px; width: calc(100% - 24px); }
html.is-mobile .ed-status { padding: 6px 14px; }
html.is-mobile .block-handle.mobile { flex-direction: row; }
html.is-mobile .block-handle button { width: 36px; height: 34px; }

/* Dialoge als Blatt von unten, Menüs mit großen Tippflächen */
html.is-mobile .modal-wrap { align-items: end; padding: 0; place-items: end stretch; }
html.is-mobile .modal, html.is-mobile .modal.wide { width: 100%; max-height: 90dvh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: sheet-up .2s ease-out; }
@keyframes sheet-up { from { transform: translateY(30px); opacity: .6; } }
html.is-mobile .modal-head { padding: 14px 10px 4px 18px; }
html.is-mobile .modal-head::before { content: ''; position: absolute; left: 50%; margin-left: -18px; margin-top: -8px; width: 36px; height: 4px; border-radius: 2px; background: var(--line); }
html.is-mobile .modal-body { padding: 6px 18px 14px; }
html.is-mobile .modal-foot .btn { flex: 1; justify-content: center; }
html.is-mobile .menu { min-width: 230px; max-width: calc(100vw - 16px); border-radius: 14px; }
html.is-mobile .menu-item { padding: 11px 12px; font-size: 15px; }
html.is-mobile .cc-slots-head { display: none; }
html.is-mobile .slot-row { grid-template-columns: 1fr 1fr 1fr; }
html.is-mobile .slot-row [data-k=room] { grid-column: span 2; }
html.is-mobile .cc-row { flex-wrap: wrap; }
html.is-mobile .marker-grid, html.is-mobile .law-colors { grid-template-columns: 1fr; }
html.is-mobile .m-norm .law-content { font-size: 16px; }

/* =====================================================================
   Fallskizzen-Editor
   ===================================================================== */
html.sk-open body { overflow: hidden; }
.sk-wrap { position: fixed; inset: 0; z-index: 150; background: var(--desk); display: flex; flex-direction: column; }
.sk-head { display: flex; align-items: center; gap: 6px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--paper); border-bottom: 1px solid var(--line); }
.sk-title { font: 600 17px var(--serif); margin-right: 8px; }
.sk-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.sk-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr) 300px; }
.sk-tools { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; background: var(--paper); border-right: 1px solid var(--line); }
.sk-tools button { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); display: grid; place-items: center; }
.sk-tools button:hover { background: var(--hover); color: var(--ink); }
.sk-tools button.on { background: var(--accent); color: #fff; }
.sk-tools .ic { width: 21px; height: 21px; }
.sk-stage { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; overflow: hidden; }
.sk-svg { width: 100%; height: 100%; max-height: 100%; background: #fff; border-radius: 6px; box-shadow: var(--shadow); touch-action: none; user-select: none; -webkit-user-select: none; }
.sk-svg[data-tool=person], .sk-svg[data-tool=text], .sk-svg[data-tool=symbol] { cursor: copy; }
.sk-svg[data-tool=arrow], .sk-svg[data-tool=shape], .sk-svg[data-tool=pen] { cursor: crosshair; }
.sk-svg[data-tool=select] .sk-items [data-id] { cursor: move; }
.sk-h { fill: #fff; stroke: #1f7cf0; stroke-width: 2.5; cursor: grab; }
.sk-selbox { fill: none; stroke: #1f7cf0; stroke-width: 1.5; stroke-dasharray: 6 5; pointer-events: none; }
.sk-edit { position: absolute; z-index: 3; resize: none; border: 2px solid var(--accent); border-radius: 6px; background: rgba(255, 255, 255, .96); font-family: Arial, Helvetica, sans-serif; line-height: 1.22; padding: 2px 6px; outline: none; min-width: 120px; color: #111; }
.sk-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 99px; background: rgba(20, 22, 28, .78); color: #fff; font-size: 12.5px; pointer-events: none; max-width: calc(100% - 40px); text-align: center; }
.sk-panel { background: var(--paper); border-left: 1px solid var(--line); overflow-y: auto; padding: 14px 16px 30px; }
.sk-panel h3 { font: 600 15px var(--sans); margin: 0 0 10px; }
.sk-panel h4 { font-size: 12px; color: var(--ink-3); margin: 14px 0 6px; font-weight: 600; }
.sk-panel label { display: block; font-size: 12px; color: var(--ink-3); margin: 12px 0 4px; font-weight: 500; }
.sk-panel label.check { display: flex; color: var(--ink-2); font-size: 13px; }
.sk-panel input:not([type=range]):not([type=checkbox]):not([type=color]), .sk-panel textarea, .sk-panel select { width: 100%; }
.sk-panel textarea { height: auto; padding: 6px 10px; line-height: 1.4; resize: vertical; }
.sk-panel input[type=range] { width: 100%; accent-color: var(--accent); }
.sk-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.sk-actions { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.sk-colors { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sk-colors button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--paper); background: var(--c); box-shadow: 0 0 0 1px var(--line); padding: 0; }
.sk-colors button.on { box-shadow: 0 0 0 2px var(--accent); }
.sk-colors input[type=color] { width: 30px; height: 30px; }
.sk-seg { display: flex; flex-wrap: wrap; }
.sk-symbols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sk-symbols button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; text-align: left; }
.sk-symbols button.on { border-color: var(--accent); background: var(--accent-soft); }
.sk-symbols svg { width: 26px; height: 26px; flex: none; }
.sk-symbols.compact { grid-template-columns: repeat(5, 1fr); }
.sk-symbols.compact button { justify-content: center; padding: 6px 0; }
.sk-help { padding-left: 18px; margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.sk-help li { margin-bottom: 8px; }
.sk-isearch { width: 100%; margin-bottom: 4px; }
.sk-igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 4px; }
.sk-igrid button { aspect-ratio: 1; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 7px; cursor: grab; }
.sk-igrid button:hover { border-color: var(--line); background: var(--hover); }
.sk-igrid img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
[data-theme=dark] .sk-igrid img { filter: invert(.88); }
@media (prefers-color-scheme: dark) { [data-theme=auto] .sk-igrid img { filter: invert(.88); } }
html.is-mobile .sk-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto auto; }
html.is-mobile .sk-tools { flex-direction: row; order: 2; overflow-x: auto; border-right: 0; border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
html.is-mobile .sk-panel { order: 3; max-height: 34vh; border-left: 0; border-top: 1px solid var(--line); }
html.is-mobile .sk-stage { padding: 8px; }
html.is-mobile .sk-head { flex-wrap: wrap; }
html.is-mobile .sk-hint { display: none; }

/* Skizzen, Folien-Marken und PDF-Zitate in der Mitschrift */
.sheet-content img.sketch { cursor: pointer; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; }
.sheet-content img.sketch:hover { border-color: var(--accent); }
.sheet-content > .slide-start { position: relative; }
.sheet-content > .slide-start::after { content: 'S. ' attr(data-slide-page); position: absolute; left: -58px; top: .35em; font: 600 10.5px/1.6 var(--sans); color: var(--co-def); background: color-mix(in srgb, var(--co-def) 12%, var(--paper)); padding: 0 6px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
html.is-mobile .sheet-content > .slide-start::after { display: none; }
.sheet-content blockquote.pdf-quote { border-left-color: var(--co-def); background: color-mix(in srgb, var(--co-def) 5%, var(--paper)); padding: .5em 1em; border-radius: 0 7px 7px 0; }
.sheet-content blockquote.pdf-quote .src { font: 12px var(--sans); color: var(--ink-3); margin: .2em 0 0; cursor: pointer; }
.sheet-content blockquote.pdf-quote .src:hover { color: var(--co-def); text-decoration: underline; }
.norm-flash { position: absolute; z-index: 6; pointer-events: none; border: 2.5px solid var(--accent); border-radius: 7px; animation: flash 2.6s ease-out forwards; }
@keyframes flash { 0%, 60% { opacity: 1; box-shadow: 0 0 0 6px var(--accent-soft); } 100% { opacity: 0; } }
.tr-row.tr-flash { background: var(--accent-soft); transition: background 1s; }

/* PDF-Markierungen */
.pdf-marks { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.pdf-mark { position: absolute; border-radius: 2px; mix-blend-mode: multiply; }
.pdf-mark.has-comment::after { content: ''; position: absolute; right: -5px; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--co-merke); border: 1.5px solid #fff; }
.pdf-scroll.night .pdf-mark { mix-blend-mode: normal; opacity: .55; }
.pdf-seltools { position: absolute; z-index: 12; display: flex; align-items: center; gap: 3px; padding: 4px; background: var(--raise); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.pdf-seltools button { border: 0; background: transparent; border-radius: 6px; height: 30px; min-width: 30px; padding: 0 6px; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.pdf-seltools button:hover { background: var(--hover); color: var(--ink); }
.pdf-seltools .ic { width: 16px; height: 16px; }
button.sw { width: 22px !important; min-width: 22px !important; height: 22px !important; border-radius: 50% !important; background: var(--c) !important; border: 1.5px solid rgba(0, 0, 0, .15) !important; padding: 0 !important; }
button.sw.on { box-shadow: 0 0 0 2px var(--accent); }
.mark-colors { display: flex; gap: 8px; padding: 6px 10px 8px; }
.mark-text { font-family: var(--serif); font-size: 13.5px; color: var(--ink); }
.mark-cmt { font-size: 12.5px; color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; margin-top: 4px; }
.mark-cmt .ic { width: 14px; height: 14px; }
.mark-comment { width: 100%; height: auto; padding: 8px 10px; line-height: 1.45; resize: vertical; }
.mk-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.mk-row .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.mk-row em { flex-basis: 100%; color: var(--ink-3); font-size: 12px; }

/* Kürzel in den Einstellungen */
.sn-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; margin-top: 10px; }
.sn-row { display: grid; grid-template-columns: 110px 16px 1fr 32px; gap: 6px; align-items: center; }
.sn-row span { color: var(--ink-3); text-align: center; }
.sn-k { font-family: var(--mono); }

/* =====================================================================
   Norm-Akte
   ===================================================================== */
.view-normen { overflow: hidden; }
.na { height: 100%; display: flex; flex-direction: column; padding: 22px 28px 0; max-width: 1400px; margin: 0 auto; }
.na-head h1 { font: 600 26px var(--serif); margin: 0; }
.na-head p { margin: 4px 0 14px; }
.na-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.na-search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink-3); }
.na-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.na-search input { border: 0; flex: 1; height: 34px; padding: 0; background: transparent; box-shadow: none !important; }
#na-course { height: 38px; }
.na-laws { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.na-lawchip { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--nc); background: color-mix(in srgb, var(--nc) 9%, var(--paper)); color: var(--ink); border-radius: 6px; padding: 2px 9px; font-weight: 600; font-size: 13px; }
.na-lawchip small { font-weight: 500; color: var(--ink-3); }
.na-lawchip.on { background: var(--nc); color: #fff; }
.na-lawchip.on small { color: rgba(255, 255, 255, .85); }
.na-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 20px; }
.na-list { overflow-y: auto; padding: 2px 4px 40px 0; }
.na-none { padding: 20px 4px; }
.na-group { position: sticky; top: 0; z-index: 1; background: var(--desk); margin: 10px 0 4px; padding: 4px 0; font-size: 12px; font-weight: 700; color: var(--nc); border-bottom: 1.5px solid var(--nc); }
.na-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; color: var(--ink); }
.na-row:hover { background: var(--hover); }
.na-row.on { background: var(--paper); box-shadow: inset 3px 0 0 var(--nc), var(--shadow); }
.na-norm { min-width: 68px; font: 600 15px var(--serif); padding: 1px 7px; border: 1.5px solid var(--nc); border-radius: 5px; background: color-mix(in srgb, var(--nc) 10%, transparent); text-align: center; white-space: nowrap; }
.na-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.na-law { font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.na-t { font-weight: 400; color: var(--ink-3); }
.na-bar { height: 3px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.na-bar i { display: block; height: 100%; background: var(--nc); border-radius: 2px; }
.na-meta { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.na-meta .ic { width: 14px; height: 14px; color: var(--ink-3); }
.na-meta .na-starred { color: var(--co-merke); fill: var(--co-merke); }
.na-detail { overflow-y: auto; padding-bottom: 50px; }
.na-card { background: var(--paper); border-radius: 12px; box-shadow: var(--shadow); padding: 22px 26px 26px; border-top: 4px solid var(--nc); }
.na-dhead { display: flex; align-items: flex-start; gap: 8px; }
.na-back { display: none; }
.na-dtitle h2 { margin: 0; }
.na-badge { font: 650 24px var(--serif); padding: 2px 12px; border: 2px solid var(--nc); border-radius: 7px; background: color-mix(in srgb, var(--nc) 10%, transparent); display: inline-block; }
.na-lawtitle { margin: 8px 0 0; font-weight: 600; color: var(--ink-2); }
.na-dhead .icon-btn.on { color: var(--co-merke); background: color-mix(in srgb, var(--co-merke) 15%, transparent); }
.na-dhead .icon-btn.on .ic { fill: var(--co-merke); }
.na-stats { margin: 14px 0 8px; color: var(--ink-2); }
.na-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.na-abs .chip { cursor: pointer; }
.na-abs .chip.on { border-color: var(--nc); background: color-mix(in srgb, var(--nc) 14%, var(--paper)); color: var(--ink); }
.na-sec { margin-top: 22px; }
.na-sec h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.na-text { border: 1px solid var(--line-2); border-radius: 9px; padding: 0 14px; }
.na-text summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.na-textbody { padding-bottom: 12px; }
.na-comment { width: 100%; height: auto; min-height: 110px; padding: 10px 12px; font: 15px/1.55 var(--serif); resize: vertical; background: color-mix(in srgb, var(--co-merke) 5%, var(--paper)); }
.na-occ { display: flex; flex-direction: column; gap: 12px; }
.na-note { border-left: 3px solid var(--c); padding-left: 12px; }
.na-nhead { display: flex; align-items: baseline; gap: 8px; text-decoration: none; margin-bottom: 4px; flex-wrap: wrap; }
.na-nhead:hover b { text-decoration: underline; }
.na-nhead .muted { font-size: 12.5px; }
.na-snip { display: block; text-decoration: none; padding: 7px 10px; border-radius: 8px; font: 14.5px/1.55 var(--serif); color: var(--ink); }
.na-snip:hover { background: var(--hover); }
.na-snip mark { background: none; padding: 0 3px; border-radius: 4px; }
.na-snip mark.na-hl { border: 1.5px solid var(--nc); background: color-mix(in srgb, var(--nc) 12%, transparent); font-weight: 600; }
.na-snip mark.na-other { color: var(--ink-2); }
.na-src { display: inline-flex; align-items: center; gap: 3px; font: 600 11.5px var(--sans); color: var(--live); margin-right: 6px; }
.na-src .ic { width: 13px; height: 13px; }
.na-empty { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.na-empty .ic { color: var(--ink-3); }
html.is-mobile .na { padding: 16px 14px 0; }
html.is-mobile .na-main { grid-template-columns: 1fr; }
html.is-mobile .na .na-detail { display: none; }
html.is-mobile .na.show-detail .na-detail { display: block; position: fixed; inset: 0 0 calc(58px + env(safe-area-inset-bottom)); z-index: 30; background: var(--desk); padding: env(safe-area-inset-top) 0 40px; }
html.is-mobile .na.show-detail .na-card { border-radius: 0; box-shadow: none; padding: 14px 16px 30px; min-height: 100%; }
html.is-mobile .na-back { display: grid; margin-left: -8px; }
html.is-mobile .na-list { padding-bottom: 110px; }
html.is-mobile .na-head p { display: none; }

/* =====================================================================
   Werkzeuge, Abdeck-Modus, Fristenrechner, Skript-Export, Kalender-Abo, Offline
   ===================================================================== */
.tools-fab { position: absolute; right: 22px; bottom: 44px; z-index: 8; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent), 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s, box-shadow .15s; }
.tools-fab:hover { transform: translateY(-2px) scale(1.04); }
.tools-fab .ic { width: 26px; height: 26px; }
html.is-mobile .tools-fab { right: 14px; bottom: 46px; width: 50px; height: 50px; }
html.is-mobile.kb-open .tools-fab { bottom: 12px; }
.menu-tools { width: 340px; max-width: calc(100vw - 16px); padding: 6px; }
.tool-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.tool-card:hover:not(:disabled) { background: var(--hover); }
.tool-card:disabled { opacity: .5; }
.tool-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.tool-card.on .tool-ic { background: var(--accent); color: #fff; }
.tool-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tool-txt small { color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.tool-state { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.tool-card.on .tool-state { color: var(--accent); }

.cover-bar { position: sticky; top: -22px; z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 860px; margin: -10px auto 14px; padding: 8px 12px; background: var(--paper); border: 1.5px solid var(--accent); border-radius: 12px; box-shadow: var(--shadow); }
.cv-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--accent); }
.cv-prog { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.cv-bar { width: 90px; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.cv-bar i { display: block; height: 100%; width: 0; background: var(--live); transition: width .25s; }
.cover-mode .sheet-content .cv-gap { cursor: pointer; border-radius: 4px; color: transparent !important; background: repeating-linear-gradient(135deg, #dfe3ea 0 6px, #e9ecf1 6px 12px) !important; box-shadow: inset 0 -2px 0 #c3c9d4; transition: color .15s, background .15s; }
.cover-mode .sheet-content .cv-gap * { color: transparent !important; background: transparent !important; }
.cover-mode .sheet-content .cv-gap.cv-open { color: inherit !important; background: color-mix(in srgb, var(--live) 14%, transparent) !important; box-shadow: inset 0 -2px 0 var(--live); }
.cover-mode .sheet-content .cv-gap.cv-open * { color: inherit !important; }
.cover-mode .norm-layer { opacity: .35; }
.cover-mode .block-handle { display: none !important; }

.modal.modal-xl { width: min(1180px, 100%); height: min(860px, 92vh); }
.modal.modal-xl .modal-body { flex: 1; padding: 0; overflow: hidden; }
.fr { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: 100%; min-height: 0; }
.fr-side { border-right: 1px solid var(--line-2); display: flex; flex-direction: column; min-height: 0; padding: 12px 12px 0; }
.fr-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink-3); }
.fr-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fr-search input { border: 0; flex: 1; height: 36px; padding: 0; background: transparent; box-shadow: none !important; }
.fr-areas { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 6px; }
.fr-areas button { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 2px 10px; font-size: 12px; color: var(--ink-2); }
.fr-areas button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.fr-list { flex: 1; overflow-y: auto; padding-bottom: 16px; }
.fr-list h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: 12px 4px 4px; }
.fr-item { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.fr-item:hover { background: var(--hover); }
.fr-item.on { background: var(--accent-soft); }
.fr-item small { color: var(--ink-3); font-size: 11.5px; }
.fr-item.on small { color: var(--accent); }
.fr-main { overflow-y: auto; padding: 18px 24px 30px; position: relative; }
.fr-empty { text-align: center; color: var(--ink-3); padding: 80px 20px; }
.fr-head { display: flex; align-items: flex-start; gap: 6px; }
.fr-head h3 { margin: 0; font: 600 20px var(--serif); }
.fr-norm { margin: 2px 0 0; color: var(--accent); font-weight: 600; font-size: 13px; }
.fr-back { display: none; }
.fr-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px 14px; margin: 16px 0 6px; padding: 14px; background: var(--hover); border-radius: 12px; }
.fr-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.fr-f input, .fr-f select { width: 100%; }
.fr-check { grid-column: 1 / -1; font-size: 13px; }
.fr-hint { padding: 10px 2px; }
.fr-result { margin: 14px 0 8px; padding: 16px 18px; border-radius: 14px; background: color-mix(in srgb, var(--live) 10%, var(--paper)); border: 1.5px solid color-mix(in srgb, var(--live) 45%, transparent); display: flex; flex-direction: column; gap: 3px; }
.fr-result.soon { background: color-mix(in srgb, var(--warn) 10%, var(--paper)); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.fr-result.past { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.fr-rl { font-size: 12.5px; color: var(--ink-2); }
.fr-date { font: 650 24px/1.2 var(--serif); }
.fr-left { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.fr-check-res { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 8px; }
.fr-check-res.ok { background: var(--live-soft); color: var(--live); }
.fr-check-res.bad { background: var(--accent-soft); color: var(--accent); }
.fr-more { border: 1px solid var(--line-2); border-radius: 10px; margin: 8px 0; }
.fr-moreitem { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.fr-moreitem:first-child { border-top: 0; }
.fr-steps, .fr-gut { margin: 10px 0; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 14px; }
.fr-steps summary, .fr-gut summary { cursor: pointer; font-weight: 600; font-size: 13px; padding: 10px 0; color: var(--ink-2); }
.fr-steps ol { margin: 0 0 12px; padding-left: 20px; font: 14.5px/1.55 var(--serif); position: relative; z-index: 1; }
.fr-steps li { margin-bottom: 6px; }
.fr-n { color: var(--ink-2); white-space: nowrap; }
.fr-guttext { font: 14.5px/1.6 var(--serif); margin: 0 0 12px; position: relative; z-index: 1; }
.fr-hints { margin: 10px 0; font-size: 13px; color: var(--ink-2); background: color-mix(in srgb, var(--co-merke) 8%, var(--paper)); border-left: 3px solid var(--co-merke); border-radius: 0 10px 10px 0; padding: 8px 14px; }
.fr-hints ul { margin: 4px 0 0; padding-left: 18px; }
.fr-note { font-size: 13px; color: var(--ink-2); }
.fr-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.fr-out { position: relative; }
html.is-mobile .modal.modal-xl { height: 92dvh; }
html.is-mobile .fr { grid-template-columns: 1fr; }
html.is-mobile .fr-main { display: none; padding: 12px 14px 24px; }
html.is-mobile .fr.show-main .fr-side { display: none; }
html.is-mobile .fr.show-main .fr-main { display: block; }
html.is-mobile .fr-back { display: grid; margin-left: -8px; }

.sk-exp { display: flex; gap: 22px; align-items: flex-start; }
.ske-cover { position: relative; flex: none; width: 120px; aspect-ratio: 3 / 4; border-radius: 4px 10px 10px 4px; padding: 14px 10px 10px 18px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 75%, #000)); box-shadow: var(--shadow); }
.ske-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: rgba(0, 0, 0, .2); }
.ske-cover b { font: 650 20px/1.1 var(--serif); }
.ske-cover small { font-size: 10.5px; opacity: .9; }
.ske-opts { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.ske-run { flex: 1; min-width: 0; }
.ske-bar { height: 10px; border-radius: 5px; background: var(--line-2); overflow: hidden; }
.ske-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 5px; transition: width .35s ease; }
.ske-bar.busy i { background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .28) 0 10px, transparent 10px 20px); background-size: 28px 28px; animation: ske-stripe .6s linear infinite; }
@keyframes ske-stripe { to { background-position: 28px 0; } }
.ske-run.finished .ske-bar i { background: var(--live); }
.ske-step { font-size: 13px; color: var(--ink-2); margin: 8px 0 10px; min-height: 1.4em; }
.ske-list { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow-y: auto; font-size: 13px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 3px 14px; }
.ske-list li { display: flex; align-items: center; gap: 8px; color: var(--ink-3); transition: color .2s; }
.ske-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; transition: all .25s; }
.ske-list li.done { color: var(--ink); }
.ske-list li.done .ske-dot { background: var(--live); border-color: var(--live); box-shadow: inset 0 0 0 3px var(--paper); animation: pop .3s ease-out; }
@keyframes pop { 50% { transform: scale(1.35); } }
html.is-mobile .sk-exp { flex-direction: column; }
.mc-export { order: 3; margin-left: auto; }

.cal-facts { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cal-facts li { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.cal-facts .ic { color: var(--live); width: 16px; height: 16px; margin-top: 2px; }
.cal-url { display: flex; gap: 6px; }
.cal-url input { flex: 1; font-family: var(--mono); font-size: 12px; }
.cal-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.cal-help { border: 1px solid var(--line-2); border-radius: 10px; padding: 0 14px; font-size: 13.5px; }
.cal-help summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.cal-danger { justify-content: space-between; }

.net-status { display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; padding: 6px 10px; border: 0; border-radius: 8px; font-size: 12.5px; font-weight: 600; text-align: left; }
.net-status .ic { width: 16px; height: 16px; }
.net-status.off { background: var(--warn-soft); color: var(--warn); }
.net-status.wait { background: var(--hover); color: var(--ink-2); }
.net-status.sync { background: var(--live-soft); color: var(--live); }
.ic.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#net-status-m { display: none; }
html.is-mobile #net-status-m:not([hidden]) { display: flex; position: fixed; left: 50%; transform: translateX(-50%); top: calc(8px + env(safe-area-inset-top)); z-index: 45; margin: 0; box-shadow: var(--shadow); }

.merge-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.merge-c { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin-bottom: 12px; }
.merge-c h4 { margin: 0 0 8px; font-size: 13px; }
.merge-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.merge-v { border-radius: 8px; padding: 8px 10px; background: var(--hover); min-width: 0; }
.merge-v > span { display: block; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; margin-bottom: 4px; }
.merge-v:first-child { background: color-mix(in srgb, var(--co-def) 8%, var(--paper)); }
.merge-v .sheet-content { font-size: 14px; min-height: 0; }
html.is-mobile .merge-cols { grid-template-columns: 1fr; }
.vers { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; height: 60vh; }
.vers-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.vers-list button { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.vers-list button:hover { background: var(--hover); }
.vers-list button.on { background: var(--accent-soft); }
.vers-list small { color: var(--ink-3); font-size: 11.5px; }
.vers-prev { overflow-y: auto; border: 1px solid var(--line-2); border-radius: 10px; padding: 14px 18px; font-size: 15px; min-height: 0; }
html.is-mobile .vers { grid-template-columns: 1fr; height: auto; }
html.is-mobile .vers-prev { max-height: 40vh; }

/* Menü der Inhaltsblöcke (wie „Inhaltsblocktyp ändern“) */
.ct-item { display: flex; align-items: center; gap: 10px; width: 100%; }
.ct-item .ct-name { flex: 1; text-align: left; }
.ct-item kbd { font: 500 11px var(--sans); color: var(--ink-3); border: 0; background: none; }
.ct-item.on { background: var(--hover); font-weight: 600; }
.ct-badge { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; font: 700 11.5px/1 var(--sans); color: var(--co); background: color-mix(in srgb, var(--co) 14%, var(--paper)); box-shadow: inset 2.5px 0 0 var(--co); flex: none; }
.ct-head { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.ct-head .ic { width: 15px; height: 15px; }
html.is-mobile .ct-item kbd { display: none; }

/* Normvorschläge beim Tippen */
.ns-pop { position: fixed; z-index: 120; max-height: min(380px, 60vh); overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, .16); padding: 6px; }
.ns-row { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 7px 10px; color: var(--ink); }
.ns-row.on, .ns-row:hover { background: var(--hover); }
.ns-row.on { box-shadow: inset 0 0 0 1px var(--line); }
.ns-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ns-t { font-size: 15px; } .ns-t b { font-weight: 700; }
.ns-main small { color: var(--ink-3); font-size: 12.5px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ns-row .ic { width: 15px; height: 15px; color: var(--ink-3); flex: none; }
.ns-foot { font-size: 11px; color: var(--ink-3); padding: 6px 10px 2px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.ns-prev { position: fixed; z-index: 119; max-height: min(420px, 64vh); overflow-y: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 0, 0, .14); padding: 12px 16px; font: 14.5px/1.6 var(--serif); }
.ns-prev .ns-ph { font: 13px var(--sans); color: var(--ink-2); margin: 0 0 8px; }
.ns-prev .ns-ph b { color: var(--ink); }
.ns-prev .abs { margin: 0 0 8px; padding: 2px 6px; border-radius: 6px; }
.ns-prev .abs.hit { background: color-mix(in srgb, var(--co-hinweis) 18%, transparent); }
.ns-prev .law-content { position: relative; }
.ns-tip { position: fixed; z-index: 121; pointer-events: none; background: #1f2430; color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; max-width: 300px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); display: flex; flex-direction: column; gap: 2px; }
.ns-tip small { opacity: .75; } .ns-tip-h { opacity: .85; font-size: 12px; } .ns-tip-h:empty { display: none; }

/* Tastenkappen je Betriebssystem */
.kc { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; vertical-align: middle; }
.kc kbd { font: 500 11px/1 var(--sans); color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; min-width: 18px; text-align: center; }
.kc-mac kbd { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', var(--sans); font-size: 11.5px; padding: 2px 4px; min-width: 17px; border-radius: 4px; }
.kc-win kbd, .kc-linux kbd { font-size: 10.5px; font-weight: 600; letter-spacing: .01em; border-radius: 3px; padding: 3px 6px; }
.kc i { font-style: normal; font-size: 10px; color: var(--ink-3); }
.menu-hint .kc kbd { background: transparent; }
.sb-kbd .kc kbd { font-size: 10px; padding: 1px 4px; border-bottom-width: 1px; }
html.is-mobile .kc { display: none; }

/* Bibliothek */
.lib { max-width: 1180px; margin: 0 auto; padding: 22px 28px 120px; }
.lib-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 22px; }
.lib-head h1 { margin: 0; font: 650 30px var(--serif); }
.lib-head p { margin: 4px 0 0; }
.lib-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.lib-nb { position: relative; }
.lib-nb .nb-cover { text-decoration: none; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 82%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 78%, #000) 100%); box-shadow: 0 2px 4px rgba(0, 0, 0, .1), 0 10px 22px color-mix(in srgb, var(--c) 28%, transparent); transition: transform .15s; }
.lib-nb-row { display: flex; align-items: flex-start; gap: 4px; }
.lib-nb-row .nb-name { flex: 1; color: var(--ink); text-decoration: none; }
.lib-more { flex: none; opacity: .55; }
.lib-more:hover, .lib-note:hover .lib-more, .lib-folder:hover .lib-more { opacity: 1; }
.lib-add-nb { aspect-ratio: 3 / 4; border: 2px dashed var(--line); border-radius: 6px 12px 12px 6px; background: transparent; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 500; }
.lib-add-nb:hover { border-color: var(--accent); color: var(--accent); }
.lib-add-nb .ic { width: 26px; height: 26px; }
.lib-tip { margin-top: 30px; }
.lib-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 13.5px; margin-bottom: 14px; }
.lib-crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; padding: 3px 8px; border-radius: 6px; }
.lib-crumbs a:hover { background: var(--hover); color: var(--ink); }
.lib-crumbs a.cur { color: var(--ink); font-weight: 600; }
.lib-crumbs .ic { width: 15px; height: 15px; }
.lib-sep .ic { width: 13px; height: 13px; color: var(--ink-3); }
.lib-chead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 3px solid var(--c); }
.lib-ctitle { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.lib-ctitle h1 { margin: 0; font: 650 28px/1.15 var(--serif); }
.lib-ctitle p { margin: 3px 0 0; }
.lib-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--c); flex: none; }
.lib-fico { color: var(--c); display: inline-flex; }
.lib-ctitle .lib-fico .ic { width: 30px; height: 30px; }
.lib-actions { display: flex; gap: 8px; align-items: center; }
.lib-slots { margin: 14px 0 0; }
.lib-next { margin: 14px 0 0; }
.lib-bar { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; font-size: 13px; }
.lib-bar .seg .ic { width: 15px; height: 15px; }
.lib-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.lib-folder { position: relative; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); transition: box-shadow .15s, border-color .15s, transform .15s; }
.lib-folder:hover { box-shadow: var(--shadow); }
.lib-fbody { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 6px 12px 14px; text-decoration: none; color: var(--ink); }
.lib-fbody .lib-fico .ic { width: 28px; height: 28px; fill: color-mix(in srgb, var(--c) 18%, transparent); }
.lib-fmeta { display: flex; flex-direction: column; min-width: 0; }
.lib-fmeta b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-fmeta small { color: var(--ink-3); font-size: 12px; }
.lib-notes.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 22px 18px; }
.lib-note { position: relative; display: flex; flex-direction: column; gap: 6px; }
.lib-page { display: flex; flex-direction: column; gap: 6px; aspect-ratio: 3 / 4; padding: 14px 13px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 16px rgba(0, 0, 0, .05); text-decoration: none; color: var(--ink); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.lib-page:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 12px 24px rgba(0, 0, 0, .08); }
.lib-page-t { font: 600 13px/1.25 var(--serif); }
.lib-page-x { font: 9.5px/1.45 var(--serif); color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 12; -webkit-box-orient: vertical; }
.lib-page-x i { color: var(--ink-3); }
.lib-meta { display: flex; flex-direction: column; padding-right: 26px; }
.lib-name { font-weight: 600; font-size: 13.5px; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta small { color: var(--ink-3); font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
.lib-meta small .ic { width: 12px; height: 12px; }
.lib-note .lib-more { position: absolute; right: -4px; bottom: 6px; }
.lib-notes.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow: hidden; }
.lib-notes.list .lib-note { flex-direction: row; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line-2); gap: 12px; }
.lib-notes.list .lib-note:first-child { border-top: 0; }
.lib-notes.list .lib-page { display: none; }
.lib-notes.list .lib-meta { flex: 1; padding: 0; }
.lib-notes.list .lib-more { position: static; }
.lib-empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--ink-2); }
.lib-empty .ic { color: var(--ink-3); }
.lib-colors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.lib-color { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.lib-color.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--c); }
.mv-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.mv-row { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; text-align: left; padding: 8px 10px 8px calc(10px + var(--d, 0) * 20px); border-radius: 8px; color: var(--ink); font-size: 14px; }
.mv-row:hover:not(:disabled) { background: var(--hover); }
.mv-row:disabled { opacity: .5; }
.mv-row small { margin-left: auto; color: var(--ink-3); }
.mv-row .ic { width: 16px; height: 16px; color: var(--ink-3); }
.mv-course { font-weight: 600; }
.mv-row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
/* Ziehen & Ablegen */
.dragging { opacity: .45; }
.drop-over { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 8px; background: var(--accent-soft) !important; }
body.dnd .lib-nb .nb-cover { transition: transform .15s; }
.lib-nb.drop-over .nb-cover { transform: scale(1.04); }
/* Seitenleiste: Ordner */
.sb-title-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; border-radius: 5px; padding: 1px 4px; margin-left: -4px; }
.sb-title-link .ic { width: 12px; height: 12px; opacity: 0; transition: opacity .15s; }
.sb-title-link:hover { color: var(--ink); background: var(--hover); }
.sb-title-link:hover .ic, .sb-title-link.active .ic { opacity: 1; }
.sb-title-link.active { color: var(--accent); }
.tf { margin-left: 14px; }
.tf-head { display: flex; align-items: center; border-radius: 6px; }
.tf-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 4px 6px; color: var(--ink-2); font-size: 13px; font-weight: 500; text-align: left; border-radius: 6px; }
.tf-toggle:hover { background: var(--hover); }
.tf-toggle .chev { width: 12px; height: 12px; transition: transform .15s; flex: none; }
.tf.open > .tf-head .chev { transform: rotate(90deg); }
.tf-ico { width: 15px; height: 15px; flex: none; color: var(--ink-3); }
.tf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-body { display: none; }
.tf.open > .tf-body { display: block; }
.tf .tn { padding-left: 22px; }
.tn.named .tn-title { color: var(--ink); }
/* Listener-Hinweis */
.rec-consent { font-size: 14.5px; line-height: 1.55; }
.rc-lead { margin-top: 0; }
.rc-list { padding-left: 18px; margin: 10px 0; display: flex; flex-direction: column; gap: 7px; }
.rc-liab { font-size: 13px; color: var(--ink-2); background: var(--hover); border-radius: 8px; padding: 10px 12px; }
.rc-check { margin-top: 12px; font-weight: 500; align-items: flex-start; }
.rc-check input { margin-top: 3px; }
@media (max-width: 760px) { .lib { padding: 14px 14px 120px; } .lib-actions .btn { display: none; } .lib-ctitle h1 { font-size: 23px; } .lib-notes.grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 16px 12px; } .lib-head .btn { display: none; } }

.law-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.law-label .ic { width: 15px; height: 15px; }

/* =====================================================================
   Seitenleiste: Marktplatz, Übungen (ausklappbar), Karteikarten, Profil
   ===================================================================== */
.nav-group .nav-gh { display: flex; align-items: center; }
.nav-group .nav-gh > a { flex: 1; }
.nav-tg { margin-right: 4px; }
.nav-tg .ic { width: 14px; height: 14px; transition: transform .15s; }
.nav-group.open .nav-tg .ic { transform: rotate(90deg); }
.nav-sub { display: none; flex-direction: column; margin: 0 0 4px 18px; border-left: 1px solid var(--line); padding-left: 4px; }
.nav-group.open .nav-sub { display: flex; }
.nav-sub a { display: flex; align-items: center; gap: 9px; padding: 4px 8px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: 13.5px; }
.nav-sub a:hover { background: var(--hover); color: var(--ink); }
.nav-sub a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.nav-sub .ic { width: 16px; height: 16px; }
.nav-soon { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--ink-3); border: 1px solid var(--line); border-radius: 99px; padding: 0 6px; }
.pf-btn { position: relative; --p: 0; }
.pf-btn::after { content: ''; position: absolute; inset: 1px; border-radius: 50%; background: conic-gradient(var(--live) calc(var(--p) * 1%), transparent 0); -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%); mask: radial-gradient(circle, transparent 62%, #000 64%); opacity: .8; pointer-events: none; }
.pf-btn.warn::after { background: conic-gradient(#e0a800 calc(var(--p) * 1%), transparent 0); }
.pf-btn.crit::after { background: conic-gradient(var(--accent) calc(var(--p) * 1%), transparent 0); }

/* =====================================================================
   Übungen
   ===================================================================== */
:root { --pr-good: #1f9d74; --pr-ok: #5d9c2f; --pr-mid: #d99a06; --pr-bad: #dc3b44; }
.pr-page { max-width: 1120px; margin: 0 auto; padding: 22px 28px 120px; }
.pr-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.pr-kicker .ic { width: 15px; height: 15px; }
.pr-hub-head { text-align: center; max-width: 720px; margin: 20px auto 30px; }
.pr-hub-head h1 { font: 650 clamp(28px, 4vw, 40px)/1.15 var(--serif); margin: 0 0 10px; }
.pr-hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pr-tile { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pr-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--tint) 40%, var(--line)); }
.pr-tile-ico { grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, var(--paper)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 25%, transparent); }
.pr-tile-ico .ic { width: 26px; height: 26px; }
.pr-tile-body { display: flex; flex-direction: column; gap: 4px; }
.pr-tile-body b { font: 650 20px var(--serif); }
.pr-tile-body span { color: var(--ink-2); font-size: 14.5px; }
.pr-tile-go { grid-column: 2; display: inline-flex; align-items: center; gap: 4px; color: var(--tint); font-weight: 600; font-size: 14px; margin-top: 8px; }
.pr-tile-go .ic { width: 15px; height: 15px; }
.pr-tile.is-locked { opacity: .65; } .pr-tile.is-locked .pr-tile-go { color: var(--ink-3); }
.pr-soon { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 16px 20px; border: 1.5px dashed var(--line); border-radius: 14px; color: var(--ink-2); text-decoration: none; }
.pr-soon .ic { width: 24px; height: 24px; color: var(--ink-3); }
.pr-soon b { display: block; color: var(--ink); } .pr-soon small { color: var(--ink-3); }
.pr-head { margin-bottom: 18px; }
.pr-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; margin-bottom: 10px; }
.pr-crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; padding: 2px 6px; border-radius: 6px; }
.pr-crumbs a:hover { background: var(--hover); color: var(--ink); }
.pr-crumbs .ic { width: 14px; height: 14px; } .pr-crumbs > span .ic { width: 12px; height: 12px; color: var(--ink-3); }
.pr-crumbs .cur { color: var(--ink); font-weight: 600; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-titlebar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 3px solid var(--tint); }
.pr-tico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--tint); background: color-mix(in srgb, var(--tint) 12%, var(--paper)); flex: none; }
.pr-tico .ic { width: 22px; height: 22px; }
.pr-tt { flex: 1; min-width: 0; }
.pr-tt h1 { margin: 0; font: 650 26px/1.2 var(--serif); }
.pr-tt p { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.pr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-filter, .mk-types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pr-fchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 4px 12px; font-size: 13px; color: var(--ink-2); }
.pr-fchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.pr-fchip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pr-fchip.on i { box-shadow: 0 0 0 2px var(--paper); }
.pr-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 12%, var(--paper)); color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.pr-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.pr-mk { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; }
.pr-mk .ic { width: 12px; height: 12px; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pr-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; min-width: 0; }
.pr-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pr-card-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 20px; }
.pr-card-t { font: 600 16.5px/1.3 var(--serif); }
.pr-card-sub { font-size: 12.5px; color: var(--ink-3); }
.pr-card-prog { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: 12px; color: var(--ink-2); }
.pr-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; min-width: 50px; display: inline-block; vertical-align: middle; }
.pr-bar i { display: block; height: 100%; border-radius: 3px; }
.pr-new { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.pr-group { margin-top: 26px; }
.pr-gh { display: flex; align-items: center; gap: 10px; font: 600 15px var(--sans); margin: 0 0 10px; }
.pr-gh .ic { width: 17px; height: 17px; color: var(--ink-3); }
.pr-empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--ink-2); }
.pr-empty .ic { color: var(--ink-3); } .pr-empty h2 { font: 600 20px var(--serif); margin: 10px 0 4px; color: var(--ink); }
.pr-locked { text-align: center; padding: 70px 20px; } .pr-locked .ic { color: var(--ink-3); } .pr-locked h2 { font: 600 22px var(--serif); }
.pr-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.pr-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 140px auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line-2); }
.pr-row:first-child { border-top: 0; }
.pr-row-n { font-size: 12px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.pr-row-main { display: flex; flex-direction: column; min-width: 0; } .pr-row-main b { font-weight: 600; } .pr-row-main small { color: var(--ink-3); font-size: 12px; }
.pr-row-act { display: flex; gap: 2px; }
.pr-row.is-ignored { opacity: .5; }
.pr-stepper { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 12px; font-size: 13.5px; color: var(--ink-2); }
.pr-q { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.pr-q-head { display: flex; align-items: center; gap: 10px; } .pr-q-head h2 { flex: 1; margin: 0; font: 650 22px var(--serif); }
.pr-q-tags { margin-top: 6px; display: flex; gap: 6px; }
.pr-pill { font-size: 12px; font-weight: 700; color: var(--paper); background: var(--c); border-radius: 99px; padding: 2px 10px; }
.pr-pill-new { background: var(--line); color: var(--ink-2); }
.pr-input { width: 100%; margin-top: 14px; font: 16px/1.6 var(--serif); padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--desk, var(--paper)); color: var(--ink); resize: vertical; }
.pr-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pr-q-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.pr-peek { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--pr-mid) 10%, var(--paper)); border-left: 3px solid var(--pr-mid); font: 15px/1.6 var(--serif); }
.pr-q.done .pr-input { opacity: .7; }
.pr-result { margin-top: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; animation: fadeup .4s ease; }
.pr-result-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.pr-result-top h3 { margin: 0 0 4px; font: 650 22px var(--serif); }
.pr-kpis { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-2); margin: 8px 0 0; } .pr-kpis b { color: var(--ink); }
.pr-ring { position: relative; width: var(--size); height: var(--size); flex: none; }
.pr-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pr-ring circle { fill: none; stroke-width: 10; } .pr-ring .bg { stroke: var(--line-2); }
.pr-ring .fg { stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.pr-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pr-ring-num b { font: 700 calc(var(--size) * .24) var(--sans); } .pr-ring-num small { font-size: 10.5px; color: var(--ink-3); }
.pr-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pr-diff > div { min-width: 0; }
.pr-diff-t { font: 15px/1.75 var(--serif); padding: 12px 14px; border-radius: 10px; background: var(--hover); max-height: 460px; overflow-y: auto; }
.pr-diff-t p { margin: 0 0 8px; }
.pr-lbl { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; margin: 0 0 6px; display: flex; align-items: center; gap: 6px; }
.pip { width: 8px; height: 8px; border-radius: 50%; } .pip.you { background: var(--pr-good); } .pip.sol { background: #2f6fd6; }
.tok { border-radius: 4px; padding: 0 2px; font-style: normal; }
.tok.ok { background: color-mix(in srgb, var(--pr-good) 22%, transparent); }
.tok.miss { background: color-mix(in srgb, var(--pr-mid) 30%, transparent); }
.tok.bad { background: color-mix(in srgb, var(--pr-bad) 22%, transparent); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--pr-bad) 60%, transparent); }
.tok.key { font-weight: 700; }
.pr-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin: 12px 0 0; }
.pr-result-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.pr-mix-g { margin-bottom: 14px; } .pr-mix-g p { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.pr-mix-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.pr-mix-it { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; }
.pr-mix-it span { flex: 1; } .pr-mix-it small { color: var(--ink-3); }
.pr-mix-saved { font-size: 13px; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pr-saved { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 99px; padding: 0 2px 0 8px; }
.pr-mix-save { display: flex; gap: 8px; } .pr-mix-save input { flex: 1; }
.lnk { border: 0; background: none; color: var(--accent); padding: 0 4px; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lnk .ic { width: 14px; height: 14px; }
.pr-tagpick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pr-tags { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pr-tagrow { display: flex; gap: 8px; align-items: center; } .pr-tagrow input[data-n] { flex: 1; } .pr-tagrow input[type=color] { width: 36px; height: 30px; padding: 0; border: 0; background: none; }
.pr-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; color: var(--ink-3); margin-bottom: 14px; flex: 1; }
.pr-search input { border: 0; outline: 0; flex: 1; background: transparent; font: inherit; color: var(--ink); min-width: 0; }
.pr-desc { font: 15.5px/1.6 var(--serif); color: var(--ink-2); margin-bottom: 14px; }
/* Klausuren */
.pr-dots { display: inline-flex; gap: 3px; } .pr-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); } .pr-dots i.on { background: #2f6fd6; }
.pr-norms { display: flex; flex-wrap: wrap; gap: 4px; } .pr-norms span { font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; color: var(--ink-2); }
.pr-exam-stats { display: flex; align-items: center; gap: 22px; padding: 14px 0 18px; flex-wrap: wrap; }
.pr-hist { flex: 1; min-width: 220px; }
.pr-spark { display: flex; align-items: flex-end; gap: 4px; height: 54px; margin-bottom: 4px; }
.pr-spark i { flex: 1; max-width: 22px; border-radius: 3px 3px 0 0; }
.pr-tabs { margin-bottom: 12px; }
.pr-paper { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; position: relative; }
.pr-sv { font: 16px/1.7 var(--serif); } .pr-sv p { margin: 0 0 12px; }
.pr-sol { font: 15.5px/1.7 var(--serif); position: relative; }
.pr-sol > * { position: relative; z-index: 1; }
.sol-h { font-weight: 700; margin: 14px 0 6px; padding-left: 10px; border-left: 3px solid var(--lc); cursor: pointer; border-radius: 0 6px 6px 0; }
.sol-h:hover { background: color-mix(in srgb, var(--lc) 10%, transparent); }
.sol-h2 { margin-left: 12px; } .sol-h3 { margin-left: 24px; } .sol-h4 { margin-left: 36px; } .sol-h5 { margin-left: 48px; }
.sol-p { margin: 0 0 10px; padding-left: 12px; border-left: 1px solid color-mix(in srgb, var(--lc) 40%, transparent); }
.pr-solbar { margin-bottom: 10px; }
.pr-outline { list-style: none; padding: 0; margin: 0; } .pr-outline li { padding: 4px 0 4px calc((var(--lvl) - 1) * 22px); border-left: 3px solid var(--lc); padding-left: calc(10px + (var(--lvl) - 1) * 22px); margin: 2px 0; font: 15px/1.5 var(--serif); }
.pr-times { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pr-time { border: 1.5px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 14px; font-weight: 600; color: var(--ink); }
.pr-time.on { border-color: #2f6fd6; background: color-mix(in srgb, #2f6fd6 10%, var(--paper)); color: #2f6fd6; }
body.pr-writing #sidebar, body.pr-writing #tabbar { display: none !important; }
body.pr-writing .view-practice { padding: 0; }
.pr-session { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--desk, var(--bg)); }
.pr-sbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pr-stitle { font: 600 16px var(--serif); max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-clock { font: 700 20px/1 var(--sans); font-variant-numeric: tabular-nums; padding: 6px 12px; border-radius: 9px; background: var(--hover); }
.pr-clock.warn { color: #b07a00; background: color-mix(in srgb, #e0a800 15%, var(--paper)); }
.pr-clock.crit { color: var(--paper); background: var(--accent); animation: pulse-crit 1s ease-in-out infinite alternate; }
@keyframes pulse-crit { to { opacity: .75; } }
.pr-split { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 14px; padding: 14px; min-height: 0; }
.pr-split.paused { filter: blur(6px); pointer-events: none; }
.pr-left, .pr-right { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; min-height: 0; position: relative; overflow: hidden; }
.pr-left .seg { margin: 10px 12px 0; align-self: flex-start; }
.pr-left-body { flex: 1; overflow-y: auto; padding: 14px 22px 90px; }
.pr-left-body.marking { cursor: text; } .pr-left-body.marking::before { content: 'Text markieren: auswählen – Markierung wird gesetzt'; display: block; font: 12px var(--sans); color: var(--ink-3); margin-bottom: 8px; }
.pr-mark { background: #fff2a0; color: inherit; border-radius: 3px; }
.pr-writer { flex: 1; border: 0; resize: none; padding: 20px 24px; font: 16px/1.75 var(--serif); background: transparent; color: var(--ink); outline: none; }
.pr-wfoot { padding: 6px 14px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--line-2); }
.pr-hint { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, #7b4fd6 10%, var(--paper)); border: 1px solid color-mix(in srgb, #7b4fd6 30%, transparent); box-shadow: var(--shadow); animation: fadeup .35s ease; flex-wrap: wrap; }
.pr-hint .ic { width: 22px; height: 22px; color: #7b4fd6; } .pr-hint span { flex: 1; min-width: 160px; display: flex; flex-direction: column; } .pr-hint small { color: var(--ink-2); }
.pr-tip-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #7b4fd6; font-weight: 600; } .pr-tip-h .ic { width: 15px; height: 15px; }
.pr-tipsol { white-space: pre-wrap; font: 15px/1.7 var(--serif); } .pr-tipsol .dim { filter: blur(4px); opacity: .5; user-select: none; }
.pr-reveal { background: color-mix(in srgb, #7b4fd6 18%, transparent); color: inherit; border-radius: 4px; padding: 2px 0; }
.pr-normcmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.pr-n { display: inline-block; font-size: 12.5px; padding: 1px 8px; border-radius: 6px; margin: 0 4px 4px 0; }
.pr-n.ok { background: color-mix(in srgb, var(--pr-good) 18%, transparent); } .pr-n.miss { background: color-mix(in srgb, var(--pr-mid) 22%, transparent); }
.pr-var { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 12px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.pr-var legend { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.pr-passage .pr-input { margin-top: 8px; } .pr-pres { margin-top: 14px; }
/* Schemata */
.sc-mini { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink-2); }
.sc-mini span { padding-left: calc((var(--lv) - 1) * 10px + 6px); border-left: 2px solid var(--lc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-folder { text-decoration: none; }
.pr-path a { color: var(--ink-2); }
.sc-tree { display: flex; flex-direction: column; gap: 4px; position: relative; }
.sc-tree > * { position: relative; z-index: 1; }
.sc-node { border-left: 3px solid var(--lc); border-radius: 0 10px 10px 0; background: var(--paper); margin: 2px 0; }
.sc-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; }
.sc-node[data-has="1"] > .sc-head { cursor: pointer; }
.sc-node[data-has="1"] > .sc-head:hover { background: color-mix(in srgb, var(--lc) 7%, transparent); }
.sc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lc); flex: none; }
.sc-title { flex: 1; font: 15px/1.45 var(--serif); }
.sc-fcount { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--ink-3); } .sc-fcount .ic { width: 13px; height: 13px; }
.sc-chev { width: 15px; height: 15px; color: var(--ink-3); transition: transform .15s; }
.sc-node.open > .sc-head .sc-chev { transform: rotate(180deg); }
.sc-body { display: none; padding: 0 14px 10px 28px; }
.sc-node.open > .sc-body { display: block; }
.sc-note { font: 14.5px/1.6 var(--serif); background: color-mix(in srgb, var(--lc) 8%, var(--paper)); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.sc-forms blockquote { margin: 0 0 8px; padding: 8px 12px; border-left: 2px solid var(--line); font: 14px/1.55 var(--serif); color: var(--ink-2); }
.sc-forms blockquote a { display: block; font: 12px var(--sans); margin-top: 4px; color: var(--ink-3); }
.sc-kids { padding-left: 18px; }
.sc-tree.sm .sc-node { margin: 1px 0; } .sc-tree.sm .sc-head { padding: 4px 8px; } .sc-tree.sm .sc-title { font-size: 13.5px; }
.sc-tip { margin-top: 16px; display: flex; align-items: center; gap: 6px; } .sc-tip .ic { width: 14px; height: 14px; }
.sc-ed-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sc-ed-cols textarea { font: 13.5px/1.6 var(--mono, monospace); }
.sc-preview { max-height: 380px; overflow-y: auto; }
.sc-test { display: flex; flex-direction: column; gap: 16px; }
.sc-placed, .sc-pool { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; border: 1px dashed var(--line); min-height: 60px; }
.sc-pool { flex-direction: row; flex-wrap: wrap; background: var(--hover); border-style: solid; }
.sc-chip { text-align: left; border: 1px solid var(--line); border-left: 3px solid var(--lc); background: var(--paper); border-radius: 0 8px 8px 0; padding: 7px 12px; font: 14.5px var(--serif); color: var(--ink); }
.sc-placed .sc-chip { margin-left: calc((var(--lv) - 1) * 16px); }
.sc-chip.ok { background: color-mix(in srgb, var(--pr-good) 14%, var(--paper)); } .sc-chip.bad { background: color-mix(in srgb, var(--pr-bad) 12%, var(--paper)); }
.sc-recall { display: flex; flex-direction: column; gap: 4px; }
.sc-rc { display: flex; gap: 10px; text-align: left; border: 0; border-left: 3px solid var(--lc); background: var(--paper); padding: 8px 12px; margin-left: calc((var(--lv) - 1) * 16px); border-radius: 0 8px 8px 0; font: 15px var(--serif); color: var(--ink); }
.sc-rc span { filter: blur(6px); transition: filter .2s; user-select: none; } .sc-rc.open span { filter: none; }
/* Streite */
.ds-mini { display: flex; flex-wrap: wrap; gap: 4px; } .ds-mini i { font-style: normal; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 5px; color: var(--pc); background: color-mix(in srgb, var(--pc) 12%, transparent); } .ds-mini .ent { --pc: #2f6fd6; }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; position: relative; }
.ds-grid > * { position: relative; z-index: 1; }
.ds-pos { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--pc); border-radius: 12px; padding: 14px 16px; }
.ds-ph { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; font-weight: 700; color: var(--pc, #2f6fd6); }
.ds-ph .ic { width: 16px; height: 16px; }
.ds-norm { font-size: 12px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }
.ds-pt { font: 15px/1.6 var(--serif); }
.ds-src { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.ds-ent { margin-top: 14px; background: color-mix(in srgb, #2f6fd6 7%, var(--paper)); border: 1px solid color-mix(in srgb, #2f6fd6 25%, transparent); border-radius: 12px; padding: 14px 16px; font: 15px/1.6 var(--serif); --pc: #2f6fd6; }
.ds-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pr-linkchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; font-size: 13px; text-decoration: none; color: var(--ink); }
.pr-linkchip .ic { width: 14px; height: 14px; }
.pr-tagtext { font-size: 12px; color: var(--ink-3); }
.ds-ed { border: 1px solid var(--line); border-left: 3px solid var(--pc); border-radius: 0 10px 10px 0; padding: 8px 12px 12px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.ds-ed legend { font-weight: 700; color: var(--pc); font-size: 13px; }
.ds-exams { display: flex; flex-direction: column; gap: 4px; max-height: 160px; overflow-y: auto; margin-top: 6px; }
.ds-x-bar { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.ds-x-bar p { margin: 0; flex: 1; min-width: 200px; }
.ds-x-steps { display: flex; gap: 4px; flex-wrap: wrap; width: 100%; }
.ds-x-steps i { font-style: normal; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-3); }
.ds-x-steps i.cur { border-color: var(--pc); color: var(--pc); font-weight: 700; } .ds-x-steps i.done { background: var(--pc); color: #fff; border-color: var(--pc); }
.ds-x-text { font: 15.5px/1.7 var(--serif); }
.ds-mk { background: color-mix(in srgb, var(--pc) 22%, transparent); color: inherit; border-radius: 3px; }
.pz-title { font: 600 18px var(--serif); margin: 4px 0 12px; }
.pz-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pz-col { border: 1px solid var(--line); border-top: 4px solid var(--pc); border-radius: 12px; padding: 10px 12px; background: var(--paper); min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.pz-pk { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font: 14.5px/1.55 var(--serif); }
.pz-pk > span:first-child { flex: 1; }
.pz-ctl { display: flex; gap: 4px; flex: none; }
.pz-pk.ok { background: color-mix(in srgb, var(--pr-good) 15%, var(--paper)); border-color: var(--pr-good); }
.pz-pk.warn { background: color-mix(in srgb, var(--pr-mid) 16%, var(--paper)); border-color: var(--pr-mid); }
.pz-pk.bad { background: color-mix(in srgb, var(--pr-bad) 12%, var(--paper)); border-color: var(--pr-bad); }
.pz-res { margin-top: 16px; }

/* =====================================================================
   Marktplatz
   ===================================================================== */
.mk-page { max-width: 1180px; margin: 0 auto; padding: 22px 28px 120px; }
.mk-head { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.mk-head > div { flex: 1; min-width: 280px; }
.mk-head h1 { margin: 0 0 6px; font: 650 30px/1.15 var(--serif); }
.mk-head p { margin: 0; max-width: 70ch; }
.mk-tabs { margin-bottom: 14px; }
.mk-filters { margin-bottom: 18px; }
.mk-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mk-row .pr-search { margin: 0; min-width: 240px; }
.mk-row select { height: 40px; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.mk-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--tint); border-radius: 14px; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; min-width: 0; }
.mk-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mk-type { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tint); }
.mk-type .ic { width: 15px; height: 15px; }
.mk-title { font: 600 17px/1.3 var(--serif); }
.mk-desc { font-size: 13.5px; color: var(--ink-2); flex: 1; }
.mk-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--ink-2); align-items: center; }
.mk-meta .ic { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.mk-subj { font-weight: 600; color: var(--ink); }
.mk-foot { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: 8px; margin-top: 4px; }
.mk-foot .ic { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.mk-author { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-badge { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--hover); color: var(--ink-2); }
.mk-badge.sub { background: color-mix(in srgb, var(--pr-good) 15%, transparent); color: var(--pr-good); }
.mk-badge.own { background: var(--accent-soft); color: var(--accent); }
.mk-detail { max-width: 900px; }
.mk-dhead { padding: 6px 0 18px; border-bottom: 3px solid var(--tint); margin-bottom: 18px; }
.mk-dhead h1 { font: 650 30px/1.2 var(--serif); margin: 6px 0 8px; }
.mk-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.mk-sec { margin-bottom: 20px; } .mk-sec h2 { font: 600 18px var(--serif); margin: 0 0 8px; }
.mk-toc { margin: 0; padding-left: 22px; columns: 2 280px; font-size: 14px; } .mk-toc li { margin-bottom: 3px; break-inside: avoid; }
.mk-sample { border-left: 3px solid var(--tint); padding: 4px 0 4px 14px; margin-bottom: 12px; font: 15px/1.6 var(--serif); } .mk-sample b { font-family: var(--sans); }
.mk-legal code { font-size: 12px; background: var(--hover); padding: 1px 5px; border-radius: 4px; }
/* Veröffentlichen */
.pub-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; }
.pub-h { font-weight: 700; margin: 0 0 4px; } .pub-all { font-size: 13px; margin-bottom: 6px; }
.pub-list { max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.pub-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-top: 1px solid var(--line-2); cursor: pointer; }
.pub-row:first-child { border-top: 0; }
.pub-row span { display: flex; flex-direction: column; min-width: 0; } .pub-row small { color: var(--ink-3); font-size: 12px; }
.pub-form { display: flex; flex-direction: column; gap: 10px; }
.pub-rights { font-size: 13px; align-items: flex-start; } .pub-rights input { margin-top: 3px; }
/* Ablage-Dialog */
.pick-tree { max-height: 48vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin: 8px 0; }
.pick-row { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; text-align: left; padding: 7px 8px 7px calc(8px + var(--d, 0) * 20px); border-radius: 8px; color: var(--ink); font-size: 14.5px; }
.pick-row:hover { background: var(--hover); } .pick-row.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pick-row .ic { width: 16px; height: 16px; color: var(--ink-3); }
.pick-course { font-weight: 600; }
.pick-row .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.pick-tg { width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
.pick-tg .ic { width: 13px; height: 13px; transition: transform .15s; } .pick-tg.open .ic { transform: rotate(90deg); }
.pick-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .pick-cur { flex: 1; font-size: 13px; color: var(--ink-2); }
/* Profil & Speicher */
.pf { max-width: 960px; margin: 0 auto; padding: 22px 28px 120px; }
.pf-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.pf-head > div { flex: 1; } .pf-head h1 { margin: 0; font: 650 28px var(--serif); } .pf-head p { margin: 4px 0 0; }
.pf-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font: 650 24px var(--serif); }
.pf-sec { margin-bottom: 28px; } .pf-sec h2 { font: 600 19px var(--serif); margin: 0 0 12px; }
.st { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; --st: var(--pr-good); }
.st-warn { --st: #d99a06; } .st-crit { --st: var(--accent); }
.st-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; } .st-top b { font: 700 22px var(--sans); } .st-pct { margin-left: auto; font-weight: 700; color: var(--st); }
.st-bar { height: 12px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 6px; background: var(--st); transition: width 1s cubic-bezier(.2, .8, .2, 1), background .3s; min-width: 3px; }
.st-msg { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--st); margin: 10px 0 0; } .st-msg .ic { width: 16px; height: 16px; flex: none; }
.st-parts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.st-parts span { display: inline-flex; align-items: center; gap: 6px; } .st-parts i { width: 9px; height: 9px; border-radius: 3px; } .st-parts b { color: var(--ink); margin-left: 2px; }
.pf-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.pf-plan { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--paper); }
.pf-plan.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pf-pn { font: 650 19px var(--serif); margin: 0; display: flex; align-items: center; gap: 8px; } .pf-pn span { font: 600 11px var(--sans); color: var(--accent); background: var(--accent-soft); border-radius: 99px; padding: 1px 8px; }
.pf-q { color: var(--ink-2); margin: 2px 0 10px; font-size: 14px; }
.pf-plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pf-plan li { display: flex; align-items: center; gap: 6px; } .pf-plan li .ic { width: 14px; height: 14px; } .pf-plan li.yes .ic { color: var(--pr-good); } .pf-plan li.no { color: var(--ink-3); }
.pf-links { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .pr-page, .mk-page, .pf { padding: 14px 14px 120px; }
  .pr-hub { grid-template-columns: 1fr; }
  .pr-row { grid-template-columns: 26px minmax(0, 1fr) auto; } .pr-row-score { display: none; }
  .pr-diff, .pr-normcmp, .pz-cols, .sc-ed-cols, .pub-cols { grid-template-columns: 1fr; }
  .pr-split { grid-template-columns: 1fr; grid-template-rows: minmax(0, .8fr) minmax(0, 1.2fr); padding: 8px; gap: 8px; }
  .pr-sbar .btn { padding: 6px 10px; font-size: 13px; }
  .pr-tt h1 { font-size: 21px; }
  .pr-actions { width: 100%; }
  .pr-actions .btn { flex: 1 1 auto; justify-content: center; }
  .pr-sbar { gap: 6px; padding: 8px 10px; }
  .pr-sbar .spacer { display: none; }
  .pr-stitle { flex: 1 1 100%; }
}

/* =====================================================================
   Fächerauswahl
   ===================================================================== */
.sj-field { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); text-align: left; font: inherit; }
.sj-field i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sj-field .ic { width: 15px; height: 15px; margin-left: auto; color: var(--ink-3); }
.sj-field:hover { border-color: var(--ink-3); }
.modal-sj { width: min(560px, 100%); }
.sj-q { margin-bottom: 10px; }
.sj-recent { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.sj-list { max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.sj-area { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--c); margin: 12px 0 4px 6px; }
.sj-area:first-child { margin-top: 0; }
.sj-row { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 14.5px; }
.sj-row i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sj-row span { flex: 1; } .sj-row small { color: var(--ink-3); font-size: 12px; }
.sj-row:hover, .sj-row.on { background: var(--hover); }
.sj-row.cur { font-weight: 600; } .sj-row .ic { width: 15px; height: 15px; color: var(--accent); }

/* =====================================================================
   Titelbilder & Baukasten
   ===================================================================== */
.pr-thumb { display: block; aspect-ratio: 5 / 3; border-radius: 10px; overflow: hidden; background: var(--hover); }
.pr-thumb svg, svg.thumb { display: block; width: 100%; height: 100%; }
.pr-tcard { padding: 0; overflow: hidden; }
.pr-tcard > .pr-thumb { border-radius: 0; }
.pr-tcard > :not(.pr-thumb) { margin-left: 16px; margin-right: 16px; }
.pr-tcard > :last-child { margin-bottom: 14px; }
.pr-tcard > .pr-card-top { margin-top: 10px; }
.modal.modal-xl { width: min(1080px, 100%); }
.tb-igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-bottom: 10px; }
.tb-ic { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); display: grid; place-items: center; padding: 8px; }
.tb-ic svg { width: 100%; height: 100%; }
.tb-ic:hover { border-color: var(--accent); color: var(--accent); }

/* =====================================================================
   Klausur: Übersicht, Erstellen, Musterlösung
   ===================================================================== */
.ex-hero { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: center; margin: 4px 0 18px; }
.ex-thumb { box-shadow: var(--shadow); }
.ex-hero .pr-exam-stats { padding: 0 0 8px; }
.ex-focus { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 0; }
.ex-focus .pr-lbl { margin: 0 6px 0 0; }
.ex-focus .pr-n { background: var(--hover); }
.ex-edit .ex-top { display: flex; }
.ex-fullimp { position: relative; padding-right: 54px; }
.ex-beta { position: absolute; top: -8px; right: -6px; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: #7b4fd6; color: #fff; border-radius: 6px; padding: 1px 6px; }
.ex-r1 { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.ex-lbl { display: block; margin-bottom: 4px; }
.ex-imp { margin: 0 0 6px; align-self: flex-start; }
.ex-diff { display: flex; align-items: center; gap: 8px; height: 40px; }
.ex-diff button { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--line); padding: 0; }
.ex-diff button.on { background: linear-gradient(135deg, #1f9d74, #13a2a0); }
.ex-diff span { margin-left: 6px; color: var(--ink-2); font-size: 13px; }
.ex-thumbrow { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
.ex-thumbrow .pr-thumb { width: 170px; flex: none; }
.sol { position: relative; }
.sol-norms { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.sol-n { border: 1px solid color-mix(in srgb, #13a2a0 35%, var(--line)); background: color-mix(in srgb, #13a2a0 8%, var(--paper)); color: color-mix(in srgb, #13a2a0 70%, var(--ink)); font: 600 11.5px var(--sans); border-radius: 6px; padding: 2px 7px; }
.sol-n:hover { background: color-mix(in srgb, #13a2a0 18%, var(--paper)); }
.sol-kicker { display: flex; align-items: center; gap: 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.sol-kicker .ic { width: 14px; height: 14px; }
.sol-body { font: 15.5px/1.7 var(--serif); position: relative; }
.sol-body > * { position: relative; z-index: 1; }
.sol .sol-h { font: 600 15px/1.4 var(--sans); padding: 10px 14px; margin: 14px 0 8px; border-left: 3px solid var(--lc); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--lc) 12%, var(--paper)); cursor: pointer; scroll-margin-top: 20px; transition: box-shadow .2s; }
.sol .sol-h b { color: var(--lc); margin-right: 2px; }
.sol .sol-h1 { font-size: 16.5px; } .sol .sol-h0 { font-size: 15px; margin-left: 10px; }
.sol .sol-h2 { margin-left: 8px; } .sol .sol-h3 { margin-left: 18px; } .sol .sol-h4 { margin-left: 28px; } .sol .sol-h5 { margin-left: 38px; }
.sol .sol-h.flash { box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc) 45%, transparent); }
.sol .sol-p { margin: 0 0 10px; padding-left: 14px; border-left: 1px solid color-mix(in srgb, var(--lc) 45%, transparent); }
.sol-nav { position: sticky; bottom: 12px; float: right; width: min(320px, 100%); margin: -20px 0 0 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 4; overflow: hidden; }
.sol-nav-h { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 10px 12px; font-weight: 600; font-size: 13px; color: var(--ink); }
.sol-nav-h span { flex: 1; text-align: left; } .sol-nav-h .ic { width: 15px; height: 15px; }
.sol-nav.closed .sol-nav-list { display: none; } .sol-nav.closed .sol-nav-h .ic:last-child { transform: rotate(180deg); }
.sol-nav-list { max-height: 46vh; overflow-y: auto; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.sol-nav-i { text-align: left; border: 0; border-left: 3px solid var(--lc); background: color-mix(in srgb, var(--lc) 10%, var(--paper)); border-radius: 0 8px 8px 0; padding: 6px 10px; margin-left: calc(var(--lv) * 10px); font-size: 12.5px; color: var(--ink); }
.sol-nav-i b { color: var(--lc); }
.sol-nav-i:hover { background: color-mix(in srgb, var(--lc) 20%, var(--paper)); }
.pr-paper .sol-nav { position: sticky; }
@media (max-width: 760px) { .ex-hero { grid-template-columns: 1fr; } .ex-r1 { grid-template-columns: 1fr; } .sol-nav { float: none; width: 100%; margin: 12px 0; position: static; } }

/* =====================================================================
   Klausurmodus (Bearbeitung)
   ===================================================================== */
.xs { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--desk); }
.xs-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 8px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.xs-tl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.xs-title { font: 600 16px var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xs-clock { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.xs-time { font: 800 34px/1 var(--sans); font-variant-numeric: tabular-nums; color: #1f9d74; letter-spacing: -.01em; }
.xs-time.warn { color: #d99a06; } .xs-time.crit { color: var(--accent); animation: pulse-crit 1s ease-in-out infinite alternate; }
.xs-clock small { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 4px 0 6px; }
.xs-tbtn { display: flex; gap: 6px; } .xs-tbtn .btn { padding: 2px 10px; font-size: 12px; }
.xs-tr { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.xs-panes { flex: 1; display: flex; min-height: 0; padding: 10px; gap: 0; }
.xs-panes.paused { filter: blur(7px); pointer-events: none; }
.xs-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.xs-gut { flex: 0 0 10px; cursor: col-resize; position: relative; touch-action: none; }
.xs-gut::after { content: ''; position: absolute; top: 30%; bottom: 30%; left: 4px; width: 2px; border-radius: 2px; background: var(--line); transition: background .15s; }
.xs-gut:hover::after, .xs-gut.on::after { background: var(--accent); }
.xs-hgut { flex: 0 0 10px; }
body.xs-resizing { cursor: col-resize; user-select: none; }
.xs-pane { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; position: relative; }
.xs-ph { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); min-height: 48px; flex-wrap: wrap; }
.xs-lbl { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.xs-drag { display: none; cursor: grab; color: var(--ink-3); font-size: 16px; user-select: none; }
.xs-panes.arrange .xs-drag { display: inline; }
.xs-panes.arrange .xs-pane { outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -2px; }
.xs-pane.dragging { opacity: .5; }
.xs-pane.drop-over { outline: 3px solid var(--accent) !important; }
.xs-tools { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.xs-tools[hidden] { display: none; }
.xs-tools .btn.on, .xs-tools .icon-btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.xs-sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; padding: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.xs-sw.on { border-color: var(--ink); }
.xs-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.xs-body { flex: 1; overflow-y: auto; min-height: 0; }
.xs-svbody { padding: 18px 22px 120px; }
.xs-svbody.marking .xs-svtext { cursor: text; }
.xs-svbody.erasing .xs-mark { cursor: pointer; outline: 1px dashed var(--accent); }
.xs-layer { position: relative; min-height: 100%; }
.xs-svtext { font: 16px/1.75 var(--serif); }
.xs-svtext p { margin: 0 0 14px; }
.xs-mark { color: inherit; border-radius: 3px; padding: 1px 0; }
.xs-note { position: absolute; width: 190px; min-height: 110px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); border-radius: 4px 4px 14px 4px; z-index: 5; display: flex; flex-direction: column; transform: rotate(-.6deg); color: #1d2230; }
.xs-note.moving { box-shadow: 0 12px 30px rgba(0, 0, 0, .28); transform: rotate(0); }
.xs-note-h { display: flex; align-items: center; gap: 6px; padding: 4px 6px; cursor: grab; touch-action: none; font-size: 13px; opacity: .7; }
.xs-note-h span { flex: 1; }
.xs-note-c { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); background: conic-gradient(#fff3a3 0 25%, #c3f0ca 0 50%, #cfe5ff 0 75%, #ffd6e7 0); padding: 0; }
.xs-note-x { border: 0; background: transparent; font-size: 18px; line-height: 1; padding: 0 2px; color: #1d2230; }
.xs-note textarea { flex: 1; border: 0; background: transparent; resize: both; min-height: 80px; padding: 2px 10px 10px; font: 14px/1.45 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive; color: #1d2230; outline: none; }
.xs-edbar { gap: 4px; }
.xs-tb { min-width: 32px; height: 32px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; font: 600 13.5px var(--sans); color: var(--ink); display: inline-grid; place-items: center; padding: 0 6px; }
.xs-tb:hover { border-color: var(--ink-3); } .xs-tb .ic { width: 16px; height: 16px; }
.xs-wc { font-size: 12px; color: var(--ink-3); }
.xs-edwrap { display: flex; }
.xs-ed { flex: 1; padding: 20px 26px 120px; font: 16px/1.75 var(--serif); outline: none; color: var(--ink); }
.xs-ed:empty::before { content: attr(data-ph); color: var(--ink-3); font-family: var(--sans); }
.xs-ed p { margin: 0 0 10px; }
.xs-ed .xh { font-weight: 700; margin: 16px 0 6px; } .xs-ed .xh2 { margin-left: 14px; } .xs-ed .xh3 { margin-left: 28px; } .xs-ed .xh4 { margin-left: 42px; }
.xs-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 50px 20px; gap: 8px; min-height: 100%; }
.xs-cover .ic { color: var(--ink-3); } .xs-cover h3 { margin: 4px 0; font: 600 20px var(--serif); }
#xs-sol, .xs-svbody > .sol { padding: 16px 20px 80px; }
.xs-body .sol-nav { margin-top: 0; }
@media (max-width: 760px) {
  .xs-top { grid-template-columns: 1fr auto; } .xs-tl .xs-title { display: none; } .xs-clock { grid-row: 1; } .xs-tr { grid-column: 1 / -1; justify-content: space-between; }
  .xs-time { font-size: 26px; }
  .xs-panes { flex-direction: column; padding: 6px; }
  .xs-col { flex: 1 1 auto !important; min-height: 46vh; }
  .xs-gut { display: none; } .xs-panes { overflow-y: auto; gap: 8px; }
}

/* =====================================================================
   Import (Foto/PDF)
   ===================================================================== */
.modal-ki { width: min(820px, 100%); }
.ki-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; border: 2px dashed var(--line); border-radius: 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.ki-drop.drag, .ki-drop:hover { border-color: #1f9d74; background: color-mix(in srgb, #1f9d74 6%, transparent); }
.ki-drop-ic { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--hover); color: #1f9d74; margin-bottom: 6px; }
.ki-drop-ic .ic { width: 26px; height: 26px; }
.ki-files { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.ki-file { position: relative; width: 120px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: grab; background: var(--paper); }
.ki-file img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; }
.ki-pdf { height: 90px; display: grid; place-items: center; color: var(--ink-3); } .ki-pdf .ic { width: 34px; height: 34px; }
.ki-file small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ki-file .icon-btn { position: absolute; top: 2px; right: 2px; background: var(--paper); }
.ki-pg { position: absolute; top: 4px; left: 4px; background: var(--ink); color: var(--paper); font-size: 11px; font-weight: 700; border-radius: 6px; padding: 0 6px; }
.ki-prog { text-align: center; padding: 30px 10px; display: flex; flex-direction: column; gap: 12px; }
.ki-prog .st-bar i { background: #1f9d74; transition: width .3s; }
.ki-note { background: color-mix(in srgb, #d99a06 12%, var(--paper)); border-radius: 10px; padding: 10px 14px; }
.ki-man { display: grid; grid-template-columns: 140px 1fr; gap: 12px; margin: 10px 0; } .ki-man img { width: 100%; border-radius: 8px; }
.ki-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.ki-sec { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 0 12px 12px 0; padding: 10px 14px; margin-bottom: 12px; }
.ki-sec header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .ki-sec header i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.ki-sec header .lnk { margin-left: auto; }
.ki-review { font: 14.5px/1.7 var(--serif); max-height: 34vh; overflow-y: auto; }
.ki-flag { background: color-mix(in srgb, var(--accent) 18%, transparent); border-bottom: 2px solid var(--accent); border-radius: 3px; cursor: pointer; padding: 0 2px; }
.ki-free { font-size: 14px; }

/* =====================================================================
   Marktplatz (neu)
   ===================================================================== */
.mk-head { align-items: center; }
.mk-head > div { flex: 0 1 auto; min-width: 0; }
.mk-q { flex: 1; min-width: 220px; margin: 0; height: 44px; border-radius: 12px; }
.mk-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 18px; }
.mk-nav .mk-types { margin: 0; }
.mk-subj { width: auto; min-height: 32px; border-radius: 99px; font-size: 13px; }
.mk-count { margin: 0 0 10px; }
.mk-car { position: relative; border-radius: 22px; overflow: hidden; min-height: 260px; margin-bottom: 26px; box-shadow: var(--shadow); outline: none; }
.mk-slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 24px; padding: 28px 34px 44px; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--tint) 92%, #000) 0%, color-mix(in srgb, var(--sc) 80%, #000) 100%); opacity: 0; transition: opacity .6s; pointer-events: none; }
.mk-slide.on { opacity: 1; pointer-events: auto; position: relative; }
.mk-sl-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mk-sl-kick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .92; }
.mk-sl-kick .ic { width: 18px; height: 18px; }
.mk-sl-text b { font: 650 clamp(22px, 3vw, 32px)/1.15 var(--serif); }
.mk-sl-desc { opacity: .9; font-size: 14.5px; max-width: 52ch; }
.mk-sl-meta { font-size: 12.5px; opacity: .8; }
.mk-sl-go { align-self: flex-start; margin-top: 4px; background: #fff; color: #1d2230; border-color: #fff; }
.mk-sl-go .ic { width: 15px; height: 15px; }
.mk-sl-art svg { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); transform: rotate(1.5deg); }
.mk-car-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: #1d2230; display: grid; place-items: center; z-index: 2; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.mk-car-nav.prev { left: 10px; } .mk-car-nav.next { right: 10px; } .mk-car-nav .ic { width: 18px; height: 18px; }
.mk-dots { position: absolute; left: 34px; bottom: 16px; display: flex; gap: 6px; z-index: 2; }
.mk-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; padding: 0; background: rgba(255, 255, 255, .5); transition: width .3s; }
.mk-dots button.on { width: 24px; background: #fff; }
.mk-shelf { margin-bottom: 24px; }
.mk-shelf header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mk-shelf h2 { margin: 0; font: 650 19px var(--serif); }
.mk-shelf header > .ic { width: 18px; height: 18px; color: var(--accent); }
.mk-dot { width: 10px; height: 10px; border-radius: 50%; }
.mk-offic .ic { width: 20px; height: 20px; display: block; }
.mk-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 250px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.mk-rail > * { scroll-snap-align: start; }
.mk-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mk-card { padding: 0; border-top: 0; overflow: hidden; gap: 0; }
.mk-cthumb { position: relative; display: block; aspect-ratio: 5 / 3; }
.mk-cthumb svg { display: block; width: 100%; height: 100%; }
.mk-flag { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: #1d2230; }
.mk-flag.sub { color: var(--pr-good); } .mk-flag.own { color: var(--accent); }
.mk-cbody { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 14px; flex: 1; }
.mk-cmeta { font-size: 12.5px; color: var(--ink-2); }
.mk-cfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: auto; font-size: 12px; color: var(--ink-3); }
.mk-cfoot .ic { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
.mk-subj { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--ink-2); }
.mk-subj i { width: 8px; height: 8px; border-radius: 50%; }
.mk-subj.big { font-size: 14px; margin: 10px 0; }
.mk-off { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #1d72c4; }
.mk-off .ic { width: 17px; height: 17px; }
.pr-mk.off { border-color: color-mix(in srgb, #1d9bf0 40%, var(--line)); color: #1d72c4; font-weight: 600; }
.mk-detail { max-width: 1100px; }
.mk-pd { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 30px; align-items: start; margin: 8px 0 26px; }
.mk-pd-art svg { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .14); }
.mk-pd-info h1 { font: 650 32px/1.15 var(--serif); margin: 8px 0 6px; }
.mk-pd-by { margin: 0 0 12px; color: var(--ink-2); }
.mk-stats { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.mk-stats span { flex: 1; display: flex; flex-direction: column; padding: 10px 12px; border-left: 1px solid var(--line-2); font-size: 12px; color: var(--ink-3); }
.mk-stats span:first-child { border-left: 0; } .mk-stats b { font: 700 18px var(--sans); color: var(--ink); }
.mk-subbtn { font-size: 15px; padding: 10px 18px; }
.mk-desc-full { margin-top: 16px; font: 15.5px/1.65 var(--serif); color: var(--ink-2); }
.mk-pd-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; }
.mk-facts { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; align-self: start; }
.mk-facts dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 13.5px; }
.mk-facts dt { color: var(--ink-3); } .mk-facts dd { margin: 0; }
.mk-samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.mk-sample { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--tint); border-radius: 12px; padding: 14px 16px; margin: 0; border-left: 1px solid var(--line); }
.mk-related { margin-top: 26px; } .mk-related h2 { font: 650 19px var(--serif); margin: 0 0 10px; }
@media (max-width: 860px) {
  .mk-slide { grid-template-columns: 1fr; padding: 22px 22px 44px; } .mk-sl-art { display: none; }
  .mk-pd, .mk-pd-cols { grid-template-columns: 1fr; }
  .mk-stats { flex-wrap: wrap; } .mk-stats span { flex: 1 1 45%; }
}

/* Admin: Übernahme aus dem Jura-Trainer */
.lg-form { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.lg-users { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.lg-u { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.lg-u small { color: var(--ink-3); margin-left: auto; font-size: 12px; }
.lg-tools { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 10px; }
.lg-ok { color: var(--pr-good); display: flex; align-items: center; gap: 6px; } .lg-err { color: var(--accent); display: flex; align-items: center; gap: 6px; }
.lg-ok .ic, .lg-err .ic { width: 16px; height: 16px; }

.ex-edit textarea[data-f=sachverhalt] { min-height: 150px; } .ex-edit textarea[data-f=loesung] { min-height: 200px; }
.pr-input { height: auto; min-height: 120px; }
@media (max-width: 760px) { .lg-form .form-row, .ex-edit .form-row { display: flex; flex-direction: column; gap: 10px; } .lg-form .field, .lg-form input { min-width: 0; width: 100%; } }
@media (max-width: 760px) {
  .xs-top { grid-template-columns: auto 1fr auto; }
  .xs-tl { grid-column: 1; grid-row: 1; } .xs-clock { grid-column: 2; grid-row: 1; } .xs-tr { grid-column: 1 / -1; grid-row: 2; }
}

/* =====================================================================
   Seitenleiste: Wiederholungen, Karteikarten in Übungen
   ===================================================================== */
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.nav-streak { margin-left: auto; font-size: 12px; font-weight: 700; color: #e8700a; }
.nav-streak:not([hidden]) + .nav-count { margin-left: 6px; }
.nav-sub a.nav-sub-hl { margin-top: 4px; background: linear-gradient(90deg, color-mix(in srgb, #7b4fd6 14%, transparent), transparent); color: var(--ink); font-weight: 600; border: 1px solid color-mix(in srgb, #7b4fd6 25%, transparent); }
.nav-sub a.nav-sub-hl .ic { color: #7b4fd6; }
.pr-cards-hl { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-top: 18px; padding: 22px; border-radius: 18px; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, #7b4fd6 0%, #c2416b 100%); box-shadow: 0 14px 34px color-mix(in srgb, #7b4fd6 30%, transparent); transition: transform .15s; }
.pr-cards-hl:hover { transform: translateY(-2px); }
.pr-cards-hl .pr-tile-ico { color: #fff; background: rgba(255, 255, 255, .18); box-shadow: none; grid-row: auto; }
.pr-cards-hl .pr-tile-body b { font: 650 22px var(--serif); display: flex; align-items: center; gap: 8px; }
.pr-cards-hl .pr-tile-body span { color: rgba(255, 255, 255, .88); }
.pr-cards-hl .pr-tile-go { color: #fff; grid-column: auto; margin: 0; }
.pr-badge-soon { font: 700 10.5px var(--sans); letter-spacing: .05em; text-transform: uppercase; background: rgba(255, 255, 255, .25); border-radius: 6px; padding: 2px 7px; }
@media (max-width: 760px) { .pr-cards-hl { grid-template-columns: auto 1fr; } .pr-cards-hl .pr-tile-go { grid-column: 2; } }

/* =====================================================================
   Wiederholungen
   ===================================================================== */
.rv-page { max-width: 1040px; margin: 0 auto; padding: 22px 28px 120px; }
.rv-hero { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.rv-hero > div { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.rv-streak { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.rv-flame { grid-row: span 2; font-size: 44px; filter: grayscale(1) opacity(.45); transition: filter .3s; }
.rv-streak.lit .rv-flame { filter: none; animation: flame 1.6s ease-in-out infinite alternate; }
@keyframes flame { from { transform: scale(1) rotate(-2deg); } to { transform: scale(1.08) rotate(2deg); } }
.rv-streak b { font: 800 40px/1 var(--sans); }
.rv-streak small { color: var(--ink-2); }
.rv-streak em { grid-column: 1 / -1; font-style: normal; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.rv-goal { display: flex; align-items: center; gap: 14px; }
.rv-goal b { display: block; font: 700 20px var(--sans); } .rv-goal small { display: block; color: var(--ink-3); }
.rv-kpis { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; align-items: center; }
.rv-kpis span { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-3); } .rv-kpis b { font: 700 22px var(--sans); color: var(--ink); }
.rv-sec { margin-bottom: 24px; }
.rv-sec > header { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.rv-sec h2 { margin: 0; font: 650 20px var(--serif); }
.rv-slot { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, #2f6fd6 8%, var(--paper)); color: var(--ink-2); font-size: 14px; }
.rv-slot .ic { width: 18px; height: 18px; color: #2f6fd6; flex: none; }
.rv-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.rv-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line-2); }
.rv-row:first-child { border-top: 0; } .rv-row.later { opacity: .6; }
.rv-k { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.rv-k.nacharbeit { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.rv-k.wiederholung { background: color-mix(in srgb, #1f9d74 16%, transparent); color: #1f9d74; }
.rv-row.warm .rv-k { background: color-mix(in srgb, #d99a06 18%, transparent); color: #a87400; }
.rv-main { display: flex; flex-direction: column; min-width: 0; } .rv-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-main small { color: var(--ink-3); font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rv-course { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); } .rv-course i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.rv-act { display: flex; gap: 4px; align-items: center; }
.rv-sub { margin: 14px 0 6px; }
.rv-empty { display: flex; align-items: center; gap: 10px; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; color: var(--ink-2); } .rv-empty .ic { color: var(--pr-good); width: 22px; height: 22px; }
.rv-empty p { margin: 0; }
.rv-soon { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); text-decoration: none; color: var(--ink); font-size: 13px; }
.rv-chip small { color: var(--ink-3); }
.rv-prog { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.rv-heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; }
.rv-heat i, .rv-legend i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.h0 { background: var(--line-2); } .h1 { background: color-mix(in srgb, #1f9d74 35%, var(--paper)); } .h2 { background: color-mix(in srgb, #1f9d74 60%, var(--paper)); } .h3 { background: #1f9d74; } .h4 { background: #13775a; }
.rv-legend { display: flex; align-items: center; gap: 3px; margin-top: 8px; }
.rv-courses { display: flex; flex-direction: column; gap: 8px; }
.rv-cbar { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.rv-cbar span:first-child { display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rv-cbar i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rv-cbar .pr-bar { height: 7px; } .rv-cbar small { color: var(--ink-3); white-space: nowrap; }
.rv-why { margin-top: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.rv-why summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; } .rv-why .ic { width: 16px; height: 16px; color: #d99a06; }
.rv-why p { font: 15px/1.6 var(--serif); color: var(--ink-2); }
/* Ablauf */
.rv-session { max-width: 980px; }
.rv-shead { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; margin-bottom: 18px; }
.rv-shead h1 { margin: 2px 0; font: 650 24px var(--serif); }
.rv-shead p { margin: 0; }
.rv-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: flex-end; }
.rv-steps li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); }
.rv-steps li > :first-child, .rv-steps li { counter-increment: none; }
.rv-steps li .ic { width: 14px; height: 14px; }
.rv-steps li.cur { border-color: var(--accent); color: var(--accent); font-weight: 600; } .rv-steps li.done { color: var(--pr-good); }
.rv-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.rv-card h2 { margin: 0 0 6px; font: 650 20px var(--serif); }
.rv-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.rv-center { justify-content: center; }
.rv-two { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.rv-note { font: 15.5px/1.7 var(--serif); max-height: 62vh; overflow-y: auto; margin: 12px 0; position: relative; padding-right: 6px; }
.rv-note > * { position: relative; z-index: 1; }
.rv-side { position: sticky; top: 12px; }
.rv-recall { font: 14.5px/1.6 var(--serif); background: var(--hover); border-radius: 10px; padding: 10px 14px; margin: 8px 0 14px; }
.rv-check { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.rv-flash { min-height: 260px; display: flex; flex-direction: column; }
.rv-fhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.rv-kind { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #7b4fd6; background: color-mix(in srgb, #7b4fd6 12%, transparent); padding: 3px 9px; border-radius: 6px; }
.rv-front { font: 19px/1.55 var(--serif); }
.rv-gap { display: inline-block; min-width: 90px; border-bottom: 2px solid var(--accent); color: var(--accent); text-align: center; margin: 0 2px; }
.rv-back { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, #1f9d74 8%, var(--paper)); border-left: 3px solid #1f9d74; font: 16px/1.6 var(--serif); animation: fadeup .3s ease; }
.rv-flash .rv-foot { margin-top: auto; padding-top: 14px; }
.rv-rate { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.rv-rate .btn { flex: 1; justify-content: center; } .rv-rate kbd { font-size: 10.5px; opacity: .6; margin-left: 4px; }
.rv-r0 { border-color: color-mix(in srgb, var(--pr-bad) 50%, var(--line)); } .rv-r1 { border-color: color-mix(in srgb, var(--pr-mid) 60%, var(--line)); } .rv-r2 { border-color: color-mix(in srgb, var(--pr-good) 60%, var(--line)); }
.rv-dots { display: flex; gap: 4px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.rv-dots i { width: 22px; height: 6px; border-radius: 3px; background: var(--line); } .rv-dots i.cur { background: var(--ink-3); }
.rv-dots i.r0 { background: var(--pr-bad); } .rv-dots i.r1 { background: var(--pr-mid); } .rv-dots i.r2 { background: var(--pr-good); }
.rv-done { text-align: center; padding: 40px 22px; }
.rv-flame-big { font-size: 74px; } .rv-flame-big.pop { animation: pop .8s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.rv-done h1 { font: 700 30px var(--serif); margin: 6px 0; }
/* Startseite */
.panel-review .panel-title { display: flex; align-items: center; gap: 8px; } .panel-review .panel-title a { color: inherit; text-decoration: none; }
.dash-streak { margin-left: auto; font-size: 13px; color: #e8700a; font-weight: 700; }
.dash-rv { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-size: 14px; }
.dash-rv span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
  .rv-page { padding: 14px 14px 120px; } .rv-hero { grid-template-columns: 1fr; } .rv-two { grid-template-columns: 1fr; } .rv-side { position: static; }
  .rv-row { grid-template-columns: 1fr auto; } .rv-row .rv-k { grid-column: 1 / -1; }
  .rv-prog { grid-template-columns: 1fr; overflow-x: auto; } .rv-shead { grid-template-columns: auto 1fr; } .rv-steps { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Werkzeug-Knopf: abgerundetes Rechteck wie das Logo (statt Kreis) */
.tools-fab { border-radius: 15px; }

/* =====================================================================
   Weiche Schreibmarke
   ===================================================================== */
.has-smooth-caret { caret-color: transparent; }
.smooth-caret { position: fixed; left: 0; top: 0; width: 2px; height: 20px; margin-left: -1px; border-radius: 2px; background: var(--cc, var(--ink)); pointer-events: none; z-index: 70; opacity: 0;
  transition: transform .11s cubic-bezier(.22, .9, .3, 1), height .11s ease, opacity .12s ease; will-change: transform; }
.smooth-caret.show { opacity: 1; animation: caret-blink 1.06s steps(1) .5s infinite; }
.smooth-caret.show.typing { animation: none; opacity: 1; }
.smooth-caret.jump { transition: opacity .12s ease; }
@keyframes caret-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .smooth-caret { transition: none; } }

/* =====================================================================
   Gesetzesfenster (Kürzel, Suche, Gesetzauswahl)
   ===================================================================== */
.law-panel { position: relative; }
.law-head { gap: 6px; }
.law-badge { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px 0 10px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--nc, var(--accent)) 35%, var(--line));
  background: color-mix(in srgb, var(--nc, var(--accent)) 10%, var(--paper)); color: color-mix(in srgb, var(--nc, var(--accent)) 80%, var(--ink)); font: 700 13px var(--sans); white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
.law-badge .ic { width: 13px; height: 13px; opacity: .7; }
.law-badge:hover { background: color-mix(in srgb, var(--nc, var(--accent)) 18%, var(--paper)); }
.law-badge.swap b { display: inline-block; animation: law-swap .38s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes law-swap { 0% { transform: translateY(70%); opacity: 0; } 100% { transform: none; opacity: 1; } }
.law-q { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--ink-3); transition: border-color .15s, box-shadow .15s; }
.law-q:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.law-q .ic { width: 15px; height: 15px; flex: none; }
.law-q input { border: 0; outline: 0; height: 30px; padding: 0; flex: 1; min-width: 0; background: transparent; color: var(--ink); font-size: 13.5px; }
.law-body { position: relative; }
.law-results { position: absolute; inset: 0 0 auto 0; max-height: 100%; overflow-y: auto; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 14px 28px rgba(0, 0, 0, .1); padding: 6px; }
.law-results.in { animation: law-drop .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes law-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.law-r { display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 7px 10px; border-radius: 8px; color: var(--ink); font-size: 13.5px; }
.law-r b { flex: none; min-width: 64px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.law-r span { color: var(--ink-2); } .law-r mark { background: color-mix(in srgb, #ffe066 70%, transparent); color: inherit; border-radius: 2px; }
.law-r:hover, .law-r.on { background: var(--hover); }
.law-r-cite { background: var(--accent-soft); } .law-r-cite .ic { width: 14px; height: 14px; color: var(--accent); }
.law-rh { margin: 6px 10px; font-size: 12px; color: var(--ink-3); }
.law-pop { position: absolute; left: 8px; top: 46px; z-index: 12; width: min(380px, calc(100% - 16px)); max-height: 60vh; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); transform-origin: 30px 0; }
.law-pop.in { animation: law-pop .2s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes law-pop { from { opacity: 0; transform: scale(.94) translateY(-4px); } to { opacity: 1; transform: none; } }
.law-pop-list { overflow-y: auto; display: flex; flex-direction: column; }
.law-l { display: flex; align-items: baseline; gap: 10px; text-align: left; border: 0; background: transparent; padding: 7px 8px; border-radius: 8px; color: var(--ink); font-size: 13px; }
.law-l b { flex: none; min-width: 64px; color: color-mix(in srgb, var(--nc, var(--accent)) 80%, var(--ink)); }
.law-l span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.law-l:hover { background: var(--hover); } .law-l.on { background: var(--accent-soft); }
.law-norm { animation: law-in .28s ease; }
@keyframes law-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.law-pn { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0 4px; }
.law-nav { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.law-nav:hover { border-color: var(--accent); color: var(--accent); } .law-nav .ic { width: 13px; height: 13px; }

/* =====================================================================
   Lernzeiten (Stundenplan) & Erinnerungen
   ===================================================================== */
.pg-ev.pg-study { --c: #1f9d74; background: repeating-linear-gradient(-45deg, color-mix(in srgb, #1f9d74 10%, var(--paper)) 0 8px, color-mix(in srgb, #1f9d74 16%, var(--paper)) 8px 16px); border: 1.5px dashed color-mix(in srgb, #1f9d74 60%, transparent); }
.pg-study .ev-name { display: flex; align-items: center; gap: 4px; color: #137a59; } .pg-study .ic { width: 13px; height: 13px; }
.m-ev.m-study .m-ev-card { border: 1.5px dashed color-mix(in srgb, #1f9d74 60%, transparent); background: color-mix(in srgb, #1f9d74 8%, var(--paper)); }
.m-study .m-ev-name { display: flex; align-items: center; gap: 6px; color: #137a59; } .m-study .ic { width: 15px; height: 15px; }
.sd-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 10px 0; }
.sd-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line-2); font-size: 14px; }
.sd-row:first-child { border-top: 0; } .sd-wd { width: 86px; color: var(--ink-2); } .sd-row .ic { width: 13px; height: 13px; }
.sd-form { grid-template-columns: 1fr 110px 110px 1.4fr; }
.sd-push { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--hover); flex-wrap: wrap; }
.sd-push > .ic { width: 26px; height: 26px; color: var(--ink-3); } .sd-push.on > .ic { color: var(--pr-good); }
.sd-push > div { flex: 1; min-width: 200px; display: flex; flex-direction: column; } .sd-push small { color: var(--ink-3); }
.sd-time { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .sd-time input[type=time] { width: 110px; }
@media (max-width: 760px) { .sd-form { grid-template-columns: 1fr 1fr; } }

/* =====================================================================
   Wochenrückblick
   ===================================================================== */
.rv-weekbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: -6px 0 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.rv-weekbar:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.rv-weekbar > .ic { width: 22px; height: 22px; color: #2f6fd6; } .rv-weekbar span { flex: 1; display: flex; flex-direction: column; } .rv-weekbar small { color: var(--ink-3); }
.rv-weekbar.hl { background: linear-gradient(110deg, color-mix(in srgb, #2f6fd6 12%, var(--paper)), var(--paper)); border-color: color-mix(in srgb, #2f6fd6 35%, var(--line)); }
.wk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.wk-head h1 { margin: 0; font: 650 30px var(--serif); } .wk-head p { margin: 4px 0 0; }
.wk-nav { display: flex; gap: 6px; }
.wk-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.wk-kpis > div { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.wk-kpis b { font: 800 26px/1 var(--sans); } .wk-kpis b small { font-size: 14px; font-weight: 600; color: var(--ink-3); }
.wk-kpis span { font-size: 12.5px; color: var(--ink-2); } .wk-kpis .up { color: var(--pr-good); } .wk-kpis .down { color: var(--accent); }
.wk-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; margin-bottom: 22px; }
.wk-grid .rv-card { box-shadow: none; } .wk-grid .rv-card h2 { font-size: 17px; margin-bottom: 12px; }
.wk-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 150px; align-items: end; }
.wk-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.wk-bar i { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #1f9d74, #13775a); animation: bar-up .6s cubic-bezier(.2, .8, .2, 1); transform-origin: bottom; }
.wk-bar span { font-size: 12px; color: var(--ink-3); } .wk-bar.today span { color: var(--accent); font-weight: 700; }
@keyframes bar-up { from { transform: scaleY(0); } to { transform: none; } }
.wk-grid .rv-cbar { margin-bottom: 8px; }
.wk-test { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(120deg, color-mix(in srgb, #7b4fd6 10%, var(--paper)), var(--paper)); }
.wk-test > div { flex: 1; min-width: 240px; } .wk-test p { margin: 0; }
@media (max-width: 860px) { .wk-kpis { grid-template-columns: repeat(2, 1fr); } .wk-grid { grid-template-columns: 1fr; } }

/* Gesetzesleiste: alles auf einer Höhe, neutral, ohne doppelte Rahmen */
.law-head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding-top: 8px; padding-bottom: 8px; }
.law-head > * { flex: none; }
.law-head .law-q { flex: 1; }
.law-badge, .law-q, .law-head .icon-btn { box-sizing: border-box; height: 32px; }
.law-badge { border-color: var(--line); background: var(--paper); color: var(--ink); font-weight: 650; }
.law-badge:hover { background: var(--hover); }
.law-q:focus-within { border-color: var(--ink-3); box-shadow: none; }
.law-q input, .law-q input:focus { border: 0 !important; box-shadow: none !important; outline: none; height: 100%; padding: 0; background: transparent; }
.law-l b { color: var(--ink); }
.law-l.on { background: var(--hover); }
.law-r b { color: var(--ink); }
.law-r mark { background: transparent; color: var(--ink); font-weight: 700; }
.law-r-cite { background: var(--hover); }
/* Suchfelder allgemein: dezenter Fokus statt rotem Ring */
.sb-search:focus-within, .pr-search:focus-within { border-color: var(--ink-3); box-shadow: none; }
.sb-search input:focus, .pr-search input:focus, .sj-q input:focus, .mk-q input:focus { border: 0; box-shadow: none; }
/* „Offiziell“: roter Kreis mit Haken */
.mk-off { color: var(--accent); }
.pr-mk.off { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); }
/* Tastenkürzel ausblenden (Einstellung) */
html.no-keys .kc, html.no-keys .kbd-hint, html.no-keys .rv-rate kbd, html.no-keys .menu-hint:has(.kc) { display: none !important; }

/* =====================================================================
   Übungen: Karteikarten-Kachel (gleicher Stil, ganze Breite unten)
   ===================================================================== */
.pr-tile-wide { grid-column: 1 / -1; }

/* =====================================================================
   Karteikarten
   ===================================================================== */
.kk-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.kk-sum > div { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; }
.kk-sum b { font: 800 24px var(--sans); } .kk-sum span { font-size: 12.5px; color: var(--ink-3); }
.kk-counts { display: flex; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.kk-counts .due { color: var(--accent); font-weight: 600; } .kk-counts .new { color: #13a2a0; font-weight: 600; }
.btn.is-disabled { opacity: .5; pointer-events: none; }
.kk-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.kk-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap: 14px; align-items: start; padding: 12px 14px; border-top: 1px solid var(--line-2); font-size: 14px; }
.kk-row:first-child { border-top: 0; }
.kk-f { font-weight: 600; } .kk-b { color: var(--ink-2); font-family: var(--serif); max-height: 4.8em; overflow: hidden; }
.kk-st { white-space: nowrap; } .kk-due { color: var(--accent); font-weight: 600; font-size: 12.5px; }
.kk-act { display: flex; gap: 2px; }
.kk-genlist, .kk-notes { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; }
.kk-gr { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.kk-gr span { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .kk-gr small { color: var(--ink-2); } .kk-gr em { font-style: normal; font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.kk-note { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; padding: 8px 12px; color: var(--ink); }
.kk-note small { color: var(--ink-3); } .kk-note:hover { border-color: var(--ink-3); }
.kk-stage { perspective: 1400px; margin: 10px auto 16px; max-width: 720px; }
.kk-card { position: relative; min-height: 300px; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2, .8, .2, 1); cursor: pointer; }
.kk-card.flipped { transform: rotateY(180deg); cursor: default; }
.kk-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 16px 40px rgba(0, 0, 0, .1); padding: 28px 32px; display: flex; flex-direction: column; justify-content: center; gap: 14px; overflow-y: auto; }
.kk-back { transform: rotateY(180deg); justify-content: flex-start; }
.kk-text { font: 20px/1.55 var(--serif); text-align: center; }
.kk-back .kk-text { text-align: left; font-size: 17px; }
.kk-q { font: 600 14px/1.5 var(--sans); color: var(--ink-3); border-bottom: 1px solid var(--line-2); padding-bottom: 10px; }
.kk-tag { position: absolute; top: 14px; left: 18px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #13a2a0; }
.kk-tap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--ink-3); }
.kk-rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 720px; margin: 0 auto; animation: fadeup .25s ease; }
.kk-r { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.kk-r small { color: var(--ink-3); font-size: 12px; } .kk-r kbd { font-size: 10px; opacity: .5; }
.kk-r0 b { color: var(--pr-bad); } .kk-r1 b { color: var(--pr-mid); } .kk-r2 b { color: var(--pr-good); } .kk-r3 b { color: #2f6fd6; }
.kk-r:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.rv-k.karten { background: color-mix(in srgb, #13a2a0 16%, transparent); color: #0f7f7d; }
.rv-bell { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; color: var(--ink-2); font-size: 12px; }
.rv-bell .ic { width: 22px; height: 22px; }
@media (max-width: 760px) { .kk-sum { grid-template-columns: repeat(2, 1fr); } .kk-row { grid-template-columns: 1fr; } .kk-rate { grid-template-columns: repeat(2, 1fr); } .kk-text { font-size: 18px; } }

/* =====================================================================
   Produktseite: Leseprobe als Papierseiten, Melden
   ===================================================================== */
.mk-reading .pp-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 22px; padding: 6px 2px 10px; }
.pp-sheet { position: relative; background: #fffdf8; color: #1d2230; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 18px 40px rgba(0, 0, 0, .12); padding: 44px 46px 54px; min-height: 560px; max-height: 760px; overflow: hidden; display: flex; flex-direction: column; }
html[data-theme=dark] .pp-sheet, :root:not([data-theme=light]) .pp-sheet { color-scheme: light; }
.pp-sheet > header { position: absolute; top: 16px; left: 46px; right: 46px; display: flex; justify-content: space-between; font: 10.5px var(--sans); color: #8a8f99; letter-spacing: .03em; border-bottom: 1px solid #ece7dc; padding-bottom: 6px; }
.pp-sheet > footer { position: absolute; bottom: 14px; left: 46px; right: 46px; display: flex; justify-content: space-between; font: 10.5px var(--sans); color: #8a8f99; z-index: 3; }
.pp-body { font: 14.5px/1.62 var(--serif); }
.pp-body p { margin: 0 0 10px; text-align: justify; hyphens: auto; }
.pp-h { font: 650 22px/1.25 var(--serif); margin: 6px 0 4px; }
.pp-meta { font: 12px var(--sans); color: #6b7280; margin: 0 0 10px; text-align: left !important; }
.pp-kick { font: 700 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #1f7cf0; margin: 10px 0 8px; }
.pp-body .sol { --paper: #fffdf8; --ink: #1d2230; --line: #e8e2d4; }
.pp-body .sol .sol-p { text-align: justify; } .pp-body .sol-norms { margin-bottom: 10px; } .pp-body .sol-kicker { display: none; }
.pp-def { border-left: 3px solid #1f9d74; padding: 2px 0 2px 12px; margin: 0 0 12px; } .pp-def b { font-family: var(--sans); font-size: 13.5px; }
.pp-def p { margin: 2px 0 0; }
.pp-node { padding: 4px 0 4px calc(10px + (var(--lv) - 1) * 18px); border-left: 3px solid var(--lc); margin: 3px 0; font-size: 14px; }
.pp-node b { color: var(--lc); } .pp-node small { display: block; color: #6b7280; font-size: 12px; font-style: italic; }
.pp-pos { border-left: 3px solid var(--pc); background: color-mix(in srgb, var(--pc) 7%, #fffdf8); border-radius: 0 8px 8px 0; padding: 8px 12px; margin: 0 0 10px; }
.pp-pos b { color: var(--pc); font-family: var(--sans); font-size: 13px; } .pp-pos span { font: 11.5px var(--sans); color: #6b7280; }
.pp-pos p { margin: 0 0 4px; }
.pp-note .callout { margin: 10px 0; }
.pp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.pp-card { border: 1px solid #e8e2d4; border-radius: 10px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; min-height: 110px; box-shadow: 0 2px 6px rgba(0, 0, 0, .05); }
.pp-card b { font: 600 13px var(--sans); } .pp-card span { font-size: 13px; color: #4a5263; border-top: 1px dashed #e8e2d4; padding-top: 6px; }
.pp-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 190px; background: linear-gradient(180deg, rgba(255, 253, 248, 0), #fffdf8 62%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 46px; z-index: 2; }
.pp-fade span { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px var(--sans); color: #1f7cf0; background: #fff; border: 1px solid #f0d6d6; border-radius: 99px; padding: 7px 14px; box-shadow: 0 6px 16px rgba(31, 124, 240, .12); }
.pp-fade .ic { width: 14px; height: 14px; }
.mk-report { color: var(--ink-3); } .mk-report .ic { width: 15px; height: 15px; }
.mk-reasons { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.pf-rep { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; background: var(--paper); }
.pf-rep > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pf-rep small { color: var(--ink-3); }
.pf-rep.done { opacity: .6; } .pf-rep-a { display: flex; gap: 6px; }
@media (max-width: 760px) { .mk-reading .pp-pages { grid-template-columns: 1fr; } .pp-sheet { padding: 40px 22px 52px; min-height: 460px; } .pp-sheet > header, .pp-sheet > footer { left: 22px; right: 22px; } }

/* =====================================================================
   Musterlösung: verschwommen bis zum Aufdecken, schwebendes Prüfungsschema
   ===================================================================== */
.sol .sol-p { transition: filter .3s ease, opacity .3s ease; }
.sol-masked .sol-p { filter: blur(7px); opacity: .55; user-select: none; cursor: pointer; }
.sol-masked .sol-body .norm-box { opacity: 0; }
.sol-mask-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding: 8px 10px; border-radius: 12px; background: var(--hover); }
.sol-peeking .sol-peek, .sol-mask-bar .sol-peek:hover { border-color: var(--pr-good); }
.sol-peeking .sol-peek { background: color-mix(in srgb, var(--pr-good) 14%, var(--paper)); color: var(--pr-good); }
.sol-nav.floating { position: fixed; right: 24px; bottom: 24px; margin: 0; float: none; width: 320px; z-index: 30; }
.ex-hero-plain { grid-template-columns: 1fr; margin-bottom: 14px; }
.ex-sv { margin-bottom: 14px; } .ex-sol { margin-bottom: 40px; }
.ex-kick { display: flex; align-items: center; gap: 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }
.ex-kick .ic { width: 14px; height: 14px; }
@media (max-width: 1100px) { .sol-nav.floating { position: static; width: 100%; margin: 14px 0 0; } }
/* Normrahmen nicht über verschwommenem Lösungstext zeigen */
.sol-masked .norm-layer { opacity: 0; }
.sol .norm-layer { transition: opacity .3s ease; }
/* Leseprobe: Musterlösung schlicht, ab wenigen Zeilen verschwommen */
.pp-sh { font-weight: 700; margin-top: 12px !important; text-align: left !important; }
.pp-blur { filter: blur(4.5px); opacity: .6; user-select: none; pointer-events: none; }

/* =====================================================================
   Schemata: Übersicht wie früher (Ordner, Karten mit Fragestellung)
   ===================================================================== */
.sc-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.sc-tools .pr-search { flex: 1; min-width: 220px; margin: 0; }
.sc-tools select { height: 38px; border-radius: 10px; }
.sc-sec { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 16px 0 10px; }
.sc-sec .ic { width: 14px; height: 14px; }
.sc-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sc-folder { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.sc-folder:hover { border-color: var(--ink-3); }
.sc-folder > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; } .sc-folder small { color: var(--ink-3); }
.sc-fico .ic { width: 26px; height: 26px; color: #d99a06; }
.sc-folder.drop-over, .pr-path a.drop-over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); transform: scale(1.02); }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.sc-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.sc-card:hover { border-color: var(--ink-3); box-shadow: var(--shadow); }
.sc-card.dragging { opacity: .45; transform: scale(.98); }
.sc-grip { position: absolute; top: 12px; right: 14px; color: var(--ink-3); cursor: grab; font-size: 15px; letter-spacing: -2px; }
.sc-ct { font: 650 18px/1.3 var(--serif); padding-right: 22px; }
.sc-cd { color: var(--ink-3); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sc-minibox { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 12px; background: var(--hover); border-left: 3px solid var(--lc); margin-top: 4px; }
.sc-minibox span { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: calc((var(--lv) - 1) * 16px); }
.sc-minibox i { width: 8px; height: 8px; border-radius: 2px; background: var(--nc); flex: none; }
.sc-minibox b { color: var(--nc); font-weight: 700; }
.sc-cf { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 4px; font-size: 13px; }
.sc-subj { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); }
.sc-subj i { width: 9px; height: 9px; border-radius: 50%; }

/* Schemata üben: Felder + schwebende Bausteine */
.st-choose .st-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.st-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); text-align: left; color: var(--ink); }
.st-opt:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.st-opt .ic { width: 22px; height: 22px; color: var(--accent); } .st-opt small { color: var(--ink-3); }
.st-page { padding-bottom: 260px; }
.st-q { max-width: 860px; margin: 0 auto 14px; padding: 16px 20px; border-radius: 14px; background: var(--paper); color: var(--ink-2); font-size: 16px; }
.st-board { max-width: 860px; margin: 0 auto; padding: 18px 20px; border-radius: 16px; background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.st-row { display: flex; align-items: flex-start; gap: 10px; padding-left: calc((var(--lv) - 1) * 22px); min-height: 48px; flex-wrap: wrap; }
.st-row > b { flex: none; min-width: 30px; padding-top: 12px; color: var(--accent); font-weight: 700; }
.st-row.fixed { align-items: center; } .st-row.fixed > b { padding-top: 0; color: var(--ink); } .st-row.fixed span { font-weight: 600; }
.st-slot { flex: 1; min-height: 46px; border-radius: 10px; border: 1.5px dashed transparent; display: flex; align-items: center; padding: 4px; transition: background .15s, border-color .15s; }
.st-slot.next { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 5%, var(--paper)); }
.st-slot:not(.filled):hover, .st-slot.st-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--paper)); }
.st-slot.flash { animation: st-flash 1s ease; }
@keyframes st-flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent); } }
.st-row.ok > b { color: var(--pr-good); } .st-row.bad > b { color: var(--pr-bad); }
.st-fix { flex-basis: 100%; padding-left: 40px; color: var(--pr-good); font-size: 13px; }
.st-fix::before { content: '→ '; }
.st-pill, .pz-card, .cz-bub { touch-action: none; user-select: none; -webkit-user-select: none; }
.st-pill { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 10px; color: #fff; font: 700 14px var(--sans); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #ff6b6b)); box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 28%, transparent); cursor: grab; max-width: 100%; }
.st-pill.float { animation: bob 4.5s ease-in-out var(--d) infinite; }
.st-pill.sel { outline: 3px solid #1d2230; outline-offset: 2px; }
.st-pill.joker { background: linear-gradient(135deg, #7a0f12, var(--accent)); }
.st-pill.ok { background: var(--pr-good); box-shadow: none; } .st-pill.bad { background: var(--pr-bad); box-shadow: none; }
.st-hidden, .dz-hidden { opacity: .25; }
.st-ghost, .dz-ghost { position: fixed; z-index: 100; pointer-events: none; transform: rotate(-2deg) scale(1.04); box-shadow: 0 14px 30px rgba(0, 0, 0, .25) !important; animation: none !important; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.st-tray, .pz-tray { position: fixed; left: var(--sb-w); right: 0; bottom: 0; z-index: 25; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 8px 24px 14px; box-shadow: 0 -10px 30px rgba(0, 0, 0, .08); }
body.sb-hidden .st-tray, body.sb-hidden .pz-tray, body.focus-mode .st-tray, body.focus-mode .pz-tray { left: 0; }
html.is-mobile .st-tray, html.is-mobile .pz-tray { left: 0; bottom: calc(64px + env(safe-area-inset-bottom)); }
.st-handle { display: block; width: 46px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 10px; }
.st-pool, .pz-pool { display: flex; flex-wrap: wrap; gap: 10px; max-height: 32vh; overflow-y: auto; padding: 6px 2px; }
.st-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.st-tray.empty .st-hint, .st-empty, .pz-empty { color: var(--ink-3); font-size: 13px; }
.st-tray.st-over, .pz-tray .dz-over { background: color-mix(in srgb, var(--accent) 5%, var(--paper)); }
.st-res, .pz-res { max-width: 860px; margin: 16px auto 0; }

/* Streite: Rätsel und Lückentext */
.pz-page { padding-bottom: 300px; }
.pz-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pz-col { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-height: 240px; display: flex; flex-direction: column; }
.pz-ch { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 600; color: var(--ink-2); }
.pz-badge { font: 800 12px var(--sans); padding: 3px 8px; border-radius: 6px; color: #fff; } .pz-badge.aa { background: #d99a06; } .pz-badge.hm { background: #1f9d74; }
.c-aa { color: #c08400; } .c-hm { color: #1f9d74; }
.pz-drop { flex: 1; display: flex; flex-direction: column; gap: 8px; border-radius: 12px; padding: 6px; transition: background .15s; }
.pz-drop.dz-over { background: var(--hover); }
.pz-card { padding: 10px 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); font: 14.5px/1.5 var(--serif); cursor: grab; }
.pz-pool .pz-card { max-width: 420px; }
.pz-card.float { animation: bob 5s ease-in-out var(--d) infinite; }
.pz-card.sel { outline: 3px solid var(--accent); outline-offset: 1px; }
.pz-card.ok { border-color: var(--pr-good); background: color-mix(in srgb, var(--pr-good) 10%, var(--paper)); }
.pz-card.pos { border-color: var(--pr-mid); background: color-mix(in srgb, var(--pr-mid) 12%, var(--paper)); }
.pz-card.bad { border-color: var(--pr-bad); background: color-mix(in srgb, var(--pr-bad) 10%, var(--paper)); }
.pz-card.locked { cursor: default; }
.pz-ph { height: 44px; border: 2px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); }
.pz-empty { padding: 18px; text-align: center; border: 1.5px dashed var(--line); border-radius: 12px; }
.pz-l { font-weight: 700; } .pz-l.ok { color: var(--pr-good); } .pz-l.pos { color: var(--pr-mid); } .pz-l.bad { color: var(--pr-bad); }
.cz-blocks { display: flex; flex-direction: column; gap: 12px; }
.cz-block { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--pc); border-radius: 0 14px 14px 0; padding: 14px 18px; }
.cz-block .ds-ph { color: var(--pc); }
.cz-text { font: 16px/2.1 var(--serif); }
.cz-gap { display: inline-flex; align-items: center; vertical-align: middle; min-width: calc(var(--w) * .9); min-height: 32px; margin: 0 2px; border-radius: 8px; border: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 4%, var(--paper)); }
.cz-gap.filled { border-color: transparent; background: transparent; }
.cz-gap.dz-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); }
.cz-bub { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 99px; color: #fff; font: 700 13.5px/1.6 var(--sans); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #ff6b6b)); box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 28%, transparent); cursor: grab; }
.cz-bub.float { animation: bob 4s ease-in-out var(--d) infinite; }
.cz-bub.sel { outline: 3px solid #1d2230; outline-offset: 2px; }
.cz-bub.ok { background: var(--pr-good); box-shadow: none; } .cz-bub.bad { background: var(--pr-bad); box-shadow: none; }
.cz-fix { color: var(--pr-good); font: 600 12.5px var(--sans); margin: 0 4px; } .cz-fix::before { content: '→ '; }
@media (max-width: 760px) { .pz-cols { grid-template-columns: 1fr; } .st-choose .st-opts { grid-template-columns: 1fr; } .st-tray, .pz-tray { padding: 6px 12px 10px; } }

/* =====================================================================
   Titelbild-Editor
   ===================================================================== */
.modal.modal-tbx { width: min(1240px, 96vw); height: min(820px, 92vh); padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.modal-tbx > .modal-head, .modal-tbx > .modal-foot { display: none; }
.modal-tbx > .modal-body { flex: 1; padding: 0; overflow: hidden; display: flex; }
.tbx { flex: 1; display: flex; flex-direction: column; min-height: 0; outline: none; }
.tbx-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.tbx-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #e8700a); color: #fff; }
.tbx-logo .ic { width: 18px; height: 18px; }
.tbx-ttl { display: flex; flex-direction: column; line-height: 1.2; } .tbx-ttl small { color: var(--ink-3); font-size: 12px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbx-sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; }
.tbx-top .icon-btn:disabled { opacity: .35; }
.tbx-main { flex: 1; display: grid; grid-template-columns: 78px 330px minmax(0, 1fr); min-height: 0; }
.tbx-rail { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; border-right: 1px solid var(--line); background: var(--paper); }
.tbx-rail button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-3); font-size: 11px; font-weight: 600; transition: background .15s, color .15s; }
.tbx-rail button .ic { width: 22px; height: 22px; }
.tbx-rail button:hover { background: var(--hover); color: var(--ink); }
.tbx-rail button.on { background: var(--accent-soft); color: var(--accent); }
.tbx-panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--paper); }
.tbx-ph { margin: 0; padding: 16px 18px 6px; font: 650 17px var(--serif); }
.tbx-pane { flex: 1; overflow-y: auto; padding: 6px 18px 20px; }
.tbx-help { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-3); }
.tbx-lbl { margin: 16px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.tbx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tbx-opt { display: flex; flex-direction: column; gap: 5px; padding: 4px; border: 2px solid transparent; border-radius: 12px; background: transparent; color: var(--ink-2); font-size: 12px; text-align: left; transition: border-color .15s, transform .15s; }
.tbx-opt svg { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .1); }
.tbx-opt:hover { transform: translateY(-1px); } .tbx-opt.on { border-color: var(--accent); }
.tbx-bgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tbx-bg { height: 54px; border-radius: 12px; border: 2px solid transparent; display: flex; align-items: flex-end; padding: 6px 8px; font-size: 11.5px; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); transition: transform .15s; }
.tbx-bg:hover { transform: scale(1.03); } .tbx-bg.on { border-color: var(--ink); }
.tbx-kind { margin-bottom: 10px; }
.tbx-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.tbx-k { width: 64px; font-size: 13px; color: var(--ink-2); }
.tbx-row input[type=range] { flex: 1; accent-color: var(--accent); } .tbx-row output { width: 40px; text-align: right; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tbx-color { position: relative; width: 36px; height: 30px; border-radius: 8px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); cursor: pointer; overflow: hidden; }
.tbx-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.tbx-sw { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 10px; }
.tbx-sw button { aspect-ratio: 1; border-radius: 8px; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); transition: transform .12s; }
.tbx-sw button:hover { transform: scale(1.1); } .tbx-sw button.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.tbx-pats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tbx-pat { display: flex; flex-direction: column; gap: 4px; padding: 3px; border: 2px solid transparent; border-radius: 10px; background: transparent; font-size: 11px; color: var(--ink-2); }
.tbx-pat svg { width: 100%; height: auto; border-radius: 6px; display: block; } .tbx-pat svg text { display: none; } .tbx-pat.on { border-color: var(--accent); }
.tbx-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.tbx-field input { height: 40px; font-size: 15px; font-weight: 400; }
.tbx-fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tbx-fonts button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink-2); font-size: 12px; }
.tbx-fonts b { font-size: 26px; color: var(--ink); } .tbx-fonts button.on { border-color: var(--accent); background: var(--accent-soft); }
.tbx-row .btn.on { border-color: var(--accent); color: var(--accent); }
.tbx-slots { display: flex; gap: 8px; margin-bottom: 4px; }
.tbx-slots button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 11.5px; color: var(--ink-2); }
.tbx-slots button.on { border-color: var(--accent); color: var(--accent); }
.tbx-slotic svg { width: 64px; height: auto; border-radius: 6px; display: block; }
.tbx-search { margin: 12px 0 6px; }
.tbx-stage { display: flex; flex-direction: column; min-width: 0; background: var(--desk); }
.tbx-canvas { flex: 1; display: grid; place-items: center; padding: 30px; overflow: auto;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1px); background-size: 18px 18px; }
.tbx-art { width: min(100%, 640px); animation: tbx-in .25s ease; }
.tbx-art.big > svg { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 24px 50px rgba(0, 0, 0, .2); }
@keyframes tbx-in { from { opacity: .4; transform: scale(.985); } to { opacity: 1; transform: none; } }
.tbx-art .tbx-hit { cursor: pointer; transition: opacity .15s; }
.tbx-art.big .tbx-hit:hover { opacity: .78; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .7)); }
.tbx-art.card { width: 300px; }
.tbx-mock { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .14); }
.tbx-mthumb svg { display: block; width: 100%; height: auto; }
.tbx-mbody { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; } .tbx-mbody i { width: 40%; height: 8px; border-radius: 4px; background: var(--line); }
.tbx-mbody b { font: 650 16px var(--serif); } .tbx-mbody small { color: var(--ink-3); }
.tbx-foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--paper); }
@media (max-width: 900px) {
  .modal.modal-tbx { width: 100vw; height: 100vh; border-radius: 0; }
  .tbx-main { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); }
  .tbx-stage { order: -1; } .tbx-canvas { padding: 16px; } .tbx-foot { display: none; }
  .tbx-rail { flex-direction: row; justify-content: space-around; border-right: 0; border-bottom: 1px solid var(--line); padding: 4px; }
  .tbx-rail button { flex: 1; padding: 6px 2px; }
  .tbx-panel { border-right: 0; max-height: 46vh; } .tbx-ttl small, .tbx-sep { display: none; }
}

.st-pool, .pz-pool { flex-direction: row; align-items: flex-start; }
.cz-pool .cz-bub, .st-pool .st-pill { flex: none; }

/* =====================================================================
   Definitionen (wie im Jura-Trainer)
   ===================================================================== */
.df-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.df-bar .pr-filter { flex: 1; margin: 0; } .df-bar select { height: 36px; border-radius: 10px; }
.df-list { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.df-topic { padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.df-topic:hover { transform: translateY(-2px); border-color: var(--ink-3); box-shadow: var(--shadow); }
.df-row1 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.df-main { min-width: 0; } .df-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .df-name b { font: 650 20px/1.25 var(--serif); }
.df-meta { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.df-acts { display: flex; gap: 4px; flex: none; opacity: .6; transition: opacity .15s; } .df-topic:hover .df-acts { opacity: 1; }
.df-prog { margin-top: 14px; }
.df-barlabel { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; } .df-barlabel b { color: var(--ink); }
.df-barwrap { height: 9px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.df-barwrap i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 65%, #ff8a8a)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.df-barwrap.sm { display: inline-block; width: 140px; height: 7px; vertical-align: middle; margin-left: 6px; }
.df-add { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border: 1.5px dashed var(--line); border-radius: 16px; background: transparent; color: var(--ink-3); font-weight: 600; transition: border-color .15s, color .15s; }
.df-add:hover { border-color: var(--accent); color: var(--accent); }
.df-streak-s { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; } .df-streak-s .ic { width: 13px; height: 13px; }
/* Training */
.df-train { max-width: 900px; }
.df-streak { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; padding: 6px 12px; border-radius: 12px; background: var(--hover); color: var(--ink-3); }
.df-streak b { font: 800 20px var(--sans); } .df-streak small { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.df-streak.on { background: var(--accent-soft); color: var(--accent); }
.df-streak.bump { animation: df-bump .6s cubic-bezier(.2, 1.6, .4, 1); }
.df-streak.drop { animation: df-drop .5s ease; }
@keyframes df-bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes df-drop { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.df-qcard { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-bottom: 12px; }
.df-qhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.df-qt { min-width: 0; } .df-qtitle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .df-qtitle b { font: 650 24px/1.25 var(--serif); }
.df-stepper { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.df-arrow { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; color: var(--ink-2); }
.df-arrow:hover { border-color: var(--ink-3); color: var(--ink); } .df-arrow .ic { width: 15px; height: 15px; }
.df-qidx { font-size: 13px; color: var(--ink-3); }
.df-badge { flex: none; padding: 5px 11px; border-radius: 99px; font: 700 12.5px var(--sans); color: #fff; background: var(--c); }
.df-badge.new { background: var(--hover); color: var(--ink-2); }
.df-sol { position: relative; margin-top: 16px; border-radius: 14px; background: var(--hover); padding: 16px 52px 16px 18px; min-height: 64px; }
.df-soltext { font: 16px/1.65 var(--serif); transition: filter .35s ease, opacity .35s ease; cursor: pointer; }
.df-soltext p { margin: 0 0 6px; }
.df-soltext.masked { filter: blur(7px); opacity: .55; user-select: none; }
.df-revhint { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.df-revhint span { pointer-events: auto; cursor: pointer; padding: 6px 12px; border-radius: 99px; background: color-mix(in srgb, var(--paper) 90%, transparent); font-size: 12.5px; color: var(--ink-2); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.df-eye { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; color: var(--ink-2); }
.df-eye .ic { width: 17px; height: 17px; } .df-eye .count { position: absolute; bottom: -6px; right: -6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font: 700 11px/18px var(--sans); text-align: center; }
.df-eye .count:empty { display: none; } .df-eye.on { border-color: var(--accent); color: var(--accent); }
.df-ans { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 6px 6px 8px; transition: border-color .15s, box-shadow .15s; }
.df-ans:focus-within { border-color: var(--ink-3); box-shadow: 0 6px 20px rgba(0, 0, 0, .06); }
.df-ans textarea { width: 100%; border: 0 !important; box-shadow: none !important; outline: none; resize: vertical; min-height: 120px; padding: 12px 14px; font: 16px/1.6 var(--serif); background: transparent; }
.df-ans.done textarea { color: var(--ink-2); }
.df-ans textarea.shake { animation: df-drop .35s ease; }
.df-ansfoot { display: flex; align-items: center; gap: 10px; padding: 0 6px 0 12px; }
.df-hk { flex: 1; font-size: 12px; color: var(--ink-3); }
.df-hk kbd { font: 600 11px var(--sans); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--hover); color: var(--ink-2); }
.df-send { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; transition: transform .12s, box-shadow .15s; }
.df-send:hover { transform: translateY(-1px); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); } .df-send .ic { width: 19px; height: 19px; }
.df-result { margin-top: 14px; animation: fadeup .35s ease; }
.df-plus { color: var(--pr-good); font-weight: 600; margin: 6px 0 0; } .df-minus { color: var(--ink-3); margin: 6px 0 0; }
.df-result .pr-result-foot { align-items: center; }
/* Meilenstein-Popup */
.modal.modal-ms { width: min(440px, 94vw); text-align: center; overflow: hidden; }
.modal-ms > .modal-head { display: none; }
.df-ms { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 0; }
.df-ms-gif { width: 100%; min-height: 180px; border-radius: 14px; overflow: hidden; background: var(--hover); display: grid; place-items: center; position: relative; margin-bottom: 10px; }
.df-ms-gif img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.df-ms-gif small { position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.df-ms-load { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.df-ms-fallback { font-size: 92px; animation: pop .8s cubic-bezier(.2, 1.6, .4, 1); }
.df-ms-n { font: 800 64px/1 var(--sans); color: var(--accent); animation: pop .7s cubic-bezier(.2, 1.6, .4, 1); }
.df-ms h2 { margin: 6px 0 2px; font: 700 24px var(--serif); } .df-ms p { margin: 0; }
.confetti-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 400; }

/* =====================================================================
   Wiederholungen: Korrekturen & mehr Spaß
   ===================================================================== */
.rv-note { position: relative; max-height: 62vh; overflow-y: auto; margin: 12px 0; padding-right: 6px; }
.rv-note-in.sheet-content { min-height: 0; font-size: 15.5px; position: relative; }
.rv-note-in.sheet-content > * { position: relative; z-index: 1; }
.pp-note { font-size: 14px; }
.pp-note table, .rv-note-in table { border-collapse: collapse; width: 100%; margin: .8em 0; font-size: .92em; display: table; }
.pp-note th, .pp-note td { border: 1px solid #e8e2d4; padding: 5px 8px; vertical-align: top; }
.rv-progress { position: sticky; top: 0; z-index: 5; height: 5px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin: -6px 0 14px; }
.rv-progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #ff9a9a)); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.rv-stepbody { animation: fadeup .3s ease; }
.rv-flash { transition: transform .16s ease-in; transform-style: preserve-3d; }
.rv-flash.flipping { transform: perspective(900px) rotateX(85deg); }
.rv-flash.flipped { animation: rv-flipin .25s ease-out; }
@keyframes rv-flipin { from { transform: perspective(900px) rotateX(-85deg); } to { transform: none; } }
.rv-combo { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); padding: 8px 18px; border-radius: 99px; background: var(--accent); color: #fff; font: 700 14px var(--sans); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 40%, transparent); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); z-index: 30; }
.rv-stats { display: flex; justify-content: center; gap: 28px; margin: 14px 0 6px; }
.rv-stats span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--ink-3); } .rv-stats b { font: 800 30px var(--sans); color: var(--ink); }

/* =====================================================================
   Gesetzesfenster: Kommentierung aus der Norm-Akte
   ===================================================================== */
.law-cmt { margin: 14px 0 4px; }
.law-cmt.has, .law-cmt.editing { border: 1px solid color-mix(in srgb, #d99a06 35%, var(--line)); background: color-mix(in srgb, #d99a06 7%, var(--paper)); border-radius: 12px; padding: 10px 12px; animation: fadeup .25s ease; }
.law-cmt header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.law-cmt header b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; } .law-cmt header .ic { width: 15px; height: 15px; color: #b07d00; }
.law-cmt-t { font: 14.5px/1.6 var(--serif); } .law-cmt-t p { margin: 0 0 6px; }
.law-cmt textarea { width: 100%; min-height: 110px; font: 14.5px/1.55 var(--serif); }
.law-cmt-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-3); text-decoration: none; } .law-cmt-link .ic { width: 12px; height: 12px; }
.law-cmt-add { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line); background: transparent; border-radius: 10px; padding: 7px 12px; font-size: 12.5px; color: var(--ink-3); }
.law-cmt-add:hover { border-color: var(--ink-3); color: var(--ink); } .law-cmt-add .ic { width: 14px; height: 14px; }

/* Durchgehen: Hülle in voller Texthöhe – Normrahmen liegen darin und scrollen mit */
.rv-note-host { position: relative; }
.rv-note-host > .norm-layer { position: absolute; inset: 0; z-index: 0; }

/* Werkzeugleiste: immer einzeilig – Überzähliges im „Mehr“-Fenster */
.toolbar { flex-wrap: nowrap; }
.toolbar > * { flex: none; }
.toolbar > .tb-spacer { flex: 1; min-width: 4px; }
.tb-overflow { position: relative; border-right: 0; }
.tb-overflow[hidden] { display: none; }
.tb-more.on { background: var(--hover); color: var(--ink); }
.tb-panel { position: absolute; top: calc(100% + 8px); right: 0; left: auto; z-index: 30; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .14); animation: fadeup .15s ease; }
.tb-panel[hidden] { display: none; }
.tb-panel > .tb-group { border-right: 0; margin: 0; padding: 0; }
.tb-panel > .tb-group + .tb-group { border-top: 1px solid var(--line-2); padding-top: 4px; width: 100%; }
/* Kompakt: beschriftete Werkzeuge nur als Symbol (Titel bleibt als Tooltip) */
.toolbar.compact > .tb-group .tb-wide > span:not(.tb-normcount) { display: none; }
.toolbar.compact > .tb-group .tb-wide { padding: 0 6px; }

/* Kalender-Abo: separater Lernzeiten-Kalender (pink) */
.cal-study { margin: 12px 0; padding: 14px 16px; border-radius: 14px; border: 1px solid color-mix(in srgb, #E6007E 35%, var(--line)); background: color-mix(in srgb, #E6007E 6%, var(--paper)); }
.cal-study-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.cal-study-h i { width: 12px; height: 12px; border-radius: 4px; background: #E6007E; flex: none; }
.cal-study .cal-url { margin-bottom: 10px; }
.btn.cal-pink { background: #E6007E; border-color: #E6007E; }
.btn.cal-pink:hover { background: #c8006e; border-color: #c8006e; }

/* =====================================================================
   Menüband (wie Word): Gruppen mit Beschriftung, dichte Knöpfe, Formatvorlagen
   ===================================================================== */
.toolbar { display: flex; align-items: stretch; flex-wrap: nowrap; gap: 0; padding: 4px 6px 0; min-height: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.toolbar > .tb-spacer { flex: 1; min-width: 6px; }
.rb-group { flex: none; display: flex; flex-direction: column; padding: 0 7px; border-right: 1px solid var(--line-2); }
.rb-group:last-of-type { border-right: 0; }
.rb-body { flex: 1; display: flex; align-items: center; gap: 2px; padding-top: 2px; }
.rb-body:has(> .rb-row) { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.rb-row { display: flex; align-items: center; gap: 1px; }
.rb-stack { display: flex; flex-direction: column; gap: 2px; }
.rb-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.rb-label { display: block; text-align: center; font: 500 10.5px/1 var(--sans); color: var(--ink-3); padding: 4px 0 5px; white-space: nowrap; letter-spacing: .01em; }
.toolbar .tb { width: 28px; height: 28px; min-width: 28px; padding: 0; border-radius: 5px; }
.toolbar .tb .ic { width: 16px; height: 16px; }
.toolbar .tb.tb-drop { width: 16px; min-width: 16px; }
.toolbar .tb.tb-drop .ic { width: 12px; height: 12px; }
.toolbar .tb.tb-wide { width: auto; padding: 0 6px; }
.toolbar .tb.tb-big { width: 60px; height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 2px; font-size: 11.5px; font-weight: 600; color: var(--ink); }
.toolbar .tb.tb-big .ic { width: 24px; height: 24px; }
/* Formatvorlagen-Galerie */
.rb-styles { min-width: 0; flex: 0 1 auto; }
.rb-styles .rb-body { min-width: 0; }
.rb-gallery { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; padding: 1px; }
.rb-gallery::-webkit-scrollbar { display: none; }
.tb-style { flex: none; width: 92px; height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); color: var(--ink); overflow: hidden; transition: border-color .12s, background .12s; }
.tb-style:hover { border-color: var(--ink-3); background: var(--hover); }
.tb-style.on { border-color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-2); background: var(--hover); }
.st-prev { max-width: 84px; overflow: hidden; white-space: nowrap; line-height: 1.15; }
.st-name { font: 10.5px/1 var(--sans); color: var(--ink-3); white-space: nowrap; }
.st-p { font: 14px var(--serif); }
.st-h1 { font: 650 20px var(--serif); letter-spacing: -.01em; }
.st-h2 { font: 650 17px var(--serif); }
.st-h3 { font: 600 14px var(--sans); }
.st-blockquote { font: italic 13.5px var(--serif); color: var(--ink-2); border-left: 2px solid var(--line); padding-left: 5px; }
.st-pre { font: 12px var(--mono); background: var(--hover); padding: 1px 4px; border-radius: 3px; }
.toolbar.disabled .rb-gallery { opacity: .4; pointer-events: none; }

/* Kopfzeile der Mitschrift: eine Zeile */
.note-bar { flex-wrap: nowrap; gap: 8px; }
.note-bar .meta-date { flex: none; font-size: 13px; color: var(--ink-2); }
.meta-settings { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink-2); }
.meta-settings:hover { border-color: var(--ink-3); color: var(--ink); }
.meta-settings .dot, .doc-course .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.meta-settings .ic { width: 16px; height: 16px; }
.doc-set { display: flex; flex-direction: column; gap: 12px; }
.doc-course { display: flex; align-items: center; gap: 8px; } .doc-course select { flex: 1; }
.doc-info { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.doc-info span { display: inline-flex; align-items: center; gap: 5px; } .doc-info .ic { width: 14px; height: 14px; color: var(--ink-3); }
.doc-toggle { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.doc-toggle input { margin-top: 3px; } .doc-toggle span { display: flex; flex-direction: column; gap: 2px; } .doc-toggle small { color: var(--ink-3); }
.doc-toggle.off { opacity: .65; cursor: default; }
@media print { .note-bar { display: flex !important; } .note-bar > :not(.meta-date) { display: none !important; } .meta-date .ic { display: none; } .meta-date { border: 0; padding: 0; } }
html.is-mobile .note-bar { flex-wrap: wrap; }

/* Bilder & Skizzen verschieben */
.ed-drop-line { position: absolute; height: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); pointer-events: none; z-index: 20; }
.ed-drag-ghost { position: fixed; width: 140px; max-height: 100px; object-fit: contain; opacity: .85; border-radius: 6px; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); pointer-events: none; z-index: 300; background: var(--paper); }
.img-tools [data-drag] { cursor: grab; }

/* Auswahlfelder im macOS-Stil (einheitlich in Safari/Chrome/Firefox) */
select:not([multiple]):not([size]) {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 7px; background-color: var(--paper); color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M2 5l3-3 3 3M2 9l3 3 3-3' fill='none' stroke='%238a91a0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 10px 14px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .04); cursor: pointer; text-overflow: ellipsis;
}
select:not([multiple]):not([size]):hover { border-color: color-mix(in srgb, var(--ink-3) 70%, var(--line)); }
select:not([multiple]):not([size]):focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink-3) 18%, transparent); }
select::-ms-expand { display: none; }
/* Formatvorlagen: Galerie füllt freien Platz; bei Platzmangel als Knopf mit Auswahlmenü */
.rb-styles { flex: 1 1 auto; }
.rb-style-btn { display: none; align-items: center; gap: 6px; height: 56px; padding: 0 8px 0 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--paper); color: var(--ink); }
.rb-style-btn:hover { border-color: var(--ink-3); background: var(--hover); }
.rb-style-btn .st-prev { max-width: 70px; } .rb-style-btn .st-name { display: block; max-width: 86px; overflow: hidden; text-overflow: ellipsis; }
.rb-style-btn .ic { width: 12px; height: 12px; color: var(--ink-3); }
.rb-style-btn { flex-direction: row; } .rb-style-btn > .st-prev + .st-name { margin-left: 2px; }
.rb-styles.collapsed { flex: none; }
.rb-styles.collapsed .rb-gallery { display: none; }
.rb-styles.collapsed .rb-style-btn { display: inline-flex; }
.st-mi { display: inline-flex; align-items: center; min-height: 26px; }
.st-mi .st-prev { max-width: none; }
/* Enge Spalte: zusammenrücken (wie Word bei schmalem Fenster) */
.toolbar.tight .rb-group { padding: 0 4px; }
.toolbar.tight .rb-style-btn .st-name { display: none; }
.toolbar.tight .rb-style-btn { padding: 0 6px; }
.toolbar.tight .tb.tb-big { width: 50px; font-size: 10.5px; }
.toolbar.tight .tb.tb-big .ic { width: 22px; height: 22px; }
.toolbar.tight .tb { width: 26px; min-width: 26px; height: 26px; }
.toolbar.tight .tb.tb-drop { width: 14px; min-width: 14px; }
.toolbar.tight .tb.tb-wide { width: auto; }
.toolbar.tight .tb.tb-big { width: 50px; height: 56px; }

/* Auswahl-Fenster im Editor */
.sel-bubble { position: fixed; z-index: 60; display: flex; align-items: center; gap: 1px; padding: 4px; border-radius: 10px; background: #1d2230; color: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, .28), 0 1px 3px rgba(0, 0, 0, .2); }
.sel-bubble[hidden] { display: none; }
.sel-bubble.in { animation: sb-in .14s ease-out; }
.sel-bubble.below.in { animation-name: sb-in-below; }
@keyframes sb-in { from { opacity: 0; transform: translateY(4px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sb-in-below { from { opacity: 0; transform: translateY(-4px) scale(.97); } to { opacity: 1; transform: none; } }
.sel-bubble button { position: relative; min-width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #fff; font: 600 15px var(--serif); padding: 0 6px; }
.sel-bubble button:hover { background: rgba(255, 255, 255, .12); }
.sel-bubble button.on { background: rgba(255, 255, 255, .2); }
.sel-bubble .ic { width: 16px; height: 16px; }
.sel-bubble .sb-drop { min-width: 16px; padding: 0 2px; } .sel-bubble .sb-drop .ic { width: 12px; height: 12px; opacity: .8; }
.sel-bubble .sb-swatch { position: absolute; left: 7px; right: 7px; bottom: 4px; height: 3px; border-radius: 2px; }
.sel-bubble .sb-del:hover { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.sel-bubble .sb-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .2); margin: 0 3px; }
html[data-theme=dark] .sel-bubble { background: #f4f5f7; color: #1d2230; }
html[data-theme=dark] .sel-bubble button { color: #1d2230; } html[data-theme=dark] .sel-bubble button:hover { background: rgba(0, 0, 0, .08); }
html[data-theme=dark] .sel-bubble button.on { background: rgba(0, 0, 0, .14); } html[data-theme=dark] .sel-bubble .sb-sep { background: rgba(0, 0, 0, .15); }
@media print { .sel-bubble { display: none !important; } }

/* Akkubetrieb: keine Endlos-Animationen (schwebende Bausteine, Flamme, Blinken bleibt) */
html.eco .st-pill.float, html.eco .pz-card.float, html.eco .cz-bub.float, html.eco .rv-streak.lit .rv-flame, html.eco .xs-time.crit { animation: none !important; }
.rv-streak.lit .rv-flame { animation-iteration-count: 6; }
/* Wiederholungen: optionaler Abschnitt (eingeklappt) */
.rv-optional > summary { display: flex; align-items: baseline; gap: 10px; cursor: pointer; padding: 10px 2px; list-style: none; }
.rv-optional > summary::-webkit-details-marker { display: none; }
.rv-optional > summary::before { content: '›'; display: inline-block; width: 12px; color: var(--ink-3); transition: transform .15s; }
.rv-optional[open] > summary::before { transform: rotate(90deg); }
.rv-optional > summary b { font: 650 17px var(--serif); } .rv-optional > summary span { font-size: 12.5px; }
.dash-rv small { font-size: 12px; }

/* Energiesparmodus: keine Endlos-Animationen, Schreibmarke ohne Blinken */
html.eco .smooth-caret.show { animation: none; opacity: 1; }
html.eco .df-streak.bump, html.eco .df-ms-n, html.eco .df-ms-fallback, html.eco .rv-flame-big.pop, html.eco .rv-combo, html.eco .wk-bar i, html.eco .df-ms-load { animation: none !important; }
html.eco .df-barwrap i, html.eco .rv-progress i { transition: none; }

/* macOS (Safari & Co.): Weichzeichner hinter Leisten durch deckenden Hintergrund ersetzen – spart Rechenarbeit beim Scrollen.
   Windows/Linux behalten den Effekt. */
html.os-mac .m-plan-top { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
html.os-mac.is-mobile #tabbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--paper); }
html.os-mac .st-tray, html.os-mac .pz-tray { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--paper); }

/* =====================================================================
   Klausurcheck
   ===================================================================== */
.modal.modal-kc { width: min(1500px, 97vw); height: min(940px, 94vh); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.modal-kc > .modal-head, .modal-kc > .modal-foot { display: none; }
.modal-kc > .modal-body { flex: 1; padding: 0; display: flex; overflow: hidden; }
.kcheck { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.kc-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kc-logo { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: #fff; } .kc-logo .ic { width: 18px; height: 18px; }
.kc-title { flex: 1; min-width: 200px; height: 34px; font: 600 15px var(--sans); }
.kc-cases { max-width: 240px; height: 34px; }
.kc-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }
.kc-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; cursor: pointer; user-select: none; }
.kc-switch input { display: none; }
.kc-switch span { width: 34px; height: 20px; border-radius: 99px; background: var(--line); position: relative; transition: background .15s; }
.kc-switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.kc-switch input:checked + span { background: var(--pr-good); } .kc-switch input:checked + span::after { transform: translateX(14px); }
.kc-sum { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line-2); min-height: 40px; flex-wrap: wrap; }
.kc-pct b { font: 800 18px var(--sans); }
.kc-chip { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; }
.kc-cols { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0; min-height: 0; }
.kc-col { display: flex; flex-direction: column; min-height: 0; padding: 10px 14px 12px; border-right: 1px solid var(--line-2); }
.kc-col:last-child { border-right: 0; }
.kc-h { margin: 0 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); } .kc-h.sm { margin-top: 10px; }
.kc-pane { position: relative; flex: 1 1 60%; min-height: 160px; display: flex; }
.kc-ta { flex: 1; width: 100%; height: 100%; resize: none; font: 15px/1.65 var(--serif); padding: 12px 14px; border-radius: 10px; }
.kc-view { flex: 1; overflow-y: auto; padding: 10px 92px 10px 14px; border: 1px solid var(--line); border-radius: 10px; font: 15px/1.7 var(--serif); position: relative; }
.kc-p { position: relative; margin: 0 0 10px; padding-left: 10px; border-left: 3px solid transparent; }
.kc-hd { font: 650 15px/1.4 var(--sans); color: var(--lc); }
.kc-bar-same { border-left-color: color-mix(in srgb, var(--pr-good) 70%, transparent); }
.kc-bar-near { border-left-color: var(--pr-mid); } .kc-bar-diff { border-left-color: var(--pr-bad); }
.kc-same { background: color-mix(in srgb, var(--pr-good) 16%, transparent); }
.kc-near { background: color-mix(in srgb, var(--pr-mid) 22%, transparent); }
.kc-diff { background: color-mix(in srgb, var(--pr-bad) 18%, transparent); }
.kc-s { border-radius: 3px; padding: 1px 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.kc-dw { text-decoration: underline wavy var(--pr-bad); text-underline-offset: 3px; }
.kc-note { position: absolute; right: -84px; top: 0; width: 74px; font: 700 10.5px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .04em; padding: 3px 6px; border-radius: 6px; text-align: center; }
.kc-n-near { background: color-mix(in srgb, var(--pr-mid) 25%, var(--paper)); color: color-mix(in srgb, var(--pr-mid) 70%, var(--ink)); }
.kc-n-diff { background: color-mix(in srgb, var(--pr-bad) 18%, var(--paper)); color: var(--pr-bad); }
.kc-map { position: absolute; top: 4px; bottom: 4px; right: 4px; width: 8px; border-radius: 4px; background: var(--line-2); }
.kc-map i { position: absolute; left: 0; right: 0; border-radius: 3px; cursor: pointer; min-height: 3px; }
.kc-map i.kc-bar-near { background: var(--pr-mid); } .kc-map i.kc-bar-diff { background: var(--pr-bad); }
.kc-schema { flex: 0 1 40%; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--hover); }
.kc-node { padding: 4px 8px 4px calc(8px + (var(--lv) - 1) * 16px); border-left: 3px solid var(--lc); border-radius: 0 6px 6px 0; font-size: 13.5px; }
.kc-node b { color: var(--lc); }
@media (max-width: 900px) { .kc-cols { grid-template-columns: 1fr; overflow-y: auto; } .kc-col { border-right: 0; border-bottom: 1px solid var(--line-2); } .kc-pane { min-height: 260px; } }
.kcheck { min-width: 0; width: 100%; }
.kc-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.kc-col, .kc-pane, .kc-view { min-width: 0; }
.kc-view { padding-right: 96px; }
.kc-note { right: -92px; width: 70px; }
.kc-title { min-width: 160px; }
@media (max-width: 900px) { .kc-cols { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   Gesetzesfenster als durchscrollbares Gesetzbuch
   ===================================================================== */
.law-book { padding-bottom: 30px; }
.lb-sec { position: relative; padding: 0 2px 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.lb-sec.new { animation: lb-in .35s ease; }
@keyframes lb-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lb-h { position: sticky; top: -14px; z-index: 2; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 10px 0 6px; background: var(--paper); }
.lb-h h3 { margin: 0; font: 650 15px var(--sans); color: color-mix(in srgb, var(--nc, var(--accent)) 75%, var(--ink)); }
.lb-t { font: 600 13.5px var(--serif); color: var(--ink-2); flex: 1; min-width: 0; }
.lb-act { display: flex; gap: 2px; margin-left: auto; opacity: 0; transition: opacity .15s; }
.lb-sec:hover .lb-act, .lb-sec.target .lb-act { opacity: 1; }
.lb-act .ic { width: 14px; height: 14px; }
.lb-sec .law-content { font: 14.5px/1.62 var(--serif); }
.lb-sec.target::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.lb-sec.target { animation: lb-flash 1.4s ease; }
@keyframes lb-flash { 0% { background: color-mix(in srgb, var(--accent) 10%, transparent); } 100% { background: transparent; } }
.lb-sec.target .lb-h { background: var(--paper); }
.lb-load { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; font-size: 12.5px; color: var(--ink-3); }
.lb-load i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .7s linear infinite; }
.lb-load[hidden] { display: none; }
.lb-src { text-align: center; margin: 18px 0 0; }
.lb-sec .law-cmt { margin-top: 10px; }
html.eco .lb-sec.new, html.eco .lb-sec.target { animation: none; }

/* Import aus anderen Apps */
.imp { display: flex; flex-direction: column; gap: 14px; }
.imp-src { display: flex; flex-wrap: wrap; gap: 6px; } .imp-src span { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--hover); color: var(--ink-2); }
.imp-drop { padding: 30px 20px; }
.imp-list { display: flex; flex-direction: column; gap: 4px; max-height: 34vh; overflow-y: auto; }
.imp-it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.imp-it b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.imp-how summary { cursor: pointer; font-weight: 600; font-size: 13.5px; } .imp-how ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }

/* Gesetzbuch: neutrale Überschriften, Norm als Fläche markiert, zitierter Absatz kräftiger (keine Randstriche) */
.lb-h h3 { color: var(--ink); }
.law-norm header h3 { border-color: var(--line); background: var(--hover); color: var(--ink); }
.lb-sec.target::before { display: none; }
.lb-sec.target { --hl: color-mix(in srgb, #fff2a0 30%, var(--paper)); background: var(--hl); border-radius: 12px; margin: 4px -12px 8px; padding: 0 12px 14px; border-bottom-color: transparent; animation: lb-flash2 1.6s ease; }
.lb-sec.target .lb-h { background: var(--hl); }
@keyframes lb-flash2 { 0% { background: color-mix(in srgb, #fff2a0 75%, var(--paper)); } 100% { background: var(--hl); } }
.law-content .abs { border-left: 0; }
.law-content .abs.hit { background: color-mix(in srgb, #fff2a0 85%, var(--paper)); border-left-color: transparent; }
[data-theme=dark] .lb-sec.target { --hl: #2b2814; } [data-theme=dark] .law-content .abs.hit { background: #4a4119; }

/* Klausuren im Stundenplan */
.pe-toggle .pe-n:not(:empty) { margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.pe-toggle.on { background: var(--hover); border-color: var(--ink-3); }
.plan-exams { margin: 0 0 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); animation: fadeup .2s ease; }
.plan-exams.m { border: 0; padding: 0; margin: 0; }
.pe-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.pe-head h2 { margin: 0; font: 650 19px var(--serif); } .pe-head .btn { margin-left: auto; }
.pe-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pe-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--c) 6%, var(--paper)); }
.pe-card.soon { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.pe-card.past { opacity: .7; background: var(--paper); }
.pe-card header { display: flex; align-items: center; gap: 8px; } .pe-card header b { font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-card .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.pe-kind { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.pe-act { margin-left: auto; display: flex; gap: 2px; opacity: .6; } .pe-card:hover .pe-act { opacity: 1; } .pe-act .ic { width: 14px; height: 14px; }
.pe-when { margin: 0; font-size: 13px; color: var(--ink-2); }
.pe-count { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pe-count div { padding: 8px 6px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line-2); text-align: center; }
.pe-count b { display: block; font: 700 22px/1.1 var(--sans); color: color-mix(in srgb, var(--c) 70%, var(--ink)); } .pe-count span { font-size: 11.5px; color: var(--ink-3); }
.pe-today { margin: 0; padding: 10px; border-radius: 10px; background: color-mix(in srgb, var(--c) 18%, var(--paper)); font-weight: 600; text-align: center; }
.pe-past { margin: 0; font-size: 13px; color: var(--ink-3); }
.pe-notes { width: 100%; resize: vertical; min-height: 64px; font: 13.5px/1.5 var(--sans); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.pe-empty { margin: 4px 0; }
.pe-pastlist { margin-top: 14px; } .pe-pastlist summary { cursor: pointer; font-size: 13px; color: var(--ink-3); margin-bottom: 10px; }
.pg-dayhead .badge.exam { background: color-mix(in srgb, var(--accent) 14%, var(--paper)); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); cursor: pointer; }
.pg-col.has-exam .pg-dayhead { background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.pg-ev.pg-exam { background: color-mix(in srgb, var(--accent) 12%, var(--paper)); border: 1.5px solid var(--accent); color: var(--ink); z-index: 3; }
.pg-ev.pg-exam .ev-name { font-weight: 700; color: var(--accent); } .pg-ev.pg-exam .ic { width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.m-exam { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--paper)); color: var(--ink); }
.m-exam .ic { width: 20px; height: 20px; color: var(--accent); flex: none; } .m-exam b { display: block; } .m-exam small { color: var(--ink-3); }

/* Neues Branding: Logo statt §-Marke */
.brand-logo { width: 26px; height: 26px; flex: none; border-radius: 7px; }
/* Auswahl-Fenster: Textfarbe und Paletten */
.sel-bubble .sb-tc { min-width: 30px; } .sel-bubble .sb-a { font: 700 15px var(--serif); line-height: 1; margin-top: -4px; }
.sel-bubble .sb-tsw { left: 8px; right: 8px; }
.sb-pal { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, 30px); gap: 4px; padding: 8px; border-radius: 12px; background: #1d2230; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.sel-bubble.below .sb-pal { top: auto; bottom: calc(100% + 6px); }
.sb-pal button { min-width: 0; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border-radius: 8px; }
.sb-pal button i { display: block; width: 20px; height: 20px; border-radius: 6px; font-style: normal; }
.sb-pal button.on i { box-shadow: 0 0 0 2px #fff; }
.sb-pal i.tc { width: auto; height: auto; font: 700 17px var(--serif); background: #fff; padding: 1px 5px; border-radius: 5px; } .sb-pal i.tc.std { color: #1d2230; text-decoration: line-through 1.5px rgba(29, 34, 48, .35); }
.sb-pal .sb-none .ic { width: 16px; height: 16px; }
html[data-theme=dark] .sb-pal { background: #f4f5f7; }

/* =====================================================================
   Anmelden und Registrieren (Stil der Landingpage, angelehnt an Notion)
   ===================================================================== */
body.auth-body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: #f6f7f9; background-image: radial-gradient(rgba(15, 17, 21, .09) 1px, transparent 1px); background-size: 22px 22px; font-family: var(--sans); color: #0f1115; }
.auth-card { width: min(420px, 100%); padding: 40px 40px 26px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px #e5e7eb, 0 30px 80px rgba(15, 17, 21, .12); text-align: center; }
.auth-logo { width: 42px; height: 42px; margin: 0 auto 16px; display: block; }
.auth-card h1 { margin: 0 0 24px; font: 600 21px/1.3 var(--sans); letter-spacing: -.02em; } .auth-card h1 span { display: block; color: #8a909c; }
.auth-google { display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; border-radius: 10px; border: 1px solid #e5e7eb; background: #fff; color: #0f1115; font-weight: 600; font-size: 15px; text-decoration: none; transition: background .15s; }
.auth-google:hover { background: #f8f9fb; } .auth-google img { width: 20px; height: 20px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: #8a909c; font-size: 13px; } .auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }
.auth-fld { display: block; text-align: left; font-size: 12.5px; font-weight: 500; color: #4a505c; margin-bottom: 12px; } .auth-fld small { color: #8a909c; font-weight: 400; }
.auth-fld input { display: block; width: 100%; height: 42px; margin-top: 6px; padding: 0 12px; border-radius: 8px; border: 1px solid #e5e7eb; font: 15px var(--sans); color: #0f1115; background: #fff; outline: none; box-sizing: border-box; transition: border-color .2s, box-shadow .2s; }
.auth-fld input:focus { border-color: #3d9bff; box-shadow: 0 0 0 3px #eaf4ff; }
.auth-check { display: flex; gap: 10px; text-align: left; font-size: 13px; color: #4a505c; margin: 4px 0 14px; align-items: flex-start; } .auth-check input { margin-top: 2px; accent-color: #1f7cf0; }
.auth-btn { width: 100%; height: 44px; border-radius: 10px; border: 0; background: #1f7cf0; color: #fff; font: 600 15px var(--sans); cursor: pointer; } .auth-btn:hover { background: #1767d4; }
.auth-error { color: #dc3b44; font-size: 13.5px; text-align: left; margin: 0 0 12px; }
.auth-alert { padding: 10px 12px; border-radius: 8px; background: #fff7e6; color: #8a5a00; font-size: 13px; margin-bottom: 14px; text-align: left; }
.auth-alt { margin: 22px 0 0; font-size: 14px; color: #8a909c; } .auth-alt a { color: #1f7cf0; font-weight: 600; text-decoration: none; }
.auth-legal { margin: 16px 0 0; font-size: 11.5px; color: #8a909c; line-height: 1.5; }
.auth-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Profil: Testphase, Sicherheit, Import, Konten */
.pf-trial h2 { margin-bottom: 10px; } .pf-tbar { height: 10px; border-radius: 99px; background: var(--hover); overflow: hidden; margin-bottom: 10px; } .pf-tbar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.pf-trial.over { border-color: color-mix(in srgb, #d99a06 45%, var(--line)); background: color-mix(in srgb, #d99a06 7%, var(--paper)); }
.pf-sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pf-kv { padding: 10px 12px; border-radius: 10px; background: var(--hover); } .pf-kv span { display: block; font-size: 12px; color: var(--ink-3); } .pf-kv b { font-size: 14px; word-break: break-all; }
.pf-imp { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 14px 0; }
.pf-imp-c { display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s; }
.pf-imp-c:hover { border-color: var(--accent); transform: translateY(-1px); }
.pf-imp-i { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; } .pf-imp-i img { width: 22px; height: 22px; }
.pf-imp-c b { font-size: 14px; } .pf-imp-c small { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.pf-acc-t { display: flex; flex-direction: column; gap: 8px; }
.pf-acc { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }
.pf-acc b { display: block; font-size: 14px; } .pf-acc small { color: var(--ink-3); font-size: 12px; } .pf-acc select { height: 32px; }
@media (max-width: 700px) { .pf-acc { grid-template-columns: 1fr 1fr; } .pf-acc > div { grid-column: span 2; } }
.trial-pill { display: block; margin: 0 10px 8px; padding: 6px 10px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600; text-align: center; text-decoration: none; }
.trial-pill.over { background: color-mix(in srgb, #d99a06 14%, var(--paper)); color: #a16207; }
/* Begrüßung */
.wl { text-align: center; } .wl > img { width: 54px; height: 54px; margin: 0 auto 12px; display: block; }
.wl h2 { margin: 0 0 6px; font: 650 24px var(--serif); } .wl > p { color: var(--ink-2); margin: 0 0 18px; }
.wl-g { display: grid; gap: 10px; text-align: left; }
.wl-c { display: grid; grid-template-columns: 26px 1fr; column-gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; cursor: pointer; font: inherit; text-align: left; }
.wl-c:hover { border-color: var(--accent); } .wl-c .ic { grid-row: span 2; width: 22px; height: 22px; color: var(--accent); margin-top: 2px; } .wl-c small { color: var(--ink-3); }
.trial-pill.soon { background: color-mix(in srgb, #d99a06 16%, var(--paper)); color: #a16207; }
.auth-forgot { margin: 12px 0 0; font-size: 13.5px; } .auth-forgot a { color: #4a505c; }
.auth-ok { padding: 12px 14px; border-radius: 10px; background: #e9f7ef; color: #15603a; font-size: 14px; text-align: left; line-height: 1.5; }
.auth-btn-link { display: flex; align-items: center; justify-content: center; text-decoration: none; }
/* Abo, Gutschein, E-Mail-Verwaltung */
.pf-bill { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.pf-buy { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-code { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .pf-code input { height: 34px; width: 220px; text-transform: uppercase; }
.pf-code-r { font-size: 13px; } .pf-code-r.ok { color: #15803d; } .pf-code-r.bad { color: #c42b2b; }
.pf-unv { display: block; margin-top: 4px; font-size: 12px; color: #a16207; } .linkish { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
.pf-mail-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; } .pf-mail-row input { flex: 1; min-width: 200px; height: 34px; } .pf-mail-row select { height: 34px; }
.pf-mail-prev { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 12px; background: #f6f7f9; }
.pf-mail-log { margin-top: 10px; font-size: 12.5px; color: var(--ink-2); } .pf-mail-log summary { cursor: pointer; } .pf-mail-log div { padding: 3px 0; }

/* ---- Lokale .mitschrift-Dateien (assets/js/docfile.js) ---- */
.local-banner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: var(--hover); border: 1px solid var(--line); font: 13px/1.4 var(--sans); color: var(--ink-2); }
.local-banner .ic { width: 16px; height: 16px; color: var(--pr-good); flex: none; }
.local-banner[data-state=warn] { border-color: var(--warn); }
.local-banner[data-state=warn] .ic { color: var(--warn); }
.local-banner .lb-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.local-banner .lb-s { color: var(--ink-3); }
.local-banner .spacer { flex: 1; }
.is-local-doc .note-tabs, .is-local-doc .meta-settings, .is-local-doc .rec, .is-local-doc .pdf-panel, .is-local-doc .gutter-h { display: none !important; }
.is-local-doc .law-panel { height: 100% !important; }
/* ---- Desktop-Geräte im Profil (assets/js/desktop.js) ---- */
.pf-dev-list { display: grid; gap: 8px; }
.pf-dev { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
.pf-dev span, .pf-dev b { grid-column: 1; }
.pf-dev .btn { grid-column: 2; grid-row: 1 / span 2; }
/* Abo-Bereich */
.ab { display: flex; flex-direction: column; gap: 16px; }
.ab-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ab-top small { display: block; font-size: 12px; color: var(--ink-3); } .ab-top b { font: 650 22px var(--serif); }
.ab-badge { padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--hover); color: var(--ink-2); }
.ab-badge.ok { background: color-mix(in srgb, #16a34a 12%, var(--paper)); color: #15803d; } .ab-badge.warn { background: color-mix(in srgb, #d99a06 15%, var(--paper)); color: #a16207; }
.ab-bar { height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; margin-top: -6px; } .ab-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.ab-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ab-plan { position: relative; display: flex; flex-direction: column; padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); }
.ab-plan.hl { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 14px 34px color-mix(in srgb, var(--accent) 14%, transparent); }
.ab-tag { position: absolute; top: -11px; left: 18px; padding: 3px 10px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; }
.ab-plan h4 { margin: 0; font: 650 18px var(--sans); } .ab-price { margin: 6px 0 12px; } .ab-price b { font: 700 30px/1 var(--sans); letter-spacing: -.02em; } .ab-price small { color: var(--ink-3); margin-left: 6px; }
.ab-plan ul { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 7px; font-size: 14px; flex: 1; }
.ab-plan li { display: flex; gap: 8px; align-items: flex-start; } .ab-plan li .ic { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 2px; }
.ab-plan .btn { width: 100%; justify-content: center; }
.ab-code summary { cursor: pointer; font-size: 13.5px; color: var(--accent); } .ab-code .pf-code { margin-top: 10px; }
.ab-acts { display: flex; gap: 8px; flex-wrap: wrap; } .ab-note { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.ab-sum { display: flex; justify-content: space-between; padding: 14px 16px; border-radius: 12px; background: var(--hover); } .ab-sum span { font-weight: 600; }
.check a { color: var(--accent); }
.kd-kind { border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; text-align: left; font-size: 13.5px; color: #3a3f4b; } .kd-kind legend { font-size: 12.5px; color: #4a505c; padding: 0 4px; } .kd-kind label { display: flex; gap: 8px; margin: 6px 0; }
@media print { body.auth-body { background: #fff; } .auth-btn, .auth-alt, .auth-legal { display: none !important; } }
.auth-legal a, .auth-check a { color: #4a505c; }
.ab-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; margin: 10px 0; } .ab-check input { margin-top: 3px; flex: none; } .ab-check span { flex: 1; }
/* Sperrseite ohne Abo */
.pw { position: fixed; inset: 0; z-index: 5000; overflow: auto; padding: 40px 16px; background: var(--bg); background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.pw-card { max-width: 720px; margin: 0 auto; padding: 34px; border-radius: 20px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(15, 17, 21, .12); }
.pw-logo { width: 44px; height: 44px; display: block; margin-bottom: 14px; } .pw h1 { margin: 0 0 6px; font: 650 28px var(--serif); } .pw-lead { color: var(--ink-2); margin: 0 0 22px; }
.pw .ab-top { display: none; } .pw-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); } .pw-foot p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }

/* Schnell anlegen im Nacharbeiten */
.qa-box { margin: 14px 0 6px; padding: 12px; border-radius: 12px; background: var(--hover); } .qa-box .pr-lbl { margin-top: 0; display: flex; justify-content: space-between; }
.qa-box .pr-input { margin-bottom: 8px; background: var(--paper); } .qa-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.qa-count { font-size: 12px; color: #15803d; font-weight: 600; }
.qa-pop { position: fixed; z-index: 1200; display: flex; gap: 2px; padding: 4px; border-radius: 10px; background: #1d2230; box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.qa-pop button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 7px; background: none; color: #fff; font: 600 13px var(--sans); cursor: pointer; white-space: nowrap; }
.qa-pop button:hover { background: rgba(255, 255, 255, .12); } .qa-pop .ic { width: 15px; height: 15px; }

/* =========================== Glossar =========================== */
.glos-layer { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.glos-box { position: absolute; border-radius: 3px; background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: inset 0 -1.5px 0 color-mix(in srgb, var(--accent) 75%, transparent); }
.glos-ic { position: absolute; width: 14px; height: 14px; display: grid; place-items: center; border-radius: 4px; color: var(--accent); pointer-events: auto; cursor: pointer; }
.glos-ic .ic { width: 11px; height: 11px; } .glos-ic:hover { background: var(--accent-soft); }
.glos-tip { position: fixed; z-index: 1300; max-width: 380px; padding: 10px 12px; border-radius: 12px; background: #1d2230; color: #e9ecf2; font-size: 13px; line-height: 1.5; box-shadow: 0 12px 32px rgba(0, 0, 0, .28); opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.glos-tip.on { opacity: 1; transform: none; } .glos-tip b { display: block; margin-bottom: 4px; color: #fff; font-size: 13.5px; }
.glos-tip p { margin: 0 0 6px; } .glos-tip p:last-child { margin: 0; } .glos-tip small { display: block; color: #9aa3b5; font-size: 11.5px; margin-top: 2px; }
.glos-pop { display: flex; flex-direction: column; gap: 14px; } .glos-items { display: flex; flex-direction: column; gap: 10px; }
.glos-item { padding: 12px 14px; border-radius: 12px; background: var(--hover); } .glos-item p { margin: 6px 0; line-height: 1.55; }
.glos-item textarea { width: 100%; margin: 6px 0 8px; } .glos-src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--accent); } .glos-src .ic { width: 13px; height: 13px; }
.glos-acts { display: flex; gap: 8px; } .glos-pop > .btn { align-self: flex-start; }
.glos-found .pr-lbl { margin: 0 0 8px; } .glos-notes { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.glos-note { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; } .glos-note:hover { background: var(--hover); }
.glos-note .ic { width: 16px; height: 16px; color: var(--ink-3); flex: none; } .glos-note small { display: block; color: var(--ink-3); font-size: 12px; }
.glos-page { max-width: 860px; } .glos-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; } .glos-head h1 { margin: 0 0 4px; font: 650 30px var(--serif); }
.glos-head kbd { margin-left: 6px; font: 600 11px var(--sans); opacity: .75; }
.glos-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); margin-bottom: 14px; }
.glos-search input { flex: 1; border: 0; background: none; font-size: 15px; outline: none; color: var(--ink); } .glos-search .ic { color: var(--ink-3); }
.glos-letter { margin: 18px 0 6px; font: 700 13px var(--sans); color: var(--ink-3); letter-spacing: .06em; }
.glos-row { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.glos-row:hover { border-color: var(--accent); } .glos-row b { font-size: 15px; } .glos-row small { grid-column: 1 / -1; color: var(--ink-2); font-size: 13px; }
.glos-badges { display: flex; gap: 6px; justify-content: flex-end; } .glos-badges i { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); } .glos-badges i.n { background: color-mix(in srgb, #d99a06 14%, var(--paper)); color: #a16207; }

/* ======================= Verknüpfungen mit @ ======================= */
a.xref { display: inline-flex; align-items: baseline; gap: 4px; padding: 0 7px 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 600; font-size: .94em; cursor: pointer; white-space: nowrap; }
a.xref::before { content: '↗'; font-size: .85em; opacity: .8; } a.xref:hover { background: color-mix(in srgb, var(--accent) 18%, var(--paper)); }
a.xref.k-schema { background: color-mix(in srgb, #7c3aed 11%, var(--paper)); color: #7c3aed; } a.xref.k-exam { background: color-mix(in srgb, #c2410c 11%, var(--paper)); color: #c2410c; }
a.xref.k-def, a.xref.k-glos { background: color-mix(in srgb, #0f766e 11%, var(--paper)); color: #0f766e; } a.xref.k-deck { background: color-mix(in srgb, #be185d 10%, var(--paper)); color: #be185d; }
.xr-pop { position: fixed; z-index: 1300; display: flex; flex-direction: column; max-height: 360px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 18px 46px rgba(15, 17, 21, .2); overflow: hidden; }
.xr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 6px; }
.xr-q { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; } .xr-q .ic { width: 15px; height: 15px; color: var(--ink-3); } .xr-qt.ph { color: var(--ink-3); font-weight: 400; }
.xr-caret { width: 1.5px; height: 15px; background: var(--accent); animation: xrBlink 1s steps(1) infinite; } @keyframes xrBlink { 50% { opacity: 0; } }
.xr-cats { display: flex; gap: 4px; padding: 0 10px 8px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.xr-cats button { flex: none; padding: 4px 10px; border-radius: 99px; border: 0; background: none; color: var(--ink-2); font: 600 12px var(--sans); cursor: pointer; } .xr-cats button.on { background: var(--accent-soft); color: var(--accent); }
.xr-list { overflow-y: auto; padding: 6px; } .xr-empty { padding: 12px; margin: 0; }
.xr-it { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; } .xr-it.on, .xr-it:hover { background: var(--hover); } .xr-it.on { box-shadow: inset 2px 0 0 var(--accent); }
.xr-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); } .xr-ic .ic { width: 16px; height: 16px; }
.xr-ic.k-schema { background: color-mix(in srgb, #7c3aed 12%, var(--paper)); color: #7c3aed; } .xr-ic.k-exam { background: color-mix(in srgb, #c2410c 12%, var(--paper)); color: #c2410c; } .xr-ic.k-def, .xr-ic.k-glos { background: color-mix(in srgb, #0f766e 12%, var(--paper)); color: #0f766e; } .xr-ic.k-deck { background: color-mix(in srgb, #be185d 11%, var(--paper)); color: #be185d; }
.xr-tx { min-width: 0; } .xr-tx b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .xr-tx small { display: block; color: var(--ink-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
