/* FABULOUS NOTES – Design im Stil von FABULOUS TOOLS: klares Schwarz-Weiß, Geist, Pillen-Buttons */
@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
    --bg: #ffffff;
    --bg-side: #fafafa;
    --bg-elev: #ffffff;
    --bg-soft: #f5f5f5;
    --text: #171717;
    --text-2: #6b6b6b;
    --text-3: #a3a3a3;
    --line: #ececec;
    --line-2: #d4d4d4;
    --hover: rgba(10, 10, 10, .045);
    --hover-2: rgba(10, 10, 10, .08);
    --accent: #0a0a0a;
    --accent-ink: #ffffff;
    --accent-soft: rgba(10, 10, 10, .1);
    --accent-hover: #2a2a2a;
    --link: #0a0a0a;
    --danger: #dc2626;
    --ok: #15803d;
    --shadow: 0 0 0 1px rgba(10, 10, 10, .06), 0 4px 10px rgba(10, 10, 10, .06), 0 16px 36px -8px rgba(10, 10, 10, .18);
    --shadow-sm: 0 0 0 1px rgba(10, 10, 10, .07), 0 1px 2px rgba(10, 10, 10, .04);
    --code-bg: #f5f5f5;
    --inline-code: #c2410c;
    --side-w: 260px;
    --radius: 14px;
    --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --logo-ink: #ffffff;

    --c-gray: #737373;    --c-gray-bg: #f1f1f1;
    --c-brown: #9a6b4f;   --c-brown-bg: #f5eee9;
    --c-orange: #c2410c;  --c-orange-bg: #fff1e6;
    --c-yellow: #a16207;  --c-yellow-bg: #fef6db;
    --c-green: #15803d;   --c-green-bg: #ecf8ef;
    --c-blue: #1d4ed8;    --c-blue-bg: #ecf2fe;
    --c-purple: #7e22ce;  --c-purple-bg: #f5effd;
    --c-pink: #be185d;    --c-pink-bg: #fdeff6;
    --c-red: #b91c1c;     --c-red-bg: #fdeeee;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0a0a0a; --bg-side: #111111; --bg-elev: #171717; --bg-soft: #161616;
        --text: #ededed; --text-2: #a3a3a3; --text-3: #6b6b6b;
        --line: #232323; --line-2: #333333;
        --hover: rgba(255, 255, 255, .055); --hover-2: rgba(255, 255, 255, .09);
        --accent: #fafafa; --accent-ink: #0a0a0a; --accent-soft: rgba(255, 255, 255, .14); --accent-hover: #d4d4d4;
        --link: #fafafa;
        --shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 10px rgba(0, 0, 0, .4), 0 16px 36px -8px rgba(0, 0, 0, .7);
        --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .08);
        --code-bg: #161616; --inline-code: #fb923c; --logo-ink: #0a0a0a;
        --c-gray: #a3a3a3;   --c-gray-bg: #262626;
        --c-brown: #c4a08a;  --c-brown-bg: #33261f;
        --c-orange: #fb923c; --c-orange-bg: #3a2312;
        --c-yellow: #facc15; --c-yellow-bg: #362d0e;
        --c-green: #4ade80;  --c-green-bg: #13301e;
        --c-blue: #60a5fa;   --c-blue-bg: #13243f;
        --c-purple: #c084fc; --c-purple-bg: #2b1a3d;
        --c-pink: #f472b6;   --c-pink-bg: #3a1528;
        --c-red: #f87171;    --c-red-bg: #3b1515;
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0a0a0a; --bg-side: #111111; --bg-elev: #171717; --bg-soft: #161616;
    --text: #ededed; --text-2: #a3a3a3; --text-3: #6b6b6b;
    --line: #232323; --line-2: #333333;
    --hover: rgba(255, 255, 255, .055); --hover-2: rgba(255, 255, 255, .09);
    --accent: #fafafa; --accent-ink: #0a0a0a; --accent-soft: rgba(255, 255, 255, .14); --accent-hover: #d4d4d4;
    --link: #fafafa;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 4px 10px rgba(0, 0, 0, .4), 0 16px 36px -8px rgba(0, 0, 0, .7);
    --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .08);
    --code-bg: #161616; --inline-code: #fb923c; --logo-ink: #0a0a0a;
    --c-gray: #a3a3a3;   --c-gray-bg: #262626;
    --c-brown: #c4a08a;  --c-brown-bg: #33261f;
    --c-orange: #fb923c; --c-orange-bg: #3a2312;
    --c-yellow: #facc15; --c-yellow-bg: #362d0e;
    --c-green: #4ade80;  --c-green-bg: #13301e;
    --c-blue: #60a5fa;   --c-blue-bg: #13243f;
    --c-purple: #c084fc; --c-purple-bg: #2b1a3d;
    --c-pink: #f472b6;   --c-pink-bg: #3a1528;
    --c-red: #f87171;    --c-red-bg: #3b1515;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
