:root {
  --bg: #ffffff; --bg2: #f7f7f5; --bg3: #efefed; --hover: rgba(55, 53, 47, .06); --active: rgba(55, 53, 47, .1);
  --text: #37352f; --muted: #787774; --faint: #a5a29c; --line: #e9e9e7; --line2: #dcdcd8;
  --accent: #2383e2; --accent-soft: rgba(35, 131, 226, .12); --danger: #e03e3e; --ok: #0f9d58;
  --c-note: #4c8bf5; --c-paper: #9b59d0; --c-doc: #f0883e; --c-tag: #9aa0a6;
  --shadow: 0 1px 2px rgba(15, 15, 15, .06), 0 6px 24px rgba(15, 15, 15, .12);
  --radius: 8px; --sb-w: 260px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", "Charter", Georgia, "Times New Roman", serif;
  --pdf-bg: #ecebe8;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919; --bg2: #202020; --bg3: #2a2a2a; --hover: rgba(255, 255, 255, .055); --active: rgba(255, 255, 255, .1);
    --text: #e6e6e4; --muted: #9b9a97; --faint: #6f6e6b; --line: #2f2f2f; --line2: #3a3a3a;
    --accent-soft: rgba(35, 131, 226, .25); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .5); --pdf-bg: #121212;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
#app { display: flex; height: 100vh; }
.spacer { flex: 1; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11px; } .pad { padding: 12px; }
.hidden { display: none !important; }
.clamp1 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.clamp2, .clamp3, .clamp4 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.clamp2 { -webkit-line-clamp: 2; } .clamp3 { -webkit-line-clamp: 3; } .clamp4 { -webkit-line-clamp: 4; }
kbd { font: 11px var(--font); padding: 1px 6px; border: 1px solid var(--line2); border-radius: 4px; color: var(--muted); background: var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: rgba(128, 128, 128, .25); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-track { background: transparent; }

/* ---------------- sidebar ---------------- */
#sidebar { position: relative; width: var(--sb-w); flex: none; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; user-select: none; }
body.no-sidebar #sidebar { display: none; }
.sb-top { height: 44px; -webkit-app-region: drag; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; flex: none; }
.nav-btns { -webkit-app-region: no-drag; display: flex; gap: 2px; }
.nav { border: 0; background: none; width: 26px; height: 24px; border-radius: 6px; font-size: 18px; line-height: 1; color: var(--muted); }
.nav:hover:not(:disabled) { background: var(--hover); } .nav:disabled { opacity: .35; cursor: default; }
.sb-brand { display: flex; align-items: center; gap: 9px; padding: 2px 14px 10px; font-weight: 500; font-size: 15px; cursor: pointer; }
.logo { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #2b2b2b, #555); color: #fff; display: grid; place-items: center; font: 500 13px var(--serif); }
.sb-search { margin: 0 10px 8px; padding: 6px 10px; border-radius: 6px; background: var(--hover); color: var(--muted); display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 13px; }
.sb-search:hover { background: var(--active); }
.sb-nav { padding: 0 6px 6px; border-bottom: 1px solid var(--line); }
.sb-scroll { flex: 1; overflow-y: auto; padding: 6px 6px 20px; }
.sb-section { margin-top: 10px; }
.sb-head { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 3px 6px; border-radius: 6px; cursor: pointer; }
.sb-head:hover { background: var(--hover); }
.sb-head:hover .sb-add { opacity: 1; }
.chev { display: inline-block; width: 12px; transition: transform .15s; color: var(--faint); font-size: 13px; }
.chev.open { transform: rotate(90deg); }
.sb-add { opacity: 0; border: 0; background: none; color: var(--muted); border-radius: 4px; width: 20px; height: 20px; line-height: 1; font-size: 16px; }
.sb-add:hover { background: var(--active); }
.sb-item, .sb-folder { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; cursor: pointer; color: var(--text); font-size: 13.5px; min-height: 28px; }
.sb-ic { width: 18px; text-align: center; flex: none; font-size: 13px; color: var(--muted); }
.sb-label { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sb-sub { font-size: 11px; color: var(--faint); }
.sb-empty { font-size: 12.5px; color: var(--faint); padding: 3px 10px 3px 30px; }
.sb-bottom { border-top: 1px solid var(--line); padding: 8px; display: flex; gap: 6px; }
.sb-new { flex: 1; border: 1px solid var(--line2); background: var(--bg); border-radius: 8px; padding: 6px; font-weight: 500; }
.sb-new:hover { background: var(--hover); }

/* ---------------- main ---------------- */
#main { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; }
#view-host { flex: 1; position: relative; min-height: 0; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; }
.page-wrap { max-width: 1040px; width: 100%; margin: 0 auto; padding: 54px 48px 80px; overflow-y: auto; height: 100%; }
.page-wrap.narrow { max-width: 720px; }
.view > .page-wrap, .view > .home { overflow-y: auto; }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
h1 { font-size: 32px; font-weight: 500; letter-spacing: -.02em; margin: 0 0 6px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; margin: 0 0 10px; }
.btn { border: 1px solid var(--line2); background: var(--bg); padding: 6px 12px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.sm { padding: 3px 9px; font-size: 12.5px; }
.btn:disabled { opacity: .6; cursor: default; }
.tb-btn { border: 0; background: none; padding: 4px 9px; border-radius: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tb-btn:hover { background: var(--hover); color: var(--text); }
.tb-btn.sm { font-size: 12px; padding: 3px 7px; }
.input, .select { width: 100%; border: 1px solid var(--line2); background: var(--bg); border-radius: 8px; padding: 7px 10px; outline: none; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.sm, .select.sm { padding: 4px 8px; font-size: 12.5px; width: auto; }
.row { display: flex; gap: 8px; align-items: center; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.frow { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: center; margin: 6px 0; font-size: 13px; }
.frow > span { color: var(--muted); }
.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.note-box { background: var(--accent-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin: 8px 0; }
.note-box.warn { background: rgba(240, 136, 62, .14); }
.note-box ol { margin: 8px 0; padding-left: 20px; }
.section-label { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
.empty-state { padding: 40px; text-align: center; color: var(--muted); }
.empty-state.abs { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ok-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }

/* ---------------- home ---------------- */
.home { max-width: 980px; margin: 0 auto; padding: 64px 48px 80px; width: 100%; overflow-y: auto; height: 100%; }
.qa { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 4px; transition: box-shadow .15s, transform .15s; }
.qa:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.home-sec { margin-top: 30px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.doc-tile { border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.doc-tile:hover { background: var(--hover); }
.note-list { display: flex; flex-direction: column; }
.nl-row { display: grid; grid-template-columns: 22px minmax(140px, 260px) 1fr auto; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; align-items: center; }
.nl-row:hover { background: var(--hover); }
.nl-title { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.intro ol { padding-left: 20px; line-height: 1.9; }
.x-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

/* library */
.lib-table { margin-top: 14px; }
.lib-row { display: grid; grid-template-columns: 1fr 180px 60px 70px 80px; gap: 12px; padding: 9px 10px; border-bottom: 1px solid var(--line); cursor: pointer; align-items: center; font-size: 13.5px; }
.lib-row:hover:not(.head) { background: var(--hover); }
.lib-row.head { font-size: 12px; color: var(--muted); cursor: default; font-weight: 500; }
.lib-title { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 500; }

/* ---------------- tags / chips ---------------- */
.tagchip { display: inline-block; padding: 0 6px; border-radius: 4px; background: rgba(155, 89, 208, .12); color: #8a4bc0; font-size: .92em; cursor: pointer; white-space: nowrap; line-height: 1.6; }
@media (prefers-color-scheme: dark) { .tagchip { color: #c49be8; background: rgba(155, 89, 208, .22); } }
.tagchip:hover { filter: brightness(.95); text-decoration: underline; }
.tagchip.sm { font-size: 11px; }
.wikilink { color: var(--text); border-bottom: 1px solid var(--faint); cursor: pointer; font-weight: 500; }
.wikilink::before { content: '↗'; font-size: .78em; color: var(--muted); margin-right: 2px; }
.wikilink.to-doc::before { content: '📄 '; font-size: .8em; }
.wikilink:hover { color: var(--accent); border-color: var(--accent); }
.wikilink.broken { color: var(--danger); border-bottom-style: dashed; }
.cite { color: var(--olive, #6f7f4f); background: color-mix(in srgb, var(--olive, #6f7f4f) 12%, transparent); border-radius: 4px; padding: 0 4px; cursor: pointer; white-space: nowrap; }
.cite:hover { background: color-mix(in srgb, var(--olive, #6f7f4f) 22%, transparent); }

/* ---------------- editor ---------------- */
.note-view { display: flex; flex-direction: column; height: 100%; }
.nv-top, .rd-toolbar { height: 44px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); -webkit-app-region: drag; }
.nv-top > *, .rd-toolbar > * { -webkit-app-region: no-drag; }
.nv-top .spacer, .rd-toolbar .spacer { -webkit-app-region: drag; align-self: stretch; }
.crumbs { font-size: 13px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 50%; }
.crumbs span { color: var(--text); }
.nv-body { flex: 1; display: flex; min-height: 0; }
.nv-scroll { flex: 1; overflow-y: auto; }
.nv-page { max-width: 760px; margin: 0 auto; padding: 56px 56px 40vh; }
.nv-page.paper { max-width: 780px; }
.nv-title { width: 100%; border: 0; outline: none; resize: none; background: none; font-size: 38px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; padding: 0; overflow: hidden; }
.nv-title::placeholder { color: var(--line2); }
.nv-props { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 22px; min-height: 22px; font-size: 12.5px; }
.prop { padding: 1px 6px; border-radius: 4px; cursor: pointer; }
.prop:hover { background: var(--hover); }
.nv-side { width: 290px; flex: none; border-left: 1px solid var(--line); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 18px; background: var(--bg); }
.side-sec.grow { flex: 1; }
.side-title { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.side-link { padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.side-link:hover { background: var(--hover); } .side-link.on { background: var(--active); font-weight: 500; }
.outline .ol-item { font-size: 12.5px; padding: 2px 8px; border-radius: 6px; cursor: pointer; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.outline .ol-item:hover { background: var(--hover); color: var(--text); }
.ol-item.l2 { padding-left: 20px; } .ol-item.l3 { padding-left: 32px; }
.side-excerpts { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.mini-card { border: 1px solid var(--line); border-left: 4px solid var(--c, #ffe066); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; cursor: grab; background: var(--bg); }
.mini-card:hover { box-shadow: var(--shadow); }
.mini-card img { max-width: 100%; max-height: 120px; border-radius: 4px; display: block; }

.prose { font-size: 16px; line-height: 1.7; }
.nv-page.paper .prose { font-family: var(--serif); font-size: 17px; }
.ProseMirror { outline: none; min-height: 200px; }
.ProseMirror > :not(:first-child) { margin-top: .45em; }
.ProseMirror p { margin: 0; }
.ProseMirror h1 { font-size: 1.75em; margin: 1.3em 0 .2em; font-family: var(--font); letter-spacing: -.01em; }
.ProseMirror h2 { font-size: 1.4em; margin: 1.1em 0 .1em; font-family: var(--font); font-weight: 580; }
.ProseMirror h3 { font-size: 1.15em; margin: 1em 0 .1em; font-family: var(--font); font-weight: 580; }
.ProseMirror ul, .ProseMirror ol { padding-left: 1.5em; margin: .2em 0; }
.ProseMirror li p { margin: 0; }
.ProseMirror blockquote { border-left: 3px solid var(--text); margin: .6em 0; padding: 0 0 0 14px; }
.ProseMirror code { background: var(--bg3); padding: 1px 5px; border-radius: 4px; font-size: .86em; color: #eb5757; }
.ProseMirror pre { background: var(--bg2); border-radius: 6px; padding: 12px 16px; font-size: .85em; }
.ProseMirror pre code { background: none; color: inherit; padding: 0; }
.ProseMirror hr { border: 0; border-top: 1px solid var(--line2); margin: 1.4em 0; }
.ProseMirror mark { background: #fff3a3; color: inherit; border-radius: 2px; padding: 0 1px; }
@media (prefers-color-scheme: dark) { .ProseMirror mark { background: #6b5a14; } }
.ProseMirror a { color: var(--accent); }
.ProseMirror ul[data-type="taskList"] { list-style: none; padding-left: .2em; }
.ProseMirror ul[data-type="taskList"] li { display: flex; gap: 8px; align-items: flex-start; }
.ProseMirror ul[data-type="taskList"] li > label { margin-top: .25em; }
.ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div { color: var(--muted); text-decoration: line-through; }
.ProseMirror p.is-empty::before, .ProseMirror h1.is-empty::before, .ProseMirror h2.is-empty::before, .ProseMirror h3.is-empty::before { content: attr(data-placeholder); color: var(--faint); pointer-events: none; float: left; height: 0; }
.ProseMirror .ProseMirror-selectednode { outline: 2px solid var(--accent); border-radius: 4px; }
.ProseMirror-gapcursor:after { border-top-color: var(--text); }

.xblock { position: relative; border-left: 4px solid var(--xc, #ffe066); background: color-mix(in srgb, var(--xc, #ffe066) 14%, var(--bg)); border-radius: 0 8px 8px 0; padding: 10px 14px 8px 26px; margin: .7em 0; font-family: var(--font); }
.xb-handle { position: absolute; left: 6px; top: 10px; cursor: grab; color: var(--faint); font-size: 13px; }
.xb-text { font-size: .94em; line-height: 1.6; white-space: pre-wrap; }
.xb-img { max-width: 100%; border-radius: 4px; display: block; }
.xb-comment { margin-top: 6px; font-size: .86em; color: var(--muted); }
.xb-comment::before { content: '💬 '; }
.xb-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; }
.xb-src { color: var(--muted); cursor: pointer; flex: 1; } .xb-src:hover { color: var(--accent); text-decoration: underline; }
.xb-btn { border: 0; background: none; color: var(--muted); font-size: 12px; padding: 1px 6px; border-radius: 4px; opacity: 0; }
.xblock:hover .xb-btn { opacity: 1; } .xb-btn:hover { background: var(--hover); color: var(--text); }
.bibblock { border: 1px dashed var(--line2); border-radius: 8px; padding: 12px 16px; margin: 1.2em 0; font-family: var(--font); }
.bib-title { font-weight: 500; font-size: 1.1em; }
.bib-list { font-size: 13px; padding-left: 20px; margin: 6px 0 0; }

/* suggestion + bubble + popover + menus */
.suggest { position: fixed; z-index: 1000; width: 320px; max-height: 320px; overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 5px; }
.sg-group { font-size: 11px; color: var(--muted); padding: 7px 8px 3px; font-weight: 500; }
.sg-item, .qs-item { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.sg-item.active, .qs-item.active { background: var(--hover); }
.sg-ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: var(--bg); color: var(--text); font-weight: 500; }
.sg-empty { padding: 8px; color: var(--muted); font-size: 13px; }
.bubble { position: fixed; z-index: 900; display: none; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 3px; gap: 1px; }
.bubble.show { display: flex; }
.bubble button { border: 0; background: none; min-width: 30px; height: 28px; border-radius: 6px; font-weight: 500; font-size: 13px; }
.bubble button:hover { background: var(--hover); } .bubble button.on { color: var(--accent); }
.popover { position: fixed; z-index: 1000; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 12px; width: 280px; display: flex; flex-direction: column; gap: 5px; }
.pop-title { font-weight: 500; font-size: 13.5px; }
.cite-pop .input { width: 100%; }
.ctx { position: fixed; z-index: 2000; min-width: 200px; max-height: calc(100vh - 16px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.ctx-item { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ctx-item:hover { background: var(--hover); } .ctx-item.danger { color: var(--danger); }
.ctx-ic { width: 18px; text-align: center; display: inline-flex; justify-content: center; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 0; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; transition: opacity .2s, transform .2s; background: #2f2f2f; color: #fff; border-radius: 10px; padding: 9px 14px; font-size: 13px; z-index: 3000; display: flex; gap: 12px; align-items: center; pointer-events: none; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: rgba(255, 255, 255, .15); color: #fff; border-radius: 6px; padding: 2px 9px; }
.modal-back { position: fixed; inset: 0; background: rgba(15, 15, 15, .35); z-index: 1500; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--bg); border-radius: 12px; box-shadow: var(--shadow); padding: 18px; max-width: 92vw; max-height: 76vh; overflow-y: auto; }
.modal-title { font-weight: 500; font-size: 16px; margin-bottom: 12px; }
.qs-modal { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.qs { display: flex; flex-direction: column; max-height: 70vh; }
.qs-input { border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 17px; outline: none; background: none; }
.qs-list { overflow-y: auto; padding: 6px; }
.qs-tx { display: flex; flex-direction: column; min-width: 0; }
.zlist { margin-top: 10px; max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.zlist.big { max-height: none; }
.zlist.small-list { max-height: 200px; }
.zitem { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; cursor: pointer; }
.zitem:hover, .zitem.active { background: var(--hover); }
.zi-ic { width: 20px; text-align: center; color: var(--muted); }
.zi-main { flex: 1; min-width: 0; }
.zi-title { font-weight: 500; font-size: 13.5px; }
.thumb { max-height: 60px; max-width: 200px; border-radius: 4px; }
.z-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; margin-top: 16px; }
.z-cols { display: flex; flex-direction: column; gap: 1px; }
.z-status { margin-bottom: 8px; font-size: 13px; }
.set-sec { border-top: 1px solid var(--line); padding: 18px 0; }
.path { background: var(--bg2); padding: 5px 8px; border-radius: 6px; font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.key-row { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.key-row kbd { min-width: 80px; text-align: center; }
.drop-hint { position: fixed; inset: 0; z-index: 4000; background: rgba(35, 131, 226, .12); border: 3px dashed var(--accent); display: none; place-items: center; pointer-events: none; }
.drop-hint.show { display: grid; }
.drop-hint > div { background: var(--bg); padding: 24px 36px; border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 30px; }
.drop-hint b { font-size: 17px; } .drop-hint span { font-size: 13px; color: var(--muted); }

/* ---------------- reader ---------------- */
.reader { display: flex; flex-direction: column; height: 100%; }
.rd-title { font-weight: 500; font-size: 14px; max-width: 34%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: text; padding: 3px 6px; border-radius: 6px; }
.rd-title:hover { background: var(--hover); }
.rd-pageinfo { font-size: 12px; color: var(--muted); min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.tb-search { border: 1px solid var(--line2); background: var(--bg); border-radius: 6px; padding: 3px 8px; font-size: 12.5px; width: 170px; outline: none; }
.tb-search:focus { border-color: var(--accent); }
.rd-body { flex: 1; display: flex; min-height: 0; }
.rd-pdf { flex: 1; min-width: 0; overflow: auto; background: var(--pdf-bg); position: relative; }
.rd-pdf.area-mode .page { cursor: crosshair; }
.rd-pdf.area-mode .textLayer { pointer-events: none; }
.rd-pages { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 28px 40vh; }
.page { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 4px 14px rgba(0, 0, 0, .06); flex: none; }
.pg-canvas { position: absolute; inset: 0; }
.pg-num { position: absolute; right: -24px; bottom: 0; font-size: 10px; color: var(--faint); }
.textLayer { position: absolute; text-align: initial; inset: 0; overflow: clip; opacity: 1; line-height: 1; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; caret-color: CanvasText; z-index: 2; }
.textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; }
.textLayer span.markedContent { top: 0; height: 0; }
.textLayer ::selection { background: rgba(35, 131, 226, .3); }
.textLayer br::selection { background: transparent; }
.textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: 0; cursor: default; user-select: none; }
.textLayer.selecting .endOfContent { top: 0; }
.textLayer span.hit { background: rgba(255, 150, 0, .45); border-radius: 2px; }
.hlLayer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hl { position: absolute; background: var(--hc); mix-blend-mode: multiply; opacity: .55; border-radius: 2px; pointer-events: auto; cursor: pointer; }
.hl-area { background: transparent; border: 2px solid var(--hc); opacity: .9; mix-blend-mode: normal; }
.hl.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 100% { opacity: .55; } 20%, 60% { opacity: 1; box-shadow: 0 0 0 3px var(--hc); } }
.area-box { position: absolute; border: 2px dashed var(--accent); background: rgba(35, 131, 226, .1); z-index: 5; pointer-events: none; }
.rd-banner { position: sticky; top: 0; z-index: 10; margin: 10px auto 0; width: fit-content; max-width: 90%; background: var(--bg); border-radius: 10px; box-shadow: var(--shadow); padding: 9px 14px; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rd-banner .bar { flex-basis: 100%; height: 4px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.rd-banner .bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.sel-toolbar { position: fixed; z-index: 1200; display: flex; gap: 4px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 5px 7px; }
.sel-color { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .08); }
.sel-color:hover { transform: scale(1.12); }
.sel-sep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.sel-btn { border: 0; background: none; border-radius: 14px; padding: 3px 9px; font-size: 12.5px; font-weight: 500; }
.rd-split { width: 5px; flex: none; cursor: col-resize; background: var(--line); }
.rd-split:hover { background: var(--accent); }
.rd-work { flex: none; display: flex; flex-direction: column; background: var(--bg2); min-width: 280px; }
.rd-body.no-ws .rd-work, .rd-body.no-ws .rd-split { display: none; }
.ws-tabs { display: flex; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--bg); }
.ws-tab { border: 0; background: none; padding: 5px 10px; border-radius: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.ws-tab:hover { background: var(--hover); } .ws-tab.on { background: var(--active); color: var(--text); }
.ws-body { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.ws-tools { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ws-tools .input.sm { flex: 1; min-width: 120px; }
.ws-canvas { flex: 1; overflow: auto; position: relative; background-image: radial-gradient(var(--line2) 1px, transparent 1px); background-size: 18px 18px; }
.ws-board { position: relative; transform-origin: 0 0; }
.ws-svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.ws-svg .link { stroke: var(--muted); stroke-width: 1.6; fill: none; stroke-dasharray: 0; }
.ws-svg .link.temp { stroke: var(--accent); stroke-dasharray: 4 4; }
.ws-svg .link-hit { stroke: transparent; stroke-width: 12; fill: none; pointer-events: stroke; cursor: pointer; }
.ws-hint { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); width: 280px; background: var(--bg); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; font-size: 13px; pointer-events: none; }
.ws-hint p { margin: 6px 0 0; color: var(--muted); }
.card { position: absolute; width: 240px; background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); font-size: 12.5px; }
.ws-list .card { position: relative; width: auto; margin: 0 0 8px; cursor: grab; }
.ws-list { overflow-y: auto; padding: 10px; flex: 1; }
.card:hover { box-shadow: var(--shadow); z-index: 2; }
.card.dragging { box-shadow: var(--shadow); z-index: 5; opacity: .95; }
.card.flash { animation: cardflash 1.4s ease; }
@keyframes cardflash { 20%, 60% { box-shadow: 0 0 0 3px var(--accent); } }
.card-head { display: flex; align-items: center; gap: 6px; padding: 4px 6px 2px; cursor: move; }
.card-drag { cursor: grab; color: var(--faint); padding: 0 3px; border-radius: 4px; }
.card-drag:hover { background: var(--hover); color: var(--text); }
.card-pg { font-size: 11px; color: var(--muted); cursor: pointer; padding: 0 4px; border-radius: 4px; }
.card-pg:hover { background: var(--hover); color: var(--accent); }
.card-menu { border: 0; background: none; color: var(--muted); border-radius: 4px; padding: 0 6px; }
.card-menu:hover { background: var(--hover); }
.card-text { padding: 2px 10px 6px; line-height: 1.5; max-height: 160px; overflow: hidden; cursor: pointer; font-family: var(--serif); font-size: 13px; }
.card-img { display: block; max-width: calc(100% - 16px); margin: 2px 8px 6px; border-radius: 4px; cursor: pointer; }
.card-comment { margin: 0 8px 4px; padding: 4px 6px; border-radius: 6px; background: var(--bg2); outline: none; min-height: 22px; font-size: 12.5px; cursor: text; white-space: pre-wrap; }
.kind-comment .card-comment { background: none; font-size: 13.5px; min-height: 50px; }
.card-comment:empty::before { content: attr(data-ph); color: var(--faint); }
.card-comment:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 8px 8px; align-items: center; }
.tag-input { border: 0; outline: none; background: none; font-size: 11.5px; width: 70px; color: var(--muted); }
.card-port { position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); cursor: crosshair; opacity: 0; }
.card:hover .card-port { opacity: 1; }
.card-port:hover { border-color: var(--accent); background: var(--accent); }
.color-filter { display: flex; gap: 4px; align-items: center; }
.cf { border: 1px solid var(--line2); background: var(--bg); border-radius: 10px; font-size: 11px; padding: 1px 7px; }
.cf.dot-btn { width: 18px; height: 18px; padding: 0; border-radius: 50%; }
.cf.on { box-shadow: 0 0 0 2px var(--accent); }
.ws-note-editor { flex: 1; overflow-y: auto; padding: 16px 20px 40vh; background: var(--bg); font-size: 14.5px; }

/* ---------------- graph ---------------- */
.graph { display: flex; flex-direction: column; height: 100%; }
.graph-bar { height: 44px; display: flex; gap: 14px; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line); -webkit-app-region: drag; }
.graph-bar > * { -webkit-app-region: no-drag; }
.graph-title { font-weight: 500; }
.graph-bar .input.sm { width: 200px; }
.legend { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); margin-left: auto; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.graph-wrap { flex: 1; position: relative; overflow: hidden; }
.graph-canvas { position: absolute; inset: 0; cursor: grab; }

/* ================= handwriting ================= */
.ink-canvas { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; }
.ink-canvas.active { pointer-events: auto; cursor: crosshair; }
.ink-canvas.active[data-tool="eraser"] { cursor: cell; }
.rd-pdf.ink-mode .textLayer { pointer-events: none; user-select: none; -webkit-user-select: none; }
.rd-pdf.ink-mode .hl { pointer-events: none; }
.rd-pdf.area-mode .page { touch-action: none; }
.ink-palette-wrap { position: sticky; top: 10px; z-index: 30; display: flex; justify-content: center; align-items: flex-start; pointer-events: none; height: 0; }
.ink-palette-wrap.hidden { display: none; }
.ink-palette { pointer-events: auto; display: flex; align-items: center; gap: 2px; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 10px 30px rgba(0,0,0,.16); padding: 5px 7px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: calc(100% - 16px); }
.ink-palette::-webkit-scrollbar { display: none; }
.ink-palette > * { flex: none; }
.ip-tool { border: 0; background: none; min-width: 34px; height: 34px; border-radius: 10px; font-size: 16px; padding: 0 7px; color: var(--text); }
.ip-tool:hover { background: var(--hover); }
.ip-tool.on { background: var(--accent-soft); color: var(--accent); }
.ip-pencil, .ip-done { font-size: 12.5px; font-weight: 500; }
.ip-done { color: var(--accent); }
.ip-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ip-group { display: flex; gap: 4px; align-items: center; }
.ip-color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--line2); padding: 0; }
.ip-color.on { box-shadow: 0 0 0 2px var(--accent); }
.ip-custom { position: relative; overflow: hidden; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; }
.ip-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ip-size { border: 0; background: none; width: 28px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.ip-size i { background: var(--text); border-radius: 50%; display: block; }
.ip-size.on { background: var(--accent-soft); } .ip-size.on i { background: var(--accent); }
.ink-sel { position: absolute; z-index: 5; border: 1.5px dashed var(--accent); border-radius: 4px; pointer-events: none; background: rgba(35, 131, 226, .05); }
.ink-sel-bar { position: absolute; z-index: 6; display: flex; gap: 3px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; white-space: nowrap; }
.ink-sel-bar button { border: 0; background: none; border-radius: 8px; padding: 5px 8px; font-size: 13px; font-weight: 500; }
.ink-sel-bar button:hover { background: var(--hover); }
.ink-sel-bar .ink-sel-color { width: 20px; height: 20px; padding: 0; border-radius: 50%; }
.ink-sel-bar .danger { color: var(--danger); }
.hw-preview { max-width: 100%; max-height: 180px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; display: block; }

/* ================= notebooks ================= */
.notebook { display: flex; flex-direction: column; height: 100%; }
.nb-title { border: 0; outline: none; background: none; font-size: 15px; font-weight: 500; min-width: 120px; flex: 0 1 320px; }
.nb-ic { font-size: 16px; }
.nb-palette { position: relative; top: 0; height: auto; padding: 8px 0; border-bottom: 1px solid var(--line); background: var(--bg2); }
.nb-palette .ink-palette { box-shadow: none; }
.nb-scroll { flex: 1; overflow: auto; background: var(--pdf-bg); -webkit-overflow-scrolling: touch; }
.nb-pages { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 22px 20px 30vh; }
.nb-page { position: relative; background-color: #fffdf8; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 4px 14px rgba(0, 0, 0, .06); flex: none; border-radius: 4px; --line-c: #c5d3e6; }
.paper-lined { background-image: linear-gradient(to right, transparent calc(var(--u) * 11), #f1b6b6 calc(var(--u) * 11), #f1b6b6 calc(var(--u) * 11 + 1px), transparent calc(var(--u) * 11 + 1px)), repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--u) * 3.6 - 1px), var(--line-c) calc(var(--u) * 3.6 - 1px), var(--line-c) calc(var(--u) * 3.6)); background-position: 0 0, 0 calc(var(--u) * 10); background-repeat: no-repeat, repeat-y; background-size: 100% 100%, 100% calc(100% - var(--u) * 14); }
.paper-grid { background-image: linear-gradient(to right, var(--line-c) 1px, transparent 1px), linear-gradient(to bottom, var(--line-c) 1px, transparent 1px); background-size: calc(var(--u) * 2.5) calc(var(--u) * 2.5); background-position: calc(var(--u) * 1.25) calc(var(--u) * 1.25); }
.paper-dotted { background-image: radial-gradient(circle, #a9b6c6 calc(var(--u) * .14), transparent calc(var(--u) * .16)); background-size: calc(var(--u) * 3) calc(var(--u) * 3); background-position: calc(var(--u) * 1.5) calc(var(--u) * 1.5); }
.paper-cornell { background-image: linear-gradient(to right, transparent calc(var(--u) * 28), #f1b6b6 calc(var(--u) * 28), #f1b6b6 calc(var(--u) * 28 + 1.5px), transparent calc(var(--u) * 28 + 1.5px)), linear-gradient(to bottom, transparent calc(var(--u) * 11), #9fb3cc calc(var(--u) * 11), #9fb3cc calc(var(--u) * 11 + 1.5px), transparent calc(var(--u) * 11 + 1.5px)), linear-gradient(to top, transparent calc(var(--u) * 30), #9fb3cc calc(var(--u) * 30), #9fb3cc calc(var(--u) * 30 + 1.5px), transparent calc(var(--u) * 30 + 1.5px)), repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--u) * 3.6 - 1px), var(--line-c) calc(var(--u) * 3.6 - 1px), var(--line-c) calc(var(--u) * 3.6)); background-repeat: no-repeat, no-repeat, no-repeat, repeat-y; background-size: 100% 100%, 100% 100%, 100% 100%, 100% calc(100% - var(--u) * 44); background-position: 0 0, 0 0, 0 0, 0 calc(var(--u) * 14.6); }
.nb-pnum { position: absolute; right: 8px; bottom: 6px; z-index: 6; font-size: 11px; color: #9aa; display: flex; gap: 4px; align-items: center; }
.nb-pmenu { border: 0; background: rgba(0, 0, 0, .05); border-radius: 6px; padding: 2px 8px; color: #667; }

/* ================= onboarding ================= */
.onboard { position: fixed; inset: 0; z-index: 5000; background: var(--bg2); display: grid; place-items: center; padding: 20px; }
.onboard-card { max-width: 460px; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.logo.big { width: 64px; height: 64px; border-radius: 16px; font-size: 34px; }
.btn.big { padding: 12px 20px; font-size: 16px; border-radius: 10px; }
.row.wrap { flex-wrap: wrap; }

/* ================= sidebar toggle / responsive ================= */
.sb-backdrop { display: none; }
#app { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); box-sizing: border-box; }
html[data-platform="ios"] .sb-top { height: 8px; } html[data-platform="ios"] .sb-top .nav-btns { display: none; }

@media (max-width: 999px) {
  #sidebar { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow); padding-top: env(safe-area-inset-top); width: min(300px, 86vw); }
  body.sidebar-open #sidebar { transform: none; }
  body.sidebar-open .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, .25); }
  .page-wrap, .home { padding: 56px 22px 60px; }
  .nv-side { position: absolute; right: 0; top: 44px; bottom: 0; z-index: 20; box-shadow: var(--shadow); width: min(320px, 90vw); }
  .note-view, .nv-body { position: relative; }
  .nv-page { padding: 32px 26px 40vh; }
  .z-layout { grid-template-columns: 1fr; }
  .lib-row { grid-template-columns: 1fr 120px 50px; } .lib-row > :nth-child(4), .lib-row > :nth-child(5) { display: none; }
}
@media (max-width: 819px) {
  .rd-work { position: absolute; inset: 44px 0 0 0; z-index: 25; width: auto !important; min-width: 0; }
  .rd-body { position: relative; }
  .rd-split { display: none; }
  .rd-toolbar { overflow-x: auto; scrollbar-width: none; } .rd-toolbar::-webkit-scrollbar { display: none; }
  .rd-title { max-width: 40vw; flex: none; }
  .tb-search { width: 120px; flex: none; }
  .rd-pages { padding: 10px 6px 40vh; } .pg-num { display: none; }
  .nv-title { font-size: 30px; }
  .nb-pages { padding: 12px 8px 30vh; }
}
@media (max-width: 560px) { .qa { padding: 12px; }
  h1 { font-size: 26px; }
  .nl-row { grid-template-columns: 22px 1fr auto; } .nl-row > :nth-child(3) { display: none; }
  .frow { grid-template-columns: 1fr; gap: 4px; }
  .modal-back { padding-top: 6vh; } .modal { max-height: 86vh; }
  .crumbs { max-width: 38vw; }
  .nv-page { padding: 24px 18px 40vh; }
  .prose { font-size: 16.5px; }
  .ink-palette { gap: 1px; padding: 4px; } .ip-tool { min-width: 30px; height: 32px; padding: 0 5px; }
  .legend { display: none; }
}
/* touch: bigger targets, no hover-only controls */
@media (pointer: coarse) {
  .sb-item, .sb-folder { min-height: 38px; font-size: 15px; }
  .tb-btn { padding: 7px 10px; }
  .btn { padding: 8px 14px; } .btn.sm { padding: 6px 11px; }
  .sb-add, .xb-btn { opacity: 1; }
  .card-port { opacity: 1; width: 18px; height: 18px; right: -10px; }
  .card-head { touch-action: none; padding: 6px 8px 4px; }
  .rd-split { width: 12px; touch-action: none; }
  .sel-color { width: 32px; height: 32px; }
  .sel-btn { padding: 7px 12px; font-size: 14px; }
  input, select, textarea, .input { font-size: 16px; }
  .ctx-item { padding: 10px 12px; font-size: 15px; }
  .sg-item { padding: 8px; }
  .textLayer span { -webkit-touch-callout: none; }
  .nb-pmenu { padding: 5px 12px; }
}
@media (hover: none) { .card:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, .06); } }

@media (max-width: 560px) {
  .rd-toolbar .tb-search, .rd-toolbar .tb-zoom, .rd-pageinfo { display: none; }
  .rd-toolbar .tb-btn { padding: 6px 7px; }
  .ink-palette { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 16px); }
  .ink-palette::-webkit-scrollbar { display: none; }
  .ip-color { flex: none; } .ip-tool { flex: none; }
  .nb-top select { max-width: 110px; }
}

/* ================= trash ================= */
.sb-badge { font-size: 10px; background: var(--danger); color: #fff; border-radius: 8px; padding: 0 5px; margin-left: 2px; vertical-align: top; }
.trash-list { display: flex; flex-direction: column; margin-top: 10px; }
.trash-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-bottom: 1px solid var(--line); }
.trash-ic { font-size: 18px; width: 26px; text-align: center; }
.trash-main { flex: 1; min-width: 0; } .trash-title { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ================= linking ================= */
.link-preview { position: fixed; z-index: 1300; width: 400px; max-height: 320px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px 16px; }
.link-preview::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, var(--bg)); }
.pv-title { font-weight: 500; margin-bottom: 6px; }
.pv-body { font-size: 13px; line-height: 1.5; } .pv-body p { margin: 0 0 6px; } .pv-body h2, .pv-body h3, .pv-body h4 { font-size: 14px; margin: 8px 0 4px; }
.side-link.mention { display: flex; justify-content: space-between; align-items: center; gap: 6px; } .side-link.mention span { overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.embed { border: 1px solid var(--line); border-left: 3px solid var(--c-note); border-radius: 8px; margin: .8em 0; padding: 6px 14px 10px; background: var(--bg2); font-family: var(--font); }
.embed-head { display: flex; align-items: center; font-size: 12.5px; } .embed-title { color: var(--muted); cursor: pointer; font-weight: 500; } .embed-title:hover { color: var(--accent); }
.embed-body { font-size: 14px; max-height: 420px; overflow: auto; } .embed-body p { margin: 0 0 6px; }
.callout { border-radius: 8px; padding: 8px 14px 10px; margin: .8em 0; background: rgba(76, 139, 245, .08); border-left: 4px solid #4c8bf5; font-family: var(--font); }
.callout-tipp { background: rgba(95, 178, 54, .1); border-color: #5fb236; } .callout-warnung { background: rgba(241, 152, 55, .12); border-color: #f19837; }
.callout-definition { background: rgba(162, 138, 229, .12); border-color: #a28ae5; } .callout-frage { background: rgba(229, 110, 238, .1); border-color: #e56eee; }
.callout-these { background: rgba(255, 102, 102, .1); border-color: #ff6666; } .callout-zusammenfassung { background: rgba(170, 170, 170, .14); border-color: #999; }
.callout-head { display: flex; gap: 6px; align-items: center; font-weight: 500; font-size: 13px; cursor: pointer; user-select: none; margin-bottom: 2px; }
.callout-chg { color: var(--faint); font-size: 10px; } .callout-body > :not(:first-child) { margin-top: .4em; }

/* ================= scientific blocks ================= */
.ProseMirror table { border-collapse: collapse; width: 100%; margin: .2em 0 .4em; font-family: var(--font); font-size: .9em; border-top: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); }
.ProseMirror th, .ProseMirror td { padding: 4px 8px; text-align: center; vertical-align: top; min-width: 40px; position: relative; }
.ProseMirror th:first-child, .ProseMirror td:first-child { text-align: left; }
.ProseMirror th { font-weight: 500; border-bottom: 1px solid var(--text); }
.ProseMirror th p, .ProseMirror td p { margin: 0; }
.ProseMirror .selectedCell { background: var(--accent-soft); }
.table-bar { position: fixed; z-index: 950; display: none; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 3px; gap: 2px; }
.table-bar.show { display: flex; }
.table-bar button { border: 0; background: none; padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.table-bar button:hover { background: var(--hover); }
.caption { font-family: var(--font); margin: 1.2em 0 .2em; font-size: .95em; }
.cap-label { font-weight: 500; display: block; user-select: none; }
.cap-text { font-style: italic; display: block; min-height: 1.4em; }
.cap-text:empty::before, .cap-text.empty::before { content: attr(data-ph); color: var(--faint); }
.figure { position: relative; text-align: center; margin: .4em 0 1em; }
.fig-img { max-width: 100%; border-radius: 2px; }
.fig-tools { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; background: var(--bg); border-radius: 6px; box-shadow: var(--shadow); opacity: 0; transition: opacity .15s; }
.figure:hover .fig-tools { opacity: 1; } .fig-tools .xb-btn { opacity: 1; } .xb-btn.on { color: var(--accent); }
.fig-handle { position: absolute; left: -20px; top: 4px; cursor: grab; color: var(--faint); }
.fn-ref { color: var(--accent); cursor: pointer; font-family: var(--font); font-size: .7em; padding: 0 1px; font-weight: 500; }
.math-inline { cursor: pointer; padding: 0 2px; border-radius: 4px; } .math-inline:hover, .math-block:hover { background: var(--hover); }
.math-block { cursor: pointer; text-align: center; margin: .6em 0; padding: 6px; border-radius: 6px; }
.math-inline.empty::after { content: 'Formel'; color: var(--faint); font-size: .85em; } .math-block.empty::after { content: '∑ Formel eingeben'; color: var(--faint); }
.math-preview { padding: 10px; min-height: 40px; text-align: center; background: var(--bg2); border-radius: 6px; margin: 6px 0; overflow-x: auto; }
.input.mono, .mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.toc-block { border: 1px dashed var(--line2); border-radius: 8px; padding: 10px 16px; margin: 1em 0; font-family: var(--font); }
.toc-head { display: flex; font-weight: 500; margin-bottom: 4px; }
.toc-item { font-size: 13px; padding: 1px 0; } .toc-item.l2 { padding-left: 18px; } .toc-item.l3 { padding-left: 36px; color: var(--muted); }

.stat-preview { max-height: 220px; overflow: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.apa-preview { border-collapse: collapse; font-size: 12.5px; width: 100%; border-top: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); }
.apa-preview th { border-bottom: 1px solid var(--text); font-weight: 500; padding: 3px 8px; } .apa-preview td { padding: 3px 8px; text-align: center; } .apa-preview td:first-child, .apa-preview th:first-child { text-align: left; }
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fmt .input.sm { width: 80px; }

/* ================= R blocks ================= */
.rchunk { border: 1px solid var(--line2); border-radius: 10px; margin: 1em 0; background: var(--bg2); font-family: var(--font); overflow: hidden; }
.rc-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 26px; position: relative; border-bottom: 1px solid var(--line); background: var(--bg); }
.rc-head .xb-handle { left: 6px; top: 9px; }
.rc-badge { font-weight: 500; color: #fff; background: #276dc3; border-radius: 6px; padding: 0 7px; font-size: 12px; }
.rc-caption { flex: 1; border: 0; background: none; outline: none; font-style: italic; font-size: 13px; min-width: 60px; }
.rc-code { width: 100%; border: 0; outline: none; resize: none; background: var(--bg2); font: 12.5px/1.5 ui-monospace, Menlo, monospace; padding: 10px 14px; color: var(--text); display: block; tab-size: 2; }
.rc-out { background: var(--bg); }
.rc-out:not(:empty) { border-top: 1px solid var(--line); padding: 10px 14px; }
.rc-text, .rc-err { font: 12px/1.45 ui-monospace, Menlo, monospace; white-space: pre-wrap; margin: 0 0 8px; max-height: 260px; overflow: auto; }
.rc-err { color: var(--danger); }
.rc-fig { max-width: 100%; display: block; margin: 6px auto; border-radius: 4px; background: #fff; }
.rc-table { margin: 6px 0 12px; } .rc-tcap { font-style: italic; font-size: 13px; margin-bottom: 4px; } .rc-tnote { font-size: 12px; margin-top: 4px; }
.tb-btn.spinning { animation: pulse 1s ease-in-out infinite; } @keyframes pulse { 50% { opacity: .35; } }
.sel-color { width: 22px; height: 22px; }
@media (pointer: coarse) { .sel-color { width: 28px; height: 28px; } .fig-tools { opacity: 1; } }


/* ================= tabs ================= */
#tabbar { height: 36px; flex: none; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: var(--bg2); border-bottom: 1px solid var(--line); -webkit-app-region: drag; user-select: none; }
#tabbar > *, .tab, .tab-ctl { -webkit-app-region: no-drag; }
.tb-lead { display: flex; gap: 1px; flex: none; }
.tab-ctl { border: 0; background: none; color: var(--muted); width: 28px; height: 26px; border-radius: 6px; font-size: 15px; line-height: 1; flex: none; }
.tab-ctl:hover:not(:disabled) { background: var(--hover); color: var(--text); } .tab-ctl:disabled { opacity: .3; cursor: default; }
.tab-new { font-size: 18px; }
.nav-mini { display: none; }
body.no-sidebar .nav-mini { display: block; }
.tabs { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; align-self: stretch; align-items: flex-end; -webkit-app-region: drag; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: flex; align-items: center; gap: 6px; min-width: 90px; max-width: 220px; flex: 0 1 200px; height: 30px; padding: 0 6px 0 10px; border-radius: 8px 8px 0 0; color: var(--muted); font-size: 12.5px; cursor: pointer; position: relative; }
.tab:hover { background: var(--hover); color: var(--text); }
.tab.active { background: var(--bg); color: var(--text); font-weight: 500; box-shadow: 0 0 0 1px var(--line); clip-path: inset(-2px -2px 0 -2px); }
.tab-ic { flex: none; font-size: 12px; }
.tab-title { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tab-x { border: 0; background: none; color: var(--faint); width: 18px; height: 18px; border-radius: 4px; line-height: 1; font-size: 14px; padding: 0; opacity: 0; flex: none; }
.tab:hover .tab-x, .tab.active .tab-x { opacity: 1; } .tab-x:hover { background: var(--active); color: var(--text); }
html[data-platform="mac"] body.no-sidebar #tabbar { padding-left: 80px; }
.sb-hide { font-size: 12px !important; letter-spacing: -2px; }
/* sidebar peek (hover at the left edge when hidden) + resize */
.sb-edge { position: fixed; left: 0; top: 40px; bottom: 0; width: 8px; z-index: 40; display: none; }
body.no-sidebar .sb-edge { display: block; }
body.no-sidebar.sb-peek #sidebar { display: flex; position: fixed; z-index: 75; left: 6px; top: 44px; bottom: 8px; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); animation: peekIn .14s ease; }
@keyframes peekIn { from { transform: translateX(-12px); opacity: 0; } }
.sb-resize { position: absolute; top: 0; right: -3px; bottom: 0; width: 6px; cursor: col-resize; z-index: 5; }
.sb-resize:hover { background: var(--accent-soft); }
.crumbs { cursor: default; }
@media (max-width: 999px) {
  html[data-platform="mac"] #tabbar { padding-left: 80px; }
  .nav-mini { display: block; }
  .sb-resize, .sb-edge, .sb-hide { display: none !important; }
}
@media (max-width: 560px) {
  #tabbar { height: 40px; } .tab { min-width: 70px; flex-basis: 140px; height: 34px; } .tab-x { opacity: 1; }
  .tab-ctl { width: 34px; height: 32px; }
}
html[data-platform="ios"] #tabbar { padding-left: calc(8px + env(safe-area-inset-left)); }

/* ================= context menu extras, swatches ================= */
.ctx-head { font-size: 11px; font-weight: 500; color: var(--muted); padding: 6px 10px 3px; text-transform: none; }
.ctx-lb { flex: 1; } .ctx-kbd { font-size: 10.5px; padding: 0 5px; }
.ctx-ic { min-width: 22px; text-align: center; color: var(--muted); font-size: 12px; }
.pop-sw { padding: 8px; }
.pop-label { font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 2px 4px 6px; }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; padding: 0 2px 8px; }
.sw { width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .12); padding: 0; cursor: pointer; font-weight: 500; font-size: 14px; background: var(--bg); }
.sw:hover { transform: scale(1.1); } .sw.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.sw-none { color: var(--muted); font-size: 13px; }
.sw-fg { background: var(--bg); }
@media (pointer: coarse) { .sw { width: 32px; height: 32px; } }

/* ================= coloured tags ================= */
.tagchip.tinted { background: var(--tc-bg); color: var(--tc-fg); }
@media (prefers-color-scheme: dark) { .tagchip.tinted { color: var(--tc-fgd); } }
.tag-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }

/* ================= editor: bubble, toggle, columns, colours ================= */
.bubble .bb-color { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; }
.bb-a { font-weight: 500; font-size: 14px; padding: 0 3px; border-radius: 4px; text-decoration: underline; text-decoration-thickness: 2px; }
.bubble .bb-turn { font-size: 12px; white-space: nowrap; }
.ProseMirror mark[data-color] { border-radius: 2px; padding: 0 1px; color: inherit; }
.ProseMirror code { background: var(--hover); border-radius: 4px; padding: 1px 4px; font-size: .88em; font-family: "SF Mono", Menlo, monospace; color: #c7254e; }
@media (prefers-color-scheme: dark) { .ProseMirror code { color: #ff8a9b; } }
.toggle { display: flex; align-items: flex-start; gap: 2px; margin: 2px 0; }
.tg-btn { flex: none; border: 0; background: none; color: var(--muted); width: 22px; height: 26px; border-radius: 4px; font-size: 12px; transition: transform .15s; padding: 0; margin-top: 1px; }
.tg-btn:hover { background: var(--hover); color: var(--text); }
.toggle.open > .tg-btn { transform: rotate(90deg); }
.tg-body { flex: 1; min-width: 0; }
.tg-body > :first-child { margin-top: 0; font-weight: 500; }
.toggle:not(.open) > .tg-body > :not(:first-child) { display: none; }
.tg-body > p:first-child:empty::before, .tg-body > p:first-child > br.ProseMirror-trailingBreak:only-child::before { content: ''; }
.columns { display: flex; gap: 24px; margin: 8px 0; }
.column { flex: 1; min-width: 0; padding: 2px 0; border-radius: 6px; }
.ProseMirror-focused .column { box-shadow: inset 0 0 0 1px var(--line); padding: 2px 8px; }
@media (max-width: 560px) { .columns { flex-direction: column; gap: 4px; } }
.prose details > summary { cursor: pointer; font-weight: 500; }

/* ================= properties ================= */
.props { margin: 8px 0 6px; display: flex; flex-direction: column; gap: 1px; }
.prop-row { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; align-items: center; min-height: 32px; gap: 8px; border-radius: 6px; }
.prop-row:hover { background: var(--hover); }
.prop-name { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13.5px; padding: 4px 6px; border-radius: 6px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.prop-name:hover { background: var(--active); }
.prop-ic { width: 18px; text-align: center; font-size: 12px; flex: none; }
.prop-val { min-width: 0; font-size: 14px; }
.prop-in { width: 100%; border: 0; background: none; outline: none; padding: 5px 6px; border-radius: 6px; font-size: 14px; }
.prop-in:focus { background: var(--bg); box-shadow: 0 0 0 1px var(--line2); }
.prop-in::placeholder { color: var(--faint); }
.prop-chk { width: 17px; height: 17px; margin: 6px; accent-color: var(--accent); }
.prop-inline { display: flex; align-items: center; } .prop-open { border: 0; background: none; color: var(--accent); }
.prop-click { padding: 5px 6px; cursor: pointer; border-radius: 6px; }
.prop-pill { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12.5px; font-weight: 500; background: color-mix(in srgb, var(--pc) 20%, transparent); color: var(--pc); background: rgba(128, 128, 128, .14); }
@supports (background: color-mix(in srgb, red 20%, transparent)) { .prop-pill { background: color-mix(in srgb, var(--pc) 20%, transparent); } }
.prop-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 3px 4px; }
.prop-tags .prop-in { width: auto; flex: 1; min-width: 90px; padding: 2px 4px; }
.prop-link { color: var(--text); border-bottom: 1px solid var(--faint); }
.prop-add { align-self: flex-start; border: 0; background: none; color: var(--faint); font-size: 13px; padding: 4px 6px; border-radius: 6px; margin-top: 2px; }
.prop-add:hover { background: var(--hover); color: var(--muted); }
@media (max-width: 560px) { .prop-row { grid-template-columns: 110px 1fr; } }

/* ================= task board ================= */
.kb-wrap { height: 100%; display: flex; flex-direction: column; padding: 40px 32px 0; overflow: hidden; }
.kb-head { flex-wrap: wrap; }
.kb-filter { width: 200px; }
.kb-hint { margin: -6px 0 14px; }
.kb { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 16px; }
.kb-col { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-height: 0; }
.kb-col-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px 8px; font-weight: 500; font-size: 13.5px; }
.kb-col-title { flex: 1; }
.kb-count { font-size: 11.5px; color: var(--muted); background: var(--hover); border-radius: 10px; padding: 0 8px; font-weight: 500; }
.kb-inbox .kb-col-head { border-top: 3px solid #2ea8e5; border-radius: 12px 12px 0 0; }
.kb-doing .kb-col-head { border-top: 3px solid #f19837; border-radius: 12px 12px 0 0; }
.kb-done .kb-col-head { border-top: 3px solid #5fb236; border-radius: 12px 12px 0 0; }
.kb-list { flex: 1; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.kb-card { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.kb-card:hover { border-color: var(--line2); }
.kb-card.done .kb-title { color: var(--muted); text-decoration: line-through; }
.kb-row { display: flex; align-items: flex-start; gap: 8px; }
.kb-check { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--faint); background: none; padding: 0; font-size: 11px; line-height: 1; color: #fff; margin-top: 1px; }
.kb-check:hover { border-color: #5fb236; } .kb-check.on { background: #5fb236; border-color: #5fb236; }
.kb-title { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: break-word; cursor: text; outline: none; }
.kb-title.empty { color: var(--faint); }
.kb-title[contenteditable="true"] { user-select: text; -webkit-user-select: text; box-shadow: 0 0 0 2px var(--accent-soft); border-radius: 4px; }
.kb-more { border: 0; background: none; color: var(--faint); border-radius: 4px; padding: 0 4px; opacity: 0; }
.kb-card:hover .kb-more { opacity: 1; } .kb-more:hover { background: var(--hover); color: var(--text); }
.kb-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 0 26px; }
.kb-link { font-size: 12px; background: var(--hover); border-radius: 6px; padding: 1px 7px; cursor: pointer; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kb-link:hover { background: var(--active); }
.kb-due { font-size: 12px; color: var(--muted); padding: 1px 4px; } .kb-due.soon { color: #d9730d; } .kb-due.late { color: var(--danger); font-weight: 500; }
.kb-new { color: var(--muted); font-size: 13px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.kb-new:hover { background: var(--hover); color: var(--text); }
.kb-input { width: 100%; border: 1px solid var(--accent); border-radius: 8px; padding: 8px 10px; outline: none; background: var(--bg); }
.kb-ph { border: 2px dashed var(--line2); border-radius: 10px; background: var(--hover); flex: none; }
.kb-hidden { display: none; }
.kb-ghost { position: fixed; left: 0; top: 0; z-index: 3000; pointer-events: none; box-shadow: var(--shadow); opacity: .95; cursor: grabbing; }
.task-link.done { color: var(--muted); text-decoration: line-through; }
@media (pointer: coarse) { .kb-more { opacity: 1; } .kb-check { width: 22px; height: 22px; } }
@media (max-width: 819px) {
  .kb-wrap { padding: 20px 12px 0; }
  .kb { grid-template-columns: repeat(3, 82vw); scroll-snap-type: x mandatory; }
  .kb-col { scroll-snap-align: start; }
  .kb-filter { width: 100%; order: 5; }
}

/* ================= share dialog ================= */
.share-fmts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.share-fmt { display: grid; grid-template-columns: 20px 140px 1fr; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.share-fmt.on { border-color: var(--accent); background: var(--accent-soft); }
.share-actions { display: flex; flex-direction: column; gap: 8px; }
.share-actions .btn { text-align: left; padding: 10px 14px; }
.share-status { margin-top: 10px; }
@media (max-width: 560px) { .share-fmt { grid-template-columns: 20px 1fr; } .share-fmt > span { grid-column: 2; } }

.logo-img { width: 24px; height: 24px; border-radius: 6px; display: block; }
.logo-img.big { width: 72px; height: 72px; border-radius: 16px; }

/* ================= ToDo boards v2 ================= */
.kb-wrap { padding: 28px 28px 0; }
.kb-top { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.kb-h1 { margin: 0; font-size: 28px; display: flex; align-items: center; gap: 8px; }
.kb-shared { font-size: 16px; }
.kb-boards { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.kb-boards::-webkit-scrollbar { display: none; }
.kb-bchip { flex: none; border: 1px solid var(--line); background: var(--bg); border-radius: 16px; padding: 4px 12px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.kb-bchip:hover { background: var(--hover); } .kb-bchip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.kb-bchip.add { color: var(--muted); border-style: dashed; }
.kb-n { font-size: 11px; opacity: .7; }
.kb-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.kb-bar .kb-filter { width: 200px; }
.kb-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.kb-members { display: inline-flex; }
.kb-members .av { margin-left: -6px; border: 2px solid var(--bg); }
.av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 500; flex: none; }
.av.sm { width: 20px; height: 20px; font-size: 9.5px; }
.kb { display: flex; gap: 12px; grid-template-columns: none; align-items: stretch; }
.kb-col { flex: 0 0 290px; }
.kb-col-head { border-top: 3px solid var(--cc) !important; border-radius: 12px 12px 0 0; }
.kb-col-menu { border: 0; background: none; color: var(--faint); border-radius: 6px; padding: 0 6px; }
.kb-col-menu:hover { background: var(--hover); color: var(--text); }
.kb-addcol { flex: 0 0 160px; align-self: flex-start; border: 1px dashed var(--line2); background: none; border-radius: 12px; padding: 12px; color: var(--muted); }
.kb-addcol:hover { background: var(--hover); }
.kb-new-row { display: flex; align-items: center; gap: 4px; }
.kb-new-row .kb-new { flex: 1; }
.kb-pick { border: 0; background: none; color: var(--faint); font-size: 12px; border-radius: 6px; padding: 6px 7px; }
.kb-pick:hover { background: var(--hover); color: var(--text); }
.kb-card { border-left: 3px solid transparent; }
.kb-card.kind-source { border-left-color: rgba(241, 152, 55, .7); }
.kb-card.kind-note { border-left-color: rgba(46, 168, 229, .7); }
.kb-card.kind-paper { border-left-color: rgba(162, 138, 229, .8); }
.kb-meta { align-items: center; margin-left: 26px; }
.kb-meta .spacer { flex: 1; }
.kb-cl { font-size: 11.5px; color: var(--muted); } .kb-cl.full { color: #5fb236; }
.kb-board { font-size: 11.5px; color: var(--faint); }
.kb-title { cursor: pointer; }
.kb-col[data-nodrop] .kb-ph { display: none; }
/* card dialog */
.cd-title { width: 100%; border: 0; outline: none; font-size: 22px; font-weight: 500; background: none; margin-bottom: 12px; }
.cd-grid { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; align-items: center; margin-bottom: 14px; }
.cd-l { color: var(--muted); font-size: 13px; }
.cd-people, .cd-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cd-person { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 2px 10px 2px 3px; background: var(--bg); font-size: 12.5px; }
.cd-person.on { border-color: var(--accent); background: var(--accent-soft); }
.cd-person.add { padding: 3px 10px; color: var(--muted); border-style: dashed; }
.cd-links .kb-link { display: inline-flex; gap: 4px; align-items: center; }
.x { border: 0; background: none; color: var(--faint); border-radius: 4px; padding: 0 5px; }
.x:hover { background: var(--hover); color: var(--text); }
.cd-progress { height: 5px; background: var(--hover); border-radius: 4px; overflow: hidden; margin: 2px 0 8px; }
.cd-progress > div { height: 100%; background: #5fb236; transition: width .2s; }
.cd-steps { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.cd-step { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 6px; }
.cd-step:hover { background: var(--hover); }
.cd-step-t { flex: 1; } .cd-step.done .cd-step-t { text-decoration: line-through; color: var(--muted); }
.cd-steps .input { margin-top: 4px; }
.cd-notes { width: 100%; resize: vertical; margin-bottom: 12px; }
.mem-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.mem-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; }
.mem-row:hover { background: var(--hover); } .mem-main { flex: 1; }
.mem-add { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; }
.team-steps { line-height: 1.6; padding-left: 20px; } .team-steps li { margin-bottom: 10px; } .team-steps .btn { margin-top: 6px; }
.st-pill { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; color: var(--pc); background: rgba(128, 128, 128, .12); white-space: nowrap; }
@supports (background: color-mix(in srgb, red 20%, transparent)) { .st-pill { background: color-mix(in srgb, var(--pc) 16%, transparent); color: color-mix(in srgb, var(--pc) 75%, black); } }
@media (prefers-color-scheme: dark) { @supports (background: color-mix(in srgb, red 20%, transparent)) { .st-pill { color: color-mix(in srgb, var(--pc) 70%, white); } } }
/* library */
.lib-row { grid-template-columns: minmax(170px, 1.1fr) 2fr 70px 110px 130px; }
.lib-sub { font-size: 13px; color: var(--muted); }
.lib-status { cursor: pointer; } .st-add { font-size: 12px; color: var(--faint); } .lib-row:hover .st-add { color: var(--accent); }
@media (max-width: 819px) {
  .kb-col { flex-basis: 82vw; scroll-snap-align: start; } .kb { scroll-snap-type: x mandatory; }
  .kb-bar .kb-filter { width: 100%; }
  .cd-grid { grid-template-columns: 1fr; } .mem-add { grid-template-columns: 1fr; }
}
@media (max-width: 999px) { .lib-row { grid-template-columns: 1fr 70px 110px; } .lib-row > :nth-child(2), .lib-row > :nth-child(4) { display: none; } }
/* account */
.acc-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.acc-h { font-weight: 500; margin-bottom: 2px; }
.acc-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .acc-main { flex: 1; min-width: 200px; }
.acc-status { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; margin-top: 4px; }
.acc-steps { padding-left: 20px; margin: 6px 0 0; line-height: 2; } .acc-steps .row { gap: 6px; } .acc-steps .input { min-width: 260px; }
.off-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); display: inline-block; }
/* OCR progress: fixed size, no jitter */
.rd-banner { width: min(380px, 90%); font-variant-numeric: tabular-nums; }
.rd-banner > span:not(.spin) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-banner .bar i { transition: width .45s ease-out; will-change: width; }
.rd-banner .bar.indet i { width: 30% !important; animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.pn-warn { color: #d9730d !important; font-weight: 500; }
.rd-pageinfo { cursor: pointer; font-variant-numeric: tabular-nums; }
.pn-q { display: flex; align-items: center; gap: 10px; margin: 12px 0; } .pn-input { width: 120px; font-size: 18px; text-align: center; }
/* ================= softer palette (same hues as Zotero / Vorschau) ================= */
.hl { opacity: .38; }
@keyframes flash { 0%, 100% { opacity: .38; } 20%, 60% { opacity: .85; box-shadow: 0 0 0 3px var(--hc); } }
@media (prefers-color-scheme: dark) { .hl { opacity: .45; } }
.card { border-top-color: color-mix(in srgb, var(--c) 65%, transparent); }
.rd-pages { align-items: safe center; }
.zoom-lbl { min-width: 48px; font-variant-numeric: tabular-nums; font-size: 12px; }
/* fold */
.rd-fold { padding: 14px 28px 40vh; display: flex; flex-direction: column; align-items: safe center; gap: 0; }
.fold-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 10px; box-shadow: var(--shadow); padding: 8px 12px; font-size: 13px; margin-bottom: 14px; width: min(720px, 100%); }
.fold-snip { position: relative; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); cursor: pointer; }
.fold-snip:hover { box-shadow: 0 0 0 2px var(--accent-soft), 0 1px 3px rgba(0, 0, 0, .12); }
.fold-img { position: relative; line-height: 0; }
.fold-ov { position: absolute; left: 0; top: 0; pointer-events: none; }
.fold-ov .hl { pointer-events: none; }
.fold-pg { position: absolute; left: -46px; top: 6px; font-size: 11px; color: var(--muted); width: 40px; text-align: right; }
.fold-cm { line-height: 1.4; font-size: 12.5px; padding: 6px 12px; background: #fffbe6; color: #5b4a00; border-top: 1px solid #f0e6b3; }
.fold-gap { align-self: stretch; text-align: center; margin: 2px 0; cursor: pointer; position: relative; height: 22px; }
.fold-gap::before { content: ''; position: absolute; left: 10%; right: 10%; top: 50%; border-top: 2px dashed var(--line2); }
.fold-gap span { position: relative; background: var(--pdf-bg); padding: 0 10px; font-size: 11.5px; color: var(--muted); }
.fold-gap:hover span { color: var(--accent); }
/* ================= handwriting notes v2 ================= */
.nb-main { flex: 1; display: flex; min-height: 0; }
.nb-thumbs { width: 140px; flex: none; overflow-y: auto; background: var(--bg2); border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.nb-thumb { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font-size: 11px; color: var(--muted); }
.nb-thumb canvas { border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); background: #fffdf8; }
.nb-thumb:hover canvas { box-shadow: 0 0 0 2px var(--accent); }
.nb-pages.board { align-items: flex-start; }
.nb-page.board { border-radius: 4px; }
.btn.rec { color: #fff; background: #e03e3e; border-color: #e03e3e; animation: recPulse 1.4s infinite; }
@keyframes recPulse { 50% { opacity: .75; } }
.ip-kind { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; height: 30px; font-size: 12px; padding: 0 4px; }
.ink-items { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.ink-item { position: absolute; pointer-events: none; line-height: 1.3; border-radius: 4px; }
.ink-items[data-tool="text"] .ink-item, .ink-items[data-tool="sticky"] .ink-item, .ink-items[data-tool="lasso"] .ink-item { pointer-events: auto; }
.ink-item .ii-body { outline: none; min-height: 1.3em; white-space: pre-wrap; overflow-wrap: break-word; padding: .15em .3em; cursor: text; }
.ink-item .ii-body:empty::before { content: attr(data-ph); color: #b9b4a6; }
.ink-item.ii-text:focus-within { box-shadow: 0 0 0 1.5px var(--accent); }
.ink-item.ii-sticky { box-shadow: 0 2px 8px rgba(0, 0, 0, .15); padding: .4em .5em; border-radius: 4px; }
.ink-item.ii-image img { width: 100%; display: block; border-radius: 4px; user-select: none; -webkit-user-drag: none; }
.ii-grip, .ii-del, .ii-resize { position: absolute; opacity: 0; transition: opacity .12s; }
.ink-item:hover .ii-grip, .ink-item:hover .ii-del, .ink-item:hover .ii-resize, .ink-item:focus-within .ii-grip { opacity: 1; }
.ii-grip { left: -20px; top: 0; width: 18px; height: 22px; font-size: 12px; color: #888; cursor: grab; display: grid; place-items: center; background: var(--bg); border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }
.ii-del { right: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #444; color: #fff; font-size: 12px; line-height: 1; padding: 0; cursor: pointer; }
.ii-resize { right: -5px; bottom: -5px; width: 12px; height: 12px; border-radius: 4px; background: var(--accent); cursor: nwse-resize; }
.ink-sel-scale { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; pointer-events: auto; cursor: nwse-resize; }
@media (pointer: coarse) { .ii-grip, .ii-del, .ii-resize { opacity: 1; } .ink-sel-scale { width: 22px; height: 22px; right: -11px; bottom: -11px; } }
/* drawing block inside text notes */
.drawing { margin: 10px 0; border: 1px solid var(--line); border-radius: 10px; overflow: visible; position: relative; background: #fffdf8; }
.drawing.editing { box-shadow: 0 0 0 2px var(--accent-soft); }
.dw-surface { position: relative; width: 100%; --u: 8px; border-radius: 10px 10px 0 0; overflow: hidden; }
.dw-palette { position: sticky; top: 0; z-index: 8; padding: 6px; border-bottom: 1px solid var(--line); background: var(--bg2); border-radius: 10px 10px 0 0; }
.dw-palette .ink-palette { box-shadow: none; flex-wrap: wrap; }
.dw-foot { display: flex; align-items: center; padding: 4px 8px; border-top: 1px solid var(--line); background: var(--bg); border-radius: 0 0 10px 10px; }
.dw-edit { border: 0; background: none; color: var(--accent); font-weight: 500; font-size: 12.5px; padding: 4px 6px; border-radius: 6px; }
.dw-edit:hover { background: var(--hover); }
.dw-grow { position: absolute; left: 50%; bottom: -6px; width: 44px; height: 10px; margin-left: -22px; border-radius: 6px; background: var(--line2); cursor: ns-resize; opacity: 0; }
.drawing:hover .dw-grow { opacity: 1; }
@media (prefers-color-scheme: dark) { .drawing { background: #f7f5ee; } }

/* ================= ToDo – clean, minimal (Notion/Apple look) ================= */
.kb-wrap { padding: 36px 40px 0; max-width: none; }
.kb-h1 { font-size: 30px; font-weight: 500; letter-spacing: -.02em; }
.kb-boards { gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.kb-bchip { border: 0; background: none; border-radius: 0; padding: 7px 10px 9px; color: var(--muted); font-size: 13.5px; box-shadow: inset 0 -2px 0 transparent; }
.kb-bchip:hover { background: none; color: var(--text); }
.kb-bchip.on { background: none; color: var(--text); border: 0; font-weight: 500; box-shadow: inset 0 -2px 0 var(--text); }
.kb-bchip.add { border: 0; color: var(--faint); }
.kb-n { font-size: 11px; color: var(--faint); font-weight: 400; }
.kb-bar { gap: 4px; margin: 10px 0 14px; }
.kb-bar .input, .kb-bar .select { border: 0; background: transparent; box-shadow: none; color: var(--muted); font-size: 13px; height: 28px; border-radius: 6px; padding: 0 8px; }
.kb-bar .select:hover, .kb-bar .input:hover, .kb-bar .input:focus { background: var(--hover); color: var(--text); outline: none; }
.kb-bar .kb-filter { width: 170px; }
.kb-bar .btn { border: 0; background: none; color: var(--muted); }
.kb-bar .btn:hover { background: var(--hover); color: var(--text); }
.kb-chk { font-size: 13px; padding: 0 6px; }
.kb { gap: 18px; padding-bottom: 24px; }
.kb-col { flex: 0 0 280px; background: transparent; border: 0; border-radius: 0; }
.kb-col-head { border: 0 !important; border-radius: 0; padding: 4px 4px 10px; font-size: 13px; font-weight: 500; color: var(--muted); gap: 7px; }
.kb-col-head::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cc, var(--faint)); flex: none; }
.kb-col-head:has(.av)::before { display: none; }
.kb-col-title { color: var(--text); }
.kb-count { background: none; color: var(--faint); padding: 0; font-weight: 400; }
.kb-col-menu { opacity: 0; } .kb-col:hover .kb-col-menu { opacity: 1; }
.kb-list { padding: 0 0 12px; gap: 6px; }
.kb-card { border: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; box-shadow: 0 1px 1px rgba(15, 15, 15, .03); transition: box-shadow .15s, border-color .15s; }
.kb-card:hover { border-color: var(--line2); box-shadow: 0 2px 8px rgba(15, 15, 15, .07); }
.kb-card.kind-source, .kb-card.kind-note, .kb-card.kind-paper { border-left-color: var(--line); }
.kb-title { font-size: 13.5px; font-weight: 500; }
.kb-check { width: 16px; height: 16px; border-width: 1.5px; border-color: var(--line2); margin-top: 2px; }
.kb-meta { margin: 8px 0 0 24px; gap: 6px; }
.kb-link { background: none; padding: 0; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line2); border-radius: 0; }
.kb-link:hover { background: none; color: var(--text); }
.kb-due, .kb-cl, .kb-board { font-size: 11.5px; }
.kb-new { color: var(--faint); font-size: 13px; padding: 6px 4px; }
.kb-new:hover { background: none; color: var(--text); }
.kb-pick { opacity: 0; } .kb-col:hover .kb-pick { opacity: 1; }
.kb-addcol { flex: 0 0 140px; border: 0; color: var(--faint); text-align: left; padding: 4px; font-size: 13px; }
.kb-addcol:hover { background: none; color: var(--text); }
.kb-ph { border: 0; background: var(--accent-soft); border-radius: 8px; }
.kb-ghost { box-shadow: 0 12px 32px rgba(15, 15, 15, .18); transform-origin: center; }
.kb-members .av { width: 24px; height: 24px; }
/* card dialog: quieter */
.cd-title { font-size: 26px; font-weight: 500; letter-spacing: -.01em; }
.cd-grid { gap: 4px 12px; }
.cd-grid .select, .cd-grid .input { border-color: transparent; background: transparent; }
.cd-grid .select:hover, .cd-grid .input:hover, .cd-grid .input:focus { background: var(--hover); }
.cd-person { border-color: transparent; background: var(--hover); }
.cd-person.on { background: var(--accent-soft); border-color: transparent; }
@media (pointer: coarse) { .kb-col-menu, .kb-pick { opacity: 1; } }
@media (max-width: 819px) { .kb-wrap { padding: 20px 14px 0; } }

/* =====================================================================
   Apple-Look: clean, minimal, system colours (macOS / iPadOS)
   ===================================================================== */
:root {
  --bg: #ffffff; --bg2: #f5f5f7; --bg3: #ececf0; --hover: rgba(0, 0, 0, .045); --active: rgba(0, 0, 0, .075);
  --text: #1d1d1f; --muted: #6e6e73; --faint: #a1a1a6; --line: rgba(0, 0, 0, .08); --line2: rgba(0, 0, 0, .14);
  --accent: #007aff; --accent-soft: rgba(0, 122, 255, .12); --danger: #ff3b30; --ok: #34c759;
  --shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 8px 30px rgba(0, 0, 0, .12);
  --radius: 10px; --sb-w: 250px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --pdf-bg: #f2f2f5;
}
@media (prefers-color-scheme: dark) {
  :root:root {
    --bg: #1e1e1e; --bg2: #262628; --bg3: #2f2f32; --hover: rgba(255, 255, 255, .06); --active: rgba(255, 255, 255, .1);
    --text: #f5f5f7; --muted: #a1a1a6; --faint: #6e6e73; --line: rgba(255, 255, 255, .09); --line2: rgba(255, 255, 255, .16);
    --accent: #0a84ff; --accent-soft: rgba(10, 132, 255, .22); --danger: #ff453a; --shadow: 0 0 0 .5px rgba(255, 255, 255, .1), 0 10px 34px rgba(0, 0, 0, .5); --pdf-bg: #141414;
  }
}
html, body { font-size: 13.5px; letter-spacing: -.003em; }
h1 { font-weight: 500; letter-spacing: -.025em; }
/* sidebar */
#sidebar { background: var(--bg2); border-right: 1px solid var(--line); }
.sb-top { height: 40px; }
.nav { color: var(--faint); }
.sb-brand { display: flex; align-items: center; gap: 6px; padding: 0 10px 10px 14px; font-weight: 500; font-size: 15px; letter-spacing: -.01em; cursor: default; }
.sb-brand-main { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.sb-mini { border: 0; background: none; width: 26px; height: 26px; border-radius: 8px; font-size: 13px; padding: 0; opacity: .75; }
.sb-mini:hover, .sb-mini.on { background: var(--active); opacity: 1; }
.sb-search { margin: 0 10px 10px; padding: 6px 10px; border-radius: 8px; background: var(--active); color: var(--muted); font-size: 13px; }
.sb-search:hover { background: rgba(0, 0, 0, .1); }
@media (prefers-color-scheme: dark) { .sb-search:hover { background: rgba(255, 255, 255, .14); } }
.sb-search kbd { background: transparent; border: 0; color: var(--faint); }
.sb-scroll { padding: 0 8px 24px; }
.sb-item, .sb-folder { min-height: 28px; padding: 3px 8px; border-radius: 8px; gap: 8px; font-size: 13.5px; }
.sb-item:hover, .sb-folder:hover { background: var(--hover); }
.sb-ic { width: 20px; font-size: 14px; color: inherit; }
.sb-main { font-weight: 500; margin-top: 2px; }
.sb-group { margin-bottom: 1px; }
.sb-children { padding: 1px 0 6px 12px; }
.sb-children .sb-item { font-size: 13px; min-height: 26px; }
.sb-sub { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sb-disc { border: 0; background: none; color: var(--faint); width: 18px; height: 18px; border-radius: 6px; padding: 0; font-size: 13px; line-height: 1; transition: transform .15s; flex: none; }
.sb-disc:hover { background: var(--active); color: var(--text); }
.sb-disc.open { transform: rotate(90deg); }
.sb-addrow { color: var(--faint); }
.sb-addrow .sb-ic { font-size: 11px; opacity: .8; }
.sb-addrow:hover { color: var(--text); }
.sb-empty { padding: 3px 8px 3px 36px; font-size: 12px; }
.sb-indent { padding-left: 14px; }
/* tabs */
#tabbar { background: var(--bg2); border-bottom: 1px solid var(--line); height: 38px; }
.tab { border-radius: 8px; height: 28px; margin-bottom: 4px; }
.tab.active { box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0, 0, 0, .06); clip-path: none; border-radius: 8px; }
/* controls */
.btn { border: 0; background: var(--active); border-radius: 8px; padding: 6px 13px; font-weight: 500; color: var(--text); }
.btn:hover { background: rgba(0, 0, 0, .1); }
@media (prefers-color-scheme: dark) { .btn:hover { background: rgba(255, 255, 255, .15); } }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn.danger { background: transparent; color: var(--danger); }
.btn.danger:hover { background: rgba(255, 59, 48, .1); }
.btn.sm { padding: 4px 10px; border-radius: 8px; }
.tb-btn { border-radius: 8px; }
.tb-btn.on { background: var(--accent-soft); color: var(--accent); }
.input, .select { border: 0; background: var(--active); border-radius: 8px; padding: 7px 10px; box-shadow: none; }
.input:focus, .select:focus { background: var(--bg); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
.input.sm, .select.sm { border-radius: 8px; }
input[type="checkbox"] { accent-color: var(--accent); }
.nv-top, .rd-toolbar { border-bottom: 1px solid var(--line); }
/* menus & popovers – macOS menu look */
.ctx { border: 0; border-radius: 10px; padding: 5px; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); box-shadow: var(--shadow); }
.ctx-item { border-radius: 6px; padding: 5px 9px; font-size: 13px; }
.ctx-item:hover { background: var(--accent); color: #fff; }
.ctx-item:hover .ctx-ic, .ctx-item:hover .ctx-kbd { color: #fff; }
.ctx-item.danger:hover { background: var(--danger); color: #fff; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 8px; }
.ctx-head { font-size: 11px; color: var(--faint); padding: 5px 9px 3px; }
.ctx-ic { font-size: 13px; }
.modal-back { background: rgba(0, 0, 0, .22); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal { border-radius: 14px; padding: 22px; box-shadow: var(--shadow); }
.modal-title { font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.toast { background: rgba(30, 30, 30, .86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-radius: 12px; }
.note-box { border: 0; background: var(--bg2); border-radius: 10px; }
.section-label { color: var(--faint); font-weight: 500; letter-spacing: .02em; }
/* pages */
.page-wrap { padding-top: 48px; }
.page-head h1 { font-size: 28px; }
.set-sec { border-top: 1px solid var(--line); }
.set-sec h3 { color: var(--faint); }
.acc-card { border: 0; background: var(--bg2); border-radius: 12px; }
.lib-row { border-bottom: 1px solid var(--line); border-radius: 0; }
.lib-row:hover:not(.head) { background: var(--hover); border-radius: 8px; }
.proj-chip { display: inline-block; font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--active); border-radius: 6px; padding: 1px 7px; margin-left: 4px; white-space: nowrap; }
.proj-btn { border: 0; background: var(--active); color: var(--text); border-radius: 8px; padding: 3px 9px; font-size: 12.5px; margin-left: 8px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.proj-btn.empty { background: none; color: var(--faint); }
.proj-btn:hover { background: rgba(0, 0, 0, .1); color: var(--text); }
.paper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 10px; }
.paper-card { background: var(--bg); border-radius: 12px; padding: 16px; box-shadow: 0 0 0 .5px var(--line2), 0 1px 3px rgba(0, 0, 0, .05); cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s, transform .15s; }
.paper-card:hover { box-shadow: 0 0 0 .5px var(--line2), 0 8px 24px rgba(0, 0, 0, .1); transform: translateY(-1px); }
.pc-ic { font-size: 24px; } .pc-title { font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
.pc-chips .proj-chip { margin-left: 0; margin-right: 4px; }
.pick-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.pick-row { display: grid; grid-template-columns: 20px auto 1fr; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.pick-row:hover { background: var(--hover); }
.qa { border: 0; background: var(--bg2); border-radius: 14px; }
.qa:hover { background: var(--bg3); }
.doc-tile { border: 0; background: var(--bg2); border-radius: 12px; }
.kb-card, .card { border-radius: 10px; }
.tagchip { border-radius: 6px; }
.fav { border: 0; background: var(--bg2); border-radius: 10px; padding: 8px 12px; font-size: 13px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav:hover { background: var(--bg3); }
.ProseMirror h4 { font-size: 1.02em; font-weight: 580; margin: 1em 0 .3em; }
.gki { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; background: var(--bg2); border-radius: 10px; margin-top: 6px; }

/* ---------- Schreibhilfen (Arbeit) ---------- */
.nv-body { position: relative; }
.nv-stats { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 3px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nv-stats:hover { background: var(--hover); color: var(--text); }
.stat-goal { display: inline-block; width: 46px; height: 4px; border-radius: 2px; background: var(--bg3); overflow: hidden; }
.stat-goal i, .sp-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.page-pill { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 6px); z-index: 30; pointer-events: none; opacity: 0; transition: opacity .35s, transform .35s;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: .5px solid var(--line2); box-shadow: var(--shadow); border-radius: 999px; padding: 6px 14px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.page-pill b { color: var(--text); font-weight: 500; }
.page-pill.show { opacity: 1; transform: translate(-50%, 0); }
.toc-rail { position: absolute; top: 0; bottom: 0; left: 0; width: 28px; z-index: 25; }
.toc-rail.hidden { display: none; }
.tr-ticks { position: absolute; top: 50%; left: 10px; transform: translateY(-50%); display: flex; flex-direction: column; gap: 7px; opacity: .35; transition: opacity .3s; max-height: 80%; overflow: hidden; }
.toc-rail.awake .tr-ticks { opacity: .9; }
.tr-tick { height: 2px; border-radius: 1px; background: var(--faint); width: 14px; transition: background .2s, width .2s; }
.tr-tick.l2 { width: 10px; } .tr-tick.l3 { width: 7px; } .tr-tick.l4 { width: 5px; }
.tr-tick.on { background: var(--accent); width: 16px; }
.toc-panel { position: absolute; top: 12px; bottom: 12px; left: 8px; width: 290px; overflow-y: auto; padding: 10px 6px; opacity: 0; pointer-events: none; transform: translateX(-8px); transition: opacity .2s, transform .2s;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); border: .5px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); }
.toc-rail:hover { width: 310px; }
.toc-rail:hover .toc-panel { opacity: 1; pointer-events: auto; transform: none; }
.toc-rail:hover .tr-ticks { opacity: 0; }
.tp-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 2px 8px 8px; }
.tp-head span { text-transform: none; font-weight: 500; }
.tp-row { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.tp-row:hover { background: var(--hover); }
.tp-row.on { color: var(--accent); background: var(--accent-soft); }
.tp-row.l1 { font-weight: 500; } .tp-row.l2 { padding-left: 20px; } .tp-row.l3 { padding-left: 32px; font-size: 12.5px; } .tp-row.l4 { padding-left: 44px; font-size: 12px; color: var(--muted); }
.tp-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-p { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12px; }
.stats-pop { position: fixed; z-index: 1000; width: 330px; background: var(--bg); border: .5px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-grid > div { background: var(--bg2); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; }
.sp-grid b { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sp-grid span { font-size: 11px; color: var(--muted); }
.sp-goal-l { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.sp-bar { height: 6px; border-radius: 4px; background: var(--bg3); overflow: hidden; }
.sp-ch { display: flex; flex-direction: column; font-size: 12.5px; }
.sp-ch-h, .sp-ch-r { display: grid; grid-template-columns: 1fr 60px 40px; gap: 6px; padding: 3px 4px; }
.sp-ch-h { color: var(--muted); font-size: 11px; border-bottom: .5px solid var(--line); }
.sp-ch-r { cursor: pointer; border-radius: 6px; font-variant-numeric: tabular-nums; }
.sp-ch-r:hover { background: var(--hover); }
.sp-ch-h span:not(:first-child), .sp-ch-r span:not(:first-child) { text-align: right; }

/* ---------- Druckvorschau ---------- */
.pv-modal { max-height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; }
.pv-wrap { display: flex; flex-direction: column; min-height: 0; height: calc(100vh - 60px); }
.pv-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: .5px solid var(--line); }
.pv-status { padding: 60px; text-align: center; color: var(--muted); }
.pv-pages { flex: 1; overflow-y: auto; background: var(--pdf-bg); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pv-page { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pv-page canvas { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 6px 20px rgba(0,0,0,.08); border-radius: 2px; }
.pv-lab { font-size: 11px; color: var(--muted); }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Quellenkarte ---------- */
.popover.cite-pop { width: 380px; max-height: min(560px, calc(100vh - 24px)); overflow-y: auto; gap: 6px; }
.ci { display: flex; flex-direction: column; gap: 6px; }
.ci-head { display: flex; gap: 10px; align-items: flex-start; }
.ci-ico { font-size: 22px; line-height: 1; }
.ci-title { font-weight: 500; font-size: 14px; line-height: 1.3; }
.ci-sub { font-size: 12px; color: var(--text); margin-top: 2px; }
.ci-sub.muted { color: var(--muted); }
.ci-sec { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 8px; }
.ci-where { font-size: 13px; }
.ci-quote { margin: 0; padding: 6px 10px; border-left: 3px solid var(--line2); font-family: var(--serif); font-size: 13.5px; color: var(--text); }
.ci-x { border-left: 3px solid var(--xc); background: color-mix(in srgb, var(--xc) 14%, transparent); border-radius: 0 8px 8px 0; padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.ci-x:hover { background: color-mix(in srgb, var(--xc) 24%, transparent); }
.ci-x img { max-width: 100%; border-radius: 4px; }
.ci-xt { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.ci-xc { font-size: 12.5px; color: var(--text); }
.ci-xp, .ci-tags { font-size: 11px; color: var(--muted); }
.ci-notes { display: flex; flex-direction: column; }
.ci-note { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ci-note:hover { background: var(--hover); }
.ci-note > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.cite-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cite-edit label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); }
.cite.flash { background: color-mix(in srgb, var(--olive, #6f7f4f) 30%, transparent); border-radius: 4px; transition: background .3s; }
.crumb-link { color: var(--muted); cursor: pointer; border-radius: 4px; padding: 1px 3px; margin: 0 -1px; text-decoration: none; }
.crumb-link:hover { color: var(--text); background: var(--hover); }
.rd-crumbs { flex: 0 0 auto; max-width: none; margin-right: 2px; }
.nv-filter { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.nv-filter .input { max-width: 360px; }
.folder-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: none; background: var(--bg2); color: var(--text); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.chip:hover { background: var(--bg3); }
.chip.on { background: var(--text); color: var(--bg); }
.nc-snip { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.home-h { display: flex; align-items: center; justify-content: space-between; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tc { border: none; background: var(--bg2); color: var(--text); border-radius: 999px; padding: 5px 11px; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; }
.tc:hover { background: var(--bg3); }
.tc-n { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.quick-todo { display: flex; flex-direction: column; gap: 12px; }
.qt-row { display: flex; gap: 10px; align-items: center; }
.qt-row label { display: flex; flex-direction: column; gap: 4px; flex: 1; color: var(--muted); }
.nv-top .crumbs { flex: 0 1 auto; min-width: 90px; }
.nv-top .proj-btn { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.nv-top select.select.sm { max-width: 120px; }
.nv-top .nv-stats { flex: 0 1 auto; min-width: 0; overflow: hidden; }
.av.has-photo { overflow: hidden; padding: 0; }
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.acc-photo { display: flex; align-items: center; gap: 14px; margin: 4px 0 6px; }
.acc-pic { width: 64px; height: 64px; border-radius: 50%; border: none; padding: 0; cursor: pointer; background: var(--bg3); display: grid; place-items: center; font-size: 22px; font-weight: 500; color: var(--muted); overflow: hidden; flex: none; }
.acc-pic img { width: 100%; height: 100%; object-fit: cover; }
.acc-pic:hover { filter: brightness(.92); }
.acc-pic-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.acc-pic-btns .tiny { flex-basis: 100%; }
.sb-mini.sb-me { padding: 0; width: 24px; height: 24px; border-radius: 50%; overflow: hidden; }
.sb-mini.sb-me img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-hello { display: flex; align-items: center; gap: 14px; }
.home-hello h1 { margin: 0; }
.home-pic { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; cursor: pointer; }
.home-h h3 { margin: 0; } .home-h { margin-bottom: 6px; }
.sb-plus { border: none; background: transparent; color: var(--muted); width: 20px; height: 20px; border-radius: 6px; font-size: 16px; line-height: 1; padding: 0; cursor: pointer; display: grid; place-items: center; opacity: 0; flex: none; margin-left: auto; font-family: inherit; }
.sb-item:hover > .sb-plus, .sb-plus:focus-visible { opacity: 1; }
.sb-plus:hover { background: var(--active); color: var(--text); }
.sb-item > .sb-plus + .sb-sub { margin-left: 4px; }
.sb-item:hover > .sb-sub { display: none; }
.tpl-panel { background: var(--bg2); border-radius: 12px; padding: 8px; margin: 4px 0 10px; display: flex; flex-direction: column; gap: 2px; }
.tpl-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto auto; gap: 10px; align-items: center; padding: 5px 8px; border-radius: 8px; }
.tpl-row:hover { background: var(--hover); }
.tpl-t { font-weight: 500; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-foot { display: flex; gap: 10px; align-items: center; padding: 6px 8px 2px; border-top: .5px solid var(--line); margin-top: 4px; }
/* endless workspace */
.ws-canvas { overflow: hidden; touch-action: none; cursor: default; }
.ws-canvas.panning { cursor: grabbing; }
.ws-board { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; will-change: transform; }
.ws-canvas.far .card-comment, .ws-canvas.far .card-tags { display: none; }
.ws-zl { min-width: 52px; font-variant-numeric: tabular-nums; }
/* ToDo calendar */
.seg { display: inline-flex; background: var(--bg2); border-radius: 8px; padding: 2px; gap: 2px; }
.seg-b { border: none; background: transparent; color: var(--muted); border-radius: 6px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.seg-b.on { background: var(--bg); color: var(--text); box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0,0,0,.06); }
.kb.kb-cal { display: grid; grid-template-columns: 1fr 230px; gap: 16px; overflow: auto; align-items: start; }
.cal-main { display: flex; flex-direction: column; min-width: 640px; }
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-head h2 { margin: 0 6px; font-size: 20px; font-weight: 500; letter-spacing: -.01em; min-width: 190px; text-align: center; }
.cal-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd div { font-size: 11px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; }
.cal-days { border-top: .5px solid var(--line2); border-left: .5px solid var(--line2); border-radius: 10px; overflow: hidden; }
.cal-day { border-right: .5px solid var(--line2); border-bottom: .5px solid var(--line2); padding: 4px 5px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; background: var(--bg); transition: background .12s; }
.cal-day.we { background: color-mix(in srgb, var(--bg2) 55%, var(--bg)); }
.cal-day.other { background: var(--bg2); }
.cal-day.other .cal-dn { color: var(--faint); }
.cal-dh { display: flex; align-items: center; justify-content: space-between; }
.cal-dn { font-size: 12.5px; font-weight: 500; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-dn { background: var(--danger); color: #fff; }
.cal-plus { border: none; background: none; color: var(--muted); font-size: 15px; width: 20px; height: 20px; border-radius: 6px; cursor: pointer; opacity: 0; padding: 0; }
.cal-day:hover .cal-plus { opacity: 1; } .cal-plus:hover { background: var(--hover); color: var(--text); }
.cal-ev { font-size: 11.5px; line-height: 1.3; padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--ec) 16%, transparent); color: var(--text); border-left: 2.5px solid var(--ec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev b { font-weight: 500; color: var(--muted); }
.cal-task { display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 5px; border-radius: 6px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2); cursor: grab; min-width: 0; border-left: 2.5px solid var(--cc); }
.cal-task:hover { box-shadow: 0 0 0 .5px var(--line2), 0 2px 6px rgba(0,0,0,.08); }
.cal-task.done span { text-decoration: line-through; color: var(--muted); }
.kb-check.sm { width: 14px; height: 14px; font-size: 9px; flex: none; }
.cal-side { position: sticky; top: 0; background: var(--bg2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 5px; min-height: 160px; }
.cal-side-h { display: flex; justify-content: space-between; font-weight: 500; font-size: 13px; }
.cal-side .cal-task { font-size: 12.5px; padding: 5px 7px; }
.cal-dlg { display: flex; flex-direction: column; gap: 10px; }
.cal-dlg .acc-card p { margin: 0 0 4px; }
.cal-add { display: grid; grid-template-columns: 1fr 140px; gap: 8px; align-items: center; }
.cal-add .input:first-child { grid-column: 1 / -1; }
.cal-sw { display: flex; gap: 6px; }
.cal-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.cal-dot.on { border-color: var(--text); }
.cal-dot.sm { width: 10px; height: 10px; border: 0; cursor: default; flex: none; }
.cal-links { display: flex; flex-direction: column; gap: 4px; }
.cal-link { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 8px; background: var(--bg); }
.ws-canvas.far .card { background: color-mix(in srgb, var(--c) 22%, var(--bg)); }
.crash-card { max-width: 520px; margin: 12vh auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 20px; }
.crash-ic { font-size: 44px; }
.crash-card h2 { margin: 0; font-size: 20px; }
.crash-msg { font-size: 12px; background: var(--bg2); padding: 6px 10px; border-radius: 8px; color: var(--muted); max-width: 100%; overflow-wrap: break-word; }
.acc-status { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.ic-row { display: flex; align-items: center; gap: 8px; color: var(--text); }
.acc-status .row { margin-top: 4px; gap: 6px; }
.cal-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cal-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow: auto; background: var(--bg); border-radius: 8px; padding: 4px; }
.cal-item { display: flex; align-items: center; justify-content: space-between; padding: 3px 6px; border-radius: 6px; }
.cal-item:hover { background: var(--hover); }
.cal-item .kb-chk { gap: 6px; }
.cal-dot.xs { width: 12px; height: 12px; border-width: 1.5px; }
.cal-more { align-self: flex-start; background: none !important; color: var(--muted); padding-left: 0; }
.cal-add { grid-template-columns: 1fr 140px auto; }
.cal-add .input:first-child { grid-column: auto; }

/* =====================================================================
   CiteBoard 2.5 – ruhiger, moderner Look (wie Claude / ChatGPT / Apple)
   ===================================================================== */
:root {
  --bg: #ffffff; --bg2: #f7f7f8; --bg3: #efeff1; --hover: rgba(0, 0, 0, .04); --active: rgba(0, 0, 0, .065);
  --text: #1f1f21; --muted: #6b6b70; --faint: #a3a3a8; --line: rgba(0, 0, 0, .07); --line2: rgba(0, 0, 0, .12);
  --accent: #3b82f6; --accent-soft: rgba(59, 130, 246, .10); --ok: #34a853; --danger: #e5484d;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 28px rgba(0,0,0,.08);
  --radius: 12px; --sb-bg: #f9f9fa;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #1d1d1f; --bg2: #252527; --bg3: #2e2e31; --hover: rgba(255,255,255,.05); --active: rgba(255,255,255,.09); --text: #ececee; --muted: #a0a0a6; --faint: #6c6c72; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14); --accent: #6aa3ff; --accent-soft: rgba(106,163,255,.16); --sb-bg: #19191b; }
}
body { font-size: 14px; letter-spacing: -.003em; }
#sidebar { background: var(--sb-bg); border-right: .5px solid var(--line); display: flex; flex-direction: column; }
.sb-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.sb-bottom { border-top: .5px solid var(--line); padding: 6px 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.sb-bottom .sb-group { width: 100%; }
.sb-item { border-radius: 8px; }
.sb-item.active { background: var(--active); font-weight: 500; }
.sb-mini { border-radius: 8px; }
.btn { border-radius: 10px; }
.btn.primary:hover { filter: none; opacity: .88; }
.empty-state.small { padding: 18px; font-size: 13px; }

/* ---------- start page */
.home { max-width: 1120px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.home-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (max-width: 1050px) { .home-grid { grid-template-columns: 1fr; } }
.hc { background: var(--bg); border: .5px solid var(--line2); border-radius: 16px; padding: 14px 16px 16px; }
.hc-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hc-h h3 { margin: 0; font-size: 14px; font-weight: 500; }
.hc-link { border: none; background: none; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; padding: 3px 6px; border-radius: 6px; }
.hc-link:hover { background: var(--hover); color: var(--text); }
.hc-list { display: flex; flex-direction: column; }
.hc-row { display: flex; gap: 8px; align-items: center; padding: 6px 6px; border-radius: 8px; cursor: pointer; font-size: 13px; min-width: 0; }
.hc-row:hover { background: var(--hover); }
.hc-row > span:last-child { min-width: 0; }
.hc-todos { display: flex; flex-direction: column; }
.ht-row { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-radius: 8px; font-size: 13.5px; }
.ht-row:hover { background: var(--hover); }
.ht-t { flex: 1; min-width: 0; cursor: pointer; }
.ht-p { font-size: 12px; }
.ht-d { font-size: 11.5px; color: var(--muted); background: var(--bg2); padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.ht-d.today { color: #b45309; background: rgba(245, 158, 11, .14); } .ht-d.late { color: var(--danger); background: rgba(229, 72, 77, .1); }
.kb-check { flex: none; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.proj-grid.compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
/* mini calendar */
.mc-h { font-weight: 500; font-size: 13px; margin-bottom: 6px; }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mc-wd { font-size: 10.5px; color: var(--faint); padding-bottom: 2px; }
.mc-d { position: relative; border: none; background: none; font: inherit; font-size: 12px; height: 30px; border-radius: 8px; cursor: pointer; color: var(--text); font-variant-numeric: tabular-nums; }
.mc-d:hover { background: var(--hover); }
.mc-d.other { color: var(--faint); }
.mc-d.today { background: var(--danger); color: #fff; font-weight: 500; }
.mc-dots { position: absolute; left: 0; right: 0; bottom: 3px; display: flex; justify-content: center; gap: 2px; }
.mc-dots b { width: 4px; height: 4px; border-radius: 50%; }
.mc-d.today .mc-dots b { background: #fff !important; }
.mc-next { margin-top: 10px; border-top: .5px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; }
.mc-row { display: grid; grid-template-columns: 3px 92px 1fr; gap: 8px; align-items: center; font-size: 12.5px; padding: 5px 4px; border-radius: 6px; cursor: pointer; }
.mc-row:hover { background: var(--hover); }
.mc-bar { height: 18px; border-radius: 2px; }
.mc-when { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* ---------- project workspace */
.pw { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.pw-head { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; padding: 22px 28px 12px; align-items: center; }
.pw-title { display: flex; gap: 12px; align-items: center; min-width: 0; }
.pw-title h1 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.pw-ic { font-size: 30px; cursor: pointer; }
.pw-actions { display: flex; gap: 6px; align-items: center; }
.pw-tabbar { grid-column: 1 / -1; }
.pw-cols { flex: 1; min-height: 0; display: flex; border-top: .5px solid var(--line); }
.pw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pw-body { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.pw-body.tab-excerpts, .pw-body.tab-notes, .pw-body.tab-sources, .pw-body.tab-todos { overflow-y: auto; }
.pw-paper { display: none; }
.pw.split .pw-paper { display: flex; flex-direction: column; width: 48%; min-width: 420px; border-left: .5px solid var(--line2); background: var(--bg); }
.pw-paper .note-view { height: 100%; }
.pw-paper .nv-side { display: none; }
.pw-pad { padding: 16px 28px 40px; display: flex; flex-direction: column; gap: 12px; }
.pw-filter { display: flex; flex-direction: column; gap: 8px; }
.pw-filter .input { max-width: 420px; }
.pw-xgroup { margin-bottom: 14px; }
.pw-xg-h { display: flex; gap: 8px; align-items: baseline; font-weight: 500; font-size: 13px; margin: 6px 0 8px; }
.pw-xg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pw-xg-cards .card { position: relative; width: auto; }
.pw-srcs { display: flex; flex-direction: column; gap: 2px; }
.pw-src { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.pw-src:hover { background: var(--hover); }
.card.kind-note { --c: var(--line2); background: var(--bg); }
.card.kind-note .card-pg { font-weight: 500; color: var(--text); }
.card.kind-note .card-text { color: var(--muted); font-size: 12.5px; }
.kb-embedded { padding: 14px 20px 0; } .kb-embedded .kb-top { display: none; }

/* ---------- canvas & floating toolbar (Freeform / GoodNotes) */
.cv-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.cv-wrap .ws-canvas { flex: 1; }
.ws-canvas.drop { box-shadow: inset 0 0 0 2px var(--accent); }
.ws-canvas[data-tool="pan"] { cursor: grab; } .ws-canvas[data-tool="sticky"], .ws-canvas[data-tool="frame"] { cursor: crosshair; } .ws-canvas[data-tool="connect"] .card { cursor: pointer; }
.cv-dock { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 20; pointer-events: none; }
.cv-bar, .cv-sub { pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 0 0 .5px var(--line2), 0 8px 24px rgba(0,0,0,.10); }
.cv-sub { padding: 5px 9px; gap: 6px; }
.cv-btn { border: none; background: transparent; width: 34px; height: 32px; border-radius: 10px; font-size: 16px; cursor: pointer; display: grid; place-items: center; color: var(--text); font-family: inherit; }
.cv-btn:hover { background: var(--hover); }
.cv-btn.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.cv-zl { width: auto; padding: 0 6px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 46px; }
.cv-sep { width: 1px; height: 20px; background: var(--line2); margin: 0 4px; }
.cv-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.cv-dot.on { border-color: var(--text); }
.card.cv-from { box-shadow: 0 0 0 2px var(--accent); }
.ws-frame { position: absolute; border-radius: 14px; background: color-mix(in srgb, var(--fc) 16%, transparent); border: 1.5px solid color-mix(in srgb, var(--fc) 55%, transparent); }
.ws-frame-t { position: absolute; left: 10px; top: -26px; font-size: 13px; font-weight: 500; color: var(--text); cursor: move; padding: 2px 8px; border-radius: 8px; background: color-mix(in srgb, var(--fc) 30%, var(--bg)); white-space: nowrap; }
.ws-frame-r { position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; cursor: nwse-resize; border-radius: 4px; }
.ws-frame-r::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; border-right: 2px solid var(--fc); border-bottom: 2px solid var(--fc); }
.cv-wrap .ws-hint { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); max-width: 420px; }
.card { border-radius: 12px; box-shadow: 0 0 0 .5px var(--line2), 0 1px 3px rgba(0,0,0,.05); }

/* ---------- date picker */
.date-field { display: inline-flex; align-items: center; gap: 7px; border: none; background: var(--bg2); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.date-field:hover { background: var(--bg3); }
.date-field.prop-in { background: transparent; padding: 3px 6px; } .date-field.prop-in:hover { background: var(--hover); }
.df-ic { font-size: 13px; }
.dp { position: fixed; z-index: 2000; width: 268px; background: var(--bg); border-radius: 14px; box-shadow: 0 0 0 .5px var(--line2), 0 16px 40px rgba(0,0,0,.16); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.dp-title { font-weight: 500; font-size: 13px; }
.dp-in { border: none; background: var(--bg2); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 13px; color: var(--text); outline: none; }
.dp-in:focus { box-shadow: 0 0 0 2px var(--accent-soft); } .dp-in.bad { box-shadow: 0 0 0 2px rgba(229,72,77,.35); }
.dp-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px; }
.dp-head b { font-size: 13px; font-weight: 500; }
.dp-nav { border: none; background: none; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; font-size: 16px; color: var(--text); }
.dp-nav:hover { background: var(--hover); }
.dp-wd, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.dp-wd span { font-size: 10.5px; color: var(--faint); }
.dp-d { border: none; background: none; height: 32px; border-radius: 50%; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); font-variant-numeric: tabular-nums; }
.dp-d:hover { background: var(--hover); } .dp-d.other { color: var(--faint); }
.dp-d.today { color: var(--danger); font-weight: 500; } .dp-d.on { background: var(--text); color: var(--bg); font-weight: 500; }
.dp-quick { display: flex; flex-wrap: wrap; gap: 4px; border-top: .5px solid var(--line); padding-top: 8px; }
.dp-q { border: none; background: var(--bg2); border-radius: 8px; padding: 4px 9px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.dp-q:hover { background: var(--bg3); } .dp-clear { color: var(--danger); }

/* ---------- calendar view */
.calv { height: 100%; display: flex; flex-direction: column; padding: 22px 28px 16px; min-height: 0; }
.calv .cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.calv .cal-head h1 { margin: 0; font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.cal-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 220px; gap: 16px; overflow: auto; }
.cal-sync { border: none; background: var(--bg2); border-radius: 10px; padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.cal-sync.on { color: var(--text); }
.ev-dlg { display: flex; flex-direction: column; gap: 12px; }
.ev-times { display: flex; align-items: center; gap: 8px; }
.input.time { width: 96px; }
.ev-colors { display: flex; gap: 6px; }
.cal-ev { cursor: pointer; }

/* ---------- settings */
.set-card { background: var(--bg); border: .5px solid var(--line2); border-radius: 14px; padding: 4px 14px; display: flex; flex-direction: column; margin-bottom: 12px; }
.set-card > * { padding: 10px 0; }
.set-card > :not(:first-child) { border-top: .5px solid var(--line); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.set-row > span:first-child, .set-switch > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
input.switch { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 12px; background: var(--bg3); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
input.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s; }
input.switch:checked { background: var(--ok); } input.switch:checked::after { transform: translateX(16px); }
.calv .cal-main { display: flex; flex-direction: column; min-height: 0; } .calv .cal-days { flex: 1; }
/* settings & help layout */
.set-wrap { display: flex; height: 100%; min-height: 0; }
.set-nav { width: 230px; flex: none; padding: 26px 12px; border-right: .5px solid var(--line); display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.set-nav-h { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 0 10px 10px; }
.set-nav-i { display: flex; align-items: center; gap: 10px; border: none; background: none; text-align: left; padding: 7px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; }
.set-nav-i:hover { background: var(--hover); } .set-nav-i.on { background: var(--active); font-weight: 500; }
.set-nav-sep { height: 1px; background: var(--line); margin: 8px 10px; }
.set-body { flex: 1; min-width: 0; overflow-y: auto; }
.set-inner { max-width: 680px; margin: 0 auto; padding: 30px 32px 60px; }
.set-head h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -.015em; }
.set-head p { margin: 0 0 18px; }
.set-h3 { font-size: 13px; font-weight: 500; margin: 18px 0 8px; color: var(--muted); }
.set-card .input { max-width: 300px; }
.set-card .acc-photo { padding: 12px 0; }
.set-card .acc-row { display: flex; gap: 10px; align-items: center; }
.set-row > span:first-child > span:first-child, .set-switch > span:first-child > span:first-child { font-weight: 500; }
.help-art { max-width: 680px; margin: 0 auto; padding: 34px 32px 60px; line-height: 1.6; }
.help-art h1 { font-size: 26px; margin: 4px 0 14px; letter-spacing: -.015em; }
.help-ic { font-size: 34px; }
.help-steps li { margin: 5px 0; }
.help-art kbd { font-size: 11.5px; }
/* tour */
.tour { position: fixed; inset: 0; z-index: 5000; }
.tour.center { background: rgba(0,0,0,.28); display: grid; place-items: center; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.28); transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease, box-shadow .3s ease, border-radius .3s ease; pointer-events: none; }
.tour-bubble { position: fixed; width: 320px; background: var(--bg); border-radius: 16px; padding: 18px 18px 14px; box-shadow: 0 20px 50px rgba(0,0,0,.22); display: flex; flex-direction: column; gap: 6px; transition: left .3s, top .3s; }
.tour.center .tour-bubble { position: static; width: 360px; text-align: center; }
.tour-ic { font-size: 34px; }
.tour-t { font-size: 16px; font-weight: 500; }
.tour-x { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.tour-foot { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.tour-dots { display: flex; gap: 4px; } .tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line2); } .tour-dots i.on { background: var(--text); }
.tour-skip { background: none !important; color: var(--muted); }
/* versions */
.ver-cols { display: grid; grid-template-columns: 240px 1fr; gap: 14px; height: min(62vh, 620px); }
.ver-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; border-right: .5px solid var(--line); padding-right: 8px; }
.ver-i { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: none; background: none; text-align: left; padding: 8px 10px; border-radius: 10px; font: inherit; font-size: 13px; cursor: pointer; color: var(--text); }
.ver-i:hover { background: var(--hover); } .ver-i.on { background: var(--active); }
.ver-prev { overflow-y: auto; padding: 4px 18px; background: var(--bg2); border-radius: 12px; font-size: 13.5px; }
/* slash menu like Notion */
.suggest { width: 320px; max-height: 380px; border-radius: 12px; padding: 6px; box-shadow: 0 0 0 .5px var(--line2), 0 12px 36px rgba(0,0,0,.14); }
.sg-group { font-size: 11px; font-weight: 500; color: var(--muted); padding: 10px 8px 4px; text-transform: none; letter-spacing: 0; }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 8px; }
.sg-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2); font-size: 16px; flex: none; }
.sg-tx { display: flex; flex-direction: column; min-width: 0; }
.sg-title { font-size: 13.5px; } .sg-hint { font-size: 11.5px; color: var(--muted); }
/* starters */
.starters { margin: 6px 0 18px; padding: 12px; border-radius: 14px; background: var(--bg2); }
.st-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.st-x { border: none; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; }
.st-x:hover { background: var(--hover); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.st-card { display: flex; gap: 10px; align-items: center; text-align: left; border: none; background: var(--bg); border-radius: 10px; padding: 9px 10px; cursor: pointer; font: inherit; color: var(--text); box-shadow: 0 0 0 .5px var(--line2); }
.st-card:hover { box-shadow: 0 0 0 .5px var(--line2), 0 4px 14px rgba(0,0,0,.07); }
.st-ic { font-size: 20px; } .st-tx { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
/* comments */
.nv-comments { width: 320px; flex: none; border-left: .5px solid var(--line); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.nv-comments.hidden { display: none; }
.cm-head { display: flex; align-items: center; gap: 8px; }
.cm-list { display: flex; flex-direction: column; gap: 8px; }
.cm-empty { padding: 8px 2px; }
.cm-thread { border-radius: 12px; padding: 10px; background: var(--bg2); display: flex; flex-direction: column; gap: 8px; cursor: pointer; border: 1px solid transparent; }
.cm-thread.on { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--bg); box-shadow: var(--shadow); }
.cm-thread.resolved { opacity: .65; }
.cm-quote { font-size: 12px; color: var(--muted); border-left: 2px solid #f5d93f; padding-left: 8px; }
.cm-msg { display: flex; gap: 8px; }
.cm-av { width: 24px; height: 24px; border-radius: 50%; background: var(--bg3); display: grid; place-items: center; font-size: 10px; font-weight: 500; flex: none; overflow: hidden; color: var(--muted); }
.cm-av img { width: 100%; height: 100%; object-fit: cover; }
.cm-body { flex: 1; min-width: 0; }
.cm-meta { display: flex; gap: 6px; align-items: baseline; font-size: 12.5px; }
.cm-acts { margin-left: auto; display: flex; gap: 2px; opacity: 0; } .cm-thread:hover .cm-acts { opacity: 1; }
.cm-acts button { border: none; background: none; cursor: pointer; font-size: 12px; border-radius: 6px; padding: 1px 3px; } .cm-acts button:hover { background: var(--hover); }
.cm-text { font-size: 13px; white-space: pre-wrap; overflow-wrap: break-word; }
.cm-reply { display: flex; gap: 6px; align-items: flex-end; }
.cm-in { flex: 1; border: none; background: var(--bg); border-radius: 10px; padding: 6px 9px; font: inherit; font-size: 13px; resize: none; outline: none; box-shadow: 0 0 0 .5px var(--line2); color: var(--text); }
.cm-in:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.cm-send { border: none; width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: var(--bg); cursor: pointer; font-weight: 500; flex: none; }
.cm-toggle { border: none; background: none; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; padding: 4px 0; }
.ProseMirror .cm { background: rgba(243, 211, 107, .32); border-bottom: 2px solid rgba(243, 211, 107, .9); border-radius: 2px; cursor: pointer; }
.ProseMirror .cm.on { background: rgba(243, 211, 107, .6); }
.tb-btn.on { color: inherit; }
/* ink palette – floating, Freeform/GoodNotes style */
.ink-palette { position: relative; overflow: visible; gap: 4px; border: none; border-radius: 16px; padding: 5px; box-shadow: 0 0 0 .5px var(--line2), 0 10px 30px rgba(0,0,0,.12); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); }
.ip-group { display: flex; gap: 2px; }
.ip-tool { border-radius: 10px; }
.ip-tool.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.ip-well { position: relative; border: none; background: var(--bg2); width: 40px; height: 34px; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; }
.ip-well-c { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ip-well-s { border-radius: 50%; background: var(--muted); }
.ip-pop { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--bg); border-radius: 14px; box-shadow: 0 0 0 .5px var(--line2), 0 14px 36px rgba(0,0,0,.16); padding: 10px; display: flex; flex-direction: column; gap: 8px; z-index: 50; width: max-content; max-width: 320px; }
.ip-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.ip-sizes, .ip-kinds { display: flex; gap: 4px; flex-wrap: wrap; }
.ip-k { border: none; background: var(--bg2); border-radius: 8px; padding: 4px 9px; font: inherit; font-size: 12px; cursor: pointer; color: var(--text); }
.ip-k.on { background: var(--text); color: var(--bg); }
.notebook { position: relative; }
.nb-palette { position: absolute; left: 0; right: 0; bottom: 18px; top: auto; height: auto; padding: 0; border: none; background: none; z-index: 40; pointer-events: none; display: flex; justify-content: center; }
.nb-palette .ink-palette { box-shadow: 0 0 0 .5px var(--line2), 0 10px 30px rgba(0,0,0,.14); pointer-events: auto; }
.nb-palette .ip-pop { top: auto; bottom: calc(100% + 8px); }
.graph-foot { position: absolute; left: 14px; bottom: 12px; right: 14px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.graph-foot .legend { pointer-events: auto; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); padding: 6px 10px; border-radius: 10px; box-shadow: 0 0 0 .5px var(--line2); font-size: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.graph-foot .legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: 6px; }
.graph-bar { gap: 8px; flex-wrap: wrap; }
/* project workspace: two pages side by side (notes | canvas) + excerpts drawer */
.pw-head { padding: 16px 22px 12px; grid-template-columns: 1fr auto; }
.pw-title h1 { font-size: 19px; }
.pw-ic { font-size: 24px; }
.pw-cols { flex: 1; min-height: 0; display: flex; gap: 10px; padding: 0 10px 10px; border-top: none; background: var(--bg2); }
.pw-left, .pw-right { min-width: 0; background: var(--bg); border-radius: 14px; box-shadow: 0 0 0 .5px var(--line2), 0 1px 3px rgba(0,0,0,.04); display: flex; flex-direction: column; overflow: hidden; }
.pw-right { flex: 1; position: relative; }
.pw-div { width: 6px; margin: 0 -8px; cursor: col-resize; z-index: 5; border-radius: 4px; flex: none; }
.pw-div:hover { background: var(--accent-soft); }
.pw-lbar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: .5px solid var(--line); }
.pw-back { border: none; background: none; font-size: 20px; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.pw-back:hover { background: var(--hover); color: var(--text); }
.pw-pick { margin-left: auto; border: none; background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; border-radius: 8px; padding: 4px 8px; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-pick:hover { background: var(--hover); color: var(--text); }
.pw-nlist { display: flex; flex-direction: column; gap: 2px; }
.pw-n { display: flex; gap: 10px; align-items: center; border: none; background: none; text-align: left; padding: 9px 10px; border-radius: 10px; cursor: pointer; font: inherit; color: var(--text); }
.pw-n:hover { background: var(--hover); }
.pw-n-ic { font-size: 18px; }
.pw-x { width: 300px; flex: none; background: var(--bg); border-radius: 14px; box-shadow: 0 0 0 .5px var(--line2); display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto; }
.pw-x.hidden { display: none; }
.pw-xhead { display: flex; align-items: center; gap: 6px; }
.pw-x .color-filter { flex-wrap: wrap; }
.pw-xlist { display: flex; flex-direction: column; gap: 8px; }
.pw-xgroup { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.pw-xg-h { font-size: 12.5px; font-weight: 500; cursor: pointer; display: flex; gap: 6px; align-items: baseline; position: sticky; top: -12px; background: var(--bg); padding: 4px 0; z-index: 2; }
.pw-x .card { position: relative; width: auto; left: auto; top: auto; }
.pw-x .card.placed { opacity: .55; }
.pw-x .card.placed::after { content: '✓ auf der Fläche'; position: absolute; right: 8px; bottom: 6px; font-size: 10.5px; color: var(--muted); }
.pw-xempty { padding: 10px 2px; }
.pw-right .ws-canvas { border-radius: 14px; }
.pw-x .card-comment:empty:not(:focus), .pw-x .tag-input { display: none; }
.pw-x .card-tags:not(:has(.tagchip)) { display: none; }
.pw-x .card-text { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.pw-x .card { padding-bottom: 8px; }
.pw-right .cv-bar { flex-wrap: wrap; justify-content: center; max-width: calc(100% - 20px); }
.pw-right .cv-dock { max-width: 100%; }
.pw-right .ws-hint { background: var(--bg); border-radius: 12px; box-shadow: 0 0 0 .5px var(--line2), var(--shadow); padding: 14px 16px; }
.pw-right .cv-btn { width: 30px; height: 30px; font-size: 15px; } .pw-right .cv-bar { flex-wrap: nowrap; gap: 0; } .pw-right .cv-sep { margin: 0 2px; }
.page-slot { position: relative; flex: none; display: flex; align-items: center; justify-content: center; }
.page-slot .page { flex: none; transition: transform .25s ease; }
.pg-rot { position: absolute; top: 8px; right: -40px; width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2), 0 2px 8px rgba(0,0,0,.08); cursor: pointer; opacity: 0; transition: opacity .15s; font-size: 15px; color: var(--muted); }
.page-slot:hover .pg-rot { opacity: 1; } .pg-rot:hover { color: var(--text); }
/* smooth drag & drop everywhere */
.drop-on { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 10px; }
.card { transition: box-shadow .18s ease, transform .18s ease; }
.card.dragging { transform: scale(1.025) rotate(-.4deg); box-shadow: 0 0 0 .5px var(--line2), 0 18px 40px rgba(0,0,0,.18); z-index: 50; transition: box-shadow .18s ease, transform .18s ease; }
.ws-board .card.dragging { transition: none; transform: scale(1.025); }
[draggable="true"] { -webkit-user-drag: element; }
.pw-n[draggable="true"], .lib-row[draggable="true"] { cursor: grab; }
.ProseMirror-dropcursor { background: var(--accent) !important; width: 2px !important; border-radius: 1px; }
body.dragging-item .sb-item:not(.sb-main) { transition: background .15s; }
.ws-canvas.drop { background-color: color-mix(in srgb, var(--accent) 4%, var(--bg)); }
.cal-day.drop { background: var(--accent-soft); }
.pw-lbar .seg-b { white-space: nowrap; }
.cv-btn { width: 30px; height: 30px; font-size: 15px; }
.cv-bar { flex-wrap: nowrap; gap: 0; } .cv-sep { margin: 0 2px; }
.cv-zl { min-width: 40px; }

/* ---------- v2.5.1 Arbeitsfläche: schlanke Werkzeugleiste wie Freeform/GoodNotes ---------- */
.cv-bar { padding: 4px; gap: 1px; border-radius: 16px; }
.cv-btn, .pw-right .cv-btn { width: auto; min-width: 44px; height: 44px; padding: 3px 6px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border-radius: 12px; font-size: 17px; transition: background .15s, transform .12s; }
.cv-btn:active { transform: scale(.94); }
.cv-ic { line-height: 1; }
.cv-lb { font-size: 9.5px; color: var(--muted); letter-spacing: .01em; line-height: 1.1; }
.cv-btn.on .cv-lb { color: var(--text); font-weight: 500; }
.cv-more .cv-ic { font-size: 18px; font-weight: 500; }
.cv-sub { animation: cvIn .16s ease; }
@keyframes cvIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.cv-zoom { position: absolute; right: 12px; top: 12px; z-index: 20; display: flex; align-items: center; gap: 0; padding: 3px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 0 0 .5px var(--line2), 0 6px 18px rgba(0,0,0,.08); }
.cv-zb { border: none; background: transparent; width: 26px; height: 26px; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 15px; font-family: inherit; display: grid; place-items: center; }
.cv-zb:hover, .cv-zoom .cv-zl:hover { background: var(--hover); }
.cv-zoom .cv-zl { width: auto; height: 26px; min-width: 42px; padding: 0 4px; font-size: 11.5px; display: grid; place-items: center; border-radius: 8px; }
.cv-pop { position: absolute; z-index: 30; width: 232px; padding: 5px; border-radius: 13px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2), 0 12px 32px rgba(0,0,0,.16); animation: cvIn .14s ease; }
.cv-mi { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; width: 100%; padding: 7px 8px; border: none; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--text); font: inherit; font-size: 13px; }
.cv-mi:hover { background: var(--hover); }
.cv-pop-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.cv-pop-row { display: flex; gap: 2px; padding: 2px 4px; }
.cv-pop-tip { padding: 4px 8px 5px; line-height: 1.4; }
.cv-dot { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cv-dot { box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); } }
:root[data-theme="dark"] .cv-dot { box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
/* schmale Spalten: nur Symbole */
.pw-right .cv-lb { display: none; }
.pw-right .cv-btn { min-width: 34px; height: 34px; }
@container (max-width: 420px) { .cv-lb { display: none; } }

/* ---------- v2.6 Handschrift auf der Arbeitsfläche ---------- */
.ws-ink { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; color: var(--text); z-index: 5; }
.ws-ink .ink-m { opacity: .38; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ws-ink .ink-m { mix-blend-mode: screen; opacity: .45; } }
:root[data-theme="dark"] .ws-ink .ink-m { mix-blend-mode: screen; opacity: .45; }
.ws-ink .ink-snap { transition: d .15s; }
.ws-canvas[data-tool="pen"], .ws-canvas[data-tool="shape"] { cursor: crosshair; }
.ws-canvas[data-tool="marker"] { cursor: cell; }
.ws-canvas[data-tool="eraser"] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Ccircle cx='9' cy='9' r='7' fill='white' stroke='%23555' stroke-width='1.5'/%3E%3C/svg%3E") 9 9, crosshair; }
.ws-canvas[data-tool="pen"] .card, .ws-canvas[data-tool="marker"] .card, .ws-canvas[data-tool="shape"] .card, .ws-canvas[data-tool="eraser"] .card { pointer-events: none; }
.cv-dot.auto { background: linear-gradient(135deg, #1d1d1f 50%, #fff 50%); }
.cv-vsep { width: 1px; height: 16px; background: var(--line2); margin: 0 2px; }
.cv-sizes { display: flex; gap: 2px; }
.cv-size { width: 24px; height: 24px; border: none; background: none; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.cv-size i { display: block; border-radius: 50%; background: var(--text); }
.cv-size.on, .cv-mini.on { background: var(--accent-soft); }
.cv-mini { min-width: 24px; height: 24px; border: none; background: none; border-radius: 8px; cursor: pointer; color: var(--text); font: inherit; font-size: 14px; display: grid; place-items: center; }
.cv-mini:hover, .cv-size:hover { background: var(--hover); }
.cv-mini:disabled, .cv-chip:disabled { opacity: .35; cursor: default; }
.cv-chip { border: none; background: var(--hover); color: var(--text); font: inherit; font-size: 11.5px; padding: 4px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.cv-chip.on { background: var(--accent-soft); color: var(--accent); }
.cv-sub { flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 40px); }

/* ---------- v2.6 Startseite: Einstieg ---------- */
.home-hero { display: flex; align-items: center; gap: 24px; padding: 22px 24px; margin: 0 0 18px; border-radius: 18px; background: linear-gradient(135deg, var(--accent-soft), color-mix(in srgb, var(--bg) 60%, var(--accent-soft))); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent); cursor: pointer; transition: box-shadow .15s, transform .15s; }
.home-hero:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 6px 20px rgba(0,0,0,.06); }
.hh-main { flex: 1; min-width: 0; }
.hh-kicker { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.home-hero h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.01em; }
.home-hero p { margin: 0 0 12px; max-width: 560px; }
.hh-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.hh-step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2); }
.hh-step i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 500; }
.hh-arr { color: var(--muted); }
.hh-pages { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 620px; border-radius: 12px; overflow: hidden; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2), 0 2px 8px rgba(0,0,0,.04); }
.hh-page { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; min-width: 0; }
.hh-page + .hh-page { border-left: 1px solid var(--line); }
.hh-btns { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.hh-go { padding: 10px 18px; font-size: 14px; white-space: nowrap; }
@media (max-width: 760px) { .home-hero { flex-direction: column; align-items: stretch; } }

/* ---------- v2.6 Projekt-Arbeitsraum: PDF | Notiz, Fläche unten, Auszüge rechts ---------- */
.pw-cols { display: flex; gap: 10px; }
.pw-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.pw-top { display: flex; min-height: 0; gap: 0; }
.pw-page { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(0,0,0,.04); overflow: hidden; }
.pw-vdiv { flex: 0 0 12px; cursor: col-resize; position: relative; }
.pw-vdiv::after { content: ''; position: absolute; left: 5px; top: 50%; width: 2px; height: 36px; margin-top: -18px; border-radius: 2px; background: var(--line2); transition: background .15s, height .15s; }
.pw-vdiv:hover::after, .pw-vdiv.on::after { background: var(--accent); height: 60px; margin-top: -30px; }
.pw-bar { flex: none; height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 10px; border-bottom: 1px solid var(--line); min-width: 0; }
.pw-body { flex: 1; min-height: 0; overflow: auto; position: relative; }
.pw-pdfbody { overflow: hidden; }
.pw-reader, .pw-reader .reader { height: 100%; }
.reader.embedded .rd-toolbar { height: 38px; padding: 0 6px; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-app-region: no-drag; }
.reader.embedded .rd-toolbar::-webkit-scrollbar { display: none; }
.reader.embedded .tb-search { width: 120px; min-width: 80px; }
.pw-tabs { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.pw-tabs::-webkit-scrollbar { display: none; }
.pw-tab { flex: none; max-width: 190px; display: flex; align-items: center; gap: 5px; border: none; background: none; color: var(--muted); font: inherit; font-size: 12.5px; padding: 5px 9px; border-radius: 8px; cursor: pointer; }
.pw-tab:hover { background: var(--hover); color: var(--text); }
.pw-tab.on { background: var(--accent-soft); color: var(--text); font-weight: 500; }
.pw-add { flex: none; width: 28px; height: 28px; border: none; border-radius: 8px; background: none; color: var(--text); font-size: 17px; cursor: pointer; }
.pw-add:hover { background: var(--hover); }
.pw-pick { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: 6px; border: none; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--text); padding: 5px 8px; border-radius: 8px; cursor: pointer; }
.pw-pick:hover { background: var(--hover); }
.pw-noteview { height: 100%; }
.pw-todos { height: 100%; overflow: auto; }
.pw-start { max-width: 440px; margin: 0 auto; padding: 48px 24px; text-align: center; }
.pw-start-ic { font-size: 34px; margin-bottom: 6px; }
.pw-start h2 { margin: 0 0 14px; font-size: 19px; }
.pw-start p { margin: 0 0 16px; }
.pw-steps { display: flex; flex-direction: column; gap: 8px; text-align: left; margin: 0 0 18px; }
.pw-step { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 12px; background: var(--hover); }
.pw-step.on { background: var(--accent-soft); }
.pw-stepn { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 500; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2); }
.pw-step.on .pw-stepn { background: var(--accent); color: #fff; box-shadow: none; }
.pw-start-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pw-zot { display: flex; flex-direction: column; gap: 10px; padding: 14px; height: 100%; box-sizing: border-box; }
.pw-zlist { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.pw-zi { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 't s' 'a s'; gap: 2px 10px; text-align: left; border: none; background: none; font: inherit; color: var(--text); padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.pw-zi:hover { background: var(--hover); }
.pw-zi-t { grid-area: t; font-size: 13px; font-weight: 500; }
.pw-zi > .muted.tiny:not(.pw-zs) { grid-area: a; }
.pw-zs { grid-area: s; align-self: center; text-align: right; max-width: 160px; }
.pw-zi.busy { opacity: .6; pointer-events: none; }
.pw-zerr { padding: 12px; border-radius: 10px; background: var(--hover); font-size: 13px; }
.pw-cvbar { flex: none; display: flex; align-items: center; gap: 10px; height: 34px; margin-top: 8px; padding: 0 8px; border-radius: 10px; cursor: row-resize; user-select: none; }
.pw-cvbar:hover, .pw-cvbar.on { background: var(--hover); }
.pw-main.cv-closed .pw-cvbar { cursor: default; }
.pw-cvt { display: flex; align-items: center; gap: 6px; border: none; background: none; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.pw-cvt .chev { display: inline-block; transition: transform .2s; color: var(--muted); }
.pw-cvt .chev.open { transform: rotate(90deg); }
.pw-grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line2); margin-right: 50%; transform: translateX(50%); }
.pw-cvhint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pw-cv { min-height: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); position: relative; transition: flex-basis .25s ease; }
.pw-main.cv-closed .pw-cv { box-shadow: none; }
body.resizing-y .pw-cv, body.resizing-x .pw-page { transition: none; }
body.resizing-y, body.resizing-y * { cursor: row-resize !important; user-select: none; }
body.resizing-x, body.resizing-x * { cursor: col-resize !important; user-select: none; }
.pw-cv .cv-wrap { height: 100%; }
.pw-xg-h.on { color: var(--accent); }
.pw-cv .cv-lb { display: none; }
.pw-cv .cv-btn { min-width: 34px; height: 34px; font-size: 16px; }
.pw-cv .ws-hint { background: var(--bg); border-radius: 12px; box-shadow: 0 0 0 .5px var(--line2), var(--shadow); padding: 14px 16px; }
.pw-cvt b { white-space: nowrap; }
.cv-sub { flex-wrap: nowrap; }
.pw-note .nv-top { height: 40px; padding: 0 8px 0 14px; }
.pw-note .nv-page { padding-left: 28px; padding-right: 28px; max-width: none; }
.pw-note .nv-title { font-size: 26px; }
.pw-body > .pw-start { height: 100%; overflow: auto; box-sizing: border-box; padding: 28px 22px; }
.pw-start-ic { font-size: 28px; }
.pw-steps { gap: 6px; }
.pw-step { padding: 7px 11px; }
.ProseMirror p.is-empty::before, .ProseMirror h1.is-empty::before, .ProseMirror h2.is-empty::before, .ProseMirror h3.is-empty::before { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* =====================================================================
   v2.7 Einführung – ruhig, präzise, nie außerhalb des Bildschirms
   ===================================================================== */
.tour { position: fixed; inset: 0; z-index: 5000; opacity: 0; transition: opacity .18s ease; }
.tour.in { opacity: 1; } .tour.out { opacity: 0; }
.tour.center { background: rgba(0, 0, 0, .32); }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .32), 0 0 0 2px rgba(255, 255, 255, .9); transition: left .28s cubic-bezier(.3,.7,.2,1), top .28s cubic-bezier(.3,.7,.2,1), width .28s cubic-bezier(.3,.7,.2,1), height .28s cubic-bezier(.3,.7,.2,1), opacity .2s; pointer-events: none; }
.tour-bubble { position: fixed; width: min(340px, calc(100vw - 32px)); box-sizing: border-box; background: var(--bg); color: var(--text); border-radius: 14px; padding: 14px 16px 14px; box-shadow: 0 0 0 .5px var(--line2), 0 18px 48px rgba(0, 0, 0, .24); display: flex; flex-direction: column; gap: 6px; transition: left .28s cubic-bezier(.3,.7,.2,1), top .28s cubic-bezier(.3,.7,.2,1); }
.tour.center .tour-bubble { width: min(380px, calc(100vw - 32px)); text-align: center; padding: 18px 22px 18px; }
.tour-top { display: flex; align-items: center; justify-content: space-between; margin: -2px -6px 2px 0; }
.tour.center .tour-top { margin-right: -10px; }
.tour-step { font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.tour-close { width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--faint); font-size: 12px; display: grid; place-items: center; cursor: pointer; }
.tour-close:hover { background: var(--hover); color: var(--text); }
.tour-ic { font-size: 36px; line-height: 1; margin: 2px 0 4px; }
.tour-t { font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.tour-x { font-size: 13px; line-height: 1.5; color: var(--muted); }
.tour-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tour-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--active); overflow: hidden; min-width: 40px; }
.tour-bar i { display: block; height: 100%; background: var(--text); border-radius: 2px; transition: width .28s ease; }
.tour-foot .btn { flex: none; }
.tour-back { background: transparent !important; color: var(--muted) !important; }
.tour-back:hover { background: var(--hover) !important; color: var(--text) !important; }
.tour-arrow { position: absolute; width: 12px; height: 12px; background: var(--bg); transform: rotate(45deg); box-shadow: -.5px -.5px 0 .5px var(--line2); }
.tour-arrow.right { left: -6px; box-shadow: -1px 1px 0 -.5px var(--line2); }
.tour-arrow.left { right: -6px; left: auto !important; box-shadow: 1px -1px 0 -.5px var(--line2); }
.tour-arrow.below { top: -6px; }
.tour-arrow.above { bottom: -6px; top: auto !important; box-shadow: 1px 1px 0 -.5px var(--line2); }

/* =====================================================================
   v2.7 Design-System – ein Maß für alles (angelehnt an Apple Music/Store, Airbnb)
   Abstände 4·8·12·16·24·32·48 · Radien 8·12·16 · Höhen 28·32·40 · Schrift 11·12·13·15·17·22·28
   ===================================================================== */
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 8px; --r: 10px; --r-lg: 16px;
  --h-sm: 28px; --h: 32px; --h-lg: 40px;
  --page-max: 1120px; --page-x: 40px; --page-top: 40px;
  --card-shadow: 0 0 0 .5px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --card-shadow-hover: 0 0 0 .5px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05), 0 12px 32px rgba(0,0,0,.09);
}
@media (prefers-color-scheme: dark) { :root { --card-shadow: 0 0 0 .5px rgba(255,255,255,.09), 0 1px 2px rgba(0,0,0,.3); --card-shadow-hover: 0 0 0 .5px rgba(255,255,255,.14), 0 12px 32px rgba(0,0,0,.45); } }

/* --- icons */
svg.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; stroke-width: 1.8; }
svg.i-lead { margin-right: .42em; }
svg.i-fill { fill: currentColor; }
svg.i-star { color: #f5a524; }
svg.i-zotero { color: #cc2936; }
@media (prefers-color-scheme: dark) { svg.i-zotero { color: #ff6b6b; } }
.sb-ic { display: inline-flex; align-items: center; justify-content: center; }
.sb-ic svg.i { width: 16px; height: 16px; color: var(--muted); vertical-align: 0; }
.sb-item.active .sb-ic svg.i { color: var(--text); }
.sb-mini svg.i, .tb-btn > svg.i:only-child { width: 16px; height: 16px; vertical-align: -.2em; }
.ctx-ic svg.i { width: 15px; height: 15px; vertical-align: -.2em; }
.page-head h1 svg.i, .home-hello h1 svg.i { width: .8em; height: .8em; color: var(--faint); stroke-width: 2.1; vertical-align: -.06em; margin-right: .32em; }
.hc-h h3 svg.i { width: 16px; height: 16px; color: var(--muted); }

/* --- controls: one height, one radius */
.btn { display: inline-flex; align-items: center; justify-content: center; height: var(--h); padding: 0 14px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; gap: 0; transition: background .12s, opacity .12s, box-shadow .12s; }
.btn.sm { height: var(--h-sm); padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover { background: var(--text); opacity: .86; filter: none; }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg.i-lead { margin-right: .4em; }
.tb-btn { display: inline-flex; align-items: center; justify-content: center; height: var(--h-sm); min-width: var(--h-sm); padding: 0 8px; border-radius: 8px; font-size: 13px; line-height: 1; }
.tb-btn.on { background: var(--active); color: var(--text); }
.input, .select { height: var(--h); padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); }
.input.sm, .select.sm { height: var(--h-sm); padding: 0 8px; font-size: 12.5px; }
textarea.input { height: auto; padding: 8px 10px; }
.select { padding-right: 26px; }
.seg { padding: 2px; border-radius: 10px; background: var(--active); }
.seg-b { height: 26px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; }
.hc-link { height: var(--h-sm); padding: 0 8px; display: inline-flex; align-items: center; gap: 0; font-size: 12.5px; font-weight: 500; border-radius: 8px; }
.hc-link svg.i { width: 14px; height: 14px; }

/* --- pages: identical frame and header everywhere */
.page-wrap, .home { max-width: var(--page-max); padding: var(--page-top) var(--page-x) 64px; }
.page-head { min-height: var(--h-lg); margin: 0 0 var(--s5); gap: var(--s2); }
.page-head h1, .home-hello h1 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: -.025em; }

/* --- cards */
.hc, .set-card { border: 0; border-radius: var(--r-lg); box-shadow: var(--card-shadow); background: var(--bg); }
.hc { padding: var(--s4) var(--s4) var(--s4); }
.hc-h { margin: 0 0 var(--s3); min-height: var(--h-sm); }
.hc-h h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; letter-spacing: -.01em; text-transform: none; color: var(--text); }
.qa { border: 0; background: var(--bg); box-shadow: var(--card-shadow); border-radius: var(--r-lg); padding: var(--s4); gap: 2px; transition: box-shadow .18s, transform .18s; }
.qa:hover { background: var(--bg); box-shadow: var(--card-shadow-hover); transform: translateY(-1px); }

/* --- home */
.home-hello { margin: 0 0 var(--s5); min-height: 40px; }
.home-hero { margin: 0 0 var(--s4); }
.home-grid, .home-col { gap: var(--s4); }

/* --- menus, modals, toasts */
.ctx { min-width: 220px; border-radius: 12px; padding: 6px; }
.ctx-item { min-height: 30px; padding: 0 10px; border-radius: 8px; gap: 10px; }
.ctx-head { padding: 6px 10px 4px; font-size: 11px; font-weight: 500; letter-spacing: .02em; }
.modal { border-radius: var(--r-lg); padding: var(--s5); }
.modal-title { font-size: 17px; font-weight: 500; margin-bottom: var(--s4); }
.row-end { gap: var(--s2); margin-top: var(--s5); }
.mc-row { grid-template-columns: 3px 128px minmax(0, 1fr); font-size: 12.5px; }
.mc-when { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 12px; }
button:focus-visible, a:focus-visible, [role='button']:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.ProseMirror:focus, .ProseMirror:focus-visible, [contenteditable]:focus-visible { outline: none; }
.btn:focus-visible, .tb-btn:focus-visible { outline-offset: 1px; }

/* --- search fields: one look everywhere */
.input.search, .tb-search { padding-left: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 10px 50%; }
.input.sm.search { padding-left: 28px; background-position: 9px 50%; }
.tb-search { height: var(--h-sm); border: 0; border-radius: 8px; background-color: var(--active); font-size: 12.5px; width: 170px; outline: none; }
.tb-search:focus { background-color: var(--bg); box-shadow: 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.rd-hide { display: none !important; }

/* --- page titles: clean, no icon */
.page-head h1 svg.i { display: none; }

/* --- chips never overflow their card or cell */
.proj-chip, .nc .proj-chip, .lib-title .proj-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.lib-table td { vertical-align: middle; }
.lib-table td:first-child { max-width: 260px; }
.lib-title { min-width: 0; }

/* --- reader toolbar */
.rd-toolbar { gap: 2px; }
.rd-toolbar .tb-btn svg.i-lead { margin-right: .35em; }
.rd-sep { width: 1px; height: 16px; background: var(--line2); margin: 0 6px; flex: none; }
.rd-compact { height: 40px !important; padding: 0 8px !important; gap: 2px !important; overflow: hidden !important; }
.rd-compact .rd-pageinfo { font-size: 12px; color: var(--muted); padding: 0 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rd-compact .tb-search { width: 140px; }
.zoom-lbl { min-width: 46px; font-variant-numeric: tabular-nums; font-size: 12px; }

/* --- tasks header like every other page */
.kb-wrap { padding: var(--page-top) var(--page-x) 0; }
.kb-h1 { font-size: 28px; font-weight: 500; letter-spacing: -.025em; margin: 0 0 var(--s3); line-height: 1.15; }
.kb-boards { gap: 4px; margin-bottom: var(--s3); border: 0; flex-wrap: wrap; }
.kb-bchip { height: var(--h-sm); padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; background: var(--active); color: var(--text); border: 0; box-shadow: none; }
.kb-bchip.on { background: var(--text); color: var(--bg); }
.kb-bchip.add { background: transparent; color: var(--muted); }
.kb-bchip .kb-n { font-size: 11.5px; opacity: .6; font-variant-numeric: tabular-nums; }
.kb-bar { flex-wrap: nowrap; gap: 6px; margin: 0 0 var(--s4); min-height: var(--h); overflow: hidden; }
.kb-bar .kb-filter { width: 180px; flex: none; }
.kb-bar .select { width: auto; flex: none; max-width: 180px; }
.kb-members { display: flex; }
.kb-bar .select, .set-card .select, .select.sm { field-sizing: content; width: auto; min-width: 0; }
.pw-note .toc-rail { display: none; }
.calv { padding: var(--page-top) var(--page-x) var(--s4); }
.calv .cal-head { margin-bottom: var(--s4); min-height: var(--h-lg); }
.calv .cal-head h1 { font-size: 28px; font-weight: 500; letter-spacing: -.025em; }
.set-inner { padding: var(--page-top) var(--page-x) 64px; }
.set-head h1 { font-size: 28px; font-weight: 500; letter-spacing: -.025em; margin-bottom: var(--s2); }
.set-nav { padding: var(--page-top) var(--s3); }
.pw-x { width: clamp(232px, 21vw, 300px); }
.kb-bar { flex-wrap: wrap; row-gap: 6px; overflow: visible; }
.kb-bar > * { flex: none; }
.rd-toolbar .rd-title { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1250px) { .rd-crumbs { display: none; } .rd-toolbar .tb-search { width: 130px; } }
.cv-wrap .ws-hint { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: min(360px, calc(100% - 32px)); bottom: auto; right: auto; margin: 0; z-index: 4; background: var(--bg); border-radius: 14px; box-shadow: var(--card-shadow); padding: 14px 16px; font-size: 13px; }
.cv-wrap .ws-hint p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.cv-wrap .ws-hint .btn { margin-top: 10px; }
.cv-zoom .cv-zl, .pw-cv .cv-zoom .cv-zl { font-size: 11.5px; height: 26px; min-width: 42px; width: auto; padding: 0 4px; display: grid; place-items: center; }
.ws-hint .btn, .ws-hint button { pointer-events: auto; }
/* project workspace: one header row per page */
.pw-nvtop { position: static !important; height: auto !important; border: 0 !important; background: transparent !important; padding: 0 !important; gap: 2px; flex: none; -webkit-app-region: no-drag; }
.pw-nvtop .muted.small { font-size: 12px; margin-right: 4px; white-space: nowrap; }
.pw-note .pw-pick { min-width: 0; flex: 0 1 auto; }
.pw-note .pw-bar .spacer { min-width: 8px; }
.pw-cvbar { position: relative; }
.pw-grip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
.pw-actions .btn { height: var(--h); }
.pw-head { min-height: 64px; }
html, body, #app { overflow: clip; }
.pw-note { container-type: inline-size; }
/* (ersetzt durch anpassbare Leisten – Ausweichen ins ⋯-Menü) */
/* (ersetzt durch anpassbare Leisten – Ausweichen ins ⋯-Menü) */
.btn.on { background: var(--accent-soft); color: var(--accent); }
.help-ic { display: none; }
.help-art h1 { font-size: 28px; font-weight: 500; letter-spacing: -.025em; margin: 0 0 var(--s4); }
.set-nav-i { min-height: 32px; padding: 0 10px; border-radius: var(--r-sm); font-size: 13px; }
.set-nav-i svg.i { width: 16px; height: 16px; color: var(--muted); margin-right: 0; }
.set-nav-i.on svg.i { color: var(--text); }

/* ---------- PDF: ruhiges Zoomen und Blättern ---------- */
.page > canvas.pg-canvas, .page > canvas.ink-canvas { width: 100% !important; height: 100% !important; }
.page { contain: layout paint; backface-visibility: hidden; }
.rd-pdf { overflow-anchor: none; scroll-behavior: auto; }
.page-slot { transition: none; }

/* ---------- Farbbedeutungen ---------- */
.card-mean { font-size: 10.5px; font-weight: 500; letter-spacing: .01em; color: color-mix(in srgb, var(--c) 55%, var(--text)); background: color-mix(in srgb, var(--c) 22%, transparent); padding: 1px 7px; border-radius: 999px; white-space: nowrap; margin-left: 6px; }
.sel-color { position: relative; }
.sel-color[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: var(--text); color: var(--bg); pointer-events: none; z-index: 10; }
.mean-row { display: grid !important; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; }
.mean-c { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.mean-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.set-card .mean-row .input { max-width: none; }
.mean-def { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.set-note { margin: 8px 4px 16px; }
/* ---------- verknüpfte Notizen ---------- */
.side-title-row { display: flex; align-items: center; justify-content: space-between; }
.side-add { border: 0; background: none; width: 22px; height: 22px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 15px; }
.side-add:hover { background: var(--hover); color: var(--text); }
.side-link.rel { display: flex; align-items: center; gap: 6px; }
.side-link.rel > span { flex: 1; min-width: 0; cursor: pointer; }
.side-x { border: 0; background: none; color: var(--faint); font-size: 11px; width: 20px; height: 20px; border-radius: 6px; opacity: 0; cursor: pointer; }
.side-link.rel:hover .side-x { opacity: 1; } .side-x:hover { background: var(--hover); color: var(--text); }
/* ---------- Netzwerk: Gruppe ---------- */
.graph-wrap { position: relative; }
.graph-panel { position: absolute; top: 16px; right: 16px; width: 280px; max-height: calc(100% - 90px); overflow: auto; background: var(--bg); border-radius: 14px; box-shadow: var(--card-shadow-hover); padding: 12px; z-index: 5; display: flex; flex-direction: column; gap: 10px; }
.gp-head { display: flex; align-items: center; gap: 8px; } .gp-head b { flex: 1; min-width: 0; font-size: 14px; }
.gp-actions { display: flex; gap: 6px; }
.gp-t { font-size: 11.5px; font-weight: 500; color: var(--muted); margin: 2px 0 4px; }
.gp-row { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; text-align: left; font: inherit; font-size: 13px; color: var(--text); padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.gp-row:hover { background: var(--hover); } .gp-row.on { background: var(--active); font-weight: 500; }
.gp-row > span:first-child { flex: 1; min-width: 0; }
.gp-x { color: var(--faint); font-size: 11px; padding: 0 4px; border-radius: 4px; } .gp-x:hover { color: var(--danger); }
.gp-hint { margin: 0; line-height: 1.45; }

/* =====================================================================
   v0.8 Kachel-Symbole im Stil des Logos (wie in „Kurzbefehle“)
   ===================================================================== */
:root { --ico: #6f5a4a; }
@media (prefers-color-scheme: dark) { :root { --ico: #cdb8a6; } }
/* colour per symbol (used wherever a symbol is shown as a tile) */
svg.i { --ti1: #b8794a; --ti2: #8f532b; }
svg.i-house, svg.i-pen-line, svg.i-graduation-cap { --ti1: #b8794a; --ti2: #8f532b; }
svg.i-folder-kanban, svg.i-square-check-big, svg.i-sprout { --ti1: #6c9478; --ti2: #46695a; }
svg.i-file-text, svg.i-waypoints, svg.i-user-round, svg.i-circle-help, svg.i-rocket { --ti1: #6b8cb0; --ti2: #47658a; }
svg.i-notebook-pen, svg.i-book-marked, svg.i-calendar, svg.i-calendar-days { --ti1: #cf774d; --ti2: #a9512c; }
svg.i-library-big, svg.i-book-open, svg.i-clipboard-list { --ti1: #c9a774; --ti2: #9d7c4b; }
svg.i-star, svg.i-highlighter, svg.i-sparkles, svg.i-lightbulb { --ti1: #e2b453; --ti2: #c38c25; }
svg.i-tag, svg.i-puzzle, svg.i-brain, svg.i-palette { --ti1: #9a7aa6; --ti2: #735683; }
svg.i-trash-2, svg.i-hard-drive, svg.i-file, svg.i-settings, svg.i-keyboard, svg.i-inbox, svg.i-sliders-horizontal { --ti1: #8b949e; --ti2: #646c76; }

.sb-scroll > .sb-item > .sb-ic svg.i, .sb-main > .sb-ic svg.i, .sb-bottom > .sb-item > .sb-ic svg.i, .sb-bottom > .sb-group > .sb-main > .sb-ic svg.i, .set-nav-i > span:first-child svg.i, .hc-h h3 svg.i, .ptile svg.i {
  box-sizing: border-box; border-radius: 24%; color: #fff !important; stroke-width: 2.1; margin: 0;
  background: linear-gradient(180deg, var(--t1, var(--ti1)), var(--t2, var(--ti2)));
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1), 0 1px 1.5px rgba(0, 0, 0, .12);
}
.sb-scroll > .sb-item > .sb-ic svg.i, .sb-main > .sb-ic svg.i, .sb-bottom > .sb-item > .sb-ic svg.i, .sb-bottom > .sb-group > .sb-main > .sb-ic svg.i { width: 20px; height: 20px; padding: 3.5px; }
.sb-item.active > .sb-ic svg.i, .sb-main.active > .sb-ic svg.i { color: #fff !important; }
.set-nav-i > span:first-child { display: inline-flex; }
.set-nav-i > span:first-child svg.i { width: 22px; height: 22px; padding: 4px; color: #fff !important; }
.hc-h h3 svg.i { width: 22px; height: 22px; padding: 4px; border-radius: 6px; }
/* project tiles */
.ptile { display: inline-flex; flex: none; vertical-align: middle; line-height: 0; }
.ptile svg.i { width: 18px; height: 18px; padding: 3px; }
.ptile.xs svg.i { width: 16px; height: 16px; padding: 2.5px; border-radius: 6px; }
.ptile.md svg.i { width: 26px; height: 26px; padding: 5px; border-radius: 8px; }
.ptile.lg svg.i { width: 36px; height: 36px; padding: 7px; border-radius: 10px; }
.ptile.xl svg.i { width: 64px; height: 64px; padding: 13px; border-radius: 16px; stroke-width: 1.8; }
.sb-children .sb-ic .ptile svg.i { width: 18px; height: 18px; }
.proj-chip { display: inline-flex; align-items: center; gap: 5px; }
.proj-chip .ptile { margin-left: -2px; }
.hh-title { display: flex; align-items: center; gap: 10px; }
.pw-ic { font-size: 0; cursor: pointer; }
.ht-p { display: inline-flex; }
.kb-bchip .ptile { margin-left: -4px; }
.kb-bchip.on .ptile svg.i { box-shadow: 0 0 0 1px rgba(255,255,255,.4); }
/* everything else: quiet line symbols in a warm tone */
.tb-btn svg.i, .btn:not(.primary) svg.i, .ctx-ic svg.i, .cv-btn svg.i, .seg-b svg.i, .hc-link svg.i, .pw-tab svg.i, .tab svg.i, .sb-children .sb-ic svg.i:not(.ptile svg) { color: var(--ico); }
.tb-btn.on svg.i, .btn.on svg.i, .cv-btn.on svg.i, .seg-b.on svg.i { color: currentColor; }
.ctx-item:hover .ctx-ic svg.i { color: #fff; }
/* project icon dialog */
.pi-prev { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.pi-l { font-size: 12px; font-weight: 500; color: var(--muted); margin: 14px 0 8px; }
.pi-cols { display: flex; gap: 10px; flex-wrap: wrap; }
.pi-col { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.15); }
.pi-col.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.pi-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pi-ic { border: 0; background: none; padding: 6px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.pi-ic:hover { background: var(--hover); } .pi-ic.on { background: var(--active); box-shadow: inset 0 0 0 1.5px var(--text); }
/* weniger ist mehr: Text-Knöpfe ohne Symbol, Karten mit Kachel */
.btn svg.i-lead, .hc-link svg.i-lead, .sel-btn svg.i-lead, .kb-bar .btn svg.i-lead { display: none; }
.pc-ic { font-size: 0; line-height: 0; margin-bottom: 10px; }
.pc-ic svg.i { width: 32px; height: 32px; padding: 7px; box-sizing: border-box; border-radius: 10px; color: #fff !important; stroke-width: 2.1; background: linear-gradient(180deg, var(--ti1), var(--ti2)); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.1), 0 1px 1.5px rgba(0,0,0,.12); }
.tour-ic { display: flex; justify-content: center; line-height: 0; }
.tour-logo { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.tour-ic svg.i { width: 48px; height: 48px; padding: 10px; box-sizing: border-box; border-radius: 12px; color: #fff; background: linear-gradient(180deg, var(--ti1), var(--ti2)); }
.mean-row > .mean-c { flex-direction: row !important; align-items: center; gap: 10px !important; }

/* =====================================================================
   v0.9 Eigene Gedanken · Zitat/Paraphrase · Kartenbreite · Räume
   ===================================================================== */
:root { --own-bg: #f0f0f1; --own-line: #b9b9be; --own-text: #4a4a4f; }
@media (prefers-color-scheme: dark) { :root { --own-bg: #2b2b2e; --own-line: #6b6b72; --own-text: #d4d4d8; } }
/* eigene Gedanken: grau hinterlegt, deutlich anders als Material aus der Literatur */
.card.kind-comment { background: var(--own-bg); border-top: 0; box-shadow: inset 3px 0 0 var(--own-line), 0 0 0 .5px var(--line2); }
.card.kind-comment .card-comment { color: var(--own-text); font-size: 13.5px; }
.card-own { color: var(--muted); font-weight: 500; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; cursor: default; }
.card-own svg.i { width: 13px; height: 13px; }
.card-comment.own { background: var(--own-bg); border-left: 3px solid var(--own-line); border-radius: 4px 8px 8px 4px; color: var(--own-text); margin-top: 6px; }
/* Zitat ❝ vs. Paraphrase ≈ */
.card-mode { flex: none; width: 20px; height: 20px; border: 0; border-radius: 6px; display: inline-grid; place-items: center; font: 500 13px var(--font); cursor: pointer; background: color-mix(in srgb, var(--c) 28%, transparent); color: color-mix(in srgb, var(--c) 45%, var(--text)); }
.card-mode svg.i { width: 12px; height: 12px; margin: 0; stroke-width: 2.4; color: inherit !important; }
.card-mode.para { background: transparent; box-shadow: inset 0 0 0 1.2px color-mix(in srgb, var(--c) 70%, var(--line2)); }
.card-text.para { font-family: var(--font); font-style: italic; color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.card.is-para { border-top-style: dashed; }
/* card size: header (Autor et al. (Jahr) · S. x) always on one line; width adjustable */
.ws-board .card { width: min-content; min-width: 240px; max-width: 420px; }
.ws-board .card.sized { max-width: none; min-width: 200px; }
.ws-board .card .card-head { white-space: nowrap; }
.ws-board .card .card-pg { white-space: nowrap; }
.card-rs { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: ew-resize; border-radius: 0 0 12px 0; z-index: 6; }
.card-rs::after { content: ''; position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); border-radius: 0 0 4px 0; opacity: 0; transition: opacity .15s; }
.ws-board .card:hover .card-rs::after, .card.resizing .card-rs::after { opacity: 1; }
.card.resizing { transition: none !important; }
/* Räume: leicht getönte Themenbereiche */
.ws-frame { border-radius: 22px; background: color-mix(in srgb, var(--fc) 13%, transparent); border: 1px solid color-mix(in srgb, var(--fc) 38%, transparent); box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--fc) 5%, transparent); }
.ws-frame-t { top: 10px; left: 14px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; background: transparent; padding: 2px 6px; display: flex; align-items: baseline; gap: 8px; color: color-mix(in srgb, var(--fc) 35%, var(--text)); }
.ws-frame-t:hover { background: color-mix(in srgb, var(--fc) 22%, transparent); }
.ws-frame-n { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.ws-canvas.far .ws-frame-t { font-size: 30px; }
/* Notiz: Gedanken- und Zitat-Blöcke */
.callout-gedanke { background: var(--own-bg); border-color: var(--own-line); color: var(--own-text); }
.xblock.xb-thought { background: var(--own-bg) !important; border-left-color: var(--own-line) !important; }
.xblock.xb-thought .xb-text { font-family: var(--font); color: var(--own-text); }
.xblock.xb-para .xb-text { font-style: italic; font-family: var(--font); }
.xb-mode { position: absolute; top: 8px; right: 10px; font: 500 12px var(--font); color: var(--muted); }
.xb-mode svg.i { width: 13px; height: 13px; }
.xb-own { position: absolute; top: 8px; right: 10px; font-size: 11px; font-weight: 500; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.xb-own svg.i { width: 13px; height: 13px; }
.xblock { position: relative; }
/* Auswahl-Leiste: Zitat / Paraphrase */
.sel-modes { display: inline-flex; background: var(--active); border-radius: 8px; padding: 2px; gap: 2px; }
.sel-mode { width: 26px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: 500 13px var(--font); cursor: pointer; display: grid; place-items: center; }
.sel-mode svg.i { width: 13px; height: 13px; margin: 0; }
.sel-mode.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.1); }

/* ---------- Fenster an der oberen Leiste verschieben (macOS) ---------- */
#tabbar, #tabbar .tabs, .sb-top, .sb-brand, .pw-head, .page-head, .calv .cal-head, .kb-wrap > .kb-head, .set-nav-h { -webkit-app-region: drag; }
#tabbar .tab, #tabbar button, #tabbar .tb-lead, .sb-brand > *, .sb-brand button, .pw-head button, .pw-head .pw-ic, .pw-head .pw-actions, .page-head button, .page-head input, .page-head select, .calv .cal-head button, .kb-head button, .nav-btns { -webkit-app-region: no-drag; }
.sb-brand-main { -webkit-app-region: no-drag; font-size: 15px; font-weight: 500; letter-spacing: -.015em; }
.sb-brand { padding-left: 16px; }

/* ---------- Startseite als Sideboard (wie das Logo) ---------- */
:root {
  --wood-1: #b97a4a; --wood-2: #9b5e33; --wood-3: #864d28; --wood-edge: rgba(80, 40, 15, .35);
  --nook: #fbf8f3; --nook-shadow: inset 0 3px 8px rgba(70, 35, 12, .22), inset 0 0 0 1px rgba(70, 35, 12, .14);
}
@media (prefers-color-scheme: dark) { :root { --wood-1: #7c4f30; --wood-2: #663f25; --wood-3: #55341e; --wood-edge: rgba(0, 0, 0, .5); --nook: #1f1d1b; --nook-shadow: inset 0 3px 10px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .4); } }
.home-hero { margin-bottom: var(--s5); }
.home-hero { background: linear-gradient(135deg, #fbf6ee, #f3eadc); box-shadow: 0 0 0 1px rgba(120, 80, 40, .14); }
.home-hero:hover { box-shadow: 0 0 0 1px rgba(120, 80, 40, .26), 0 6px 20px rgba(80, 50, 20, .08); }
.hh-kicker { color: #9b5e33; }
@media (prefers-color-scheme: dark) { .home-hero { background: linear-gradient(135deg, #2c2722, #221f1b); box-shadow: 0 0 0 1px rgba(255, 220, 180, .1); } .hh-kicker { color: #d9a77c; } }
.callout-ic { display: inline-flex; } .callout-ic svg.i { width: 15px; height: 15px; } .callout-gedanke .callout-ic svg.i { color: var(--muted); }

/* ---------- Arbeitsraum: frei anordnen ---------- */
.pw-slot { display: flex; min-width: 0; min-height: 0; }
.pw-slot > * { flex: 1 1 0 !important; min-width: 0 !important; min-height: 0; width: auto !important; max-width: none !important; }
.pw-slot-s { width: clamp(232px, 21vw, 300px); flex: none; }
.pw-slot-s:not([data-pane="x"]) { width: clamp(300px, 34%, 560px); }
.pw-slot-b { overflow: hidden; }
.pw-main.cv-closed .pw-slot-b { display: none; }
.pw-slot > .pw-x { height: 100%; box-sizing: border-box; }
.pw-slot-b > .pw-x, .pw-slot-tl > .pw-x, .pw-slot-tr > .pw-x { overflow-y: auto; }
.pw-slot > .pw-cv { height: 100%; }
/* popover with the mini layout */
.lay-pop { position: fixed; z-index: 1600; width: 340px; background: var(--bg); border-radius: 16px; padding: 14px; box-shadow: 0 0 0 .5px var(--line2), 0 18px 44px rgba(0,0,0,.2); display: flex; flex-direction: column; gap: 12px; }
.lay-h { display: flex; flex-direction: column; gap: 2px; }
.lay-h b { font-size: 14px; }
.lay-map { display: grid; grid-template-columns: 1fr 1fr 84px; grid-template-rows: 82px 64px; gap: 6px; padding: 8px; border-radius: 12px; background: var(--active); }
.lay-cell { position: relative; border-radius: 10px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2); display: grid; place-items: center; cursor: pointer; transition: box-shadow .12s, background .12s; }
.lay-cell.over { box-shadow: 0 0 0 2px var(--accent); background: var(--accent-soft); }
.lay-tl { grid-area: 1 / 1; } .lay-tr { grid-area: 1 / 2; } .lay-b { grid-area: 2 / 1 / 3 / 3; } .lay-s { grid-area: 1 / 3 / 3 / 4; }
.lay-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 500; cursor: grab; user-select: none; text-align: center; }
.lay-chip:hover { background: var(--hover); }
.lay-chip.pick { background: var(--accent-soft); color: var(--accent); }
.lay-chip.drag { opacity: .4; }
.lay-ic svg.i { width: 22px; height: 22px; padding: 4px; box-sizing: border-box; border-radius: 6px; color: #fff; background: linear-gradient(180deg, var(--ti1), var(--ti2)); margin: 0; }
.lay-off { position: absolute; bottom: 4px; font-size: 10px; color: var(--faint); }
.lay-foot { display: flex; gap: 6px; align-items: center; }
.pw-actions { gap: 6px; align-items: center; }
.rd-pages .page { width: calc(var(--pw) * var(--s) * 1px); height: calc(var(--ph) * var(--s) * 1px); }
.rd-pages .page-slot { width: calc(var(--sw) * var(--s) * 1px); height: calc(var(--sh) * var(--s) * 1px); }
.lay-b .lay-chip { flex-direction: row; gap: 8px; }
.lay-off { bottom: 3px; font-size: 9.5px; }
.lay-cell:has(.lay-off) .lay-chip { opacity: .55; }
.lay-trayw { display: flex; flex-direction: column; gap: 6px; }
.lay-tray-h { font-size: 11px; font-weight: 500; color: var(--muted); }
.lay-tray { display: flex; gap: 6px; flex-wrap: wrap; min-height: 54px; padding: 6px; border-radius: 12px; border: 1.5px dashed var(--line2); align-items: center; }
.lay-tcell { border-radius: 10px; background: var(--bg2); cursor: pointer; }
.lay-tcell.over { box-shadow: 0 0 0 2px var(--accent); }
.lay-tcell .lay-chip { flex-direction: row; gap: 6px; padding: 6px 10px; }
.lay-tcell .lay-ic svg.i { width: 18px; height: 18px; padding: 3px; }
.pw-extra { display: flex; flex-direction: column; }
.pw-graphbody { overflow: hidden; }
.pw-graphbody .graph { height: 100%; }
.pw-graphbody .graph-bar { -webkit-app-region: no-drag; height: 40px; padding: 0 10px; gap: 8px; }
.pw-graphbody .graph-title { display: none; }
.pw-todos .kb-wrap { padding: 12px 12px 0; }

/* ---------- Weiterarbeiten-Banner beim Start ---------- */
.resume { position: fixed; top: 50px; left: 50%; transform: translate(-50%, -16px); opacity: 0; z-index: 2500; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 0 0 .5px var(--line2), 0 14px 40px rgba(0,0,0,.16); min-width: 360px; max-width: min(560px, calc(100vw - 32px)); transition: transform .26s cubic-bezier(.3,.7,.2,1), opacity .2s; }
.resume.in { transform: translate(-50%, 0); opacity: 1; }
.resume-tx { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.resume-k { font-size: 10.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: #9b5e33; }
@media (prefers-color-scheme: dark) { .resume-k { color: #d9a77c; } }
.resume-tx b { font-size: 14px; }
.resume-x { border: 0; background: none; color: var(--faint); width: 26px; height: 26px; border-radius: 8px; cursor: pointer; }
.resume-x:hover { background: var(--hover); color: var(--text); }
.pn-warn svg.i { color: #e0961a !important; width: 16px; height: 16px; }
.pn-warn { background: color-mix(in srgb, #e0961a 14%, transparent); }
.tab-side svg.i { width: 18px; height: 18px; color: var(--ico); }

/* ---------- Seminar / Vorlesung ---------- */
.crs { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.crs-head { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 18px 24px 14px; min-height: 64px; }
.crs-ic { cursor: pointer; display: inline-flex; }
.crs-t { min-width: 0; }
.crs-t h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crs-kicker { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 1px; }
.crs-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.crs-meta > * { display: inline-flex; align-items: center; gap: 5px; }
.crs-link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.crs-link:hover { text-decoration: underline; }
.crs-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.crs-actions .pw-actions { display: flex; gap: 8px; align-items: center; }
.crs-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.crs-work { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.crs-work > .pw { flex: 1; }
.crs-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 16px; padding: 4px 24px 24px; }
.crs-list { overflow: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; }
.crs-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 0; background: none; border-radius: 10px; padding: 8px 10px; font: inherit; color: var(--text); cursor: pointer; }
.crs-row:hover { background: var(--hover); }
.crs-row.on { background: var(--active); }
.crs-row.past { color: var(--muted); }
.crs-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 500; background: var(--bg2); color: var(--muted); }
.crs-row.today .crs-n { background: var(--accent); color: #fff; }
.crs-rt { display: flex; flex-direction: column; min-width: 0; }
.crs-rt b { font-weight: 500; font-size: 13.5px; }
.crs-d { font-size: 11.5px; color: var(--muted); }
.crs-c { display: flex; gap: 8px; font-size: 11.5px; color: var(--muted); }
.crs-c > span { display: inline-flex; align-items: center; gap: 3px; }
.crs-add { margin-top: 6px; border: 1px dashed var(--line2); background: none; border-radius: 10px; padding: 9px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.crs-add:hover { color: var(--text); background: var(--hover); }
.crs-empty { padding: 12px 10px; }
.crs-detail { overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; box-shadow: var(--shadow); min-width: 0; }
.crs-dh { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crs-badge { font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.crs-topic { width: 100%; border: 0; background: none; font: inherit; font-size: 22px; font-weight: 500; letter-spacing: -.01em; color: var(--text); padding: 12px 0 6px; outline: none; }
.crs-topic::placeholder { color: var(--faint); }
.crs-sec { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.crs-sh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.crs-sh h3 { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.crs-items { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.crs-item { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; }
.crs-item:hover { background: var(--hover); }
.crs-open { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; padding: 0; }
.crs-open b { font-weight: 500; font-size: 13.5px; }
.crs-task { font-size: 13.5px; }
.crs-task > .clamp1 { flex: 1; }
.crs-task.done > .clamp1 { text-decoration: line-through; color: var(--muted); }
.crs-dlg { display: flex; flex-direction: column; gap: 8px; }
.crs-f { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; }
.crs-f > span { font-size: 13px; color: var(--muted); }
.crs-fi { display: flex; gap: 8px; align-items: center; min-width: 0; }
.crs-fi > .input, .crs-fi > .select { flex: 1; min-width: 0; }
.crs-fi > .input.time { flex: 0 0 110px; }
.crs-sep { height: 1px; background: var(--line); margin: 6px 0; }
.crs-sync { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--bg2); margin-top: 4px; cursor: pointer; }
.crs-sync > span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
@media (max-width: 900px) { .crs-cols { grid-template-columns: 1fr; } .crs-head { grid-template-columns: auto 1fr; } .crs-tabs, .crs-actions { grid-column: 1 / -1; justify-self: start; } }

/* ---------- Projekt-Kopf: Abgabe · Quellen · Fortschritt ---------- */
.ps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ps-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; border: 0; background: var(--bg2); color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.ps-chip:hover { background: var(--hover); color: var(--text); }
.ps-chip.static { cursor: default; }
.ps-chip.static:hover { background: var(--bg2); color: var(--muted); }
.ps-chip b { font-weight: 500; color: var(--text); }
.ps-chip.empty b { font-weight: 500; color: var(--muted); }
.ps-chip.soon b { color: #c2410c; }
.ps-chip.late b { color: var(--danger); }
.ps-ic { display: inline-flex; opacity: .8; }
.ps-ic svg { width: 14px; height: 14px; }
.ps-bar { width: 54px; height: 5px; border-radius: 4px; background: var(--line2); overflow: hidden; }
.ps-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.ps-dlg { display: flex; flex-direction: column; gap: 12px; }
.ps-dlg .row { display: flex; gap: 8px; }

/* ---------- Neue Arbeit ---------- */
.np { display: flex; flex-direction: column; gap: 18px; }
.np-head { display: flex; gap: 12px; align-items: flex-start; }
.np-head .modal-title { margin: 0 0 2px; }
.np-head p { margin: 0; }
.np-back { font-size: 20px; height: 30px; width: 30px; margin-left: -6px; }
.np-grp, .np-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.np-gl { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.np-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.np-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; min-height: 112px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); font: inherit; color: var(--text); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.np-card:hover { border-color: var(--line2); box-shadow: var(--shadow); transform: translateY(-1px); }
.np-card.last { border-color: var(--accent); }
.np-card b { font-size: 14px; font-weight: 500; }
.np-sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.np-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.np-ic svg { width: 18px; height: 18px; }
.np-ic.sm { width: 30px; height: 30px; border-radius: 10px; }
.np-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.np-f > span { font-size: 12.5px; color: var(--muted); }
.np-req { color: var(--danger); font-style: normal; }
.np-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.np-row { display: flex; gap: 8px; }
.np-row > .input { flex: 1; min-width: 0; }
.np-row > .select { flex: 0 0 110px; }
.np .input.bad, .np .bad .dp-in, .np .bad { box-shadow: 0 0 0 2px rgba(229,72,77,.35); border-radius: 8px; }
.np-err { color: var(--danger); font-size: 12.5px; min-height: 0; }
.np-err:empty { display: none; }
.np-hint { margin-right: auto; }
@media (max-width: 640px) { .np-grid { grid-template-columns: 1fr 1fr; } .np-2 { grid-template-columns: 1fr; } }

/* ---------- Literaturverzeichnis am rechten Rand (wie Notion) ---------- */
.nv-main { flex: 1; min-width: 0; position: relative; display: flex; }
.nv-main > .nv-scroll { flex: 1; }
.bib-rail { position: absolute; top: 0; bottom: 0; right: 0; width: 30px; z-index: 25; }
.bib-rail.hidden { display: none; }
.br-ticks { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 7px; opacity: .4; transition: opacity .3s; max-height: 80%; overflow: hidden; }
.br-tick { height: 2px; border-radius: 1px; background: var(--faint); }
.bib-rail:hover { width: 360px; }
.bib-rail:hover .br-ticks { opacity: 0; }
.bib-panel { position: absolute; top: 12px; bottom: 12px; right: 10px; width: 340px; overflow-y: auto; padding: 10px 6px; opacity: 0; pointer-events: none; transform: translateX(8px); transition: opacity .2s, transform .2s;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); border: .5px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); }
.bib-rail:hover .bib-panel { opacity: 1; pointer-events: auto; transform: none; }
.bp-row { padding: 6px 8px 6px 26px; text-indent: -18px; border-radius: 6px; font-size: 12.5px; line-height: 1.45; cursor: default; }
.bp-row[title="Quelle öffnen"] { cursor: pointer; }
.bp-row:hover { background: var(--hover); }
.pw-note .bib-rail { display: none; }

/* ---------- Seitenleiste der Notiz: getrennte Karten untereinander (wie die Flächen im Projekt) ---------- */
.nv-side { width: 300px; background: var(--bg2); border-left: 1px solid var(--line); padding: 12px; gap: 12px; }
.nv-side > .side-sec, .nv-side > section, .nv-side > .tasks-box { flex: none; background: var(--bg); border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(0,0,0,.04); padding: 0 12px 12px; overflow: hidden; }
.nv-side > .side-sec.grow { flex: 1 0 260px; display: flex; flex-direction: column; min-height: 260px; }
.nv-side > .side-sec.grow .side-excerpts { flex: 1; overflow-y: auto; }
.nv-side .side-title { display: flex; align-items: center; justify-content: space-between; height: 40px; margin: 0 -12px 10px; padding: 0 10px 0 12px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .04em; }
.nv-side .side-sec > .muted.small { line-height: 1.45; }

/* ---------- Assistent (Apple-Setup-Stil) ---------- */
.wz { display: flex; flex-direction: column; gap: 18px; padding: 6px 4px 0; }
.wz-dots { display: flex; justify-content: center; gap: 6px; }
.wz-dots i { width: 6px; height: 6px; border-radius: 4px; background: var(--line2); transition: width .25s, background .25s; }
.wz-dots i.done { background: var(--faint); }
.wz-dots i.on { width: 20px; background: var(--accent); }
.wz-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.wz-step.fwd { animation: wzIn .28s ease both; } .wz-step.back { animation: wzBack .28s ease both; }
@keyframes wzIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes wzBack { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.wz-ic { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); color: #fff; font-size: 26px; margin-bottom: 6px; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent); }
.wz-ic svg { width: 28px; height: 28px; }
.wz-title { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.015em; }
.wz-text { margin: 0 auto; max-width: 420px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.wz-body { width: 100%; margin-top: 14px; text-align: left; }
.wz-col { display: flex; flex-direction: column; gap: 14px; }
.wz-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wz-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wz-l { font-size: 12.5px; font-weight: 500; color: var(--text); }
.wz-l em { font-style: normal; font-weight: 400; color: var(--faint); }
.wz-in { height: 38px; font-size: 14px; }
.wz-f .date-field, .wz-f .select { height: 38px; }
.wz-note { font-size: 12px; color: var(--muted); }
.wz-note.center { text-align: center; min-height: 16px; }
.wz-foot { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.wz-hint { flex: 1; text-align: right; font-size: 12px; color: var(--muted); }
.wz-next { min-width: 120px; }
.wz-next:disabled { opacity: .45; cursor: default; }
.wz-choice { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.wz-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font: inherit; font-size: 13px; color: var(--text); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.wz-opt:hover { border-color: var(--line2); background: var(--hover); }
.wz-opt.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.wz-opt b { font-weight: 500; }
.wz-opt > span:not(.wz-opt-ic) { font-size: 11.5px; color: var(--muted); }
.wz-choice.big .wz-opt { align-items: flex-start; text-align: left; padding: 12px 14px; min-height: 56px; }
.wz-opt-ic { display: inline-flex; }
.wz-sum { margin-top: 4px; border-radius: 12px; background: var(--bg2); padding: 6px 14px; }
.wz-sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 13px; }
.wz-sum > div + div { border-top: 1px solid var(--line); }
.wz-sum span { color: var(--muted); } .wz-sum b { font-weight: 500; text-align: right; }
.wz .np { gap: 14px; }
.wz .np-grp:first-child { border-top: 0; padding-top: 0; }
.np-card.on { border-color: var(--accent); }
.mw-list { display: flex; flex-direction: column; gap: 6px; }
.mw-row { display: grid; grid-template-columns: 22px 14px 70px 1fr; gap: 10px; align-items: center; }
.mw-row kbd { font-size: 11px; color: var(--muted); text-align: center; }
.mw-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset; }
.mw-name { font-size: 13px; }
@media (max-width: 640px) { .wz-2 { grid-template-columns: 1fr; } }
.wz-in.time { width: 100%; max-width: none; }

/* Seminar: Termine im Assistenten und in der Sitzung */
.wz-rows { display: flex; flex-direction: column; gap: 8px; }
.wz-slot, .wz-blk { display: grid; grid-template-columns: 1.25fr 92px 10px 92px 1fr 28px; gap: 6px; align-items: center; }
.wz-blk { grid-template-columns: 1.4fr 88px 10px 88px 1fr 28px; }
.wz-brk { display: grid; grid-template-columns: 1fr 10px 1fr 1.3fr 28px; gap: 6px; align-items: center; }
.wz-rows .select, .wz-rows .date-field { height: 38px; min-width: 0; }
.wz-rows .wz-in.time { padding: 0 6px; }
.wz-x { width: 28px; height: 28px; padding: 0; }
.wz-add { align-self: flex-start; border: 0; background: none; font: inherit; font-size: 13px; color: var(--accent); padding: 4px 2px; cursor: pointer; }
.wz-add:hover { text-decoration: underline; }
.crs-row.off b, .crs-row.off .crs-d { text-decoration: line-through; color: var(--faint); }
.crs-badge.off { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.crs-when { display: inline-flex; gap: 6px; align-items: center; }
.crs-when .input.time { width: 108px; }
.crs-roomin { width: 140px; }
.crs-dh .spacer { flex: 1; }
.bib-panel { top: 50%; bottom: auto; max-height: calc(100% - 24px); transform: translate(8px, -50%); }
.bib-rail:hover .bib-panel { transform: translate(0, -50%); }
.wz .np-card { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 1px; align-items: center; min-height: 0; padding: 12px 14px; }
.wz .np-card .np-ic { grid-row: 1 / 3; }
.wz .np-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.wz .np-grp { padding-top: 12px; gap: 8px; }

/* ---------- Startseite als Raum: Schild an der Wand, Sideboard steht auf dem Boden ---------- */
:root { --floor-1: #e9dccb; --floor-2: #dccbb5; --wall: transparent; }
@media (prefers-color-scheme: dark) { :root { --floor-1: #2a2420; --floor-2: #221d19; } }
.home { display: flex; flex-direction: column; padding: 36px 48px 0; }
.home-room { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 100%; }
.home-wall { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 8px 0 40px; }
.home-wall .home-hero { align-self: stretch; margin: 0; }
.home-floor { position: relative; height: 64px; margin: 0 -48px; background: linear-gradient(180deg, var(--floor-1), var(--floor-2)); box-shadow: inset 0 1px 0 rgba(120, 80, 40, .18); flex: none; }
.home-floor::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 140px, rgba(120, 80, 40, .07) 140px 141px); }
.home { max-width: none; padding: 36px 48px 0; }
.home-room { width: 100%; max-width: 1120px; margin: 0 auto; }
.home-floor { margin: 0 -48px; }
.home-room { min-height: 0; flex: 1 0 auto; }
.home-wall { padding-bottom: 28px; }

/* ---------- Literatur nach Themen ---------- */
.pw-tab.topic { background: var(--tt); box-shadow: inset 0 -2px 0 var(--tc); }
.pw-tab.topic.on { background: color-mix(in srgb, var(--tc) 30%, var(--bg)); }
.pw-tab.gap { margin-left: 10px; }
.pw-add.on { background: var(--active); color: var(--text); }
.pw-topics { height: 100%; overflow: auto; }
.tb-board { display: flex; gap: 10px; padding: 12px; align-items: flex-start; min-height: 100%; }
.tb-col { flex: 0 0 220px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--bg2); transition: box-shadow .15s; }
.tb-col.over { box-shadow: 0 0 0 2px var(--tc, var(--accent)); }
.tb-h { display: flex; align-items: center; gap: 7px; padding: 0 2px; min-height: 26px; }
.tb-h b { flex: 1; font-size: 13px; }
.tb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tc); flex: none; }
.tb-edit { opacity: 0; } .tb-col:hover .tb-edit { opacity: 1; }
.tb-items { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
.tb-card { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 10px; background: var(--bg); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.04); cursor: pointer; }
.tb-card:hover { box-shadow: 0 0 0 1px var(--line2), 0 3px 10px rgba(0,0,0,.07); }
.tb-card.drag { opacity: .4; }
.tb-card b { font-size: 13px; font-weight: 500; }
.tb-new { flex: 0 0 auto; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px dashed var(--line2); background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.tb-new:hover { color: var(--text); background: var(--hover); }
.tp-dlg { display: flex; flex-direction: column; gap: 12px; }
.tp-colors { display: flex; gap: 10px; }
.tp-dot { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.tp-dot.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
.tp-prev { padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; }
.danger-text { color: var(--danger); }

/* ---------- ToDo-Spalten einrichten ---------- */
.tc-prev { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tc-prev i { font-style: normal; font-size: 11.5px; font-weight: 500; color: #1d1d1f; padding: 2px 8px; border-radius: 6px; }
.tc-list { display: flex; flex-direction: column; gap: 8px; }
.tc-row { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 10px; align-items: center; }
.tc-color { width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.tc-done { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); }
.tc-move { display: inline-flex; gap: 2px; }
.tc-move .tb-btn:disabled { opacity: .25; }
.tc-pop { position: fixed; z-index: 1000; display: flex; gap: 8px; padding: 10px; border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2), var(--shadow); }

/* ---------- Startseite: ruhig und klar (überschreibt Schild/Dielen) ---------- */
.home-wall { align-items: stretch; gap: 22px; padding: 4px 0 28px; }
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.home-head h1 { margin: 4px 0 6px; font-size: 32px; font-weight: 500; letter-spacing: -.025em; line-height: 1.1; }
.home-head .home-pic { width: 44px; height: 44px; }
.home-floor { height: 40px; background: none; box-shadow: none; border-top: 1px solid var(--line); }
.home-floor::before { display: none; }
.home-room { flex: none; }
.home-wall { padding-bottom: 24px; }
.home-floor { flex: 1 0 40px; height: auto; background: linear-gradient(180deg, var(--bg2), color-mix(in srgb, var(--bg2) 40%, var(--bg))); }
.prop-sug { position: fixed; z-index: 1000; padding: 4px; border-radius: 10px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2), var(--shadow); max-width: 380px; }
.ps-it { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.ps-it.on, .ps-it:hover { background: var(--accent-soft); }
.ps-v { font-size: 13px; } .ps-s { font-size: 11.5px; color: var(--muted); }
.pw-sess { flex: none; border: 0; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; font-weight: 500; background: var(--accent-soft); color: var(--accent); cursor: pointer; }
.pw-sess.none { background: var(--bg2); color: var(--muted); font-weight: 500; }

/* ---------- Notiz aufteilen ---------- */
.sp { display: flex; flex-direction: column; gap: 14px; }
.sp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sp-top .modal-title { margin: 0 0 2px; }
.sp-top p { margin: 0; }
.sp-list { max-height: min(60vh, 560px); overflow-y: auto; padding: 4px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sp-head { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.sp-n { width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 500; flex: none; }
.sp-title { flex: 1; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--text); padding: 4px 6px; border-radius: 6px; outline: none; }
.sp-title:hover, .sp-title:focus { background: var(--bg2); }
.sp-blk { display: flex; gap: 8px; padding: 5px 8px 5px 32px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.sp-blk.head { color: var(--text); font-weight: 500; }
.sp-k { flex: none; width: 14px; color: var(--faint); }
.sp-cut { position: relative; display: flex; align-items: center; width: 100%; height: 14px; border: 0; background: none; padding: 0; cursor: pointer; }
.sp-line { position: absolute; left: 32px; right: 8px; top: 50%; border-top: 1px dashed transparent; }
.sp-sc { position: relative; margin-left: 6px; font-size: 11px; color: transparent; background: var(--bg); padding: 0 6px; border-radius: 999px; }
.sp-cut:hover .sp-line { border-top-color: var(--line2); } .sp-cut:hover .sp-sc { color: var(--muted); }
.sp-cut.on { height: 26px; }
.sp-cut.on .sp-line { border-top: 1.5px dashed var(--accent); }
.sp-cut.on .sp-sc { color: var(--accent); font-weight: 500; box-shadow: 0 0 0 1px var(--accent); }
.sp-foot { display: flex; align-items: center; gap: 10px; }
.sp .seg-b { white-space: nowrap; }
.sp-cut { min-height: 0; height: 12px; margin: 0; }
.sp-cut.on { height: 24px; }
.sp-blk { margin: 0; padding-top: 3px; padding-bottom: 3px; }
.sp-head { margin: 8px 0 2px; }

/* ---------- Arbeiten: Absätze, Nummern, Hypothesen ---------- */
.ProseMirror p { margin: 0 0 .85em; }
.ProseMirror li > p { margin-bottom: .2em; }
.nv-page.paper .ProseMirror p { margin-bottom: 1em; line-height: 1.7; }
.hnum { display: inline-block; min-width: 1.6em; margin-right: .55em; color: var(--muted); font-weight: inherit; cursor: pointer; border-radius: 6px; padding: 0 3px; user-select: none; }
.hnum:hover { background: var(--hover); color: var(--accent); }
.hnum-custom { color: var(--accent); }
.hnum-off { color: var(--faint); font-weight: 400; }
.hnum-role { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; background: var(--bg2); color: var(--muted); vertical-align: middle; cursor: default; }
.hn-pop { display: flex; flex-direction: column; gap: 8px; }
.hn-pop .row { display: flex; gap: 6px; }
.hn-acts { display: flex; gap: 6px; }
.hn-acts .btn.on { background: var(--accent-soft); color: var(--accent); }
.hypo { display: flex; gap: 10px; margin: .4em 0 1em 1.2em; padding: 8px 12px; border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); border-radius: 0 8px 8px 0; font-size: .94em; }
.hypo-l { flex: none; font-weight: 500; cursor: pointer; user-select: none; }
.hypo-l:hover { color: var(--accent); }
.hypo-t { flex: 1; min-width: 0; }

/* ---------- Arbeit: Personen, Aufbau, Seitenzahlen ---------- */
.pe-list { display: flex; flex-direction: column; gap: 10px; }
.pe-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--bg2); }
.pe-row { display: grid; grid-template-columns: 1fr 1fr 28px; gap: 6px; align-items: center; }
.pe-card .pe-row:first-child { grid-template-columns: 1fr 1fr 70px 28px; }
.pe-card .pe-row:last-child { grid-template-columns: 1fr 1.4fr 28px; }
.pe-rev { grid-template-columns: 170px 1fr 28px; }
.pe-kv { grid-template-columns: 120px 1fr 28px; }
.pe-grid { display: flex; flex-direction: column; gap: 14px; }
.pe-line { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: start; }
.pe-lab { font-size: 13px; font-weight: 500; padding-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.pe-lab span { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.pe-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--bg2); padding: 3px; border-radius: 10px; }
.pe-sb { border: 0; background: none; font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.pe-sb.on { background: var(--bg); color: var(--text); box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0,0,0,.06); font-weight: 500; }
.pe-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.pe-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.fmt-tabs { margin: 0 0 14px; }
.fmt { max-height: 62vh; overflow-y: auto; padding-right: 4px; }
.nv-subtitle { display: block; width: 100%; border: 0; background: none; font: inherit; font-size: 20px; font-weight: 400; color: var(--muted); padding: 0 0 10px; outline: none; }
.nv-subtitle::placeholder { color: var(--faint); }

/* ---------- Arbeit: rechte Spalte (Notizen · Arbeitsfläche · Auszüge · Gliederung) ---------- */
.nv-side.nv-side-paper { position: relative; width: 360px; padding: 0; gap: 0; display: flex; flex-direction: column; overflow: hidden; }
.nv-side.nv-side-paper.wide { width: 520px; }
.ps-grip { position: absolute; left: -3px; top: 0; bottom: 0; width: 7px; cursor: col-resize; z-index: 5; }
.ps-grip:hover { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.ps-tabs { flex: none; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); }
.ps-tabs .pe-seg { display: flex; width: 100%; } .ps-tabs .pe-sb { flex: 1; padding: 5px 4px; }
.ps-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.ps-host { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: -12px; }
.ps-host > .pw { height: 100%; }
.pw-only { height: 100%; display: flex; flex-direction: column; }
.pw-only > .pw-cv, .pw-only > .pw-x { flex: 1; min-height: 0; height: 100%; border-radius: 0; }
.ps-list { display: flex; flex-direction: column; gap: 4px; }
.ps-lh { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 4px 4px; }
.ps-item { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; background: var(--bg); border-radius: 10px; padding: 9px 11px; font: inherit; color: var(--text); cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.ps-item:hover { box-shadow: 0 0 0 1px var(--line2), 0 2px 8px rgba(0,0,0,.05); }
.ps-item b { font-weight: 500; font-size: 13.5px; }
.ps-note { flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0 -12px -12px; }
.ps-nbar { display: flex; align-items: center; margin: -4px 0 0; }
.ps-empty { text-align: center; padding: 24px 12px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lib-mode { margin-left: 14px; }
.lib-content { display: flex; flex-direction: column; gap: 10px; }
.lib-graph { height: calc(100vh - 170px); min-height: 420px; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); position: relative; }

.pw-only > .pw-x { width: auto !important; max-width: none; }
.pe-line > .pe-seg { justify-self: start; }
.pw-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; padding: 10px; align-content: start; overflow-y: auto; }
.pp-card { display: flex; gap: 10px; align-items: center; text-align: left; border: 0; background: var(--bg2); border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--text); cursor: pointer; }
.pp-card:hover { background: var(--hover); }
.pp-ic { flex: none; }
.pp-t { display: flex; flex-direction: column; min-width: 0; gap: 2px; }

/* ---------- Arbeit: Seitenstreifen, Karten mit Bild, Formatierungs-Beispiel ---------- */
.pg-strip { display: flex; gap: 8px; overflow-x: auto; padding: 10px; border-radius: 12px; background: var(--bg2); }
.pg { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 50px; }
.pg.opt { opacity: .55; }
.pg-sheet { position: relative; width: 50px; height: 70px; background: #fff; border-radius: 4px; box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 1px 3px rgba(0,0,0,.12); padding: 7px 6px 0; display: flex; flex-direction: column; gap: 3px; overflow: hidden; color: #222; }
.pg-sheet.big { width: 100%; height: 118px; padding: 12px 12px 0; gap: 5px; }
.pg-head { font-size: 5.5px; line-height: 1; padding-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #444; }
.pg-sheet.big .pg-head { font-size: 8px; padding-bottom: 3px; margin-bottom: 2px; }
.pg-head.rule { border-bottom: .5px solid #333; }
.pg-h { display: block; height: 4px; width: 60%; background: #333; border-radius: 1px; margin: 2px 0 1px; }
.pg-l { display: block; height: 2px; width: 100%; background: #c9c9c9; border-radius: 1px; } .pg-l.s { width: 70%; }
.pg-sheet.big .pg-h { height: 6px; } .pg-sheet.big .pg-l { height: 3px; }
.pg-n { position: absolute; font-size: 6px; font-family: 'Times New Roman', serif; color: #000; }
.pg-sheet.big .pg-n { font-size: 9px; }
.pg-n.bottom-right { right: 5px; bottom: 3px; } .pg-n.bottom-center { left: 0; right: 0; text-align: center; bottom: 3px; } .pg-n.top-right { right: 5px; top: 3px; }
.pg-sheet.big .pg-n.bottom-right, .pg-sheet.big .pg-n.top-right { right: 10px; } .pg-sheet.big .pg-n.bottom-right, .pg-sheet.big .pg-n.bottom-center { bottom: 6px; } .pg-sheet.big .pg-n.top-right { top: 8px; }
.pg-more { margin: auto; color: #999; font-size: 14px; }
.pg.cover .pg-sheet { align-items: center; padding-top: 9px; }
.pg-logo { display: block; width: 8px; height: 8px; border-radius: 2px; background: #b9b4aa; align-self: flex-start; }
.pg-tl { display: block; height: 3px; width: 80%; background: #333; margin-top: 10px; border-radius: 1px; } .pg-tl.s { width: 60%; height: 2px; background: #999; margin-top: 2px; }
.pg-t { font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; max-width: 60px; overflow: hidden; text-overflow: ellipsis; }
.pc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pc-cards.heads { grid-template-columns: repeat(4, 1fr); }
.pc-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.pc-card:hover { border-color: var(--line2); }
.pc-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.pc-card b { font-size: 13px; font-weight: 500; } .pc-card > span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.pc-pic { width: 100%; margin-bottom: 6px; display: flex; justify-content: center; }
.mini-cover { width: 74px; height: 104px; background: #fff; border-radius: 4px; box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.1); display: flex; flex-direction: column; align-items: center; padding: 10px 8px; gap: 4px; position: relative; }
.mc-logo { position: absolute; left: 8px; top: 8px; width: 10px; height: 10px; border-radius: 2px; background: #b9b4aa; }
.mc-kind { display: block; width: 30%; height: 3px; background: #555; margin-top: 26px; border-radius: 1px; }
.mini-cover:not(.uhhbericht) .mc-kind { background: #555; }
.mc-t { display: block; width: 80%; height: 4px; background: #222; border-radius: 1px; margin-top: 4px; } .mc-t.s { width: 60%; height: 3px; background: #888; margin-top: 0; }
.mc-rows { display: block; width: 80%; height: 18px; margin-top: auto; background: repeating-linear-gradient(#bbb 0 2px, transparent 2px 5px); }
.mini-cover.apa .mc-kind, .mini-cover.modern .mc-kind { display: none; }
.st-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.st-sample { background: #fff; color: #111; border-radius: 6px; box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08); padding: 18px 18px 22px; font-family: 'Times New Roman', serif; font-size: 10.5px; line-height: 1.5; text-align: justify; }
.st-sample p { margin: 0 0 6px; }
.ss-h { font-weight: 500; font-size: 11px; margin: 0 0 6px; display: flex; gap: 10px; }
.ss-hy { display: flex; gap: 8px; margin: 4px 0 8px 18px; } .ss-hy.indent-small { font-size: 9px; line-height: 1.25; }
.ss-q { margin: 4px 18px 8px; } .ss-q.indent-small { font-size: 9.5px; line-height: 1.25; }
.ss-cap { font-size: 9px; margin: 6px 0 4px; } .ss-cap.c { text-align: center; } .ss-cap.apa b, .ss-cap.apa i { display: block; }
.ss-tbl { display: grid; font-size: 9px; } .ss-tr { display: grid; grid-template-columns: repeat(3, 1fr); }
.ss-tbl.grid .ss-tr span { border: .5px solid #bbb; padding: 2px 4px; margin: -.25px; } .ss-tbl.grid .ss-tr:nth-child(even) { background: #f3f3f3; }
.ss-tbl.apa { border-top: 1px solid #000; border-bottom: 1px solid #000; } .ss-tbl.apa .ss-tr:first-child { border-bottom: 1px solid #000; } .ss-tbl.apa span { padding: 2px 4px; }
@media (prefers-color-scheme: dark) { .pg-strip { background: #2a2a2c; } }

/* ---------- Arbeiten-Ansicht: Gliederung (Notizen je Kapitel) und Literaturverzeichnis ---------- */
.ol-body { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.ol-ch { border-radius: 12px; background: var(--bg2); padding: 10px 10px 10px; transition: box-shadow .15s; }
.ol-ch.over { box-shadow: 0 0 0 2px var(--accent); }
.ol-ch.loose { background: color-mix(in srgb, var(--accent) 7%, var(--bg2)); }
.ol-ch-h { display: flex; align-items: center; gap: 10px; min-height: 26px; padding: 0 2px; }
.ol-num { flex: none; min-width: 22px; font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.ol-ch-h b { flex: 1; font-size: 13.5px; font-weight: 500; }
.ol-cnt { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ol-add { border: 0; background: none; width: 24px; height: 24px; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 15px; }
.ol-add:hover { background: var(--hover); color: var(--text); }
.ol-items { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ol-note { display: flex; flex-direction: column; gap: 1px; text-align: left; border: 0; background: var(--bg); border-radius: 10px; padding: 8px 10px; font: inherit; color: var(--text); cursor: pointer; box-shadow: 0 0 0 .5px var(--line2); }
.ol-note:hover { box-shadow: 0 0 0 .5px var(--line2), 0 2px 8px rgba(0,0,0,.06); }
.ol-note.on { box-shadow: 0 0 0 1.5px var(--accent); }
.ol-note b { font-size: 13px; font-weight: 500; } .ol-note span { font-size: 11.5px; color: var(--muted); }
.ol-paper { border: 0; background: var(--bg2); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; max-width: 260px; display: inline-flex; align-items: center; gap: 2px; }
.ol-paper:hover { color: var(--text); background: var(--hover); }
.lit-body { overflow-y: auto; padding: 6px 12px 12px; }
.lit-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline; width: 100%; text-align: left; border: 0; background: none; border-bottom: .5px solid var(--line); padding: 9px 4px; font: inherit; color: var(--text); cursor: pointer; }
.lit-row:hover { background: var(--hover); }
.lit-e { font-family: 'Times New Roman', Georgia, serif; font-size: 13.5px; line-height: 1.45; padding-left: 1.4em; text-indent: -1.4em; }
.lit-meta { display: flex; gap: 10px; align-items: center; font-size: 11px; color: var(--muted); white-space: nowrap; }
.lit-meta .faint { color: var(--faint); }
.lit-topic { padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 22%, transparent); color: var(--text); }
.wz { max-height: calc(100vh - 120px); }
.wz-body { max-height: calc(100vh - 380px); overflow-y: auto; padding: 2px; }
.ol-note { min-width: 0; overflow: hidden; } .ol-note > * { max-width: 100%; }
.ol-x { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 7px 26px 7px 12px; border-radius: 10px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2), inset 3px 0 0 var(--c); cursor: pointer; }
.ol-q { font-family: 'Times New Roman', Georgia, serif; font-size: 13px; line-height: 1.35; }
.ol-src { font-size: 11px; color: var(--muted); }
.ol-un { position: absolute; right: 4px; top: 4px; border: 0; background: none; color: var(--faint); cursor: pointer; opacity: 0; font-size: 11px; }
.ol-x:hover .ol-un { opacity: 1; }
.ol-drop { margin-top: 6px; padding: 8px; border: 1px dashed var(--line2); border-radius: 10px; font-size: 11.5px; color: var(--faint); text-align: center; }
.sb-item.drop-trash { background: color-mix(in srgb, var(--danger) 16%, transparent); box-shadow: inset 0 0 0 1.5px var(--danger); }

/* ---------- Startseite „Credenza“ – gleiche Tokens wie alle Seiten: Seitenrand, Raster 4/8/12/16, Linien, Radien ----------
   Ablage (4er-Raster, deckungsgleich mit den Fächern) · Deckplatte (einziges Holz) · Korpus mit vier Fächern · zwei Füße */
.home.cr { display: block; height: 100%; overflow-y: auto; box-sizing: border-box; padding: var(--page-top) var(--page-x) var(--s7); --cr-pad: var(--s4); --cr-gap: var(--s3); }
.cr-head { display: flex; align-items: baseline; gap: var(--s3); min-height: var(--h-lg); margin-bottom: var(--s6); }
.cr-head h1 { margin: 0; font-size: 28px; font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.cr-date { font-size: 28px; font-weight: 500; letter-spacing: -.025em; color: var(--faint); }
.cr-head .home-pic { margin-left: auto; align-self: center; }
.cr-unit { position: relative; }
/* Beschriftung: überall dieselbe */
.cr-ok, .cr-fh > span { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 16px; }
/* Ablage */
.cr-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--cr-gap); padding: 0 calc(var(--cr-gap) / 2); align-items: stretch; }
.cr-obj { position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; gap: var(--s2); height: 108px; box-sizing: border-box; padding: var(--cr-pad); border: 1px solid var(--line2); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; background: var(--bg); font: inherit; color: var(--text); text-align: left; cursor: pointer; transition: background .15s; min-width: 0; }
.cr-obj:hover { background: color-mix(in srgb, var(--hover) 60%, var(--bg)); }
.cr-start { grid-column: span 3; cursor: default; height: auto; min-height: 108px; } .cr-start:hover { background: var(--bg); }
.cr-start .btn { align-self: flex-start; }
.cr-oh { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.cr-ob { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cr-ob > b { font-size: 15px; font-weight: 500; letter-spacing: -.01em; line-height: 20px; }
.cr-os { font-size: 12px; color: var(--muted); line-height: 16px; }
.cr-arrow { color: var(--faint); transition: transform .2s, color .2s; line-height: 16px; }
.cr-resume:hover .cr-arrow { transform: translateX(3px); color: var(--text); }
.cr-big { display: flex; align-items: baseline; gap: 6px; } .cr-big b { font-size: 26px; font-weight: 500; letter-spacing: -.03em; line-height: 28px; font-variant-numeric: tabular-nums; } .cr-big span { font-size: 12px; color: var(--muted); }
.cr-bar { display: block; width: 100%; height: 3px; border-radius: 2px; background: var(--line2); overflow: hidden; }
.cr-bar i { display: block; height: 100%; background: var(--wood-2); border-radius: 2px; }
.cr-bar.sm { width: 40px; }
.cr-cap { cursor: text; }
/* Deckplatte – ragt auf beiden Seiten gleich weit über */
.cr-top { position: relative; z-index: 1; height: 10px; margin: 0 calc(var(--s2) * -1); border-radius: 4px; background: linear-gradient(180deg, var(--wood-1), var(--wood-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -1px 0 var(--wood-edge), 0 4px 10px -6px rgba(60, 30, 10, .45); }
/* Korpus */
.cr-body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--bg2); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); overflow: hidden; }
.cr-fach { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; min-height: 380px; padding: var(--cr-pad) calc(var(--cr-pad) - 6px); }
.cr-fach + .cr-fach { border-left: 1px solid var(--line); }
.cr-grip { display: none; }
.cr-fh { display: flex; align-items: center; justify-content: space-between; height: 24px; padding: 0 6px; }
.cr-plus, .cr-more { border: 0; background: none; font: inherit; cursor: pointer; color: var(--muted); border-radius: 6px; height: 24px; }
.cr-plus { width: 24px; font-size: 15px; } .cr-more { font-size: 12px; padding: 0 6px; }
.cr-plus:hover, .cr-more:hover { background: var(--hover); color: var(--text); }
/* Zeilen: in allen Fächern gleich hoch, gleicher Innenabstand, gleiche Endspalte */
.cr-list, .cr-week { display: flex; flex-direction: column; gap: 2px; }
.cr-row, .cr-day { display: flex; align-items: center; gap: 10px; height: 44px; box-sizing: border-box; padding: 0 6px; border: 0; border-radius: var(--r-sm); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; width: 100%; min-width: 0; }
.cr-row:hover, .cr-day:hover { background: var(--hover); }
.cr-row .ptile { flex: none; width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }
.cr-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cr-rt b, .cr-rt > span:only-child { font-size: 13px; font-weight: 500; line-height: 18px; } .cr-rs { font-size: 11.5px; color: var(--muted); line-height: 15px; }
.cr-end { flex: none; width: 40px; display: flex; justify-content: flex-end; align-items: center; }
.cr-ring { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--wood-2) calc(var(--p) * 1%), var(--line2) 0); -webkit-mask: radial-gradient(circle, transparent 4.5px, #000 5px); mask: radial-gradient(circle, transparent 4.5px, #000 5px); }
.cr-task { cursor: default; } .cr-task .cr-rt { cursor: pointer; }
.cr-task .kb-check { flex: none; margin: 0 5px; }
.cr-due { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; } .cr-due.now { color: var(--wood-2); font-weight: 500; } .cr-due.late { color: var(--danger); }
.cr-task .cr-end { width: auto; min-width: 40px; }
.cr-add { height: 44px; box-sizing: border-box; border: 0; border-radius: var(--r-sm); background: none; font: inherit; font-size: 13px; padding: 0 6px 0 36px; color: var(--text); outline: none; background-image: linear-gradient(var(--faint), var(--faint)), linear-gradient(var(--faint), var(--faint)); background-size: 10px 1.5px, 1.5px 10px; background-position: 14px 50%, 18.25px 50%; background-repeat: no-repeat; }
.cr-add:hover, .cr-add:focus { background-color: var(--hover); }
.cr-add::placeholder { color: var(--faint); }
.cr-empty { margin: 0; padding: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
/* Woche */
.cr-dn { flex: none; width: 52px; display: flex; align-items: baseline; gap: 5px; } .cr-dn b { font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; min-width: 18px; } .cr-dn span { font-size: 11px; color: var(--muted); }
.cr-day.now .cr-dn b { color: var(--danger); }
.cr-day.now .cr-dn span { color: var(--danger); font-weight: 500; }
.cr-di { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 12.5px; line-height: 16px; }
.cr-di .cr-rs { line-height: 14px; }
.cr-free { color: var(--faint); }
/* Füße */
@media (max-width: 1100px) { .cr-shelf, .cr-body { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cr-fach:nth-child(3) { border-left: 0; } .cr-fach:nth-child(n+3) { border-top: 1px solid var(--line); } .cr-fach { min-height: 0; } .cr-resume, .cr-start { grid-column: span 2; } .cr-shelf { row-gap: var(--cr-gap); } }
@media (prefers-color-scheme: dark) { .cr-due.now { color: #d2955f; } .cr-bar i, .cr-ring { --wood-2: #b77a4a; } }

/* ---------- Kalender: Wochenansicht */
.cal-mode .seg-b { min-width: 64px; }
.wk-kw { margin-left: 10px; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .04em; vertical-align: middle; padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; }
.cal-main.wk { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel, var(--bg)); }
.wk-row { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.wk-head { border-bottom: 1px solid var(--line); }
.wk-dh { display: flex; align-items: baseline; gap: 6px; padding: 8px 10px; border-left: 1px solid var(--line); }
.wk-wd { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; }
.wk-dn { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.wk-dh.today .wk-dn { color: #fff; background: var(--danger); border-radius: 999px; min-width: 28px; height: 28px; display: inline-grid; place-items: center; font-size: 15px; }
.wk-dh.we, .wk-col.we, .wk-ad.we { background-color: color-mix(in srgb, var(--muted) 5%, transparent); }
.wk-all { border-bottom: 1px solid var(--line); }
.wk-all .wk-gut { display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; font-size: 10px; }
.wk-ad { border-left: 1px solid var(--line); padding: 4px; min-height: 30px; display: flex; flex-direction: column; gap: 3px; }
.wk-ad.drop, .wk-col.drop { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.wk-scroll { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: none; }
.wk-scroll::-webkit-scrollbar { display: none; }
.wk-grid { position: relative; }
.wk-hours .wk-hl { position: relative; font-size: 10px; color: var(--muted); text-align: right; padding-right: 8px; font-variant-numeric: tabular-nums; }
.wk-hours .wk-hl:not(:first-child) { transform: translateY(-6px); }
.wk-col { position: relative; border-left: 1px solid var(--line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hr) - 1px), var(--line) calc(var(--hr) - 1px), var(--line) var(--hr)),
                    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hr) / 2 - 1px), color-mix(in srgb, var(--line) 45%, transparent) calc(var(--hr) / 2 - 1px), color-mix(in srgb, var(--line) 45%, transparent) calc(var(--hr) / 2), transparent calc(var(--hr) / 2), transparent var(--hr)); }
.wk-col.today { background-color: color-mix(in srgb, var(--danger) 3%, transparent); }
.wk-ev { position: absolute; box-sizing: border-box; padding: 3px 6px; border-radius: 6px; font-size: 11.5px; line-height: 1.25; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--ec) 16%, var(--bg)); border-left: 3px solid var(--ec); color: var(--text); display: flex; flex-direction: column; }
.wk-ev b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-ev span { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-ev.short { flex-direction: row; gap: 6px; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.wk-ev:hover { background: color-mix(in srgb, var(--ec) 24%, var(--bg)); }
.wk-now { position: absolute; left: -1px; right: 0; height: 2px; background: #E5484D; z-index: 2; pointer-events: none; }
.wk-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; }

/* Startseite, ruhiger: drei Fächer, mehr Luft */
.home.cr { --cr-pad: var(--s5); --cr-gap: var(--s4); max-width: 1180px; }
.cr-shelf, .cr-body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cr-resume { grid-column: span 2; }
.cr-obj { height: 116px; }
.cr-fach { min-height: 340px; gap: var(--s3); padding: var(--cr-pad) calc(var(--cr-pad) - 8px); }
.cr-fh { padding: 0 8px; margin-bottom: var(--s1); }
.cr-list { gap: var(--s1); }
.cr-row { height: 48px; padding: 0 8px; }
.cr-add { height: 48px; padding-left: 38px; }
.cr-agenda { display: flex; flex-direction: column; gap: var(--s4); }
.cr-ag { display: flex; flex-direction: column; gap: 2px; }
.cr-agi { height: 40px; }
.cr-agt { flex: none; width: 64px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-agm { padding: 2px 8px 0 80px; }
.cr-empty { padding: 8px; }
@media (max-width: 1100px) { .cr-shelf, .cr-body { grid-template-columns: 1fr 1fr; } .cr-fach:nth-child(3) { border-left: 0; grid-column: span 2; } }
/* Kalender: mehr Luft */
.cal-body { gap: var(--s5); grid-template-columns: 1fr 240px; }
.cal-wd > div { padding: 0 10px 6px; }
.cal-day { padding: 8px 8px 10px; gap: 4px; }
.cal-dh { margin-bottom: 2px; }
.cal-ev { font-size: 12px; line-height: 1.35; padding: 3px 8px; border-radius: 6px; }
.cal-task { padding: 3px 7px; }
.cal-side { padding: var(--s4); gap: var(--s2); }
.wk-dh { padding: 12px 12px 10px; }
.wk-ad { padding: 6px; gap: 4px; min-height: 36px; }
.wk-all .wk-gut { padding-right: 10px; }
.wk-row { grid-template-columns: 64px repeat(7, minmax(0, 1fr)); }
.wk-hours .wk-hl { padding-right: 10px; font-size: 10.5px; }
.wk-ev { padding: 5px 8px; font-size: 12px; gap: 2px; border-radius: 8px; }
.wk-ev.short { padding: 2px 8px; }
.wk-dh.we, .wk-col.we, .wk-ad.we { background-color: color-mix(in srgb, var(--muted) 3%, transparent); }
.wk-ev { box-shadow: 0 0 0 1px var(--bg); background: color-mix(in srgb, var(--ec) 14%, var(--bg)); }
.home.cr { margin: 0; }

/* ---------- Titel & Untertitel nie abschneiden – sie laufen in der nächsten Zeile weiter */
.clamp1, .sb-label, .nl-title, .trash-title, .tp-t, .tpl-t, .crs-t h1, .side-link, .ci-note > span:first-child {
  white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: break-word; hyphens: auto; }
.sb-label { line-height: 1.3; padding: 2px 0; }
.sb-item { align-items: flex-start; } .sb-item > .sb-ic { margin-top: 2px; } .sb-item > .sb-sub, .sb-item > .sb-plus, .sb-item > .sb-chev { margin-top: 3px; }
/* einzeilig bleiben nur echte Leisten: Tabs, Pfade, Werkzeugleisten, Kalenderchips */
.tab-title, .crumbs, .rd-title, .path, .pw-pick .clamp1, .calv .clamp1, .cal-ev, .cal-task .clamp1, .wk-ev b, .wk-ev span, .proj-chip, .kb-link, .pg-head, .pg-t, .rd-banner > span:not(.spin), .pw-cvhint {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Zeilen dürfen dafür wachsen */
.cr-row, .cr-agi, .cr-day { height: auto; min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
.cr-agi { min-height: 40px; }
.cr-obj { height: auto; min-height: 116px; }
.cr-sub { color: var(--muted); }
.crs-sub { margin-top: 2px; font-size: 14px; color: var(--muted); line-height: 1.4; max-width: 70ch; }
.crs-topic, .crs-subtopic { display: block; resize: none; overflow: hidden; field-sizing: content; line-height: 1.3; }
.crs-topic { padding-bottom: 2px; }
.crs-subtopic { width: 100%; border: 0; background: none; font: inherit; font-size: 15px; color: var(--muted); padding: 2px 0 10px; outline: none; line-height: 1.4; }
.crs-subtopic::placeholder { color: var(--faint); }
.crs-ss { font-size: 12px; color: var(--muted); line-height: 1.35; }
.crs-row { align-items: flex-start; height: auto; }
.crs-t h1 { line-height: 1.2; }
.wz-ta { resize: none; field-sizing: content; min-height: 0; line-height: 1.4; padding-top: 9px; padding-bottom: 9px; overflow: hidden; }
.nv-subtitle { resize: none; field-sizing: content; overflow: hidden; line-height: 1.35; }
.nv-due { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 13px; }
.nv-due-l { font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nv-due-h { font-size: 12px; color: var(--faint); }

/* Reiter in der Seitenleiste: jede Kachel eine eigene Farbe */
svg.i-house { --ti1: #b98353; --ti2: #8c5a31; }                 /* Start – Holz */
svg.i-folder-kanban { --ti1: #4ea08f; --ti2: #2f776a; }         /* Projekte – Petrol */
svg.i-square-check-big { --ti1: #e06a5a; --ti2: #b9443a; }      /* ToDos – Koralle */
svg.i-file-text { --ti1: #5f8fd0; --ti2: #3d68aa; }             /* Notizen – Blau */
svg.i-notebook-pen { --ti1: #8676d2; --ti2: #5f4fae; }          /* Arbeiten – Indigo */
svg.i-library-big { --ti1: #8ea45a; --ti2: #657b36; }           /* Bibliothek – Oliv */
svg.i-tag { --ti1: #c071b0; --ti2: #934c86; }                   /* Tags – Magenta */
svg.i-star { --ti1: #ecba45; --ti2: #c8921d; }                  /* Favoriten – Gold */
svg.i-trash-2 { --ti1: #8b949e; --ti2: #646c76; }               /* Papierkorb – Grau */
/* Auszug bearbeiten */
.card-edit { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 13px; padding: 0 4px; border-radius: 6px; opacity: 0; transition: opacity .15s; }
.card:hover .card-edit { opacity: 1; } .card-edit:hover { color: var(--text); background: var(--hover); }
.xe { display: flex; flex-direction: column; gap: 10px; }
.xe-ta { width: 100%; box-sizing: border-box; resize: vertical; font-family: 'Times New Roman', Georgia, serif; font-size: 15px; line-height: 1.5; min-height: 140px; }
.xe-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.xe-info { font-size: 12px; color: var(--muted); } .xe-info.changed { color: #b06a1f; }
.xe-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.xe-opt { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); cursor: pointer; font: inherit; color: var(--text); }
.xe-opt:hover { border-color: var(--accent); background: var(--accent-soft); } .xe-opt span { font-size: 12px; color: var(--muted); }
/* Arbeitsfläche: flüssiges Greifen */
.ws-board .card { cursor: grab; touch-action: none; }
.ws-board .card .card-text, .ws-board .card .card-img { cursor: grab; }
.ws-board .card [contenteditable="true"], .ws-board .card input { cursor: text; }
.ws-board .card button { cursor: pointer; }
.ws-board .card.dragging { cursor: grabbing; transition: box-shadow .15s ease !important; will-change: transform; z-index: 60; box-shadow: 0 0 0 .5px var(--line2), 0 16px 36px rgba(0,0,0,.18); }
.ws-canvas.dragging-card { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.ws-board { will-change: transform; }
.ws-canvas.panning .card { pointer-events: none; }
.resume { z-index: 1400; }

/* ---------- Unterstreichen: gleiche Farben wie Markieren, als kräftige Linie unter dem Text */
.hl.hl-ul { background: transparent !important; mix-blend-mode: normal; opacity: 1; border-radius: 0; }
.hl.hl-ul::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: max(2px, 10%); background: var(--hc); border-radius: 2px; opacity: .95; }
.hl.hl-ul:hover { background: color-mix(in srgb, var(--hc) 14%, transparent) !important; }
.hl.hl-linked.hl-ul::after { background-image: none; }
.sel-mk-ic { display: inline-block; padding: 0 3px; border-radius: 4px; background: color-mix(in srgb, #f5d24b 70%, transparent); color: var(--text); font-weight: 500; line-height: 15px; }
.sel-ul-ic { font-weight: 500; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.sel-toolbar.ul .sel-color { border-radius: 4px; height: 8px; width: 22px; margin: 8px 1px; border: 0; }
/* Karte: Stichwort + verbundene Unterstreichungen */
.card-kids { display: flex; flex-direction: column; gap: 6px; margin: 2px 10px 6px; padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--c) 70%, transparent); }
.card-kid { position: relative; font-family: 'Times New Roman', Georgia, serif; font-size: 13px; line-height: 1.45; padding-right: 18px; cursor: pointer; }
.card-kid u { text-decoration: none; background-image: linear-gradient(var(--kc), var(--kc)); background-size: 100% 2px; background-repeat: no-repeat; background-position: 0 100%; padding-bottom: 1px; }
.card-kid .card-kid-pg { font-family: var(--font); font-size: 10.5px; color: var(--faint); margin-left: 4px; }
.card-kid-x { position: absolute; right: 0; top: 0; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 11px; opacity: 0; }
.card-kid:hover .card-kid-x { opacity: 1; } .card-kid-x:hover { color: var(--danger); }
.card.has-kids .card-text { font-weight: 500; font-size: 14px; }
.card-text.ul { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2.5px; text-underline-offset: 3px; }
.ws-board .card.link-target { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.ws-board .card.link-target::before { content: 'Loslassen: verbinden'; position: absolute; top: -26px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 500; color: #fff; background: var(--accent); padding: 3px 8px; border-radius: 6px; z-index: 70; }
.xb-kids { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 2px; padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--xc) 70%, transparent); }
.xb-kid { font-size: 13.5px; line-height: 1.5; }
.xb-kid u { text-decoration: none; background-image: linear-gradient(var(--kc), var(--kc)); background-size: 100% 2px; background-repeat: no-repeat; background-position: 0 100%; }
.xb-kid-pg { font-size: 11px; color: var(--faint); }
.xblock:has(.xb-kids) .xb-text { font-weight: 500; }

/* Markierungen durchsichtiger – der Text bleibt klar lesbar */
.hl { opacity: .26; }
.hl:hover { opacity: .38; }
@media (prefers-color-scheme: dark) { .hl { opacity: .32; } }
.hl.hl-area { opacity: .85; }

/* Auswahl-Leiste im Stil der App: Glas-Panel wie Menüs, Segmente wie überall, ruhige Farbpunkte */
.sel-toolbar { gap: 6px; padding: 5px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 0 0 .5px var(--line2), 0 10px 30px rgba(0, 0, 0, .14); }
.sel-sep { height: 18px; margin: 0 1px; background: var(--line2); }
.sel-modes { background: var(--active); border-radius: 10px; padding: 2px; gap: 2px; }
.sel-mode { width: 28px; height: 26px; border-radius: 8px; color: var(--muted); font-size: 12.5px; }
.sel-mode.on { background: var(--bg); color: var(--text); box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0,0,0,.06); }
.sel-mk-ic { padding: 0 3px; border-radius: 4px; background: color-mix(in srgb, #f5d24b 55%, transparent); font-size: 12px; line-height: 15px; }
.sel-ul-ic { font-size: 12.5px; }
.sel-color { width: 18px; height: 18px; border: 0; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.18); margin: 0 1px; cursor: pointer; transition: transform .12s ease; }
.sel-color:hover { transform: scale(1.18); }
.sel-toolbar.ul .sel-color { width: 18px; height: 18px; margin: 0 1px; border-radius: 4px; background: transparent !important; box-shadow: none; position: relative; }
.sel-toolbar.ul .sel-color::before { content: ''; position: absolute; left: 1px; right: 1px; bottom: 3px; height: 3px; border-radius: 2px; background: var(--sc); }
.sel-btn { height: 26px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.sel-btn:hover { background: var(--hover); }
/* Mehrfachauswahl auf der Arbeitsfläche */
.ws-board .card.sel { box-shadow: 0 0 0 2px var(--accent), 0 6px 18px rgba(0,0,0,.08); }
.cv-marquee { position: absolute; z-index: 80; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 4px; pointer-events: none; }
.ws-canvas.space-pan, .ws-canvas.space-pan * { cursor: grab !important; }
.ws-canvas[data-tool="select"] { cursor: default; }
/* Griff zum Verstellen der rechten Spalte */
.side-rz { flex: none; width: 9px; margin: 0 -4px; position: relative; z-index: 6; cursor: col-resize; align-self: stretch; }
.side-rz::after { content: ''; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: transparent; transition: background .15s; }
.side-rz:hover::after, .side-rz.on::after { background: var(--accent); width: 2px; left: 3.5px; }
.side-rz.hidden, .side-rz:has(+ .hidden), .side-rz:has(+ .nv-side.hidden) { display: none; }
.pw-cols > .pw-slot-s { max-width: none; }
/* untere Leiste (Arbeitsfläche/Notiz …) auch zugeklappt als erhabene Fläche mit Rand */
.pw-cvbar { height: 38px; margin-top: 10px; padding: 0 10px; border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 1px var(--line2), 0 1px 3px rgba(0,0,0,.05); }
.pw-main:not(.cv-closed) .pw-cvbar { border-radius: 12px 12px 0 0; margin-bottom: 0; box-shadow: 0 0 0 1px var(--line2); z-index: 1; }
.pw-main:not(.cv-closed) .pw-slot-b > * { border-radius: 0 0 14px 14px !important; box-shadow: 0 0 0 1px var(--line2) !important; }
.pw-cvbar:hover, .pw-cvbar.on { background: color-mix(in srgb, var(--hover) 50%, var(--bg)); }
.pw-main.cv-closed .pw-cvbar { margin-bottom: 2px; }
.pw-main:not(.cv-closed) .pw-slot-b > * { box-shadow: none !important; border: 1px solid var(--line2); border-top: 0; box-sizing: border-box; }
/* Suche über alles */
.qs { display: flex; flex-direction: column; min-height: 0; max-height: 72vh; }
.qs-field { display: flex; align-items: center; gap: 10px; padding: 4px 6px 10px; border-bottom: 1px solid var(--line); }
.qs-field .qs-lens { color: var(--muted); font-size: 15px; display: inline-flex; }
.qs-field .qs-input { flex: 1; border: 0 !important; background: none !important; box-shadow: none !important; font-size: 17px; padding: 6px 0; outline: none; }
.qs-field kbd { font-size: 11px; color: var(--faint); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; }
.qs-tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 10px 2px 6px; }
.qs-tab { border: 0; background: none; height: 26px; padding: 0 10px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.qs-tab:hover { background: var(--hover); color: var(--text); }
.qs-tab.on { background: var(--text); color: var(--bg); }
.qs-n { font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
.qs-list { overflow-y: auto; min-height: 0; padding: 2px 0 4px; }
.qs .sg-group { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.qs-more { border: 0; background: none; font: inherit; font-size: 11.5px; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.qs-more:hover { color: var(--text); background: var(--hover); }
.qs .qs-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.qs .qs-item.active { background: var(--hover); }
.qs .qs-item .sg-ic { flex: none; width: 22px; display: inline-flex; justify-content: center; padding-top: 1px; color: var(--muted); }
.qs-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qs-t { font-size: 13.5px; line-height: 1.4; color: var(--text); overflow-wrap: break-word; }
.qs-sub { font-size: 12px; color: var(--muted); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.qs-quote .qs-t { font-family: var(--serif, Georgia, serif); font-size: 14px; border-left: 3px solid var(--qc, var(--line2)); padding-left: 8px; }
.qs mark { background: color-mix(in srgb, #f2b33d 38%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.qs-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }

/* =====================================================================
   CiteBoard Design 2026 – „Sideboard“: warmes Papier, ruhige Linien, Serifen für Überschriften
   Eine Quelle für alles: Farben, Radien, Abstände, Schatten. Hell wie das Moodboard, dunkel wie Macro.
   ===================================================================== */
:root:root:root {
  --bg: #fcfaf6; --bg2: #f5f0e8; --bg3: #ece5da; --card: #fffdf9; --sb-bg: #f3eee6;
  --hover: rgba(98, 66, 36, .055); --active: rgba(98, 66, 36, .09);
  --text: #2b2520; --muted: #857a6f; --faint: #b4a99c; --line: rgba(98, 66, 36, .10); --line2: rgba(98, 66, 36, .16);
  --accent: #9c5a2e; --accent-soft: rgba(156, 90, 46, .11); --accent-2: #e5793d; --olive: #6f7f4f; --ok: #6f8f4f; --danger: #c8473c;
  --serif: "New York", ui-serif, "Iowan Old Style", "Charter", Georgia, serif;
  --r-sm: 8px; --r: 10px; --r-lg: 14px; --radius: 14px;
  --shadow: 0 0 0 .5px rgba(70, 45, 20, .10), 0 10px 30px rgba(70, 45, 20, .12);
  --card-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(70, 45, 20, .04);
  --card-shadow-hover: 0 0 0 1px var(--line2), 0 6px 18px rgba(70, 45, 20, .08);
  --pdf-bg: #efe9df;
}
@media (prefers-color-scheme: dark) {
  :root:root:root {
    --bg: #111111; --bg2: #171717; --bg3: #202020; --card: #161616; --sb-bg: #0c0c0c;
    --hover: rgba(255, 255, 255, .05); --active: rgba(255, 255, 255, .085);
    --text: #ececec; --muted: #9b9b9b; --faint: #646464; --line: rgba(255, 255, 255, .075); --line2: rgba(255, 255, 255, .13);
    --accent: #e0915c; --accent-soft: rgba(224, 145, 92, .14); --accent-2: #f08a4b; --olive: #9aad74; --danger: #ef6a5f;
    --shadow: 0 0 0 .5px rgba(255, 255, 255, .09), 0 16px 40px rgba(0, 0, 0, .55);
    --card-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .3);
    --card-shadow-hover: 0 0 0 1px var(--line2), 0 10px 28px rgba(0, 0, 0, .5);
    --pdf-bg: #0b0b0b;
  }
}
body { background: var(--bg); color: var(--text); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* ---------- Typografie: Seitentitel in Serife, alles andere ruhig in der Systemschrift */
h1, .kb-h1, .calv .cal-head h1, .set-head h1, .help-art h1, .cr-head h1, .pw-title h1, .crs-t h1 { font-family: var(--serif); font-weight: 500; letter-spacing: -.012em; }
.cr-head h1, .kb-h1, .calv .cal-head h1, .set-head h1 { font-size: 30px; }
.nv-title { font-family: var(--serif); font-weight: 500; letter-spacing: -.012em; }
.cr-date { font-family: var(--serif); font-weight: 400; color: var(--faint); letter-spacing: -.01em; }
/* Abschnitts-Überschriften überall gleich: 13 px, halbfett, normale Schreibung */
h3, .section-label, .side-title, .ci-sec, .tp-head, .crs-sh h3, .ps-lh, .cr-ok, .cr-fh > span, .nv-due-l, .qs .sg-group, .resume-k, .set-nav-h {
  text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; font-weight: 500 !important; color: var(--text) !important; }
.crs-kicker { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; color: var(--accent); }
.set-nav-h, .qs .sg-group { color: var(--muted) !important; font-size: 12px !important; }

/* ---------- Seitenleiste wie im Moodboard: helle Leiste, feine Linien-Symbole, aktive Zeile als warme Pille */
#sidebar { background: var(--sb-bg); border-right: 1px solid var(--line); }
.sb-item, .sb-folder, .sb-main { min-height: 30px; border-radius: 8px; color: var(--text); }
.sb-item:hover, .sb-main:hover { background: var(--hover); }
.sb-item.active, .sb-main.active { background: var(--card); font-weight: 500; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(70, 45, 20, .05); }
@media (prefers-color-scheme: dark) { .sb-item.active, .sb-main.active { background: var(--bg3); box-shadow: none; } }
.sb-scroll > .sb-item > .sb-ic svg.i, .sb-main > .sb-ic svg.i, .sb-bottom > .sb-item > .sb-ic svg.i, .sb-bottom > .sb-group > .sb-main > .sb-ic svg.i {
  background: none !important; box-shadow: none !important; padding: 0 !important; width: 18px !important; height: 18px !important; border-radius: 0 !important;
  color: var(--ti2) !important; stroke-width: 1.7 !important; }
@media (prefers-color-scheme: dark) { .sb-scroll > .sb-item > .sb-ic svg.i, .sb-main > .sb-ic svg.i, .sb-bottom > .sb-item > .sb-ic svg.i, .sb-bottom > .sb-group > .sb-main > .sb-ic svg.i { color: var(--ti1) !important; } }
.sb-search { background: var(--card) !important; box-shadow: 0 0 0 1px var(--line); border-radius: 10px !important; }
.sb-sub { color: var(--faint); }
/* Kachel-Farben der Reiter: erdig, unterscheidbar, passend zum Logo */
svg.i-house { --ti1: #c7915f; --ti2: #9c5a2e; }
svg.i-folder-kanban { --ti1: #8fae84; --ti2: #4f7a5c; }
svg.i-square-check-big { --ti1: #ee9466; --ti2: #d0602f; }
svg.i-file-text { --ti1: #93aed0; --ti2: #4f739f; }
svg.i-notebook-pen { --ti1: #b3a0d6; --ti2: #6f5a9f; }
svg.i-library-big { --ti1: #b9bf86; --ti2: #6f7f4f; }
svg.i-tag { --ti1: #d8a0c4; --ti2: #9a5584; }
svg.i-star { --ti1: #e9c26a; --ti2: #b8892a; }
svg.i-trash-2 { --ti1: #b0a89e; --ti2: #7d746a; }

/* ---------- Karten, Flächen, Menüs: ein Stil */
.hc, .set-card, .cr-obj, .modal, .ctx, .pw-page, .nv-side > section, .nv-side > .side-sec, .nv-side > .tasks-box { border-radius: var(--r-lg); }
.hc, .set-card { background: var(--card); box-shadow: var(--card-shadow); }
.modal { background: var(--card); box-shadow: var(--shadow); }
.ctx { background: color-mix(in srgb, var(--card) 92%, transparent); box-shadow: var(--shadow); border-radius: 12px; }
.ctx-item { border-radius: 8px; }
.input, .select, .search, input.input, textarea.input { background: var(--card); box-shadow: 0 0 0 1px var(--line2); border: 0; border-radius: var(--r-sm); }
.input:focus, .select:focus, textarea.input:focus { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); outline: none; }

/* Knöpfe: primär = Holzbraun wie „Save Quote“, sekundär = Papier mit Linie */
.btn { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line2); border: 0; }
.btn:hover { background: color-mix(in srgb, var(--hover) 60%, var(--card)); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .08) inset, 0 1px 2px rgba(110, 60, 25, .18); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); opacity: 1; }
@media (prefers-color-scheme: dark) { .btn.primary { color: #1a1a1a; } }
.btn.danger { color: var(--danger); }
.tb-btn:hover { background: var(--hover); }

/* Segment-Auswahl: Pillen auf warmer Spur */
.seg { background: var(--bg3); border-radius: 10px; padding: 2px; }
.seg-b { color: var(--muted); border-radius: 8px; }
.seg-b.on { background: var(--card); color: var(--text); box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(70, 45, 20, .08); }
@media (prefers-color-scheme: dark) { .seg { background: var(--bg3); } .seg-b.on { background: #2c2c2c; } }

/* Tabs oben */
#tabbar, .tabbar { background: var(--sb-bg); }
.tab.active, .tab.on { background: var(--card); box-shadow: 0 0 0 1px var(--line); }

/* Projekt-Arbeitsraum: Flächen als Papierkarten */
.pw-page, .pw-x, .pw-cv { background: var(--card); }
.pw-cv .ws-canvas { background-color: var(--bg2); }
.pw-cvbar { background: var(--card); }
.nv-side { background: var(--bg2); }
.nv-side > section, .nv-side > .side-sec, .nv-side > .tasks-box { background: var(--card); box-shadow: var(--card-shadow); }

/* Karten auf der Arbeitsfläche */
.card { background: var(--card); }
.card-text.quote { font-family: var(--serif); }

/* Startseite: warmes Papier statt Grau */
.cr-body { background: var(--bg2); border-color: var(--line); }
.cr-obj { background: var(--card); border-color: var(--line2); }
.cr-due.now { color: var(--accent-2); }
.cr-day.now .cr-dn b, .cr-day.now .cr-dn span { color: var(--accent-2) !important; }
.cr-bar i, .cr-ring { --wood-2: var(--accent); }

/* Kalender & Aufgaben: „heute“ in Orange wie im Moodboard */
.cal-day.today .cal-dn, .wk-dh.today .wk-dn { background: var(--accent-2) !important; color: #fff !important; }
.wk-now, .wk-now::before { background: var(--accent-2) !important; }
.wk-col.today { background-color: color-mix(in srgb, var(--accent-2) 4%, transparent) !important; }

/* Markierungen & Auswahl-Leiste */
.sel-toolbar { background: color-mix(in srgb, var(--card) 92%, transparent); }
.qs mark { background: color-mix(in srgb, var(--accent-2) 26%, transparent); }
.qs-tab.on { background: var(--accent); color: #fff; }
@media (prefers-color-scheme: dark) { .qs-tab.on { color: #1a1a1a; } }

/* PDF-Hintergrund */
.rd-pdf, .pdf-pages, .rd-pages { background: var(--pdf-bg); }
/* Startseite: Suche + Handgriffe */
.cr-head { margin-bottom: var(--s5); }
.cr-quick { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s6); flex-wrap: wrap; }
.cr-search { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--line2); color: var(--faint); font: inherit; font-size: 13.5px; cursor: text; text-align: left; }
.cr-search:hover { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.cr-search > span:nth-child(2) { flex: 1; }
.cr-search kbd { font: inherit; font-size: 11px; color: var(--faint); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; }
.cr-search-ic svg.i { width: 15px; height: 15px; color: var(--muted); }
.cr-acts { display: flex; gap: var(--s2); flex-wrap: wrap; }
.cr-acts .btn { height: 40px; padding: 0 14px; gap: 8px; border-radius: 10px; font-weight: 500; }
.sb-brand-main { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
/* Einheitlicher Seitenrand und Titel auf allen Seiten */
.page-wrap { max-width: none !important; margin: 0 !important; padding: var(--page-top) var(--page-x) 64px !important; }
.page-head { min-height: var(--h-lg); margin: 0 0 var(--s5); }
.page-head h1, .kb-h1, .calv .cal-head h1, .set-head h1, .cr-head h1 { font-family: var(--serif); font-size: 30px !important; font-weight: 500 !important; letter-spacing: -.012em !important; line-height: 1.15; }
.kb-wrap, .calv, .set-inner { padding-top: var(--page-top) !important; }
.sb-item.active > .sb-ic svg.i, .sb-main.active > .sb-ic svg.i { color: var(--ti2) !important; }
@media (prefers-color-scheme: dark) { .sb-item.active > .sb-ic svg.i, .sb-main.active > .sb-ic svg.i { color: var(--ti1) !important; } }
.sb-scroll > .sb-item > .sb-sub, .sb-bottom > .sb-item > .sb-sub { margin-right: 22px; }
.kb-bchip { background: var(--card); box-shadow: 0 0 0 1px var(--line2); }
.kb-bchip.on { background: var(--accent); color: #fff; box-shadow: none; }
@media (prefers-color-scheme: dark) { .kb-bchip.on { color: #1a1a1a; } }
.kb-bchip.add { box-shadow: none; background: none; }
.pw-note .pw-pick { flex: 1 1 auto; min-width: 110px; }
.pw-note .pw-bar .spacer { flex: 0 0 4px; }
.cv-wrap { container-type: inline-size; }
@container (max-width: 700px) { .cv-lb { display: none !important; } .cv-btn { min-width: 34px; } }

/* ---------- Startseite (Entwurf 2026) ---------- */
:root { --net-doc: #7b4a2b; --net-note: #5f7a4f; --net-quote: #e5793d; --net-tag: #ead2b6; }
@media (prefers-color-scheme: dark) { :root { --net-doc: #c58a5c; --net-note: #9ab27c; --net-quote: #f08a4b; --net-tag: #6b5a49; } }
.home.hm { height: 100%; overflow-y: auto; box-sizing: border-box; padding: 0 0 var(--s7); display: block; max-width: none; margin: 0; }
.hm-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: var(--s3); padding: 14px var(--page-x); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.hm-search { width: min(560px, 100%); display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--line2); color: var(--faint); font: inherit; font-size: 13.5px; cursor: text; text-align: left; }
.hm-search:hover { box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--accent-soft); }
.hm-search > span:nth-child(2) { flex: 1; }
.hm-search kbd { font: inherit; font-size: 11px; color: var(--faint); border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; }
.hm-search-ic { display: inline-flex; } .hm-search-ic svg.i { width: 15px; height: 15px; color: var(--muted); margin: 0; }
.hm-me { position: absolute; right: var(--page-x); width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); font: 500 13px var(--font); cursor: pointer; overflow: hidden; padding: 0; }
.hm-me img { width: 100%; height: 100%; object-fit: cover; }
.hm-page { padding: var(--s6) var(--page-x) 0; max-width: 1360px; }
/* Begrüßung */
.hm-hero { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.25fr); gap: var(--s5); align-items: stretch; margin-bottom: var(--s5); }
.hm-greet { display: flex; gap: 14px; align-items: flex-start; padding-top: var(--s4); }
.hm-sprout { display: inline-flex; margin-top: 6px; } .hm-sprout svg.i { width: 30px; height: 30px; color: var(--olive); stroke-width: 1.6; margin: 0; }
.hm-greet h1 { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -.015em; line-height: 1.15; }
.hm-date { margin-top: 6px; font-size: 15px; color: var(--muted); }
.hm-tag { margin-top: 12px; font-family: var(--serif); font-style: italic; font-size: 15.5px; color: var(--muted); }
.hm-banner { position: relative; min-height: 132px; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 7%, var(--bg))); display: flex; align-items: center; justify-content: flex-end; }
.hm-art { position: absolute; inset: 0 32% 0 0; } .hm-art svg { width: 100%; height: 100%; display: block; }
@media (prefers-color-scheme: dark) { .hm-art { opacity: .55; filter: saturate(.8) brightness(.8); } }
.hm-quote { position: relative; margin: 0; width: 32%; min-width: 170px; padding: 0 var(--s5) 0 var(--s4); border-left: 1px solid var(--line2); font-family: var(--serif); font-size: 17px; line-height: 1.35; color: var(--text); }
/* Schnellaktionen auf dem Regalbrett */
.hm-shelf { position: relative; margin-bottom: var(--s6); }
.hm-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 52px; gap: var(--s3); padding: 0 var(--s2); }
.hm-act { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 0; border-radius: 12px 12px 4px 4px; background: var(--card); box-shadow: 0 0 0 1px var(--line); font: inherit; color: var(--text); text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.hm-act:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line2), 0 8px 18px rgba(70, 45, 20, .08); }
.hm-act-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .hm-act-t b { font-family: var(--serif); font-size: 15px; font-weight: 500; } .hm-act-t span { font-size: 12px; color: var(--muted); }
.hm-more { justify-content: center; padding: 0; font-size: 18px; color: var(--muted); }
.hm-plank { height: 8px; margin: 0 -4px; border-radius: 4px; background: linear-gradient(180deg, var(--wood-1), var(--wood-2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 3px 8px -4px rgba(60, 30, 10, .45); }
/* Symbol-Kacheln in ruhigen Tönen */
.hm-tile { flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--tc) 14%, var(--card)); }
.hm-tile svg.i { width: 18px; height: 18px; color: var(--tc) !important; stroke-width: 1.8; margin: 0; background: none !important; box-shadow: none !important; padding: 0 !important; }
.tone-green { --tc: #5f8a5a; } .tone-olive { --tc: #6f7f4f; } .tone-orange { --tc: #e0703a; } .tone-rust { --tc: #c4552d; } .tone-sand { --tc: #9c6b44; } .tone-plum { --tc: #7e62a8; }
@media (prefers-color-scheme: dark) { .hm-tile { background: color-mix(in srgb, var(--tc) 22%, var(--card)); } .tone-sand { --tc: #c99a72; } .tone-plum { --tc: #a990d2; } .tone-green { --tc: #8fbd85; } .tone-olive { --tc: #a7b67f; } }
/* Karten-Raster: zwei Reihen à drei */
.hm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.hm-card { display: flex; flex-direction: column; min-width: 0; min-height: 272px; padding: var(--s4) var(--s5) var(--s4); background: var(--card); border-radius: var(--r-lg); box-shadow: var(--card-shadow); }
.hm-ch { display: flex; align-items: center; justify-content: space-between; min-height: 30px; margin-bottom: var(--s3); }
.hm-ch h2 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.hm-link { border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.hm-link:hover { color: var(--text); background: var(--hover); }
.hm-plus { width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 1px var(--line2); color: var(--muted); font-size: 15px; cursor: pointer; }
.hm-plus:hover { color: var(--text); background: var(--hover); }
.hm-list { display: flex; flex-direction: column; flex: 1; }
.hm-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; margin: 0 -6px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; min-width: 0; }
.hm-row + .hm-row { box-shadow: 0 -1px 0 var(--line); border-radius: 0 0 10px 10px; }
.hm-row:hover { background: var(--hover); box-shadow: none; border-radius: 10px; }
.hm-row:hover + .hm-row { box-shadow: none; }
.hm-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hm-row-t b { font-size: 13.5px; font-weight: 500; line-height: 1.35; overflow-wrap: break-word; }
.hm-row-t span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.hm-chip { flex: none; font-size: 11.5px; color: var(--olive); background: color-mix(in srgb, var(--olive) 12%, var(--card)); padding: 2px 8px; border-radius: 6px; }
.hm-empty { margin: 4px 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.hm-foot { display: flex; gap: var(--s2); align-items: center; margin-top: auto; padding-top: var(--s3); flex-wrap: wrap; }
.hm-foot .btn { height: 32px; gap: 6px; }
.hm-ghost { box-shadow: none !important; background: none !important; color: var(--muted); max-width: 60%; }
.hm-ghost:hover { color: var(--text); background: var(--hover) !important; }
.hm-faint { color: var(--faint) !important; }
/* Weiterlesen */
.hm-read { display: flex; flex-direction: column; flex: 1; }
.hm-read-main { display: flex; gap: var(--s4); cursor: pointer; }
.hm-thumb { flex: none; width: 76px; height: 100px; box-sizing: border-box; padding: 10px 9px; border-radius: 4px; background: #fffefb; box-shadow: 0 0 0 1px var(--line2), 0 4px 10px rgba(70, 45, 20, .1); display: flex; flex-direction: column; gap: 6px; transform: rotate(-1.5deg); }
.hm-thumb i { display: block; height: 3px; border-radius: 2px; background: #d9d1c5; }
.hm-thumb i:nth-child(3n) { width: 70%; } .hm-thumb i.hl { background: #f2c46b; }
@media (prefers-color-scheme: dark) { .hm-thumb { background: #e9e5de; } }
.hm-read-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.hm-read-tx > b { font-family: var(--serif); font-size: 16px; font-weight: 500; line-height: 1.3; margin-bottom: 2px; }
.hm-read-tx > span { font-size: 12.5px; color: var(--muted); }
.hm-prog { margin-top: auto; padding-top: var(--s3); }
.hm-bar { display: block; height: 4px; border-radius: 2px; background: var(--bg3); overflow: hidden; } .hm-bar i { display: block; height: 100%; background: var(--accent-2); border-radius: 2px; }
.hm-prog-l { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Demnächst */
.hm-up { display: flex; flex-direction: column; gap: var(--s3); flex: 1; }
.hm-due { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--accent-2) 9%, var(--card)); font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.hm-day { display: flex; flex-direction: column; gap: 2px; padding-left: 12px; border-left: 2px solid var(--line2); }
.hm-day.now { border-left-color: var(--olive); }
.hm-day-h { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.hm-day.now .hm-day-h { color: var(--olive); font-weight: 500; }
.hm-item { display: flex; align-items: center; gap: 10px; padding: 5px 6px; margin-left: -6px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.hm-item:hover { background: var(--hover); }
.hm-item .hm-row-t { cursor: pointer; }
.hm-check { flex: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line2); background: var(--card); cursor: pointer; padding: 0; }
.hm-check:hover { border-color: var(--olive); background: color-mix(in srgb, var(--olive) 14%, var(--card)); }
.hm-item.late .hm-row-t span { color: var(--danger); }
.hm-ev-dot { flex: none; width: 10px; height: 18px; display: grid; place-items: center; } .hm-ev-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ec); }
.hm-add { margin-top: auto; height: 34px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; padding: 0 10px 0 32px; color: var(--text); outline: none; background-image: linear-gradient(var(--faint), var(--faint)), linear-gradient(var(--faint), var(--faint)); background-size: 10px 1.5px, 1.5px 10px; background-position: 12px 50%, 16.25px 50%; background-repeat: no-repeat; }
.hm-add:hover, .hm-add:focus { background-color: var(--hover); }
.hm-add::placeholder { color: var(--faint); }
/* Verbindungen */
.hm-net { display: flex; align-items: center; gap: var(--s3); flex: 1; cursor: pointer; }
.hm-net-svg { flex: 1; min-width: 0; } .hm-net-svg svg { width: 100%; height: auto; display: block; }
.hm-net-svg line { stroke: var(--line2); stroke-width: 1.2; }
.hm-net-svg circle { stroke: var(--card); stroke-width: 2; }
.hm-legend { flex: none; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--muted); }
.hm-legend span { display: flex; align-items: center; gap: 8px; } .hm-legend i { width: 9px; height: 9px; border-radius: 50%; } .hm-legend em { font-style: normal; color: var(--faint); font-variant-numeric: tabular-nums; }
.hm-card .cr-ring { width: 16px; height: 16px; flex: none; }
@media (max-width: 1180px) { .hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hm-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hm-more { display: none; } .hm-hero { grid-template-columns: 1fr; } .hm-banner { min-height: 110px; } }
.hm-one { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hm-ghost { justify-content: flex-start; min-width: 0; }
.hm-card { min-height: 0; }
.hm-up .hm-day:nth-of-type(n+4) { display: none; }
svg.i-calendar, svg.i-calendar-days { --ti1: #7fb3bb; --ti2: #2f6f78; }
.sel-grip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px 0 6px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: grab; user-select: none; }
.sel-grip:hover { background: var(--hover); color: var(--text); }
.sel-grip:active { cursor: grabbing; }
.mg { display: flex; flex-direction: column; gap: 12px; }
.mg-quote { padding: 8px 12px; border-left: 3px solid var(--qc); background: var(--bg2); border-radius: 0 8px 8px 0; font-family: var(--serif); font-size: 14px; line-height: 1.45; }
.mg-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Markierungen: Text darunter bleibt auswählbar */
.hl { pointer-events: none !important; }
.hl.hover { opacity: .4; }
.hl.hl-ul.hover { background: color-mix(in srgb, var(--hc) 14%, transparent) !important; }
/* Projekt-/Seminar-Symbole: wie die Reiter (feines Linien-Symbol), aber auf zart getönter Kachel in der Projektfarbe */
.ptile svg.i { background: color-mix(in srgb, var(--t1) 20%, var(--card)) !important; color: var(--t2) !important; stroke-width: 1.8 !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t2) 16%, transparent) !important; }
@media (prefers-color-scheme: dark) { .ptile svg.i { background: color-mix(in srgb, var(--t1) 24%, var(--card)) !important; color: var(--t1) !important; } }
.sb-item.active .ptile svg.i { color: var(--t2) !important; }
@media (prefers-color-scheme: dark) { .sb-item.active .ptile svg.i { color: var(--t1) !important; } }
/* Unterstreichungen erscheinen in Karten und Notizen als normaler Text (keine Linie) */
.card-text.ul { text-decoration: none !important; }
.card-kid u, .xb-kid u { background-image: none !important; text-decoration: none !important; padding-bottom: 0; }
/* Box an der Maus: abgelegte Box gleitet sanft an die freie Stelle, Raum leuchtet beim Darüberschweben */
.ws-board .card.settle { transition: left .2s ease, top .2s ease, box-shadow .15s ease !important; }
.ws-board .card.left-canvas { opacity: .35; }
.card-ghost { box-shadow: 0 0 0 .5px var(--line2), 0 18px 40px rgba(0,0,0,.22) !important; opacity: .96; border-radius: 12px; }
.ws-frame.room-hot { transition: left .12s ease, top .12s ease, width .12s ease, height .12s ease; box-shadow: 0 0 0 2px var(--accent), inset 0 0 0 9999px color-mix(in srgb, var(--accent) 5%, transparent); }
/* Startseite: Abgabe-Countdown im Bild */
.hm-art { inset: 0 38% 0 0; }
.hm-countdown { position: relative; width: 38%; min-width: 220px; box-sizing: border-box; padding: var(--s4) var(--s5); border-left: 1px solid var(--line2); display: flex; flex-direction: column; gap: 2px; align-self: stretch; justify-content: center; }
.hm-cd-k { font-size: 12px; color: var(--muted); }
.hm-cd-main { display: flex; align-items: baseline; gap: 8px; border: 0; background: none; padding: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.hm-cd-n { font-family: var(--serif); font-size: 44px; font-weight: 500; line-height: 1.05; letter-spacing: -.02em; color: var(--accent-2); }
.hm-cd-u { font-family: var(--serif); font-size: 18px; color: var(--muted); }
.hm-cd-t { font-family: var(--serif); font-size: 16px; font-weight: 500; line-height: 1.3; }
.hm-cd-s { font-size: 12px; color: var(--muted); }
.hm-cd-bar { margin-top: 8px; }
.hm-cd-next { margin-top: 6px; font-size: 11.5px; color: var(--faint); }
.hm-cd-none { font-family: var(--serif); font-size: 18px; font-weight: 500; margin: 4px 0; }
.hm-countdown .hm-link { align-self: flex-start; padding-left: 0; }
.hm-banner { min-height: 150px; }
/* Aufgaben mit Stand */
.hm-task { cursor: default; }
.hm-task .hm-row-t { cursor: pointer; }
.hm-task.late .hm-row-t span { color: var(--danger); }
.hm-task.today .hm-row-t span { color: var(--accent-2); }
.hm-status { flex: none; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 6px; color: color-mix(in srgb, var(--sc) 70%, var(--text)); background: color-mix(in srgb, var(--sc) 16%, var(--card)); }
.hm-tasks .hm-add { margin-top: 6px; }
.hm-more-t { align-self: flex-start; margin-top: 4px; }
.hm-greet { align-self: center; padding-top: 0; }
/* Begrüßung und Abgabe in einer Zeile – die Abgabe als längliche Leiste */
.hm-page { padding-top: var(--s5); }
.hm-hero { grid-template-columns: auto minmax(360px, 1fr); align-items: center; gap: var(--s6); margin-bottom: var(--s4); }
.hm-countdown { width: auto; min-width: 0; flex-direction: row; align-items: center; gap: var(--s4); padding: 12px 18px 12px 20px; border: 0; border-radius: var(--r-lg); background: color-mix(in srgb, var(--accent-2) 7%, var(--card)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-2) 18%, var(--line)); }
.hm-cd-main { flex: none; flex-direction: column; align-items: center; gap: 0; min-width: 58px; }
.hm-cd-n { font-size: 34px; line-height: 1; }
.hm-cd-u { font-size: 12.5px; font-family: var(--font); color: var(--muted); }
.hm-cd-zero { color: var(--faint); min-width: 40px; text-align: center; }
.hm-cd-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; cursor: pointer; padding-left: var(--s4); border-left: 1px solid color-mix(in srgb, var(--accent-2) 20%, var(--line)); }
.hm-cd-k { font-size: 11.5px; }
.hm-cd-t { font-size: 15px; }
.hm-cd-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-cd-bar { margin-top: 6px; max-width: 320px; }
.hm-shelf { margin-bottom: var(--s5); }
@media (max-width: 1180px) { .hm-hero { grid-template-columns: 1fr; gap: var(--s3); } }
/* Abgabe-Leiste: so breit wie ihr Inhalt, rechtsbündig – Abstand zur Begrüßung */
.hm-hero { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s7); }
.hm-countdown { justify-self: end; width: max-content; max-width: 560px; padding-right: 24px; }
.hm-cd-body { min-width: 220px; }
.hm-cd-s { white-space: normal; }
.rd-cvbar { flex: none; display: flex; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.rd-cvsrc { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--muted); padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.rd-cvsrc:hover { background: var(--hover); color: var(--text); }
.rd-cvhost { flex: 1; min-height: 0; position: relative; display: flex; }
.rd-cvhost > * { flex: 1; min-width: 0; }
.ws-body:has(> .rd-cvbar) { display: flex; flex-direction: column; } .rd-cvhost .pw-only { height: 100%; }
/* Seitenleiste: Symbol/Punkt mittig zur ersten Textzeile */
.sb-item > .sb-ic { height: 22px; margin-top: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
.sb-item > .sb-label { line-height: 18px; padding: 2px 0; }
.sb-ic .tag-dot { display: block; width: 9px; height: 9px; border-radius: 50%; margin: 0; }
/* PDF: der Schieber rechts ist im Ruhezustand schmal und wird unter der Maus breit und gut greifbar (ohne dass das PDF springt) */
.rd-pdf::-webkit-scrollbar { width: 16px; }
.rd-pdf::-webkit-scrollbar-track { background: transparent; }
.rd-pdf::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 22%, transparent); border: 5px solid transparent; border-radius: 10px; background-clip: padding-box; min-height: 48px; }
.rd-pdf::-webkit-scrollbar-thumb:hover { border-width: 2px; background-color: color-mix(in srgb, var(--text) 38%, transparent); }
.rd-pdf::-webkit-scrollbar-thumb:active { border-width: 2px; background-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.rd-pdf:hover::-webkit-scrollbar-thumb { border-left-width: 4px; border-right-width: 4px; }

/* ---------- Netzwerk: Liste wie bei Connected Papers, Jahresfarben ---------- */
.graph-list { position: absolute; top: 16px; left: 16px; bottom: 64px; width: 290px; overflow: auto; background: color-mix(in srgb, var(--card, var(--bg)) 94%, transparent); backdrop-filter: blur(14px); border-radius: 14px; box-shadow: 0 0 0 .5px var(--line2), 0 8px 24px rgba(40, 24, 10, .08); padding: 8px; z-index: 4; display: flex; flex-direction: column; gap: 1px; }
.graph-list.hidden { display: none; }
.gl-head { font-family: var(--serif); font-size: 15px; font-weight: 500; padding: 6px 8px 8px; color: var(--text); }
.gl-row { display: flex; align-items: flex-start; gap: 10px; width: 100%; border: 0; background: none; text-align: left; font: inherit; color: var(--text); padding: 8px; border-radius: 10px; cursor: pointer; }
.gl-row:hover { background: var(--hover); } .gl-row.on { background: var(--active); }
.gl-row.lone { opacity: .62; }
.gl-row > i { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 4px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18); }
.gl-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gl-t b { font-weight: 500; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gl-t span { font-size: 11.5px; color: var(--muted); }
.gl-k { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 18px; text-align: right; margin-top: 2px; }
.graph-listbtn.on { background: var(--active); }
.gy-key { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; }
.gy-key b { width: 64px; height: 8px; border-radius: 4px; display: inline-block; }
.gy-key .gy-sep { padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--line2); color: var(--muted); }
.graph-wrap.has-list .graph-foot { left: 322px; }
.graph-foot .graph-info { white-space: nowrap; padding-left: 10px; }

/* ---------- Typografie: Fett sparsam und nur leicht – erkennbar, aber nicht klobig ---------- */
b, strong { font-weight: 500; }

/* Projekt-Chip: Abstand zwischen Symbol und Name */
.proj-chip, .lib-title .proj-chip, .nc .proj-chip, .pc-chips .proj-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 5px; }
.proj-chip .ptile { margin-left: 0; flex: none; }

/* ---------- Bibliothek: Filtern, Gruppieren, Sortieren ---------- */
.lib-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.lib-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lib-pick { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; box-shadow: 0 0 0 .5px var(--line2); font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; }
.lib-pick:hover { background: var(--hover); } .lib-pick.on { background: var(--active); }
.lib-pick .muted { color: var(--muted); }
.lib-caret { font-size: 9px; color: var(--muted); }
.lib-n { min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
.lib-fchip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 9px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 12px; }
.lib-fchip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 10px; padding: 2px 4px; border-radius: 6px; opacity: .7; } .lib-fchip button:hover { opacity: 1; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.lib-dir { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; box-shadow: 0 0 0 .5px var(--line2); color: var(--text); cursor: pointer; font-size: 13px; }
.lib-dir:hover { background: var(--hover); }
.lib-group { display: flex; align-items: baseline; gap: 8px; padding: 18px 10px 6px; font-family: var(--serif); font-size: 15px; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--line); }
.lib-group .muted { font-family: var(--font, inherit); font-size: 12px; font-weight: 400; }

/* Seitenleiste: Pfeil zum Aufklappen mittig zur Zeile */
.sb-disc { display: inline-flex !important; align-items: center; justify-content: center; width: 20px !important; height: 20px !important; font-size: 0 !important; align-self: center; margin: 0 !important; }
.sb-disc-ic { width: 12px; height: 12px; display: block; }

/* Arbeitsplatz (Projekt/Arbeit): gleicher Abstand unter dem Titel-Banner wie zwischen den Bereichen und der unteren Leiste */
.pw:not(.pw-only) > .pw-cols { padding-top: 10px; }

/* ---------- Arbeiten: Übersicht (Karten wie auf der Startseite) ---------- */
.pv .hm-card { min-height: 0; }
.pv-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s4); margin-bottom: var(--s4); }
.pv-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.pv-side { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.pv-wide { grid-column: 1 / -1; }
/* Als Nächstes */
.pv-next { display: flex; align-items: center; gap: var(--s5); cursor: pointer; padding: 2px 0 var(--s3); }
.pv-next-days { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding-right: var(--s5); border-right: 1px solid var(--line); color: var(--accent); }
.pv-next-days b { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1; }
.pv-next-days span { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pv-next-days.soon { color: var(--accent-2); }
.pv-next-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.pv-next-t { font-family: var(--serif); font-size: 20px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: break-word; }
.pv-next:hover .pv-next-t { color: var(--accent); }
.pv-next-meta { font-size: 12.5px; color: var(--muted); }
.pv-next-prog { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.pv-next-prog .pv-bar { flex: none; width: 220px; }
.pv-next-act { display: flex; gap: 8px; margin-top: auto; padding-top: var(--s3); border-top: 1px solid var(--line); }
/* Überblick */
.pv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); }
.pv-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.pv-stat b { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums; }
.pv-stat span { font-size: 12px; color: var(--muted); }
/* Liste */
.pv-tools { display: flex; align-items: center; gap: 6px; }
.pv-search { height: 28px; width: 150px; border: 0; border-radius: 8px; box-shadow: 0 0 0 .5px var(--line2); background: transparent; font: inherit; font-size: 12.5px; padding: 0 10px; color: var(--text); outline: none; }
.pv-search:focus { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.pv-sec + .pv-sec { margin-top: var(--s4); }
.pv-h { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.pv-h span:first-child { font-weight: 500; color: var(--text); font-size: 12.5px; }
.pv-c { font-variant-numeric: tabular-nums; }
.pv-list { display: flex; flex-direction: column; }
.pv-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 150px 112px; gap: 12px; align-items: center; padding: 10px 6px; margin: 0 -6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 8px; transition: background .12s; }
.pv-row:last-child { border-bottom: 0; }
.pv-row:hover { background: var(--hover); }
.pv-ic { font-size: 0; line-height: 0; }
.pv-ic svg.i { width: 26px; height: 26px; padding: 5.5px; box-sizing: border-box; border-radius: 8px; color: #fff !important; background: linear-gradient(180deg, var(--ti1, #9b7fd0), var(--ti2, #7a5fb5)); }
.pv-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-t { font-size: 13.5px; font-weight: 500; line-height: 1.35; overflow-wrap: break-word; }
.pv-sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.pv-prog { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pv-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--active); overflow: hidden; display: block; }
.pv-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.pv-num { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.pv-due { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12px; color: var(--muted); padding: 3px 6px; border-radius: 8px; }
.pv-due:hover { background: var(--active); }
.pv-due b { font-weight: 500; color: var(--text); font-size: 12.5px; }
.pv-due.soon b { color: var(--accent-2); } .pv-due.past b { color: var(--muted); font-weight: 400; }
.pv-add { color: var(--faint, var(--muted)); }
/* Neu beginnen */
.pv-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pv-type { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--hover); font: inherit; font-size: 12.5px; color: var(--text); text-align: left; cursor: pointer; line-height: 1.3; }
.pv-type:hover { background: var(--active); }
.pv-type-ic { flex: none; font-size: 14px; line-height: 1; }
.pv-type-ic svg.i { width: 15px; height: 15px; }
/* leere Übersicht */
.pv-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.pv-steps > div { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); }
.pv-steps b { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--accent); line-height: 1; }
.pv-grid .pv-c-new { grid-column: 1 / -1; } .pv-grid .pv-c-new .pv-types { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pv-grid, .pv-cols { grid-template-columns: 1fr; } .pv-row { grid-template-columns: 26px minmax(0, 1fr) 112px; } .pv-row .pv-prog { display: none; } .pv-steps { grid-template-columns: 1fr; } }

/* ---------- Notizen: Übersicht ---------- */
.nvo .nvo-top { margin-bottom: var(--s4); }
.nvo-quick { width: 100%; box-sizing: border-box; resize: none; border: 0; border-radius: 10px; background: var(--hover); padding: 10px 12px; font: inherit; font-size: 13.5px; line-height: 1.5; color: var(--text); outline: none; flex: 1; min-height: 96px; }
.nvo-quick:focus { background: color-mix(in srgb, var(--hover) 60%, var(--card)); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 40%, transparent); }
.nvo-quick::placeholder { color: var(--faint, var(--muted)); }
.nvo-quick-act { display: flex; align-items: center; gap: 6px; margin-top: var(--s3); }
.nvo-ic { flex: none; font-size: 0; line-height: 0; }
.nvo-ic svg.i { width: 26px; height: 26px; padding: 5.5px; box-sizing: border-box; border-radius: 8px; color: #fff !important; background: linear-gradient(180deg, var(--ti1, #7c9cc9), var(--ti2, #5a7db0)); }
.nvo-pt { flex: none; display: inline-flex; }
.nvo-list { display: flex; flex-direction: column; }
.nvo-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 84px; gap: 12px; align-items: center; padding: 10px 6px; margin: 0 -6px; border-bottom: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: background .12s; }
.nvo-row:last-child { border-bottom: 0; }
.nvo-row:hover { background: var(--hover); }
.nvo-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nvo-t { font-size: 13.5px; font-weight: 500; line-height: 1.35; overflow-wrap: break-word; }
.nvo-snip { font-size: 12px; color: var(--muted); line-height: 1.4; }
.nvo-meta { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 260px; justify-content: flex-end; }
.nvo-folder { font-size: 11.5px; color: var(--muted); padding: 2px 7px; border-radius: 6px; background: var(--hover); white-space: nowrap; }
.nvo-date { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.nvo-grid { margin-top: 2px; }
.nvo-seg .seg-b { min-width: 30px; }
.nvo-flist { display: flex; flex-direction: column; gap: 1px; }
.nvo-frow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; margin: 0 -8px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
.nvo-frow:hover { background: var(--hover); } .nvo-frow.on { background: var(--active); font-weight: 500; }
.nvo-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-c-list .hm-ch, .nvo-c-all .hm-ch { gap: var(--s3); flex-wrap: wrap; }
@media (max-width: 1100px) { .nvo-row { grid-template-columns: 26px minmax(0, 1fr) 70px; } .nvo-meta { display: none; } }
.pv > * { flex-shrink: 0; }
.nvo-c-all .pv-search { width: 130px; }
/* einheitliches 3-Spalten-Raster wie auf der Startseite: breite Karten über zwei Spalten */
.pv-grid, .pv-cols { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.pv-c-next, .pv-c-list, .nvo-c-all { grid-column: span 2; }
@media (max-width: 1100px) { .pv-grid, .pv-cols { grid-template-columns: 1fr !important; } .pv-c-next, .pv-c-list, .nvo-c-all { grid-column: auto; } }

/* Feinschliff */
.crs-topic { font-family: var(--serif) !important; font-weight: 500 !important; font-size: 24px !important; letter-spacing: -.01em; }
.page-wrap, .home { scrollbar-gutter: stable; }

/* PDF-Textebene: keine App-Typografie erben – sonst sind die unsichtbaren Zeichen schmaler als der gedruckte Text
   und beim Markieren fehlen Buchstaben am Wortende */
.textLayer, .textLayer :is(span, br) { letter-spacing: 0 !important; word-spacing: 0 !important; font-kerning: normal; font-feature-settings: normal; font-variant-ligatures: normal; text-rendering: auto; -webkit-font-smoothing: auto; text-transform: none; font-weight: normal; font-style: normal; }

/* ---------- Arbeitsfläche: Zitat-Sammlungen in einer Box, schnelles Bearbeiten ---------- */
.card-del { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 0; line-height: 0; padding: 3px 4px; border-radius: 6px; opacity: 0; transition: opacity .15s; }
.card-del svg.i { width: 13px; height: 13px; }
.card:hover .card-del { opacity: 1; } .card-del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.card-kids { display: flex; flex-direction: column; gap: 0; margin: 4px 10px 8px; padding: 0; border: 0 !important; border-radius: 10px; background: color-mix(in srgb, var(--c) 7%, transparent); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--c) 35%, var(--line)); overflow: hidden; }
.card-kid { position: relative; padding: 8px 10px 6px 14px; cursor: default; font-family: inherit; font-size: inherit; }
.card-kid::before { content: ''; position: absolute; left: 6px; top: 9px; bottom: 9px; width: 2px; border-radius: 1px; background: var(--kc); opacity: .85; }
.card-kid + .card-kid { border-top: 1px dashed color-mix(in srgb, var(--c) 40%, var(--line)); }
.card-kid-t { font-family: 'Times New Roman', Georgia, serif; font-size: 13px; line-height: 1.45; color: var(--text); cursor: pointer; overflow-wrap: break-word; }
.card-kid-t:hover { color: var(--accent); }
.card-kid-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; min-height: 20px; }
.card-kid-pg { font-family: var(--font); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-kid-tag { font-size: 10.5px; color: var(--muted); padding: 0 6px; border-radius: 6px; background: var(--hover); }
.card-kid-acts { display: inline-flex; gap: 1px; opacity: 0; transition: opacity .12s; }
.card-kid:hover .card-kid-acts, .card-kid:focus-within .card-kid-acts { opacity: 1; }
.card-kid-b { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; line-height: 1; min-width: 22px; height: 20px; padding: 0 4px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.card-kid-b svg.i { width: 12px; height: 12px; }
.card-kid-b:hover { background: var(--hover); color: var(--text); } .card-kid-b.danger:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
@media (hover: none) { .card-kid-acts, .card-del { opacity: 1; } }
/* weit herausgezoomt: Details nur ausblenden, nicht entfernen – die Boxen behalten ihre Größe (sonst überlappen sie beim Heranzoomen) */
.ws-canvas.far .card-comment, .ws-canvas.far .card-tags { display: block !important; visibility: hidden; }
.ws-canvas.far .card-tags { display: flex !important; }
.hl-grip { position: absolute; z-index: 6; width: 18px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 2px 6px rgba(0,0,0,.12); color: var(--muted); font-size: 12px; cursor: grab; user-select: none; -webkit-user-select: none; }
.hl-grip:hover { color: var(--text); }
.hl-grip:active { cursor: grabbing; }
.ws-frame.room-snap { transition: left .28s ease, top .28s ease, width .28s ease, height .28s ease; }
.ws-frame.room-leaving { outline: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; animation: roomLeave .9s ease-in-out infinite alternate; }
@keyframes roomLeave { from { outline-color: color-mix(in srgb, var(--accent) 25%, transparent); } to { outline-color: color-mix(in srgb, var(--accent) 70%, transparent); } }
.set-about { display: flex; gap: 18px; align-items: flex-start; padding: 6px 2px; }
.set-about-ic { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.set-about-t { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.set-about-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 12px 0 0; font-size: 13px; }
.set-about-dl dt { color: var(--muted); } .set-about-dl dd { margin: 0; }

/* Fett nur ganz leicht: Überschriften und Hervorhebungen der Oberfläche (eigener Text in Notizen bleibt deutlich fett) */
:where(h1, h2, h3, h4, h5, h6, th, dt) { font-weight: 500; }
:where(b, strong) { font-weight: 500; }
.ProseMirror :where(h1, h2, h3, h4) { font-weight: 600; }
.ProseMirror strong, .ProseMirror b { font-weight: 620; }

/* ---------- formatierbare Kommentare & Gedanken ---------- */
.rt-bar { position: fixed; z-index: 4000; background: var(--card, var(--bg)); border-radius: 10px; box-shadow: 0 0 0 .5px var(--line2), 0 8px 24px rgba(30, 20, 10, .16); padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.rt-row { display: flex; align-items: center; gap: 2px; }
.rt-b { border: 0; background: none; min-width: 28px; height: 28px; border-radius: 8px; cursor: pointer; color: var(--text); font: inherit; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.rt-b:hover { background: var(--hover); }
.rt-b b { font-weight: 700; } .rt-b i { font-family: var(--serif); font-size: 15px; }
.rt-hl { background: color-mix(in srgb, #f5d93f 65%, transparent); padding: 0 3px; border-radius: 4px; font-size: 12.5px; }
.rt-a { text-decoration: underline; text-decoration-color: #c0392b; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.rt-clear { color: var(--muted); font-size: 12px; }
.rt-sep { width: 1px; height: 18px; background: var(--line2); margin: 0 3px; }
.rt-sub { display: flex; gap: 4px; padding: 2px 4px 2px; }
.rt-sub[hidden] { display: none; }
.rt-sw { width: 22px; height: 22px; border-radius: 6px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.15); font: inherit; font-weight: 500; font-size: 13px; background: var(--card, var(--bg)); }
.rt-none { color: var(--muted); }
.cm-in.rt-edit { min-height: 20px; max-height: 160px; overflow: auto; outline: none; white-space: pre-wrap; overflow-wrap: break-word; cursor: text; }
.cm-in.rt-edit:empty::before { content: attr(data-ph); color: var(--faint, var(--muted)); pointer-events: none; }
.cm-text, .card-comment { white-space: pre-wrap; }
.cm-text b, .card-comment b { font-weight: 640; }
:is(.cm-text, .card-comment) span[style*="background"] { border-radius: 4px; padding: 0 1px; }
@media (prefers-color-scheme: dark) { :is(.cm-text, .card-comment) span[style*="background"]:not([style*="color:"]):not([style*=" color"]) { color: #1d1d1f; } }
/* Projekte-Übersicht */
.pj-row { grid-template-columns: 34px minmax(0, 1fr) 150px 130px; }
.pj-tile { display: inline-flex; flex: none; }
.pj-date { display: flex; flex-direction: column; align-items: center; min-width: 40px; font-size: 11px; color: var(--muted); }
.pj-date b { font-weight: 500; font-size: 13px; color: var(--accent); }
@media (max-width: 1100px) { .pj-row { grid-template-columns: 34px minmax(0, 1fr) 120px; } }

/* ---------- Verbindungen: Beschriftung, Kette hervorheben, Räume & Einzelzitate verbinden ---------- */
.ws-labels { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 3; }
.link-label { position: absolute; transform: translate(-50%, -50%); width: max-content; max-width: 200px; padding: 4px 9px; border-radius: 8px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line2), 0 2px 6px rgba(40, 25, 10, .08); font-size: 12px; line-height: 1.4; color: var(--text); white-space: pre-wrap; overflow-wrap: break-word; text-align: center; cursor: pointer; }
.link-label:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, var(--line2)), 0 2px 8px rgba(40, 25, 10, .12); }
.ws-canvas.link-focus .ws-board > .card:not(.lf-on), .ws-canvas.link-focus .ws-frame:not(.lf-on), .ws-canvas.link-focus .link-label:not(.lf-on) { opacity: .28; transition: opacity .15s; }
.ws-canvas.link-focus .ws-svg .link:not(.lf-on) { opacity: .15; }
.ws-svg .link.lf-on { stroke: var(--accent); stroke-width: 2.6; }
.ws-board > .card.lf-on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent), var(--card-shadow, 0 2px 8px rgba(0,0,0,.08)); }
.card-kid.lf-on { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.link-label.lf-on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.card-kid .kid-port { right: 4px; top: 50%; transform: translateY(-50%); width: 10px; height: 10px; opacity: 0 !important; }
.card-kid:hover .kid-port { opacity: 1 !important; }
.ws-frame-port { position: absolute; right: 10px; top: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); cursor: crosshair; opacity: 0; z-index: 2; }
.ws-frame:hover .ws-frame-port { opacity: 1; } .ws-frame-port:hover { border-color: var(--accent); background: var(--accent); }
.ws-frame.cv-from { outline: 2px solid var(--accent); }
/* Stift-/Textmarker-Striche liegen optisch hinter dem Text */
.page > canvas.ink-canvas { mix-blend-mode: multiply; }
/* Tag-Auswahl */
.tag-menu { position: fixed; z-index: 4000; min-width: 220px; max-width: 280px; background: var(--card, var(--bg)); border-radius: 10px; box-shadow: 0 0 0 .5px var(--line2), 0 10px 28px rgba(30, 20, 10, .16); padding: 4px; }
.tm-head { font-size: 11px; color: var(--muted); padding: 4px 8px 2px; }
.tm-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.tm-row.on { background: var(--hover); }
.tm-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-n { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tm-dot { width: 14px; height: 14px; border-radius: 50%; border: 0; padding: 0; flex: none; cursor: pointer; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line2); }
.tm-dot:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tm-plus { width: 14px; text-align: center; color: var(--accent); flex: none; }
.tm-row.new .tm-name { color: var(--accent); }
/* Weitere Literatur (aus Markierungen) */
.lit-panel:empty { display: none; }
.lit-panel { margin: 0 0 14px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2); overflow: hidden; }
.lit-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.lit-head:hover { background: var(--hover); }
.lit-caret { display: inline-block; transition: transform .15s; color: var(--muted); } .lit-caret.open { transform: rotate(90deg); }
.lit-title { font-family: var(--serif); font-size: 15px; font-weight: 500; }
.lit-n { font-size: 11.5px; color: #fff; background: var(--olive, #6f9a6b); border-radius: 10px; padding: 1px 7px; }
.lit-head .muted { margin-left: auto; }
.lit-list { display: flex; flex-direction: column; padding: 0 8px 8px; }
.lit-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 6px; border-top: 1px solid var(--line); }
.lit-row.done { opacity: .55; } .lit-row.added .lit-dot { box-shadow: 0 0 0 2px var(--olive, #6f9a6b); }
.lit-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 6px; }
.lit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lit-text { font-family: 'Times New Roman', Georgia, serif; font-size: 13.5px; line-height: 1.45; cursor: pointer; }
.lit-text:hover { color: var(--accent); }
.lit-acts { display: flex; gap: 4px; align-items: center; flex: none; }
.lit-more { align-self: flex-start; margin: 6px 4px 0; }
.lit-pop { display: flex; flex-direction: column; gap: 6px; }
.lit-res { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.lit-res-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; }
.lit-pop-foot { display: flex; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
/* Verbindungs-Punkte bleiben beim Herauszoomen gut greifbar */
.ws-board .card-port, .ws-frame-port { scale: max(1, calc(1 / var(--z, 1))); }

/* ---------- PDF / obere Bereiche einklappen ---------- */
.pw-slot.pw-collapsed > :not(.pw-strip) { display: none !important; }
.pw-slot.pw-collapsed { min-width: 34px; overflow: hidden; }
.pw-strip { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; height: 100%; padding: 12px 0; border: 0; border-radius: 14px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2); cursor: pointer; color: var(--muted); font: inherit; }
.pw-strip:hover { color: var(--text); background: var(--hover); }
.pw-strip-t { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12.5px; letter-spacing: .02em; }
.pw-strip-ic { font-size: 0; line-height: 0; } .pw-strip-ic svg.i { width: 15px; height: 15px; }
.pw-vdiv { position: relative; }
.pw-vdiv.hidden { display: none; }
.pw-fold { position: absolute; top: 50%; width: 18px; height: 34px; margin-top: -17px; border: 0; border-radius: 6px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 2px 6px rgba(0,0,0,.08); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 6; font-size: 13px; padding: 0; }
.pw-fold-l { right: 100%; margin-right: -3px; } .pw-fold-r { left: 100%; margin-left: -3px; }
.pw-vdiv:hover .pw-fold, .pw-fold:focus-visible { opacity: 1; }
.pw-fold:hover { color: var(--text); }
.pw-main.top-closed > .pw-top { display: none; }
.pw-main.top-closed .pw-cvbar { margin-top: 0; }
.pw-only-btn { margin-right: 6px; }
.pw-only-btn.on { background: var(--active); }
/* Leseansicht: PDF einklappen */
.rd-pdfstrip { display: none; }
.rd-body.pdf-folded:not(.no-ws) > .rd-pdf, .rd-body.pdf-folded:not(.no-ws) > .rd-split { display: none; }
.rd-body.pdf-folded:not(.no-ws) > .rd-work { flex: 1 1 auto; width: auto !important; max-width: none; }
.rd-body.pdf-folded:not(.no-ws) > .rd-pdfstrip { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 34px; flex: none; padding: 12px 0; border: 0; border-right: 1px solid var(--line); background: var(--bg2, var(--bg)); color: var(--muted); cursor: pointer; font: inherit; }
.rd-pdfstrip:hover { color: var(--text); background: var(--hover); }
.rd-pdfstrip-t { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12.5px; }
/* Weiterarbeiten – zuverlässig, bleibt bis man weitergeht */
.resume-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--hover); flex: none; }
.resume { transition: transform .18s ease, opacity .18s ease; max-width: min(520px, calc(100vw - 32px)); }
/* ToDo-Projektchips: Ring nicht mehr abgeschnitten */
.kb-boards { padding: 4px 3px; margin-left: -3px; margin-right: -3px; overflow-y: visible; }
.kb-bchip { height: calc(var(--h-sm) + 2px); }
/* ---------- Kalender: volle Titel, ruhig und luftig */
.cal-body, .wk-scroll, .ag-scroll { overscroll-behavior: contain; }
.calv .cal-ev, .calv .wk-ev b, .calv .wk-ev span { white-space: normal; text-overflow: clip; }
.cal-day { min-height: 104px; }
.cal-ev { display: flex; flex-direction: column; gap: 0; padding: 3px 7px 4px; line-height: 1.3; }
.cal-ev-t { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.cal-ev-n { overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-task { align-items: flex-start; }
.cal-task .kb-check { margin-top: 1px; flex: none; }
.cal-tt { min-width: 0; overflow-wrap: break-word; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-more { border: 0; background: none; padding: 1px 4px; font-size: 11px; color: var(--muted); text-align: left; cursor: pointer; border-radius: 4px; }
.cal-more:hover { background: var(--hover); color: var(--text); }
.wk-ev b { overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.wk-ev.short b { -webkit-line-clamp: 1; }
.wk-ev span { display: block; white-space: nowrap !important; text-overflow: ellipsis !important; }
.wk-ad .cal-ev { padding: 2px 6px; }
/* Ereignisse: senkrechter Zeitstrahl */
.ag-body { grid-template-columns: 1fr 240px; overflow: hidden; }
.ag-scroll { overflow-y: auto; min-height: 0; padding: 4px 8px 40px 0; scrollbar-width: thin; }
.ag-line { position: relative; max-width: 760px; padding-left: 0; }
.ag-line::before { content: ''; position: absolute; left: 77px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line); border-radius: 1px; }
.ag-month { position: relative; margin: 22px 0 10px 98px; font-family: var(--serif); font-size: 17px; color: var(--muted); text-transform: capitalize; }
.ag-month:first-of-type { margin-top: 6px; }
.ag-day { position: relative; display: grid; grid-template-columns: 64px 26px 1fr; align-items: start; gap: 0; padding: 6px 0 12px; }
.ag-date { display: flex; flex-direction: column; align-items: flex-end; padding-right: 2px; line-height: 1.1; }
.ag-dn { font-family: var(--serif); font-size: 22px; font-variant-numeric: tabular-nums; }
.ag-wd { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.ag-dot { justify-self: center; margin: 9px 0 0 1px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1.5px var(--line2); position: relative; z-index: 1; }
.ag-day.today .ag-dot { background: var(--accent-2, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2, var(--accent)) 25%, transparent); }
.ag-day.today .ag-wd { color: var(--accent-2, var(--accent)); font-weight: 500; }
.ag-day.past { opacity: .6; }
.ag-items { display: flex; flex-direction: column; gap: 6px; padding-left: 8px; min-width: 0; }
.ag-it { display: flex; align-items: flex-start; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line2); border-left: 3px solid var(--ec, var(--line2)); cursor: pointer; transition: box-shadow .12s; }
.ag-it:hover { box-shadow: 0 0 0 1px var(--line2), 0 3px 10px rgba(0,0,0,.06); }
.ag-time { flex: none; min-width: 86px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.ag-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-title { font-size: 13.5px; line-height: 1.35; overflow-wrap: break-word; }
.ag-sub { font-size: 11.5px; color: var(--muted); }
.ag-todo { border-left-color: var(--line2); }
.ag-todo.done .ag-title { text-decoration: line-through; color: var(--muted); }
.ag-load { display: block; margin: 6px 0 6px 98px; border: 0; background: none; color: var(--muted); font-size: 12px; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.ag-load:hover { background: var(--hover); color: var(--text); }
.ag-empty { margin: 30px 0 30px 98px; }
.calv .cal-head { flex-wrap: wrap; row-gap: 8px; }
.cal-ev-n, .cal-tt { -webkit-line-clamp: unset; display: block; }
.ag-none { font-size: 12.5px; color: var(--faint); padding: 7px 2px; }
.cal-ev-n, .cal-tt, .ag-title, .wk-ev b { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
/* Suchfeld in den Auszügen: etwas größer, eigene Zeile */
.ws-tools .input.sm.search, .pw-x .input.sm.search { flex: 1 1 100%; width: 100%; min-width: 0; height: 32px; font-size: 13px; padding-left: 32px; background-position: 11px 50%; border-radius: 10px; }
.ws-tools { row-gap: 8px; padding: 8px 10px; }
/* Weitere Literatur: Literaturangabe als verbundene Box, eindeutige Aktionen */
.lit-row { gap: 12px; padding: 12px 8px; }
.lit-acts { flex-direction: column; align-items: flex-end; gap: 6px; }
.lit-find, .lit-state { display: flex; gap: 4px; }
.lit-chip { border: 0; background: var(--hover); color: var(--muted); font: inherit; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.lit-chip:hover:not(:disabled) { background: var(--active, var(--hover)); color: var(--text); }
.lit-chip.on { background: color-mix(in srgb, var(--olive, #6f9a6b) 18%, transparent); color: var(--text); cursor: default; }
.lit-ref { position: relative; margin: 6px 0 0 0; padding: 7px 10px 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--olive, #6f9a6b) 8%, var(--bg)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--olive, #6f9a6b) 25%, transparent); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.lit-ref::before { content: ''; position: absolute; left: -12px; top: -8px; width: 10px; height: 22px; border-left: 1.5px solid color-mix(in srgb, var(--olive, #6f9a6b) 45%, transparent); border-bottom: 1.5px solid color-mix(in srgb, var(--olive, #6f9a6b) 45%, transparent); border-bottom-left-radius: 6px; }
.lit-ref:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--olive, #6f9a6b) 55%, transparent); }
.lit-ref-k { font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.lit-ref-t { font-family: 'Times New Roman', Georgia, serif; font-size: 13px; line-height: 1.45; padding-left: 1.2em; text-indent: -1.2em; }
.lit-ref-add { align-self: flex-start; margin-top: 4px; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 11.5px; color: var(--muted); cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.lit-ref-add:hover { color: var(--text); }
/* Erinnerung Literaturverzeichnis im PDF */
.rd-litbar { position: sticky; top: 8px; z-index: 11; margin: 10px auto 0; width: min(620px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--olive, #6f9a6b) 9%, var(--bg)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--olive, #6f9a6b) 30%, transparent), 0 6px 18px rgba(0,0,0,.08); }
.rd-litbar.hidden { display: none; }
.rd-litbar-ic { font-size: 18px; flex: none; }
.rd-litbar-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.35; }
.rd-litbar-tx b { font-weight: 500; font-size: 13px; }
.rd-litbar-tx span { color: var(--muted); }
.rd-litbar .btn { flex: none; }
.rd-litbar-x { flex: none; border: 0; background: none; width: 26px; height: 26px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.rd-litbar-x:hover { background: var(--hover); color: var(--text); }
/* Farbleiste beim Klick auf eine Markierung */
.hl-bar { position: fixed; z-index: 3000; display: flex; align-items: center; gap: 4px; padding: 5px 6px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line2), 0 8px 24px rgba(0,0,0,.14); animation: hlbar-in .12s ease-out; }
@keyframes hlbar-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.hl-bar-dots { display: flex; gap: 3px; }
.hl-dot { width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .1s; }
.hl-dot:hover { transform: scale(1.12); }
.hl-dot.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--text); }
.hl-bar-sep { width: 1px; height: 18px; background: var(--line2); margin: 0 3px; }
.hl-bar-b { border: 0; background: none; min-width: 26px; height: 26px; border-radius: 8px; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; }
.hl-bar-b:hover { background: var(--hover); color: var(--text); }
.hl-bar-b.on { background: var(--active, var(--hover)); color: var(--text); }
/* ✕ zum Schließen an allen Aufklapp-Fenstern */
.popover.has-pop-x, .ctx.has-pop-x, .tc-pop.has-pop-x, .lay-pop.has-pop-x, .stats-pop.has-pop-x { overflow: visible; }
.pop-x { position: absolute; top: -9px; right: -9px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--card, var(--bg)); color: var(--muted); font-size: 11px; line-height: 22px; text-align: center; cursor: pointer; box-shadow: 0 0 0 1px var(--line2), 0 2px 6px rgba(0,0,0,.12); z-index: 2; padding: 0; opacity: .85; transition: opacity .12s, color .12s; }
.pop-x:hover { opacity: 1; color: var(--text); background: var(--hover); }
.modal-x { position: sticky; top: 0; float: right; margin: -8px -8px 0 8px; width: 28px; height: 28px; border-radius: 8px; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; z-index: 3; }
.modal-x:hover { background: var(--hover); color: var(--text); }
.has-pop-x-in > .pop-x { position: sticky; top: 0; float: right; align-self: flex-end; margin: -2px -2px -20px 0; box-shadow: 0 0 0 1px var(--line2); }
/* schmales Fenster: Seitenleiste lässt sich immer einblenden (auch wenn sie im breiten Fenster ausgeblendet war) */
@media (max-width: 999px) {
  body.no-sidebar #sidebar { display: flex; }
  body.no-sidebar.sb-peek #sidebar { position: fixed; left: 0; top: 0; bottom: 0; border: 0; border-radius: 0; animation: none; }
  body.no-sidebar .sb-edge { display: none; }
}
/* Leisten in Fenstern: nichts überlappt mehr – bei wenig Platz rücken seltene Knöpfe ins „⋯“ bzw. schrumpfen */
.pw-bar, .rd-compact { container-type: inline-size; }
.pw-bar { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; flex-wrap: nowrap; }
.pw-bar::-webkit-scrollbar, .rd-compact::-webkit-scrollbar { display: none; }
.pw-bar > *, .pw-nvtop > *, .rd-compact > * { flex-shrink: 0; }
.pw-bar > .pw-pick, .pw-bar > .pw-tabs { flex-shrink: 1; min-width: 70px; }
.pw-nvtop { min-width: 0; flex-shrink: 1 !important; }
.rd-compact { overflow-x: auto !important; scrollbar-width: none; }
.rd-compact .rd-pageinfo { white-space: nowrap; }
/* (ersetzt durch anpassbare Leisten – Ausweichen ins ⋯-Menü) */
/* (ersetzt durch anpassbare Leisten – Ausweichen ins ⋯-Menü) */
/* (ersetzt durch anpassbare Leisten – Ausweichen ins ⋯-Menü) */
/* (ersetzt durch anpassbare Leisten – Ausweichen ins ⋯-Menü) */
/* Auszüge-Spalte: Suchfeld und Karten werden nicht mehr zusammengedrückt */
.pw-x > * { flex-shrink: 0; }

.card-head .card-pg, .card-head .card-mean { white-space: nowrap; }
.card-head { flex-wrap: nowrap; } .card-head .card-mean { min-width: 0; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
.date-field { white-space: nowrap; flex-shrink: 0; }
.pw-x .input.sm.search { flex: none; }
.pw-bar > .pw-pick { min-width: 44px; }
.pw-nvtop { flex-shrink: 0 !important; min-width: auto; }
/* (ersetzt durch anpassbare Leisten – Ausweichen ins ⋯-Menü) */
/* Notizen einer Sitzung: Reiter + Übersicht */
.pw-nstrip { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 45%, var(--bg)); min-width: 0; }
.pw-nstrip[hidden] { display: none; }
.pw-nstrip-l { flex: none; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pw-ntabs { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 1px; }
.pw-ntabs::-webkit-scrollbar { display: none; }
.pw-ntab { flex: none; max-width: 170px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 5px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.pw-ntab:hover { background: var(--hover); color: var(--text); }
.pw-ntab.on { background: var(--card, var(--bg)); color: var(--text); box-shadow: 0 0 0 1px var(--line2); }
.pw-ntab-n { flex: none; min-width: 17px; height: 17px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 10.5px; background: var(--hover); color: var(--muted); font-variant-numeric: tabular-nums; }
.pw-ntab.on .pw-ntab-n { background: var(--accent-soft, var(--hover)); color: var(--text); }
.pw-ntab.dragging, .pw-ncard.dragging { opacity: .4; }
.pw-ntab.drop-before { box-shadow: inset 2px 0 0 var(--accent); } .pw-ntab.drop-after { box-shadow: inset -2px 0 0 var(--accent); }
.pw-nover { height: 100%; overflow-y: auto; padding: 14px 16px 30px; box-sizing: border-box; }
.pw-nover-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pw-nover-h b { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.pw-ngroup { margin-bottom: 18px; }
.pw-ngroup-h { font-size: 12px; color: var(--muted); margin: 0 0 8px 2px; }
.pw-ngrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; min-height: 40px; }
.pw-ncard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line2); cursor: pointer; min-height: 104px; text-align: left; transition: box-shadow .12s, transform .12s; }
.pw-ncard:hover { box-shadow: 0 0 0 1px var(--line2), 0 4px 12px rgba(0,0,0,.07); }
.pw-ncard.on { box-shadow: 0 0 0 1.5px var(--accent); }
.pw-ncard-h { display: flex; gap: 7px; align-items: flex-start; }
.pw-ncard-h b { font-weight: 500; font-size: 13px; line-height: 1.3; }
.pw-ncard-t { font-size: 11.5px; line-height: 1.45; color: var(--muted); flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.pw-ncard-f { font-size: 10.5px; color: var(--faint); }
.pw-ncard-new { border: 0; font: inherit; font-size: 12.5px; color: var(--muted); background: none; box-shadow: inset 0 0 0 1px var(--line2); border-style: dashed; justify-content: center; align-items: center; }
.pw-ncard.drop-before::before, .pw-ncard.drop-after::after { content: ''; position: absolute; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: var(--accent); }
.pw-ncard.drop-before::before { left: -7px; } .pw-ncard.drop-after::after { right: -7px; }
.pw-ntab .clamp1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; -webkit-line-clamp: unset; }
/* ---------- Zitat ziehen: Vorschau, die sich je nach Ziel verwandelt */
body.qd-dragging, body.qd-dragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.qd-ghost { position: fixed; left: 0; top: 0; z-index: 4000; pointer-events: none; will-change: transform; contain: layout style; }
.qd-in { position: relative; transform-origin: 0 0; transition: transform .16s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.qd-ghost .qd-mark, .qd-ghost .qd-card, .qd-ghost .qd-quote { display: none; }
.qd-ghost.mode-mark .qd-mark, .qd-ghost.mode-card .qd-card, .qd-ghost.mode-quote .qd-quote { display: block; animation: qd-morph .14s cubic-bezier(.2,.8,.2,1); }
@keyframes qd-morph { from { opacity: .4; transform: scale(.94); } to { opacity: 1; transform: none; } }
.qd-mark { width: var(--qw, 300px); max-width: 420px; padding: 4px 6px; border-radius: 4px; font-family: 'Times New Roman', Georgia, serif; font-size: 14px; line-height: 1.45; color: #1a1a1a; background: color-mix(in srgb, var(--qc) 55%, #fff); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 26px rgba(0,0,0,.18); transform: rotate(-.6deg) scale(.98); opacity: .97; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.qd-ghost.qd-up .qd-mark { transform: rotate(-1deg) scale(1.02); transition: transform .14s ease-out; }
.qd-card { width: 260px; padding: 10px 12px 11px; border-radius: 10px; background: var(--card, #fffdf8); color: var(--text); box-shadow: 0 0 0 1px var(--line2), 0 14px 34px rgba(0,0,0,.2); border-top: 4px solid var(--qc); }
.qd-card-h { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.qd-card-ic { font-family: var(--serif); font-size: 13px; color: color-mix(in srgb, var(--qc) 60%, var(--text)); }
.qd-card-t { font-family: 'Times New Roman', Georgia, serif; font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.qd-card-k { margin-top: 6px; font-size: 11px; color: var(--muted); padding-left: 8px; border-left: 2px solid color-mix(in srgb, var(--qc) 60%, transparent); }
.qd-quote { max-width: 380px; padding: 6px 10px; border-radius: 8px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line2), 0 8px 22px rgba(0,0,0,.16); font-size: 13.5px; line-height: 1.45; color: var(--text); }
.qd-quote .qd-cite { color: var(--accent); white-space: nowrap; }
.qd-badge { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 11px; line-height: 20px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.qd-badge-k { background: var(--text); color: var(--bg); }
.qd-ghost.qd-nodrop .qd-in { opacity: .82; }
.qd-ghost.qd-land { transition: opacity .15s ease-out; opacity: 0; }
.qd-ghost.qd-land .qd-in { transform: scale(.92) !important; transition: transform .15s ease-out; }
.qd-ghost.qd-gone { transition: opacity .17s ease-out; opacity: 0; }
.qd-caret { position: fixed; left: 0; top: 0; z-index: 3990; pointer-events: none; opacity: 0; will-change: transform; }
.qd-caret.on { opacity: 1; }
.qd-caret.v { width: 2px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); animation: qd-blink 1s steps(2, start) infinite; }
.qd-caret.h { height: 2px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.qd-caret.h::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@keyframes qd-blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.hl.qd-source { opacity: .35; }
.card.qd-source { opacity: .55; }
.on-hl .textLayer span, .on-hl .textLayer { cursor: grab !important; }
.hl-grip { cursor: grab; touch-action: none; }
/* Markierungen: liegen ruhig hinter der Schrift – kräftig, aber die Schrift bleibt unverändert lesbar, keine Ränder/Nähte */

.hl:not(.hl-area):not(.hl-ul) { opacity: 1 !important; background: color-mix(in srgb, var(--hc) 42%, #fff) !important; mix-blend-mode: multiply; border-radius: 1.5px; }
.hl:not(.hl-area):not(.hl-ul).hover { background: color-mix(in srgb, var(--hc) 56%, #fff) !important; }
.hl.qd-source:not(.hl-area):not(.hl-ul) { background: color-mix(in srgb, var(--hc) 14%, #fff) !important; }
/* Unterstreichung: etwas mehr Abstand zur Schrift, ein wenig kräftiger */
.hl.hl-ul::after { bottom: -2.5px; height: max(2.6px, 13%); border-radius: 2px; opacity: 1; }
/* Ziehen auf der Fläche: keine CSS-Übergänge am gezogenen Element (sie zwingen den Browser jedes Bild neu zu schichten → Ruckeln) */
.ws-board .card.dragging { transition: none !important; opacity: 1; }
/* Raum unter der gezogenen Karte: ohne Größen-Animation und ohne riesigen Innenschatten – günstig neu zu zeichnen */
.ws-frame.room-hot { transition: none; box-shadow: 0 0 0 2px var(--accent); background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
/* gezogene Karte: eigene, schlanke Klasse – der Browser kann sie ohne Neuschichtung der ganzen Fläche bewegen */
.ws-board .card.cv-drag { will-change: transform; z-index: 60; cursor: grabbing; box-shadow: 0 0 0 .5px var(--line2), 0 16px 36px rgba(0,0,0,.18); }
.ws-canvas.dragging-card { cursor: grabbing !important; }
/* Punktraster der Arbeitsfläche als eigene, verschiebbare Ebene */
.ws-canvas { background-image: none !important; }
.cv-grid { position: absolute; left: 0; top: 0; width: calc(100% + 2 * var(--g, 72px) + 80px); height: calc(100% + 2 * var(--g, 72px) + 80px); background-image: radial-gradient(var(--line2) 1px, transparent 1px); background-size: 18px 18px; pointer-events: none; will-change: transform; z-index: 0; }
.ws-canvas > .ws-board { z-index: 1; }
/* die ganze Markierungsebene wird mit dem PDF multipliziert: Farbe liegt sichtbar „hinter“ der Schrift, Schrift bleibt unverändert */
.hlLayer { mix-blend-mode: multiply; }
.hl:not(.hl-area):not(.hl-ul) { mix-blend-mode: normal; }
@media (prefers-color-scheme: dark) { .hl:not(.hl-area):not(.hl-ul) { background: color-mix(in srgb, var(--hc) 46%, #fff) !important; } }
/* Uhrzeit (24 h) */
input.time24 { font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.t24-list { position: fixed; z-index: 3500; max-height: 220px; overflow-y: auto; padding: 4px; border-radius: 10px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line2), 0 10px 26px rgba(0,0,0,.14); display: flex; flex-direction: column; scrollbar-width: thin; }
.t24-it { border: 0; background: none; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums; padding: 5px 12px; border-radius: 6px; text-align: left; color: var(--text); cursor: pointer; }
.t24-it:hover { background: var(--hover); }
.t24-it.on { background: var(--accent); color: #fff; }
.set-privacy p { margin: 0 0 8px; line-height: 1.5; }
.set-privacy ul { margin: 0 0 8px; padding-left: 18px; line-height: 1.55; font-size: 13px; }
.set-privacy b { font-weight: 500; }
/* Abstand zwischen PDF und Notiz wie zu den übrigen Fenstern */
.pw-vdiv { flex: 0 0 20px; }
.pw-vdiv::after { left: 9px; }
.pw-vdiv.hidden + .pw-slot, .pw-collapsed + .pw-vdiv.hidden { margin-left: 0; }
/* Silbentrennung nach deutscher Rechtschreibung (Wortstämme/Silben), statt Wörter an beliebiger Stelle zu brechen */
body { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 8 4 3; overflow-wrap: break-word; }
h1, h2, h3, h4, button, input, textarea, select, code, pre, kbd, .tab-title, .sb-item, .seg-b, .btn, .ctx-item, .crumbs, .cite, a[href^="http"], .ProseMirror code, .ProseMirror pre { hyphens: manual; -webkit-hyphens: manual; }
.ProseMirror h1, .ProseMirror h2, .ProseMirror h3, .ProseMirror h4 { hyphens: manual; }
/* Rechtschreibung */
.sp-dlg .modal-title { margin-bottom: 4px; }
.sp-list { display: flex; flex-direction: column; max-height: 52vh; overflow-y: auto; margin-top: 10px; }
.sp-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 9px 2px; border-top: 1px solid var(--line); }
.sp-bad { text-decoration: underline wavy #d0453b; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.sp-sug { display: flex; flex-wrap: wrap; gap: 4px; }
.sp-chip { border: 0; background: var(--hover); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--text); }
.sp-chip:hover { background: var(--accent); color: #fff; }
.sp-act { display: flex; gap: 4px; }
.sp-ok { display: flex; gap: 12px; align-items: center; padding: 18px 4px; }
.sp-ok-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--olive, #6f9a6b) 18%, transparent); color: var(--olive, #6f9a6b); font-weight: 600; }
/* Verweis auf eine Folie */
.slide-ref { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px 0 5px; margin: 0 1px; border-radius: 6px; font-size: .86em; line-height: 1.55; vertical-align: baseline; background: color-mix(in srgb, #6c7fb3 14%, transparent); color: #3f528a; cursor: pointer; white-space: nowrap; user-select: none; }
@media (prefers-color-scheme: dark) { .slide-ref { color: #a9b9e8; background: color-mix(in srgb, #6c7fb3 26%, transparent); } }
.slide-ref:hover { background: color-mix(in srgb, #6c7fb3 24%, transparent); }
.slide-ref-ic { font-size: .9em; opacity: .8; }
.slide-ref-btn { position: absolute; top: 8px; right: 8px; z-index: 7; border: 0; border-radius: 8px; padding: 4px 9px; font: inherit; font-size: 12px; background: color-mix(in srgb, var(--card, #fff) 92%, transparent); color: #3f528a; box-shadow: 0 0 0 1px var(--line2), 0 2px 8px rgba(0,0,0,.1); cursor: grab; opacity: 0; transition: opacity .15s; }
.page:hover .slide-ref-btn, .slide-ref-btn:focus { opacity: 1; }
.page-slot { position: relative; }
.page-slot:hover .slide-ref-btn { opacity: 1; }
.pw-tabsep { flex: none; align-self: center; margin: 0 4px 0 10px; padding-left: 10px; border-left: 1px solid var(--line2); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pw-tab-slides .pw-tab-ic { color: #5b6fa8; margin-right: 4px; }
.pw-tab-slides.on { box-shadow: inset 0 -2px 0 #6c7fb3; }
.crs-slide-ic { color: #5b6fa8; font-size: 15px; }
.pw-vdiv.pw-vdiv-static { cursor: default; pointer-events: none; }
.pw-vdiv.pw-vdiv-static::after { display: none; }
.pw-vdiv.pw-vdiv-static > * { pointer-events: auto; }

/* ===================== Ganzheitliche Optimierung: Layout & Responsivität ===================== */
/* Start: Begrüßung und Abgabe-Box untereinander, sobald es eng wird (vorher überlagerte die Box die Begrüßung) */
@media (max-width: 900px) { .hm-hero { grid-template-columns: minmax(0, 1fr) !important; gap: var(--s3); } .hm-cd-body { min-width: 0; } }
/* Kalender: Seitenspalte „ToDos ohne Datum“ wandert bei schmalen Fenstern unter den Kalender */
@media (max-width: 900px) {
  .cal-body, .ag-body { grid-template-columns: minmax(0, 1fr) !important; overflow: auto; }
  .cal-body > .cal-side, .ag-body > .cal-side { max-height: none; }
  .calv .cal-head .cal-sync { order: 9; }
  .ag-day { grid-template-columns: 52px 22px minmax(0, 1fr); }
  .ag-time { min-width: 0; }
  .ag-it { flex-wrap: wrap; row-gap: 2px; }
}
/* Einstellungen: Beschriftung und Eingabe untereinander statt zusammengequetscht */
@media (max-width: 760px) {
  .set-row { flex-wrap: wrap; row-gap: 6px; }
  .set-row > span:first-child { flex: 1 1 160px; }
  .set-row > .input, .set-row > input, .set-row > select { flex: 1 1 200px; min-width: 0; }
}
/* Übersichten (Start, Notizen, Arbeiten): eine Spalte bei schmalen Fenstern */
@media (max-width: 760px) {
  .hm-grid, .pv-grid, .pv-cols, .nvo-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .hm-grid > *, .pv-grid > *, .nvo-grid > * { grid-column: auto !important; }
  .hm-acts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
}
/* Netzwerk: Leiste darf umbrechen, ohne unter die Grafik zu rutschen */
.graph-bar { height: auto !important; min-height: 44px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; row-gap: 6px; }
/* ToDos: lange Projektnamen in den Projekt-Chips werden gekürzt statt abgeschnitten */
.kb-bchip { max-width: min(360px, 100%); }
.kb-bchip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Notiztitel: lange Wörter mit Trennstrich statt an beliebiger Stelle umbrechen */
.nv-title, .crs-topic, .pw-title h1, .page-head h1 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
/* Leseansicht: Werkzeugleiste bleibt bei schmalen Fenstern bedienbar */
.rd-toolbar:not(.rd-compact) { container-type: inline-size; overflow-x: auto; scrollbar-width: none; }
.rd-toolbar:not(.rd-compact)::-webkit-scrollbar { display: none; }
.rd-toolbar:not(.rd-compact) > * { flex-shrink: 0; }
.rd-toolbar:not(.rd-compact) > .rd-title, .rd-toolbar:not(.rd-compact) > .crumbs { flex-shrink: 1; min-width: 60px; }
/* (ersetzt durch anpassbare Leisten – Ausweichen ins ⋯-Menü) */
/* (ersetzt durch anpassbare Leisten – Ausweichen ins ⋯-Menü) */
/* Abhak-Kreise: größere Klickfläche (unsichtbar), gleiche Optik */
.kb-check { position: relative; }
.kb-check::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.pv-tools { flex-wrap: wrap; row-gap: 6px; min-width: 0; }
/* Audit: Umfangsanzeige kürzt sauber statt abzuschneiden */
.nv-top .nv-stats > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Sitzung → Arbeitsraum, Zotero in der Sitzungsansicht */
.crs-dh .crs-go { white-space: nowrap; }
@media (max-width: 760px) { .crs-dh { flex-wrap: wrap; } }
.crs-zot { display: flex; flex-direction: column; gap: 10px; }
.crs-zlist { max-height: min(56vh, 460px); overflow: auto; }
.pw-zi[disabled] { opacity: .65; cursor: default; }
/* Arbeitsraum: überall derselbe Abstand (10px) – offen wie eingeklappt; Griff behält eine breitere, unsichtbare Fangfläche */
.pw-vdiv, .pw-vdiv.pw-vdiv-static { flex: 0 0 10px; }
.pw-vdiv::after { left: 4px; }
.pw-vdiv::before { content: ''; position: absolute; top: 0; bottom: 0; left: -5px; right: -5px; }
.pw-vdiv.pw-vdiv-static::before { display: none; }
/* Literatur-Reiter sortieren + Reiter in die Tableiste ziehen */
.pw-tab.dragging, .pw-ntab.dragging { opacity: .45; }
.pw-tab.drop-before { box-shadow: inset 2px 0 0 var(--accent); }
.pw-tab.drop-after { box-shadow: inset -2px 0 0 var(--accent); }
.pw-cols > .side-rz { margin: 0 -9.5px; }
/* Sitzungs-Arbeitsraum: Hinweis, welche Sitzung gezeigt wird */
.pw-sess-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 280px; height: 30px; padding: 0 6px 0 12px; border-radius: 15px; background: color-mix(in srgb, var(--accent) 10%, var(--bg)); color: var(--accent); font-size: 12.5px; font-weight: 500; }
.pw-sess-x { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 11px; }
.pw-sess-x:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
/* oben beide eingeklappt → sichtbare Leiste zum Aufklappen */
.pw-topshut { display: none; }
.pw-main.top-closed > .pw-topshut { display: flex; gap: 8px; flex: none; margin-bottom: 0; }
.pw-shut-b { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.pw-shut-b:first-child, .pw-shut-b:nth-child(2) { flex: 1; justify-content: center; }
.pw-shut-b:hover { color: var(--text); background: var(--hover); }
/* eine Seite eingeklappt: Knopf zum Einklappen der anderen Seite erreichbar machen */
.pw-top:hover .pw-vdiv.pw-vdiv-static .pw-fold { opacity: .85; }
.pw-slot-tl.pw-collapsed ~ .pw-vdiv .pw-fold-l, .pw-vdiv:has(+ .pw-slot-tr.pw-collapsed) .pw-fold-r { display: none; }
/* Reiter in Literatur- und Notizleiste: lange Titel kürzen, Reiter schrumpfen erst, bevor gescrollt wird; Ränder weich ausblenden */
.pw-ntab, .pw-tab { flex: 0 1 auto; min-width: 64px; }
.pw-ntab { max-width: 180px; } .pw-tab { max-width: 200px; }
.pw-ntab > .clamp1, .pw-tab > .clamp1 { min-width: 0; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-ntab-n, .pw-tab-ic { flex: none; }
.pw-ntabs, .pw-tabs { scroll-padding-inline: 16px; }
.pw-ntabs.ovf, .pw-tabs.ovf { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%); padding-inline: 4px; }
/* Geteilte Ansicht (zwei Tabs nebeneinander) */
#view-host.is-split { display: flex; gap: 0; }
#view-host.is-split > .vpane { position: relative; min-width: 0; display: flex; flex-direction: column; }
.vpane.vp-a > .view, .vp-body > .view { position: absolute; inset: 0; }
.vp-b .vp-body { flex: 1; position: relative; min-height: 0; }
.vp-bar { flex: none; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line); background: var(--bg2); font-size: 12.5px; color: var(--muted); }
.vp-t { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; color: var(--text); }
.vp-ic { flex: none; }
.tab.split { max-width: 300px; flex-basis: 260px; }
/* Einheitliche Ein-/Ausklapp-Knöpfe (wie Seitenleiste): ◧ links, ◨ rechts, ⬓ unten */
.pw-fold { display: none !important; } /* versteckte Hover-Knöpfe ersetzt durch sichtbare Knöpfe in jeder Kopfzeile */
.pane-tgl { flex: none; color: var(--muted); }
.pane-tgl svg.i, .pw-strip-tgl svg.i { width: 17px; height: 17px; color: var(--ico, var(--muted)); }
.pane-tgl:hover svg.i, .pw-strip:hover .pw-strip-tgl svg.i, .pw-shut-b:hover .pw-strip-tgl svg.i { color: var(--text); }
.pw-bar > .pane-tgl:first-child { margin-right: 2px; }
.pw-strip-tgl { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; flex: none; }
.pw-strip .pw-strip-tgl { margin-bottom: 4px; }
.pw-xhead .pane-tgl { margin-left: 2px; }
/* Dunkelmodus: zarte Schrift (Platzhalter, Zähler, Kürzel) lesbarer – vorher Kontrast ≈ 3:1 */
@media (prefers-color-scheme: dark) { :root:root:root:root { --faint: #868480; } }
:root[data-theme="dark"]:root:root { --faint: #868480; }
/* Dunkelmodus: farbige Flächen mit fester heller Farbe bekommen dunkle Schrift, Callouts erben immer die Themen-Schrift */
@media (prefers-color-scheme: dark) { .ProseMirror .callout, .ProseMirror .callout-body, .callout-head { color: var(--text); } .ProseMirror .callout-gedanke { color: var(--own-text, var(--text)); } }
/* Block-Griff (Notion-artig): + und ⠿ links neben jedem Block */
.bh { position: fixed; z-index: 40; display: flex; align-items: center; gap: 1px; opacity: 0; pointer-events: none; transition: opacity .12s; }
.bh.on { opacity: 1; pointer-events: auto; }
.bh button { width: 22px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--faint); font: inherit; font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.bh .bh-grip { cursor: grab; font-size: 14px; letter-spacing: -1px; }
.bh button:hover { background: var(--hover); color: var(--text); }
body.bh-dragging, body.bh-dragging * { cursor: grabbing !important; user-select: none !important; }
.bh-src { opacity: .4; }
.bh-ghost { position: fixed; z-index: 10000; pointer-events: none; max-width: 320px; max-height: 110px; overflow: hidden; padding: 8px 12px; border-radius: 10px; background: var(--card, var(--bg)); box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.18)); color: var(--text); font-size: 13px; line-height: 1.45; white-space: pre-wrap; opacity: .95; }
.bh-ghost.to-canvas { border-left: 3px solid var(--accent); }
.bh-line { position: fixed; z-index: 9999; height: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; display: none; }
.card-comment { white-space: pre-wrap; }
/* Suchen & Ersetzen in der Notiz */
.nv-main { position: relative; }
.fr-bar { position: absolute; top: 10px; right: 18px; z-index: 30; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.16)); width: min(440px, calc(100% - 36px)); }
.fr-row { display: flex; align-items: center; gap: 4px; }
.fr-row .input { flex: 1; min-width: 0; }
.fr-reprow { display: none; } .fr-bar.rep .fr-reprow { display: flex; }
.fr-pad { width: 30px; flex: none; }
.fr-count { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.fr-cs { font-size: 12px; font-weight: 600; } .fr-cs.on { background: var(--accent-soft); color: var(--accent); }
.fr-hit { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 2px; }
.fr-hit.cur { background: color-mix(in srgb, var(--accent) 50%, transparent); box-shadow: 0 0 0 1px var(--accent); }
/* Fokusmodus */
body.focus-mode #sidebar, body.focus-mode #tabbar, body.focus-mode .nv-side { display: none !important; }
body.focus-mode .note-view .nv-scroll { padding-top: 6vh; }
/* Hellmodus: zarte Schrift lesbarer (vorher Kontrast ≈ 2:1) */
:root:root:root:root { --faint: #93897d; }
@media (prefers-color-scheme: dark) { :root:root:root:root:not([data-theme="light"]) { --faint: #868480; } }
:root[data-theme="dark"]:root:root:root { --faint: #868480; }
/* Akzent als Schriftfarbe auf hellem Grund etwas dunkler (Countdown, „Heute“) */
@media (prefers-color-scheme: light) { .hm-cd-n, .ag-wd { color: color-mix(in srgb, var(--accent) 78%, #000) !important; } }
.sb-sub { color: var(--muted); }
/* Block-Griff: ruhig – feste Spalte, kein Springen, größere Greiffläche */
.bh { left: 0; top: 0; transition: opacity .08s; will-change: transform; }
.bh button { width: 24px; height: 26px; }
.bh .bh-grip svg.i, .bh .bh-add svg.i { width: 16px; height: 16px; }
/* Anpassbare Symbolleisten */
.cbar { display: flex; align-items: center; gap: 2px; flex: none; min-width: 0; }
.cbar > * { flex: none; }
.cbar-more.has-spill { color: var(--accent); }
.rd-zoomgrp, .rd-pagegrp { display: inline-flex; align-items: center; gap: 1px; }
.rd-toolbar .rd-title, .rd-toolbar .rd-crumbs { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-toolbar:not(.rd-compact) { overflow: hidden !important; }
.nv-top { overflow: hidden; } .nv-top .crumbs { min-width: 0; flex: 0 1 auto; }
.cz-h { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 0 6px; }
.cz-count { font-size: 12px; color: var(--muted); }
.cz-zone { display: flex; gap: 6px; padding: 8px; border-radius: 12px; background: var(--bg2); min-height: 52px; transition: background .12s, box-shadow .12s; }
.cz-bar { flex-wrap: wrap; } .cz-menu { flex-direction: column; max-height: 260px; overflow: auto; }
.cz-zone.over { box-shadow: inset 0 0 0 2px var(--accent); }
.cz-chip { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0,0,0,.05); cursor: grab; font-size: 13px; user-select: none; }
.cz-menu .cz-chip { width: 100%; }
.cz-chip:hover { box-shadow: 0 0 0 1px var(--accent); }
.cz-chip.drag { opacity: .4; }
.cz-chip.before { box-shadow: -3px 0 0 var(--accent), 0 0 0 .5px var(--line2); } .cz-menu .cz-chip.before { box-shadow: 0 -3px 0 var(--accent), 0 0 0 .5px var(--line2); }
.cz-chip.after { box-shadow: 3px 0 0 var(--accent), 0 0 0 .5px var(--line2); } .cz-menu .cz-chip.after { box-shadow: 0 3px 0 var(--accent), 0 0 0 .5px var(--line2); }
.cz-ic { display: inline-grid; place-items: center; width: 18px; } .cz-l { flex: 1; } .cz-act { color: var(--faint); font-size: 12px; }
.cz-empty { color: var(--faint); font-size: 13px; padding: 8px; }
/* Titel behält Platz – eher wandern Symbole ins ⋯-Menü (wie in Vorschau) */
.rd-toolbar:not(.rd-compact) .rd-title { min-width: 140px; }
.cbar .tb-search { flex: none; width: 170px; }
/* Kommentare an Markierungen im PDF */
.hlNotes { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.hl-note { position: absolute; transform: translate(2px, -50%); pointer-events: auto; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px 6px 6px 2px; background: color-mix(in srgb, var(--hc) 85%, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.25); color: #3a3226; cursor: pointer; display: grid; place-items: center; }
.hl-note svg.i { width: 12px; height: 12px; color: #3a3226; }
.hl-note:hover { transform: translate(2px, -50%) scale(1.12); }
.hl-cpop { position: fixed; z-index: 1000; width: 320px; padding: 10px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,.18)); display: flex; flex-direction: column; gap: 8px; }
.hl-cq { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); font-family: var(--serif, Georgia, serif); }
.hl-cdot { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.hl-cta { width: 100%; resize: none; min-height: 64px; font: inherit; font-size: 13.5px; line-height: 1.5; }
.hl-crow { display: flex; align-items: center; gap: 6px; }
.hl-bar-b.on { color: var(--accent); }
/* „Wo liegt diese Markierung?“ */
.hl-where { position: fixed; z-index: 1000; width: 330px; padding: 8px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,.18)); display: flex; flex-direction: column; gap: 2px; }
.hl-wh { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px 6px; font-size: 13px; }
.hl-wrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.hl-wrow:hover { background: var(--hover); }
.hl-wic { flex: none; width: 22px; display: grid; place-items: center; }
.hl-wt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.hl-wlocal { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 2px; }
.hl-wnone { padding: 4px 8px 8px; margin: 0; }
.ProseMirror .flash, .ProseMirror-selectednode.flash { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; transition: outline-color .6s; }
/* Darstellung je Notiz (wie Type) */
.nv-page.look-serif .prose, .nv-page.look-serif .nv-title { font-family: var(--serif, Georgia, serif); }
.nv-page.look-serif .prose { font-size: 17px; line-height: 1.75; }
.nv-page.look-mono .prose { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14.5px; line-height: 1.75; }
.nv-page.look-narrow { max-width: 620px; } .nv-page.look-wide { max-width: 1020px; }
.nv-page.look-lg .prose { font-size: 18.5px; } .nv-page.look-sm .prose { font-size: 14.5px; }
/* Mini-Gliederung am rechten Rand */
.toc-mini { position: absolute; top: 120px; right: 14px; z-index: 5; display: flex; flex-direction: column; gap: 7px; padding: 10px 8px; border-radius: 12px; max-height: 60vh; overflow: hidden; transition: background .15s, box-shadow .15s; }
.toc-mini[hidden] { display: none; }
.toc-i { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--muted); }
.toc-bar { flex: none; height: 2px; border-radius: 1px; background: var(--line2); width: 16px; order: 2; }
.toc-i.l2 .toc-bar { width: 11px; } .toc-i.l3 .toc-bar { width: 7px; }
.toc-t { display: none; font-size: 12.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.toc-mini:hover { background: var(--card, var(--bg)); box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.12)); overflow: auto; }
.toc-mini:hover .toc-t { display: block; }
.toc-i:hover .toc-t { color: var(--text); } .toc-i:hover .toc-bar { background: var(--accent); }
@media (max-width: 900px) { .toc-mini { display: none; } }
.pw-note .toc-mini { display: none; }
.note-view:has(.nv-side:not(.hidden)) .toc-mini { display: none; }
/* Fälligkeitsdatum zum Anklicken (überall gleich) */
.due-chip { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border: 0; border-radius: 12px; background: var(--bg2); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.due-chip:hover { background: var(--hover); color: var(--text); box-shadow: 0 0 0 1px var(--line2); }
.due-chip.empty { opacity: 0; } .hm-task:hover .due-chip.empty, .crs-task:hover .due-chip.empty, .due-chip.empty:focus-visible { opacity: 1; }
.due-chip.late { background: color-mix(in srgb, var(--danger, #d9534f) 14%, transparent); color: var(--danger, #c0392b); }
.due-chip svg.i { width: 13px; height: 13px; }
.crs-task, .hm-task .hm-row-t { cursor: pointer; }
.crs-task:hover { background: var(--hover); border-radius: 8px; }
.crs-task .crs-task-t { flex: 1; min-width: 0; }
/* ---------- Literatur im Dunkelmodus (wie Zotero): Seiten umfärben, Markierungen passend ---------- */
body.pdf-dark .rd-pdf .page, body.pdf-dark .rd-pages .page { background: #1c1b19; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 6px 20px rgba(0,0,0,.45); }
/* Seite: weiß → warmes Dunkelgrau, Schrift hell; Farben (Abbildungen) behalten ihren Ton */
body.pdf-dark .page > canvas.pg-canvas { filter: invert(.89) hue-rotate(180deg) sepia(.07) contrast(.94); }
/* eigene Stift-Zeichnungen mit umfärben, damit dunkle Tinte sichtbar bleibt */
body.pdf-dark .page canvas.ink-canvas { filter: invert(.85) hue-rotate(180deg); }
/* Markierungen: auf dunklem Grund „aufhellen“ statt „abdunkeln“ – farbiger Schimmer hinter heller Schrift */
body.pdf-dark .hlLayer { mix-blend-mode: screen; }
body.pdf-dark .hl:not(.hl-area):not(.hl-ul) { background: color-mix(in srgb, var(--hc) 52%, #000) !important; opacity: 1 !important; mix-blend-mode: normal; }
body.pdf-dark .hl:not(.hl-area):not(.hl-ul).hover { background: color-mix(in srgb, var(--hc) 62%, #000) !important; }
body.pdf-dark .hl.qd-source:not(.hl-area):not(.hl-ul) { background: color-mix(in srgb, var(--hc) 18%, #000) !important; }
/* Unterstreichungen: kräftige, leicht aufgehellte Linie */
body.pdf-dark .hl.hl-ul::after { background: color-mix(in srgb, var(--hc) 82%, #fff); opacity: 1; }
body.pdf-dark .hl.hl-ul:hover, body.pdf-dark .hl.hl-ul.hover { background: color-mix(in srgb, var(--hc) 20%, #000) !important; }
/* ausgeschnittene Bereiche: heller Rahmen */
body.pdf-dark .hl.hl-area { border-color: color-mix(in srgb, var(--hc) 80%, #fff); opacity: .95; }
/* verbundene Markierungen (gestrichelt) */
body.pdf-dark .hl.hl-linked:not(.hl-ul) { outline: 1px dashed color-mix(in srgb, var(--hc) 70%, #fff); outline-offset: 1px; }
/* Textauswahl und Suchtreffer auf dunklem Grund */
body.pdf-dark .textLayer ::selection { background: rgba(224, 145, 92, .45); }
body.pdf-dark .textLayer .highlight { background: rgba(224, 145, 92, .35) !important; }
body.pdf-dark .pg-num { color: #8a857c; }
/* Seitenzahl unten rechts in der Seite (vorher außerhalb → von der Seite abgeschnitten, nur „S“ sichtbar) */
.page > .pg-num { right: 8px; bottom: 6px; z-index: 5; padding: 1px 7px; border-radius: 8px; font-size: 10.5px; line-height: 16px; white-space: nowrap; color: #7d766b; background: rgba(255, 255, 255, .82); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08); pointer-events: none; font-variant-numeric: tabular-nums; }
body.pdf-dark .page > .pg-num { color: #a49d92; background: rgba(28, 27, 25, .85); box-shadow: 0 0 0 .5px rgba(255, 255, 255, .08); }
/* Eingefaltetes PDF: Markierungen hinter dem Text (wie auf der Seite), anklickbar → zur Karte */
.fold-ov { mix-blend-mode: multiply; }
.fold-ov .hl { pointer-events: auto !important; cursor: pointer; }
.fold-snip { cursor: pointer; }
.fold-open { position: absolute; right: 6px; top: 6px; z-index: 6; width: 26px; height: 24px; border: 0; border-radius: 8px; background: rgba(255,255,255,.9); box-shadow: 0 0 0 .5px rgba(0,0,0,.12); color: #6b6459; cursor: pointer; opacity: 0; transition: opacity .12s; }
.fold-snip:hover .fold-open { opacity: 1; }
.fold-open:hover { color: var(--accent); }
body.pdf-dark .fold-snip { background: #1c1b19; }
body.pdf-dark .fold-img canvas { filter: invert(.89) hue-rotate(180deg) sepia(.07) contrast(.94); }
body.pdf-dark .fold-ov { mix-blend-mode: screen; }
body.pdf-dark .fold-open { background: rgba(28,27,25,.9); color: #a49d92; }
body.pdf-dark .fold-cm { background: #2a2618; color: #e8dcb0; border-top-color: #3a3420; }

/* ---------- Vollbild (macOS): keine Ampel-Knöpfe, kein Ziehen des Fensters, mehr Raum für Inhalte */
html.fs[data-platform="mac"] #tabbar, html.fs[data-platform="mac"] body.no-sidebar #tabbar { padding-left: 8px; }
html.fs .sb-top { height: 36px; } /* bündig mit der Tab-Leiste, Vor/Zurück bleiben sichtbar */
html.fs #tabbar, html.fs #tabbar .tabs, html.fs .sb-top, html.fs .sb-brand, html.fs .pw-head, html.fs .page-head, html.fs .calv .cal-head,
html.fs .kb-wrap > .kb-head, html.fs .set-nav-h, html.fs .nv-top, html.fs .rd-toolbar, html.fs .graph-bar, html.fs .nv-top .spacer, html.fs .rd-toolbar .spacer { -webkit-app-region: no-drag; }
html.fs body.no-sidebar.sb-peek #sidebar { top: 40px; }
@media (min-width: 1600px) { html.fs { --page-max: 1280px; --page-x: 56px; } }
@media (min-width: 2200px) { html.fs { --page-max: 1480px; --page-x: 72px; } html.fs body { font-size: 15px; } }

/* ===== 0.50 – Korrekturen ===== */
/* Sitzungs-Chip im Arbeitsraum: Nummer + Thema einzeilig, langes Thema endet mit „…“ (voller Titel beim Darüberfahren) */
.pw-actions { min-width: 0; }
.pw-sess-chip { flex: 0 1 auto; min-width: 0; max-width: min(400px, 34vw); height: 30px; padding: 0 4px 0 4px; gap: 6px; overflow: hidden; white-space: nowrap; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.pw-sess-no { flex: none; height: 22px; line-height: 22px; padding: 0 9px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, var(--bg)); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; }
.pw-sess-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; hyphens: none; -webkit-hyphens: none; color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.pw-sess-x { flex: none; }
/* eingeklappte Spalten/Leisten im Arbeitsraum: gleicher Rahmen wie die offenen Flächen (im Dunkelmodus vorher kaum sichtbar) */
.pw-strip, .pw-shut-b { box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(0,0,0,.04); }
/* PDF und Notiz beide eingeklappt: gleicher Abstand zur Arbeitsfläche wie sonst */
.pw-main.top-closed .pw-cvbar { margin-top: 10px; }
/* Vollbild mit Notch: Tab-Leiste füllt genau die oberste Zeile */
html.fs.notch #tabbar { min-height: 0; }
html.fs.notch #tabbar .tabs { overflow: hidden; }
/* Netzwerk: Werkzeuge, Trefferzahl, Legende ohne verwaiste Punkte */
.graph-tools { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 10px; background: color-mix(in srgb, var(--hover) 60%, transparent); }
.graph-tools .tb-btn.on { background: var(--card, var(--bg)); color: var(--accent); box-shadow: 0 0 0 1px var(--line2), 0 1px 2px rgba(0,0,0,.06); }
.graph-tools .tb-btn.on svg.i { color: var(--accent); }
.graph-depth { width: auto; height: 28px; margin: 0 2px; }
.graph-depth.hidden { display: none; }
.graph-cnt { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.graph-cnt.none { color: var(--danger, #c0392b); }
.graph-cnt:empty { display: none; }
.graph-foot .legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; max-width: calc(100% - 190px); line-height: 1.4; }
.graph-foot .legend .lg-it { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.graph-foot .legend .lg-it i { margin-left: 0; }
.gl-empty { padding: 4px 8px; margin: 0; }
.graph-bar .input.sm.search { width: 180px; }
.graph-cnt { min-width: 18px; height: 18px; line-height: 18px; padding: 0 6px; border-radius: 10px; text-align: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; margin-left: -4px; }
.graph-cnt.none { background: color-mix(in srgb, var(--danger, #c0392b) 12%, transparent); }
@media (max-width: 1180px) { .graph-bar .graph-title { display: none; } }
/* Start: kompakte leere Abgabe-Karte, weitere zuletzt gelesene Quellen, Seminar-Sitzungen in „Demnächst“ */
.hm-countdown.hm-cd-empty { padding: 10px 16px; opacity: .85; }
.hm-countdown.hm-cd-empty .hm-cd-zero { font-size: 22px; min-width: 24px; }
.hm-countdown.hm-cd-empty .hm-cd-t { font-size: 14px; }
.hm-more-read { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.hm-mini { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 5px 6px; margin-left: -6px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.hm-mini:hover { background: var(--hover); }
.hm-mini-t { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-mini-s { flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hm-sess { --ec: var(--accent); }
.hm-sess .hm-row-t b { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hm-cd-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-more-read .hm-mini { justify-content: space-between; }
.hm-more-read .hm-mini-t { color: var(--text); font-size: 13px; }
/* Unterstreichen: Linie dicht unter der eigenen Zeile, Unterlängen (g, p, y, q, j) ausgespart */
.ulLayer { position: absolute; inset: 0; overflow: clip; line-height: 1; pointer-events: none; user-select: none; -webkit-user-select: none; text-size-adjust: none; z-index: 1; }
.ulLayer span { position: absolute; white-space: pre; color: transparent; transform-origin: 0% 0%; letter-spacing: 0 !important; word-spacing: 0 !important; font-kerning: normal; font-weight: normal; font-style: normal; }
.ulLayer u { text-decoration-line: underline; text-decoration-color: var(--hc); text-decoration-thickness: max(2px, .1em); text-underline-offset: .11em; text-decoration-skip-ink: auto; }
.hl.hl-ul::after { top: calc(80% + 1px); bottom: auto; height: max(2px, 9.5%); }
.hl.hl-ul.hl-ul-txt::after { display: none; }
body.pdf-dark .ulLayer u { text-decoration-color: color-mix(in srgb, var(--hc) 85%, #fff); }
/* Mehrfachauswahl von Auszügen */
.card.msel { box-shadow: 0 0 0 2px var(--accent), 0 4px 14px rgba(0,0,0,.08) !important; }
.msel-bar { position: fixed; left: 50%; top: 46px; transform: translateX(-50%); z-index: 400; display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; border-radius: 14px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line2), 0 10px 30px rgba(0,0,0,.16); font-size: 13px; max-width: calc(100vw - 32px); flex-wrap: wrap; animation: msel-in .16s ease; }
@keyframes msel-in { from { opacity: 0; transform: translate(-50%, -8px); } }
.msel-n { font-weight: 600; margin-right: 4px; white-space: nowrap; }
.msel-colors { display: inline-flex; gap: 4px; padding: 0 6px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.msel-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line2); cursor: pointer; padding: 0; }
.msel-dot:hover { transform: scale(1.15); }
.msel-tag { width: 140px; height: 28px; padding: 0 9px; border: 0; border-radius: 8px; background: var(--hover); font: inherit; font-size: 12.5px; color: var(--text); outline: none; }
.msel-tag:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.msel-b { min-width: 30px; height: 30px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; display: inline-grid; place-items: center; }
.msel-b:hover { background: var(--hover); color: var(--text); }
.msel-b svg.i { width: 16px; height: 16px; }
/* Format-Pinsel in Notizen */
.cb-paint-btn { margin-top: 10px; width: 100%; justify-content: center; }
.cb-painting { cursor: text; caret-color: var(--accent); }
.cb-painting ::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.cb-paint-pill { position: fixed; left: 50%; top: 46px; transform: translateX(-50%); z-index: 400; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-radius: 14px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line2), 0 10px 30px rgba(0,0,0,.16); font-size: 13px; }
.cb-tagren { margin-top: 10px; width: 100%; justify-content: center; }
/* Auszüge im Arbeitsraum: Stichwort-Feld beim Darüberfahren/Bearbeiten zeigen (vorher gar nicht erreichbar) */
.pw-x .card:hover .tag-input, .pw-x .card:focus-within .tag-input { display: inline-block; }
/* PDF-Lesezeichen: Band oben rechts an der Seite */
.rd-pages .page.bookmarked::before { content: ''; position: absolute; top: 0; right: 26px; width: 14px; height: 28px; z-index: 6; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); pointer-events: none; }
/* Start: Wiederentdecken (ein eigenes Zitat pro Tag) */
.hm-c-re { grid-column: 1 / -1; }
.hm-c-re[hidden] { display: none; }
.hm-re-q { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 4px 0 4px 14px; border: 0; border-left: 3px solid var(--qc); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; border-radius: 0; }
.hm-re-q:hover .hm-re-t { color: var(--accent); }
.hm-re-t { font-family: var(--serif); font-size: 16px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hm-re-s { font-size: 12px; color: var(--muted); }
/* Tabs per Ziehen umsortieren */
#tabbar .tab { transition: transform .16s ease; }
#tabbar .tab.dragging { transition: none; z-index: 5; box-shadow: 0 4px 14px rgba(0,0,0,.14); cursor: grabbing; }
body.tab-dragging, body.tab-dragging * { cursor: grabbing !important; user-select: none; }

/* ======================= iPhone ======================= */
.ph-only, .ph-nav, .ph-seg { display: none; }
html.phone { --ph-nav: calc(54px + env(safe-area-inset-bottom)); --ph-top: calc(44px + env(safe-area-inset-top)); -webkit-text-size-adjust: 100%; }
html.phone body { overscroll-behavior: none; }
html.phone #app { padding-top: 0; padding-bottom: 0; }
/* Titelzeile oben: Zurück · Titel · Suche (statt Desktop-Tabs) */
html.phone #tabbar { height: var(--ph-top); min-height: 0; padding: env(safe-area-inset-top) 6px 0 4px !important; gap: 2px; align-items: center; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px); }
html.phone #tabbar .tab-side, html.phone #tabbar .tab-new, html.phone #tabbar .nav-mini + .nav-mini, html.phone #tabbar .tab-x { display: none !important; }
html.phone #tabbar .nav-mini { width: 40px; height: 40px; font-size: 28px; border-radius: 10px; }
html.phone #tabbar .nav-mini:disabled { opacity: .25; }
html.phone #tabbar .tabs { flex: 1; min-width: 0; justify-content: center; overflow: hidden; }
html.phone #tabbar .tab:not(.active) { display: none !important; }
html.phone #tabbar .tab.active { flex: 0 1 auto; max-width: 100%; background: none !important; box-shadow: none !important; border: 0 !important; justify-content: center; pointer-events: none; }
html.phone #tabbar .tab.active .tab-title { font-weight: 600; font-size: 16px; }
html.phone #tabbar .tab.active .tab-ic { display: none; }
html.phone .ph-only { display: inline-grid; }
html.phone #tabbar .ph-search { width: 40px; height: 40px; place-items: center; border-radius: 10px; }
html.phone #tabbar .ph-search svg.i { width: 20px; height: 20px; }
/* Leiste unten */
html.phone .ph-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: var(--ph-nav); padding: 4px 4px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px); }
html.phone.kb-open .ph-nav { display: none; }
.ph-nb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ph-nb .ph-ic svg.i { width: 23px; height: 23px; }
.ph-nb.on { color: var(--accent); }
.ph-nb.on .ph-ic svg.i { color: var(--accent); stroke-width: 2.2; }
html.phone #main { height: 100%; min-height: 0; }
html.phone #view-host { padding-bottom: var(--ph-nav); box-sizing: border-box; }
html.phone.kb-open #view-host { padding-bottom: 0; }
html.phone body.sidebar-open #sidebar { padding-top: env(safe-area-inset-top); padding-bottom: var(--ph-nav); width: min(320px, 86vw); }
/* allgemeine Tippflächen und Abstände */
html.phone { --page-x: 16px; }
html.phone .tb-btn { min-width: 40px; min-height: 40px; }
html.phone .btn { min-height: 38px; }
html.phone .btn.sm { min-height: 34px; }
html.phone input, html.phone select, html.phone textarea { font-size: 16px; } /* verhindert iOS-Zoom beim Tippen */
html.phone .page-head, html.phone .pw-head { padding-left: 16px !important; padding-right: 16px !important; }
html.phone .modal { width: min(560px, calc(100vw - 20px)) !important; max-height: calc(100vh - var(--ph-top) - 20px); overflow: auto; }
html.phone .ctx { max-width: calc(100vw - 16px); }
/* Start */
html.phone .hm-top { display: none; }
html.phone .hm-page { padding: 14px 14px 24px !important; }
html.phone .hm-hero { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
html.phone .hm-hero h1 { font-size: 28px; }
html.phone .hm-countdown { width: auto !important; max-width: none !important; justify-self: stretch; margin: 0; }
html.phone .hm-shelf { margin: 4px -14px 0; }
html.phone .hm-acts { display: flex; overflow-x: auto; gap: 10px; padding: 2px 14px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
html.phone .hm-acts::-webkit-scrollbar { display: none; }
html.phone .hm-act { flex: 0 0 auto; width: auto; min-width: 150px; scroll-snap-align: start; }
html.phone .hm-act-t span { display: none; }
html.phone .hm-plank { display: none; }
html.phone .hm-grid { display: flex; flex-direction: column; gap: 12px; }
html.phone .hm-c-net { display: none; }
/* Bibliothek: kompakte Zeilen */
html.phone .lib-row { grid-template-columns: 1fr auto !important; }
html.phone .lib-row > :not(:first-child):not(:last-child) { display: none !important; }
/* Projekt-Arbeitsraum: genau eine Fläche */
html.phone .ph-seg { display: flex; gap: 2px; margin: 6px 12px 8px; padding: 3px; border-radius: 12px; background: var(--hover); flex: none; }
.ph-sb { flex: 1; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ph-sb.on { background: var(--card, var(--bg)); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
html.phone .pw-head { padding-top: 10px !important; padding-bottom: 4px !important; }
html.phone .pw-head .ps, html.phone .pw-lay-btn, html.phone .pane-tgl, html.phone .pw-cvbar, html.phone .pw-vdiv, html.phone .side-rz, html.phone .pw-strip, html.phone .pw-topshut, html.phone .pw-fold { display: none !important; }
html.phone .pw-head .pw-ic { display: none; }
html.phone .pw-head h1 { font-size: 20px; }
html.phone .pw-cols { display: block !important; flex: 1; min-height: 0; padding: 0 !important; position: relative; }
html.phone .pw-cols .pw-main, html.phone .pw-cols .pw-top { display: contents !important; }
html.phone .pw-cols .pw-slot { display: none !important; position: absolute !important; inset: 0 8px 6px !important; width: auto !important; height: auto !important; max-width: none !important; flex: none !important; }
html.phone .pw-cols[data-ph="pdf"] .pw-slot:has(> .pw-pdf),
html.phone .pw-cols[data-ph="note"] .pw-slot:has(> .pw-note),
html.phone .pw-cols[data-ph="x"] .pw-slot:has(> .pw-x),
html.phone .pw-cols[data-ph="cv"] .pw-slot:has(> .pw-cv) { display: flex !important; }
html.phone .pw-cols .pw-slot > * { display: flex !important; flex: 1; width: 100% !important; height: 100% !important; min-width: 0; }
html.phone .pw-cols .pw-slot.pw-collapsed > :not(.pw-strip) { display: flex !important; }
html.phone .pw-cols .pw-x { padding: 12px; }
html.phone .pw-tab, html.phone .pw-ntab { max-width: 46vw; }
/* Reader */
html.phone .rd-pages { padding: 8px 4px 40vh; gap: 8px; }
html.phone .rd-toolbar { gap: 2px; padding-left: 8px; padding-right: 6px; }
html.phone .sel-toolbar { max-width: calc(100vw - 16px); flex-wrap: wrap; }
html.phone .sel-toolbar button { min-width: 38px; min-height: 38px; }
html.phone .sel-color { width: 30px !important; height: 30px !important; }
/* Notiz: volle Breite, Schrift etwas größer */
html.phone .ProseMirror { font-size: 17px; }
html.phone .nv-top { padding-left: 8px; padding-right: 8px; }
html.phone .msel-bar, html.phone .cb-paint-pill { top: calc(var(--ph-top) + 6px); }
/* Seminare */
html.phone .crs-head { flex-wrap: wrap; }
html.phone .crs-detail input { min-width: 0; }
/* iPhone – Bibliothek, Seitenköpfe, Projekt */
html.phone .page-head { flex-wrap: wrap; row-gap: 8px; }
html.phone .page-head h1 { font-size: 26px; hyphens: none; -webkit-hyphens: none; flex: 1 0 100%; }
html.phone .page-head .spacer { display: none; }
html.phone .page-head > .btn { flex: 1 1 auto; }
html.phone .lit-row { flex-direction: column; align-items: stretch; gap: 8px; }
html.phone .lit-main { width: auto !important; flex: none; }
html.phone .lit-acts { justify-content: flex-start; flex-wrap: wrap; }
html.phone .lib-tools { flex-wrap: wrap; }
html.phone .lib-row.head { display: none; }
html.phone .pw-head:has(.pw-title) { display: none; } /* Projekttitel steht schon in der Titelzeile */
html.phone .crs .pw-head { display: none; }
/* iPhone – Reader: Umschalter statt Seitenspalte */
html.phone .view:has(> .ph-seg-rd) { display: flex; flex-direction: column; }
html.phone .view > .ph-seg-rd { order: 1; margin: 6px 12px 4px; }
html.phone .view > .reader[data-ph] { order: 2; flex: 1; min-height: 0; }
html.phone .reader[data-ph] .rd-toolbar button[title^="Arbeitsfl"], html.phone .reader[data-ph] .rd-foldbtn, html.phone .reader[data-ph] .ws-tabs, html.phone .reader[data-ph] .rd-split, html.phone .reader[data-ph] .rd-pdfstrip { display: none !important; }
html.phone .reader[data-ph] .rd-body { position: relative; }
html.phone .reader[data-ph] .rd-body:not(.no-ws) > .rd-work { position: absolute; inset: 0; width: auto !important; max-width: none !important; z-index: 8; background: var(--bg); border: 0; }
html.phone .reader[data-ph] .rd-body:not(.no-ws) > .rd-pdf { visibility: hidden; }
html.phone .reader[data-ph] .ws-body { height: 100%; }
html.phone .tag-input { width: 130px; font-size: 16px; }
/* iPhone – Markierungsleiste unten in Daumennähe (oben zeigt iOS sein Kopiermenü) */
html.phone .sel-toolbar { position: fixed !important; left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(var(--ph-nav) + 8px) !important; transform: none !important; justify-content: center; border-radius: 16px; }
html.phone.kb-open .sel-toolbar { bottom: 8px !important; }
/* iPhone quer: Titel- und Leistenhöhe knapper */
@media (max-height: 500px) { html.phone { --ph-nav: calc(44px + env(safe-area-inset-bottom)); } html.phone .ph-nb .ph-lb { display: none; } html.phone .view > .ph-seg-rd, html.phone .ph-seg { margin-top: 4px; margin-bottom: 4px; } html.phone #tabbar { padding-left: calc(4px + env(safe-area-inset-left)) !important; padding-right: calc(6px + env(safe-area-inset-right)) !important; } }
/* Übersetzer */
.tr-pop { position: fixed; z-index: 1200; width: min(440px, calc(100vw - 16px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--card, var(--bg)); color: var(--text); border-radius: 12px; box-shadow: 0 0 0 .5px var(--line2), 0 14px 40px rgba(0,0,0,.2); font-size: 14px; animation: tr-in .14s ease; }
@keyframes tr-in { from { opacity: 0; transform: translateY(-4px); } }
.tr-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px 7px 14px; border-bottom: 1px solid var(--line); }
.tr-title { font-weight: 600; font-size: 12.5px; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-lang { font: inherit; font-size: 12.5px; border: 1px solid var(--line2); border-radius: 6px; background: var(--bg); color: var(--text); padding: 2px 4px; }
.tr-x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 6px; }
.tr-x:hover { background: var(--hover, rgba(0,0,0,.06)); color: var(--text); }
.tr-body { padding: 12px 14px; overflow: auto; }
.tr-out { line-height: 1.55; white-space: pre-wrap; user-select: text; -webkit-user-select: text; }
.tr-out.loading { color: var(--muted); }
.tr-out.loading::before { content: ''; display: inline-block; width: 11px; height: 11px; margin-right: 8px; vertical-align: -1px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--accent); animation: tr-spin .8s linear infinite; }
@keyframes tr-spin { to { transform: rotate(360deg); } }
.tr-out.err { color: #c0392b; }
.tr-orig { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.tr-orig summary { cursor: pointer; user-select: none; }
.tr-orig-t { margin-top: 6px; line-height: 1.5; user-select: text; -webkit-user-select: text; }
.tr-foot { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.tr-eng { flex: 1; font-size: 11px; color: var(--faint); min-width: 60px; }
.tr-btn { font: inherit; font-size: 12.5px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); border-radius: 8px; padding: 4px 9px; cursor: pointer; }
.tr-btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.tr-btn:disabled { opacity: .45; cursor: default; }
.tr-btn:not(:disabled):hover { filter: brightness(.96); }
.sel-btn.sel-tr { font-weight: 600; min-width: 26px; }
/* Stichwörter für Auszüge */
.tp .pop-label { margin-bottom: 6px; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; min-height: 22px; }
.tp-chips .tagchip { cursor: pointer; }
.tp-chips .tagchip.part { opacity: .6; border-style: dashed; }
.tp-x { margin-left: 4px; opacity: .5; }
.tp-chips .tagchip:hover .tp-x { opacity: 1; }
.tp-empty { font-size: 12px; color: var(--faint); }
.tp-input { width: 100% !important; box-sizing: border-box; border: 1px solid var(--line2) !important; border-radius: 8px; padding: 6px 8px !important; font-size: 13px !important; color: var(--text) !important; background: var(--bg) !important; display: block !important; }
.tp-hint { font-size: 11px; color: var(--faint); margin-top: 6px; }
.hl-bar-tag { font-weight: 600; position: relative; }
.hl-bar-tag sup { font-size: 9px; margin-left: 1px; }
/* Auszugs-Karten: Stichwort-Feld immer erreichbar (dezent), nicht nur beim Überfahren */
.pw-x .tag-input { display: inline-block; width: 22px; opacity: .55; transition: width .15s, opacity .15s; }
.pw-x .tag-input::placeholder { color: var(--faint); }
.pw-x .card:hover .tag-input, .pw-x .card:focus-within .tag-input, .pw-x .tag-input:focus { width: 90px; opacity: 1; }
html.phone .pw-x .tag-input { width: 130px; opacity: 1; }
/* Kalender: viele Termine an einer Stelle */
.cal-grid .cal-day { min-height: 0; overflow: hidden; }
.cal-day .cal-ev { flex-direction: row; align-items: baseline; gap: 5px; padding: 2px 6px; flex: none; }
.cal-day .cal-ev .cal-ev-t { flex: none; }
.cal-day .cal-ev .cal-ev-n { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; -webkit-line-clamp: unset; }
.cal-day .cal-task .cal-tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-more { font-size: 11.5px; cursor: pointer; border: 0; padding: 1px 4px !important; border-radius: 4px; flex: none; }
.cal-more:hover { color: var(--text); background: var(--hover, rgba(0,0,0,.05)) !important; }
.wk-ad { max-height: 132px; overflow: hidden; }
.wk-ad .cal-ev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.wk-ev.narrow { padding: 2px 4px; font-size: 10.5px; }
.wk-ev.narrow span { display: none; }
.wk-ev.narrow b { white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: auto; -webkit-hyphens: auto; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.wk-more-ev { display: flex !important; align-items: flex-start; justify-content: center; border: 0; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, var(--bg)) !important; border-left: 0 !important; z-index: 20; }
.wk-more-ev:hover { color: var(--text); background: color-mix(in srgb, var(--muted) 20%, var(--bg)) !important; }
.cal-pop { position: fixed; z-index: 1100; width: 280px; max-height: min(420px, 70vh); display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--card, var(--bg)); border-radius: 12px; box-shadow: 0 0 0 .5px var(--line2), 0 12px 32px rgba(0,0,0,.18); animation: tr-in .12s ease; }
.cal-pop-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; }
.cal-pop-l { display: flex; flex-direction: column; gap: 4px; overflow: auto; min-height: 0; }
.cal-pop-l .cal-ev { flex-direction: row; align-items: baseline; gap: 6px; white-space: normal; flex: none; }
.cal-pop-l .cal-ev-n { display: block; -webkit-line-clamp: unset; white-space: normal; }
.cal-pop-b { align-self: flex-end; }
/* Notizen-Startseite (neu): Filterleiste links, Liste nach Datum rechts */
.nv2 .page-head { align-items: baseline; }
.nv2-count { font-size: 15px; margin-left: 10px; }
.nv2-cols { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 6px; }
.nvn { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 140px); overflow: auto; padding-bottom: 20px; }
.nvn-i { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--text); text-align: left; padding: 6px 9px; border-radius: 8px; cursor: pointer; }
.nvn-i:hover { background: var(--hover, rgba(0,0,0,.045)); }
.nvn-i.on { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--text); font-weight: 600; }
.nvn-ic { width: 18px; flex: none; display: inline-flex; justify-content: center; font-size: 13px; }
.nvn-ic svg.i { width: 15px; height: 15px; margin: 0; }
.nvn-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nvn-c { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nvn-sec { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.nvn-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 0 9px 4px; }
.nvn-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 2px 6px; }
.nvn-tags .tagchip { cursor: pointer; }
.nvn-tags .tagchip.on { box-shadow: 0 0 0 1.5px var(--accent); }
.nv2-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.nvq { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 1px 3px rgba(0,0,0,.04); }
.nvq:focus-within { box-shadow: 0 0 0 1.5px var(--accent), 0 2px 8px rgba(0,0,0,.06); }
.nvq-plus { color: var(--muted); font-size: 16px; }
.nvq-in { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; font-size: 15px; color: var(--text); padding: 6px 0; }
.nvq-in::placeholder { color: var(--faint); }
.nv2 .pv-tools { margin: 0; }
.nv2 .pv-search { flex: 1; min-width: 160px; }
.nv2-sec { margin-top: 4px; }
.nv2-sec .pv-h { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-top: 6px; }
.nv2-row { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.nv2-row .nvo-ic { margin-top: 1px; }
.nv2-snip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; line-height: 1.45; }
.nv2-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.nv2-tag { color: var(--muted); }
.nv2-pin { font-size: 11px; margin-right: 5px; }
.nv2-row .nvo-date { margin-top: 2px; }
@media (max-width: 900px) { .nv2-cols { grid-template-columns: 1fr; } .nvn { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; gap: 4px; } .nvn-i { width: auto; } .nvn-sec { flex-direction: row; flex-wrap: wrap; margin-top: 0; align-items: center; } .nvn-h { display: none; } }
html.phone .nv2-cols { grid-template-columns: 1fr; gap: 10px; }
html.phone .nvn { position: static; flex-direction: row; overflow-x: auto; flex-wrap: nowrap; max-height: none; padding-bottom: 4px; }
html.phone .nvn-sec { flex-direction: row; margin-top: 0; }
html.phone .nvn-h, html.phone .nvn-tags { display: none; }
html.phone .nvn-i { width: auto; white-space: nowrap; flex: none; }
/* Untertags: Ausklapp-Pfeil sichtbar, Zahlen bündig auch ohne Pfeil */
.sb-children .sb-item:not(:has(> .sb-disc)) > .sb-sub, .sb-indent .sb-item:not(:has(> .sb-disc)) > .sb-sub { margin-right: 22px; }
.sb-children .sb-disc, .sb-indent .sb-disc { color: var(--muted); }
/* Auszüge in Auszügen: ohne Anführungszeichen, aber klar als Zitat bzw. Paraphrase erkennbar */
.card-kid-tag { font-size: 10.5px; font-weight: 600; letter-spacing: .01em; padding: 0 6px; border-radius: 999px; line-height: 17px; white-space: nowrap; }
.card-kid-tag.kt-quote { color: color-mix(in srgb, var(--kc) 55%, var(--text)); background: color-mix(in srgb, var(--kc) 22%, transparent); }
.card-kid-tag.kt-para { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line2); font-weight: 500; }
.card-kid:has(.kid-para)::before { background: repeating-linear-gradient(to bottom, var(--kc) 0 4px, transparent 4px 7px); opacity: .9; }
.card-kid-t.kid-quote { font-style: normal; }
.card-kid-t.kid-para { font-family: var(--font); font-size: 12.5px; color: var(--muted); }
.card-kid-t i, .xb-kid i, .card-text i, .xb-text i { font-style: italic; }
.card-kid-t.kid-para i { font-style: normal; text-decoration: underline dotted; }
.xb-kid { display: flex; gap: 6px; align-items: baseline; }
.xb-kid-k { flex: none; font-size: 11px; color: color-mix(in srgb, var(--kc) 60%, var(--text)); }
.xb-kid.kid-para { color: var(--muted); }
.xb-kid.kid-para .xb-kid-k { color: var(--faint); }
/* Auszug auf Auszug ziehen = darunter sammeln */
.card.drop-link { box-shadow: 0 0 0 2px var(--accent), 0 6px 18px color-mix(in srgb, var(--accent) 25%, transparent) !important; position: relative; }
.card.drop-link::after { content: '＋ hier als Zitat sammeln'; position: absolute; right: 8px; top: -11px; z-index: 5; font: 600 11px/20px var(--font); padding: 0 8px; border-radius: 999px; background: var(--accent); color: #fff; pointer-events: none; }
.msel-ghost { position: fixed; left: -999px; top: -999px; padding: 4px 10px; border-radius: 8px; background: var(--accent); color: #fff; font: 600 12px var(--font); }
/* KI-Kurzfassung */
.card-sum, .xb-sum { display: flex; gap: 6px; align-items: baseline; margin: 6px 12px 2px; padding: 6px 9px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text); background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--accent) 30%, transparent); }
.xb-sum { margin: 6px 0 2px; }
.sum-k { color: var(--accent); font-size: 11px; flex: none; }
/* KI-Stichwortvorschläge auf Karten */
.card-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 2px 12px 8px; }
.sug-chip { border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line2)); background: color-mix(in srgb, var(--accent) 6%, transparent); color: var(--text); font: 500 11.5px var(--font); padding: 1px 8px; border-radius: 999px; cursor: pointer; }
.sug-chip:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); border-style: solid; }
.sug-x { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 11px; padding: 0 4px; }
.sug-x:hover { color: var(--text); }
/* Ergebnis von „Testen“ als eigene Zeile unter der Einstellung */
.set-test { font-size: 12px; line-height: 1.4; padding: 0 2px 10px; margin-top: -4px; text-align: right; overflow-wrap: anywhere; }
.set-test.wait { color: var(--muted); }
.set-test.ok { color: #2e8b4a; }
.set-test.err { color: #c0392b; }
.btn.busy { opacity: .6; pointer-events: none; }
/* Vollbild: Menüleiste fährt ein → Oberfläche rückt nach unten, Tabs bleiben anklickbar */
html.fs #app { transition: padding-top .18s ease; }
html.fs.fs-mb #app { padding-top: var(--fs-mb, 24px); }
html.fs.fs-mb .isl { opacity: 0; pointer-events: none; }
/* Vollbild „bis ganz oben“ mit Notch: wie bei Apples Apps bleibt die Zeile der Notch für die Menüleiste frei
   (sie klappt dort auf, ohne etwas zu verdecken); die Zeile hat die Farbe der Tab-Leiste, alles darunter ist normal */
html.fs.notch #app { padding-top: var(--notch-h, 38px); box-sizing: border-box; }
html.fs.notch, html.fs.notch body { background: var(--sb-bg, var(--bg2)); }
.isl { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 900; height: var(--notch-h, 38px); width: calc(var(--isl-w, 200px) + 2 * 112px); font: 500 12px/1 var(--font); -webkit-app-region: no-drag; }
.isl-bar { display: flex; align-items: center; height: 100%; }
.isl-ear { flex: 0 0 112px; height: calc(100% - 8px); display: flex; align-items: center; box-sizing: border-box; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0,0,0,.06); color: var(--muted); }
/* die Ohren schmiegen sich an die Aussparung: außen rund wie ein Tab, zur Notch hin gerade und bündig */
.isl-ear-l { border-radius: 10px 0 0 10px; padding: 0 2px 0 4px; }
.isl-ear-r { border-radius: 0 10px 10px 0; padding: 0 4px 0 2px; }
.isl-mid { flex: 1; align-self: stretch; cursor: pointer; }
.isl-l, .isl-r { flex: 1 1 0; min-width: 0; height: 24px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 7px; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.isl-l { justify-content: flex-start; }
.isl-r { justify-content: flex-end; }
.isl-l::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .8; }
.isl-l:hover, .isl-r:hover, .isl-more:hover { background: var(--hover, rgba(0,0,0,.05)); color: var(--text); }
.isl-more { flex: none; width: 20px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; font-size: 12px; line-height: 1; padding: 0; }
.isl.open .isl-more { transform: rotate(180deg); }
.isl.soon .isl-l { color: #b7791f; }
.isl.soon .isl-l::before { background: #e0a030; opacity: 1; }
.isl.run .isl-r { color: #2e8b4a; }
.isl.done .isl-ear { animation: isl-pulse .6s ease 3; }
@keyframes isl-pulse { 50% { box-shadow: 0 0 0 2px #2e8b4a; } }
.isl-p { display: none; }
.isl.open .isl-p { display: flex; flex-direction: column; position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% + 6px); width: 300px; padding: 4px 14px 10px; background: var(--card, var(--bg)); color: var(--text); border-radius: 14px; box-shadow: 0 0 0 .5px var(--line2), 0 16px 40px rgba(0,0,0,.16); animation: isl-in .16s ease; }
@keyframes isl-in { from { opacity: 0; transform: translate(-50%, -6px); } }
.isl-sec { padding: 10px 2px; border-top: 1px solid var(--line); cursor: default; }
.isl-sec:first-child { border-top: 0; cursor: pointer; }
.isl-todo { cursor: pointer; }
.isl-k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 6px; }
.isl-big { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text); }
.isl-time { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 2px 0 8px; }
.isl-sub { font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 2px; }
.isl-row { display: flex; gap: 6px; flex-wrap: wrap; }
.isl-b { border: 0; border-radius: 999px; padding: 5px 11px; background: var(--hover, rgba(0,0,0,.06)); color: var(--text); font: 500 12px var(--font); cursor: pointer; }
.isl-b:hover { filter: brightness(.96); }
.isl-b.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.isl-b.pri { background: var(--accent); color: #fff; }
/* obere Leiste: Bedienelemente auf einer Linie mit den Ampel-Knöpfen von macOS (Mitte bei 20 px) */
#tabbar { height: 41px; box-sizing: border-box; }
html.fs #tabbar { height: 41px; }
html.fs .sb-top { height: 41px; }

/* Leistung: lange Listen – Zeilen außerhalb des Sichtbereichs werden nicht gelayoutet/gezeichnet */
.nvo-list > *, .lib-row, .pv-list > .pv-row, .kb-card, .ag-row, .tg-row, .tr-row { content-visibility: auto; contain-intrinsic-size: auto 64px; }
.kb-card { contain-intrinsic-size: auto 52px; }
/* Reader: Markierungs-Striche am rechten Rand */
.rd-marks { position: absolute; right: 3px; width: 7px; z-index: 6; pointer-events: none; }
.rd-mk { position: absolute; left: 0; width: 7px; height: 3px; margin-top: -1px; padding: 0; border: 0; border-radius: 2px; background: var(--mc); opacity: .85; pointer-events: auto; cursor: pointer; transition: transform .12s ease, opacity .12s; }
.rd-mk:hover { transform: scaleX(1.6) scaleY(1.5); transform-origin: right center; opacity: 1; }
.rd-mk.bm { background: var(--accent); width: 5px; left: 1px; height: 7px; border-radius: 1px 1px 4px 4px; }
/* Reader: Zurück-Pille nach Sprüngen */
.rd-back { position: absolute; left: 50%; bottom: 18px; z-index: 30; transform: translate(-50%, 12px); opacity: 0; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px 0 11px; border: 0; border-radius: 999px; background: var(--card, var(--bg)); color: var(--text); font: 500 13px var(--font); box-shadow: 0 0 0 .5px var(--line2), 0 8px 24px rgba(0,0,0,.16); cursor: pointer; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s ease; }
.rd-back.on { transform: translate(-50%, 0); opacity: 1; }
.rd-back:hover { box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(0,0,0,.18); }
.rd-back:active { transform: translate(-50%, 0) scale(.97); }
.rd-back-i { color: var(--accent); font-size: 15px; }
/* Leertaste-Vorschau (Quick Look) */
.ql { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1300; width: min(560px, calc(100vw - 48px)); max-height: min(72vh, 640px); display: flex; flex-direction: column; background: var(--card, var(--bg)); color: var(--text); border-radius: 16px; box-shadow: 0 0 0 .5px var(--line2), 0 30px 80px rgba(0,0,0,.28); animation: ql-in .16s cubic-bezier(.2,.8,.2,1); overflow: hidden; }
@keyframes ql-in { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } }
.ql-body { padding: 20px 22px 14px; overflow: auto; min-height: 0; }
.ql-kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin-bottom: 6px; }
.ql-title { font-family: var(--serif, 'Times New Roman', Georgia, serif); font-size: 22px; line-height: 1.25; margin-bottom: 6px; }
.ql-sub { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.ql-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ql-stats b { color: var(--text); font-weight: 600; }
.ql-list { display: flex; flex-direction: column; gap: 8px; }
.ql-x { display: flex; gap: 10px; align-items: baseline; padding-left: 10px; border-left: 3px solid var(--qc); font-family: var(--serif, 'Times New Roman', Georgia, serif); font-size: 14px; line-height: 1.45; }
.ql-x-t { flex: 1; min-width: 0; }
.ql-x-p { flex: none; font-family: var(--font); font-size: 11px; color: var(--faint); }
.ql-text { font-size: 14px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.ql-empty { padding: 6px 0; }
.ql-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 12px 22px; border-top: 1px solid var(--line); }
.ql-on { box-shadow: inset 0 0 0 2px var(--accent) !important; border-radius: 10px; }
/* Bedien-Gefühl: einheitliche, kurze Rückmeldung beim Drücken (wie AppKit-Knöpfe) und weiche Zustandswechsel */
.btn, .tb-btn, .tab-ctl, .seg-b, .cf, .sb-item, .hl-bar-b, .sel-btn, .sel-color, .msel-b, .msel-dot, .isl-b, .tr-btn, .lib-pick, .hm-link, .card-kid-b, .sug-chip, .nvn-i, .pv-row, .nvo-row, .lib-row {
  transition: background-color .12s ease, color .12s ease, box-shadow .12s ease, opacity .12s ease, transform .1s ease;
}
.btn:active:not(:disabled), .tb-btn:active:not(:disabled), .tab-ctl:active:not(:disabled), .seg-b:active, .hl-bar-b:active, .sel-btn:active, .msel-b:active, .isl-b:active, .tr-btn:active:not(:disabled), .lib-pick:active, .card-kid-b:active, .sug-chip:active, .nvn-i:active { transform: scale(.965); }
.sel-color:active, .msel-dot:active, .cf:active { transform: scale(.88); }
.pv-row:active, .nvo-row:active, .lib-row:active { transform: scale(.995); }
button, [role="button"], .tab, .sb-item, .nvn-i, .cf { -webkit-tap-highlight-color: transparent; }
/* Tastaturfokus nur bei Tastaturbedienung sichtbar, dann deutlich */
:focus:not(:focus-visible) { outline: none; }
.sb-item:focus-visible, .tab:focus-visible, .nvn-i:focus-visible, .card:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 1px; }
/* Ziffern in Zählern und Zeiten gleich breit (nichts springt beim Hochzählen) */
.sb-sub, .nvn-c, .pv-c, .tab-count, .pg-num, .cal-ev-t, .msel-n, .nv2-count, .graph-cnt { font-variant-numeric: tabular-nums; }
/* weniger Bewegung, wenn in macOS eingestellt */
/* Fehlerdurchgang: Häkchen sitzt mittig im Kreis und ragt nicht heraus */
.kb-check { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-size: 10px; line-height: 1; box-sizing: border-box; }
.kb-check.sm { font-size: 8.5px; }
/* schmales Fenster: eingefahrene Seitenleiste ist auch für Tab-Taste/VoiceOver weg */
@media (max-width: 999px) {
  #sidebar { visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
  body.sidebar-open #sidebar, body.sb-peek #sidebar { visibility: visible; transition: transform .22s ease, visibility 0s; }
}
/* Lesefortschritt unter Reader-Tabs */
.tab { position: relative; }
.tab-prog { position: absolute; left: 10px; right: 10px; bottom: 3px; height: 2px; border-radius: 1px; background: color-mix(in srgb, var(--faint) 30%, transparent); overflow: hidden; pointer-events: none; }
.tab-prog::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); background: var(--accent); opacity: .7; border-radius: 1px; }
.tab.active .tab-prog::after { opacity: 1; }
/* Tab-Vorschau beim Überfahren */
.tab-peek { position: fixed; z-index: 1250; width: 260px; padding: 11px 13px 12px; border-radius: 12px; background: var(--card, var(--bg)); color: var(--text); box-shadow: 0 0 0 .5px var(--line2), 0 12px 32px rgba(0,0,0,.16); pointer-events: none; opacity: 0; transform: translateY(-4px); transition: opacity .14s ease, transform .14s ease; }
.tab-peek.on { opacity: 1; transform: none; }
.tp-k { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin-bottom: 4px; }
.tp-t { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.tp-snip { font-size: 12px; line-height: 1.45; color: var(--muted); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-l { font-size: 11.5px; color: var(--faint); margin-top: 7px; font-variant-numeric: tabular-nums; }
.tp-bar { height: 3px; border-radius: 2px; background: var(--line); margin-top: 7px; overflow: hidden; }
.tp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
/* ⌘ halten: Tastenkürzel */
.ks { position: fixed; left: 50%; top: 50%; z-index: 1400; transform: translate(-50%, -50%) scale(.98); opacity: 0; display: flex; gap: 34px; padding: 22px 26px; border-radius: 16px; background: color-mix(in srgb, var(--card, var(--bg)) 92%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4); box-shadow: 0 0 0 .5px var(--line2), 0 30px 80px rgba(0,0,0,.25); pointer-events: none; transition: opacity .16s ease, transform .16s ease; max-width: calc(100vw - 40px); }
.ks.on { opacity: 1; transform: translate(-50%, -50%); }
.ks-col { display: flex; flex-direction: column; gap: 7px; min-width: 250px; }
.ks-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-bottom: 4px; }
.ks-r { display: grid; grid-template-columns: 112px 1fr; align-items: baseline; gap: 12px; font-size: 13px; }
.ks-r kbd { justify-self: end; font: 500 12px var(--font); color: var(--text); padding: 2px 7px; border-radius: 6px; background: var(--hover, rgba(0,0,0,.06)); box-shadow: inset 0 -1px 0 var(--line2); white-space: nowrap; }
.ks-r span { color: var(--muted); }
.nv2-more { display: flex; margin: 14px auto 6px; }
/* lange Zitate: sanft ausblenden statt hart abschneiden, mit „Ganzes Zitat“ aufklappbar */
.card-text.clipped { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent); }
.card-text.full { max-height: none !important; -webkit-line-clamp: unset !important; display: block !important; overflow: visible !important; }
.card-more { display: block; margin: -2px 10px 4px auto; padding: 2px 8px; border: 0; border-radius: 6px; background: none; color: var(--accent); font: 500 11.5px var(--font); cursor: pointer; }
.card-more:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.card-more[hidden] { display: none; }
/* KI ordnet in Räume */
.ai-org-b { color: var(--accent) !important; font-weight: 600; }
.ai-org { width: min(520px, calc(100vw - 48px)); display: flex; flex-direction: column; gap: 8px; }
.ai-org-l { font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.ai-org-ta { width: 100%; box-sizing: border-box; resize: vertical; min-height: 92px; font: 13.5px/1.5 var(--font); }
.ai-org-c { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.ai-org-info { min-height: 18px; margin: 4px 0 2px; }
.ai-org .row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.pw-x .card.placed { padding-bottom: 20px; }
.pw-x .card.placed::after { line-height: 1; }
/* Raum löschen */
.ws-frame-x { align-self: center; width: 20px; height: 20px; margin-left: 2px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; opacity: 0; cursor: pointer; display: inline-grid; place-items: center; transition: opacity .12s, background .12s; }
.ws-frame-x::before { content: ''; width: 10px; height: 10px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 1.5l7 7M8.5 1.5l-7 7' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 1.5l7 7M8.5 1.5l-7 7' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.ws-frame:hover .ws-frame-x, .ws-frame.room-sel .ws-frame-x { opacity: .55; }
.ws-frame-x:hover { opacity: 1 !important; background: color-mix(in srgb, var(--fc) 30%, transparent); }
.ws-canvas.far .ws-frame-x { display: none; }
.ws-frame.room-sel { box-shadow: 0 0 0 2px color-mix(in srgb, var(--fc) 70%, var(--accent)); }
.ws-frame.room-sel .ws-frame-t { background: color-mix(in srgb, var(--fc) 26%, transparent); }
/* Filter: Zitate auf der Arbeitsfläche ausblenden */
.cf.cf-placed { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.cf.cf-placed:hover { color: var(--text); }
.cf.cf-placed.on { box-shadow: none; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.cf-eye { width: 13px; height: 13px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M1.5 8s2.4-4.5 6.5-4.5S14.5 8 14.5 8 12.1 12.5 8 12.5 1.5 8 1.5 8z'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M1.5 8s2.4-4.5 6.5-4.5S14.5 8 14.5 8 12.1 12.5 8 12.5 1.5 8 1.5 8z'/%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3C/svg%3E") center/contain no-repeat; }
.cf-eye.off { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2.5 5.5C1.9 6.5 1.5 8 1.5 8s2.4 4.5 6.5 4.5c1 0 1.9-.3 2.7-.7M6 3.8c.6-.2 1.3-.3 2-.3 4.1 0 6.5 4.5 6.5 4.5s-.5 1-1.4 2M2 2l12 12'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2.5 5.5C1.9 6.5 1.5 8 1.5 8s2.4 4.5 6.5 4.5c1 0 1.9-.3 2.7-.7M6 3.8c.6-.2 1.3-.3 2-.3 4.1 0 6.5 4.5 6.5 4.5s-.5 1-1.4 2M2 2l12 12'/%3E%3C/svg%3E"); }
.cf-n { font-size: 10.5px; font-variant-numeric: tabular-nums; opacity: .75; }
/* Lektüren in „Auszüge“ einklappbar */
.pw-xg-h { align-items: center !important; border-radius: 8px; user-select: none; -webkit-user-select: none; }
.pw-xg-h:hover .pw-xg-chev { opacity: .9; }
.pw-xg-t { flex: 1; min-width: 0; }
.pw-xg-n { flex: none; }
.pw-xg-chev { flex: none; width: 10px; height: 10px; opacity: .55; background: currentColor; transition: transform .16s ease, opacity .12s; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5l3 3 3-3' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 3.5l3 3 3-3' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.pw-xgroup.folded .pw-xg-chev { transform: rotate(-90deg); }
.pw-xgroup.folded .pw-xg-h { margin-bottom: 2px; color: var(--muted); }
.pw-xgroup.folded .pw-xg-h.on { color: var(--accent); }
.pw-xg-open { flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; opacity: 0; cursor: pointer; display: grid; place-items: center; transition: opacity .12s, background .12s; }
.pw-xg-open::before { content: ''; width: 11px; height: 11px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 2H2.5v7.5H10V7M7 2h3v3M10 2L5.5 6.5'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 2H2.5v7.5H10V7M7 2h3v3M10 2L5.5 6.5'/%3E%3C/svg%3E") center/contain no-repeat; }
.pw-xg-h:hover .pw-xg-open { opacity: .6; }
.pw-xg-open:hover { opacity: 1 !important; background: var(--hover, color-mix(in srgb, var(--text) 8%, transparent)); }
.pw-xfold-all { flex: none; border: 0; background: none; padding: 0; color: var(--accent); font: 500 11px var(--font); cursor: pointer; white-space: nowrap; }
.pw-xgroup.folded { margin-bottom: 0; }
.pw-xgroup.folded .pw-xg-h { margin: 0 !important; padding-top: 5px; padding-bottom: 5px; }
/* automatische Kopfzeile für Bereiche ohne eigene (z. B. Arbeitsfläche oben) */
.has-autohead { display: flex !important; flex-direction: column; }
.has-autohead > .cv-wrap { height: auto !important; flex: 1 1 0; min-height: 0; }
.has-autohead > :not(.pw-autohead):not(.cv-wrap) { min-height: 0; }
.pw-autohead { background: var(--bg); position: relative; z-index: 3; }
.pw-autohead-t { font-size: 13px; font-weight: 600; white-space: nowrap; }
.pw-autohead-h { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Überschriften im Editor wie in Notion: 30 / 24 / 20 px, halbfett, enge Zeilenhöhe, Abstand nach oben statt nach unten */
.ProseMirror :is(h1, h2, h3, h4) { font-family: var(--font) !important; font-weight: 600 !important; line-height: 1.3 !important; color: var(--text) !important; text-transform: none !important; letter-spacing: -.01em !important; padding: 3px 0 !important; }
.ProseMirror h1 { font-size: 1.875em !important; margin: 1.5em 0 .15em !important; letter-spacing: -.018em !important; }
.ProseMirror h2 { font-size: 1.5em !important; margin: 1.3em 0 .1em !important; letter-spacing: -.014em !important; }
.ProseMirror h3 { font-size: 1.25em !important; margin: 1.05em 0 .08em !important; }
.ProseMirror h4 { font-size: 1.08em !important; margin: 1em 0 .05em !important; }
.ProseMirror > :is(h1, h2, h3, h4):first-child { margin-top: .3em !important; }
.ProseMirror :is(h1, h2, h3, h4) + p { margin-top: .15em; }
/* in Serif-/Papier-/Mono-Ansicht folgen Überschriften der gewählten Schrift (wie Notion „Serif“) */
.nv-page.paper .ProseMirror :is(h1, h2, h3, h4), .nv-page.look-serif .ProseMirror :is(h1, h2, h3, h4) { font-family: var(--serif) !important; font-weight: 600 !important; }
.nv-page.look-mono .ProseMirror :is(h1, h2, h3, h4) { font-family: ui-monospace, 'SF Mono', Menlo, monospace !important; }
.sg-item .sg-tx { flex: 1; min-width: 0; }
.sg-md { flex: none; margin-left: 8px; font: 500 11.5px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--faint, var(--muted)); letter-spacing: .02em; }
/* Suchtreffer in Auszügen */
::highlight(cb-search) { background-color: color-mix(in srgb, var(--accent) 26%, transparent); color: inherit; }
.card-kid.kid-hit { box-shadow: inset 3px 0 0 var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 6px; }
/* Lücke beim Ziehen in eine Notiz */
body.cb-edgap .ProseMirror-dropcursor { display: none !important; }
.cb-gapline { position: fixed; height: 2px; border-radius: 1px; background: var(--accent); pointer-events: none; z-index: 9999; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); transition: top .18s cubic-bezier(.2,.8,.2,1); }
.ProseMirror > * { transition: transform .22s cubic-bezier(.2,.8,.2,1); }
body.cb-edgap [class^="prosemirror-dropcursor"], body.cb-edgap [class*=" prosemirror-dropcursor"] { display: none !important; }

/* ================= Feinschliff 0.75: klar, ruhig, konsistent (moderne Web-App-Anmutung) ================= */
:root {
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --sh-sm: 0 1px 2px rgba(28, 25, 23, .05);
  --sh-md: 0 1px 2px rgba(28, 25, 23, .04), 0 6px 16px -6px rgba(28, 25, 23, .12);
}
/* Tastatur-Fokus überall gleich sichtbar, Mausklicks ohne Rahmen */
:where(button, a, [role="button"], .btn, .tb-btn, .cf, .seg-b, summary, [tabindex]:not([tabindex="-1"])):focus-visible { outline: none !important; box-shadow: var(--ring) !important; border-radius: 8px; }
:where(button, .btn, .tb-btn):focus:not(:focus-visible) { outline: none; }
/* Eingabefelder: ruhiger Rahmen, deutlicher Fokus-Ring */
:where(.input, input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="number"], input:not([type]), textarea, select):not(.tag-input):not(.ProseMirror *):not(.nv-title):not(.nv-subtitle):not(.crs-topic):not(.crs-subtopic):not(.card-comment):not(.nb-title):not(.td *):not(.qe-in):not(.lv-add-in):not(.cbw-gal-q):not(.ft-t):not(.cbw-memo-in):focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line2)) !important; box-shadow: var(--ring) !important; outline: none;
}
:where(.input, textarea, select) { transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out), background-color .15s; }
/* Knöpfe: weiche Übergänge, kleines Eindrücken beim Klicken, klarer deaktivierter Zustand */
:where(.btn, .tb-btn, .cf, .seg-b, .hm-act, .sb-item, .chip) { transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), color .15s, box-shadow .15s var(--ease-out), transform .12s var(--ease-out), opacity .15s; }
:where(.btn, .tb-btn):active:not(:disabled) { transform: scale(.97); }
:where(.btn, .tb-btn, button):disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { box-shadow: var(--sh-sm), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
/* Zahlen in Zählern und Tabellen bleiben ruhig stehen */
.muted.tiny, .pw-xg-n, .cf-n, .sb-count, .ws-frame-n, .kb-count, td, .nv-count { font-variant-numeric: tabular-nums; }
/* Startseite: Schnellaktionen als klare Kacheln (ohne Holzbrett), nichts ragt heraus */
.hm-plank { height: 1px !important; margin: 2px 6px 0 !important; background: var(--line) !important; box-shadow: none !important; border-radius: 0 !important; }
.hm-act { border-radius: 12px !important; box-shadow: 0 0 0 1px var(--line), var(--sh-sm) !important; }
.hm-act:hover { transform: translateY(-1px) !important; box-shadow: 0 0 0 1px var(--line2), var(--sh-md) !important; }
.hm-act-t b { font-family: var(--font) !important; font-size: 14px !important; font-weight: 600 !important; letter-spacing: -.005em; }
.hm-shelf { overflow: visible; }
/* Häkchen in kleinen Kreisen nicht abgeschnitten */
.kb-check { display: inline-grid; place-items: center; overflow: hidden; }
.kb-check.sm { font-size: 8.5px; line-height: 1; }
/* Stichwort-Feld in Auszugskarten: eingeklappt nur „#“, beim Überfahren ganz */
.pw-x .tag-input:not(:focus):placeholder-shown { width: 13px; }
.pw-x .card:hover .tag-input:placeholder-shown, .pw-x .card:focus-within .tag-input:placeholder-shown { width: 90px; }
/* Karten und Panels: einheitliche, leichte Tiefe */
.hc { box-shadow: var(--sh-sm); }
/* Leere Zustände ruhiger */
.empty-state, .pw-xempty { color: var(--muted); text-align: center; padding: 28px 16px; }
/* Automatisch gefundene Literaturangabe: Vorschau und Leiste */
.cb-refpeek { position: absolute; border-radius: 4px; background: color-mix(in srgb, var(--olive, #6f9a6b) 22%, transparent); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--olive, #6f9a6b) 70%, transparent); pointer-events: none; animation: cbPeek 1.6s ease-in-out infinite; }
@keyframes cbPeek { 50% { background: color-mix(in srgb, var(--olive, #6f9a6b) 34%, transparent); } }
.rd-litbar-ref { color: var(--text) !important; font-family: var(--serif); font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding: 4px 0 2px; }
.rd-litbar-busy::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 6px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; vertical-align: -1px; animation: spin .8s linear infinite; }
.rd-litbar { flex-wrap: wrap; }
.rd-litbar-tx { min-width: 220px; }
.cb-refpop { display: flex; flex-direction: column; gap: 8px; }
.cb-refpop-t { font-family: var(--serif); font-size: 13.5px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--olive, #6f9a6b) 10%, var(--bg)); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--olive, #6f9a6b) 70%, transparent); }
.cb-refpop-b { display: flex; gap: 6px; flex-wrap: wrap; }
.cb-refall-bar { display: flex; align-items: center; gap: 10px; padding: 6px 4px 10px; }
.cb-refall-bar > span { flex: 1; min-width: 0; }
.cb-refall { width: min(640px, calc(100vw - 48px)); display: flex; flex-direction: column; gap: 10px; }
.cb-refall-l { max-height: 56vh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.cb-refall-r { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.cb-refall-r:hover { background: var(--hover); }
.cb-refall-r input { margin-top: 3px; flex: none; }
.cb-refall-m { font-size: 12.5px; color: var(--muted); }
.cb-refall-t { font-family: var(--serif); font-size: 13.5px; line-height: 1.4; margin-top: 3px; }
.cb-refall .row-end { display: flex; justify-content: flex-end; gap: 8px; }
.cb-refall { width: min(520px, calc(100vw - 48px)) !important; }
.cb-refall-r > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* ===== Arbeitsraum in mehreren Fenstern ===== */
body.cb-detwin #sidebar { display: none !important; }
.pw-only.cb-det { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.pw-only.cb-det > :not(.pw-detbar) { flex: 1 1 0; min-height: 0; height: auto !important; border-radius: 0; box-shadow: none; }
.pw-only.cb-det > .pw-x { width: auto !important; max-width: none; padding: 12px 16px; }
.pw-detbar { flex: none; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.pw-detbar-p { display: inline-grid; place-items: center; }
.pw-detbar-t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pw-detbar-k { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pw-detbar-k::before { content: "\00B7"; margin-right: 8px; color: var(--faint); }
.pw-detbar-live { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 12px; font-size: 11.5px; font-weight: 500; color: #3f7a3a; background: color-mix(in srgb, #5fb236 13%, transparent); white-space: nowrap; }
.pw-detbar-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5fb236; box-shadow: 0 0 0 3px color-mix(in srgb, #5fb236 22%, transparent); animation: cbLive 2.4s ease-in-out infinite; }
@keyframes cbLive { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, #5fb236 8%, transparent); } }
@media (prefers-color-scheme: dark) { .pw-detbar-live { color: #8fd27a; } }
.pw-win-btn { display: inline-flex; align-items: center; gap: 7px; }
.pw-win-ic { width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'%3E%3Crect x='1.75' y='3.75' width='9' height='9' rx='1.6'/%3E%3Cpath d='M5.25 3.75V2.9c0-.6.5-1.15 1.15-1.15h6.7c.6 0 1.15.5 1.15 1.15v6.7c0 .6-.5 1.15-1.15 1.15h-.85'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'%3E%3Crect x='1.75' y='3.75' width='9' height='9' rx='1.6'/%3E%3Cpath d='M5.25 3.75V2.9c0-.6.5-1.15 1.15-1.15h6.7c.6 0 1.15.5 1.15 1.15v6.7c0 .6-.5 1.15-1.15 1.15h-.85'/%3E%3C/svg%3E") center/contain no-repeat; }
.pw-win-btn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line2)); background: color-mix(in srgb, var(--accent) 7%, var(--bg)); }
/* ausgelagerte Bereiche im Hauptfenster */
.pw-slot.cb-detached { position: relative; border-radius: 14px; background: color-mix(in srgb, var(--accent) 6%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 35%, transparent); }
.pw-slot.cb-detached::after { content: "\29C9  " attr(data-det) " \00B7  eigenes Fenster"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; font-size: 11.5px; font-weight: 500; color: var(--accent); pointer-events: none; }
.pw-cvbar.cb-detached .pw-cvhint::after { content: " \00B7  in eigenem Fenster"; color: var(--accent); }
/* Abgleich mit Zotero: Details */
.cbz { width: min(560px, calc(100vw - 48px)); display: flex; flex-direction: column; gap: 10px; }
.cbz-l { max-height: 60vh; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.cbz-row { padding: 10px 12px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.cbz-t { font-weight: 600; font-size: 13.5px; cursor: pointer; margin-bottom: 4px; }
.cbz-t:hover { color: var(--accent); }
.cbz-ch { display: flex; flex-direction: column; gap: 3px; }
.cbz-f { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 12.5px; }
.cbz-k { color: var(--muted); }
.cbz-old { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); overflow-wrap: anywhere; }
.cbz-arr { color: var(--faint); }
.cbz-new { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.cbz .row-end { display: flex; justify-content: flex-end; }
.cbz { width: min(500px, calc(100vw - 48px)) !important; }
.cbz-src { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 1px; }
.cbz-f { grid-template-columns: 104px minmax(0, 1fr) auto minmax(0, 1fr); }
/* ===== Keine orangen Rahmen um Text: Schreibflächen ohne Fokus-Ring, ausgewählte Blöcke nur leicht hinterlegt ===== */
.ProseMirror:focus, .ProseMirror:focus-visible, [contenteditable]:focus, [contenteditable]:focus-visible,
.card-comment:focus, .card-comment:focus-visible, .nv-title:focus, .nv-title:focus-visible { outline: none !important; box-shadow: none !important; }
.ProseMirror .ProseMirror-selectednode { outline: none !important; box-shadow: none !important; background-color: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 4px; }
.ProseMirror .xblock.ProseMirror-selectednode, .ProseMirror .ProseMirror-selectednode.xblock { background-color: color-mix(in srgb, var(--xc, #ffe066) 26%, var(--bg)); }
.ProseMirror .flash, .ProseMirror-selectednode.flash { outline: none !important; animation: cbFlashBg 1.2s ease-out; }
@keyframes cbFlashBg { 0% { background-color: color-mix(in srgb, var(--accent) 22%, transparent); } 100% { background-color: transparent; } }
/* Eingabefelder: beim Tippen nur ein etwas dunklerer Rahmen, kein farbiger Schein */
:where(.input, input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="number"], input:not([type]), textarea, select):not(.tag-input):focus {
  border-color: color-mix(in srgb, var(--text) 28%, var(--line2)) !important; box-shadow: none !important;
}
/* Tastatur-Fokus auf Knöpfen: dezent grau statt orange */
:where(button, a, [role="button"], .btn, .tb-btn, .cf, .seg-b, summary):focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 22%, transparent) !important; }
:where([tabindex]:not(button):not(a)):focus-visible { box-shadow: none !important; }
/* Spalten in Notizen: wie die Bereiche im Arbeitsraum – eigene, ruhig abgesetzte Flächen */
.ProseMirror .columns { display: flex; gap: 14px; margin: 14px 0; align-items: stretch; }
.ProseMirror .column, .ProseMirror-focused .column { flex: 1 1 0; min-width: 0; padding: 12px 16px; border-radius: 14px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(28, 25, 23, .04) !important; transition: box-shadow .15s ease; }
.ProseMirror .column:hover { box-shadow: 0 0 0 1px var(--line2), 0 1px 3px rgba(28, 25, 23, .06) !important; }
.ProseMirror .column:focus-within { box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 26%, var(--line2)), 0 2px 8px -2px rgba(28, 25, 23, .08) !important; }
.ProseMirror .column > :first-child { margin-top: 0 !important; }
.ProseMirror .column > :last-child { margin-bottom: 0 !important; }
@media (prefers-color-scheme: dark) { .ProseMirror .column { background: color-mix(in srgb, var(--text) 3%, var(--bg)); } }
@media (max-width: 560px) { .ProseMirror .columns { flex-direction: column; gap: 10px; } }
/* Callouts: eigener Titel, Symbol und Farbe */
.callout.callout-own { background: color-mix(in srgb, var(--cc) 11%, transparent) !important; border-color: var(--cc) !important; color: var(--text) !important; }
@media (prefers-color-scheme: dark) { .callout.callout-own { background: color-mix(in srgb, var(--cc) 16%, transparent) !important; } }
.callout-title { font-weight: 600; }
.callout-ic { min-width: 16px; justify-content: center; }
.callout-menu { display: flex; flex-direction: column; gap: 2px; padding: 4px; }
.callout-sec { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: none; padding: 8px 6px 4px; }
.callout-sec:first-child { padding-top: 2px; }
.callout-ti { margin: 0 4px 2px; width: auto; }
.callout-icons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 0 2px; }
.callout-icb { height: 28px; border: 0; border-radius: 8px; background: none; font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.callout-icb:hover { background: var(--hover); }
.callout-icb.on { background: var(--active, var(--hover)); box-shadow: inset 0 0 0 1px var(--line2); }
.callout-icb svg.i { width: 15px; height: 15px; }
.callout-cols { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 6px 4px; }
.callout-cb { width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--cc); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.callout-cb.std { background: conic-gradient(#4c8bf5 0 25%, #5fb236 0 50%, #f19837 0 75%, #a28ae5 0); }
.callout-cb.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px color-mix(in srgb, var(--text) 45%, transparent); }
.callout-menu .ctx-item.on { font-weight: 600; }
/* Alle schwebenden Fenster: nie höher als das Fenster, Inhalt scrollt */
:is(.popover, .stats-pop, .dp, .lay-pop, .tc-pop, .prop-sug, .tag-menu, .hl-cpop, .hl-where, .lit-pop, .tab-peek):not(.has-pop-x) { max-height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain; }
.modal { overscroll-behavior: contain; }
.callout-menu { padding-bottom: 6px; }
.callout-icb svg.i, .callout-icb svg { color: var(--text) !important; fill: none !important; width: 16px; height: 16px; }
.callout-ic svg { color: currentColor; fill: none; }
/* Strom sparen: keine Daueranimationen */
.pw-detbar-live::before { animation: none !important; }
.cb-refpeek { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .spin, .rd-litbar-busy::after { animation-duration: 2s !important; } }
/* verschiebbare Menüs: Greif-Zeiger auf freier Fläche, beim Ziehen keine Textauswahl und keine Übergänge */
:is(.tr-pop, .bubble, .rt-bar, .sel-toolbar, .hl-bar, .table-bar, .tc-pop, .tag-menu, .hl-cpop, .hl-where, .popover, .dp, .stats-pop, .lay-pop, .ctx, .prop-sug, .suggest) { cursor: grab; }
:is(.tr-pop, .bubble, .rt-bar, .sel-toolbar, .hl-bar, .table-bar, .tc-pop, .tag-menu, .hl-cpop, .hl-where, .popover, .dp, .stats-pop, .lay-pop, .ctx, .prop-sug, .suggest) :is(button, input, textarea, select, a, .ctx-item, [contenteditable="true"], label) { cursor: auto; }
:is(.tr-pop, .bubble, .rt-bar, .sel-toolbar, .hl-bar, .table-bar, .tc-pop, .tag-menu, .hl-cpop, .hl-where, .popover, .dp, .stats-pop, .lay-pop, .ctx, .prop-sug, .suggest) :is(button, .ctx-item, a) { cursor: pointer; }
.cb-moving { cursor: grabbing !important; transition: none !important; box-shadow: 0 0 0 .5px var(--line2), 0 18px 40px -8px rgba(0, 0, 0, .28) !important; }
html.cb-moving-pop, html.cb-moving-pop * { user-select: none !important; -webkit-user-select: none !important; cursor: grabbing !important; }
/* kleiner Griff oben an größeren Fenstern */
:is(.tr-pop, .popover, .hl-cpop, .stats-pop, .lay-pop)::before { content: ""; position: absolute; top: 4px; left: 50%; width: 28px; height: 3px; margin-left: -14px; border-radius: 2px; background: color-mix(in srgb, var(--text) 16%, transparent); pointer-events: none; }
/* in Menüs: eigene Bedienelemente zeigen nicht den Greif-Zeiger des Menüs (ihre eigenen Zeiger gehen vor) */
:where(.tr-pop, .bubble, .rt-bar, .sel-toolbar, .hl-bar, .table-bar, .tc-pop, .tag-menu, .hl-cpop, .hl-where, .popover, .dp, .stats-pop, .lay-pop, .ctx, .prop-sug, .suggest) :where([class*="chip"], [class*="item"], [class*="row"], [class*="cell"], [class*="tile"], [class*="swatch"], [class*="dot"], [tabindex], svg, img) { cursor: default; }
:where(.tr-pop, .bubble, .rt-bar, .sel-toolbar, .hl-bar, .table-bar, .tc-pop, .tag-menu, .hl-cpop, .hl-where, .popover, .dp, .stats-pop, .lay-pop, .ctx, .prop-sug, .suggest) :where([draggable="true"], [class*="grip"], [class*="handle"]) { cursor: grab; }
/* Kommentar-Knopf an Karten (auch in „Auszüge“) */
.card-cmt { border: 0; background: none; color: var(--faint); cursor: pointer; width: 22px; height: 20px; padding: 0; border-radius: 6px; opacity: 0; transition: opacity .15s; display: inline-grid; place-items: center; }
.card-cmt::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 9h8M8 13h5'/%3E%3C/svg%3E") center / contain no-repeat; }
.card:hover .card-cmt, .card:focus-within .card-cmt, .card-cmt:focus-visible { opacity: 1; }
.card-cmt:hover { color: var(--text); background: var(--hover); }
.pw-x .card.cmt-open .card-comment:empty, .pw-x .card.cmt-open .card-comment { display: block; }
.ws-canvas.far .card-cmt { display: none; }
@media (pointer: coarse) { .card-cmt { opacity: 1; } }
/* Auszüge-Karten: eigene Layout-Grenze (Änderungen in einer Karte berechnen nicht die Nachbarn neu) */
.pw-x .card { contain: layout style; }
/* Kopf der Auszüge in eigener Hülle (für das Layout unsichtbar) – Änderungen dort lassen die Liste unberührt */
.pw-xtop { display: contents; }
/* ===== Einheitliche Bereichs-Steuerung im Arbeitsraum =====
   Jeder Bereich (PDF, Notiz, Auszüge, Arbeitsfläche …) hat rechts in seiner Kopfzeile dieselben Knöpfe:
   ⤢ „Nur diesen Bereich zeigen“ (⤡ alle wieder zeigen) und einen Pfeil, der in die Einklapp-Richtung zeigt.
   Eingeklappte Bereiche sehen überall gleich aus: Leiste mit Pfeil (Aufklapp-Richtung), Symbol und Namen. */
.pane-ctl { display: inline-flex; align-items: center; gap: 2px; flex: none; margin-left: auto; padding-left: 6px; }
.pw-bar > .pane-ctl, .pw-xhead > .pane-ctl, .graph-bar > .pane-ctl, .pw-cvbar > .pane-ctl { order: 99; }
.pane-ctl .tb-btn { width: 28px; height: 28px; padding: 0; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted); }
.pane-ctl .tb-btn svg.i { width: 16px; height: 16px; color: currentColor; margin: 0; }
.pane-ctl .tb-btn:hover { color: var(--text); background: var(--hover); }
.pane-ctl .pane-max.on { color: var(--text); background: var(--active); }
.pw-bar > .pane-tgl:first-child { margin-right: 0; }
.pw-xhead .pane-ctl { margin-left: 2px; }
/* Arbeitsflächen-Leiste: Titel links, Ziehgriff mittig, Steuerung rechts – wie bei den anderen Bereichen */
.pw-cvbar .pw-grip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
/* eingeklappter Seitenbereich (Auszüge) als schmale Leiste rechts */
.pw-slot-s.pw-collapsed, .pw-slot-s.pw-collapsed:not([data-pane="x"]) { width: 34px !important; min-width: 34px; max-width: 34px; }
.pw-slot.pw-collapsed > .pw-strip { cursor: pointer; }
.pw-strip .pw-strip-tgl svg.i, .pw-shut-b .pw-strip-tgl svg.i { width: 16px; height: 16px; }
.pw-shut-b .pw-strip-ic { font-size: 0; line-height: 0; } .pw-shut-b .pw-strip-ic svg.i { width: 15px; height: 15px; }
.pw-shut-b .pw-strip-t { writing-mode: horizontal-tb; transform: none; }
html.phone .pane-ctl { display: none; }
.pw-main.cv-closed .pw-cvbar { cursor: pointer; }
.pw-main.cv-closed .pw-cvbar:hover { background: var(--hover); }
.pw-main:not(.cv-closed) .pw-cvt { cursor: default; }
/* Hinzufügen-Links in Abschnittsköpfen („＋ Text“, „＋ Folien“, „＋ Notiz“): Plus sichtbar, sonst wirkt das Wort wie eine Beschriftung */
.hc-link svg.i-plus.i-lead { display: inline-block; width: 13px; height: 13px; margin-right: 4px; }
/* ===== Kontextmenüs: kompakt, mit Untermenüs, Auswahlzeilen und Farbreihe ===== */
.ctx { min-width: 210px; max-width: 320px; }
.ctx-item { min-height: 30px; }
.ctx-item .ctx-lb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tastaturauswahl sieht aus wie Mausauswahl; geöffnetes Untermenü bleibt dezent markiert */
.ctx-item.kb { background: var(--accent); color: #fff; }
.ctx-item.kb .ctx-ic, .ctx-item.kb .ctx-ic svg.i, .ctx-item.kb .ctx-kbd { color: #fff; }
.ctx-item.danger.kb { background: var(--danger); }
.ctx-item.sub-open:not(:hover):not(.kb) { background: var(--hover); color: var(--text); }
.ctx-item.disabled { opacity: .45; cursor: default; }
.ctx-chev { flex: none; width: 7px; height: 7px; margin-left: 8px; border-right: 1.5px solid currentColor; border-top: 1.5px solid currentColor; transform: rotate(45deg); opacity: .55; }
.ctx-item:hover .ctx-chev { opacity: 1; }
.ctx-subm { z-index: 2001; }
.ctx-row { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 6px 0 10px; font-size: 13px; }
.ctx-row-lb { flex: 1; color: var(--text); white-space: nowrap; }
.ctx-seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--bg2, var(--hover)); }
.ctx-seg-b { border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); padding: 3px 9px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.ctx-seg-b:hover { color: var(--text); background: var(--hover); }
.ctx-seg-b.on { color: var(--text); background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }
.ctx-colors { padding: 4px 8px 6px 10px; }
.ctx-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.ctx-dot { width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .08s; }
.ctx-dot:hover { transform: scale(1.15); }
.ctx-dot.on { box-shadow: 0 0 0 2px var(--card, var(--bg)), 0 0 0 3.5px var(--c); }
/* Beschriftung beim Überfahren: klein, ruhig, im Stil der App */
.cb-tip { position: fixed; z-index: 5000; max-width: 280px; padding: 5px 9px; border-radius: 8px; background: color-mix(in srgb, var(--text) 92%, transparent); color: var(--bg); font-size: 12px; line-height: 1.35; font-weight: 500; letter-spacing: .005em; white-space: pre-line; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); opacity: 0; transform: translateY(-2px); transition: opacity .09s ease-out, transform .09s ease-out; }
.cb-tip.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .cb-tip { transition: none; } }
/* flüssiger: Hover-Rückmeldung von Knöpfen, Menüeinträgen, Listen und Tabs ohne Nachziehen */
:is(button, .btn, .tb-btn, .cv-btn, .ctx-item, .sb-item, .pw-tab, .pw-ntab, .tab, .seg-b, .cf, .lit-chip, .tagchip, .card-menu, .card-edit, .card-cmt, .card-del) { transition-duration: .1s !important; }
/* ===== Eigener Gedanke zu einer Textstelle ===== */
/* im PDF: keine Farbfläche, sondern feine gepunktete Unterstreichung – unterscheidet Gedanken klar von Markierungen */
.hl.hl-cm { background: transparent !important; mix-blend-mode: normal; border-bottom: 2px dotted color-mix(in srgb, var(--olive, #6f7f4f) 80%, transparent); border-radius: 0; }
.hl.hl-cm:hover, .hl.hl-cm.on { background: color-mix(in srgb, var(--olive, #6f7f4f) 12%, transparent) !important; }
.hl-note.hl-note-cm { background: color-mix(in srgb, var(--olive, #6f7f4f) 85%, white); }
.hl-note.hl-note-cm svg.i { color: #fff; }
.hl-cdot.hl-cdot-cm { width: 18px; height: 18px; background: none; display: inline-grid; place-items: center; color: var(--olive, #6f7f4f); }
.hl-cdot.hl-cdot-cm svg.i { width: 14px; height: 14px; }
/* auf der Karte: zitierte Stelle klein über dem Gedanken */
.card-anchor { margin: 2px 10px 4px; padding-left: 8px; border-left: 2px solid color-mix(in srgb, var(--olive, #6f7f4f) 45%, transparent); font-size: 11.5px; line-height: 1.4; color: var(--muted); cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-anchor:hover { color: var(--text); }
.card-own-link { cursor: pointer; }
.card-own-link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.sel-btn.sel-cmt { white-space: nowrap; }
.hl.hl-cm { opacity: .95 !important; }
/* ===== Kommentare & eigene Gedanken: überall gleich – warme Tönung, feine grüne Linie links ===== */
:root { --own-bg: color-mix(in srgb, var(--olive, #6f7f4f) 7%, var(--card, #fffdf9)); --own-line: color-mix(in srgb, var(--olive, #6f7f4f) 60%, transparent); --own-text: var(--text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --own-bg: color-mix(in srgb, var(--olive, #9aad74) 12%, var(--card, #222)); --own-line: color-mix(in srgb, var(--olive, #9aad74) 65%, transparent); --own-text: var(--text); } }
:root[data-theme="dark"] { --own-bg: color-mix(in srgb, var(--olive, #9aad74) 12%, var(--card, #222)); --own-line: color-mix(in srgb, var(--olive, #9aad74) 65%, transparent); }
.card-comment.own { background: var(--own-bg); border-left: 2px solid var(--own-line); border-radius: 4px 8px 8px 4px; color: var(--own-text); padding: 5px 8px; font-size: 12.5px; line-height: 1.45; }
.card-comment.own:empty:not(:focus) { background: transparent; border-left-color: transparent; }
.card-comment:focus { box-shadow: none !important; }
.card.kind-comment { background: var(--own-bg); box-shadow: inset 2px 0 0 var(--own-line), 0 0 0 .5px var(--line2); }
.card.kind-comment .card-comment { color: var(--own-text); font-size: 13.5px; line-height: 1.5; }
.hl-cpop .hl-cta { background: var(--own-bg); border: 0; border-left: 2px solid var(--own-line); border-radius: 4px 8px 8px 4px; font-size: 13px; line-height: 1.45; box-shadow: none; }
.hl-cpop .hl-cta:focus { box-shadow: none; outline: none; }
.cm-thread { box-shadow: inset 2px 0 0 var(--own-line); }
.cm-thread .cm-text { color: var(--own-text); }
.hl-crow .muted.tiny::after { content: " · Enter speichert, ⇧Enter neue Zeile"; }
/* Auszüge-Kopf: kompakt – Titel, Anzahl, Ordnen, „alle ein-/aufklappen“ als Symbol */
.pw-xfold-all { width: 26px; height: 26px; padding: 0; display: inline-grid; place-items: center; color: var(--muted); border-radius: 8px; }
.pw-xfold-all[hidden] { display: none; }
.pw-xfold-all::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 20 5-5 5 5'/%3E%3Cpath d='m7 4 5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 20 5-5 5 5'/%3E%3Cpath d='m7 4 5 5 5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.pw-xfold-all.all-folded::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E"); }
.pw-xfold-all:hover { color: var(--text); background: var(--hover); }
.pw-xtitle { cursor: help; }
.pw-x .color-filter { flex-wrap: nowrap; gap: 5px; align-items: center; }
.pw-x .color-filter .cf-placed { margin-left: auto; white-space: nowrap; }
/* Stichwort-Eingabe in der Auszüge-Liste nur beim Überfahren/Bearbeiten (sonst abgeschnittenes „#:“) */
.pw-x .card .card-tags .tag-input { display: none !important; }
.pw-x .card:hover .card-tags .tag-input, .pw-x .card:focus-within .card-tags .tag-input { display: inline-block !important; min-width: 90px; }
html.phone .pw-x .card .card-tags .tag-input { display: inline-block !important; }
@media (pointer: coarse) { .pw-x .card .card-tags .tag-input { display: inline-block !important; } }
/* Schließen-Kreuz an schwebenden Fenstern: dezent – klein, ohne Schatten, erst beim Überfahren des Fensters sichtbar.
   Schließen geht ohnehin per Klick daneben oder Esc. */
.pop-x { width: 18px !important; height: 18px !important; top: -6px !important; right: -6px !important; font-size: 9px !important; background: var(--card, var(--bg)) !important; box-shadow: 0 0 0 .5px var(--line2) !important; color: var(--faint) !important; opacity: 0; transition: opacity .1s; }
.pop-x svg.i { width: 10px !important; height: 10px !important; }
:is(.has-pop-x, .has-pop-x-in):hover > .pop-x, .pop-x:focus-visible { opacity: .75; }
.pop-x:hover { opacity: 1 !important; color: var(--text) !important; background: var(--hover) !important; }
.has-pop-x-in > .pop-x { top: 0 !important; right: 0 !important; box-shadow: none !important; background: transparent !important; }
@media (pointer: coarse) { .pop-x { opacity: .7; } }
/* beim Markieren über Seiten: Seitenzahlen, Kopf-/Fußzeilen, Fußnoten, Randvermerke, Zeilennummern bleiben unmarkiert */
.textLayer span.cb-nosel::selection, .textLayer span.cb-nosel *::selection { background: transparent !important; color: transparent !important; }
/* Kommentar einzeln herausziehen: kleiner Griff oben rechts im Kommentar (beim Überfahren) */
.cmt-wrap { position: relative; }
.cmt-drag { position: absolute; top: 3px; right: 12px; width: 16px; height: 18px; display: grid; place-items: center; font-size: 11px; line-height: 1; color: var(--faint); border-radius: 4px; cursor: grab; opacity: 0; transition: opacity .1s; user-select: none; -webkit-user-select: none; }
.cmt-drag[hidden] { display: none; }
.card:hover .cmt-drag { opacity: 1; }
.cmt-drag:hover { color: var(--text); background: var(--hover); }
.cmt-drag:active { cursor: grabbing; }
.card-comment.own { padding-right: 22px; }
@media (pointer: coarse) { .cmt-drag { opacity: .8; } }
/* Auslassung „[…]“: Zitat beginnt/endet nicht an einer Satzgrenze (auf Karten und Zitat-Boxen angezeigt, nicht Teil des Textes) */
:is(.card-text, .xb-text).cut-l::before { content: "[\2026]\00a0"; color: var(--muted); }
:is(.card-text, .xb-text).cut-r::after { content: "\00a0[\2026]"; color: var(--muted); }

/* ===================== Feinschliff nach den Web Interface Guidelines (Vercel) und den System-Regeln aus taste-skill ===================== */
/* Kontrast: „gedämpfter“ Text erreicht WCAG AA (≥ 4,5:1) auf Papier, Seitenleiste und Karten */
:root:root:root { --muted: #71665b; }
@media (prefers-color-scheme: dark) { :root:root:root:not([data-theme="light"]) { --muted: #a8a8a8; } }
:root:root:root[data-theme="dark"] { --muted: #a8a8a8; }
.nav, .tab-new, .sb-search kbd, .qs-field kbd { color: var(--muted); }
.cal-day.other .cal-dn { color: color-mix(in srgb, var(--muted) 72%, transparent); }
/* Dunkelmodus: Bildlaufleisten, Formularelemente passend */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark; }
:where(select) { background-color: var(--card, var(--bg)); color: var(--text); }
/* Zahlen springen nicht (Zähler, Daten, Seiten, Zoom, Wortzahlen) */
:is([class$="-n"], [class*="-n "], .sb-count, .nvo-date, .crs-n, .lit-n, .hm-cd-u, .rd-pageinfo, .zoom-lbl, .tb-zoom, .pw-wc, .cv-zl, .cal-dn, time, .ws-zoom, .wc, .pg-num) { font-variant-numeric: tabular-nums; }
/* Überschriften ohne einzelne Wörter in der letzten Zeile */
:is(h1, h2, h3, h4, .modal-title, .nv-title, .crs-topic) { text-wrap: balance; }
:is(.empty-state, .muted.small, .help-art p, .modal p) { text-wrap: pretty; }
/* Tastatur-Fokus sichtbar (dezent, neutral – nie bei Mausklick, nie in Schreibflächen) */
:is(button, [role="button"], a[href], [tabindex]:not([tabindex="-1"]), summary, .sb-item, .ctx-item):not([contenteditable], .ProseMirror, .ProseMirror *, textarea, input):focus-visible { outline: 2px solid color-mix(in srgb, var(--text) 38%, transparent) !important; outline-offset: 2px; border-radius: 6px; }
/* Schreibflächen und alles darin: nie ein Rahmen – weder beim Schreiben noch beim Überfahren */
:is(.ProseMirror, .ProseMirror *, [contenteditable], [contenteditable] *, .card-comment, .nv-title):is(:focus, :focus-visible, :focus-within, :hover) { outline: none !important; }
/* Knöpfe antworten beim Drücken (kurzes Einsinken) – fühlt sich direkter an */
:is(.btn, .tb-btn, .cv-btn, .seg-b, .ctx-seg-b, .pane-ctl .tb-btn, .pw-strip, .pw-shut-b, .sel-btn, .hl-bar-b, .card-cmt, .card-edit, .card-menu):active:not(:disabled) { transform: scale(.96); transition: transform .06s ease-out; }
:is(button, [role="button"], .sb-item, .card) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* Bewegung reduzieren, wenn im System eingestellt */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* letzte zu blasse Beschriftungen auf den gedämpften Ton (≥ 4,5:1) */
:is(.kb-count, .kb-new, .kb-board, .nvn-c, .nvn-h, .st-add, .pw-ntab-n, .lg-it, .gl-k) { color: var(--muted); }
h2.set-h3 { font-family: inherit; letter-spacing: normal; line-height: 1.4; text-wrap: initial; }
/* Kontrast-Rest: Abzeichen mit heller Schrift auf hellen Akzenten (v. a. im Dunkelmodus), grüne Status-Chips, „+ Eigenschaft“ */
.prop-add { color: var(--muted); }
:is(.hm-chip, .hm-status) { color: color-mix(in srgb, var(--olive, #6f7f4f) 72%, #000); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.hm-chip, .hm-status) { color: color-mix(in srgb, var(--olive, #9aad74) 80%, #fff); }
  :root:not([data-theme="light"]) :is(.lit-n, .crs-row.today .crs-n) { color: #1b1b1b; }
  :root:not([data-theme="light"]) .cal-day.today .cal-dn { background: color-mix(in srgb, var(--danger) 78%, #000); color: #fff; }
}
:root[data-theme="dark"] :is(.lit-n, .crs-row.today .crs-n) { color: #1b1b1b; }
:root[data-theme="dark"] .cal-day.today .cal-dn { background: color-mix(in srgb, var(--danger) 78%, #000); }
:root[data-theme="dark"] :is(.hm-chip, .hm-status) { color: color-mix(in srgb, var(--olive, #9aad74) 80%, #fff); }
/* heutige Sitzung (hell): weiße Zahl auf kräftigerem Akzent */
.crs-row.today .crs-n { background: color-mix(in srgb, var(--accent) 88%, #000); }
.cal-day.today .cal-dn { background: color-mix(in srgb, var(--danger) 86%, #000); }

/* ===================== Ein einziges „Schließen“-Kreuz – überall gleich =====================
   Fenster/Leisten schließen: immer oben rechts INNEN, 24 px, gleiches ✕, dezent grau, beim Überfahren leicht hinterlegt. */
:is(.pop-x, .modal-x, .tr-x, .hl-bar-x, .rd-litbar-x, .resume-x, .tour-close, .st-x) {
  width: 24px !important; height: 24px !important; min-width: 24px; padding: 0 !important; margin: 0; border: 0 !important; border-radius: 6px !important;
  background: transparent !important; box-shadow: none !important; color: var(--muted) !important; opacity: 1 !important;
  display: inline-grid !important; place-items: center; font-size: 12px !important; line-height: 1 !important; cursor: pointer; flex: none;
  transition: background-color .1s, color .1s !important;
}
:is(.pop-x, .modal-x, .tr-x, .hl-bar-x, .rd-litbar-x, .resume-x, .tour-close, .st-x) svg.i { width: 12px !important; height: 12px !important; margin: 0 !important; color: currentColor !important; }
:is(.pop-x, .modal-x, .tr-x, .hl-bar-x, .rd-litbar-x, .resume-x, .tour-close, .st-x):hover { background: var(--hover) !important; color: var(--text) !important; }
/* automatisch ergänztes Kreuz: wie alle anderen innen oben rechts (nicht mehr außen schwebend) */
.pop-x { position: absolute !important; top: 6px !important; right: 6px !important; z-index: 3; }
.has-pop-x-in > .pop-x { position: sticky !important; top: 0 !important; float: right; margin: 0 0 -24px 0 !important; }
.modal-x { margin: -6px -6px 0 8px !important; }
/* Einträge entfernen (Tab, Stichwort, Listeneintrag, Raum, Verknüpfung): klein, gleiches ✕, gleiches Verhalten */
:is(.tab-x, .tp-x, .x, .side-x, .wz-x.tb-btn, .pw-sess-x, .ws-frame-x, .sug-x) {
  border: 0; background: transparent; color: var(--muted); border-radius: 4px; cursor: pointer; display: inline-grid; place-items: center; line-height: 1; padding: 0;
  min-width: 16px; height: 16px; font-size: 10px; transition: background-color .1s, color .1s;
}
:is(.tab-x, .tp-x, .x, .side-x, .wz-x.tb-btn, .pw-sess-x, .sug-x) svg.i { width: 10px; height: 10px; margin: 0; color: currentColor; }
:is(.tab-x, .tp-x, .x, .side-x, .wz-x.tb-btn, .pw-sess-x, .sug-x):hover { background: var(--hover); color: var(--text); }

/* ===================== Leisten in schmalen Bereichen: Steuerknöpfe nie abgeschnitten ===================== */
/* Maximieren/Einklappen bleibt immer sichtbar am rechten Rand der Leiste */
.pw-bar > .pane-ctl { position: sticky; right: -8px; z-index: 2; margin-right: -8px; padding: 0 8px 0 4px; height: 100%; align-items: center; background: var(--card, var(--bg)); box-shadow: -8px 0 8px -4px var(--card, var(--bg)); }
/* zuerst verschwindet die Wortzahl, dann die Abstandhalter – nie der Titel oder die Knöpfe */
@container (max-width: 380px) { .pw-nvtop .cbar > span.cbar-i { display: none; } }
@container (max-width: 320px) { .pw-bar > .spacer, .pw-nvtop > .spacer { display: none; } .pw-bar { gap: 2px; } }
/* Auszüge-Kopf: Titel einzeilig, „✦ Ordnen“ wird bei wenig Platz zu „✦“ */
.pw-x { container-type: inline-size; container-name: pwx; }
.pw-xtitle { white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; display: inline-flex; align-items: center; gap: 6px; }
.pw-xhead > .muted.tiny { flex: none; font-variant-numeric: tabular-nums; }
.pw-xhead > :is(.ai-org-b, .pw-xfold-all, .pane-ctl) { flex: none; white-space: nowrap; }
.ai-org-b { display: inline-flex !important; align-items: center; gap: 4px; padding: 0 8px !important; width: auto !important; }
@container pwx (max-width: 250px) { .ai-org-b .ai-org-l { display: none; } .ai-org-b { padding: 0 !important; width: 28px !important; justify-content: center; } }
/* leere Arbeitsfläche: Hinweis rutscht unter die Zoom-Leiste statt darunter zu liegen */
.cv-wrap .ws-hint { top: 56px !important; }
@container pwx (max-width: 250px) { .pw-xtitle > svg.i-lead { display: none; } .pw-xhead { gap: 3px; } }
.cv-wrap .ws-hint { top: 14px !important; left: 14px !important; transform: none !important; width: min(340px, calc(100% - 176px)) !important; min-width: 220px; }

/* ===================== Räume & Karten verbinden: klare Anfasser, sichtbare Linien ===================== */
/* Anfasser sitzen mittig auf allen vier Kanten eines Raums – dort, wo die Linie später ansetzt */
.ws-frame-port { position: absolute !important; width: 16px !important; height: 16px !important; border-radius: 50% !important; right: auto !important; top: auto !important;
  background: var(--card, var(--bg)) !important; border: 2px solid color-mix(in srgb, var(--fc) 75%, var(--text)) !important; box-shadow: 0 1px 3px rgba(40, 25, 10, .18);
  cursor: crosshair; opacity: 0 !important; z-index: 3; transition: opacity .12s, transform .12s, background-color .12s; display: grid; place-items: center; }
.ws-frame-port::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--fc) 75%, var(--text)); }
.ws-frame-port.p-l { left: -8px; top: calc(50% - 8px) !important; }
.ws-frame-port.p-r { right: -8px !important; top: calc(50% - 8px) !important; }
.ws-frame-port.p-t { left: calc(50% - 8px); top: -8px !important; }
.ws-frame-port.p-b { left: calc(50% - 8px); bottom: -8px; }
.ws-frame:hover > .ws-frame-port, .ws-frame.room-sel > .ws-frame-port, .ws-canvas.linking .ws-frame > .ws-frame-port { opacity: 1 !important; }
.ws-frame-port:hover { transform: scale(1.25); background: color-mix(in srgb, var(--fc) 75%, var(--text)) !important; }
.ws-frame-port:hover::after { background: var(--card, #fff); }
/* Karten: Anfasser deutlicher (gleiche Optik wie bei Räumen) */
.ws-board .card-port { width: 16px !important; height: 16px !important; right: -8px !important; margin-top: -8px; background: var(--card, var(--bg)) !important; border: 2px solid color-mix(in srgb, var(--olive, #6f7f4f) 80%, var(--text)) !important; box-shadow: 0 1px 3px rgba(40, 25, 10, .18); display: grid; place-items: center; transition: opacity .12s, transform .12s; }
.ws-board .card-port::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--olive, #6f7f4f) 80%, var(--text)); }
.ws-board .card-port:hover { transform: scale(1.25); }
/* Linien: kräftiger, setzen am Rand an, mit Punkt an beiden Enden */
.ws-svg .link { stroke: color-mix(in srgb, var(--olive, #6f7f4f) 70%, var(--text)); stroke-width: 2; stroke-linecap: round; opacity: .85; }
.ws-svg .link.temp { stroke: var(--olive, #6f7f4f); stroke-width: 2; stroke-dasharray: 5 5; opacity: 1; }
.ws-svg .link-end { fill: var(--card, #fff); stroke: color-mix(in srgb, var(--olive, #6f7f4f) 70%, var(--text)); stroke-width: 2; }
.ws-svg .link-hit:hover + .link-end, .ws-svg .link-hit:hover { stroke: color-mix(in srgb, var(--olive, #6f7f4f) 20%, transparent); }
.ws-canvas.link-focus .ws-svg .link-end { opacity: .3; }
/* Ziel beim Verbinden: Raum oder Karte leuchtet auf */
.ws-board .ws-frame.link-target { box-shadow: 0 0 0 3px color-mix(in srgb, var(--olive, #6f7f4f) 70%, transparent), inset 0 0 0 6px color-mix(in srgb, var(--fc) 8%, transparent); }
.ws-board .ws-frame.link-target::before { content: 'Loslassen: verbinden'; position: absolute; top: -28px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 500; color: #fff; background: var(--olive, #6f7f4f); padding: 3px 8px; border-radius: 6px; z-index: 4; }
.ws-board .card.link-target { outline-color: var(--olive, #6f7f4f) !important; }
.ws-board .card.link-target::before { background: var(--olive, #6f7f4f) !important; }
/* Auswahl-Dialog */
.cb-choose .modal-title { padding-right: 28px; }
.cb-choose-tx { margin: 0 0 16px; color: var(--muted); line-height: 1.5; text-wrap: pretty; }
.cb-choose-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cb-choose-row .btn.danger.primary { background: var(--danger); border-color: var(--danger); color: #fff; }
.ws-frame.room-hov > .ws-frame-port { opacity: 1 !important; }
.ws-frame.room-hov:not(.room-sel) { border-color: color-mix(in srgb, var(--fc) 60%, transparent); }
/* Kartenkopf: lange Quellenangabe kürzt sich mit „…“, Knöpfe bleiben in der Karte */
.card-head > :is(button, .card-drag, .card-mode) { flex: none; }
.card-head > .card-pg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.card-head > .card-mean { flex: 0 1 auto; min-width: 2.5em; max-width: 45%; }
.cb-choose-row { flex-direction: column; align-items: stretch; }
.cb-choose-row .btn { justify-content: center; text-align: center; min-height: 34px; }
.cb-choose-row .btn.danger { background: color-mix(in srgb, var(--danger) 10%, var(--card, var(--bg))); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); }
.cb-choose-row .btn.danger:hover { background: var(--danger); color: #fff; }
.card-head > .card-pg { min-width: 3.6em; }
.card-head > .card-pg { min-width: auto; }
.ws-board .card-head > .card-pg { min-width: 3.6em; }
.card-head > .card-mean { max-width: none; }
.card-head > .card-pg { flex: none; overflow: visible; }
.ws-board .card-head > .card-pg { flex: 0 1 auto; overflow: hidden; }

/* ===================== Einstellungen › Speicherplatz ===================== */
.st-box { align-items: flex-start !important; gap: 16px; }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.st-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-weight: 500; }
.st-tot { font-variant-numeric: tabular-nums; font-weight: 600; }
.st-bar { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; background: var(--bg2); }
.st-seg { flex-basis: 0; min-width: 3px; transition: flex-grow .4s ease; }
.st-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
.st-li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-li i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.st-res:empty { display: none; }
.st-bk { display: flex; flex-direction: column; max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; margin-top: 8px; }
.st-bk-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.st-bk-row > span:first-child { flex: 1; min-width: 0; }
.st-bk-n { flex: none; }
.ai-org-prog:empty { display: none; }

/* ===================== Ladebalken im CiteBoard-Stil: ein Textmarker streicht eine Zeile an – zwischen „ und “ ===================== */
:root { --pen-body: #3a3530; --pen-band: #d8d0c4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pen-body: #e9e3da; --pen-band: #7d756b; } }
:root[data-theme="dark"] { --pen-body: #e9e3da; --pen-band: #7d756b; }
.cb-prog-dock { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(440px, calc(100vw - 32px)); }
body.cb-prog-on .toast { bottom: 104px; }
.cb-prog { --pc: #f5d93f; --pcs: color-mix(in srgb, #f5d93f 55%, transparent); display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 11px 16px 12px 12px; border-radius: 16px;
  background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 12px 32px rgba(40, 25, 10, .16); color: var(--text); font-size: 12.5px; pointer-events: auto;
  animation: cbProgIn .32s cubic-bezier(.2, .9, .25, 1.15) both; }
.cb-prog.k-ai { --pc: #f4a259; --pcs: color-mix(in srgb, #f4a259 55%, transparent); }
.cb-prog.k-clean { --pc: #a9c47f; --pcs: color-mix(in srgb, #a9c47f 60%, transparent); }
.cb-prog.inline { box-shadow: none; background: transparent; padding: 4px 0; animation: none; }
.cb-prog.out { animation: cbProgOut .26s ease-in both; }
/* Karteikarten-Symbol links: „ für Laden, ✦ für KI – wippt sanft */
.cb-prog-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-family: var(--serif); font-size: 19px; line-height: 1; color: var(--text);
  background: color-mix(in srgb, var(--pc) 30%, var(--card, var(--bg))); box-shadow: inset 0 0 0 .5px color-mix(in srgb, var(--pc) 70%, var(--line2)); animation: cbProgBob 1.8s ease-in-out infinite; }
.cb-prog.k-load .cb-prog-ic, .cb-prog.k-save .cb-prog-ic { font-size: 24px; padding-top: 6px; box-sizing: border-box; }
.cb-prog.k-ai .cb-prog-ic, .cb-prog.k-clean .cb-prog-ic { font-family: inherit; font-size: 14px; animation: cbProgTwinkle 2s ease-in-out infinite; }
.cb-prog-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cb-prog-row { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cb-prog-l { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.cb-prog-sub { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 2 auto; font-style: italic; font-family: var(--serif); font-size: 12.5px; }
.cb-prog-sp { flex: 1; }
.cb-prog-eta { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 11.5px; }
/* die Zeile: „ Wörter “ */
.cb-prog-line { display: flex; align-items: center; gap: 4px; }
.cb-prog-q { flex: none; font-family: var(--serif); font-size: 22px; line-height: 1; color: var(--muted); width: 10px; text-align: center; transition: color .25s, transform .25s; }
.cb-prog-q.l { align-self: flex-end; margin-bottom: -7px; }
.cb-prog-q.r { align-self: flex-start; margin-top: -2px; opacity: .35; }
.cb-prog-track { position: relative; flex: 1; height: 14px; }
.cb-prog-words { position: absolute; inset: 0; display: flex; align-items: center; gap: 2%; }
.cb-prog-w { flex: none; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--text) 22%, transparent); }
/* Marker-Strich: leicht schräge Kanten, mischt sich mit den „Wörtern“ wie echter Textmarker */
.cb-prog-fill { position: absolute; left: -3px; top: 1px; bottom: 1px; width: 0; border-radius: 3px 6px 4px 2px; background: var(--pcs); transform: skewX(-8deg); transform-origin: left; transition: width .5s cubic-bezier(.3, .7, .3, 1);
  background-image: linear-gradient(180deg, transparent 0 18%, color-mix(in srgb, var(--pc) 35%, transparent) 18% 82%, transparent 82%); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cb-prog-fill { mix-blend-mode: screen; opacity: .55; } }
:root[data-theme="dark"] .cb-prog-fill { mix-blend-mode: screen; opacity: .55; }
.cb-prog-tip { position: absolute; left: 0; top: -12px; width: 22px; height: 22px; margin-left: -6px; transition: left .5s cubic-bezier(.3, .7, .3, 1); animation: cbProgWrite .7s ease-in-out infinite; transform-origin: 30% 90%; pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(40, 25, 10, .25)); }
/* fertig: Stift hebt ab, das schließende Anführungszeichen setzt sich – Zitat komplett */
.cb-prog.ok .cb-prog-tip { animation: cbProgLift .45s ease-out both; }
.cb-prog.ok .cb-prog-q.r { opacity: 1; color: var(--text); animation: cbProgQuote .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.cb-prog.ok .cb-prog-q.l { color: var(--text); }
.cb-prog.ok .cb-prog-ic, .cb-prog.bad .cb-prog-ic { animation: none; }
.cb-prog.ok .cb-prog-eta { color: color-mix(in srgb, var(--olive, #6f7f4f) 85%, var(--text)); font-weight: 500; }
.cb-prog.bad { --pc: #e8a39b; --pcs: color-mix(in srgb, #e8a39b 50%, transparent); }
.cb-prog.bad .cb-prog-tip { animation: none; opacity: .4; }
@keyframes cbProgIn { from { opacity: 0; transform: translateY(12px) rotate(-1deg) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes cbProgOut { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes cbProgWrite { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(1px, -1.5px) rotate(-4deg); } 50% { transform: translate(-1px, 0) rotate(2deg); } 75% { transform: translate(1px, -1px) rotate(-2deg); } }
@keyframes cbProgLift { to { transform: translate(8px, -10px) rotate(14deg); opacity: 0; } }
@keyframes cbProgQuote { 0% { transform: scale(.4) translateY(4px); } 100% { transform: none; } }
@keyframes cbProgBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2px) rotate(-3deg); } }
@keyframes cbProgTwinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(20deg) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .cb-prog, .cb-prog *, .cb-prog-fill, .cb-prog-tip { animation: none !important; transition: none !important; } }
.rd-banner .cb-prog.inline, .pv-status .cb-prog.inline, .z-status .cb-prog.inline { flex: 1; min-width: 240px; }
.tr-out.loading:has(.cb-prog)::before { display: none; }
.cb-prog-host { width: 100%; }
.cb-prog-q { height: 14px; line-height: 14px; overflow: visible; }
.cb-prog-q.l { align-self: center; margin: 0; transform: translateY(-1px); }
.cb-prog-q.r { align-self: center; margin: 0; transform: translateY(5px); }
.cb-prog.ok .cb-prog-q.r { animation: cbProgQuote2 .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes cbProgQuote2 { 0% { transform: translateY(9px) scale(.4); } 100% { transform: translateY(5px); } }
.cb-prog.k-load .cb-prog-ic, .cb-prog.k-save .cb-prog-ic { font-size: 30px; padding-top: 0; line-height: 30px; align-content: start; }
.cb-prog.k-load .cb-prog-ic::before, .cb-prog.k-save .cb-prog-ic::before { content: ''; }
.cb-prog.inline .cb-prog-ic { display: none; }
.cb-prog-q.l { transform: translateY(-7px); }
.cb-prog-q.r { transform: translateY(3px); }
@keyframes cbProgQuote2 { 0% { transform: translateY(7px) scale(.4); } 100% { transform: translateY(3px); } }
.cb-prog.k-load .cb-prog-ic, .cb-prog.k-save .cb-prog-ic { font-size: 14px; line-height: 1; align-content: center; }
.cb-prog-sub { flex-shrink: 40; }
.cb-prog-l { flex-shrink: 1; }
.cb-prog-l { flex-shrink: 0; max-width: 72%; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cb-prog-fill { mix-blend-mode: normal; opacity: .5; } :root:not([data-theme="light"]) .cb-prog-w { background: color-mix(in srgb, var(--text) 30%, transparent); } }
:root[data-theme="dark"] .cb-prog-fill { mix-blend-mode: normal; opacity: .5; }
.card-head > .card-mean { min-width: 0; }
@container pwx (max-width: 250px) { .card-head > .card-mean { display: none; } }

/* ===================== Startseite als Sideboard (wie das Logo): Aktionen stehen auf der Holzplatte, darunter der Korpus mit Fächern ===================== */
.hm .hm-top { padding: 14px clamp(20px, 4vw, 48px); }
.hm .hm-page { container: hmp / inline-size; box-sizing: border-box; width: 100%; max-width: 1120px; margin: 0 auto; padding: 26px clamp(20px, 4vw, 48px) 96px; }
/* Begrüßung + nächster Termin */
.hm .hm-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: 24px; align-items: center; margin: 0 0 22px; }
.hm .hm-greet { padding: 0; align-self: center; }
.hm .hm-countdown { justify-self: stretch; width: auto; max-width: none; min-width: 0; padding: 14px 20px 14px 16px; gap: 16px; }
.hm .hm-cd-main { display: grid; justify-items: center; align-content: center; row-gap: 3px; min-width: 64px; padding: 2px 0; }
.hm .hm-cd-n { line-height: .95; }
.hm .hm-cd-u { line-height: 1.15; font-size: 12px; }
.hm .hm-cd-time { display: inline-block; margin-top: 3px; padding: 2px 7px; border-radius: 6px; font-size: 12px; line-height: 1.3; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text); background: color-mix(in srgb, var(--accent-2, #e5793d) 12%, var(--card)); white-space: nowrap; }
.hm .hm-cd-body { min-width: 0; }
.hm .hm-cd-s { white-space: normal; }
/* Schnellaktionen stehen auf der Platte */
.hm .hm-shelf { margin: 0; position: relative; z-index: 1; }
.hm .hm-acts { grid-template-columns: repeat(4, minmax(0, 1fr)) 52px; gap: 12px; padding: 0 22px; align-items: end; }
.hm .hm-act { border-radius: 12px 12px 5px 5px !important; min-height: 62px; box-shadow: 0 0 0 1px var(--line), 0 -1px 0 rgba(255, 255, 255, .6) inset, 0 3px 6px -3px rgba(70, 35, 10, .25) !important; }
.hm .hm-act:hover { transform: translateY(-3px) !important; }
.hm .hm-plank { height: 14px !important; margin: 0 !important; border-radius: 7px 7px 3px 3px !important;
  background: repeating-linear-gradient(91deg, rgba(255, 255, 255, .05) 0 3px, transparent 3px 14px, rgba(60, 25, 5, .05) 14px 16px, transparent 16px 31px), linear-gradient(180deg, var(--wood-1), var(--wood-2)) !important;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .28), 0 0 0 1px var(--wood-edge), 0 4px 8px -4px rgba(60, 30, 10, .5) !important; }
/* Korpus mit Fächern */
.hm .hm-board { position: relative; margin: 0 12px 70px; padding: 14px; border-radius: 0 0 20px 20px;
  background: repeating-linear-gradient(92deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 9px, rgba(60, 25, 5, .045) 9px 11px, transparent 11px 23px), linear-gradient(180deg, var(--wood-2), var(--wood-3));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14), 0 0 0 1px var(--wood-edge), 0 22px 36px -18px rgba(70, 35, 10, .5); }
.hm .hm-board::after { content: ''; position: absolute; left: 6%; right: 6%; bottom: -50px; height: 12px; border-radius: 50%; background: radial-gradient(closest-side, rgba(60, 30, 10, .2), transparent); pointer-events: none; }
.hm .hm-legs { position: absolute; left: 0; right: 0; bottom: -42px; height: 42px; pointer-events: none; }
.hm .hm-legs i { position: absolute; top: 0; width: 14px; height: 42px; border-radius: 0 0 5px 5px; background: linear-gradient(90deg, var(--wood-3), var(--wood-1) 45%, var(--wood-3)); box-shadow: 0 0 0 1px var(--wood-edge); }
.hm .hm-legs i:first-child { left: 9%; transform: skewX(12deg); transform-origin: top; }
.hm .hm-legs i:last-child { right: 9%; transform: skewX(-12deg); transform-origin: top; }
.hm .hm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "read act up" "notes notes proj"; gap: 12px; }
.hm .hm-c-read { grid-area: read; } .hm .hm-c-act { grid-area: act; } .hm .hm-c-up { grid-area: up; } .hm .hm-c-notes { grid-area: notes; } .hm .hm-c-proj { grid-area: proj; }
.hm .hm-board .hm-card { min-height: 220px; border-radius: 12px; background: var(--nook); box-shadow: var(--nook-shadow); padding: 16px 18px; }
.hm .hm-board .hm-card .hm-ch h2 { font-size: 18px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm .hm-act { box-shadow: 0 0 0 1px var(--line), 0 3px 6px -3px rgba(0, 0, 0, .5) !important; } }
/* schmaler: zwei Spalten, dann eine – unabhängig davon, ob Seitenleiste oder Reiter sichtbar sind */
@container hmp (max-width: 900px) {
  .hm .hm-hero { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hm .hm-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px; }
  .hm .hm-more { display: none; }
  .hm .hm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "read act" "up proj" "notes notes"; }
}
@container hmp (max-width: 560px) {
  .hm .hm-acts { grid-template-columns: minmax(0, 1fr); }
  .hm .hm-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "read" "act" "up" "notes" "proj"; }
  .hm .hm-board { margin: 0 6px 64px; padding: 10px; }
}
.hm .hm-acts { align-items: stretch; }
/* Aufgaben im Fach: Titel bekommt Platz, Datum/Status rutschen bei Enge unter den Titel */
.hm .hm-task { flex-wrap: wrap; row-gap: 4px; }
.hm .hm-task > .hm-row-t { flex: 1 1 150px; min-width: 0; }
.hm .hm-task > .hm-row-t ~ :is(.due-chip, .hm-status) { flex: none; }
/* schmal: Aktionen bleiben eine Reihe auf der Platte (nur Titel) */
@container hmp (max-width: 900px) { .hm .hm-acts { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 14px; gap: 8px; } .hm .hm-act-t span { display: none; } .hm .hm-act { min-height: 52px; padding: 10px 12px; gap: 10px; } }
@container hmp (max-width: 620px) { .hm .hm-acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hm .hm-task { flex-wrap: nowrap; }
.hm .hm-task > .hm-row-t { flex: 1 1 auto; }
.hm .hm-board .hm-card { container: hmc / inline-size; }
@container hmc (max-width: 400px) { .hm .hm-task > .hm-status { display: none; } }
@container hmp (min-width: 901px) { .hm .hm-acts > .hm-more { display: flex !important; align-items: center; justify-content: center; } }
/* „✦ Ordnen“: Stern und Wort auf einer Linie */
.ai-org-b { align-items: center !important; gap: 4px; line-height: 1 !important; }
.ai-org-b > .ai-org-ic { display: inline-grid; place-items: center; width: 13px; height: 13px; font-size: 12px; line-height: 1; transform: translateY(.5px); }
.ai-org-b > .ai-org-l { display: inline-block; line-height: 13px; }
.ai-org-b > .ai-org-l, .ai-org-b > .ai-org-ic { margin: 0 !important; }

/* ===================== Textmarker wie in echt: Rechtshänder-Haltung, Keilspitze liegt auf der Zeile ===================== */
.cb-prog { --pen-body: color-mix(in srgb, var(--pc) 82%, #5a3b12); --pen-cap: color-mix(in srgb, var(--pc) 35%, #2f2a25); --pen-tip: color-mix(in srgb, var(--pc) 70%, #fff); }
.cb-prog-track { height: 16px; }
/* Strich: Anfang leicht gerundet und satter (dort setzt der Stift auf), vorne schräg wie die Keilspitze, feine Streifen wie echter Marker */
.cb-prog-fill { left: -2px; top: 2px; bottom: 2px; transform: none; border-radius: 5px 1px 1px 4px; mix-blend-mode: multiply;
  background:
    radial-gradient(ellipse 9px 70% at 3px 50%, color-mix(in srgb, var(--pc) 70%, transparent), transparent 75%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, color-mix(in srgb, var(--pc) 48%, transparent), color-mix(in srgb, var(--pc) 62%, transparent) 50%, color-mix(in srgb, var(--pc) 46%, transparent));
  clip-path: polygon(0 4%, 100% 0, calc(100% - 5px) 100%, 0 96%); }
/* Stift: Spitze (40×40-Grafik, Spitze bei 20/36) sitzt genau am Ende des Strichs in der Zeilenmitte */
.cb-prog-tip { width: 40px; height: 40px; top: 50%; margin: -36px 0 0 -21px; transform-origin: 20px 36px; filter: drop-shadow(1px 2px 1.5px rgba(40, 25, 10, .22)); animation: cbProgHand 1.1s ease-in-out infinite; }
.cb-prog-tip svg { display: block; }
@keyframes cbProgHand { 0%, 100% { transform: rotate(0) translateY(0); } 30% { transform: rotate(-2.5deg) translateY(-.4px); } 60% { transform: rotate(1.5deg) translateY(.3px); } }
.cb-prog.ok .cb-prog-tip { animation: cbProgLift2 .5s ease-out both; }
@keyframes cbProgLift2 { to { transform: translate(10px, -12px) rotate(10deg); opacity: 0; } }
.cb-prog-line { padding-top: 8px; }
.cb-prog-ic svg { display: block; margin: -2px 0 0 -2px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cb-prog-fill { mix-blend-mode: normal; opacity: .6; } }
:root[data-theme="dark"] .cb-prog-fill { mix-blend-mode: normal; opacity: .6; }
.cb-prog-tip { width: 34px; height: 34px; margin: -30.6px 0 0 -18px; transform-origin: 17px 30.6px; }
.cb-prog-tip svg { width: 34px; height: 34px; }
.cb-prog-main { gap: 4px; }
.cb-prog-line { padding-top: 12px; }

/* ===== 0.94.2 · Feinschliff obere Leiste: alles auf EINER Mittellinie (20 px) =====
   Ampel-Knöpfe (y 12 + 8 = 20), Seitenleisten-Schalter, Vor/Zurück, Tabs und „+“ liegen exakt mittig in der 40-px-Leiste */
#tabbar { height: 41px; box-sizing: border-box; align-items: center; }
#tabbar .tabs { align-items: center; }
#tabbar .tab { margin-bottom: 0; height: 28px; }
.sb-top { height: 40px; align-items: center; }
html.fs .sb-top { height: 40px; }
/* eingeklappte Seitenleiste: Symbol 16 px nach dem letzten Ampel-Knopf (wie Ampel ↔ Fensterrand) – 80 px Einzug stimmt bereits */
/* Tab-Leiste: Symbole links und rechts optisch je 16 px vom Rand (wie die Ampel-Knöpfe vom Fensterrand) */
#tabbar { padding-left: 10px; padding-right: 8px; }
html.fs[data-platform="mac"] #tabbar, html.fs[data-platform="mac"] body.no-sidebar #tabbar { padding-left: 10px; }
/* Projekt-Arbeitsbereich: Kopf bündig mit den Feldern darunter (10 px Rand + 10 px Innenabstand) */
.pw-head { padding-left: 20px; padding-right: 20px; }
/* rechte Spalte: gleicher Innenabstand wie die übrigen Felder; Titel „Auszüge“ wird nie abgeschnitten */
.pw-x { padding: 10px; container-type: inline-size; }
.pw-xtitle { flex-shrink: 0; }
@container (max-width: 330px) { .pw-xhead .ai-org-l { display: none; } .pw-xhead .ai-org-b { min-width: 28px; padding-left: 0; padding-right: 0; justify-content: center; } }
/* Leistung: lange Auszugslisten in der rechten Spalte nur zeichnen, wenn sichtbar */
.pw-xgroup { content-visibility: auto; contain-intrinsic-size: auto 420px; }
/* Leistung: Karten der Arbeitsfläche als eigene Layout-Inseln (Änderung einer Karte zwingt nicht die ganze Seite neu zu berechnen) */
.ws-canvas > .card { contain: layout style; }

/* Zitat-Info: Fundstelle im Zusammenhang (Sätze davor und danach, Zitat hervorgehoben) */
.ci-ctx { font: 13px/1.6 var(--serif); color: var(--muted); max-height: 220px; overflow: auto; padding: 10px 12px; border-radius: 10px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); overscroll-behavior: contain; }
.ci-ctx mark { color: var(--text); background: color-mix(in srgb, var(--xc, #ffd400) 34%, transparent); border-radius: 3px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ci-ctx.loading { font-family: var(--font); }

/* ===== Zitat-Info (0.94.4): aufgeräumt – eine Fundstelle, ein Zitat im Zusammenhang, dann Notizen, Verwendung, Literaturangabe */
.ci2 { display: flex; flex-direction: column; gap: 14px; }
.ci2 .ci-head { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.ci2 .ci-hd { min-width: 0; }
.ci2 .ci-title { font-weight: 600; line-height: 1.3; }
.ci2 .ci-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ci2 .ci-loc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ci2 .ci-page { font-weight: 600; color: var(--text); }
.ci2 .ci-tags { color: var(--accent); font-size: 12px; }
.ci2 .ci-blk { display: flex; flex-direction: column; gap: 6px; }
.ci2 .ci-sec { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.ci2 .ci-ctx { margin: 0; }
.ci2 .ci-hint { margin-top: 2px; }
.ci-cmt { font-size: 13px; line-height: 1.5; padding: 8px 10px; border-radius: 8px; background: var(--bg2); border-left: 3px solid var(--xc, var(--accent)); white-space: pre-wrap; }
.ci-lnks { display: flex; flex-direction: column; gap: 2px; }
.ci-lnk { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13px; color: var(--text); cursor: pointer; }
.ci-lnk:hover { background: var(--hover); }
.ci-lnk-ic { flex: none; width: 18px; text-align: center; }
.ci-lnk-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-lnk-s { flex: none; font-size: 11.5px; color: var(--faint); }
.ci-ref { font: 13px/1.55 var(--serif); padding-left: 1.6em; text-indent: -1.6em; color: var(--text); }
.ci-copy { align-self: flex-start; border: 0; background: none; padding: 2px 0; font-size: 12px; color: var(--accent); cursor: pointer; }
.ci-copy:hover { text-decoration: underline; }

/* PDF-Suche: Treffer einzeln anspringen (‹ ›, ↩ / ⇧↩), Zähler „3 / 17“; Treffer wortgenau hervorgehoben */
.rd-sgrp { display: inline-flex; align-items: center; gap: 2px; }
.rd-sgrp .rd-scount { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; padding: 0 4px; }
.rd-sgrp:not(.active) .rd-scount, .rd-sgrp:not(.active) .rd-snav { display: none; }
.rd-sgrp .rd-snav { width: 24px; min-width: 24px; height: 26px; padding: 0; font-size: 17px; line-height: 1; color: var(--text); }
::highlight(cb-hit) { background-color: rgba(255, 196, 0, .40); }
::highlight(cb-hit-cur) { background-color: rgba(255, 112, 0, .62); }

/* ===== Finden & Fragen (0.94.6) ===== */
.cbf-back { position: fixed; inset: 0; z-index: 900; display: flex; justify-content: center; align-items: flex-start; padding-top: 7vh; background: rgba(20, 14, 8, .18); backdrop-filter: blur(1.5px); }
.cbf-back:has(> .cbf-side) { background: transparent; backdrop-filter: none; pointer-events: none; justify-content: flex-end; align-items: stretch; padding: 52px 12px 12px; }
.cbf { pointer-events: auto; width: min(760px, calc(100vw - 32px)); max-height: 82vh; display: flex; flex-direction: column; background: var(--card, var(--bg)); border-radius: 16px; box-shadow: 0 0 0 1px var(--line2), 0 24px 70px rgba(40, 25, 10, .28); overflow: hidden; }
.cbf.cbf-side { width: min(440px, calc(100vw - 32px)); max-height: none; }
.cbf-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.cbf-ic { font-size: 20px; color: var(--muted); line-height: 1; }
.cbf-q { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: 15px/1.4 var(--font); color: var(--text); }
.cbf-x { border: 0; background: none; color: var(--muted); width: 28px; height: 28px; border-radius: 8px; cursor: pointer; }
.cbf-x:hover { background: var(--hover); }
.cbf-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cbf-seg { display: inline-flex; background: var(--bg3); border-radius: 999px; padding: 2px; }
.cbf-seg .cbf-chip { border: 0; background: none; }
.cbf-seg .cbf-chip.on { background: var(--card, var(--bg)); box-shadow: 0 0 0 1px var(--line2); }
.cbf-chip { border: 1px solid var(--line2); background: none; color: var(--text); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.cbf-chip.sm { padding: 1px 8px; font-size: 11.5px; }
.cbf-chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.cbf-dots { display: inline-flex; gap: 3px; }
.cbf-dot { width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--c); cursor: pointer; opacity: .9; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.cbf-dot.on { box-shadow: 0 0 0 2px var(--card, var(--bg)), 0 0 0 3.5px var(--text); opacity: 1; }
.cbf-sel { border: 1px solid var(--line2); background: none; color: var(--text); border-radius: 999px; padding: 3px 8px; font-size: 12px; max-width: 170px; }
.cbf-sel.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.cbf-sp { flex: 1; }
.cbf-body { flex: 1; min-height: 0; overflow: auto; padding: 10px 14px 16px; overscroll-behavior: contain; }
.cbf-sum { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 8px; }
.cbf-muted { color: var(--muted); font-size: 12px; }
.cbf-muted.tiny, .cbf .tiny { font-size: 11px; }
.cbf-err { color: var(--danger, #c8473c); font-size: 12px; }
.cbf-btn { border: 1px solid var(--line2); background: none; color: var(--text); border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.cbf-btn:hover { background: var(--hover); }
.cbf-btn.pri { background: var(--accent); color: #fff; border-color: transparent; }
.cbf-exp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin: -2px 0 10px; }
.cbf-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--bg2); }
.cbf-ai { padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); }
.cbf-ai-h { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.cbf-ans { font: 14px/1.6 var(--serif); color: var(--text); margin-bottom: 8px; }
.cbf-ref { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 5px; padding: 0 5px; margin: 0 1px; font: 600 11px/1.6 var(--font); cursor: pointer; vertical-align: 1px; }
.cbf-grp { margin: 2px 0 8px; }
.cbf-grp > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 6px 2px; font-size: 12.5px; font-weight: 600; color: var(--text); position: sticky; top: -10px; background: var(--card, var(--bg)); z-index: 1; }
.cbf-grp > summary::-webkit-details-marker { display: none; }
.cbf-grp > summary::before { content: '▸'; color: var(--faint); font-size: 10px; transition: transform .15s; }
.cbf-grp[open] > summary::before { transform: rotate(90deg); }
.cbf-gn { margin-left: auto; font-weight: 400; color: var(--faint); font-variant-numeric: tabular-nums; }
.cbf-row { position: relative; padding: 8px 10px 8px 14px; margin: 3px 0; border-radius: 10px; cursor: pointer; content-visibility: auto; contain-intrinsic-size: auto 64px; }
.cbf-row::before { content: ''; position: absolute; left: 4px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--c); }
.cbf-row:hover { background: var(--hover); }
.cbf-row.cur { background: var(--accent-soft); }
.cbf-rt { font: 13px/1.5 var(--serif); color: var(--text); }
.cbf-rt mark { background: color-mix(in srgb, var(--c) 38%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.cbf-rc { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cbf-why { font-size: 11.5px; color: var(--accent); margin-top: 3px; }
.cbf-rm { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.cbf-room { color: var(--muted); }
.cbf-tag { color: var(--accent); }
.cbf-empty { padding: 30px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.cbf-more { padding: 4px 14px; }
/* Einstiege */
.cbf-launch { position: absolute; left: 12px; top: 12px; z-index: 30; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px 0 10px; border: 0; border-radius: 999px; background: var(--card, var(--bg)); color: var(--text); font: 500 12.5px var(--font); box-shadow: 0 0 0 1px var(--line2), 0 4px 14px rgba(40,25,10,.10); cursor: pointer; }
.cbf-launch span { font-size: 15px; color: var(--accent); }
.cbf-launch:hover { box-shadow: 0 0 0 1px var(--accent), 0 6px 18px rgba(40,25,10,.14); }
.cbf-mini { font-size: 15px; color: var(--accent); }
/* Hervorhebung auf der Fläche */
.cb-spot .card { transition: opacity .18s ease, filter .18s ease; }
.cb-spot .card:not(.cb-spot-hit) { opacity: .16; filter: grayscale(.9); }
.cb-spot .card.cb-spot-hit { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent), var(--card-shadow, none); }
.cb-spot .card.cb-spot-cur { box-shadow: 0 0 0 3px var(--accent), 0 10px 30px rgba(40,25,10,.22); opacity: 1; }
.cb-spot .ws-frame { opacity: .55; }

.cbf .cbf-q, .cbf .cbf-q:focus { border: 0 !important; box-shadow: none !important; outline: none !important; background: none !important; padding: 4px 0 !important; height: auto !important; }
.cbf .cbf-sel { width: auto !important; height: 28px !important; min-height: 0 !important; padding: 0 22px 0 10px !important; border-radius: 999px !important; font-size: 12px !important; background-position: right 7px center; }
.cbf .cbf-chip, .cbf .cbf-btn { height: 28px; display: inline-flex; align-items: center; }
.cbf .cbf-chip.sm { height: 22px; }

/* ===== 0.94.7 · Ruhigere Oberfläche: Nebensächliches erst bei Bedarf (nichts entfernt) ===== */
/* Lupen-Symbol im Linienstil */
.cbf-svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; vertical-align: -2px; }
.cbf-mini .cbf-svg { width: 15px; height: 15px; }
/* Start: zweites Suchfeld nur, wenn die Seitenleiste (mit ihrer Suche) ausgeblendet ist – ⌘F geht immer */
@media (min-width: 1000px) { body:not(.no-sidebar) .hm-top { display: none; } body:not(.no-sidebar) .hm-page { padding-top: 34px; } }
/* Fenster-Köpfe: „Nur … zeigen“ erst beim Überfahren des Bereichs */
.pane-max { transition: opacity .15s; }
:is(.pw-bar, .pw-cvbar, .pw-xhead) .pane-max { opacity: 0; }
:is(div, section, aside):hover > :is(.pw-bar, .pw-xhead) .pane-max, .pw-cvbar:hover .pane-max, .pw-cvbar:has(~ :hover) .pane-max, .pane-max:focus-visible, .pane-max.on { opacity: 1; }
/* Arbeitsfläche: Kurz-Hinweis steht im Tooltip */
.pw-cvhint { display: none; }
/* Bibliothek › Weitere Literatur: Such-/Statusknöpfe erst beim Überfahren der Zeile */
.lit-row .lit-find, .lit-row .lit-ref-add, .lit-row .lit-state { opacity: 0; transition: opacity .15s; }
.lit-row:is(:hover, :focus-within) :is(.lit-find, .lit-ref-add, .lit-state), .lit-row .lit-state:has(.lit-chip.on) { opacity: 1; }
.cb-refall-bar > .muted.small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Notiz-Seitenleiste: Erklärtexte einzeilig, voller Text als Tooltip */
.nv-side .side-sec > .side-title + .muted.small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--faint); cursor: default; }
/* „Weiterarbeiten“ (nur auf Start): unten statt über Begrüßung/Abgabe-Karte */
.resume { top: auto; bottom: 22px; transform: translate(-50%, 16px); }
.resume.in { transform: translate(-50%, 0); }
@media (min-width: 1000px) { body:not(.no-sidebar) .resume { left: calc(50% + var(--sb-w, 250px) / 2); } }

/* ===== 0.95.0 · Layout bei allen Fenstergrößen ===== */
/* Start: bei einspaltigem Raster auch die Flächen-Zuordnung einspaltig (sonst entsteht eine schmale Zusatzspalte) */
@media (max-width: 760px) { .hm .hm-grid { grid-template-areas: "read" "act" "up" "notes" "proj" !important; } }
/* Netzwerk: Legende bricht nur zwischen Einträgen um; Zähler steht auf eigener Fläche (nie über Knoten-Beschriftungen) */
.graph-foot .legend > * { white-space: nowrap; }
.graph-foot { align-items: flex-end; gap: 10px; }
.graph-foot .graph-info { pointer-events: auto; padding: 4px 10px; border-radius: 9px; background: color-mix(in srgb, var(--bg) 85%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 0 0 .5px var(--line2); flex: none; }
.graph-wrap { container: gw / inline-size; }
@container gw (max-width: 760px) { .graph-foot { flex-direction: column-reverse; align-items: flex-start; } .graph-foot .legend { max-width: 100%; } .graph-foot .graph-info { padding-left: 10px; } }
/* Kopfzeilen dürfen umbrechen statt sich zu überlagern */
.page-head { flex-wrap: wrap; row-gap: 10px; }
.page-head > h1 { min-width: 0; }
.pw-title > div { min-width: 0; }
.ps > * { max-width: 100%; }
@media (max-width: 760px) {
  .pw-head { grid-template-columns: minmax(0, 1fr); padding-left: 16px; padding-right: 16px; }
  .pw-head .pw-actions { justify-self: start; }
}
/* Bibliothek › Weitere Literatur: in schmalen Fenstern Knöpfe unter dem Text und immer sichtbar */
.lit-panel { container: litp / inline-size; }
@container litp (max-width: 640px) {
  .lit-row { flex-wrap: wrap; }
  .lit-row .lit-main { flex: 1 1 calc(100% - 30px); }
  .lit-row .lit-acts { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; padding-left: 19px; }
  .lit-row :is(.lit-find, .lit-ref-add, .lit-state) { opacity: 1; }
  .cb-refall-bar { flex-wrap: wrap; }
}
/* Einstellungen: schmal → Bereiche als waagrechte Leiste über dem Inhalt */
@media (max-width: 720px) {
  .set-wrap { flex-direction: column; }
  .set-nav { width: auto; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding: 10px 12px; border-right: 0; border-bottom: .5px solid var(--line); gap: 4px; scrollbar-width: none; }
  .set-nav::-webkit-scrollbar { display: none; }
  .set-nav-h, .set-nav-sep { display: none; }
  .set-nav-i { flex: none; white-space: nowrap; padding: 6px 10px; }
  .set-body { min-height: 0; flex: 1; }
}
/* Netzwerk: schmal → Liste nicht breiter als die Fläche, Legende weicht der offenen Liste */
.graph-list { max-width: calc(100% - 32px); }
@container gw (max-width: 640px) { .graph-wrap.has-list .graph-foot { display: none; } }
/* Sehr breite Fenster: Bibliothek bleibt lesbar (Spalten laufen nicht auseinander) */
.lib-wrap > .page-head, .lib-wrap > .lib-content { width: 100%; max-width: 1480px; margin-left: auto; margin-right: auto; box-sizing: border-box; }

/* ===== 0.95.0 · PDF: Seitenübersicht & Inhaltsverzeichnis (⌥⌘2 / ⌥⌘3) ===== */
.rp-svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rp-panel { flex: none; width: 188px; min-width: 0; display: flex; flex-direction: column; background: var(--bg2, var(--bg)); border-right: 1px solid var(--line); contain: layout paint; }
.rp-head { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 8px 0 10px; box-sizing: border-box; border-bottom: 1px solid var(--line); flex: none; }
.rp-tabs { display: inline-flex; flex: 1; min-width: 0; padding: 2px; border-radius: 8px; background: var(--hover); }
.rp-tab { flex: 1; border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); padding: 4px 0; border-radius: 6px; cursor: pointer; }
.rp-tab.on { background: var(--card, var(--bg)); color: var(--text); box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0, 0, 0, .06); }
.rp-x { border: 0; background: none; color: var(--muted); width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; cursor: pointer; flex: none; }
.rp-x:hover { background: var(--hover); color: var(--text); }
.rp-sub { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px 4px; flex: none; }
.rp-sub[hidden] { display: none; }
.rp-filter { border: 0; font: inherit; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--hover); color: var(--muted); cursor: pointer; white-space: nowrap; }
.rp-filter.on { background: var(--accent-soft, var(--active)); color: var(--text); }
.rp-count { font-size: 11px; color: var(--faint); white-space: nowrap; }
.rp-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 10px 16px; outline: none; }
.rp-grid { display: flex; flex-direction: column; gap: 10px; }
.rp-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; padding: 6px; border: 0; border-radius: 10px; background: none; cursor: pointer; font: inherit; color: var(--muted); }
.rp-tile:hover { background: var(--hover); }
.rp-tile.cur { background: var(--active); color: var(--text); }
.rp-thumb { width: 132px; max-width: 100%; background: #fff; border-radius: 3px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 1px 3px rgba(0, 0, 0, .1); overflow: hidden; }
.rp-tile.cur .rp-thumb { box-shadow: 0 0 0 2px var(--accent, #c06a3a), 0 1px 3px rgba(0, 0, 0, .1); }
.rp-canvas { display: block; width: 100%; height: auto; }
body.pdf-dark .rp-canvas { filter: invert(.89) hue-rotate(180deg) sepia(.07) contrast(.94); }
body.pdf-dark .rp-thumb { background: #1c1b19; }
.rp-meta { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 16px; width: 132px; max-width: 100%; }
.rp-num { font-size: 11px; font-variant-numeric: tabular-nums; }
.rp-marks { display: inline-flex; align-items: center; gap: 3px; }
.rp-marks:empty { display: none; }
.rp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .15); }
.rp-mi { width: 11px; height: 11px; color: var(--muted); }
.rp-bm { color: var(--accent, #c06a3a); fill: currentColor; }
.rp-empty { padding: 24px 8px; text-align: center; font-size: 12px; line-height: 1.5; color: var(--muted); }
.rp-link { border: 0; background: none; color: var(--accent, #c06a3a); font: inherit; cursor: pointer; padding: 6px 0; }
.rp-toc { display: flex; flex-direction: column; gap: 1px; }
.rp-toc-i { display: flex; align-items: baseline; gap: 8px; width: 100%; border: 0; background: none; font: inherit; font-size: 12.5px; line-height: 1.35; text-align: left; color: var(--text); padding: 5px 6px 5px calc(6px + var(--d, 0) * 12px); border-radius: 7px; cursor: pointer; }
.rp-toc-i[style*="--d: 0"] { font-weight: 500; }
.rp-toc-i:hover { background: var(--hover); }
.rp-toc-i.cur { background: var(--active); }
.rp-toc-i:disabled { color: var(--faint); cursor: default; }
.rp-toc-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rp-toc-p { flex: none; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
@container (max-width: 520px) { .rp-panel { width: 150px; } .rp-thumb, .rp-meta { width: 104px; } }
.rd-body:has(.rp-panel) { container-type: inline-size; }

/* ===== Vorlesen ===== */
::highlight(cb-say) { background-color: color-mix(in srgb, #2ea8e5 32%, transparent); color: inherit; }
.rd-body { position: relative; }
.rp-say { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 6px 0 12px; box-sizing: border-box; border-radius: 12px; background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); box-shadow: 0 0 0 .5px var(--line2), 0 10px 30px rgba(0, 0, 0, .16); max-width: calc(100% - 24px); }
.rp-say-ic { color: var(--muted); margin-right: 4px; }
.rp-say-pos { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 6px; white-space: nowrap; }
.rp-say-b { width: 30px; height: 30px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; color: var(--text); cursor: pointer; }
.rp-say-b:hover, .rp-say-rate:hover { background: var(--hover); }
.rp-say-pp .rp-svg { fill: currentColor; stroke-width: 1.4; }
.rp-say-rate { border: 0; background: none; font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; min-width: 40px; height: 30px; border-radius: 8px; color: var(--muted); cursor: pointer; }

/* ===== Kurze Meldung mit Aktion ===== */
.cbp-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; z-index: 4000; display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100vw - 32px)); padding: 9px 9px 9px 14px; border-radius: 12px; font-size: 13px; color: var(--text); background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 0 0 .5px var(--line2), 0 12px 32px rgba(0, 0, 0, .16); transition: opacity .2s, transform .2s; }
.cbp-toast.in { opacity: 1; transform: translate(-50%, 0); }
.cbp-toast > span { min-width: 0; }
.cbp-toast-b { flex: none; border: 0; font: inherit; font-size: 12.5px; font-weight: 500; padding: 5px 10px; border-radius: 8px; background: var(--hover); color: var(--text); cursor: pointer; }
.cbp-toast-b:hover { background: var(--active); }

/* ===== 0.95.1 · Fragen & Finden + Filter direkt auf der Arbeitsfläche ===== */
.cbf-tools { position: absolute; left: 12px; top: 12px; z-index: 30; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 150px); pointer-events: none; }
.cbf-tools > * { pointer-events: auto; }
.cbf-tools .cbf-launch { position: static; left: auto; top: auto; }
.cbf-fbtn.on { box-shadow: 0 0 0 1.5px var(--accent), 0 2px 8px rgba(40, 25, 10, .1); color: var(--accent); }
.cbf-fpill { display: inline-flex; align-items: center; height: 30px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 14%, var(--card, var(--bg))); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); min-width: 0; max-width: 100%; }
.cbf-fpill[hidden] { display: none; }
.cbf-fpill-t { border: 0; background: none; font: 500 12px var(--font); color: var(--text); padding: 0 4px 0 12px; height: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; max-width: 340px; }
.cbf-fpill-x { border: 0; background: none; width: 28px; height: 28px; border-radius: 50%; color: var(--muted); cursor: pointer; flex: none; font-size: 11px; }
.cbf-fpill-x:hover { color: var(--text); background: var(--hover); }
/* Ausgeblendet = unsichtbar, aber an Ort und Stelle (Räume, Positionen und Verbindungen bleiben unverändert) */
.cb-flt .card.cb-flt-out { visibility: hidden !important; pointer-events: none !important; }
.cb-flt path.cb-flt-out, .cb-flt .link-label.cb-flt-out { visibility: hidden; }
.cb-flt .ws-frame.cb-flt-empty { opacity: .4; }
/* Filter-Fenster */
.cbf-fpop { position: fixed; z-index: 3000; display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; border-radius: 14px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 18px 48px rgba(30, 18, 8, .22); font-size: 13px; color: var(--text); }
.cbf-fhead { display: flex; align-items: center; gap: 8px; }
.cbf-fhead b { font-size: 13.5px; }
.cbf-flink { border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--accent); cursor: pointer; padding: 2px 4px; }
.cbf-fnote { font-size: 11.5px; line-height: 1.45; color: var(--muted); margin-top: -4px; }
.cbf-ftext { width: 100%; box-sizing: border-box; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--hover); font: inherit; font-size: 12.5px; color: var(--text); outline: none; }
.cbf-ftext:focus { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.cbf-fsec { display: flex; flex-direction: column; gap: 6px; }
.cbf-fh { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.cbf-fchips { display: flex; flex-wrap: wrap; gap: 5px; }
.cbf-fchip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; border: 0; border-radius: 999px; padding: 4px 6px 4px 10px; background: var(--hover); color: var(--text); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbf-fchip:hover { background: var(--active); }
.cbf-fchip.on { background: color-mix(in srgb, var(--accent) 18%, var(--card, var(--bg))); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.cbf-fchip.cbf-fdot::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2); margin-left: -2px; }
.cbf-fn { font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; min-width: 14px; text-align: center; padding: 0 4px; border-radius: 999px; background: color-mix(in srgb, var(--card, var(--bg)) 70%, transparent); }
.cbf-fpop > * { flex-shrink: 0; }

/* ===== 0.95.4 · Seitenzahl eingeben, Lesemodus, automatisches Blättern ===== */
/* Seitenanzeige in der PDF-Leiste: sieht anklickbar aus, wird beim Klick zum Eingabefeld */
.rd-pageinfo { display: inline-block; box-sizing: border-box; min-width: 132px; padding: 3px 8px; border-radius: 7px; transition: background .12s, color .12s; outline: none; }
.rd-pageinfo:hover, .rd-pageinfo:focus-visible { background: var(--hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.rd-pageinfo[hidden] { display: none !important; }
.cbp-pagewrap { display: inline-flex; align-items: center; gap: 5px; height: 26px; max-width: 220px; padding: 0 7px 0 3px; border-radius: 8px; background: var(--card, var(--bg)); box-shadow: 0 0 0 1.5px var(--accent), 0 2px 8px rgba(40, 25, 10, .1); box-sizing: border-box; }
.cbp-pagein { width: 48px; flex: none; height: 22px; border: 0; padding: 0 6px; border-radius: 6px; background: var(--hover); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 500; text-align: center; font-variant-numeric: tabular-nums; outline: none; }
.cbp-pagein.bad { background: color-mix(in srgb, var(--danger, #c0392b) 18%, transparent); color: var(--danger, #c0392b); }
.cbp-pageof { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-variant-numeric: tabular-nums; }
.cbp-btn { border: 0; height: 32px; padding: 0 14px; border-radius: 9px; background: var(--hover); color: var(--text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.cbp-btn:hover { background: var(--active); }
.cbp-btn.sm { height: 28px; padding: 0 11px; font-size: 12px; }
/* Lesemodus: Seitenleiste, Reiter, Werkzeugleisten und Arbeitsfläche treten zurück */
body.cb-readmode #sidebar, body.cb-readmode #tabbar, body.cb-readmode .rd-toolbar, body.cb-readmode .rd-work, body.cb-readmode .rd-split, body.cb-readmode .rp-panel, body.cb-readmode .rd-marks, body.cb-readmode .rd-head { display: none !important; }
body.cb-readmode .cb-rm-host { justify-content: center; background: var(--pdf-bg); }
body.cb-readmode .cb-rm-host > .rd-pdf { flex: 0 1 min(100%, 1040px); }
.cbp-rmbar { position: absolute; top: 10px; right: 18px; z-index: 31; display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 0 0 .5px var(--line2), 0 8px 24px rgba(0, 0, 0, .12); opacity: .25; transition: opacity .2s; }
.cbp-rmbar:hover, .cbp-rmbar:focus-within { opacity: 1; }
.cbp-rm-t { font-size: 12px; color: var(--muted); margin-right: 4px; }
.cbp-as .cbp-as-l { font-size: 12px; color: var(--muted); min-width: 70px; text-align: center; font-variant-numeric: tabular-nums; }
.cbp-as .rp-say-b { font-size: 16px; }

/* ===== 0.95.5 · Schneller Reiterwechsel: Seiten außerhalb des Bildes werden nicht neu gesetzt ===== */
.rd-pdf .page { content-visibility: auto; contain-intrinsic-size: auto 600px auto 800px; }
/* pausierte PDF-Ansichten bleiben im Dokument, werden aber nicht dargestellt – Zurückwechseln ohne Neuaufbau */
#view-host { position: relative; }
#view-host > .view.cb-kept { content-visibility: hidden; position: absolute; inset: 0; z-index: -1; contain: strict; }
.pw-pdfbody { position: relative; }
.pw-pdfbody > .pw-reader.cb-kept { content-visibility: hidden; position: absolute; inset: 0; z-index: -1; contain: strict; }

/* ===== 0.95.8 · Vollbild für den Arbeitsraum: nur noch die Fenster ===== */
.cbp-wsbtn { display: inline-flex; align-items: center; gap: 6px; }
body.cb-wsfocus #sidebar, body.cb-wsfocus .sb-backdrop, body.cb-wsfocus .sb-edge, body.cb-wsfocus #tabbar,
body.cb-wsfocus #view-host > .view:not(.cb-kept) .crs-head, body.cb-wsfocus #view-host > .view:not(.cb-kept) .pw > .pw-head { display: none !important; }
body.cb-wsfocus #view-host > .view:not(.cb-kept) .pw > .pw-cols { padding: 8px; gap: 8px; }
/* Leiste oben – gleiche Höhe, Farbe und Linie wie die Reiterleiste: App-Name links, Fenster · Anordnung · Beenden rechts */
body.cb-wsfocus #main { padding-top: 41px; box-sizing: border-box; }
.cbp-wsbar { position: fixed; z-index: 2600; left: 0; right: 0; top: 0; height: 41px; box-sizing: border-box; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 16px; background: var(--sb-bg, var(--bg2)); border-bottom: 1px solid var(--line); -webkit-app-region: drag; user-select: none; }
html[data-platform="mac"] .cbp-wsbar { padding-left: 80px; }
html.fs[data-platform="mac"] .cbp-wsbar { padding-left: 16px; }
.cbp-wsbrand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: -.01em; line-height: 1; color: var(--text); white-space: nowrap; }
.cbp-wsgap { flex: 1; }
.cbp-wsacts { display: inline-flex; align-items: center; gap: 6px; }
.cbp-wsbar .btn { height: 28px; min-height: 0; padding: 0 11px; border-radius: 8px; font-size: 12.5px; gap: 6px; display: inline-flex; align-items: center; line-height: 1; box-sizing: border-box; -webkit-app-region: no-drag; }
.cbp-wsbar .btn svg, .cbp-wsbar .btn .rp-svg { width: 14px; height: 14px; flex: none; }
.cbp-wsbar .pw-win-ic { width: 14px; height: 14px; }
/* im App-Vollbild: ganz ohne Leiste – sie erscheint nur, wenn die Maus an den oberen Rand fährt */
html.fs body.cb-wsfocus #main { padding-top: 0; }
html.fs .cbp-wsbar { transform: translateY(-100%); transition: transform .18s ease; box-shadow: 0 1px 0 var(--line); }
html.fs .cbp-wsedge { display: block; position: fixed; z-index: 2599; left: 0; right: 0; top: 0; height: 6px; }
html.fs .cbp-wsedge:hover + .cbp-wsbar, html.fs .cbp-wsbar:hover, html.fs .cbp-wsbar:focus-within { transform: none; }

/* ===== 0.96.0 · Arbeitsraum frei belegen (z. B. PDF · PDF · Notizen · Auszüge) ===== */
.pw-slot.cbs-rep > :not(.cbs-pane) { display: none !important; }
.pw-slot.cbs-rep > .cbs-rep-pane { flex: 1 1 auto; min-width: 0; }
.pw-slot.cbs-split { gap: 8px; }
.pw-slot.cbs-split > :not(.cbs-rep-pane) { flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; }
.pw-slot.cbs-rep.cbs-split > .cbs-rep-pane { flex: 1 1 0 !important; }
.cbs-pane { position: relative; display: flex; min-width: 0; min-height: 0; }
.cbs-pane > .pw.pw-only { flex: 1; min-width: 0; min-height: 0; height: 100%; display: flex; flex-direction: column; }
.cbs-pane > .pw.pw-only > * { flex: 1; min-height: 0; }
.cbs-pane .pane-ctl > :not(.cbs-close):not(.cbs-add) { display: none !important; }
.cbs-add .rp-svg, .cbs-close .rp-svg, .cbs-add .i, .cbs-close .i { width: 16px; height: 16px; }
.pane-ctl .cbs-add { opacity: 0; transition: opacity .15s; }
:is(div, section, aside):hover > :is(.pw-bar, .pw-xhead) .cbs-add, .pw-cvbar:hover .cbs-add, .pw-cvbar:has(~ :hover) .cbs-add, .cbs-pane:hover .cbs-add, .cbs-add:focus-visible { opacity: 1; }
/* auf der Fläche (ohne eigene Kopfleiste): Knopf oben rechts in der Art der Zoom-Leiste, Zoom rückt daneben */
.cbs-float { position: absolute; top: 12px; right: 12px; z-index: 31; width: 34px !important; height: 34px !important; border-radius: 12px !important; background: color-mix(in srgb, var(--bg) 86%, transparent) !important; -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: 0 0 0 .5px var(--line2), 0 6px 18px rgba(0, 0, 0, .08); color: var(--muted); display: grid !important; place-items: center; opacity: 1 !important; }
.cbs-float:hover { color: var(--text); }
.cbs-canvas .cv-zoom { right: 54px !important; }
.cbs-bar-rep .pw-cvt { display: none !important; }
.cbs-bar-lab { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--text); padding: 0 6px; }
.cbs-bar-lab .rp-svg { width: 15px; height: 15px; color: var(--muted); }
.cbs-menu { position: fixed; z-index: 3200; min-width: 230px; }
.cbs-menu .ctx-item { cursor: pointer; }
.cbs-menu .cbs-check { margin-left: auto; color: var(--accent); font-size: 12px; }
.cbs-ctl { margin-left: auto; display: inline-flex; align-items: center; }

/* ===== 0.97.0 · Lernen: Karteikarten, Wiederholung, Quiz ===== */
.lk-wrap { padding: 40px clamp(20px, 4vw, 48px) 80px; max-width: 1180px; margin: 0 auto; box-sizing: border-box; overflow-y: auto; height: 100%; }
.lk-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .lk-grid { grid-template-columns: minmax(0, 1fr); } }
.lk-card { background: var(--card, var(--bg)); border-radius: 14px; box-shadow: 0 0 0 .5px var(--line2), var(--card-shadow, 0 1px 3px rgba(0,0,0,.05)); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.lk-card h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 19px; }
.lk-stats { grid-column: 1 / -1; }
.lk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.lk-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--hover); }
.lk-kpi b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lk-kpi span { font-size: 12px; color: var(--muted); }
.lk-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; height: 64px; align-items: end; }
.lk-bar { height: 100%; display: flex; align-items: flex-end; border-radius: 4px; background: var(--hover); overflow: hidden; }
.lk-bar i { display: block; width: 100%; min-height: 2px; background: var(--accent); border-radius: 4px 4px 0 0; }
.lk-decks { display: flex; flex-direction: column; gap: 6px; }
.lk-deck { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--hover); }
.lk-deck-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lk-deck-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.lk-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; background: var(--hover); color: var(--muted); white-space: nowrap; }
.lk-deck .lk-pill { background: var(--card, var(--bg)); }
.lk-pill.due.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--text); }
.lk-pill.ai { background: color-mix(in srgb, #8a63d2 16%, transparent); color: var(--text); }
.lk-pill.hard { background: color-mix(in srgb, #e5793d 18%, transparent); color: var(--text); }
.lk-plan { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.lk-empty { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.lk-empty p { margin: 0; }
.lk-hardbtn { align-self: flex-start; }
.lk-session { display: flex; justify-content: center; padding-top: 12px; }
.lk-face { width: min(720px, 100%); background: var(--card, var(--bg)); border-radius: 16px; box-shadow: 0 0 0 .5px var(--line2), 0 10px 30px rgba(40, 25, 10, .08); padding: 22px 26px; display: flex; flex-direction: column; gap: 18px; }
.lk-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lk-src { border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--accent); cursor: pointer; padding: 2px 4px; border-radius: 6px; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-src:hover { background: var(--hover); }
.lk-q { font-family: var(--serif); font-size: 21px; line-height: 1.4; }
.lk-a { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.lk-text { font-size: 17px; line-height: 1.65; }
.lk-gap { display: inline-block; min-width: 3em; padding: 0 6px; border-radius: 6px; background: var(--hover); color: var(--muted); text-align: center; }
.lk-gap.on { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); font-weight: 500; }
.lk-show { align-self: center; display: inline-flex; gap: 10px; align-items: center; }
.lk-show kbd { font-size: 11px; opacity: .8; }
.lk-grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lk-g { height: auto !important; padding: 8px 6px !important; display: flex; flex-direction: column; gap: 2px; align-items: center; }
.lk-g b { font-weight: 500; }
.lk-g span { font-size: 11.5px; color: var(--muted); }
.lk-g.g0 b { color: #c0392b; } .lk-g.g3 b { color: #5a8f3c; }
.lk-tools { display: flex; gap: 12px; justify-content: center; }
.lk-link { border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.lk-link:hover { color: var(--text); background: var(--hover); }
.lk-link.danger:hover { color: #c0392b; }
.lk-done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 0; }
.lk-done h2 { font-family: var(--serif); font-weight: 500; margin: 0; }
.lk-opts { display: flex; flex-direction: column; gap: 8px; }
.lk-opt { text-align: left; border: 0; border-radius: 10px; padding: 10px 14px; background: var(--hover); font: inherit; font-size: 14px; line-height: 1.45; color: var(--text); cursor: pointer; }
.lk-opt:hover:not(:disabled) { background: var(--active); }
.lk-opt.ok { background: color-mix(in srgb, #5fb236 22%, transparent); }
.lk-opt.bad { background: color-mix(in srgb, #ff6666 22%, transparent); }
.lk-filter { display: flex; gap: 8px; margin-bottom: 12px; }
.lk-filter .input { flex: 1; }
.lk-list { display: flex; flex-direction: column; gap: 6px; }
.lk-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2); }
.lk-row.susp { opacity: .55; }
.lk-row-m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lk-back { position: fixed; inset: 0; z-index: 3500; display: grid; place-items: center; background: rgba(20, 14, 8, .28); padding: 16px; }
.lk-dlg { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; box-sizing: border-box; border-radius: 16px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 24px 60px rgba(20, 12, 6, .3); }
.lk-dlg-h { display: flex; align-items: center; justify-content: space-between; }
.lk-dlg-h b { font-family: var(--serif); font-weight: 500; font-size: 19px; }
.lk-dlg-f { display: flex; gap: 8px; }
.lk-form { display: flex; flex-direction: column; gap: 6px; }
.lk-form > label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.lk-form [hidden] { display: none !important; }
.lk-ta { min-height: 64px; resize: vertical; font: inherit; }
.lk-prev { display: flex; flex-direction: column; gap: 4px; max-height: 280px; overflow: auto; }
.lk-prev-h { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); position: sticky; top: 0; background: var(--card, var(--bg)); padding: 2px 0 4px; }
.lk-prev-r { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.4; padding: 6px 8px; border-radius: 8px; background: var(--hover); cursor: pointer; }
.lk-prev-r input { margin-top: 3px; accent-color: var(--accent); }

/* ===== 0.97.1 Ergänzungen: Literatur, Prioritäten, Suchverlauf ===== */
.cbx-check { margin-left: auto; padding-left: 14px; color: var(--accent); }
.cbx-menu .ctx-head { padding: 6px 10px 2px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.cbx-lit { margin-left: 8px; font: inherit; font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 9px; border: 1px solid var(--line); background: var(--hover); color: var(--muted); cursor: pointer; vertical-align: 1px; white-space: nowrap; }
.cbx-lit.empty { opacity: 0; border-style: dashed; background: none; }
.lib-row:hover .cbx-lit.empty, .cbx-lit.empty:focus-visible { opacity: 1; }
.cbx-lit:hover { color: var(--text); border-color: var(--accent); }
.cbx-prio { flex: none; width: 22px; height: 22px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 6px; color: var(--c, currentColor); cursor: pointer; opacity: .9; padding: 0; }
.cbx-prio[data-p="0"] { color: var(--faint); opacity: 0; }
.kb-card:hover .cbx-prio[data-p="0"], .cbx-prio:focus-visible { opacity: .8; }
.cbx-prio:hover { background: var(--hover); }
.cbx-prio .rp-svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cbx-prio:not([data-p="0"]) .rp-svg path { fill: color-mix(in srgb, var(--c) 30%, transparent); }
.kb-card.cbx-p1 { box-shadow: inset 3px 0 0 #d9534f, var(--card-shadow, none); }
.cbx-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.cbx-star { flex: none; border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.cbx-star:hover { color: var(--accent); background: var(--hover); }
.cbx-hist { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 10px; border-bottom: 1px solid var(--line); }
.cbx-hrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cbx-hl { font-size: 11px; color: var(--faint); min-width: 104px; }
.cbx-chip { font: inherit; font-size: 12px; padding: 2px 9px; border-radius: 11px; border: 1px solid var(--line); background: none; color: var(--text); cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbx-chip:hover { border-color: var(--accent); }
.cbx-chip.on { background: var(--accent-soft); border-color: transparent; }
.cbx-dups { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow: auto; min-width: 520px; }
.cbx-dup { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.cbx-dup-h { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cbx-dup-r { display: flex; align-items: center; gap: 8px; }
.cbx-dup-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== 0.97.2 Notizen & Arbeitsfläche ===== */
.cbx-dis { opacity: .45; cursor: default; }
.lk-dlg.cbx-wide { width: min(640px, calc(100vw - 48px)); }
.cbx-snwrap { display: flex; flex-direction: column; gap: 10px; }
.cbx-row { display: flex; align-items: center; gap: 8px; }
.cbx-row > .input { flex: 1; }
.cbx-snf { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.cbx-snf textarea { resize: vertical; font: inherit; }
.cbx-snl { display: flex; flex-direction: column; gap: 2px; max-height: 52vh; overflow: auto; }
.cbx-sn { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; }
.cbx-sn.pick { cursor: pointer; }
.cbx-sn:hover { background: var(--hover); }
.cbx-sn-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cbx-sn-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbx-sn.cbx-h .cbx-sn-t { font-weight: 600; }
.cbx-sn .tb-btn { opacity: 0; } .cbx-sn:hover .tb-btn { opacity: 1; }
.wikilink.cbx-blk { text-decoration-style: dotted; }
@keyframes cbxFlash { 0%, 40% { background: var(--accent-soft); } 100% { background: transparent; } }
.cbx-flash { animation: cbxFlash 2.2s ease-out; border-radius: 4px; }
.cbx-mm { max-height: 64vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.cbx-mm svg { display: block; }
.lk-dlg.cbx-mmdlg { width: min(1000px, calc(100vw - 48px)); }
.cv-wrap.cbx-capturing .cv-dock, .cv-wrap.cbx-capturing .cv-zoom, .cv-wrap.cbx-capturing .cv-grid, .cv-wrap.cbx-capturing .cbf-tools, .cv-wrap.cbx-capturing .cbf-fpill { visibility: hidden !important; }
.cv-wrap.cbx-capturing .card.sel { outline: none !important; box-shadow: var(--card-shadow, none) !important; }
::highlight(cbx-jump) { background-color: rgba(230, 170, 60, .35); }
body.cbx-capt .cbp-toast, body.cbx-capt .toast, body.cbx-capt .cbx-menu { visibility: hidden !important; }
.cv-wrap.cbx-capturing { pointer-events: none; }

/* ===== 0.97.3 KI-Werkstatt ===== */
.lk-dlg.cbk { width: min(760px, calc(100vw - 48px)); height: min(760px, calc(100vh - 48px)); }
.cbk-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
.cbk-note { font-size: 12px; color: var(--muted); padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); }
.cbk-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cbk-tab { font: inherit; font-size: 12.5px; padding: 4px 11px; border-radius: 14px; border: 1px solid var(--line); background: none; color: var(--text); cursor: pointer; }
.cbk-tab:hover { border-color: var(--accent); } .cbk-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cbk-src { font-size: 12px; color: var(--muted); } .cbk-src summary { cursor: pointer; }
.cbk-src ol { max-height: 140px; overflow: auto; margin: 6px 0 0; padding-left: 22px; }
.cbk-out { flex: 1; min-height: 120px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.cbk-blocks { display: flex; flex-direction: column; gap: 8px; line-height: 1.55; }
.cbk-h { font-family: var(--serif, Georgia, serif); font-weight: 600; font-size: 15px; margin-top: 4px; }
.cbk-b.ungrounded { opacity: .6; } .cbk-warn { color: var(--danger); font-size: 12px; }
.cbk-ref { font: inherit; font-size: 10.5px; line-height: 15px; min-width: 17px; padding: 0 4px; margin: 0 1px; border-radius: 8px; border: 0; background: var(--accent-soft); color: var(--accent); cursor: pointer; vertical-align: 1px; }
.cbk-ref:hover { background: var(--accent); color: #fff; }
.cbk-q { align-self: flex-end; max-width: 80%; padding: 6px 11px; border-radius: 12px; background: var(--hover); }
.cbk-err { color: var(--danger); }

/* ===== 0.98.1 Bibliothek: Autor · Jahr · Titel · optionale Spalte ===== */
.lib-v2 .lib-row { grid-template-columns: minmax(130px, 1fr) 56px minmax(0, 3fr) minmax(120px, 1.3fr); gap: 16px; }
.lib-v2.lib-nocol .lib-row { grid-template-columns: minmax(130px, 1fr) 56px minmax(0, 3fr) auto; }
.lib-v2 .lib-row > * { display: block !important; min-width: 0; }
.lib-v2 .lib-title b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.lib-v2 .lib-sub { color: var(--text); font-size: 13.5px; }
.lib-v2 .lib-year { font-variant-numeric: tabular-nums; }
.lib-v2 .lib-chips { display: flex !important; flex-wrap: wrap; gap: 4px; }
.lib-v2 .lib-x { font-size: 12.5px; }
.lib-colpick { font: inherit; font-size: 12px; color: var(--muted); background: none; border: 0; padding: 2px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.lib-colpick:hover { background: var(--hover); color: var(--text); }
.lib-v2 .lib-row.head > :last-child { justify-self: end; }
@media (max-width: 760px) { .lib-v2 .lib-row { grid-template-columns: minmax(100px, 1fr) 48px minmax(0, 2fr); } .lib-v2 .lib-row > :nth-child(4) { display: none !important; } }
html.phone .lib-v2 .lib-row > :not(:first-child):not(:last-child) { display: block !important; }

/* ===== 0.98.1 Lernen: Wiederholungen ===== */
.lk-rep { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.lk-rep-h { display: flex; align-items: baseline; gap: 8px; } .lk-rep-h b { font-size: 13px; font-weight: 600; }
.lk-rep-k { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lk-rep-k > div { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.lk-rep-k b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; } .lk-rep-k span { font-size: 11.5px; color: var(--muted); }
.lk-cols { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; height: 120px; align-items: end; padding-top: 4px; border-bottom: 1px solid var(--line); }
.lk-col { height: 100%; display: grid; grid-template-rows: 16px 1fr; align-items: end; justify-items: center; position: relative; }
.lk-col-n { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; align-self: end; }
.lk-col-bar { width: 100%; max-width: 22px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 5px 5px 0 0; background: color-mix(in srgb, var(--accent) 28%, transparent); overflow: hidden; align-self: end; }
.lk-col-bar i { display: block; width: 100%; background: var(--accent); }
.lk-col-d { position: absolute; bottom: -18px; font-size: 10.5px; color: var(--faint); }
.lk-col.today .lk-col-d { color: var(--text); font-weight: 600; }
.lk-cols { margin-bottom: 18px; }
.lk-rep-l { display: flex; align-items: center; gap: 6px; } .lk-rep-l i { width: 10px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 28%, transparent); margin-left: 6px; } .lk-rep-l i.ok { background: var(--accent); margin-left: 0; }
@media (max-width: 700px) { .lk-rep-k { grid-template-columns: repeat(2, 1fr); } }

/* ===== 0.98.1 Startseite: Demnächst · ToDos · Projekte · Weiterlesen · Lernen ===== */
.hm .hm-grid.hm-grid5 { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-areas: "up up act act proj proj" "read read read learn learn learn"; }
.hm .hm-grid5 .hm-c-learn { grid-area: learn; }
@media (max-width: 1180px) { .hm .hm-grid.hm-grid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "up act" "proj read" "learn learn"; } }
@media (max-width: 760px) { .hm .hm-grid.hm-grid5 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "up" "act" "proj" "read" "learn" !important; } }
.hm-learn { display: flex; flex-direction: column; gap: 10px; }
.hm-learn-k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hm-learn-k > div { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--hover); }
.hm-learn-k b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; } .hm-learn-k span { font-size: 11.5px; color: var(--muted); }
.hm-learn-d { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.hm-learn-d:last-child { border-bottom: 0; } .hm-learn-d:hover b { color: var(--accent); }
.hm-learn-d b { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-learn-d span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hm-learn .btn { align-self: flex-start; }

/* ===== 0.98.1 Werkzeuge: Bilder markieren, Präsentieren, Erinnerung, Kennzeichen ===== */
.wk-back { position: fixed; inset: 0; z-index: 3000; }
.wk-skitch { background: rgba(20, 14, 8, .55); display: grid; place-items: center; padding: 24px; }
.wk-frame { width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--card, var(--bg)); box-shadow: var(--shadow); }
.wk-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.wk-tool { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--text); cursor: pointer; }
.wk-tool:hover { background: var(--hover); } .wk-tool.on { background: var(--accent-soft); color: var(--accent); }
.wk-tool .rp-svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wk-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.wk-bar .wk-col { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--bg); background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; margin: 0 2px; }
.wk-bar .wk-col.on { box-shadow: 0 0 0 2px var(--accent); }
.wk-stage { flex: 1; min-height: 0; overflow: auto; display: grid; place-items: center; background: repeating-conic-gradient(var(--hover) 0 25%, transparent 0 50%) 0 0 / 16px 16px; border-radius: 10px; }
.wk-canvas { max-width: 100%; max-height: calc(100vh - 170px); cursor: crosshair; touch-action: none; }
.wk-present { background: var(--bg); display: flex; flex-direction: column; }
.wk-pstage { flex: 1; overflow: auto; display: grid; place-items: center; padding: 6vh 8vw; }
.wk-slide { width: min(1000px, 100%); font-size: clamp(18px, 2.1vw, 28px); line-height: 1.5; }
.wk-slide h1 { font-family: var(--serif, Georgia, serif); font-size: 2.2em; margin: 0 0 .5em; }
.wk-slide h2 { font-family: var(--serif, Georgia, serif); font-size: 1.6em; margin: 0 0 .6em; }
.wk-slide img { max-width: 100%; max-height: 60vh; }
.wk-pbar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 85%, transparent); box-shadow: var(--shadow); opacity: .35; transition: opacity .2s; }
.wk-pbar:hover { opacity: 1; }
.wk-pbtn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--text); border-radius: 8px; cursor: pointer; }
.wk-pbtn:hover { background: var(--hover); } .wk-pbtn.on { color: #e5484d; }
.wk-pbtn .rp-svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wk-pnum { font-size: 12px; color: var(--muted); min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.wk-present.laser { cursor: none; }
.wk-laser { position: fixed; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 14px 4px rgba(255, 59, 48, .6); pointer-events: none; z-index: 2; }
.wk-trail { position: fixed; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 59, 48, .5); pointer-events: none; animation: wkFade .45s linear forwards; }
@keyframes wkFade { to { opacity: 0; transform: scale(.3); } }
.wk-remind { position: fixed; z-index: 2600; width: 250px; }
.wk-rrow { display: flex; gap: 6px; padding: 4px 6px 6px; } .wk-rrow .input { flex: 1; min-width: 0; }
.lib-v2 .cbx-lit.empty { opacity: .45; } .lib-v2 .lib-row:hover .cbx-lit.empty { opacity: 1; }
.lib-v2 .cbx-lit { margin-left: 0; }
@media (max-width: 900px) { .crs-cols { grid-template-rows: minmax(110px, 1fr) minmax(0, auto); } .crs-cols > .crs-list { min-height: 0; } .crs-cols > .crs-detail { max-height: 58vh; } }

/* ===================== 0.98.2 Startseite: Sideboard, neu gedacht =====================
   Idee: das Möbel aus dem Logo bleibt erkennbar – aber reduziert auf seine Geometrie.
   Eine schmale Deckplatte in Nussbaum (flach, ohne Maserung), darunter ein Korpus aus
   gleich großen Modulen, getrennt nur durch Haarlinien (wie ein Regalsystem), zwei feine
   Beine. Keine Holztextur, keine Innenschatten. Farben der Markierungen bleiben unberührt. */
.hm { --sb-r: 18px; --sb-plank: color-mix(in srgb, var(--wood-2, #7a4a2a) 92%, #000); --sb-hair: var(--line); --sb-mod: var(--card, var(--bg)); }
/* Aktionen stehen auf der Platte: ruhige Flächen, Haarlinie, kein Anheben wie Schubladen */
.hm .hm-acts { gap: 10px; padding: 0 28px; align-items: stretch; }
.hm .hm-act { border-radius: 12px 12px 3px 3px !important; min-height: 58px; padding: 11px 14px; background: var(--sb-mod);
  box-shadow: 0 0 0 .5px var(--line2), 0 1px 0 rgba(255, 255, 255, .7) inset !important; }
.hm .hm-act:hover { transform: translateY(-1px) !important; box-shadow: 0 0 0 .5px color-mix(in srgb, var(--accent) 55%, var(--line2)), 0 6px 14px -8px rgba(60, 35, 15, .25) !important; }
.hm .hm-act:active { transform: translateY(0) !important; }
.hm .hm-act-t b { font-size: 13.5px !important; font-weight: 600 !important; }
.hm .hm-act-t span { font-size: 11.5px; }
/* Deckplatte: eine präzise Kante */
.hm .hm-plank { height: 7px !important; border-radius: 4px !important; background: var(--sb-plank) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 3px 6px -3px rgba(40, 20, 5, .45) !important; }
/* Korpus: Module mit Haarlinien statt Holzrahmen */
.hm .hm-board { margin: 0 14px 64px; padding: 0; border-radius: 0 0 var(--sb-r) var(--sb-r); background: var(--sb-hair);
  box-shadow: 0 0 0 .5px var(--line2), 0 24px 40px -28px rgba(60, 35, 15, .35); }
.hm .hm-board::after { left: 12%; right: 12%; bottom: -44px; height: 10px; background: radial-gradient(closest-side, rgba(60, 35, 15, .14), transparent); }
.hm .hm-grid, .hm .hm-grid.hm-grid5 { gap: 1px; border-radius: 0 0 var(--sb-r) var(--sb-r); overflow: hidden; background: var(--sb-hair); }
.hm .hm-board .hm-card { counter-increment: hmmod; min-height: 232px; border-radius: 0; background: var(--sb-mod); box-shadow: none; padding: 22px 24px 20px; transition: background-color .2s; }
.hm .hm-grid { counter-reset: hmmod; }
.hm .hm-board .hm-card:hover { background: color-mix(in srgb, var(--sb-mod) 96%, var(--accent)); }
/* Kopf eines Moduls: Nummer · Titel · leiser Link */
.hm .hm-board .hm-ch { min-height: 0; margin-bottom: 16px; align-items: baseline; }
.hm .hm-board .hm-ch h2 { display: flex; align-items: baseline; gap: 10px; font-size: 17px; letter-spacing: -.01em; }
.hm .hm-board .hm-ch h2::before { content: counter(hmmod, decimal-leading-zero); font-family: var(--font); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--faint); font-variant-numeric: tabular-nums; transform: translateY(-1px); }
.hm .hm-board .hm-card:hover .hm-ch h2::before { color: var(--accent); }
.hm .hm-board .hm-ch .hm-link { font-size: 12px; color: var(--muted); opacity: .0; transition: opacity .2s, color .15s; }
.hm .hm-board .hm-card:hover .hm-ch .hm-link, .hm .hm-board .hm-ch .hm-link:focus-visible { opacity: 1; }
.hm .hm-board .hm-ch .hm-link:hover { color: var(--accent); }
/* Zeilen in den Modulen: Haarlinien, gleiche Höhen */
.hm .hm-board .hm-row { border-radius: 8px; }
.hm .hm-learn-k > div, .hm .hm-board .hm-learn-k > div { background: none; border: .5px solid var(--line2); border-radius: 10px; }
.hm .hm-learn-k b { font-family: var(--font); font-size: 20px; letter-spacing: -.02em; }
.hm .hm-learn-d { border-bottom: .5px solid var(--line); }
/* Beine: zwei feine, leicht gespreizte Linien */
.hm .hm-legs { bottom: -34px; height: 34px; }
.hm .hm-legs i { width: 3px; height: 34px; border-radius: 0 0 2px 2px; background: var(--sb-plank); box-shadow: none; }
.hm .hm-legs i:first-child { left: 7%; transform: skewX(14deg); }
.hm .hm-legs i:last-child { right: 7%; transform: skewX(-14deg); }
/* Dunkel: Module heben sich leicht vom Grund ab, Linien bleiben fein */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hm { --sb-plank: color-mix(in srgb, var(--wood-1, #7c4f30) 80%, #000); }
  :root:not([data-theme="light"]) .hm .hm-act { box-shadow: 0 0 0 .5px var(--line2) !important; }
  :root:not([data-theme="light"]) .hm .hm-board { box-shadow: 0 0 0 .5px var(--line2), 0 24px 40px -28px rgba(0, 0, 0, .7); } }
:root[data-theme="dark"] .hm { --sb-plank: color-mix(in srgb, var(--wood-1, #7c4f30) 80%, #000); }
@container hmp (max-width: 560px) { .hm .hm-board { margin: 0 4px 56px; } .hm .hm-board .hm-card { padding: 18px; min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .hm .hm-act, .hm .hm-board .hm-card { transition: none; } }

/* =====================================================================================
   0.98.3 · Gestaltungsgrundsatz für die ganze App: „neue Klassik“
   Weniger, aber besser: Haarlinien statt Rahmen und Schatten, ruhige Flächen, eine Akzentfarbe,
   klare Hierarchie (Serifen für Titel, Systemschrift für Inhalt, Ziffern tabellarisch),
   Zustände leise und präzise. Markierungsfarben (Zotero/Vorschau) und Projektfarben bleiben unberührt.
   ===================================================================================== */
:root {
  --hair: .5px; --r-sm: 8px; --r: 10px; --r-lg: 14px;
  --card-shadow: 0 0 0 .5px var(--line2), 0 1px 1px rgba(60, 40, 20, .03);
  --card-shadow-hover: 0 0 0 .5px color-mix(in srgb, var(--accent) 40%, var(--line2)), 0 8px 20px -12px rgba(60, 40, 20, .22);
  --sh-sm: 0 0 0 .5px var(--line2); --sh-md: 0 0 0 .5px var(--line2), 0 10px 28px -14px rgba(60, 40, 20, .25);
  --shadow: 0 0 0 .5px var(--line2), 0 18px 48px -20px rgba(60, 40, 20, .32);
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --card-shadow: 0 0 0 .5px var(--line2); --card-shadow-hover: 0 0 0 .5px color-mix(in srgb, var(--accent) 45%, var(--line2)), 0 10px 24px -12px rgba(0, 0, 0, .6);
  --sh-md: 0 0 0 .5px var(--line2), 0 12px 30px -14px rgba(0, 0, 0, .7); --shadow: 0 0 0 .5px var(--line2), 0 22px 56px -20px rgba(0, 0, 0, .8); } }
:root[data-theme="dark"] { --card-shadow: 0 0 0 .5px var(--line2); --shadow: 0 0 0 .5px var(--line2), 0 22px 56px -20px rgba(0, 0, 0, .8); }

/* Ziffern überall gleich breit, Titel in Serifen */
:where(.lk-kpi b, .lk-rep-k b, .hm-learn-k b, .pv-num, .lib-year, .kb-col-n, .cal-num, .rd-pageinfo, .tab-prog) { font-variant-numeric: tabular-nums; }
:where(.lk-card h2, .lk-dlg-h b, .modal-title, .set-sec h2, .pv-c-list h2) { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }

/* Knöpfe: primär = eine Fläche in der Akzentfarbe, sekundär = Haarlinie */
.btn { box-shadow: 0 0 0 var(--hair) var(--line2) !important; border-color: transparent !important; background: var(--card, var(--bg)); }
.btn:hover:not(:disabled) { box-shadow: 0 0 0 var(--hair) color-mix(in srgb, var(--accent) 45%, var(--line2)) !important; background: var(--card, var(--bg)); }
.btn.primary { background: var(--accent) !important; color: #fff; box-shadow: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #1a1310; } }
.btn.primary:hover:not(:disabled) { filter: none; background: color-mix(in srgb, var(--accent) 88%, #000) !important; }
.btn:active:not(:disabled) { transform: translateY(.5px); }
.btn:disabled { opacity: .45; }
:is(.btn, .tb-btn, .input, .select, .lib-pick, .seg-b, .cbk-tab, .cbx-chip, .lib-colpick):focus-visible { outline: none; box-shadow: var(--focus), 0 0 0 var(--hair) var(--accent) !important; }

/* Eingabefelder: Haarlinie, Fokus leise in Akzent */
:is(.input, .select, .pv-search, .qs-input):not(.nb-title) { border-color: var(--line2); }
:is(.input, .select):focus { border-color: color-mix(in srgb, var(--accent) 55%, var(--line2)); box-shadow: var(--focus); }

/* Karten, Kacheln, Fächer: Haarlinie statt Rahmen + Schatten */
:is(.kb-card, .lk-card, .lk-deck, .pv-row.pj-row, .crs-detail, .nc, .doc-tile, .cbx-dup, .cbx-snf, .lk-prev-r) { box-shadow: var(--card-shadow) !important; border-color: transparent !important; }
.kb-card { border-left-width: 1px !important; }
:is(.kb-card, .nc, .doc-tile, .pv-row.pj-row):hover { box-shadow: var(--card-shadow-hover) !important; }
.lk-deck { background: transparent; }
.lk-kpi { background: transparent; box-shadow: inset 0 0 0 var(--hair) var(--line2); }

/* Dialoge und Menüs: eine Fläche, eine Linie, ein weicher Schatten */
:is(.modal, .lk-dlg, .cbf, .wk-frame) { box-shadow: var(--shadow) !important; border: 0 !important; }
.modal-back, .lk-back { background: rgba(28, 20, 12, .18); }
.ctx { box-shadow: var(--shadow) !important; border-radius: 12px; }
.ctx-item { border-radius: 7px; }
.ctx-item:hover { background: var(--accent-soft); }
.ctx-sep { background: var(--line); margin: 4px 6px; }

/* Seitenleiste & Reiter: aktiver Zustand als ruhige Fläche mit Haarlinie */
.sb-item.active { box-shadow: 0 0 0 var(--hair) var(--line2) !important; }
#tabbar .tab.active { box-shadow: 0 0 0 var(--hair) var(--line2) !important; }

/* Pillen und Chips: Kontur statt Füllung, wo sie nur Information tragen */
:is(.lk-pill, .cbx-lit) { background: transparent; box-shadow: inset 0 0 0 var(--hair) var(--line2); border: 0; }
.lk-pill.due.on { background: var(--accent-soft); box-shadow: none; }

/* Startseite: der Hinweis „Nächste Abgabe“ als ruhige Karte statt Farbfläche */
.hm .hm-countdown { background: var(--card, var(--bg)) !important; border: 0 !important; box-shadow: var(--card-shadow) !important; }

/* Leise, präzise Bewegung */
:where(.btn, .tb-btn, .kb-card, .nc, .doc-tile, .pv-row, .ctx-item, .sb-item) { transition-duration: .14s; }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation-duration: 0s !important; } }
.kb-card.cbx-p1 { box-shadow: inset 3px 0 0 #d9534f, var(--card-shadow) !important; } .kb-card.cbx-p1:hover { box-shadow: inset 3px 0 0 #d9534f, var(--card-shadow-hover) !important; }

/* =====================================================================================
   0.98.4 · Knöpfe und Menüs nach macOS (Sonoma/Sequoia), in den Farben der App
   ===================================================================================== */
:root { --mac-btn-bg: #fff; --mac-btn-line: rgba(0, 0, 0, .14); --mac-btn-sh: 0 .5px 1px rgba(0, 0, 0, .10); --mac-menu-bg: color-mix(in srgb, var(--card, #fff) 82%, transparent); --mac-menu-line: rgba(0, 0, 0, .12); --mac-track: rgba(60, 40, 20, .07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --mac-btn-bg: rgba(255, 255, 255, .10); --mac-btn-line: rgba(255, 255, 255, .08); --mac-btn-sh: 0 .5px 0 rgba(255, 255, 255, .06) inset, 0 1px 1px rgba(0, 0, 0, .3); --mac-menu-bg: color-mix(in srgb, #262422 80%, transparent); --mac-menu-line: rgba(255, 255, 255, .12); --mac-track: rgba(255, 255, 255, .07); } }
:root[data-theme="dark"] { --mac-btn-bg: rgba(255, 255, 255, .10); --mac-btn-line: rgba(255, 255, 255, .08); --mac-menu-bg: color-mix(in srgb, #262422 80%, transparent); --mac-menu-line: rgba(255, 255, 255, .12); --mac-track: rgba(255, 255, 255, .07); }

/* Druckknopf: weiße Fläche, feine Kontur, Hauch von Schatten; Hauptknopf in der Akzentfarbe mit leichtem Glanz */
.btn { border-radius: 7px; font-weight: 500; background: var(--mac-btn-bg) !important; box-shadow: 0 0 0 .5px var(--mac-btn-line), var(--mac-btn-sh) !important; color: var(--text); }
.btn:hover:not(:disabled) { background: var(--mac-btn-bg) !important; box-shadow: 0 0 0 .5px color-mix(in srgb, var(--mac-btn-line) 60%, var(--text) 18%), var(--mac-btn-sh) !important; }
.btn:active:not(:disabled) { transform: none; filter: brightness(.94); }
.btn.sm { border-radius: 6px; }
.btn.primary { background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0)) , var(--accent) !important; color: #fff; box-shadow: 0 0 0 .5px color-mix(in srgb, var(--accent) 70%, #000), 0 .5px 1px rgba(0, 0, 0, .18) !important; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0)), var(--accent) !important; }
.btn.primary:active:not(:disabled) { background: color-mix(in srgb, var(--accent) 86%, #000) !important; filter: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0)), color-mix(in srgb, var(--accent) 82%, #000) !important; } }
:is(.btn, .lib-pick, .lib-colpick):focus-visible { box-shadow: 0 0 0 .5px var(--mac-btn-line), 0 0 0 3.5px color-mix(in srgb, var(--accent) 45%, transparent) !important; }
/* Symbolknöpfe in Leisten: randlos, Hover als ruhige Fläche wie in der macOS-Toolbar */
.tb-btn { border-radius: 6px; }
.tb-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.tb-btn:active { background: color-mix(in srgb, var(--text) 12%, transparent); }

/* Segmentsteuerung wie in macOS: Spur + weißer Schieber */
.seg { background: var(--mac-track); border-radius: 8px; padding: 2px; box-shadow: none; }
.seg-b { border-radius: 6px; }
.seg-b.on { background: var(--mac-btn-bg); color: var(--text); box-shadow: 0 0 0 .5px var(--mac-btn-line), 0 1px 2px rgba(0, 0, 0, .10); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg-b.on { background: rgba(255, 255, 255, .16); } }

/* Menüs: Milchglas, 10 px Radius, kompakte Zeilen, Auswahl in Akzentfarbe mit weißer Schrift */
.ctx { background: var(--mac-menu-bg) !important; -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8);
  border-radius: 10px !important; padding: 5px !important; box-shadow: 0 0 0 .5px var(--mac-menu-line), 0 10px 32px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .06) !important; }
.ctx-item { min-height: 24px; padding: 3px 10px; border-radius: 5px; font-size: 13px; gap: 8px; }
.ctx-item:hover, .ctx-item.kb { background: var(--accent); color: #fff; }
.ctx-item:hover :is(.ctx-ic, .ctx-kbd, .ctx-ic svg.i, .muted, .cbx-check), .ctx-item.kb :is(.ctx-ic, .ctx-kbd) { color: #fff !important; }
.ctx-item.danger:hover { background: var(--danger); }
.ctx-item.cbx-dis:hover, .ctx-item.disabled:hover { background: none; color: inherit; }
.ctx-ic { min-width: 18px; color: var(--muted); }
.ctx-kbd { font-size: 12px; color: var(--faint); letter-spacing: .02em; }
.ctx-sep { height: 1px; margin: 5px 10px !important; background: var(--mac-menu-line) !important; }
.ctx-head, .cbx-menu .ctx-head { padding: 5px 10px 3px; font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: none; letter-spacing: 0; }
.cbx-check { color: var(--accent); }

/* Eingabefelder: macOS-Felder mit Fokusring */
:is(.input, .select):focus { box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 35%, transparent); border-color: color-mix(in srgb, var(--accent) 70%, transparent); }

/* =====================================================================================
   Mitschrift (nach Granola): schlichte Leiste unten in der Notiz
   ===================================================================================== */
.mt-bar { position: sticky; bottom: 18px; z-index: 5; width: max-content; max-width: calc(100% - 32px); margin: 28px auto 8px; display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 6px; border-radius: 999px;
  background: var(--mac-menu-bg); -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: 0 0 0 .5px var(--mac-menu-line), 0 8px 24px -10px rgba(0, 0, 0, .25); opacity: .55; transition: opacity .2s; }
.mt-bar:hover, .mt-bar.live, .mt-bar:focus-within { opacity: 1; }
.mt-rec { width: 26px; height: 26px; border-radius: 50%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.mt-rec::before { content: ''; width: 11px; height: 11px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 2px color-mix(in srgb, #e5484d 25%, transparent); transition: border-radius .2s, transform .2s; }
.mt-rec:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.mt-rec.on::before { border-radius: 3px; animation: mtPulse 1.6s ease-in-out infinite; }
@keyframes mtPulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, #e5484d 12%, transparent); } }
.mt-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 0; padding-right: 2px; }
.mt-time:empty { display: none; }
.mt-bar.live .mt-time { color: #e5484d; font-weight: 600; }
.mt-sep { width: 1px; height: 16px; background: var(--mac-menu-line); margin: 0 4px; }
.mt-btn { width: 28px; height: 28px; border: 0; border-radius: 999px; background: none; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.mt-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.mt-btn .rp-svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mt-enh { height: 28px; padding: 0 13px; border: 0; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0)), var(--accent); box-shadow: 0 .5px 1px rgba(0, 0, 0, .2); }
.mt-enh:hover { filter: brightness(1.05); }
.mt-wrap { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.lk-dlg.mt-dlg { width: min(760px, calc(100vw - 48px)); max-height: calc(100vh - 48px); }
.mt-out { overflow: auto; max-height: 52vh; display: flex; flex-direction: column; gap: 10px; line-height: 1.55; }
.mt-b ul { margin: 4px 0 0; padding-left: 20px; }
.mt-b li { margin: 3px 0; }
.mt-b li.mine { color: var(--text); }
.mt-b li.ai { color: var(--muted); }
.mt-b li.ungrounded { color: var(--faint); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.mt-ts { font: inherit; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 6px; padding: 0 5px; margin: 0 2px; cursor: pointer; line-height: 17px; }
.mt-ts:empty { background: none; }
.mt-tr { max-height: 56vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.mt-tr-h { display: flex; align-items: center; gap: 8px; padding: 8px 0 6px; border-bottom: .5px solid var(--line2); position: sticky; top: 0; background: var(--card, var(--bg)); }
.mt-tr-l { display: grid; grid-template-columns: 52px 1fr; gap: 8px; font-size: 13.5px; line-height: 1.5; }
.mt-tr-l .mt-ts { justify-self: start; align-self: start; margin-top: 2px; }

/* ===== 0.98.5 Suche im Arbeitsraum (erst Fenster, dann Arbeitsraum) + Lupe bei den Reitern ===== */
#tabbar .tab-find { display: grid !important; place-items: center; }
.ws-find { position: fixed; z-index: 2500; width: 420px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px;
  background: var(--mac-menu-bg, var(--card)); -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8); box-shadow: 0 0 0 .5px var(--mac-menu-line, var(--line2)), 0 14px 40px rgba(0, 0, 0, .18); }
.ws-find-row { display: flex; align-items: center; gap: 8px; }
.ws-find-q { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 7px 10px; border-radius: 8px; border: .5px solid var(--line2); background: var(--card, var(--bg)); color: var(--text); outline: none; }
.ws-find-q:focus { box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 35%, transparent); border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.ws-find-n { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ws-find-seg { align-self: flex-start; display: inline-flex; }
.ws-find-list { display: flex; flex-direction: column; max-height: 46vh; overflow: auto; }
.ws-find-list:empty { display: none; }
.ws-find-h { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 8px 8px 3px; }
.ws-find-r { display: flex; flex-direction: column; gap: 1px; text-align: left; font: inherit; border: 0; background: none; color: var(--text); padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.ws-find-r b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-find-r span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-find-r:hover, .ws-find-r:focus-visible { background: var(--accent); color: #fff; outline: none; } .ws-find-r:hover span { color: rgba(255, 255, 255, .85); }
.ws-find-more { align-self: flex-start; font: inherit; font-size: 12.5px; color: var(--accent); background: none; border: 0; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.ws-find-more:hover { background: var(--accent-soft); } .ws-find-more.strong { font-weight: 600; }
.ws-find-empty { padding: 6px 8px; }
.ws-find-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px 0; border-top: .5px solid var(--mac-menu-line, var(--line)); }
::highlight(ws-find) { background-color: rgba(245, 197, 24, .45); }
::highlight(ws-find-cur) { background-color: rgba(240, 140, 43, .7); }
.cbf-widen { margin-top: 8px; }
.ws-find-list { overflow-x: hidden; } .ws-find-r { min-width: 0; width: 100%; box-sizing: border-box; }
.mt-has .nv-main { position: relative; }
.nv-main > .mt-bar { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); margin: 0; }
.mt-bar.noai .mt-enh { background: color-mix(in srgb, var(--accent) 55%, var(--bg)); }
.cbx-nbtn { width: auto !important; padding: 0 8px !important; gap: 5px; display: inline-flex !important; align-items: center; }
.cbx-nbtn-l { font-size: 12.5px; font-weight: 500; }
.ctx-lb.has-hint { display: flex; flex-direction: column; line-height: 1.25; padding: 2px 0; white-space: normal !important; }
.ctx-hint { font-size: 11px; color: var(--faint); font-weight: 400; }
.ctx-item:hover .ctx-hint { color: rgba(255, 255, 255, .8); }
.cbx-menu { max-width: 340px; }

/* ===== 0.98.7 Seminarplan ===== */
.lk-dlg.pl-dlg { width: min(860px, calc(100vw - 48px)); max-height: calc(100vh - 48px); }
.pl-wrap { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.pl-list { display: flex; flex-direction: column; gap: 6px; overflow: auto; max-height: 58vh; padding-right: 4px; }
.pl-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; box-shadow: inset 0 0 0 .5px var(--line2); }
.pl-row.off { opacity: .45; } .pl-row.cancelled .pl-topic { text-decoration: line-through; color: var(--muted); }
.pl-row > input { margin-top: 7px; }
.pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pl-line { display: flex; gap: 8px; align-items: center; } .pl-line .input[type=date] { width: 150px; flex: none; } .pl-topic { flex: 1; min-width: 0; }
.pl-tag { font-size: 11px; padding: 1px 7px; border-radius: 9px; box-shadow: inset 0 0 0 .5px var(--line2); color: var(--muted); white-space: nowrap; } .pl-tag.ai { color: var(--accent); }
.pl-refs { display: flex; flex-direction: column; gap: 3px; }
.pl-ref { display: flex; align-items: center; gap: 8px; font-size: 12.5px; } .pl-ref > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-st { font-size: 11px; color: var(--faint); white-space: nowrap; } .pl-ref.found .pl-st { color: var(--ok, #5fb236); }
.pl-content { font-size: 12px; color: var(--muted); }
.pl-opts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; } .pl-opt { display: inline-flex; gap: 6px; align-items: center; }
.pl-sess { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.5; } .pl-sess p { margin: 0; }
.pl-sess-ref { font-size: 12.5px; color: var(--muted); padding-left: 10px; border-left: 2px solid var(--line2); }

/* ===== 0.98.8 Kopfleiste von Notizen/Arbeiten: ruhiger, gleichmäßige Abstände ===== */
.nv-top .cbar { gap: 4px; }
.nv-top .cbar > .btn.sm { height: 26px; padding: 0 10px; font-size: 12.5px; }
.nv-top .cbar > .btn + .btn { margin-left: 2px; }
.nv-top .cbar > .btn + .tb-btn, .nv-top .cbar > .nv-stats + * { margin-left: 8px; }
.nv-top .cbar > .nv-stats { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; padding: 0 2px; line-height: 26px; height: 26px; white-space: nowrap; }
.nv-top .cbar > .tb-btn { width: 30px; height: 28px; display: inline-grid; place-items: center; }
.nv-top .crumbs { gap: 6px; }
.nv-top .proj-btn { margin-left: 10px; }
.cbx-nbtn { width: 30px !important; padding: 0 !important; }
.cbx-nbtn .rp-svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* optische Kante: Schaltflächen mit Hover-Fläche stehen bündig mit Titel und Text */
.props > .prop-add, .nv-props > .prop:first-child { margin-left: -6px; }
.nv-props { margin-top: 6px; margin-bottom: 20px; }
/* Dialogköpfe: Titel und Zusatz (z. B. „✦ KI-Werkstatt | Empirie-Werkstatt“) mit Luft und feiner Trennlinie */
.lk-dlg-h { gap: 12px; }
.lk-dlg-h > b { flex: none; }
.lk-dlg-h .cbk-t { margin-left: 2px; padding-left: 12px; border-left: 1px solid var(--line2); line-height: 18px; font-size: 13px; color: var(--muted); }
/* Fenster-Köpfe: alle Symbole immer sichtbar – einheitlich, kein Ein-/Ausblenden einzelner Knöpfe */
:is(.pw-bar, .pw-cvbar, .pw-xhead) .pane-max, .pane-ctl .cbs-add { opacity: 1 !important; }

/* Seiten löschen (0.98.13) */
.lk-dlg.pg-dlg { width: min(760px, calc(100vw - 48px)); }
.pg-body { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.pg-body > p { margin: 0; }
.pg-row { display: flex; align-items: center; gap: 10px; }
.pg-row > span { font-size: 13px; color: var(--muted); flex: none; }
.pg-row .input { flex: 1; }
.pg-info { min-height: 1.3em; }
.pg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; max-height: min(52vh, 520px); overflow: auto; padding: 2px; }
.pg-tile { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: var(--r-sm, 8px); box-shadow: inset 0 0 0 .5px var(--line2); }
.pg-tile:hover { box-shadow: inset 0 0 0 1px var(--accent); }
.pg-tile:focus-visible { box-shadow: 0 0 0 2px var(--focus, var(--accent)); }
.pg-img { width: 100%; aspect-ratio: 1 / 1.35; display: grid; place-items: center; background: var(--hover); border-radius: 4px; overflow: hidden; }
.pg-img canvas { max-width: 100%; max-height: 100%; background: #fff; }
.pg-num { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pg-tile.on { background: color-mix(in srgb, var(--danger) 10%, transparent); box-shadow: inset 0 0 0 1.5px var(--danger); }
.pg-tile.on .pg-img { opacity: .45; }
.pg-tile.on .pg-num { color: var(--danger); text-decoration: line-through; }
.btn.primary.pg-del { --accent: var(--danger); }

/* Vokabel-Lernkarten (0.98.16) */
.lk-ctx { margin-top: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); font-style: italic; }
.lk-ctx b { font-style: normal; font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 3px; padding: 0 2px; }
.lk-vocab .lk-vlab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lk-vocab .lk-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); margin-top: 4px; }

/* Zitat auf Stichpunkt ziehen (0.98.16) */
.ProseMirror li.cb-li-drop > p, .ProseMirror li.cb-li-drop > div > p { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 5px; min-height: 1.5em; }
.ProseMirror li.cb-li-hit > p, .ProseMirror li.cb-li-hit > div > p { animation: cb-li-hit .9s ease-out; border-radius: 5px; }
@keyframes cb-li-hit { from { background: color-mix(in srgb, var(--accent) 22%, transparent); } to { background: transparent; } }

/* Unterstreichungen durchgehend (0.98.16) */
.card-text.ul, .ulLayer u, .sel-ul-ic { text-decoration-skip-ink: none; }

/* Markieren buchstabengenau: eigene Live-Auswahl (0.98.17) */
.cb-selov { position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: multiply; }
.cb-selov > div { position: absolute; background: rgba(35, 131, 226, .26); border-radius: 2px; }
body.pdf-dark .cb-selov { mix-blend-mode: screen; }
body.pdf-dark .cb-selov > div { background: rgba(224, 145, 92, .42); }
.page.cb-selov-pg .textLayer ::selection, .page.cb-selov-pg .textLayer *::selection { background: transparent !important; }

/* ===== Befehlspalette (1.0, befehle.js) – nur Tokens, keine eigenen Farben ===== */
.cbk-back { position: fixed; inset: 0; z-index: 10000; display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; background: color-mix(in srgb, var(--text) 18%, transparent); }
.cbk { width: min(620px, calc(100vw - 48px)); max-height: min(520px, 70vh); display: flex; flex-direction: column; background: var(--card); color: var(--text); border: 0.5px solid var(--line2); border-radius: var(--r-lg, 14px); box-shadow: var(--shadow); overflow: hidden; font-family: var(--font); }
.cbk-input { appearance: none; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; padding: 16px 16px 12px; border-bottom: 0.5px solid var(--line2); }
.cbk-input::placeholder { color: var(--faint); }
.cbk-list { overflow-y: auto; padding: 4px 8px 8px; }
.cbk-group { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); padding: 12px 8px 4px; }
.cbk-item { display: flex; align-items: baseline; gap: 8px; padding: 8px; border-radius: var(--r-sm, 8px); cursor: default; font-size: 14px; line-height: 1.35; }
.cbk-item.on { background: var(--hover); }
.cbk-t { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbk-sub { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.cbk-k { margin-left: auto; flex: none; font: inherit; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cbk-empty { padding: 24px 8px; color: var(--muted); font-size: 14px; text-align: center; }
.cbk-link { appearance: none; border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.cbk-link:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; border-radius: 4px; }
.cbk-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 0.5px solid var(--line2); color: var(--faint); font-size: 12px; }
.cbk-foot kbd { font: inherit; display: inline-block; min-width: 16px; padding: 0 4px; margin-right: 2px; text-align: center; border: 0.5px solid var(--line2); border-radius: 4px; color: var(--muted); }

/* ===== Eingang (1.0, eingang.js) – baut auf der Befehlspalette auf ===== */
.cbe-head { display: flex; align-items: baseline; gap: 8px; padding: 16px 16px 12px; border-bottom: 0.5px solid var(--line2); }
.cbe-title { font-family: var(--serif); font-size: 18px; }
.cbe-n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cbe-x { margin-left: auto; }
.cbe-list { outline: 0; }
.cbe-item { align-items: center; gap: 12px; }
.cbe-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cbe-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbe-when { flex: none; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.cbe-acts { flex: none; display: flex; gap: 4px; visibility: hidden; }
.cbe-item.on .cbe-acts { visibility: visible; }
.cbe-b { appearance: none; font: inherit; font-size: 12px; color: var(--text); background: var(--bg); border: 0.5px solid var(--line2); border-radius: var(--r-sm, 8px); padding: 4px 8px; cursor: pointer; }
.cbe-b:hover { background: var(--hover); border-color: var(--accent); }
.cbe-b:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 1px; }
.cbe-list:focus-visible .cbe-item.on { box-shadow: inset 0 0 0 1px var(--line2); }

/* ===== Reduzierte Bewegung (1.0): gilt für die ganze App, nicht nur für einzelne Teile ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ===== 1.0.1 · Fehler verständlich zeigen (modules/fehler.js) ===== */
.cbf-back { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; background: rgba(15, 12, 8, .28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: cbfIn .16s ease-out; }
.cbf { width: min(440px, calc(100vw - 40px)); max-height: 80vh; overflow: auto; padding: 22px 22px 18px; border-radius: 14px; background: var(--bg); color: var(--text); box-shadow: 0 0 0 .5px var(--line2), 0 24px 60px rgba(0, 0, 0, .22); text-align: left; }
.cbf-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 18px/1 var(--serif, Georgia, serif); color: #8a5a00; background: color-mix(in srgb, #f5d93f 45%, var(--bg)); box-shadow: inset 0 0 0 1px color-mix(in srgb, #c99a00 35%, transparent); margin-bottom: 12px; }
.cbf h2 { margin: 0 0 6px; font: 600 16px/1.3 var(--font, -apple-system, sans-serif); }
.cbf-hint { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cbf-det { margin: 0 0 16px; font-size: 12px; color: var(--muted); }
.cbf-det summary { cursor: pointer; user-select: none; }
.cbf-det pre { margin: 8px 0 0; padding: 8px 10px; max-height: 160px; overflow: auto; white-space: pre-wrap; word-break: break-word; border-radius: 8px; background: color-mix(in srgb, var(--text) 5%, transparent); font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.cbf-bar { display: flex; justify-content: flex-end; gap: 8px; }
@keyframes cbfIn { from { opacity: 0; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cbf-ic { color: #f5d93f; background: color-mix(in srgb, #f5d93f 16%, var(--bg)); } }
:root[data-theme="dark"] .cbf-ic { color: #f5d93f; background: color-mix(in srgb, #f5d93f 16%, var(--bg)); }

/* Logo der Hochschule (Deckblatt) */
.uni-logo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 34px; }
.uni-logo-img { max-height: 44px; max-width: 200px; object-fit: contain; padding: 4px 6px; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--line2, rgba(0,0,0,.12)); }

/* ===== 1.0.1 · Freischalten (App Store, modules/kaufen.js) =====
   Papier, Serifen und der Textmarker aus der Warte-Anzeige: der Strich wird gezogen, der Stift hebt danach ab. */
.cbk-back { position: fixed; inset: 0; z-index: 5200; display: grid; place-items: center; background: rgba(28, 22, 14, .3); -webkit-backdrop-filter: blur(4px) saturate(.9); backdrop-filter: blur(4px) saturate(.9); animation: cbfIn .2s ease-out; }
.cbk { --pc: #f5d93f; --pen-body: color-mix(in srgb, var(--pc) 82%, #5a3b12); --pen-cap: color-mix(in srgb, var(--pc) 35%, #2f2a25); --pen-tip: color-mix(in srgb, var(--pc) 70%, #fff);
  --paper: color-mix(in srgb, #fbf8f1 92%, var(--bg)); --ink: var(--text);
  position: relative; width: min(620px, calc(100vw - 40px)); max-height: 90vh; overflow: auto; padding: 30px 32px 18px; border-radius: 16px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 255, 255, .7), transparent 70%), var(--paper); color: var(--ink);
  box-shadow: 0 0 0 .5px rgba(60, 45, 20, .18), 0 2px 0 rgba(255, 255, 255, .6) inset, 0 30px 80px rgba(40, 25, 10, .28); animation: cbkUp .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes cbkUp { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.cbk:focus { outline: none; }
.cbk-x { position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.cbk-x:hover { background: rgba(60, 45, 20, .07); color: var(--ink); }
.cbk-hd { text-align: center; }
.cbk-logo { width: 46px; height: 46px; display: block; margin: 0 auto 10px; filter: drop-shadow(0 3px 6px rgba(60, 40, 15, .18)); }
.cbk h2 { margin: 0; font: 400 27px/1.2 var(--serif); letter-spacing: -.005em; }
.cbk-lead { margin: 9px auto 0; max-width: 440px; font: italic 14px/1.5 var(--serif); color: var(--muted); }
/* Textmarker */
.cbk-mk { position: relative; display: inline-block; white-space: nowrap; isolation: isolate; }
.cbk-mk-t { position: relative; z-index: 1; }
.cbk-mk-f { position: absolute; left: -4px; right: -6px; top: 46%; bottom: 2px; z-index: 0; border-radius: 5px 1px 1px 4px; mix-blend-mode: multiply;
  background: radial-gradient(ellipse 9px 70% at 3px 50%, color-mix(in srgb, var(--pc) 70%, transparent), transparent 75%), repeating-linear-gradient(0deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 3px), linear-gradient(180deg, color-mix(in srgb, var(--pc) 50%, transparent), color-mix(in srgb, var(--pc) 66%, transparent) 50%, color-mix(in srgb, var(--pc) 48%, transparent));
  clip-path: polygon(0 5%, 100% 0, calc(100% - 6px) 100%, 0 95%); }
.cbk-mk.sm .cbk-mk-f { top: 52%; bottom: 3px; left: -3px; right: -4px; }
.cbk-mk-pen { position: absolute; z-index: 2; width: 34px; height: 34px; right: -24px; top: 50%; margin-top: -30px; transform-origin: 17px 30.6px; filter: drop-shadow(1px 2px 1.5px rgba(40, 25, 10, .22)); pointer-events: none; }
.cbk-mk.draw .cbk-mk-f { animation: cbkDraw .95s .25s cubic-bezier(.45, .05, .3, 1) both; }
.cbk-mk.draw .cbk-mk-pen { animation: cbkPen .95s .25s cubic-bezier(.45, .05, .3, 1) both, cbkLift .5s 1.25s ease-out forwards; }
@keyframes cbkDraw { from { clip-path: polygon(0 5%, 0 0, 0 100%, 0 95%); } to { clip-path: polygon(0 5%, 100% 0, calc(100% - 6px) 100%, 0 95%); } }
@keyframes cbkPen { from { right: 100%; transform: rotate(-3deg); } 40% { transform: rotate(2deg); } 70% { transform: rotate(-1.5deg); } to { right: -24px; transform: rotate(0); } }
@keyframes cbkLift { to { transform: translate(10px, -12px) rotate(10deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cbk-mk.draw .cbk-mk-f, .cbk-mk.draw .cbk-mk-pen, .cbk { animation: none; } .cbk-mk-pen { display: none; } }
/* Testzeitraum: Zitatzeile mit Anführungszeichen, Marker unter dem Text */
.cbk-trial { position: relative; display: grid; grid-template-columns: auto auto auto; justify-content: center; align-items: baseline; column-gap: 6px; width: 100%; margin: 22px 0 0; padding: 16px 16px 14px; border: 0; border-radius: 12px; cursor: pointer; color: var(--ink); background: #fff; box-shadow: 0 0 0 .5px rgba(60, 45, 20, .2), 0 6px 18px rgba(60, 40, 15, .1); transition: transform .15s, box-shadow .15s; }
.cbk-trial:hover { transform: translateY(-1px); box-shadow: 0 0 0 .5px rgba(60, 45, 20, .25), 0 10px 24px rgba(60, 40, 15, .14); }
.cbk-trial-t { position: relative; font: 600 18px/1.3 var(--serif); padding: 0 2px; background: linear-gradient(180deg, transparent 52%, color-mix(in srgb, var(--pc) 62%, transparent) 52%, color-mix(in srgb, var(--pc) 52%, transparent) 94%, transparent 94%); }
.cbk .cbk-q { font: 28px/1 var(--serif); color: var(--ink); background: none; box-shadow: none; padding: 0; border-radius: 0; width: auto; height: auto; }
.cbk-trial:focus { outline: none; } .cbk-trial:focus-visible { outline: 2px solid color-mix(in srgb, #c99a00 60%, transparent); outline-offset: 2px; } .cbk-q:first-child { transform: translateY(-2px); } .cbk-trial .cbk-q:nth-child(3) { transform: translateY(6px); }
.cbk-trial-s { grid-column: 1 / -1; margin-top: 4px; font-size: 12px; color: var(--muted); }
/* Auswahl */
.cbk-choose { margin-top: 22px; }
.cbk-or { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--faint, #a5a29c); }
.cbk-or::before, .cbk-or::after { content: ""; flex: 1; height: 1px; background: rgba(60, 45, 20, .12); }
.cbk-seg { display: flex; width: max-content; margin: 0 auto 14px; padding: 3px; border-radius: 9px; background: rgba(60, 45, 20, .07); }
.cbk-seg button { border: 0; background: transparent; padding: 5px 14px; border-radius: 7px; font: 500 12.5px var(--font); color: var(--muted); cursor: pointer; }
.cbk-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(60, 40, 15, .14), 0 0 0 .5px rgba(60, 45, 20, .14); }
.cbk-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
/* Karteikarte: weiß, feine Linien, roter Rand links wie im Notizbuch */
.cbk-card { position: relative; display: flex; flex-direction: column; padding: 16px 16px 14px 20px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 .5px rgba(60, 45, 20, .16), 0 3px 10px rgba(60, 40, 15, .07); }
.cbk-card::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 1px; background: rgba(214, 90, 70, .22); }
.cbk-card.pro { box-shadow: 0 0 0 1px color-mix(in srgb, #c99a00 45%, transparent), 0 6px 18px rgba(201, 154, 0, .13); }
.cbk-card-k { display: flex; align-items: center; min-height: 20px; justify-content: space-between; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.cbk-tag { letter-spacing: .02em; text-transform: none; font-weight: 600; font-size: 10.5px; color: #6a4a12; padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--pc) 34%, #fff); }
.cbk-price { margin-top: 8px; font: 400 32px/1.1 var(--serif); letter-spacing: -.01em; }
.cbk-unit { margin-top: 2px; font: italic 12.5px var(--serif); color: var(--muted); }
.cbk-feats { list-style: none; margin: 14px 0 16px; padding: 0; font-size: 12.5px; line-height: 24px; flex: 1; background: repeating-linear-gradient(180deg, transparent 0 23px, rgba(80, 110, 160, .09) 23px 24px); }
.cbk-feats li { position: relative; padding-left: 18px; }
.cbk-feats li::before { content: ""; position: absolute; left: 1px; top: 9px; width: 9px; height: 5px; border-left: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); opacity: .55; }
.cbk-plan { width: 100%; padding: 9px 12px; border-radius: 8px; border: 0; cursor: pointer; font: 600 13px var(--font); color: var(--ink); background: rgba(60, 45, 20, .06); box-shadow: inset 0 0 0 .5px rgba(60, 45, 20, .18); transition: background .15s, transform .15s; }
.cbk-plan:hover { background: rgba(60, 45, 20, .1); }
.cbk-plan.pro { color: #fff; background: #2f2a25; box-shadow: none; }
.cbk-plan.pro:hover { background: #1f1b17; transform: translateY(-1px); }
.cbk-owned { text-align: center; padding: 9px; font: italic 13px var(--serif); color: var(--muted); }
.cbk .busy { opacity: .55; pointer-events: none; }
.cbk-fine { margin: 18px 0 8px; font-size: 10.8px; line-height: 1.5; color: var(--muted); text-align: center; }
.cbk-ft { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid rgba(60, 45, 20, .1); } .cbk-sp { flex: 1; }
.cbk-link { border: 0; background: none; padding: 2px 0; cursor: pointer; font: 12px var(--font); color: var(--muted); text-decoration: underline; text-decoration-color: rgba(60, 45, 20, .25); text-underline-offset: 3px; }
.cbk-link:hover { color: var(--ink); }
/* Band oben (nur lesen) */
.cbk-band { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 4500; display: flex; align-items: center; gap: 14px; max-width: min(720px, calc(100vw - 40px)); padding: 7px 7px 7px 14px; border-radius: 11px; font: italic 13px var(--serif); color: var(--text); background: color-mix(in srgb, #fbf8f1 94%, var(--bg)); box-shadow: 0 0 0 .5px rgba(60, 45, 20, .2), 0 10px 26px rgba(40, 25, 10, .14); }
.cbk-band-b { flex: none; border: 0; border-radius: 7px; padding: 6px 11px; font: 600 12px var(--font); cursor: pointer; color: #fff; background: #2f2a25; }
@media (max-width: 640px) { .cbk-cards { grid-template-columns: 1fr; } }
/* dunkel: Papier wird dunkel, Marker ohne Multiplizieren */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cbk { --paper: color-mix(in srgb, #2a2621 80%, var(--bg)); } :root:not([data-theme="light"]) .cbk-card, :root:not([data-theme="light"]) .cbk-trial, :root:not([data-theme="light"]) .cbk-seg button.on { background-color: color-mix(in srgb, #fff 6%, var(--bg)); } :root:not([data-theme="light"]) .cbk-mk-f { mix-blend-mode: normal; opacity: .55; } :root:not([data-theme="light"]) .cbk-plan.pro, :root:not([data-theme="light"]) .cbk-band-b { background: #f5d93f; color: #2b2210; } }
:root[data-theme="dark"] .cbk { --paper: color-mix(in srgb, #2a2621 80%, var(--bg)); }
:root[data-theme="dark"] .cbk-card, :root[data-theme="dark"] .cbk-trial, :root[data-theme="dark"] .cbk-seg button.on { background-color: color-mix(in srgb, #fff 6%, var(--bg)); }
:root[data-theme="dark"] .cbk-mk-f { mix-blend-mode: normal; opacity: .55; }
:root[data-theme="dark"] .cbk-plan.pro, :root[data-theme="dark"] .cbk-band-b { background: #f5d93f; color: #2b2210; }
.cbk-err { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; color: #7a2b1d; background: color-mix(in srgb, #e5533d 10%, #fff); box-shadow: inset 0 0 0 .5px color-mix(in srgb, #e5533d 40%, transparent); }
.cbk-err .cbk-link { color: inherit; }

/* ======================= Sicherheit beim Schreiben (1.0.2) ======================= */
.cbs-pill { position: absolute; right: 18px; bottom: 14px; z-index: 30; border: 0; font: inherit; font-size: 11.5px; font-weight: 500; color: var(--muted); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 5px 11px; border-radius: 999px; box-shadow: 0 0 0 .5px var(--line2), 0 2px 8px rgba(0,0,0,.06); cursor: pointer; transition: color .2s, background .2s; }
.cbs-pill:hover { color: var(--text); background: var(--bg); }
.cbs-pill.busy { color: var(--accent); }
.cbs-pill.bad { color: #fff; background: var(--danger); box-shadow: 0 2px 10px rgba(200,40,40,.3); }
.cbs { display: flex; flex-direction: column; gap: 4px; }
.cbs-row { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; padding: 9px 4px; border-bottom: .5px solid var(--line); }
.cbs-row:last-of-type { border-bottom: 0; }
.cbs-row b { font-weight: 600; font-size: 13.5px; }
.cbs-row.bad b { color: var(--danger); }
.cbs-ic { font-size: 18px; line-height: 1.3; text-align: center; }
.cbs .row-end { margin-top: 10px; }
.cbs-ask .input { width: 100%; margin: 6px 0 4px; }
.cbs-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: rgba(240, 136, 62, .13); box-shadow: inset 0 0 0 1px rgba(240, 136, 62, .35); font-size: 13px; }
.cbs-banner > div { flex: 1; min-width: 0; }
.ver .row-end .spacer { flex: 1; }
.dv-sum { position: sticky; top: 0; background: var(--bg); padding: 6px 0 10px; font-size: 12.5px; color: var(--muted); border-bottom: .5px solid var(--line); margin-bottom: 10px; }
.dv-n { font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.dv-n.del { color: #b4232a; background: rgba(229, 72, 77, .12); }
.dv-n.add { color: #1f7a3f; background: rgba(46, 160, 90, .13); }
.ver-prev del { color: #b4232a; background: rgba(229, 72, 77, .12); text-decoration: line-through; text-decoration-color: rgba(180,35,42,.6); }
.ver-prev ins { color: #1f7a3f; background: rgba(46, 160, 90, .14); text-decoration: none; }
.ver-prev .dv-same { color: var(--muted); }

/* ======================= ToDos: Zeitplan (Aufwand + Arbeitsblöcke) ======================= */
.cd-plan { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 2px 0; }
.plan-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 28px; }
.plan-est { width: auto; min-width: 0; font-weight: 500; }
.plan-est.empty { color: var(--muted); font-weight: 400; }
.plan-prog { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 160px; }
.plan-prog-bar { flex: 1; max-width: 160px; height: 6px; border-radius: 3px; background: var(--bg3); overflow: hidden; }
.plan-prog-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .3s; }
.plan-prog.full .plan-prog-bar i { background: #2e9e5a; }
.plan-prog-t { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-prog.full .plan-prog-t { color: #1f7a3f; font-weight: 500; }
.plan-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.plan-chip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 2px 0 10px; border-radius: 8px; background: var(--bg2); box-shadow: inset 0 0 0 .5px var(--line2); font-size: 12.5px; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; transition: background .15s, box-shadow .15s; }
.plan-chip b { font-weight: 600; }
.plan-chip:hover { background: var(--hover); }
.plan-chip.on { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.plan-chip.past { opacity: .5; }
.plan-chip.late { box-shadow: inset 0 0 0 1px rgba(224, 122, 31, .55); background: rgba(240, 136, 62, .08); }
.plan-chip-m { color: var(--muted); font-size: 11.5px; }
.plan-chip .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; padding: 0; opacity: 0; transition: opacity .15s; }
.plan-chip:hover .x, .plan-chip.on .x { opacity: 1; }
.plan-chip .x:hover { background: var(--bg3); color: var(--text); }
.plan-add { height: 26px; }
.plan-auto { height: 26px; color: var(--accent); }
.plan-warn { font-size: 12px; color: #a4520f; }
.plan-ed { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2), 0 4px 14px rgba(0,0,0,.06); animation: cvk-in .18s ease; }
.plan-days { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; align-items: stretch; }
.plan-days::-webkit-scrollbar { display: none; }
.plan-day { flex: 0 0 46px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0 6px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--text); cursor: pointer; transition: background .15s; }
.plan-day:hover { background: var(--hover); }
.plan-day.on { background: var(--accent); color: #fff; }
.plan-day.we .plan-day-w { color: var(--faint, var(--muted)); }
.plan-day.late:not(.on) { opacity: .45; }
.plan-day-w { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.plan-day.on .plan-day-w { color: rgba(255,255,255,.85); }
.plan-day-n { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.plan-day-f { width: 26px; height: 3px; border-radius: 2px; background: var(--bg3); overflow: hidden; margin-top: 2px; }
.plan-day-f i { display: block; height: 100%; background: #2e9e5a; }
.plan-day-f.tight i { background: #e5484d; }
.plan-day.on .plan-day-f { background: rgba(255,255,255,.35); } .plan-day.on .plan-day-f i { background: #fff; }
.plan-day-more { display: flex; align-items: center; padding-left: 4px; flex: none; }
.plan-ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.plan-f { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.plan-f > span:first-child { color: var(--muted); }
.plan-load { display: flex; flex-direction: column; gap: 4px; }
.plan-bar { position: relative; height: 18px; border-radius: 6px; background: var(--bg2); box-shadow: inset 0 0 0 .5px var(--line2); overflow: hidden; }
.plan-bar-b { position: absolute; top: 3px; bottom: 3px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 40%, var(--bg2)); }
.plan-bar-b.p { background: rgba(46, 160, 90, .45); }
.plan-bar-b.x { background: color-mix(in srgb, var(--muted) 40%, var(--bg2)); }
.plan-bar-me { position: absolute; top: 1px; bottom: 1px; border-radius: 4px; background: rgba(46, 160, 90, .22); box-shadow: inset 0 0 0 2px #2e9e5a; }
.plan-load.tight .plan-bar-me { background: rgba(229, 72, 77, .15); box-shadow: inset 0 0 0 2px #e5484d; }
.plan-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; padding: 0 1px; }
.plan-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.plan-slot { border: 0; font: inherit; font-size: 11.5px; font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 6px; background: rgba(46, 160, 90, .1); color: #1f6b3a; cursor: pointer; }
.plan-slot:hover { background: rgba(46, 160, 90, .2); }
.plan-slot.on { background: #2e9e5a; color: #fff; }
.plan-ed .row-end { align-items: center; }
.plan-ed .row-end .spacer { flex: 1; }
.kb-plan { font-size: 11.5px; color: #1f6b3a; padding: 1px 6px; border-radius: 6px; background: rgba(46, 160, 90, .1); }
.kb-plan.today { background: #2e9e5a; color: #fff; font-weight: 600; }

/* ======================= Weitere Kalender (iCloud, Google, Abos …) ======================= */
.ext-card { gap: 8px; padding-top: 10px; padding-bottom: 12px; }
.ext-group { display: flex; flex-direction: column; border-radius: 12px; background: var(--bg2); padding: 4px 12px; }
.ext-gh { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 0 4px; }
.ext-cal-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: .5px solid var(--line); font-size: 13.5px; cursor: pointer; }
.ext-gh + .ext-cal-row { border-top: 0; }
.ext-cal-row.own { cursor: default; opacity: .7; }
.ext-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ext-dlg { display: flex; flex-direction: column; gap: 8px; }
.ext-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.ext-title { font-size: 19px; font-weight: 600; line-height: 1.25; }
.ext-when, .ext-row { font-size: 13.5px; }
.ext-notes { font-size: 13px; color: var(--muted); white-space: pre-wrap; max-height: 180px; overflow: auto; background: var(--bg2); border-radius: 10px; padding: 8px 10px; }
.ext-link { align-self: flex-start; }

/* ======================= Arbeitsfläche: Gedankenkette (Doppelklick auf ein Zitat) ======================= */
.cv-wrap.cvk-open .cv-dock { opacity: 0; pointer-events: none !important; transition: opacity .15s; }
.cvk { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-height: min(460px, 62%); display: flex; flex-direction: column; border-radius: 22px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(22px) saturate(1.3); -webkit-backdrop-filter: blur(22px) saturate(1.3); box-shadow: 0 0 0 .5px var(--line2), 0 18px 50px rgba(30, 20, 10, .2), 0 2px 8px rgba(0,0,0,.06); animation: cvk-in .28s cubic-bezier(.2,.9,.3,1.1); overflow: hidden; }
.cvk.out { animation: cvk-out .2s ease forwards; }
@keyframes cvk-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cvk-out { to { transform: translateY(40px); opacity: 0; } }
.cvk-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 16px 6px 20px; }
.cvk-grip { position: absolute; top: 6px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--line2); cursor: pointer; }
.cvk-ht { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cvk-ht b { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; }
.cvk-dots { flex: 1; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.cvk-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--line2); cursor: pointer; transition: all .2s; }
.cvk-dot.on { width: 20px; border-radius: 4px; background: var(--accent); }
.cvk-nav { display: flex; gap: 6px; }
.cvk-nb { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--bg2); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.cvk-nb:hover:not(:disabled) { background: var(--hover); }
.cvk-nb:disabled { opacity: .3; cursor: default; }
.cvk-nb.x { font-size: 17px; }
.cvk-strip { display: flex; align-items: stretch; gap: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding: 0 40%; padding: 10px 20px 14px; scrollbar-width: none; outline: none; }
.cvk-strip::-webkit-scrollbar { display: none; }
.cvk-card { --kc: #c4c4c6; flex: 0 0 clamp(168px, calc((100% - 30px) / 4.7 - 34px), 236px); scroll-snap-align: center; display: flex; flex-direction: column; gap: 6px; text-align: left; font: inherit; color: var(--text); padding: 11px 13px 11px 15px; border: 0; border-radius: 15px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 1px 3px rgba(0,0,0,.05); cursor: pointer; position: relative; transition: transform .2s, box-shadow .2s; min-height: 118px; }
.cvk-card::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 3px 3px 0; background: var(--kc); }
.cvk-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 .5px var(--line2), 0 6px 16px rgba(0,0,0,.08); }
.cvk-card.on { box-shadow: 0 0 0 2px var(--accent), 0 10px 26px rgba(0,0,0,.12); transform: translateY(-3px); cursor: default; }
.cvk-pos { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cvk-card.on .cvk-pos { color: var(--accent); }
.cvk-title { font-size: 13px; }
.cvk-text { font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cvk-text.q { font-family: var(--serif, Georgia, serif); font-size: 13px; }
.cvk-src { margin-top: auto; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvk-img { max-height: 64px; border-radius: 8px; object-fit: cover; }
.cvk-br { position: absolute; right: 9px; top: 9px; font-size: 10.5px; color: var(--muted); background: var(--bg2); padding: 1px 6px; border-radius: 6px; }
.cvk-join { flex: 0 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative; }
.cvk-join::before { content: ''; position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; border-radius: 1px; background: color-mix(in srgb, var(--olive, #6f7f4f) 55%, transparent); }
.cvk-arrow { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--card, var(--bg)); color: color-mix(in srgb, var(--olive, #6f7f4f) 80%, var(--text)); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--olive, #6f7f4f) 55%, transparent); }
.cvk-join.has-lab { flex-basis: 78px; }
.cvk-lab { position: absolute; top: calc(50% + 15px); width: 74px; text-align: center; font-size: 10px; line-height: 1.25; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cvk-empty { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 24px; font-size: 13px; color: var(--muted); }
.cvk-empty b { color: var(--text); }
.cvk-detail { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; padding: 4px 20px 18px; border-top: .5px solid var(--line); padding-top: 14px; overflow: auto; min-height: 0; }
@container (max-width: 640px) { .cvk-detail { grid-template-columns: 1fr; } }
.cvk-l { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.cvk-ctx-t { font-family: var(--serif, Georgia, serif); font-size: 13.5px; line-height: 1.6; color: color-mix(in srgb, var(--text) 70%, var(--muted)); max-height: 150px; overflow: auto; }
.cvk-ctx-t mark { background: color-mix(in srgb, #f5d93f 55%, transparent); color: var(--text); border-radius: 3px; padding: 0 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.cvk-ref { display: flex; flex-direction: column; gap: 8px; }
.cvk-ref .cvk-l { margin-bottom: -2px; }
.cvk-ref-t { font-size: 13px; line-height: 1.5; padding-left: 1.6em; text-indent: -1.6em; }
.cvk-cite { display: flex; }
.cvk-chip { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.cvk-cmt { font-size: 12.5px; background: var(--bg2); border-radius: 10px; padding: 8px 10px; }
.cvk-cmt .cvk-l { margin-bottom: 3px; }
.cvk-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.ws-board .card.cvk-on { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent), var(--card-shadow, 0 1px 3px rgba(0,0,0,.05)); }
.ws-board .card.cvk-cur { box-shadow: 0 0 0 3px var(--accent), 0 14px 34px rgba(0,0,0,.16); }
.cv-wrap.cvk-open .ws-board .card:not(.cvk-on):not(.cvk-cur) { opacity: .45; transition: opacity .25s; }

/* ======================= Arbeitsfläche: Auswahl-Leiste, Hilfslinien, fixierte Karten ======================= */
.cvsel { position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%); z-index: 35; display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 14px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 0 0 .5px var(--line2), 0 8px 24px rgba(0,0,0,.1); animation: cvk-in .18s ease; white-space: nowrap; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.cvsel-n { font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 8px 0 6px; }
.cvsel-g { display: flex; align-items: center; gap: 1px; padding: 0 4px; border-left: .5px solid var(--line2); }
.cvsel-b { width: 30px; height: 30px; border: 0; border-radius: 9px; background: none; color: var(--text); cursor: pointer; display: grid; place-items: center; padding: 0; }
.cvsel-b:hover:not(:disabled) { background: var(--hover); }
.cvsel-b:disabled { opacity: .3; cursor: default; }
.cvsel-i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cvsel-c { width: 16px; height: 16px; margin: 0 2px; border: 0; padding: 0; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: transform .12s; }
.cvsel-c:hover { transform: scale(1.2); }
.cv-guides { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 60; }
.cv-gl { position: absolute; background: #ff4f8b; }
.cv-gl.v { width: 1px; width: calc(1px / var(--z, 1)); }
.cv-gl.h { height: 1px; height: calc(1px / var(--z, 1)); }
.ws-board .card.cv-locked::after { content: '🔒'; position: absolute; top: -9px; right: -9px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 1px 4px rgba(0,0,0,.12); pointer-events: none; }
.ws-board .card.cv-locked .card-head { cursor: default; }
.ver-i.pin b { color: var(--accent); }

/* ======================= Kalender: Tag & Woche (1.0.2) ======================= */
.wk-dh { flex-wrap: wrap; row-gap: 4px; align-content: flex-start; }
.wk-dh.link { cursor: pointer; transition: background .15s; }
.wk-dh.link:hover { background-color: var(--hover); }
.wk-free { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 500; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wk-free-bar { flex: 1; max-width: 56px; height: 3px; border-radius: 2px; background: var(--bg3); overflow: hidden; display: block; }
.wk-free-bar > i { display: block; height: 100%; border-radius: 2px; background: #2e9e5a; }
.wk-free.tight .wk-free-bar > i { background: #e5484d; }
.wk-free.tight .wk-free-t { color: #b4232a; }
.wk-col::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, color-mix(in srgb, var(--muted) 7%, transparent) 0, color-mix(in srgb, var(--muted) 7%, transparent) calc(var(--hr) * var(--wf, 8)), transparent calc(var(--hr) * var(--wf, 8)), transparent calc(var(--hr) * var(--wt, 20)), color-mix(in srgb, var(--muted) 7%, transparent) calc(var(--hr) * var(--wt, 20))); }
.wk-col.off::before { background: color-mix(in srgb, var(--muted) 7%, transparent); }
.wk-ev.plan { --ec: #2e9e5a; background: repeating-linear-gradient(135deg, color-mix(in srgb, #2e9e5a 15%, var(--bg)) 0 7px, color-mix(in srgb, #2e9e5a 8%, var(--bg)) 7px 14px); border-left: 3px solid #2e9e5a; }
.wk-ev.plan b { color: #1f5d36; }
.wk-ev.ext { background: color-mix(in srgb, var(--ec) 11%, var(--bg)); }
.wk-ev.ext b { font-weight: 500; }
[data-theme="dark"] .wk-ev.plan b { color: #8fd6a8; }
/* Tagesansicht */
.cal-main.wk-1 .wk-row { grid-template-columns: 64px minmax(0, 1fr); }
.cal-main.wk-1 .wk-dh { padding: 12px 16px 10px; }
.cal-main.wk-1 .wk-dn { font-size: 22px; }
.cal-main.wk-1 .wk-wd { font-size: 12px; }
.cal-main.wk-1 .wk-free-bar { max-width: 120px; }
.cal-main.wk-1 .wk-ev { padding: 6px 10px; font-size: 13px; }
.cal-main.wk-1 .wk-ev span { font-size: 11.5px; }
.cal-body.day { grid-template-columns: minmax(0, 1fr) 280px; }
.day-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; }
.day-side .cal-side { position: static; }
.ds-card { background: var(--bg2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.ds-big { font-size: 22px; font-weight: 650; letter-spacing: -.02em; color: #1f7a3f; }
.ds-big.tight { color: #b4232a; }
.ds-bar { height: 5px; border-radius: 3px; background: var(--bg3); overflow: hidden; margin-top: 2px; }
.ds-bar i { display: block; height: 100%; border-radius: 3px; background: #2e9e5a; }
.ds-slots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ds-slot { font-size: 11.5px; font-variant-numeric: tabular-nums; padding: 2px 7px; border-radius: 6px; background: rgba(46, 160, 90, .1); color: #1f6b3a; }
.ds-sec { display: flex; flex-direction: column; gap: 4px; }
.ds-h { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 4px; }
.ds-row { display: flex; align-items: baseline; gap: 10px; border: 0; font: inherit; text-align: left; padding: 7px 10px; border-radius: 9px; background: none; color: var(--text); cursor: pointer; }
.ds-row:hover { background: var(--hover); }
.ds-row.plan { box-shadow: inset 3px 0 0 #2e9e5a; }
.ds-t { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 44px; }
.ds-n { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-main.wk-1 .wk-dh.today .wk-dn { font-size: 16px; min-width: 32px; height: 32px; }
.wk-ev b { overflow-wrap: normal; word-break: normal; hyphens: manual; -webkit-hyphens: manual; }
.wk-ev.narrow b { -webkit-line-clamp: 3; }

/* ======================= 1.0.4: Karten klar vom Hintergrund abheben ======================= */
:root:root:root:root {
  --card: #ffffff;
  --card-shadow: 0 0 0 1px rgba(98, 66, 36, .14), 0 1px 3px rgba(70, 45, 20, .07);
  --card-shadow-hover: 0 0 0 1px rgba(98, 66, 36, .24), 0 6px 18px -6px rgba(70, 45, 20, .2);
}
@media (prefers-color-scheme: dark) {
  :root:root:root:root:not([data-theme="light"]) {
    --card: #1c1c1c;
    --card-shadow: 0 0 0 1px rgba(255, 255, 255, .11), 0 1px 3px rgba(0, 0, 0, .45);
    --card-shadow-hover: 0 0 0 1px rgba(255, 255, 255, .2), 0 8px 22px -6px rgba(0, 0, 0, .6);
  }
}
:root:root:root:root[data-theme="dark"] {
  --card: #1c1c1c;
  --card-shadow: 0 0 0 1px rgba(255, 255, 255, .11), 0 1px 3px rgba(0, 0, 0, .45);
  --card-shadow-hover: 0 0 0 1px rgba(255, 255, 255, .2), 0 8px 22px -6px rgba(0, 0, 0, .6);
}
.kb-card { background: var(--card) !important; border-color: transparent !important; box-shadow: var(--card-shadow) !important; }
.kb-card:hover { box-shadow: var(--card-shadow-hover) !important; }
.kb-card.cbx-p1 { box-shadow: inset 3px 0 0 #d9534f, var(--card-shadow) !important; }
.kb-card.cbx-p1:hover { box-shadow: inset 3px 0 0 #d9534f, var(--card-shadow-hover) !important; }
/* Spalten des Boards als ruhige Bahnen, damit die Karten darauf stehen */
.kb-col { background: color-mix(in srgb, var(--bg2) 75%, transparent) !important; border-radius: 14px !important; padding: 6px 8px 8px !important; }
.kb-col-head { padding: 6px 4px 10px !important; }

/* Kalender-Kopf: Knöpfe stehen in jeder Ansicht an derselben Stelle */
.calv .cal-head { flex-wrap: wrap; gap: 8px; row-gap: 10px; min-height: 40px; }
.calv .cal-head .todo-views { order: -1; flex: none; margin-right: 6px; }
.calv .cal-head h1 { flex: 0 0 clamp(150px, calc(100% - 910px), 320px); width: clamp(150px, calc(100% - 910px), 320px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calv .cal-head > * { flex-shrink: 0; }

.wk-free.off .wk-free-t { color: var(--faint); }
.ds-edit { align-self: flex-start; border: 0; background: none; padding: 2px 0; margin-top: 2px; font: inherit; font-size: 11.5px; color: var(--accent); cursor: pointer; }
.ds-edit:hover { text-decoration: underline; }
.plan-scale { align-items: center; }
.plan-work { border: 0; background: none; padding: 0; margin-left: 8px; font: inherit; font-size: 10.5px; color: var(--accent); cursor: pointer; }
.plan-work:hover { text-decoration: underline; }
.plan-scale span:nth-child(3) { margin-left: auto; }
.plan-scale span:nth-child(2) { margin: 0 auto; }
.work-ed { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 6px; }
.work-pre { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.work-days { display: flex; flex-direction: column; border-radius: 12px; background: var(--bg2); padding: 2px 12px; }
.work-day { display: flex; align-items: center; gap: 10px; min-height: 40px; border-top: .5px solid var(--line); }
.work-day:first-child { border-top: 0; }
.work-wd { width: 26px; font-weight: 600; font-size: 13px; }
.work-day.off .work-wd { color: var(--muted); }
.work-day .input.time { width: 92px; }
.work-sum { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.work-free { margin-left: 2px; }
.work-total { text-align: right; padding-right: 4px; }
.work-dlg .work-ed { padding-top: 2px; }
.calv { container-type: inline-size; container-name: calv; }
@container calv (max-width: 1150px) { .calv .cal-head .cal-sync { display: none; } .calv .cal-head h1 { flex-basis: clamp(150px, calc(100% - 740px), 320px); width: clamp(150px, calc(100% - 740px), 320px); } }

/* ---------------- ToDo-Detail 1.0.5: gruppierte Einstellungen im macOS-Stil ---------------- */
.modal.td-modal { padding: 0; overflow: hidden auto; max-height: 86vh; border-radius: 16px; }
.modal.td-modal .modal-x { top: 14px; right: 14px; z-index: 3; }
.td { --g-bg: var(--card, #fff); --g-line: var(--line); --sep: rgba(98, 66, 36, .09); padding: 26px 26px 0; font-size: 13.5px; }
@media (prefers-color-scheme: dark) { .td { --sep: rgba(255, 255, 255, .07); --g-bg: rgba(255, 255, 255, .035); } }
:where(.td) button { font: inherit; color: inherit; background: none; border: 0; margin: 0; box-shadow: none; }
.td .spacer { flex: 1; }
.td-i { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; }
.td-i svg { width: 100%; height: 100%; display: block; }

/* Kopf */
.td-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 26px; margin-bottom: 22px; }
.td-check { flex: none; width: 24px; height: 24px; margin-top: 7px; border-radius: 50% !important; box-shadow: inset 0 0 0 1.6px var(--faint); display: grid; place-items: center; color: transparent; transition: background .15s, box-shadow .15s, color .15s; }
.td-check .td-i { width: 14px; height: 14px; }
.td-check:hover { box-shadow: inset 0 0 0 1.6px var(--ok); color: var(--ok); }
.td-check.on { background: var(--ok); box-shadow: none; color: #fff; }
.td-head-m { flex: 1; min-width: 0; }
.td .td-title, .td .td-title:focus { border: 0 !important; outline: none !important; box-shadow: none !important; background: none !important; border-radius: 0; }
.td-title { display: block; width: 100%; border: 0; outline: none; resize: none; overflow: hidden; background: none; padding: 0; margin: 0 0 8px; font: 600 24px/1.25 var(--font); letter-spacing: -.015em; color: var(--text); }
.td-title::placeholder { color: var(--faint); }
.td-title.done { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.td-crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.td-crumb-sep { width: 12px; height: 12px; color: var(--faint); }
.td-pill { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px 0 10px; border-radius: 13px; background: var(--hover); color: var(--text); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background .12s; }
.td-pill:hover { background: var(--active); }
.td-pill select { appearance: none; -webkit-appearance: none; border: 0; outline: none; background: none; font: inherit; color: inherit; padding: 0 16px 0 0; margin-right: -16px; cursor: pointer; max-width: 220px; text-overflow: ellipsis; }
.td-pill .td-pill-c { width: 12px; height: 12px; color: var(--muted); pointer-events: none; }
.td-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* Gruppen */
.td-cap { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 7px 4px; }
.td-group { background: var(--g-bg); border-radius: 12px; box-shadow: 0 0 0 1px var(--g-line), 0 1px 2px rgba(70, 45, 20, .04); margin-bottom: 22px; overflow: hidden; }
.td-group + .td-group { margin-top: -8px; }
.td-row + .td-row { box-shadow: inset 0 1px 0 var(--sep); }
.td-row > .td-row-h, .td-group > .td-row-h { position: relative; display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 7px 14px; }
.td-row + .td-row > .td-row-h::before { content: none; }
.td-tile { width: 26px; height: 26px; border-radius: 7px; flex: none; display: grid; place-items: center; color: #fff; background: var(--t); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08); }
.td-tile .td-i { width: 15px; height: 15px; }
.td-lab { font-weight: 500; color: var(--text); white-space: nowrap; }
.td-ctl { flex: 1; min-width: 0; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.td-muted { color: var(--muted); font-size: 12.5px; }

/* Chips, Knöpfe */
.td-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 8px !important; background: var(--hover) !important; font-size: 12.5px; font-weight: 500; white-space: nowrap; transition: background .12s; }
.td-chip:hover { background: var(--active) !important; }
.td-chip.ghost { background: none !important; color: var(--accent); }
.td-chip.ghost:hover { background: var(--accent-soft) !important; }
.td-chip .td-i { width: 14px; height: 14px; }
.td-quick { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.td-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 13px; border-radius: 8px !important; font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--hover) !important; transition: background .12s, filter .12s; }
.td-btn:hover { background: var(--active) !important; }
.td-btn .td-i { width: 15px; height: 15px; }
.td-btn.primary { background: var(--accent) !important; color: #fff !important; padding: 0 18px; box-shadow: 0 1px 2px rgba(70, 45, 20, .18); }
.td-btn.primary:hover { filter: brightness(1.07); }
.td-btn.accent { background: var(--accent-soft) !important; color: var(--accent); }
.td-btn.accent:hover { filter: brightness(.97); }
.td-btn.danger { background: none !important; color: var(--danger); padding: 0 10px; }
.td-btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent) !important; }
.td-btn.link { background: none !important; color: var(--muted); padding: 0 6px; }
.td-btn.link:hover { color: var(--accent); }
.td-btn:focus-visible, .td-chip:focus-visible, .td-sg:focus-visible, .td-day:focus-visible, .td-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Frist */
.td-due { display: flex; align-items: center; gap: 8px; }
.td-val { height: 28px; padding: 0 10px; border-radius: 8px !important; font-weight: 500; background: var(--hover) !important; }
.td-val:hover { background: var(--active) !important; }
.td-rel { font-size: 12px; color: var(--muted); }
.td-rel.soon { color: var(--accent-2, var(--accent)); font-weight: 500; }
.td-rel.late { color: var(--danger); font-weight: 500; }
.td-clear { width: 22px; height: 22px; border-radius: 50% !important; display: grid; place-items: center; color: var(--faint); }
.td-clear:hover { background: var(--hover) !important; color: var(--text); }
.td-clear .td-i { width: 13px; height: 13px; }

/* Aufwand */
.td-step { display: inline-flex; align-items: center; height: 28px; border-radius: 8px; background: var(--hover); overflow: hidden; }
.td-step-b { width: 30px; height: 28px; font-size: 16px !important; line-height: 1; color: var(--muted) !important; }
.td-step-b:hover { background: var(--active) !important; color: var(--text) !important; }
.td-step-v { min-width: 70px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }

/* Fortschritt */
.td-prog { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.td-prog-bar { width: 90px; height: 5px; border-radius: 3px; background: var(--active); overflow: hidden; }
.td-prog-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .25s; }
.td-prog.full { color: var(--ok); font-weight: 500; }
.td-prog.full .td-prog-bar i { background: var(--ok); }

/* Zeitplan */
.td-plan { padding: 0 14px 14px 51px; }
.td-empty { color: var(--muted); font-size: 12.5px; margin: -4px 0 10px; }
.td-blks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.td-blk { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 7px; border-radius: 10px; background: var(--hover); cursor: pointer; transition: background .12s, box-shadow .12s; }
.td-blk:hover { background: var(--active); }
.td-blk.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.td-blk.past { opacity: .55; }
.td-blk-cal { width: 36px; height: 38px; flex: none; border-radius: 8px; background: var(--bg); box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.td-blk-cal span { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-2, var(--accent)); }
.td-blk-cal b { font-size: 15px; font-weight: 600; }
.td-blk-m { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.td-blk-m b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-blk-m span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.td-blk-dur { font-weight: 600; font-size: 12.5px; font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 6px; background: var(--bg); box-shadow: 0 0 0 1px var(--line); }
.td-blk-x { width: 24px; height: 24px; border-radius: 50% !important; display: grid; place-items: center; color: var(--faint); opacity: 0; transition: opacity .12s; }
.td-blk:hover .td-blk-x { opacity: 1; }
.td-blk-x:hover { background: var(--active) !important; color: var(--text); }
.td-blk-x .td-i { width: 13px; height: 13px; }
.td-tag { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.td-tag.warn { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, transparent); }
.td-plan-a { display: flex; flex-wrap: wrap; gap: 8px; }

/* Zeit-Auswahl */
.td-ed { border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 1px var(--line2), 0 8px 24px rgba(70, 45, 20, .08); padding: 14px; margin-bottom: 4px; animation: tdIn .16s ease-out; }
@keyframes tdIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.td-ed-h { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; }
.td-ed-h b { font-weight: 600; font-size: 13.5px; }
.td-nav { width: 28px; height: 28px; border-radius: 7px !important; display: grid; place-items: center; color: var(--muted); }
.td-nav:hover { background: var(--hover) !important; color: var(--text); }
.td-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 14px; }
.td-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 7px; border-radius: 10px !important; transition: background .12s; }
.td-day:hover { background: var(--hover) !important; }
.td-day-w { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.td-day-n { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.25; }
.td-day-f { width: 26px; height: 3px; border-radius: 2px; background: var(--active); overflow: hidden; margin-top: 3px; }
.td-day-f i { display: block; height: 100%; background: var(--ok); }
.td-day-f.tight i { background: #d9a03a; }
.td-day.off { opacity: .45; }
.td-day.late .td-day-n { color: var(--danger); }
.td-day.due .td-day-w::after { content: " · Frist"; color: var(--danger); }
.td-day.on { background: var(--accent) !important; opacity: 1; }
.td-day.on .td-day-w, .td-day.on .td-day-n, .td-day.on.late .td-day-n, .td-day.on.due .td-day-w::after { color: #fff; }
.td-day.on .td-day-f { background: rgba(255, 255, 255, .3); }
.td-day.on .td-day-f i { background: #fff; }
.td-f { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.td-f-l { width: 50px; flex: none; color: var(--muted); font-size: 12.5px; }
.td-seg { flex: 1; display: flex; flex-wrap: wrap; gap: 5px; }
.td-sg { height: 28px; padding: 0 10px; border-radius: 7px !important; background: var(--hover) !important; font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; transition: background .12s; }
.td-sg:hover { background: var(--active) !important; }
.td-sg.on { background: var(--text) !important; color: var(--bg); }
.td-time, .td .td-time { width: 72px; height: 28px; border: 0 !important; border-radius: 7px; background: var(--hover) !important; text-align: center; font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums; outline: none; padding: 0 6px; box-shadow: none !important; }
.td-time::placeholder { color: var(--muted); }
.td-time:focus { box-shadow: 0 0 0 2px var(--accent) !important; }
.td-time.on { background: var(--text) !important; color: var(--bg); }
.td-tlw { margin: 4px 0 6px 62px; }
.td-tl { position: relative; height: 30px; border-radius: 7px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% - 0px)), var(--bg2); box-shadow: inset 0 0 0 1px var(--line); cursor: crosshair; overflow: hidden; }
.td-tl-h { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.td-tl-b { position: absolute; top: 5px; bottom: 5px; border-radius: 4px; background: color-mix(in srgb, #6b8cb0 45%, transparent); }
.td-tl-b.p { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ok) 40%, transparent) 0 4px, color-mix(in srgb, var(--ok) 22%, transparent) 4px 8px); }
.td-tl-b.x { background: color-mix(in srgb, var(--muted) 35%, transparent); }
.td-tl-me { position: absolute; top: 2px; bottom: 2px; border-radius: 5px; background: var(--accent); box-shadow: 0 1px 4px rgba(70, 45, 20, .25); transition: left .15s, width .15s; }
.td-tl-me.clash { background: var(--danger); }
.td-tl-s { position: relative; height: 16px; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.td-tl-s span { position: absolute; top: 2px; transform: translateX(-50%); }
.td-tl-s span:first-child { transform: none; }
.td-ed-st { display: flex; align-items: center; gap: 6px; min-height: 22px; margin: 2px 0 10px 62px; font-size: 12.5px; }
.td-ed-st .td-i { width: 14px; height: 14px; }
.td-ed-st.ok { color: var(--ok); } .td-ed-st.warn { color: var(--danger); } .td-ed-st.muted { color: var(--muted); }
.td-ed-f { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--sep); }

/* Zuständig, Verknüpft */
.td-people, .td-links { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.td-person { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px 0 3px; border-radius: 14px !important; background: var(--hover) !important; font-size: 12.5px; font-weight: 500; opacity: .6; transition: opacity .12s, background .12s; }
.td-person:hover { opacity: 1; }
.td-person.on { opacity: 1; background: var(--accent-soft) !important; color: var(--accent); }
.td-add { width: 28px; height: 28px; border-radius: 50% !important; display: grid; place-items: center; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line2); }
.td-add:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft) !important; }
.td-add .td-i { width: 14px; height: 14px; }
.td-link { display: inline-flex; align-items: center; height: 28px; border-radius: 8px; background: var(--hover); overflow: hidden; max-width: 260px; }
.td-link-t { padding: 0 4px 0 10px; height: 28px; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-link-t:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.td-link-x { width: 24px; height: 28px; display: grid; place-items: center; color: var(--faint); }
.td-link-x:hover { color: var(--text); }
.td-link-x .td-i { width: 12px; height: 12px; }

/* Schritte */
.td-steps { padding: 0 8px 6px 46px; }
.td-st { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 6px; border-radius: 8px; box-shadow: inset 0 -1px 0 var(--sep); }
.td-st:last-child { box-shadow: none; }
.td-st:hover { background: var(--hover); }
.td-st-c { width: 18px; height: 18px; flex: none; border-radius: 50% !important; box-shadow: inset 0 0 0 1.5px var(--faint); display: grid; place-items: center; color: transparent; }
.td-st-c:hover { box-shadow: inset 0 0 0 1.5px var(--ok); }
.td-st-c.on { background: var(--ok) !important; box-shadow: none; color: #fff; }
.td-st-c .td-i { width: 11px; height: 11px; }
.td-st-t, .td-step-in { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; padding: 6px 0; color: var(--text); }
.td-st.done .td-st-t { color: var(--muted); text-decoration: line-through; }
.td-step-in::placeholder { color: var(--faint); }
.td-st-p { width: 18px; display: grid; place-items: center; color: var(--faint); }
.td-st-p .td-i { width: 14px; height: 14px; }
.td-st-a { width: 26px; height: 26px; border-radius: 6px !important; display: grid; place-items: center; color: var(--faint); opacity: 0; transition: opacity .12s; }
.td-st:hover .td-st-a { opacity: 1; }
.td-st-a:hover { background: var(--active) !important; color: var(--text); }
.td-st-a .td-i { width: 14px; height: 14px; }

/* Notizen */
.td-notes { display: block; width: calc(100% - 28px); margin: 0 14px 12px; min-height: 72px; border: 0; outline: none; resize: none; background: var(--hover); border-radius: 9px; padding: 10px 12px; font: 13.5px/1.5 var(--font); color: var(--text); }
.td-notes:focus { box-shadow: 0 0 0 2px var(--accent-soft), inset 0 0 0 1px var(--accent); background: var(--bg); }
.td-notes::placeholder { color: var(--faint); }

/* Fuß */
.td-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; margin: 0 -26px; padding: 14px 26px 18px; background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 14px); z-index: 2; }
.modal.td-modal .modal-x { position: sticky; float: right; top: 12px; margin: 12px 12px -40px 0 !important; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 85%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal.td-modal .modal-x:hover { background: var(--active); }
/* Termin-Dialog im selben Stil */
.ev-td .td-head { align-items: center; margin-bottom: 18px; }
.td-evdot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin: 0 5px; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }
.ev-td .td-title { margin: 0; font-size: 22px; }
.td-note { font-size: 12.5px; color: var(--muted); background: var(--hover); border-radius: 9px; padding: 8px 12px; margin-bottom: 16px; }
.td-dt { display: flex; align-items: center; gap: 6px; }
.td-dt > * { flex: none; }
.td-dt .input, .td-dt button { height: 30px; }
.td .td-in, .td .td-in:focus { width: 100%; max-width: 280px; height: 30px; border: 0 !important; border-radius: 8px; background: var(--hover) !important; padding: 0 10px; text-align: right; outline: none; box-shadow: none !important; }
.td .td-in:focus { box-shadow: 0 0 0 2px var(--accent) !important; text-align: left; }
.ev-td .ev-colors { display: flex; gap: 7px; }
.ev-td .cal-dot { width: 20px; height: 20px; }
.td-switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
.td-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.td-switch span { position: absolute; inset: 0; border-radius: 11px; background: var(--active); transition: background .18s; }
.td-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s; }
.td-switch input:checked + span { background: var(--ok); }
.td-switch input:checked + span::after { transform: translateX(16px); }
.td-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ev-td .td-notes { margin-top: 0; }
.td, .td * { hyphens: manual; -webkit-hyphens: manual; }
.td .td-time:focus, .td .td-in:focus, .td .td-step-in:focus, .td .td-st-t:focus { outline: none; }
.td .td-in:focus, .td .td-time:focus { box-shadow: 0 0 0 2px var(--accent) !important; }

/* ---------------- ToDo-Detail 1.0.6: ruhig und schlicht – nur Gesetztes sichtbar ---------------- */
.td { padding: 24px 26px 0; }
.td-head { margin-bottom: 6px; }
.td-pill { background: none; height: 24px; padding: 0 6px; margin-left: -6px; color: var(--muted); font-weight: 400; }
.td-pill:hover { background: var(--hover); color: var(--text); }
.td-pill .td-pill-c { opacity: 0; transition: opacity .12s; }
.td-pill:hover .td-pill-c { opacity: 1; }
.td-crumb-sep { margin: 0 2px; }
.td .td-notes, .td .td-notes:focus { display: block; width: 100%; margin: 6px 0 12px; padding: 4px 0 4px 38px; min-height: 0; border: 0 !important; border-radius: 0; background: none !important; box-shadow: none !important; resize: none; overflow: hidden; color: var(--text); font-size: 13.5px; line-height: 1.5; }
.td .td-notes::placeholder { color: var(--faint); }
.td-lines { display: flex; flex-direction: column; margin: 0 0 8px; }
.td-ln { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 2px 0; border-top: 1px solid var(--sep); }
.td-ln.top { align-items: flex-start; }
.td-ln.top .td-ln-i { margin-top: 9px; }
.td-ln-i { width: 24px; flex: none; display: grid; place-items: center; color: var(--faint); }
.td-ln-i .td-i { width: 16px; height: 16px; }
.td-ln-b { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.td-lv { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; margin-left: -8px; border-radius: 7px !important; color: var(--text); font-size: 13.5px; text-align: left; }
.td-lv:hover { background: var(--hover) !important; }
.td-chev { width: 13px !important; height: 13px !important; color: var(--faint); }
.td-ln.full .td-ln-i, .td-ln.full .td-lv { color: var(--ok); }
.td-ln-x { width: 24px; height: 24px; border-radius: 50% !important; display: grid; place-items: center; color: var(--faint); opacity: 0; transition: opacity .12s; }
.td-ln:hover .td-ln-x { opacity: 1; }
.td-ln-x:hover { background: var(--hover) !important; color: var(--text); }
.td-ln-x .td-i { width: 13px; height: 13px; }
.td-ln-b .td-people, .td-ln-b .td-links { justify-content: flex-start; }
.td-ln-b .td-steps { flex: 1; padding: 0; margin-left: -6px; }
.td-ln-b .td-st { box-shadow: none; min-height: 32px; }
.td-time-w .td-plan { padding: 2px 0 12px 36px; }
.td-est { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.td-blk { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.td-blk:hover { background: var(--hover); }
.td-ed { box-shadow: 0 0 0 1px var(--line); background: var(--bg); padding: 12px; }
.td-ed-h { margin-bottom: 6px; }
.td-days { margin-bottom: 12px; }
.td-ed-f { border-top: 0; padding-top: 4px; }
.td-ed-st { margin-left: 62px; }
/* Fuß: links „Hinzufügen“, rechts Papierkorb und Fertig */
.td-foot { margin-top: 4px; border-top: 1px solid var(--sep); padding: 12px 26px 16px; background: var(--bg); }
.td-adds { display: flex; flex-wrap: wrap; gap: 2px; margin-left: -8px; }
.td-add2 { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border-radius: 7px !important; color: var(--muted); font-size: 12.5px; }
.td-add2:hover { background: var(--hover) !important; color: var(--text); }
.td-add2 .td-i { width: 15px; height: 15px; }
.td-icon-b { width: 30px; height: 30px; border-radius: 7px !important; display: grid; place-items: center; color: var(--faint); }
.td-icon-b:hover { background: color-mix(in srgb, var(--danger) 10%, transparent) !important; color: var(--danger); }
.td-icon-b .td-i { width: 16px; height: 16px; }
.modal.td-modal:has(.td:not(.ev-td)) { width: 560px !important; }
.td-pill select { field-sizing: content; padding-right: 14px; margin-right: -14px; }
.td-sg.on, .td-time.on { background: var(--accent-soft) !important; color: var(--accent) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }
.td-day.on { background: var(--accent-soft) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }
.td-day.on .td-day-w, .td-day.on .td-day-n { color: var(--accent); }
.td-day.on.due .td-day-w::after { color: var(--danger); }
.td-day.on.late .td-day-n { color: var(--danger); }
.td-day.on .td-day-f { background: var(--active); }
.td-day.on .td-day-f i { background: var(--ok); }
.td-blk-cal { box-shadow: none; background: var(--hover); }
.td-blk-dur { box-shadow: none; background: none; color: var(--muted); font-weight: 500; }
/* Kalender-Kopf 1.0.7: Titel nimmt den freien Platz, kürzt sauber; KW und Jahr fallen bei wenig Platz weg statt abgeschnitten zu werden */
.calv .cal-head { flex-wrap: nowrap; }
.calv .cal-head h1.cal-h1 { flex: 1 1 0 !important; width: auto !important; min-width: 0; display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.calv .cal-head .cal-h-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.calv .cal-head .cal-h-y, .calv .cal-head .wk-kw { flex: none; }
.calv .cal-head .wk-kw { line-height: 1.2; }
.calv .cal-head > .spacer { display: none; }
@container calv (max-width: 1150px) { .calv .cal-head .wk-kw { display: none; } }
.calv .cal-head .cal-h-s { display: none; }
@container calv (max-width: 1000px) { .calv .cal-head .cal-h-t { display: none; } .calv .cal-head .cal-h-s { display: inline; } }
@container calv (max-width: 880px) { .calv .cal-head .cal-h-y { display: none; } }
@container calv (max-width: 820px) { .calv .cal-head { flex-wrap: wrap; } }
.cal-main.wk-1 { min-width: 0; }
/* Termin-Hover 1.0.7: kein Aufziehen mehr, stattdessen Vorschau-Karte daneben */
.wk-ev { transition: box-shadow .15s, filter .15s; }
.wk-ev:hover { filter: saturate(1.15) brightness(.98); z-index: 30 !important; box-shadow: 0 2px 8px rgba(70, 45, 20, .14), 0 0 0 1px var(--bg); }
.wk-peek { position: fixed; z-index: 4000; width: 250px; padding: 10px 12px 11px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 0 0 .5px var(--line2), 0 10px 30px rgba(40, 25, 10, .18); pointer-events: none; opacity: 0; transform: translateY(3px) scale(.98); transition: opacity .14s ease, transform .14s ease, top .12s ease, left .12s ease; font-size: 12.5px; color: var(--text); }
.wk-peek.on { opacity: 1; transform: none; }
.wk-peek-t { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.wk-peek-t i { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 5px; }
.wk-peek-t b { font-weight: 600; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; }
.wk-peek-r { padding-left: 17px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.wk-peek-r.muted { color: var(--muted); }
.wk-peek-n { margin: 6px 0 0 17px; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* 1.0.8: Hinweise lesbar statt herausragend */
.toast { max-width: min(560px, calc(100vw - 48px)); white-space: normal; overflow-wrap: anywhere; line-height: 1.4; text-align: left; }
.toast > span, .toast > div { min-width: 0; }
.toast button { flex: none; white-space: nowrap; }
.note-box { overflow-wrap: anywhere; }
.ext-msg { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 12px; line-height: 1.45; color: var(--muted); padding: 8px 10px; border-radius: 8px; background: var(--hover); overflow-wrap: anywhere; }
.ext-msg.warn { color: #9a5a12; background: color-mix(in srgb, #e2a33a 13%, transparent); }
.ext-spin::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 7px; vertical-align: -1px; border-radius: 50%; border: 1.6px solid var(--line2); border-top-color: var(--accent); animation: extSpin .8s linear infinite; }
@keyframes extSpin { to { transform: rotate(360deg); } }
.kb-plan { display: inline-flex; align-items: center; gap: 4px; }
.kb-plan .td-i { width: 12px; height: 12px; }
/* Ganztägige ToDos in der Woche: eine Zeile mit „…“ statt Silbentrennung über vier Zeilen (voller Titel im Tooltip) */
.wk-ad .cal-task { align-items: center; min-width: 0; }
.wk-ad .cal-task .cal-tt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; hyphens: manual; -webkit-hyphens: manual; }
.wk-ad .wk-ev, .wk-ad .wk-ev * { hyphens: manual; -webkit-hyphens: manual; }
.td-pill .td-pill-c { display: none; }
.td .td-step-in, .td .td-step-in:focus, .td .td-st-t, .td .td-st-t:focus { background: none !important; box-shadow: none !important; border: 0 !important; }
/* Sicherungs-Anzeige 1.0.9: ruhig, tritt beim Schreiben zurück */
.cbs-pill { opacity: .6; transition: opacity .6s ease, color .3s, background .3s; box-shadow: none; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.cbs-pill:hover { opacity: 1; background: var(--hover); }
.cbs-pill.typing:not(.bad) { opacity: .12; }
.cbs-pill.busy { color: var(--muted); }
.cbs-pill.bad { opacity: 1; }
/* 1.0.10: feste linke Spalte für „+“ und „⠿“ – der Text rückt etwas ein, der Griff liegt nie auf dem Text */
.nv-page { --nv-gutter: 78px; max-width: 790px; padding-left: var(--nv-gutter); }
.nv-page.paper { max-width: 810px; }
.nv-page.look-narrow { max-width: 650px; } .nv-page.look-wide { max-width: 1050px; }
.pw-note .nv-page { --nv-gutter: 64px; padding-left: var(--nv-gutter); }
@media (max-width: 999px) { .nv-page { --nv-gutter: 66px; padding-left: var(--nv-gutter); } }
@media (max-width: 560px) { .nv-page { --nv-gutter: 58px; padding-left: var(--nv-gutter); } }
html.phone .nv-page { --nv-gutter: 18px; padding-left: 18px; }
/* Griff: ruhig in der Spalte, kleiner Abstand zum Text */
.bh { gap: 0; padding: 1px; border-radius: 8px; }
.bh.on { background: color-mix(in srgb, var(--bg) 70%, transparent); }
/* Werkzeug-Menü: „Frag deine Lektüren“ hervorgehoben */
.cbx-menu .ctx-item.cbx-star { background: var(--accent-soft); border-radius: 8px; margin: 2px 4px 4px; }
.cbx-menu .ctx-item.cbx-star .ctx-ic { color: var(--accent); }
.cbx-menu .ctx-item.cbx-star b, .cbx-menu .ctx-item.cbx-star .ctx-lb { font-weight: 600; }
.cbx-menu { min-width: 300px; }
/* Frag deine Lektüren */
.lq-dlg { width: min(760px, calc(100vw - 48px)) !important; max-height: 86vh; display: flex; flex-direction: column; }
.lq { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1; }
.lq-ask { display: flex; gap: 8px; align-items: stretch; }
.lq-q { flex: 1; resize: none; border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; font: 14.5px/1.45 var(--font); background: var(--bg); color: var(--text); outline: none; }
.lq-q:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lq-go { align-self: stretch; padding: 0 18px; }
.lq-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lq-ex { display: flex; gap: 6px; flex-wrap: wrap; }
.lq-chip { height: 26px; padding: 0 10px; border: 0; border-radius: 13px; background: var(--hover); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.lq-chip:hover { background: var(--active); color: var(--text); }
.lq-scope { display: flex; padding: 2px; border-radius: 9px; background: var(--hover); }
.lq-seg { height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lq-seg.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 500; }
.lq-n { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.lq-res { overflow: auto; min-height: 120px; flex: 1; padding: 4px 2px 8px; margin: 0 -2px; }
.lq-hint { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 10px; background: var(--hover); font-size: 13px; color: var(--muted); line-height: 1.5; }
.lq-hint b { color: var(--text); font-weight: 600; }
.lq-wait, .lq-empty { padding: 28px 8px; text-align: center; color: var(--muted); font-size: 13px; }
.lq-answer { padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); margin-bottom: 16px; }
.lq-answer p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text); }
.lq-cap { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.lq-grp { margin-bottom: 16px; }
.lq-grp h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13.5px; font-weight: 600; }
.lq-card { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 6px; transition: opacity .15s; }
.lq-card.off { opacity: .45; }
.lq-cb { margin-top: 3px; accent-color: var(--accent); flex: none; }
.lq-c { flex: 1; min-width: 0; }
.lq-tx { font-size: 13.5px; line-height: 1.5; color: var(--text); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.lq-tx.full { display: block; }
.lq-meta { display: flex; align-items: center; gap: 10px; margin-top: 5px; font-size: 12px; color: var(--muted); }
.lq-link { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.lq-link:hover { text-decoration: underline; }
.lq-note { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--accent); font-size: 12.5px; line-height: 1.5; color: var(--text); }
.lq-own { margin-top: 4px; font-size: 12px; color: var(--muted); }
.lq-gaps { padding: 10px 14px; border-radius: 10px; background: var(--hover); font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.lq-gaps b { color: var(--text); }
.lq-foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.lq-foot:empty { display: none; }
/* 1.0.11 Feinschliff */
/* Arbeitsfläche: Hinweis-Karte unter den Knöpfen „Fragen & Finden“/„Filter“, nicht dahinter */
.cv-wrap .ws-hint { top: 64px; }
/* Arbeiten › „Neu beginnen“: Kacheln bleiben in der Karte */
.pv-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pv-type { min-width: 0; overflow-wrap: anywhere; }
/* einheitliche Auswahlfelder (z. B. Lernplan) */
.lk-plan select { appearance: none; -webkit-appearance: none; height: 28px; padding: 0 26px 0 10px; border: 0; border-radius: 7px; background: var(--hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23887766' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.lk-plan select:hover { background-color: var(--active); }
.pw-cv .cv-wrap .ws-hint, .cv-wrap .ws-hint { top: 62px !important; }
.pv-type { overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; }
body { hyphenate-limit-chars: 11 5 4; }
/* Monatsansicht: in schmalen Tagen Uhrzeit über den Titel, damit der Titel lesbar bleibt */
.cal-day { container-type: inline-size; }
@container (max-width: 150px) {
  .cal-day .cal-ev { flex-direction: column; align-items: stretch; gap: 0; padding: 2px 6px 3px; }
  .cal-day .cal-ev .cal-ev-t { font-size: 10px; line-height: 1.2; }
}
/* ---------- Spalten anpassen (1.1.1) ---------- */
.ProseMirror .columns { position: relative; }
.ProseMirror .column { position: relative; }
/* Griff zwischen zwei Spalten: unsichtbar, beim Überfahren eine ruhige Linie */
.ProseMirror .col-rs { position: absolute; top: 6px; bottom: 6px; left: -14px; width: 14px; margin: 0 !important; cursor: col-resize; z-index: 3; user-select: none; }
.ProseMirror .col-rs::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); opacity: 0; transition: opacity .15s; }
.ProseMirror .col-rs:hover::after, .ProseMirror .col-rs.on::after { opacity: .55; }
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }
/* Menü-Knopf oben rechts an den Spalten, nur beim Überfahren */
.ProseMirror .col-tools { position: absolute; top: -12px; right: -10px; width: 26px; height: 26px; margin: 0 !important; padding: 0; border: 0; border-radius: 8px; display: grid; place-items: center; background: var(--bg); color: var(--muted); box-shadow: 0 0 0 1px var(--line2), 0 2px 6px rgba(0,0,0,.08); cursor: pointer; opacity: 0; transition: opacity .15s; z-index: 4; }
.ProseMirror .col-tools svg { width: 14px; height: 14px; }
.ProseMirror .columns:hover > .column > .col-tools, .ProseMirror .col-tools:focus-visible { opacity: 1; }
.ProseMirror .col-tools:hover { color: var(--text); background: var(--hover); }
/* Aussehen „Schlicht“: ohne Kästen, feine Trennlinie */
.ProseMirror .columns[data-look="plain"] { gap: 28px; }
.ProseMirror .columns[data-look="plain"] > .column { background: none !important; box-shadow: none !important; border-radius: 0; padding: 2px 0; }
.ProseMirror .columns[data-look="plain"] > .column + .column::before { content: ""; position: absolute; left: -14px; top: 4px; bottom: 4px; width: 1px; background: var(--line2); }
/* Aussehen „Farbig hinterlegt“ */
.ProseMirror .columns[data-look="tint"] > .column { background: color-mix(in srgb, var(--accent) 7%, var(--bg)) !important; box-shadow: none !important; }
.ProseMirror .columns[data-look="tint"] > .column:nth-child(even) { background: color-mix(in srgb, #6b8cb0 9%, var(--bg)) !important; }
/* Ablage-Linie: neben dem Stichpunkt beginnen */
.bh-line.li { border-radius: 2px; }
.bh-line.li::before { content: ""; position: absolute; left: -3px; top: -2.5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@media (max-width: 560px) { .ProseMirror .col-rs { display: none; } }
.ProseMirror .column > :is(.col-rs, .col-tools) + *, .ProseMirror .column > .col-rs + .col-tools + * { margin-top: 0 !important; }
/* Frag deine Lektüren: eigene Literatur-Auswahl */
.lq-pick:empty { display: none; }
.lq-pick { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); padding: 8px; }
.lq-pick-h { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.lq-pick-q { flex: 1; height: 28px; border: 0; border-radius: 7px; background: var(--hover); padding: 0 10px; font: inherit; font-size: 12.5px; color: var(--text); outline: none; }
.lq-pick-q:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.lq-pick-l { max-height: 190px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.lq-pick-i { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; cursor: pointer; font-size: 12.5px; }
.lq-pick-i:hover { background: var(--hover); }
.lq-pick-i.on { background: var(--accent-soft); }
.lq-pick-i input { accent-color: var(--accent); flex: none; }
.lq-pick-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lq-pick-t b { font-weight: 500; }
/* ---------- Spalten 1.1.2: Panel, Farben, Rahmen, Abstand, Ausrichtung, seitliches Ablegen ---------- */
.colp { position: fixed; z-index: 5000; width: 300px; padding: 12px 14px 12px; border-radius: 14px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2), 0 12px 36px rgba(40, 25, 10, .18); font-size: 12.5px; color: var(--text); animation: colpIn .14s ease-out; }
@keyframes colpIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.colp button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.colp-h { display: flex; align-items: center; margin-bottom: 10px; }
.colp-h b { flex: 1; font-size: 13.5px; font-weight: 600; }
.colp-x { width: 24px; height: 24px; border-radius: 6px; font-size: 17px !important; line-height: 1; color: var(--muted) !important; }
.colp-x:hover { background: var(--hover) !important; color: var(--text) !important; }
.colp-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.colp-row.top { margin-top: 12px; }
.colp-l { width: 66px; flex: none; color: var(--muted); }
.colp-l.top { width: auto; margin: 12px 0 6px; }
.colp-seg { flex: 1; display: flex; padding: 2px; border-radius: 8px; background: var(--hover); }
.colp-seg button { flex: 1; height: 24px; border-radius: 6px; color: var(--muted) !important; font-variant-numeric: tabular-nums; }
.colp-seg button:hover { color: var(--text) !important; }
.colp-seg button.on { background: var(--bg) !important; color: var(--text) !important; font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.colp-bar { display: flex; gap: 3px; }
.colp-cell { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 1px; height: 30px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); transition: flex .2s ease; }
.colp-cell input { width: 30px; border: 0; background: none; text-align: right; font: inherit; font-weight: 600; color: inherit; outline: none; -moz-appearance: textfield; padding: 0; }
.colp-cell input::-webkit-inner-spin-button, .colp-cell input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.colp-cell:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent); }
.colp-pre { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.colp-pre button { padding: 3px 4px; border-radius: 6px; color: var(--faint) !important; line-height: 0; }
.colp-pre button:hover { background: var(--hover) !important; color: var(--muted) !important; }
.colp-pre button.on { color: var(--accent) !important; background: var(--accent-soft) !important; }
.colp-hint { margin-top: 4px; font-size: 11px; color: var(--faint); }
.colp-sw { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.colp-c { aspect-ratio: 1; border-radius: 50% !important; background: color-mix(in srgb, var(--c) 30%, var(--bg)) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent); position: relative; }
.colp-c.none { background: var(--bg) !important; box-shadow: inset 0 0 0 1px var(--line2); }
.colp-c.none::after { content: ""; position: absolute; left: 20%; right: 20%; top: 50%; height: 1.5px; background: var(--faint); transform: rotate(-45deg); }
.colp-c:hover { transform: scale(1.1); }
.colp-c.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }
.colp-foot { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.colp-btn { height: 26px; padding: 0 8px; border-radius: 6px; color: var(--muted) !important; }
.colp-btn:hover { background: var(--hover) !important; color: var(--text) !important; }
/* Farben je Spalte */
.ProseMirror .column[data-bg] { --cb: #8f8a84; background: color-mix(in srgb, var(--cb) 12%, var(--bg)) !important; }
.ProseMirror .columns[data-look="card"] > .column[data-bg], .ProseMirror .columns:not([data-look]) > .column[data-bg] { box-shadow: 0 0 0 1px color-mix(in srgb, var(--cb) 22%, transparent) !important; }
.ProseMirror .column[data-bg="gray"] { --cb: #8f8a84; } .ProseMirror .column[data-bg="brown"] { --cb: #9a6b4a; }
.ProseMirror .column[data-bg="orange"] { --cb: #d9822b; } .ProseMirror .column[data-bg="yellow"] { --cb: #d4a01c; }
.ProseMirror .column[data-bg="green"] { --cb: #4f9a6a; } .ProseMirror .column[data-bg="blue"] { --cb: #4a86c5; }
.ProseMirror .column[data-bg="purple"] { --cb: #8e6bbf; } .ProseMirror .column[data-bg="pink"] { --cb: #c4619a; }
.ProseMirror .column[data-bg="red"] { --cb: #d1574d; }
.ProseMirror .columns[data-look="plain"] > .column[data-bg] { padding: 10px 12px; border-radius: 10px; }
/* Rahmen „Ohne“ */
.ProseMirror .columns[data-look="none"] > .column { background: none; box-shadow: none !important; padding: 2px 0; border-radius: 0; }
.ProseMirror .columns[data-look="none"] > .column[data-bg] { padding: 10px 12px; border-radius: 10px; }
.ProseMirror .columns[data-look="tint"] > .column:not([data-bg]) { background: color-mix(in srgb, var(--accent) 7%, var(--bg)) !important; box-shadow: none !important; }
/* Abstand und Ausrichtung */
.ProseMirror .columns[data-gap="s"] { gap: 6px; }
.ProseMirror .columns[data-gap="l"] { gap: 32px; }
.ProseMirror .columns[data-valign] > .column { display: flex; flex-direction: column; }
.ProseMirror .columns[data-valign="center"] > .column { justify-content: center; }
.ProseMirror .columns[data-valign="end"] > .column { justify-content: flex-end; }
.ProseMirror .columns[data-gap="s"] .col-rs { left: -6px; width: 6px; }
.ProseMirror .columns[data-gap="l"] .col-rs { left: -22px; width: 22px; }
/* senkrechte Ablage-Linie: „daneben legen“ */
.bh-line.v { border-radius: 2px; }
.bh-line.v::before { content: ""; position: absolute; left: -2.5px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
/* Spalten 1.1.3: Feinschliff */
.bh.in-col .bh-add { display: none; }
.bh.in-col .bh-grip { width: 16px; }
.ProseMirror .columns[data-look="none"] { gap: 24px; }
.ProseMirror .columns[data-look="none"] .col-rs, .ProseMirror .columns[data-look="plain"] .col-rs { left: -20px; width: 16px; }
.ProseMirror .columns[data-look="plain"][data-gap="s"], .ProseMirror .columns[data-look="none"][data-gap="s"] { gap: 16px; }
.ProseMirror .columns[data-look="plain"][data-gap="s"] > .column + .column::before { left: -8px; }
/* Trenner: größere Trefferfläche, Linie erst beim Überfahren */
.ProseMirror .col-rs::after { width: 2px; margin-left: -1px; }
.ProseMirror .col-rs:hover::after, .ProseMirror .col-rs.on::after { opacity: .8; }
.col-tip { position: fixed; z-index: 6000; transform: translateX(-50%); padding: 4px 9px; border-radius: 7px; background: var(--text); color: var(--bg); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: pre; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
/* leere Spalte: dezenter Hinweis */
.ProseMirror .column > p:only-of-type:last-of-type:has(> br.ProseMirror-trailingBreak:only-child)::before { content: "Schreibe oder ziehe etwas hierher …"; color: var(--faint); pointer-events: none; float: left; height: 0; }
/* Spalten-Knopf ruhiger und sauber in der Ecke */
.ProseMirror .col-tools { top: -11px; right: -11px; width: 24px; height: 24px; border-radius: 7px; }
.ProseMirror .columns:hover > .column > .col-tools { opacity: .9; }
/* ---------- Hervorhebungen (Callouts) 1.1.4: Gestaltung wie die Zitat-Blöcke ---------- */
.ProseMirror .callout, .callout { --cl: #4c8bf5; position: relative; border-left: 4px solid var(--cl) !important; background: color-mix(in srgb, var(--cl) 10%, var(--bg)) !important; border-radius: 0 10px 10px 0; padding: 14px 48px 10px 26px; margin: .8em 0; color: var(--text); }
.callout.callout-tipp { --cl: #5fb236; } .callout.callout-warnung { --cl: #e8902c; } .callout.callout-definition { --cl: #9b82e0; }
.callout.callout-frage { --cl: #d867e0; } .callout.callout-these { --cl: #e85d5d; } .callout.callout-zusammenfassung { --cl: #9a958e; }
.callout.callout-gedanke { --cl: var(--own-line, #c9a27a); background: var(--own-bg, color-mix(in srgb, var(--cl) 10%, var(--bg))) !important; }
.callout.callout-own { --cl: var(--cc); }
@media (prefers-color-scheme: dark) { .ProseMirror .callout, .callout { background: color-mix(in srgb, var(--cl) 14%, var(--bg)) !important; } }
.callout > .callout-head { position: absolute; top: 9px; right: 9px; margin: 0; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: color-mix(in srgb, var(--cl) 75%, var(--text)); cursor: pointer; }
.callout > .callout-head:hover { background: color-mix(in srgb, var(--cl) 16%, transparent); }
.callout > .callout-head .callout-ic svg.i, .callout > .callout-head svg { width: 17px; height: 17px; }
.callout-body > :first-child { margin-top: 0; }
.callout-foot { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 8px; font: 12.5px/1.4 var(--font); color: var(--muted); user-select: none; }
.callout-foot .callout-title { font-weight: 500; cursor: pointer; }
.callout-foot .callout-title:hover { color: var(--text); }
.callout-link { color: color-mix(in srgb, var(--cl) 70%, var(--text)); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.callout-link:hover { text-decoration: underline; text-underline-offset: 2px; }
/* Frag deine Lektüren 1.1.4: frei ordnen, auswählen, bearbeiten */
.lq-opts { display: flex; flex-direction: column; gap: 6px; }
.lq-optrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lq-ol { font-size: 12px; color: var(--muted); min-width: 74px; }
.lq-tog { height: 26px; padding: 0 10px; border: 0; border-radius: 13px; background: var(--hover); color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.lq-tog.on { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.lq-tog:hover { filter: brightness(.97); }
.lq-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.lq-chk input, .lq-grp h4 .lq-cb { accent-color: var(--accent); }
.lq-footcol { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.lq-foot { flex-direction: column; align-items: stretch; }
.lq-card { position: relative; align-items: flex-start; cursor: default; }
.lq-card.drag { opacity: .4; }
.lq-card.lq-over { box-shadow: inset 0 0 0 1px var(--line), 0 -3px 0 0 var(--accent); }
.lq-grp h4.lq-over { color: var(--accent); }
.lq-grip { flex: none; width: 12px; margin: 2px -4px 0 -4px; color: var(--faint); cursor: grab; font-size: 13px; opacity: 0; transition: opacity .12s; user-select: none; }
.lq-card:hover .lq-grip { opacity: 1; }
.lq-del { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--faint); font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; }
.lq-card:hover .lq-del { opacity: 1; }
.lq-del:hover { background: var(--hover); color: var(--text); }
.lq-c { padding-right: 18px; }
.lq-note { outline: none; border-radius: 4px; cursor: text; }
.lq-note:empty::before { content: attr(data-ph); color: var(--faint); }
.lq-note:focus { background: var(--hover); }
.lq-gt { outline: none; border-radius: 4px; padding: 0 2px; }
.lq-gt[contenteditable]:hover, .lq-gt:focus { background: var(--hover); cursor: text; }
.lq-answer p[contenteditable] { outline: none; border-radius: 6px; }
.lq-answer p[contenteditable]:focus { background: color-mix(in srgb, var(--bg) 50%, transparent); }
.lq-res { border-top: 1px solid var(--line); padding-top: 10px; }

/* =====================================================================================
   1.2.0 · ToDos als Liste (wie ein Tagesplan): Abschnitte nach Fälligkeit, Schnelleingabe, Schritte aufklappen
   ===================================================================================== */
.kb.kb-lv { display: block; overflow-y: auto; overflow-x: hidden; padding: 0 0 48px; }
.lv { max-width: 760px; margin: 0 auto; padding: 4px 4px 0; }
.lv-add { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 12px; min-height: 44px; border-radius: 12px; background: var(--card); box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0, 0, 0, .04); margin-bottom: 22px; transition: box-shadow .15s; }
.lv-add:focus-within { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent), 0 4px 14px -8px rgba(0, 0, 0, .18); }
.lv-add-ic { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--accent); font-size: 18px; line-height: 1; font-weight: 300; }
.lv-add-in { flex: 1; min-width: 200px; height: 44px; border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: var(--text); }
.lv-add-in::placeholder { color: var(--faint); }
.lv-add-prev { display: none; flex-basis: 100%; gap: 6px; padding: 0 0 10px 30px; margin-top: -4px; }
.lv-add-prev.on { display: flex; flex-wrap: wrap; }
.lv-pv { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--bg2); }
.lv-pv svg { width: 12px; height: 12px; }
.lv-pv.due { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.lv-pv.p1 { color: var(--danger); background: rgba(217, 83, 79, .1); } .lv-pv.p2 { color: #b9711f; background: rgba(229, 151, 61, .12); } .lv-pv.p3 { color: #3a7bb0; background: rgba(74, 144, 200, .1); }

.lv-sec { margin: 0 0 22px; border-radius: 12px; transition: background .12s, box-shadow .12s; }
.lv-sec.lv-over { background: color-mix(in srgb, var(--accent) 6%, transparent); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 40%, transparent); }
.lv-h { display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 0 10px 6px; margin: 0; border: 0; border-bottom: .5px solid var(--line); background: none; font: inherit; text-align: left; color: var(--text); }
.lv-h-t { font-family: var(--serif, var(--font)); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.lv-h-d { font-size: 12px; color: var(--muted); }
.lv-h-n { margin-left: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.lv-h-late .lv-h-t { color: var(--danger); }
.lv-h-today .lv-h-t { color: var(--accent); }
.lv-empty { padding: 14px 10px 6px 44px; font-size: 12.5px; color: var(--faint); }

.lv-row { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 9px 8px 9px 10px; border-radius: 9px; cursor: default; transition: background .1s; }
.lv-row + .lv-row, .lv-item + .lv-row, .lv-row + .lv-item, .lv-item + .lv-item { box-shadow: 0 -.5px 0 var(--line); }
.lv-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); box-shadow: none; }
.lv-row:hover + .lv-row, .lv-row:hover + .lv-item { box-shadow: none; }
.lv-row.dragging { opacity: .4; }
.lv-row.lv-before::before { content: ""; position: absolute; left: 10px; right: 10px; top: -1px; height: 2px; border-radius: 1px; background: var(--accent); }
.lv-row .lv-check { flex: none; margin-top: 1px; }
.lv-main { flex: 1; min-width: 0; }
.lv-t { font-size: 14px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.lv-t.empty { color: var(--faint); }
.lv-row.done .lv-t { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line2); }
.lv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 2px; font-size: 12px; color: var(--muted); }
.lv-meta:empty { display: none; }
.lv-due.late { color: var(--danger); } .lv-due.soon { color: var(--accent); }
.lv-plan { display: inline-flex; align-items: center; gap: 4px; } .lv-plan svg { width: 12px; height: 12px; } .lv-plan.today { color: var(--accent); }
.lv-proj, .lv-link { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-cl { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px 0 3px; margin-left: -3px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.lv-cl:hover { background: var(--bg2); color: var(--text); }
.lv-cl.full { color: var(--ok); }
.lv-tw { display: inline-block; font-size: 13px; line-height: 1; transition: transform .15s; }
.lv-cl.on .lv-tw, .lv-done.on .lv-h .lv-tw { transform: rotate(90deg); }
.lv-prio { flex: none; width: 7px; height: 7px; margin-top: 8px; border-radius: 50%; background: var(--c, #d9534f); }
.lv-row.p1 .lv-prio { --c: #d9534f; } .lv-row.p2 .lv-prio { --c: #e5973d; } .lv-row.p3 .lv-prio { --c: #4a90c8; }
.lv-row .lv-more { opacity: 0; flex: none; transition: opacity .12s; }
.lv-row:hover .lv-more, .lv-row .lv-more:focus-visible { opacity: 1; }
.lv-steps { display: flex; flex-direction: column; gap: 2px; padding: 0 10px 10px 44px; margin-top: -4px; }
.lv-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; padding: 3px 0; }
.lv-step input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.lv-step.done span { color: var(--faint); text-decoration: line-through; }
.lv-done .lv-h { cursor: pointer; border-bottom-color: transparent; color: var(--muted); }
.lv-done .lv-h .lv-h-t { font-size: 14px; color: var(--muted); font-family: var(--font); font-weight: 500; }
.lv-done.on .lv-h { border-bottom-color: var(--line); }
/* Werkzeugleiste: ein Menü „Ansicht“ statt vieler Knöpfe, aktive Filter als Chips */
.kb-bar .kb-view { height: 28px; padding: 0 10px; border-radius: 7px; font-size: 13px; color: var(--muted); }
.kb-bar .kb-view::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 7px; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; }
.kb-fchip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px 0 10px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; }
.kb-fchip .x { font-size: 14px; line-height: 1; opacity: .7; }
.kb-fchip:hover .x { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .lv-row, .lv-sec, .lv-tw { transition: none; } }
.lv-add .lv-add-in, .lv-add .lv-add-in:focus { border: 0 !important; box-shadow: none !important; background: none !important; outline: 0 !important; padding: 0 !important; border-radius: 0 !important; }

/* =====================================================================================
   1.2.0 · Startseite als Dashboard: Widgets wählen, ordnen, Größe ändern
   ===================================================================================== */
.hm .hm-grid.cbw-grid, .hm .hm-grid.hm-grid5.cbw-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-areas: none; grid-auto-flow: row; }
.hm .hm-grid.cbw-grid > .hm-card { grid-area: auto !important; position: relative; min-width: 0; }
.hm .hm-grid.cbw-grid > .hm-card[hidden] { display: none !important; }

.cbw-bar { display: flex; justify-content: flex-end; margin: 0 14px 8px; min-height: 28px; }
.cbw-edit-b { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 12px; color: var(--faint); cursor: pointer; opacity: .75; transition: opacity .15s, color .15s, background .15s; }
.hm:hover .cbw-edit-b, .cbw-edit-b:focus-visible { opacity: 1; }
.cbw-edit-b:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.cbw-bar-in { display: flex; align-items: center; gap: 8px; }
.cbw-hint { font-size: 12px; color: var(--muted); margin-right: 6px; }
.hm .hm-board.cbw-edit .hm-card { cursor: grab; }
.hm .hm-board.cbw-edit .hm-card > *:not(.cbw-tools) { pointer-events: none; }
.hm .hm-board.cbw-edit .hm-card::after { content: ""; position: absolute; inset: 6px; border-radius: 10px; border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent); pointer-events: none; }
.cbw-tools { position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 9px; background: var(--card, #fff); box-shadow: 0 0 0 .5px var(--line2), 0 4px 12px -6px rgba(0, 0, 0, .25); }
.cbw-grip { display: grid; place-items: center; width: 22px; height: 22px; color: var(--faint); }
.cbw-sizes { display: flex; gap: 2px; }
.cbw-sz { display: grid; place-items: center; width: 30px; height: 22px; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.cbw-sz i { display: block; height: 8px; border-radius: 2px; background: var(--line2); }
.cbw-sz:hover i { background: var(--muted); }
.cbw-sz.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cbw-sz.on i { background: var(--accent); }
.cbw-x { width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.cbw-x:hover { background: rgba(217, 83, 79, .12); color: var(--danger); }
.hm-card.cbw-dragging { opacity: .35; }
.hm-card.cbw-before { box-shadow: inset 3px 0 0 var(--accent) !important; }
.hm-card.cbw-after { box-shadow: inset -3px 0 0 var(--accent) !important; }
.cbw-addtile { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 72px; border: 0; background: var(--sb-mod, var(--card)); font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; }
.cbw-addtile:hover { color: var(--accent); }
/* Widget-Auswahl */
.cbw-gal-back { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(20, 14, 8, .28); backdrop-filter: blur(2px); animation: cbwIn .14s ease-out; }
@keyframes cbwIn { from { opacity: 0; } }
.cbw-gal { width: min(620px, calc(100vw - 48px)); max-height: min(680px, calc(100vh - 80px)); display: flex; flex-direction: column; border-radius: 16px; background: var(--bg); box-shadow: 0 0 0 .5px var(--line2), 0 30px 60px -20px rgba(0, 0, 0, .35); overflow: hidden; }
.cbw-gal-h { display: flex; align-items: center; padding: 18px 20px 10px; }
.cbw-gal-h h2 { margin: 0; font-size: 20px; font-family: var(--serif, var(--font)); }
.cbw-gal-close { margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--bg2); color: var(--muted); font-size: 18px; cursor: pointer; }
.cbw-gal-q { margin: 0 20px; height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--card); box-shadow: 0 0 0 .5px var(--line2); font: inherit; font-size: 13px; color: var(--text); outline: 0; }
.cbw-gal-q:focus { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.cbw-gal-cats { display: flex; gap: 6px; padding: 12px 20px 10px; flex-wrap: wrap; }
.cbw-cat { height: 26px; padding: 0 12px; border: 0; border-radius: 13px; background: var(--bg2); font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.cbw-cat.on { background: var(--text); color: var(--bg); }
.cbw-gal-list { overflow-y: auto; padding: 4px 12px 16px; }
.cbw-gi { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 10px; }
.cbw-gi + .cbw-gi { box-shadow: 0 -.5px 0 var(--line); }
.cbw-gi:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.cbw-gi-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); color: var(--accent); }
.cbw-gi.on .cbw-gi-ic { background: var(--bg2); color: var(--muted); }
.cbw-gi-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cbw-gi-t b { font-size: 13.5px; font-weight: 600; }
.cbw-gi-t span { font-size: 12.5px; color: var(--muted); }
.cbw-gi-t em { font-style: normal; font-size: 11px; color: var(--faint); }
.cbw-gi-b { flex: none; min-width: 92px; }
.cbw-gal-none { padding: 24px; text-align: center; color: var(--faint); }
/* Mein Tag */
.cbw-day-big { display: flex; flex-direction: column; gap: 1px; margin-bottom: 12px; }
.cbw-day-big b { font-family: var(--serif, var(--font)); font-size: 28px; font-weight: 500; letter-spacing: -.02em; color: var(--accent); line-height: 1.1; }
.cbw-day-big span { font-size: 12px; color: var(--muted); }
.cbw-day-bar { position: relative; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 12%, var(--bg2)); margin-bottom: 14px; overflow: hidden; }
.cbw-day-bar i { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--text) 35%, transparent); }
.cbw-day-bar i.plan { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.cbw-day-bar i.ext { background: color-mix(in srgb, #5b8fd6 70%, transparent); }
.cbw-day-now { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #d9534f; border-radius: 1px; }
.cbw-day-list { display: flex; flex-direction: column; gap: 6px; }
.cbw-day-l { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 12.5px; }
.cbw-day-l .k { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.cbw-day-l .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbw-day-l .h { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.cbw-day-due { margin-top: 12px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--accent); cursor: pointer; text-align: left; }
.cbw-day-due:hover { text-decoration: underline; }
/* Diese Woche */
.cbw-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cbw-wd { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 10px; border: 0; border-radius: 10px; background: none; font: inherit; color: var(--text); cursor: pointer; }
.cbw-wd:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.cbw-wd-n { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.cbw-wd-d { font-size: 18px; font-variant-numeric: tabular-nums; }
.cbw-wd.today .cbw-wd-n, .cbw-wd.today .cbw-wd-d { color: var(--accent); }
.cbw-wd.off { opacity: .55; }
.cbw-wd-f { position: relative; width: 8px; height: 46px; border-radius: 4px; background: var(--bg2); overflow: hidden; }
.cbw-wd-f i { position: absolute; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 65%, transparent); border-radius: 4px; }
.cbw-wd-c { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 28px; font-size: 11px; color: var(--muted); }
.cbw-wd-c .t { color: var(--accent); }
.cbw-week-leg { margin: 10px 0 0; font-size: 11px; color: var(--faint); }
.cbw-week-leg i { display: none; }
/* Zitat */
.cbw-q { margin: 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--qc, #e8c547); font-family: var(--serif, Georgia, serif); font-size: 15px; line-height: 1.5; color: var(--text); cursor: pointer; }
.cbw-q:hover { color: color-mix(in srgb, var(--text) 80%, var(--accent)); }
.cbw-q.c-yellow { --qc: #e8c547; } .cbw-q.c-red { --qc: #e48a8a; } .cbw-q.c-green { --qc: #8fc488; } .cbw-q.c-blue { --qc: #7fb4de; } .cbw-q.c-purple { --qc: #ad9de6; } .cbw-q.c-pink { --qc: #de9fdf; } .cbw-q.c-orange { --qc: #ee9147; } .cbw-q.c-gray { --qc: #b9b9bb; }
.cbw-q-f { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--muted); min-width: 0; }
.cbw-q-c { font-weight: 600; color: var(--text); white-space: nowrap; }
.cbw-q-s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbw-q-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.cbw-q-n:hover { background: var(--bg2); color: var(--text); }
/* Schnellnotiz */
.cbw-memo-in { width: 100%; min-height: 110px; flex: 1; box-sizing: border-box; padding: 10px 12px; border: 0; border-radius: 10px; resize: vertical; background: color-mix(in srgb, #f3d77a 18%, var(--card, #fff)); box-shadow: inset 0 0 0 .5px var(--line2); font: inherit; font-size: 13.5px; line-height: 1.5; color: var(--text); outline: 0; }
.cbw-memo-in:focus { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.cbw-memo-a { display: flex; gap: 6px; margin-top: 8px; opacity: .45; pointer-events: none; transition: opacity .15s; }
.cbw-memo-a.on { opacity: 1; pointer-events: auto; }
.cbw-card .cbw-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
/* Zuletzt bearbeitet */
.cbw-rec { display: flex; flex-direction: column; }
.cbw-rec-i { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
.cbw-rec-i + .cbw-rec-i { box-shadow: 0 -.5px 0 var(--line); }
.cbw-rec-i:hover { background: color-mix(in srgb, var(--text) 4%, transparent); box-shadow: none; }
.cbw-rec-i svg { flex: none; color: var(--muted); }
.cbw-rec-i .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbw-rec-i .a { flex: none; font-size: 11.5px; color: var(--faint); }
.cbw-rec-new { margin-top: 8px; align-self: flex-start; opacity: 1 !important; }
/* Abgaben */
.cbw-due { display: flex; flex-direction: column; gap: 4px; }
.cbw-due-i { display: grid; grid-template-columns: 44px auto minmax(0, 1fr); align-items: baseline; gap: 4px 6px; padding: 8px 4px; border: 0; border-radius: 8px; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.cbw-due-i:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.cbw-due-i b { font-family: var(--serif, var(--font)); font-size: 22px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.cbw-due-i.soon b { color: var(--danger); }
.cbw-due-i .u { font-size: 11px; color: var(--muted); }
.cbw-due-i .t { display: flex; flex-direction: column; font-size: 13px; min-width: 0; overflow: hidden; }
.cbw-due-i .t em { font-style: normal; font-size: 11.5px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .cbw-gal-back { animation: none; } }
.cbw-gal .cbw-gal-q, .cbw-gal .cbw-gal-q:focus { border: 0 !important; outline: 0 !important; }

/* 1.2.0 · Aufgaben in einer Notiz finden */
.ft-dlg { width: min(720px, calc(100vw - 48px)); }
.ft-intro { margin: 0 0 12px; }
.ft-list { display: flex; flex-direction: column; max-height: 52vh; overflow-y: auto; margin: 0 -6px; }
.ft-i { display: grid; grid-template-columns: 22px minmax(0, 1fr) 132px 84px; align-items: start; gap: 10px; padding: 9px 6px; border-radius: 9px; opacity: .55; transition: opacity .12s; }
.ft-i.on { opacity: 1; }
.ft-i + .ft-i { box-shadow: 0 -.5px 0 var(--line); }
.ft-cb { width: 16px; height: 16px; margin: 7px 0 0 3px; accent-color: var(--accent); }
.ft-m { min-width: 0; }
.ft-t, .ft-t:focus { width: 100%; height: 30px; padding: 0 8px; margin-left: -8px; border: 0 !important; border-radius: 6px; background: none !important; box-shadow: none !important; font: inherit; font-size: 14px; color: var(--text); outline: 0; }
.ft-t:hover, .ft-t:focus { background: var(--bg2) !important; }
.ft-why { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-why b { font-weight: 500; color: var(--accent); }
.ft-d, .ft-p { height: 30px; border: 0; border-radius: 7px; background: var(--bg2); font: inherit; font-size: 12px; color: var(--text); padding: 0 6px; }
.ft-foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: .5px solid var(--line); flex-wrap: wrap; }
.ft-foot .ft-ai { display: inline-flex; align-items: center; gap: 6px; }
.ft-foot .ft-ai svg { width: 14px; height: 14px; }
.ft-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.ft-foot { flex-wrap: nowrap; }
.ft-foot .select { max-width: 200px; }
.ft-link { white-space: nowrap; }
.ft-foot .btn.primary { white-space: nowrap; flex: none; }
.cbw-bar { justify-content: flex-end; margin: 0 14px 40px; }
.cbw-bar.on { position: sticky; bottom: 16px; z-index: 6; margin-top: -24px; }
.cbw-bar.on .cbw-bar-in { padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), 0 10px 30px -10px rgba(0, 0, 0, .3); }
.lv-more-b { display: block; margin: 4px 0 0 34px; padding: 6px 10px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 12.5px; color: var(--accent); cursor: pointer; }
.lv-more-b:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* 1.3.0 · Termin in einem Satz (Kalender) */
.qe-row { margin: -6px 0 14px; }
.qe { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; min-height: 38px; padding: 0 12px; border-radius: 10px; background: color-mix(in srgb, var(--text) 3.5%, transparent); transition: background .15s, box-shadow .15s; }
.qe:focus-within, .qe.has { background: var(--card, var(--bg)); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 50%, transparent), 0 6px 18px -10px rgba(0, 0, 0, .25); }
.qe-ic { color: var(--accent); font-size: 18px; font-weight: 300; width: 16px; text-align: center; }
.qe .qe-in, .qe .qe-in:focus { flex: 1; min-width: 220px; height: 38px; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; outline: 0 !important; font: inherit; font-size: 13.5px; color: var(--text); }
.qe-in::placeholder { color: var(--faint); }
.qe-prev { display: none; flex-basis: 100%; align-items: center; flex-wrap: wrap; gap: 6px; padding: 0 0 10px 26px; }
.qe.has .qe-prev { display: flex; }
.qe-t { font-size: 13px; font-weight: 600; margin-right: 4px; }
.qe-c { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--bg2); font-size: 12px; color: var(--muted); }
.qe-c svg { width: 12px; height: 12px; }
.qe-date, .qe-time { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.qe-task { color: var(--ok); background: rgba(63, 143, 79, .1); }
.qe-k { margin-left: auto; font-size: 11px; color: var(--faint); }


/* =====================================================================================
   1.3.0 · Designsystem: gemeinsame Bausteine für Eingaben, Chips, Prioritäten und KI
   – eine Schnelleingabe (Notizen, ToDos, Kalender) sieht überall gleich aus
   – Farben für Status und Priorität kommen aus Tokens statt festen Werten
   – KI erkennt man an einem Zeichen: ✦ (überall als dasselbe Funkeln-Symbol dargestellt)
   ===================================================================================== */
:root {
  --p1: #d9534f; --p2: #e5973d; --p3: #4a90c8;
  --qe-h: 44px; --qe-r: 12px;
  --qe-line: 0 0 0 .5px var(--line2), 0 1px 3px rgba(0, 0, 0, .04);
  --qe-focus: 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent), 0 6px 18px -10px rgba(0, 0, 0, .22);
  --chip-h: 22px; --chip-r: 11px; --chip-fs: 11.5px;
  --ai: color-mix(in srgb, var(--accent) 82%, #8a5cf6);
}
.nvq, .lv-add, .qe { min-height: var(--qe-h); border-radius: var(--qe-r); background: var(--card, var(--bg)); box-shadow: var(--qe-line); }
.nvq:focus-within, .lv-add:focus-within, .qe:focus-within, .qe.has { background: var(--card, var(--bg)); box-shadow: var(--qe-focus); }
.nvq-plus, .lv-add-ic, .qe-ic { width: 18px; flex: none; text-align: center; color: var(--accent); font-size: 18px; font-weight: 300; line-height: 1; }
.nvq-in, .lv-add .lv-add-in, .qe .qe-in { font-size: 14px; }
.lv-pv, .qe-c { height: var(--chip-h); border-radius: var(--chip-r); font-size: var(--chip-fs); }
.lv-pv.p1 { color: var(--p1); background: color-mix(in srgb, var(--p1) 11%, transparent); }
.lv-pv.p2 { color: color-mix(in srgb, var(--p2) 80%, #000); background: color-mix(in srgb, var(--p2) 13%, transparent); }
.lv-pv.p3 { color: var(--p3); background: color-mix(in srgb, var(--p3) 11%, transparent); }
.lv-row.p1 .lv-prio { --c: var(--p1); } .lv-row.p2 .lv-prio { --c: var(--p2); } .lv-row.p3 .lv-prio { --c: var(--p3); }
/* KI-Symbol: überall gleich, leicht abgesetzt – nicht bunt */
svg.i-sparkles { color: var(--ai); --ti1: var(--ai); --ti2: var(--ai); }
.btn.primary svg.i-sparkles, .on > svg.i-sparkles { color: currentColor; }
/* Leere Zustände und Zähler einheitlich */
.lv-empty, .hm-empty, .cbw-gal-none { color: var(--faint); font-size: 12.5px; }
.lv-h-n, .nvn-c, .kb-count { font-variant-numeric: tabular-nums; }
/* Ruhigere Hover-Flächen in allen neuen Listen */
.lv-row:hover, .cbw-rec-i:hover, .cbw-due-i:hover, .cbw-wd:hover, .cbw-gi:hover { background: var(--hover); }
.lv { margin: 0; max-width: 820px; }

/* =====================================================================================
   1.3.1 · Feinschliff nach Bildschirmfotos
   ===================================================================================== */
/* Bibliothek: Kopfzeile und Zeilen haben exakt dieselben Spalten (vorher verrutschten „Jahr“ und „Titel“) */
.lib-v2.lib-nocol .lib-row { grid-template-columns: minmax(130px, 1fr) 56px minmax(0, 3fr) 88px; }
.lib-v2 .lib-row > .lib-year, .lib-v2 .lib-row.head > :nth-child(2) { text-align: left; justify-self: start; }
.lib-v2 .lib-row.head > :last-child { justify-self: end; }
/* Startseite: Punkt sitzt auf der ersten Zeile eines Termins, auch wenn der Titel umbricht */
.hm .hm-item.ev { align-items: flex-start !important; }
.hm .hm-item.ev .hm-ev-dot { height: 1.45em; margin-top: 0; align-self: flex-start; }
/* Weiterlesen: Prozentwerte bündig unter der Fortschrittsanzeige */
.hm-more-read .hm-mini { width: calc(100% + 12px); margin: 0 -6px; box-sizing: border-box; }
.hm-more-read .hm-mini-s { flex: none; font-variant-numeric: tabular-nums; }
.hm-more-read .hm-mini-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* „Anpassen“ steht frei unter dem Schreibtisch (nicht auf Schatten oder Beinen) */
.cbw-bar:not(.on) { margin-top: -8px; }
.cbw-bar.on { position: sticky; bottom: 20px; margin-top: 0; justify-content: center; }
/* Widget-Auswahl: Suchfeld sichtbar wie die anderen Suchfelder */
.cbw-gal .cbw-gal-q { background: var(--card, #fff) !important; box-shadow: 0 0 0 .5px var(--line2), 0 1px 2px rgba(0, 0, 0, .04) !important; height: 36px; padding: 0 12px 0 34px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23998d80' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-size: 15px !important; background-position: 12px 50% !important; }
.cbw-gal .cbw-gal-q:focus { box-shadow: var(--qe-focus) !important; }
/* Seitenleiste: „+“ exakt auf einer Linie mit Pfeil und Text (gezeichnet statt Schriftzeichen) */
.sb-item > .sb-plus { margin-top: 3px; font-size: 0; }
.sb-item > .sb-plus::before { content: ""; width: 10px; height: 10px; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat; }
/* Projekt-Arbeitsraum: Speicher-Hinweis nicht unter der Mitschrift-Leiste, wenn die Notiz schmal ist */
.mt-has .nv-main { container-type: inline-size; container-name: nvm; }
@container nvm (max-width: 760px) { .cbs-pill:not(.bad) { display: none; } .cbs-pill.bad { bottom: 62px; right: 12px; } }
/* Arbeitsfläche in niedrigen Bereichen: Hinweis kompakter, damit er nicht unter der Werkzeugleiste liegt */
.pw-cv .cv-wrap { container-type: size; container-name: cvw; }
@container cvw (max-height: 400px) { .ws-hint p { display: none; } .ws-hint .btn { margin-top: 8px; } }
@container cvw (max-height: 240px) { .ws-hint { display: none !important; } }
/* Bibliothek: eigene Gruppen */
.lib-ghead { display: flex; align-items: center; gap: 8px; border-radius: 8px; transition: background .12s, box-shadow .12s; }
.lib-ghead > span:first-child { font-weight: 600; }
.lib-ghead.none > span:first-child { font-weight: 500; color: var(--muted); }
.lib-ghead.drop { background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); }
.lib-gmore { margin-left: auto; width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s; }
.lib-ghead:hover .lib-gmore, .lib-gmore:focus-visible { opacity: 1; }
.lib-gmore:hover { background: var(--hover); color: var(--text); }
.lib-gadd { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 4px 6px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; color: var(--accent); cursor: pointer; }
.lib-gadd:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* =====================================================================================
   1.4.0 · Symbol & Farbe für Projekte, Notizen und Arbeiten
   ===================================================================================== */
.lk-ic { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.lk-ic.has-c { color: var(--lk); }
.lk-ic.has-c svg { color: var(--lk); }
:root[data-theme="dark"] .lk-ic.has-c, .dark .lk-ic.has-c { color: color-mix(in srgb, var(--lk) 78%, #fff); }
.ptile.neutral { --t1: color-mix(in srgb, var(--text) 10%, var(--card, #fff)) !important; --t2: color-mix(in srgb, var(--text) 16%, var(--card, #fff)) !important; color: var(--muted); }
.hm-ntile { width: 30px; height: 30px; border-radius: 8px; font-size: 15px; flex: none; }
.pi { display: flex; flex-direction: column; }
.pi-prev { padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--text) 3%, transparent); }
.pi-prev-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pi-prev-t b { font-size: 15px; }
.pi-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 8px; border-radius: 7px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2); font-size: 13px; width: max-content; max-width: 100%; }
.pi-row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-cols { gap: 8px; }
.pi-col { width: 26px; height: 26px; position: relative; padding: 0; transition: transform .12s; }
.pi-col:hover { transform: scale(1.08); }
.pi-col.none { background: var(--card, #fff); box-shadow: inset 0 0 0 1px var(--line2); }
.pi-col.none::after { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1.5px; margin-left: -.75px; background: var(--danger); transform: rotate(45deg); border-radius: 1px; }
.pi-custom { display: inline-block; overflow: hidden; background: conic-gradient(from 0deg, #e56b6f, #eaac8b, #e9d27e, #8fc38e, #6fb1c2, #7d84c2, #b07cc6, #e56b6f); }
.pi-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.pi-l2 { display: flex; align-items: center; gap: 12px; }
.pi-l2 > span { flex: none; }
.pi .pi-q, .pi .pi-q:focus { flex: 1; height: 30px; padding: 0 10px !important; border: 0 !important; border-radius: 8px !important; background: var(--card, #fff) !important; box-shadow: 0 0 0 .5px var(--line2) !important; font: inherit; font-size: 12.5px; color: var(--text); outline: 0 !important; }
.pi .pi-q:focus { box-shadow: var(--qe-focus) !important; }
.pi-cats { display: flex; gap: 6px; margin: 0 0 8px; flex-wrap: wrap; }
.pi-cat { height: 24px; padding: 0 10px; border: 0; border-radius: 12px; background: var(--bg2); font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.pi-cat.on { background: var(--text); color: var(--bg); }
.pi-grid { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); max-height: 216px; overflow-y: auto; padding: 2px; gap: 4px; }
.pi-ic { width: 38px; height: 38px; padding: 0; font-size: 18px; color: var(--text); }
.pi-ic .lk-ic svg { width: 19px; height: 19px; }
.pi-ic.on { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pi-none { grid-column: 1 / -1; padding: 18px; text-align: center; color: var(--faint); font-size: 12.5px; }
.pi-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.pi-foot .spacer { flex: 1; }
/* Eigene Farbe auch in Kachel-Darstellungen (Notizliste, Raster, Seitenleiste mit Kacheln) */
.lk-ic.has-c svg.i { --ti1: var(--lk) !important; --ti2: var(--lk2, var(--lk)) !important; }

/* =====================================================================================
   1.4.0 · Zentrale Bereinigung (Design-Audit)
   ===================================================================================== */
/* Schließen-Kreuze: überall dieselbe runde Fläche, Kreuz exakt mittig, immer oben rechts */
:is(.pop-x, .modal-x, .tr-x, .hl-bar-x, .rd-litbar-x, .resume-x, .tour-close, .st-x, .cbw-gal-close) {
  width: 26px !important; height: 26px !important; min-width: 26px; border-radius: 50% !important;
  background: color-mix(in srgb, var(--text) 6%, transparent) !important; color: var(--muted) !important;
  display: inline-grid !important; place-items: center !important; padding: 0 !important; line-height: 0 !important; font-size: 13px !important;
}
:is(.pop-x, .modal-x, .tr-x, .hl-bar-x, .rd-litbar-x, .resume-x, .tour-close, .st-x, .cbw-gal-close):hover { background: color-mix(in srgb, var(--text) 12%, transparent) !important; color: var(--text) !important; }
:is(.pop-x, .modal-x, .tr-x, .hl-bar-x, .rd-litbar-x, .resume-x, .tour-close, .st-x, .cbw-gal-close) svg.i { width: 12px !important; height: 12px !important; stroke-width: 2.2; }
.modal > .modal-x { position: sticky !important; top: 0 !important; float: none !important; align-self: flex-end; display: grid !important; margin: -6px -6px -20px auto !important; z-index: 4; }
.modal .modal-title { padding-right: 34px; }
/* Schnellsuche hat „esc“ – kein zweites Kreuz */
.qs-modal > .modal-x { display: none !important; }
.modal.td-modal > .modal-x { margin: 12px 12px -38px auto !important; top: 12px !important; }
/* Startseite schmal: „⋯“ (mit „Startseite anpassen“) bleibt immer erreichbar */
@container hmp (max-width: 900px) { .hm .hm-acts { grid-template-columns: repeat(4, minmax(0, 1fr)) 44px !important; } .hm .hm-acts > .hm-more { display: flex !important; align-items: center; justify-content: center; padding: 0 !important; } }
@container hmp (max-width: 620px) { .hm .hm-acts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .hm .hm-acts > .hm-more { grid-column: 1 / -1; min-height: 36px !important; } }
/* Einheitlicher Auswahl-Pfeil (ersetzt das Zeichen „▾“ überall) */
.dd-caret { display: inline-block; flex: none; width: 5px; height: 5px; margin: 0 1px 0 6px; border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; vertical-align: middle; font-style: normal; }
button:hover > .dd-caret, .on > .dd-caret { opacity: .85; }

/* =====================================================================================
   1.4.0 · Liquid Glass – Material für schwebende Ebenen
   Glas nur dort, wo etwas über Inhalt schwebt: Menüs, Popover, Dialoge, schwebende Leisten, Meldungen.
   Aufbau: getönte, leicht durchscheinende Fläche + kräftige Unschärfe mit Sättigung + feine Lichtkante oben
   + haarfeine Kontur + weicher, tiefer Schatten. Fester Untergrund überall dort, wo gelesen oder getippt wird.
   html[data-glass="off"] (Einstellung oder macOS „Transparenz reduzieren“) → deckende Flächen.
   html[data-contrast="more"] (macOS „Kontrast erhöhen“) → deckend und kräftigere Linien.
   ===================================================================================== */
:root {
  --glass-tint: var(--card, #fff);
  --glass-a: 74%;
  --glass-a-strong: 86%;
  --glass-blur: blur(28px) saturate(1.9);
  --glass-light: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .12) 26%, rgba(255, 255, 255, 0) 60%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 .5px rgba(255, 255, 255, .45);
  --glass-line: 0 0 0 .5px rgba(70, 45, 20, .16);
  --glass-shadow: 0 22px 54px -16px rgba(50, 30, 10, .30), 0 6px 16px -8px rgba(50, 30, 10, .18);
  --glass-shadow-sm: 0 10px 28px -12px rgba(50, 30, 10, .26), 0 2px 6px -2px rgba(50, 30, 10, .12);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --glass-tint: #2b2825; --glass-a: 70%; --glass-a-strong: 84%;
  --glass-light: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, 0) 60%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 .5px rgba(255, 255, 255, .07);
  --glass-line: 0 0 0 .5px rgba(0, 0, 0, .55);
  --glass-shadow: 0 24px 60px -16px rgba(0, 0, 0, .65), 0 6px 18px -8px rgba(0, 0, 0, .45);
  --glass-shadow-sm: 0 10px 30px -12px rgba(0, 0, 0, .6), 0 2px 6px -2px rgba(0, 0, 0, .4);
} }
:root[data-theme="dark"] {
  --glass-tint: #2b2825; --glass-a: 70%; --glass-a-strong: 84%;
  --glass-light: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03) 30%, rgba(255, 255, 255, 0) 60%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 .5px rgba(255, 255, 255, .07);
  --glass-line: 0 0 0 .5px rgba(0, 0, 0, .55);
  --glass-shadow: 0 24px 60px -16px rgba(0, 0, 0, .65), 0 6px 18px -8px rgba(0, 0, 0, .45);
  --glass-shadow-sm: 0 10px 30px -12px rgba(0, 0, 0, .6), 0 2px 6px -2px rgba(0, 0, 0, .4);
}
/* Menüs, Popover, kleine Auswahlfenster */
:root[data-glass="on"] :is(.ctx, .popover, .tag-menu, .cal-pop, .tr-pop, .fold-pop, .cmdk, .palette) {
  background: var(--glass-light), color-mix(in srgb, var(--glass-tint) var(--glass-a), transparent) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important; backdrop-filter: var(--glass-blur) !important;
  border: 0 !important; box-shadow: var(--glass-edge), var(--glass-line), var(--glass-shadow-sm) !important;
}
/* Dialoge: etwas dichter, damit Formulare ruhig lesbar bleiben */
:root[data-glass="on"] :is(.modal, .cbw-gal) {
  background: var(--glass-light), color-mix(in srgb, var(--glass-tint) var(--glass-a-strong), transparent) !important;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 0 !important; box-shadow: var(--glass-edge), var(--glass-line), var(--glass-shadow) !important;
}
:root[data-glass="on"] .modal-back, :root[data-glass="on"] .cbw-gal-back { background: rgba(40, 28, 16, .16) !important; -webkit-backdrop-filter: blur(10px) saturate(1.2) !important; backdrop-filter: blur(10px) saturate(1.2) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-glass="on"] :is(.modal-back, .cbw-gal-back) { background: rgba(0, 0, 0, .34) !important; } }
:root[data-theme="dark"][data-glass="on"] :is(.modal-back, .cbw-gal-back) { background: rgba(0, 0, 0, .34) !important; }
/* Schwebende Leisten und Steuerelemente */
:root[data-glass="on"] :is(.sel-toolbar, .hl-bar, .msel-bar, .mt-bar, .cbw-bar.on .cbw-bar-in, .cbw-tools, .cbs-pill, .ws-tools, .cv-tools, .pw-float) {
  background: var(--glass-light), color-mix(in srgb, var(--glass-tint) var(--glass-a), transparent) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important; backdrop-filter: var(--glass-blur) !important;
  border: 0 !important; box-shadow: var(--glass-edge), var(--glass-line), var(--glass-shadow-sm) !important;
}
/* Meldungen unten: dunkles Glas */
:root[data-glass="on"] .toast { background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 50%), rgba(32, 28, 24, .78) !important; -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 0 .5px rgba(0, 0, 0, .3), var(--glass-shadow-sm) !important; }
/* Leisten mit Material: Tab-Leiste und Auswahl in der Seitenleiste (ruhig, mit Lichtkante statt flacher Fläche) */
:root[data-glass="on"] #tabbar { background: linear-gradient(180deg, color-mix(in srgb, var(--bg2) 82%, #fff 18%), var(--bg2)); box-shadow: inset 0 -.5px 0 var(--line); border-bottom-color: transparent; }
:root[data-glass="on"] #sidebar .sb-item.active { background: var(--glass-light), color-mix(in srgb, var(--card, #fff) 86%, transparent) !important; box-shadow: var(--glass-edge), 0 0 0 .5px rgba(70, 45, 20, .10), 0 1px 3px -1px rgba(50, 30, 10, .16) !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-glass="on"] #tabbar { background: linear-gradient(180deg, color-mix(in srgb, var(--bg2) 92%, #fff 8%), var(--bg2)); } :root:not([data-theme="light"])[data-glass="on"] #sidebar .sb-item.active { background: var(--glass-light), rgba(255, 255, 255, .08) !important; } }
:root[data-theme="dark"][data-glass="on"] #tabbar { background: linear-gradient(180deg, color-mix(in srgb, var(--bg2) 92%, #fff 8%), var(--bg2)); }
:root[data-theme="dark"][data-glass="on"] #sidebar .sb-item.active { background: var(--glass-light), rgba(255, 255, 255, .08) !important; }
/* Weiches Erscheinen schwebender Ebenen */
@keyframes glassIn { from { opacity: 0; transform: translateY(-3px) scale(.985); } }
@keyframes glassModalIn { from { opacity: 0; transform: translateY(6px) scale(.985); } }
:root[data-glass="on"] :is(.ctx, .popover, .tag-menu, .cal-pop) { animation: glassIn .14s cubic-bezier(.2, .8, .2, 1); transform-origin: top center; }
:root[data-glass="on"] .modal-back > .modal, :root[data-glass="on"] .cbw-gal { animation: glassModalIn .18s cubic-bezier(.2, .8, .2, 1); }
/* Ohne Glas (Einstellung oder macOS) – deckend */
:root[data-glass="off"] :is(.ctx, .popover, .tag-menu, .cal-pop, .sel-toolbar, .hl-bar, .msel-bar, .mt-bar, .cbw-tools, .cbs-pill, .modal, .cbw-gal, .cbw-bar.on .cbw-bar-in) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: var(--card, var(--bg)) !important; }
:root[data-glass="off"] :is(.modal-back, .cbw-gal-back) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
/* Kontrast erhöhen */
:root[data-contrast="more"] { --line: color-mix(in srgb, var(--text) 30%, transparent); --line2: color-mix(in srgb, var(--text) 45%, transparent); --muted: color-mix(in srgb, var(--text) 78%, transparent); --faint: color-mix(in srgb, var(--text) 62%, transparent); }
:root[data-contrast="more"] :is(.ctx, .popover, .modal, .tag-menu, .cal-pop, .sel-toolbar, .mt-bar) { box-shadow: 0 0 0 1px var(--line2), var(--glass-shadow-sm) !important; }
/* Weniger Bewegung: alle Übergänge praktisch sofort */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
/* Fußleisten in Glas-Dialogen: gleiche Glasfläche statt deckendem Streifen (bleiben beim Scrollen lesbar) */
:root[data-glass="on"] .modal :is(.td-foot, .modal-foot, .wz-foot) { background: color-mix(in srgb, var(--glass-tint) 92%, transparent) !important; -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); box-shadow: inset 0 .5px 0 var(--line); }
.cbw-rec-ic { width: 18px; flex: none; color: var(--muted); }
.cbw-rec-ic svg.i { width: 16px; height: 16px; }
.tab-ctl svg.i { width: 18px; height: 18px; }

/* =====================================================================================
   1.4.1 · Listen als Karten – ein Baustein für Projekte/Seminare, Notizen, Arbeiten und Lern-Sammlungen
   Gleicher Abstand (6 px), gleiche Rundung, gleicher Innenabstand, gleiche Fläche und Kontur wie „Lernen › Sammlungen“.
   ===================================================================================== */
:root { --lc-gap: 6px; --lc-r: 10px; --lc-py: 10px; --lc-px: 12px; }
:is(.pv-list, .nvo-list, .lk-decks) { display: flex; flex-direction: column; gap: var(--lc-gap) !important; }
:is(.pv-list > .pv-row, .nvo-list > .nvo-row, .lk-decks > .lk-deck) {
  margin: 0 !important; border: 0 !important; border-radius: var(--lc-r) !important;
  padding: var(--lc-py) var(--lc-px) !important;
  background: var(--card, var(--bg)) !important; box-shadow: var(--card-shadow) !important;
  transition: box-shadow .14s ease, background-color .14s ease, transform .12s ease;
}
:is(.pv-list > .pv-row, .nvo-list > .nvo-row, .lk-decks > .lk-deck):hover { background: color-mix(in srgb, var(--card, #fff) 96%, var(--text) 4%) !important; box-shadow: var(--card-shadow-hover, var(--card-shadow)) !important; }
/* Überschriften zwischen den Karten (z. B. „Letzte 7 Tage“, „Seminare & Vorlesungen“): Luft nach oben, ohne Trennlinie */
:is(.pv-list, .nvo-list) > :not(.pv-row):not(.nvo-row) { margin-top: 14px; border-bottom: 0 !important; padding-bottom: 2px; }
:is(.pv-list, .nvo-list) > :not(.pv-row):not(.nvo-row):first-child { margin-top: 0; }
/* Lernplan: Auswahlfelder breit genug, damit der Pfeil nicht auf dem Text liegt */
.lk-plan select.select { padding-right: 26px !important; min-width: 64px; text-align: left; }
/* Gruppenüberschrift direkt über einer Karten-Liste: ohne Linie, mit kleinem Abstand (wie bei „Lernen“) */
:has(+ .nvo-list, + .pv-list) { border-bottom-color: transparent !important; box-shadow: none !important; }
:is(.nvo-list, .pv-list) { margin-top: 4px; margin-bottom: 8px; }

/* =====================================================================================
   1.5.0 · Lange Notizen übersichtlich: Abschnitte einklappen, Toggles, Hervorhebungen einklappen, Gliederung, Fokus
   ===================================================================================== */
/* Abschnitt einklappen: kleiner Pfeil hinter der Überschrift (erscheint beim Darüberfahren); eingeklappt zeigt er,
   wie viel darunter liegt. Ausgeblendete Blöcke verschwinden ganz. */
.ProseMirror .fold-hide { display: none !important; }
.ProseMirror .fold-btn { display: inline-flex; align-items: center; gap: 5px; height: 1.25em; min-width: 1.25em; margin-left: .45em; padding: 0 .35em; vertical-align: .08em; border: 0; border-radius: 6px; background: none; color: var(--faint); font: 500 12px/1 var(--font); letter-spacing: 0; cursor: pointer; opacity: 0; transition: opacity .12s, background-color .12s, color .12s; user-select: none; }
.ProseMirror .fold-btn::before { content: ""; width: 5.5px; height: 5.5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-1.5px) rotate(45deg); transition: transform .15s; }
.ProseMirror .fold-btn.folded::before { transform: rotate(-45deg); }
.ProseMirror :is(h1, h2, h3, h4):hover > .fold-btn, .ProseMirror .fold-btn:focus-visible, .ProseMirror .fold-btn.folded { opacity: 1; }
.ProseMirror .fold-btn:hover { background: var(--hover); color: var(--text); }
.ProseMirror .fold-btn.folded { background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--muted); }
.ProseMirror .is-folded { margin-bottom: .35em; }
/* Fokus: alles außer dem aktuellen Abschnitt tritt zurück */
.ProseMirror .fx-dim { opacity: .28; transition: opacity .2s; }
.ProseMirror .fx-dim:hover { opacity: .55; }
/* Toggle (Notion): Pfeil links, erste Zeile ist der Titel, Inhalt eingerückt mit feiner Linie */
.ProseMirror .toggle { position: relative; gap: 4px; margin: 4px 0; }
.ProseMirror .tg-btn { width: 22px; height: 1.6em; display: grid; place-items: center; font-size: 0 !important; color: var(--muted); border-radius: 6px; transition: transform .15s, background-color .12s; }
.ProseMirror .tg-btn::before { content: ""; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); }
.ProseMirror .toggle.open > .tg-btn { transform: rotate(90deg); }
.ProseMirror .toggle.open > .tg-body > :not(:first-child) { padding-left: 0; }
.ProseMirror .toggle.open > .tg-body { box-shadow: inset 0 0 0 0 transparent; }
.ProseMirror .toggle.open > .tg-body > :first-child { margin-bottom: 2px; }
.ProseMirror .toggle:not(.open) > .tg-body > :first-child { color: var(--text); }
.ProseMirror .tg-body > p:first-child:empty::before, .ProseMirror .tg-body > p:first-child > br.ProseMirror-trailingBreak:only-child::before { content: "Toggle"; color: var(--faint); font-weight: 400; pointer-events: none; }
/* Gliederung (Strich-Leiste links, beim Darüberfahren): Knöpfe zum Ein-/Ausklappen und für den Fokus */
.toc-panel .toc-acts { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 6px 8px; margin: 0 2px 6px; border-bottom: .5px solid var(--line); }
.toc-panel .toc-act { height: 24px; padding: 0 9px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--text) 6%, transparent); font: inherit; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.toc-panel .toc-act:hover { background: color-mix(in srgb, var(--text) 11%, transparent); color: var(--text); }
.toc-panel .toc-act.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.toc-panel .tp-row.fold-in { opacity: .55; }
.toc-panel .tp-row.fold-at::after { content: "›"; margin-left: auto; color: var(--faint); }
/* Mini-Gliederung rechts (Notizen): Knöpfe nur im aufgeklappten Zustand, eingeklappte Abschnitte markiert */
.toc-mini > .toc-acts { display: none; justify-content: flex-end; gap: 4px; flex-wrap: wrap; padding: 0 0 8px; margin-bottom: 2px; border-bottom: .5px solid var(--line); }
.toc-mini:hover > .toc-acts, .toc-mini:focus-within > .toc-acts { display: flex; }
.toc-mini .toc-act { height: 22px; padding: 0 8px; border: 0; border-radius: 11px; background: color-mix(in srgb, var(--text) 6%, transparent); font: inherit; font-size: 11px; color: var(--muted); cursor: pointer; }
.toc-mini .toc-act:hover { background: color-mix(in srgb, var(--text) 11%, transparent); color: var(--text); }
.toc-mini .toc-act.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.toc-mini .toc-i.fold-in { opacity: .45; }
.toc-mini .toc-i.fold-at .toc-t::after { content: " ›"; color: var(--faint); }
.toc-mini .toc-i.fold-at .toc-bar { background: color-mix(in srgb, var(--accent) 45%, var(--line2)); }
.toc-mini:focus-within { background: var(--card, var(--bg)); box-shadow: var(--shadow, 0 8px 24px rgba(0,0,0,.12)); }
.toc-mini:focus-within .toc-t { display: block; }
:root[data-glass="on"] .toc-mini:is(:hover, :focus-within) { background: var(--glass-light), color-mix(in srgb, var(--glass-tint) var(--glass-a-strong), transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge), var(--glass-line), var(--glass-shadow-sm); }
.side-sec > .toc-acts { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 8px; }
.side-sec .toc-act { height: 22px; padding: 0 8px; border: 0; border-radius: 11px; background: color-mix(in srgb, var(--text) 6%, transparent); font: inherit; font-size: 11px; color: var(--muted); cursor: pointer; }
.side-sec .toc-act:hover { background: color-mix(in srgb, var(--text) 11%, transparent); color: var(--text); }
.side-sec .toc-act.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.outline .ol-item.fold-in { opacity: .45; }
.outline .ol-item.fold-at::after { content: " ›"; color: var(--faint); }

/* =====================================================================================
   1.5.1 · Toggle wie in Notion
   Raster: Pfeil (24 px) | Titelzeile; Inhalt eingerückt bündig unter dem Titeltext; Hinweis bei leerem Toggle.
   ===================================================================================== */
.ProseMirror .toggle { display: grid !important; grid-template-columns: 24px minmax(0, 1fr); column-gap: 2px; align-items: start; margin: 1px 0 1px -26px; position: relative; }
.ProseMirror .toggle > .tg-btn { grid-column: 1; grid-row: 1; align-self: start; width: 24px; height: 24px; margin: calc((1.65em - 24px) / 2) 0 0; padding: 0; border: 0; border-radius: 6px; background: none; display: grid; place-items: center; font-size: 0 !important; color: var(--muted); cursor: pointer; transform: none; transition: background-color .12s, color .12s; }
.ProseMirror .toggle > .tg-btn::before { content: ""; width: 0; height: 0; border: 0; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; transform: none; transition: transform .16s cubic-bezier(.2, .8, .2, 1); margin-left: 2px; }
.ProseMirror .toggle.open > .tg-btn { transform: none; }
.ProseMirror .toggle.open > .tg-btn::before { transform: rotate(90deg); }
.ProseMirror .toggle > .tg-btn:hover { background: var(--hover); color: var(--text); }
.ProseMirror .toggle > .tg-body { grid-column: 2; grid-row: 1; min-width: 0; padding: 0; box-shadow: none; }
.ProseMirror .toggle > .tg-body > :first-child { margin-top: 0 !important; margin-bottom: 0; font-weight: inherit; }
.ProseMirror .toggle > .tg-body > :first-child:is(h1, h2, h3, h4) { font-weight: revert; }
.ProseMirror .toggle > .tg-body > * + * { margin-top: .35em; }
.ProseMirror .toggle:not(.open) > .tg-body > :not(:first-child) { display: none !important; }
.ProseMirror .toggle > .tg-empty { grid-column: 2; grid-row: 2; display: none; justify-self: start; margin: 2px 0 4px; padding: 2px 6px; margin-left: -6px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13.5px; color: var(--faint); cursor: pointer; text-align: left; }
.ProseMirror .toggle > .tg-empty:hover { background: var(--hover); color: var(--muted); }
.ProseMirror .toggle.open.empty > .tg-empty { display: block; }
/* Toggle-Überschriften: Pfeil mittig zur größeren Zeile */
.ProseMirror .toggle:has(> .tg-body > h1:first-child) > .tg-btn { margin-top: calc((1.25em * 1.9 - 24px) / 2); }
.ProseMirror .toggle:has(> .tg-body > h2:first-child) > .tg-btn { margin-top: calc((1.15em * 1.55 - 24px) / 2 + .55em); }
.ProseMirror .toggle:has(> .tg-body > h3:first-child) > .tg-btn { margin-top: calc(.6em); }
.ProseMirror .toggle > .tg-body > :is(h1, h2, h3, h4):first-child { margin-top: 0 !important; }
/* im schmalen Fenster nicht über den Rand ragen */
@container nvm (max-width: 560px) { .ProseMirror .toggle { margin-left: 0; } }

/* 1.5.1 · Hervorhebungen: Name oben links (klein, in der Farbe der Hervorhebung), Symbol oben rechts, Verknüpfung unten.
   Keine Einklapp-Funktion (Inhalt bleibt immer sichtbar). */
.callout .callout-label { margin: 0 0 4px; font: 600 11.5px/1.3 var(--font); letter-spacing: .02em; color: color-mix(in srgb, var(--cl) 78%, var(--text)); user-select: none; }
.callout .callout-label .callout-title { cursor: pointer; border-radius: 4px; }
.callout .callout-label .callout-title:hover { color: var(--text); }
.ProseMirror .callout, .callout { padding-top: 12px !important; padding-bottom: 12px !important; }
.callout .callout-foot.empty { display: none; }
.callout .callout-foot { margin-top: 6px; }
.callout .callout-body > :last-child { margin-bottom: 0; }
.callout .callout-body > :first-child { margin-top: 0; }
/* 1.5.1 · Dialog „In eigene Notiz auslagern“ */
.sp-back { align-items: flex-start; padding-top: 12vh; }
.sp-dlg { position: relative; width: min(480px, calc(100vw - 40px)); max-height: calc(100vh - 14vh - 24px); overflow-y: auto; padding: 18px 20px 16px; border-radius: 16px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), var(--shadow); display: flex; flex-direction: column; gap: 10px; }
:root[data-glass="on"] .sp-dlg { background: var(--glass-light), color-mix(in srgb, var(--glass-tint) var(--glass-a-strong), transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge), var(--glass-line), var(--glass-shadow); animation: glassModalIn .18s cubic-bezier(.2, .8, .2, 1); }
.sp-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sp-h b { font-family: var(--serif, var(--font)); font-size: 18px; font-weight: 500; }
.sp-what { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.sp-what-n { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.sp-what-t { font-size: 12.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-l { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 500; color: var(--muted); }
.sp-l:has(> .sp-ai) { flex-direction: row; justify-content: space-between; align-items: baseline; margin-bottom: -5px; }
.sp-ai { font-weight: 400; color: var(--ai, var(--accent)); font-size: 11.5px; }
.sp-row { display: flex; gap: 8px; }
.sp-dlg .sp-title { flex: 1; height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--card, #fff); box-shadow: 0 0 0 .5px var(--line2), inset 0 1px 2px rgba(0, 0, 0, .03); font: inherit; font-size: 14.5px; color: var(--text); outline: 0; }
.sp-dlg .sp-title:focus { box-shadow: var(--qe-focus); }
.sp-dlg.busy .sp-title { background-image: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 8%, transparent), transparent); background-size: 200% 100%; animation: spShimmer 1.2s linear infinite; }
@keyframes spShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sp-again { flex: none; height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: color-mix(in srgb, var(--text) 6%, transparent); font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.sp-again:hover { background: color-mix(in srgb, var(--text) 11%, transparent); color: var(--text); }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-sel { width: 100%; }
.sp-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.sp-chk input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.sp-f { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: .5px solid var(--line); }
.sp-hint { font-size: 11.5px; color: var(--faint); }
.sp-f .spacer { flex: 1; }
@media (prefers-reduced-motion: reduce) { .sp-dlg.busy .sp-title { animation: none; } }
/* 1.5.1 · Toggle-Pfeil: Höhe wird im Editor an der ersten Zeile gemessen (siehe Toggle-Ansicht) */
.ProseMirror .toggle > .tg-btn { margin-top: var(--tg-top, 0px) !important; }
/* 1.5.1 · Leerer Toggle-Titel zeigt einen Platzhalter wie in Notion */
.ProseMirror .toggle > .tg-body > :first-child:has(> br.ProseMirror-trailingBreak:only-child)::before,
.ProseMirror .toggle > .tg-body > :first-child:empty::before { content: "Toggle" !important; color: var(--faint); pointer-events: none; float: left; height: 0; }
.ProseMirror .toggle > .tg-body > :first-child.is-empty::before { content: "Toggle" !important; }
.sp-dlg .sp-l, .sp-dlg .sp-chk { border: 0 !important; padding: 0 !important; background: none !important; }
/* 1.5.1 · Toggle-Pfeil wie in Notion: gefülltes Dreieck in Textfarbe */
.ProseMirror .toggle > .tg-btn { color: color-mix(in srgb, var(--text) 82%, transparent); }
.ProseMirror .toggle > .tg-btn::before { border-left-width: 8px; border-top-width: 5px; border-bottom-width: 5px; }
.ProseMirror .toggle:has(> .tg-body > :is(h1, h2, h3):first-child) > .tg-btn::before { border-left-width: 9px; border-top-width: 5.5px; border-bottom-width: 5.5px; }
/* 1.6 · Sitzung im Notizkopf, Auswahl und Kennzeichen in Listen */
.sess-btn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: var(--active); color: var(--text); border-radius: 8px; padding: 3px 9px; font: inherit; font-size: 12.5px; margin-left: 6px; white-space: nowrap; max-width: 220px; flex: 0 1 auto; min-width: 0; cursor: pointer; }
.sess-btn .sess-t { overflow: hidden; text-overflow: ellipsis; }
.sess-btn .sess-ic { font-size: 11px; }
.sess-btn.empty { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 .5px var(--line2); }
.sess-btn:hover { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--text); }
.sess-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ss-pop { position: fixed; z-index: 9000; width: 320px; max-height: min(440px, 70vh); display: flex; flex-direction: column; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), var(--shadow); overflow: hidden; }
:root[data-glass="on"] .ss-pop { background: var(--glass-light), color-mix(in srgb, var(--glass-tint) var(--glass-a-strong), transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge), var(--glass-line), var(--glass-shadow); }
.ss-pop .ss-q { margin: 8px 8px 4px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--text) 5%, transparent); font: inherit; font-size: 13px; color: var(--text); outline: 0; }
.ss-body { overflow-y: auto; padding: 2px 6px 6px; flex: 1; }
.ss-h { padding: 8px 8px 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: none; }
.ss-i { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
.ss-i:hover, .ss-i:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: 0; }
.ss-i.on { font-weight: 600; }
.ss-i.off .ss-t { color: var(--faint); text-decoration: line-through; }
.ss-ck { color: var(--accent); font-size: 12px; }
.ss-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-d { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.ss-i.today .ss-d { color: var(--accent); font-weight: 600; }
.ss-empty { padding: 16px; text-align: center; color: var(--faint); font-size: 12.5px; }
.ss-f { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: .5px solid var(--line); }
.ss-f .spacer { flex: 1; }
.ss-none, .ss-open { border: 0; background: none; padding: 3px 6px; border-radius: 6px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.ss-none:hover, .ss-open:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.sess-chip { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sess-btn[hidden] { display: none !important; }
/* 1.6 · Hervorhebungs-Menü: ganze Fläche klickbar, klare Zustände, scrollt bei kleinen Fenstern */
.popover:has(> .callout-menu) { max-height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain; }
.callout-icb, .callout-cb { position: relative; touch-action: manipulation; }
.callout-icb > *, .callout-cb > * { pointer-events: none; }
.callout-icb:active { transform: scale(.92); }
.callout-icb.on { background: color-mix(in srgb, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.callout-icb.on svg, .callout-icb.on svg.i { color: var(--accent) !important; }
.callout-icb:focus-visible, .callout-cb:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
body:has(.mt-bar) .toast { bottom: 78px; }
/* 1.6 · Blockstruktur beim Ziehen: Ziel-Behälter dezent markiert, gezogene Blöcke blass */
.ProseMirror .bh-into { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 8px; background-color: color-mix(in srgb, var(--accent) 4%, transparent); transition: box-shadow .12s, background-color .12s; }
.ProseMirror .toggle.bh-into { outline-offset: 2px; }
/* Toggle-Inhalt: feine Führungslinie links zeigt, was dazugehört (nur sichtbar, wenn man darüber ist oder darin schreibt) */
.ProseMirror .toggle.open > .tg-body { position: relative; }
.ProseMirror .toggle.open > .tg-body::before { content: ""; position: absolute; left: -12px; top: calc(var(--tg-top, 0px) + 24px); bottom: 4px; width: 1px; background: var(--line2); opacity: 0; transition: opacity .15s; pointer-events: none; }
.ProseMirror .toggle.open:hover > .tg-body::before, .ProseMirror .toggle.open:focus-within > .tg-body::before, .ProseMirror .toggle.open.bh-into > .tg-body::before { opacity: 1; }
body.bh-dragging .ProseMirror .toggle.open > .tg-body::before { opacity: .7; }
body.bh-dragging .bubble { display: none !important; }
/* 1.6 · Rückgängig/Wiederholen im Notizkopf */
.nv-hist { display: inline-flex; gap: 0; margin-right: 2px; }
.nv-hist-b:disabled { opacity: .3; cursor: default; background: none !important; }
@media (max-width: 760px) { .nv-hist { display: none; } }
/* 1.6 · Hinweise (Toasts) verdecken keine Knöpfe: nur ihre eigenen Knöpfe sind klickbar */
.toast.show { pointer-events: none; }
.toast.show button, .toast.show a { pointer-events: auto; }
/* 1.6.1 · Ziehen mit Vorschau: Lücke + Platzhalter an der Ablagestelle, Kopie des Blocks am Zeiger */
.ProseMirror .bh-gap-after { margin-bottom: calc(var(--bh-gap, 48px) + .4em) !important; }
.ProseMirror .bh-gap-before { margin-top: calc(var(--bh-gap, 48px) + .4em) !important; }
.bh-slot { position: fixed; z-index: 9998; display: none; pointer-events: none; border-radius: 10px; border: 1.5px dashed color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); box-sizing: border-box; animation: bhSlotIn .14s ease-out; }
.bh-slot-t { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 12px/1.2 var(--font, -apple-system, system-ui); color: var(--accent); }
@keyframes bhSlotIn { from { opacity: 0; transform: scaleY(.85); } to { opacity: 1; transform: none; } }
.bh-ghost.bh-ghost-dom { position: fixed; z-index: 10000; pointer-events: none; max-height: 190px; overflow: hidden; padding: 8px 12px; border-radius: 12px; background: var(--card, var(--bg)); color: var(--text); box-shadow: 0 0 0 .5px var(--line2), 0 14px 34px rgba(0, 0, 0, .22); opacity: .94; transform: rotate(-.6deg); font-size: 15px; line-height: 1.55; white-space: normal; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.bh-ghost.bh-ghost-dom > * { margin-top: 0 !important; margin-bottom: 6px !important; }
.bh-ghost.bh-ghost-dom .bh-gap-after, .bh-ghost.bh-ghost-dom .bh-gap-before { margin: 0 !important; }
.bh-ghost-n { position: absolute; top: 6px; right: 8px; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; }
.bh-ghost.bh-ghost-dom.to-canvas { opacity: .7; }
body.bh-dragging .bh-src { opacity: .28 !important; }
@media (prefers-reduced-motion: reduce) { .bh-slot { animation: none; } }
.bh-slot.side { background: color-mix(in srgb, var(--accent) 14%, transparent); border-style: solid; }
.bh-slot.side .bh-slot-t { top: 10px; transform: none; }
.bh-slot.li { border-radius: 8px; }
.bh-slot.li::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.bh-slot.li .bh-slot-t { left: 24px; }
/* Daneben ablegen: Ziel schrumpft schon beim Ziehen auf seine spätere Spaltenbreite */
.ProseMirror .bh-side-r { width: calc(50% - 8px) !important; box-sizing: border-box; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 6px; }
.ProseMirror .bh-side-l { width: calc(50% - 8px) !important; margin-left: calc(50% + 8px) !important; box-sizing: border-box; box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 6px; }
/* An den Text anhängen: Ziel leicht hinterlegt, Platzhalter direkt hinter dem Textende */
.ProseMirror .bh-append { background: color-mix(in srgb, var(--accent) 7%, transparent); border-radius: 6px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 7%, transparent); }
.bh-slot.app { border-style: dashed; background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 7px; }
.bh-slot.app .bh-slot-t { top: 50%; transform: translateY(-50%); }
/* 1.6.2 · Überschriften-Nummern in der Farbe des Überschriftentexts, etwas transparenter */
.ProseMirror .hnum, .ProseMirror .hnum-custom { color: color-mix(in srgb, var(--hn-c, currentColor) 52%, transparent); font-weight: inherit; }
.ProseMirror .hnum:hover { color: color-mix(in srgb, var(--hn-c, currentColor) 85%, transparent); background: color-mix(in srgb, var(--hn-c, currentColor) 8%, transparent); }
.ProseMirror .hnum-off { color: color-mix(in srgb, var(--hn-c, currentColor) 30%, transparent); }
/* 1.6.2 · Quellenangaben folgen der Textfarbe drumherum (auch in farbigem Text und Hervorhebungen), zurückhaltender */
.ProseMirror .cite { color: color-mix(in srgb, currentColor 58%, transparent); background: color-mix(in srgb, currentColor 7%, transparent); }
.ProseMirror .cite:hover { color: color-mix(in srgb, currentColor 85%, transparent); background: color-mix(in srgb, currentColor 13%, transparent); }
.ProseMirror .cite.flash { background: color-mix(in srgb, currentColor 22%, transparent); }
.xb-src { color: color-mix(in srgb, currentColor 55%, transparent); }
.xb-src:hover { color: color-mix(in srgb, currentColor 85%, transparent); }
/* 1.6.2 · Mehrere Blöcke gewählt: als Blöcke hinterlegt (statt Textmarkierung), Zähler am Griff, Auswahlrahmen */
.ProseMirror .bh-sel { background-color: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 6px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 10%, transparent); }
.ProseMirror .bh-sel::selection, .ProseMirror .bh-sel ::selection { background: transparent; }
.bh-grip[data-n] { position: relative; color: var(--accent); }
.bh-grip[data-n]::after { content: attr(data-n); position: absolute; top: -6px; right: -7px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--accent); color: #fff; font: 600 10px/15px var(--font, system-ui); text-align: center; box-sizing: border-box; }
.bh-band { position: fixed; z-index: 9990; pointer-events: none; border-radius: 6px; background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
body.bh-banding, body.bh-banding * { user-select: none !important; cursor: default; }
/* 1.7 · Schreiben mit KI */
.ProseMirror .cb-ghost { color: color-mix(in srgb, currentColor 42%, transparent); white-space: pre-wrap; cursor: pointer; user-select: none; }
.ProseMirror .cb-ghost:hover { color: color-mix(in srgb, currentColor 62%, transparent); }
.ProseMirror .cb-ghost-cite { margin: 0 1px; padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, currentColor 7%, transparent); white-space: nowrap; }
.ProseMirror .cb-ghost-key { margin-left: 8px; padding: 1px 6px; border-radius: 5px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted); background: color-mix(in srgb, var(--text) 6%, transparent); vertical-align: 1px; white-space: nowrap; }
.ProseMirror .cb-ghost.busy { cursor: default; }
.ProseMirror .cb-ghost-busy { color: var(--ai, var(--accent)); font-size: .88em; background: linear-gradient(90deg, currentColor 30%, color-mix(in srgb, currentColor 30%, transparent) 50%, currentColor 70%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: cbwShimmer 1.4s linear infinite; }
@keyframes cbwShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.bubble .bb-ai { color: var(--ai, var(--accent)); font-size: 15px; }
.cbw-menu .ctx-kbd { margin-left: auto; color: var(--faint); font-size: 11px; }
.cbw-pop { position: fixed; z-index: 9500; border-radius: 14px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), var(--shadow); padding: 12px 14px; animation: cbwIn .14s ease-out; }
:root[data-glass="on"] .cbw-pop, :root[data-glass="on"] .cbw-rv { background: var(--glass-light), color-mix(in srgb, var(--glass-tint) var(--glass-a-strong), transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-edge), var(--glass-line), var(--glass-shadow); }
@keyframes cbwIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cbw-res { display: flex; flex-direction: column; gap: 10px; }
.cbw-res-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cbw-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ai, var(--accent)); white-space: nowrap; }
.cbw-badge svg.i { width: 14px; height: 14px; }
.cbw-claim { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cbw-busy { font-size: 12px; color: var(--muted); }
.cbw-busy-row { padding: 4px 2px; }
.cbw-body { max-height: 46vh; overflow-y: auto; font-size: 14px; line-height: 1.6; color: var(--text); padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--text) 3.5%, transparent); }
.cbw-prev + .cbw-prev { margin-top: .7em; }
.cbw-cite { font-size: .95em; }
.cbw-act { display: flex; align-items: center; gap: 6px; }
.cbw-act .spacer { flex: 1; }
.cbw-ask { display: flex; align-items: center; gap: 8px; }
.cbw-ask-ic { color: var(--ai, var(--accent)); display: grid; } .cbw-ask-ic svg.i { width: 16px; height: 16px; }
.cbw-in { flex: 1; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: color-mix(in srgb, var(--text) 5%, transparent); font: inherit; font-size: 13.5px; color: var(--text); outline: 0; }
.cbw-in:focus { box-shadow: var(--qe-focus, 0 0 0 2px var(--accent)); }
.cbw-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; }
.cbw-item { display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 9px 10px; border: 0; border-radius: 9px; background: none; font: inherit; color: var(--text); cursor: pointer; }
.cbw-item:hover, .cbw-item:focus-visible { background: color-mix(in srgb, var(--accent) 9%, transparent); outline: 0; }
.cbw-item-q { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cbw-item-m { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.cbw-fit { padding: 1px 7px; border-radius: 99px; font-weight: 600; font-size: 11px; }
.cbw-fit.ok { background: color-mix(in srgb, #2e9e5a 15%, transparent); color: #2e9e5a; }
.cbw-fit.mid { background: color-mix(in srgb, #d4a01c 18%, transparent); color: #a67c10; }
.cbw-why { color: var(--muted); font-size: 12px; }
.cbw-empty, .cbw-note { font-size: 12.5px; color: var(--muted); padding: 6px 2px; line-height: 1.5; }
/* Belege prüfen */
.ProseMirror .cb-rv { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-thickness: 1px; text-underline-offset: 4px; cursor: help; }
.ProseMirror .cb-rv-schwach { text-decoration-color: color-mix(in srgb, #d4a01c 80%, transparent); }
.ProseMirror .cb-rv-ungedeckt, .ProseMirror .cb-rv-ueberzogen { text-decoration-color: color-mix(in srgb, #e07a1f 85%, transparent); }
.ProseMirror .cb-rv-widerspruch { text-decoration-color: color-mix(in srgb, #d1574d 90%, transparent); }
.cbw-rv-back { align-items: flex-start; padding-top: 10vh; }
.cbw-rv { width: min(620px, calc(100vw - 40px)); max-height: 78vh; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px 14px; border-radius: 16px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), var(--shadow); }
.cbw-rv-h { display: flex; align-items: center; justify-content: space-between; }
.cbw-rv-h b { font-family: var(--serif, var(--font)); font-size: 18px; font-weight: 500; }
.cbw-rv-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.cbw-rv-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.cbw-rv-i { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; text-align: left; padding: 9px 10px; border: 0; border-radius: 9px; background: none; font: inherit; color: var(--text); cursor: pointer; }
.cbw-rv-i:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.cbw-rv-t { font-size: 13px; line-height: 1.45; }
.cbw-rv-i .cbw-why { grid-column: 2; }
.cbw-rv-f { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: .5px solid var(--line); }
.cbw-rv-f .spacer { flex: 1; }
.cbw-lv { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 600; white-space: nowrap; align-self: start; }
.lv-ok { background: color-mix(in srgb, #2e9e5a 14%, transparent); color: #2e9e5a; }
.lv-schwach { background: color-mix(in srgb, #d4a01c 18%, transparent); color: #a67c10; }
.lv-ungedeckt, .lv-ueberzogen { background: color-mix(in srgb, #e07a1f 16%, transparent); color: #c0661a; }
.lv-widerspruch { background: color-mix(in srgb, #d1574d 16%, transparent); color: #c4473d; }
.cbw-tip { position: fixed; z-index: 9600; max-width: 360px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 11px; background: var(--card, var(--bg)); box-shadow: 0 0 0 .5px var(--line2), var(--shadow); font-size: 12.5px; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .ProseMirror .cb-ghost-busy, .cbw-pop { animation: none; } }
/* 1.7.2 · Kalender: Monatsansicht schrumpft nicht mehr unter Lesbarkeit – passt sie nicht ins Fenster, lässt sich nach unten scrollen */
.calv .cal-main:not(.wk) { min-height: auto; }
.calv .cal-main:not(.wk) .cal-days { grid-auto-rows: minmax(92px, 1fr); flex: 1 0 auto; }
.calv .cal-body { overflow-y: auto; }
.calv .cal-body > .cal-side { align-self: start; }
/* Kopfzeile: Monatsname wird nicht abgeschnitten, Knöpfe brechen sauber um */
.calv .cal-head { flex-wrap: wrap; row-gap: 8px; }
.calv .cal-head h1.cal-h1 { flex: 1 0 auto !important; min-width: max-content; }

/* =====================================================================================
   1.8.2 · Dialoge immer vollständig erreichbar
   Vorher: fester Start bei 12 % Höhe + höchstens 76 % Höhe → bei kleinen Fenstern lagen „Weiter/Abbrechen“ außerhalb.
   Jetzt: Höhe = verfügbarer Platz, Knopfleiste bleibt unten stehen, Inhalt dazwischen scrollt. (Lage/Ziehen: fenster.js)
   ===================================================================================== */
:root { --dlg-top: clamp(16px, 9vh, 88px); --dlg-pad: var(--s5, 24px); }
.modal-back, .modal-back.sp-back, .modal-back.cbw-rv-back { padding: var(--dlg-top) 16px 16px !important; overflow: hidden; }
.modal-back > .modal { max-height: calc(100vh - var(--dlg-top) - 16px) !important; max-width: calc(100vw - 32px) !important; overscroll-behavior: contain; }
.modal-back > .modal:not(.td-modal):not(.qs-modal):not(.pv-modal) { padding: var(--dlg-pad) !important; }
.modal-back > .modal:not(.td-modal):not(.qs-modal):not(.pv-modal) :is(.wz-foot, .modal-foot) {
  position: sticky; bottom: calc(-1 * var(--dlg-pad)); z-index: 2;
  margin: var(--s4, 16px) calc(-1 * var(--dlg-pad)) calc(-1 * var(--dlg-pad));
  padding: var(--s3, 12px) var(--dlg-pad) var(--dlg-pad);
  background: var(--card, var(--bg)); border-top: 0; box-shadow: 0 -.5px 0 var(--line);
}
.modal-back > .modal :is(.modal-title, .wz-title, .modal-head) { cursor: grab; -webkit-user-select: none; user-select: none; }
.modal.cb-dragging { animation: none !important; transition: none !important; }
.modal.cb-dragging :is(.modal-title, .wz-title, .modal-head) { cursor: grabbing; }

/* =====================================================================================
   1.8.2 · Ein Design-System für die ganze App
   Vorher: gleichartige Boxen mit 6–14 px Rundung und 8–20 px Innenabstand, Konturen als 0,5–1 px-Linien,
   Listenabstände 5–6 px. Jetzt gelten überall dieselben Stufen. Werte NUR hier ändern.
   ===================================================================================== */
/* Die älteren Schichten überbieten sich mit :root:root:root und !important. Damit diese Werte sicher gelten,
   stehen Tokens unter html:root×4 und Bausteine verschachtelt unter html:root×3 – höher als jede ältere Regel. */
html:root:root:root:root {
  /* Abstände – 4er-Raster */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  /* ältere Namen auf dieselben Stufen legen */
  --s1: var(--sp-1); --s2: var(--sp-2); --s3: var(--sp-3); --s4: var(--sp-4); --s5: var(--sp-6); --s6: var(--sp-8);
  --lc-gap: var(--sp-2); --lc-r: var(--rad-md); --lc-py: var(--sp-3); --lc-px: var(--sp-4);
  /* Rundungen: Bedienelement · Zeile/Kachel · Karte · Dialog */
  --rad-sm: 8px; --rad-md: 12px; --rad-lg: 16px; --rad-xl: 20px;
  --r-sm: var(--rad-sm); --r: var(--rad-md); --r-lg: var(--rad-lg);
  /* Tiefe statt Linien: weiche Schatten + feines Licht an der Oberkante (Liquid-Glass-Anmutung, ohne Unschärfe → schnell) */
  --elev-1: 0 0 0 .5px rgba(60, 40, 20, .06), 0 1px 2px rgba(60, 40, 20, .05), 0 3px 10px rgba(60, 40, 20, .04), inset 0 1px 0 rgba(255, 255, 255, .55);
  --elev-2: 0 0 0 .5px rgba(60, 40, 20, .07), 0 2px 4px rgba(60, 40, 20, .06), 0 10px 28px rgba(60, 40, 20, .09), inset 0 1px 0 rgba(255, 255, 255, .6);
  --card-shadow: var(--elev-1); --card-shadow-hover: var(--elev-2);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
html:root:root:root:root { --elev-dark-1: 0 0 0 .5px rgba(255, 255, 255, .08), 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .05); }
html:root:root:root:root[data-theme="dark"] { --elev-1: var(--elev-dark-1); --elev-2: 0 0 0 .5px rgba(255, 255, 255, .12), 0 12px 32px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07); }
@media (prefers-color-scheme: dark) { html:root:root:root:root:not([data-theme="light"]) { --elev-1: var(--elev-dark-1); --elev-2: 0 0 0 .5px rgba(255, 255, 255, .12), 0 12px 32px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07); } }
html:root:root:root:root[data-contrast="more"] { --elev-1: 0 0 0 1px var(--line2), 0 1px 2px rgba(0, 0, 0, .1); --elev-2: 0 0 0 1px var(--line2), 0 6px 18px rgba(0, 0, 0, .15); }

html:root:root:root {
  /* --- Karten (große Flächen) */
  :is(.lk-card, .cal-side, .set-card, .pv-card, .wk-card, .an-card) {
    border: 0 !important; border-radius: var(--rad-lg) !important; box-shadow: var(--elev-1) !important;
    background: var(--card, var(--bg)) !important;
  }
  :is(.lk-card, .set-card, .pv-card, .wk-card, .an-card) { padding: var(--sp-5) var(--sp-6) !important; }
  .cal-side { padding: var(--sp-4) !important; gap: var(--sp-2) !important; }

  /* --- Zeilen und Kacheln (Listeneinträge, Kennzahlen, Eingabezeilen) */
  :is(.lk-kpi, .lk-rep-k > div, .nvo-row.nv2-row, .pv-list > .pv-row, .nvo-list > .nvo-row, .lk-decks > .lk-deck, .lv-row.lv-card) {
    border: 0 !important; border-radius: var(--rad-md) !important; box-shadow: var(--elev-1) !important;
  }
  :is(.lk-kpi, .lk-rep-k > div) { padding: var(--sp-3) var(--sp-4) !important; }
  .lk-rep-k { gap: var(--sp-3) !important; }
  :is(.nvo-row.nv2-row, .pv-list > .pv-row, .nvo-list > .nvo-row, .lk-decks > .lk-deck) { padding: var(--sp-3) var(--sp-4) !important; margin: 0 !important; }
  :is(.qe, .nvq, .lv-add, .sb-search) { border: 0 !important; border-radius: var(--rad-md) !important; box-shadow: var(--elev-1) !important; }
  :is(.nvo-row.nv2-row, .pv-list > .pv-row, .nvo-list > .nvo-row, .lk-decks > .lk-deck, .lk-kpi, .lk-card) { transition: box-shadow .16s var(--ease), transform .12s var(--ease); }
  :is(.nvo-row.nv2-row, .pv-list > .pv-row, .nvo-list > .nvo-row, .lk-decks > .lk-deck):hover { box-shadow: var(--elev-2) !important; }
  :is(.nvo-row.nv2-row, .pv-list > .pv-row, .nvo-list > .nvo-row, .lk-decks > .lk-deck):active { transform: scale(.995); }

  /* --- Abstände zwischen Elementen */
  :is(.pv-list, .nvo-list, .lk-decks) { gap: var(--sp-2) !important; }
  .nvo-list:has(> .nv2-row), div:has(> .nvo-row.nv2-row) { display: flex; flex-direction: column; gap: var(--sp-2); }
  .lk-kpis, .lk-stats > div:has(> .lk-kpi) { gap: var(--sp-3) !important; }
  :is(.lk-grid, .lk-cols) { gap: var(--sp-4) !important; }

  /* --- Bedienelemente: eine Rundung */
  :is(.btn, .btn.sm, .select, select.select, .seg, .lib-pick, input.pv-search) { border-radius: var(--rad-sm) !important; }
  .seg-b { border-radius: calc(var(--rad-sm) - 2px) !important; }
  .btn, .seg-b, .tb-btn, .tab, .sb-item { transition: background-color .14s var(--ease), box-shadow .14s var(--ease), color .14s var(--ease), opacity .14s var(--ease); }
  .btn:active:not(:disabled), .tb-btn:active { transform: translateY(.5px) scale(.985); }
  /* rahmenlose Überschriften (Notiz-, Sitzungs-, Heft-Titel) bearbeitet man direkt im Text – dort kein Rahmen */
  :is(.btn, .seg-b, .tb-btn, .tab, .sb-item, .ctx-item, input, select, textarea):not(.nv-title, .nv-subtitle, .crs-topic, .crs-subtopic, .nb-title, .card-comment, .ft-t, .td-title, .cd-title, .ProseMirror *):focus-visible { outline: 2px solid color-mix(in srgb, var(--accent, #b0643a) 70%, transparent) !important; outline-offset: 2px; }

  /* --- Seitenreiter (Tabs oben)
     Vorher reservierte jeder Tab unsichtbar Platz für das ×, der Titel wurde nach 3 Buchstaben abgeschnitten. */
  #tabbar .tabs { gap: var(--sp-1) !important; padding: 0 var(--sp-2) !important; align-items: center !important; }
  #tabbar .tab { height: 28px !important; margin: 0 !important; padding: 0 var(--sp-2) 0 var(--sp-3) !important; gap: var(--sp-2) !important; border-radius: var(--rad-sm) !important; min-width: 64px !important; }
  #tabbar .tab:not(.active):hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
  #tabbar .tab:not(.active) + .tab:not(.active)::before { content: ""; position: absolute; left: calc(-1 * var(--sp-1) / 2 - .5px); top: 8px; bottom: 8px; width: 1px; background: var(--line); pointer-events: none; }
  #tabbar .tab:not(.active):hover + .tab::before, #tabbar .tab:not(.active):hover::before { opacity: 0; }
  #tabbar .tab.active { box-shadow: var(--elev-1) !important; background: var(--card, var(--bg)) !important; }
  #tabbar .tab:not(.active):not(:hover) .tab-x { width: 0 !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; opacity: 0; overflow: hidden; }
  #tabbar .tab .tab-x { flex: none; transition: opacity .12s var(--ease); }

  /* --- Seitenleiste: etwas mehr Luft zwischen den Einträgen */
  #sidebar .sb-item { min-height: 30px; border-radius: var(--rad-sm) !important; }
  #sidebar .sb-item + .sb-item { margin-top: 2px; }

  /* --- Startseite, Fach „ToDos“: zwei ältere Regeln widersprachen sich (Umbruch erlaubt → wieder verboten).
         Ergebnis waren Titel, die mitten im Wort getrennt wurden. Jetzt rutscht das Datum bei Enge unter den Titel. */
  /* 1.8.5: eine Zeile – der Titel endet mit „…“ (voller Text beim Überfahren), das Datum bleibt rechts daneben */
  .hm .hm-task { flex-wrap: nowrap !important; }
  .hm .hm-task > .hm-row-t { flex: 1 1 auto !important; min-width: 0; -webkit-hyphens: manual; hyphens: manual; }
  .hm .hm-task > .hm-row-t > :is(b, span) { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hm .hm-task > .hm-row-t ~ .due-chip { margin-left: auto; }

  /* --- Dialoge und schwebende Ebenen: gleiche Rundung */
  .modal-back > .modal:not(.qs-modal) { border-radius: var(--rad-xl) !important; }
  :is(.ctx, .popover, .tag-menu, .cal-pop) { border-radius: var(--rad-md) !important; }
}

/* ===== 1.8.3 · Projektübersichten (modules/projekte.js) ===== */
/* gemeinsamer Kopf: Symbol · Art + Titel · Umschalter · Aktionen (wie Seminar-Kopf) */
.pv2-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 18px 24px 14px; min-height: 64px; }
.pv2-ic { display: inline-flex; flex: none; font-size: 26px; line-height: 1; }
.pv2-tt { min-width: 0; display: flex; flex-direction: column; }
.pv2-kick { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 1px; }
.pv2-tt h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.pv2-seg { flex: none; }
.pv2-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pv2-pick { max-width: 260px; height: var(--h-sm, 28px); padding: 0 8px; }
/* Projektseite füllt die Höhe; der Inhaltsbereich gehört der jeweiligen Ansicht */
.pv2 { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.pv2-body { flex: 1; min-height: 0; display: flex; }
.pv2-pane { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.pv2-overview { overflow-y: auto; padding: 4px 24px 40px; }
/* Vorbereitung: der Arbeitsraum ohne zweiten Titelkopf (Titel steht schon oben) */
.pv2-prep .pw-head .pw-ic, .pv2-prep .pw-head .pw-title h1 { display: none; }
.pv2-prep .pw-head { padding-top: 0; min-height: 0; }
/* Schreiben: nur der Text, ruhig und mittig */
.pv2-write { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.pv2-write > * { flex: 1; min-height: 0; }
/* Übersicht */
.pv2-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; max-width: 1180px; margin: 0 auto; }
.pv2-card { background: var(--card, var(--bg)); border-radius: 14px; box-shadow: var(--card-shadow, 0 0 0 1px var(--line2)); padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pv2-card.pv2-papers { grid-column: 1 / -1; }
.pv2-card-h { display: flex; align-items: baseline; gap: 8px; }
.pv2-card-h h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.pv2-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.pv2-paper { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 10px; background: var(--bg2, var(--hover)); min-width: 0; }
.pv2-paper-main { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pv2-paper-main b { font-size: 14.5px; font-weight: 600; }
.pv2-paper-main:hover b { color: var(--accent); }
.pv2-paper-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.pv2-paper-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.pv2-list { display: flex; flex-direction: column; gap: 1px; margin: 0 -6px; }
.pv2-row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; font-size: 13px; min-height: 32px; }
.pv2-row:hover { background: var(--hover); }
.pv2-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pv2-row-ic { text-align: center; font-size: 13px; }
.pv2-row-m { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.pv2-xdot { width: 9px; height: 9px; border-radius: 50%; justify-self: center; }
.pv2-more { align-self: flex-start; margin-top: 2px; }
.pv2-empty { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pv2-empty p { margin: 0; }
@media (max-width: 760px) {
  .pv2-head { padding: 14px 16px 10px; }
  .pv2-tt h1 { max-width: 70vw; }
  .pv2-overview { padding: 4px 14px 32px; }
  .pv2-grid { grid-template-columns: 1fr; }
  .pv2-row-m { max-width: 96px; }
}

/* Notizübersicht eines Projekts */
.pnv { max-width: 1180px; padding: 0 0 60px; }
.pnv > .pv2-head { padding-left: 24px; padding-right: 24px; }
.pnv-body { padding: 0 24px; display: flex; flex-direction: column; gap: 22px; }
.pnv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pnv-q { flex: 1 1 240px; max-width: 420px; }
.pnv-grp { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 12px; }
.pnv-grp-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: .5px solid var(--line2); padding-bottom: 6px; }
.pnv-grp-h h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.pnv-grp.cur .pnv-grp-h h2 { color: var(--accent); }
.pnv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pnv-card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding: 12px 13px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: var(--card-shadow, 0 0 0 1px var(--line2)); min-width: 0; transition: box-shadow .15s, transform .15s; }
.pnv-card:hover { box-shadow: var(--card-shadow-hover, 0 0 0 1px var(--line2)); transform: translateY(-1px); }
.pnv-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pnv-card-h { display: flex; gap: 8px; align-items: flex-start; }
.pnv-card-h b { font-size: 14px; font-weight: 600; line-height: 1.3; }
.pnv-card-ic { font-size: 14px; line-height: 1.3; }
.pnv-card-f { display: flex; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); margin-top: auto; }
.pnv-empty { margin: 0; }
.pnv-none { margin: 40px auto; max-width: 420px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pnv-none h2 { margin: 0; font-size: 18px; }
.pnv-none p { margin: 0 0 6px; }
.pnv-none-ic { font-size: 30px; }
.pv2-write .pnv-none, .pv2-pane > .pnv-none { margin-top: 12vh; }
@media (max-width: 760px) { .pnv > .pv2-head, .pnv-body { padding-left: 16px; padding-right: 16px; } .pnv-grid { grid-template-columns: 1fr; } }

/* KI-Zusammenfassung von Notizen */
.cb-sum { font-size: 12.5px; line-height: 1.45; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.cb-sum-ph { font-style: italic; opacity: .8; }
.cb-sum.wait .cb-sum-ph { animation: cbSumPulse 1.4s ease-in-out infinite; }
@keyframes cbSumPulse { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .cb-sum.wait .cb-sum-ph { animation: none; } }
.cb-sum-tog { display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500; padding: 4px 8px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.cb-sum-tog:hover { background: var(--hover); color: var(--text); }
.cb-sum-tog:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cb-sum-sw { position: relative; width: 26px; height: 15px; border-radius: 8px; background: var(--line2); transition: background .15s; flex: none; }
.cb-sum-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.cb-sum-tog.on { color: var(--text); }
.cb-sum-tog.on .cb-sum-sw { background: var(--accent); }
.cb-sum-tog.on .cb-sum-sw::after { transform: translateX(11px); }
/* Arbeitsraum-Übersicht: ohne Zusammenfassung nur der Titel – Karten werden kompakt */
.pw-ncard.notext { min-height: 0; }
.pw-ncard .cb-sum { flex: 1; font-size: 11.5px; }
.pw-ngroup.cur > .pw-ngroup-h { color: var(--accent); }
.pw-ngroup-cur { margin-left: 8px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; }
.pw-ngroup.empty .pw-ngrid { min-height: 0; }
.pw-nover-h .cb-sum-tog { margin-right: 2px; }
/* Sitzung: Kopf des Notizen-Abschnitts mit zwei Aktionen */
.crs-sec-acts { display: inline-flex; gap: 2px; align-items: center; }
/* Neue Arbeit: Projekt wählen */
.wz-proj { width: 100%; }
.wz-proj-hint { margin: -4px 0 0; }
.pv2-row > .clamp1, .pv2-row > .pv2-row-m { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-line-clamp: unset; }
/* Farbauswahl der Auszüge: Punkte behalten ihre Größe; wird es eng, bricht die Reihe um statt zu quetschen */
.color-filter > .cf { flex: none; }
.color-filter > .cf.dot-btn { width: 18px; height: 18px; min-width: 18px; }
.pw-x .color-filter, .color-filter { flex-wrap: wrap; row-gap: 6px; }
/* Druckvorschau: eine Kopfzeile mit Schließen-Knopf innen, Seiten scrollen darunter – auch in kleinen Fenstern */
.modal.pv-modal { height: calc(100vh - 40px); max-height: calc(100vh - 40px); }
.modal.pv-modal > .modal-x { display: none !important; }
.pv-modal .pv-wrap { flex: 1; height: auto; min-height: 0; }
.pv-modal .pv-top { flex: none; flex-wrap: wrap; row-gap: 8px; padding: 12px 14px 12px 18px; }
.pv-modal .pv-top > b { white-space: nowrap; }
.pv-modal .pv-x { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; }
.pv-modal .pv-pages { min-height: 0; overscroll-behavior: contain; }
.pv-modal .pv-page canvas { max-width: 100%; height: auto !important; }
@media (max-width: 640px) { .pv-modal .pv-pages { padding: 14px; } }
/* Termin einer Sitzung: Sprung in die Sitzung im Termin-Dialog */
.td-sess { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 100%; align-items: center; gap: 8px; margin: 2px 0 12px; padding: 9px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: 13px; min-width: 0; }
.td-sess:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.td-sess:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.td-sess-k { font-weight: 600; color: var(--accent); white-space: nowrap; }
.td-sess-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.td-sess-go { font-weight: 600; white-space: nowrap; color: var(--accent); }
.pw-nover-h { flex-wrap: wrap; row-gap: 4px; }
.pw-nover-h > b { white-space: nowrap; }
.pw-nover-h > .muted.tiny { flex: 1 1 180px; min-width: 0; }
.pv2-grid { width: 100%; box-sizing: border-box; }

/* ===== 1.8.4 · Ziehgriffe (modules/ziehgriffe.js) ===== */
/* während ein Trenner/Griff gezogen wird: nichts markieren, Inhalte nicht treffen, keine Übergänge */
html.cb-dragging, html.cb-dragging * { -webkit-user-select: none !important; user-select: none !important; }
html.cb-dragging :is(.ProseMirror, iframe, canvas, .rd-pdf, .pdf-page, .page, .ws-canvas .ws-frame-body, .cv-wrap) { pointer-events: none !important; }
html.cb-dragging *, html.cb-winresize * { transition: none !important; }
html.cb-winresize :is(.card, .pnv-card, .pw-ncard, .btn, .tb-btn):hover { transform: none !important; }
/* kleine Notizfenster im Arbeitsraum: Aufnahme-/Verbessern-Leiste nur zeigen, wenn man dort ist – sie liegt sonst über dem Text */
.pw-note:not(:hover):not(:focus-within) .nv-main > .mt-bar:not(.live) { opacity: 0; pointer-events: none; }
.pw-note .nv-main .nv-editor { padding-bottom: 64px; }

/* ===== 1.8.4 · nichts abschneiden ===== */
/* Fensterleisten: der Titel (Notiz, Quelle) hat Vorrang; Symbolknöpfe wandern bei Platzmangel ins „⋯“-Menü */
.pw-bar > .pw-pick { flex: 0 1 auto !important; min-width: min(130px, 34%) !important; }
.pw-bar > .pw-pick > .clamp1, .pw-bar > .pw-pick > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-bar > .pw-nvtop { flex: 0 1 auto !important; min-width: 30px !important; overflow: hidden; }
/* Quellen-Reiter: immer ganz lesbar; passen nicht alle, scrollt die Reiterleiste (Mausrad/Trackpad) */
.pw-tabs > .pw-tab { flex: none !important; max-width: 240px; }
.pw-tabs > .pw-tab > .clamp1 { overflow: visible; text-overflow: clip; -webkit-line-clamp: unset; display: inline; white-space: nowrap; }
.pw-tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent); padding-right: 14px; }
/* Werkzeugleiste der Arbeitsfläche: in schmalen Fenstern in zwei Reihen statt abgeschnitten */
.cv-bar { flex-wrap: nowrap !important; width: max-content; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.cv-bar::-webkit-scrollbar { display: none; }
.cv-wrap .cv-dock { max-width: calc(100% - 16px); }
.cv-wrap .cv-bar { max-width: 100%; }
/* (max-content: nur umbrechen, wenn die Fläche wirklich zu schmal ist – nicht schon bei halber Breite) */
/* Projekt im Notizkopf: voller Name, notfalls zweite Zeile statt „…“ */

/* Projektübersicht: Zeilen dürfen zweizeilig werden – nichts wird mitten im Wort gekürzt */
.pv2-row { align-items: start; }
.pv2-row > .pv2-row-ic, .pv2-row > .pv2-xdot { margin-top: 0; }
/* Symbol/Punkt mittig zur ersten Textzeile (Zeilenhöhe 13 px × 1,4) */
.pv2-row > .pv2-row-ic { height: 18.2px; display: flex; align-items: center; justify-content: center; }
.pv2-row > .pv2-xdot { margin-top: 4.6px; }
.pv2-row-x { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; min-width: 0; }
.pv2-row-src { white-space: nowrap; text-align: right; line-height: 1.4; }
.pv2-lrow { grid-template-columns: 20px minmax(0, 1fr); }
.pv2-lrow-t { display: flex; flex-direction: row; align-items: baseline; gap: 8px; min-width: 0; line-height: 1.4; }
.pv2-lrow-t b { font-weight: 500; }
.pv2-lrow-t > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv2-lrow-t > b { flex: none; max-width: 60%; }
.pv2-lrow-t > .muted { flex: 1 1 auto; min-width: 0; }
/* schmale Notizfenster: Rückgängig/Wiederholen nur per ⌘Z/⇧⌘Z (Platz für den Titel); Titel darf zweizeilig werden */
@container (max-width: 560px) { .pw-nvtop .nv-hist { display: none !important; } }
/* Überlauf der Leisten: ausgeblendete Knöpfe bleiben ausgeblendet (eine !important-Regel hielt „Werkzeuge“ sichtbar) */
.cbar > .cbar-i[style*="display: none"] { display: none !important; }

/* Bibliothek: Autor:innen nie gekürzt – notfalls zweizeilig */
/* aktiver Reiter oben: so breit wie sein Titel (bis 360 px) */
#tabbar .tab.active { flex: 0 0 auto !important; width: auto !important; max-width: 360px !important; }
/* Projekt im Notizkopf: Brotkrumen weichen zuerst */
.nv-top .proj-btn { max-width: none !important; flex-shrink: 0; }
.nv-top .crumbs { min-width: 0; flex: 0 1 auto; overflow: hidden; }
/* Block in eine andere Notiz ziehen: Ziel hervorheben, Geisterbild sagt wohin */
.bh-note-target { outline: 2px solid var(--accent) !important; outline-offset: 2px; background: var(--accent-soft) !important; border-radius: 8px; }
.ProseMirror.bh-note-target { outline-offset: 6px; background: transparent !important; }
.bh-ghost.to-note::before { content: attr(data-to); display: block; width: max-content; margin: -2px 0 8px; white-space: nowrap; font: 600 11.5px/1 var(--sans, system-ui); color: #fff; background: var(--accent); padding: 5px 8px; border-radius: 7px; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
@container (max-width: 470px) { .pw-bar > .pw-autohead-h { display: none; } }
/* Bibliothek: Spaltenköpfe sortieren */
.lib-row.head .lib-hsort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; justify-self: start; }
.lib-row.head .lib-hsort:hover { background: var(--hover); color: var(--text); }
.lib-row.head .lib-hsort.on { color: var(--text); font-weight: 600; }
.lib-row.head .lib-hsort:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lib-hsort-d { font-size: 11px; line-height: 1; }

/* Grundsatz: Knöpfe, Reiter, Chips und Leisten sind einzeilig. Was nicht passt, endet mit „…“ (voller Text beim Überfahren)
   oder wandert ins „⋯“-Menü – nie in eine zweite Zeile/Reihe. */
:is(.btn, .tb-btn, .seg-b, .hc-link, .pw-tab, .pw-ntab, .ps-chip, .pw-sess, .sess-btn, .proj-btn, .lib-pick, .cf, .pv2-kick) { white-space: nowrap; }
.pw-bar, .cbar, .pw-tabs, .pw-ntabs, .cv-bar, .rd-toolbar { flex-wrap: nowrap !important; }
.nv-top .proj-btn { max-width: min(420px, 46%) !important; overflow: hidden; text-overflow: ellipsis; }
/* schmale Notizfenster: „Groß öffnen“ weicht (Notiz lässt sich über den Titel bzw. ⤢ groß öffnen) – nichts halb verdeckt */
@container (max-width: 470px) { .pw-note .pw-bar > .tb-btn[title^="Groß öffnen"] { display: none; } .pw-note:has(.pw-nstrip:not([hidden])) .pw-bar > .pw-sess { display: none; } }
/* (die Sitzung steht dann schon in der Notizleiste darunter) */
/* Symbole in einem Zwischenkasten (z. B. Papiersymbol vor dem Notiztitel): mittig zur Textzeile, nicht oben angeheftet */
span:has(> .lk-ic:only-child), span:has(> svg.i:only-child) { display: inline-flex; align-items: center; justify-content: center; align-self: center; line-height: 1; }

.lib-hsort svg.i, .lib-hsort-d svg { vertical-align: 0 !important; margin: 0 !important; position: static !important; top: 0 !important; }
.lib-row.head > .lib-hsort { display: inline-flex !important; align-items: center !important; line-height: 18px; }
.pv2-lrow-t > * { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; display: block; }
.pw-bar > .pw-nvtop { min-width: 36px !important; }
/* Quellen-Reiter: aktiver Reiter vollständig, die übrigen enden mit „…“ – kein Ausblenden, kein Scrollen */
.pw-tabs { -webkit-mask-image: none !important; mask-image: none !important; padding-right: 0 !important; overflow: hidden !important; }
.pw-tabs > .pw-tab { flex: 0 1 auto !important; min-width: 56px; }
.pw-tabs > .pw-tab.on { flex: none !important; }
.pw-tabs > .pw-tab > .clamp1 { display: block !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap; }

/* ===== 1.8.5 · Startseite: Abstände und Einzeiligkeit ===== */
/* Nächste Sitzung: großes „Morgen“ und Uhrzeit nicht aneinandergeklebt */
.hm .hm-cd-main { row-gap: 10px !important; }
.hm .hm-cd-time { margin-top: 0 !important; }
/* ToDos: eine Zeile – Titel endet mit „…“, Fälligkeit bleibt rechts daneben (kein Umbruch unter den Titel) */
.hm .hm-task { flex-wrap: nowrap !important; }
.hm .hm-task > .hm-row-t { flex: 1 1 auto !important; min-width: 0; }
.hm .hm-task > .hm-row-t > b, .hm .hm-task > .hm-row-t > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
.hm .hm-task > :not(.hm-row-t):not(.hm-check) { flex: none; }
/* Abgaben: Zahl + „Tage“ als feste Spalte, deutlicher Abstand zum Titel */
.cbw-due-i { grid-template-columns: 44px 34px minmax(0, 1fr) !important; column-gap: 6px !important; }
.cbw-due-i .u { justify-self: start; }
.cbw-due-i .t { padding-left: 10px; }
.cbw-due-i .t, .cbw-due-i .t em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 1.8.6 · Farbauswahl kompakt statt umbrechen (modules/kompakt.js) ===== */
.color-filter, .pw-x .color-filter { flex-wrap: nowrap !important; }
.color-filter > .cf-pal { display: none; }
.color-filter.cf-compact > .cf.dot-btn { display: none !important; }
.color-filter.cf-compact > .cf-pal { display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap; }
.cf-pal-sw { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.18); }
.cf-pal-sw.all, .cf-pop-sw.all { background: conic-gradient(#f5d93f, #f39445, #ee9b9b, #e8afe9, #bfb0ec, #8fc3e8, #9dcf96, #f5d93f) !important; }
.cf-pal-chev { font-size: 9px; color: var(--muted); }
.cf-pop { position: fixed; z-index: 9000; min-width: 200px; max-height: min(420px, calc(100vh - 16px)); overflow-y: auto; padding: 5px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: 0 10px 30px rgba(0,0,0,.18), 0 0 0 .5px var(--line2); display: flex; flex-direction: column; gap: 1px; }
.cf-pop-i { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--text); white-space: nowrap; }
.cf-pop-i:hover, .cf-pop-i:focus-visible { background: var(--hover); }
.cf-pop-i.on { background: var(--accent-soft); }
.cf-pop-sw { width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.18); }
.cf-pop-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cf-pop-c { font-size: 11.5px; color: var(--muted); }

/* Startseite: Zeit unter „Morgen“ mit klarem Abstand; Abgaben: Zahl · Tage · Titel sauber in Spalten, Titel mit „…“ */
.hm .hm-cd-main { row-gap: 12px !important; }
.cbw-due-i { grid-template-columns: 34px 30px minmax(0, 1fr) !important; column-gap: 8px !important; padding: 8px 6px !important; align-items: baseline; }
.cbw-due-i b { text-align: right; }
.cbw-due-i .u { white-space: nowrap; }
.cbw-due-i .t { margin-left: 4px; }
.cbw-due-i .t, .cbw-due-i .t > * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 1.8.6 · Leisten bleiben einzeilig – überzählige Knöpfe wandern ins „⋯“ */
.cb-onerow { flex-wrap: nowrap !important; row-gap: 0 !important; min-width: 0; }
.cb-onerow > [data-cb-spilled="1"] { display: none !important; }
.cb-onerow > .cb-more { flex: none; margin-left: auto; }
.cb-onerow > .cb-more[hidden] { display: none !important; }
.cb-onerow > input, .cb-onerow > .input, .cb-onerow > .search, .cb-onerow > [class*="search"] { min-width: 80px; flex-shrink: 1; }
.cb-onerow > button, .cb-onerow > .btn, .cb-onerow > .tb-btn { flex-shrink: 0; white-space: nowrap; }
.cb-spill-ic { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.cb-spill-ic svg { width: 15px; height: 15px; }
.cb-spill-pop .cf-pop-i[disabled] { opacity: .45; pointer-events: none; }
.graph-bar.cb-onerow { height: 44px !important; min-height: 44px; padding-top: 0; padding-bottom: 0; }
.calv .cal-head.cb-onerow > * { order: initial; }
.cb-onerow > .seg > .cb-segbtn { display: none; }
.cb-onerow > .seg.cb-segc > button:not(.cb-segbtn) { display: none !important; }
.cb-onerow > .seg.cb-segc > .cb-segbtn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 0; background: var(--bg); color: var(--text); font: inherit; font-size: 12.5px; height: 24px; padding: 0 10px; border-radius: 7px; cursor: pointer; box-shadow: 0 0 0 .5px var(--line2); }
.cb-onerow > .seg.cb-segc { flex: none; }
.cb-onerow > .pv-search, .cb-onerow > input.search, .cb-onerow > .input.search { min-width: 100px !important; }
/* Start: Schnellaktionen immer einzeilig (gekürzt mit „…“, voller Name im Tooltip) */
.hm-act-t b, .hm-act-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.hm-act { min-width: 0; }
/* ToDos auf Start: Datum kompakt halten, damit der Titel Platz behält */
.hm-task .hm-row-d, .hm-task .hm-due, .hm-task [class*="date"] { flex: none; white-space: nowrap; }
.hm .hm-row-t > b, .hm .hm-row-t > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hm .hm-row-t { min-width: 0; }
/* 1.8.6 · Abgaben: Zahl so hoch wie Titel + Datum (Wert gemessen in start.js → --due-fs).
   Grundlinien von Zahl, „Tage“ und Datum liegen auf einer Linie; Oberkante Zahl = Oberkante Titel. */
.cbw-due-i { grid-template-columns: 2.1ch 34px minmax(0, 1fr) !important; grid-template-columns: max(30px, calc(var(--due-fs, 26px) * 1.25)) 34px minmax(0, 1fr) !important; align-items: last baseline !important; column-gap: 10px !important; padding: 10px 8px !important; }
.cbw-due-i b { font-size: var(--due-fs, 26px) !important; line-height: 1 !important; text-align: right; white-space: nowrap; letter-spacing: -.01em; }
.cbw-due-i b.w { grid-column: 1 / span 2; text-align: left; font-family: var(--font); font-size: 13px !important; font-weight: 600; letter-spacing: 0; align-self: center; }
.cbw-due-i .u { font-size: 11.5px; line-height: 1; }
.cbw-due-i .t { margin-left: 0 !important; padding-left: 0 !important; display: flex; flex-direction: column; gap: 2px; }
.cbw-due-i .tt { font-size: 13.5px; line-height: 18px; color: var(--text); }
.cbw-due-i .t em { font-size: 11.5px; line-height: 15px; }
/* ===== 1.8.8 · Markieren im Stil der App ===== */
/* Auswahl im PDF: warme App-Farbe statt Systemblau, ohne Überblend-Modus (der wird auf dem Mac teils gar nicht
   gezeichnet – dann sah man die Auswahl nicht). Leicht gerundet, wie gespeicherte Markierungen. */
.cb-selov { mix-blend-mode: normal !important; }
.cb-selov > div { background: color-mix(in srgb, var(--accent) 30%, transparent) !important; border-radius: 3px; box-shadow: 0 0 0 .5px color-mix(in srgb, var(--accent) 22%, transparent); }
.textLayer ::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }
body.pdf-dark .cb-selov > div { background: rgba(224, 145, 92, .38) !important; }
/* Auswahl-Leiste: ruhige Karte wie Menüs und Paletten, gleiche Höhen, nie breiter als das Fenster */
.sel-toolbar { gap: 4px !important; padding: 4px !important; border-radius: 12px !important; background: var(--card, var(--bg)) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: 0 0 0 .5px var(--line2), 0 8px 24px rgba(0, 0, 0, .12) !important; max-width: calc(100vw - 16px); flex-wrap: nowrap !important; white-space: nowrap; }
.sel-toolbar > * { flex: none; }
.sel-toolbar .sel-grip { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 28px; color: var(--faint); cursor: grab; border-radius: 7px; }
.sel-toolbar .sel-grip:hover { background: var(--hover); color: var(--muted); }
.sel-toolbar .sel-grip > span { display: none; }
.sel-toolbar .sel-grip svg { width: 15px; height: 15px; }
.sel-toolbar .sel-sep { width: .5px !important; height: 18px !important; margin: 0 3px !important; background: var(--line2) !important; align-self: center; }
.sel-toolbar .sel-modes { background: var(--bg2, var(--active)) !important; border-radius: 9px !important; padding: 2px !important; gap: 2px !important; display: inline-flex; }
.sel-toolbar .sel-mode { width: 28px !important; height: 24px !important; border-radius: 7px !important; display: inline-flex; align-items: center; justify-content: center; }
.sel-toolbar .sel-mode svg { width: 15px; height: 15px; }
.sel-toolbar .sel-color { width: 16px !important; height: 16px !important; margin: 0 2px !important; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.16), 0 0 0 2px transparent !important; transition: transform .12s ease, box-shadow .12s ease !important; }
.sel-toolbar .sel-color:hover { transform: none !important; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.16), 0 0 0 2px var(--card, var(--bg)), 0 0 0 3.5px var(--sc) !important; }
.sel-toolbar.ul .sel-color:hover { box-shadow: 0 0 0 1px var(--line2) !important; }
.sel-toolbar .sel-btn { height: 28px !important; padding: 0 9px !important; border-radius: 8px !important; font-size: 12.5px !important; font-weight: 500; color: var(--text); gap: 5px; }
.sel-toolbar .sel-btn svg { width: 15px; height: 15px; color: var(--muted); }
.sel-toolbar .sel-tr { width: 28px; padding: 0 !important; justify-content: center; color: var(--muted); font-weight: 600; }
.rd-banner.cb-float { position: sticky; z-index: 12; }
/* ===== 1.8.9 · Zitierleiste (modules/zitieren.js) – wie Menüs und Paletten der App ===== */
.zc { position: fixed; z-index: 1400; width: min(520px, calc(100vw - 16px)); background: var(--card, var(--bg)); border-radius: 12px; box-shadow: 0 0 0 .5px var(--line2), 0 12px 32px rgba(0,0,0,.16); display: flex; flex-direction: column; overflow: hidden; animation: fade .12s; }
.zc-head { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 6px 6px 6px 12px; border-bottom: .5px solid var(--line2); }
.zc-ic { flex: none; width: 20px; text-align: center; font-family: var(--serif); font-size: 20px; line-height: 1; color: var(--accent); transform: translateY(2px); }
.zc-chips { display: flex; gap: 4px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.zc-chips::-webkit-scrollbar { display: none; }
.zc-chip { flex: none; display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 2px 0 9px; border-radius: 7px; background: var(--accent-soft); color: var(--text); font-size: 12.5px; white-space: nowrap; }
.zc-chip-t { max-width: 160px; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.zc-pg { all: unset; box-sizing: border-box; width: 42px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 5px; background: var(--bg); font-size: 12px; color: var(--text); box-shadow: 0 0 0 .5px var(--line2); }
.zc-pg::placeholder { color: var(--faint); }
.zc-pg:focus { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--accent) 50%, transparent); }
.zc-pre, .zc-x { all: unset; cursor: pointer; height: 20px; min-width: 20px; padding: 0 4px; box-sizing: border-box; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--muted); }
.zc-pre.on { color: var(--accent); font-weight: 600; }
.zc-pre:hover, .zc-x:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.zc-x { font-size: 15px; }
.zc-in { all: unset; flex: 1 1 120px; min-width: 90px; height: 28px; font-size: 14px; color: var(--text); }
.zc-in::placeholder { color: var(--faint); }
.zc-go { all: unset; flex: none; cursor: pointer; height: 28px; padding: 0 12px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 600; display: none; align-items: center; }
.zc.has .zc-go { display: inline-flex; }
.zc-list { max-height: min(340px, 46vh); overflow-y: auto; padding: 4px; }
.zc-row, .zc-cand { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.zc-row.act, .zc-cand:hover, .zc-cand:focus-visible { background: var(--hover); }
.zc-ty { flex: none; width: 20px; text-align: center; font-size: 14px; }
.zc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.zc-a { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zc-t { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zc-src { flex: none; font-size: 11px; color: var(--muted); padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--text) 5%, transparent); white-space: nowrap; }
.zc-src.z { color: #b3261e; background: color-mix(in srgb, #cc2936 9%, transparent); }
.zc-empty { padding: 12px 10px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.zc-link { all: unset; cursor: pointer; color: var(--accent); font-weight: 500; white-space: nowrap; }
.zc-link:hover { text-decoration: underline; }
.zc-foot { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 8px 0 6px; border-top: .5px solid var(--line2); background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.zc-new { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-radius: 7px; font-size: 12.5px; color: var(--text); white-space: nowrap; }
.zc-new:hover { background: var(--hover); }
.zc-plus { color: var(--accent); font-weight: 600; }
.zc-keys { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 560px) { .zc-keys { display: none; } }
/* Dialog „Neue Literatur“ */
.zc-modal { width: min(560px, 92vw); display: flex; flex-direction: column; gap: 10px; }
.zc-qrow { display: flex; gap: 8px; } .zc-qrow .input { flex: 1; min-width: 0; }
.zc-status { min-height: 18px; display: flex; flex-wrap: nowrap; align-items: baseline; gap: 4px; }
.zc-cands { display: flex; flex-direction: column; gap: 2px; }
.zc-form { display: grid; grid-template-columns: 1fr; gap: 6px; }
.zc-form:empty { display: none; }
.zc-f { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 12.5px; }
.zc-f > span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zc-f textarea { resize: vertical; min-height: 44px; font: inherit; }
.zc-f .input, .zc-f .select { width: 100%; box-sizing: border-box; }
.zc-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.zc-actions .spacer { flex: 1; }
.zc .zc-in, .zc .zc-in:focus, .zc .zc-in:focus-visible { outline: none !important; box-shadow: none !important; border: 0 !important; background: transparent !important; }
/* Klick auf ein Zitat im PDF: Angabe aus dem Literaturverzeichnis */
.zr { position: fixed; z-index: 1300; width: min(400px, calc(100vw - 16px)); background: var(--card, var(--bg)); border-radius: 12px; box-shadow: 0 0 0 .5px var(--line2), 0 12px 32px rgba(0,0,0,.16); padding: 10px 12px 10px; display: flex; flex-direction: column; gap: 8px; animation: fade .12s; }
.zr-head { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.zr-k { font-family: var(--serif); font-size: 18px; line-height: 1; color: var(--accent); transform: translateY(2px); }
.zr-n { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zr-x { all: unset; cursor: pointer; width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-size: 16px; }
.zr-x:hover { background: var(--hover); color: var(--text); }
.zr-body { display: flex; flex-direction: column; gap: 4px; }
.zr-ref { font-family: var(--serif); font-size: 13.5px; line-height: 1.45; color: var(--text); padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--text) 4%, transparent); max-height: 9em; overflow-y: auto; }
.zr-meta, .zr-wait, .zr-none { font-size: 12px; color: var(--muted); }
.zr-known { font-size: 12px; color: var(--ok, #3f8f5a); font-weight: 500; }
.zr-acts { display: flex; align-items: center; gap: 6px; }
.zr-acts .spacer { flex: 1; }
.rd-pages .textLayer.cb-cite-hover, .rd-pages .textLayer.cb-cite-hover span { cursor: pointer !important; }

/* 1.9.0 · Kopfzeilen der Bereiche: Titel bündig links, Werkzeuge bündig rechts.
   Vorher hatten Titel und Werkzeuggruppe beide margin-left:auto – der freie Platz wurde geteilt und der Titel
   wanderte beim Vergrößern zur Mitte. Jetzt wächst nur der Platzhalter; wird es eng, kürzt der Titel mit „…“
   und die Werkzeuge rücken (wie bisher) in „⋯“ zusammen. */
.pw-bar > .pw-pick { margin-left: 0 !important; }
.pw-bar > .spacer, .pw-note .pw-bar > .spacer { flex: 1 1 8px !important; min-width: 8px !important; }
.pw-bar > .pw-pick > .clamp1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* 1.9.0 · Lange Auszüge: gekürzt wird nur, wenn mindestens drei Zeilen verborgen wären – sonst steht das ganze Zitat da.
   Wird gekürzt, dann genau an einer Zeilengrenze (keine angeschnittene halbe Zeile mehr, die verschwommen durchscheint);
   die letzte sichtbare Zeile läuft sanft aus. „Ganzes Zitat“ klappt dann wirklich den ganzen Text auf. */
.card-text.fits { max-height: none !important; -webkit-line-clamp: unset !important; display: block !important; overflow: visible !important; -webkit-mask-image: none !important; mask-image: none !important; }
.card-text.clipped { max-height: calc(2px + 5lh) !important; padding-bottom: 0 !important; margin-bottom: 6px; display: block !important; -webkit-line-clamp: unset !important;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 0.9lh), rgba(0,0,0,.25)) !important; mask-image: linear-gradient(to bottom, #000 calc(100% - 0.9lh), rgba(0,0,0,.25)) !important; }
