:root {
  --bg: oklch(0 0 0);
  --bg2: oklch(0.11 0 0);
  --panel: oklch(0.14 0 0);
  --panel2: oklch(0.18 0 0);
  --border: oklch(0.26 0 0);
  --border2: oklch(0.32 0 0);
  --text: oklch(1 0 0);
  --muted: oklch(0.72 0 0);
  --dim: oklch(0.56 0 0);
  --accent: oklch(1 0 0);
  --accent2: oklch(1 0 0);
  --hover: oklch(0.23 0 0);
  --ok: oklch(0.72 0.17 155);
  --warn: oklch(0.81 0.17 75.35);
  --bad: oklch(0.69 0.2 23.91);
  --blue: oklch(0.58 0.21 260.84);
  --r: 8px;
  --spring: cubic-bezier(.2, .9, .3, 1);
  --ease: cubic-bezier(.3, .7, .2, 1);
  --shadow: none;
  color-scheme: dark;
}
@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/GeistMono.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 14.5px/1.5 Geist, system-ui, sans-serif; letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased; overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent2); }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.hidden { display: none !important; }
::selection { background: oklch(1 0 0 / .25); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: oklch(0.3 0 0); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.boot { height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2px solid oklch(1 0 0 / .1); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Knöpfe & Felder ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--border2);
  background: var(--panel2); cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #000; }
.btn:hover { background: var(--hover); }

.btn.primary { background: var(--text); border-color: var(--text); color: #000; }
.btn.primary:hover { background: oklch(0.88 0 0); border-color: oklch(0.88 0 0); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: oklch(0.69 0.2 23.91 / .12); border-color: oklch(0.69 0.2 23.91 / .4); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn .ic { width: 17px; height: 17px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--muted); }
.input, textarea.input, select.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border);
  background: var(--bg); outline: none; transition: border-color .15s;
}
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--muted); outline: 2px solid oklch(1 0 0 / .14); outline-offset: 0; }
.input::placeholder { color: var(--dim); }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.err { color: var(--bad); font-size: 13.5px; min-height: 20px; margin: -4px 0 8px; }

.avatar {
  --c: #888;
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 22%, #111); color: color-mix(in srgb, var(--c) 55%, #fff);
  font-weight: 600; font-size: 11px; border: 1px solid color-mix(in srgb, var(--c) 35%, #333);
}
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; }
.avatars { display: flex; }
.avatars .avatar { margin-left: -7px; outline: 2px solid var(--bg); }
.avatars .avatar:first-child { margin-left: 0; }
.avatar.online { position: relative; }
.avatar.online::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--panel2); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.chip .ic { width: 13px; height: 13px; }
.chip.hoch { color: var(--bad); border-color: oklch(0.69 0.2 23.91 / .35); background: oklch(0.69 0.2 23.91 / .08); }
.chip.niedrig { color: oklch(0.72 0 0); }
.chip.late { color: var(--bad); border-color: oklch(0.69 0.2 23.91 / .35); background: oklch(0.69 0.2 23.91 / .08); }
.chip.soon { color: var(--warn); border-color: oklch(0.81 0.17 75.35 / .35); background: oklch(0.81 0.17 75.35 / .08); }

/* ── Anmeldung ─────────────────────────────────── */
.auth { height: 100vh; overflow: auto; display: grid; place-items: center; padding: 24px; position: relative; }
.auth-wrap { width: min(980px, 100%); display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; position: relative; }
.auth-hero h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05; margin: 18px 0 14px; letter-spacing: -.045em; font-weight: 650; }
.auth-hero h1 em { font-style: normal; color: var(--muted); }
.auth-hero p { color: var(--muted); font-size: 16.5px; max-width: 440px; margin: 0 0 26px; }
.feats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 460px; }
.feat { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--bg); font-size: 13.5px; font-weight: 500; }
.feat .ic { color: var(--muted); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: -.03em; }
.brand .mark { width: 30px; height: 30px; border-radius: 7px; background: #fff; display: grid; place-items: center; color: #000; }
.brand .mark .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.auth .card { padding: 28px; }
.seg { display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 4px; margin-bottom: 20px; position: relative; }
.seg button { flex: 1; height: 34px; border: 0; background: none; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--muted); position: relative; z-index: 1; transition: color .2s; }
.seg button.on { color: var(--text); }
.seg .ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); background: var(--hover); border-radius: 6px; transition: transform .3s var(--ease); }
.seg.two .ind.r { transform: translateX(100%); }

