:root {
  --bg: #fbfaf8; --bg-side: #f4f1ec; --bg-hover: rgba(55, 45, 35, .06); --bg-active: rgba(55, 45, 35, .1);
  --card: #ffffff; --line: rgba(55, 45, 35, .12); --line-strong: rgba(55, 45, 35, .2);
  --text: #2f2a25; --muted: #8b8178; --faint: #b5aca2;
  --accent: #8c5f42; --accent-soft: #f1e6dc; --danger: #c2453c; --ok: #4f8a5b;
  --radius: 8px; --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 8px 24px rgba(40, 30, 20, .08);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side-w: 256px;
  /* Notion-Farben */
  --c-gray: #787774; --c-gray-bg: #f1f1ef; --c-brown: #9f6b53; --c-brown-bg: #f4eeee; --c-orange: #d9730d; --c-orange-bg: #fbecdd;
  --c-yellow: #cb912f; --c-yellow-bg: #fbf3db; --c-green: #448361; --c-green-bg: #edf3ec; --c-blue: #337ea9; --c-blue-bg: #e7f3f8;
  --c-purple: #9065b0; --c-purple-bg: #f4f0f7; --c-pink: #c14c8a; --c-pink-bg: #f9eef3; --c-red: #d44c47; --c-red-bg: #fdebec; --c-default-bg: #eeebe6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a18; --bg-side: #22201d; --bg-hover: rgba(255, 245, 230, .06); --bg-active: rgba(255, 245, 230, .1);
    --card: #262320; --line: rgba(255, 245, 230, .1); --line-strong: rgba(255, 245, 230, .18);
    --text: #ece6de; --muted: #a39a8f; --faint: #6f675e; --accent: #d1a17f; --accent-soft: #3a2f27;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --c-gray-bg: #373532; --c-brown-bg: #44352c; --c-orange-bg: #4d3a24; --c-yellow-bg: #4b4122; --c-green-bg: #2b3d31;
    --c-blue-bg: #24384a; --c-purple-bg: #3b3047; --c-pink-bg: #47303b; --c-red-bg: #4c2f2d; --c-default-bg: #3a3632;
    --c-gray: #9b9a97; --c-brown: #ba856f; --c-orange: #e5873a; --c-yellow: #dfab48; --c-green: #5ba97a; --c-blue: #529cca; --c-purple: #a87fd1; --c-pink: #d4689f; --c-red: #e16a64;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.boot { display: grid; place-items: center; height: 100vh; letter-spacing: .3em; color: var(--muted); font-family: var(--serif); }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; } .grow { flex: 1; min-width: 0; } .wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons & Inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--card); border-radius: 6px; padding: 5px 11px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.btn:hover { background: var(--bg-hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 2px 8px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; font-size: 15px; flex: none; }
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line-strong); background: var(--card); border-radius: 6px; padding: 7px 10px; outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: block; margin: 0 0 12px; } label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.cb { appearance: none; width: 16px; height: 16px; border: 1.5px solid var(--line-strong); border-radius: 4px; display: inline-grid; place-items: center; cursor: pointer; margin: 0; flex: none; background: var(--card); }
.cb:checked { background: var(--accent); border-color: var(--accent); }
.cb:checked::after { content: ''; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }

