/* =========================================================================
   Northstar design: calm "Bloom" atmosphere (soft lavender/peach light, floating
   white cards, airy type) + clean CRM structure (icon rail, pastel pills,
   thin dividers, green accent). Light by default, dark follows the device.
   ========================================================================= */
:root {
  --bg: #f4f1f8;
  --bg2: #fbfaf7;
  --card: rgba(255, 255, 255, .86);
  --card-solid: #ffffff;
  --text: #1d1b26;
  --muted: #6f6b7d;
  --line: #e9e5ef;
  --accent: #16a34a;          /* CRM green */
  --accent-soft: #e3f6ea;
  --lav: #8b7cf6;             /* Bloom lavender */
  --lav-soft: #efebff;
  --peach: #f6b59a;
  --late: #e5484d;
  --warn: #f5a524;
  --ok: #16a34a;
  --rail: #1d1b26;
  --shadow: 0 1px 2px rgba(29, 27, 38, .04), 0 8px 24px rgba(66, 50, 120, .07);
  --radius: 20px;
  --k-schule: #3b82f6;
  --k-arbeit: #f59e0b;
  --k-privat: #a855f7;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16131f;
    --bg2: #1b1726;
    --card: rgba(36, 31, 50, .82);
    --card-solid: #241f32;
    --text: #efedf5;
    --muted: #a29db3;
    --line: #342e45;
    --accent: #3ccf73;
    --accent-soft: #173d28;
    --lav: #a99bff;
    --lav-soft: #2c2547;
    --rail: #0f0d16;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
/* soft blurred "bloom" light in the background */
.bloom {
  position: fixed; inset: -20vh -10vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 50% at 18% 30%, color-mix(in srgb, var(--lav) 38%, transparent), transparent 70%),
    radial-gradient(35% 45% at 80% 20%, color-mix(in srgb, var(--peach) 40%, transparent), transparent 70%),
    radial-gradient(30% 40% at 55% 70%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  filter: blur(40px); opacity: .9;
}
@media (prefers-color-scheme: dark) { .bloom { opacity: .45; } }

a { color: var(--accent); }
h1, h2, h3 { margin: 0; }

/* ---------------- Layout: rail (laptop) / tabbar (phone) ---------------- */
.shell { margin: 0 auto; padding: 0 16px; }  /* full width: the owner wants to see everything at once */
.rail { display: none; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 4px; }
.crumb { color: var(--muted); font-size: 15px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb b { color: var(--text); font-weight: 600; }
.qa-open { display: none; }

@media (min-width: 900px) {
  body { padding-bottom: 32px; padding-left: 172px; }
  .rail {   /* like Notion: one line per entry, so everything fits without scrolling (2026-11-09) */
    display: flex; flex-direction: column; gap: 1px;
    position: fixed; inset: 0 auto 0 0; width: 172px; padding: 10px 8px; z-index: 20;
    background: var(--rail); overflow-y: auto; scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-logo { display: flex; align-items: center; gap: 8px; padding: 2px 8px 8px; color: #4ade80; font-size: 18px; line-height: 1; text-decoration: none; }
  .rail-logo small { color: #efedf5; font-size: 14px; font-weight: 600; }
  .rail-item {
    display: flex; align-items: center; gap: 9px; padding: 4px 8px; border-radius: 6px; text-decoration: none;
    color: #c9c5d6; min-width: 0;
  }
  .rail-item span { flex: 0 0 18px; font-size: 14px; line-height: 20px; text-align: center; }
  .rail-item small { font-size: 13.5px; line-height: 20px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rail-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
  .rail-item.on { background: rgba(255, 255, 255, .11); color: #fff; }
  .rail-sep { height: 1px; flex: 0 0 1px; background: rgba(255, 255, 255, .1); margin: 5px 8px; }
  .shell { padding: 0 28px; }
  .topbar { padding: 18px 0 6px; }
  .qa-open { display: inline-flex; }
  .tabbar { display: none !important; }
}

/* Phone bottom bar with the big + */
.tabbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; align-items: center; justify-content: space-around;
  background: color-mix(in srgb, var(--card-solid) 88%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 26px; padding: 6px; box-shadow: var(--shadow);
}
.tab { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 0;
       color: var(--muted); text-decoration: none; padding: 6px 2px; border-radius: 18px;
       cursor: pointer; list-style: none; }
.tab span { font-size: 21px; line-height: 1.15; }
.tab small { font-size: 10.5px; font-weight: 600; }
.tab.on { color: var(--text); background: var(--lav-soft); }
.fab {
  flex: 0 0 56px; height: 56px; border-radius: 50%; margin: -22px 4px 0; padding: 0;
  font-size: 30px; font-weight: 400; line-height: 1; color: #fff; border: 4px solid var(--bg);
  background: linear-gradient(140deg, var(--accent), #0e8a3a); box-shadow: 0 8px 20px rgba(22, 163, 74, .35);
}
.more-menu { flex: 1 1 0; position: relative; display: flex; }
.more-menu > summary { width: 100%; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-panel {
  position: absolute; right: 0; bottom: calc(100% + 14px); width: min(330px, 92vw);
  background: var(--card-solid); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 20px 50px rgba(29, 27, 38, .22); padding: 14px;
  columns: 2; column-gap: 14px; max-height: 72vh; overflow-y: auto; z-index: 30;
}
.more-group { display: flex; flex-direction: column; gap: 2px; break-inside: avoid; margin-bottom: 6px; }
.more-title { font: italic 13px var(--serif); color: var(--muted); padding: 7px 8px 2px; }
.more-group a { color: var(--text); text-decoration: none; padding: 7px 8px; border-radius: 10px; font-size: 15px; }
.more-group a.sub { padding: 5px 8px 5px 22px; font-size: 14px; color: var(--muted); }
.more-group a.on, .more-group a:hover { background: var(--lav-soft); color: var(--text); }

/* Sub pages of a main tab (Aufgaben: Schule, Arbeit; Journal: Reflexion; Wachstum: three) */
.subtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
           border-bottom: 1px solid var(--line); margin: 0 0 12px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { flex: none; padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent;
             color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.subtabs a:hover { color: var(--text); }
.subtabs a.on { color: var(--text); border-bottom-color: var(--accent); }

/* Page grid: cards flow in columns on wide screens */
main { padding-top: 6px; }
.page > * { break-inside: avoid; }
@media (min-width: 1100px) {
  .page { column-count: 2; column-gap: 18px; }
  .page > .head, .page > .hero, .page > .stats, .page > .span, .page > .rest,
  .page > .filter-chips { column-span: all; }
  .page.single { column-count: 1; }
}
@media (min-width: 1500px) { .page { column-count: 3; } }
@media (min-width: 2200px) { .page { column-count: 4; } }

/* ---------------- Typography ---------------- */
.head { margin: 10px 2px 16px; }
.head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
@media (min-width: 900px) { .head h1 { font-size: 36px; } }
.head.today-head { margin: 4px 2px 10px; }
.today-head h1 { font-size: 21px; }
@media (min-width: 900px) { .today-head h1 { font-size: 24px; } }
.eyebrow, .hero-label, .more-title { font-family: var(--serif); font-style: italic; }
h2 { font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 0 12px;
     display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
h2 .more { font-weight: 600; color: var(--accent); text-decoration: none; font-size: 14px; margin-left: auto; }
h2 .meta { font-weight: 500; }
.meta { color: var(--muted); font-size: 14px; }
.empty { color: var(--muted); margin: 4px 0; }
.late { color: var(--late); font-weight: 600; }
.back { color: var(--muted); text-decoration: none; margin-right: 4px; }

/* ---------------- Cards ---------------- */
.card {
  background: var(--card); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--radius);
  padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); display: block;
}
details.card > summary { cursor: pointer; }
details.add > summary { font-weight: 600; color: var(--accent); list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* Hero suggestion: big, airy, Bloom-like */
.hero {
  position: relative; overflow: hidden; border-radius: 18px; padding: 12px 16px; margin-bottom: 12px;
  color: #fff; box-shadow: 0 8px 24px rgba(66, 50, 120, .16);
  background: linear-gradient(135deg, #6d5bd0 0%, #9a7be8 45%, #f0a58a 100%);
}
.hero::after { content: ""; position: absolute; inset: auto -20% -60% 30%; height: 120%;
               background: radial-gradient(closest-side, rgba(255, 255, 255, .25), transparent); }
.hero.pause { background: linear-gradient(135deg, #2f8f63, #6cc59a 60%, #d8e9a8); }
.hero.termin { background: linear-gradient(135deg, #3d4fb5, #7b8ef0 60%, #c7b9f5); }
.hero-label { font-size: 13px; opacity: .9; }
.hero-title { font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 2px 0; position: relative; }
.hero-notes, .hero-text { position: relative; opacity: .92; font-size: 14px; }
.hero-notes { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-text { margin: 2px 0 8px; }
.hero-actions { display: flex; gap: 6px; flex-wrap: wrap; position: relative; }
.hero-actions button { padding: 6px 12px; font-size: 14px; min-height: 0; }
.hero button { background: #fff; color: #3a2d7a; }
.hero button.light { background: rgba(255, 255, 255, .22); color: #fff; }
.hero button.ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); }

/* ---------------- Buttons & forms ---------------- */
button, .btn-primary, .btn-soft {
  font: inherit; font-weight: 600; border: 0; border-radius: 14px; padding: 10px 16px;
  background: var(--accent); color: #fff; cursor: pointer; min-height: 42px;
  transition: transform .08s ease, opacity .2s;
}
button:active { transform: scale(.97); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-primary.big { width: 100%; min-height: 52px; font-size: 17px; }
button.light { background: var(--lav-soft); color: var(--text); }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.link { background: none; color: var(--muted); padding: 4px; min-height: 0; font-weight: 500; font-size: 13px; }
button.finish { background: var(--ok); }
form { margin: 0; }
form.busy { opacity: .55; pointer-events: none; }
form.inline { display: inline; }
.form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.form .row, .row { display: flex; gap: 10px; }
.form .row > * { flex: 1; min-width: 0; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-size: 15px; color: var(--text); }
label.check input { width: auto; accent-color: var(--accent); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg2);
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; }

/* ---------------- Pills / chips (CRM style) ---------------- */
.tag, .chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
              padding: 2px 9px; border-radius: 999px; background: var(--lav-soft); color: #5b4bc4; }
.tag.run { background: #fff1d6; color: #9a5a00; }
.tag.prio { background: #fde2e2; color: #c02626; padding: 0 7px; }
.chip.zu-wenig { background: #fde2e2; color: #b42318; }
.chip.wenig { background: #fff1d6; color: #a15c00; }
.chip.gut { background: var(--accent-soft); color: var(--accent); }
.chip.viel { background: #dfe8ff; color: #2f4fb8; }
.tag[class*="cat-"] { background: var(--line); color: var(--muted); }
.tag.cat-uni { background: #e3ecff; color: #2f5bd0; }
.tag.cat-arbeit { background: #fff1d6; color: #a15c00; }
@media (prefers-color-scheme: dark) {
  .tag, .chip { color: #cfc6ff; }
  .tag.run, .chip.wenig, .tag.cat-arbeit { background: #4a3517; color: #ffcf8a; }
  .tag.prio, .chip.zu-wenig { background: #4d1f1f; color: #ffb4ab; }
  .chip.viel, .tag.cat-uni { background: #24335e; color: #a9c0ff; }
}

/* ---------------- Lists ---------------- */
ul { list-style: none; margin: 0; padding: 0; }
.tasks .task {
  display: flex; align-items: center; gap: 10px; padding: 11px 0 11px 12px;
  border-top: 1px solid var(--line); border-left: 4px solid transparent;
  transition: opacity .35s, transform .35s;
}
.tasks .task:first-child { border-top-color: transparent; }
.task.kind-schule { border-left-color: var(--k-schule); }
.task.kind-arbeit { border-left-color: var(--k-arbeit); }
.task.kind-privat { border-left-color: var(--k-privat); }
.task.leaving { opacity: 0; transform: translateX(24px); }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.kind-label { font-weight: 600; }
.task.kind-schule:not(.has-subject) .kind-label { color: var(--k-schule); }
.task.kind-arbeit .kind-label { color: var(--k-arbeit); }
.task.kind-privat .kind-label { color: var(--k-privat); }
.actions { display: flex; gap: 6px; }
.actions button { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 12px; }
.actions button.ghost { color: var(--muted); }

.timeline li, .gaps li, .plain li {
  display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.timeline li:first-child, .gaps li:first-child, .plain li:first-child { border-top: 0; }
.timeline li > span:nth-child(2) { flex: 1; }
.timeline .past { opacity: .45; }
.when { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 96px; }
.gaps li { flex-direction: column; gap: 2px; }
.done-list li { justify-content: space-between; align-items: center; }
.row-link { display: flex; gap: 10px; color: inherit; text-decoration: none; width: 100%; }
.grow { flex: 1; }
.food-list li { align-items: center; flex-wrap: nowrap; }

.friends li { border-top: 1px solid var(--line); padding: 11px 0; }
.friends li:first-child { border-top: 0; }
.friends summary { display: flex; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
.friends li.due summary b::after { content: " 👋"; }

/* ---------------- Filter chips ---------------- */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.fchip { text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line);
         border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); }
.fchip small { color: var(--muted); margin-left: 3px; }
.fchip.on { background: var(--text); border-color: var(--text); color: var(--bg2); }
.fchip.on small { color: var(--bg2); opacity: .7; }
.fchip.kind-schule { box-shadow: inset 3px 0 0 var(--k-schule), var(--shadow); }
.fchip.kind-arbeit { box-shadow: inset 3px 0 0 var(--k-arbeit), var(--shadow); }
.fchip.kind-privat { box-shadow: inset 3px 0 0 var(--k-privat), var(--shadow); }
.fchip.kind-schule.on { background: var(--k-schule); border-color: var(--k-schule); color: #fff; }
.fchip.kind-arbeit.on { background: var(--k-arbeit); border-color: var(--k-arbeit); color: #fff; }
.fchip.kind-privat.on { background: var(--k-privat); border-color: var(--k-privat); color: #fff; }

/* ---------------- Stats ---------------- */
.stats { display: flex; gap: 12px; margin-bottom: 16px; }
.stat { flex: 1; min-width: 0; background: var(--card); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
        border-radius: var(--radius); padding: 14px 16px; color: inherit; text-decoration: none;
        display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--shadow); }
.stat-num { font-size: 30px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-num small { font-size: 15px; color: var(--muted); font-weight: 400; }
.stats.inner { margin: 0 0 12px; }
.stats.inner .stat { box-shadow: none; background: var(--bg2); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 72px; }
.bar { flex: 1; min-height: 3px; background: var(--lav); border-radius: 4px 4px 0 0; opacity: .85; }
.progress-row { margin-bottom: 10px; }
.progress { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* ---------------- Charts (SVG from charts.py) ---------------- */
.chart { width: 100%; height: auto; max-height: 220px; display: block; overflow: visible; }
.chart-title { margin: 10px 0 2px; }
.c-bar { fill: color-mix(in srgb, var(--lav) 45%, transparent); }
.c-bar.now { fill: var(--lav); }
.c-bar.over { fill: #f08a8d; }
.c-goal { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 4; }
.c-goal-lbl { fill: var(--accent); font-size: 10px; font-weight: 600; }
.c-val { fill: var(--muted); font-size: 10px; font-weight: 600; }
.c-lbl { fill: var(--muted); font-size: 11px; }
.c-line { fill: none; stroke: var(--lav); stroke-width: 2.5; stroke-linejoin: round; }
.c-dot { fill: var(--card-solid); stroke: var(--lav); stroke-width: 2; }

/* ---------------- Tables ---------------- */
table { border-collapse: collapse; width: 100%; }
.records th, .balance th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding-bottom: 4px; }
.records td { padding: 7px 6px 7px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.balance td, .balance th { padding: 6px 4px; border-top: 1px solid var(--line); }
.balance th { border-top: 0; }
.balance .num { text-align: right; white-space: nowrap; width: 1%; }
.balance .barcell { width: 45%; }
.mbar { position: relative; height: 8px; background: var(--line); border-radius: 4px; }
.mbar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--muted); }
.mbar span.zu-wenig { background: #e5484d; }
.mbar span.wenig { background: var(--warn); }
.mbar span.gut { background: var(--accent); }
.mbar span.viel { background: var(--lav); }
.mbar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .5; }
.insights p { margin: 8px 0; }

/* ---------------- Gym ---------------- */
.routines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.routine { border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; background: var(--bg2); }
.routine > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.routine-items { margin-top: 8px; }
.routine-items li { align-items: center; padding: 5px 0; }
.exicon { width: 100%; height: 100%; display: block; }
.exicon .eq { stroke: var(--lav); }
.ex-icon { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; padding: 5px;
           background: var(--lav-soft); color: var(--text); }
.ex-icon.sm { flex-basis: 30px; width: 30px; height: 30px; padding: 3px; }
.ex-head { display: flex; align-items: center; gap: 12px; }
.ex-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.exercise { padding: 10px 0; border-top: 1px solid var(--line); }
.exercise:first-child { border-top: 0; padding-top: 0; }
.exercise .ex-head { margin-bottom: 6px; }
.sets td { padding: 4px 6px 4px 0; font-variant-numeric: tabular-nums; }
.sets td:first-child { color: var(--muted); width: 28px; font-weight: 700; }
.sets tr.warmup { color: var(--muted); }
.live-head { display: flex; justify-content: space-between; align-items: baseline; }
.exercise-card.done { opacity: .78; }
.exercise-card.done .ex-name b::after { content: " ✓"; color: var(--ok); }
details.tip summary { color: var(--lav); font-size: 13px; cursor: pointer; list-style: none; margin-top: 6px; }
.setgrid { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.sg-head, .sg-row { display: grid; grid-template-columns: 38px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 46px;
                    gap: 6px; align-items: center; }
.sg-head span { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; }
.sg-head span:nth-child(2) { text-align: left; }
.sg-row { padding: 3px 0; border-radius: 12px; transition: background .2s; }
.sg-row input { text-align: center; padding: 9px 4px; font-weight: 600; }
.sg-row .sg-no { text-align: center; font-weight: 700; color: var(--muted); background: none; padding: 0; min-height: 0; font-size: 15px; }
button.sg-no { color: var(--text); text-decoration: underline dotted; }
.sg-prev { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-check { padding: 0; height: 40px; min-height: 0; font-size: 18px; background: var(--line); color: var(--muted); }
.sg-row.logged { background: var(--accent-soft); }
.sg-row.logged .sg-check { background: var(--ok); color: #fff; }
.sg-row.logged input { background: transparent; border-color: transparent; }
.sg-row.warmup .sg-no { color: var(--warn); }
.ex-actions { display: flex; justify-content: space-between; margin-top: 6px; }
.ex-actions .add-set { font-weight: 700; color: var(--accent); font-size: 15px; }
.setform { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.setform input { min-width: 0; flex: 1; text-align: center; }
.setform button { flex: 0 0 52px; padding: 0; font-size: 20px; }
.discard { text-align: center; margin-bottom: 20px; }
.rest {
  position: sticky; top: 8px; z-index: 15; margin: 0 0 12px; padding: 12px 16px; border-radius: 18px;
  display: flex; align-items: center; gap: 12px; color: #fff; box-shadow: var(--shadow);
  background: linear-gradient(135deg, #6d5bd0, #9a7be8);
}
.rest b { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; flex: 1; }
.rest .link { color: #fff; font-size: 15px; }
.rest.over { background: linear-gradient(135deg, #16a34a, #6cc59a); }

/* ---------------- Habits ---------------- */
.habit-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.habit-tile { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
              background: var(--bg2); color: var(--text); border: 1px solid var(--line); padding: 13px;
              text-align: left; min-height: 88px; font-weight: 600; border-radius: 18px; text-decoration: none; }
.habit-tile .h-emoji { font-size: 22px; }
.habit-tile .h-streak { font-size: 12px; color: var(--muted); font-weight: 600; }
.habit-tile.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.habit-tile.on .h-name::after { content: " ✓"; color: var(--accent); }
.habit-chips, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hchip { background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
         padding: 7px 13px; min-height: 0; font-size: 14px; font-weight: 600; text-decoration: none; display: inline-flex; gap: 4px; }
.hchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.hchip small { font-weight: 600; opacity: .85; }
.chips .chip { border: 0; cursor: pointer; }
.hgrid-wrap { overflow-x: auto; }
.hgrid { border-collapse: separate; border-spacing: 3px; width: auto; }
.hgrid th { font-size: 11px; color: var(--muted); font-weight: 600; text-align: center; line-height: 1.2; }
.hgrid th.today { color: var(--accent); }
.hg-name { font-size: 13px; white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.hgrid .dot { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 7px; font-size: 12px;
              background: var(--line); color: #fff; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.hgrid .dot.on { background: var(--accent); }

/* ---------------- Journal / Kommunikation / Gedanken ---------------- */
.journal-card textarea { font-size: 16px; line-height: 1.55; min-height: 140px; }
.moods { display: flex; gap: 6px; }
.mood { flex: 1; flex-direction: row; justify-content: center; cursor: pointer; }
.mood input { position: absolute; opacity: 0; width: 0; height: 0; }
.mood span { display: block; width: 100%; text-align: center; font-size: 26px; padding: 6px 0;
             border-radius: 14px; border: 1px solid var(--line); filter: grayscale(1); opacity: .55; }
.mood input:checked + span { filter: none; opacity: 1; border-color: var(--lav); background: var(--lav-soft); }
.jentry { padding: 10px 0; border-top: 1px solid var(--line); }
.jentry:first-of-type { border-top: 0; }
.jentry p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.jdate { font-weight: 700; color: var(--lav); text-decoration: none; font-size: 14px; }
.challenge .ch-title { font-size: 21px; font-weight: 600; margin: 2px 0 6px; line-height: 1.25; letter-spacing: -.01em; }
.challenge.gemacht { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.ch-done { color: var(--accent); font-weight: 700; }
.challenge details summary { cursor: pointer; margin-bottom: 6px; }
.challenge .hero-actions { margin-top: 4px; }
.challenge .hero-actions button.ghost { color: var(--text); }
.leitsatz { margin-top: 14px; padding: 12px 14px; border-radius: 16px; display: flex; flex-direction: column; gap: 2px;
            background: linear-gradient(135deg, var(--lav-soft), color-mix(in srgb, var(--peach) 22%, var(--card-solid))); }
.leitsatz > .meta:first-child { font: italic 13px var(--serif); }
.principles { columns: 2 280px; column-gap: 14px; }
.principle { break-inside: avoid; border-top: 1px solid var(--line); padding: 9px 0; }
.principle summary { cursor: pointer; list-style: none; }
.principle summary::after { content: " ›"; color: var(--muted); }
.principle[open] summary::after { content: " ⌄"; }
.pbody { white-space: pre-wrap; margin-top: 6px; font-size: 15px; }
.note-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.hist .grow { min-width: 0; }
.arch-year { border-top: 1px solid var(--line); padding: 9px 0; }
.arch-year > summary { cursor: pointer; list-style: none; font-size: 17px; }
.arch-year .principle { margin-left: 10px; }
.learning p { margin: 6px 0; }
.tomorrow { background: linear-gradient(160deg, var(--card), color-mix(in srgb, var(--lav-soft) 60%, var(--card))); }
.tm-cols { display: grid; grid-template-columns: 1fr; gap: 6px 22px; }
@media (min-width: 720px) { .tm-cols { grid-template-columns: 1fr 1fr; } }
.tm-sub { margin: 4px 0; font-weight: 600; }
details.area > summary { display: flex; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
details.area[open] > summary { margin-bottom: 8px; }
details.area .tasks { margin-bottom: 8px; }
.inline-add .row { align-items: center; }
.inline-add .row button { flex: 0 0 48px; }
.inline-ticks { display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* ---------------- Quick add sheet ---------------- */
dialog.sheet {
  border: 0; padding: 0; width: min(520px, 100%); max-width: 100%; border-radius: 26px;
  background: var(--card-solid); color: var(--text); box-shadow: 0 30px 80px rgba(29, 27, 38, .35);
}
dialog.sheet::backdrop { background: rgba(29, 27, 38, .35); backdrop-filter: blur(4px); }
@media (max-width: 899px) {
  dialog.sheet { margin: auto 0 0; width: 100%; border-radius: 26px 26px 0 0;
                 padding-bottom: env(safe-area-inset-bottom); }
}
.qa-form { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.qa-form input[name=title] { font-size: 18px; padding: 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head b { font-size: 18px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex-direction: row; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
            font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.seg input:checked + span { background: var(--text); color: var(--bg2); border-color: var(--text); }
.qa-school { display: flex; flex-direction: column; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.qa-school[hidden] { display: none; }
.qa-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
         background: var(--text); color: var(--bg2); padding: 10px 16px; border-radius: 14px; font-weight: 600;
         opacity: 0; pointer-events: none; transition: all .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* ---------------- Login ---------------- */
.login-body { padding: 0; min-height: 100vh; display: flex; }
.login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: min(400px, 100%); background: var(--card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
              border: 1px solid var(--line); border-radius: 28px; padding: 32px 24px; text-align: center;
              box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.login-logo { font-size: 44px; color: var(--accent); line-height: 1; }
.login-card h1 { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.eyebrow { color: var(--muted); margin: -6px 0 8px; }
.login-msg { min-height: 1.5em; margin: 0; color: var(--accent); font-weight: 600; }
.login-msg.bad { color: var(--late); }
.login-more summary { cursor: pointer; margin-bottom: 8px; }

/* Recover-Modus und Reset (migration 010, hidden until enabled) */
.hero.recover { background: linear-gradient(135deg, #4b6a8f, #8fb3c9 60%, #e6d9c3); }
.hero.reset { background: linear-gradient(135deg, #2f6f73, #6fb3a8 60%, #dfe8c8); }
.hero .recover-task { font-size: 17px; margin-top: 6px; }
.hero .recover-task small { font-size: 14px; opacity: .85; font-weight: 500; }
.hero button.recover-off { color: #fff; opacity: .85; position: relative; }
.recover-offer > summary { font-weight: 600; }
.reset-link { display: inline-block; margin: 0 0 12px; padding: 6px 12px; border-radius: 999px;
              border: 1px solid var(--line); color: var(--muted); font-size: 14px; text-decoration: none; }
.reset-link.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.reset-start { display: flex; gap: 10px; margin: 14px 0; }
.reset-start form { flex: 1; }
.reset-start button { width: 100%; }
.reset-ideas { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.reset-idea { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
              background: var(--lav-soft); color: var(--text); font-weight: 400; }
.reset-idea.on { outline: 2px solid var(--accent); }
.reset-idea .ri-icon { font-size: 26px; }

/* Wetter dort, wo the owner ist */
.wx-list { list-style: none; padding: 0; margin: 2px 0 6px; display: flex; flex-direction: column; gap: 4px; }
.wx-list li { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.wx-list .meta { font-size: 11.5px; }
.wx-icon { font-size: 13px; width: 16px; text-align: center; }
.wx-main { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-temp { font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.wx-list li.wet .wx-temp { color: #2f4fb8; }

/* Gedanken-Themen: ruhig, eigene Farbe (Petrol), kein Datum */
.thoughts { border-left: 4px solid #2f7f86; }
.thoughts > summary { list-style: none; }
.thought > summary { color: #2f7f86; font-weight: 600; }
.thought-claude { display: inline-block; margin: 8px 0; text-decoration: none; }

/* ---- Exams & submissions (fixed deadline) + documents ---- */
:root { --k-deadline: #64748b; }
.dl-word { font-weight: 700; color: color-mix(in srgb, var(--subject, var(--text)) 55%, var(--text)); }
.has-subject .kind-label { display: inline-block; padding: 0 7px; border-radius: 999px; font-weight: 700;
  background: var(--subject); color: #14121f; }
.arch-row.has-subject { border-left: 4px solid var(--subject); padding-left: 10px; }
.bday-idea { display: block; }
.fp-more { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.fchip.kind-deadline { box-shadow: inset 3px 0 0 var(--k-deadline), var(--shadow); }
.fchip.kind-deadline.on { background: var(--k-deadline); border-color: var(--k-deadline); color: #fff; }
a.task-title { color: inherit; text-decoration: none; }
a.task-title:hover { text-decoration: underline; }
.doclink { color: var(--lav); text-decoration: none; font-weight: 600; }
.task-card { border-left: 5px solid var(--k-privat); }
.task-card.kind-schule { border-left-color: var(--k-schule); }
.task-card.kind-arbeit { border-left-color: var(--k-arbeit); }
.task-card.kind-deadline { border-left-color: var(--k-deadline); }
.doclist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.doclist li:first-child { border-top: 0; }
.doc-ico { font-size: 26px; flex: 0 0 auto; }
.doclist .grow { min-width: 0; display: flex; flex-direction: column; }
.doc-name { font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.doc-name:hover { text-decoration: underline; }
.doclist .meta a { color: var(--muted); }
.upload { margin-top: 12px; }
.dropzone { position: relative; border: 2px dashed var(--line); border-radius: 16px; padding: 18px;
            text-align: center; cursor: pointer; color: var(--text); font-size: 15px; font-weight: 600; }
.dropzone:hover { border-color: var(--lav); background: var(--lav-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
/* ---- Bibliothek: bookshelf ---- */

.shelf-card { padding-bottom: 0; overflow: hidden; }
.shelf {
  display: flex; align-items: flex-end; gap: 5px; flex-wrap: wrap; min-height: 120px;
  padding: 26px 14px 0; margin: 0 -18px; position: relative;
  background: linear-gradient(180deg, transparent 0, color-mix(in srgb, #8a5a32 6%, transparent) 100%);
  border-bottom: 16px solid #8a5a32;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15), 0 6px 10px -6px rgba(0, 0, 0, .35);
}
@media (prefers-color-scheme: dark) { .shelf { border-bottom-color: #5c3b20; } }
.spine {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  width: var(--w); height: var(--h); padding: 10px 0 8px; text-decoration: none; color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 72%, #000) 0, var(--c) 18%, var(--c) 82%,
                                     color-mix(in srgb, var(--c) 70%, #000) 100%);
  border-radius: 3px 3px 1px 1px; box-shadow: 1px 0 0 rgba(0, 0, 0, .25), inset 0 6px 0 rgba(255, 255, 255, .12);
  transition: transform .25s cubic-bezier(.2, .8, .3, 1.3), box-shadow .25s; transform-origin: bottom center;
}
.spine::before, .spine::after {  /* little gold bands */
  content: ""; position: absolute; left: 4px; right: 4px; height: 2px; background: rgba(255, 230, 160, .55);
}
.spine::before { top: 6px; }
.spine::after { bottom: 22px; }
.spine:hover, .spine:focus-visible {
  transform: translateY(-16px) rotate(-3deg); z-index: 2;
  box-shadow: 6px 10px 16px rgba(0, 0, 0, .3);
}
.spine-title {
  writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  max-height: calc(var(--h) - 54px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
}
.spine-author { font-size: 9.5px; opacity: .85; writing-mode: vertical-rl; transform: rotate(180deg); }
.spine-stars { position: absolute; bottom: 4px; font-size: 8px; color: #ffe08a; }
.spine-progress { position: absolute; left: 0; bottom: 0; width: 3px; background: #fff; opacity: .8; border-radius: 0 2px 0 0; }
.spine.reading::after { background: #fff; height: 3px; }
.shelf-empty { padding: 0 6px 18px; }

/* Reading card on Heute + book page */
.reading-row { display: flex; gap: 14px; align-items: center; }
.mini-spine { flex: 0 0 22px; height: 64px; border-radius: 3px; background: var(--c);
              box-shadow: inset -4px 0 0 rgba(0, 0, 0, .18); transition: transform .2s; }
.mini-spine:hover { transform: translateY(-4px) rotate(-3deg); }
.book-title { font-weight: 700; font-size: 17px; color: var(--text); text-decoration: none; }
.page-plus { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.page-plus button { min-height: 40px; padding: 8px 14px; }
.plus-custom { display: flex; gap: 6px; flex: 1 1 160px; }
.plus-custom input { min-width: 0; padding: 9px 10px; }
.plus-custom button { flex: 0 0 44px; padding: 0; font-size: 20px; }
.book-hero { display: flex; gap: 18px; align-items: flex-start; }
.book-cover { flex: 0 0 96px; height: 140px; border-radius: 4px 8px 8px 4px; padding: 12px 10px; color: #fff;
              font-weight: 700; font-size: 13px; line-height: 1.25; overflow: hidden;
              background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #000) 0 8px, var(--c) 8px);
              box-shadow: 4px 6px 14px rgba(0, 0, 0, .25); }
.book-h1 { font-size: 24px; letter-spacing: -.01em; margin: 6px 0 2px; }
.swatch { display: inline-block; width: 28px; height: 28px; border-radius: 50%; padding: 0 !important; border: 2px solid transparent !important; }
.seg input:checked + .swatch { border-color: var(--text) !important; background-clip: padding-box; outline: 2px solid var(--bg2); }
/* ---- App verbinden ---- */
.pair-code { font: 700 40px/1.2 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .12em; margin: 4px 0 8px; color: var(--text); }
/* Sicherheit */
.sec-list { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 10px; }
.sec-list li { display: flex; flex-direction: column; gap: 2px; }
.sec-list li.bad b { color: #b42318; }
.stat.warn .stat-num { color: #b42318; }

/* =========================================================================
   Work mode (Thu + Fri 7-19, see work_mode in app.py): pastel red interface
   ========================================================================= */
body.work {
  --bg: #fbf0ef;
  --bg2: #fdf6f5;
  --line: #f1dedc;
  --accent: #d0505f;          /* rose red instead of green */
  --accent-soft: #fde3e5;
  --lav: #ef9a9a;             /* bloom light: pastel red + peach */
  --lav-soft: #fde8e7;
  --peach: #f7c3ae;
  --rail: #3b1e23;
  --shadow: 0 1px 2px rgba(60, 20, 25, .04), 0 8px 24px rgba(150, 60, 70, .08);
}
@media (prefers-color-scheme: dark) {
  body.work {
    --bg: #1f1517;
    --bg2: #26191c;
    --card: rgba(48, 30, 34, .82);
    --card-solid: #301e22;
    --line: #4a2e33;
    --accent: #f08c98;
    --accent-soft: #3d2026;
    --lav: #e07b84;
    --lav-soft: #3a2328;
    --peach: #c98a76;
    --rail: #170e10;
  }
}
body.work .hero:not(.pause):not(.termin):not(.recover):not(.reset) {
  background: linear-gradient(135deg, #d9606c 0%, #ec9a9a 50%, #f6c6ae 100%);
  box-shadow: 0 8px 24px rgba(170, 60, 70, .16);
}
body.work .hero button:not(.light):not(.ghost):not(.link) { color: #8f2a36; }
.work-card { border-left: 4px solid var(--accent); }
.work-card .form.row { margin-top: 12px; flex-direction: row; align-items: stretch; }
.work-card .form.row input { flex: 1; }
.work-card .form.row button { flex: 0 0 52px; }
body.work { --k-arbeit: #d0505f; }
body.work .fab { background: linear-gradient(140deg, #e0707b, #b83c4b); box-shadow: 0 8px 20px rgba(184, 60, 75, .35); }

/* =========================================================================
   Abend-Modus (2026-11-16): after "Abendroutine starten" every page looks like the jazz bar
   of /abendroutine: wine red walls, warm lamp light, cream text. Always dark, also on a light phone.
   ========================================================================= */
body.abend {
  --bg: #170809;
  --bg2: #1d0a0c;
  --card: rgba(46, 16, 19, .86);
  --card-solid: #2e1013;
  --text: #f4e4d2;
  --muted: #c09a8c;
  --line: rgba(255, 120, 100, .16);
  --accent: #ff6b57;          /* lamp red */
  --accent-soft: #4a1a1c;
  --lav: #ffb862;             /* bloom: amber lamps + red */
  --lav-soft: #3d1a14;
  --peach: #ff4b3a;
  --rail: #0c0506;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35), 0 0 30px rgba(255, 75, 58, .05);
  --k-arbeit: #ffb862;
  color-scheme: dark;
  background: radial-gradient(120% 70% at 80% 100%, #2a0c0f 0%, #170809 55%, #0c0506 100%) fixed;
}
body.abend .bloom { opacity: .35; }
body.abend .hero:not(.pause):not(.termin):not(.recover):not(.reset) {
  background: linear-gradient(135deg, #5a1418 0%, #8c2a22 55%, #c46a3a 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 30px rgba(255, 75, 58, .12);
}
body.abend .hero button:not(.light):not(.ghost):not(.link) { color: #5a1418; }
body.abend .fab { background: linear-gradient(140deg, #ff6b57, #b8322a); box-shadow: 0 8px 22px rgba(255, 75, 58, .35); }
body.abend .tab.on { background: #4a1a1c; color: #ffd9a8; }
body.abend h1, body.abend .crumb b { font-family: var(--jb-display, "Bodoni 72", "Didot", Georgia, serif); letter-spacing: .01em; }
body.abend input, body.abend textarea, body.abend select { background: #1d0a0c; color: var(--text); border-color: var(--line); }

/* "Heute erledigt" line at the bottom of Heute */
.done-today { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 20px; }
.done-today a { text-decoration: none; padding: 4px 10px; border-radius: 999px;
                background: var(--accent-soft); color: var(--accent); font-size: 13px; }

/* ---------------- Aufgaben: Liste / Board ---------------- */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.view-toggle { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
               padding: 3px; box-shadow: var(--shadow); }
.view-toggle a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px;
                 padding: 6px 14px; border-radius: 999px; }
.view-toggle a.on { background: var(--text); color: var(--bg2); }
.tag.wait { background: #e6f0ff; color: #2c5aa8; }
@media (prefers-color-scheme: dark) { .tag.wait { background: #22324f; color: #a9c4ff; } }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.card-head .view-toggle { box-shadow: none; }
.card-head .view-toggle a { padding: 4px 10px; font-size: 13px; }

/* With a board on the page it may use the whole screen width */
.shell:has(.board-wrap) { max-width: none; }
.page.board-page { column-count: 1; }

/* Board = grid: 4 status columns, rows by due date (lane button spans the full row) */
.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 6px 10px; overflow-x: auto;
         margin: 0 -16px 8px; padding: 2px 16px 10px; -webkit-overflow-scrolling: touch; }
@media (min-width: 1000px) {
  .board { grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin: 0 0 8px; padding: 2px 0 10px; }
}
.bhead { position: sticky; top: 0; z-index: 2; font-weight: 700; font-size: 15px; padding: 10px 12px;
         background: var(--card); border: 1px solid var(--line); border-radius: 14px; display: flex; align-items: center; gap: 6px; }
.bhead small, .blane small, .barchive > summary .bcount {
  color: var(--muted); font-weight: 600; background: var(--line); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.bhead small { margin-left: auto; }
.blane { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 4px 2px;
         background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--text);
         font: 600 14px var(--sans, inherit); text-align: left; cursor: pointer; min-height: 0; box-shadow: none; }
.blane span { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 8px; }
.blane::before { content: '▾'; color: var(--muted); transition: transform .2s; position: sticky; left: 0; }
.blane[aria-expanded="false"]::before { transform: rotate(-90deg); }
.blane.empty { color: var(--muted); font-weight: 500; }
.blane[data-lane="heute"] { color: var(--accent); }
.bcell { display: flex; flex-direction: column; gap: 6px; min-height: 44px; padding: 6px; border-radius: 14px;
         background: color-mix(in srgb, var(--card) 55%, transparent); border: 1px dashed transparent;
         transition: background .15s, border-color .15s; }
.bcell.closed { display: none; }
.bcell.over, .barchive.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.bcard { position: relative; display: flex; gap: 8px; align-items: flex-start; background: var(--bg2);
         border: 1px solid var(--line); border-left: 4px solid var(--k-privat); border-radius: 12px; padding: 7px 4px; }
.bcard.kind-schule { border-left-color: var(--k-schule); }
.bcard.kind-arbeit { border-left-color: var(--k-arbeit); }
.bcard.kind-deadline { border-left-color: var(--k-deadline); }
.bcard.kind-schule:not(.has-subject) .kind-label { color: var(--k-schule); }
.bcard.kind-arbeit .kind-label { color: var(--k-arbeit); }
.bcard.kind-privat .kind-label { color: var(--k-privat); }
.bcard.kind-deadline .kind-label { color: var(--k-deadline); }
.bcard .task-title { font-size: 14px; line-height: 1.3; }
.bcard .meta { font-size: 12px; }
.bcol-erledigt .bcard, .barchive .bcard { opacity: .72; }
.bcol-erledigt .task-title, .barchive .task-title { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.bgrip { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; color: var(--muted);
         font-size: 18px; line-height: 1; padding: 4px 4px; margin-top: -2px; border-radius: 8px; }
.bgrip:hover { background: var(--line); }
.bcard.dragging { opacity: .3; }
.bghost { position: fixed; z-index: 100; pointer-events: none; transform: rotate(2deg); opacity: .95;
          box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.bmove { position: relative; }
.bmove summary { list-style: none; cursor: pointer; color: var(--muted); padding: 2px 8px; border-radius: 8px; font-weight: 700; }
.bmove summary::-webkit-details-marker { display: none; }
.bmove[open] summary { background: var(--line); }
.bmove-menu { position: absolute; right: 0; top: 28px; z-index: 60; width: 190px; background: var(--bg2); border: 1px solid var(--line);
              border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.bmove-menu form { margin: 0; }
.bmove-menu button { width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.bmove-menu button:hover { background: var(--line); }
.badd { margin-bottom: 10px; max-width: 560px; flex-wrap: nowrap; }
.badd input { min-width: 0; flex: 1; }
.badd button { flex: 0 0 auto; width: 46px; padding: 0; }

.barchive { display: block; padding: 10px 14px; margin-top: 6px; background: color-mix(in srgb, var(--card) 70%, transparent);
            border: 1px solid var(--line); border-radius: var(--radius); }
.barchive > summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; display: flex;
                      align-items: center; gap: 8px; flex-wrap: wrap; }
.barchive > summary::-webkit-details-marker { display: none; }
.barchive > summary::after { content: '▾'; color: var(--muted); margin-left: auto; transition: transform .2s; }
.barchive[open] > summary::after { transform: rotate(180deg); }
.barchive > summary .meta { font-weight: 400; font-size: 12.5px; }
.barchive .bcards { display: none; }
.barchive[open] .bcards { margin-top: 10px; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card .board-wrap .board { margin-left: -6px; margin-right: -6px; padding-left: 6px; padding-right: 6px; }
@media (min-width: 1100px) { .card .board-wrap .board { margin: 0 0 8px; padding: 2px 0 10px; } }

/* ---------------- Heute: top card + small "Heute in Zahlen" card ---------------- */
.top-row { display: grid; gap: 14px; margin-bottom: 14px; }
.top-row > * { margin: 0; min-width: 0; }
@media (min-width: 900px) { .top-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }
.fmaps { align-items: stretch; }
@media (min-width: 900px) { .fmaps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 900px) { .fmaps:has(> :only-child) { grid-template-columns: 1fr; } }
.fmap-card { display: flex; flex-direction: column; }
.fmap { position: relative; margin: 6px 0 0; flex: 1; display: flex; align-items: center; }
.fmap img, .fmap svg { width: 100%; height: auto; display: block; }
.fmap svg { position: absolute; inset: 0; height: 100%; overflow: visible; }
.fmaps:has(> :only-child) .fmap { max-width: 760px; margin-inline: auto; width: 100%; }
.fdot circle { fill: var(--lav, #8b7cf6); stroke: var(--bg2); stroke-width: .8; }
.fdot.fam circle { fill: var(--accent); }
.fdot:hover circle { stroke: var(--text); }
.fnum { fill: #fff; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.flegend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.flegend span { display: inline-flex; align-items: center; gap: 5px; cursor: default; }
.flegend i { width: 8px; height: 8px; border-radius: 50%; background: var(--lav, #8b7cf6); }
.flegend .fam i { background: var(--accent); }
.flegend small { font-weight: 700; color: var(--text); }
.fedit { margin-top: 6px; }
.fedit > summary { cursor: pointer; }
.family-card h2 .meta { font-weight: 400; }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.fam-grid li { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 14px;
               background: var(--bg2); border: 1px solid var(--line); }
.fam-grid li.fam-due { border-color: color-mix(in srgb, var(--accent) 60%, transparent);
                       background: color-mix(in srgb, var(--accent) 8%, var(--bg2)); }
.fam-state { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.fam-due .fam-state { color: var(--accent); font-weight: 600; }
.fam-log { margin-bottom: 10px; }
.fam-log > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.fam-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; }

/* ---------------- Top bar: page button ---------------- */
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.page-add { display: inline-flex; font-size: 14px; padding: 7px 12px; min-height: 0; }

/* ---------------- Kalender: navigation ---------------- */
.cal-title { font-size: .55em; font-weight: 500; color: var(--muted); margin-left: 6px; }
.cal-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-btn { text-decoration: none; color: var(--text); background: var(--card); border: 1px solid var(--line);
           border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); }
.cal-hint { margin: 6px 2px 12px; }
.kind-schule { --k: var(--k-schule); }
.kind-arbeit { --k: var(--k-arbeit); }
.kind-privat { --k: var(--k-privat); }
.kind-deadline { --k: var(--k-deadline); }

/* ---------------- Kalender: Woche (time grid) ---------------- */
.wk { overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; -webkit-overflow-scrolling: touch; }
.wk-inner { --hour: 46px; min-width: 820px; background: var(--card); border: 1px solid var(--line);
            border-radius: var(--radius); overflow: hidden; }
.wk-row { display: grid; grid-template-columns: 54px repeat(7, minmax(0, 1fr)); }
.wk-head { border-bottom: 1px solid var(--line); }
.wk-corner { padding: 8px 6px; font-size: 11px; position: sticky; left: 0; background: var(--card); z-index: 3; }
.wk-day { display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px; gap: 2px; }
.wk-day small { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.wk-day b { font-size: 22px; font-weight: 400; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.wk-day.today small { color: var(--accent); }
.wk-day.today b { background: var(--accent); color: #fff; font-weight: 600; }
.wk-top { border-bottom: 1px solid var(--line); }
.wk-topcell { display: flex; flex-direction: column; gap: 3px; padding: 4px 3px; min-height: 30px;
              border-left: 1px solid var(--line); max-height: 132px; overflow-y: auto; }
.wk-chip { flex-shrink: 0; display: flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.25; border-radius: 6px;
           padding: 2px 5px; background: color-mix(in srgb, var(--k, var(--lav)) 18%, transparent);
           border-left: 3px solid var(--k, var(--lav)); overflow: hidden; }
.wk-chip a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-chip.ev { background: var(--k, var(--lav)); color: #fff; border: 0; white-space: nowrap; text-overflow: ellipsis; display: block; }
.wk-chip.late a { color: #c0392b; font-weight: 600; }
.wk-chip form { margin: 0; flex: 0 0 auto; }
.wk-chip button { min-height: 0; width: 18px; height: 18px; padding: 0; border-radius: 5px; font-size: 11px; line-height: 1; }
.wk-body { position: relative; }
.wk-times { position: sticky; left: 0; z-index: 3; background: var(--card); }
.wk-times span { display: block; height: var(--hour); font-size: 11px; color: var(--muted); text-align: right;
                 padding-right: 6px; transform: translateY(-7px); }
.wk-times span:first-child { transform: none; }
.wk-col { position: relative; height: calc(var(--hours) * var(--hour)); border-left: 1px solid var(--line); cursor: copy;
          background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px var(--hour)); }
.wk-col.today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.wk-ev { position: absolute; border-radius: 8px; padding: 3px 6px; font-size: 11.5px; line-height: 1.25; overflow: hidden;
         background: var(--k, var(--lav)); color: #fff; cursor: default;
         box-shadow: 0 0 0 1px var(--card); display: flex; flex-direction: column; }
.wk-ev b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.wk-ev span { opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-ev.task { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--k) 78%, transparent) 0 8px,
                                                        color-mix(in srgb, var(--k) 62%, transparent) 8px 16px); }
.wk-ev.done { opacity: .5; text-decoration: line-through; }
.wk-ev-actions { position: absolute; top: 2px; right: 2px; display: none; gap: 2px; }
.wk-ev:hover .wk-ev-actions { display: flex; }
.wk-ev-actions form { margin: 0; }
.wk-ev-actions button { min-height: 0; width: 20px; height: 20px; padding: 0; border-radius: 6px; font-size: 11px;
                        background: rgba(0, 0, 0, .35); color: #fff; border: 0; }
.wk-now { position: absolute; left: -4px; right: 0; height: 2px; background: #e5484d; z-index: 2; pointer-events: none; }
.wk-now::before { content: ""; position: absolute; left: -2px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; }
@media (hover: none) { .wk-ev-actions { display: flex; } }

/* ---------------- Kalender: Monat ---------------- */
.mo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mo-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mo-head span { text-align: center; padding: 8px 0; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.mo-cell { display: flex; flex-direction: column; gap: 2px; min-height: 108px; padding: 5px; color: inherit; text-decoration: none;
           border-top: 1px solid var(--line); border-left: 1px solid var(--line); overflow: hidden; }
.mo-cell:hover { background: color-mix(in srgb, var(--lav) 8%, transparent); }
.mo-cell.out { opacity: .45; }
.mo-cell > b { font-weight: 500; font-size: 13px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.mo-cell.today > b { background: var(--accent); color: #fff; }
.mo-chip { font-size: 11.5px; line-height: 1.3; padding: 1px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden;
           text-overflow: ellipsis; background: color-mix(in srgb, var(--k, var(--lav)) 20%, transparent);
           border-left: 3px solid var(--k, var(--lav)); }
.mo-chip small { color: var(--muted); }
.mo-more { font-size: 11px; color: var(--muted); padding-left: 4px; }
@media (max-width: 700px) {
  .mo-cell { min-height: 64px; flex-flow: row wrap; align-content: flex-start; gap: 3px; }
  .mo-cell > b { width: 100%; height: 20px; font-size: 12px; place-items: start; }
  .mo-chip { font-size: 0; width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--k, var(--lav)); }
  .mo-more { display: none; }
}

/* ---------------- Kalender: Jahr ---------------- */
.yr { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.yr-month { margin: 0; }
.yr-month h3 { margin: 0 0 8px; font-size: 15px; }
.yr-month h3 a { color: inherit; text-decoration: none; }
.yr-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.yr-grid small { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.yr-day { font-size: 11.5px; line-height: 26px; border-radius: 7px; color: inherit; text-decoration: none; }
.yr-day:hover { outline: 1px solid var(--lav); }
.yr-day.l1 { background: color-mix(in srgb, var(--lav) 20%, transparent); }
.yr-day.l2 { background: color-mix(in srgb, var(--lav) 42%, transparent); }
.yr-day.l3 { background: color-mix(in srgb, var(--lav) 70%, transparent); color: #fff; }
.yr-day.dl { box-shadow: inset 0 0 0 2px var(--k-deadline); }
.yr-day.today { background: var(--accent); color: #fff; font-weight: 700; }

/* Events vor- und nachbereiten (migration 019) */
.event-review { border-left: 4px solid var(--lav); }
.event-review .later-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.event-brief { border-left: 4px solid var(--peach); }
.eb-sub { margin: 10px 0 4px; }
.eb-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.eb-list.ideas { list-style: "💡 "; }
/* Heutiger Plan: map with today's trips (migration 020) */
.trip-map { height: 210px; border-radius: 12px; overflow: hidden; margin: 6px 0 8px; z-index: 0; }
.leg-mode button { font-size: 14px; padding: 2px 8px; min-height: 0; }
@media (prefers-color-scheme: dark) { .trip-map { filter: brightness(.85) contrast(1.05); } }

/* Kreativ (migration 021): pages + idea map */
.phase-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.phase-step { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--lav-soft); }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cr-tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--text); border-left: 4px solid #22a06b; }
.cr-tile.phase-experiment { border-left-color: #8b7cf6; }
.cr-tile.phase-craft { border-left-color: #f59e0b; }
.cr-tile.phase-fertig { border-left-color: var(--muted); opacity: .75; }
.cr-title { font-size: 18px; }
.cr-head { display: flex; align-items: center; gap: 12px; }
.cr-title-form { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.cr-title-input { font-size: 24px; font-weight: 600; border: 0; background: transparent; color: var(--text); flex: 1; min-width: 0; padding: 4px 0; }
.cr-phases { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-phases button { font-size: 14px; padding: 6px 12px; min-height: 0; }
.cr-phases button.on { background: var(--accent); color: #fff; }
.cr-phase-hint { margin: 8px 0; }
.cr-add { display: flex; gap: 8px; flex-wrap: wrap; }
.cr-add input[name="text"] { flex: 1; min-width: 180px; }
.cr-add button { flex: 0 0 52px; }
.cr-tools { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
            padding: 8px 10px; margin-bottom: 8px; border-radius: 14px; background: var(--card-solid); box-shadow: var(--shadow); }
.cr-tools button { font-size: 13px; padding: 4px 10px; min-height: 0; }
.cr-wrap { overflow: auto; height: 70vh; border-radius: 18px; border: 1px solid var(--line); margin-bottom: 16px;
           background-color: var(--bg2);
           background-image: radial-gradient(circle, color-mix(in srgb, var(--muted) 35%, transparent) 1px, transparent 1px);
           background-size: 24px 24px; -webkit-overflow-scrolling: touch; }
.cr-canvas { position: relative; }
.cr-lines { position: absolute; inset: 0; pointer-events: none; }
.cr-lines path { fill: none; stroke: color-mix(in srgb, var(--muted) 70%, transparent); stroke-width: 2.5; }
.cr-node { position: absolute; max-width: 220px; min-width: 120px; padding: 10px 12px 10px 34px; border-radius: 14px;
           background: var(--card-solid); box-shadow: var(--shadow); border: 2px solid transparent; cursor: grab;
           touch-action: none; user-select: none; font-size: 14px; line-height: 1.35; }
.cr-node.drag { cursor: grabbing; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); z-index: 3; }
.cr-node.sel { border-color: var(--accent); z-index: 2; }
.cr-node .cr-kind { position: absolute; left: 10px; top: 9px; }
.cr-node .cr-text { white-space: pre-wrap; word-break: break-word; outline: none; }
.cr-node .cr-text[contenteditable="true"] { user-select: text; cursor: text; background: var(--lav-soft); border-radius: 6px; }
.cr-canvas.linking .cr-node:not(.sel) { outline: 2px dashed var(--accent); outline-offset: 2px; cursor: crosshair; }
.cr-node.k-musik { border-left: 4px solid #8b5cf6; } .cr-node.k-schnitt { border-left: 4px solid #f59e0b; }
.cr-node.k-bild { border-left: 4px solid #3b82f6; } .cr-node.k-ort { border-left: 4px solid #16a34a; }
.cr-node.k-person { border-left: 4px solid #ec4899; } .cr-node.k-frage { border-left: 4px solid #e5484d; }
.cr-node.k-link { border-left: 4px solid #64748b; } .cr-node.k-idee { border-left: 4px solid #eab308; }
.cr-empty { position: absolute; left: 40px; top: 40px; max-width: 360px; }
.cr-tools[hidden] { display: none; }
.cr-add select, .cr-tools select { width: auto; flex: 0 0 auto; min-width: 0; }
.cr-add { flex-wrap: nowrap; align-items: stretch; }
@media (max-width: 600px) { .cr-add { flex-wrap: wrap; } .cr-wrap { height: 62vh; } }

/* Kalender (migration 022): calendar picker, colours per calendar, drag-to-create, edit dialog */
.cal-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.cal-list form { margin: 0; }
.cal-pick { display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 5px 10px 5px 6px; font-size: 13px;
            font-weight: 500; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px; }
.cal-pick i { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; font-style: normal;
              font-size: 11px; color: #fff; background: var(--c); border: 2px solid var(--c); }
.cal-pick.off { color: var(--muted); }
.cal-pick.off i { background: transparent; }
.wk-ev, .wk-chip.ev, .mo-chip, .ev-row { cursor: pointer; }
.wk-ghost { position: absolute; left: 2px; right: 2px; border-radius: 8px; background: color-mix(in srgb, #4285f4 75%, transparent);
            color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 6px; pointer-events: none; z-index: 2;
            box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.ev-row { border-left: 3px solid var(--k, transparent); padding-left: 8px; }
.cal-tag { background: color-mix(in srgb, var(--k, var(--lav)) 18%, transparent); }
.ee-title { font-size: 20px; font-weight: 600; }
.ee-actions { justify-content: space-between; }

/* ---------------- Aufgaben list: drag between date groups ---------------- */
.lane-drop { transition: background .15s, box-shadow .15s; }
.lane-drop.over { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.lane-empty { padding-top: 12px; padding-bottom: 12px; }
.lane-empty h2 { color: var(--muted); }
.lane-hint { margin: 0; }
.tasks .task .bgrip { align-self: center; margin-left: -6px; }
.tasks .task.dragging { opacity: .3; }
.chip.who-claude { background: #e8e4ff; color: #4b3cc4; }
@media (prefers-color-scheme: dark) { .chip.who-claude { background: #2d2652; color: #cfc6ff; } }

/* "+" next to a group count, with an inline field for a quick task */
.lane-plus { min-height: 0; width: 26px; height: 26px; padding: 0; border-radius: 8px; font-size: 15px; line-height: 1;
             vertical-align: middle; margin-left: 4px; background: var(--lav-soft, var(--line)); color: var(--text); border: 0; }
.lane-plus:hover { background: var(--accent); color: #fff; }
.lane-add { margin: 4px 0 8px; flex-wrap: nowrap; }
.lane-add[hidden] { display: none; }  /* closed until the + is pressed */
.lane-add input[name=title] { flex: 1; min-width: 0; }
.lane-add button { flex: 0 0 auto; width: 44px; padding: 0; }

/* ---------------- Task page like Notion (edit in place) ---------------- */
.n-card { padding-top: 14px; }
.n-title-row { display: flex; align-items: center; gap: 8px; }
.n-title { flex: 1; min-width: 0; font-family: inherit; font-weight: 600; font-size: 26px; line-height: 1.25; letter-spacing: -.01em; color: var(--text);
           background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 4px 8px; margin-left: -8px; }
.n-title:hover { background: color-mix(in srgb, var(--line) 50%, transparent); }
.n-title:focus { outline: none; border-color: var(--line); background: var(--bg2); }
.n-edit { cursor: pointer; font-size: 18px; padding: 6px; border-radius: 8px; opacity: .7; }
.n-edit:hover { opacity: 1; background: var(--line); }
.n-badges { display: flex; gap: 8px; align-items: center; min-height: 20px; margin: 2px 0 8px; flex-wrap: wrap; }
.n-saved { color: var(--accent); font-weight: 600; }
.n-props { display: grid; gap: 2px; margin-bottom: 10px; }
.n-prop { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 10px;
          padding: 3px 6px; border-radius: 8px; margin: 0; }
.n-prop:hover { background: color-mix(in srgb, var(--line) 45%, transparent); }
.n-prop > span:first-child { color: var(--muted); font-size: 14px; }
.n-prop .n-val, .n-prop select.n-val { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.n-prop input, .n-prop select { border: 1px solid transparent; background: transparent; padding: 5px 6px; min-height: 0;
                                font-size: 14px; border-radius: 8px; color: var(--text); }
.n-prop input:hover, .n-prop select:hover, .n-prop input:focus, .n-prop select:focus { border-color: var(--line); background: var(--bg2); outline: none; }
.n-prop input[type=number] { width: 80px; }
.n-prop input[type=checkbox] { width: auto; }
.n-clear { font-size: 13px; color: var(--muted); }
.n-notes { width: 100%; border: 1px solid transparent; background: color-mix(in srgb, var(--line) 30%, transparent);
           border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--text); resize: vertical; }
.n-notes:focus { outline: none; border-color: var(--line); background: var(--bg2); }
.n-actions { margin-top: 12px; align-items: center; }
.n-discard { margin-left: auto; }
@media (max-width: 600px) { .n-prop { grid-template-columns: 118px minmax(0, 1fr); } .n-title { font-size: 22px; } }

/* Morgenroutine card on Heute (first thing in the morning) */
.morning-card { border-left: 4px solid #f5b83d; }
.morning-card .weigh { margin-top: 10px; flex-direction: row; flex-wrap: nowrap; max-width: 360px; }
.morning-card .weigh input { flex: 1; min-width: 0; }
.morning-card .weigh button { flex: 0 0 auto; }

/* Kreativ map: small edit panel bottom right, link button on each card, arrows */
.cr-tools { position: fixed; right: 18px; bottom: 18px; top: auto; z-index: 40; width: 250px; margin: 0;
            flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px;
            border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, .22); }
.cr-tools-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cr-tools-head .meta { font-size: 12.5px; line-height: 1.3; }
.cr-tools select { width: 100%; }
.cr-tools-row { display: flex; gap: 6px; }
.cr-tools-row button { flex: 1; padding: 6px 4px; }
@media (max-width: 899px) { .cr-tools { right: 12px; left: 12px; width: auto; bottom: 92px; } }
.cr-node { padding-right: 30px; }
.cr-link { position: absolute; top: 4px; right: 4px; min-height: 0; width: 24px; height: 24px; padding: 0; border: 0;
           border-radius: 7px; background: transparent; font-size: 13px; opacity: .45; cursor: pointer; }
.cr-node:hover .cr-link, .cr-node.sel .cr-link { opacity: 1; }
.cr-link:hover { background: var(--lav-soft); }
@media (hover: none) { .cr-link { opacity: .8; } }
.cr-lines marker path { fill: color-mix(in srgb, var(--muted) 85%, transparent); }
.cr-wrap { cursor: cell; }
.learning-month .learning { padding: 10px 0; border-top: 1px solid var(--line); }
.learning-month .learning:first-of-type { border-top: 0; }
.learning-month .learning p { margin: 4px 0; }

/* Heute: plan map, weather and Termine in one row, equal widths (as many columns as cards) */
.plan-row { display: grid; gap: 14px; margin-bottom: 14px; }
.plan-row > * { margin: 0; min-width: 0; }
@media (min-width: 900px) {
  .plan-row { display: flex; align-items: flex-start; }
  .plan-row > * { flex: 2 1 0; }
}
.work-hint { font-weight: 500; font-size: 12.5px; text-decoration: none; }

/* Wissen (migration 025): sources with findings and exercises */
.kn-steps { margin: 4px 0 8px; padding-left: 20px; line-height: 1.55; }
.kn-h { font-size: 14px; margin: 12px 0 4px; }
.kn-list { list-style: none; margin: 0; padding: 0; }
.kn-list li { padding: 6px 0; border-top: 1px solid var(--line); line-height: 1.4; }
.kn-list li:first-child { border-top: 0; }
.kn-mod { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--lav-soft); white-space: nowrap; }
.kn-off { opacity: .55; }
.kn-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.kn-item:first-of-type { border-top: 0; }
details.kn-item { display: block; }
.kn-ex summary { cursor: pointer; list-style: none; line-height: 1.4; }
.kn-ex .form { margin-top: 8px; }
.add-ex { margin-top: 10px; }
.add-ex summary { cursor: pointer; }

/* ---------------- Finanzen (migration 026) ---------------- */
.subtabs .soon, .more-group .soon { flex: none; padding: 8px 12px; color: var(--muted); opacity: .5; cursor: default; font-size: 15px; font-weight: 600; }
.more-group .soon { padding: 5px 8px 5px 22px; font-size: 14px; font-weight: 400; }
.fin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav b { min-width: 120px; text-align: center; }
.month-nav a, .month-nav span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
                                text-decoration: none; color: var(--text); font-size: 20px; }
.month-nav a { background: var(--card); border: 1px solid var(--line); }
.fin-stats { flex-wrap: wrap; }
.fin-stats .stat { flex: 1 1 150px; gap: 4px; }
.fin-stats .stat-num { font-size: 26px; }
.fin-stats .progress { margin-top: 6px; }
.stat.warn .progress span, .fin-cat.over .progress span { background: var(--late); }
.neg { color: var(--late); }
.fin-cat { margin-bottom: 10px; }
.fin-cat-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.fin-cat-top b { font-variant-numeric: tabular-nums; }
.fin-cat-top small { color: var(--muted); font-weight: 400; }
.fin-cat .progress span { background: var(--lav); }
.fin-cat.over .fin-cat-top b { color: var(--late); }
.fin-list li { align-items: center; flex-wrap: nowrap; gap: 10px; }
.fin-list .when { min-width: 44px; color: var(--muted); }
.fin-entry { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fin-entry b { overflow-wrap: anywhere; }
.fin-entry select { width: auto; max-width: 100%; padding: 2px 6px; border-radius: 8px; font-size: 12.5px;
                    color: var(--muted); background: transparent; border-color: transparent; }
.fin-entry select:hover, .fin-entry select:focus { border-color: var(--line); }
.amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt.einnahme { color: var(--ok); }
.fin-months td:not(:first-child), .fin-months th:not(:first-child) { text-align: right; }
.fin-budget { display: flex; gap: 6px; }
.fin-budget input { width: 90px; padding: 6px 10px; }
.fin-budget button { min-height: 0; padding: 6px 10px; }
.emoji-in { flex: 0 0 64px !important; text-align: center; }

/* ---------------- Tasche packen (migration 028): flat bag (Kurzgesagt-like) + chips ---------------- */
.bag-stage { display: flow-root; }  /* chips flow around the bag, then use the full width */
.bag-art {
  float: left; width: 84px; height: 76px; margin: 0 12px 6px 0; border-radius: 18px;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 70% 30%, #2d3585 0, #1c2156 70%);
}
.bag-svg { width: 70px; height: auto; display: block; overflow: visible; }
.bag-shadow { fill: rgba(0, 0, 0, .22); }
.bag-handle { fill: none; stroke: #4b3fb3; stroke-width: 7; stroke-linecap: round; }
.bag-body { fill: #7b6cf6; }
.bag-shade { fill: #6152d9; }
.bag-zip { fill: #4b3fb3; }
.bag-stripe { fill: #ff9f43; }
.bag-light { fill: #a99ffb; }
.bag-z { font: 700 13px system-ui, sans-serif; fill: #c9c3ff; }
.bag-z.big { font-size: 17px; }
.bag-items { padding-top: 2px; }
.bag-items li { display: inline-block; margin: 0 5px 7px 0; vertical-align: top; }
.sticker {
  min-height: 0; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 8px; white-space: nowrap;
  background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; font-weight: 600; transition: background .15s, opacity .2s;
}
.sticker span { font-size: 16px; line-height: 1; }
.sticker:hover { background: var(--lav-soft); }
.sticker.in { background: var(--accent-soft); color: var(--accent); border-color: transparent; text-decoration: line-through; opacity: .75; }
.sticker.in::before { content: "✓"; font-weight: 800; }
.bag-why { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.bag-why span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.bag-why span + span::before { content: "· "; }
.bag-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bag-actions button { min-height: 0; padding: 7px 12px; font-size: 14px; }
.bag-actions button.on { background: var(--lav-soft); border-color: transparent; }
.bag-card.home .bag-stage { display: flex; align-items: center; gap: 12px; }
.bag-card.home .bag-art { float: none; margin: 0; flex: none; }
.bag-home-text .meta { margin: 2px 0 0; }
.bag-triggers { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.bag-list summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 2px; }

/* ---------------- Kreativ room (2026-10-27): flat night room, hotspots zoom in ---------------- */
.room-wrap { margin-bottom: 16px; }
.room { position: relative; overflow: hidden; aspect-ratio: 1200 / 620; border-radius: 22px;
        background: #1c2156; box-shadow: var(--shadow); margin-bottom: 14px; }
.room-scene { position: absolute; inset: 0; transform-origin: 0 0; transition: transform .9s cubic-bezier(.65, 0, .35, 1), opacity .6s .3s; }
.room-svg { display: block; width: 100%; height: 100%; }
.room-wrap.open-regal .room-scene { transform: translate(0, -25%) scale(1.5); }
.room-wrap.open-platte .room-scene { transform: translate(-50%, -100%) scale(2); }
.room-wrap.open-palette .room-scene { transform: translate(-95%, -88%) scale(2.2); }
.room-wrap.open-pinnwand .room-scene { transform: translate(-90%, 0) scale(1.9); }
.room-wrap.open-sessel .room-scene { transform: translate(-100%, -80%) scale(2); }

/* hotspots with labels, gone while zoomed in */
.room-hotspots { position: absolute; inset: 0; transition: opacity .3s; }
.room-wrap.is-open .room-hotspots { opacity: 0; pointer-events: none; }
.hs { position: absolute; border-radius: 18px; text-decoration: none; transition: background .2s; }
.hs:hover, .hs:focus-visible { background: rgba(255, 255, 255, .06); outline: none; }
.hs span { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); white-space: nowrap;
           font-size: 13px; font-weight: 700; color: #fff; background: rgba(12, 14, 40, .7);
           padding: 4px 10px; border-radius: 999px; transition: transform .2s; }
.hs:hover span, .hs:focus-visible span { transform: translateX(-50%) translateY(-3px); }
.hs.hs-pinnwand span { bottom: auto; top: calc(100% + 6px); }  /* label under the board */
.room-close { position: absolute; top: 12px; right: 12px; z-index: 2; padding: 6px 12px; border-radius: 999px;
              font-size: 14px; font-weight: 700; color: #fff; text-decoration: none; background: rgba(12, 14, 40, .7);
              opacity: 0; pointer-events: none; transition: opacity .3s .4s; }
.room-wrap.is-open .room-close { opacity: 1; pointer-events: auto; }
@media (max-width: 600px) {
  .hs span { font-size: 11px; padding: 3px 7px; bottom: 4px; }
  .room { border-radius: 16px; }
}

/* The open panel lies on the room (2026-11-04): the zoomed picture stays behind it, faded, and
   the fields are right there without scrolling. The wrap is at least as high as the room. */
.room-wrap.is-open { position: relative; display: flow-root; aspect-ratio: 1200 / 620; }
.room-wrap.is-open .room { position: absolute; inset: 0; aspect-ratio: auto; margin: 0; }
.room-wrap.is-open .room-scene { inset: 0 0 auto; aspect-ratio: 1200 / 620; opacity: .42; }
.room-wrap.is-open .room-panel { position: relative; z-index: 1; margin: 56px 14px 14px;
  background: color-mix(in srgb, var(--card-solid) 80%, transparent);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.room-panel { display: none; }
.room-wrap.open-platte [data-panel="platte"], .room-wrap.open-regal [data-panel="regal"], .room-wrap.open-palette [data-panel="palette"],
.room-wrap.open-pinnwand [data-panel="pinnwand"], .room-wrap.open-sessel [data-panel="sessel"] {
  display: block; animation: r-rise .5s cubic-bezier(.2, .8, .3, 1) .35s backwards;
}
.shelves { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 0 16px; }
.shelf-col { min-width: 0; }
.room-panel .shelf { margin-bottom: 12px; }
.shelf-label { margin: 6px 0 0; }
.room-phases { margin-top: 14px; }
.room-panel .cr-grid { margin-bottom: 10px; }

/* the room is alive: stars, lights, steam, plants, lamp */
.r-star { animation: r-twinkle 3.2s ease-in-out calc(var(--i) * -.7s) infinite; }
.r-bulb { animation: r-twinkle 4s ease-in-out calc(var(--i) * -.9s) infinite; }
.r-steam { opacity: 0; animation: r-steam 3.6s ease-out infinite; }
.r-steam.two { animation-delay: -1.8s; }
.r-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: r-sway var(--d, 8s) ease-in-out infinite; }
.r-sway.big { animation-name: r-sway-big; }
.r-hang { transform-box: fill-box; transform-origin: 50% 0; animation: r-sway 10s ease-in-out infinite; }
.r-glow { animation: r-glow 6s ease-in-out infinite; }
.r-book, .r-note, .r-blob, .r-chair { transform-box: fill-box; }
.r-book { transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.2, .8, .3, 1.4); }
.r-note { transform-origin: 50% 10%; }
.r-blob { transform-origin: 50% 50%; }
.r-chair { transform-origin: 50% 100%; transition: transform .3s; }
a.r-book { cursor: pointer; }
a.r-book:hover, a.r-book:focus-visible { transform: translateY(-10px); outline: none; }

/* hover on a hotspot: that corner reacts */
.room-wrap:has(.hs-regal:hover) .r-book { animation: r-wiggle .6s ease-in-out calc(var(--i) * 30ms); }
.room-wrap:has(.hs-palette:hover) .r-blob { animation: r-bounce .6s ease-in-out calc(var(--i) * 70ms); }
.room-wrap:has(.hs-pinnwand:hover) .r-note { animation: r-wiggle .7s ease-in-out calc(var(--i) * 60ms); }
.room-wrap:has(.hs-sessel:hover) .r-chair { transform: scaleY(.97); }
/* opening the shelf: the books hop one after the other, then they are links */
.room-wrap.open-regal .r-book { animation: r-hop .5s cubic-bezier(.2, .8, .3, 1.4) calc(.6s + var(--i) * 35ms) backwards; }
.room-wrap.open-palette .r-blob { animation: r-bounce .6s ease-in-out calc(.6s + var(--i) * 80ms) backwards; }
.room-wrap.open-pinnwand .r-note { animation: r-wiggle .7s ease-in-out calc(.6s + var(--i) * 80ms) backwards; }
.room-wrap.instant .room-scene, .room-wrap.instant .room-hotspots, .room-wrap.instant .room-close,
.room-wrap.instant .room-panel, .room-wrap.instant .r-book, .room-wrap.instant .r-blob, .room-wrap.instant .r-note {
  transition: none !important; animation: none !important;
}

@keyframes r-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes r-steam { 0% { opacity: 0; transform: translateY(6px); } 30% { opacity: .45; } 100% { opacity: 0; transform: translateY(-18px); } }
@keyframes r-sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@keyframes r-sway-big { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1.2deg); } }
@keyframes r-glow { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes r-wiggle { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg); } 65% { transform: rotate(3deg); } }
@keyframes r-bounce { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.35); } }
@keyframes r-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12px); } }
@keyframes r-rise { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  .room-wrap *, .room-wrap { animation: none !important; transition: none !important; }
}

/* Zurück (topbar, every page but Heute) + journal "Was war heute gut?" (migration 029) */
.back-btn { display: inline-flex; font-size: 14px; padding: 7px 12px; min-height: 0; background: var(--lav-soft); color: var(--text); }
.good-label { color: var(--text); font-size: 14px; font-weight: 600; }
.good-label textarea { font-weight: 400; }
.jentry p.jgood { background: color-mix(in srgb, #ffd166 20%, transparent); border-radius: 10px; padding: 6px 10px; }

/* Automationen (2026-10-27): what Heute shows when */
.auto-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 10px; }
.auto-phase { padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); }
.auto-phase.now { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.auto-phase-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.auto-phase .meta { margin: 2px 0 6px; }
.auto-rule { margin: 4px 0; font-size: 13.5px; font-weight: 600; }
.auto-cards { margin: 6px 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.55; }
.auto-when { white-space: nowrap; font-weight: 600; width: 1%; }

/* ---------------- Schule (migration 030): one tile per subject ---------------- */
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 16px; }
.subject-tile { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); text-decoration: none;
                color: var(--text); background: var(--card); box-shadow: var(--shadow);
                border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); transition: transform .15s; }
.subject-tile:hover { transform: translateY(-2px); }
.subject-band { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; padding: 14px 14px 8px;
                border-top: 8px solid var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--text); }
.subject-band b { font-size: 22px; letter-spacing: .02em; }
.subject-open { font-size: 12.5px; font-weight: 700; background: var(--card); padding: 2px 8px; border-radius: 999px; }
.subject-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px 12px; }
.subject-name { font-size: 14.5px; line-height: 1.3; }
.subject-exam { font-size: 13px; font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--c) 16%, transparent);
                border-radius: 8px; padding: 1px 6px; align-self: flex-start; }
.subject-body .meta { font-size: 13px; }
@media (max-width: 600px) {
  .subject-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .subject-band { padding: 12px 10px 8px; } .subject-band b { font-size: 18px; }
  .subject-body { padding: 8px 10px 10px; }
}
.subject-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.subject-badge { font-size: 15px; font-weight: 800; color: var(--text); background: color-mix(in srgb, var(--c) 18%, transparent);
                 border-left: 5px solid var(--c); padding: 5px 10px; border-radius: 10px; }
.school-note { border-top: 1px solid var(--line); padding: 9px 0; }
.school-note summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.school-note .when { min-width: 0; color: var(--muted); font-size: 13px; }
.school-body { white-space: pre-wrap; margin: 6px 0; }
.cheat, textarea.mono { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cheat { white-space: pre-wrap; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.steps-guide { padding-left: 20px; line-height: 1.55; }
.steps-guide li { margin-bottom: 6px; }
.steps-guide code { overflow-wrap: anywhere; }

/* Freunde (migration 032): a row per person, the person's own page */
.friend-row { display: flex; justify-content: space-between; gap: 10px; color: inherit; text-decoration: none; }
.friend-row:hover b { color: var(--accent); }
.friends li.due .friend-row b::after { content: " 👋"; }
.fam-grid li { cursor: pointer; }
.friend-title { display: flex; align-items: center; gap: 14px; }
.friend-avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
                 font-size: 24px; font-weight: 700; color: #fff; background: linear-gradient(140deg, var(--lav), #f0a58a); }
.friend-title p { margin: 2px 0 0; }
.reach-btn { display: inline-flex; margin-top: 8px; text-decoration: none; }
.friend-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; }
.friend-facts dt { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.friend-facts dd { margin: 0; white-space: pre-wrap; }
.follow-up { background: color-mix(in srgb, #ffd166 20%, transparent); border-radius: 10px; padding: 6px 10px; margin: 0 0 6px; }
.friend-history .when { min-width: 70px; color: var(--muted); }

/* Schule subject page (migration 033): subject colour instead of red, weeks 1 to 14 */
.subject-page .task { border-left-color: var(--c) !important; background: none !important; }
.subject-top { align-items: stretch; }
.subject-exams li { align-items: center; flex-wrap: nowrap; }
.exam-type { flex: none; font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
             background: color-mix(in srgb, var(--c) 18%, transparent); }
.school-file { margin: 6px 0; }
.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.week { border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); padding: 10px 12px; }
.week summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.week-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.week-note { font-size: 13.5px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.week[open] .week-note { display: none; }
.week.now { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.week.now .week-head b::after { content: " · jetzt"; color: var(--c); }
.week.future { opacity: .6; }
.week .form { margin-top: 8px; }

/* Schule: semester at a glance (only exams, presentations, submissions per week) */
.sem-now p { margin: 0 0 4px; }
.sem-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 8px;
             overflow-x: auto; padding: 10px 2px 6px; scroll-snap-type: x proximity; }
.sem-col { display: flex; flex-direction: column; gap: 6px; min-height: 120px; padding: 8px; border-radius: 14px;
           background: var(--bg2); border: 1px solid var(--line); scroll-snap-align: start; }
.sem-col.past { opacity: .5; }
.sem-col.busy { background: color-mix(in srgb, #f59e0b 9%, var(--bg2)); }
.sem-col.now { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sem-col.now .sem-head b::after { content: " · jetzt"; color: var(--accent); }
.sem-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.sem-head small { width: 100%; color: var(--muted); font-size: 11.5px; }
.sem-count { font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: var(--text); color: var(--bg2); }
.sem-chip { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 10px; text-decoration: none;
            color: var(--text); background: color-mix(in srgb, var(--c) 16%, var(--card-solid)); border-left: 4px solid var(--c);
            font-size: 12.5px; line-height: 1.3; transition: transform .12s; }
.sem-chip:hover { transform: translateY(-1px); }
.sem-chip span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sem-chip small { color: var(--muted); }
.sem-legend { margin: 6px 0 0; }
.week-item { font-size: 12.5px; font-weight: 600; padding: 4px 8px; border-radius: 8px; border-left: 4px solid var(--c);
             background: color-mix(in srgb, var(--c) 16%, transparent); }

/* Schlaf (migration 034) */
.sleep-btn { width: 100%; min-height: 52px; font-size: 17px; background: linear-gradient(135deg, #1c2156, #3d3a8f); color: #fff; }
.sleep-card.wake { border-color: color-mix(in srgb, #ffb347 55%, transparent); }
.sleep-q { margin: 6px 0 2px; }
.sleep-card .moods { margin-bottom: 4px; }
.sleep-list li { align-items: center; flex-wrap: nowrap; }
.sleep-list .when { min-width: 70px; color: var(--muted); }
.night-boxes { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 4px; }

/* Gesundheit (migration 036): tiles, water, body figure (flat, dark navy), cardio */
.hstats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.hstats .stat { padding: 12px 14px; gap: 2px; justify-content: flex-start; }
.hstats .stat-num { font-size: 26px; }
.hstats .progress { margin-top: auto; transform: translateY(4px); }
@media (max-width: 899px) {
  .hstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hstats .stat:first-child { grid-column: span 2; }
}
.progress span.over { background: var(--warn); }
.progress.water span { background: #3b9fe8; }
.water-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 14px;
             padding-top: 12px; border-top: 1px solid var(--line); }
.glasses { display: flex; gap: 4px; margin-right: 4px; }
.glass { width: 14px; height: 20px; border: 2px solid #3b9fe8; border-top: 0; border-radius: 2px 2px 5px 5px; }
.glass.full { background: #3b9fe8; }
.glass.half { background: linear-gradient(to top, #3b9fe8 50%, transparent 50%); }
.body-fig { width: 100%; max-width: 440px; display: block; margin: 0 auto; }
.bf-bg { fill: #1c2156; }
.bf-skin { fill: #2c3478; }
.bf-stars circle { fill: #fff; opacity: .55; }
.bm { stroke: #1c2156; stroke-width: 1.2; }
.bm.m0, .bf-legend .m0 { fill: #434da3; background: #434da3; }
.bm.m1, .bf-legend .m1 { fill: #2f8f63; background: #2f8f63; }
.bm.m2, .bf-legend .m2 { fill: #3ccf8e; background: #3ccf8e; }
.bm.m3, .bf-legend .m3 { fill: #8ef0c0; background: #8ef0c0; }
.bm.m2, .bm.m3 { filter: drop-shadow(0 0 4px rgba(60, 207, 142, .55)); }
.bm:hover { filter: brightness(1.2); }
.bf-cut { stroke: #1c2156; stroke-width: 1.4; fill: none; stroke-linecap: round; }
.bf-label { fill: #aab3ff; font-size: 10px; font-weight: 700; text-anchor: middle; letter-spacing: .1em; text-transform: uppercase; }
.bf-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; margin: 8px 0; font-size: 12.5px; }
.bf-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.hc-stats .stat { padding: 10px 12px; }
.hc-stats .stat-num { font-size: 24px; }
.dance-form { align-items: flex-end; margin-top: 10px; }
.dance-form label { flex: 0 1 110px; }
.dance-form button { flex: 1; }

/* Kreativ: checklist + linked event (migration 037) */
.cr-event { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cr-event select { flex: 1; min-width: 180px; width: auto; }
.cr-countdown { background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.cr-todos summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cr-todo-bar { flex: 1; min-width: 80px; max-width: 220px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.cr-todo-bar i { display: block; height: 100%; background: #22a06b; }
.cr-todo-list { list-style: none; margin: 10px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 18px; }
.cr-todo-list li { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.cr-todo-text { flex: 1; }
.cr-todo-list li.done .cr-todo-text { text-decoration: line-through; color: var(--muted); }
.cr-box { width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 7px; border: 2px solid var(--muted); background: transparent; color: #fff; font-size: 14px; line-height: 1; }
.cr-box[aria-pressed="true"] { background: #22a06b; border-color: #22a06b; }
.cr-todo-del { opacity: 0; font-size: 13px; }
.cr-todo-list li:hover .cr-todo-del, .cr-todo-del:focus { opacity: .6; }
@media (hover: none) { .cr-todo-del { opacity: .4; } }

/* Wen heute? on Heute (migration 041) */
.friend-pick { border-left: 4px solid var(--k-privat); }
.fp-reach { display: inline-block; margin: 0 8px 8px 0; padding: 6px 14px; border-radius: 999px; text-decoration: none; }
.fp-name { font-size: 20px; margin: 4px 0 0; }
.fp-name a { color: inherit; text-decoration: none; }
.fp-reason { margin: 2px 0 8px; font-weight: 500; }
.fp-hooks { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 4px; }
.fp-log > summary { list-style: none; display: inline-block; cursor: pointer; margin-right: 8px; }
.fp-log > summary .btn-soft { display: inline-block; padding: 6px 14px; border-radius: 999px; }
.fp-date { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

/* Task notes like Notion (2026-10-29): formatted view, editor toolbar, photos */
.n-doc { min-height: 44px; padding: 8px 10px; margin: 0 -10px; border-radius: 12px; cursor: text;
         line-height: 1.5; font-size: 16px; overflow-wrap: anywhere; }
.n-doc:hover, .n-doc:focus-visible { background: color-mix(in srgb, var(--line) 30%, transparent); outline: none; }
.n-doc[hidden], .n-editor[hidden] { display: none; }
.n-doc p { margin: 0; }
.n-doc .nd-gap { height: .6em; }
.n-doc .nd-h1 { font-size: 19px; font-weight: 650; margin: .7em 0 .15em; letter-spacing: -.01em; }
.n-doc .nd-h2, .n-doc .nd-h3 { font-size: 16px; font-weight: 650; margin: .6em 0 .1em; }
.n-doc > :first-child { margin-top: 0; }
.n-doc hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.n-doc a { color: var(--accent); }
.nd-li { position: relative; padding-left: calc(1.5em + var(--lvl, 0) * 1.5em); }
.nd-li::before { position: absolute; left: calc(var(--lvl, 0) * 1.5em); width: 1.3em; text-align: center; }
.nd-ul::before { content: "•"; font-weight: 700; }
.nd-ol { padding-left: calc(2.2em + var(--lvl, 0) * 1.5em); }
.nd-ol::before { content: attr(data-n); width: 1.9em; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.nd-photo { display: block; margin: 8px 0; width: fit-content; max-width: 100%; }
.nd-photo img { display: block; max-width: 100%; max-height: 420px; border-radius: 12px; box-shadow: var(--shadow); }
.n-doc-empty { color: var(--muted); }
.n-tools { display: flex; gap: 4px; margin-bottom: 6px; position: sticky; top: 0; z-index: 2; padding: 4px 0;
           background: var(--card-solid); }
.n-tools button { min-height: 34px; padding: 4px 12px; background: var(--bg2); color: var(--text);
                  border: 1px solid var(--line); font-weight: 700; }
.n-tools .n-done { margin-left: auto; background: var(--accent); border-color: var(--accent); color: #fff; }
.n-editor .n-notes { min-height: 150px; font-size: 16px; line-height: 1.5; resize: none; overflow-y: auto; }  /* 16px: no iOS zoom */

/* "Angekommen?" and event mode on Heute (2026-10-30) */
.arrive-card { border-left: 4px solid var(--accent); padding-top: 12px; padding-bottom: 12px; }
.arrive-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.arrive-row + .arrive-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.arrive-row .grow { display: flex; flex-direction: column; min-width: 160px; }
.event-card { border-left: 4px solid var(--lav); background: linear-gradient(160deg, var(--card), color-mix(in srgb, var(--lav-soft) 70%, var(--card))); }
.ev-todos li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.ev-todos li.done { color: var(--muted); text-decoration: line-through; }
.ev-check { width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 8px; flex: none;
            background: var(--bg2); color: var(--accent); border: 1.5px solid var(--line); font-weight: 800; }
.ev-todos li.done .ev-check { background: var(--accent-soft); border-color: var(--accent); }
.work-end { display: block; margin-top: 8px; }
/* Streak-Freeze (migration 041) */
.hgrid .dot.frozen { background: #cfe6ff; color: #1d5fa8; }
.streak-risk { margin: -4px 0 10px; font-size: 14px; color: var(--text); }
@media (prefers-color-scheme: dark) { .hgrid .dot.frozen { background: #1d3b5e; color: #a9d2ff; } }

/* Arbeitszeit (migration 040): time card on Heute, week page */
.time-card { border-left: 4px solid var(--k-arbeit); padding-top: 12px; padding-bottom: 12px; }
.time-card.paused { border-left-color: var(--warn); }
.tc-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.tc-ico { font-size: 22px; }
.tc-row .grow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 170px; }
.tc-num { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tc-pause { width: 100%; font-weight: 600; font-size: 14px; color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.tc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tc-actions button { min-height: 36px; padding: 6px 12px; }
.tc-forgot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; padding-top: 10px;
             border-top: 1px solid var(--line); }
.tc-forgot input { width: auto; }
.wt-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.wt-day.today { border-color: var(--k-arbeit); box-shadow: inset 0 0 0 1px var(--k-arbeit); }
.wt-block { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.wt-block:first-of-type { border-top: 0; }
.wt-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wt-edit input[type=time] { width: auto; }
.wt-pause { flex-direction: row; align-items: center; gap: 4px; font-size: 13px; }
.wt-pause input { width: 52px; text-align: center; }
.wt-breaks { width: 100%; margin: 0; }
/* Abos + Krank (migration 041) */
.abo-ended { margin: 6px 0; }
.abo-edit > summary { list-style: none; cursor: pointer; padding: 4px; font-size: 13px; }
.abo-edit > summary::-webkit-details-marker { display: none; }
.fin-list li:has(.abo-edit[open]) { flex-wrap: wrap; }
.abo-edit[open] { flex-basis: 100%; order: 5; }
.sick-card.sick-now { border-left: 4px solid #e07a5f; }
.sick-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; }
.sick-row .grow { flex: 1; min-width: 180px; }
.sick-note { white-space: pre-wrap; }

/* Garderobe (migration 042): flat drawings, suggestions, wardrobe grid, builder */
.garment { display: block; width: 100%; height: auto; overflow: visible; }
.flatlay { display: block; width: 100%; max-width: 260px; margin: 0 auto; aspect-ratio: 240 / 236;
           background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--line) 45%, transparent), transparent 70%);
           border-radius: 18px; }
.w-today h2 { flex-wrap: wrap; }
.w-worn { margin: 6px 0; }
.w-sugg { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin: 10px 0; }
.w-outfit { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 18px;
            background: color-mix(in srgb, var(--line) 18%, transparent); }
.w-outfit p { margin: 0; font-size: 14px; }
.w-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.w-actions form { margin: 0; }
.w-actions button { min-height: 0; padding: 6px 14px; font-size: 14px; }
.w-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 10px; }
.w-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border-radius: 16px;
          text-decoration: none; color: var(--text); text-align: center; font-size: 14px;
          background: color-mix(in srgb, var(--line) 18%, transparent); transition: transform .15s; }
.w-tile:hover { transform: translateY(-3px); }
.w-tile .garment { width: 84px; }
.w-tile.fav b::before { content: "⭐ "; }
.w-tile .meta { font-size: 12px; }
.w-form-top { display: flex; gap: 14px; align-items: center; }
.w-preview { width: 96px; flex: 0 0 96px; }
.w-form-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.w-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.w-sw { width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; background: var(--c);
        border: 2px solid color-mix(in srgb, var(--text) 15%, transparent); }
.w-swatches input[type="color"], .w-c2 { width: 40px; height: 30px; padding: 0; border: 0; background: none; }
.w-chips { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.w-pick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.w-opt { flex: 0 0 76px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px;
         border-radius: 14px; border: 2px solid transparent; cursor: pointer; text-align: center; }
.w-opt input { position: absolute; opacity: 0; pointer-events: none; }
.w-opt .garment { width: 56px; }
.w-opt small { font-size: 11px; line-height: 1.2; color: var(--muted); }
.w-opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.w-none { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; border: 2px dashed var(--line); font-size: 12px; color: var(--muted); }
.w-big .garment { width: 180px; margin: 0 auto; }
.w-item-card { text-align: center; }
label.check input.w-c2 { width: 40px; height: 28px; padding: 0; border: 0; background: none; }

/* Mein Credo (migration 043): manifesto on a flat night sky, always dark */
.cd-sky { position: relative; overflow: hidden; border-radius: 24px; margin-bottom: 16px; color: #ece8ff;
          background: linear-gradient(#1a1440, #241a52 40%, #1a1440); box-shadow: 0 18px 40px rgba(20, 18, 58, .25); }
.cd-hero { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 300; min-height: 170px; }
.cd-title { position: absolute; left: 0; right: 0; top: 34px; text-align: center; pointer-events: none; }
.cd-title h1 { margin: 0; font-size: 40px; letter-spacing: .02em; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.cd-title p { margin: 4px 0 0; color: #cfc6ff; font-size: 15px; }
.cd-today { margin: 4px 24px 0; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); font-size: 14px; color: #cfc6ff; }
.cd-today b { color: #fff; }
.cd-list { list-style: none; margin: 0; padding: 14px 24px 8px; display: flex; flex-direction: column; gap: 12px; }
.cd-rule { display: grid; grid-template-columns: 44px 48px 1fr; gap: 12px; align-items: start; padding: 14px 16px;
           border-radius: 18px; background: rgba(255, 255, 255, .06); border-left: 4px solid var(--a); }
.cd-num { font-family: Georgia, "Times New Roman", serif; font-size: 22px; color: #ffd27a; text-align: right; padding-top: 8px; }
.cd-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 24px;
           background: color-mix(in srgb, var(--a) 70%, #1a1440); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a) 25%, transparent); }
.cd-body { min-width: 0; }
.cd-text { margin: 4px 0 2px; font-size: 19px; font-weight: 650; line-height: 1.35; color: #fff; }
.cd-why { margin: 2px 0; font-style: italic; color: #cfc6ff; font-size: 15px; }
.cd-meta { margin: 4px 0; font-size: 13px; color: #a79fd6; }
.cd-actions { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.cd-actions form { margin: 0; }
.cd-kept { min-height: 0; padding: 5px 14px; font-size: 13px; border-radius: 999px; background: rgba(255, 210, 122, .16);
           color: #ffd27a; border: 1px solid rgba(255, 210, 122, .35); }
.cd-kept:hover { background: rgba(255, 210, 122, .28); }
.cd-more > summary { list-style: none; cursor: pointer; padding: 4px 8px; opacity: .6; }
.cd-more[open] { flex-basis: 100%; padding: 12px; border-radius: 14px; background: var(--card, #fff); color: var(--text); }
.cd-more[open] > summary { opacity: 1; }
.cd-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.cd-empty { padding: 20px; text-align: center; color: #cfc6ff; }
.cd-sign { margin: 0; padding: 4px 28px 22px; text-align: right; font-family: "Brush Script MT", "Segoe Script", cursive;
           font-size: 30px; color: #ffd27a; }
.cd-sign span { display: block; font-family: inherit; font-size: 13px; color: #a79fd6; font-family: system-ui, sans-serif; }
.cd-icons { display: flex; flex-wrap: wrap; gap: 4px; }
.cd-icons label { cursor: pointer; }
.cd-icons input { position: absolute; opacity: 0; width: 0; height: 0; padding: 0; border: 0; pointer-events: none; }
.cd-icons span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 20px;
                 border: 2px solid transparent; background: color-mix(in srgb, var(--line) 30%, transparent); }
.cd-icons input:checked + span { border-color: var(--accent); }
@media (max-width: 600px) {
  .cd-hero { height: 170px; aspect-ratio: auto; }
  .cd-title { top: 22px; } .cd-title h1 { font-size: 30px; }
  .cd-list { padding: 12px 12px 6px; }
  .cd-rule { grid-template-columns: 30px 1fr; padding: 12px; }
  .cd-icon { display: none; }
  .cd-num { font-size: 18px; padding-top: 4px; }
  .cd-text { font-size: 17px; }
}
.credo-day { display: flex; gap: 12px; align-items: center; border-left: 4px solid #ffd27a; }
.credo-day-icon { font-size: 28px; }
.credo-day-text { margin: 2px 0; font-weight: 650; font-size: 16px; }
.credo-day .grow { min-width: 0; }

/* Event rounds + database diagram (migration 044) */
body.guest { padding: 0; }
.guest-page { max-width: 640px; margin: 0 auto; padding: 12px 16px 40px; }
.guest-page .card { margin-bottom: 12px; }
.guest-msg { padding: 10px 14px; border-radius: 14px; background: var(--accent-soft); font-weight: 600; }
.guest-mission { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.guest-mission:first-of-type { border-top: 0; }
.guest-mission p { margin: 0; }
.guest-mission.done p { color: var(--muted); }
.guest-name { margin: 12px 0 2px; }
.guest-list li { font-size: 14px; }
.guest-list li.done { color: var(--muted); }
.guest-fair { text-align: center; }
.memories { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.memories figure { margin: 0; }
.memories figure.removed img { opacity: .4; }
.memories img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.memories figcaption { font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.round-member { padding: 10px 0; border-top: 1px solid var(--line); }
.round-member:first-of-type { border-top: 0; }
.round-member p { margin: 0 0 4px; }
.round-member li { display: flex; align-items: center; gap: 6px; }

/* Sub pages of a subject (migration 045) */
.subject-pages li { padding: 6px 0; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: baseline; }
.subject-pages li:first-child { border-top: 0; }
.subject-page-body { cursor: auto; margin: 0; padding: 0; }
.subject-page-body:hover { background: none; }

/* Arbeitszeit after review: estimated end on Heute, message on /arbeitszeit */
.tc-check { margin: 8px 0 0; }
.wt-hint { border-left: 4px solid var(--warn); font-weight: 600; padding-top: 10px; padding-bottom: 10px; }

/* 16px: no iOS zoom when tapping into a monospace field */
textarea.mono { font-size: 16px; }

/* Journal: a few lines from this month in earlier years */
.flashback { margin-bottom: 14px; }
.fb-text { position: relative; margin: 8px 0 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.fb-text cite { display: block; margin-top: 2px; font-size: 12.5px; font-style: normal; opacity: .85; }
.fb-more { position: relative; display: inline-block; margin-top: 8px; color: #fff; font-size: 13px; font-weight: 600; }

/* Kommunikation: quote on top, arcade tiles for the topics */
.quote-hero .hero-title { font-size: 22px; }
.quote-rule { position: relative; margin-top: 8px; padding-top: 8px; font-size: 14px; border-top: 1px solid rgba(255, 255, 255, .3); }
.topics h2 { margin: 6px 0 12px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; margin-bottom: 18px; }
.topic-tile { display: flex; flex-direction: column; align-items: center; gap: 7px; min-height: 0; padding: 16px 10px 12px;
  border: 2px solid var(--c); border-radius: 16px; color: #fff; font: inherit; cursor: pointer;
  background: linear-gradient(170deg, #27224f, #151232);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 55%, #000), 0 12px 18px rgba(0, 0, 0, .25);
  transition: transform .12s, box-shadow .12s;
  animation: topic-in .45s cubic-bezier(.2, .9, .3, 1.4) calc(var(--i) * 45ms) backwards; }
.topic-tile:hover, .topic-tile:focus-visible { transform: translateY(-3px); outline: none;
  box-shadow: 0 9px 0 color-mix(in srgb, var(--c) 55%, #000), 0 0 22px color-mix(in srgb, var(--c) 55%, transparent); }
.topic-tile:active { transform: translateY(5px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 55%, #000); }
.topic-tile b { font-size: 14.5px; line-height: 1.2; text-align: center; }
.topic-ico { position: relative; display: grid; place-items: center; width: 62px; height: 62px; flex: 0 0 auto; font-size: 32px; line-height: 1;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 55%, transparent), transparent 72%); }
.topic-tile:hover .topic-ico, .topic-tile:focus-visible .topic-ico { animation: topic-bob .55s ease-in-out infinite alternate; }
.topic-xp { display: flex; gap: 3px; width: 100%; max-width: 124px; }
.topic-xp i { flex: 1; height: 8px; border-radius: 2px; background: rgba(255, 255, 255, .16); }
.topic-xp i.on { background: var(--c); box-shadow: 0 0 6px var(--c); }
.topic-level { font: 700 11px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; opacity: .85; }
.topic-dlg { width: min(640px, calc(100vw - 24px)); max-height: 86vh; padding: 0; overflow: auto; color: var(--text);
  border: 2px solid var(--c); border-radius: 20px; background: var(--card-solid); }
.topic-dlg[open] { animation: topic-pop .38s cubic-bezier(.2, .9, .3, 1.25); }
.topic-dlg::backdrop { background: rgba(9, 7, 28, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.topic-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: #fff;
  background: linear-gradient(120deg, #27224f, color-mix(in srgb, var(--c) 60%, #151232)); }
.topic-head h2 { margin: 0; color: #fff; font-size: 20px; }
.topic-close { color: #fff; font-size: 18px; }
.topic-burst i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 2px; opacity: 0; background: var(--c); }
.topic-dlg[open] .topic-burst i { animation: topic-burst .7s ease-out .08s; }
.topic-sec { padding: 10px 16px 14px; }
.topic-sec h3 { margin: 4px 0 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.topic-ex { list-style: none; margin: 0; padding: 0; }
.topic-ex li { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.topic-ex li:first-child { border-top: 0; }
.topic-ex details { flex: 1; min-width: 0; }
.topic-ex summary { cursor: pointer; }
.topic-ex p { margin: 6px 0 0; }
.topic-tick { flex: 0 0 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; font-size: 12px; font-weight: 700;
  border: 2px solid color-mix(in srgb, var(--c) 70%, var(--line)); }
.topic-ex li.done .topic-tick { color: #14121f; background: var(--c); }
@keyframes topic-in { from { opacity: 0; transform: translateY(14px) scale(.85); } }
@keyframes topic-bob { to { transform: translateY(-5px) scale(1.08); } }
@keyframes topic-pop { from { opacity: 0; transform: translateY(26px) scale(.82); } }
@keyframes topic-burst { 0% { opacity: 1; transform: rotate(var(--a)) translateX(10px); } 100% { opacity: 0; transform: rotate(var(--a)) translateX(46px) scale(.4); } }
@media (prefers-reduced-motion: reduce) {
  .topic-tile, .topic-dlg[open], .topic-dlg[open] .topic-burst i, .topic-tile:hover .topic-ico { animation: none; }
}

/* Finanzen: where the money went, largest first */
.fin-chart h2 { margin-bottom: 10px; }
.fc-row { display: grid; grid-template-columns: minmax(96px, 170px) minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 5px 0; }
.fc-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-track { display: flex; gap: 2px; height: 20px; }
.fc-spent, .fc-plan { display: block; height: 100%; min-width: 0; border-radius: 0 4px 4px 0; }
.fc-spent { background: var(--accent); }
.fc-plan { border-radius: 0 4px 4px 0;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 45%, transparent) 0 4px, color-mix(in srgb, var(--accent) 16%, transparent) 4px 8px); }
.fc-row.over .fc-spent { background: var(--warn); }
.fc-val { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.fc-val small { font-weight: 400; color: var(--muted); }
.fc-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; }
.fc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fc-legend i { display: inline-block; width: 18px; height: 11px; border-radius: 2px; }
.fin-stats .stat .meta + .stat-num + .meta { display: block; }
@media (max-width: 560px) {
  .fc-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fc-track { grid-column: 1 / -1; grid-row: 2; height: 14px; }
}

/* Datenbank: star map (always dark, like the sky) */
.dbg { position: relative; height: min(76vh, 760px); min-height: 420px; margin-bottom: 8px; overflow: hidden; border-radius: 20px;
  background: #080918; box-shadow: var(--shadow); }
#dbg-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.dbg-top { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.dbg-top input { width: 190px; min-height: 36px; padding: 6px 12px; color: #f2f3ff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
  background: rgba(16, 15, 42, .78); font-size: 16px; }   /* under 16px the iPhone zooms in */
.dbg-top input::placeholder { color: #aab0d6; }
.dbg-x { min-height: 36px; min-width: 36px; padding: 0; color: #f2f3ff; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(16, 15, 42, .78); }
.dbg-legend { position: absolute; left: 12px; bottom: 10px; right: 12px; display: flex; flex-wrap: wrap; gap: 5px; pointer-events: none; }
.dbg-leg { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 10px; font-size: 12.5px; font-weight: 500;
  color: #f2f3ff; border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px; background: rgba(16, 15, 42, .72); }
.dbg-leg i { width: 10px; height: 10px; border-radius: 50%; background: var(--g); box-shadow: 0 0 8px var(--g); }
.dbg-leg small { color: #aab0d6; }
.dbg-leg.off { opacity: .45; text-decoration: line-through; }
.dbg-leg.off i { box-shadow: none; background: transparent; outline: 1px solid var(--g); }
.dbg-info { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 310px; padding: 12px 14px; overflow: auto; color: #f2f3ff;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; background: rgba(16, 15, 42, .88);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: r-rise .3s ease-out; }
.dbg-info[hidden] { display: none; }
.dbg-info-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.dbg-info h3 { margin: 4px 0; font-size: 17px; overflow-wrap: anywhere; color: #fff; }
.dbg-info h4 { margin: 12px 0 5px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #aab0d6; }
.dbg-tag { display: inline-block; padding: 1px 9px; font-size: 12.5px; border-radius: 999px; background: color-mix(in srgb, var(--g) 35%, transparent); }
.dbg-chip { display: inline-block; min-height: 0; margin: 0 4px 4px 0; padding: 2px 9px; font-size: 12.5px; font-weight: 500; color: inherit;
  border: 1px solid var(--g); border-radius: 999px; background: color-mix(in srgb, var(--g) 16%, transparent); }
.dbg-col { display: flex; align-items: baseline; gap: 6px; padding: 3px 0; font-size: 13.5px; border-top: 1px solid rgba(255, 255, 255, .08); }
.dbg-col small { margin-left: auto; color: #aab0d6; font-size: 11.5px; white-space: nowrap; }
.dbg-key { flex: 0 0 26px; font-size: 12px; }
.dbg-help { margin: 0 0 14px; }
.dbg-list { margin: 4px 0 8px; }
@media (max-width: 760px) {
  .dbg { height: 72vh; }
  .dbg-info { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 52%; z-index: 1; }
  .dbg-top input { width: 150px; }
}

/* Kalender: feeds */
.feed-list li { align-items: flex-start; }
.feed-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--c); }
.feed-list .meta { display: block; }
.feed-err { display: block; font-size: 13px; font-weight: 600; color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.feed-warn { margin: 0 0 8px; color: color-mix(in srgb, var(--warn) 70%, var(--text)); }

/* last in the file: wins over the .kind-* borders of list, board and task page */
.task.has-subject, .bcard.has-subject, .task-card.has-subject { border-left-color: var(--subject);
  background: color-mix(in srgb, var(--subject) 9%, var(--card)); }

/* Heute als Bento (2026-11-04): what to do / the day / me. Phone: one column in the page's order */
.today-head { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; position: relative; }
.bento { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.b-col { display: contents; }
.tile { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tile > * { margin: 0; }
@media (min-width: 900px) {
  .bento { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: stretch; }
  .b-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .b-col.c { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .bento { align-items: start; }
}
@media (min-width: 1180px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* equal, nothing stretched (2026-11-04) */
  .b-col.c { grid-column: auto; display: flex; align-items: stretch; }
}
.bento .card { padding: 14px 16px; }
.bento .hero { margin: 0; }
.fold { padding: 11px 16px !important; }
.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; font-size: 14px; }
.fold > summary::after { content: "▾"; color: var(--muted); flex: none; }
.fold[open] > summary::after { transform: rotate(180deg); }
.fold[open] > summary { margin-bottom: 10px; }
.fold > summary .meta { flex: none; margin-left: auto; }
.fold-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold[open] .fold-title { white-space: normal; }
.challenge.compact .ch-area, .challenge.compact > p.meta { display: none; }
.challenge.compact .ch-title { font-size: 16px; margin: 0 0 2px; }
.challenge.compact > p { font-size: 14px; margin: 0 0 8px; }
.day-plan .trip-map { height: 150px; }
.dp-list { list-style: none; margin: 0; padding: 0; }
.dp-list li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline; padding: 6px 0;
              border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); font-size: 14px; }
.dp-list li:first-child { border-top: 0; }
.dp-time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dp-list .past { opacity: .45; }
.dp-list .now { font-weight: 600; }
.dp-weg.oev .dp-time { color: #e5484d; }
.dp-weg.auto .dp-time { color: #2f6fe4; }
.dp-weg .meta { display: block; font-weight: 400; }
.dp-frei { font-size: 13px !important; color: var(--muted); }
.dp-frei .dp-time { font-weight: 500; }
.wx-mini > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 4px 11px; border-radius: 999px;
                     border: 1px solid var(--line); background: var(--card); font-size: 12.5px; white-space: nowrap; }
.wx-mini > summary small { color: var(--muted); }
.wx-mini > summary .wet b { color: #4f7ae0; }
.wx-panel { position: absolute; right: 0; top: calc(100% + 6px); width: min(300px, 92vw); z-index: 15; padding: 10px 12px; border-radius: 14px;
            background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow); }
.wx-panel .tm-sub { margin: 0; }
.bento .tm-cols { grid-template-columns: minmax(0, 1fr); }

/* Plattenspieler (migration 050): the vlog songs by type of music */
.r-tunes text { animation: r-tune 4s ease-in-out infinite; }
.r-tunes text:nth-child(2) { animation-delay: 1.3s; }
.r-tunes text:nth-child(3) { animation-delay: 2.6s; }
@keyframes r-tune { 0%, 100% { opacity: 0; transform: translateY(8px); } 50% { opacity: .9; transform: translateY(-6px); } }
.song-tools { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 12px; }
.song-group { margin-top: 2px; }
.song-group > summary { cursor: pointer; padding: 8px 2px; font-size: 15px; list-style: none; border-top: 1px solid var(--line); }
.song-group > summary::before { content: "▸ "; color: var(--muted); }
.song-group[open] > summary::before { content: "▾ "; }
.song-scroll { overflow-x: auto; }
.song-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.song-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 8px; }
.song-table td { padding: 7px 8px; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: top; }
.song-table tr[hidden], .song-group[hidden] { display: none; }
.song-table small { display: block; color: var(--muted); font-size: 12px; }
.song-name { min-width: 170px; font-weight: 600; }
.song-name small { font-weight: 400; }
.song-name a { color: inherit; text-decoration: none; }
.song-name a:hover { text-decoration: underline; }
.song-en { white-space: nowrap; color: var(--accent); letter-spacing: 1px; font-size: 11px; }
.song-en i { font-style: normal; opacity: .2; }
.song-msg { min-width: 220px; }
.song-guess { font-style: italic; }
.song-mom span { display: inline-block; margin: 0 3px 3px 0; padding: 1px 7px; border-radius: 999px; font-size: 12px; background: var(--bg2); border: 1px solid var(--line); }
.song-used a { display: block; font-size: 12px; }
.song-used button { min-height: 0; padding: 2px 9px; font-size: 13px; }
.song-table .is-used .song-name { opacity: .65; }
.song-sync { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.song-suggest { position: absolute; left: 0; top: 100%; z-index: 30; width: 320px; max-height: 280px; overflow-y: auto; margin-top: 6px; padding: 4px;
                background: var(--card-solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.song-suggest button { display: block; width: 100%; min-height: 0; padding: 7px 9px; text-align: left; border-radius: 8px; background: none; color: var(--text); }
.song-suggest button:hover { background: var(--bg2); }
.song-suggest b { display: block; font-size: 13.5px; font-weight: 600; }
.song-suggest small { display: block; font-size: 12px; color: var(--muted); }
.song-suggest .used { opacity: .6; }

/* Events (2026-11-04): the small calendar and who is going */
.ev-add .card { margin-bottom: 14px; }
.ev-strip .sem-col { min-height: 56px; max-height: 170px; overflow-y: auto; padding: 6px; gap: 4px; }
.ev-pick { display: block; cursor: pointer; }
.ev-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.ev-pick span { display: block; padding: 4px 7px; border-radius: 8px; font-size: 12px; line-height: 1.25; background: var(--card-solid); border: 1px solid var(--line); overflow-wrap: anywhere; }
.ev-pick small { display: block; color: var(--muted); font-size: 11px; }
.ev-pick input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.ev-pick input:checked + span small { color: #fff; }
.ev-pick input:focus-visible + span { outline: 2px solid var(--text); }
.ev-friends { margin-top: 8px; }
.seg label[hidden] { display: none; }
.ev-more { margin-top: 10px; }
.ev-idea { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-idea .seg span { padding: 3px 9px; font-size: 12.5px; }

.kn-hint { margin: 0 2px 12px; }

/* Freunde on Heute: one open card, a birthday shows its date first */
.people-card { display: flex; flex-direction: column; gap: 12px; }
.people-card h2 { margin: 0; }
.pc-part { display: flex; flex-direction: column; gap: 4px; }
.pc-part + .pc-part { padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.pc-sub { margin: 0; font-size: 12.5px; font-weight: 600; }
.pc-part p { margin: 0; }
.people-card .fp-name { font-size: 18px; }
.people-card .fp-reason { margin: 0 0 4px; font-size: 14px; }
.pc-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--text); background: var(--bg2); border: 1px solid var(--line); }
.pc-chip small { color: var(--muted); font-size: 11.5px; }
.bd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
li.bday { display: flex; align-items: flex-start; gap: 10px; }
.bd-date { flex: 0 0 44px; display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: 10px; line-height: 1.1;
           background: color-mix(in srgb, #ff5d8f 16%, var(--bg2)); border: 1px solid color-mix(in srgb, #ff5d8f 35%, var(--line)); }
.bd-date b { font-size: 16px; }
.bd-date small { font-size: 11px; color: var(--muted); }
.bd-text { min-width: 0; flex: 1; }
.bd-name { font-weight: 600; color: var(--text); text-decoration: none; }
.bd-when { font-size: 13px; color: var(--muted); margin-left: 4px; }
.bd-when.soon { color: #ff5d8f; font-weight: 600; }

/* Heute: numbers and weather in one line */
.today-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.top-stat { position: relative; display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 10px 6px; border-radius: 10px; overflow: hidden; font-size: 13px;
            color: var(--text); text-decoration: none; background: var(--card); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.top-stat b { font-size: 14px; }
.top-stat small { color: var(--muted); font-size: 11.5px; }
.top-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.top-bar i { display: block; height: 100%; background: var(--accent); }
.dp-gone { margin-bottom: 4px; }
.dp-gone > summary { cursor: pointer; list-style: none; font-size: 13px; }
.dp-gone > summary::before { content: "▸ "; }
.dp-gone[open] > summary::before { content: "▾ "; }
.setup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.setup-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; }
.setup-card { padding-block: 12px !important; }
.setup-card h2 { margin-bottom: 8px; }

/* Prototyp (migration 053) */
.pt-big { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 0 0 6px; text-wrap: balance; }
.pt-day { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.pt-step { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); font-size: 14px; }
.pt-weeks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; counter-reset: none; }
.pt-weeks li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-top: 3px solid var(--accent); background: var(--bg2); border-radius: 4px 4px 10px 10px; font-size: 13.5px; }
.pt-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pt-state { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line); width: fit-content; }
.pt-state.laeuft { background: color-mix(in srgb, #22c55e 18%, transparent); }
.pt-state.test { background: color-mix(in srgb, #f59e0b 22%, transparent); }
.pt-state.bau { background: color-mix(in srgb, #3b82f6 22%, transparent); }
.pt-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pt-mod { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 12px; color: var(--text); text-decoration: none; background: var(--bg2); border: 1px solid var(--line); }
a.pt-mod:hover { border-color: var(--accent); }
.pt-mod small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.pt-ico { font-size: 24px; line-height: 1.1; }
.pt-hint { margin: 8px 0 12px; }
.pt-phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; align-items: start; }
.pt-col { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--bg2); border: 1px solid var(--line); min-width: 0; }
.pt-col h3 { margin: 0; font-size: 16px; }
.pt-col > p { margin: 0; }
.pt-item { display: flex; gap: 9px; padding: 9px; border-radius: 10px; background: var(--card-solid); border: 1px solid var(--line); }
.pt-item.dran { border-color: var(--accent); }
.pt-item.fertig { opacity: .55; }
.pt-item.fertig b { text-decoration: line-through; }
.pt-item b { display: block; font-size: 14px; line-height: 1.3; }
.pt-item small { display: block; color: var(--muted); font-size: 12.5px; }
.pt-check { flex: none; width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 7px; background: transparent; color: var(--accent); border: 2px solid var(--accent); font-size: 14px; line-height: 1; }
.pt-acts { display: flex; flex-wrap: wrap; gap: 0 10px; margin-top: 3px; }
.pt-acts .link { font-size: 12.5px; min-height: 0; padding: 2px 0; }
.pt-acts .link.on { color: var(--accent); font-weight: 600; }
.pt-add { margin-top: 2px; }

/* Arbeit > Knowledge (migration 054) */
.wiki-search { margin-bottom: 14px; }
.wiki-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.wiki-chapter { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; color: var(--text); text-decoration: none;
                background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
a.wiki-chapter:hover { border-color: var(--accent); transform: translateY(-2px); }
.wiki-chapter b { font-size: 16px; overflow-wrap: anywhere; }
.wiki-ico { font-size: 30px; line-height: 1.1; }
.wiki-new > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; color: var(--accent); }
.wiki-new[open] > summary { margin-bottom: 8px; }
.wiki-icon-in { flex: 0 0 64px !important; width: 64px; text-align: center; }
.wiki-path { display: flex; flex-wrap: wrap; gap: 4px; }
.wiki-path a { text-decoration: none; }
.wiki-kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 10px; }
.wiki-kid { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none;
            background: var(--bg2); border: 1px solid var(--line); }
.wiki-kid:hover { border-color: var(--accent); }

/* Wachstum > Personalities (migration 054): flat night style like the Kreativ room */
.pe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.pe-card { padding: 0 !important; overflow: hidden; border-top: 4px solid var(--pc); }
.pe-svg { display: block; width: 100%; height: 150px; }
.pe-body { padding: 14px 16px 16px; }
.pe-body h2 { margin: 0 0 4px; font-size: 19px; }
.pe-essence { margin: 0 0 8px; font-weight: 600; color: color-mix(in srgb, var(--pc) 60%, var(--text)); }
.pe-sub { margin: 10px 0 2px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.pe-text { margin: 0; white-space: pre-line; font-size: 14.5px; }
.pe-src { margin: 10px 0 0; font-size: 12px; }
.pe-edit { margin-top: 10px; }
.pe-edit > summary { cursor: pointer; list-style: none; }
.pe-edit[open] > summary { margin-bottom: 8px; }
.pe-edit .swatch, .card.add .swatch { display: inline-block; width: 26px; height: 26px; padding: 0; border-radius: 50%; }

/* Verletzungen (migration 055): gentle note, not an alarm */
.hurt-warn { background: color-mix(in srgb, #f5a623 14%, transparent); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.hurt-warn p { margin: 4px 0; }

/* Reisen (migration 057): flat night map */
.tr-map { display: block; width: 100%; background: #16194a; }
.tr-hero { border-radius: 18px; overflow: hidden; background: #16194a; color: #fff; margin-bottom: 16px; box-shadow: var(--shadow); }
.tr-world { aspect-ratio: 720 / 290; }
.tr-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 12px 14px 14px; text-align: center; }
.tr-stats b { display: block; font-size: 22px; line-height: 1.15; color: #ffd166; }
.tr-stats span { font-size: 12px; color: #cdd6f4; }
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tr-card { display: block; overflow: hidden; border-radius: 16px; color: var(--text); text-decoration: none; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.tr-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tr-mini { aspect-ratio: 2 / 1; }
.tr-card-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 14px; }
.tr-card-body b { font-size: 16px; }
.tr-flags { font-size: 17px; line-height: 1.3; }
.tr-layout { display: grid; gap: 16px; }
.tr-big { aspect-ratio: 2 / 1; border-radius: 16px; }
.tr-summary { margin: 10px 2px 0; white-space: pre-line; }
.tr-step { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding-bottom: 16px; scroll-margin-top: 16px; }
.tr-step::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--c); opacity: .45; }
.tr-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #16194a; font-weight: 700; font-size: 13px; }
.tr-step:target .tr-step-body { outline: 2px solid var(--c); outline-offset: 4px; border-radius: 8px; }
.tr-step-body h2 { margin: 1px 0 2px; font-size: 18px; }
.tr-step-body p { margin: 0; }
.tr-text { margin-top: 6px !important; white-space: pre-line; font-size: 14.5px; }
@media (min-width: 1000px) {
  .tr-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .tr-side { position: sticky; top: 16px; }
}
@media (max-width: 560px) {
  .tr-stats { grid-template-columns: repeat(3, 1fr); row-gap: 10px; }
  .tr-stats b { font-size: 19px; }
}

/* Termin skippen (migration 059) */
.hero-skip { position: absolute; top: 10px; right: 10px; margin: 0; z-index: 1; }   /* like the ⏭ in the plan (2026-11-11) */
.hero-skip button { min-height: 0; width: 32px; height: 32px; padding: 0; font-size: 14px; color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .14); }
.hero:has(.hero-skip) .hero-title { padding-right: 40px; }

/* Aufgaben verknüpfen + Geschenke (migration 060) */
.linkchip { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.linked-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.linked-list form { margin: 0; }
.linked-list button { min-height: 0; width: 26px; height: 26px; padding: 0; }
.gift-list li { padding: 4px 0; }
.gift-idee { background: rgba(240, 180, 41, .18); }
.gift-gekauft { background: rgba(139, 124, 246, .2); }
.gift-geschenkt { background: rgba(63, 182, 139, .2); }
.bday-task, .bday-gift { display: block; }
.bday-task { text-decoration: none; }
.bday-buy > summary { list-style: none; cursor: pointer; }
.bday-buy[open] > summary { margin-bottom: 4px; }
.bday-buy .form.row input { min-width: 0; }
.bd-later { margin: 6px 0 0; font-size: 12.5px; }
.bd-later a { color: inherit; }

/* Geburtstag heute (2026-11-11) */
.hero.bday-hero { background: linear-gradient(135deg, #d9487a, #f2876b 55%, #ffcf6e); }
.bday-hero .hero-title small { font-size: 14px; font-weight: 500; opacity: .9; }
.bday-hero .btn-light { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, .9); color: #8a2340; font-weight: 600; text-decoration: none; }
.bday-buy > summary.btn-soft { display: inline-flex; margin-top: 4px; padding: 3px 10px; font-size: 13px; }

/* Zum Durchdenken (2026-11-11): tiles, the open one spans the row and shows the topic below */
.th-back { display: inline-block; margin-bottom: 6px; font-size: 13px; }
.th-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.th-count { padding: 2px 10px; border-radius: 999px; font-size: 12.5px; background: color-mix(in srgb, var(--c) 22%, transparent); border: 1px solid var(--c); }
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; align-items: start; }
.th-item { border: 2px solid var(--c); border-radius: 14px; background: var(--card); overflow: hidden; }
.th-item > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 92px; padding: 12px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--c) 18%, transparent), transparent); }
.th-item > summary::-webkit-details-marker { display: none; }
.th-item > summary b { font-size: 14px; line-height: 1.3; }
.th-item > summary .meta { margin-top: auto; font-size: 12px; }
.th-pill { align-self: flex-start; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--c) 30%, transparent); }
.th-item.th-closed { opacity: .6; }
.th-item[open] { grid-column: 1 / -1; opacity: 1; }
.th-item[open] > summary { min-height: 0; flex-direction: row; align-items: center; flex-wrap: wrap; }
.th-item[open] > summary b { font-size: 16px; flex: 1 1 200px; }
.th-item[open] > summary .meta { margin-top: 0; }
.th-body { padding: 4px 14px 14px; }
.th-status { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.th-status button { min-height: 0; padding: 4px 10px; font-size: 13px; border: 1px solid var(--c); background: transparent; color: var(--text); }
.th-status button.on { background: var(--c); color: #1b1b2f; font-weight: 600; }
.th-find { list-style: none; margin: 4px 0 10px; padding: 0; }
.th-find li { padding: 6px 0; border-top: 1px solid var(--line); line-height: 1.45; }
.th-find li:first-child { border-top: 0; }
.th-body .form { margin-top: 8px; }
.th-h2 { margin: 22px 0 10px; font-size: 17px; }
.th-text p { margin: 0 0 6px; line-height: 1.5; white-space: pre-wrap; }
.th-edit { margin: 10px 0 4px; }
.th-edit > summary { cursor: pointer; display: inline-block; font-size: 13px; }

/* Top 3 heute (2026-11-11) */
.top3 .late-soft { color: #e07a3f; font-weight: 600; }
.top3-win { margin: 2px 0 6px; font-weight: 600; }
.top3-done { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; text-decoration: line-through; }
.top3-pick { margin-top: 6px; }
.top3-pick > summary { cursor: pointer; display: inline-block; }
.top3-pick > summary.btn-soft { padding: 3px 10px; font-size: 13px; }
.top3-pick .form { gap: 2px; }
.top3-opt { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-top: 1px solid var(--line); line-height: 1.35; font-size: 14px; }
.top3-pick select { margin-top: 6px; }
.top3-pick button { margin-top: 6px; }
.top3-opt:first-of-type { border-top: 0; }
.top3-opt input { margin-top: 3px; }

/* 2-minute start / Version 0 (2026-11-11) */
.top3-go { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.top3-go form { margin: 0; }
.chip-btn { min-height: 0; padding: 4px 10px; font-size: 12.5px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.chip-btn.v0 { background: color-mix(in srgb, #8b5cf6 18%, transparent); color: #8b5cf6; }
.top3-running { display: block; margin: 0 0 8px; padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 600; text-decoration: none; }
.top3-week { margin: 8px 0 0; }
.start-box { max-width: 640px; margin: 4vh auto 0; padding: 28px 22px; text-align: center; border-radius: 22px; color: #fff;
  background: linear-gradient(150deg, #16a34a, #0e7a6b); box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
.start-box.v0 { background: linear-gradient(150deg, #6d4bd8, #3a2d7a); }
.start-label { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.start-task { margin: 8px 0 14px; font-size: 20px; line-height: 1.3; }
.start-step { margin: 0 auto; max-width: 30ch; font-size: 26px; font-weight: 700; line-height: 1.3; }
.start-hint { color: rgba(255, 255, 255, .8); }
.start-v0 { margin: 12px 0 0; font-size: 15px; opacity: .92; }
.start-clock { margin: 22px 0 18px; font: 700 64px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }
.start-box.is-done .start-clock { opacity: .45; }
.start-end > div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.start-end > div[hidden] { display: none; }
.start-end button.ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); }
.start-end button.link { background: none; color: rgba(255, 255, 255, .8); min-height: 0; padding: 4px; font-weight: 500; }
.start-q { margin: 0 0 6px; font-size: 17px; line-height: 1.45; }
.start-choices { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.start-choices button:not(.ghost) { background: #fff; color: #14532d; }
.start-box.v0 .start-choices button:not(.ghost) { color: #3a2d7a; }
.start-back { display: inline-block; margin-top: 18px; color: rgba(255, 255, 255, .8); }

/* Aufgaben list folded by default (2026-11-13) */
.lane-toggle { cursor: pointer; user-select: none; }
.lane-toggle::before { content: "▸"; display: inline-block; width: 1em; color: var(--muted); transition: transform .15s; }
.lane-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.lane-fold.folded > ul.tasks, .lane-fold.folded > .lane-hint { display: none; }
.lane-fold.folded > h2 { margin-bottom: 0; }
.start-hint a { color: #fff; font-weight: 600; }

/* Schlaf-Assistent (2026-11-13) */
.sleep-plan p { margin: 4px 0; line-height: 1.45; }
.form.way-row { flex-direction: row; align-items: center; gap: 8px; margin-top: 6px; }
.way-row .grow { flex: 1; font-size: 14px; }
.way-row input[name=name] { flex: 1; }
.way-row input[type=number] { width: 80px; }


/* Sperren (2026-11-13) */
.bl-now.on { border-left: 4px solid #e07a3f; }
.bl-apps { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.bl-app { padding: 3px 10px; border-radius: 999px; font-size: 13px; background: var(--accent-soft); }
.bl-app.zu { background: color-mix(in srgb, #e07a3f 22%, transparent); }
.bl-scroll { overflow-x: auto; }
.bl-scroll .bl-rules td { white-space: nowrap; }
.bl-link { padding: 8px 0; border-bottom: 1px solid var(--line); }
.bl-link input { display: block; width: 100%; margin: 6px 0; font-size: 13px; }
.bl-rules td, .bl-rules th { padding: 4px 10px 4px 0; text-align: left; vertical-align: top; font-size: 14px; }
.uf-pre { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 13px; white-space: pre; }
.uf-times { margin: 6px 0; border-collapse: collapse; font-size: 13px; }
.uf-times th, .uf-times td { text-align: left; padding: 3px 10px 3px 0; }
.cr-post { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.cr-post.on { padding: 6px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.top3-lock { margin: 6px 0 0; }

/* Wachstum > Ich (migration 068): altes Ich / neues Ich, Thermostat moments, 1 to 5 bars */
.ich-scale { display: flex; gap: 6px; margin: 4px 0 6px; }
.ich-scale button { flex: 1; font-weight: 700; padding: 8px 0; }
.ich-s1 { --ic: #e07a5f; } .ich-s2 { --ic: #f0a868; } .ich-s3 { --ic: #c9b458; } .ich-s4 { --ic: #7cc49a; } .ich-s5 { --ic: #2fb67c; }
.ich-scale button:hover { background: var(--ic); color: #fff; border-color: var(--ic); }
.ich-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; margin: 8px 0; }
.ich-bar { flex: 1; height: var(--h); min-height: 3px; border-radius: 3px 3px 0 0; background: var(--ic, var(--line)); }
.ich-bar.empty { background: var(--line); opacity: .5; }
.ich-today { margin-top: 8px; }
.ich-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.ich-card h2 { margin: 0 0 4px; }
.ich-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.ich-vs > div { border-radius: 10px; padding: 8px 10px; }
.ich-vs p { margin: 0; }
.ich-old { background: color-mix(in srgb, #e07a5f 14%, transparent); }
.ich-new { background: color-mix(in srgb, #2fb67c 14%, transparent); }
.ich-moments { list-style: none; padding: 0; margin: 0; }
.ich-moments li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.ich-moments li p { flex-basis: 100%; margin: 0; }

/* Finanzen: Import, Zahlungsart, Ausland, Investment (2026-11-13) */
.fin-methods { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.fin-chip { padding: 3px 10px; border-radius: 999px; font-size: 13px; background: var(--accent-soft); }
.fin-chip small, .fin-chip.m-foreign small { opacity: .7; }
.tag.m-twint, .fin-chip.m-twint { background: color-mix(in srgb, #111 12%, transparent); }
.tag.m-karte, .fin-chip.m-karte { background: color-mix(in srgb, #3a86ff 20%, transparent); }
.tag.m-ebanking, .fin-chip.m-ebanking { background: color-mix(in srgb, #8338ec 18%, transparent); }
.tag.m-foreign, .fin-chip.m-foreign { background: color-mix(in srgb, #ffbe0b 28%, transparent); }
.fin-import-res { margin: 8px 0 0; font-weight: 600; }
.inv-block { border-top: 1px solid var(--line); padding: 8px 0 4px; }
.inv-block:first-of-type { border-top: 0; }
.inv-chart { position: relative; margin-top: 6px; }
.inv-ranges { margin-bottom: 4px; }
.inv-ranges a { padding: 3px 9px; font-size: 12.5px; }
.inv-change { position: absolute; right: 0; top: 4px; font-weight: 700; font-size: 14px; }
.inv-change.pos { color: #16a34a; }
.inv-change.neg { color: #d0505f; }
.inv-row > summary { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; list-style: none; }
.inv-row > summary::-webkit-details-marker { display: none; }
.inv-val { text-align: right; white-space: nowrap; }
.inv-val .pos { color: #16a34a; }
.inv-val .neg, .stat .neg { color: #d0505f; }
.fin-periods a { white-space: nowrap; }

/* Ich: Jetziges / Zukünftiges Ich (2026-11-14) */
.ich-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }
@media (max-width: 760px) { .ich-two { grid-template-columns: 1fr; } }
.ich-half { border-top: 4px solid #b08968; }
.ich-half.future { border-top-color: #06d6a0; }
.ich-half h3 { font-size: 14px; margin: 14px 0 6px; }
.ich-list { list-style: none; margin: 0; padding: 0; }
.ich-list li { padding: 6px 0; border-top: 1px solid var(--line); line-height: 1.4; }
.ich-list li:first-child { border-top: 0; }
.ich-persona { display: flex; gap: 8px; align-items: baseline; }
.ich-goal { padding: 10px 0; border-top: 1px solid var(--line); }
.ich-goal:first-of-type { border-top: 0; }
.ich-goal > b { font-size: 15px; }
.ich-links { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ich-links li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.ich-links .grow { flex: 1; }
.ich-prog { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); white-space: nowrap; }
.ich-prog.done { background: #06d6a0; color: #10302a; }
.ich-link-form { margin-top: 6px; }
.pe-role { display: flex; gap: 6px; margin-bottom: 6px; }
.pe-role .chip-btn.on { background: var(--pc, #8b7cf6); color: #fff; }

/* App v1 (2026-11-14): Abendroutine, difficulty, who runs what on Automationen */
.ev-steps { list-style: none; margin: 0; padding: 0; }
.ev-steps li { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.ev-steps li:first-child { border-top: 0; }
.ev-steps li.done .grow { color: var(--muted); text-decoration: line-through; }
.ev-steps .grow { flex: 1; }
.ev-check { flex: none; width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 50%; background: transparent; color: #10302a;
  border: 2px solid var(--accent); font-size: 13px; line-height: 1; display: inline-grid; place-items: center; }
.ev-check.on { background: #06d6a0; border-color: #06d6a0; }
.ev-steps li.ev-sub { display: block; border-top: 0; padding: 0 0 6px 34px; }
.ev-pick { display: inline-flex; align-items: center; gap: 4px; margin: 0 6px 4px 0; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--accent-soft); font-size: 13px; }
.ev-pick .link { padding: 0 4px; min-height: 0; }
.form.row.ev-pickform { margin-top: 2px; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 6px; align-items: center; }
.form.row.ev-pickform select { min-width: 0; flex: 1; }
.form.row.ev-pickform button { flex: none; width: auto; }
.diff { font-variant-numeric: tabular-nums; }
.who { font-family: ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.who-vps { color: #4d8fe0; background: color-mix(in srgb, #4d8fe0 16%, transparent); }
.who-app { color: #a173e6; background: color-mix(in srgb, #a173e6 16%, transparent); }
.who-ki { color: #e07a35; background: color-mix(in srgb, #e07a35 16%, transparent); }
.who-legend { margin: 0 0 12px; font-size: 13.5px; line-height: 2; }

/* Prototyp > Stand aktuell (2026-11-14): Web / App / Claude per feature, from web/stand.json */
.st-wrap { overflow-x: auto; }
/* Konzept App v1 (/prototyp/app-v1, 2026-11-29): flows as chips with arrows, tables, scale, build steps */
.v1-lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.v1-lane { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); min-width: 0; }
.v1-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; }
.v1-flow li { padding: 4px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.v1-flow li + li::before { content: "→"; color: var(--muted); margin: 0 6px 0 -2px; }
.v1-flow li.ask { border-style: dashed; }
.v1-flow li.lock, .v1-lock { color: #c2414d; }
.v1-open { color: var(--accent); }
.v1-lane .v1-flow { flex-direction: column; align-items: flex-start; }
.v1-lane .v1-flow li + li::before { content: "↓ "; margin: 0; }
.v1-cases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.v1-cases li { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); }
.v1-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.v1-table th, .v1-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.v1-table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.v1-steps { margin: 4px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.v1-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.v1-lvl { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; text-align: center; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); min-width: 0; }
.v1-lvl b { font-size: 20px; color: var(--accent); }
.v1-lvl span { font-size: 11.5px; color: var(--muted); }
.v1-lvl i { display: block; height: 5px; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent)) left / var(--v1w) 100% no-repeat, color-mix(in srgb, var(--accent) 18%, transparent); }
.v1-lvl i.w1 { --v1w: 4%; } .v1-lvl i.w2 { --v1w: 10%; } .v1-lvl i.w3 { --v1w: 25%; } .v1-lvl i.w4 { --v1w: 55%; } .v1-lvl i.w5 { --v1w: 100%; }
.v1-build { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.v1-build li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.v1-build small { display: block; }
.v1-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.v1-build li.fertig .v1-dot { border-color: var(--accent); background: var(--accent); color: #fff; }
.v1-build li.teil .v1-dot { border-color: var(--accent); color: var(--accent); }
.v1-note { margin: 0; padding: 10px 14px; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 0 10px 10px 0; font-size: 14px; }
.st-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.st-table th { text-align: left; font-size: 12px; color: var(--muted); padding: 4px 6px; }
.st-table th:not(:first-child), .st-table td.st-cell { text-align: center; width: 64px; }
.st-table td { padding: 6px; border-top: 1px solid var(--line); vertical-align: top; }
.st-table td small { display: block; margin-top: 2px; }
.st-table tr.st-mod td { font-weight: 700; padding-top: 12px; border-top: 0; font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.st-cell.st-teil { background: color-mix(in srgb, #f0b429 14%, transparent); }
.st-cell.st-server { background: color-mix(in srgb, #4cc9f0 16%, transparent); }
.st-cell.st-nein { background: color-mix(in srgb, #e07a5f 10%, transparent); }
.pt-legend .st-cell { padding: 3px 8px; border-radius: 999px; font-size: 12.5px; }

/* Abendroutine as a jazz bar (2026-11-14, migration 073): one dark look on purpose, red booth lights,
   warm pendant lamps, a blue neon clock, candles on the bar. .on = lights come up one by one, .finale = they go down. */
.jb-page { --jb-ink: #0c0506; --jb-wall: #1d0a0c; --jb-booth: #3a1013; --jb-red: #ff4b3a; --jb-amber: #ffb862;
  --jb-neon: #4f8cff; --jb-cream: #f4e4d2; --jb-muted: #c09a8c; --jb-line: rgba(255, 120, 100, .16);
  --jb-display: "Bodoni 72", "Didot", "Bodoni MT", "Playfair Display", Georgia, serif; }
.jb { position: relative; overflow: hidden; border-radius: 18px; min-height: 300px; margin-bottom: 14px; color: var(--jb-cream);
  background: radial-gradient(120% 90% at 85% 100%, #2a0c0f 0%, var(--jb-wall) 45%, var(--jb-ink) 100%);
  border: 1px solid #2c1114; isolation: isolate; }
.jb-scene { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.jb-lamps { position: absolute; top: 0; left: 8%; right: 38%; display: flex; justify-content: space-around; }
.jb-lamps i { position: relative; width: 34px; height: 14px; margin-top: 46px; border-radius: 34px 34px 4px 4px;
  background: #3b2420; box-shadow: 0 0 0 transparent; transition: background 1.6s, box-shadow 1.6s; }
.jb-lamps i::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 46px; background: #3a2a26; }
.jb-lamps i::after { content: ""; position: absolute; left: 50%; top: 12px; width: 220px; height: 210px; transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 0%, rgba(255, 184, 98, .34), transparent 70%); opacity: .06; transition: opacity 2s; }
.jb-booths { position: absolute; right: 4%; bottom: 22%; display: flex; gap: 14px; align-items: flex-end; }
.jb-booths i { width: 16px; height: 62px; border-radius: 4px; background: var(--jb-booth);
  box-shadow: 0 0 0 transparent; transition: background 1.4s, box-shadow 1.4s; }
.jb-booths i:nth-child(odd) { height: 54px; }
.jb-clock { position: absolute; top: 34px; right: 26%; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  border: 3px solid #253a66; color: #6b7fa8; font: 600 13px/1 ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums;
  transition: border-color 1.4s, color 1.4s, box-shadow 1.4s; }
.jb-bar { position: absolute; left: -6%; bottom: -60px; width: 70%; height: 120px; border-radius: 0 60% 0 0 / 0 100% 0 0;
  border-top: 3px solid #6b3d22; background: linear-gradient(#24100b, #120708); display: flex; gap: 9%; padding: 14px 0 0 14%; }
.jb-bar b { width: 5px; height: 9px; border-radius: 2px 2px 1px 1px; background: #5a3a20; position: relative; transition: background 1s; }
.jb-bar b::after { content: ""; position: absolute; left: 50%; top: -9px; width: 5px; height: 8px; transform: translateX(-50%);
  border-radius: 50% 50% 40% 40%; background: #ffcf7a; opacity: 0; transition: opacity 1s; }
.jb-head { position: relative; z-index: 1; padding: 30px 26px 28px; max-width: 520px; display: flex; flex-direction: column; gap: 8px; }
.jb-eyebrow { margin: 0; font: 600 12px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--jb-muted); }
.jb-title { margin: 0; font: italic 400 clamp(38px, 7vw, 58px)/1.02 var(--jb-display); letter-spacing: .01em; color: var(--jb-cream);
  text-shadow: 0 0 0 transparent; transition: text-shadow 2s; }
.jb-title.small { font-size: clamp(30px, 5vw, 42px); }
.jb-sub { margin: 0; color: var(--jb-muted); max-width: 46ch; }
.jb-controls { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.jb-play { appearance: none; border: 1px solid #ff6a55; background: linear-gradient(#c22a20, #8d1914); color: #fff3e8; font-weight: 700;
  font-size: 16px; padding: 12px 22px; border-radius: 999px; cursor: pointer; box-shadow: 0 0 24px rgba(255, 75, 58, .35); min-height: 0; width: auto; }
.jb-play:hover { box-shadow: 0 0 34px rgba(255, 75, 58, .6); }
.jb-play:focus-visible, .jb-mini:focus-visible, .jb-check:focus-visible { outline: 2px solid var(--jb-amber); outline-offset: 3px; }
.jb-play:disabled { opacity: .5; cursor: default; }
.jb-now { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 999px;
  background: rgba(12, 5, 6, .55); border: 1px solid var(--jb-line); backdrop-filter: blur(4px); }
.jb-note { color: var(--jb-amber); font-size: 18px; }
.jb-track { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.jb-track b { font-weight: 600; }
.jb-track small { color: var(--jb-muted); }
.jb-mini { appearance: none; border: 1px solid var(--jb-line); background: rgba(255, 120, 100, .08); color: var(--jb-cream);
  border-radius: 999px; padding: 6px 12px; min-height: 0; width: auto; cursor: pointer; font-size: 14px; }
.jb-mini.wide { align-self: flex-start; }
.jb-finale { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(60% 60% at 50% 50%, rgba(12, 5, 6, .55), rgba(12, 5, 6, .9)); text-align: center; animation: jb-fade 2.4s ease both; }
.jb-finale[hidden], .jb-now[hidden], .jb-play[hidden] { display: none; }
@keyframes jb-fade { from { opacity: 0; } to { opacity: 1; } }

/* lights on, one by one */
.jb.on .jb-lamps i { background: #e6a15a; box-shadow: 0 6px 22px rgba(255, 184, 98, .55); }
.jb.on .jb-lamps i::after { opacity: 1; }
.jb.on .jb-booths i { background: var(--jb-red); box-shadow: 0 0 18px rgba(255, 75, 58, .9), 0 0 46px rgba(255, 75, 58, .45); }
.jb.on .jb-clock { border-color: var(--jb-neon); color: #cfe0ff; box-shadow: 0 0 14px rgba(79, 140, 255, .8), inset 0 0 10px rgba(79, 140, 255, .5); }
.jb.on .jb-bar b { background: #e9d6b8; }
.jb.on .jb-bar b::after { opacity: 1; animation: jb-flicker 2.8s ease-in-out infinite; }
.jb.on .jb-title { text-shadow: 0 0 22px rgba(255, 140, 90, .45); }
.jb.on .jb-lamps i:nth-child(1) { transition-delay: .1s; } .jb.on .jb-lamps i:nth-child(2) { transition-delay: .5s; } .jb.on .jb-lamps i:nth-child(3) { transition-delay: .9s; }
.jb.on .jb-lamps i:nth-child(1)::after { transition-delay: .1s; } .jb.on .jb-lamps i:nth-child(2)::after { transition-delay: .5s; } .jb.on .jb-lamps i:nth-child(3)::after { transition-delay: .9s; }
.jb.on .jb-booths i:nth-child(1) { transition-delay: 1.2s; } .jb.on .jb-booths i:nth-child(2) { transition-delay: 1.45s; }
.jb.on .jb-booths i:nth-child(3) { transition-delay: 1.7s; } .jb.on .jb-booths i:nth-child(4) { transition-delay: 1.95s; }
.jb.on .jb-booths i:nth-child(5) { transition-delay: 2.2s; } .jb.on .jb-clock { transition-delay: 2.5s; }
.jb.on .jb-bar b:nth-child(2n)::after { animation-delay: -1.3s; } .jb.on .jb-bar b:nth-child(3n)::after { animation-delay: -.6s; }
@keyframes jb-flicker { 0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; } 40% { transform: translateX(-50%) scale(.85, 1.1); opacity: .8; }
  60% { transform: translateX(-52%) scale(1.05, .9); opacity: .95; } }
.jb.finale .jb-booths i, .jb.finale .jb-lamps i, .jb.finale .jb-clock { transition-duration: 18s; transition-delay: 0s; }

/* setlist */
.jb-card { background: linear-gradient(#1a0b0d, #140809); color: var(--jb-cream); border: 1px solid #2c1114; border-radius: 18px;
  padding: 18px 20px; margin-bottom: 14px; }
.jb-card h2, .jb-card summary { margin: 0 0 8px; font: italic 400 26px/1.2 var(--jb-display); color: var(--jb-cream); display: flex; align-items: baseline; gap: 10px; }
.jb-card summary { margin: 0; cursor: pointer; list-style: none; font-size: 22px; }
.jb-count { font: 600 13px ui-monospace, Consolas, monospace; color: var(--jb-muted); font-style: normal; font-variant-numeric: tabular-nums; }
.jb-steps { list-style: none; margin: 0; padding: 0; counter-reset: jb; }
.jb-step { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--jb-line); counter-increment: jb; }
.jb-step:first-child { border-top: 0; }
.jb-check { flex: none; width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid #8a3a30; background: transparent;
  color: #1a0b0d; display: inline-grid; place-items: center; font-size: 15px; font-weight: 800; cursor: pointer; transition: background .3s, border-color .3s, box-shadow .3s; }
span.jb-check { cursor: default; }
.jb-step.done .jb-check { background: var(--jb-amber); border-color: var(--jb-amber); box-shadow: 0 0 14px rgba(255, 184, 98, .5); }
.jb-stepbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.jb-steplabel { font-size: 16px; line-height: 28px; }
.jb-step.done .jb-steplabel { color: var(--jb-muted); text-decoration: line-through; text-decoration-color: rgba(255, 184, 98, .5); }
.jb-link { color: var(--jb-amber); font-size: 14px; }
.jb-journal summary { color: var(--jb-amber); cursor: pointer; font-size: 14px; }
.jb-journal textarea, .jb-pickrow select { width: 100%; margin-top: 6px; background: #0f0607; color: var(--jb-cream); border: 1px solid var(--jb-line); border-radius: 10px; }
.jb-journal { display: flex; flex-direction: column; }
.jb-journal[open] { gap: 0; }
.jb-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.jb-pick { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px; border-radius: 999px; font-size: 13.5px;
  background: rgba(255, 184, 98, .12); border: 1px solid rgba(255, 184, 98, .3); }
.jb-pick .link { color: var(--jb-muted); padding: 0 6px; min-height: 0; }
.jb-pickrow { display: flex; gap: 8px; align-items: center; }
.jb-pickrow select { margin: 0; flex: 1; min-width: 0; }
.jb-songlist { margin: 10px 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.jb-songlist li { display: flex; gap: 10px; align-items: center; }
.jb-songlist .grow { flex: 1; min-width: 0; }
.jb-songlist small { color: var(--jb-muted); }
.jb-songs .form input { background: #0f0607; color: var(--jb-cream); }
.jb-songs .meta { color: var(--jb-muted); }
.ev-start { margin: 2px 0 8px; }
.hero-go { display: inline-block; padding: 10px 18px; border-radius: 999px; background: #8d1914; color: #fff3e8; font-weight: 700; text-decoration: none; }
@media (max-width: 560px) {
  .jb { min-height: 340px; }
  .jb-head { padding: 22px 18px 120px; }
  .jb-lamps { right: 10%; }
  .jb-clock { top: auto; bottom: 70px; right: 8%; }
  .jb-booths { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .jb *, .jb { transition-duration: .01s !important; transition-delay: 0s !important; animation: none !important; }
}

/* Abendroutine music player on every page (2026-11-14): bottom right, above the phone tab bar */
.asx-player { position: fixed; z-index: 30; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 8px 10px 8px 14px; border-radius: 999px;
  background: linear-gradient(#2a0d10, #170708); color: #f4e4d2; border: 1px solid rgba(255, 120, 100, .28);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 24px rgba(255, 75, 58, .18); }
.asx-player[hidden] { display: none; }
@media (min-width: 900px) { .asx-player { bottom: 20px; right: 24px; } }
.asx-p-note { font-size: 18px; }
.asx-p-track { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; color: inherit; text-decoration: none; }
.asx-p-track b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.asx-p-track small { font-size: 12px; color: #c09a8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.asx-p-btn, .asx-p-stop { appearance: none; min-height: 0; width: auto; border-radius: 999px; cursor: pointer; color: #f4e4d2;
  border: 1px solid rgba(255, 120, 100, .25); background: rgba(255, 120, 100, .1); padding: 6px 10px; font-size: 14px; }
.asx-p-stop { background: #8d1914; border-color: #c22a20; font-weight: 600; white-space: nowrap; }
.asx-p-btn:focus-visible, .asx-p-stop:focus-visible { outline: 2px solid #ffb862; outline-offset: 2px; }
@media (max-width: 420px) { .asx-p-track b, .asx-p-track small { max-width: 110px; } }
.jb-hint { margin: 0; color: var(--jb-muted); font-size: 13.5px; }
.jb-controls [hidden] { display: none; }

/* Unteraufgaben (2026-11-15, migration 075): indented, a small line back to the main task */
.task.subtask, .bcard.subtask { margin-left: 22px; position: relative; }
.task.subtask::before, .bcard.subtask::before { content: ""; position: absolute; left: -15px; top: -4px; width: 10px; height: calc(50% + 4px);
  border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); border-bottom-left-radius: 8px; pointer-events: none; }
.sub-of { font-size: 12px; color: var(--muted); }
.sub-prog { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sub-list { list-style: none; margin: 0 0 10px 6px; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: flex; flex-direction: column; }
.sub-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.sub-row .grow { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.sub-row.done .grow { text-decoration: line-through; color: var(--muted); }
.sub-check { flex: none; width: 24px; height: 24px; min-height: 0; padding: 0; border-radius: 7px; background: transparent; color: var(--accent);
  border: 2px solid var(--accent); font-size: 14px; line-height: 1; }
.sub-check.on { background: var(--accent); color: #fff; }
.form.row.sub-add { flex-wrap: nowrap; }
.form.row.sub-add input[name=title] { flex: 1; min-width: 0; }
.form.row.sub-add input[type=date] { flex: none; width: auto; }
.form.row.sub-add button { flex: none; width: auto; }

/* Board: + per row to add a task right there (2026-11-15) */
.blane-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.blane-row .blane { flex: 1; min-width: 0; }
.blane-row > .lane-plus { flex: none; margin-top: 8px; }
.blane-row .blane-add { flex: 1 0 100%; margin: 6px 0 2px; flex-wrap: nowrap; }
.blane-row .blane-add[hidden] { display: none; }
.blane-row .blane-add input[name=title] { flex: 1; min-width: 0; }
.blane-row .blane-add button { flex: none; width: auto; }

/* Top 3 of today glow softly on the Aufgaben page (list + board), the colours of the "Jetzt dran" card (2026-11-15) */
.task.top3-glow, .bcard.top3-glow {
  background: linear-gradient(135deg, rgba(109, 91, 208, .22) 0%, rgba(154, 123, 232, .16) 45%, rgba(240, 165, 138, .16) 100%);
  animation: top3-glow 4.5s ease-in-out infinite; }
.tasks .task.top3-glow { border-radius: 12px; border-top-color: transparent; margin: 4px 0; padding-right: 8px; }
.tasks .task.top3-glow + .task { border-top-color: transparent; }
@keyframes top3-glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(154, 123, 232, .38), 0 0 12px rgba(154, 123, 232, .22); }
  50% { box-shadow: 0 0 0 1px rgba(240, 165, 138, .5), 0 0 22px rgba(240, 165, 138, .34); } }
.top3-mark { font-weight: 700; background: linear-gradient(90deg, #9a7be8, #f0a58a); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .task.top3-glow, .bcard.top3-glow { animation: none; box-shadow: 0 0 0 1px rgba(154, 123, 232, .45), 0 0 16px rgba(154, 123, 232, .3); } }

/* Meine Egos (2026-11-15): character cards on /ich; the one he wants to become glows, an arrow leads to it */
.ego-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 10px; }
.ego { position: relative; border-radius: 16px; padding: 14px; border: 1px solid var(--line); border-top: 4px solid var(--ec);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ec) 12%, transparent), transparent 60%); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ego-ziel { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ec) 55%, transparent), 0 0 26px color-mix(in srgb, var(--ec) 35%, transparent); }
.ego-top { display: flex; gap: 12px; align-items: center; }
.ego-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 800;
  color: #fff; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--ec) 70%, #fff), var(--ec)); box-shadow: 0 4px 14px color-mix(in srgb, var(--ec) 45%, transparent); }
.ego-role { font-size: 12px; color: var(--muted); font-weight: 600; }
.ego-name { margin: 0; font-size: 22px; line-height: 1.1; }
.ego-motto { margin: 0; font-style: italic; }
.ego-facts { margin: 0; display: grid; gap: 2px; }
.ego-facts dt { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.ego-facts dd { margin: 0; white-space: pre-line; }
.ego-facts dd.empty { color: var(--muted); font-style: italic; opacity: .7; }
.ego-edit summary { cursor: pointer; }
.ego-emoji-in { flex: 0 0 72px; width: 72px; }
.egos input[type=color] { flex: 0 0 44px; width: 44px; min-height: 38px; padding: 2px; }
@media (min-width: 900px) {
  .ego-jetzt::after { content: "→"; position: absolute; right: -14px; top: 30px; transform: translateX(50%); font-size: 20px; color: var(--muted); }
  .ego-jetzt:last-child::after { content: none; }
}

/* Reisen › Will ich hin (2026-11-15) */
.ts-country h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ts-friends { margin: 0 0 8px; font-size: 14px; }
.ts-city { padding-top: 6px; }
.ts-city h3 { margin: 8px 0 4px; font-size: 15px; }
.ts-list { margin: 0 0 0 6px; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; }
.ts-spot { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ts-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ts-name a { color: inherit; }
.ts-spot.done .ts-name { text-decoration: line-through; color: var(--muted); }

/* Kreativ on the phone (2026-11-16: "alles zusammengedrückt"): the open panel no longer lies on the
   tiny room with margins and blur, it sits full width below a picture strip; tiles one per row with room;
   the song table becomes one small card per song; the page head wraps so the title has the full width. */
@media (max-width: 700px) {
  .room-wrap.is-open { aspect-ratio: auto; display: block; }
  .room-wrap.is-open .room { position: relative; inset: auto; aspect-ratio: 1200 / 620; margin: 0 0 12px; }
  .room-wrap.is-open .room-scene { opacity: .85; }
  .room-wrap.is-open .room-panel { margin: 0; padding: 18px 16px; background: var(--card);
    -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hs.hs-platte span { bottom: auto; top: 2px; }   /* Musik and Videos labels no longer overlap */
  .room-panel h2 { flex-wrap: wrap; justify-content: flex-start; font-size: 18px; color: var(--text); gap: 2px 10px; }
  .room-panel h2 .meta { flex-basis: 100%; font-size: 13px; }
  .room-panel .cr-grid { grid-template-columns: 1fr; gap: 10px; }
  .room-panel .cr-tile { margin: 0; padding: 14px 16px; gap: 6px; box-shadow: none; }
  .room-panel .cr-title { font-size: 17px; line-height: 1.3; }
  .room-panel .phase-strip { grid-template-columns: 1fr 1fr; gap: 8px; }
  .room-panel .add summary { padding: 6px 0; }
  .room-panel .reading-row { gap: 12px; }
  .room-panel .page-plus button { flex: 1; }

  .song-tools .seg { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; }
  .song-tools .seg label { flex: 0 0 auto; }
  .song-group > summary { padding: 12px 2px; }
  .song-scroll { overflow: visible; }
  .song-table { min-width: 0; display: block; font-size: 14px; }
  .song-table thead { display: none; }
  .song-table tbody { display: block; }
  .song-table tr { display: grid; grid-template-columns: auto auto 1fr auto; gap: 4px 10px; align-items: baseline;
                   padding: 12px 2px; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
  .song-table tr[hidden] { display: none; }
  .song-table td { display: block; padding: 0; border: 0; min-width: 0; }
  .song-table .song-name { grid-column: 1 / 4; grid-row: 1; min-width: 0; font-size: 15px; }
  .song-table .song-used { grid-column: 4; grid-row: 1 / 3; text-align: right; }
  .song-table .song-en { grid-column: 1; grid-row: 2; }
  .song-table td:nth-child(3), .song-table td:nth-child(4) { grid-row: 2; font-size: 12.5px; color: var(--muted); }
  .song-table .song-msg, .song-table .song-mom { grid-column: 1 / -1; min-width: 0; line-height: 1.45; }
  .song-table .song-used button { min-height: 34px; min-width: 34px; }

  .cr-head { flex-wrap: wrap; gap: 4px 12px; }
  .cr-title-form { flex-wrap: wrap; flex-basis: 100%; gap: 2px; }
  .cr-title-input { flex-basis: 100%; font-size: 22px; line-height: 1.25; }
  .cr-bar, .cr-event, .cr-todos, .linked-card { padding: 16px; }
  .cr-phases button { padding: 8px 12px; }
  .cr-add select { flex: 1 1 100%; }
  .cr-todo-list { gap: 0; }
  .cr-todo-list li { padding: 9px 0; border-top: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
  .cr-todo-list li:first-child { border-top: 0; }
  .cr-box { width: 28px; height: 28px; }
  .cr-todo-del { opacity: .5; padding: 6px; }
  .cr-event { gap: 8px; }
  .cr-event select { flex-basis: 100%; }
}

/* Buddy-Tracking charts (2026-11-17): /sperren and Track Friend */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 18px; }
.tc-grid h3 { margin: 6px 0 2px; font-size: 13px; color: var(--muted); font-weight: 600; }
.track-charts .chart { width: 100%; height: auto; max-width: 420px; display: block; }
.track-charts .hchart { max-width: 520px; }

/* Track Friend wide (2026-11-17): cards side by side, the page is filled instead of one long column */
.guest-page.track-page { max-width: 1440px; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); grid-auto-flow: dense; gap: 12px; align-items: start; }
.tg-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tg-col > .card, .track-grid .tc-full > .card { margin: 0; }
.track-grid > .tc-full { grid-column: 1 / -1; }
@media (min-width: 1100px) { .track-grid { grid-template-columns: 1fr 1fr 2fr; } }
.track-grid .tc-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tc-days th, .tc-days td { text-align: center; white-space: nowrap; }
.tc-days tr > th:first-child { text-align: left; }

/* Wachstum > Ich aufgeräumt (2026-11-20, migration 083): Leitsatz, Ich jetzt | Ich Zukunft, Loops */
.ich-lead { border-left: 4px solid #06d6a0; }
.ich-leitsatz { margin: 0 0 6px; font-size: clamp(19px, 2.2vw, 25px); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.ich-pre { white-space: pre-line; margin: 0; }
.ich-vision .ich-pre { margin: 6px 0 4px; }
.ich-lead-edit, .ich-row-edit { margin-top: 6px; }
.ich-cmp-head, .ich-cmp-grid { display: grid; grid-template-columns: minmax(130px, 0.7fr) 1fr 1fr 64px; gap: 12px; align-items: start; }
.ich-cmp-head { font-size: 12.5px; color: var(--muted); padding: 0 0 6px; border-bottom: 1px solid var(--border, rgba(255,255,255,.08)); }
.ich-cmp-row { padding: 10px 0; border-bottom: 1px solid var(--border, rgba(255,255,255,.08)); }
.ich-sit { margin: 0; font-size: 15px; display: grid; gap: 2px; }
.ich-sit small { font-weight: 400; }
.ich-cell { border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.ich-cell.now { background: color-mix(in srgb, #e07a5f 13%, transparent); }
.ich-cell.future { background: color-mix(in srgb, #2fb67c 15%, transparent); }
.ich-cell .meta { margin: 6px 0 0; }
.ich-lbl { display: none; font-size: 12px; color: var(--muted); margin: 0 0 2px; }
.ich-tools { display: flex; gap: 4px; justify-content: flex-end; }
.ich-tools button[disabled] { opacity: .3; }
.ich-loops .ich-kern { margin: 0 0 10px; }
.ich-loop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 10px; }
.ich-loop { border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; align-content: start; }
.ich-loop-top { display: flex; align-items: start; gap: 8px; }
.ich-loop-top h3 { margin: 0; font-size: 15px; flex: 1; }
.ich-loop .ich-lbl { display: block; margin-top: 4px; }
.ich-break { background: color-mix(in srgb, #2fb67c 15%, transparent); border-radius: 10px; padding: 8px 10px; margin-top: 4px; }
.ich-break .ich-lbl { margin-top: 0; }
@media (max-width: 760px) {
  .ich-cmp-head { display: none; }
  .ich-cmp-grid { grid-template-columns: 1fr auto; }
  .ich-sit { grid-column: 1; }
  .ich-tools { grid-column: 2; grid-row: 1; }
  .ich-cell { grid-column: 1 / -1; }
  .ich-lbl { display: block; }
}

/* Löschschutz code on /sperren (2026-11-22) */
.bl-code { font: 700 2.6rem/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .35em; margin: 6px 0 2px; color: var(--accent); }
/* Laptop-Zeit on /gesundheit (2026-11-22) */
.lt-bars { display: grid; gap: 6px; margin: 4px 0 8px; }
.lt-row { display: grid; grid-template-columns: 52px 1fr 64px; align-items: center; gap: 8px; }
.lt-row b { text-align: right; font-size: .9rem; }
.lt-track { height: 10px; border-radius: 6px; background: var(--line, rgba(0,0,0,.08)); overflow: hidden; }
.lt-track i { display: block; height: 100%; border-radius: 6px; background: var(--lav, var(--accent)); }

/* ---- Abendroutine, look 2 (2026-11-22, tasteskill): Newsreader italic + Hanken Grotesk (static/fonts, OFL),
   brass on near black, progress row, setlist left and "Morgen zuerst" right. Overrides the first jazz bar look above. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/static/fonts/newsreader.woff2) format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400 600; font-display: swap; src: url(/static/fonts/newsreader-italic.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/static/fonts/hanken-grotesk.woff2) format("woff2"); }
.jb-page { --jb-ink: #0e0607; --jb-surface: #1a0b0d; --jb-raise: #241012; --jb-amber: #e8a65a; --jb-brass: #c98d45; --jb-cream: #f4e4d2;
  --jb-muted: #b8938a; --jb-line: rgba(232, 166, 90, .14); --jb-ease: cubic-bezier(.2, .8, .2, 1);
  --jb-display: "Newsreader", "Bodoni 72", Georgia, serif; --jb-text: "Hanken Grotesk", system-ui, sans-serif; }
.jb-page main, .jb-page .jb, .jb-page .jb-card { font-family: var(--jb-text); }
.jb { min-height: 380px; border-radius: 22px; border: 1px solid var(--jb-line); margin-bottom: 16px;
  background: radial-gradient(70% 90% at 82% 105%, #3a1210 0%, transparent 60%), radial-gradient(120% 90% at 0% 0%, #1f0b0d 0%, var(--jb-ink) 70%); }
.jb-head { padding: 38px 36px 34px; max-width: 600px; gap: 10px; }
.jb-eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1.4 var(--jb-text); letter-spacing: .2em; color: var(--jb-amber); }
.jb-live { width: 7px; height: 7px; border-radius: 50%; background: var(--jb-muted); opacity: .5; }
.jb.on .jb-live { background: #ff5a45; opacity: 1; animation: jb-live 2.4s var(--jb-ease) infinite; }
@keyframes jb-live { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 69, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255, 90, 69, 0); } }
.jb-title { font: italic 400 clamp(52px, 7.5vw, 92px)/.95 var(--jb-display); letter-spacing: -0.02em; font-optical-sizing: auto; }
.jb-title.small { font-size: clamp(36px, 5vw, 54px); }
.jb-sub { font-size: 16px; color: var(--jb-muted); }
.jb-progress { display: flex; gap: 6px; margin: 6px 0 2px; max-width: 320px; }
.jb-progress i { flex: 1; height: 4px; border-radius: 4px; background: rgba(244, 228, 210, .12); transition: background-color .5s var(--jb-ease); }
.jb-progress i.on { background: var(--jb-amber); box-shadow: 0 0 10px rgba(232, 166, 90, .45); }
.jb-play { border: 0; border-radius: 999px; padding: 13px 24px; min-height: 48px; font: 600 15px var(--jb-text); color: var(--jb-ink);
  background: var(--jb-amber); box-shadow: 0 10px 30px rgba(232, 166, 90, .22); transition: transform .12s var(--jb-ease), background-color .12s var(--jb-ease), box-shadow .2s var(--jb-ease); }
.jb-play:hover { background: #f2b46a; transform: translateY(-1px); box-shadow: 0 14px 36px rgba(232, 166, 90, .32); }
.jb-play:active { transform: translateY(1px) scale(.985); }
.jb-mini { border-radius: 999px; padding: 9px 16px; min-height: 40px; font: 500 14px var(--jb-text); border: 1px solid rgba(244, 228, 210, .22);
  background: transparent; color: var(--jb-cream); transition: transform .12s var(--jb-ease), background-color .12s var(--jb-ease); }
.jb-mini:hover { background: rgba(244, 228, 210, .06); transform: translateY(-1px); }
.jb-mini:active { transform: translateY(1px) scale(.985); }
.jb-hint { color: var(--jb-muted); font-size: 13.5px; margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .jb-head > * { animation: jb-in .6s var(--jb-ease) both; }
  .jb-head > :nth-child(2) { animation-delay: .06s; } .jb-head > :nth-child(3) { animation-delay: .12s; }
  .jb-head > :nth-child(4) { animation-delay: .18s; } .jb-head > :nth-child(5) { animation-delay: .24s; }
}
@keyframes jb-in { from { opacity: 0; transform: translateY(10px); } }

.jb-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.jb-side { display: grid; gap: 16px; min-width: 0; }
.jb-card { background: var(--jb-surface); border: 1px solid var(--jb-line); border-radius: 22px; padding: 22px 24px; margin-bottom: 0; }
.jb-card h2, .jb-card summary { font: italic 400 30px/1.1 var(--jb-display); letter-spacing: -0.01em; }
.jb-card summary { font-size: 24px; }
.jb-count { font: 500 13px var(--jb-text); letter-spacing: .04em; color: var(--jb-muted); }

.jb-step { display: grid; grid-template-columns: 30px 34px minmax(0, 1fr); gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--jb-line); }
.jb-num { font: italic 400 22px/28px var(--jb-display); color: rgba(244, 228, 210, .35); font-variant-numeric: lining-nums; text-align: right; }
.jb-step.done .jb-num { color: var(--jb-amber); }
.jb-check { width: 30px; height: 30px; border: 1.5px solid rgba(232, 166, 90, .55); color: var(--jb-ink); font-weight: 700;
  transition: background-color .18s var(--jb-ease), transform .12s var(--jb-ease), box-shadow .3s var(--jb-ease); }
button.jb-check:hover { transform: scale(1.06); border-color: var(--jb-amber); }
button.jb-check:active { transform: scale(.94); }
.jb-step.done .jb-check { background: var(--jb-amber); border-color: var(--jb-amber); box-shadow: 0 0 16px rgba(232, 166, 90, .45); }
.jb-steplabel { font-size: 17px; line-height: 30px; }
.jb-link { color: var(--jb-amber); font-size: 14px; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .15s var(--jb-ease); }
.jb-link:hover { background-size: 100% 1px; }
.jb-journal textarea { background: var(--jb-ink); border-radius: 12px; }

/* Morgen zuerst */
.jb-slots { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.jb-slot { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px dashed rgba(244, 228, 210, .16); color: var(--jb-muted); font-size: 15px; min-height: 48px; }
.jb-slot.on { border: 1px solid rgba(232, 166, 90, .4); background: rgba(232, 166, 90, .08); color: var(--jb-cream); }
.jb-slot .grow { flex: 1; min-width: 0; }
.jb-snum { font: italic 400 24px/1 var(--jb-display); color: var(--jb-amber); width: 20px; text-align: center; }
.jb-slot:not(.on) .jb-snum { color: rgba(244, 228, 210, .3); }
.jb-x { appearance: none; border: 0; background: transparent; color: var(--jb-muted); width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; }
.jb-x:hover { background: rgba(244, 228, 210, .08); color: var(--jb-cream); }
.jb-hint2, .jb-done-note { margin: 0 0 10px; font-size: 13.5px; color: var(--jb-muted); }
.jb-done-note { color: var(--jb-amber); }
.jb-groups { display: grid; gap: 6px; }
.jb-group { border: 1px solid var(--jb-line); border-radius: 14px; overflow: hidden; }
.jb-group summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font: 500 15px var(--jb-text); cursor: pointer; list-style: none; min-height: 46px; }
.jb-group summary::-webkit-details-marker { display: none; }
.jb-group summary::after { content: "›"; color: var(--jb-muted); transition: transform .15s var(--jb-ease); }
.jb-group[open] summary::after { transform: rotate(90deg); }
.jb-group summary .grow { flex: 1; min-width: 0; }
.jb-group ul { list-style: none; margin: 0; padding: 0 6px 6px; display: grid; gap: 2px; }
.jb-task { appearance: none; width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; min-height: 44px;
  border: 0; border-radius: 10px; background: transparent; color: var(--jb-cream); font: 400 14.5px var(--jb-text);
  transition: background-color .12s var(--jb-ease), transform .12s var(--jb-ease); }
.jb-task .grow { flex: 1; min-width: 0; }
.jb-task small { color: var(--jb-muted); font-size: 12px; white-space: nowrap; }
.jb-plus { color: var(--jb-amber); opacity: .5; transition: opacity .12s, transform .15s var(--jb-ease); }
.jb-task:hover { background: rgba(232, 166, 90, .08); }
.jb-task:hover .jb-plus { opacity: 1; transform: translateX(-2px); }
.jb-task:active { transform: scale(.99); }
.jb-task:focus-visible, .jb-x:focus-visible, .jb-group summary:focus-visible { outline: 2px solid var(--jb-amber); outline-offset: 2px; }

@media (max-width: 900px) {
  .jb-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .jb-head { padding: 26px 20px 130px; }
  .jb-card { padding: 18px 16px; border-radius: 18px; }
  .jb-step { grid-template-columns: 30px 24px minmax(0, 1fr); gap: 10px; }
  .jb-num { font-size: 18px; }
}
.jb-card .jb-journal summary { font: 500 14px var(--jb-text); color: var(--jb-amber); letter-spacing: 0; }

/* ---- Redesigned pages (2026-11-22, tasteskill): shared type, Instrument Sans + DM Mono from static/fonts (OFL).
   A page opts in with the class .tz on .page (e.g. cal-page tz); colours stay the app's own tokens (light, dark, abend). */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; src: url(/static/fonts/instrument-sans.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/dm-mono-400.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/dm-mono-500.woff2) format("woff2"); }
.tz { --ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; --num: "DM Mono", ui-monospace, Consolas, monospace;
  --tz-ease: cubic-bezier(.2, .8, .2, 1); font-family: var(--ui); }
.tz .head h1, .tz h2, .tz h3 { font-family: var(--ui); letter-spacing: -0.02em; }
.tz .head h1 { font-weight: 600; letter-spacing: -0.035em; }
.tz .num, .tz time { font-family: var(--num); font-feature-settings: "tnum"; }
.tz .card { transition: border-color .15s var(--tz-ease); }
.tz a.card:hover, .tz .card.link:hover { transform: translateY(-2px); }

/* ---- Kalender (cal-page) ---- */
.cal-page .cal-title { font: 500 .5em var(--num); letter-spacing: 0; color: var(--muted); margin-left: 10px; }
.cal-page .cal-btn { border-radius: 999px; min-width: 40px; text-align: center; transition: transform .12s var(--tz-ease), background-color .12s; }
.cal-page .cal-btn:hover { transform: translateY(-1px); }
.cal-page .cal-btn:active { transform: translateY(1px) scale(.985); }
.cal-page .cal-pick { transition: opacity .15s, transform .12s var(--tz-ease); }
.cal-page .cal-pick:hover { transform: translateY(-1px); }
/* week */
.cal-page .wk-inner { border-radius: 20px; }
.cal-page .wk-day small { font: 500 11px var(--ui); letter-spacing: .12em; }
.cal-page .wk-day b { font: 500 21px var(--ui); letter-spacing: -0.02em; }
.cal-page .wk-times span { font: 400 10.5px var(--num); }
.cal-page .wk-ev { background: color-mix(in srgb, var(--k, var(--lav)) 24%, var(--card-solid)); color: var(--text);
  border: 0; border-left: 3px solid var(--k, var(--lav)); border-radius: 6px 9px 9px 6px; padding: 4px 7px;
  transition: transform .12s var(--tz-ease), box-shadow .15s var(--tz-ease); }
.cal-page .wk-ev:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, .22); z-index: 4; }
.cal-page .wk-ev b { font-weight: 600; letter-spacing: -0.005em; }
.cal-page .wk-ev span { font-family: var(--num); font-size: 10.5px; opacity: .75; }
.cal-page .wk-ev span + span { font-family: var(--ui); font-size: 11px; }
.cal-page .wk-ev.task { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--k, var(--lav)) 26%, var(--card-solid)) 0 8px,
  color-mix(in srgb, var(--k, var(--lav)) 14%, var(--card-solid)) 8px 16px); }
.cal-page .wk-chip.ev { background: color-mix(in srgb, var(--k, var(--lav)) 24%, var(--card-solid)); color: var(--text); border-left: 3px solid var(--k, var(--lav)); border-radius: 4px 7px 7px 4px; }
.cal-page .wk-chip.task { border-radius: 7px; }
/* month */
.cal-page .mo { border-radius: 20px; }
.cal-page .mo-head span { font: 500 11px var(--ui); letter-spacing: .12em; }
.cal-page .mo-cell { transition: background-color .12s; }
.cal-page .mo-cell > b { font: 500 13px var(--num); }
.cal-page .mo-chip { background: color-mix(in srgb, var(--k, var(--lav)) 18%, transparent); color: var(--text); border-left: 2px solid var(--k, var(--lav)); border-radius: 3px 6px 6px 3px; }
.cal-page .mo-chip small { font-family: var(--num); font-size: 10.5px; }
/* year */
.cal-page .yr-day { font-family: var(--num); font-size: 11px; transition: transform .1s var(--tz-ease); }
.cal-page .yr-day:hover { transform: scale(1.12); }
/* agenda (list) */
.ag { background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: clip; margin-bottom: 14px; }
.ag-day { display: grid; grid-template-columns: 116px minmax(0, 1fr); border-top: 1px solid var(--line); }
.ag-day:first-child { border-top: 0; }
.ag-day.weekend { background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.ag-day.today { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ag-date { margin: 0; padding: 14px 18px; display: flex; flex-direction: column; align-self: start; position: sticky; top: 8px; line-height: 1.05; }
.ag-wd { font: 500 11.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ag-date b { font: 500 34px/1 var(--ui); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.ag-date small { font: 400 12px var(--num); color: var(--muted); }
.ag-day.today .ag-wd, .ag-day.today .ag-date b { color: var(--accent); }
.ag-list { list-style: none; margin: 0; padding: 8px 10px 8px 0; display: grid; gap: 2px; }
.ag-ev { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 9px 10px 9px 16px; border-radius: 12px; cursor: pointer; transition: background-color .12s; }
.ag-ev::before { content: ""; position: absolute; left: 4px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--k, var(--lav)); }
.ag-ev:hover, .ag-ev:focus-visible { background: color-mix(in srgb, var(--k, var(--lav)) 10%, transparent); outline: none; }
.ag-ev.task::before { background: repeating-linear-gradient(180deg, var(--k, var(--lav)) 0 4px, transparent 4px 7px); }
.ag-time { font: 500 13px/1.25 var(--num); font-feature-settings: "tnum"; }
.ag-time small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.ag-ev.allday .ag-time { font: 500 11px var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ag-main { min-width: 0; }
.ag-main b { display: block; font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.ag-sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-ev form { margin: 0; }
.ag-del { appearance: none; border: 0; background: transparent; color: var(--muted); width: 34px; height: 34px; min-height: 0; padding: 0;
  border-radius: 50%; opacity: 0; transition: opacity .12s, background-color .12s; }
.ag-ev:hover .ag-del, .ag-ev:focus-within .ag-del { opacity: 1; }
.ag-del:hover { background: color-mix(in srgb, var(--late) 14%, transparent); color: var(--late); }
@media (hover: none) { .ag-del { opacity: .55; } }
@media (max-width: 640px) {
  .ag-day { grid-template-columns: 62px minmax(0, 1fr); }
  .ag-date { padding: 12px 10px 12px 14px; }
  .ag-date b { font-size: 26px; }
  .ag-ev { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px; padding-left: 14px; }
}
@media (min-width: 1200px) { .ag { column-count: 2; column-gap: 0; column-rule: 1px solid var(--line); } .ag-day { break-inside: avoid; } }

/* ---- Reisen, Sperren, Sicherheit, Finanzen, Freunde, Garderobe (2026-11-22, tasteskill): .tz type plus page touches */
/* shared: numbers in DM Mono, linked cards and rows answer the pointer */
.tz .tr-stats b, .tz .stat b, .tz .sec-stats b, .tz .amt, .tz .when, .tz .fin-big, .tz .kpi b { font-family: var(--num); font-feature-settings: "tnum"; letter-spacing: -0.02em; }
.tz .tabs a, .tz .fchip, .tz .chip { transition: transform .12s var(--tz-ease), background-color .12s; }
.tz .fchip:hover { transform: translateY(-1px); }
.tz details.card > summary { transition: color .12s; }
.tz .plain li, .tz .sec-list li { transition: background-color .12s; border-radius: 10px; }

/* Reisen: trip cards lift, the map zooms a little inside its frame */
.trips-page .tr-card, .trips-page .trip-card { transition: transform .18s var(--tz-ease), box-shadow .18s var(--tz-ease), border-color .15s; }
.trips-page .tr-card:hover, .trips-page .trip-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
.trips-page .tr-card svg, .trips-page .trip-card svg { transition: transform .6s var(--tz-ease); }
.trips-page .tr-card:hover svg, .trips-page .trip-card:hover svg { transform: scale(1.03); }
.trips-page .tr-stats b { font-size: 26px; font-weight: 500; }
.trips-page .tr-stats span { font-size: 12px; letter-spacing: .04em; }

/* Sperren: status first, the how-to cards closed under "Einrichtung" */
.bl-page .bl-now h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.bl-page .bl-app { font-weight: 500; transition: transform .12s var(--tz-ease); }
.bl-page .bl-app:hover { transform: translateY(-1px); }
.bl-page .bl-rules td, .bl-page .bl-rules th { font-feature-settings: "tnum"; }
.bl-setup > summary { cursor: pointer; font-weight: 600; font-size: 16px; list-style: none; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bl-setup > summary::-webkit-details-marker { display: none; }
.bl-setup > summary::after { content: "›"; margin-left: auto; color: var(--muted); transition: transform .15s var(--tz-ease); }
.bl-setup[open] > summary::after { transform: rotate(90deg); }
.bl-setup-part { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.bl-setup-part h2 { font-size: 15px; }

/* Sicherheit */
.sec-page .sec-list li { padding: 8px 8px; margin: 0 -8px; }
.sec-page .sec-list li:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.sec-page .sec-list b.num { font-size: 13.5px; font-weight: 500; }
.sec-more > summary { cursor: pointer; padding: 8px 0 4px; }

/* Finanzen: tags only as wide as their text, calmer bars */
.fin-page .fin-entry > * { align-self: flex-start; }
.fin-page .fin-entry > b { align-self: stretch; font-weight: 500; }
.fin-page .fin-list li { padding-top: 10px; padding-bottom: 10px; }
.fin-page .fin-list li:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.fin-page .amt { font-size: 14px; font-weight: 500; }
.fin-page .fc-spent { opacity: .85; border-radius: 4px; }
.fin-page .fc-val, .fin-page .stats b { font-family: var(--num); font-feature-settings: "tnum"; }

/* Freunde: calmer "noch nichts", rows answer the pointer */
.fr-page .fam-state { font-weight: 400; }
.fr-page .fam-due .fam-state { font-weight: 500; }
.fr-page .fam-grid li { transition: transform .12s var(--tz-ease), border-color .15s; }
.fr-page .fam-grid li:hover { transform: translateY(-2px); }
.fr-page .plain li:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }

/* Garderobe */
.wd-page .w-today h2 { letter-spacing: -0.02em; }

/* ---- Garderobe neu (2026-11-23, tasteskill): today's look on a stage, shelves per slot, outfit gallery ---- */
.wd-page { --wd-stage: color-mix(in srgb, var(--text) 6%, var(--card-solid)); }
.wd-page .wd-stage { position: relative; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line);
  border-radius: 22px; background: radial-gradient(110% 75% at 50% 28%, var(--wd-stage), var(--card-solid) 72%); }
.wd-page .wd-stage::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 7%; height: 9%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .28), transparent); pointer-events: none; }
.wd-page .wd-stage .flatlay { position: relative; z-index: 1; max-width: none; transition: transform .5s var(--tz-ease); }
.wd-page .num { font-family: var(--num); font-feature-settings: "tnum"; }

/* hero */
.wd-hero { margin: 4px 0 18px; }
.wd-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 2px 16px; }
.wd-head h1 { font: 600 clamp(34px, 4.2vw, 52px)/1 var(--ui); letter-spacing: -0.045em; margin: 0; }
.wd-count { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.wd-wx { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; border: 1px solid var(--line); border-radius: 18px;
  background: var(--card); }
.wd-wx-icon { font-size: 30px; line-height: 1; }
.wd-wx b { font: 500 30px/1 var(--num); letter-spacing: -0.04em; }
.wd-wx b small { font-size: 16px; color: var(--muted); letter-spacing: 0; }
.wd-wx-text { font-size: 13.5px; line-height: 1.3; max-width: 260px; }
.wd-occ { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  margin-bottom: 14px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.wd-occ a { flex: none; padding: 8px 16px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14.5px;
  transition: background-color .15s, color .15s, transform .12s var(--tz-ease); }
.wd-occ a:hover { color: var(--text); transform: translateY(-1px); }
.wd-occ a.on { background: var(--text); color: var(--bg2); }

.wd-today { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.wd-stage-main { min-height: 440px; padding: 28px; }
.wd-stage-main .flatlay { width: min(100%, 400px); }
.wd-worn { position: absolute; z-index: 2; top: 14px; left: 14px; right: 14px; width: fit-content; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 500; background: color-mix(in srgb, var(--ok) 18%, var(--card-solid)); color: var(--text); }
.wd-side { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); min-width: 0; }
.wd-kicker { margin: 0; font: 500 11.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wd-pieces { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wd-pieces a { display: flex; align-items: center; gap: 12px; padding: 6px 8px; margin: 0 -8px; border-radius: 12px; color: var(--text);
  text-decoration: none; transition: background-color .12s; }
.wd-pieces a:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.wd-piece-pic { flex: 0 0 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--wd-stage); }
.wd-piece-pic .garment { width: 40px; }
.wd-piece-txt { min-width: 0; display: flex; flex-direction: column; }
.wd-piece-txt b { font-weight: 500; font-size: 15.5px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-piece-txt .meta { font-size: 12.5px; }
.wd-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wd-actions form { margin: 0; }
.wd-actions button { min-height: 44px; padding: 10px 18px; font-size: 15px; }
.wd-page button { transition: transform .12s var(--tz-ease), background-color .12s, filter .12s; }
.wd-page button:hover { transform: translateY(-1px); }
.wd-page button:active { transform: translateY(1px) scale(.985); }
.wd-alts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: auto; padding-top: 6px; }
.wd-alt { display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; }
.wd-alt .wd-stage { aspect-ratio: 4 / 3; padding: 10px; border-radius: 16px; transition: transform .18s var(--tz-ease), border-color .15s, box-shadow .18s; }
.wd-alt .flatlay { width: min(100%, 150px); }
.wd-alt .meta { font-size: 12.5px; padding-left: 2px; }
.wd-alt:hover .wd-stage { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 12px 26px rgba(0, 0, 0, .22); }
.wd-alt:hover .flatlay, .wd-look:hover .flatlay { transform: scale(1.03); }
.wd-shuffle { align-self: flex-start; color: var(--muted); font-size: 14px; text-decoration: none; padding: 6px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .2s var(--tz-ease), color .12s; }
.wd-shuffle:hover { color: var(--text); background-size: 100% 1px; }

/* empty: grey pieces until the first top and trousers are in */
.wd-page .wd-ghost { opacity: .22; }
.wd-empty-title { font: 500 clamp(20px, 2vw, 25px)/1.25 var(--ui); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.wd-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: st; }
.wd-steps li { counter-increment: st; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; align-items: center; }
.wd-steps li::before { content: counter(st); grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 500 13px var(--num); border: 1px solid var(--line); color: var(--muted); }
.wd-steps li.done::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; }
.wd-steps li b { font-weight: 500; }
.wd-steps li .meta { font-size: 13px; }
.wd-steps li.done b { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.wd-cta { align-self: flex-start; margin-top: auto; display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; transition: transform .12s var(--tz-ease), filter .12s; }
.wd-cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.wd-cta:active { transform: translateY(1px) scale(.985); }

/* folds (add, builder) */
.wd-page .wd-fold { margin-bottom: 18px; }
.wd-page .wd-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-weight: 600; font-size: 16px; color: var(--text); }
.wd-page .wd-fold > summary::-webkit-details-marker { display: none; }
.wd-page .wd-fold > summary::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 18px; transition: transform .15s var(--tz-ease); }
.wd-page .wd-fold[open] > summary { margin-bottom: 16px; }
.wd-page .wd-fold[open] > summary::after { transform: rotate(90deg); }
.wd-page .wd-fold > summary .meta { font-weight: 400; font-size: 13px; }
/* add form: the drawing on its own stage on the left, the fields on the right */
.wd-page .w-form { display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 24px; row-gap: 10px; align-items: start; }
.wd-page .w-form > * { grid-column: 2; }
.wd-page .w-form-top { display: contents; }
.wd-page .w-preview { grid-column: 1; grid-row: 1 / span 11; position: sticky; top: 12px; width: 100%; flex: none; aspect-ratio: 1; display: grid;
  place-items: center; border: 1px solid var(--line); border-radius: 22px; background: radial-gradient(110% 75% at 50% 30%, var(--wd-stage), var(--card-solid) 72%); }
.wd-page .w-preview .garment { width: 74%; }
.wd-page .w-form-main { grid-column: 2; }
.wd-page .w-form > .meta { margin: 8px 0 0; font: 500 11.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; }
.wd-page .w-sw { width: 30px; height: 30px; transition: transform .12s var(--tz-ease), box-shadow .12s; }
.wd-page .w-sw:hover { transform: scale(1.12); }
.wd-page .w-form > button { justify-self: start; min-width: 200px; }

/* shelves */
.wd-closet, .wd-looks { margin: 8px 0 26px; }
.wd-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 2px 14px; }
.wd-sec-head h2 { font: 600 24px var(--ui); letter-spacing: -0.03em; margin: 0; display: flex; align-items: baseline; gap: 10px; }
.wd-sec-head h2 .num, .wd-shelf h3 .num { font-size: .6em; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.wd-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-filter a { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: 13.5px;
  font-weight: 500; transition: color .12s, background-color .12s, transform .12s var(--tz-ease); }
.wd-filter a:hover { color: var(--text); transform: translateY(-1px); }
.wd-filter a.on { background: var(--text); border-color: var(--text); color: var(--bg2); }
.wd-shelf { padding: 16px 0 6px; border-top: 1px solid var(--line); }
.wd-shelf h3 { margin: 0 2px 12px; font: 500 12px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; gap: 8px; align-items: baseline; }
.wd-rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.wd-tile { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; min-width: 0; }
.wd-tile-pic { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; background: radial-gradient(110% 75% at 50% 30%, var(--wd-stage), var(--card-solid) 72%);
  transition: transform .18s var(--tz-ease), border-color .15s, box-shadow .18s; }
.wd-tile-pic .garment { width: 64%; transition: transform .5s var(--tz-ease); }
.wd-tile:hover .wd-tile-pic { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, .2); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.wd-tile:hover .garment { transform: scale(1.03); }
.wd-tile b { font-weight: 500; font-size: 14.5px; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.wd-tile .meta { font-size: 12.5px; padding: 0 2px; }
.wd-fav { position: absolute; top: 10px; right: 12px; color: #eccb52; font-size: 15px; }

/* outfits */
.wd-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.wd-look { display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 12px; border: 1px solid var(--line); border-radius: 22px; background: var(--card);
  transition: transform .18s var(--tz-ease), box-shadow .18s; }
.wd-look:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .22); }
.wd-look .wd-stage { aspect-ratio: 1; padding: 16px; border-radius: 16px; }
.wd-look .flatlay { width: 92%; }
.wd-look-body { display: flex; flex-direction: column; gap: 1px; padding: 0 4px; }
.wd-look-body b { font-weight: 500; font-size: 15.5px; letter-spacing: -0.01em; }
.wd-look-body .meta { font-size: 12.5px; }
.wd-look-actions { display: flex; gap: 6px; align-items: center; padding: 0 2px; }
.wd-look-actions form { margin: 0; }
.wd-look-actions button { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.wd-look-actions form:first-child { flex: 1; }
.wd-look-actions form:first-child button { width: 100%; }
.wd-page button.wd-icon { width: 40px; min-height: 40px; padding: 0; font-size: 16px; }

/* builder */
.wd-builder { display: grid; gap: 14px; }
.wd-builder fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.wd-builder legend { padding: 0; margin-bottom: 8px; font: 500 11.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wd-page .w-opt { flex-basis: 84px; border-radius: 14px; transition: transform .12s var(--tz-ease), border-color .12s, background-color .12s; }
.wd-page .w-opt:hover { transform: translateY(-2px); }
.wd-builder-end { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto; gap: 10px; align-items: center; }

/* item page */
.wd-item-page .w-item-card .w-big { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 22px;
  margin-bottom: 12px; background: radial-gradient(110% 75% at 50% 30%, var(--wd-stage), var(--card-solid) 72%); }
.wd-item-page .w-item-card .w-big .garment { width: min(60%, 240px); }

/* the hero enters once */
@keyframes wd-rise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.wd-hero .wd-stage-main .flatlay { animation: wd-rise .6s var(--tz-ease) both; }
.wd-hero .wd-side { animation: wd-rise .6s .08s var(--tz-ease) both; }
@media (prefers-reduced-motion: reduce) {
  .wd-hero .wd-stage-main .flatlay, .wd-hero .wd-side { animation: none; }
  .wd-page *, .wd-page *::after { transition: none !important; }
}

@media (max-width: 900px) {
  .wd-today { grid-template-columns: minmax(0, 1fr); }
  .wd-stage-main { min-height: 0; aspect-ratio: 1; padding: 20px; }
  .wd-page .w-form { grid-template-columns: minmax(0, 1fr); }
  .wd-page .w-form > *, .wd-page .w-form-main { grid-column: 1; }
  .wd-page .w-preview { grid-column: 1; grid-row: auto; position: static; width: 150px; justify-self: center; }
  .wd-builder-end { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .wd-side { padding: 16px; }
  .wd-actions form, .wd-actions button, .wd-cta { width: 100%; justify-content: center; }
  .wd-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wd-gallery { grid-template-columns: minmax(0, 1fr); }
  .wd-wx { width: 100%; }
  .wd-page .w-form > button { width: 100%; }
}
/* shelves side by side like compartments of one wardrobe */
.wd-shelves { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; align-items: start; }
.wd-shelves .wd-shelf { padding: 14px 14px 4px; border: 1px solid var(--line); border-radius: 22px; background: var(--card); }
.wd-shelves .wd-rail { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.wd-shelves .wd-tile-pic { border-radius: 14px; margin-bottom: 6px; }
.wd-shelves .wd-tile b { font-size: 13.5px; }
.wd-shelves .wd-tile .meta { font-size: 11.5px; }
.wd-shelves .wd-fav { top: 6px; right: 8px; font-size: 13px; }
@media (max-width: 560px) {
  .wd-shelves .wd-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wd-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .wd-look { padding: 8px 8px 10px; border-radius: 18px; }
  .wd-look-actions { flex-wrap: wrap; }
  .wd-look-actions form:first-child { flex-basis: 100%; }
}
/* item page: narrow card, so the live drawing sits only beside name and kind */
.wd-item-page .w-form { grid-template-columns: 110px minmax(0, 1fr); column-gap: 14px; }
.wd-item-page .w-form > * { grid-column: 1 / -1; }
.wd-item-page .w-preview { grid-column: 1; grid-row: 1; position: static; border-radius: 16px; }
.wd-item-page .w-form-main { grid-column: 2; grid-row: 1; }
.wd-item-page .w-outfit { padding: 0; }
.wd-item-page .w-outfit .flatlay { padding: 12px; border: 1px solid var(--line); border-radius: 18px; box-sizing: border-box;
  background: radial-gradient(110% 75% at 50% 30%, var(--wd-stage), var(--card-solid) 72%); }
.wd-item-page .w-outfit p { padding: 0 4px; }
.wd-item-page .w-outfit b { font-weight: 500; }

/* ---- Tage, Fokus, Review (migration 087, 2026-11-23) ---- */
.prio-in { width: 72px; }
/* Tage: day columns, cards by priority */
.tg { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x proximity; margin-bottom: 16px; }
.tg-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; scroll-snap-align: start; }
.tg-col.past { opacity: .72; }
.tg-col.past:hover { opacity: 1; }
.tg-head { display: flex; align-items: baseline; gap: 6px; padding: 4px 4px 8px; border-bottom: 2px solid var(--line); font-size: 15px; }
.tg-head .num { color: var(--muted); font-size: 13px; }
.tg-col.today .tg-head { border-bottom-color: var(--accent); }
.tg-col.today .tg-head b { color: var(--accent); }
.tg-sum { margin-left: auto; font-size: 12px; color: var(--muted); }
.tg-add { margin: 0; }
.tg-add input { width: 100%; padding: 8px 12px; min-height: 0; font-size: 13.5px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.tg-list { list-style: none; margin: 0; padding: 2px; display: flex; flex-direction: column; gap: 6px; min-height: 44px; border-radius: 12px;
  transition: background-color .12s; }
.tg-list.over { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.tg-list-flat { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tg-card { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px;
  align-items: start; padding: 9px 8px 9px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--k, var(--lav)); cursor: grab; transition: transform .12s cubic-bezier(.2, .8, .2, 1), box-shadow .15s, border-color .12s; }
.tg-card:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.tg-card.dragging { opacity: .45; cursor: grabbing; }
.tg-card.run { border-color: var(--k); box-shadow: 0 0 0 1px var(--k); }
.tg-check { grid-row: 1 / span 2; margin: 0; }
.tg-check button { width: 20px; height: 20px; min-height: 0; padding: 0; border-radius: 6px; background: transparent; border: 1.5px solid var(--muted); margin-top: 1px; }
.tg-check button:hover { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 20%, transparent); }
.tg-body { min-width: 0; grid-row: 1 / span 2; }
.tg-title { display: block; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.tg-title:hover { text-decoration: underline; }
.tg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.tg-chip { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--k) 14%, transparent); color: var(--text); }
.tg-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--k); }
.tg-spent { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.tg-prio { margin: 0; grid-column: 3; grid-row: 1; }
.tg-prio input { width: 40px; min-height: 0; padding: 2px 4px; text-align: center; font: 500 12px "DM Mono", ui-monospace, monospace; border-radius: 6px;
  background: transparent; border: 1px solid transparent; color: var(--muted); -moz-appearance: textfield; }
.tg-prio input::-webkit-inner-spin-button { display: none; }
.tg-card:hover .tg-prio input, .tg-prio input:focus { border-color: var(--line); color: var(--text); }
.tg-play { margin: 4px 0 0; grid-column: 3; grid-row: 2; justify-self: end; }
.tg-play button { width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; font-size: 11px; background: color-mix(in srgb, var(--k) 18%, transparent);
  color: var(--text); opacity: .55; transition: opacity .12s, transform .12s; }
.tg-card:hover .tg-play button, .tg-card.run .tg-play button { opacity: 1; }
.tg-play button:hover { transform: scale(1.08); }
.tg-card.run .tg-play button { color: #e5484d; animation: tg-pulse 1.6s ease-in-out infinite; }
@keyframes tg-pulse { 50% { opacity: .45; } }
.tg-done { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 2px; }
.tg-done li { display: flex; align-items: baseline; gap: 7px; padding: 5px 8px; font-size: 13px; color: var(--muted); }
.tg-done a { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); min-width: 0; overflow-wrap: anywhere; }
.tg-tick { color: var(--k, var(--ok)); font-size: 12px; }
.tg-empty { color: var(--muted); font-size: 13px; margin: 6px; }
.tg-running { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: color-mix(in srgb, #e5484d 12%, var(--card)); border: 1px solid color-mix(in srgb, #e5484d 35%, var(--line)); }
.tg-dot { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; animation: tg-pulse 1.6s ease-in-out infinite; }
.tg-rest { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.tg-fold > summary { cursor: pointer; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.tg-fold[open] > summary { margin-bottom: 10px; }
@media (max-width: 700px) { .tg { grid-template-columns: repeat(6, 82vw); } }
@media (prefers-reduced-motion: reduce) { .tg-card.run .tg-play button, .tg-dot { animation: none; } }

/* Fokus: black, one task, the time big */
.fk-body { margin: 0; min-height: 100vh; background: #0b0b0d; color: #f2f2f3; font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
.fk { min-height: 100vh; display: flex; flex-direction: column; padding: max(18px, env(safe-area-inset-top)) 24px 32px; box-sizing: border-box; }
.fk-top { display: flex; justify-content: space-between; align-items: center; }
.fk-back { color: #8a8a90; text-decoration: none; font-size: 20px; padding: 6px 10px; border-radius: 10px; }
.fk-back:hover { color: #f2f2f3; background: #18181b; }
.fk-mode { display: inline-flex; align-items: center; gap: 8px; font: 500 11px "Instrument Sans", system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8a8a90; }
.fk-mode i { width: 7px; height: 7px; border-radius: 50%; background: #3a3a40; }
.fk-mode i.on { background: #f0b429; box-shadow: 0 0 10px #f0b42988; }
.fk-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 30px 0; }
.fk-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; border: 1px solid #2a2a30; font-size: 12.5px; color: #c9c9ce; }
.fk-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--k, #a855f7); }
.fk-title { font: 500 clamp(18px, 2.4vw, 24px)/1.3 "Instrument Sans", system-ui, sans-serif; letter-spacing: -0.01em; margin: 6px 0 0; max-width: 720px; color: #f2f2f3; }
.fk-time { font: 400 clamp(84px, 15vw, 168px)/1 "Instrument Sans", system-ui, sans-serif; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin-top: 10px; color: #fff; }
.fk-state { font: 500 11px "Instrument Sans", system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #6c6c73; }
.fk-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.fk-actions form { margin: 0; }
.fk-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 9px; font-size: 14px; font-weight: 500;
  background: #141417; color: #e6e6e9; border: 1px solid #2a2a30; text-decoration: none; cursor: pointer; transition: background-color .12s, transform .12s; }
.fk-btn:hover { background: #1d1d22; transform: translateY(-1px); }
.fk-btn:active { transform: translateY(1px) scale(.98); }
.fk-btn.fk-go { background: #f2f2f3; color: #0b0b0d; border-color: #f2f2f3; }
.fk-note { color: #8a8a90; font-size: 13.5px; margin: 14px 0 0; max-width: 520px; }

/* Review */
.rv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 8px 2px 18px; }
.rv-head h1 { font: 600 clamp(30px, 3.6vw, 44px)/1.05 var(--ui); letter-spacing: -0.04em; margin: 0 0 6px; }
.rv-nav { display: flex; align-items: center; gap: 6px; }
.rv-nav a, .rv-off { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; box-sizing: border-box; }
.rv-off { opacity: .35; }
.rv-nav b { padding: 0 8px; font-size: 14px; }
.rv { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.rv-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rv-main .card { margin: 0; }
.rv-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rv-kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.rv-kpi span { font: 500 11px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rv-kpi b { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.rv-kpi small { color: var(--muted); font-size: 12px; }
.rv-kpi:first-child b { color: #f0b429; }
.rv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rv-bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; height: 200px; align-items: end; margin-top: 10px; }
.rv-bars-weeks { grid-template-columns: repeat(8, minmax(0, 1fr)); height: 150px; }
.rv-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.rv-bar i { width: 70%; max-width: 42px; min-height: 3px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.rv-bar.today i { background: #f0b429; }
.rv-bar small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.rv-bar span { font-size: 12px; color: var(--muted); }
.rv-bar em { font-style: normal; font-size: 10.5px; color: var(--ok); }
.rv-hbars, .rv-tasks, .rv-habits { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.rv-hbars li { display: grid; grid-template-columns: minmax(80px, 140px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13.5px; }
.rv-name { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-name i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
.rv-track { height: 8px; border-radius: 8px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.rv-track i { display: block; height: 100%; border-radius: 8px; background: var(--k); }
.rv-hbars b, .rv-tasks b, .rv-habits b { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.rv-tasks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; padding-left: 12px; border-left: 3px solid var(--k); font-size: 14px; }
.rv-tasks a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.rv-tasks a.done { text-decoration: line-through; color: var(--muted); }
.rv-tasks .meta { grid-row: 2; font-size: 12px; }
.rv-tasks b { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.rv-habits li { display: grid; grid-template-columns: minmax(0, 1fr) auto 34px 30px; gap: 10px; align-items: center; font-size: 13.5px; }
.rv-habits li.was-focus .rv-name { color: var(--warn); }
.rv-focus { width: 30px; height: 26px; padding: 0; border-radius: 8px; border: 1px solid var(--line); background: transparent;
  font-size: 13px; filter: grayscale(1); opacity: .45; cursor: pointer; }
.rv-focus:hover:not(:disabled) { opacity: .9; filter: none; }
.rv-focus.on { filter: none; opacity: 1; border-color: var(--warn); background: color-mix(in srgb, var(--warn) 18%, transparent); }
.rv-focus:disabled { opacity: .18; cursor: default; }
/* Habit focus of the week (migration 091): orange and a slow glow until done today */
.habit-tile.focus:not(.on), .hchip.focus:not(.on) { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--bg2, transparent));
  animation: habit-glow 2.6s ease-in-out infinite; }
.habit-tile.focus:not(.on) .h-name::after, .hchip.focus:not(.on)::after { content: " 🎯"; }
.hchip.focus.on, .habit-tile.focus.on { border-color: var(--warn); }
@keyframes habit-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 0%, transparent); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 28%, transparent); } }
@media (prefers-reduced-motion: reduce) { .habit-tile.focus, .hchip.focus { animation: none; } }
.rv-dots { display: flex; gap: 4px; }
.rv-dots i { width: 14px; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--text) 9%, transparent); }
.rv-dots i.on { background: var(--ok); }
.rv-dots i.future { opacity: .35; }
.rv-dday { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rv-dday:first-of-type { border-top: 0; }
.rv-dday b { font-weight: 500; color: var(--muted); font-size: 13px; }
.rv-dday ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rv-dday a { color: var(--text); text-decoration: none; }
.rv-tick { color: var(--ok); margin-right: 8px; }
.rv-side { position: sticky; top: 12px; }
.rv-refl { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.rv-refl label { display: flex; flex-direction: column; gap: 6px; }
.rv-refl label span { font-weight: 600; font-size: 14px; }
.rv-refl textarea { resize: vertical; }
.rv-refl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1100px) { .rv { grid-template-columns: minmax(0, 1fr); } .rv-side { position: static; order: -1; } }
@media (max-width: 760px) { .rv-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rv-grid { grid-template-columns: minmax(0, 1fr); } .rv-bars { gap: 4px; } }
.tg-chip { max-width: 100%; min-width: 0; overflow: hidden; }
.tg-chip { white-space: nowrap; text-overflow: ellipsis; display: inline-block; line-height: 1.6; }
.tg-chip i { display: inline-block; vertical-align: middle; margin-right: 5px; }
.tg-meta .late { color: var(--late); }
/* ▶ Fokus on the board and in the Top 3 (2026-11-23) */
.chip-btn.fokus { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); }
.bplay { margin: 0; flex: none; }
.bplay button { width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%; font-size: 10px; background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text); opacity: .5; transition: opacity .12s, transform .12s; }
.bcard:hover .bplay button, .bplay button:focus-visible { opacity: 1; }
.bplay button:hover { transform: scale(1.08); }
@media (hover: none) { .bplay button { opacity: .8; } }
/* Fokus has no sidebar: drop the room the other pages keep for it, so the time sits in the middle */
body.fk-body { padding: 0; margin: 0; }
.fk { width: 100%; }

/* ---- Social (migration 088, 2026-11-24): tiles with a small 3D scene (scene.py) ---- */
.sc-svg { display: block; width: 100%; height: 100%; }
.sc-label { font: 600 11px "Instrument Sans", system-ui, sans-serif; fill: #2b2a33; }
.sc-dist text { font: 500 11px "DM Mono", ui-monospace, monospace; fill: #2b2a33; }
.sc-wave { animation: sc-wave 2.8s ease-in-out infinite; }
@keyframes sc-wave { 0%, 60%, 100% { transform: rotate(0deg); } 70% { transform: rotate(-14deg); } 80% { transform: rotate(8deg); } 90% { transform: rotate(-10deg); } }
.sc-walk { animation: sc-walk 1.6s ease-in-out infinite; }
@keyframes sc-walk { 50% { transform: translateY(-1.5px); } }
@media (prefers-reduced-motion: reduce) { .sc-wave, .sc-walk { animation: none; } }
.so-head { margin: 8px 2px 18px; }
.so-head h1 { font: 600 clamp(30px, 3.6vw, 44px)/1.05 var(--ui); letter-spacing: -0.04em; margin: 4px 0 6px; }
.so-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-bottom: 18px; }
.so-tile { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  color: var(--text); text-decoration: none; transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s, border-color .15s; }
.so-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .22); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.so-scene { display: block; aspect-ratio: 5 / 3; overflow: hidden; }
.so-scene .sc-svg { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.so-tile:hover .so-scene .sc-svg { transform: scale(1.03); }
.so-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.so-body b { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.so-short { color: var(--muted); font-size: 14px; line-height: 1.4; }
.so-open { color: var(--accent); font-size: 13.5px; }
.so-add > summary { cursor: pointer; font-weight: 600; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.so-add[open] > summary { margin-bottom: 14px; }
.so-add > summary .meta { font-weight: 400; font-size: 13px; }
.so-row { flex-wrap: wrap; }
.so-row label { flex: 1 1 140px; }
.so-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.so-stage { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 5 / 3; position: sticky; top: 12px; }
.so-text { display: flex; flex-direction: column; gap: 14px; }
.so-text .card { margin: 0; }
.so-q p { white-space: pre-line; margin: 6px 0 0; }
.so-lead { font: 500 19px/1.35 var(--ui); letter-spacing: -0.015em; margin: 6px 0 12px; }
.so-steps { margin: 0; padding: 0; list-style: none; counter-reset: so; display: grid; gap: 10px; }
.so-steps li { counter-increment: so; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; line-height: 1.45; }
.so-steps li::before { content: counter(so); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 500 12.5px "DM Mono", ui-monospace, monospace; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.so-why { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.so-why b { color: var(--text); font-weight: 600; }
.so-archive { margin-top: 10px; }
@media (max-width: 900px) { .so-detail { grid-template-columns: minmax(0, 1fr); } .so-stage { position: static; } }

/* Home workouts (migration 090): 2D move animations (web/moves.py), plan, cards, cardio list, player */
.mv { display: block; width: 100%; height: auto; }
.mv-limb { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 4.5; }
.mv-near, .mv-torso { stroke: var(--text); }
.mv-torso { stroke-width: 5.5; }
.mv-far { stroke: color-mix(in srgb, var(--text) 42%, transparent); }
.mv-head { fill: var(--text); }
.mv-db { fill: #f0a040; stroke: none; }
.mv-ground { stroke: var(--line); stroke-width: 1.5; }
.mv-eq { fill: color-mix(in srgb, var(--text) 22%, transparent); }
.mv-eqline { fill: none; stroke: color-mix(in srgb, var(--text) 35%, transparent); stroke-width: 2; }
.mv-mat { fill: color-mix(in srgb, var(--lav) 40%, transparent); }
.hw-week h2 .meta, .hw-cardio h2 .meta { margin-left: 8px; font-weight: 400; font-size: 13px; }
.hw-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.hw-day { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; border-radius: 12px; background: color-mix(in srgb, var(--text) 4%, transparent); min-width: 0; }
.hw-day.today { outline: 2px solid var(--accent); background: var(--accent-soft); }
.hw-dl { font: 600 11px var(--ui, inherit); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hw-dr { font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-dr:hover { color: var(--accent); }
.hw-dr.off { color: var(--muted); font-weight: 400; }
.hw-edit { margin-top: 10px; }
.hw-edit summary, .hw-items summary, .hw-more summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.hw-grid { border-collapse: collapse; margin: 8px 0; width: 100%; }
.hw-grid th, .hw-grid td { padding: 4px; text-align: center; font-size: 13.5px; }
.hw-grid td:first-child { text-align: left; white-space: nowrap; }
.hw-grid input { width: 18px; height: 18px; }
.hw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 14px; }
.hw-cards .card { margin: 0; }
.hw-card { display: flex; flex-direction: column; gap: 8px; }
.hw-head { display: flex; align-items: center; gap: 10px; }
.hw-emoji { font-size: 28px; line-height: 1; }
.hw-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.hw-thumbs span { border-radius: 8px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.hw-blurb { margin: 0; font-size: 14px; }
.hw-card .meta { margin: 0; }
.hw-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hw-actions a { text-decoration: none; display: inline-flex; align-items: center; border-radius: 14px; padding: 8px 14px; font-weight: 600; }
.hw-items ul { margin-top: 6px; }
.hw-items li, .hw-alt { display: flex; align-items: center; gap: 10px; }
.hw-items li { padding: 3px 0; font-size: 14px; }
.hw-mini { flex: 0 0 auto; width: 46px; border-radius: 8px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.hw-alts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 6px 0; }
.hw-alt { align-items: flex-start; font-size: 13.5px; padding: 8px; border-radius: 12px; }
.hw-alt.top { background: var(--accent-soft); }
.hw-alt .hw-mini { width: 64px; }
.hw-arch { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.hw-arch form { margin: 0; }
.hw-arch button { min-height: 0; padding: 5px 12px; font-size: 13px; }
@media (max-width: 640px) {
  .hw-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* player (dark page like Fokus) */
.hw-body { --text: #f2f2f3; --line: #2a2a30; --lav: #8b7cf6; }
.hw-video { color: #8a8a90; text-decoration: none; font-size: 13px; padding: 6px 10px; border-radius: 10px; border: 1px solid #2a2a30; }
.hw-video:hover { color: #f2f2f3; }
.hw-bar { height: 3px; border-radius: 3px; background: #1d1d22; margin: 14px 0 0; overflow: hidden; }
.hw-bar i { display: block; height: 100%; width: 0; background: #f0b429; transition: width .4s; }
.hw-stage, .hw-end { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 18px 0; }
.hw-stage[hidden], .hw-end[hidden] { display: none; }
.hw-name { font: 500 clamp(22px, 3vw, 32px)/1.2 "Instrument Sans", system-ui, sans-serif; letter-spacing: -0.02em; margin: 4px 0 0; max-width: 720px; }
.hw-anim { width: min(340px, 78vw); }
.hw-time { font: 400 clamp(72px, 13vw, 140px)/1 "Instrument Sans", system-ui, sans-serif; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: #fff; }
.hw-stage.is-rest .hw-time { color: #5fd08a; }
.hw-stage.is-rest .hw-chip { color: #5fd08a; border-color: #2d5a3d; }
.hw-stage.is-rest .hw-anim { opacity: .55; }
.hw-note { margin: 0; max-width: 560px; color: #f0b429; font-size: 15px; white-space: pre-line; }
.hw-note:empty, .hw-next:empty { display: none; }
.hw-how { margin: 0; max-width: 560px; color: #a5a5ad; font-size: 14.5px; line-height: 1.45; }
.hw-next { margin: 4px 0 0; color: #6c6c73; font-size: 13px; letter-spacing: .04em; }
.hw-play { min-width: 130px; justify-content: center; }
.hw-list { max-width: 620px; width: 100%; margin: 6px auto 0; color: #a5a5ad; font-size: 13.5px; }
.hw-list summary { cursor: pointer; text-align: center; color: #6c6c73; }
.hw-list ol { padding-left: 22px; }
.hw-list button { all: unset; cursor: pointer; display: block; padding: 3px 0; }
.hw-list b { color: #e6e6e9; font-weight: 500; }
.hw-list small { color: #6c6c73; margin-left: 6px; }
.hw-list li.on b { color: #f0b429; }

/* Habits bearbeiten: one row per habit, form left, up/down right */
.habit-edit > summary { cursor: pointer; font-weight: 600; }
.he-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.he-row:first-of-type { border-top: 0; }
.he-form { flex: 1; min-width: 0; margin: 0; }
.he-move { display: flex; flex-direction: column; gap: 4px; }
.he-move form { margin: 0; }
.he-move button { min-height: 32px; width: 36px; padding: 0; }