/* ── Grundgerüst ───────────────────────────────── */
.shell { display: grid; grid-template-columns: 264px 1fr; height: 100vh; height: 100dvh; }
.side { background: var(--bg); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.side-top { padding: 18px 16px 10px; display: flex; align-items: center; justify-content: space-between; }
.side-sec { padding: 14px 18px 6px; font-size: 12px; font-weight: 500; color: var(--dim); display: flex; justify-content: space-between; align-items: center; }
.side-list { flex: 1; overflow: auto; padding: 0 10px 10px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: var(--r); color: var(--text); text-decoration: none; cursor: pointer; transition: background .15s; position: relative; }
.nav-item:hover { background: var(--panel); }
.nav-item.on { background: var(--panel2); }
.nav-item .pdot { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; font-weight: 600; font-size: 12.5px; flex: none; color: #fff; }
.nav-item .nm { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .sub { font-size: 12px; color: var(--muted); }
.nav-item .meta { min-width: 0; flex: 1; }
.mini-bar { height: 2px; border-radius: 2px; background: var(--border); margin-top: 5px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: var(--muted); border-radius: 3px; transition: width .5s var(--ease); }
.side-bottom { border-top: 1px solid var(--border); padding: 12px; display: flex; align-items: center; gap: 10px; }
.side-bottom .who { flex: 1; min-width: 0; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 4px; border-radius: var(--r); }
.side-bottom .who:hover { background: var(--panel); }
.side-bottom .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-bottom .who small { color: var(--muted); font-size: 12px; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 16px 26px 0; }
.topbar .burger { display: none; }
.p-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.p-title .pdot { width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 15px; flex: none; }
.p-title h1 { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-title p { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-title .tt { min-width: 0; }
.tabs { display: flex; gap: 2px; padding: 14px 22px 0; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; position: relative; flex: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: flex; align-items: center; gap: 8px; padding: 10px 13px 13px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; white-space: nowrap; transition: color .15s; position: relative; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); }
.tab .n { font-size: 11.5px; background: var(--panel2); border: 1px solid var(--border); padding: 0 7px; border-radius: 99px; line-height: 19px; color: var(--muted); }
.tab-ind { position: absolute; bottom: -1px; height: 2px; background: #fff; border-radius: 0; transition: transform .3s var(--ease), width .3s var(--ease); left: 0; }
.content { flex: 1; min-height: 0; overflow: auto; padding: 24px 26px 40px; position: relative; }
.content.flush { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.view-in { animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

.h2 { font-size: 15px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 14px; display: flex; align-items: center; gap: 9px; }
.h2 .ic { color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.035em; }

.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { width: 52px; height: 52px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--border); color: var(--muted); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .big .ic { width: 28px; height: 28px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 17px; }
.empty p { margin: 0 auto 18px; max-width: 380px; }

/* ── Start ─────────────────────────────────────── */
.home { max-width: 1100px; }
.hello h1 { font-size: 30px; font-weight: 650; margin: 6px 0 4px; letter-spacing: -.045em; }
.hello p { color: var(--muted); margin: 0 0 26px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.pcard { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 18px; cursor: pointer; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, background .15s; position: relative; overflow: hidden; }
.pcard:hover { border-color: var(--dim); }
.pcard h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.025em; }
.pcard p { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.pcard .foot { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.pcard.new { border-style: dashed; align-items: center; justify-content: center; color: var(--muted); min-height: 170px; background: transparent; }
.pcard.new::before { display: none; }
.pcard.new:hover { color: var(--text); border-color: var(--dim); }
.pcard.new .ic { width: 26px; height: 26px; }
.bar { height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: #fff; transition: width .6s var(--ease); }

/* ── Übersicht ─────────────────────────────────── */
.ov { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; max-width: 1200px; }
.ov .card { padding: 20px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }
.stat b { font-size: 26px; font-weight: 600; letter-spacing: -.04em; display: block; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 500; }

.ring { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: var(--border); }
.ring .fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring .lbl b { font-size: 32px; font-weight: 600; letter-spacing: -.05em; }
.ring .lbl p { margin: 0; color: var(--muted); font-size: 13.5px; }
.tlist { display: flex; flex-direction: column; gap: 6px; }
.trow { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--border); cursor: pointer; transition: border-color .15s, background .15s; }
.trow:hover { background: var(--panel); }
.trow .tt { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sdot.offen { background: var(--dim); } .sdot.arbeit { background: var(--blue); } .sdot.fertig { background: var(--ok); }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: flex; gap: 11px; padding: 9px 0; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.feed li:last-child { border: 0; }
.feed .when { color: var(--dim); font-size: 12px; white-space: nowrap; margin-left: auto; padding-left: 8px; }
.qlinks { display: flex; flex-direction: column; gap: 6px; }

/* ── Aufgaben (Board) ──────────────────────────── */
.board-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.board-tools .input { width: 220px; height: 36px; }
.filter { display: flex; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 3px; }
.filter button { border: 0; background: none; height: 28px; padding: 0 11px; border-radius: 5px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 13px; }
.filter button.on { background: var(--hover); color: var(--text); }
.board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; min-height: 200px; transition: border-color .2s, background .2s; }
.col.over { border-color: var(--dim); background: var(--panel); }
.col-head { display: flex; align-items: center; gap: 9px; padding: 4px 6px 12px; font-weight: 600; font-size: 14px; }
.col-head .count { color: var(--muted); font-weight: 500; font-size: 12px; background: var(--panel2); border: 1px solid var(--border); border-radius: 99px; padding: 0 8px; line-height: 20px; }
.col-head .btn { margin-left: auto; }
.col-body { display: flex; flex-direction: column; gap: 9px; min-height: 60px; flex: 1; }
.task {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 13px; cursor: grab;
  transition: border-color .15s, opacity .2s; position: relative; user-select: none; touch-action: pan-y;
}
.task:hover { border-color: var(--dim); }
.task.dragging { opacity: .35; }
.task.ghost { position: fixed; z-index: 100; pointer-events: none; transform: rotate(1.5deg); cursor: grabbing; border-color: var(--muted); }
.task .tt { font-weight: 500; font-size: 14px; line-height: 1.35; word-break: break-word; }
.task .ds { color: var(--muted); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task .meta { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.task .meta .avatar { margin-left: auto; }
.task.done .tt { color: var(--muted); text-decoration: line-through; text-decoration-color: oklch(1 0 0 / .3); }
.task .mv { position: absolute; right: 8px; top: 8px; display: flex; gap: 3px; opacity: 0; transition: opacity .15s; }
.task:hover .mv, .task:focus-within .mv { opacity: 1; }
.task .mv button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); display: grid; place-items: center; cursor: pointer; color: var(--muted); padding: 0; }
.task .mv button:hover { color: var(--text); background: var(--hover); }
.task .mv .ic { width: 14px; height: 14px; }
.drop-mark { height: 2px; border-radius: 2px; background: #fff; margin: -5px 0; }
.add-inline { display: flex; gap: 6px; margin-top: 9px; }
.add-inline .input { height: 36px; }
.add-btn { margin-top: 9px; display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 8px 10px; border-radius: var(--r); cursor: pointer; border: 1px dashed transparent; background: none; font-weight: 500; font-size: 13.5px; width: 100%; }
.add-btn:hover { color: var(--text); border-color: var(--border); }

/* ── Groupwriter ───────────────────────────────── */
.writer { display: grid; grid-template-columns: 230px 1fr; height: 100%; min-height: 0; }
.doclist { border-right: 1px solid var(--border); padding: 16px 10px; overflow: auto; display: flex; flex-direction: column; gap: 3px; }
.doclist .nav-item { padding: 8px 10px; }
.doclist .nav-item .ic { color: var(--muted); }
.doc-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.doc-bar { display: flex; align-items: center; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.doc-bar .sep { width: 1px; height: 22px; background: var(--border2); margin: 0 4px; }
.doc-bar .state { margin-left: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.doc-bar .state .dotc { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 5px; }
.doc-bar .state.saving .dotc { background: var(--warn); }
.doc-bar .state.off .dotc { background: var(--bad); }
.doc-scroll { flex: 1; overflow: auto; }
.doc-page { max-width: 780px; margin: 0 auto; padding: 28px 30px 80px; }
.doc-title { width: 100%; border: 0; background: none; font-size: 32px; font-weight: 650; letter-spacing: -.045em; outline: none; padding: 0; margin-bottom: 8px; }
.doc-meta { color: var(--dim); font-size: 12.5px; margin-bottom: 18px; }
.doc-text {
  width: 100%; border: 0; outline: none; background: none; resize: none; min-height: 60vh;
  font: 16px/1.75 Geist, system-ui, sans-serif; color: oklch(0.9 0 0); padding: 0; overflow: hidden; tab-size: 4;
}
.doc-preview { font-size: 16px; line-height: 1.75; color: oklch(0.9 0 0); }
.doc-preview h1, .doc-preview h2, .doc-preview h3 { font-weight: 600; letter-spacing: -.035em; color: #fff; line-height: 1.25; margin: 1.2em 0 .5em; }
.doc-preview h1 { font-size: 26px; } .doc-preview h2 { font-size: 21px; } .doc-preview h3 { font-size: 17px; }
.doc-preview ul { padding-left: 1.3em; }
.doc-preview li.todo { list-style: none; margin-left: -1.3em; display: flex; gap: 8px; align-items: baseline; }
.doc-preview li.todo i { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--border2); display: inline-grid; place-items: center; flex: none; transform: translateY(2px); font-style: normal; }
.doc-preview li.todo.on i { background: #fff; border-color: #fff; }
.doc-preview li.todo.on { color: var(--muted); text-decoration: line-through; }
.doc-preview code { font-family: "Geist Mono", monospace; background: var(--panel2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.doc-preview blockquote { border-left: 2px solid var(--border2); margin: 0; padding: 2px 0 2px 16px; color: var(--muted); }
.doc-images { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 16px; }
.doc-images button { width: 64px; height: 64px; padding: 0; border-radius: var(--r); border: 1px solid var(--border); background: var(--bg2); overflow: hidden; cursor: pointer; transition: border-color .15s; }
.doc-images button:hover { border-color: var(--muted); }
.doc-images img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-text.drop { outline: 1px dashed var(--muted); outline-offset: 8px; border-radius: 4px; }
.doc-img { margin: .4em 0 1em; }
.doc-img img { display: block; max-width: 100%; max-height: 70vh; border-radius: var(--r); border: 1px solid var(--border); cursor: zoom-in; }
.doc-preview img.inline-img { display: inline-block; max-height: 1.6em; vertical-align: middle; border-radius: 4px; cursor: zoom-in; }
.doc-img figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.writers { display: flex; gap: 6px; align-items: center; }

/* ── Mindmap ───────────────────────────────────── */
.mind-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; background-color: var(--bg); background-image: radial-gradient(oklch(1 0 0 / .1) 1px, transparent 1px); background-size: 24px 24px; cursor: grab; touch-action: none; }
.mind-wrap.panning { cursor: grabbing; }
.mind-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mind-world svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.mind-world path { fill: none; stroke-width: 1.5; stroke-linecap: round; opacity: .7; }
.node {
  position: absolute; transform: translate(-50%, -50%); padding: 8px 14px; border-radius: var(--r); background: var(--bg2);
  border: 1px solid color-mix(in srgb, var(--c) 55%, #333); white-space: pre-wrap; width: max-content; max-width: 240px; text-align: center;
  font-weight: 500; font-size: 14px; cursor: pointer; user-select: none; line-height: 1.35; min-width: 40px; word-break: break-word;
}
.node.root { background: #fff; color: #000; font-size: 16px; font-weight: 600; padding: 12px 20px; border-color: #fff; letter-spacing: -.025em; }
.node.sel { outline: 2px solid #fff; outline-offset: 3px; }
.node.drag { cursor: grabbing; z-index: 5; }
.node .ed { background: none; border: 0; outline: none; color: inherit; font: inherit; text-align: center; width: 100%; resize: none; padding: 0; overflow: hidden; line-height: 1.35; }
.node .by { position: absolute; top: -9px; right: -9px; }
.mind-tools { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;  z-index: 10; align-items: center; }
.mind-tools .sep { width: 1px; height: 24px; background: var(--border2); margin: 0 4px; }
.mind-tools .swatch { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; margin: 0 1px; cursor: pointer; padding: 0; }
.mind-tools .swatch.on { border-color: #fff; }
.mind-hint { position: absolute; left: 18px; top: 14px; font-size: 12.5px; color: var(--dim); z-index: 5; pointer-events: none; }
.mind-zoom { position: absolute; right: 16px; top: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 10; }

/* ── Links ─────────────────────────────────────── */
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.lcard { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 15px; display: flex; flex-direction: column; gap: 8px; transition: border-color .15s; }
.lcard:hover { border-color: var(--dim); }
.lcard .top { display: flex; gap: 12px; align-items: flex-start; }
.lcard .fav { width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; font-weight: 600; color: var(--text); background: var(--panel2) !important; border: 1px solid var(--border); flex: none; font-size: 15px; }
.lcard a.t { color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -.02em; font-size: 15px; display: block; word-break: break-word; }
.lcard a.t:hover { text-decoration: underline; text-underline-offset: 3px; }
.lcard .host { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.lcard .note { font-size: 13.5px; color: oklch(0.85 0 0); white-space: pre-wrap; }
.lcard .foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); margin-top: auto; padding-top: 4px; }
.lcard .foot .acts { margin-left: auto; display: flex; gap: 2px; }

/* ── Team ──────────────────────────────────────── */
.team { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; max-width: 1100px; align-items: start; }
.team .card { padding: 20px; }
.mrow { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.mrow:last-child { border: 0; }
.mrow .nm { flex: 1; min-width: 0; }
.mrow .nm b { display: block; font-size: 14.5px; }
.mrow .nm small { color: var(--muted); }
.mrow .crown { color: var(--muted); }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel2); border: 1px solid var(--border); border-radius: var(--r); padding: 5px; z-index: 20; }
.suggest-list button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 7px 8px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; }
.suggest-list button:hover, .suggest-list button.on { background: var(--hover); }
.code-box { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 6px 6px 6px 14px; font-family: "Geist Mono", ui-monospace, monospace; font-size: 15px; letter-spacing: .06em; }
.code-box span { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* ── Dialoge & Meldungen ───────────────────────── */
.modal-bg { position: fixed; inset: 0; background: oklch(0 0 0 / .75);  z-index: 200; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; animation: pop .18s var(--ease); }
.modal.wide { width: min(640px, 100%); }
@keyframes pop { from { opacity: 0; transform: scale(.98); } }
.modal h2 { margin: 0 0 18px; font-size: 18px; font-weight: 600; letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.modal .actions .left { margin-right: auto; }
.status-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.status-pick button { height: 36px; border-radius: var(--r); border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-weight: 500; font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); }
.status-pick button.on { color: var(--text); border-color: var(--muted); background: var(--panel2); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; }
.colors button.on { outline-color: #fff; }

#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 300; align-items: center; pointer-events: none; }
.toast { background: var(--panel2); border: 1px solid var(--border); padding: 10px 16px; border-radius: var(--r); font-size: 14px; font-weight: 500; animation: toastIn .25s var(--ease); display: flex; gap: 9px; align-items: center; }
.toast.bad { border-color: oklch(0.69 0.2 23.91 / .45); }
.toast.bad .ic { color: var(--bad); }
.toast .ic { color: var(--ok); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } }

.scrim { display: none; }

/* ── Mobil ─────────────────────────────────────── */
@media (max-width: 1000px) {
  .ov, .team { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(3, minmax(270px, 82vw)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .col { scroll-snap-align: start; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 150; transform: translateX(-105%); transition: transform .35s var(--ease); }
  .shell.nav-open .side { transform: none; border-right: 1px solid var(--border); }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: oklch(0 0 0 / .6); z-index: 140; }
  .topbar { padding: 12px 14px 0; gap: 10px; }
  .topbar .burger { display: inline-flex; }
  .topbar .avatars { display: none; }
  .p-title .pdot { width: 34px; height: 34px; font-size: 15px; }
  .p-title h1 { font-size: 18px; }
  .tabs { padding: 8px 8px 0; }
  .tab { padding: 9px 10px 12px; }
  .tab .lbl-long { display: none; }
  .content { padding: 18px 14px 40px; }
  .writer { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .doclist { border-right: 0; border-bottom: 1px solid var(--border); flex-direction: row; overflow-x: auto; padding: 8px; }
  .doclist .nav-item { flex: none; }
  .doclist .side-sec { display: none; }
  .doc-page { padding: 20px 16px 60px; }
  .doc-title { font-size: 24px; }
  .auth-wrap { grid-template-columns: 1fr; gap: 26px; }
  .auth-hero h1 { margin-top: 14px; }
  .feats { display: none; }
  .stats .stat b { font-size: 22px; }
  .task .mv { opacity: 1; }
  .mind-hint { display: none; }
  .doc-bar #pv span { display: none; }
  .mind-tools { bottom: calc(14px + env(safe-area-inset-bottom)); max-width: calc(100% - 20px); overflow-x: auto; }
  .board-tools .input { width: 100%; }
  .board-tools { width: 100%; }
}