/* Layout */
.layout { display: flex; height: 100vh; height: 100dvh; }
.sidebar { width: var(--side-w); background: var(--bg-side); border-right: 1px solid var(--line); display: flex; flex-direction: column; flex: none; overflow: hidden; }
.side-head { padding: 14px 14px 6px; }
.brand { font-family: var(--serif); letter-spacing: .32em; font-size: 15px; color: var(--text); text-decoration: none; display: block; padding: 4px 6px 10px; }
.side-search { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 6px 8px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 14px; }
.side-search:hover { background: var(--bg-hover); }
.side-search kbd { margin-left: auto; font: 11px var(--mono); color: var(--faint); }
.side-scroll { flex: 1; overflow-y: auto; padding: 4px 8px 16px; }
.side-group { margin-top: 2px; }
.side-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: 14px; cursor: pointer; min-height: 30px; user-select: none; }
.side-item:hover { background: var(--bg-hover); }
.side-item.active { background: var(--bg-active); font-weight: 550; }
.side-item .ico { width: 20px; text-align: center; flex: none; }
.side-item .tw { width: 16px; height: 16px; display: grid; place-items: center; color: var(--faint); border-radius: 4px; font-size: 10px; flex: none; transition: transform .15s; }
.side-item .tw:hover { background: var(--bg-active); color: var(--text); }
.side-item .tw.open { transform: rotate(90deg); }
.side-sub { padding-left: 14px; }
.side-sub .side-item { font-size: 13.5px; color: var(--muted); min-height: 28px; }
.side-sub .side-item.active { color: var(--text); }
.side-label { font-size: 12px; color: var(--faint); padding: 14px 8px 4px; font-weight: 600; letter-spacing: .02em; }
.side-foot { border-top: 1px solid var(--line); padding: 8px; }
.avatar { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 11px; font-weight: 600; flex: none; }
.main { flex: 1; overflow-y: auto; position: relative; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); display: flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 46px; font-size: 14px; }
.crumbs { display: flex; align-items: center; gap: 4px; color: var(--muted); min-width: 0; }
.crumbs a { text-decoration: none; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.crumbs a:hover { background: var(--bg-hover); color: var(--text); }
.menu-toggle { display: none; }
.page { max-width: 1180px; margin: 0 auto; padding: 8px 48px 120px; }
.page.narrow { max-width: 860px; }
.page-title { font-family: var(--serif); font-size: 38px; line-height: 1.15; font-weight: 600; margin: 12px 0 6px; letter-spacing: -.01em; }
.page-icon { font-size: 52px; line-height: 1; margin-top: 28px; }
.page-quote { border-left: 3px solid var(--line-strong); padding: 2px 14px; color: var(--muted); font-style: italic; font-family: var(--serif); margin: 10px 0 24px; }
.banner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0 28px; }
.banner div { border-left: 3px solid var(--accent); padding: 6px 10px; font-size: 11.5px; letter-spacing: .12em; color: var(--muted); background: var(--bg-side); border-radius: 0 6px 6px 0; }

/* Sections (Modul-Dashboards) */
.sections { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.section { min-width: 0; }
.section.full { grid-column: 1 / -1; }
.section-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.section-head h3 { font-size: 15px; margin: 0; font-weight: 650; padding: 2px 8px; border-radius: 4px; background: var(--c-brown-bg); cursor: pointer; user-select: none; }
.section-head h3.gray { background: var(--c-gray-bg); }
.section-head .tw { color: var(--faint); font-size: 10px; transition: transform .15s; cursor: pointer; }
.section-head .tw.open { transform: rotate(90deg); }
.section-head .more { margin-left: auto; }

/* Views */
.view-bar { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 10px; flex-wrap: wrap; }
.view-tab { border: 0; background: transparent; padding: 6px 10px; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.view-tab:hover { color: var(--text); }
.view-tab.active { color: var(--text); border-bottom-color: var(--text); font-weight: 550; }
.view-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; padding: 2px 0; }
.view-search { border: 0; background: transparent; outline: none; width: 0; transition: width .2s; font-size: 14px; }
.view-search.open { width: 160px; border-bottom: 1px solid var(--line-strong); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 10px; }
.chip-filter { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 20px; padding: 1px 4px 1px 10px; font-size: 12.5px; color: var(--muted); background: var(--card); }
.chip-filter button { border: 0; background: none; cursor: pointer; color: var(--faint); }
.empty { color: var(--faint); padding: 14px 8px; font-size: 14px; }
.sumline { font-size: 13px; color: var(--muted); text-align: right; padding: 6px 8px; border-top: 1px solid var(--line); }
.sumline b { color: var(--text); }

/* Liste */
.list-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; cursor: pointer; min-height: 34px; }
.list-row:hover { background: var(--bg-hover); }
.list-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .props { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; overflow: hidden; justify-content: flex-end; max-width: 78%; }
.list-row .props > * { flex-shrink: 0; max-width: 180px; }
.item-icon { width: 20px; text-align: center; flex: none; }
.item-icon img { width: 18px; height: 18px; object-fit: cover; border-radius: 3px; vertical-align: -3px; }
.group-head { font-size: 13px; color: var(--muted); padding: 12px 8px 4px; display: flex; gap: 8px; align-items: center; }
.group-head .count { color: var(--faint); }
.quick-add { display: flex; align-items: center; gap: 8px; padding: 4px 8px; color: var(--faint); }
.quick-add input { border: 0; background: transparent; outline: none; flex: 1; padding: 4px 0; }

