:root {
  --bg: #ffffff; --bg-side: #f8f8f6; --bg-hover: rgba(60, 58, 50, .07); --bg-active: rgba(60, 58, 50, .12);
  --text: #2c2b28; --text-2: #5f5e5b; --text-3: #a9a7a0; --border: rgba(60, 58, 50, .13);
  --pop: #ffffff; --shadow: 0 0 0 1px rgba(15, 15, 15, .06), 0 6px 22px rgba(15, 15, 15, .14);
  --accent: #2383e2; --code-bg: rgba(135, 131, 120, .15); --callout: #f2f1ee; --inline-code: #c4433c;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #191919; --bg-side: #202020; --bg-hover: rgba(255, 255, 255, .06); --bg-active: rgba(255, 255, 255, .11);
  --text: #e6e5e1; --text-2: #9b9a95; --text-3: #6c6b67; --border: rgba(255, 255, 255, .11);
  --pop: #252525; --shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 8px 26px rgba(0, 0, 0, .5);
  --code-bg: rgba(135, 131, 120, .22); --callout: #262626; --inline-code: #f0847d;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: auto; text-rendering: optimizeLegibility; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
[hidden] { display: none !important; }
#app { display: flex; height: 100vh; }

/* Seitenleiste */
#sidebar { width: 270px; flex: none; background: var(--bg-side); border-right: 1px solid var(--border); display: flex; flex-direction: column; font-size: 14px; color: var(--text-2); user-select: none; }
.collapsed #sidebar { display: none; }
.ws { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 12px; color: var(--text); font-weight: 600; }
.ws-badge { width: 22px; height: 22px; border-radius: 5px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 13px; }
.ws-name { flex: 1; }
.quick { padding: 2px 6px; }
.quick.bottom { margin-top: auto; padding-bottom: 8px; border-top: 1px solid var(--border); padding-top: 6px; }
#tree { flex: 1; overflow-y: auto; padding: 6px; }
.sect { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-3); padding: 12px 4px 4px 8px; min-height: 34px; }
.sect .ttl { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sect button { width: 22px; height: 22px; border-radius: 4px; opacity: 0; }
.sect:hover button, .sect button:focus-visible { opacity: 1; }
.sect button:hover { background: var(--bg-hover); }
.s-ico { display: flex; }
.row.muted { color: var(--text-3); margin-top: 8px; }
.row { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 30px; padding: 2px 6px; border-radius: 6px; text-align: left; cursor: pointer; font-weight: 500; }
.row:hover { background: var(--bg-hover); }
.row.active { background: var(--bg-active); color: var(--text); }
.row .ico { width: 22px; flex: none; text-align: center; }
.row .ttl { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.row kbd { font: 11px var(--font); color: var(--text-3); }
.row .caret { width: 20px; height: 20px; flex: none; border-radius: 4px; color: var(--text-3); }
.row .caret:hover, .row .acts button:hover, .icon-btn:hover { background: var(--bg-hover); }
.row .caret.open svg { transform: rotate(90deg); }
.row .caret svg { transition: transform .12s; }
.row .acts { display: none; gap: 2px; }
.row:hover .acts { display: flex; }
.row .acts button { width: 22px; height: 22px; border-radius: 4px; }
.empty { font-size: 13px; color: var(--text-3); padding: 4px 8px; }
.icon-btn { width: 28px; height: 28px; border-radius: 6px; color: var(--text-2); flex: none; }

/* Rahmen */
#frame { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#topbar { height: 44px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 14px; }
#topbar [data-act="expand"] { display: none; }
.collapsed #topbar [data-act="expand"] { display: block; }
#crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; overflow: hidden; white-space: nowrap; }
#crumbs button { padding: 2px 6px; border-radius: 4px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
#crumbs button:hover { background: var(--bg-hover); }
#crumbs .sep { color: var(--text-3); }
.top-right { display: flex; gap: 2px; }
.icon-btn.on { color: #e0a100; }
.icon-btn.on svg { fill: currentColor; }
#main { flex: 1; overflow-y: auto; }
.page { max-width: 900px; margin: 0 auto; padding: 56px 96px 0; min-height: 100%; display: flex; flex-direction: column; }
.head { padding-inline-start: 0; }
.pico { font-size: 64px; line-height: 1.1; border-radius: 6px; padding: 4px; margin-left: -4px; display: inline-flex; }
.pico .ic { width: 64px; height: 64px; stroke-width: 1.5; }
.pico:hover { background: var(--bg-hover); }
.addico { font-size: 14px; color: var(--text-3); padding: 2px 6px; border-radius: 4px; opacity: 0; transition: opacity .1s; }
.head:hover .addico, .addico:focus-visible { opacity: 1; }
.addico:hover { background: var(--bg-hover); }
.title { font-size: 40px; font-weight: 700; line-height: 1.2; margin: 6px 0 8px; outline: none; white-space: break-spaces; word-break: break-word; }
[data-ph]:empty::before { content: attr(data-ph); color: var(--text-3); pointer-events: none; }
.block .content[data-ph]:empty::before { opacity: 0; }
.block .content[data-ph]:focus:empty::before, .block:not(.t-text) .content[data-ph]:empty::before { opacity: 1; }
.tail { flex: 1; min-height: 160px; cursor: text; }

/* Blöcke */
.block { position: relative; display: flex; margin: 1px 0; padding-left: calc(var(--indent, 0) * 26px); border-radius: 4px; }
.block.hidden { display: none; }
.block.flash { background: rgba(35, 131, 226, .14); transition: background .3s; }
.gutter { position: absolute; left: calc(var(--indent, 0) * 26px - 50px); top: 3px; width: 48px; display: flex; justify-content: flex-end; gap: 0; opacity: 0; transition: opacity .1s; }
.block:hover > .gutter { opacity: 1; }
.gutter button { width: 22px; height: 24px; border-radius: 4px; color: var(--text-3); display: grid; place-items: center; }
.gutter button:hover { background: var(--bg-hover); }
.gutter .drag { cursor: grab; }
.body { flex: 1; min-width: 0; display: flex; align-items: flex-start; }
.content { flex: 1; min-width: 0; padding: 3px 2px; outline: none; white-space: break-spaces; word-break: break-word; caret-color: var(--text); }
.content a { color: inherit; text-decoration: underline; text-decoration-color: var(--text-3); cursor: pointer; }
.content code { font-family: var(--mono); font-size: 85%; background: var(--code-bg); color: var(--inline-code); border-radius: 4px; padding: .15em .35em; }
.prefix { flex: none; width: 26px; min-height: 30px; display: flex; align-items: center; justify-content: center; user-select: none; }
.t-h1 .content { font-size: 1.875em; font-weight: 600; line-height: 1.3; margin-top: 1.1em; }
.t-h2 .content { font-size: 1.5em; font-weight: 600; line-height: 1.3; margin-top: .9em; }
.t-h3 .content { font-size: 1.25em; font-weight: 600; line-height: 1.3; margin-top: .6em; }
.t-bullet .prefix { font-size: 1.4em; line-height: 1; }
.t-number .prefix { width: auto; min-width: 26px; padding-right: 4px; justify-content: flex-end; }
.t-todo input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.t-todo.checked .content { color: var(--text-3); text-decoration: line-through; }
.t-toggle .prefix button { width: 22px; height: 22px; border-radius: 4px; font-size: 11px; transition: transform .12s; }
.t-toggle .prefix button:hover { background: var(--bg-hover); }
.t-toggle.open > .body .prefix button { transform: rotate(90deg); }
.t-quote .body { border-left: 3px solid var(--text); padding-left: 12px; margin: 3px 0; }
.t-callout .body { background: var(--callout); border-radius: 6px; padding: 12px 12px 12px 8px; margin: 4px 0; }
.t-code .body { background: var(--code-bg); border-radius: 6px; padding: 22px 16px; margin: 4px 0; }
.t-code .content { font-family: var(--mono); font-size: 14px; white-space: pre-wrap; tab-size: 2; }
.t-divider .body { padding: 13px 0; cursor: default; outline: none; }
.t-divider hr { flex: 1; border: 0; border-top: 1px solid var(--border); margin: 0; }
.t-divider .body:focus hr { border-top-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.t-page .pagelink { display: flex; align-items: center; gap: 6px; width: 100%; padding: 3px 2px; border-radius: 4px; font-weight: 500; cursor: pointer; text-align: left; }
.t-page .pagelink:hover { background: var(--bg-hover); }
.t-page .pagelink span:last-child { border-bottom: 1px solid var(--border); }
.t-page .gone span:last-child { text-decoration: line-through; color: var(--text-3); }
.block.drop-before::before, .block.drop-after::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; background: var(--accent); opacity: .5; border-radius: 2px; }
.block.drop-before::before { top: -2px; }
.block.drop-after::after { bottom: -2px; }

/* Popups */
.pop { position: fixed; z-index: 30; background: var(--pop); border-radius: 8px; box-shadow: var(--shadow); font-size: 14px; }
#slash { width: 300px; max-height: 340px; overflow-y: auto; padding: 4px; }
.pop .item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 5px 8px; border-radius: 5px; text-align: left; }
.pop .item:hover, .pop .item.sel { background: var(--bg-hover); }
.pop .item.danger { color: #d44c47; }
.pop .glyph { width: 36px; height: 36px; flex: none; border: 1px solid var(--border); border-radius: 5px; display: grid; place-items: center; font-size: 15px; background: var(--bg); }
.pop .item small { display: block; color: var(--text-3); font-size: 12px; }
.pop .label { font-size: 12px; color: var(--text-3); padding: 6px 8px 2px; }
.pop .none { padding: 8px; color: var(--text-3); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; padding: 4px; }
.emoji-grid button { font-size: 20px; height: 30px; border-radius: 4px; }
.emoji-grid button:hover { background: var(--bg-hover); }
#fmt { display: flex; padding: 3px; gap: 1px; }
#fmt button { min-width: 30px; height: 28px; border-radius: 5px; padding: 0 6px; }
#fmt button:hover { background: var(--bg-hover); }
#search { position: fixed; inset: 0; z-index: 40; background: rgba(15, 15, 15, .4); display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; }
.search-box { width: min(620px, 92vw); background: var(--pop); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
#search-input { width: 100%; border: 0; outline: 0; background: none; color: var(--text); font: 18px var(--font); padding: 16px 18px; border-bottom: 1px solid var(--border); }
#search-results { max-height: 50vh; overflow-y: auto; padding: 6px; font-size: 14px; }
#search-results .item { display: flex; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 6px; text-align: left; }
#search-results .item.sel, #search-results .item:hover { background: var(--bg-hover); }
#search-results small { display: block; color: var(--text-3); }
@media (max-width: 760px) { .page { padding: 32px 24px 0 56px; } #sidebar { position: fixed; z-index: 20; height: 100%; box-shadow: var(--shadow); } }

/* Datenbanken */
.page.wide { max-width: none; }
.body > .dbhost { flex: 1; min-width: 0; margin: 6px 0; }
.db { font-size: 14px; }
.db button { border-radius: 5px; }
.db-title button { font-size: 20px; font-weight: 700; padding: 2px 6px; margin-left: -6px; }
.db-title button:hover, .db-tools button:hover, .tab:hover, .db-foot button:hover, .db-table th button:hover, .b-new:hover, .b-add:hover, .g-new:hover, .cal-bar button:hover { background: var(--bg-hover); }
.db-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding: 4px 0; }
.db-tabs { display: flex; gap: 2px; flex: 1; min-width: 0; flex-wrap: wrap; }
.tab { padding: 4px 8px; color: var(--text-2); font-weight: 500; }
.tab.on { color: var(--text); background: var(--bg-hover); }
.db-tools { display: flex; align-items: center; gap: 4px; }
.db-tools button { padding: 4px 8px; color: var(--text-2); }
.db-tools button.on { color: var(--accent); }
.db-q { width: 130px; font: inherit; color: var(--text); background: none; border: 1px solid var(--border); border-radius: 5px; padding: 3px 8px; outline: none; }
.db-q:focus, .pop-in:focus, .frow select:focus, .frow input:focus { border-color: var(--accent); }
.db-tools .db-new { background: var(--accent); color: #fff; font-weight: 500; padding: 4px 12px; }
.db-tools .db-new:hover { background: #1b6fc4; }
.db-view { padding-top: 6px; }
.db-scroll { overflow-x: auto; }
.db-table { border-collapse: collapse; min-width: 100%; }
.db-table th, .db-table td { border: 1px solid var(--border); border-left: 0; padding: 0; height: 34px; min-width: 150px; text-align: left; font-weight: 400; position: relative; }
.db-table th:last-child, .db-table td:last-child { border-right: 0; min-width: 40px; width: 40px; }
.db-table thead th { border-top: 0; color: var(--text-2); }
.db-table th button { width: 100%; height: 33px; padding: 0 8px; text-align: left; border-radius: 0; white-space: nowrap; }
.pg { display: inline-block; width: 20px; color: var(--text-3); font-size: 12px; }
.db-table .td-title { min-width: 260px; font-weight: 500; }
.c-in { width: 100%; height: 33px; border: 0; outline: 0; background: none; color: inherit; font: inherit; padding: 0 8px; }
.c-in:focus { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 2px; }
.c-check { width: 16px; height: 16px; margin: 0 8px; accent-color: var(--accent); vertical-align: middle; }
.c-sel { width: 100%; min-height: 33px; padding: 4px 8px; text-align: left; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; border-radius: 0 !important; }
.c-sel:hover { background: var(--bg-hover); }
.c-empty { color: transparent; }
.rp .c-empty { color: var(--text-3); }
.td-title .open { position: absolute; right: 6px; top: 6px; font-size: 11px; padding: 2px 6px; border: 1px solid var(--border); background: var(--pop); color: var(--text-2); opacity: 0; }
tr:hover .open, .open:focus-visible { opacity: 1; }
.td-menu button { width: 100%; height: 33px; color: var(--text-3); opacity: 0; }
tr:hover .td-menu button, .td-menu button:focus-visible { opacity: 1; }
.db-foot { display: flex; align-items: center; gap: 12px; padding: 4px 0; color: var(--text-3); }
.db-foot button { padding: 4px 8px; color: var(--text-2); }
.chip { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 13px; line-height: 20px; white-space: nowrap; background: rgba(135, 131, 120, .2); }
.plain { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.c-blue { background: rgba(35, 131, 226, .22); } .c-green { background: rgba(60, 160, 100, .24); } .c-yellow { background: rgba(230, 180, 40, .3); }
.c-orange { background: rgba(230, 130, 40, .26); } .c-red { background: rgba(225, 80, 70, .24); } .c-purple { background: rgba(150, 90, 210, .24); }
.c-pink { background: rgba(225, 90, 160, .22); } .c-brown { background: rgba(150, 105, 70, .28); } .c-none { background: none; color: var(--text-3); padding-left: 0; }
.db-board { display: flex; gap: 10px; overflow-x: auto; align-items: flex-start; padding-bottom: 8px; }
.b-col { width: 260px; flex: none; border-radius: 8px; padding: 6px; background: var(--bg-side); min-height: 80px; }
.b-col.over, .cal-day.over { outline: 2px solid var(--accent); outline-offset: -2px; }
.b-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; }
.b-n { color: var(--text-3); }
.card { background: var(--pop); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 10px; margin-bottom: 6px; cursor: pointer; }
.card:hover { background: var(--bg-hover); }
.card-t { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.r-ico { flex: none; } .r-ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-m { flex: none; width: 22px; height: 22px; color: var(--text-3); opacity: 0; }
.card:hover .card-m, .li:hover .card-m, .card-m:focus-visible { opacity: 1; }
.card-p { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.card-p:empty { display: none; }
.b-new, .b-add, .g-new { color: var(--text-3); padding: 4px 8px; text-align: left; }
.b-new { width: 100%; } .b-add { flex: none; white-space: nowrap; }
.li { display: flex; align-items: center; gap: 12px; padding: 5px 6px; border-radius: 5px; cursor: pointer; }
.li:hover { background: var(--bg-hover); }
.li-t { display: flex; gap: 6px; flex: 1; min-width: 0; font-weight: 500; }
.li-p { display: flex; gap: 6px; align-items: center; overflow: hidden; }
.db-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.g-card { margin: 0; padding: 0 0 8px; overflow: hidden; }
.g-card .card-t, .g-card .card-p { padding: 0 10px; }
.g-cover { height: 96px; display: grid; place-items: center; font-size: 40px; background: var(--bg-side); margin-bottom: 8px; }
.g-new { border: 1px dashed var(--border); border-radius: 8px !important; min-height: 60px; text-align: center; }
.cal-bar { display: flex; align-items: center; gap: 8px; padding: 4px 0 8px; }
.cal-bar button { padding: 2px 8px; color: var(--text-2); }
.cal-info { color: var(--text-3); font-size: 12px; }
.grow { flex: 1; }
.cal-wd, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd span { text-align: right; padding: 2px 8px; font-size: 12px; color: var(--text-3); }
.cal-days { border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-day { min-height: 104px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px; }
.cal-day.off { background: var(--bg-side); } .cal-day.off .cal-n span { color: var(--text-3); }
.cal-n { display: flex; justify-content: space-between; align-items: center; font-size: 13px; height: 24px; }
.cal-n span { min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; }
.today .cal-n span { background: #e0564e; color: #fff; }
.cal-add { width: 20px; height: 20px; color: var(--text-3); opacity: 0; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-card { display: flex; gap: 4px; padding: 3px 6px; margin: 0 0 3px; font-size: 13px; border-radius: 5px; box-shadow: 0 0 0 1px var(--border); }
.db-gone { color: var(--text-3); padding: 8px 2px; }
.rowprops { margin: 4px 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
.rp { display: flex; align-items: center; min-height: 34px; }
.rp-n { width: 170px; flex: none; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-v { flex: 1; min-width: 0; border-radius: 5px; }
.rp-v:hover { background: var(--bg-hover); }
.rp-v .c-sel { border-radius: 5px !important; }
#pop { min-width: 240px; max-width: 480px; max-height: 64vh; overflow-y: auto; padding: 4px; }
.pop-in, .frow select, .frow input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 5px 8px; outline: none; }
.pop-in { width: calc(100% - 8px); margin: 4px; }
.opt { display: flex; align-items: center; }
.opt .item { flex: 1; } .tick { width: 14px; flex: none; }
.pop .x { width: 26px; height: 26px; flex: none; border-radius: 5px; color: var(--text-3); }
.pop .x:hover { background: var(--bg-hover); color: #d44c47; }
.frow { display: flex; gap: 4px; align-items: center; padding: 4px; }
.frow select, .frow input { min-width: 0; flex: 1; }
.c-in.is-empty:not(:focus) { color: transparent; }
.c-in[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; }
td:hover .c-in[type="date"]::-webkit-calendar-picker-indicator, .rp-v:hover .c-in[type="date"]::-webkit-calendar-picker-indicator, .c-in[type="date"]:focus::-webkit-calendar-picker-indicator { opacity: .6; }

/* Lucide-Icons */
.ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.emo { font-size: 1em; line-height: 1; }
.row .ico, .icon-btn, .glyph, .prefix, .r-ico, .s-ico { display: inline-flex; align-items: center; justify-content: center; }
.icon-btn .ic { width: 17px; height: 17px; }
.icon-btn.wide { width: auto; min-width: 28px; padding: 0 6px; gap: 4px; font-size: 12px; }
.pop .item > .ic { color: var(--text-2); }
.pop .item.danger > .ic { color: inherit; }
.pop .glyph .ic { width: 18px; height: 18px; }
#crumbs button { display: inline-flex; align-items: center; gap: 6px; }
#crumbs button span { overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--code-bg); color: var(--text-2); margin-right: 6px; }
.addico { display: inline-flex; align-items: center; gap: 6px; }
.pagelink .ic, .pagelink .emo { flex: none; }
.t-callout .prefix .ic { width: 18px; height: 18px; color: #c98a00; }
.icon-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; padding: 4px; }
.icon-grid button { height: 32px; border-radius: 4px; display: grid; place-items: center; }
.icon-grid button:hover { background: var(--bg-hover); }
.icon-grid .ic { width: 19px; height: 19px; }
#fmt button { display: grid; place-items: center; }
#fmt [data-cmd="ai"] { color: #8a5cf5; }
.av { width: 22px; height: 22px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; flex: none; }
#presence { display: flex; gap: 2px; margin-right: 4px; }
#presence .av { background: #2383e2; color: #fff; box-shadow: 0 0 0 2px var(--bg); }
#netstate { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #d44c47; margin-right: 6px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--bg); padding: 9px 14px; border-radius: 8px; font-size: 14px; max-width: min(560px, 90vw); box-shadow: var(--shadow); }
.primary { background: var(--accent); color: #fff; border-radius: 6px; padding: 5px 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.primary:hover { background: #1b6fc4; }
.hint { font-size: 12px; color: var(--text-3); }

/* Bilder, Dateien, Spalten */
.t-image img { max-width: 100%; border-radius: 4px; display: block; margin: 4px 0; }
.t-image .body:focus img, .t-file .body:focus .filelink, .t-page .body:focus .pagelink { outline: 2px solid var(--accent); outline-offset: 1px; }
.t-image .body, .t-file .body, .t-page .body { outline: none; }
.upload { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px; margin: 3px 0; border-radius: 6px; background: var(--bg-side); color: var(--text-2); text-align: left; }
.upload:hover { background: var(--bg-hover); }
.filelink { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; margin: 2px 0; border-radius: 6px; color: inherit; text-decoration: none; }
.filelink:hover { background: var(--bg-hover); }
.filelink small { color: var(--text-3); }
.t-columns { display: block; }
.cols { display: flex; gap: 24px; align-items: flex-start; position: relative; flex: 1; min-width: 0; }
.col { flex: 1; min-width: 0; position: relative; padding-top: 2px; }
.col-x, .col-add { position: absolute; width: 20px; height: 20px; border-radius: 4px; color: var(--text-3); display: grid; place-items: center; opacity: 0; background: var(--pop); box-shadow: var(--shadow); z-index: 2; }
.col-x { top: -10px; right: 0; }
.col-add { top: -10px; right: -24px; }
.col:hover > .col-x, .cols:hover > .col-add, .col-x:focus-visible, .col-add:focus-visible { opacity: 1; }
.col-x .ic, .col-add .ic { width: 13px; height: 13px; }
.cmark { flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 3px; margin: 4px 0 0 6px; padding: 1px 6px; border-radius: 10px; font-size: 12px; color: #b98300; background: rgba(230, 180, 40, .2); }
.tpl-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 10px; font-size: 14px; color: var(--text-3); }
.tpl-hint button { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-2); }
.tpl-hint button:hover { background: var(--bg-hover); }

/* Kommentare */
#comments { width: 320px; flex: none; border-left: 1px solid var(--border); display: flex; flex-direction: column; font-size: 14px; background: var(--bg); }
.c-head { height: 44px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 14px; border-bottom: 1px solid var(--border); }
.c-list { flex: 1; overflow-y: auto; padding: 8px; }
.cm { padding: 8px; border-radius: 8px; }
.cm:hover { background: var(--bg-hover); }
.cm.done { opacity: .55; }
.cm-h { display: flex; align-items: center; gap: 6px; }
.cm-h time { color: var(--text-3); font-size: 12px; margin-left: auto; }
.c-ctx { display: block; width: 100%; text-align: left; margin: 6px 0 2px; padding: 2px 8px; border-left: 3px solid #e0b030; color: var(--text-2); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cm-t { white-space: pre-wrap; word-break: break-word; margin: 4px 0; }
.cm-a { display: flex; gap: 10px; }
.cm-a button { font-size: 12px; color: var(--text-3); }
.cm-a button:hover { color: var(--text); text-decoration: underline; }
.c-form { border-top: 1px solid var(--border); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.c-form textarea, .ai-box textarea, .cfg textarea { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; resize: vertical; outline: none; }
.c-form textarea:focus, .ai-box textarea:focus, .cfg textarea:focus, .cfg select:focus { border-color: var(--accent); }
.c-form .primary { align-self: flex-end; }
.c-target { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.c-target span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* KI, Formeln, Rollups */
.ai-box, .cfg { width: 420px; max-width: 86vw; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.ai-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-out { white-space: pre-wrap; border-top: 1px solid var(--border); padding: 8px 2px 2px; max-height: 40vh; overflow-y: auto; }
.cfg textarea { font-family: var(--mono); font-size: 13px; }
.cfg label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); }
.cfg select { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 5px 8px; outline: none; }
.cfg code { font-family: var(--mono); background: var(--code-bg); border-radius: 3px; padding: 0 3px; }
.f-out { font-size: 13px; }
.f-out.err, .c-ro.err { color: #d44c47; }
.c-ro { display: block; padding: 6px 8px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.chip.rel { display: inline-flex; align-items: center; gap: 4px; background: none; box-shadow: inset 0 0 0 1px var(--border); }
.chip .ic { width: 13px; height: 13px; }

/* Datenbank: Feinschliff für Icons */
.pg { width: 14px; height: 14px; margin-right: 6px; color: var(--text-3); vertical-align: -2px; display: inline-block; }
.db-table th button { display: flex; align-items: center; gap: 2px; }
.db-table th button .ic:last-child:not(.pg) { margin-left: auto; width: 13px; height: 13px; }
.db-title button, .tab, .db-tools button, .db-foot button, .b-new, .b-add, .g-new { display: inline-flex; align-items: center; gap: 6px; }
.th-add button { justify-content: center; }
.db-newgrp { display: inline-flex; gap: 1px; }
.db-newgrp .db-new:first-child { border-radius: 5px 0 0 5px; }
.db-newgrp .db-new:last-child { border-radius: 0 5px 5px 0; padding: 4px 6px; }
.g-cover .ic { width: 40px; height: 40px; stroke-width: 1.5; color: var(--text-3); }
.plain { display: inline-flex; align-items: center; gap: 3px; }
.rp-n { display: flex; align-items: center; }
.cal-bar button { display: inline-grid; place-items: center; min-height: 26px; }
.tick { display: inline-flex; }

/* Anmeldung */
#auth { position: fixed; inset: 0; z-index: 80; background: var(--bg-side); display: grid; place-items: center; }
.auth-box { width: min(360px, 90vw); background: var(--bg); border-radius: 12px; box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.auth-box .ws { padding: 0; height: auto; font-size: 18px; }
.auth-box label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.auth-box input { font: inherit; font-size: 15px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; outline: none; }
.auth-box input:focus { border-color: var(--accent); }
.auth-err { color: #d44c47; font-size: 13px; margin: 0; min-height: 18px; }
.auth-btns { display: flex; gap: 8px; }
.auth-btns button { flex: 1; padding: 8px; border-radius: 6px; font-weight: 500; background: var(--accent); color: #fff; }
.auth-btns .ghost { background: none; color: var(--text); border: 1px solid var(--border); }
@media (max-width: 760px) { .cols { flex-direction: column; gap: 0; } #comments { position: fixed; right: 0; top: 0; height: 100%; z-index: 25; box-shadow: var(--shadow); } }

/* Marke */
.logo { height: 13px; width: auto; display: block; margin-left: 2px; }
.logo-d, [data-theme="dark"] .logo-l { display: none; }
[data-theme="dark"] .logo-d { display: block; }
.auth-logo { width: 190px; margin: 4px 0 8px; }
[data-theme="dark"] .auth-logo { filter: invert(1) hue-rotate(180deg); }

/* Seitenleiste näher am Vorbild */
.searchbox { border: 1px solid var(--border); background: var(--bg); margin-bottom: 6px; color: var(--text-3); }
.badge-n { min-width: 18px; padding: 0 5px; border-radius: 9px; background: #e0564e; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.badge-n:empty { display: none; }
#sidebar .row.active { color: var(--text); }

/* Cover, Darstellung, Home */
.cover { height: 30vh; max-height: 280px; min-height: 120px; position: relative; }
.cover + .page { padding-top: 24px; }
.cover-acts { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 2px; opacity: 0; transition: opacity .1s; }
.cover:hover .cover-acts, .cover-acts:focus-within { opacity: 1; }
.cover-acts button { background: var(--pop); color: var(--text-2); font-size: 12px; padding: 4px 8px; border-radius: 4px; box-shadow: var(--shadow); }
.head .addico + .addico { margin-left: 4px; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 6px; }
.swatches button { height: 44px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--border); }
.page.font-serif { font-family: Lyon-Text, Georgia, "Times New Roman", serif; }
.page.font-mono { font-family: var(--mono); }
.page.small { font-size: 14px; }
.page.full { max-width: none; }
.page.locked .gutter, .page.locked .tail, .page.locked .col-x, .page.locked .col-add, .page.locked .t-add { display: none; }
.page.locked .prefix input, .page.locked .addico, .page.locked .pico { pointer-events: none; }
.home-h { font-size: 30px; text-align: center; margin: 24px 0 36px; }
.home-s { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-3); margin: 18px 0 10px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.home-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border-radius: 14px; overflow: hidden; background: var(--pop); box-shadow: var(--shadow); padding: 0 14px 12px; }
.home-card:hover { background: var(--bg-hover); }
.hc-top { align-self: stretch; height: 40px; margin: 0 -14px; background: var(--bg-side); }
.hc-ico { margin-top: -12px; margin-bottom: 8px; } .hc-ico .ic { width: 24px; height: 24px; }
.home-card b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.home-card small { color: var(--text-3); font-size: 12px; }

/* Inhaltsleiste rechts */
#frame { position: relative; }
#toc { position: absolute; right: 14px; top: 96px; z-index: 5; }
.toc-bars { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; padding: 6px; }
.toc-bars i { display: block; height: 2px; border-radius: 1px; background: var(--text-3); opacity: .5; width: 16px; }
.toc-bars .l2 { width: 12px; } .toc-bars .l3 { width: 8px; }
.toc-list { display: none; position: absolute; right: 0; top: 0; width: 240px; max-height: 60vh; overflow-y: auto; background: var(--pop); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; }
#toc:hover .toc-list, #toc:focus-within .toc-list { display: block; }
.toc-list button, .toc-block button { display: block; width: 100%; text-align: left; padding: 4px 8px; border-radius: 5px; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-list button:hover, .toc-block button:hover { background: var(--bg-hover); color: var(--text); }
.toc-list .l2 { padding-left: 20px; } .toc-list .l3 { padding-left: 32px; }
.toc-block { flex: 1; padding: 2px 0; } .toc-block button { font-size: 14px; text-decoration: underline; text-decoration-color: var(--border); }

/* Blockfarben */
.fg-gray > .body { color: #787774; } .fg-brown > .body { color: #9f6b53; } .fg-orange > .body { color: #d9730d; } .fg-yellow > .body { color: #cb912f; } .fg-green > .body { color: #448361; }
.fg-blue > .body { color: #337ea9; } .fg-purple > .body { color: #9065b0; } .fg-pink > .body { color: #c14c8a; } .fg-red > .body { color: #d44c47; }
.bg-gray > .body { background: rgba(135, 131, 120, .15); } .bg-brown > .body { background: rgba(160, 110, 80, .18); } .bg-orange > .body { background: rgba(230, 130, 40, .18); } .bg-yellow > .body { background: rgba(230, 180, 40, .22); }
.bg-green > .body { background: rgba(60, 160, 100, .17); } .bg-blue > .body { background: rgba(35, 131, 226, .15); } .bg-purple > .body { background: rgba(150, 90, 210, .16); } .bg-pink > .body { background: rgba(225, 90, 160, .15); } .bg-red > .body { background: rgba(225, 80, 70, .16); }
[class*=" bg-"] > .body { border-radius: 4px; }

/* Einfache Tabelle, Lesezeichen, Erwähnungen */
.stable { position: relative; margin: 4px 0; padding: 0 22px 22px 0; max-width: 100%; overflow-x: auto; }
.stable table { border-collapse: collapse; }
.stable td { border: 1px solid var(--border); min-width: 120px; padding: 0; vertical-align: top; }
.stable .cell { padding: 7px 9px; outline: none; min-height: 34px; white-space: pre-wrap; word-break: break-word; }
.stable .cell:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.stable.head tr:first-child td { background: var(--bg-side); font-weight: 600; }
.t-add { position: absolute; display: grid; place-items: center; border-radius: 4px; color: var(--text-3); background: var(--bg-side); opacity: 0; }
.stable:hover .t-add, .t-add:focus-visible { opacity: 1; }
.t-add:hover { background: var(--bg-active); }
.t-col { right: 0; top: 0; bottom: 22px; width: 18px; } .t-row { left: 0; right: 22px; bottom: 0; height: 18px; }
.bm, .bm-in { flex: 1; display: flex; align-items: center; gap: 12px; margin: 4px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; color: inherit; text-decoration: none; min-width: 0; }
.bm:hover { background: var(--bg-hover); }
.bm span { flex: 1; min-width: 0; display: flex; flex-direction: column; } .bm small { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-in { font: inherit; color: var(--text); background: var(--bg); outline: none; } .bm-in:focus { border-color: var(--accent); }
.content a.mention { text-decoration: none; border-bottom: 1px solid var(--border); font-weight: 500; }

/* Datenbank: Berechnungszeile */
.db-table tfoot td { border: 0; border-top: 1px solid var(--border); height: 30px; }
.calc { width: 100%; height: 30px; padding: 0 8px; text-align: right; color: transparent; font-size: 13px; border-radius: 0 !important; }
tfoot:hover .calc, .calc:focus-visible { color: var(--text-3); }
.calc.on { color: var(--text); } .calc small { color: var(--text-3); margin-right: 4px; }
.calc:hover { background: var(--bg-hover); }

/* Zeitleiste und Gruppierung */
.tl { overflow-x: auto; }
.tl-row { display: flex; align-items: center; min-height: 34px; border-bottom: 1px solid var(--border); }
.tl-name { width: 190px; flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 8px; text-align: left; font-weight: 500; border-radius: 0 !important; overflow: hidden; }
button.tl-name:hover { background: var(--bg-hover); }
.tl-track { flex: 1; min-width: 0; display: grid; align-items: center; min-height: 34px; }
.tl-head .tl-track span { text-align: center; font-size: 11px; color: var(--text-3); }
.tl-head .tl-track .today { color: #fff; background: #e0564e; border-radius: 9px; }
.tl-bar { grid-row: 1; height: 24px; margin: 0 1px; padding: 0 8px; background: var(--pop); box-shadow: var(--shadow); border-radius: 5px !important; font-size: 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-bar:hover { background: var(--bg-hover); }
.db-table tr.grp td { border-right: 0; height: 38px; padding: 10px 8px 4px; background: none; }
.db-table tr.grp span { color: var(--text-3); margin-left: 8px; }

/* ---------- Menüs im Stil des Vorbilds ---------- */
:root { --menu-shadow: 0 0 0 1px rgba(84, 72, 49, .08), 0 2px 4px -1px rgba(0, 0, 0, .06), 0 14px 28px -6px rgba(0, 0, 0, .1); --menu-hover: rgba(55, 53, 47, .06); }
[data-theme="dark"] { --menu-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 3px 6px rgba(0, 0, 0, .3), 0 12px 28px rgba(0, 0, 0, .45); --menu-hover: rgba(255, 255, 255, .055); }
.pop { border-radius: 10px; box-shadow: var(--menu-shadow); font-size: 14px; line-height: 1.2; color: var(--text); }
#pop, #pop2 { min-width: 0; width: max-content; max-width: min(480px, calc(100vw - 16px)); padding: 0; }
#pop:has(> .menu), #pop2 { width: 265px; }
#pop2 { z-index: 31; max-height: 70vh; overflow-y: auto; }
#slash { width: 324px; max-height: min(40vh, 420px); padding: 0; display: flex; flex-direction: column; }
#slash .menu { overflow-y: auto; }
.menu { padding: 4px; display: flex; flex-direction: column; gap: 1px; }
.pop .item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 28px; padding: 0 8px; border-radius: 6px; text-align: left; font-size: 14px; line-height: 1.2; color: var(--text); user-select: none; }
.pop .item:hover, .pop .item.sel, .pop .item.open, .pop .item:focus-visible { background: var(--menu-hover); outline: none; }
.pop .item.danger { color: var(--text); }
.pop .item.danger:hover, .pop .item.danger:focus-visible { color: #eb5757; }
.pop .item.danger:hover .ic, .pop .item.danger:focus-visible .ic { color: #eb5757; }
.mi { width: 20px; height: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.mi .ic { width: 16px; height: 16px; stroke-width: 1.75; }
.pop .item > .ic { width: 16px; height: 16px; margin: 0 2px; color: var(--text); }
.mt { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pop .item kbd, .menu-foot kbd { font: 12px var(--font); color: var(--text-3); flex: none; white-space: nowrap; }
.pop .item .chev { width: 14px; height: 14px; flex: none; color: var(--text-3); }
.pop .label { padding: 8px 8px 4px; font-size: 12px; font-weight: 500; line-height: 1.2; color: var(--text-2); opacity: .8; user-select: none; }
.pop .sep { height: 1px; margin: 3px 8px; background: var(--border); flex: none; }
.pop .none { padding: 8px 10px; color: var(--text-3); font-size: 13px; }
.menu-search { padding: 8px 8px 2px; }
.menu-q, .pop-in { width: 100%; height: 28px; margin: 0; padding: 0 8px; border: 0; border-radius: 6px; outline: none; font: 14px var(--font); color: var(--text); background: rgba(242, 241, 238, .6); box-shadow: inset 0 0 0 1px rgba(15, 15, 15, .1); }
[data-theme="dark"] .menu-q, [data-theme="dark"] .pop-in { background: rgba(255, 255, 255, .055); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.menu-q:focus, .pop-in:focus { box-shadow: inset 0 0 0 1px rgba(35, 131, 226, .57), 0 0 0 2px rgba(35, 131, 226, .35); }
#pop > .pop-in { width: calc(100% - 16px); margin: 8px 8px 4px; display: block; min-width: 244px; }
#pop > .item, #pop > .opt, #pop > .label, #pop > .frow, #pop > .icon-grid, #pop > .swatches, #pop > .none { margin-left: 4px; margin-right: 4px; width: auto; }
#pop > .item:last-child, #pop > .opt:last-child, #pop > .frow:last-child, #pop > .icon-grid:last-child { margin-bottom: 4px; }
#pop > .label:first-child { margin-top: 2px; }
.menu-foot { border-top: 1px solid var(--border); padding: 8px 12px; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.menu-foot.row { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; flex: none; }
.switch { position: relative; width: 30px; height: 18px; flex: none; border-radius: 44px; background: rgba(135, 131, 120, .3); transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch.on { background: #2383e2; }
.switch.on::after { transform: translateX(12px); }
.font-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 6px 4px 8px; }
.font-tiles button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; border-radius: 6px; color: var(--text-2); }
.font-tiles button:hover { background: var(--menu-hover); }
.font-tiles b { font-size: 24px; font-weight: 500; line-height: 1.2; color: var(--text); }
.font-tiles span { font-size: 12px; }
.font-tiles .on b, .font-tiles .on span { color: #2383e2; }
.font-tiles .ft-serif b { font-family: Lyon-Text, Georgia, "Times New Roman", serif; }
.font-tiles .ft-mono b { font-family: var(--mono); }
.sw { width: 20px; height: 20px; border-radius: 4px; font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--border); }
.sw.bg-gray { background: rgba(135, 131, 120, .15); } .sw.bg-brown { background: rgba(160, 110, 80, .18); } .sw.bg-orange { background: rgba(230, 130, 40, .18); } .sw.bg-yellow { background: rgba(230, 180, 40, .22); } .sw.bg-green { background: rgba(60, 160, 100, .17); }
.sw.bg-blue { background: rgba(35, 131, 226, .15); } .sw.bg-purple { background: rgba(150, 90, 210, .16); } .sw.bg-pink { background: rgba(225, 90, 160, .15); } .sw.bg-red { background: rgba(225, 80, 70, .16); }
.sw.fg-gray { color: #787774; } .sw.fg-brown { color: #9f6b53; } .sw.fg-orange { color: #d9730d; } .sw.fg-yellow { color: #cb912f; } .sw.fg-green { color: #448361; } .sw.fg-blue { color: #337ea9; } .sw.fg-purple { color: #9065b0; } .sw.fg-pink { color: #c14c8a; } .sw.fg-red { color: #d44c47; }
.opt .item { min-height: 28px; }
.pop .x { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; }
.frow { padding: 4px; }
.frow select, .frow input, .cfg select { height: 28px; border-radius: 6px; font-size: 14px; }
.icon-grid { padding: 4px 0; }
.ai-box, .cfg { padding: 8px; }
#fmt { border-radius: 8px; padding: 3px; }
#fmt button { height: 26px; min-width: 28px; border-radius: 5px; }

/* Eigenschaften anlegen und bearbeiten */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 4px; padding: 0 4px 4px; width: 300px; }
.prop-head { display: flex; align-items: center; gap: 6px; }
.prop-head .mi { width: 28px; height: 28px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--border); color: var(--text-2); }
.sw.dot { font-size: 0; width: 12px; height: 12px; margin: 0 4px; border-radius: 50%; box-shadow: none; }
.sw.dot.c-gray { background: #a8a7a3; } .sw.dot.c-blue { background: #4b9ce2; } .sw.dot.c-green { background: #5aa97a; } .sw.dot.c-yellow { background: #dcb23a; } .sw.dot.c-orange { background: #e08a3c; }
.sw.dot.c-red { background: #e0635b; } .sw.dot.c-purple { background: #a37bd0; } .sw.dot.c-pink { background: #dd6fa6; } .sw.dot.c-brown { background: #a57a5c; }
[data-theme="dark"] .auth-logo { filter: invert(1); }

/* KI-Chat als Seitenleiste */
#aichat { width: 385px; flex: none; border-left: 1px solid var(--border); display: flex; flex-direction: column; font-size: 14px; background: var(--bg); }
#aichat .c-head { border-bottom: 0; }
.chat-ttl { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.chat-list { flex: 1; overflow-y: auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.chat-hello { margin: auto 0; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-bottom: 24px; }
.chat-logo { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-side); box-shadow: inset 0 0 0 1px var(--border); }
.chat-logo .ic { width: 20px; height: 20px; }
.chat-hello b { font-size: 22px; font-weight: 600; line-height: 1.2; }
.chat-tips { display: flex; flex-direction: column; gap: 2px; align-self: stretch; }
.chat-tips button { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 6px; text-align: left; color: var(--text-2); }
.chat-tips button:hover { background: var(--menu-hover); color: var(--text); }
.msg { display: flex; flex-direction: column; line-height: 1.5; }
.msg.me { align-items: flex-end; }
.msg.me > div { max-width: 85%; background: var(--bg-side); box-shadow: inset 0 0 0 1px var(--border); border-radius: 16px; padding: 7px 14px; white-space: pre-wrap; word-break: break-word; }
.msg-t p { margin: 0 0 8px; } .msg-t ul { margin: 0 0 8px; padding-left: 20px; } .msg-t li { margin: 2px 0; }
.msg-t code { font-family: var(--mono); font-size: 85%; background: var(--code-bg); border-radius: 4px; padding: .1em .3em; }
.chat-form { padding: 0 12px 12px; }
.chat-box { border-radius: 16px; background: var(--bg); box-shadow: 0 0 0 1px var(--border), 0 4px 14px rgba(0, 0, 0, .06); padding: 10px 10px 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.chat-box:focus-within { box-shadow: 0 0 0 1px rgba(35, 131, 226, .5), 0 4px 14px rgba(0, 0, 0, .06); }
.chat-ctx { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 8px; border-radius: 6px; font-size: 12px; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
.chat-ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chat-ctx .ic { width: 13px; height: 13px; }
.chat-box textarea { border: 0; outline: 0; resize: none; background: none; color: var(--text); font: 14px/1.5 var(--font); padding: 2px 0; max-height: 160px; }
.chat-row { display: flex; align-items: center; justify-content: space-between; }
.chat-send { width: 28px; height: 28px; border-radius: 50%; background: #2383e2; color: #fff; display: grid; place-items: center; }
.chat-send:disabled { background: rgba(135, 131, 120, .3); cursor: default; }
@media (max-width: 1100px) { #aichat { position: fixed; right: 0; top: 0; height: 100%; z-index: 26; box-shadow: var(--shadow); } }

/* Besprechungsnotizen */
.meet { flex: 1; min-width: 0; margin: 6px 0; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px 10px; font-size: 14px; }
.meet.live { border-color: rgba(224, 86, 78, .55); }
.meet-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meet-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-side); }
.meet-h b { font-size: 16px; }
.meet-h .primary.stop { background: #e0564e; }
.meet-lang { font: inherit; font-size: 13px; color: var(--text-2); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; height: 28px; padding: 0 6px; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #e0564e; animation: rec 1.2s ease-in-out infinite; }
@keyframes rec { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.meet-timer { font-variant-numeric: tabular-nums; color: var(--text-2); }
.meet-tabs { display: flex; gap: 2px; margin: 10px 0 8px; border-bottom: 1px solid var(--border); }
.meet-tabs button { padding: 5px 10px; border-radius: 6px 6px 0 0; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.meet-tabs button:hover { background: var(--menu-hover); }
.meet-tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.meet-count { font-size: 11px; color: var(--text-3); }
.meet-panel { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.meet-panel > * { align-self: stretch; }
.meet-panel > div > .primary, .meet-panel > .primary { align-self: flex-start; }
.meet-notes, .meet-paste { width: 100%; font: 15px/1.5 var(--font); color: var(--text); background: none; border: 0; outline: 0; resize: vertical; min-height: 96px; padding: 2px 0; }
.meet-paste { border: 1px solid var(--border); border-radius: 6px; padding: 8px; }
.meet-lines p { display: flex; gap: 10px; margin: 0 0 6px; line-height: 1.5; }
.meet-lines time { flex: none; width: 42px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.meet-lines .interim span { color: var(--text-3); }
.meet-sum p { margin: 10px 0 4px; } .meet-sum p:first-child { margin-top: 0; } .meet-sum ul { margin: 0 0 6px; padding-left: 20px; }
.meet-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 11.5px; }

/* KI-Chat nach den am Vorbild gemessenen Werten */
.homebar { display: flex; align-items: center; gap: 2px; }
.homebar .row { flex: none; width: auto; padding-right: 10px; }
.homebar .icon-btn.active { background: var(--bg-active); color: var(--text); }
.chat-page { height: 100%; display: flex; justify-content: center; padding: 0 24px; }
#chatfull { width: 100%; max-width: 710px; display: flex; flex-direction: column; min-height: 0; }
#chatfull .chat-hello { margin: 0; padding-top: 22vh; align-items: center; }
#chatfull .chat-list { padding: 24px 0 16px; }
#chatfull .chat-form { padding: 0 0 20px; }
.chat-top { display: flex; justify-content: flex-end; padding: 8px 0 0; }
.chat-hello { margin: auto 0; padding: 0 12px 24px; display: flex; flex-direction: column; align-items: center; gap: 0; }
.chat-hello .chat-form { align-self: stretch; padding: 0; }
.chat-logo { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--pop); box-shadow: 0 0 0 1px rgba(42, 28, 0, .07), 0 2px 6px rgba(25, 25, 25, .06), 0 8px 12px rgba(25, 25, 25, .04); }
.chat-logo .ic { width: 22px; height: 22px; }
.chat-hello h2 { font-size: 30px; font-weight: 600; line-height: 36px; margin: 18px 0 24px; text-align: center; color: var(--text); }
#aichat .chat-hello h2 { font-size: 22px; line-height: 28px; margin: 14px 0 18px; }
.chat-form { padding: 0 12px 12px; }
.chat-box { border-radius: 16px; background: var(--pop); padding: 0; gap: 0; box-shadow: rgba(25, 25, 25, .027) 0 8px 12px 0, rgba(25, 25, 25, .027) 0 2px 6px 0, rgba(42, 28, 0, .07) 0 0 0 1px; }
[data-theme="dark"] .chat-box { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 8px 12px rgba(0, 0, 0, .25); }
.chat-box:focus-within { box-shadow: rgba(25, 25, 25, .027) 0 8px 12px 0, rgba(25, 25, 25, .027) 0 2px 6px 0, rgba(42, 28, 0, .14) 0 0 0 1px; }
.chat-box textarea { font: 14px/20px var(--font); padding: 12px 12px 0; min-height: 56px; max-height: 200px; width: 100%; }
.chat-row { display: flex; align-items: center; gap: 2px; padding: 6px 8px 8px; justify-content: flex-start; }
.cb-round { width: 28px; height: 28px; flex: none; border-radius: 9999px; display: grid; place-items: center; color: #7d7a75; }
.cb-round:hover, .cb-pill:not(.quiet):hover { background: var(--menu-hover); }
.cb-round.live { color: #e0564e; background: rgba(224, 86, 78, .12); }
.cb-pill { height: 28px; max-width: 220px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 50px; font-size: 14px; font-weight: 500; color: var(--text); }
.cb-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-pill.quiet { cursor: default; }
.cb-send { width: 28px; height: 28px; flex: none; border-radius: 9999px; display: grid; place-items: center; background: #2383e2; color: #fff; margin-left: 2px; }
.cb-send:disabled { background: rgba(135, 131, 120, .25); cursor: default; }
.chat-hello .chat-tips { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 14px; align-self: center; }
.chat-hello .chat-tips button { height: 32px; padding: 0 12px; gap: 6px; border-radius: 9999px; font-size: 14px; font-weight: 400; color: #7d7a75; }
[data-theme="dark"] .chat-hello .chat-tips button, [data-theme="dark"] .cb-round { color: var(--text-2); }
.msg.me > div { background: rgba(42, 28, 0, .05); box-shadow: none; }
[data-theme="dark"] .msg.me > div { background: rgba(255, 255, 255, .07); }

/* Seitenleiste: Ziehen und Ablegen */
#tree .row[data-tree] { position: relative; }
#tree .dz-into { background: rgba(35, 131, 226, .14) !important; }
#tree .dz-before::before, #tree .dz-after::after { content: ""; position: absolute; left: 8px; right: 4px; height: 3px; border-radius: 2px; background: rgba(35, 131, 226, .6); }
#tree .dz-before::before { top: -2px; } #tree .dz-after::after { bottom: -2px; }
#tree .sect.dz-into { border-radius: 6px; }

/* Schwebender KI-Knopf und schwebendes Chatfenster */
#aifab { position: absolute; right: 24px; bottom: 24px; z-index: 6; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--pop); color: var(--text); box-shadow: 0 0 0 1px rgba(42, 28, 0, .07), 0 2px 6px rgba(25, 25, 25, .08), 0 8px 16px rgba(25, 25, 25, .08); transition: transform .12s; }
#aifab:hover { transform: scale(1.06); }
#aifab .ic { width: 22px; height: 22px; }
[data-theme="dark"] #aifab { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 8px 16px rgba(0, 0, 0, .4); }
#aichat.float { position: fixed; right: 24px; bottom: 24px; z-index: 28; width: 420px; max-width: calc(100vw - 32px); height: min(640px, calc(100vh - 72px)); border: 0; border-radius: 16px; overflow: hidden; background: var(--pop); box-shadow: 0 0 0 1px rgba(42, 28, 0, .07), 0 8px 24px rgba(25, 25, 25, .12), 0 24px 48px rgba(25, 25, 25, .12); }
[data-theme="dark"] #aichat.float { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 48px rgba(0, 0, 0, .55); }

/* Agenten */
.page.agent { max-width: 760px; }
.ag-l { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; font-size: 12px; font-weight: 500; color: var(--text-2); }
.ag-l textarea { font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; outline: none; resize: vertical; }
.ag-l textarea:focus { border-color: rgba(35, 131, 226, .6); }
.ag-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.primary.alt { background: none; color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.primary.alt:hover { background: var(--menu-hover); }
.agent .li-t { display: flex; align-items: center; gap: 8px; }
.chat-logo .emo { font-size: 20px; }

.meet-sys { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); }
.meet-sys input { accent-color: var(--accent); }

/* Mehrfachauswahl */
.block.picked { background: rgba(35, 131, 226, .14); border-radius: 4px; }
.block.picked .block.picked { background: none; }

/* Lücken aus der Paritätsliste */
#side-rs { width: 5px; margin: 0 -3px; flex: none; cursor: col-resize; z-index: 7; }
#side-rs:hover, .resizing #side-rs { background: rgba(35, 131, 226, .35); }
.collapsed #side-rs { display: none; }
body.resizing { cursor: col-resize; user-select: none; }
.backlinks { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); padding: 2px 6px; margin: -4px 0 6px -6px; border-radius: 4px; }
.backlinks:hover { background: var(--bg-hover); color: var(--text-2); }
.t-callout .prefix button { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; }
.t-callout .prefix button:hover { background: var(--bg-hover); }
.t-image figure { margin: 4px 0; display: flex; flex-direction: column; gap: 2px; }
.t-image .img-s { width: 33%; } .t-image .img-m { width: 60%; } .t-image .img-l { width: 100%; }
.t-image figure img { margin: 0; width: 100%; }
.img-cap { border: 0; outline: 0; background: none; font: 13px var(--font); color: var(--text-2); padding: 2px 0; }
.img-cap:placeholder-shown { opacity: 0; } figure:hover .img-cap, .img-cap:focus { opacity: 1; }
.embed { flex: 1; min-width: 0; margin: 4px 0; display: flex; flex-direction: column; gap: 4px; }
.embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-side); }
.embed a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-table th { position: relative; }
.db-table td { min-width: 0; }
.col-rs { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 2; }
.col-rs:hover { background: rgba(35, 131, 226, .4); }
.fmode { gap: 6px; } .fmode select { flex: none; }

/* Diagramm-Ansicht, Medien */
.ch-head { display: flex; align-items: baseline; gap: 8px; padding: 4px 0 10px; }
.chart { display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.ch-row { display: flex; align-items: center; gap: 10px; }
.ch-l { width: 150px; flex: none; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.ch-bar { flex: 1; height: 22px; border-radius: 4px; background: var(--bg-side); overflow: hidden; }
.ch-bar i { display: block; height: 100%; border-radius: 4px; min-width: 2px; background: rgba(135, 131, 120, .5); }
.ch-bar .c-blue { background: #4b9ce2; } .ch-bar .c-green { background: #5aa97a; } .ch-bar .c-yellow { background: #dcb23a; } .ch-bar .c-orange { background: #e08a3c; } .ch-bar .c-red { background: #e0635b; } .ch-bar .c-purple { background: #a37bd0; } .ch-bar .c-pink { background: #dd6fa6; } .ch-bar .c-brown { background: #a57a5c; } .ch-bar .c-gray { background: #a8a7a3; }
.ch-n { width: 60px; flex: none; font-variant-numeric: tabular-nums; }
.t-file .body { flex-direction: column; align-items: stretch; }
.t-file audio { width: 100%; margin: 4px 0; } .t-file video { width: 100%; max-height: 480px; border-radius: 6px; margin: 4px 0; background: #000; }

.td-date { white-space: nowrap; } .td-date .c-in { width: auto; min-width: 128px; } .c-end { border-left: 1px solid var(--border) !important; }
.rp-v .c-in[type=date] { width: auto; }

/* ---------- Am Original gemessene Werte (Seitenmenü, 28. November 2026) ---------- */
:root { --menu-shadow: rgba(25, 25, 25, .05) 0 20px 24px 0, rgba(25, 25, 25, .027) 0 5px 8px 0, rgba(42, 28, 0, .07) 0 0 0 1px; --menu-hover: rgba(42, 28, 0, .05); --m-text: rgb(44, 44, 43); --m-icon: rgb(56, 56, 54); --m-dim: rgb(161, 158, 153); --m-line: rgba(42, 28, 0, .07); }
[data-theme="dark"] { --m-text: rgba(255, 255, 255, .86); --m-icon: rgba(255, 255, 255, .8); --m-dim: rgba(255, 255, 255, .42); --m-line: rgba(255, 255, 255, .09); }
#pop:has(> .menu), #pop2 { width: 256px; }
#pop2.wide { width: 300px; }
.pop .item { min-height: 28px; padding: 0 8px; gap: 8px; border-radius: 6px; font-size: 14px; font-weight: 400; line-height: 16.8px; color: var(--m-text); }
.mi, .pop .item > .ic { color: var(--m-icon); }
.mi .ic { width: 18px; height: 18px; stroke-width: 1.6; }
.pop .item kbd, .menu-foot kbd { font-size: 12px; color: var(--m-dim); }
.pop .item .chev { color: var(--m-dim); width: 16px; height: 16px; }
.pop .label { padding: 10px 12px 6px; font-size: 12px; font-weight: 500; color: var(--m-dim); opacity: 1; }
#pop2 .label, #pop > .menu .label { padding: 8px 8px 6px; }
.pop .sep { height: 1px; margin: 5px 8px; background: var(--m-line); }
.menu-search { padding: 12px 12px 4px; }
.menu-search.has-ico { position: relative; }
.menu-search.has-ico > .ic { position: absolute; left: 20px; top: 18px; width: 16px; height: 16px; color: var(--m-dim); pointer-events: none; }
.menu-search.has-ico .menu-q { padding-left: 30px; }
.menu-q, .pop-in { height: 28px; border-radius: 6px; background: rgba(66, 35, 3, .03); box-shadow: inset 0 0 0 1px var(--m-line); font-size: 14px; line-height: 20px; }
.menu-q:focus, .pop-in:focus { box-shadow: inset 0 0 0 1px rgb(35, 131, 226), 0 0 0 1px rgb(35, 131, 226); }
.menu-foot { border-top: 1px solid var(--m-line); margin: 0 12px; padding: 10px 0 12px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; line-height: 16px; color: var(--m-dim); }
.menu-foot b { font-weight: 500; }
.menu-foot.row { flex-direction: row; margin: 0; padding: 6px 12px; }
.switch { width: 30px; height: 18px; background: rgba(135, 131, 120, .3); }
.switch.on { background: rgb(35, 131, 226); }
.font-tiles { gap: 0; padding: 0 4px 6px; }
.font-tiles button { padding: 8px 0 6px; gap: 2px; border-radius: 6px; }
.font-tiles button.on { background: var(--menu-hover); }
.font-tiles b { font-size: 24px; font-weight: 400; color: var(--m-text); }
.font-tiles span { font-size: 12px; color: var(--m-dim); }
.font-tiles .on b { color: rgb(35, 131, 226); } .font-tiles .on span { color: var(--m-dim); }
/* Reiter der Besprechungsnotizen als Pillen */
.meet-tabs { border-bottom: 0; gap: 4px; margin: 12px 0 10px; }
.meet-tabs button { height: 32px; padding: 0 14px; gap: 4px; border-radius: 9999px; border-bottom: 0; margin: 0; font-size: 14px; font-weight: 500; color: rgb(125, 122, 117); }
.meet-tabs button.on { background: rgba(33, 27, 23, .05); color: var(--m-text); border-bottom: 0; }
[data-theme="dark"] .meet-tabs button.on { background: rgba(255, 255, 255, .08); }
.meet-tabs .ic { width: 16px; height: 16px; }
/* Schwebender KI-Knopf: 48 px, Schatten wie gemessen */
#aifab { width: 48px; height: 48px; border-radius: 24px; box-shadow: rgba(25, 25, 25, .027) 0 8px 12px 0, rgba(25, 25, 25, .027) 0 2px 6px 0, rgba(42, 28, 0, .07) 0 0 0 1px; }

/* Farbe für einzelne Wörter */
.content span[data-c="fg-gray"] { color: #787774; } .content span[data-c="bg-gray"] { background: rgba(135,131,120,.2); border-radius: 3px; padding: .1em 0; }
.content span[data-c="fg-brown"] { color: #9f6b53; } .content span[data-c="bg-brown"] { background: rgba(160,110,80,.22); border-radius: 3px; padding: .1em 0; }
.content span[data-c="fg-orange"] { color: #d9730d; } .content span[data-c="bg-orange"] { background: rgba(230,130,40,.22); border-radius: 3px; padding: .1em 0; }
.content span[data-c="fg-yellow"] { color: #cb912f; } .content span[data-c="bg-yellow"] { background: rgba(230,180,40,.28); border-radius: 3px; padding: .1em 0; }
.content span[data-c="fg-green"] { color: #448361; } .content span[data-c="bg-green"] { background: rgba(60,160,100,.2); border-radius: 3px; padding: .1em 0; }
.content span[data-c="fg-blue"] { color: #337ea9; } .content span[data-c="bg-blue"] { background: rgba(35,131,226,.18); border-radius: 3px; padding: .1em 0; }
.content span[data-c="fg-purple"] { color: #9065b0; } .content span[data-c="bg-purple"] { background: rgba(150,90,210,.2); border-radius: 3px; padding: .1em 0; }
.content span[data-c="fg-pink"] { color: #c14c8a; } .content span[data-c="bg-pink"] { background: rgba(225,90,160,.18); border-radius: 3px; padding: .1em 0; }
.content span[data-c="fg-red"] { color: #d44c47; } .content span[data-c="bg-red"] { background: rgba(225,80,70,.2); border-radius: 3px; padding: .1em 0; }

/* Chat-Seitenleiste wie am Original gemessen: 360 px, Kopfzeile mit Titel-Auswahl, Inhalt unten ausgerichtet */
#aichat { width: 360px; }
#aichat.float { width: 400px; }
.chat-head { height: 44px; padding: 0 8px 0 12px; }
.chat-title { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px; border-radius: 6px; font-size: 14px; font-weight: 400; color: var(--m-text); max-width: 210px; }
.chat-title:hover { background: var(--menu-hover); }
.chat-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-title .ic:last-child { width: 14px; height: 14px; color: var(--m-dim); }
.chat-lab { display: none; }
#aichat .chat-hello { margin: auto 0 0; padding: 0 16px 4px; align-items: flex-start; }
#aichat .chat-hello h2 { font-size: 17px; font-weight: 600; line-height: 22.1px; text-align: left; margin: 10px 8px 14px; }
#aichat .chat-logo { margin-left: 0; }
#aichat .chat-lab { display: block; order: 2; align-self: stretch; padding: 0 8px 4px; font-size: 12px; font-weight: 500; line-height: 16px; color: rgb(125, 122, 117); }
#aichat .chat-hello .chat-tips { order: 3; flex-direction: column; flex-wrap: nowrap; align-self: stretch; gap: 0; margin: 0 0 12px; }
#aichat .chat-hello .chat-tips button { height: 40px; padding: 8px; gap: 8px; border-radius: 6px; justify-content: flex-start; font-size: 14px; color: var(--m-text); text-align: left; }
#aichat .chat-hello .chat-tips button .ic { width: 18px; height: 18px; color: var(--m-icon); }
#aichat .chat-hello .chat-form { order: 4; margin: 0 0 16px; }
#aichat .chat-form { padding: 0 16px 16px; }
#aichat .chat-hello .chat-form { padding: 0; }
/* Benutzerbereich unten in der Seitenleiste */
.userrow { margin-top: 4px; }
.userrow .av { width: 22px; height: 22px; border-radius: 5px; font-size: 12px; }
.userrow .ico .ic { width: 14px; height: 14px; color: var(--m-dim); }

/* Block- und Slash-Menü nach Messung (28. November 2026) */
#pop[data-kind="block"]:has(> .menu) { width: 265px; }
#slash { width: 324px; max-height: 306px; }
#slash .menu { padding: 4px; gap: 0; }
#slash .item { min-height: 32px; }
#slash .label { padding: 10px 8px 6px; }
#slash .menu-foot.row { border-top: 1px solid var(--m-line); margin: 0; padding: 10px 12px; font-size: 14px; color: var(--m-text); }
#slash .menu-foot kbd { font-size: 12px; color: var(--m-dim); }
.block.menu-on > .body { background: rgba(35, 131, 226, .14); border-radius: 4px; }
/* Leere Seite: "Loslegen mit" als Pillen am unteren Rand */
.start { padding: 0 0 28px; display: flex; flex-direction: column; gap: 10px; }
.start-l { font-size: 12px; font-weight: 500; color: var(--m-dim); }
.start-p { display: flex; flex-wrap: wrap; gap: 8px; }
.start-p button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 6px 14px 6px 10px; border-radius: 100px; background: rgba(42, 28, 0, .07); font-size: 13px; font-weight: 500; color: var(--m-text); }
[data-theme="dark"] .start-p button { background: rgba(255, 255, 255, .08); }
.start-p button:hover { background: rgba(42, 28, 0, .11); }
.start-p .ic { width: 16px; height: 16px; }

/* Native Bildlaufleisten und Formularelemente folgen dem Farbschema */
:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
/* Kopf der Seitenleiste wie am Vorbild: Umschalter links, Posteingang und neue Seite rechts */
.ws { height: 44px; padding: 0 8px; gap: 2px; }
.ws .icon-btn { color: var(--text-2); }
.icon-btn.has-badge { position: relative; }
.icon-btn.has-badge .badge-n { position: absolute; top: -1px; right: -2px; min-width: 15px; height: 15px; padding: 0 4px; font-size: 10px; line-height: 15px; }
.ws-ico { width: 22px; height: 22px; border-radius: 50%; flex: none; }

/* Das Fenster selbst scrollt nie: nur Seitenleiste, Inhalt und Panels haben eigene Bildlaufleisten */
html, body { overflow: hidden; }
#app { width: 100vw; max-width: 100%; overflow: hidden; }
#frame { overflow: hidden; }

.audit { max-height: 50vh; overflow-y: auto; width: 460px; max-width: 86vw; padding: 0 8px 8px; font-size: 12px; }
.audit > div { display: grid; grid-template-columns: 128px 150px 1fr 96px; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--m-line); }
.audit time, .audit span { color: var(--m-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-2fa[hidden] { display: none; }

/* Chat-Zeichen von TRAIXON: helle Fassung (dunkle Blase, weißes X), dunkle Fassung (aufgehellte Blase mit feiner Kante) */
:root { --tx-bub: #161D27; --tx-edge: transparent; --tx-x: #fff; }
[data-theme="dark"] { --tx-bub: #3A4452; --tx-edge: rgba(255, 255, 255, .14); }
.ic .tx-bub { fill: var(--tx-bub); stroke: var(--tx-edge); }
.ic .tx-x { fill: var(--tx-x); transform-box: fill-box; transform-origin: center; }
@keyframes tx-spin { to { transform: rotate(360deg); } }
button:hover > .ic .tx-x, button:focus-visible > .ic .tx-x { animation: tx-spin .35s cubic-bezier(.22, 1, .36, 1); }
@media (prefers-reduced-motion: reduce) { button:hover > .ic .tx-x, button:focus-visible > .ic .tx-x { animation: none; } }
/* Knopf unten rechts: nur die Blase, ohne runden Träger */
#aifab, [data-theme="dark"] #aifab { width: 50px; height: 44px; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
#aifab .ic { width: 50px; height: 50px; overflow: visible; filter: drop-shadow(0 6px 10px rgba(15, 23, 42, .22)); }
[data-theme="dark"] #aifab .ic { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .45)); }
#aifab:hover { transform: none; }
.chat-logo, #aichat .chat-logo { background: none; box-shadow: none; border-radius: 0; }
.chat-logo .ic:has(.tx-bub) { width: 40px; height: 40px; }
.ic:has(.tx-bub) { overflow: visible; }

/* Bildlaufleisten folgen dem Thema ausdrücklich, nicht nur über color-scheme */
html[data-theme="dark"], html[data-theme="dark"] * { color-scheme: dark; scrollbar-color: rgba(255, 255, 255, .28) transparent; }
html[data-theme="light"], html[data-theme="light"] * { scrollbar-color: rgba(55, 53, 47, .3) transparent; }

/* Blockmenü: genau ein hervorgehobener Eintrag (Pfeiltasten oder bewegte Maus) */
#slash .item:hover { background: none; }
#slash .item.sel, #slash .item.sel:hover { background: rgba(55, 53, 47, .08); }
[data-theme="dark"] #slash .item.sel, [data-theme="dark"] #slash .item.sel:hover { background: rgba(255, 255, 255, .09); }

/* Kopf wie am Vorbild: Reiterzeile über der Seitenleiste-Farbe, darunter Pfad, Sichtbarkeit, Bearbeitungszeit, Teilen */
#tabbar { height: 44px; flex: none; display: flex; align-items: stretch; gap: 2px; padding: 0 8px; background: var(--bg-side); border-bottom: 1px solid var(--border); }
#tabbar .icon-btn { align-self: center; color: var(--text-3); }
#tabbar .tab-on { width: 240px; max-width: 40%; display: flex; align-items: center; padding: 0 16px; margin-bottom: -1px; background: var(--bg); border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tabbar [data-act="new-tab"] { margin-left: 6px; }
#topbar { height: 48px; padding: 0 12px 0 16px; }
#crumbs { flex: 0 1 auto; }
#topbar .grow { flex: 1; }
#spacepill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 4px; color: var(--text-3); font-size: 14px; white-space: nowrap; }
#spacepill:hover, .top-share:hover { background: var(--bg-hover); }
#spacepill .ic { width: 14px; height: 14px; }
#spacepill[hidden], #edited[hidden], .top-share[hidden] { display: none; }
#edited { color: var(--text-3); font-size: 14px; margin-right: 10px; white-space: nowrap; }
.top-share { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 4px; font-size: 14px; }
.top-share .ic { width: 16px; height: 16px; }
@media (max-width: 760px) { #edited, #tabbar { display: none; } }
#topbar .top-right { display: flex; align-items: center; }
#edited { line-height: 28px; }

/* Kopfleiste nach Messung am Vorbild: 44 px hoch, Einträge 28 px, Radius 6 px, Symbole 20 px */
#topbar { height: 44px; padding: 0 10px 0 12px; gap: 0; }
#crumbs button { height: 24px; padding: 2px 6px; border-radius: 6px; color: var(--text); }
#spacepill { height: 24px; padding: 0 6px; border-radius: 6px; color: #a19e99; gap: 4px; }
#spacepill .ic { width: 16px; height: 16px; color: #ada9a3; }
#spacepill .ic:last-child { width: 11px; height: 11px; }
#edited { color: #a19e99; padding: 0 8px; margin-right: 3px; }
.top-share { height: 28px; padding: 0 8px; border-radius: 6px; gap: 6px; }
#topbar .top-right { gap: 2px; }
#topbar .top-right .icon-btn { width: 28px; height: 28px; border-radius: 6px; color: #8e8b86; }
#topbar .top-right .icon-btn .ic { width: 20px; height: 20px; }
#topbar .top-right [data-act="pagemenu"] { color: var(--text); }
#sidebar .searchbox { height: 32px; border-radius: 8px; }
/* Teilen-Menü */
.share { width: 456px; max-width: 92vw; padding-bottom: 8px; }
.sh-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--m-line, var(--border)); }
.sh-tabs button { padding: 12px 8px 10px; font-size: 14px; font-weight: 500; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sh-tabs button.on { color: var(--text); border-bottom-color: var(--text); }
.sh-user { display: flex; align-items: center; gap: 12px; padding: 10px 16px; font-size: 14px; }
.sh-user .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--border); color: var(--text-2, var(--text-3)); font-size: 13px; }
.sh-user b { font-weight: 400; } .sh-user i { font-style: normal; color: var(--text-3); }
.sh-user em { margin-left: auto; font-style: normal; color: var(--text-3); }
.sh-lab { padding: 8px 16px 4px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.share .sh-opt { margin: 0 8px; width: calc(100% - 16px); min-height: 40px; gap: 12px; }
.sh-ico { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; background: var(--bg-hover); flex: none; }
.sh-foot, .sh-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 4px; margin-top: 8px; border-top: 1px solid var(--m-line, var(--border)); }
.sh-row { border: 0; justify-content: flex-end; padding: 4px 0 0; margin: 0; }
.sh-pub { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 24px 12px; text-align: center; }
.sh-pub > .ic { width: 32px; height: 32px; color: var(--text-3); }
.sh-pub .pop-in, .sh-pub .sh-row { width: 100%; }
/* Übersicht der Tastenkürzel */
.keys { width: 360px; max-width: 90vw; max-height: 70vh; overflow-y: auto; padding: 4px 12px 12px; font-size: 14px; }
.keys h4 { margin: 12px 0 4px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.keys > div:not(.label) { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; }
.keys kbd { font: 12px var(--font); color: var(--text-3); background: var(--bg-hover); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }

/* Überschrift 4, aufklappbare Überschriften, Gleichung, Brotkrumen, synchronisierter Block, Erwähnungen */
.t-h4 .content { font-size: 1.05em; font-weight: 600; line-height: 1.3; margin-top: .5em; }
.t-h5 .content { font-size: .92em; font-weight: 600; line-height: 1.3; margin-top: .45em; letter-spacing: .01em; }
.t-th1 .content { font-size: 1.875em; font-weight: 600; line-height: 1.3; }
.t-th2 .content { font-size: 1.5em; font-weight: 600; line-height: 1.3; }
.t-th3 .content { font-size: 1.25em; font-weight: 600; line-height: 1.3; }
.t-th1 > .body, .t-th2 > .body, .t-th3 > .body { align-items: center; margin-top: .6em; }
.eq { display: block; width: 100%; padding: 10px 8px; border-radius: 4px; text-align: center; overflow-x: auto; }
.eq:hover { background: var(--bg-hover); }
.eq.empty { display: flex; align-items: center; gap: 8px; color: var(--text-3); background: var(--bg-side); text-align: left; padding: 12px; }
.eq-prev { min-height: 28px; padding: 4px 8px; overflow-x: auto; text-align: center; }
textarea.pop-in.eq-in { height: auto; padding: 8px; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.bcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 14px; color: var(--text-3); padding: 3px 0; }
.bcrumb a { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 4px; color: inherit; text-decoration: none; }
.bcrumb a:hover { background: var(--bg-hover); } .bcrumb i { font-style: normal; opacity: .6; }
.synced { position: relative; padding: 3px 6px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(235, 87, 87, .35); }
.sync-edit { outline: none; min-height: 1.5em; }
.sync-edit:empty::before { content: attr(data-ph); color: var(--text-3); }
.sync-src { position: absolute; right: 0; top: -22px; display: none; align-items: center; gap: 4px; padding: 1px 6px; font-size: 12px; color: #eb5757; background: var(--bg); border-radius: 4px; text-decoration: none; }
.synced:hover .sync-src, .synced:focus-within .sync-src { display: inline-flex; }
.sync-src .ic { width: 12px; height: 12px; }
a.mention.m-user, a.mention.m-date { color: var(--text-3); text-decoration: none; border: 0; cursor: default; }
a.mention.m-date { color: var(--text-2, var(--text-3)); }

/* Abschnitte der Seitenleiste einklappbar */
.sect[data-fold] { cursor: pointer; border-radius: 6px; user-select: none; }
.sect[data-fold]:hover { background: var(--bg-hover); }
.sect[data-fold] .ttl::after { content: '›'; display: inline-block; margin-left: 6px; opacity: 0; transform: rotate(90deg); transition: transform .12s; }
.sect[data-fold]:hover .ttl::after, .sect.folded .ttl::after { opacity: .7; }
.sect.folded .ttl::after { transform: none; }

/* Teilen: Einladen, Schlüssel */
.sh-inv { display: flex; gap: 8px; padding: 12px 16px 4px; }
.sh-inv select { height: 32px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 14px var(--font); padding: 0 6px; }
.sh-inv .sh-who { flex: 1; min-width: 0; }
.sh-user .icon-btn { margin-left: 4px; }
.key-row { display: flex; align-items: center; gap: 8px; padding: 2px 6px; font-size: 14px; }
.key-row span { flex: 1; } .key-row small { color: var(--text-3); }
.cfg code { font-size: 12px; background: var(--bg-hover); padding: 1px 4px; border-radius: 3px; }

/* Beim Ziehen über mehrere Blöcke werden Blöcke markiert, kein Text */
body.picking, body.picking * { user-select: none !important; cursor: default; }

/* Seitenleiste: abgestufte Symbolgrößen. Seitensymbole 18 px, Aufklapp-Pfeile 14 px, Abschnittssymbole 14 px passend zur 12-px-Schrift */
#sidebar .row .ico { width: 20px; height: 20px; }
#sidebar .row .ico .ic { width: 18px; height: 18px; stroke-width: 1.6; }
#sidebar .row .ico .emo { font-size: 16px; line-height: 20px; }
#sidebar .row .caret .ic { width: 14px; height: 14px; stroke-width: 2; }
#sidebar .sect .s-ico .ic { width: 14px; height: 14px; stroke-width: 1.8; }
#sidebar .sect button .ic, #sidebar .row .acts .ic { width: 14px; height: 14px; }
#sidebar .ws .icon-btn .ic { width: 18px; height: 18px; stroke-width: 1.6; }
#sidebar .searchbox .ico .ic { width: 16px; height: 16px; }

/* Seitenbreite für alle Seiten (Benutzermenü): --page-w in Prozent oder 900 px */
.page { max-width: var(--page-w, 900px); }
.page.wide, .page.full { max-width: none; }
.page.agent { max-width: 760px; }
.pw-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; }
.pw-row .pw-r { flex: 1; accent-color: var(--accent); }
.pw-row .pw-n { width: 64px; flex: none; text-align: right; }

/* Seitenansicht am rechten Rand */
#app { position: relative; }
#peek { position: absolute; top: 0; right: 0; bottom: 0; width: clamp(420px, 50%, 960px); z-index: 30; display: flex; flex-direction: column; background: var(--bg); box-shadow: -1px 0 0 var(--border), -12px 0 32px rgba(15, 15, 15, .08); }
#peek header { height: 44px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 8px; }
#peek iframe { flex: 1; width: 100%; border: 0; }
html.peek #sidebar, html.peek #side-rs, html.peek #tabbar, html.peek #aifab, html.peek #topbar [data-act="expand"] { display: none !important; }
html.peek .page { padding: 24px 48px 0; max-width: none; }
iframe.pdf { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: 4px; margin-bottom: 4px; background: var(--bg-side); }

/* Gleichung im Text, Schaltfläche, Einstellungen */
span.itex { cursor: pointer; padding: 0 2px; border-radius: 3px; } span.itex:hover { background: var(--bg-hover); }
.btn-blk { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.btn-blk .btn-cfg { opacity: 0; } .block:hover .btn-blk .btn-cfg, .btn-blk .btn-cfg:focus-visible { opacity: 1; }
.page.locked .btn-cfg { display: none; }
#settings { position: fixed; inset: 0; z-index: 60; background: rgba(15, 15, 15, .4); display: grid; place-items: center; }
.set-box { position: relative; width: min(960px, 92vw); height: min(640px, 86vh); display: flex; background: var(--bg); border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.set-box nav { width: 220px; flex: none; background: var(--bg-side); padding: 12px 6px; display: flex; flex-direction: column; gap: 1px; }
.set-box nav button { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border-radius: 6px; font-size: 14px; color: var(--text-2); text-align: left; }
.set-box nav button:hover, .set-box nav button.on { background: var(--bg-hover); color: var(--text); }
.set-box section { flex: 1; overflow-y: auto; padding: 28px 48px; }
.set-box h3 { font-size: 16px; font-weight: 600; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.set-box h3:not(:first-child) { margin-top: 28px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 14px; }
.set-row span { display: flex; flex-direction: column; gap: 2px; } .set-row b { font-weight: 400; } .set-row small { font-size: 12px; color: var(--text-3); }
.set-row select, .set-row input { height: 32px; min-width: 120px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 14px var(--font); padding: 0 8px; }
.set-col { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; font-size: 14px; max-width: 360px; } .set-col b { font-weight: 400; }
.set-x { position: absolute; top: 10px; right: 10px; }

/* Eigene Icons des Arbeitsbereichs */
.cicon { width: 1.2em; height: 1.2em; object-fit: contain; border-radius: 3px; vertical-align: -3px; flex: none; }
#sidebar .row .ico .cicon { width: 18px; height: 18px; }
.pico .cicon { width: 64px; height: 64px; border-radius: 6px; }
.icon-grid .cicon { width: 22px; height: 22px; }
.icon-grid.own .up { color: var(--text-3); box-shadow: inset 0 0 0 1px var(--border); border-radius: 4px; }
#pop .icon-grid + .label, #pop .pop-in + .label { padding-top: 8px; }
.set-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; margin: 12px 0; }
.set-ic { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--border); font-size: 14px; }
.set-ic .cicon { width: 24px; height: 24px; } .set-ic span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Board-Karten: flacher Schatten statt des Menüschattens */
.card { box-shadow: 0 0 0 1px rgba(15, 15, 15, .06), 0 1px 2px rgba(15, 15, 15, .06); }
[data-theme="dark"] .card { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 1px 2px rgba(0, 0, 0, .3); }

/* Einstellungen: Farben */
.set-colors { display: grid; grid-template-columns: 1fr 110px 110px; gap: 8px 12px; align-items: center; margin: 12px 0 16px; font-size: 14px; }
.set-colors > b { font-weight: 500; font-size: 12px; color: var(--text-3); }
.col-cell { display: flex; align-items: center; gap: 4px; }
.col-cell input[type="color"] { width: 44px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; }

/* Einstellungen: Farbset */
textarea.pop-in.pal-in { height: auto; padding: 8px; font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.pal-prev { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; min-height: 24px; }
.pal-prev span { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--border); }
.pal-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.pal-row .grow { flex: 1; } .pal-row input[type="color"] { width: 44px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 6px; background: none; cursor: pointer; }
.pal-chk { display: inline-flex; align-items: center; gap: 6px; }
/* Board nach Messung am Vorbild: Spalte 276 px, Radius 10 px, Karte 40 px mit dreistufigem flachem Schatten */
.b-col { width: 276px; border-radius: 10px; padding: 0 8px 8px; background: rgba(66, 35, 3, .03); }
.card { border-radius: 10px; min-height: 40px; display: flex; flex-direction: column; justify-content: center; box-shadow: rgba(25, 25, 25, .027) 0 4px 12px 0, rgba(25, 25, 25, .02) 0 1px 2px 0, rgba(42, 28, 0, .07) 0 0 0 1px; }
[data-theme="dark"] .b-col { background: rgba(255, 255, 255, .03); }
[data-theme="dark"] .card { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 1px 2px rgba(0, 0, 0, .3); }

/* Datenbank-Leiste nach dem Vorbild: Ansichten als Pillen, Werkzeuge nur als Symbole, blauer Neu-Knopf */
.db-bar { border-bottom: 0; padding: 4px 0 8px; gap: 4px; }
.db-tabs { gap: 2px; align-items: center; }
.db-tabs .tab { height: 32px; padding: 0 12px; border-radius: 16px; font-size: 14px; font-weight: 500; color: var(--text-3); gap: 8px; }
.db-tabs .tab.on { color: var(--text); background: var(--bg-hover); }
.db-tabs .tab[data-a="add-view"] { width: 32px; padding: 0; justify-content: center; }
.db-tools { gap: 0; }
.db-tools .db-ib { width: 28px; height: 28px; padding: 0; justify-content: center; border-radius: 6px; color: #8e8b86; position: relative; }
.db-tools .db-ib .ic { width: 16px; height: 16px; }
.db-tools .db-ib.on { color: var(--accent); }
.db-tools .db-ib small { position: absolute; top: -2px; right: -2px; font-size: 9px; font-weight: 600; }
.db-q { display: none; width: 150px; margin: 0 4px; height: 28px; border-radius: 6px; }
.db-q.show, .db-q:not(:placeholder-shown), .db-q:focus { display: block; }
.db-tools .db-newgrp { margin-left: 6px; }
.db-tools .db-new { height: 28px; padding: 0 8px; font-size: 14px; }
.db-newgrp .db-new:first-child { border-radius: 6px 0 0 6px; } .db-newgrp .db-new:last-child { border-radius: 0 6px 6px 0; padding: 0 5px; }
.view-grid { display: grid; grid-template-columns: repeat(4, 88px); gap: 4px; padding: 4px 8px 12px; }
.view-grid button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; border-radius: 8px; font-size: 14px; }
.view-grid button:hover, .view-grid button:focus-visible { background: var(--menu-hover, var(--bg-hover)); outline: none; }
.view-grid .ic { width: 20px; height: 20px; }
.b-head { padding: 8px 4px 8px; } .b-n { font-size: 14px; }
.b-new { border-radius: 10px; min-height: 40px; padding: 0 12px; box-shadow: inset 0 0 0 1px rgba(42, 28, 0, .07); }
/* Cover und Kopfzeile der Seite nach dem Vorbild */
.cover { height: 30vh; max-height: 280px; min-height: 160px; }
.cover-acts { top: 12px; bottom: auto; right: 16px; gap: 0; background: var(--pop); border-radius: 6px; box-shadow: rgba(25, 25, 25, .027) 0 8px 12px 0, rgba(25, 25, 25, .027) 0 2px 6px 0, rgba(42, 28, 0, .07) 0 0 0 1px; overflow: hidden; }
.cover-acts button { background: none; box-shadow: none; border-radius: 0; font-size: 12px; color: var(--text-2); padding: 5px 9px; }
.cover-acts button + button { border-left: 1px solid var(--border); }
.cover-acts button:hover { background: var(--bg-hover); }
.cover.pos { cursor: ns-resize; } .cover.pos .cover-acts { display: none; }
.cover-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, .45); color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 4px; pointer-events: none; }
.cover-save { position: absolute; right: 16px; top: 12px; display: flex; gap: 0; background: var(--pop); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); }
.cover-save button { font-size: 12px; padding: 5px 9px; } .cover-save button + button { border-left: 1px solid var(--border); }
.cv { width: 540px; max-width: 92vw; padding-bottom: 8px; }
.cv .sh-tabs .grow { flex: 1; }
.cv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 4px 12px 8px; }
.cv-grid button { height: 64px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.cv-grid button:hover { opacity: .85; }
.cv .label { padding: 12px 14px 6px; }
.cv-up { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 16px 12px; }
.cv-up .pop-in { width: 100%; }
.head .addico { height: 28px; padding: 0 6px; gap: 6px; color: #a19e99; }
.head .addico .ic { width: 16px; height: 16px; }

/* Icon-Auswahl: feste Breite mit zwölf Spalten wie am Vorbild, Liste scrollt innerhalb */
#pop > .icon-grid { grid-template-columns: repeat(12, 32px); gap: 2px; width: 406px; padding: 0 0 4px; margin-left: 8px; margin-right: 8px; max-height: 300px; overflow-y: auto; align-content: start; }
#pop > .icon-grid.own { max-height: 104px; }
#pop > .icon-grid button { width: 32px; height: 32px; }
#pop > .icon-grid .ic { width: 20px; height: 20px; stroke-width: 1.7; }
#pop > .icon-grid.own .up { box-shadow: inset 0 0 0 1px var(--border); }
#pop > .pop-in + .label { padding-top: 6px; }

/* Board: Spalte in der Farbe der Option getönt, Kopf als Pille mit Punkt (am Vorbild gesehen) */
.b-head .chip { border-radius: 10px; padding: 0 8px 0 7px; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; line-height: 20px; }
.b-head .chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #91918e; flex: none; }
.b-col.c-gray { background: rgba(66,35,3, .03); } .b-col.c-gray .b-head .chip::before { background: #91918e; } .b-col.c-gray .b-n, .b-col.c-gray .b-new { color: #91918e; }
.b-col.c-blue { background: rgba(35,131,226, .05); } .b-col.c-blue .b-head .chip::before { background: #2783de; } .b-col.c-blue .b-n, .b-col.c-blue .b-new { color: #2783de; }
.b-col.c-green { background: rgba(60,160,100, .05); } .b-col.c-green .b-head .chip::before { background: #4f9768; } .b-col.c-green .b-n, .b-col.c-green .b-new { color: #4f9768; }
.b-col.c-yellow { background: rgba(200,150,20, .05); } .b-col.c-yellow .b-head .chip::before { background: #c29343; } .b-col.c-yellow .b-n, .b-col.c-yellow .b-new { color: #c29343; }
.b-col.c-orange { background: rgba(217,115,13, .05); } .b-col.c-orange .b-head .chip::before { background: #cc782f; } .b-col.c-orange .b-n, .b-col.c-orange .b-new { color: #cc782f; }
.b-col.c-red { background: rgba(225,80,70, .05); } .b-col.c-red .b-head .chip::before { background: #cd5e5a; } .b-col.c-red .b-n, .b-col.c-red .b-new { color: #cd5e5a; }
.b-col.c-purple { background: rgba(150,90,210, .05); } .b-col.c-purple .b-head .chip::before { background: #9a6bb4; } .b-col.c-purple .b-n, .b-col.c-purple .b-new { color: #9a6bb4; }
.b-col.c-pink { background: rgba(225,90,160, .05); } .b-col.c-pink .b-head .chip::before { background: #c96a99; } .b-col.c-pink .b-n, .b-col.c-pink .b-new { color: #c96a99; }
.b-col.c-brown { background: rgba(160,110,80, .05); } .b-col.c-brown .b-head .chip::before { background: #a27763; } .b-col.c-brown .b-n, .b-col.c-brown .b-new { color: #a27763; }
.b-col .b-new { background: none; }
/* Tabelle nach Messung: Kopf 36 px mit grauer 14-px-Schrift, Zeilen 38 px, Linien rgba(42,28,0,.07) */
.db-table th { height: 36px; font-size: 14px; font-weight: 400; color: #7d7a75; border-color: rgba(42, 28, 0, .07); }
.db-table td { height: 38px; border-color: rgba(42, 28, 0, .07); }
[data-theme="dark"] .db-table th { color: #9b9a95; } [data-theme="dark"] .db-table th, [data-theme="dark"] .db-table td { border-color: rgba(255, 255, 255, .09); }

/* Cover-Auswahl passt in die größte Popup-Breite */
#pop:has(.cv) { max-width: min(540px, calc(100vw - 16px)); overflow-x: hidden; }
.cv { width: 540px; max-width: calc(100vw - 16px); }

/* @-Vorschläge im Chat */
.at-pop { z-index: 70; padding: 4px; max-height: 320px; overflow-y: auto; }
.at-pop .item { width: 100%; }
.at-pop .item.sel { background: rgba(55, 53, 47, .08); }
[data-theme="dark"] .at-pop .item.sel { background: rgba(255, 255, 255, .09); }
.at-pop kbd { margin-left: auto; font: 12px var(--font); color: var(--text-3); }

/* Bildlaufleisten ausgeblendet, Scrollen bleibt (Rad, Trackpad, Tasten). Abschaltbar in den Einstellungen. */
html:not(.bars) * { scrollbar-width: none; }
html:not(.bars) *::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ============ TRAIXON-Farbsystem als Standard (Quelle: tx-design-system, "TRAIXON UI Foundation") ============
   Hell: brand-text, brand-slate, brand-paper, brand-line, brand-teal. Dunkel: dark-page, dark-surface, dark-text, dark-line. */
:root {
  --bg: #ffffff; --bg-side: #f7f9fa; --pop: #ffffff; --callout: #eef2f4;
  --text: #2a3340; --text-2: #46525f; --text-3: #8a97a4; --border: #e4e9ec;
  --bg-hover: rgba(35, 48, 63, .06); --bg-active: rgba(35, 48, 63, .10); --menu-hover: rgba(35, 48, 63, .05);
  --accent: #00948d; --accent-deep: #00736d; --accent-pale: #d8f2ee; --link: #005a55;
  --code-bg: #eef2f4; --inline-code: #933e36;
  --m-text: #2a3340; --m-dim: #8a97a4; --m-icon: #46525f; --m-line: #e4e9ec;
  --tx-bub: #23303f;
}
[data-theme="dark"] {
  --bg: #151b24; --bg-side: #111720; --pop: #212a36; --callout: #212a36;
  --text: #eef2f5; --text-2: #b9c4cf; --text-3: #9aa6b2; --border: #37424f;
  --bg-hover: rgba(238, 242, 245, .07); --bg-active: rgba(238, 242, 245, .12); --menu-hover: rgba(238, 242, 245, .06);
  --accent: #00948d; --accent-deep: #2fb4ac; --accent-pale: rgba(0, 148, 141, .22); --link: #4fc3bb;
  --code-bg: #2a3441; --inline-code: #f0aca6;
  --m-text: #eef2f5; --m-dim: #9aa6b2; --m-icon: #b9c4cf; --m-line: #37424f;
  --tx-bub: #2a3441;
}
.primary:hover, .db-tools .db-new:hover { background: var(--accent-deep); }
.content a, .bcrumb a:hover { color: var(--link); }
#spacepill, #spacepill .ic, #edited, .head .addico, .db-table th { color: var(--text-3); }
#topbar .top-right .icon-btn, .db-tools .db-ib { color: var(--text-2); }
.db-table th, .db-table td { border-color: var(--border); }
.b-col.c-gray { background: rgba(35, 48, 63, .035); }
.b-new { box-shadow: inset 0 0 0 1px var(--border); }
.card { box-shadow: rgba(35, 48, 63, .04) 0 4px 12px 0, rgba(35, 48, 63, .03) 0 1px 2px 0, var(--border) 0 0 0 1px; }
.block.picked { background: var(--accent-pale); }
::selection { background: rgba(0, 148, 141, .22); }
input[type="checkbox"], input[type="range"] { accent-color: var(--accent); }
/* Text- und Hintergrundfarben aus den Akzenttönen des Design-Systems (hell: -deep, dunkel: Grundton) */
.fg-gray > .body, .sw.fg-gray, .content span[data-c="fg-gray"] { color: #5e6b78; } [data-theme="dark"] .fg-gray > .body, [data-theme="dark"] .sw.fg-gray, [data-theme="dark"] .content span[data-c="fg-gray"] { color: #9aa6b2; }
.bg-gray > .body, .sw.bg-gray, .content span[data-c="bg-gray"] { background: #8a97a447; } [data-theme="dark"] .bg-gray > .body, [data-theme="dark"] .sw.bg-gray, [data-theme="dark"] .content span[data-c="bg-gray"] { background: #8a97a438; }
.fg-brown > .body, .sw.fg-brown, .content span[data-c="fg-brown"] { color: #8e653b; } [data-theme="dark"] .fg-brown > .body, [data-theme="dark"] .sw.fg-brown, [data-theme="dark"] .content span[data-c="fg-brown"] { color: #ecb075; }
.bg-brown > .body, .sw.bg-brown, .content span[data-c="bg-brown"] { background: #ecb07547; } [data-theme="dark"] .bg-brown > .body, [data-theme="dark"] .sw.bg-brown, [data-theme="dark"] .content span[data-c="bg-brown"] { background: #ecb07538; }
.fg-orange > .body, .sw.fg-orange, .content span[data-c="fg-orange"] { color: #965f49; } [data-theme="dark"] .fg-orange > .body, [data-theme="dark"] .sw.fg-orange, [data-theme="dark"] .content span[data-c="fg-orange"] { color: #ec9e80; }
.bg-orange > .body, .sw.bg-orange, .content span[data-c="bg-orange"] { background: #ec9e8047; } [data-theme="dark"] .bg-orange > .body, [data-theme="dark"] .sw.bg-orange, [data-theme="dark"] .content span[data-c="bg-orange"] { background: #ec9e8038; }
.fg-yellow > .body, .sw.fg-yellow, .content span[data-c="fg-yellow"] { color: #7b6f36; } [data-theme="dark"] .fg-yellow > .body, [data-theme="dark"] .sw.fg-yellow, [data-theme="dark"] .content span[data-c="fg-yellow"] { color: #e6d584; }
.bg-yellow > .body, .sw.bg-yellow, .content span[data-c="bg-yellow"] { background: #e6d58447; } [data-theme="dark"] .bg-yellow > .body, [data-theme="dark"] .sw.bg-yellow, [data-theme="dark"] .content span[data-c="bg-yellow"] { background: #e6d58438; }
.fg-green > .body, .sw.fg-green, .content span[data-c="fg-green"] { color: #567a4e; } [data-theme="dark"] .fg-green > .body, [data-theme="dark"] .sw.fg-green, [data-theme="dark"] .content span[data-c="fg-green"] { color: #9dd292; }
.bg-green > .body, .sw.bg-green, .content span[data-c="bg-green"] { background: #9dd29247; } [data-theme="dark"] .bg-green > .body, [data-theme="dark"] .sw.bg-green, [data-theme="dark"] .content span[data-c="bg-green"] { background: #9dd29238; }
.fg-blue > .body, .sw.fg-blue, .content span[data-c="fg-blue"] { color: #3c7696; } [data-theme="dark"] .fg-blue > .body, [data-theme="dark"] .sw.fg-blue, [data-theme="dark"] .content span[data-c="fg-blue"] { color: #6ebfed; }
.bg-blue > .body, .sw.bg-blue, .content span[data-c="bg-blue"] { background: #6ebfed47; } [data-theme="dark"] .bg-blue > .body, [data-theme="dark"] .sw.bg-blue, [data-theme="dark"] .content span[data-c="bg-blue"] { background: #6ebfed38; }
.fg-purple > .body, .sw.fg-purple, .content span[data-c="fg-purple"] { color: #6f6699; } [data-theme="dark"] .fg-purple > .body, [data-theme="dark"] .sw.fg-purple, [data-theme="dark"] .content span[data-c="fg-purple"] { color: #b1a6ee; }
.bg-purple > .body, .sw.bg-purple, .content span[data-c="bg-purple"] { background: #b1a6ee47; } [data-theme="dark"] .bg-purple > .body, [data-theme="dark"] .sw.bg-purple, [data-theme="dark"] .content span[data-c="bg-purple"] { background: #b1a6ee38; }
.fg-pink > .body, .sw.fg-pink, .content span[data-c="fg-pink"] { color: #955b6b; } [data-theme="dark"] .fg-pink > .body, [data-theme="dark"] .sw.fg-pink, [data-theme="dark"] .content span[data-c="fg-pink"] { color: #e18fa6; }
.bg-pink > .body, .sw.bg-pink, .content span[data-c="bg-pink"] { background: #e18fa647; } [data-theme="dark"] .bg-pink > .body, [data-theme="dark"] .sw.bg-pink, [data-theme="dark"] .content span[data-c="bg-pink"] { background: #e18fa638; }
.fg-red > .body, .sw.fg-red, .content span[data-c="fg-red"] { color: #933e36; } [data-theme="dark"] .fg-red > .body, [data-theme="dark"] .sw.fg-red, [data-theme="dark"] .content span[data-c="fg-red"] { color: #f0aca6; }
.bg-red > .body, .sw.bg-red, .content span[data-c="bg-red"] { background: #c05a5147; } [data-theme="dark"] .bg-red > .body, [data-theme="dark"] .sw.bg-red, [data-theme="dark"] .content span[data-c="bg-red"] { background: #c05a5138; }

/* Tabelle: Seitensymbol vor dem Titel, Fußzeile wie am Vorbild */
.db-table .td-title { position: relative; }
.db-table .td-title .t-ico { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; display: inline-flex; }
.db-table .td-title .t-ico .ic { width: 18px; height: 18px; stroke-width: 1.6; }
.db-table .td-title .c-in { padding-left: 34px; }
.db-foot button[data-a="new"] { color: var(--text-3); }
/* Gesperrte Datenbank: kein Umbau, Einträge bleiben bearbeitbar */
.db-locked [data-a="add-prop"], .db-locked [data-a="add-view"], .db-locked [data-a="add-group"], .db-locked .col-rs { display: none !important; }
.db-locked .db-title button::after { content: ''; width: 12px; height: 12px; margin-left: 4px; background: currentColor; opacity: .4; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4"><rect width="18" height="11" x="3" y="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>') center / contain no-repeat; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.4"><rect width="18" height="11" x="3" y="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>') center / contain no-repeat; }
/* Reste des alten Blaus folgen jetzt dem Akzent */
.db-tools .db-new:hover, .primary:hover { background: var(--accent-deep, var(--accent)); }
#presence .av, .switch.on, .chat-send, .cb-send { background: var(--accent); }
.font-tiles .on b, .font-tiles .on span { color: var(--accent); }
.block.flash, .block.menu-on > .body, #tree .dz-into { background: var(--accent-pale, rgba(0, 148, 141, .14)) !important; }
#tree .dz-before::before, #tree .dz-after::after, #side-rs:hover, .resizing #side-rs, .col-rs:hover { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.menu-q:focus, .pop-in:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 1px var(--accent); }
.chat-box:focus-within { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 4px 14px rgba(0, 0, 0, .06); }
.ag-l textarea:focus { border-color: var(--accent); }

/* Standard-Farbset: zwölf TRAIXON-Akzente (Preset „Kräftig“). Text: hell der -deep-Ton, dunkel der Grundton. Hintergrund: Grundton, getönt. */
.fg-rose > .body, .sw.fg-rose, .content span[data-c="fg-rose"] { color: #955B6B; } [data-theme="dark"] .fg-rose > .body, [data-theme="dark"] .sw.fg-rose, [data-theme="dark"] .content span[data-c="fg-rose"] { color: #E18FA6; }
.bg-rose > .body, .content span[data-c="bg-rose"] { background: #E18FA673; } .sw.bg-rose { background: #E18FA6; color: #23303f; } [data-theme="dark"] .bg-rose > .body, [data-theme="dark"] .content span[data-c="bg-rose"] { background: #E18FA647; }
.fg-coral > .body, .sw.fg-coral, .content span[data-c="fg-coral"] { color: #965F49; } [data-theme="dark"] .fg-coral > .body, [data-theme="dark"] .sw.fg-coral, [data-theme="dark"] .content span[data-c="fg-coral"] { color: #EC9E80; }
.bg-coral > .body, .content span[data-c="bg-coral"] { background: #EC9E8073; } .sw.bg-coral { background: #EC9E80; color: #23303f; } [data-theme="dark"] .bg-coral > .body, [data-theme="dark"] .content span[data-c="bg-coral"] { background: #EC9E8047; }
.fg-orange > .body, .sw.fg-orange, .content span[data-c="fg-orange"] { color: #8E653B; } [data-theme="dark"] .fg-orange > .body, [data-theme="dark"] .sw.fg-orange, [data-theme="dark"] .content span[data-c="fg-orange"] { color: #ECB075; }
.bg-orange > .body, .content span[data-c="bg-orange"] { background: #ECB07573; } .sw.bg-orange { background: #ECB075; color: #23303f; } [data-theme="dark"] .bg-orange > .body, [data-theme="dark"] .content span[data-c="bg-orange"] { background: #ECB07547; }
.fg-yellow > .body, .sw.fg-yellow, .content span[data-c="fg-yellow"] { color: #7B6F36; } [data-theme="dark"] .fg-yellow > .body, [data-theme="dark"] .sw.fg-yellow, [data-theme="dark"] .content span[data-c="fg-yellow"] { color: #E6D584; }
.bg-yellow > .body, .content span[data-c="bg-yellow"] { background: #E6D58473; } .sw.bg-yellow { background: #E6D584; color: #23303f; } [data-theme="dark"] .bg-yellow > .body, [data-theme="dark"] .content span[data-c="bg-yellow"] { background: #E6D58447; }
.fg-lime > .body, .sw.fg-lime, .content span[data-c="fg-lime"] { color: #69763F; } [data-theme="dark"] .fg-lime > .body, [data-theme="dark"] .sw.fg-lime, [data-theme="dark"] .content span[data-c="fg-lime"] { color: #C2D587; }
.bg-lime > .body, .content span[data-c="bg-lime"] { background: #C2D58773; } .sw.bg-lime { background: #C2D587; color: #23303f; } [data-theme="dark"] .bg-lime > .body, [data-theme="dark"] .content span[data-c="bg-lime"] { background: #C2D58747; }
.fg-emerald > .body, .sw.fg-emerald, .content span[data-c="fg-emerald"] { color: #567A4E; } [data-theme="dark"] .fg-emerald > .body, [data-theme="dark"] .sw.fg-emerald, [data-theme="dark"] .content span[data-c="fg-emerald"] { color: #9DD292; }
.bg-emerald > .body, .content span[data-c="bg-emerald"] { background: #9DD29273; } .sw.bg-emerald { background: #9DD292; color: #23303f; } [data-theme="dark"] .bg-emerald > .body, [data-theme="dark"] .content span[data-c="bg-emerald"] { background: #9DD29247; }
.fg-mint > .body, .sw.fg-mint, .content span[data-c="fg-mint"] { color: #2F7E71; } [data-theme="dark"] .fg-mint > .body, [data-theme="dark"] .sw.fg-mint, [data-theme="dark"] .content span[data-c="fg-mint"] { color: #6DD7C4; }
.bg-mint > .body, .content span[data-c="bg-mint"] { background: #6DD7C473; } .sw.bg-mint { background: #6DD7C4; color: #23303f; } [data-theme="dark"] .bg-mint > .body, [data-theme="dark"] .content span[data-c="bg-mint"] { background: #6DD7C447; }
.fg-sky > .body, .sw.fg-sky, .content span[data-c="fg-sky"] { color: #297B87; } [data-theme="dark"] .fg-sky > .body, [data-theme="dark"] .sw.fg-sky, [data-theme="dark"] .content span[data-c="fg-sky"] { color: #5BCADA; }
.bg-sky > .body, .content span[data-c="bg-sky"] { background: #5BCADA73; } .sw.bg-sky { background: #5BCADA; color: #23303f; } [data-theme="dark"] .bg-sky > .body, [data-theme="dark"] .content span[data-c="bg-sky"] { background: #5BCADA47; }
.fg-azure > .body, .sw.fg-azure, .content span[data-c="fg-azure"] { color: #3C7696; } [data-theme="dark"] .fg-azure > .body, [data-theme="dark"] .sw.fg-azure, [data-theme="dark"] .content span[data-c="fg-azure"] { color: #6EBFED; }
.bg-azure > .body, .content span[data-c="bg-azure"] { background: #6EBFED73; } .sw.bg-azure { background: #6EBFED; color: #23303f; } [data-theme="dark"] .bg-azure > .body, [data-theme="dark"] .content span[data-c="bg-azure"] { background: #6EBFED47; }
.fg-indigo > .body, .sw.fg-indigo, .content span[data-c="fg-indigo"] { color: #616B9D; } [data-theme="dark"] .fg-indigo > .body, [data-theme="dark"] .sw.fg-indigo, [data-theme="dark"] .content span[data-c="fg-indigo"] { color: #9AA9EF; }
.bg-indigo > .body, .content span[data-c="bg-indigo"] { background: #9AA9EF73; } .sw.bg-indigo { background: #9AA9EF; color: #23303f; } [data-theme="dark"] .bg-indigo > .body, [data-theme="dark"] .content span[data-c="bg-indigo"] { background: #9AA9EF47; }
.fg-violet > .body, .sw.fg-violet, .content span[data-c="fg-violet"] { color: #6F6699; } [data-theme="dark"] .fg-violet > .body, [data-theme="dark"] .sw.fg-violet, [data-theme="dark"] .content span[data-c="fg-violet"] { color: #B1A6EE; }
.bg-violet > .body, .content span[data-c="bg-violet"] { background: #B1A6EE73; } .sw.bg-violet { background: #B1A6EE; color: #23303f; } [data-theme="dark"] .bg-violet > .body, [data-theme="dark"] .content span[data-c="bg-violet"] { background: #B1A6EE47; }
.fg-sage > .body, .sw.fg-sage, .content span[data-c="fg-sage"] { color: #865E88; } [data-theme="dark"] .fg-sage > .body, [data-theme="dark"] .sw.fg-sage, [data-theme="dark"] .content span[data-c="fg-sage"] { color: #D9A1DC; }
.bg-sage > .body, .content span[data-c="bg-sage"] { background: #D9A1DC73; } .sw.bg-sage { background: #D9A1DC; color: #23303f; } [data-theme="dark"] .bg-sage > .body, [data-theme="dark"] .content span[data-c="bg-sage"] { background: #D9A1DC47; }
.content span[data-c^="bg-"] { border-radius: 3px; padding: .1em 0; }

/* Gesetzte Seitenbreite gilt für jede Seitenart: Agenten, Datenbankseiten, Home, Chat */
html.haspw:not(.peek) .page.agent, html.haspw:not(.peek) .page.wide:not(.full), html.haspw:not(.peek) .page.home, html.haspw:not(.peek) .page { max-width: var(--page-w); }
html.haspw:not(.peek) .page.full { max-width: none; }

/* Agent: Zeitplan */
.ag-sched { flex-direction: row; align-items: center; gap: 8px; }
.ag-sched select, .ag-sched input { height: 32px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 14px var(--font); padding: 0 8px; }

/* Aufgaben: Schnelleingabe und Tagesansicht */
#quick, #myday { position: fixed; inset: 0; z-index: 65; background: rgba(15, 20, 28, .35); display: flex; justify-content: center; align-items: flex-start; padding-top: 16vh; }
.q-box, .d-box { width: min(620px, 92vw); background: var(--pop); border-radius: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3), 0 0 0 1px var(--border); overflow: hidden; }
.d-box { max-height: 70vh; display: flex; flex-direction: column; }
.q-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.q-row .ic { width: 20px; height: 20px; color: var(--accent); }
.q-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 16px var(--font); color: var(--text); }
.q-row kbd, .q-foot kbd, #sidebar .row kbd { font: 11px var(--font); color: var(--text-3); }
.q-list:empty { display: none; } .q-list { max-height: 30vh; overflow-y: auto; padding: 6px 8px; }
.q-it { display: flex; align-items: center; gap: 8px; padding: 5px 8px; font-size: 14px; } .q-it .ic { width: 14px; height: 14px; color: var(--accent); } .q-it small { margin-left: auto; color: var(--text-3); }
.q-foot { padding: 6px 8px; } .q-foot button { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border-radius: 6px; font-size: 14px; color: var(--text-2); }
.q-foot button:hover { background: var(--bg-hover); } .q-foot kbd { margin-left: auto; }
.d-box header { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; }
.d-box header b { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; } .d-date { flex: 1; color: var(--text-3); font-size: 14px; }
.d-box .q-row { border-top: 1px solid var(--border); }
.d-list { overflow-y: auto; padding: 4px 8px 12px; }
.d-list h4 { display: flex; align-items: center; gap: 6px; margin: 12px 8px 4px; font-size: 12px; font-weight: 500; color: var(--text-3); } .d-list h4 i { font-style: normal; opacity: .7; }
.d-list h4.late { color: #933e36; } [data-theme="dark"] .d-list h4.late { color: #f0aca6; }
.d-it { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 8px; border-radius: 6px; font-size: 15px; }
.d-it:hover { background: var(--bg-hover); }
.d-it input { width: 16px; height: 16px; flex: none; }
.d-it .d-t { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-it small { color: var(--text-3); font-size: 12px; white-space: nowrap; } .d-it.late small { color: #933e36; }
.d-it .icon-btn { width: 24px; height: 24px; opacity: 0; } .d-it:hover .icon-btn, .d-it .icon-btn:focus-visible { opacity: 1; }
.d-it.done .d-t { text-decoration: line-through; color: var(--text-3); }
.d-none { padding: 16px 8px; }
#sidebar .row .row-n { margin-left: auto; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; line-height: 18px; text-align: center; background: var(--bg-active); color: var(--text-2); }
#sidebar .row .row-n:empty { display: none; } #sidebar .row .row-n.late { background: #933e36; color: #fff; }
#sidebar .row[data-act="tasks"] kbd { opacity: 0; } #sidebar .row[data-act="tasks"]:hover kbd { opacity: 1; } #sidebar .row[data-act="tasks"] .row-n + kbd { margin-left: 6px; }

/* ============ Einheitliche Symbolgrößen (überall): Grundmaß 16 px bei Strich 1.75, klein 14, Pfeile 12 ============ */
.ic { width: 16px; height: 16px; stroke-width: 1.75; }
.icon-btn .ic, #topbar .top-right .icon-btn .ic, #sidebar .ws .icon-btn .ic, #tabbar .icon-btn .ic, #peek .icon-btn .ic, .cover-acts .ic { width: 16px; height: 16px; stroke-width: 1.75; }
.top-share .ic { width: 15px; height: 15px; }
#spacepill .ic { width: 13px; height: 13px; } #spacepill .ic:last-child { width: 10px; height: 10px; }
#crumbs .ic, #crumbs .cicon { width: 15px; height: 15px; }
#sidebar .row .ico { width: 18px; height: 18px; }
#sidebar .row .ico .ic, #sidebar .row .ico .cicon { width: 16px; height: 16px; stroke-width: 1.75; }
#sidebar .row .ico .emo { font-size: 14px; line-height: 18px; }
#sidebar .row .caret .ic { width: 12px; height: 12px; stroke-width: 2; }
#sidebar .sect .s-ico .ic { width: 13px; height: 13px; stroke-width: 1.75; }
#sidebar .sect button .ic, #sidebar .row .acts .ic { width: 14px; height: 14px; }
#sidebar .searchbox .ico .ic { width: 15px; height: 15px; }
.homebar .icon-btn .ic:has(.tx-bub) { width: 18px; height: 18px; }
.mi .ic, .pop .item > .ic, .pop .glyph .ic { width: 16px; height: 16px; stroke-width: 1.75; }
.db-tools .db-ib .ic, .db-tabs .tab .ic, .db-title .ic { width: 15px; height: 15px; }
.db-title .ic { width: 18px; height: 18px; }
.db-table th .ic, .rowprops .ic { width: 14px; height: 14px; }
.db-table .td-title .t-ico .ic, .card .ic, .li .ic { width: 16px; height: 16px; stroke-width: 1.75; }
.view-grid .ic { width: 18px; height: 18px; }
#pop > .icon-grid .ic { width: 18px; height: 18px; stroke-width: 1.75; }
.head .addico .ic, .start-p .ic, .meet-tabs .ic { width: 15px; height: 15px; }
#aichat .chat-hello .chat-tips button .ic, .chat-tips .ic { width: 16px; height: 16px; }
.gutter .ic { width: 15px; height: 15px; }
.t-callout .prefix .ic { width: 17px; height: 17px; }
.q-row .ic { width: 18px; height: 18px; } .d-box header b .ic { width: 16px; height: 16px; }
.set-box nav .ic { width: 16px; height: 16px; }
.pagelink .ic, .bcrumb .ic, .filelink .ic { width: 16px; height: 16px; }
/* bewusst groß bleiben: Seitensymbol im Kopf, Chat-Zeichen, leere Zustände */
.pico .ic { width: 64px; height: 64px; stroke-width: 1.5; } .pico .cicon { width: 64px; height: 64px; }
#aifab .ic { width: 50px; height: 50px; } .chat-logo .ic:has(.tx-bub) { width: 40px; height: 40px; }
.g-cover .ic { width: 40px; height: 40px; stroke-width: 1.5; } .sh-pub > .ic { width: 28px; height: 28px; } .hc-ico .ic { width: 22px; height: 22px; }
.chip .ic, .chat-ctx .ic, .sync-src .ic, .col-x .ic, .col-add .ic { width: 12px; height: 12px; }

/* Agent: Einstellungen im selben Fenster wie die Arbeitsbereich-Einstellungen */
.ag-modal { position: fixed; inset: 0; z-index: 60; background: rgba(15, 15, 15, .4); display: grid; place-items: center; }
.ag-modal .set-row em { font-style: normal; color: var(--text-3); font-size: 14px; }
.ag-modal .ag-l textarea { width: 100%; }
.ag-modal .db-list { margin: 8px 0 12px; }
.ag-btns { flex-wrap: wrap; }

/* Vorschau als Fenster in der Mitte (umschaltbar im Kopf der Vorschau) */
#peek.center { top: 6vh; bottom: 6vh; left: 50%; right: auto; width: min(960px, 86%); transform: translateX(-50%); border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--border), 0 24px 70px rgba(0, 0, 0, .35), 0 0 0 100vmax rgba(15, 20, 28, .35); }

/* Mehrere Reiter in der Kopfzeile */
#tabs { display: flex; align-items: stretch; min-width: 0; flex: 0 1 auto; overflow: hidden; }
#tabs .tab-it { display: flex; align-items: center; gap: 8px; width: 200px; min-width: 72px; flex: 0 1 200px; padding: 0 8px 0 12px; font-size: 14px; color: var(--text-3); cursor: pointer; border-right: 1px solid var(--border); white-space: nowrap; }
#tabs .tab-it:first-child { border-left: 1px solid var(--border); }
#tabs .tab-it:hover { background: var(--bg-hover); }
#tabs .tab-it.tab-on { width: auto; max-width: none; margin-bottom: -1px; background: var(--bg); color: var(--text); font-weight: 500; padding: 0 8px 0 12px; border-left-width: 0; }
#tabs .tab-it.tab-on:first-child { border-left: 1px solid var(--border); }
#tabs .tab-ic { display: inline-flex; flex: none; } #tabs .tab-ic .ic, #tabs .tab-ic .cicon { width: 15px; height: 15px; }
#tabs .tab-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#tabs .tab-x { width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; opacity: 0; flex: none; }
#tabs .tab-it:hover .tab-x, #tabs .tab-on .tab-x { opacity: .7; } #tabs .tab-x:hover { background: var(--bg-active); opacity: 1; }
#tabs .tab-x .ic { width: 12px; height: 12px; }

/* Automationen einer Datenbank */
.au { width: 460px; max-width: 92vw; }
.au-rule { display: flex; align-items: center; gap: 8px; padding: 4px 6px; font-size: 14px; } .au-rule span { flex: 1; } .au-rule > .ic { color: var(--accent); }
.au-new { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 6px 2px; font-size: 14px; color: var(--text-2); }
.au-new select { height: 28px; max-width: 150px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 14px var(--font); padding: 0 4px; }

/* Unterelemente in der Tabelle */
.db-table tr.sub .td-title .t-ico { left: calc(8px + var(--sub, 0) * 22px); }
.db-table tr.sub .td-title .c-in { padding-left: calc(34px + var(--sub, 0) * 22px); }
.db-table .td-title .sub-tg { position: absolute; left: calc(-14px + var(--sub, 0) * 22px); top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; color: var(--text-3); z-index: 1; }
.db-table .td-title .sub-tg:hover { background: var(--bg-hover); }
.db-table .td-title .sub-tg .ic { width: 12px; height: 12px; transition: transform .12s; } .db-table .td-title .sub-tg.open .ic { transform: rotate(90deg); }
.db-table tr:has(.sub-tg) .td-title .t-ico { left: calc(12px + var(--sub, 0) * 22px); } .db-table tr:has(.sub-tg) .td-title .c-in { padding-left: calc(38px + var(--sub, 0) * 22px); }
.db-table tr:has(.sub-tg) .td-title .sub-tg { left: calc(-4px + var(--sub, 0) * 22px); }
.db-table tr:has(.sub-tg) .td-title .sub-tg { left: calc(4px + var(--sub, 0) * 22px); }
.db-table tr:has(.sub-tg) .td-title .t-ico { left: calc(26px + var(--sub, 0) * 22px); }
.db-table tr:has(.sub-tg) .td-title .c-in { padding-left: calc(50px + var(--sub, 0) * 22px); }
.db-table .td-title .sub-tg { opacity: 1 !important; z-index: 3; color: var(--text-2); background: none; border: 0; padding: 0; }
.db-table .td-title .sub-tg .ic { display: block; }

/* Feed- und Formular-Ansicht */
.feed { display: flex; flex-direction: column; gap: 10px; max-width: 680px; }
.feed-it { padding: 12px 14px; border-radius: 10px; background: var(--pop); box-shadow: 0 0 0 1px var(--border); cursor: pointer; }
.feed-it:hover { background: var(--bg-hover); }
.feed-it header { display: flex; align-items: center; gap: 8px; } .feed-it header b { font-weight: 600; } .feed-it header time { margin-left: auto; font-size: 12px; color: var(--text-3); }
.feed-ic { display: inline-flex; } .feed-it p { margin: 6px 0 4px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.db-form { max-width: 560px; padding: 20px 24px; border-radius: 10px; box-shadow: 0 0 0 1px var(--border); display: flex; flex-direction: column; gap: 12px; }
.db-form h3 { margin: 0 0 4px; font-size: 20px; }
.db-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; } .db-form label span { color: var(--text-2); font-size: 13px; }
.db-form label.chk { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; }
.db-form input:not([type="checkbox"]), .db-form select { height: 34px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 14px var(--font); padding: 0 10px; outline: none; }
.db-form input:focus, .db-form select:focus { border-color: var(--accent); }
.form-acts { display: flex; align-items: center; gap: 8px; margin-top: 4px; } .form-acts .grow { flex: 1; }

/* Reiter-Block */
.tabsblk { flex: 1; min-width: 0; }
.tb-bar { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.tb-tab { padding: 6px 10px; font-size: 14px; font-weight: 500; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 4px 4px 0 0; }
.tb-tab:hover { background: var(--bg-hover); } .tb-tab.on { color: var(--text); border-bottom-color: var(--text); }
.tb-add { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; color: var(--text-3); opacity: 0; }
.t-tabs:hover .tb-add, .tb-add:focus-visible { opacity: 1; } .tb-add:hover { background: var(--bg-hover); } .tb-add .ic { width: 14px; height: 14px; }
.page.locked .tb-add { display: none; }

/* Agenten-Seite nach dem Vorbild: Farbband, rundes Symbol, Beschreibung, Chat-Eingabe, Einstellungen als Karten */
.ag-band { height: 112px; background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.ag-band + .page.agent { padding-top: 0; }
.ag-band + .page.agent .head { margin-top: -34px; }
.page.agent { max-width: 760px; }
.ag-id { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.ag-id:not(.big) { flex-direction: row; align-items: center; gap: 12px; }
.ag-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 45%, var(--bg)); color: #23303f; flex: none; }
.ag-ico .ic { width: 30px; height: 30px; } .ag-ico .cicon { width: 40px; height: 40px; border-radius: 50%; } .ag-ico .emo { font-size: 28px; }
.ag-id:not(.big) .ag-ico { width: 32px; height: 32px; } .ag-id:not(.big) .ag-ico .ic { width: 17px; height: 17px; }
.page.agent .title { font-size: 26px; margin: 0; } .ag-id:not(.big) .title { font-size: 26px; }
.ag-desc { width: 100%; margin: 6px 0 18px; border: 0; outline: 0; resize: none; background: none; color: var(--text-2); font: 15px/1.5 var(--font); overflow: hidden; }
.ag-chat { position: relative; border-radius: 12px; box-shadow: 0 0 0 1px var(--border), 0 2px 6px rgba(35, 48, 63, .04); padding: 12px 12px 8px; margin-bottom: 22px; background: var(--pop); }
.ag-chat .ag-ask { width: 100%; border: 0; outline: 0; resize: none; background: none; color: var(--text); font: 15px/1.5 var(--font); min-height: 26px; }
.ag-chat .ag-ask:disabled::placeholder { color: var(--text-2); }
.ag-link { position: absolute; left: 12px; top: 36px; color: var(--accent); font-size: 14px; font-weight: 500; }
.ag-chat-row { display: flex; align-items: center; margin-top: 18px; } .ag-chat-row .grow, .ag-sec .grow { flex: 1; }
.ag-chat .chat-send:disabled { opacity: .35; cursor: default; }
.ag-sec { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; font-size: 13px; color: var(--text-2); }
.ag-mini { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: 6px; font-size: 13px; color: var(--text-2); }
.ag-mini:hover { background: var(--bg-hover); } .ag-mini .ic { width: 14px; height: 14px; }
.ag-empty { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 44px 0 28px; font-size: 14px; } .ag-empty b { font-weight: 600; } .ag-empty span { color: var(--text-3); font-size: 13px; }
.ag-settings { padding-top: 16px; }
.ag-save { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 22px; font-size: 13px; }
.ag-h { display: flex; flex-direction: column; margin: 26px 0 8px; } .ag-h b { font-size: 14px; font-weight: 600; } .ag-h small { font-size: 12px; color: var(--text-3); }
.ag-card { border-radius: 10px; box-shadow: 0 0 0 1px var(--border); background: var(--pop); }
.ag-card-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 14px; min-height: 40px; }
.ag-card-row + .ag-card-row { border-top: 1px solid var(--border); }
.ag-card-row.ag-tr + .ag-card-row.ag-tr, .ag-card-row.ag-src, .ag-card-row.ag-src + .ag-card-row { border-top: 0; }
.ag-card-row > span { flex: 1; min-width: 0; } .ag-card-row b { font-weight: 500; } .ag-card-row i { font-style: normal; color: var(--text-3); }
.ag-card-row > .ic { width: 15px; height: 15px; color: var(--text-2); flex: none; }
.ag-card-row.ag-adv > span { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; } .ag-card-row.ag-adv small { font-size: 12px; color: var(--text-3); } .ag-card-row.ag-adv em { font-style: normal; color: var(--text-2); }
.ag-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 6px; background: var(--bg-hover); font-size: 14px; font-weight: 500; }
.ag-pill:hover { background: var(--bg-active); } .ag-pill.ghost { background: none; color: var(--text-3); font-weight: 400; } .ag-pill .ic { width: 14px; height: 14px; }
.ag-src { padding-left: 36px; } .ag-src-n { display: flex; align-items: center; gap: 8px; }
.ag-src select { height: 28px; border: 0; background: none; color: var(--text-2); font: 13px var(--font); cursor: pointer; }
.ag-settings .ag-l { display: block; } .ag-settings .ag-l textarea { width: 100%; border-radius: 10px; }
.ag-sub { display: block; margin: 12px 0 6px; font-size: 12px; color: var(--text-3); }
.ag-trig { width: min(720px, 92vw); height: min(520px, 80vh); }
.ag-trig nav { width: 250px; padding: 14px 8px; } .ag-nav-t { padding: 0 10px 10px; font-size: 16px; font-weight: 600; }
.ag-nav-g { display: flex; align-items: center; gap: 8px; padding: 10px 10px 4px; font-size: 12px; color: var(--text-3); } .ag-nav-g .ic { width: 13px; height: 13px; }
.ag-trig nav button { padding-left: 30px; height: 28px; }
.ag-trig section { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; } .ag-trig section h3 { display: flex; align-items: center; gap: 8px; border: 0; margin: 0 0 6px; padding: 0; }
.ag-trig select, .ag-trig input[type="time"] { height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 14px var(--font); padding: 0 10px; }
.ag-trig-foot { margin-top: auto; display: flex; justify-content: flex-end; }
html.haspw:not(.peek) .page.agent { max-width: var(--page-w); }

/* Statusleiste mit Kennungen */
#idbar { display: flex; align-items: stretch; flex: none; height: 28px; border-top: 1px solid var(--border); background: var(--bg-side); font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-3); overflow: hidden; }
#idbar[hidden] { display: none; }
#idbar .idb { display: flex; align-items: center; gap: 7px; padding: 0 12px; border-right: 1px solid var(--border); color: inherit; white-space: nowrap; letter-spacing: .04em; }
#idbar .idb:hover { background: var(--bg-hover); color: var(--text-2); }
#idbar .idb code { font: inherit; color: var(--text-2); letter-spacing: 0; }
#idbar .idb .ic { width: 12px; height: 12px; opacity: .7; }
#idbar .idb-sp { flex: 1; }
#idbar .idb-off { border-right: 0; border-left: 1px solid var(--border); }
#idbar .idb-off kbd { font: inherit; }
#idbar:not([hidden]) ~ #aifab { bottom: 48px; }

/* Hinweis beim Bearbeiten einer Datenbank-Vorlage */
.tpl-note { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; padding: 7px 10px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text-2); font-size: .86em; }
.tpl-note .ic { width: 15px; height: 15px; color: var(--accent); }

/* Kalender: Umschalter Monat, Woche, Tag, Agenda */
.cal-modes { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--bg-hover); margin-right: 6px; }
.cal-bar .cal-modes button { padding: 2px 9px; border-radius: 5px; font-size: 12.5px; }
.cal-bar .cal-modes button.on { background: var(--pop); color: var(--text); box-shadow: 0 0 0 1px rgba(128,128,128,.18), 0 1px 2px rgba(0,0,0,.06); }
.cal-week .cal-day { min-height: 360px; }
.cal-one .cal-days { grid-template-columns: minmax(0, 1fr); }
.cal-one .cal-day { min-height: 420px; }
.cal-one .cal-day .card, .cal-week .cal-day .card { margin-top: 4px; }
.cal-agenda { border-top: 1px solid var(--border); }
.ag-day { display: flex; gap: 16px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.ag-day.over { outline: 2px solid var(--accent); outline-offset: -2px; }
.ag-date { width: 84px; flex: none; display: flex; align-items: baseline; gap: 8px; color: var(--text-2); font-size: 12.5px; }
.ag-date b { font-size: 20px; font-weight: 600; color: var(--text); min-width: 26px; }
.ag-day.today .ag-date b { color: var(--accent); }
.ag-list { flex: 1; display: grid; gap: 4px; }

/* Codeblock: Sprachwahl, Kopieren, Syntaxfarben */
.t-code .body { position: relative; }
.t-code .code-bar { position: absolute; top: 4px; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; z-index: 2; }
.t-code:hover .code-bar, .t-code:focus-within .code-bar { opacity: 1; }
.t-code .code-bar button { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 6px; border-radius: 4px; font-size: 12px; color: var(--text-2); }
.t-code .code-bar button:hover { background: var(--bg-hover); color: var(--text); }
.t-code .code-bar .ic { width: 12px; height: 12px; }
.t-code .code-hl { position: absolute; left: 16px; right: 16px; top: 22px; margin: 0; font-family: var(--mono); font-size: 14px; line-height: inherit; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; tab-size: 2; pointer-events: none; color: var(--text); }
.t-code .content { position: relative; word-break: break-word; overflow-wrap: anywhere; }
.t-code.hl .content { color: transparent; caret-color: var(--text); }
.t-code.hl .content::selection { color: transparent; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.tk-c { color: var(--text-3); font-style: italic; }
.tk-s { color: #2f7d57; } .tk-n { color: #b4611c; } .tk-k { color: #7447b8; } .tk-d { color: #b23b3b; }
[data-theme="dark"] .tk-s { color: #86cfa5; } [data-theme="dark"] .tk-n { color: #e3a66b; } [data-theme="dark"] .tk-k { color: #b9a0f2; } [data-theme="dark"] .tk-d { color: #f08a8a; }

/* Einstellungen: eigene Text- und Hintergrundfarben */
.set-tints { grid-template-columns: minmax(120px, 1fr) repeat(3, 110px); }
.set-tints .tint-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }

/* Diagramme */
.ch-svg { display: block; width: 100%; max-width: 860px; height: auto; }
.ch-svg .ch-g { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.ch-svg .ch-g0 { stroke-dasharray: none; }
.ch-svg .ch-ax { font-size: 11.5px; fill: var(--text-3); }
.ch-svg .ch-v { font-size: 11.5px; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.ch-donut { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; padding: 6px 0 10px; }
.ch-donut svg { width: 240px; height: 240px; flex: none; }
.ch-donut .ch-tot { font-size: 30px; font-weight: 600; fill: var(--text); text-anchor: middle; }
.ch-donut .ch-sub { font-size: 12px; fill: var(--text-3); text-anchor: middle; }
.ch-leg { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; min-width: 240px; font-size: 14px; }
.ch-leg li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 44px; align-items: center; gap: 9px; }
.ch-leg i { width: 10px; height: 10px; border-radius: 3px; }
.ch-leg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-leg b { font-weight: 500; font-variant-numeric: tabular-nums; }
.ch-leg em { font-style: normal; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.ch-num { display: flex; flex-direction: column; gap: 4px; padding: 26px 4px 30px; }
.ch-num b { font-size: 56px; line-height: 1; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ch-num span { color: var(--text-2); font-size: 14px; }

/* Dashboard-Ansicht */
.dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 4px 0 12px; }
.dw { min-width: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); padding: 10px 14px 12px; display: flex; flex-direction: column; }
.dw > header { display: flex; align-items: center; gap: 8px; min-height: 26px; margin-bottom: 6px; }
.dw-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-n { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.dw > header .db-ib { margin-left: auto; opacity: 0; }
.dw:hover > header .db-ib, .dw > header .db-ib:focus-visible { opacity: 1; }
.dw-body { min-width: 0; overflow: auto; max-height: 460px; }
.dw-chart .dw-body { display: flex; align-items: center; justify-content: center; flex: 1; overflow: visible; }
.dw-chart .ch-svg { max-width: none; }
.dw .ch-num { padding: 8px 0 6px; align-self: flex-start; } .dw .ch-num b { font-size: 44px; }
.dw-chart .dw-body:has(.ch-num) { justify-content: flex-start; }
.dw .ch-donut { gap: 18px; padding: 0; } .dw .ch-donut svg { width: 170px; height: 170px; } .dw .ch-leg { min-width: 150px; font-size: 13px; }
.dw .db-foot, .dw .cal-info { display: none; }
.dw-add { grid-column: span 1; min-height: 96px; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 6px; }
.dw-add:hover { background: var(--bg-hover); color: var(--text-2); }
.dw-add .ic { width: 15px; height: 15px; }
@container (max-width: 720px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .dash { grid-template-columns: minmax(0, 1fr); } .dw { grid-column: span 1 !important; } }

/* HTML-Block */
.hb { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: 4px 0; }
.hb-frame { display: block; width: 100%; border: 0; background: transparent; }
.hb-bar { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; z-index: 2; background: var(--pop); border-radius: 6px; box-shadow: var(--shadow); padding: 2px; }
.hb:hover .hb-bar, .hb:focus-within .hb-bar { opacity: 1; }
.hb-bar button { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 7px; border-radius: 4px; font-size: 12px; color: var(--text-2); }
.hb-bar button:hover { background: var(--bg-hover); color: var(--text); }
.hb-bar .ic { width: 13px; height: 13px; }
.hb-empty { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; color: var(--text-2); background: var(--bg-side); border-style: dashed; }
.hb-empty > .ic { width: 18px; height: 18px; color: var(--text-3); }
.hb-empty > span { flex: 1; min-width: 180px; }
.hb-empty .primary .ic { width: 14px; height: 14px; vertical-align: -2px; }
.locked .hb-bar, .locked .hb-empty button { display: none; }
#hbedit .hb-box { width: min(860px, calc(100vw - 48px)); display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; max-height: calc(100vh - 80px); }
#hbedit header { display: flex; align-items: center; justify-content: space-between; }
#hbedit header b { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; }
#hbedit .hb-code { flex: 1; min-height: 46vh; font: 13px/1.5 var(--mono); white-space: pre; tab-size: 2; resize: vertical; }
#hbedit footer { display: flex; justify-content: flex-end; gap: 8px; }

.t-html > .body { display: block; } .t-html .hb { width: 100%; }

/* Formular-Ansicht: Leiste, Editor, Teilen */
.form-bar { display: flex; align-items: center; gap: 10px; padding: 2px 0 12px; flex-wrap: wrap; }
.form-bar .cal-modes button { padding: 3px 10px; border-radius: 5px; font-size: 13px; color: var(--text-2); }
.form-bar .cal-modes button.on { background: var(--pop); color: var(--text); box-shadow: 0 0 0 1px rgba(128,128,128,.18), 0 1px 2px rgba(0,0,0,.06); }
.form-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); padding: 3px 9px; border-radius: 999px; background: var(--bg-hover); }
.form-chip .ic { width: 13px; height: 13px; }
.form-chip.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.form-chip.warn { color: #b4611c; background: color-mix(in srgb, #e39a52 16%, transparent); }
.form-bar .primary { display: inline-flex; align-items: center; gap: 6px; } .form-bar .primary .ic { width: 14px; height: 14px; }
.db-form small { color: var(--text-3); font-size: 12.5px; }
.db-form .fb-lead { margin: -4px 0 4px; color: var(--text-2); white-space: pre-wrap; }
.db-form .fb-multi { display: grid; gap: 4px; } .db-form .fb-multi label.chk { flex-direction: row; justify-content: flex-start; } .db-form .fb-multi label.chk span { color: var(--text); font-size: 14px; }
.db-formb { max-width: 640px; gap: 10px; }
.db-formb .fb-title { height: auto !important; border: 0 !important; padding: 0 !important; font-size: 26px !important; font-weight: 700; letter-spacing: -.01em; background: transparent; }
.db-formb .fb-desc { border: 0; padding: 0; resize: vertical; font: 14.5px/1.5 var(--font); color: var(--text-2); background: transparent; outline: none; min-height: 24px; }
.fb-q { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 12px; display: grid; gap: 6px; background: var(--bg); }
.fb-q:focus-within { border-color: var(--accent); }
.fb-qh { display: flex; align-items: center; gap: 4px; min-height: 26px; }
.fb-type { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); } .fb-type em { font-style: normal; } .fb-type .ic { width: 14px; height: 14px; }
.fb-req { flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 12.5px !important; color: var(--text-2); margin-right: 6px; }
.fb-q .db-ib[disabled] { opacity: .3; pointer-events: none; }
.db-formb .fb-label { font-weight: 600; font-size: 15px !important; }
.db-formb .fb-hint { font-size: 13px !important; color: var(--text-2) !important; height: 30px !important; }
.fb-add { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border: 1px dashed var(--border); border-radius: 10px; color: var(--text-2); }
.fb-add:hover { background: var(--bg-hover); } .fb-add .ic { width: 15px; height: 15px; } .fb-add small { background: var(--bg-hover); border-radius: 999px; padding: 0 7px; }
.fb-end { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
#pop[data-kind="fshare"] { max-width: none; }
.fshare { width: 380px; padding: 14px 16px; display: grid; gap: 10px; }
.fshare > b { font-size: 15px; } .fshare .hint { margin: 0; }
.fs-link { display: flex; gap: 8px; } .fs-link input { flex: 1; min-width: 0; }
.fs-row { display: grid; gap: 5px; font-size: 13px; color: var(--text-2); } .fs-row span { display: inline-flex; align-items: center; gap: 6px; } .fs-row .ic { width: 14px; height: 14px; }
.fs-acts { display: flex; gap: 8px; } .fs-foot { display: flex; justify-content: flex-end; padding-top: 6px; border-top: 1px solid var(--border); }
.fshare .primary { display: inline-flex; align-items: center; gap: 6px; } .fshare .primary .ic { width: 14px; height: 14px; }
.fshare .primary.danger { color: #c0392b; }

/* Seitenleiste anpassen */
.sc-head { padding: 8px 10px 6px; font-size: 13px; color: var(--text-2); }
.sc-sep { height: 1px; background: var(--border); margin: 8px 8px; }
.sc-row { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 6px 0 2px; border-radius: 6px; cursor: grab; }
.sc-row:hover { background: var(--bg-hover); }
.sc-row.over { box-shadow: inset 0 2px 0 var(--accent); }
.sc-row.off .ttl, .sc-row.off .ico { opacity: .45; }
.sc-row .ttl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.sc-row .ico .ic, .sc-grip .ic { width: 15px; height: 15px; }
.sc-grip { color: var(--text-3); display: grid; place-items: center; width: 16px; }
.sc-row .icon-btn { width: 24px; height: 24px; } .sc-row .icon-btn .ic { width: 14px; height: 14px; } .sc-row .icon-btn[disabled] { opacity: .25; pointer-events: none; }
.sc-pin .icon-btn { margin-left: auto; width: 22px; height: 22px; }
.sc-done { display: block; width: calc(100% - 16px); margin: 12px 8px 8px; height: 32px; }

/* Codeblock: ohne Zeilenumbruch, Beschriftung */
.t-code .body.nowrap { overflow-x: auto; }
.t-code .body.nowrap .content { white-space: pre; word-break: normal; overflow-wrap: normal; width: max-content; min-width: 100%; }
.t-code .body.nowrap .code-hl { white-space: pre; word-break: normal; overflow-wrap: normal; right: auto; width: max-content; }
.t-code .code-bar [aria-pressed="true"] { color: var(--accent); }
.code-cap { display: block; width: 100%; border: 0; background: transparent; color: var(--text-2); font: 13.5px var(--font); padding: 2px 2px 6px; outline: none; }

/* Optionen einer Auswahl umsortieren */
#pop .opt { position: relative; }
#pop .opt[draggable="true"] { cursor: grab; }
#pop .opt .opt-grip { display: grid; place-items: center; width: 16px; flex: none; color: var(--text-3); opacity: 0; margin-left: 2px; }
#pop .opt:hover .opt-grip, #pop .opt:focus-within .opt-grip { opacity: 1; }
#pop .opt .opt-grip .ic { width: 13px; height: 13px; }
#pop .opt.drag { opacity: .45; }
#pop .opt.over { box-shadow: inset 0 2px 0 var(--accent); }

/* Zahlenformate in Datenbankzellen */
.num-cell { position: relative; display: block; }
.num-cell .c-in { color: transparent; caret-color: var(--text); }
.num-cell:focus-within .c-in { color: inherit; }
.num-cell .num-f { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 0 8px; pointer-events: none; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.num-cell:focus-within .num-f { display: none; }
.num-bar { flex: 1; min-width: 36px; height: 6px; border-radius: 3px; background: var(--bg-hover); overflow: hidden; } .num-bar b { display: block; height: 100%; border-radius: 3px; background: var(--accent); }

/* Kommentare: Antworten und Reaktionen */
.cm-thread { border-radius: 8px; }
.cm-reply { margin-left: 22px; padding-top: 4px; border-left: 2px solid var(--border); border-radius: 0 8px 8px 0; }
.cm-r { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.cm-rb { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--bg-hover); color: var(--text-2); font-size: 12px; }
.cm-rb .ic { width: 13px; height: 13px; }
.cm-rb.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.cm-rb.add { background: transparent; opacity: 0; padding: 0 5px; }
.cm:hover .cm-rb.add, .cm-rb.add:focus-visible { opacity: 1; }

/* Datum mit Uhrzeit */
.cal-t { font-variant-numeric: tabular-nums; color: var(--text-3); font-size: .88em; margin-right: 6px; }
.td-date .c-in[type="datetime-local"] { min-width: 178px; }

/* Status-Gruppen */
.chip[class*=" st-"] { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding-left: 7px; }
.chip[class*=" st-"] .ic { width: 12px; height: 12px; flex: none; }

/* Mehrstufige Sortierung */
#pop[data-kind="sortp"] { max-width: none; }
.sortp { min-width: 380px; padding: 4px 8px 8px; }
.sortp .frow { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.sortp .frow select { flex: 1; min-width: 0; }
.sortp .sort-n { width: 16px; text-align: center; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.sortp .icon-btn[disabled] { opacity: .25; pointer-events: none; }
.sort-acts { display: flex; gap: 8px; margin-top: 8px; } .sort-acts .primary { display: inline-flex; align-items: center; gap: 5px; } .sort-acts .ic { width: 13px; height: 13px; }

/* Zeitleiste: Balken ziehen */
.tl-bar { cursor: grab; position: relative; touch-action: none; }
.tl-bar::after { content: ''; position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: ew-resize; }
.tl-bar.dragging { cursor: grabbing; opacity: .85; z-index: 2; box-shadow: 0 0 0 2px var(--accent), var(--shadow); }

/* Gruppen in Liste und Galerie */
.grp-h { display: flex; align-items: baseline; gap: 8px; padding: 14px 4px 6px; font-size: 14px; }
.grp-h:first-child { padding-top: 4px; }
.grp-h span { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Suche: Filterzeile */
#search-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
#search-filters select { height: 26px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2); font: 12.5px var(--font); padding: 0 8px; max-width: 170px; }
#search-filters select.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
#search-filters .sf-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); padding: 0 4px; }
#search-filters button { font-size: 12.5px; color: var(--text-3); padding: 0 6px; } #search-filters button:hover { color: var(--text); text-decoration: underline; }
#search-results .item .s-when { margin-left: auto; color: var(--text-3); font-size: 12px; white-space: nowrap; padding-left: 10px; }

/* Tabellenspalten ziehen */
.db-table th[draggable="true"] { cursor: grab; }
.db-table th.col-drag { opacity: .45; }
.db-table th.col-over { box-shadow: inset 2px 0 0 var(--accent); }
.db-table th.col-over-r { box-shadow: inset -2px 0 0 var(--accent); }

/* Kommentar an einer Textstelle */
.content span[data-cm] { background: color-mix(in srgb, #e6d584 45%, transparent); border-bottom: 2px solid #d8bf4a; border-radius: 2px; cursor: pointer; }
.cm-q { margin: 4px 0; padding: 2px 8px; border-left: 3px solid #d8bf4a; color: var(--text-2); font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cm.flash { background: color-mix(in srgb, #e6d584 30%, transparent); }

/* Home: Aufgaben */
.home-s { display: flex; align-items: center; gap: 8px; }
.home-s .home-n { font-size: 12px; color: var(--text-3); background: var(--bg-hover); border-radius: 999px; padding: 0 7px; font-weight: 500; }
.home-s .home-more { font-size: 12.5px; color: var(--text-3); font-weight: 400; } .home-s .home-more:hover { color: var(--text); text-decoration: underline; }
.home-tasks { display: grid; gap: 2px; margin: 4px 0 26px; max-width: 720px; }
.ht { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 8px; border-radius: 6px; }
.ht:hover { background: var(--bg-hover); }
.ht input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.ht .ht-t { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht small { color: var(--text-3); font-size: 12.5px; white-space: nowrap; } .ht.late small { color: #c0392b; }
.ht-add { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; color: var(--text-3); border-radius: 6px; justify-self: start; } .ht-add:hover { background: var(--bg-hover); color: var(--text-2); } .ht-add .ic { width: 15px; height: 15px; }

/* Einfache Tabelle: Kopfspalte */
.stable.headcol td:first-child { background: var(--bg-side); font-weight: 600; }

/* Bild: freie Breite und Ausrichtung */
.t-image figure { position: relative; max-width: 100%; }
.t-image figure[style*="width"] img { width: 100%; }
.t-image figure.al-center { margin-left: auto; margin-right: auto; }
.t-image figure.al-right { margin-left: auto; margin-right: 0; }
.img-rs { position: absolute; top: 50%; right: 4px; width: 6px; height: 48px; max-height: 60%; transform: translateY(-50%); border-radius: 3px; background: rgba(20, 30, 40, .55); box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); cursor: ew-resize; opacity: 0; transition: opacity .12s; touch-action: none; }
.t-image figure:hover .img-rs, figure.resizing .img-rs { opacity: 1; }
.locked .img-rs { display: none; }

/* Tabellenzeilen von Hand ordnen */
.db-table td.td-title { position: relative; }
.row-grip { position: absolute; left: -2px; top: 50%; transform: translateY(-50%); width: 11px; height: 22px; z-index: 1; display: grid; place-items: center; color: var(--text-3); opacity: 0; cursor: grab; }
.row-grip .ic { width: 11px; height: 11px; }
.db-table tbody tr:hover .row-grip { opacity: 1; }
.db-table tr.row-over td { box-shadow: inset 0 2px 0 var(--accent); }
.db-table tr.row-over-b td { box-shadow: inset 0 -2px 0 var(--accent); }
.db-locked .row-grip { display: none; }

/* Tabelle: Namensspalte beim seitlichen Scrollen festhalten */
.db-table.frz th:first-child, .db-table.frz td:first-child { position: sticky; left: 0; z-index: 2; background: var(--bg); box-shadow: 1px 0 0 var(--border); }
.db-table.frz thead th:first-child { z-index: 3; }
.db-table.frz tr.grp td:first-child { position: static; box-shadow: none; }

/* Gruppen ein- und ausklappen */
.grp-tg { display: inline-flex; align-items: baseline; gap: 6px; padding: 2px 6px 2px 2px; border-radius: 5px; font: inherit; color: inherit; }
.grp-tg:hover { background: var(--bg-hover); }
.grp-tg .ic { width: 13px; height: 13px; align-self: center; color: var(--text-3); transition: transform .12s; }
.grp-tg.open .ic { transform: rotate(90deg); }
.grp-tg span { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 400; }

/* Eigenschaften-Fenster einer Ansicht */
#pop[data-kind="pp"] { max-width: none; padding: 6px 0; }
.pp { width: 300px; }
.pp-head { padding: 6px 14px 4px; font-size: 14px; }
.pp .menu-search { margin: 4px 8px 6px; }
.pp-sec { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px 4px; font-size: 12px; color: var(--text-3); }
.pp-sec button { color: var(--accent); font-size: 12px; } .pp-sec button:hover { text-decoration: underline; }
.pp-row { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px 0 4px; margin: 0 4px; border-radius: 6px; }
.pp-row:hover { background: var(--bg-hover); }
.pp-row[draggable="true"] { cursor: grab; }
.pp-grip { width: 16px; display: grid; place-items: center; color: var(--text-3); opacity: 0; flex: none; } .pp-grip .ic { width: 13px; height: 13px; }
.pp-row[draggable="true"]:hover .pp-grip { opacity: 1; }
.pp-ico { width: 20px; display: grid; place-items: center; color: var(--text-2); flex: none; } .pp-ico .ic { width: 15px; height: 15px; }
.pp-name { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; padding: 4px 2px; }
.pp-row.off .pp-name, .pp-row.off .pp-ico { color: var(--text-3); }
.pp-row .icon-btn { width: 24px; height: 24px; flex: none; } .pp-row .icon-btn .ic { width: 15px; height: 15px; }
.pp-lock { width: 52px; display: grid; place-items: center; color: var(--text-3); } .pp-lock .ic { width: 13px; height: 13px; }
.pp-row.drag { opacity: .45; } .pp-row.over { box-shadow: inset 0 2px 0 var(--accent); } .pp-row.over-b { box-shadow: inset 0 -2px 0 var(--accent); }
.pp-foot { border-top: 1px solid var(--border); margin-top: 6px; padding: 4px 4px 0; }
.pp-new { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border-radius: 6px; color: var(--text-2); font-size: 14px; } .pp-new:hover { background: var(--bg-hover); } .pp-new .ic { width: 15px; height: 15px; }

/* Versionsverlauf mit Vorschau */
#hist .hist-box { display: flex; width: min(1100px, calc(100vw - 48px)); height: min(760px, calc(100vh - 64px)); padding: 0; overflow: hidden; }
.hist-main { flex: 1; min-width: 0; overflow: auto; background: var(--bg); padding: 36px 48px; }
.hist-doc { max-width: 720px; margin: 0 auto; pointer-events: none; }
.hist-doc h1 { font-size: 34px; line-height: 1.15; margin: 0 0 16px; }
.hist-doc h2 { font-size: 26px; margin: 22px 0 4px; } .hist-doc h3 { font-size: 21px; margin: 18px 0 4px; } .hist-doc h4, .hist-doc h5, .hist-doc h6 { font-size: 17px; margin: 14px 0 4px; }
.hist-doc p { margin: 3px 0; } .hist-doc ul, .hist-doc ol { margin: 2px 0; padding-left: 24px; } .hist-doc ul.todo { list-style: none; padding-left: 2px; }
.hist-doc blockquote { border-left: 3px solid var(--text); margin: 6px 0; padding: 2px 14px; } .hist-doc aside { background: var(--bg-side); border-radius: 6px; padding: 12px 14px; margin: 6px 0; }
.hist-doc pre { background: var(--code-bg); border-radius: 6px; padding: 14px; overflow: auto; font: 13.5px/1.5 var(--mono); } .hist-doc hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }
.hist-doc table { border-collapse: collapse; margin: 6px 0; } .hist-doc td, .hist-doc th { border: 1px solid var(--border); padding: 5px 9px; text-align: left; } .hist-doc img { max-width: 100%; }
.hist-side { width: 290px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--bg-side); }
.hist-side header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 8px 16px; }
.hist-list { flex: 1; overflow: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 2px; }
.hist-it { display: grid; gap: 1px; text-align: left; padding: 7px 10px; border-radius: 6px; } .hist-it:hover { background: var(--bg-hover); }
.hist-it.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.hist-it b { font-weight: 500; font-size: 14px; } .hist-it small { color: var(--text-3); font-size: 12px; }
.hist-side footer { display: grid; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--border); }
@media (max-width: 760px) { #hist .hist-box { flex-direction: column; } .hist-side { width: auto; max-height: 45%; border-left: 0; border-top: 1px solid var(--border); } .hist-main { padding: 20px; } }

/* Bild in voller Größe */
#lightbox { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(15, 15, 15, .86); cursor: zoom-out; outline: 0; }
#lightbox img { max-width: 94vw; max-height: 94vh; object-fit: contain; border-radius: 4px; }
#blocks figure > img { cursor: zoom-in; }

/* Zeitleiste: Woche, Monat, Quartal */
.tl-zoom { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-right: 6px; }
.tl-zoom button { border-radius: 0 !important; padding: 3px 9px; font-size: 12px; color: var(--text-2); }
.tl-zoom button.on { background: var(--bg-hover); color: var(--text); font-weight: 500; }
.tl-quarter .tl-head .tl-track span { font-size: 10px; overflow: visible; white-space: nowrap; }
.tl-quarter .tl-head .tl-track .tl-m { color: var(--text); font-weight: 600; text-align: left; }
.tl-quarter .tl-bar { padding: 0 4px; }
.tl-quarter .tl-head .tl-track .today:empty { height: 12px; align-self: center; border-radius: 3px; }

/* Gestapelte Balken */
.ch-bar.ch-stack { display: flex; gap: 1px; }
.ch-bar.ch-stack i { border-radius: 0; min-width: 0; flex: none; }
.ch-bar.ch-stack i:first-child { border-radius: 4px 0 0 4px; } .ch-bar.ch-stack i:last-child { border-radius: 0 4px 4px 0; } .ch-bar.ch-stack i:only-child { border-radius: 4px; }
.ch-keys { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.ch-keys li { display: inline-flex; align-items: center; gap: 6px; } .ch-keys i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* Erwähnungen im Kommentar */
.cm-at { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 3px; padding: 0 2px; }
.cm-ment { display: grid; gap: 1px; padding: 4px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--pop); box-shadow: var(--shadow); }
.cm-ment button { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 5px; text-align: left; font-size: 13.5px; }
.cm-ment button.on, .cm-ment button:hover { background: var(--bg-hover); }
.cm-ment .av { width: 20px; height: 20px; font-size: 11px; }

/* Vorschau der eingeklappten Seitenleiste beim Überfahren */
.collapsed.side-peek #sidebar { display: flex; position: absolute; left: 8px; top: 52px; bottom: 38px; z-index: 35; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 32px rgba(15, 15, 15, .16); overflow: hidden; animation: side-peek-in .14s ease-out; }
@keyframes side-peek-in { from { transform: translateX(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .collapsed.side-peek #sidebar { animation: none; } }

/* Druckbild und PDF: nur der Seiteninhalt */
@media print {
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  #sidebar, #side-rs, #tabbar, #topbar, #idbar, #aifab, #comments, #aichat, #slash, #pop, #pop2, #fmt, #search, #toast, #toc, #peek, #lightbox, #hist, #settings, .gutter, .img-rs, .db-tools, .db-foot button, .row-grip, .cover-tools, .title-tools { display: none !important; }
  #app, #frame, #main { display: block !important; height: auto !important; overflow: visible !important; position: static !important; width: auto !important; max-width: none !important; }
  #main * { animation: none !important; }
  .block, .db-table tr, .card, figure, pre { break-inside: avoid; }
  h1, h2, h3, h4, h5 { break-after: avoid; }
  a { text-decoration: underline; }
  @page { margin: 16mm 14mm; }
}

/* Einfache Tabelle: an Seitenbreite anpassen */
.stable.fit table { width: 100%; }
.stable.fit td { min-width: 60px; }

/* Filtergruppe */
.fgroup { margin: 4px 6px; padding: 4px 2px 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-side); }
.fgroup .frow { padding-left: 6px; padding-right: 6px; }

/* Zahl als Ring */
.num-ring { width: 18px; height: 18px; flex: none; margin-right: 6px; }
.num-ring circle { fill: none; stroke-width: 3; }
.num-ring-bg { stroke: var(--bg-hover); } .num-ring-v { stroke: var(--accent); stroke-linecap: round; }

/* Zeitleiste: Gruppenkopf */
.tl-row.tl-grp { min-height: 30px; background: var(--bg-side); padding: 0 4px; position: sticky; left: 0; }

/* Posteingang */
#pop[data-kind="ib"] { max-width: none; padding: 0; }
.ib { width: 400px; max-height: min(70vh, 620px); overflow: auto; }
.ib-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 8px; padding: 12px 14px 8px; background: var(--pop); border-bottom: 1px solid var(--border); font-size: 14px; }
.ib-row { display: flex; gap: 10px; width: 100%; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); border-radius: 0 !important; position: relative; }
.ib-row:last-child { border-bottom: 0; } .ib-row:hover { background: var(--bg-hover); }
.ib-row.new::before { content: ''; position: absolute; left: 4px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ib-ic { width: 24px; flex: none; display: grid; place-items: start center; color: var(--text-2); } .ib-ic .av { width: 22px; height: 22px; font-size: 12px; } .ib-ic .ic { width: 18px; height: 18px; }
.ib-b { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ib-h { display: flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--text-2); } .ib-h b { color: var(--text); font-weight: 600; }
.ib-k { margin-left: auto; color: var(--text-3); display: grid; } .ib-k .ic { width: 14px; height: 14px; }
.ib-t { font-size: 14px; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ib-m { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-3); min-width: 0; } .ib-m .ic { width: 13px; height: 13px; flex: none; }
.ib-p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ib-m time { margin-left: auto; flex: none; }
.ib-empty { display: grid; justify-items: center; gap: 6px; padding: 36px 28px 40px; text-align: center; color: var(--text-3); font-size: 13.5px; } .ib-empty .ic { width: 28px; height: 28px; } .ib-empty b { color: var(--text-2); font-size: 14px; }

/* Versionsverlauf: Unterschiede zum aktuellen Stand */
.hist-doc .hd { border-left: 3px solid transparent; padding-left: 8px; margin-left: -11px; }
.hist-doc .hd-chg { border-left-color: #d9a400; background: rgba(217, 164, 0, .09); }
.hist-doc .hd-gone { border-left-color: #e0564e; background: rgba(224, 86, 78, .09); }
.hist-doc h1.hd-chg { border-left: 3px solid #d9a400; padding-left: 8px; margin-left: -11px; }
.hist-doc .hd > ul, .hist-doc .hd > ol { margin: 0; }
.hist-diff { padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.hist-diff label { display: flex; align-items: center; gap: 6px; } .hist-diff ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.hist-diff li { display: flex; align-items: center; gap: 7px; } .hd-k { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.hd-k.chg { background: #d9a400; } .hd-k.gone { background: #e0564e; } .hd-k.add { background: var(--accent); }

/* Seitenbreite nahe 100 %: schmalerer Rand, damit der Inhalt die Breite auch nutzt */
@media (min-width: 761px) { html.haspw:not(.peek) .page { padding-left: var(--page-pad, 96px); padding-right: var(--page-pad, 96px); } }
