/* Farbpaletten: Original (Tiefblau/Grün), Ozeanblau, Violett.
   light-dark(hell, dunkel) folgt dem gewählten Farbschema (System/Hell/Dunkel). */
:root {
  color-scheme: light dark;
  --rail-width: 206px;
  --bg: light-dark(#f4f6f9, #12213a);
  --rail: light-dark(#eaeff5, #0e1a2e);
  --surface: light-dark(#ffffff, #1b2f4d);
  --inset: light-dark(#f8fafc, #172a45);
  --line: light-dark(#d6dde7, #2b4468);
  --text: light-dark(#16243a, #eef2f7);
  --muted: light-dark(#6b7280, #9aa8bc);
  --blue: light-dark(#1e3a5f, #7ea6f6);
  --hover: light-dark(#e8edf4, #22395c);
  --selected: light-dark(#e0e9f4, #26406a);
  --muted-button: light-dark(#e2e8f0, #253d61);
  --primary-bg: light-dark(#1e3a5f, #2fbf71);
  --primary-text: light-dark(#ffffff, #05200f);
  --primary-hover: light-dark(#2a4c78, #4fd48a);
  --brand: light-dark(#1e3a5f, #e8eef7);
  --check: light-dark(#43a047, #5cc164);
  --glow: light-dark(#1e3a5f14, #34d39922);
  font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme="light"] { color-scheme: light }
:root[data-theme="dark"] { color-scheme: dark }
:root[data-palette="ocean"] {
  --bg: light-dark(#f2f8fa, #0b1a20);
  --rail: light-dark(#e5f1f5, #07141a);
  --surface: light-dark(#ffffff, #10242c);
  --inset: light-dark(#f7fbfc, #0d1e25);
  --line: light-dark(#cde0e7, #1f3b46);
  --text: light-dark(#0f2a33, #ecf6f9);
  --muted: light-dark(#5f727c, #94a8b0);
  --blue: light-dark(#0369a1, #5cc8e8);
  --hover: light-dark(#e3f0f5, #163440);
  --selected: light-dark(#d8edf6, #12333f);
  --muted-button: light-dark(#dcebf0, #1b3a46);
  --primary-bg: light-dark(#0369a1, #38bdf8);
  --primary-text: light-dark(#ffffff, #03202c);
  --primary-hover: light-dark(#075985, #7dd3fc);
  --brand: light-dark(#1e3a5f, #e8f4f8);
  --check: light-dark(#0ea5e9, #38bdf8);
  --glow: light-dark(#0369a114, #38bdf822);
}
:root[data-palette="violet"] {
  --bg: light-dark(#f8f7fc, #15121f);
  --rail: light-dark(#efecf8, #0f0d17);
  --surface: light-dark(#ffffff, #1e1a2d);
  --inset: light-dark(#fbfafe, #181525);
  --line: light-dark(#ddd8ec, #332c49);
  --text: light-dark(#1f1a2e, #f3f0fa);
  --muted: light-dark(#6b7280, #a8a2b8);
  --blue: light-dark(#6d28d9, #c4b5fd);
  --hover: light-dark(#efebf9, #27213b);
  --selected: light-dark(#ebe4fb, #2c2347);
  --muted-button: light-dark(#e7e2f4, #2f2843);
  --primary-bg: light-dark(#5b21b6, #a78bfa);
  --primary-text: light-dark(#ffffff, #190f2e);
  --primary-hover: light-dark(#6d28d9, #c4b5fd);
  --brand: light-dark(#1e3a5f, #f1edfb);
  --check: light-dark(#7c3aed, #a78bfa);
  --glow: light-dark(#6d28d914, #a78bfa22);
}
* { box-sizing: border-box }
body { margin: 0; color: var(--text); background: var(--bg) }
button, input, select, textarea { font: inherit; color: inherit }
button, select, summary { cursor: pointer }
button, select, input, textarea, kbd { border: 1px solid var(--line); border-radius: 6px; background: var(--inset) }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; font-size: 14px; font-weight: 550 }
button:hover, nav a:hover { background: var(--hover) }
a { text-decoration: none; color: inherit }
header { position: fixed; inset: 0 auto 0 0; width: var(--rail-width); background: var(--rail); border-right: 1px solid var(--line); padding: 0 14px }
.brand { display: flex; height: 66px; align-items: center; gap: 11px; padding: 0 9px; font-size: 22px; letter-spacing: -.9px; font-weight: 650 }
.logo { width: 28px; height: 28px; flex-shrink: 0 }
.logo .ring { stroke: var(--brand) }
.logo .check { stroke: var(--check) }
.wm-open { font-weight: 400; color: var(--muted) }
.wm-ff { font-weight: 750; color: var(--brand) }
nav { display: grid; gap: 4px; margin-top: 24px }
nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; color: var(--muted); font-size: 14px; font-weight: 530; border-radius: 6px }
nav a.active { color: var(--blue); background: var(--selected) }
.ic { height: 17px; width: 17px; flex-shrink: 0; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round }
.workspace { margin-left: var(--rail-width) }
.topbar { height: 66px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line) }
#locationLabel, .mode, .date, .counter { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px }
.mode { padding: 7px 11px; background: transparent }
main { max-width: 864px; margin: auto; padding: 44px 32px }
.intro, .captureHead, .row { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.intro { margin-bottom: 20px }
h1, h2, h3, p { margin: 0 }
h1 { font-size: 30px; line-height: 1.2; letter-spacing: -1.2px; font-weight: 600 }
.card, .capture, .panel, dialog { border: 1px solid var(--line); border-radius: 11px; background: var(--surface) }
.card { padding: 27px 30px 22px }
.eyebrow, .sectiontitle, .step b, .note b { display: flex; align-items: center; gap: 8px }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 500 }
.eyebrow .ic, .step b { color: var(--blue) }
.card h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 580; letter-spacing: -1.4px; line-height: 1.17; margin: 13px 0 }
.chips, .actions, .tools, .tabs, .zenbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px; color: var(--muted); font-size: 13px }
.chip .ic { width: 13px; height: 13px }
.step { padding: 1px 0 1px 14px; border-left: 2px solid var(--blue); margin-top: 25px }
.step b, .note b { font-size: 13px; font-weight: 550; margin-bottom: 4px }
.step b .ic, .note b .ic { display: none }
.step p, .note p { font-size: 15px }
.note { margin: 20px 0; color: var(--muted) }
.note p { max-width: 66ch }
.actions { border-top: 1px solid var(--line); padding-top: 16px }
.primary, .save { background: var(--primary-bg); color: var(--primary-text); border-color: transparent }
.primary:hover, .save:hover { background: var(--primary-hover) }
.counter { display: flex; justify-content: center; margin: 12px 0 24px; gap: 7px }
.counter .ic { width: 14px }
.capture, .panel { padding: 21px 25px }
.captureHead { margin-bottom: 13px }
.sectiontitle, .panel h3 { font-size: 18px; letter-spacing: -.5px; font-weight: 580 }
.sectiontitle .ic { color: var(--muted) }
kbd { font: 13px monospace; padding: 1px 6px; color: var(--muted) }
input, select, textarea { padding: 8px 11px; max-width: 100% }
.quickinput { width: 100%; font-size: 15px; padding: 11px 13px }
input::placeholder { color: var(--muted) }
.tools { margin-top: 12px }
.tools select { font-size: 13px; padding: 6px }
.tabs { gap: 1px; background: var(--inset); border-radius: 6px; padding: 3px }
.tabs button { padding: 4px 9px; border: 0; background: transparent; color: var(--muted); font-size: 13px }
.tabs .chosen { background: var(--muted-button); color: var(--text) }
.save { margin-left: auto; padding: 6px 12px }
.panel { margin-bottom: 12px }
.row { padding: 13px 0; border-bottom: 1px solid var(--line) }
.row:last-child { border: 0 }
.row strong { display: block }
.row button { padding: 6px 9px }
small, .subtle { color: var(--muted); font-size: 14px }
.board { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(220px,100%),1fr)); gap: 12px }
dialog { color: var(--text); padding: 24px; width: min(440px,94vw) }
dialog::backdrop { background: #0009 }
dialog h2 { font-size: 22px; letter-spacing: -.6px }
label { display: grid; gap: 5px; margin: 12px 0; font-size: 14px }
dialog .actions { margin-top: 18px }
#toast:not(:empty) { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 10px 18px; z-index: 4 }
#toast button { margin-left: 10px }
.zen header, .zen .topbar, .zen .intro, .zen .counter { display: none }
.zen .workspace { margin-left: 0 }
/* Fokus-Seite pro Konto: nur die Fokuskarte, ohne Navigation und Schnell-Eingabe */
.focus-only header, .focus-only #capture { display: none }
.focus-only .workspace { margin-left: 0 }
.zen .capture { margin-top: 18px }
.zenbar { justify-content: flex-end; margin-bottom: 10px }
.follow { padding: 12px; margin: 15px 0; border: 1px solid var(--line); border-radius: 6px }
.follow button { margin: 5px 3px 0 0 }
p, strong, h2 { overflow-wrap: anywhere }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px }
@media(max-width: 860px) {
  :root { --rail-width: 156px }
  header { padding: 0 9px }
  main { padding: 30px 20px }
}
@media(max-width: 680px) {
  header { position: static; width: 100%; padding: 0 12px 10px; border: 0; border-bottom: 1px solid var(--line) }
  .brand { height: 52px }
  nav { display: flex; justify-content: space-between; margin: 0; gap: 0 }
  nav a { padding: 7px; gap: 5px }
  .workspace { margin: 0 }
  .topbar { position: absolute; top: 9px; right: 13px; height: auto; padding: 0; border: 0 }
  #locationLabel { display: none }
  main { padding: 24px 14px }
  .intro { flex-wrap: wrap; gap: 5px }
  h1 { font-size: 26px }
  .card, .capture, .panel { padding: 18px }
  .row { flex-wrap: wrap }
}

.display-tools, .theme-control { display: flex; align-items: center; gap: 8px }
.display-tools { margin-left: auto }
.theme-control { margin: 0; color: var(--muted); gap: 4px }
.theme-control select { font-size: 13px; background: transparent; border: 0; padding: 6px 2px }

.capture { padding: 0 }
.captureHead { display: block; margin: 0 }
.captureHead button {
  width: 100%; justify-content: flex-start; padding: 16px 22px;
  border: 0; border-radius: 10px; background: transparent;
  font-size: 16px; font-weight: 550;
}
.captureHead button:hover { background: var(--hover) }
.captureHead .ic, .chevron { color: var(--muted) }
.captureHead kbd { margin-left: auto }
.chevron { width: 7px; height: 7px; margin: 0 3px 3px 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) }
[aria-expanded="true"] .chevron { transform: rotate(225deg); margin-bottom: -3px }
#quick { padding: 0 22px 20px }

.note p { white-space: pre-wrap }
.card .note p { max-height: 12rem; overflow-y: auto }
.details-button { margin-left: auto; color: var(--muted); background: transparent }
.task-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px }
.task-links a { display: inline-flex; align-items: baseline; gap: 6px; overflow-wrap: anywhere; color: var(--blue); border-bottom: 1px solid currentColor; font-size: 14px }
.task-links a:hover { color: var(--text) }
.row .task-links { margin: 6px 0 0 }
.link-fields { margin: 18px 0; padding: 0; border: 0 }
.link-fields legend { margin-bottom: 8px; font-size: 15px; font-weight: 600 }
.link-row { padding: 0 12px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 6px }
.link-row button { font-size: 13px; color: var(--muted) }
dialog textarea { resize: vertical }
@media(max-width: 480px) { .details-button { margin-left: 0 } }

.area-check { display: flex; align-items: center; gap: 8px }
@media(max-width: 680px) { nav { overflow-x: auto } nav a { flex-shrink: 0 } }
@media(max-width:680px) {
  .topbar { position: static; padding: 6px 12px; justify-content: flex-end }
  .display-tools { flex-wrap: wrap }
}

/* Design-Feinschliff */
body { transition: background-color .2s ease, color .2s ease }
.card { box-shadow: 0 1px 2px #0000000d, 0 8px 28px var(--glow) }
.card .actions .primary { min-width: 120px }
#clock { --p: 1; position: relative; display: grid; place-items: center; width: 168px; height: 168px; margin: 8px auto 8px 0; border-radius: 50%; font-size: 38px; font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; color: var(--text);
  background: radial-gradient(closest-side, var(--bg) calc(100% - 11px), transparent calc(100% - 10px)), conic-gradient(var(--blue) calc(var(--p) * 360deg), var(--line) 0) }
#clock:empty { visibility: hidden }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 4px }
.login-brand .logo { width: 34px; height: 34px }
.login-brand h1 { letter-spacing: -1px }
.palette-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--check) }

.timer-picker { position: relative }
.timer-picker summary, .zenbar .zen-exit {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px;
  background: transparent; border: 0; border-radius: 5px;
  font-size: 13px; font-weight: 400; color: var(--muted); cursor: pointer;
}
.timer-picker summary::-webkit-details-marker { display: none }
.timer-picker summary::after { content: '▾'; font-size: 10px }
.timer-picker[open] summary::after { transform: rotate(180deg) }
.timer-options {
  position: absolute; z-index: 2; right: 0; top: calc(100% + 4px);
  display: flex; gap: 4px; padding: 5px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface); white-space: nowrap;
}
.zen-exit span { font-size: 18px; line-height: 1 }
.timer-picker summary:hover, .zenbar .zen-exit:hover { color: var(--text); background: var(--hover) }