/* Tabelle */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table.db { border-collapse: collapse; min-width: 100%; font-size: 14px; }
table.db th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 6px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
table.db th:last-child, table.db td:last-child { border-right: 0; }
table.db td { padding: 6px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; max-width: 320px; }
table.db tr:hover td { background: var(--bg-hover); }
table.db td.title { font-weight: 500; cursor: pointer; min-width: 220px; }
table.db td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.db td .cell { display: flex; flex-wrap: wrap; gap: 4px; }

/* Board */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.board-col { width: 260px; flex: none; border-radius: 8px; padding: 6px; background: var(--bg-side); }
.board-col.drop { outline: 2px dashed var(--accent); }
.board-col-head { display: flex; align-items: center; gap: 6px; padding: 4px 4px 8px; font-size: 13.5px; }
.board-col-head .count { color: var(--faint); }
.card { background: var(--card); border-radius: 6px; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .04); padding: 8px 10px; margin-bottom: 6px; cursor: pointer; }
.card:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 2px 6px rgba(0, 0, 0, .06); }
.card .t { font-weight: 500; font-size: 14px; margin-bottom: 4px; word-break: break-word; }
.card .props { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.card.dragging { opacity: .5; }

/* Galerie */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gallery.small { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.gcard { background: var(--card); border-radius: 8px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.gcard:hover { box-shadow: 0 0 0 1px var(--line-strong), var(--shadow); transform: translateY(-1px); }
.gcover { aspect-ratio: 16 / 10; background: var(--bg-side) center/cover no-repeat; display: grid; place-items: center; font-size: 34px; }
.gcover.contain { background-size: contain; background-color: var(--bg-side); aspect-ratio: 3 / 4; }
.gbody { padding: 8px 10px 10px; }
.gbody .t { font-weight: 550; font-size: 14px; margin-bottom: 4px; }
.gbody .props { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 13px; }
.big-number { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Kalender */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cal-head h4 { margin: 0; font-size: 16px; min-width: 150px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dow { font-size: 12px; color: var(--muted); padding: 4px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; font-size: 12px; position: relative; }
.cal .day.other { background: var(--bg-side); color: var(--faint); }
.cal .day.today .dn { background: var(--danger); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-grid; place-items: center; }
.cal .day .add { position: absolute; top: 2px; right: 2px; opacity: 0; }
.cal .day:hover .add { opacity: 1; }
.cal .ev { background: var(--card); box-shadow: 0 0 0 1px var(--line); border-radius: 4px; padding: 1px 6px; margin-top: 3px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev:hover { box-shadow: 0 0 0 1px var(--line-strong); }

/* Pills */
.pill { display: inline-flex; align-items: center; max-width: 100%; border-radius: 4px; padding: 0 6px; font-size: 12.5px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--c-default-bg); color: var(--text); }
.pill.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 5px; opacity: .8; flex: none; }
.pill.rel { background: transparent; padding: 0 2px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
.pill.rel:hover { background: var(--bg-hover); }
.c-gray { color: var(--c-gray); } .c-brown { color: var(--c-brown); } .c-orange { color: var(--c-orange); } .c-yellow { color: var(--c-yellow); } .c-green { color: var(--c-green); } .c-blue { color: var(--c-blue); } .c-purple { color: var(--c-purple); } .c-pink { color: var(--c-pink); } .c-red { color: var(--c-red); }
.c-gray-bg { background: var(--c-gray-bg); } .c-brown-bg { background: var(--c-brown-bg); } .c-orange-bg { background: var(--c-orange-bg); } .c-yellow-bg { background: var(--c-yellow-bg); } .c-green-bg { background: var(--c-green-bg); } .c-blue-bg { background: var(--c-blue-bg); } .c-purple-bg { background: var(--c-purple-bg); } .c-pink-bg { background: var(--c-pink-bg); } .c-red-bg { background: var(--c-red-bg); }
.pill.o-gray { background: var(--c-gray-bg); color: var(--c-gray); } .pill.o-brown { background: var(--c-brown-bg); color: var(--c-brown); } .pill.o-orange { background: var(--c-orange-bg); color: var(--c-orange); }
.pill.o-yellow { background: var(--c-yellow-bg); color: var(--c-yellow); } .pill.o-green { background: var(--c-green-bg); color: var(--c-green); } .pill.o-blue { background: var(--c-blue-bg); color: var(--c-blue); }
.pill.o-purple { background: var(--c-purple-bg); color: var(--c-purple); } .pill.o-pink { background: var(--c-pink-bg); color: var(--c-pink); } .pill.o-red { background: var(--c-red-bg); color: var(--c-red); }
.pill:not(.status).o-gray, .pill:not(.status).o-brown, .pill:not(.status).o-orange, .pill:not(.status).o-yellow, .pill:not(.status).o-green, .pill:not(.status).o-blue, .pill:not(.status).o-purple, .pill:not(.status).o-pink, .pill:not(.status).o-red { color: var(--text); }
.val-date, .val-num { font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.val-link { color: var(--muted); font-size: 13px; text-decoration: underline; text-decoration-color: var(--line-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; display: inline-block; vertical-align: bottom; }
.thumb { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px var(--line); }

/* Item-Seite */
.peek-backdrop { position: fixed; inset: 0; background: rgba(20, 15, 10, .18); z-index: 40; animation: fade .15s; }
.peek { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); background: var(--bg); z-index: 41; box-shadow: var(--shadow); overflow-y: auto; animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }
.peek .topbar { background: var(--bg); }
.item-cover { height: 210px; background: var(--bg-side) center/cover no-repeat; position: relative; }
.item-cover .cover-actions { position: absolute; right: 12px; bottom: 10px; opacity: 0; transition: opacity .15s; display: flex; gap: 6px; }
.item-cover:hover .cover-actions { opacity: 1; }
.item-page { max-width: 820px; margin: 0 auto; padding: 0 56px 140px; }
.peek .item-page { padding: 0 44px 120px; }
.item-icon-big { font-size: 56px; line-height: 1; margin-top: 28px; cursor: pointer; display: inline-block; border-radius: 8px; padding: 2px; }
.item-icon-big img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.item-icon-big:hover { background: var(--bg-hover); }
.item-cover + .item-page .item-icon-big { margin-top: -36px; position: relative; }
.item-meta-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; margin: 16px 0 0; }
.item-page:hover .item-meta-actions { opacity: 1; }
.item-title { font-family: var(--serif); font-size: 36px; font-weight: 650; line-height: 1.2; outline: none; margin: 8px 0 14px; word-break: break-word; }
.item-title:empty::before { content: attr(data-ph); color: var(--faint); }
.props-panel { margin: 0 0 18px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.prop-row { display: grid; grid-template-columns: 170px 1fr; gap: 8px; align-items: start; min-height: 34px; }
.prop-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; padding: 6px 8px; border-radius: 4px; cursor: pointer; overflow: hidden; }
.prop-label:hover { background: var(--bg-hover); }
.prop-label .ti { width: 16px; text-align: center; opacity: .75; font-size: 12px; flex: none; }
.prop-value { padding: 5px 8px; border-radius: 4px; cursor: pointer; min-height: 32px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 14px; word-break: break-word; }
.prop-value:hover { background: var(--bg-hover); }
.prop-value.ro { cursor: default; } .prop-value.ro:hover { background: transparent; }
.prop-value .placeholder { color: var(--faint); }
.prop-value input.inline { border: 0; outline: 0; background: transparent; width: 100%; padding: 0; }
.backlinks { margin: 26px 0 0; }
.backlinks h4 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.lock-badge { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; padding: 1px 8px; }

/* Editor */
.editor { padding: 2px 0 40px; min-height: 120px; }
.blk { position: relative; display: flex; align-items: flex-start; border-radius: 4px; }
.blk .handle { position: absolute; left: -46px; top: 3px; display: flex; opacity: 0; transition: opacity .1s; }
.blk:hover .handle { opacity: 1; }
.blk .handle button { border: 0; background: transparent; color: var(--faint); cursor: grab; width: 22px; height: 24px; border-radius: 4px; font-size: 14px; padding: 0; }
.blk .handle button:hover { background: var(--bg-hover); color: var(--text); }
.blk.drop-above { box-shadow: 0 -2px 0 var(--accent); } .blk.drop-below { box-shadow: 0 2px 0 var(--accent); }
.blk .ed { flex: 1; min-width: 0; outline: none; padding: 3px 2px; min-height: 1.6em; word-break: break-word; white-space: pre-wrap; }
.blk .ed:empty::before { content: attr(data-ph); color: var(--faint); pointer-events: none; }
.blk .ed:not(:focus):empty::before { content: ''; }
.blk.only .ed:empty::before { content: attr(data-ph) !important; }
.blk.t-h1 .ed { font-family: var(--serif); font-size: 28px; font-weight: 650; margin-top: 18px; line-height: 1.25; }
.blk.t-h2 .ed { font-family: var(--serif); font-size: 22px; font-weight: 650; margin-top: 14px; line-height: 1.3; }
.blk.t-h3 .ed { font-size: 18px; font-weight: 650; margin-top: 10px; }
.blk .marker { width: 24px; flex: none; text-align: center; padding-top: 3px; color: var(--text); user-select: none; }
.blk.t-ul .marker::before { content: '•'; font-size: 20px; line-height: 1.2; }
.blk.t-todo .marker { padding-top: 6px; }
.blk.t-todo.done .ed { color: var(--faint); text-decoration: line-through; }
.blk.t-toggle .marker { cursor: pointer; font-size: 11px; padding-top: 6px; transition: transform .15s; color: var(--muted); }
.blk.t-toggle.open .marker { transform: rotate(90deg); }
.blk.t-toggle.h1 .ed { font-size: 26px; font-weight: 650; font-family: var(--serif); } .blk.t-toggle.h2 .ed { font-size: 21px; font-weight: 650; font-family: var(--serif); } .blk.t-toggle.h3 .ed { font-size: 17px; font-weight: 650; }
.blk.t-quote .ed { border-left: 3px solid var(--text); padding-left: 14px; font-size: 16px; }
.blk.t-callout { background: var(--bg-side); border-radius: 6px; padding: 10px 12px; margin: 4px 0; }
.blk.t-callout .marker { font-size: 18px; padding-top: 1px; cursor: pointer; }
.blk.t-code .ed { font-family: var(--mono); font-size: 13.5px; background: var(--bg-side); border-radius: 6px; padding: 12px 14px; white-space: pre; overflow-x: auto; }
.blk.t-divider .hr { flex: 1; border-top: 1px solid var(--line-strong); margin: 14px 0; }
.blk.t-image figure { margin: 6px 0; flex: 1; }
.blk.t-image img { border-radius: 6px; max-height: 520px; object-fit: contain; display: block; }
.blk.t-image figcaption { font-size: 13px; color: var(--muted); padding-top: 4px; outline: none; }
.bookmark { flex: 1; display: block; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 4px 0; text-decoration: none; overflow: hidden; }
.bookmark:hover { background: var(--bg-hover); }
.bookmark .u { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pagelink { flex: 1; display: flex; gap: 8px; align-items: center; padding: 4px 2px; text-decoration: none; font-weight: 500; }
.pagelink:hover { background: var(--bg-hover); border-radius: 4px; }
.pagelink span.t { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.blk table.simple { border-collapse: collapse; margin: 6px 0; font-size: 14px; flex: 1; }
.blk table.simple td { border: 1px solid var(--line); padding: 5px 9px; outline: none; min-width: 60px; }
.blk table.simple tr.hd td { background: var(--bg-side); font-weight: 600; }
.ed a, .mention { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.ed code { font-family: var(--mono); font-size: .88em; background: var(--c-red-bg); color: var(--c-red); padding: 1px 4px; border-radius: 4px; }
.blk.bc-gray .ed { color: var(--c-gray); } .blk.bc-brown .ed { color: var(--c-brown); } .blk.bc-orange .ed { color: var(--c-orange); } .blk.bc-yellow .ed { color: var(--c-yellow); } .blk.bc-green .ed { color: var(--c-green); } .blk.bc-blue .ed { color: var(--c-blue); } .blk.bc-purple .ed { color: var(--c-purple); } .blk.bc-pink .ed { color: var(--c-pink); } .blk.bc-red .ed { color: var(--c-red); }
.blk[class*="bc-"][class*="_background"] .ed { color: inherit; }
.blk.bc-gray_background { background: var(--c-gray-bg); } .blk.bc-brown_background { background: var(--c-brown-bg); } .blk.bc-orange_background { background: var(--c-orange-bg); } .blk.bc-yellow_background { background: var(--c-yellow-bg); } .blk.bc-green_background { background: var(--c-green-bg); } .blk.bc-blue_background { background: var(--c-blue-bg); } .blk.bc-purple_background { background: var(--c-purple-bg); } .blk.bc-pink_background { background: var(--c-pink-bg); } .blk.bc-red_background { background: var(--c-red-bg); }
.c-gray-bg, .c-brown-bg, .c-orange-bg, .c-yellow-bg, .c-green-bg, .c-blue-bg, .c-purple-bg, .c-pink-bg, .c-red-bg { border-radius: 3px; padding: 0 2px; }

/* Popover / Menü / Modal */
.pop { position: fixed; z-index: 60; background: var(--card); border-radius: 8px; box-shadow: 0 0 0 1px var(--line), var(--shadow); min-width: 220px; max-width: 340px; max-height: 60vh; overflow-y: auto; padding: 6px; animation: fade .1s; }
.pop .pop-search { width: 100%; border: 0; outline: 0; background: var(--bg-side); border-radius: 6px; padding: 6px 8px; margin-bottom: 4px; }
.pop .opt { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 5px; cursor: pointer; font-size: 14px; }
.pop .opt:hover, .pop .opt.sel { background: var(--bg-hover); }
.pop .opt .chk { margin-left: auto; color: var(--accent); }
.pop .opt .desc { color: var(--faint); font-size: 12px; margin-left: auto; }
.pop .sep { height: 1px; background: var(--line); margin: 4px 0; }
.pop .lbl { font-size: 12px; color: var(--faint); padding: 6px 8px 2px; }
.modal-bg { position: fixed; inset: 0; background: rgba(20, 15, 10, .35); z-index: 70; display: grid; place-items: start center; padding: 10vh 16px 16px; animation: fade .12s; overflow-y: auto; }
.modal { background: var(--card); border-radius: 12px; box-shadow: var(--shadow); width: min(560px, 100%); padding: 20px 22px; }
.modal h3 { margin: 0 0 14px; font-size: 18px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.search-modal { padding: 0; overflow: hidden; width: min(640px, 100%); }
.search-modal input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 17px; outline: none; background: transparent; }
.search-results { max-height: 55vh; overflow-y: auto; padding: 6px; }
.search-results .opt { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.search-results .opt.sel, .search-results .opt:hover { background: var(--bg-hover); }
.toast-wrap { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2f2a25; color: #fff; border-radius: 8px; padding: 9px 16px; font-size: 14px; box-shadow: var(--shadow); animation: fade .15s; }
.toast.err { background: var(--danger); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-grid button { border: 0; background: transparent; font-size: 20px; padding: 4px; border-radius: 6px; cursor: pointer; }
.emoji-grid button:hover { background: var(--bg-hover); }

/* Heute */
.today-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 30px 0 22px; }
.today-head .date { font-family: var(--serif); font-size: 40px; font-weight: 600; line-height: 1.1; }
.today-head .sub { color: var(--muted); }
.today-quote { font-family: var(--serif); font-style: italic; color: var(--muted); border-left: 3px solid var(--accent); padding: 4px 16px; margin: 0 0 26px; max-width: 760px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.tile { background: var(--card); border-radius: 10px; box-shadow: 0 0 0 1px var(--line); padding: 14px 16px; min-width: 0; }
.tile h3 { margin: 0 0 10px; font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.tile h3 a { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--muted); text-decoration: none; }
.tile h3 a:hover { color: var(--text); }
.habit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 4px 2px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.check-row:hover { background: var(--bg-hover); }
.check-row.done span { color: var(--faint); text-decoration: line-through; }
.kpi { display: flex; justify-content: space-between; padding: 5px 2px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kpi:last-child { border-bottom: 0; }
.kpi b { font-variant-numeric: tabular-nums; }
.progress { height: 6px; background: var(--bg-side); border-radius: 4px; overflow: hidden; margin: 8px 0 2px; }
.progress div { height: 100%; background: var(--accent); }

/* Auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, var(--accent-soft), transparent); }
.auth-card { width: min(400px, 100%); background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 30px 28px; }
.auth-card .brand { text-align: center; font-size: 18px; padding-bottom: 20px; }
.auth-card .err { color: var(--danger); font-size: 14px; min-height: 20px; margin-bottom: 6px; }

/* Einstellungen */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 10px 0 20px; flex-wrap: wrap; }
.tabs a { padding: 7px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--text); border-bottom-color: var(--text); }
.panel { background: var(--card); border-radius: 10px; box-shadow: 0 0 0 1px var(--line); padding: 18px 20px; margin-bottom: 18px; }
.panel h3 { margin: 0 0 10px; font-size: 16px; }
.steps { padding-left: 20px; margin: 6px 0 14px; } .steps li { margin: 4px 0; }
.log { background: #1f1c19; color: #e9e1d6; font: 12.5px/1.55 var(--mono); border-radius: 8px; padding: 12px 14px; max-height: 360px; overflow-y: auto; white-space: pre-wrap; }
.qr { background: #fff; padding: 10px; border-radius: 8px; display: inline-block; }
.qr svg { width: 180px; height: 180px; display: block; }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain td, table.plain th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.plain th { color: var(--muted); font-weight: 500; font-size: 13px; }
code.inline { font-family: var(--mono); font-size: 13px; background: var(--bg-side); padding: 1px 5px; border-radius: 4px; word-break: break-all; }

/* Mobile */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .layout.side-open .sidebar { transform: none; }
  .layout.side-open::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .25); z-index: 45; }
  .menu-toggle { display: inline-grid; }
  .page { padding: 4px 16px 100px; }
  .item-page, .peek .item-page { padding: 0 18px 100px; }
  .sections { grid-template-columns: 1fr; }
  .banner { grid-template-columns: 1fr 1fr; }
  .prop-row { grid-template-columns: 120px 1fr; }
  .page-title { font-size: 30px; }
  .today-head .date { font-size: 30px; }
  .blk .handle { display: none; }
  .list-row .props { max-width: 45%; }
  .tiles { grid-template-columns: 1fr; }
  .cal .day { min-height: 64px; }
}
.tiles > div:empty { display: none; }
