/* =========================================================
   ADHS Cockpit — ruhiges, warm-dunkles Farbschema
   Wenige Farben, klare Hierarchie, große Tippflächen.
   ========================================================= */

:root {
  /* Warm-dunkle Basis (Pflaume/Aubergine) */
  --bg:        #18121f;
  --surface:   #241a30;
  --surface-2: #2e2240;
  --line:      #3a2c4d;

  --text:      #efe9f2;
  --muted:     #b3a7c2;
  --faint:     #8a7da0;

  /* Marken-Violett (passt zum App-Icon) */
  --brand:     #8a6cc4;
  --brand-dim: #6d4aa0;

  /* Warmer Akzent + Erledigt-Farbe */
  --accent:    #e9a45e;   /* warmes Bernstein */
  --accent-dim:#b97f44;
  --done:      #7fcf9b;   /* ruhiges Grün für "geschafft" */
  --done-dim:  #4f8f68;
  --freeze:    #6fb3d2;   /* Wochenend-/Freeze-Blau */

  --radius:   18px;
  --radius-s: 12px;
  --tap:      56px;       /* Mindest-Tippfläche */

  --pad: 18px;
  --maxw: 560px;

  --shadow: 0 8px 28px rgba(0,0,0,.35);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* WICHTIG: Das hidden-Attribut MUSS gewinnen.
   Sonst überschreibt ein eigenes display: (z. B. .celebrate/.modal/.update-banner)
   die Browser-Regel [hidden]{display:none} – und das Overlay bleibt sichtbar,
   obwohl es per JS auf hidden gesetzt ist. !important macht das verlässlich. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: calc(86px + var(--safe-bot));
  min-height: 100vh;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }

button { font-family: inherit; cursor: pointer; color: inherit; }

/* ---------- Header ---------- */
.app-header {
  padding: calc(var(--safe-top) + 18px) var(--pad) 6px;
}
.app-header__title { display: flex; align-items: center; gap: 10px; }
.app-header__title h1 { font-size: 1.55rem; margin: 0; }
.brand-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--brand), var(--brand-dim));
  box-shadow: 0 0 0 4px rgba(138,108,196,.16);
}
.app-header__date { margin: 2px 0 0 24px; color: var(--muted); font-size: .92rem; }