kbd { font: 500 11px var(--font); color: var(--text-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; background: var(--bg); }
.i { flex: none; }
.muted { color: var(--text-2); }
.link { color: var(--accent); }
.link:hover { text-decoration: underline; }
.link-btn { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.logo-mark { flex: none; }
.logo-mark .lm-bg { fill: var(--text); }
.logo-mark .lm-l { fill: var(--bg); }
.logo-mark .lm-fold { fill: var(--text-2); }
.wordmark { font-weight: 500; font-size: 13px; letter-spacing: .14em; white-space: nowrap; }
.wordmark b { font-weight: 800; margin-left: .35em; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 7px; font-weight: 500; font-size: 14px; white-space: nowrap; transition: background .12s, box-shadow .12s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #1a73cc; }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { opacity: .88; }
.btn-ghost { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: var(--hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c93434; }
.btn-danger-ghost { color: var(--danger); box-shadow: inset 0 0 0 1px rgba(224, 62, 62, .35); }
.btn-danger-ghost:hover { background: rgba(224, 62, 62, .08); }
.btn-glass { background: rgba(255, 255, 255, .85); color: #37352f; backdrop-filter: blur(6px); }
.btn-glass:hover { background: #fff; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--text-2); transition: background .1s; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.sm { width: 22px; height: 22px; border-radius: 5px; }
.icon-btn.is-fav { color: #e8a317; }
.icon-btn.is-fav svg { fill: currentColor; }

/* ---------- Formulare ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.form input[type=text], .form input[type=email], .form input[type=password] {
    height: 38px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font-size: 15px; outline: none; transition: border-color .12s, box-shadow .12s;
}
.form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form input:disabled { background: var(--bg-soft); color: var(--text-2); }
.form .check { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; line-height: 1.45; }
.form .check input { margin-top: 3px; accent-color: var(--accent); }
.form-row { display: flex; justify-content: flex-end; margin-top: -4px; font-size: 13px; }
.field-err { color: var(--danger); font-weight: 400; font-size: 12.5px; }
.hint { font-weight: 400; font-size: 12px; color: var(--text-3); }
.form-inline { max-width: 420px; }
.form-inline .btn { justify-self: start; }
.alert { padding: 10px 12px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; line-height: 1.45; }
.alert-ok { background: var(--c-green-bg); color: var(--c-green); }
.alert-err { background: var(--c-red-bg); color: var(--c-red); }

/* ---------- Auth ---------- */
.auth { background: var(--bg-side); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .04em; font-size: 15px; margin-bottom: 28px; }
.auth-card { width: 100%; max-width: 400px; background: var(--bg); border-radius: 14px; padding: 32px; box-shadow: var(--shadow-sm), 0 12px 40px rgba(15, 15, 15, .06); }
.auth-card h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; }
.auth-card > .muted { margin: 0 0 22px; font-size: 14.5px; }
.auth-card.center { text-align: center; }
.auth-card.center .btn { margin-top: 10px; }
.auth-foot { text-align: center; margin: 22px 0 0; font-size: 14px; color: var(--text-2); }
.big-emoji { font-size: 44px; line-height: 1; margin-bottom: 12px; }

/* ---------- Landing ---------- */
.landing { background: var(--bg); }
.lp-nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); }
.lp-nav nav { display: flex; gap: 8px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .04em; font-size: 14px; }
.lp-hero { max-width: 860px; margin: 0 auto; padding: clamp(48px, 9vw, 110px) 16px 40px; text-align: center; }
.lp-eyebrow { display: inline-block; margin: 0 0 18px; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 5px 12px; border-radius: 99px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
.lp-hero h1 { margin: 0; font-size: clamp(36px, 6.4vw, 66px); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; }
.lp-hero h1 span { color: var(--text-3); }
.lp-sub { margin: 22px auto 0; max-width: 620px; font-size: clamp(16px, 2vw, 19px); line-height: 1.55; color: var(--text-2); }
.lp-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 32px; }
.lp-shot { padding: 20px 16px 60px; }
.shot { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 220px 1fr; height: 460px; border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-sm), 0 30px 80px rgba(15, 15, 15, .14); }
.shot-side { background: var(--bg-side); padding: 12px 8px; font-size: 13.5px; color: var(--text-2); border-right: 1px solid var(--line); }
.shot-ws { display: flex; align-items: center; gap: 8px; padding: 4px 8px 12px; font-weight: 600; color: var(--text); }
.shot-av { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--text); color: var(--bg); font-size: 11px; }
.shot-label { padding: 14px 8px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.shot-item { padding: 4px 8px; border-radius: 6px; }
.shot-item.sub { padding-left: 26px; }
.shot-item.is-active { background: var(--hover-2); color: var(--text); font-weight: 500; }
.shot-main { overflow: hidden; }
.shot-cover { height: 120px; background: linear-gradient(120deg, #fcb69f 0%, #ffecd2 40%, #a1c4fd 100%); }
.shot-doc { max-width: 520px; margin: 0 auto; padding: 0 30px; text-align: left; }
.shot-emoji { font-size: 52px; line-height: 1; margin-top: -30px; }
.shot-h1 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 12px 0 6px; }
.shot-doc p { margin: 0 0 12px; color: var(--text-2); font-size: 14.5px; }
.shot-h2 { font-weight: 600; font-size: 18px; margin: 14px 0 6px; }
.shot-todo { display: flex; align-items: center; gap: 8px; font-size: 14.5px; padding: 2px 0; }
.shot-todo i { width: 15px; height: 15px; border: 1.5px solid var(--text-2); border-radius: 3px; }
.shot-todo.done { color: var(--text-3); text-decoration: line-through; }
.shot-todo.done i { background: var(--accent); border-color: var(--accent); }
.shot-callout { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: var(--bg-soft); font-size: 14px; }
.shot-callout code { font-family: var(--mono); color: var(--inline-code); font-size: 13px; }
.lp-features { max-width: 1040px; margin: 0 auto; padding: 30px 16px 70px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.feat { padding: 22px; border-radius: 12px; background: var(--bg-soft); box-shadow: inset 0 0 0 1px var(--line); }
.feat-ic { font-size: 26px; }
.feat h3 { margin: 10px 0 6px; font-size: 16.5px; letter-spacing: -.01em; }
.feat p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.feat code { font-family: var(--mono); font-size: 12.5px; color: var(--inline-code); }
.lp-final { text-align: center; padding: 50px 16px 90px; }
.lp-final h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.03em; margin: 0 0 22px; }
.lp-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding: 22px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }
.lp-foot a:hover { color: var(--text); }

/* ---------- App-Gerüst ---------- */
.app-body { overflow: hidden; height: 100%; }
html:has(> .app-body:not(.share-body)) { overflow: hidden; height: 100%; }
.app { display: flex; height: 100vh; height: 100dvh; }
.side { position: relative; flex: none; width: var(--side-w); background: var(--bg-side); display: flex; flex-direction: column; border-right: 1px solid var(--line); transition: margin-left .2s ease, transform .2s ease; user-select: none; }
.app.side-hidden .side { margin-left: calc(-1 * var(--side-w)); }
.side-top { display: flex; align-items: center; gap: 4px; padding: 8px 8px 4px; }
.ws { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.ws:hover { background: var(--hover); }
.ws .i { transform: rotate(90deg); color: var(--text-3); }
.ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; background: hsl(var(--h) 55% 52%); color: #fff; font-size: 10.5px; font-weight: 700; }
.side-close { opacity: 0; transition: opacity .15s; }
.side:hover .side-close { opacity: 1; }
.side-nav, .side-bottom { padding: 2px 8px; display: grid; gap: 1px; }
.side-bottom { padding: 8px; border-top: 1px solid var(--line); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--text-2); font-size: 14px; font-weight: 500; text-align: left; width: 100%; }
.nav-item:hover { background: var(--hover); }
.nav-item.is-active { background: var(--hover-2); color: var(--text); }
.nav-item span { flex: 1; }
.nav-item kbd { opacity: .8; }
.side-scroll { flex: 1; overflow-y: auto; padding: 6px 8px 16px; }
.side-sec + .side-sec { margin-top: 14px; }
.side-label { display: flex; align-items: center; justify-content: space-between; height: 26px; padding: 0 4px 0 8px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.side-label .icon-btn { opacity: 0; }
.side-sec:hover .side-label .icon-btn { opacity: 1; }
.side-resize { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; z-index: 5; }
.side-resize:hover, .side-resize.is-drag { background: linear-gradient(90deg, transparent 2px, var(--accent) 2px, var(--accent) 4px, transparent 4px); opacity: .5; }
.side-scrim { display: none; }

/* Seitenbaum */
.row { position: relative; display: flex; align-items: center; height: 30px; padding-left: calc(6px + var(--d, 0) * 18px); padding-right: 4px; border-radius: 6px; color: var(--text-2); font-size: 14px; font-weight: 500; }
.row:hover { background: var(--hover); }
.row.is-active { background: var(--hover-2); color: var(--text); }
.row a, a.row { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; height: 100%; }
.row .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Favoriten sind selbst der Link – gleiche Höhe wie Zeilen im Seitenbaum */
a.row { height: 30px; flex: none; }
.row .emoji, .list-row .emoji { display: grid; place-items: center; width: 20px; height: 20px; flex: none; font-size: 15px; line-height: 1; color: var(--text-3); }
/* Pfeil liegt auf dem Emoji: beim Hovern wird aus dem Emoji der Pfeil (nur bei Seiten mit Unterseiten) */
.caret { position: absolute; z-index: 1; left: calc(6px + var(--d, 0) * 18px); top: 5px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; color: var(--text-2); opacity: 0; transition: opacity .1s, transform .12s; }
.row:hover > .caret:not(.is-empty), .row.is-ctx > .caret:not(.is-empty) { opacity: 1; }
.row:hover:has(> .caret:not(.is-empty)) .emoji, .row.is-ctx:has(> .caret:not(.is-empty)) .emoji { opacity: 0; }
.row .emoji { transition: opacity .1s; }
.caret:hover { background: var(--hover-2); color: var(--text); }
.caret.is-empty { display: none; }
@media (hover: none) {
    .row > .caret:not(.is-empty) { opacity: 1; }
    .row:has(> .caret:not(.is-empty)) .emoji { opacity: 0; }
}
.node.is-open > .row .caret { transform: rotate(90deg); }
.kids { display: none; }
.node.is-open > .kids { display: block; }
.kids-empty { padding: 4px 0 4px calc(10px + var(--d, 0) * 18px); font-size: 13px; color: var(--text-3); }
.row-acts { display: none; gap: 1px; }
.row:hover .row-acts, .row.is-ctx .row-acts { display: flex; }
.row-acts button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; color: var(--text-3); }
.row-acts button:hover { background: var(--hover-2); color: var(--text); }
.row.drop-before { box-shadow: inset 0 2px 0 var(--accent); border-radius: 0; }
.row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.row.drop-inside { background: var(--accent-soft); }
.node.is-dragging { opacity: .4; }
.row.is-ctx { background: var(--hover); }
.rename-in { flex: 1; min-width: 0; height: 24px; border: 1px solid var(--accent); border-radius: 4px; padding: 0 6px; background: var(--bg); outline: none; font-size: 14px; }

/* Inhalt */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 8px; height: 45px; padding: 0 12px; flex: none; }
.side-open { display: none; }
.app.side-hidden .side-open { display: inline-grid; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; overflow: hidden; font-size: 14px; }
.crumb { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 5px; white-space: nowrap; min-width: 0; color: var(--text); }
a.crumb:hover { background: var(--hover); }
.crumb-t { overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.crumb-sep { color: var(--text-3); }
.top-acts { display: flex; align-items: center; gap: 4px; }
.save-status { font-size: 13px; color: var(--text-3); margin-right: 6px; white-space: nowrap; }
.banner { margin: 0 12px 8px; padding: 9px 14px; border-radius: 8px; font-size: 14px; }
.banner-ok { background: var(--c-green-bg); color: var(--c-green); }
.banner-err { background: var(--c-red-bg); color: var(--c-red); }
.banner-info { background: var(--c-yellow-bg); color: var(--text); }
.scroller { flex: 1; overflow-y: auto; overflow-x: hidden; }

/* Cover + Kopf */
.cover { position: relative; height: 30vh; max-height: 280px; min-height: 160px; }
.cover.is-none { height: 64px; min-height: 0; }
.cover-acts { position: absolute; z-index: 5; right: 16px; top: 12px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s .35s; }
.cover:hover .cover-acts, .cover-acts:focus-within { opacity: 1; transition-delay: 0s; }
.cover-sunset { background: linear-gradient(120deg, #fcb69f 0%, #ffecd2 45%, #a1c4fd 100%); }
.cover-ocean { background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%); }
.cover-forest { background: linear-gradient(135deg, #134e5e 0%, #71b280 100%); }
.cover-grape { background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%); }
.cover-peach { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.cover-slate { background: linear-gradient(135deg, #485563 0%, #29323c 100%); }
.cover-mint { background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%); }
.cover-rose { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.doc { position: relative; max-width: 760px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px) 30vh; }
.app.is-full .doc, .doc.is-full { max-width: none; padding-left: clamp(16px, 8vw, 96px); padding-right: clamp(16px, 8vw, 96px); }
.doc-board { max-width: none; padding-left: clamp(16px, 5vw, 96px); padding-right: 0; }
.doc-board .doc-head { padding-right: clamp(16px, 5vw, 96px); }
.doc-head { position: relative; }
.doc-icon { font-size: 72px; line-height: 1; width: max-content; margin-top: -40px; margin-bottom: 4px; cursor: pointer; border-radius: 8px; padding: 4px; position: relative; z-index: 1; }
.doc-icon:hover { background: var(--hover); }
.doc-icon.is-empty { display: none; }
.cover.is-none + .doc .doc-icon { margin-top: 0; }
.doc-tools { display: flex; gap: 4px; height: 30px; margin-bottom: 2px; opacity: 0; transition: opacity .15s; }
.doc-head:hover .doc-tools, .doc-tools:focus-within { opacity: 1; }
.tool { padding: 4px 8px; border-radius: 6px; font-size: 13.5px; color: var(--text-3); }
.tool:hover { background: var(--hover); color: var(--text-2); }
.doc-title { margin: 0 0 4px; font-size: 40px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; outline: none; word-break: break-word; }
.doc-title:empty::before { content: attr(data-placeholder); color: var(--text-3); opacity: .6; }
.props { display: grid; gap: 2px; margin: 10px 0 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.prop { display: flex; align-items: center; min-height: 32px; font-size: 14px; }
.prop-k { width: 140px; color: var(--text-2); }
.prop-v { padding: 3px 6px; border-radius: 5px; }
.prop-select { border: 0; background: var(--hover); border-radius: 5px; padding: 4px 8px; font-size: 14px; cursor: pointer; }

/* ---------- Editor ---------- */
.editor { outline: none; padding: 8px 0 40px; font-size: 16px; line-height: 1.62; word-break: break-word; caret-color: var(--text); }
.editor > * { margin: 2px 0; padding: 3px 2px; position: relative; }
.editor p { min-height: 1.6em; }
.editor:empty::before, .editor > p.is-empty:only-child::before { content: attr(data-placeholder); color: var(--text-3); pointer-events: none; }
.editor > p.is-ph::after { content: "Tippe „/“ für Befehle …"; position: absolute; left: 2px; top: 3px; color: var(--text-3); pointer-events: none; }
.editor h1 { font-size: 30px; font-weight: 700; line-height: 1.3; margin-top: 30px; letter-spacing: -.02em; }
.editor h2 { font-size: 23px; font-weight: 650; line-height: 1.3; margin-top: 22px; letter-spacing: -.015em; }
.editor h3 { font-size: 19px; font-weight: 600; line-height: 1.3; margin-top: 16px; }
.editor ul, .editor ol { padding-left: 26px; }
.editor li { padding: 2px 0; }
.editor li::marker { color: var(--text-2); }
.editor ul[data-type="todo"] { list-style: none; padding-left: 2px; }
.editor ul[data-type="todo"] > li { position: relative; padding-left: 28px; }
.editor ul[data-type="todo"] > li::before { content: ""; position: absolute; left: 2px; top: .38em; width: 16px; height: 16px; border: 1.5px solid var(--text-2); border-radius: 3px; cursor: pointer; background: var(--bg); transition: background .1s; }
.editor ul[data-type="todo"] > li[data-checked="1"] { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-3); }
.editor ul[data-type="todo"] > li[data-checked="1"]::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; border-color: var(--accent); }
.editor blockquote { border-left: 3px solid var(--text); padding-left: 16px; font-size: 1.05em; }
.editor blockquote p { margin: 0; }
.editor pre { font-family: var(--mono); font-size: 13.5px; line-height: 1.6; background: var(--code-bg); border-radius: 6px; padding: 18px 20px; overflow-x: auto; white-space: pre; tab-size: 4; margin: 6px 0; }
.editor code { font-family: var(--mono); font-size: .86em; color: var(--inline-code); background: var(--hover); border-radius: 4px; padding: .15em .35em; }
.editor pre code { color: inherit; background: none; padding: 0; font-size: inherit; }
.editor hr { border: 0; height: 1px; background: var(--line-2); margin: 14px 0; padding: 0; }
.editor a { color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; border-radius: 3px; transition: text-decoration-color .12s, background .12s; }
.editor a:hover { text-decoration-color: var(--link); background: color-mix(in srgb, var(--link) 9%, transparent); }
.editor a.page-link, .editor .file a { color: var(--text); background: none; }
/* Link-Karte beim Hovern */
.link-card { position: fixed; z-index: 240; display: flex; align-items: center; gap: 4px; max-width: min(460px, calc(100vw - 16px)); padding: 6px 6px 6px 10px; border-radius: 10px; background: var(--bg-elev); box-shadow: var(--shadow); font-size: 13px; animation: toast-in .14s ease; }
.lc-ic { flex: none; font-size: 16px; margin-right: 4px; }
.lc-t { flex: 1; min-width: 0; display: grid; margin-right: 6px; }
.lc-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-t small { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-card button { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 6px; color: var(--text-2); }
.link-card button:hover { background: var(--hover); color: var(--text); }
.editor a:hover { text-decoration-color: var(--text); }
.editor img { max-width: 100%; border-radius: 6px; display: block; }
.editor figure { margin: 8px 0; text-align: center; }
.editor figure img { margin: 0 auto; }
.editor figure img.is-sel { outline: 2px solid var(--accent); outline-offset: 2px; }
.editor .callout { display: flex; gap: 12px; background: var(--bg-soft); border-radius: 8px; padding: 14px 16px 14px 14px; margin: 6px 0; }
.editor .callout::before { content: attr(data-emoji); font-size: 20px; line-height: 1.4; flex: none; cursor: pointer; }
.editor .callout > * { margin: 0; flex: 1; min-width: 0; }
.editor mark { background: var(--c-yellow-bg); color: inherit; border-radius: 3px; padding: 0 2px; }
.editor mark[data-color="red"] { background: var(--c-red-bg); }
.editor mark[data-color="green"] { background: var(--c-green-bg); }
.editor mark[data-color="blue"] { background: var(--c-blue-bg); }
.editor mark[data-color="purple"] { background: var(--c-purple-bg); }
.editor mark[data-color="pink"] { background: var(--c-pink-bg); }
.editor mark[data-color="orange"] { background: var(--c-orange-bg); }
.editor mark[data-color="gray"] { background: var(--c-gray-bg); }
/* Datei-Karte */
.editor .file { display: flex; align-items: center; gap: 12px; margin: 6px 0; padding: 10px 14px 10px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--bg); cursor: pointer; user-select: none; max-width: 520px; transition: background .12s, box-shadow .12s; }
.editor .file:hover { background: var(--hover); }
.editor .file.is-ctx { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.editor .file::before { content: ""; flex: none; width: 34px; height: 40px; border-radius: 6px; background: var(--bg-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9a97' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E") center/20px no-repeat; box-shadow: inset 0 0 0 1px var(--line); }
.editor .file a { flex: 1; min-width: 0; display: grid; text-decoration: none; color: var(--text); font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.editor .file a::after { content: attr(data-size); font-size: 12px; font-weight: 400; color: var(--text-3); }
.editor .file .file-rename { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--accent); border-radius: 6px; padding: 0 8px; font: inherit; font-size: 14.5px; background: var(--bg); color: var(--text); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.editor.is-readonly .file a { pointer-events: auto; }

.page-link { display: flex; align-items: center; gap: 8px; padding: 4px 6px; margin: 1px -6px; border-radius: 6px; text-decoration: none !important; font-weight: 500; cursor: pointer; width: fit-content; max-width: 100%; }
.page-link:hover { background: var(--hover); }
.page-link .pl-ic { font-size: 18px; line-height: 1; }
.page-link .pl-t { border-bottom: 1px solid var(--line-2); line-height: 1.3; }
.page-link.is-gone { color: var(--text-3); text-decoration: line-through !important; }
.editor.is-readonly ul[data-type="todo"] > li::before { cursor: default; }
.subpages { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.subpages-label { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 4px; }

/* Block-Griff */
.handle { position: absolute; z-index: 4; display: flex; gap: 1px; opacity: 0; transition: opacity .12s; pointer-events: none; }
.handle.is-on { opacity: 1; pointer-events: auto; }
.handle button { display: grid; place-items: center; width: 22px; height: 24px; border-radius: 4px; color: var(--text-3); }
.handle button:hover { background: var(--hover-2); color: var(--text-2); }
.handle .grip { cursor: grab; }
.drop-line { position: absolute; height: 3px; background: var(--accent); opacity: .6; border-radius: 2px; pointer-events: none; z-index: 4; }
.editor > .is-moving { opacity: .35; }

/* ---------- Popups / Menüs ---------- */
.pop { position: fixed; z-index: 250; min-width: 220px; max-width: 320px; max-height: min(420px, 70vh); overflow-y: auto; background: var(--bg-elev); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; font-size: 14px; }
.pop-label { padding: 6px 8px 4px; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 6px; text-align: left; color: var(--text); }
.pop-item:hover, .pop-item.is-sel { background: var(--hover); }
.pop-item .pi-ic { display: grid; place-items: center; width: 22px; height: 22px; flex: none; color: var(--text-2); font-size: 15px; }
.pop-item.big .pi-ic { width: 40px; height: 40px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--bg); font-size: 18px; font-weight: 600; color: var(--text); }
.pop-item .pi-t { flex: 1; min-width: 0; }
.pop-item .pi-t small { display: block; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-item .pi-k { color: var(--text-3); font-size: 12px; }
.pop-item.is-danger { color: var(--danger); }
.pop-item.is-danger .pi-ic { color: var(--danger); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.pop-empty { padding: 8px; color: var(--text-3); }
.pop input.pop-in { width: 100%; height: 32px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 9px; background: var(--bg); outline: none; margin-bottom: 6px; }
.pop input.pop-in:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.emoji-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; width: 318px; max-width: 100%; }
.pop:has(.emoji-grid) { max-width: min(340px, calc(100vw - 16px)); overflow-x: hidden; }
.emoji-grid button { font-size: 21px; height: 34px; border-radius: 6px; }
.emoji-grid button:hover { background: var(--hover); }
.cover-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 300px; }
.cover-grid button { height: 44px; border-radius: 6px; }
.color-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 8px 6px; }
.color-row button { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.color-row button.is-on { box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--accent); }
.share-pop { width: 340px; padding: 14px; }
.share-pop h4 { margin: 0 0 4px; font-size: 14.5px; }
.share-pop p { margin: 0 0 12px; color: var(--text-2); font-size: 13px; }
.share-row { display: flex; gap: 6px; }
.share-row input { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 8px; font-size: 12.5px; background: var(--bg-soft); color: var(--text-2); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-weight: 500; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(14px); }

/* Format-Leiste */
.fmt { position: fixed; z-index: 90; display: flex; align-items: center; gap: 1px; padding: 3px; background: var(--bg-elev); border-radius: 8px; box-shadow: var(--shadow); }
.fmt button { display: grid; place-items: center; min-width: 30px; height: 28px; padding: 0 6px; border-radius: 5px; font-size: 14px; color: var(--text); }
.fmt button:hover, .fmt button.is-on { background: var(--hover-2); }
.fmt .sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 3px; }
.fmt .fb { font-weight: 700; } .fmt .fi { font-style: italic; font-family: Georgia, serif; } .fmt .fu { text-decoration: underline; } .fmt .fs { text-decoration: line-through; }

/* Modal / Suche */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(15, 15, 15, .4); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .12s; }
.modal-box { width: 100%; max-width: 620px; background: var(--bg-elev); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.search-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 52px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.search-in input { flex: 1; border: 0; outline: none; background: none; font-size: 17px; color: var(--text); }
.search-res { max-height: 55vh; overflow-y: auto; padding: 6px; }
.search-res .pop-item { padding: 8px 10px; }
.search-res mark { background: var(--c-yellow-bg); color: inherit; border-radius: 2px; }
.confirm-box { max-width: 400px; padding: 22px; }
.confirm-box h3 { margin: 0 0 6px; font-size: 17px; }
.confirm-box p { margin: 0 0 18px; color: var(--text-2); font-size: 14.5px; }
.confirm-acts { display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }

.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
    pointer-events: auto; cursor: default; display: flex; align-items: center; gap: 10px;
    padding: 8px 16px 8px 8px; border-radius: 999px; font-size: 14px; font-weight: 500; line-height: 1.35;
    color: #f5f5f4; background: rgba(28, 28, 28, .88); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 30px rgba(0, 0, 0, .28);
    animation: toast-in .32s cubic-bezier(.2, .9, .3, 1.25);
}
.toast-ic { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; background: #2fb37b; color: #fff; }
.toast.is-err .toast-ic { background: #e5484d; }
.toast.is-out { animation: toast-out .22s ease forwards; }
:root[data-theme="light"] .toast { color: #2b2a27; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(15, 15, 15, .07), 0 10px 30px rgba(15, 15, 15, .14); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .toast { color: #2b2a27; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(15, 15, 15, .07), 0 10px 30px rgba(15, 15, 15, .14); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- Home ---------- */
.home { max-width: 900px; margin: 0 auto; padding: 48px clamp(16px, 5vw, 48px) 100px; }
.home-date { margin: 0 0 4px; color: var(--text-3); font-size: 14px; font-weight: 500; }
.home-hi { margin: 0 0 22px; font-size: clamp(28px, 4vw, 36px); letter-spacing: -.03em; }
.home-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 36px; }
.quick { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--line-2); transition: background .12s; }
.quick:hover { background: var(--hover); }
.quick kbd { margin-left: 2px; }
.home-stats { margin-left: auto; font-size: 13px; color: var(--text-3); }
.home-stats b { color: var(--text-2); font-weight: 600; }
.home-sec { margin-bottom: 34px; min-width: 0; }
.home-sec h2 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 12px; }
.recent { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 12px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.recent-card { position: relative; display: grid; align-content: start; height: 132px; border-radius: 12px; overflow: hidden; background: var(--bg); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.recent-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm), 0 8px 20px rgba(15, 15, 15, .08); }
.rc-top { height: 40px; background: var(--bg-soft); }
.rc-ic { font-size: 24px; line-height: 1; margin: -14px 14px 6px; }
.rc-t { padding: 0 14px; font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rc-m { padding: 4px 14px 0; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.home-list { display: grid; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 4px; }
.hl-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; min-width: 0; }
.hl-row .tag { flex: none; max-width: 40%; }
.hl-row:hover { background: var(--hover); }
.hl-ic { font-size: 17px; width: 22px; text-align: center; flex: none; }
.hl-t { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-t small { display: block; font-size: 12px; font-weight: 400; color: var(--text-3); }
.home-empty { padding: 22px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); font-size: 14px; text-align: center; }
@media (max-width: 760px) { .home-cols { grid-template-columns: 1fr; gap: 0; } .home-stats { margin-left: 0; width: 100%; } .home { padding-top: 28px; } }

/* ---------- Footer + Rechtstexte ---------- */
.site-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; padding: 22px clamp(16px, 4vw, 40px); color: var(--text-3); font-size: 12.5px; border-top: 1px solid var(--line); }
.site-foot nav { display: flex; gap: 16px; }
.site-foot a:hover { color: var(--text); }
.auth .site-foot { border-top: 0; justify-content: center; flex-direction: column; padding-top: 0; margin-top: -24px; }
.legal-body { background: var(--bg); }
.legal-nav { border-bottom: 1px solid var(--line); }
.legal { max-width: 720px; margin: 0 auto; padding: 36px 16px 80px; font-size: 15.5px; line-height: 1.7; }
.legal-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--hover); margin-bottom: 28px; }
.legal-tabs a { padding: 5px 14px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.legal-tabs a.is-on { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.legal h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -.03em; line-height: 1.15; margin: 0 0 24px; }
.legal h2 { font-size: 17px; letter-spacing: -.01em; margin: 34px 0 8px; }
.legal p { margin: 0 0 12px; color: var(--text); }
.legal .lead { font-size: 17px; color: var(--text-2); }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 4px 0 12px; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; }
.legal-date { margin-top: 40px !important; color: var(--text-3) !important; font-size: 13px; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dd { margin-bottom: 8px; } }

/* ---------- Einstellungen ---------- */
.settings { max-width: 720px; }
.set-title { font-size: 30px; letter-spacing: -.025em; margin: 0 0 18px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; display: flex; align-items: center; gap: 6px; padding: 9px 12px 11px; font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; border-radius: 6px 6px 0 0; }
.tab:hover { color: var(--text); background: var(--hover); }
.tab.is-on { color: var(--text); }
.tab.is-on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--text); }
.tab-dot { width: 6px; height: 6px; border-radius: 50%; background: #e8a317; }
.card-set { padding: 20px 22px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 14px; background: var(--bg); }
.card-set.set-danger { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 30%, transparent); }
.card-set.set-danger h2 { color: var(--danger); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.set-txt h2 { display: flex; align-items: center; gap: 8px; font-size: 15.5px; margin: 0 0 4px; }
.set-txt p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.5; max-width: 480px; }
.set-txt + * { margin-top: 16px; }
.set-row .set-txt + * { margin-top: 0; }
.set-form { max-width: 400px; margin-top: 16px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head div { display: grid; }
.profile-head .muted { font-size: 13.5px; }
.avatar-lg { width: 48px; height: 48px; border-radius: 12px; font-size: 17px; }
.ok-badge { color: var(--c-green); font-weight: 500; }
.status-pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--hover-2); color: var(--text-2); }
.status-pill.is-on { background: var(--c-green-bg); color: var(--c-green); }
.mfa-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mfa-opt { display: grid; align-content: start; justify-items: start; gap: 6px; padding: 16px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--text-2); line-height: 1.45; }
.mfa-opt strong { color: var(--text); font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.mfa-opt .btn { margin-top: 6px; }
.mfa-opt-ic { font-size: 24px; line-height: 1; }
.rec { font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.mfa-setup { padding: 18px; border-radius: 10px; background: var(--bg-soft); }
.steps { margin: 0 0 16px; padding-left: 20px; font-size: 14px; line-height: 1.8; }
.qr-wrap { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.qr { width: 168px; height: 168px; padding: 8px; border-radius: 10px; background: #fff; flex: none; display: grid; place-items: center; font-size: 12px; color: #555; text-align: center; }
.qr svg { width: 100%; height: 100%; }
.qr-manual { display: grid; gap: 8px; flex: 1; min-width: 200px; font-size: 13px; }
.secret { font-family: var(--mono); font-size: 13px; letter-spacing: .05em; padding: 8px 10px; border-radius: 6px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); cursor: copy; word-break: break-all; }
.code-row { display: flex; gap: 8px; flex-wrap: wrap; }
.code-input { width: 100%; height: 56px; text-align: center; font: 600 26px/1 var(--mono); letter-spacing: .4em; padding-left: .4em; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); outline: none; }
.code-input.sm { width: 170px; height: 38px; font-size: 18px; letter-spacing: .3em; border-radius: 7px; }
.code-input.is-rc { letter-spacing: .08em; font-size: 20px; }
.code-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.setup-foot { display: flex; gap: 16px; margin-top: 14px; font-size: 13.5px; }
.muted-link { color: var(--text-2); }
.mfa-active { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bg-soft); }
.mfa-active div { display: grid; font-size: 14px; }
.mfa-active .muted { font-size: 12.5px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.confirm-code { margin-top: 14px; }
.confirm-code p { font-size: 13.5px; margin: 0 0 10px; }
.codes-box { padding: 16px; border-radius: 10px; background: var(--c-yellow-bg); margin-bottom: 14px; font-size: 13.5px; }
.codes-box p { margin: 4px 0 12px; color: var(--text-2); }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; font-family: var(--mono); font-size: 14px; }
.codes code { padding: 4px 0; }
.codes-acts { display: flex; gap: 6px; margin-top: 12px; }
.theme-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-card { display: grid; gap: 8px; justify-items: center; font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.theme-card.is-on { color: var(--text); }
.theme-prev { display: grid; grid-template-columns: 30% 1fr; grid-template-rows: 1fr 1fr; gap: 5px; width: 132px; height: 84px; padding: 8px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .12s; }
.theme-card.is-on .theme-prev { box-shadow: 0 0 0 2px var(--accent); }
.theme-prev i { border-radius: 4px; }
.theme-prev i:first-child { grid-row: span 2; }
.theme-prev-light { background: #fff; } .theme-prev-light i { background: #ececea; } .theme-prev-light i:first-child { background: #f4f4f2; }
.theme-prev-dark { background: #191919; } .theme-prev-dark i { background: #2f2f2f; } .theme-prev-dark i:first-child { background: #232323; }
.theme-prev-system { background: linear-gradient(135deg, #fff 50%, #191919 50%); } .theme-prev-system i { background: rgba(128, 128, 128, .35); }
.mfa-ic { font-size: 34px; margin-bottom: 10px; }
.mfa-alt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; font-size: 13.5px; }
.mfa-alt form { margin: 0; }
@media (max-width: 600px) { .mfa-options { grid-template-columns: 1fr; } .codes { grid-template-columns: 1fr; } }

/* Bereichs-Wechsler und Teamspaces */
.pop.ws-pop { width: 290px; }
.space-item .avatar { width: 28px; height: 28px; border-radius: 7px; font-size: 12px; }
.space-item.is-cur { background: var(--hover); }
.space-item .pi-k { color: var(--accent); font-size: 14px; }
.avatar-team { font-size: 13px; }
/* Emoji-Icon: neutraler, leicht transparenter Hintergrund (wie in der Icon-Auswahl) statt Farbe */
.avatar-emoji { background: var(--hover-2) !important; box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 12px; line-height: 1; }
/* Emoji mit etwas Luft zum Rahmen (ca. 55 % der Kachel) – Logos bleiben randlos */
.space-item .avatar.avatar-emoji { font-size: 15px; }
/* Bereich oben links: etwas größere Kachel */
.ws .avatar { width: 26px; height: 26px; border-radius: 7px; font-size: 11.5px; }
.ws .avatar.avatar-emoji { font-size: 14px; }
.space-item .avatar { width: 30px; height: 30px; border-radius: 8px; }
.avatar-xs.avatar-emoji { font-size: 10px; }
.avatar-lg.avatar-emoji { font-size: 26px; }
.avatar-img { background: var(--bg) !important; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xs { width: 18px; height: 18px; border-radius: 5px; font-size: 10px; margin-right: 6px; }
.icon-pick { flex: none; border-radius: 10px; transition: transform .1s; }
.icon-pick:hover .avatar-pick { box-shadow: 0 0 0 2px var(--accent-soft), inset 0 0 0 1px var(--line-2); }
.icon-pick:active { transform: scale(.96); }
.avatar-pick { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; background: hsl(var(--h, 220) 30% 50% / .18); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); }
.ts-icon { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.pop-item.upload-logo .pi-ic { font-size: 16px; }
.ws-name { display: flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.2; min-width: 0; }
.ws-name small { font-size: 11px; font-weight: 500; color: var(--text-3); }
.ts-row { display: flex; gap: 8px; margin: 4px 0 18px; }
.ts-new .ts-row input { height: 40px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 0 12px; font-size: 15px; outline: none; }
.ts-new .ts-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ts-ic-in { width: 56px; text-align: center; font-size: 20px !important; }
.ts-name-in { flex: 1; min-width: 0; }
.ts-name .ts-row { margin: 0; }
.ts-name .ts-icon { width: 80px; }
.ts-name .ts-icon input { text-align: center; font-size: 18px; }
.ts-name .ts-row label:last-child { flex: 1; }
.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; height: 36px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); padding: 0 12px; font-size: 14.5px; outline: none; }
.invite-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.role-form { margin: 0; }
.set-row .set-txt + .btn { align-self: flex-start; }
.invite-box { max-width: 460px; }
.invite-box textarea { width: 100%; min-height: 84px; resize: vertical; margin: 0 0 6px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); font: inherit; font-size: 14.5px; line-height: 1.5; outline: none; }
.invite-box textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.invite-box .field-err { display: block; margin-bottom: 8px; }
.invite-box .confirm-acts { margin-top: 12px; }
.list-row.is-pending .list-t { color: var(--text-2); }
.tab-team { margin-left: auto; }

/* Notion-Import */
.notion-logo { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: var(--text); color: var(--bg); font: 700 14px/1 Georgia, serif; }
.import-steps { margin: 16px 0 18px; font-size: 14px; color: var(--text-2); }
.import-steps b { color: var(--text); font-weight: 600; }
.import-form { display: grid; gap: 14px; }
.dropzone { position: relative; display: grid; justify-items: center; gap: 4px; padding: 28px 16px; border-radius: 12px; border: 1.5px dashed var(--line-2); background: var(--bg-soft); cursor: pointer; text-align: center; transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--c-green); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-ic { font-size: 28px; }
.dz-t { font-weight: 600; font-size: 14.5px; }
.dz-s { font-size: 12.5px; color: var(--text-3); }
.import-target { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; margin: 0; }
.import-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.import-grid div { display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: 10px; background: var(--bg-soft); font-size: 13px; color: var(--text-2); line-height: 1.5; }
.import-grid b { color: var(--text); font-size: 13.5px; }
.btn.is-busy { pointer-events: none; opacity: .75; }
.btn.is-busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .import-grid { grid-template-columns: 1fr; } }

/* Auswahl „Seite oder Board“ */
.pop.new-pop { width: 460px; max-width: calc(100vw - 16px); padding: 8px; animation: toast-in .18s ease; }
.new-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 2px 0; }
@media (max-width: 520px) { .new-grid { grid-template-columns: 1fr; } }

/* ---------- Tabelle (Mini-Excel) ---------- */
.doc-table .doc-head { padding-right: clamp(16px, 5vw, 96px); }
.sheet-wrap { overflow-x: auto; padding: 14px clamp(16px, 5vw, 96px) 60px 0; }
.sheet { width: max-content; min-width: 100%; }
.sheet-t { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px; }
.sheet-t th, .sheet-t td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; height: 34px; }
.sheet-t thead th { border-top: 1px solid var(--line); background: var(--bg-soft); position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 500; }
.sheet-t tr > :first-child { border-left: 1px solid var(--line); }
.sheet-t thead th:first-child { border-top-left-radius: 8px; }
.sheet-t thead th:last-child { border-top-right-radius: 8px; }
.sh-corner, .sh-num { background: var(--bg-soft); }
.sh-head { position: relative; display: flex; align-items: center; gap: 7px; width: 100%; height: 34px; padding: 0 10px; color: var(--text-2); font-size: 13px; font-weight: 500; text-align: left; }
.sh-head:hover { background: var(--hover); color: var(--text); }
.sh-ty { flex: none; width: 16px; text-align: center; font-size: 12px; color: var(--text-3); }
.sh-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-resize { position: absolute; top: 0; right: -3px; width: 6px; height: 100%; cursor: col-resize; z-index: 2; }
.sh-resize:hover { background: var(--accent); opacity: .5; }
.sheet-t th { position: relative; }
body.is-resizing, body.is-resizing * { cursor: col-resize !important; user-select: none; }
.sh-addcol button { width: 100%; height: 34px; color: var(--text-3); font-size: 18px; }
.sh-addcol button:hover { background: var(--hover); color: var(--text); }
.sh-num { text-align: center; }
.sh-rowbtn { width: 100%; height: 33px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.sh-rowbtn:hover { background: var(--hover); color: var(--text); }
.sh-c { background: var(--bg); }
.sh-in { width: 100%; height: 33px; border: 0; outline: none; padding: 0 10px; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.sh-in:focus { box-shadow: inset 0 0 0 2px var(--accent); background: var(--bg); border-radius: 2px; position: relative; z-index: 1; }
.sh-numin { text-align: right; font-variant-numeric: tabular-nums; }
.sh-in[type=date] { color-scheme: inherit; }
.sh-check { text-align: center; }
.sh-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.sh-pad { border-right: 0 !important; border-bottom-color: transparent !important; background: transparent; }
.sheet-t thead .sh-addcol { border-right: 1px solid var(--line); }
.sheet-t tfoot td { border: 0 !important; height: 30px; background: transparent; }
.sh-sum { text-align: right; padding: 0 10px !important; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.sh-sum span { font-weight: 400; color: var(--text-3); font-size: 11.5px; margin-right: 4px; }
.sh-addrow { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; margin-top: 2px; border-radius: 6px; color: var(--text-3); font-size: 14px; }
.sh-addrow:hover { background: var(--hover); color: var(--text-2); }
.sheet-ro .sh-cell { padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--bg); }
.sheet-ro .sh-cell.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-ro .sh-head { cursor: default; }
.new-opt { display: grid; justify-items: start; gap: 2px; padding: 12px; border-radius: 9px; text-align: left; box-shadow: inset 0 0 0 1px var(--line); transition: background .12s, box-shadow .12s, transform .12s; }
.new-opt.is-sel { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.new-opt:active { transform: scale(.98); }
.new-ic { font-size: 24px; line-height: 1; margin-bottom: 8px; }
.new-t { font-weight: 600; font-size: 14px; color: var(--text); }
.new-d { font-size: 12px; line-height: 1.4; color: var(--text-2); }
.new-hint { padding: 8px 4px 2px; font-size: 11.5px; color: var(--text-3); }
.new-hint kbd { font-size: 10px; padding: 0 4px; }

/* E-Mail-Bestätigung: kleine Karte unten in der Seitenleiste */
.verify-card { position: relative; margin: 6px 8px 4px; padding: 12px 12px 11px; border-radius: 10px; background: var(--bg); box-shadow: var(--shadow-sm); font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.verify-card.is-out { animation: toast-out .2s ease forwards; }
.verify-top { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.verify-dot { width: 8px; height: 8px; border-radius: 50%; background: #e8a317; box-shadow: 0 0 0 3px rgba(232, 163, 23, .2); animation: pulse 2s ease-in-out infinite; }
.verify-card p { margin: 5px 0 9px; word-break: break-word; }
.verify-card b { color: var(--text); font-weight: 500; }
.verify-btn { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 12.5px; font-weight: 500; background: var(--hover); color: var(--text); }
.verify-btn:hover { background: var(--hover-2); }
.verify-x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; color: var(--text-3); opacity: 0; transition: opacity .15s; }
.verify-card:hover .verify-x { opacity: 1; }
.verify-x:hover { background: var(--hover); color: var(--text); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(232, 163, 23, .08); } }

/* ---------- Board ---------- */
.board { display: flex; align-items: flex-start; gap: 14px; overflow-x: auto; padding: 18px clamp(16px, 5vw, 96px) 40px 0; min-height: 300px; }
.col { flex: none; width: 272px; border-radius: 10px; padding: 6px; background: var(--bg-soft); }
.col.is-over { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.col-head { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px; }
.col-count { color: var(--text-3); font-size: 13px; flex: 1; }
.col-head .icon-btn { opacity: 0; }
.col:hover .col-head .icon-btn { opacity: 1; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 13px; font-weight: 500; white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: currentColor; opacity: .9; }
.tag-gray { background: var(--c-gray-bg); color: var(--c-gray); } .tag-brown { background: var(--c-brown-bg); color: var(--c-brown); }
.tag-orange { background: var(--c-orange-bg); color: var(--c-orange); } .tag-yellow { background: var(--c-yellow-bg); color: var(--c-yellow); }
.tag-green { background: var(--c-green-bg); color: var(--c-green); } .tag-blue { background: var(--c-blue-bg); color: var(--c-blue); }
.tag-purple { background: var(--c-purple-bg); color: var(--c-purple); } .tag-pink { background: var(--c-pink-bg); color: var(--c-pink); }
.tag-red { background: var(--c-red-bg); color: var(--c-red); }
.dot-gray { background: var(--c-gray); } .dot-brown { background: var(--c-brown); } .dot-orange { background: var(--c-orange); } .dot-yellow { background: var(--c-yellow); }
.dot-green { background: var(--c-green); } .dot-blue { background: var(--c-blue); } .dot-purple { background: var(--c-purple); } .dot-pink { background: var(--c-pink); } .dot-red { background: var(--c-red); }
.cards { display: grid; gap: 6px; min-height: 8px; padding: 2px 0; }
.card { display: grid; gap: 4px; padding: 10px 12px; background: var(--bg); border-radius: 8px; box-shadow: var(--shadow-sm); font-size: 14px; cursor: pointer; transition: box-shadow .12s, background .12s; }
.card:hover { background: color-mix(in srgb, var(--bg) 92%, var(--text)); }
.card.is-dragging { opacity: .4; }
.recent-card.is-ctx, .hl-row.is-ctx, .crumb.is-ctx, .page-link.is-ctx { background: var(--hover); box-shadow: 0 0 0 2px var(--accent-soft); }
.card.is-ctx { box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-sm); }
.tag-dot { width: 9px; height: 9px; border-radius: 50%; }
.card-t { font-weight: 500; word-break: break-word; }
.card-ic { margin-right: 6px; }
.card-p { font-size: 12.5px; color: var(--text-2); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-todo { font-size: 12px; color: var(--text-3); }
/* Labels */
.lbl { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.prop-labels { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 28px; padding: 3px 6px; margin-left: -6px; border-radius: 6px; cursor: pointer; }
.prop-labels:hover { background: var(--hover); }
.lbl-add { font-size: 13px; color: var(--text-3); padding: 0 2px; }
.pop.lbl-pop { width: 280px; }
.lbl-list { display: grid; gap: 1px; max-height: 300px; overflow-y: auto; }
.lbl-item { cursor: pointer; }
.lbl-item .pi-t { flex: 1; }
.lbl-on { color: var(--accent) !important; font-weight: 700; }
.lbl-edit { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; color: var(--text-3); opacity: 0; }
.lbl-item:hover .lbl-edit { opacity: 1; }
.lbl-edit:hover { background: var(--hover-2); color: var(--text); }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.card-meta .card-who { margin-left: auto; }
.card-who { width: 20px; height: 20px; border-radius: 50%; font-size: 9px; }
.prop-who { display: inline-flex; align-items: center; gap: 6px; }
.prop-av { width: 22px; height: 22px; border-radius: 50%; font-size: 9.5px; }
.menu-av { width: 20px; height: 20px; border-radius: 50%; font-size: 9px; color: #fff; }
.card-todo.is-done { color: var(--c-green); }
.card-ph { height: 4px; border-radius: 2px; background: var(--accent); opacity: .6; }
.col-new { display: flex; align-items: center; gap: 6px; width: 100%; height: 32px; padding: 0 8px; margin-top: 2px; border-radius: 6px; color: var(--text-3); font-size: 14px; }
.col-new:hover { background: var(--hover); color: var(--text-2); }
.col-add-col { flex: none; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px; color: var(--text-3); font-size: 14px; margin-top: 6px; }
.col-add-col:hover { background: var(--hover); color: var(--text-2); }
.card-input { width: 100%; border: 0; outline: none; background: none; font: inherit; font-weight: 500; padding: 0; }
.board.is-readonly .card { cursor: pointer; }

/* ---------- Panels (Papierkorb, Einstellungen) ---------- */
.panel { max-width: 760px; margin: 0 auto; padding: 40px clamp(16px, 5vw, 48px) 120px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel h1 { font-size: 32px; letter-spacing: -.025em; margin: 0 0 6px; }
.set { padding: 26px 0; border-bottom: 1px solid var(--line); }
.set h2 { font-size: 16px; margin: 0 0 14px; }
.set .muted { margin: 0 0 12px; font-size: 14px; }
.set-danger h2 { color: var(--danger); }
.inline-form { margin-top: 10px; font-size: 14px; }
.list { display: grid; margin: 14px 0; border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.list-t { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.list-t small { display: block; color: var(--text-3); font-weight: 400; font-size: 12.5px; }
.empty { text-align: center; color: var(--text-2); padding: 60px 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 8px; background: var(--hover); gap: 2px; }
.seg button { height: 28px; padding: 0 14px; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.seg button.is-on { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
.meter { height: 6px; border-radius: 99px; background: var(--hover-2); overflow: hidden; max-width: 420px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* Geteilte Seite */
.share-body { overflow: auto; }
.share-wrap { min-height: 100vh; }
.share-top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); }
.share-cta { flex: none; }
.share-body .cover + .doc .doc-icon { margin-top: -40px; }
.share-body .doc > .doc-head:first-child { padding-top: 40px; }
.share-body .cover + .doc > .doc-head:first-child { padding-top: 0; }

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
    .side { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); transform: translateX(-100%); box-shadow: var(--shadow); margin-left: 0 !important; }
    .app.side-mobile-open .side { transform: none; }
    .app.side-mobile-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(15, 15, 15, .35); }
    .side-open { display: inline-grid; }
    .side-close { opacity: 1; }
    .side-resize { display: none; }
    .save-status { display: none; }
    .doc-title { font-size: 32px; }
    .doc-icon { font-size: 56px; }
    .doc-tools { opacity: 1; }
    .crumb-t { max-width: 120px; }
    .crumbs .crumb:not(:last-child), .crumbs .crumb-sep { display: none; }
    .shot { grid-template-columns: 1fr; height: 400px; }
    .shot-side { display: none; }
    .prop-k { width: 90px; }
    .handle { display: none; }
    .lp-nav .btn-ghost { display: none; }
}
@media (max-width: 480px) {
    .auth-card { padding: 24px 20px; }
    .editor { font-size: 16px; }
    .top-acts #share-btn { padding: 0 8px; }
}
/* Druck / PDF: Seitenrand 0 → der Browser hat keinen Platz für Datum, Titel und Link in Kopf-/Fußzeile.
   Den Abstand zum Papier liefert die Seite selbst. */
@page { margin: 0; }
@media print {
    html, body, .app-body { height: auto !important; overflow: visible !important; background: #fff !important; }
    :root { --bg: #fff; --bg-soft: #f7f6f3; --text: #1f1f1d; --text-2: #5f5e5b; --text-3: #8d8c88; --line: #e6e6e4; --line-2: #dcdcda; --hover: rgba(0,0,0,.04); --hover-2: rgba(0,0,0,.06); color-scheme: light; }
    .side, .side-scrim, .topbar, .banner, .handle, .doc-tools, .subpages, .verify-card, .toasts, .pop, .fmt, .modal, .cover-acts, .drop-line, .col-new, .col-add-col, .col-add, .col-menu, .sh-addrow, .sh-addcol, .sh-resize, .lbl-add { display: none !important; }
    .app, .main, .scroller { height: auto !important; overflow: visible !important; display: block !important; }
    .cover { height: 34mm !important; min-height: 0 !important; max-height: none !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cover.is-none { display: none; }
    /* Abstand oben/unten auf JEDER Druckseite (Inhalt wird pro Seite „geklont“), nicht nur am Anfang/Ende */
    .doc, .app.is-full .doc { max-width: none !important; padding: 15mm 18mm !important; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
    .editor > *, .editor li { orphans: 3; widows: 3; }
    .cover + .doc .doc-icon { margin-top: -10mm; }
    .doc-icon.is-empty { display: none; }
    .doc-title { font-size: 26pt; }
    .editor { padding-bottom: 0; font-size: 11pt; }
    .editor h1, .editor h2, .editor h3, .editor figure, .editor pre, .editor .callout, .editor .file, .card, .sheet-t tr { break-inside: avoid; }
    .editor h1, .editor h2, .editor h3 { break-after: avoid; }
    .editor a { color: inherit; }
    .board { overflow: visible !important; flex-wrap: wrap; padding: 6mm 0 0 !important; }
    .sheet-wrap { overflow: visible !important; padding: 6mm 0 0 !important; }
    .editor ul[data-type="todo"] > li::before, .tag, .lbl, .avatar, .callout, mark { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Link-Dialog: Titel + Link */
.pop.ld-pop { width: 340px; padding: 12px; }
.ld { display: grid; gap: 10px; }
.ld label { display: grid; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.ld .pop-in { margin: 0; }
.ld .pop-in.is-err { border-color: var(--danger); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 20%, transparent); }
.ld-acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.ld-acts .btn-primary { margin-left: auto; }
.ld-hint { font-size: 12px; color: var(--text-3); }

/* Tabellen: Links in Zellen klickbar (Anzeige über dem Eingabefeld, solange es nicht fokussiert ist) */
.sh-c { position: relative; }
.sh-view { display: none; position: absolute; inset: 0; padding: 0 10px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; font-size: 14px; color: var(--text); }
.sh-c.has-link .sh-view { display: flex; }
.sh-c.has-link .sh-in:not(:focus) { color: transparent; }
.sh-c.has-link:focus-within .sh-view { display: none; }
.sh-view a, .sheet-ro a { pointer-events: auto; color: var(--link); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); text-underline-offset: 3px; }
.sh-view a:hover, .sheet-ro a:hover { text-decoration-color: var(--link); }
.sh-view > span { overflow: hidden; text-overflow: ellipsis; }


/* =====================================================================
   Stil FABULOUS TOOLS (überschreibt Formen/Farben, Struktur bleibt)
   ===================================================================== */
body { letter-spacing: -.005em; text-rendering: optimizeLegibility; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus, :focus-visible { outline: none; }
kbd { font-family: var(--mono); border-radius: 6px; }

/* Buttons: Pillen, schwarz/weiß */
.btn { border-radius: 999px; font-weight: 500; letter-spacing: -.01em; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn-sm { padding: 0 14px; }
.btn-primary, .btn-dark { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, .btn-dark:hover { background: var(--accent-hover); opacity: 1; }
.btn-ghost { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: var(--bg); box-shadow: inset 0 0 0 1px var(--text); }
.btn-danger { background: var(--danger); }
.btn-danger-ghost { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 40%, transparent); }
.link, .link-btn { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.link:hover, .link-btn:hover { text-decoration-color: var(--text); }
.icon-btn { border-radius: 8px; }

/* Formulare */
.form input[type=text], .form input[type=email], .form input[type=password], .code-input, .invite-box textarea, .pop input.pop-in, .invite-row input, .ts-new .ts-row input {
    border-radius: 10px; border-color: var(--line-2);
}
.form input:focus, .code-input:focus, .invite-box textarea:focus, .pop input.pop-in:focus, .invite-row input:focus, .ts-new .ts-row input:focus {
    border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form .check input, .sh-check input { accent-color: var(--accent); }

/* Karten, Panels, Popups */
.auth-card { border-radius: 20px; box-shadow: var(--shadow-sm), 0 24px 60px -24px rgba(10, 10, 10, .18); }
.auth-card h1, .panel h1, .set-title, .home-hi, .doc-title { letter-spacing: -.04em; }
.card-set { border-radius: var(--radius); }
.pop, .modal-box, .link-card { border-radius: 14px; }
.pop-item { border-radius: 8px; }
.pop-label, .side-label, .subpages-label, .home-sec h2, .tab-team, .status-pill { font-family: var(--mono); letter-spacing: .02em; }
.side-label, .pop-label, .subpages-label { text-transform: uppercase; font-size: 10.5px; }
.home-sec h2 { text-transform: uppercase; font-size: 11px; letter-spacing: .05em; }
.status-pill { font-size: 10.5px; }
.modal { background: rgba(10, 10, 10, .45); backdrop-filter: blur(3px); }

/* Seitenleiste */
.row.is-active, .nav-item.is-active { background: var(--hover-2); color: var(--text); font-weight: 600; }
.avatar { border-radius: 8px; }
.verify-card { border-radius: 12px; }
.verify-dot { background: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); animation: none; }

/* Editor */
.editor a { color: var(--link); text-decoration-color: color-mix(in srgb, var(--link) 35%, transparent); }
.editor a:hover { text-decoration-color: var(--link); background: var(--hover); }
.editor blockquote { border-left-color: var(--text); }
.editor .callout { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.editor pre { border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.editor code { font-family: var(--mono); }
.editor ul[data-type="todo"] > li[data-checked="1"]::before {
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
    border-color: var(--accent);
}
.editor ul[data-type="todo"] > li::before { border-radius: 4px; }
.editor .file { border-radius: 12px; }

/* Boards & Tabellen */
.col { border-radius: 14px; }
.card { border-radius: 12px; }
.tag, .lbl { font-family: var(--font); }
.sheet-t thead th { font-family: var(--mono); }
.sh-head { font-family: var(--mono); font-size: 12px; letter-spacing: .01em; }
.sh-in:focus { box-shadow: inset 0 0 0 2px var(--text); }

/* Toasts wie bei TOOLS: schwarze Pille */
.toast, :root[data-theme="light"] .toast { background: #0a0a0a; color: #fff; box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .35); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .toast { background: #0a0a0a; color: #fff; box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .35); } }
:root[data-theme="dark"] .toast { background: #fafafa; color: #0a0a0a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { background: #fafafa; color: #0a0a0a; } }

/* Landing im Tools-Stil */
.lp-hero h1 { font-weight: 700; letter-spacing: -.055em; }
.lp-hero h1 span { font-weight: 300; color: var(--text-2); }
.lp-eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 400; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); }
.feat { border-radius: 20px; background: var(--bg-soft); box-shadow: none; }
.shot { border-radius: 20px; }
.lp-nav { border-bottom: 1px solid var(--line); }

/* Einstellungen / Tabs */
.tab.is-on::after { background: var(--text); height: 2px; }
.seg { border-radius: 999px; }
.seg button { border-radius: 999px; }
.theme-card.is-on .theme-prev { box-shadow: 0 0 0 2px var(--text); }
.new-opt.is-sel { background: var(--hover); box-shadow: inset 0 0 0 1.5px var(--text); }
.legal-tabs { border-radius: 999px; }
.legal-tabs a { border-radius: 999px; }
.legal a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
/* eigene Kachel (privater Bereich) schwarz wie das App-Icon */
.ws .avatar:not(.avatar-team):not(.avatar-img), .space-item .avatar:not(.avatar-team):not(.avatar-img), .profile-head .avatar { background: var(--accent) !important; color: var(--accent-ink); }

/* =====================================================================
   Mindmaps (portiert von FABULOUS MINDMAP)
   ===================================================================== */
.doc-mindmap { padding-right: clamp(16px, 5vw, 96px); }
.mm-board {
    position: relative; height: max(460px, calc(100vh - 250px)); height: max(460px, calc(100dvh - 250px)); margin: 8px 0 40px;
    border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; background: var(--bg);
}
.mm-board.is-full { position: fixed; inset: 10px; z-index: 900; height: auto; margin: 0; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
html.mm-full-open { overflow: hidden; }
.mm-stage {
    position: absolute; inset: 0; overflow: hidden; outline: none; touch-action: none;
    background-color: var(--bg);
    background-image: radial-gradient(circle, var(--mm-dot, #d9d9d9) 1px, transparent 1.3px);
    background-size: 24px 24px;
}
.mm-svg { display: block; width: 100%; height: 100%; cursor: grab; user-select: none; -webkit-user-select: none; opacity: 0; transition: opacity .25s; }
.mm-stage.is-ready .mm-svg { opacity: 1; }
.mm-svg.is-panning { cursor: grabbing; }
.mm-node, .mm-badge { cursor: pointer; }
.mm-edit {
    position: absolute; z-index: 5; box-sizing: border-box; margin: 0; border: 0; background: transparent;
    resize: none; overflow: hidden; outline: none; text-align: center; font-family: var(--font);
    white-space: pre-wrap; overflow-wrap: anywhere; caret-color: currentColor;
}
.mm-toolbar {
    position: absolute; z-index: 10; top: 12px; left: 12px; right: 12px;
    display: flex; align-items: center; gap: 4px; padding: 6px;
    border: 1px solid var(--line-2); border-radius: 16px;
    background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -16px rgba(0, 0, 0, .25);
    overflow-x: auto; scrollbar-width: none;
}
.mm-toolbar::-webkit-scrollbar { display: none; }
.mm-tb {
    flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px;
    border: 0; border-radius: 10px; background: transparent; color: var(--text); cursor: pointer;
    font: 500 13.5px/1 var(--font); white-space: nowrap; transition: background .15s, opacity .15s;
}
.mm-tb:hover:not(:disabled), .mm-tb[aria-expanded="true"], .mm-tb[aria-pressed="true"] { background: var(--hover-2); }
.mm-tb:disabled { opacity: .3; cursor: default; }
.mm-tb svg { width: 18px; height: 18px; flex: none; }
.mm-tb-dark { background: var(--accent); color: var(--accent-ink); padding: 0 10px 0 14px; }
.mm-tb-dark:hover:not(:disabled), .mm-tb-dark[aria-expanded="true"] { background: var(--accent-hover); }
.mm-sep { flex: none; width: 1px; height: 22px; margin: 0 4px; background: var(--line-2); }
.mm-spacer { flex: 1; min-width: 6px; }
.mm-color-dot { width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); background: var(--text); }
.mm-pop {
    position: absolute; z-index: 20; top: 64px; padding: 8px;
    border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg-elev);
    box-shadow: 0 18px 44px -16px rgba(0, 0, 0, .3);
}
.mm-pop[hidden] { display: none; }
.mm-pop-colors { display: grid; grid-template-columns: repeat(5, 30px); gap: 8px; padding: 12px; }
.mm-swatch { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); transition: transform .15s; cursor: pointer; }
.mm-swatch:hover { transform: scale(1.1); }
.mm-swatch.is-active { box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--c); }
.mm-pop-export { display: grid; min-width: 240px; }
.mm-pop-export button { display: grid; gap: 1px; padding: 9px 12px; border: 0; border-radius: 9px; background: none; text-align: left; font: 500 14px var(--font); color: var(--text); cursor: pointer; }
.mm-pop-export button small { font-size: 12px; font-weight: 400; color: var(--text-2); }
.mm-pop-export button:hover { background: var(--hover); }
.mm-hint {
    position: absolute; z-index: 5; left: 16px; bottom: 16px; margin: 0; max-width: calc(100% - 180px);
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); pointer-events: none;
}
.mm-hint kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); color: var(--text); }
.mm-hint kbd:not(:first-child) { margin-left: 8px; }
.mm-zoom {
    position: absolute; z-index: 10; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 2px; padding: 4px;
    border: 1px solid var(--line-2); border-radius: 12px; background: color-mix(in srgb, var(--bg) 94%, transparent);
}
.mm-zoom button { height: 32px; min-width: 32px; padding: 0 6px; border: 0; border-radius: 8px; background: none; font-size: 17px; color: var(--text); cursor: pointer; }
.mm-zoom button:hover { background: var(--hover-2); }
.mm-zoom-level { min-width: 60px !important; font-family: var(--mono) !important; font-size: 12px !important; }
:root[data-theme="dark"] .mm-board { --mm-dot: #2a2a2a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mm-board { --mm-dot: #2a2a2a; } }
.share-body .doc-mindmap { max-width: none; }
.share-body .mm-board { height: max(460px, calc(100dvh - 230px)); }
@media (max-width: 1180px) { .mm-tb-l:not(.mm-keep) { display: none; } .mm-hint { display: none; } }
@media (max-width: 759px) {
    .mm-toolbar { flex-wrap: wrap; row-gap: 2px; overflow: visible; top: 8px; left: 8px; right: 8px; }
    .mm-spacer { flex-basis: 100%; height: 0; }
    .mm-sep { display: none; }
    .mm-board { border-radius: 16px; }
}
@media print {
    .mm-toolbar, .mm-zoom, .mm-hint, .mm-pop { display: none !important; }
    .mm-board { border: 0; height: 80vh; }
    .mm-stage { background-image: none; }
}
.mm-board.is-readonly .mm-toolbar { left: auto; }
.mm-board.is-readonly .mm-spacer { display: none; }

/* Mindmap-Seiten: kein Scrollen – die Fläche füllt den restlichen Platz */
.scroller:has(> .doc-mindmap) { display: flex; flex-direction: column; overflow: hidden; }
.scroller:has(> .doc-mindmap) > .cover { flex: none; }
.doc.doc-mindmap { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; padding-bottom: 16px; }
.doc-mindmap > .doc-head { flex: none; }
.doc-mindmap .mm-board:not(.is-full) { flex: 1; min-height: 320px; height: auto; margin: 8px 0 0; }
.share-body:has(.doc-mindmap) { overflow: hidden; height: 100dvh; }
.share-body:has(.doc-mindmap) .share-wrap { height: 100dvh; display: flex; flex-direction: column; }
.share-body .doc.doc-mindmap { padding-bottom: 16px; }
