:root {
  --bg: #f3f4ef; --panel: #fcfdf9; --text: #1c2119; --muted: #626b5c; --line: #dde1d5;
  --accent: #2f6b4f; --accent-fg: #ffffff; --hover: #e9ece2; --danger: #c2372b;
  --p1: #6aa8e8; --p2: #f2c84b; --p3: #f08a3c; --p4: #e2483d;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141713; --panel: #1c201b; --text: #e5e9df; --muted: #9aa392; --line: #2d3329;
    --accent: #7cc49d; --accent-fg: #10140f; --hover: #252a23; --danger: #f07368; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; width: min(360px, 100%); display: grid; gap: 12px; }
.card h1 { margin: 0 0 4px; font-size: 22px; }
.card label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, textarea { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.err { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 13px; }

header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand h1 { font-size: 18px; margin: 0; }
#areaSel { padding: 5px 8px; font-weight: 600; }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tab { border: 0; background: none; padding: 6px 11px; border-radius: 8px; cursor: pointer; color: var(--muted); font-weight: 500; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--hover); color: var(--text); font-weight: 600; }
.tab .count { font-size: 12px; opacity: .7; margin-left: 5px; }
.spacer { flex: 1; }
.iconbtn, .ghost, .mini { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.iconbtn:hover, .ghost:hover, .mini:hover { background: var(--hover); }
.primary { background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 10px; padding: 9px 16px; cursor: pointer; font-weight: 600; }
.danger { background: none; border: 1px solid var(--danger); color: var(--danger); border-radius: 10px; padding: 8px 14px; cursor: pointer; margin-right: auto; }

.wrap { max-width: 860px; margin: 0 auto; padding: 22px 16px 80px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick input[name=title] { flex: 1 1 260px; min-width: 0; padding: 11px 14px; border-radius: 10px; background: var(--panel); }
.quick select, .quick input[type=date] { background: var(--panel); }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 20px; }

.group { margin-bottom: 24px; }
.group h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--pc); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.item:hover { background: var(--hover); }
.item.closed .title { text-decoration: line-through; color: var(--muted); }
.item.urgent { border-color: var(--danger); border-left-color: var(--pc); }
.check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--muted); background: none; cursor: pointer; flex-shrink: 0; padding: 0; }
.check:hover { border-color: var(--accent); }
.item.closed .check { background: var(--accent); border-color: var(--accent); }
.title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; font-size: 12px; color: var(--muted); }
.chip { padding: 1px 8px; border-radius: 99px; background: var(--hover); white-space: nowrap; }
.chip.over, .chip.urgent { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); font-weight: 600; }
.chip.soon { background: color-mix(in srgb, #e8a317 22%, transparent); color: var(--text); font-weight: 600; }
.empty { color: var(--muted); text-align: center; padding: 34px; border: 1px dashed var(--line); border-radius: 12px; }

.project { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.project-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.project-head h3 { margin: 0; font-size: 17px; flex: 1; }
.project .item { background: var(--bg); }
.bar { height: 6px; background: var(--hover); border-radius: 99px; margin: 10px 0 12px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); }
.addsub { display: flex; gap: 6px; margin-top: 6px; }
.addsub input { flex: 1; min-width: 0; border-style: dashed; background: transparent; }

dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); padding: 20px; width: min(520px, calc(100vw - 32px)); }
dialog.wide { width: min(680px, calc(100vw - 32px)); }
dialog::backdrop { background: #0007; }
dialog h2 { margin: 0 0 14px; font-size: 20px; }
dialog h3 { margin: 22px 0 8px; font-size: 15px; }
.field { display: grid; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea { color: var(--text); font-size: 15px; }
.check-label { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 12px; align-self: end; padding-bottom: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.cfgrow { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cfgrow input { flex: 1 1 160px; min-width: 0; }
.status { font-size: 13px; color: var(--accent); margin: 6px 0 0; min-height: 1.2em; }
.status.err { color: var(--danger); }
.aiout { background: var(--bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; }

.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 30; }
.toast { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 9px 12px; box-shadow: 0 6px 20px #0003; display: flex; gap: 12px; align-items: center; }
.toast.err { border-left-color: var(--danger); }

/* Termine */
.row3 { display: grid; grid-template-columns: auto 1fr 1fr; gap: 10px; align-items: end; }
fieldset.repeat { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 2px; margin: 0 0 12px; }
fieldset.repeat legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.inline { display: flex; align-items: center; gap: 8px; color: var(--text); }
.inline input { width: 80px; }
.weekdays { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.weekdays label { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 13px; cursor: pointer; }
.weekdays input:checked + span { font-weight: 700; color: var(--accent); }
.ev { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--ec); border-radius: 10px; margin-bottom: 6px; cursor: pointer; --ec: var(--accent); }
.ev.meeting { --ec: #7a5cc7; }
.ev:hover { background: var(--hover); }
.ev .time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 88px; }
.ev.cancelled .title { text-decoration: line-through; color: var(--muted); }
.calnav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.calnav h2 { margin: 0 8px 0 0; font-size: 18px; flex: 1; min-width: 160px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: 6px 10px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--hover); font-weight: 600; }
.week { display: grid; gap: 10px; }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.day-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.day .ev { background: var(--bg); }
.addev { border: 1px dashed var(--line); background: none; border-radius: 8px; padding: 2px 8px; cursor: pointer; color: var(--muted); font-size: 13px; }
.addev:hover { color: var(--text); border-color: var(--muted); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month .wd { font-size: 12px; color: var(--muted); text-align: center; padding-bottom: 4px; }
.mcell { min-height: 92px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px; cursor: pointer; overflow: hidden; }
.mcell.other { opacity: .45; }
.mcell.today { border-color: var(--accent); }
.mcell .num { font-size: 12px; font-weight: 600; }
.mev { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--ec); padding-left: 4px; margin-top: 2px; --ec: var(--accent); }
.mev.meeting { --ec: #7a5cc7; }
.mmore { font-size: 11px; color: var(--muted); }
.occ-meta { color: var(--muted); font-size: 14px; margin: -8px 0 14px; }
.occ-section { margin-top: 16px; }
.occ-section h3 { margin: 0 0 6px; font-size: 14px; }
.occ-section textarea { width: 100%; }
.task-mini { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-size: 14px; }
.task-mini.closed span { text-decoration: line-through; color: var(--muted); }
details.prev { background: var(--bg); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
details.prev pre { white-space: pre-wrap; font: inherit; margin: 6px 0 0; }
@media (min-width: 900px) { .week { grid-template-columns: repeat(7, minmax(0, 1fr)); } .week .ev { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 8px; font-size: 13px; } .week .ev .time { min-width: 0; font-size: 12px; } .week .ev .title { overflow-wrap: normal; hyphens: auto; } .week .ev .meta { justify-content: flex-start; } }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } .spacer { display: none; } .mcell { min-height: 56px; } .mev { font-size: 10px; } }

/* Eingang (Brain-Dump) */
.dumpbox { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 22px; }
.dumpbox textarea { width: 100%; border: 0; background: transparent; resize: vertical; padding: 6px; font-size: 16px; }
.dumpbox textarea:focus-visible { outline: none; }
.dumpbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.dumpbar .hint { margin: 0; }
.dump { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.dump.ready { border-color: var(--accent); }
.dump-head { display: flex; gap: 10px; align-items: flex-start; }
.dump-text { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 14px; max-height: 7.5em; overflow: auto; }
.iconbtn.small { padding: 2px 8px; font-size: 13px; }
.hint.small { font-size: 12px; margin: 4px 0 8px; }
.dstate { margin: 10px 0 4px; font-size: 14px; }
.dstate.err { color: var(--danger); }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
.sug { background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--sc, var(--accent)); border-radius: 10px; padding: 8px 10px; margin-top: 8px; display: grid; gap: 6px; }
.sug-task { --sc: var(--p2); } .sug-project { --sc: var(--p3); } .sug-event { --sc: #7a5cc7; } .sug-note { --sc: var(--p1); }
.sug-head { display: flex; gap: 6px; }
.sug-head select { flex: 0 0 auto; }
.sug-head input { flex: 1; min-width: 0; font-weight: 600; }
.sug-extra { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); align-items: center; }
.sug-extra:empty { display: none; }
.sug-extra label { display: flex; gap: 5px; align-items: center; }
.sug-extra input, .sug-extra select { padding: 4px 6px; color: var(--text); }
.sug input.missing { border-color: var(--danger); }
.sug textarea { width: 100%; resize: vertical; font-size: 14px; }
.sug-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.sug-actions .hint { margin: 0 auto 0 0; }
.sug.done { display: block; font-size: 14px; color: var(--muted); border-left-color: var(--accent); }
.sug.done.rejected { text-decoration: line-through; border-left-color: var(--line); }
.questions { margin-top: 12px; padding: 10px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
.questions p { margin: 0; } .questions ul { margin: 4px 0 8px; padding-left: 20px; }
.questions textarea { width: 100%; }
.donedumps { margin-top: 10px; color: var(--muted); font-size: 14px; }
.donedumps summary { cursor: pointer; }
.donedump { border-top: 1px solid var(--line); padding: 6px 0; }
.donedump p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Notizen */
.notebar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.notebar input { flex: 1 1 220px; min-width: 0; padding: 10px 14px; border-radius: 10px; background: var(--panel); }
.note { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--p1); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.note:hover { background: var(--hover); }
.note h3 { margin: 0 0 4px; font-size: 15px; }
.note p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.sug { grid-template-columns: minmax(0, 1fr); }
.sug-extra .inline input { width: auto; }
.sug-extra input[type=date], .sug-extra input[type=time] { min-width: 0; }
.proposed { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--hover); color: var(--muted); }
.unsure { margin: 0; font-size: 12px; color: var(--danger); }

/* Assistent: Morgenrunde und Chat */
.briefing { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 22px; }
.briefing h2 { margin: 0 0 4px; font-size: 22px; }
.brief-sum { margin: 0 0 14px; color: var(--muted); }
.briefing .group { margin-bottom: 14px; }
.briefing h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.brief-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--pc, var(--accent)); border-radius: 10px; margin-bottom: 6px; }
.brief-item .title { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.brief-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.brief-actions .mini { padding: 3px 8px; font-size: 13px; }
.brief-item.done { color: var(--muted); border-left-color: var(--accent); display: block; }
.chat-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.chatlog { display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; margin-bottom: 10px; }
.msg { padding: 9px 12px; border-radius: 12px; max-width: 88%; overflow-wrap: anywhere; line-height: 1.5; }
.msg.user { background: var(--accent); color: var(--accent-fg); justify-self: end; border-bottom-right-radius: 4px; }
.msg.assistant { background: var(--panel); border: 1px solid var(--line); justify-self: start; border-bottom-left-radius: 4px; }
.msg.thinking { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chatform { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.chatform textarea { width: 100%; border: 0; background: transparent; resize: vertical; font-size: 16px; padding: 6px; }
.chatform textarea:focus-visible { outline: none; }

/* Wissen */
#topicChips:empty { display: none; }
#topicChips { margin-bottom: 14px; }
#topicChips .mini[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.note h3 .chip { font-size: 12px; font-weight: 500; vertical-align: 1px; }
.chip.meaning { background: color-mix(in srgb, var(--p1) 22%, transparent); }

/* Gedanken */
.item.thought { border-left-color: #9c8fd6; }
.item.thought.warning { border-style: dashed; border-left-style: solid; }
.item.thought .meta .mini { padding: 2px 8px; font-size: 12px; }
.bubble { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; background: radial-gradient(circle at 35% 30%, #fff 0 18%, #d9d2f5 22% 100%); border: 2px solid #9c8fd6; }
.bubble.burst { background: none; border-style: dotted; }
.item.thought.closed .title { text-decoration: line-through; color: var(--muted); }

/* Garten */
svg.wilted { filter: saturate(.35); transform: rotate(8deg); }
svg.wobble { animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.06, .94); } }
@media (prefers-reduced-motion: reduce) { svg.wobble { animation: none; } }
.item.thought { flex-wrap: wrap; }
.item.thought .title { flex: 1 1 140px; }
@media (max-width: 640px) { .item.thought .meta { flex-basis: 100%; justify-content: flex-start; padding-left: 28px; } }

/* Netz (Garten und Wissen) */
.wrap.wide { max-width: 1320px; }
.garden { display: grid; grid-template-columns: 1fr 190px; gap: 14px; align-items: start; }
.garden-net { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; touch-action: none;
  background: var(--panel) radial-gradient(circle, color-mix(in srgb, var(--text) 13%, transparent) 1px, transparent 1.4px) 0 0 / 22px 22px; }
.net-svg { display: block; width: 100%; user-select: none; -webkit-user-select: none; cursor: grab; }
.net-svg:active { cursor: grabbing; }
.net-node { cursor: pointer; }
.net-node:focus { outline: none; }
.net-node:focus-visible > :first-of-type, .net-node:hover > :first-of-type { filter: brightness(1.06) drop-shadow(0 2px 4px rgb(0 0 0 / .25)); }
.net-node.dragging { opacity: .85; cursor: grabbing; }
.net-node.done { opacity: .45; }
.net-node.drop-target > :first-of-type, .net-hull.drop-target { stroke: var(--accent); stroke-width: 4; stroke-dasharray: none; }
.net-label { text-anchor: middle; font-weight: 600; pointer-events: none; }
.net-label.below { fill: var(--text); font-weight: 500; paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.net-badge { text-anchor: middle; font-size: 11px; font-weight: 800; fill: #fff; pointer-events: none; }
.net-hull { fill: color-mix(in srgb, var(--text) 3%, transparent); stroke-width: 1.6; stroke-dasharray: 7 6; }
.net-tether { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 2 4; }
.net-edge { stroke: color-mix(in srgb, var(--accent) 55%, var(--muted)); stroke-width: 1.8; }
.net-elabel { text-anchor: middle; font-size: 10.5px; fill: var(--muted); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.net-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; }
.net-zoom button { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; cursor: pointer; font-size: 16px; line-height: 1; }
.net-zoom button:hover { background: var(--hover); }
.fstrip { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; gap: 4px; position: sticky; top: 70px; }
.fstrip h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 8px 0 2px; }
.fstrip h3:first-child { margin-top: 0; }
.ftog { display: flex; align-items: center; gap: 8px; border: 1px solid transparent; background: none; border-radius: 8px; padding: 5px 8px; cursor: pointer; text-align: left; }
.ftog:hover { background: var(--hover); }
.ftog[aria-pressed="true"] { border-color: var(--line); background: var(--bg); }
.ftog[aria-pressed="false"] { opacity: .45; text-decoration: line-through; }
.ftog .fcount { margin-left: auto; font-size: 12px; color: var(--muted); }
.fsw { width: 14px; height: 14px; fill: #b7c4ae; stroke: var(--muted); }
.fdot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.seg { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 9px; padding: 2px; background: var(--panel); }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 7px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.seg.small { padding-left: 8px; font-size: 13px; color: var(--muted); }
.seg.small button { padding: 3px 9px; }
.netbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.netbar .chips, .netbar .hint { flex-basis: 100%; margin: 0; }
.note-links { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.note-links h3 { font-size: 13px; margin: 0 0 6px; color: var(--muted); }
.link-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.link-row > span:first-child { flex: 1; overflow-wrap: anywhere; }
.link-add { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.link-add select { flex: 2 1 180px; min-width: 0; }
.link-add input { flex: 1 1 120px; min-width: 0; }
@media (max-width: 760px) {
  .garden { grid-template-columns: 1fr; }
  .fstrip { position: static; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); order: -1; padding: 8px; }
  .fstrip h3, .fstrip .hint, .fstrip .mini { grid-column: 1 / -1; }
  .fstrip h3 { margin: 4px 0 0; }
  .ftog { padding: 4px 6px; font-size: 13px; gap: 6px; }
}

/* Navigation: fünf Hauptpunkte, Eingabeleiste, auf dem Handy unten */
header { flex-wrap: nowrap; gap: 14px; }
.tab { display: inline-flex; align-items: center; }
.cfgbtn { position: relative; font-size: 18px; line-height: 1; padding: 6px 9px; }
.gpudot { width: 9px; height: 9px; border-radius: 50%; background: #3fa36b; display: inline-block; flex: none; }
.gpudot.down { background: #d93a2b; }
.cfgbtn .gpudot { position: absolute; right: 3px; top: 3px; border: 1.5px solid var(--panel); }
.gpudot.inline { margin-right: 4px; vertical-align: 1px; }
.topbar { position: sticky; top: 0; z-index: 5; }
.topbar header { position: static; }
.askbar { background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px; }
.askform { max-width: 1320px; margin: 0 auto; display: flex; gap: 8px; align-items: flex-end; }
.askform .caprow { flex: 1; min-width: 0; position: relative; }
.askform #askInput { width: 100%; box-sizing: border-box; padding: 10px 46px 10px 14px; border-radius: 12px; background: var(--panel); font-size: 16px; line-height: 1.4; min-height: 42px; }
.askform textarea { flex: 1; min-width: 0; resize: none; padding: 10px 14px; border-radius: 12px; background: var(--panel); font-size: 16px; line-height: 1.4; max-height: 220px; }
.askform .primary, .askform .ghost, .askform .mini { white-space: nowrap; min-height: 42px; }
.inboxbtn { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.inboxbtn.active { background: var(--accent); color: var(--accent-fg); }
.askpanel { max-width: 1320px; margin: 10px auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.askpanel .chatlog { max-height: 45vh; }
.askpanel-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.askpanel-bar .chips { margin: 0 auto 0 0; }
.msg.gpu-away { border-color: #e8a317; max-width: 100%; }
.subnav { margin-bottom: 16px; flex-wrap: wrap; }
.subnav .count { font-size: 12px; opacity: .75; }
.viewtitle { font-size: 18px; margin: 0 0 12px; }
.radios { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; display: grid; gap: 4px; }
.radios legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.radios label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.bottomnav { display: none; }
@media (max-width: 760px) {
  .topbar { position: static; }
  header { padding: 8px 12px; }
  header .tabs { display: none; }
  header .spacer { display: block; }
  .brand h1 { font-size: 16px; }
  .askbar { padding: 8px 12px; }
  .askform { flex-wrap: wrap; }
  .askform .caprow { flex-basis: 100%; }
  .askform .primary, .askform .ghost, .askform .mini { min-height: 38px; flex: 1; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--panel); border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .navbtn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; border: 0; background: none; padding: 5px 2px; border-radius: 10px; color: var(--muted); font-size: 11px; position: relative; cursor: pointer; }
  .navbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .navbtn.active { color: var(--accent); font-weight: 600; }
  .navbtn .count { position: absolute; top: 1px; left: calc(50% + 6px); background: var(--accent); color: var(--accent-fg); border-radius: 9px; font-size: 10px; padding: 0 5px; line-height: 16px; }
  .wrap { padding-bottom: 96px; }
  .toasts { bottom: 76px; }
}

/* Aufgaben im Kalender: gestrichelt statt Zeitblock, mit Kästchen */
.ctask { display: flex; gap: 8px; align-items: center; padding: 5px 10px; border: 1px dashed var(--line); border-left: 4px solid var(--pc); border-radius: 10px; margin-bottom: 6px; cursor: pointer; font-size: 14px; background: transparent; }
.ctask:hover { background: var(--hover); }
.ctask .check { width: 16px; height: 16px; flex: none; }
.ctask.done span { text-decoration: line-through; color: var(--muted); }
.ctask.over span { color: var(--danger); }
.mev.task { border-left-style: dotted; }
.mev.task.done { text-decoration: line-through; opacity: .6; }
.calnav .seg { flex-wrap: wrap; }
.askhint { max-width: 1320px; margin: 6px auto 0; font-size: 13px; color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0 4px; font-size: inherit; }
.inboxbtn { display: inline-flex; align-items: center; gap: 4px; }
.inboxbtn.ready:not(.active) { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.inboxbtn .spin { width: 12px; height: 12px; }

/* Mitschrift */
dialog.minutes-dlg { width: min(820px, calc(100vw - 24px)); }
.min-head { display: flex; gap: 8px; flex-wrap: wrap; }
.min-head #minTitle { flex: 2 1 260px; font-size: 18px; font-weight: 600; }
.min-head #minEvent { flex: 1 1 200px; }
#minBody { width: 100%; box-sizing: border-box; font: 15px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; tab-size: 2; min-height: 45vh; resize: vertical; }
.min-diff { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; max-height: 60vh; overflow: auto; background: var(--panel); }
.min-diff .diff-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.min-diff .diff-head .diff-sum { flex: 1 1 260px; margin: 0; }
.min-diff .dorder { display: flex; gap: 6px; align-items: center; font-size: 14px; margin: 0 0 6px; }
.min-diff .drow { display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: start; padding: 3px 4px; font-size: 14px; line-height: 1.5; border-radius: 6px; border-left: 3px solid transparent; }
.min-diff .drow.side { grid-template-columns: 22px 1fr 1fr; }
.min-diff .drow:not(.same):not(.dhead) { border-left-color: var(--accent); cursor: pointer; }
.min-diff .drow + .drow { border-top: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.min-diff .drow.dhead { font-weight: 600; color: var(--muted); font-size: 13px; }
.min-diff .dbox { margin: 4px 0 0; }
.min-diff .drow > div { min-width: 0; overflow-wrap: anywhere; }
.min-diff del { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); text-decoration: line-through; border-radius: 3px; padding: 0 2px; }
.min-diff ins { color: var(--ok-fg); background: color-mix(in srgb, #2e9d57 16%, transparent); text-decoration: none; border-radius: 3px; padding: 0 2px; }
.min-diff ins.case { background: none; color: inherit; padding: 0; text-decoration: underline 2px color-mix(in srgb, #2e9d57 70%, transparent); text-underline-offset: 3px; }
.min-diff .drow.off ins.case { text-decoration: none; }
.min-diff .dnew { color: var(--ok-fg); }
.min-diff .drow:not(.side) .dnew { background: color-mix(in srgb, #2e9d57 10%, transparent); border-radius: 4px; }
.min-diff .drow.side:not(.same) .dold:not(:empty) { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); border-radius: 4px; }
.min-diff .drow.side:not(.same) .dnew:not(:empty) { background: color-mix(in srgb, #2e9d57 10%, transparent); border-radius: 4px; }
.min-diff .drow.same .dnew, .min-diff .drow.same .dold { color: inherit; background: none; }
.min-diff .dnum { display: inline-block; min-width: 1.6em; margin-left: -1.6em; margin-right: 2px; color: var(--muted); font-size: 11.5px; text-align: right; font-variant-numeric: tabular-nums; }
.min-diff .drow.side .dold > div, .min-diff .drow.side .dnew > div { margin-left: 1.6em; }
.min-diff .drow.moved .dnum { color: var(--accent); font-weight: 700; }
.min-diff .drow.spell { border-left-color: color-mix(in srgb, var(--accent) 35%, transparent) !important; }
.min-diff .drow.side.spell .dold:not(:empty), .min-diff .drow.side.spell .dnew:not(:empty) { background: none; color: inherit; }
.min-diff .drow.side.spell .dold:not(:empty) { color: var(--muted); }
.min-diff .dwas { margin-left: 6px; font-size: 12px; color: var(--muted); }
.min-diff .dtag.soft { background: none; padding: 0; font-style: italic; }
.min-diff .dfrom { font-size: 12.5px; color: var(--muted); padding-left: 8px; }
.min-diff .dtag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 9px; font-size: 11.5px; line-height: 1.6; background: var(--hover); color: var(--muted); vertical-align: 1px; max-width: 100%; }
.min-diff .drow.off { opacity: .45; }
.min-diff .drow.off del { text-decoration: none; }
.min-diff .drow.off ins { text-decoration: line-through; }
.min-diff { --ok-fg: #1e7a41; }
:root[data-theme="dark"] .min-diff { --ok-fg: #7fd69c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .min-diff { --ok-fg: #7fd69c; } }
.min-diff .diff-sum { margin: 0 0 8px; font-size: 14px; }
.note.minute { cursor: pointer; }
.note.minute.done { opacity: .6; }
.fsw .min { fill: #e9dcc0; stroke: #a8925f; }
.note.minute { border-left-color: #a8925f; }

/* Vorschläge aufeinanderziehen */
.sug { position: relative; }
.sug.sub { margin-left: 28px; }
.sug.sub::before { content: '↳'; position: absolute; left: -22px; top: 12px; color: var(--muted); font-size: 16px; }
.grip { flex: 0 0 auto; display: grid; place-items: center; width: 22px; cursor: grab; color: var(--muted); font-size: 18px; touch-action: none; user-select: none; border-radius: 6px; }
.grip:hover { background: var(--hover); color: var(--text); }
.sug.dragging { opacity: .45; }
.sug-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; background: var(--panel); border: 1px solid var(--accent); border-radius: 8px; padding: 6px 10px; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px #0003; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug.drop { outline: 2px dashed var(--accent); outline-offset: 2px; }
.dropzones { position: absolute; inset: 0; display: flex; gap: 6px; padding: 6px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 70%, transparent); pointer-events: none; }
.dropzones > div { flex: 1; display: grid; place-content: center; text-align: center; border: 2px dashed var(--line); border-radius: 8px; font-weight: 600; color: var(--muted); background: var(--panel); }
.dropzones > div small { font-weight: 400; font-size: 12px; }
.dropzones > div.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
body.nosel { user-select: none; -webkit-user-select: none; }
.sug.done.merged { color: var(--muted); }
.caltog { display: inline-flex; gap: 4px; }
.caltog .ftog { border-color: var(--line); padding: 5px 10px; font-size: 14px; }
.caltog .ftog[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 12%, var(--panel)); border-color: var(--accent); }
.caltog .ftog[aria-pressed="false"] { text-decoration: none; opacity: .6; }
.caltog .fdot.events { background: var(--accent); }
.caltog .fdot.tasks { border-radius: 3px; border: 2px dashed var(--muted); background: none; width: 10px; height: 10px; }

/* Schnell erfassen: Punkt rechts im Feld für Art und Priorität */
.capdot { position: absolute; right: 12px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--c); background: var(--c); cursor: pointer; padding: 0; }
.capdot.thought { background: transparent; }
.capdot.task { border-radius: 4px; }
.capdot.project { clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); border-radius: 0; }
.capdot.event { border-radius: 4px; background: transparent; box-shadow: inset 0 4px 0 var(--c); }
.capdot.fixed { outline: 2px solid var(--accent); outline-offset: 2px; }
.capmenu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px #0003; padding: 6px; display: grid; min-width: 240px; }
.capmenu > button, .capprios button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 9px; border-radius: 7px; text-align: left; cursor: pointer; font-size: 14px; }
.capmenu button:hover { background: var(--hover); }
.capmenu button[aria-pressed="true"] { font-weight: 600; background: var(--hover); }
.capmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; width: 100%; }
.capprios { display: flex; flex-wrap: wrap; gap: 2px; }
.askhint .proposed { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--hover); }
.askhint .urgent-t { color: var(--danger); }
.askhint .warn-t { color: var(--danger); }
.chatform { display: flex; gap: 8px; margin-bottom: 10px; }
.chatform input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 16px; }
#chatSlot .askpanel { margin: 0 0 16px; }
.duecfg { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.duecfg input { width: 70px; padding: 4px 6px; margin: 0 4px; }