/* ---------- Tabs ---------- */
.tab { padding: 8px var(--pad) 24px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.section-title { font-size: 1.05rem; margin: 26px 0 10px; color: var(--text); }
.section-hint { margin: -6px 0 12px; color: var(--muted); font-size: .9rem; }

/* ---------- Hero / Tagesbogen ---------- */
.hero {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px 8px;
  margin-top: 10px;
  box-shadow: var(--shadow);
}
.day-arc { width: 100%; }
.day-arc svg { width: 100%; height: auto; display: block; }
.day-ring-label { text-align: center; color: var(--muted); font-size: .92rem; padding: 2px 0 8px; }
.day-ring-label strong { color: var(--text); }

/* Anker-Punkte am Bogen */
.arc-node { transition: r .3s ease, fill .3s ease; }
.arc-label { fill: var(--muted); font-size: 11px; }

/* ---------- Habit-Liste ---------- */
.habit-list { display: flex; flex-direction: column; gap: 12px; }

.habit {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color .2s ease, background .2s ease;
}
.habit.is-done { border-color: var(--done-dim); background: linear-gradient(180deg, rgba(127,207,155,.08), var(--surface)); }
.habit.is-min  { border-color: var(--accent-dim); background: linear-gradient(180deg, rgba(233,164,94,.07), var(--surface)); }

.habit__top { display: flex; align-items: flex-start; gap: 12px; }
.habit__icon { font-size: 1.5rem; line-height: 1.2; }
.habit__main { flex: 1; min-width: 0; }
.habit__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.habit__time { color: var(--accent); font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.habit__name { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.habit__sentence { font-size: 1.02rem; line-height: 1.35; color: var(--text); }

.habit__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.badge {
  font-size: .78rem; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); display: inline-flex; gap: 5px; align-items: center;
}
.badge.streak { color: var(--accent); border-color: var(--accent-dim); }
.badge.freeze { color: var(--freeze); border-color: #3c5c6b; }
.badge.bundle { color: var(--brand); border-color: var(--brand-dim); }
.badge.level  { color: var(--done); border-color: var(--done-dim); }

.habit__actions { display: flex; gap: 10px; margin-top: 12px; }
.check {
  flex: 1; min-height: var(--tap);
  border-radius: var(--radius-s); border: 1.5px solid var(--line);
  background: var(--surface-2); color: var(--text);
  font-size: 1rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.check:active { transform: scale(.97); }
.check.primary { border-color: var(--done-dim); }
.check.primary.on { background: var(--done-dim); border-color: var(--done); color: #07140c; }
.check.min { flex: 0 0 auto; padding: 0 14px; font-size: .9rem; color: var(--muted); }
.check.min.on { background: var(--accent-dim); border-color: var(--accent); color: #1a1206; }
.check .tick { font-size: 1.15rem; }

.habit__minhint { font-size: .82rem; color: var(--muted); margin-top: 8px; }
.habit__minhint b { color: var(--accent); font-weight: 600; }

/* ---------- Rating ---------- */
.rating { display: flex; flex-direction: column; gap: 12px; }
.rating-row {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
}
.rating-row__label { font-size: .95rem; margin-bottom: 8px; color: var(--muted); }
.rating-row__label b { color: var(--text); }
.scale { display: flex; gap: 8px; }
.scale button {
  flex: 1; min-height: 48px; border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.25rem; transition: transform .1s ease, background .2s ease, border-color .2s ease;
}
.scale button:active { transform: scale(.94); }
.scale button.sel { background: var(--brand-dim); border-color: var(--brand); }
.scale .rt-emoji { font-size: 1.25rem; line-height: 1; }
.scale .rt-ico { display: block; }

/* ---------- Growth ---------- */
.growth-card {
  margin-top: 22px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; display: flex; align-items: center; gap: 14px;
}
.growth-card svg { width: 64px; height: 64px; flex: 0 0 auto; }
.growth-card__text { font-size: .9rem; color: var(--muted); }
.growth-card__text b { color: var(--text); display: block; font-size: 1rem; }

/* ---------- Re-entry (mitfühlend) ---------- */
.reentry {
  background: linear-gradient(180deg, rgba(138,108,196,.16), var(--surface));
  border: 1px solid var(--brand-dim); border-radius: var(--radius);
  padding: 14px 16px; margin-top: 12px;
}
.reentry h3 { margin: 0 0 4px; font-size: 1rem; }
.reentry p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Focus blocks ---------- */
.focus-list { display: flex; flex-direction: column; gap: 12px; }
.focus-step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; transition: border-color .2s ease;
}
.focus-step.active { border-color: var(--brand); background: linear-gradient(180deg, rgba(138,108,196,.10), var(--surface)); }
.focus-step.locked { opacity: .6; }
.focus-step__head { display: flex; align-items: center; gap: 10px; }
.focus-step__num {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line);
}
.focus-step.active .focus-step__num { background: var(--brand-dim); border-color: var(--brand); }
.focus-step__title { flex: 1; font-size: 1.02rem; font-weight: 700; }
.focus-step__state { font-size: .8rem; color: var(--muted); }
.focus-step__body { margin-top: 12px; }
.focus-step__desc { color: var(--muted); font-size: .92rem; margin: 0 0 10px; }

/* ---------- generic controls ---------- */
.btn {
  min-height: var(--tap); width: 100%; border-radius: var(--radius-s);
  border: 1.5px solid var(--brand-dim); background: var(--brand-dim); color: #fff;
  font-size: 1rem; font-weight: 600; transition: transform .12s ease, opacity .2s ease;
}
.btn:active { transform: scale(.98); }
.btn.secondary { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.small { min-height: 44px; width: auto; padding: 0 16px; font-size: .92rem; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

input[type="text"], textarea, select {
  width: 100%; min-height: var(--tap); border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 12px 14px; font-size: 1rem;
}
textarea { min-height: 80px; resize: vertical; line-height: 1.4; }
label.field-label { display: block; font-size: .85rem; color: var(--muted); margin: 12px 0 6px; }

/* ---------- Time-Timer ---------- */
.timer-wrap { text-align: center; }
.timer-svg { width: 220px; max-width: 70vw; height: auto; margin: 6px auto 4px; display: block; }
.timer-digits { font-size: 2.1rem; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .02em; }
.timer-presets { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0; }
.timer-presets button {
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 600;
}
.timer-presets button.sel { border-color: var(--accent); color: var(--accent); }
.timer-controls { display: flex; gap: 10px; justify-content: center; }

/* Parkplatz */
.park-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 8px;
}
.park-item span { flex: 1; }
.park-del { background: none; border: none; color: var(--muted); font-size: 1.2rem; padding: 4px 8px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.checklist li:last-child { border-bottom: none; }

/* ---------- Streak overview / insights / history ---------- */
.streak-overview { display: flex; flex-direction: column; gap: 10px; }
.streak-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px;
}
.streak-row__icon { font-size: 1.3rem; }
.streak-row__name { flex: 1; font-weight: 600; }
.streak-row__stat { text-align: right; font-size: .85rem; color: var(--muted); }
.streak-row__stat b { color: var(--accent); font-size: 1.05rem; }
.level-bar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.level-bar > i { display: block; height: 100%; background: var(--done-dim); border-radius: 999px; }

.insight {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--radius-s); padding: 12px 14px; margin-bottom: 10px; font-size: .95rem;
}
.insight.empty { border-left-color: var(--line); color: var(--muted); }
.insight b { color: var(--accent); }

.history { display: flex; flex-direction: column; gap: 6px; }
.hist-row { display: flex; align-items: center; gap: 6px; }
.hist-day { width: 64px; font-size: .8rem; color: var(--muted); flex: 0 0 auto; }
.hist-cells { display: flex; gap: 5px; flex: 1; }
.hist-cell { width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.hist-cell.done { background: var(--done-dim); border-color: var(--done); }
.hist-cell.min { background: var(--accent-dim); border-color: var(--accent); }
.hist-cell.weekend { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 3px, #2a3642 3px, #2a3642 6px); }

/* ---------- Cards (Mehr) ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
}
.card + .card { margin-top: 0; }
.card p { color: var(--muted); font-size: .92rem; }
.card .note {
  font-size: .85rem; color: var(--muted); background: var(--surface-2);
  border-radius: var(--radius-s); padding: 10px 12px; margin-top: 10px; border: 1px solid var(--line);
}
.card .note b { color: var(--accent); }

.habit-editor { display: flex; flex-direction: column; gap: 10px; }
.editor-row {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
}
.editor-row__main { flex: 1; min-width: 0; }
.editor-row__sentence { font-size: .92rem; color: var(--text); }
.editor-row__name { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Tabbar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: var(--maxw); margin: 0 auto;
  display: flex; background: rgba(36,26,48,.96);
  backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bot); z-index: 40;
}
.tabbar__btn {
  flex: 1; background: none; border: none; color: var(--muted);
  padding: 9px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .72rem; min-height: 58px;
}
.tabbar__btn.is-active { color: var(--brand); }
.tabbar__icon { font-size: 1.25rem; line-height: 1; }

/* ---------- Update banner ---------- */
.update-banner {
  position: fixed; top: var(--safe-top); left: 0; right: 0; max-width: var(--maxw); margin: 0 auto;
  background: var(--brand-dim); color: #fff; padding: 10px 14px; z-index: 60;
  display: flex; align-items: center; gap: 10px; font-size: .9rem;
}
.update-banner span { flex: 1; }
.btn-inline { background: rgba(255,255,255,.18); border: none; color: #fff; padding: 7px 12px; border-radius: 8px; font-weight: 600; }
.btn-inline.ghost { background: transparent; opacity: .8; }

/* ---------- Toast & Celebrate ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bot)); transform: translateX(-50%);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 18px; border-radius: 999px; z-index: 70; box-shadow: var(--shadow);
  font-size: .92rem; max-width: 88%; text-align: center;
  animation: toast-in .25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.celebrate {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(24,18,31,.55); backdrop-filter: blur(2px);
}
.celebrate__box {
  background: linear-gradient(160deg, var(--brand-dim), var(--surface-2));
  border: 1px solid var(--brand); border-radius: 22px; padding: 26px 34px; text-align: center;
  box-shadow: var(--shadow); animation: pop .4s cubic-bezier(.2,.9,.3,1.2);
}
.celebrate__text { font-size: 1.3rem; font-weight: 700; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(10,7,14,.6); }
.modal__card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px 22px 0 0; width: 100%; max-width: var(--maxw);
  padding: 20px var(--pad) calc(28px + var(--safe-bot)); max-height: 88vh; overflow-y: auto;
  animation: sheet-up .28s ease;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal__title { margin: 0 0 6px; font-size: 1.15rem; }
.sentence-preview {
  background: var(--surface-2); border: 1px solid var(--brand-dim); border-radius: var(--radius-s);
  padding: 12px 14px; margin: 14px 0; font-size: 1rem; line-height: 1.4;
}
.sentence-preview .ph { color: var(--muted); font-style: italic; }

/* ---------- Woche / Aufgaben-Planer ---------- */
input[type="date"], input[type="number"] {
  width: 100%; min-height: var(--tap); border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 12px 14px; font-size: 1rem;
}

/* Segmentierte Auswahl (Wichtig/Dringend/Aufwand) */
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; min-height: 48px; border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
  font-weight: 600; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.seg button small { color: var(--muted); font-weight: 400; font-size: .72rem; margin-top: 2px; }
.seg button.on { border-color: var(--brand); background: var(--brand-dim); color: #fff; }
.seg button.on small { color: rgba(255,255,255,.85); }
.seg-3 button { padding: 6px 4px; }
.tk-grid { display: flex; gap: 12px; }
.tk-grid > div { flex: 1; min-width: 0; }

.tk-quad { margin: 12px 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tk-quad__full { color: var(--muted); font-size: .85rem; }
.qbadge { font-size: .72rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.qbadge.q1 { color: var(--accent); border-color: var(--accent-dim); }
.qbadge.q2 { color: var(--brand);  border-color: var(--brand-dim); }
.qbadge.q3 { color: var(--freeze); border-color: #3c5c6b; }
.qbadge.q4 { color: var(--faint);  border-color: var(--line); }

.tk-confirm { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--brand-dim); border-radius: var(--radius-s); padding: 12px 14px; }
.tk-sub { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 6px; }
.tk-sub span { flex: 1; }
.tk-sub__del { background: none; border: none; color: var(--muted); font-size: 1.2rem; padding: 2px 6px; }

/* Tages-Budget */
.wk-daybar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.wk-daybar__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wk-budget { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.wk-budget.over { color: var(--accent); font-weight: 700; }
.wk-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.wk-bar > i { display: block; height: 100%; background: var(--done-dim); border-radius: 999px; transition: width .3s ease; }
.wk-bar > i.over { background: var(--accent); }
.wk-budget-edit { font-size: .85rem; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wk-budget-edit input { width: 76px; min-height: 40px; padding: 6px 8px; }

/* Aufgaben-Karte */
.wk-task { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; }
.wk-task.frog { border-color: var(--accent-dim); background: linear-gradient(180deg, rgba(233,164,94,.08), var(--surface)); }
.frog-hint { font-size: .82rem; color: var(--accent); margin-bottom: 8px; }
.wk-task__row { display: flex; align-items: flex-start; gap: 12px; }
.wk-check { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--done-dim); background: var(--surface-2); color: var(--muted); font-size: 1.3rem; transition: transform .12s ease; }
.wk-check:active { transform: scale(.94); }
.wk-task__main { flex: 1; min-width: 0; background: none; border: none; text-align: left; padding: 0; }
.wk-task__title { color: var(--text); font-size: 1.02rem; line-height: 1.3; }
.wk-task__badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.wk-nudge { margin-top: 10px; font-size: .85rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; }
.link { background: none; border: none; color: var(--brand); text-decoration: underline; padding: 0 2px; font-size: .85rem; cursor: pointer; }

.tk-sublist-view { margin: 10px 0 0 58px; display: flex; flex-direction: column; gap: 6px; }
.tk-subview { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.tk-subview input { width: 18px; height: 18px; flex: 0 0 auto; }
.tk-subview.done { text-decoration: line-through; opacity: .6; }

.wk-done { margin-top: 14px; }
.wk-done summary { color: var(--muted); font-size: .9rem; cursor: pointer; }
.wk-doneitem { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; color: var(--faint); }
.wk-doneitem span { text-decoration: line-through; }
.wk-doneitem .link { text-decoration: none; color: var(--muted); }

/* Wochenübersicht */
.wk-week { display: flex; flex-direction: column; gap: 8px; }
.wk-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; }
.wk-day.is-today { border-color: var(--brand-dim); }
.wk-day__head { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.wk-day__sum { font-variant-numeric: tabular-nums; }
.wk-day__sum.over { color: var(--accent); font-weight: 700; }
.wk-day__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-chip { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--text); font-size: .85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-chip.q1 { border-left-color: var(--accent); }
.wk-chip.q2 { border-left-color: var(--brand); }
.wk-chip.q3 { border-left-color: var(--freeze); }
.wk-chip.q4 { border-left-color: var(--faint); }
.wk-empty { color: var(--faint); }

/* Liste/Foto erfassen */
.lc-photo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.lc-preview { width: 100%; max-height: 240px; object-fit: contain; border-radius: var(--radius-s); border: 1px solid var(--line); margin-bottom: 12px; background: var(--surface-2); }
.lc-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.lc-row.off .lc-title { opacity: .45; text-decoration: line-through; }
.lc-keep { width: 24px; height: 24px; flex: 0 0 auto; }
.lc-title { flex: 1; min-width: 0; min-height: 46px; }
.lc-star { flex: 0 0 auto; width: 42px; height: 46px; border-radius: var(--radius-s); border: 1.5px solid var(--line); background: var(--surface-2); color: var(--faint); font-size: 1.1rem; }
.lc-star.on { color: var(--accent); border-color: var(--accent-dim); }
.lc-del { flex: 0 0 auto; width: 38px; height: 46px; background: none; border: none; color: var(--muted); font-size: 1.3rem; }

/* ---------- Kalender / Tagesübersicht ---------- */
input[type="time"] {
  width: 100%; min-height: var(--tap); border-radius: var(--radius-s);
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 12px 14px; font-size: 1rem;
}
.daybrief {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--brand-dim); border-radius: var(--radius);
  padding: 14px; margin-top: 10px; box-shadow: var(--shadow);
}
.daybrief.is-empty { background: var(--surface); border-color: var(--line); }
.daybrief.weekend { border-color: #3c5c6b; }
.daybrief__top { display: flex; align-items: center; gap: 10px; }
.daybrief__headline { flex: 1; font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.db-refresh { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 1.1rem; }
.db-refresh:active { transform: rotate(90deg); }
.db-error { margin-top: 10px; font-size: .85rem; color: var(--accent); background: var(--surface-2); border: 1px solid var(--accent-dim); border-radius: var(--radius-s); padding: 8px 10px; }
.db-overload { margin-top: 10px; font-size: .88rem; color: var(--accent); background: rgba(233,164,94,.10); border: 1px solid var(--accent-dim); border-radius: var(--radius-s); padding: 9px 11px; }
.db-events { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.db-ev { display: flex; gap: 12px; }
.db-ev__time { flex: 0 0 auto; width: 92px; font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; font-size: .9rem; padding-top: 1px; }
.db-ev__main { flex: 1; min-width: 0; }
.db-ev__title { color: var(--text); line-height: 1.3; }
.db-ev__loc { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.db-ev__leave { color: var(--freeze); font-size: .85rem; margin-top: 2px; }
.db-flags { margin-top: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; }
.db-flags__head { font-size: .82rem; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.db-flag { font-size: .88rem; color: var(--muted); padding: 3px 0; }
.db-gaps { margin-top: 12px; font-size: .88rem; color: var(--muted); }
.db-gaps b { color: var(--text); }
.db-foot { margin-top: 12px; font-size: .78rem; color: var(--faint); }

.cal-feed { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 8px; }
.cal-feed span { flex: 1; min-width: 0; word-break: break-all; }
.cal-feed small { color: var(--faint); }

.wk-cal { color: var(--freeze); font-weight: 600; font-size: .8rem; }
.wk-day.is-blocked { border-color: #3c5c6b; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
