/* hellgraue Fläche, weiße Karten, Türkis als einzige Primärfarbe (Aktionen, Marke, Fokus) */
:root {
  --bg: #f6f7f9;
  --paper: #ffffff;
  --ink: #101418;
  --muted: #5d6570;
  --faint: #9ba2ac;
  --line: #e8eaee;
  --line-strong: #d6dae0;
  --accent: #0f8b8d;
  --accent-hover: #0b7476;
  --accent-soft: #e4f4f3;
  --brand: #14a3a0;
  --brand-soft: #e6f5f4;
  --brand-ink: #0b6e70;
  --mint: var(--brand-soft);
  --mint-ink: var(--accent);
  --today: color-mix(in srgb, var(--accent) 3.5%, var(--paper));
  --work: #0051c3;
  --private: #2e8540;
  --bday: #f6821f;
  --danger: #d1342b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px -2px rgba(16, 24, 40, .05);
  --shadow-pop: 0 2px 6px rgba(16, 24, 40, .06), 0 16px 40px -8px rgba(16, 24, 40, .18);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side-w: 232px;
  --mono: var(--sans);
  --sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 10px 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; text-decoration: none; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, #4fd1c5 0%, var(--brand) 55%, #0b7c7e 100%);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}
.switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.switch a { text-decoration: none; padding: 5px 14px; border-radius: 6px; font-weight: 500; color: var(--muted); }
.switch a:hover { color: var(--ink); }
.switch a.active { background: var(--paper); color: var(--accent); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pager { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 260px; }
.pager h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 0; white-space: nowrap; }
.pager h1 .kw {
  display: inline-block; vertical-align: 2px; font-size: 11px; font-weight: 600; color: var(--brand-ink);
  background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; margin-right: 10px; letter-spacing: .02em;
}
.seg { display: inline-flex; }
.seg > * { border-radius: 0; margin-left: -1px; }
.seg > :first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.seg > :last-child { border-radius: 0 6px 6px 0; }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sync-status { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.sync-status:not(:empty)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--private); }

.icon-btn, .ghost-btn, .primary-btn {
  border: 1px solid var(--line-strong); background: var(--paper); border-radius: 6px;
  cursor: pointer; padding: 6px 12px; line-height: 1.2; font-weight: 500; box-shadow: var(--shadow);
}
.icon-btn { width: 32px; height: 32px; padding: 0; font-size: 17px; display: inline-grid; place-items: center; flex: none; }
.seg .ghost-btn { height: 32px; }
.icon-btn:hover, .ghost-btn:hover { background: var(--bg); border-color: var(--faint); }
.primary-btn { background: var(--accent); color: #fff; border-color: var(--accent); }
.primary-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.file-btn { display: inline-block; }

/* ---------- shared blocks ---------- */
main { padding: 24px 28px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.label {
  font-size: 13px; font-weight: 600; letter-spacing: 0;
  color: var(--ink); display: flex; align-items: center; gap: 8px; justify-content: space-between;
}
.label .num {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 10px; font-weight: 700; letter-spacing: 0;
}
.label-left { display: inline-flex; align-items: center; gap: 8px; }
.sub { font-size: 12px; color: var(--faint); margin-top: -4px; }
textarea.field, input.field {
  width: 100%; border: 0; background: transparent; resize: vertical; outline: none; padding: 0;
  min-height: 1.45em;
}
textarea.field { min-height: 72px; }
textarea.field.tall { min-height: 130px; }
.field::placeholder { color: var(--faint); }
.hl { background: linear-gradient(transparent 55%, var(--brand-soft) 55%); }

/* ---------- lists (focus, todos, freiraum) ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-height: 8px; }
/* One control for every entry (to-dos, focus, freiraum): all parts centred, same padding on all sides,
   colour + ✕ always at the end */
.item {
  --ip: 6px;
  display: flex; align-items: center; gap: var(--ip); padding: var(--ip); margin: 0; border-radius: 6px;
  font-size: 13px; line-height: 1.3;
}
.item:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.item input[type=checkbox] { margin: 0; width: 14px; height: 14px; accent-color: var(--mint-ink); flex: none; }
.item .txt { flex: 1; min-width: 0; overflow-wrap: break-word; outline: none; }
.item.done .txt { text-decoration: line-through; color: var(--faint); }
.item .x { opacity: 0; border: 0; background: none; cursor: pointer; color: var(--faint); padding: 0; width: 14px; height: 14px; line-height: 14px; font-size: 11px; flex: none; text-align: center; }
.item .x:hover { color: var(--danger); }
.item:hover .x, .item:focus-within .x { opacity: 1; }
.item[draggable=true] { cursor: grab; }
.item.dragging { opacity: .4; }
@media (hover: hover) {
}
@media (hover: none) { .item .x { opacity: 1; } }
.tag {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  border-radius: 999px; padding: 1px 7px; background: var(--accent-soft); color: var(--accent); flex: none;
}
.add { display: flex; align-items: center; gap: 6px; padding-top: 6px; min-height: 30px; }
.add input { flex: 1; border: 0; background: transparent; outline: none; min-width: 0; font-size: 12px; }
.add input::placeholder { color: color-mix(in srgb, var(--faint) 70%, var(--paper)); }
.add select { border: 1px solid var(--line); border-radius: 6px; background: var(--paper); font-size: 12px; }
.drop-hover { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 6px; background: var(--today); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: 12px; text-decoration: underline; }

/* ---------- week layout ---------- */

.week {
  display: grid;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr) minmax(220px, 260px);
  gap: 16px;
  align-items: start;
}
.side, .reflect { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.board { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.reflect .card { flex: 1; }
.reflect textarea.field.tall { min-height: 220px; }

.note-line {
  display: flex; align-items: center; gap: 12px; cursor: text;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px 14px;
}
.note-line .label { flex: none; color: var(--brand-ink); }
.note-line input { flex: 1; min-width: 0; }
.note-line:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.pane-tabs { display: none; }

.days {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.day { display: flex; flex-direction: column; border-left: 1px solid var(--line); min-width: 0; min-height: 520px; }
.day:first-child { border-left: 0; }
.day.today { background: var(--today); }
.day.weekend { background: color-mix(in srgb, var(--bg) 60%, var(--paper)); }
.day.today.weekend { background: var(--today); }
.day-head { padding: 12px 12px 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.day-head .dname { flex-basis: 100%; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day.today .dname { color: var(--brand-ink); }
.day-head .dnum { font-size: 22px; font-weight: 600; line-height: 1; }
.day.today .dnum { color: var(--brand-ink); }
.day.today { box-shadow: inset 0 3px 0 var(--brand); }
.day-head .dmon { font-size: 12px; color: var(--faint); }
.day-sec { padding: 8px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.day-sec .label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.day-focus textarea { min-height: 34px; font-weight: 500; }
.day-events { flex: none; }
.day-todos { flex: 1; }
.events { display: flex; flex-direction: column; gap: 4px; }
.ev {
  border-left: 3px solid var(--c, var(--private)); padding: 3px 6px; border-radius: 4px;
  background: color-mix(in srgb, var(--c, var(--private)) 9%, transparent); font-size: 12.5px;
  overflow-wrap: break-word;
}
.ev .t { font-family: var(--mono); font-size: 11px; color: var(--muted); display: block; }
.ev.allday { font-weight: 500; }
.ev.past { opacity: .55; }
.ev { position: relative; }
.ev.has-cat { --c: var(--cink); background: var(--cbg); }
.ev.live.has-cat:hover, .ev.live.has-cat:focus-visible { background: color-mix(in srgb, var(--cbg) 82%, var(--cink)); }
.ev .ev-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; opacity: 0; background: var(--paper); }
.ev .ev-dot.set { background: var(--cink); }
.ev:hover .ev-dot, .ev .ev-dot:focus-visible { opacity: 1; }
@media (hover: none) { .ev .ev-dot { opacity: 1; } }
.ev.live { cursor: pointer; }
.ev.live:hover, .ev.live:focus-visible { background: color-mix(in srgb, var(--c, var(--private)) 18%, transparent); outline: none; }
.add-ev {
  border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1;
  width: 20px; height: 20px; border-radius: 5px; padding: 0; font-family: var(--sans);
}
.add-ev:hover { background: var(--accent-soft); color: var(--accent); }
@media (hover: hover) {
  .add-ev { opacity: 0; }
  .day:hover .add-ev, .add-ev:focus-visible { opacity: 1; }
}
.empty { color: var(--faint); font-size: 12px; }
.cal-note { font-size: 12px; color: var(--faint); }
.cal-err { font-size: 12px; color: var(--danger); }


/* ---------- month layout ---------- */
.month { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.month-col { display: flex; flex-direction: column; gap: 16px; }
.month-col > h2 { margin: 0; font-size: 20px; font-weight: 600; }
.month-col > h2 small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vision { background: var(--brand-soft); border-color: #b5e2df; }
.vision .label { color: var(--brand-ink); }
.weeks-list { display: flex; flex-direction: column; gap: 10px; }
.wk-sum { border-top: 1px solid var(--line); padding-top: 8px; }
.wk-sum:first-child { border-top: 0; padding-top: 0; }
.wk-sum a { font-weight: 600; text-decoration: none; color: var(--accent); }
.wk-sum p { margin: 2px 0 0; white-space: pre-line; color: var(--muted); font-size: 13px; }
.wk-sum p b { color: var(--ink); font-weight: 500; }

/* ---------- dialog ---------- */
dialog {
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 0; background: var(--paper); color: var(--ink);
  width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
}
dialog::backdrop { background: rgba(20, 20, 20, .45); }
.dlg { padding: 20px 22px; display: flex; flex-direction: column; gap: 22px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; }
.dlg h2 { margin: 0; font-size: 18px; }
.dlg h3 { margin: 0 0 4px; font-size: 14px; }
.hint { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.howto { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.howto summary { cursor: pointer; color: var(--accent); }
.howto p { margin: 6px 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row input[type=password], .row input[type=text] { flex: 1; min-width: 180px; }
.dlg input[type=text], .dlg input[type=password], .dlg input[type=url], .dlg select {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--bg);
}
.feed-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.feed { display: grid; grid-template-columns: 1fr 150px 40px 32px; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.feed .url { grid-column: 1 / -1; }
.feed input[type=color] { width: 40px; height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--bg); }
.feed .status { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.howto[open] .feed-list { margin-top: 10px; }

.acct-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.acct { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.acct-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.acct .hint, .acct .cal-err { margin: 4px 0; }
.cal-row { display: grid; grid-template-columns: 1fr 130px 150px 40px; gap: 8px; align-items: center; }
.cal-row input[type=color] { width: 40px; height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--bg); }
.chk { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.chk input { accent-color: var(--mint-ink); flex: none; }
.cal-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.muted { background: var(--line); color: var(--muted); }
.login-btn { text-decoration: none; font-weight: 500; padding: 7px 12px; }
.spacer { flex: 1; }
.danger { color: var(--danger); }

/* ---------- event dialog ---------- */
.ev-dlg { width: min(480px, calc(100vw - 32px)); }
.ev-dlg .dlg { gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.fld input, .fld textarea, .fld select {
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 10px; background: var(--paper); width: 100%; min-width: 0;
}
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.fld textarea { resize: vertical; }
.fld-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
#evForm .allday { display: none; }
#evForm.is-allday .timed { display: none; }
#evForm.is-allday .allday { display: flex; }
#evForm.is-allday .fld-row { grid-template-columns: 1fr 1fr; }
.dlg-foot { padding-top: 4px; }
.dlg-foot [hidden] { display: none; }
#evHint:empty { display: none; }
#evHint { margin: 0; }

/* ---------- responsive ---------- */
@media (min-width: 1800px) {
  body { font-size: 15px; }
  .week { grid-template-columns: 340px minmax(0, 1fr) 320px; }
  .day { min-height: 600px; }
}
/* below this, the three areas become tabs */
@media (max-width: 1279px) {
  .pane-tabs {
    display: flex; gap: 2px; padding: 3px; margin-bottom: 16px;
    background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
  }
  .pane-tabs button {
    flex: 1; border: 0; background: none; border-radius: 6px; padding: 7px 10px;
    font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap;
  }
  .pane-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
  .week { grid-template-columns: minmax(0, 1fr); }
  .week .pane { display: none; }
  .week[data-active="plan"] [data-pane-body="plan"],
  .week[data-active="cal"] [data-pane-body="cal"],
  .week[data-active="look"] [data-pane-body="look"] { display: flex; }
  .week[data-active="plan"] .side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
}
@media (max-width: 860px) {
  .topbar { padding: 8px 16px; gap: 8px 10px; }
  .brand-txt { display: none; }
  .pager { order: 3; flex-basis: 100%; min-width: 0; gap: 10px; }
  .pager h1 { font-size: 15px; white-space: normal; }
  .sync-status { display: none; }
  main { padding: 12px 16px 40px; }
  .pane-tabs { position: sticky; top: calc(var(--tb, 109px) + 6px); z-index: 5; margin-bottom: 12px; }
  .pane-tabs button { padding: 7px 4px; font-size: 13px; }
  .days { grid-template-columns: 1fr; }
  .day { border-left: 0; border-top: 1px solid var(--line); min-height: 0; scroll-margin-top: calc(var(--tb, 109px) + 64px); }
  .day:first-child { border-top: 0; }
  .note-line { flex-direction: column; align-items: stretch; gap: 4px; }
  .month, .grid2 { grid-template-columns: 1fr; }
  .feed { grid-template-columns: 1fr 1fr 40px 32px; }
  .cal-row { grid-template-columns: 1fr 110px 40px; }
  .cal-row select[data-ck=cat] { grid-column: 1 / -1; grid-row: 2; }
  .fld-row { grid-template-columns: 1fr 1fr; }
  .fld-row .fld:first-child { grid-column: 1 / -1; }
  #evForm.is-allday .fld-row .fld:first-child { grid-column: auto; }
}

.day .item .txt { hyphens: auto; -webkit-hyphens: auto; }

/* ---------- full-height layout ---------- */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.card > textarea.field { flex: 1; resize: none; }
.week { flex: 1; align-items: stretch; }
.side .todo-card { flex: 1; }
.board .days { flex: 1; }
.day { min-height: 0; }
.reflect .card { flex: 1; }
.reflect textarea.field.tall { min-height: 120px; }
.month { flex: 1; align-items: stretch; }
.month-col .grow { flex: 1; }
.month-col .grid2 { flex: 1; }
.month-col .grid2 > .card { min-height: 160px; }
.month-col > h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
@media (min-width: 1280px) {
  /* everything on one screen: columns fill the height below the top bar */
  .week { height: calc(100dvh - var(--tb, 53px) - 48px); min-height: 560px; }
  .side, .board, .reflect { min-height: 0; overflow: auto; }
}
@media (max-width: 1279px) {
  .week .pane { flex: 1; }
  .week[data-active="plan"] .side { align-content: start; }
}
@media (max-width: 860px) {
  .board .days { flex: none; }
}

/* ---------- to-dos grow from the bottom up ---------- */
.day-todos .list { margin-top: auto; }

/* ---------- splitters ---------- */
.splitter { display: none; flex: none; position: relative; touch-action: none; user-select: none; }
.splitter::after {
  content: ""; position: absolute; border-radius: 2px; background: transparent; transition: background .12s;
}
.splitter.row { height: 16px; cursor: row-resize; }
.splitter.row::after { left: 30%; right: 30%; top: 6px; height: 4px; }
.splitter.col { width: 16px; cursor: col-resize; }
.splitter.col::after { top: 30%; bottom: 30%; left: 6px; width: 4px; }
.splitter:hover::after { background: var(--line-strong); }
.splitter.dragging::after { background: var(--accent); }
body.resizing-col, body.resizing-col * { cursor: col-resize !important; user-select: none; }
body.resizing-row, body.resizing-row * { cursor: row-resize !important; user-select: none; }

@media (min-width: 1280px) {
  .week {
    --w-side: 260px; --w-reflect: 250px;
    grid-template-columns: var(--w-side) 16px minmax(0, 1fr) 16px var(--w-reflect);
    gap: 0;
  }
  .splitter { display: block; }
  .stack { gap: 0; }
  .stack > .card { flex: 1 1 0; min-height: 64px; overflow: auto; }
  .side > .focus-card, .side > .habit-card { flex-grow: 1; }
  .side > .todo-card { flex-grow: 1.6; }
  .side > .frei-card { flex-grow: 1.2; }
  .reflect .card { flex-grow: 1; }
  .reflect textarea.field.tall { min-height: 0; }
}
@media (min-width: 1800px) {
  .week { --w-side: 340px; --w-reflect: 320px; }
}

/* ---------- slim day column ---------- */
.day-focus { padding: 2px 12px 8px; border-bottom: 1px solid var(--line); }
.day-focus input { font-weight: 500; font-size: 13px; height: 22px; }
.day-focus input::placeholder { color: var(--faint); font-weight: 400; }
.day .day-sec { border-top: 0; padding-top: 6px; padding-bottom: 6px; }
.day-events { gap: 4px; }
.events:empty { display: none; }
.day-head .dsum { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-add input { font-size: 12.5px; }
@media (hover: hover) {
  .log-add { opacity: 0; transition: opacity .12s; }
  .day:hover .log-add, .log-add:focus-within { opacity: 1; }
}

/* ---------- colour tags ---------- */
.cat-dot {
  flex: none; width: 10px; height: 10px; margin: 0; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1.5px dashed var(--line-strong); background: transparent;
}
.cat-dot.set { border: 0; background: var(--cink); }
@media (hover: hover) {
  .item .cat-dot:not(.set) { opacity: 0; }
  .item:hover .cat-dot, .cat-dot:focus-visible { opacity: 1; }
}
.item.has-cat { background: var(--cbg); }
.item.has-cat:hover { background: color-mix(in srgb, var(--cbg) 82%, var(--cink)); }
.item.has-cat.done { background: color-mix(in srgb, var(--cbg) 45%, transparent); }
.list .item.has-cat + .item.has-cat { margin-top: 2px; }

.item.log { background: var(--bg); align-items: baseline; flex-wrap: wrap; column-gap: 6px; row-gap: 0; font-size: 12.5px; }
.item.log.has-cat { background: var(--cbg); }
.item.log .cat-dot { align-self: center; margin-top: 0; }
.item.log .dur { font-weight: 700; color: var(--cink, var(--ink)); outline: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item.log .txt { flex-basis: 100%; color: var(--ink); }
.item.log .txt:empty { display: none; }
.item.log .txt:focus:empty { display: block; }

.cat-pop {
  position: fixed; z-index: 50; display: flex; flex-direction: column; gap: 1px; padding: 6px; min-width: 180px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.14);
}
.cat-pop[hidden] { display: none; }
.cat-pop button {
  display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 8px; border-radius: 6px;
  cursor: pointer; text-align: left; font-size: 13px;
}
.cat-pop button:hover, .cat-pop button:focus-visible { background: var(--cbg, var(--bg)); outline: none; }
.cat-pop button.on { font-weight: 600; }
.cat-pop button span { flex: 1; }
.cat-pop button em { font-style: normal; font-size: 12px; color: var(--faint); }
.cat-pop button small { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--cink); opacity: .75; }
.sw { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--cbg); box-shadow: inset 0 0 0 2px var(--cink); }
.sw.none { background: none; box-shadow: inset 0 0 0 1.5px var(--line-strong); }

/* settings: colour names */
.cat-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cat-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cat-row .sw { width: 22px; height: 22px; }
.cat-row .cat-label { width: 62px; flex: none; font-size: 12px; color: var(--muted); }
.cat-row input { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; background: var(--paper); }
.cat-row input:focus { outline: 3px solid var(--cbg); border-color: var(--cink); }
.cat-row .cat-proj { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 6px; background: var(--cbg); color: var(--cink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row .dd.cat-link { flex: none; width: 168px; font-size: 12px; color: var(--muted); }
.cat-row.linked .dd.cat-link { color: var(--ink); }
@media (max-width: 600px) {
  .cat-row { flex-wrap: wrap; }
  .cat-row .dd.cat-link { width: 100%; margin-left: 32px; }
}

/* week summary */
.sum-total { font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.week-sum { display: flex; flex-direction: column; gap: 10px; }
.sum-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; font-size: 13px; }
.sum-name { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-name .sw { width: 10px; height: 10px; background: var(--cink, var(--faint)); box-shadow: none; }
.sum-val { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.sum-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.sum-bar b { display: block; height: 100%; border-radius: 3px; background: var(--cbg, var(--line)); box-shadow: inset 0 0 0 1px var(--cink, var(--line-strong)); }
@media (min-width: 1280px) {
  .reflect > .card:nth-child(1) { flex-grow: .9; }
}

/* ---------- time grid 06:00–24:00 ---------- */
.cal {
  --gut: 44px; --slot: 22px;
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.cal-in { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cal-row { display: grid; grid-template-columns: var(--gut) repeat(7, minmax(0, 1fr)); }
.cal-head, .cal-foot { overflow-y: hidden; scrollbar-gutter: stable; flex: none; }
.cal-head { border-bottom: 1px solid var(--line-strong); }
.cal-body { --slot: 22px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.cal-foot { border-top: 1px solid var(--line-strong); max-height: 34%; }
.cal .day { min-height: 0; }
.cal .gut { border-right: 0; }
.dh .allday { padding: 0 6px 6px; display: flex; flex-direction: column; gap: 3px; }
.dh .allday:empty { display: none; }
.dh .day-focus { border-bottom: 0; }

.tl-grid { position: relative; height: calc((24 - 6) * 2 * var(--slot)); }
.tl-gut { position: relative; }
.tl-gut span {
  position: absolute; right: 6px; transform: translateY(-50%); font-size: 10.5px; color: var(--faint);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.tl-gut span:first-child { transform: none; top: 3px !important; }
.day.tl {
  position: relative; cursor: cell; touch-action: pan-y;
  background-image:
    linear-gradient(to bottom, var(--line-strong) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px);
  background-size: 100% calc(2 * var(--slot)), 100% var(--slot);
}
.day.tl.weekend { background-color: color-mix(in srgb, var(--bg) 60%, var(--paper)); }
.day.tl.today { background-color: var(--today); }

.tl-ev, .slot {
  position: absolute; overflow: hidden; border-radius: 6px; font-size: 11.5px; line-height: 1.3; padding: 2px 6px;
}
.tl-ev { z-index: 1; margin: 0; cursor: default; }
.tl-ev.live { cursor: pointer; }
.tl-ev .t { font-size: 10.5px; }

.slot {
  z-index: 2; display: flex; flex-direction: column; gap: 0; cursor: grab; user-select: none;
  background: var(--cbg, #eef0f3); border: 1px solid color-mix(in srgb, var(--cink, #8a94a6) 35%, transparent);
  border-left: 3px solid var(--cink, #8a94a6); color: var(--ink);
}
.slot:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.slot.dragging { cursor: grabbing; opacity: .9; box-shadow: 0 8px 22px rgba(0,0,0,.16); z-index: 5; }
.slot .slot-time { font-weight: 700; font-size: 10.5px; color: var(--cink, var(--muted)); font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot .txt { outline: none; overflow-wrap: anywhere; min-height: 1.3em; cursor: inherit; }
.slot .txt[contenteditable="plaintext-only"] { cursor: text; user-select: text; background: rgba(255,255,255,.6); border-radius: 3px; }
.slot.short { flex-direction: row; align-items: baseline; gap: 6px; }
.slot.short .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .x, .slot .cat-dot { position: absolute; top: 3px; opacity: 0; }
.slot .x { right: 2px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 11px; padding: 0 2px; }
.slot .cat-dot { right: 18px; width: 9px; height: 9px; margin: 0; }
.slot:hover .x, .slot:hover .cat-dot, .slot:focus-within .x { opacity: 1; }
.slot .grip { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.slot .grip::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 2px; margin-left: -9px; border-radius: 1px; background: var(--cink, var(--faint)); opacity: 0; }
.slot:hover .grip::after { opacity: .5; }
.slot.ghost { pointer-events: none; background: var(--accent-soft); border: 1px dashed var(--accent); color: var(--accent); font-weight: 600; font-size: 10.5px; }
body.moving-slot, body.moving-slot * { cursor: grabbing !important; user-select: none; }
@media (hover: none) { .slot .x, .slot .cat-dot { opacity: 1; } }

.now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--brand); z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

.cal-foot .day-todos { padding: 6px 10px; display: flex; flex-direction: column; overflow-y: auto; }

/* smaller screens: whole week scrolls sideways */
@media (max-width: 1279px) {
  .week[data-active="cal"] .board { height: calc(100dvh - var(--tb, 53px) - 110px); min-height: 460px; }
}
@media (max-width: 1100px) {
  .cal { overflow-x: auto; }
  .cal-in { min-width: calc(var(--gut) + 7 * 128px); }
}
@media (max-width: 860px) {
  .week[data-active="cal"] .board { height: calc(100dvh - var(--tb, 53px) - 80px); }
  .cal .day { border-top: 0; border-left: 1px solid var(--line); }
  .note-line { flex-direction: row; align-items: center; }
}
.cal .day.today:not(.dh) { box-shadow: none; }
.tl-grid { grid-template-rows: 100%; }
.day.tl { height: 100%; }
@media (min-width: 1280px) { .week { flex: none; } }
.cal-row > .gut { position: sticky; left: 0; z-index: 4; background: var(--paper); }

/* time labels: gutter spans the full grid height and stays put vertically */
.tl-grid > .tl-gut { position: sticky; left: 0; top: auto; height: 100%; align-self: stretch; }
/* only faint hour lines – no half-hour pattern */
.day.tl {
  background-image: linear-gradient(to bottom, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px);
  background-size: 100% calc(2 * var(--slot));
}
/* calendar events leave a strip on the right so a timeslot can always be placed beside them */
.day.tl .tl-ev { margin-right: 0; }

/* ---------- Termine vs. Timeslots ---------- */
/* Termin (from your calendar): white card, coloured bar, small calendar mark */
.day.tl .tl-ev {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-strong); border-left: 3px solid var(--c, var(--private));
  box-shadow: 0 1px 2px rgba(0,0,0,.06); padding-left: 16px;
}
.day.tl .tl-ev::before {
  content: ""; position: absolute; left: 4px; top: 5px; width: 8px; height: 8px; border-radius: 2px;
  border: 1.5px solid var(--c, var(--private)); border-top-width: 3px; box-sizing: border-box;
}
.day.tl .tl-ev .t { color: var(--muted); }
.day.tl .tl-ev.live:hover, .day.tl .tl-ev.live:focus-visible { background: color-mix(in srgb, var(--c, var(--private)) 6%, var(--paper)); }
.day.tl .tl-ev.past { opacity: .6; }
.day.tl .tl-ev.has-cat { background: var(--cbg); border-color: color-mix(in srgb, var(--cink) 35%, transparent); border-left-color: var(--cink); }
.day.tl .tl-ev.has-cat.live:hover, .day.tl .tl-ev.has-cat.live:focus-visible { background: color-mix(in srgb, var(--cbg) 82%, var(--cink)); }
/* Timeslot (your own time): soft filled block, no bar */
.slot { border-left-width: 1px; border-left-color: color-mix(in srgb, var(--cink, #8a94a6) 35%, transparent); border-radius: 7px; }
.slot:not(.has-cat) { background: repeating-linear-gradient(135deg, #f1f2f5 0 6px, #e9ebf0 6px 12px); }
.slot.ghost.as-event { background: var(--paper); border: 1px dashed var(--ink); color: var(--ink); }
.slot.ghost.as-event::after { content: " · Termin"; }

/* + Termin in the day head */
.dh .day-head { position: relative; }
.dh .add-ev { margin-left: 4px; align-self: center; font-size: 16px; }

/* to-do row: grows with its content up to 40 % of the calendar, then scrolls (newest stays in view) */
.cal-foot { max-height: 40%; }
.cal-foot .day-todos { max-height: 100%; }

/* ---------- unified entries: details ---------- */
.list { gap: 3px; }
.day .item { font-size: 12.5px; }
.item.has-cat + .item.has-cat { margin-top: 0; }

/* Fokus: not a to-do – a coloured group label without checkbox */
.item.is-focus {
  font-weight: 600; color: var(--cink, var(--ink));
  background: var(--cbg, var(--bg));
  box-shadow: inset 3px 0 0 var(--cink, var(--line-strong));
  padding-left: calc(var(--ip) + 4px);
}
.item.is-focus:hover { background: color-mix(in srgb, var(--cbg, var(--bg)) 85%, var(--cink, var(--ink))); }

/* day head: focus list + add field */
.day-focus { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 3px; }
.day-focus .item { font-size: 12px; }
.day-focus .add-focus { border: 0; height: auto; font-weight: 400; background: transparent; outline: none; padding: 2px var(--ip, 6px); font-size: 12px; width: 100%; min-width: 0; }
.add-focus::placeholder { color: var(--faint); }
@media (hover: hover) {
  .foci:not(:empty) + .add-focus { opacity: 0; }
  .day:hover .foci + .add-focus, .add-focus:focus { opacity: 1; }
}

/* to-do row under the calendar: one scroll area, so every day column keeps its full height and lines */
.cal-foot { overflow-y: auto; max-height: 40%; }
.cal-foot .day-todos { overflow: visible; max-height: none; padding: 6px 8px; }
.cal-foot .add { padding: 0 var(--ip, 6px); }
.cal-foot .add input { font-size: 12px; }

/* right column: note to myself */
.note-card > textarea.field { min-height: 48px; }

/* ---------- ClickUp time entries ---------- */
.slot.cu { cursor: pointer; border-style: solid; }
.slot.cu:not(.has-cat) { background: #f3f0fb; border-color: #d9d0f3; }
.slot.cu .slot-time { display: inline-flex; align-items: center; gap: 4px; }
.cu-mark {
  display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 2px;
  background: linear-gradient(135deg, #7b68ee, #49ccf9);
}
.slot.cu.running { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 60%, transparent); }
.slot.cu .cat-dot { right: 4px; }

/* the settings dialog also uses .cal-row – keep calendar rows stretched and gap-free */
.cal .cal-row { align-items: stretch; gap: 0; }
/* narrow day columns: colour + ✕ only take room while hovering the entry */
@media (hover: hover) {
  .day .item .cat-dot, .day .item .x { display: none; }
  .day .item:hover .cat-dot, .day .item:hover .x, .day .item:focus-within .x { display: block; opacity: 1; }
}

/* small sublines under card titles (month) */
.card .sub { font-size: 12px; line-height: 1.4; color: var(--faint); margin-top: -4px; }
@media (min-width: 1280px) {
  .reflect > .card:nth-child(1) { flex-grow: .6; }
  .reflect > .card:nth-child(7) { flex-grow: .9; }
}

/* left column: to-dos listed from the top (day columns keep stacking from the bottom) */
.todo-card .list { margin-top: 0; }
/* "Diese Woche": all ClickUp time in one row */
.sum-row.cu-sum .cu-mark { width: 10px; height: 10px; }
.sum-row.cu-sum .sum-bar b { background: #ece8fb; box-shadow: inset 0 0 0 1px #9b8cf0; }

/* ---------- year view (01 Vision) ---------- */
.year { width: 100%; max-width: 1240px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; padding-bottom: 40px; }
.year h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.year p { margin: 0 0 10px; color: var(--muted); }
.year p:last-child { margin-bottom: 0; }
.y-intro { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 1.4fr); gap: 32px; padding: 28px 32px; }
.y-hero { display: flex; flex-direction: column; justify-content: center; }
.y-num { font-size: 56px; font-weight: 700; line-height: 1; color: var(--line-strong); letter-spacing: -.02em; }
.y-word { font-size: 64px; font-weight: 700; line-height: 1; color: var(--brand); text-transform: uppercase; letter-spacing: -.01em; }
.y-tag { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); }
.y-text h2 { margin-bottom: 12px; }
.y-sec { display: flex; flex-direction: column; gap: 12px; }
.y-sec-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.y-sec-head h2 { flex: 1; min-width: 220px; font-weight: 600; }
.y-sec-head h2 b { font-weight: 800; }
.y-date { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.y-date input { border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 8px; background: var(--paper); font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); }
.y-date-out b { font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink); }

.areas { padding: 0; gap: 0; overflow: hidden; }
.area { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1.3fr); border-top: 1px dashed var(--line); }
.area > * { padding: 12px 16px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.area > * + * { border-left: 1px solid var(--line); }
.area-head { border-top: 0; background: var(--bg); }
.area-head b { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.area-head span, .area-name span { font-size: 12px; line-height: 1.4; color: var(--faint); }
.area-name { justify-content: center; }
.area-name b { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.area textarea.field { min-height: 64px; flex: 1; }
.cell-lbl { display: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.score-row { display: flex; gap: 10px; align-items: flex-start; flex: 1; }
.dd.score {
  flex: none; width: 54px; height: 34px; border: 1.5px solid var(--line-strong); justify-content: center; padding: 0;
  font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums;
}
.dd.score .dd-chev { display: none; }
.dd.score.placeholder .dd-val { color: var(--faint); }
.dd-menu.m-score { min-width: 0 !important; display: grid; grid-template-columns: repeat(3, 40px); gap: 2px; }
.dd-menu.m-score button span { flex: none; }
.dd-menu.m-score button { justify-content: center; padding: 6px 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.dd-menu.m-score button.empty { grid-column: 1 / -1; }
.dd-menu.m-score .dd-check { display: none; }
.dd-menu.m-score button.on { background: var(--brand-soft); color: var(--brand-ink); }
.dd.score:not([data-v=""]) { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }

.y-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; }
.y-explain { padding: 22px 24px; }
.y-explain h2 { margin-bottom: 6px; }
.y-explain a { color: var(--accent); }
.y-shine textarea.field.tall { min-height: 320px; }
.year .grid2 > .card textarea.field.tall { min-height: 180px; }

@media (max-width: 960px) {
  .y-intro, .y-two { grid-template-columns: 1fr; }
  .area { grid-template-columns: 1fr; }
  .area-head { display: none; }
  .area > * + * { border-left: 0; padding-top: 0; }
  .area-name { padding-top: 14px; background: var(--bg); padding-bottom: 10px; margin-bottom: 8px; }
  .area { border-top: 1px solid var(--line); }
  .area:nth-child(2) { border-top: 0; }
  .cell-lbl { display: block; }
  .y-word { font-size: 48px; }
  .y-num { font-size: 40px; }
}
.y-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* two columns side by side: each row of cards gets the same height */
@media (min-width: 861px) {
  .y-cols { grid-auto-flow: row dense; }
  .y-cols > .y-col { display: contents; }
  .y-cols > .y-col:first-child > .card { grid-column: 1; }
  .y-cols > .y-col:last-child > .card { grid-column: 2; }
}
.y-col > .card textarea.field.tall { min-height: 150px; }
.y-sep { border: 0; border-top: 2px dashed var(--line-strong); margin: 4px 0; width: 100%; }

/* projects (year) */
.y-lead { font-size: 13px; color: var(--muted); margin: -4px 0 0; max-width: 760px; }
.proj-card { gap: 0; padding: 6px 18px 12px; }
.proj { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.proj-name { flex: 1; font-weight: 600; font-size: 14px; min-width: 0; }
.proj.pausiert .proj-name { color: var(--muted); font-weight: 500; }
.proj.erledigt .proj-name { color: var(--faint); text-decoration: line-through; font-weight: 500; }
.proj-qs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.proj-qs a { font-size: 11px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); border-radius: 999px; padding: 1px 8px; text-decoration: none; white-space: nowrap; }
.dd.proj-status { flex: none; font-size: 12px; height: 26px; padding: 0 6px 0 10px; }
.proj.aktiv .dd.proj-status { color: var(--private); border-color: color-mix(in srgb, var(--private) 35%, var(--line)); background: color-mix(in srgb, var(--private) 7%, var(--paper)); }
.proj .proj-dot { width: 14px; height: 14px; }
.proj.has-cat .proj-name { color: var(--cink); }
.proj-add { padding: 10px 0 2px; }
.proj-empty { color: var(--faint); font-size: 13px; margin: 8px 0 0; }
.proj-done { margin-top: 12px; }
.proj-done summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }

/* 90 Tage Fokus (quarter) */
.fx-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px 40px; }
.fx-head h2 { margin-bottom: 4px; }
.fx { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1.6fr) 150px; align-items: center; gap: 16px; padding: 16px 18px; }
.fx-topic { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fx-num { flex: none; width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; font-size: 20px; font-weight: 600; }
.dd.fx-pick { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: transparent; box-shadow: none; padding: 4px 2px; height: auto; font-size: 16px; font-weight: 600; gap: 8px; }
.dd.fx-pick:hover { background: transparent; border-bottom-color: var(--ink); }
.dd.fx-pick.placeholder .dd-val { color: var(--faint); font-weight: 500; }
.dd.fx-pick .sw { width: 12px; height: 12px; }
.fx-arrow { color: var(--brand); font-size: 20px; text-align: center; }
.fx textarea.fx-steps { min-height: 72px; }
.fx-progress { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fx-progress output { color: var(--ink); font-variant-numeric: tabular-nums; }
.fx-progress input { width: 100%; accent-color: var(--brand); }
.fx-foot { font-size: 12px; color: var(--faint); }
@media (max-width: 860px) {
  .fx-head { grid-template-columns: 1fr; }
  .fx-head > div + div { display: none; }
  .fx { grid-template-columns: 1fr; }
  .fx-arrow { display: none; }
}
.month { width: 100%; max-width: 1240px; margin: 0 auto; }

/* ---------- dropdowns (custom, the native select stays hidden) ---------- */
select.dd-native { display: none !important; }
.dd {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; height: 32px; padding: 0 8px 0 10px;
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); color: var(--ink);
  cursor: pointer; text-align: left; line-height: 1.2; box-shadow: var(--shadow);
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.dd:hover { border-color: var(--faint); }
.dd.open, .dd:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd:disabled { cursor: default; opacity: .65; box-shadow: none; }
.dd:disabled .dd-chev { display: none; }
.dd-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd.placeholder .dd-val { color: var(--muted); }
.dd-chev { flex: none; width: 12px; height: 12px; color: var(--muted); transition: transform .15s; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd .sw { width: 10px; height: 10px; }
.fld .dd, .dlg .dd { width: 100%; }
.dlg .feed .dd, .dlg .cal-row .dd { height: 32px; }
.add .dd { height: 24px; font-size: 11.5px; }

.dd-menu {
  position: fixed; z-index: 60; display: flex; flex-direction: column; gap: 1px; padding: 5px; overflow-y: auto;
  max-width: min(360px, calc(100vw - 16px)); background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.14), 0 1px 3px rgba(0,0,0,.06);
  animation: dd-in .12s ease-out; overscroll-behavior: contain;
}
.dd-menu[hidden] { display: none; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-3px); } }
.dd-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 7px 9px; border-radius: 6px;
  cursor: pointer; text-align: left; font-size: 13px; color: inherit; white-space: nowrap;
}
.dd-menu button span { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.dd-menu button:hover, .dd-menu button:focus-visible { background: var(--bg); outline: none; }
.dd-menu button.on { font-weight: 600; color: var(--accent); }
.dd-menu button.empty { color: var(--muted); }
.dd-menu button.new { color: var(--accent); border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; margin-top: 3px; padding-top: 9px; }
.dd-menu button:disabled { opacity: .4; cursor: default; }
.dd-check { flex: none; width: 12px; height: 12px; }
.dd-menu .sw { width: 12px; height: 12px; }
@media (prefers-reduced-motion: reduce) { .dd-menu { animation: none; } .dd-chev { transition: none; } }
.dd.fx-pick.open, .dd.fx-pick:focus-visible { box-shadow: none; border-bottom-color: var(--accent); }
.dd.score .dd-val { flex: none; text-align: center; }

/* ---------- checkboxes: soft corners everywhere ---------- */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 14px; height: 14px;
  border: 1.5px solid var(--line-strong); border-radius: 2px; background: var(--paper);
  display: inline-grid; place-content: center; cursor: pointer; vertical-align: middle;
  transition: background .12s, border-color .12s;
}
input[type=checkbox]:hover { border-color: var(--muted); }
input[type=checkbox]:checked { background: var(--mint-ink); border-color: var(--mint-ink); }
input[type=checkbox]::after {
  content: ""; width: 8px; height: 8px; transform: scale(0); transition: transform .1s;
  background: #fff; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%);
}
input[type=checkbox]:checked::after { transform: scale(1); }

/* ---------- projects: drag to sort ---------- */
.proj-grip {
  flex: none; width: 10px; height: 16px; margin-left: -4px; cursor: grab; opacity: 0; transition: opacity .12s;
  background: radial-gradient(circle, var(--faint) 1.2px, transparent 1.4px) 0 0 / 5px 5px;
}
.proj:hover .proj-grip { opacity: 1; }
@media (hover: none) { .proj-grip { opacity: .7; } }
.proj.dragging { opacity: .45; }
.proj[draggable="true"] { cursor: grabbing; }

/* ---------- week focus: pick a project ---------- */
.add .dd.proj-pick { flex: none; max-width: 150px; color: var(--faint); box-shadow: none; }
.add .dd.proj-pick .sw { display: none; }

/* ---------- NFL ---------- */
.ev.nfl .t { font-weight: 600; }
.ev.nfl-W .t { color: var(--private); }
.ev.nfl-L .t { color: var(--danger); }
.ev.nfl-in .t { color: var(--brand-ink); }
.dd-menu.m-proj-pick button.empty { display: none; }
.cal-foot .day-todos .list:empty { min-height: 0; }
/* a little more air between lines in the writing fields */
textarea.field, .fld textarea { line-height: 1.7; }

/* birthdays at the very bottom of each day: tick off once congratulated */
.bdays { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px dashed var(--line); }
.bdays { display: none; flex: none; min-height: calc(var(--bday-rows, 0) * 21px + 7px); }
.has-bdays .bdays { display: block; }
.bday { height: 21px; }
.bday label { box-sizing: border-box; height: 21px; display: flex; align-items: center; gap: 6px; padding: 2px var(--ip, 6px); font-size: 12.5px; line-height: 1.35; cursor: pointer; border-radius: 6px; }
.bday label:hover { background: color-mix(in srgb, var(--bday) 10%, transparent); }
.bday input { accent-color: var(--bday); margin: 0; flex: none; }
.bday-ic { flex: none; font-size: 12px; }
.bday .txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bday.done .txt { text-decoration: line-through; opacity: .55; }
.bday.done .bday-ic { opacity: .45; }

/* work log: small list button in the day head + popover */
.wl-btn {
  border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13px; line-height: 1;
  height: 20px; min-width: 20px; padding: 0 4px; border-radius: 5px; font-family: var(--sans);
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; align-self: center;
}
.dh .wl-btn { margin-left: 4px; }
.wl-btn span { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wl-btn.has { color: var(--ink); }
.wl-btn:hover { background: var(--accent-soft); color: var(--accent); }
@media (hover: hover) {
  .wl-btn:not(.has) { opacity: 0; }
  .day:hover .wl-btn, .wl-btn:focus-visible { opacity: 1; }
}
.wl-pop {
  position: fixed; z-index: 50; width: 300px; max-width: calc(100vw - 16px); padding: 10px 12px 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.14);
}
.wl-pop[hidden] { display: none; }
.wl-pop .wl-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.wl-pop textarea.field { width: 100%; min-height: 140px; resize: vertical; }

/* work log summary */
.wl-sum-link { display: block; margin-top: 8px; margin-left: auto; border: 0; background: none; padding: 2px 0; cursor: pointer; font: inherit; font-size: 12px; color: var(--accent); }
.wl-sum-link:hover { text-decoration: underline; }
.month-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.month-h h2 { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.wl-dlg { width: min(560px, calc(100vw - 32px)); }
.wl-dlg .dlg { gap: 14px; }
.wl-presets { gap: 6px; }
.wl-presets .ghost-btn, .wl-mode .ghost-btn { font-size: 13px; }
.wl-dlg .ghost-btn.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); position: relative; }
.wl-range { grid-template-columns: 1fr 1fr auto; align-items: end; }
.wl-out { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; max-height: 45vh; overflow: auto; background: var(--bg); }
.wl-out h4 { margin: 10px 0 2px; font-size: 13px; font-weight: 600; }
.wl-out h4:first-child { margin-top: 0; }
.wl-out ul { margin: 0; padding-left: 18px; }
.wl-out li { margin: 2px 0; }
.wl-out li em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 4px; }
.wl-out .hint { margin: 0; }
.wl-stat { margin: 0; }
@media (max-width: 560px) { .wl-range { grid-template-columns: 1fr 1fr; } .wl-range > :last-child { grid-column: 1 / -1; } }
.wl-dlg .primary-btn:disabled { opacity: .45; cursor: default; }

/* weekly habits */
.habit-card .label .link-btn { font-weight: 500; }
.item.habit.has-cat { background: var(--cbg); }
.h-dots { display: inline-flex; gap: 3px; flex: none; }
.h-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--cink, var(--faint)); box-sizing: border-box; }
.h-dots i.on { background: var(--cink, var(--accent)); border-color: var(--cink, var(--accent)); }
.item.habit.reached .h-dots i.on { background: var(--private); border-color: var(--private); }
.h-target { flex: none; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 2px; cursor: pointer; font-variant-numeric: tabular-nums; }
.item.habit.reached .h-target { color: var(--private); }
.item.habit .cat-dot { opacity: 0; }
.item.habit:hover .cat-dot, .item.habit .cat-dot.set, .item.habit .cat-dot:focus-visible { opacity: 1; }
/* day pills: barely there until ticked, then in the habit's colour */
.habit-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.habit-chips:empty { display: none; }
.h-chip {
  border: 0; background: color-mix(in srgb, var(--ink) 3.5%, transparent); color: color-mix(in srgb, var(--faint) 75%, transparent);
  cursor: pointer; font: inherit; font-size: 10.5px; line-height: 1.2; padding: 2px 7px; border-radius: 10px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.h-chip:hover { color: var(--muted); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.h-chip.on { background: var(--cbg, var(--accent-soft)); color: var(--cink, var(--accent)); font-weight: 600; }
.h-chip.fit { display: inline-flex; align-items: center; gap: 3px; }
.h-chip .fit-ico { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

/* habit rows as tall as focus rows: compact count picker */
.item.habit .dd { height: 17px; padding: 0 2px 0 4px; gap: 2px; border: 0; box-shadow: none; background: none; font-size: 11px; font-weight: 600; color: var(--muted); }
.item.habit .dd .dd-chev { width: 9px; height: 9px; }
.item.habit.reached .dd { color: var(--private); }
/* empty lists in cards take no room, so the header sits as close to the add line as to a list */
.card > .list:empty { min-height: 0; margin-bottom: -8px; }
body.dragging-todo .card > .list.dropzone:empty { min-height: 28px; margin-bottom: 0; }
.card > .list:empty + .add { padding-top: 0; }

/* day head: hours, work log and + sit on one line, vertically centred */
.dh .day-head .dsum { align-self: center; display: inline-flex; align-items: center; height: 20px; line-height: 1; }
.dh .day-head .wl-btn, .dh .day-head .add-ev { align-self: center; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.dh .day-head .wl-btn { font-size: 12px; }

/* day columns: no day focus any more – only the habit pills under the date */
.dh .day-focus .habit-chips { padding-top: 2px; }
.dh .day-focus:has(.habit-chips:empty) { display: none; }


/* =====================================================================
   Design 2026 – clean, ruhig, modern
   Neutrale Fläche, weiche Karten mit Tiefe, Türkis nur für Aktion & Fokus.
   ===================================================================== */
body { font-feature-settings: "ss01", "cv11"; letter-spacing: -.003em; text-rendering: optimizeLegibility; }
::selection { background: color-mix(in srgb, var(--accent) 20%, transparent); }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 16%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 14%, transparent); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--ink) 26%, transparent); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- top bar: frosted glass ---------- */
.topbar {
  gap: 16px; padding: 10px 24px; min-height: 60px;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(16px); backdrop-filter: saturate(1.8) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}
.brand { font-size: 16px; font-weight: 650; letter-spacing: -.02em; gap: 9px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; position: relative;
  background: linear-gradient(145deg, #5fd8cc 0%, var(--brand) 48%, #0a7476 100%);
  box-shadow: 0 1px 2px rgba(11, 110, 112, .35), inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 7px 7px auto auto; width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.9);
}

/* segmented control */
.switch { padding: 3px; gap: 2px; border: 0; border-radius: 11px; background: color-mix(in srgb, var(--ink) 5.5%, transparent); }
.switch a {
  padding: 6px 14px; border-radius: 8px; font-weight: 500; font-size: 13.5px; color: var(--muted);
  transition: color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.switch a:hover { color: var(--ink); background: color-mix(in srgb, var(--paper) 50%, transparent); }
.switch a.active {
  background: var(--paper); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 0 0 .5px rgba(16,24,40,.06);
}

/* pager */
.pager { gap: 12px; }
.pager h1 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.pager h1 .kw {
  font-size: 11px; font-weight: 600; letter-spacing: .01em; padding: 3px 8px; vertical-align: 2px; margin-right: 8px;
  color: var(--brand-ink); background: var(--brand-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent);
}
.seg {
  gap: 2px; padding: 3px; border-radius: 11px; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
}
.seg > * { margin: 0; border-radius: 8px !important; }
.seg .icon-btn, .seg .ghost-btn { border: 0; box-shadow: none; background: transparent; height: 28px; }
.seg .icon-btn { width: 28px; color: var(--muted); }
.seg .ghost-btn { padding: 0 10px; font-size: 13px; font-weight: 600; }
.seg .icon-btn:hover, .seg .ghost-btn:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }

/* sync status as a pill */
.sync-status:not(:empty) {
  gap: 7px; padding: 4px 10px 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: color-mix(in srgb, var(--ink) 4.5%, transparent); color: var(--muted);
}
.sync-status:not(:empty)::before { width: 7px; height: 7px; background: var(--faint); }
.sync-status[data-state="ok"]::before { background: #22a55a; box-shadow: 0 0 0 3px color-mix(in srgb, #22a55a 18%, transparent); }
.sync-status[data-state="warn"] { background: #fff4e5; color: #94570a; }
.sync-status[data-state="warn"]::before { background: #f59e0b; box-shadow: 0 0 0 3px color-mix(in srgb, #f59e0b 22%, transparent); }
.sync-status[data-state="busy"]::before { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- buttons ---------- */
.icon-btn, .ghost-btn, .primary-btn {
  border-radius: var(--radius-sm); font-weight: 550; border-color: var(--line-strong);
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease), transform .08s;
}
.ghost-btn, .primary-btn { padding: 7px 13px; }
.icon-btn { width: 34px; height: 34px; color: var(--muted); }
.icon-btn svg { display: block; }
.top-actions .icon-btn { border-color: transparent; box-shadow: none; background: transparent; }
.top-actions .icon-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.icon-btn:hover, .ghost-btn:hover { background: color-mix(in srgb, var(--ink) 3.5%, var(--paper)); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.icon-btn:active, .ghost-btn:active, .primary-btn:active { transform: translateY(.5px) scale(.985); }
.primary-btn {
  background: var(--accent); border-color: transparent; color: #fff;
  box-shadow: 0 1px 2px rgba(11,110,112,.3), inset 0 1px 0 rgba(255,255,255,.18);
}
.primary-btn:hover { background: var(--accent-hover); border-color: transparent; }
.ghost-btn.danger { color: var(--danger); }
.ghost-btn.danger:hover { background: color-mix(in srgb, var(--danger) 7%, var(--paper)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.link-btn { text-decoration: none; font-weight: 550; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- surfaces ---------- */
main { padding: 20px 24px; }
.card {
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: var(--radius);
  box-shadow: var(--shadow-card); padding: 16px 18px; gap: 10px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.card:focus-within { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow-card), 0 0 0 3px color-mix(in srgb, var(--accent) 8%, transparent); }
.label { font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.label-left { gap: 9px; }
.sub { color: var(--faint); }

/* card icons (lucide-style, via mask) */
.week .card > .label .label-left::before {
  content: ""; flex: none; width: 15px; height: 15px; background: var(--faint);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.week .card:focus-within > .label .label-left::before { background: var(--accent); }
.focus-card { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E"); }
.habit-card { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 1 1-6.2-8.6'/%3E%3Cpath d='m9 11 3 3L22 4'/%3E%3C/svg%3E"); }
.todo-card { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='6' height='6' rx='1'/%3E%3Cpath d='m3 17 2 2 4-4'/%3E%3Cpath d='M13 6h8'/%3E%3Cpath d='M13 12h8'/%3E%3Cpath d='M13 18h8'/%3E%3C/svg%3E"); }
.frei-card { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v3'/%3E%3Cpath d='M12 18v3'/%3E%3Cpath d='M3 12h3'/%3E%3Cpath d='M18 12h3'/%3E%3Cpath d='m5.6 5.6 2.1 2.1'/%3E%3Cpath d='m16.3 16.3 2.1 2.1'/%3E%3Cpath d='m5.6 18.4 2.1-2.1'/%3E%3Cpath d='m16.3 7.7 2.1-2.1'/%3E%3C/svg%3E"); }
.note-card { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.4 3.6a2 2 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E"); }
.reflect > .card:nth-child(3) { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.6 5.6 6 .7-4.5 4.1 1.3 6L12 16.4 6.6 19.4l1.3-6L3.4 9.3l6-.7Z'/%3E%3C/svg%3E"); }
.reflect > .card:nth-child(5) { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 7 13.5 15.5 8.5 10.5 2 17'/%3E%3Cpath d='M16 7h6v6'/%3E%3C/svg%3E"); }
.sum-card { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 16v-4'/%3E%3Cpath d='M12 16V8'/%3E%3Cpath d='M17 16v-7'/%3E%3C/svg%3E"); }

/* ---------- entries & add rows ---------- */
.item { border-radius: 8px; transition: background .12s var(--ease); }
.item:hover { background: color-mix(in srgb, var(--ink) 3.5%, transparent); }
.add { margin: 0 -6px; padding: 4px 6px; min-height: 32px; border-radius: 8px; transition: background .12s var(--ease); }
.add:hover { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
.add:focus-within { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.add input { font-size: 13px; }
.add input::placeholder { color: var(--faint); }
.tag { font-family: var(--sans); font-weight: 600; letter-spacing: .04em; }
input[type=checkbox] { width: 16px; height: 16px; border-radius: 5px; border-width: 1.5px; }
input[type=checkbox]::after { width: 9px; height: 9px; }
input[type=checkbox]:checked { box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.item input[type=checkbox] { width: 15px; height: 15px; }
.cat-dot { width: 11px; height: 11px; }

/* ---------- calendar ---------- */
.cal { border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.cal-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.cal-foot { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 45%, var(--paper)); }
.day { border-left-color: color-mix(in srgb, var(--line) 75%, transparent); }
.day.weekend, .day.tl.weekend { background-color: color-mix(in srgb, var(--bg) 55%, var(--paper)); }
.day.today, .day.tl.today, .day.today.weekend { background-color: var(--today); }
.day.today { box-shadow: none; }
.day-head { padding: 12px 10px 10px; align-items: center; gap: 6px 4px; }
.day-head .dname { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--faint); }
.day-head .dnum { font-size: 20px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.day.today .dname { color: var(--accent); }
.day.today .dnum {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; margin: -5px 2px -5px -5px;
  border-radius: 999px; background: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(11,110,112,.35), 0 4px 12px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}
.day-head .dmon { font-size: 12px; color: var(--faint); }
.tl-gut span { font-size: 10.5px; font-weight: 500; color: var(--faint); letter-spacing: .01em; }
.day.tl { background-image: linear-gradient(to bottom, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px); }
.now-line { border-top: 2px solid #ef4444; }
.now-line::before { background: #ef4444; width: 10px; height: 10px; left: -5px; top: -6px; box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 20%, transparent); }

.tl-ev, .slot { border-radius: 8px; font-size: 11.5px; padding: 3px 7px; }
.day.tl .tl-ev {
  border: 0; border-left: 0; padding-left: 10px;
  background: color-mix(in srgb, var(--c, var(--private)) 11%, var(--paper));
  box-shadow: inset 3px 0 0 var(--c, var(--private)), inset 0 0 0 1px color-mix(in srgb, var(--c, var(--private)) 16%, transparent);
  color: color-mix(in srgb, var(--c, var(--private)) 30%, var(--ink));
}
.day.tl .tl-ev::before { display: none; }
.day.tl .tl-ev .t { color: color-mix(in srgb, var(--c, var(--private)) 55%, var(--muted)); font-weight: 600; }
.day.tl .tl-ev.live:hover, .day.tl .tl-ev.live:focus-visible { background: color-mix(in srgb, var(--c, var(--private)) 17%, var(--paper)); }
.day.tl .tl-ev.has-cat { background: var(--cbg); box-shadow: inset 3px 0 0 var(--cink), inset 0 0 0 1px color-mix(in srgb, var(--cink) 18%, transparent); color: var(--ink); }
.slot { border: 1px solid color-mix(in srgb, var(--cink, #8a94a6) 22%, transparent); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.slot:hover { box-shadow: 0 4px 12px -2px rgba(16,24,40,.12); }
.slot:not(.has-cat) { background: repeating-linear-gradient(135deg, #f3f4f7 0 6px, #eceef2 6px 12px); }
.slot.ghost { border-radius: 8px; }
.ev { border-radius: 6px; }
.add-ev, .wl-btn { border-radius: 6px; }
.add-ev { width: 22px; height: 22px; }

/* ---------- pane tabs (tablet / phone) ---------- */
@media (max-width: 1279px) {
  .pane-tabs { padding: 3px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ink) 5.5%, transparent); box-shadow: none; }
  .pane-tabs button { border-radius: 9px; padding: 7px 10px; transition: background .15s var(--ease), color .15s var(--ease); }
  .pane-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 0 0 .5px rgba(16,24,40,.06); }
}

/* ---------- popovers & menus ---------- */
.dd { border-radius: var(--radius-sm); border-color: var(--line-strong); }
.dd:hover { border-color: color-mix(in srgb, var(--ink) 25%, transparent); }
.dd.open, .dd:focus-visible { box-shadow: var(--ring); }
.add .dd { border-radius: 7px; }
.dd-menu, .cat-pop, .wl-pop {
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 5px;
}
.dd-menu { animation: pop-in .14s var(--ease); }
.dd-menu button, .cat-pop button { border-radius: 7px; }
.dd-menu button:hover, .dd-menu button:focus-visible { background: color-mix(in srgb, var(--ink) 4.5%, transparent); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ---------- dialogs: sheet look ---------- */
dialog {
  border: 0; border-radius: 18px; box-shadow: 0 0 0 1px rgba(16,24,40,.06), 0 24px 64px -12px rgba(16,24,40,.32);
}
dialog[open] { animation: dlg-in .22s var(--ease); }
dialog::backdrop { background: rgba(16, 20, 24, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg { padding: 22px 24px 24px; gap: 24px; }
.dlg-head { margin: -4px -6px 0 0; }
.dlg h2 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.dlg h3 { font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.dlg > section + section { padding-top: 22px; border-top: 1px solid var(--line); }
.dlg-head .icon-btn { border-color: transparent; box-shadow: none; }
.dlg-head .icon-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.fld > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.fld input, .fld textarea, .fld select,
.dlg input[type=text], .dlg input[type=password], .dlg input[type=url], .dlg select, .cat-row input, .y-date input {
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 11px; background: var(--paper);
  box-shadow: var(--shadow); transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.fld input:hover, .fld textarea:hover, .dlg input[type=text]:hover, .dlg input[type=password]:hover, .cat-row input:hover { border-color: color-mix(in srgb, var(--ink) 25%, transparent); }
.fld input:focus, .fld textarea:focus, .fld select:focus,
.dlg input[type=text]:focus, .dlg input[type=password]:focus, .dlg input[type=url]:focus, .cat-row input:focus, .y-date input:focus {
  outline: none; border-color: var(--accent); box-shadow: var(--ring);
}
.acct, .feed { border-radius: 12px; border-color: var(--line); background: color-mix(in srgb, var(--bg) 40%, var(--paper)); }
.dlg-foot { padding-top: 8px; }

/* ---------- month / quarter / year ---------- */
.month-col > h2, .month-h h2, .year h2 { color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .08em; }
.vision { background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 9%, var(--paper)) 0%, var(--paper) 85%); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.y-intro { padding: 32px 36px; }
.y-word { background: linear-gradient(120deg, #3fc6bb, var(--accent) 60%, #0a6466); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.03em; }
.y-num { color: color-mix(in srgb, var(--ink) 14%, transparent); letter-spacing: -.04em; }
.areas { padding: 0; }
.area-head { background: color-mix(in srgb, var(--bg) 70%, var(--paper)); }
.area-head b { color: var(--muted); letter-spacing: .07em; }
.dd.score { border-radius: 10px; }
.fx-num { border: 0; background: color-mix(in srgb, var(--ink) 4.5%, transparent); font-weight: 650; }
.proj-qs a { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent); }
.wl-out { border-radius: 12px; }
.sum-bar { height: 6px; background: color-mix(in srgb, var(--ink) 5%, transparent); }

@media (max-width: 860px) {
  .topbar { padding: 8px 14px; min-height: 0; }
  main { padding: 12px 14px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  dialog[open], .dd-menu { animation: none; }
  .sync-status[data-state="busy"]::before { animation: none; }
}
@media (max-width: 480px) {
  .topbar { gap: 8px; }
  .switch a { padding: 5px 9px; font-size: 13px; }
  .top-actions { gap: 0; }
  .top-actions .icon-btn { width: 32px; height: 32px; }
  .pager h1 { font-size: 15px; }
}

/* ---------- day head: two calm lines, never wraps ---------- */
.dh .day-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "name name sum" "num mon wl";
  align-items: center; column-gap: 5px; row-gap: 4px; padding: 10px 10px 8px; min-width: 0;
}
.dh .day-head .dname { grid-area: name; flex-basis: auto; min-width: 0; }
.dh .day-head .dnum { grid-area: num; }
.dh .day-head .dmon { grid-area: mon; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh .day-head .dsum { grid-area: sum; margin: 0; height: auto; justify-self: end; }
.dh .day-head .wl-btn { grid-area: wl; margin: 0; justify-self: end; }
.dh .day-head .dsum:empty { display: none; }
.day.today .dnum { margin: -3px 0 -3px -4px; }
.dh { container-type: inline-size; }
.dh .day-head .dsum, .dh .day-head .wl-btn { white-space: nowrap; }
@container (max-width: 120px) {
  .dh .day-head .dname { font-size: 0; overflow: visible; }
  .dh .day-head .dname::before { content: attr(data-s); font-size: 11px; }
  .dh .day-head .dmon { visibility: hidden; }
  .dh .day-head { column-gap: 3px; padding-left: 8px; padding-right: 6px; }
}
.dh .day-head { grid-template-rows: auto 26px; }
.dh.today .day-head .dnum { height: 26px; min-width: 26px; margin: 0 1px 0 -4px; padding: 0 5px; font-size: 17px; }

/* ---------- right column on demand ---------- */
#reflectBtn { display: none; }
@media (min-width: 1280px) {
  body[data-view="woche"] #reflectBtn { display: inline-grid; }
  #reflectBtn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
  .week[data-reflect="closed"] { grid-template-columns: var(--w-side) 16px minmax(0, 1fr); }
  .week[data-reflect="closed"] > .reflect,
  .week[data-reflect="closed"] > .splitter[data-col="reflect"] { display: none; }
}

/* ---------- collapsible cards ---------- */
.collapse-head { cursor: pointer; user-select: none; border-radius: 6px; }
.collapse-head::after {
  content: ""; width: 14px; height: 14px; margin-left: -2px; background: var(--faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0; transition: opacity .15s var(--ease), transform .2s var(--ease);
}
.card:hover .collapse-head::after, .collapse-head:focus-visible::after, .card.collapsed .collapse-head::after { opacity: 1; }
.card.collapsed .collapse-head::after { transform: rotate(-90deg); }
.collapse-head:hover { color: var(--accent); }
.card.collapsed > :not(.label) { display: none !important; }
.card.collapsed > .label > :not(.collapse-head) { display: none; }
.card.collapsed { padding-top: 12px; padding-bottom: 12px; }
@media (min-width: 1280px) {
  .stack > .card.collapsed { flex: none !important; min-height: 0; overflow: visible; }
  .stack > .splitter:has(+ .card.collapsed), .stack > .card.collapsed + .splitter { visibility: hidden; pointer-events: none; }
}
