/* =========================================================
   LUCIDA – Designsystem
   Reduzierte Gestaltungssprache: eine Schrift, durchscheinende Flächen
   mit feinem Rand, Leuchten statt Schatten, viel Ruhe.
   Hellmodus ist Standard, Nachthimmel-Modus optional.
   ========================================================= */

:root,
[data-theme='light'] {
  color-scheme: light;
  --bg: #f5f7fc;
  --glow-1: rgba(167, 139, 250, 0.2);
  --glow-2: rgba(96, 165, 250, 0.16);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(28, 36, 80, 0.045);
  --surface-3: rgba(28, 36, 80, 0.09);
  --border: rgba(28, 36, 80, 0.09);
  --border-strong: rgba(28, 36, 80, 0.16);
  --text: #151a30;
  --text-2: #565d7b;
  --text-3: #686f8d;
  --accent: #7458e8;
  --accent-soft: rgba(116, 88, 232, 0.1);
  --accent-glow: rgba(116, 88, 232, 0.28);
  --on-accent: #ffffff;
  --lucid: #6e48c8;
  --lucid-soft: rgba(110, 72, 200, 0.11);
  --lucid-ink: #5636b0;
  --dream: #3f86e8;
  --dream-soft: rgba(63, 134, 232, 0.12);
  --dream-ink: #255fb4;
  --norecall-soft: rgba(28, 36, 80, 0.06);
  --norecall-ink: #59607d;
  --mark: #b37608;
  --danger: #c63a52;
  --danger-soft: rgba(198, 58, 82, 0.09);
  --orb-from: #ffffff;
  --orb-to: #dde8fb;
  --orb-edge: rgba(116, 88, 232, 0.18);
  --orb-glow: rgba(120, 150, 255, 0.35);
  --ring: rgba(28, 36, 80, 0.1);
  --cloud: #ffffff;
  --cloud-shade: #cfdcf3;
  --sun: #ffe1a0;
  --moon: #f4e3ae;
  --star: #ffffff;
  --scrim: rgba(20, 24, 48, 0.32);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --chart-dream: #4f93dc;
  --chart-lucid: #6e48c8;
  --chart-grid: rgba(28, 36, 80, 0.07);
  --toast-bg: #151a30;
  --toast-text: #ffffff;
}

[data-theme='night'] {
  color-scheme: dark;
  --bg: #090c1b;
  --glow-1: rgba(124, 108, 255, 0.2);
  --glow-2: rgba(96, 165, 250, 0.08);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-3: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8eaf2;
  --text-2: #a5aac0;
  --text-3: #8b90a3;
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.14);
  --accent-glow: rgba(167, 139, 250, 0.45);
  --on-accent: #0a0c13;
  --lucid: #a78bfa;
  --lucid-soft: rgba(167, 139, 250, 0.15);
  --lucid-ink: #cdbdff;
  --dream: #60a5fa;
  --dream-soft: rgba(96, 165, 250, 0.13);
  --dream-ink: #a8cdfd;
  --norecall-soft: rgba(255, 255, 255, 0.06);
  --norecall-ink: #a5aac0;
  --mark: #f2c75c;
  --danger: #ff7a8a;
  --danger-soft: rgba(255, 122, 138, 0.1);
  --orb-from: #1e2452;
  --orb-to: #0e1230;
  --orb-edge: rgba(167, 139, 250, 0.25);
  --orb-glow: rgba(124, 108, 255, 0.4);
  --ring: rgba(255, 255, 255, 0.08);
  --cloud: #2c3668;
  --cloud-shade: #1c2450;
  --sun: #ffe1a0;
  --moon: #f3e6b5;
  --star: #ece6ff;
  --scrim: rgba(3, 4, 10, 0.6);
  --nav-bg: rgba(14, 17, 32, 0.92);
  --chart-dream: #3aa8cc;
  --chart-lucid: #9a70f5;
  --chart-grid: rgba(255, 255, 255, 0.06);
  --toast-bg: #e8eaf2;
  --toast-text: #0a0c13;
}

:root {
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 20px;
  --nav-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(0.2, 0.9, 0.3, 1);
  --orb-gradient: linear-gradient(135deg, #a78bfa 0%, #60a5fa 55%, #7dd3fc 100%);
}

[data-theme='light'] .ill-night,
[data-theme='night'] .ill-day { display: none; }

[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100lvh;
  font: 16px/1.5 var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 45% at 50% -10%, var(--glow-1), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, var(--glow-2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-synthesis: none;
}

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; }
a { color: var(--accent); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
.icon { flex: none; }
.serif { font-family: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 12px; background: var(--accent); color: var(--on-accent); text-decoration: none; }
.skip-link:focus { top: calc(12px + var(--safe-t)); }

/* ---------- Layout ---------- */
.view {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(20px + var(--safe-t)) 18px calc(var(--nav-h) + 36px + var(--safe-b));
  outline: none;
}
.view-enter { animation: fade-in 0.25s ease-out; }

.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 10px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: 0.88rem; }
.tiny { font-size: 0.78rem; }
.center { text-align: center; }

/* ---------- Marke & Kopfbereich ---------- */
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.brand-mark { width: 24px; height: 24px; color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.brand-name {
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.32em;
  background: linear-gradient(90deg, var(--text), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-intro { margin-bottom: 22px; }
.page-intro p { color: var(--text-2); margin-top: 4px; }

.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; min-height: 44px; }
.page-head h1 { flex: 1; font-size: 1.5rem; }
.page-sub { color: var(--text-2); margin: -12px 0 20px; }

.section-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 28px 2px 12px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.section-label:first-child { margin-top: 0; }
.section-label .count { color: var(--text-3); letter-spacing: 0; font-weight: 500; }
/* ältere Bezeichnungen auf denselben Stil abbilden */
.section-title { margin: 28px 2px 12px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); display: flex; gap: 8px; align-items: center; }
.section-title .icon { display: none; }
.card-title { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.card-title .icon { display: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  border: 0; background: transparent; color: var(--text-2); transition: background 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.on-surface { background: var(--surface-2); }
.icon-btn:disabled { opacity: 0.35; cursor: default; background: transparent; }

/* ---------- Flächen ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
}
.card.compact { padding: 14px 16px; }
.card.soft { background: var(--surface-2); }
.card.flat { background: transparent; }
a.card:not(.rc-inline):not(.home-stats) { display: block; }
a.card { color: inherit; text-decoration: none; transition: border-color 0.2s ease, background 0.2s ease; }
a.card:hover { border-color: var(--border-strong); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.97rem; text-decoration: none; white-space: nowrap;
  background: var(--surface-2); color: var(--text);
  transition: scale 0.15s ease, filter 0.2s ease, background 0.2s ease;
}
.btn:active { scale: 0.97; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.4; cursor: not-allowed; scale: 1; }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 24px var(--accent-glow); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.secondary { background: var(--accent-soft); color: var(--text); }
.btn.secondary:hover { filter: brightness(1.04); }
.btn.ghost { background: transparent; color: var(--accent); padding: 0 12px; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { background: var(--danger); color: #fff; }
[data-theme='night'] .btn.danger { color: #1a0a0e; }
.btn.danger-ghost { background: transparent; color: var(--danger); }
.btn.danger-ghost:hover { background: var(--danger-soft); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 0.88rem; border-radius: 12px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 auto; }

/* ---------- Chips / Segmente ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-2);
  font-size: 0.86rem; transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.chip[aria-pressed='true'], .chip.is-active { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.segmented button {
  min-height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2);
  font-size: 0.9rem; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 10px;
  transition: background 0.2s ease, color 0.2s ease;
}
.segmented button[aria-pressed='true'], .segmented button[aria-checked='true'] { color: var(--text); background: var(--accent-soft); font-weight: 600; }
[data-theme='light'] .segmented button[aria-pressed='true'], [data-theme='light'] .segmented button[aria-checked='true'] { background: #fff; box-shadow: 0 1px 2px rgba(28, 36, 80, 0.08); }

/* Typauswahl (Keine Erinnerung / Traum / Klartraum) */
.type-picker { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.type-option {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 6px;
  border-radius: 10px; border: 0; background: transparent; color: var(--text-2); font-size: 0.88rem; text-align: center; line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease;
}
.type-option .icon { width: 18px; height: 18px; }
.type-option[aria-checked='true'] { color: var(--text); font-weight: 600; background: var(--dream-soft); }
.type-option.lucid[aria-checked='true'] { background: var(--lucid-soft); }
.type-option.lucid[aria-checked='true'] .icon { color: var(--lucid); filter: drop-shadow(0 0 4px var(--accent-glow)); }
.type-option.norecall[aria-checked='true'] { background: var(--norecall-soft); }
@media (max-width: 380px) { .type-option .icon { display: none; } }

/* ---------- Formulare ---------- */
.field { display: block; }
.field > .label, .label { display: block; font-size: 0.8rem; color: var(--text-2); margin-bottom: 6px; }
.label .opt { color: var(--text-3); }
.input, .textarea, .select {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1rem;
  transition: border-color 0.2s ease;
}
.textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); }
.input[aria-invalid='true'], .textarea[aria-invalid='true'] { border-color: var(--danger); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); opacity: 0.7; }
.hint { font-size: 0.8rem; color: var(--text-3); margin-top: 6px; }
.error { font-size: 0.84rem; color: var(--danger); margin-top: 6px; }
.error:empty { display: none; }
.input-time { max-width: 120px; text-align: center; font-variant-numeric: tabular-nums; }
.input-num { max-width: 120px; }
.input-wrap { display: flex; align-items: center; gap: 10px; }

.search { position: relative; display: block; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 44px; }

.switch-row { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 8px 0; }
.switch-row .text { flex: 1; min-width: 0; }
.switch-row .text strong { display: block; font-weight: 500; }
.switch-row .text span { display: block; font-size: 0.82rem; color: var(--text-3); }
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: background 0.2s ease; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s var(--ease); }
.switch input:checked + .track { background: var(--accent); box-shadow: 0 0 14px var(--accent-glow); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }

.range { width: 100%; accent-color: var(--lucid); height: 32px; }
.range-wrap { padding: 12px 16px; border-radius: 14px; background: var(--lucid-soft); }
.range-wrap.is-unset .range { opacity: 0.5; }
.range-value { font-size: 1.5rem; font-weight: 600; color: var(--lucid-ink); font-variant-numeric: tabular-nums; }
.range-scale { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-3); }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 4px; }
.stepper button { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--surface); color: var(--text); font-size: 1.2rem; }
.stepper button:disabled { opacity: 0.35; }
.stepper output { min-width: 36px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.weekday-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.weekday-picker .chip { padding: 0; min-height: 42px; }

.star-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--border); background: transparent; color: var(--text-2); }
.star-toggle[aria-pressed='true'] { color: var(--text); border-color: color-mix(in srgb, var(--mark) 55%, transparent); background: color-mix(in srgb, var(--mark) 10%, transparent); }
.star-toggle[aria-pressed='true'] .icon { color: var(--mark); }
.icon.star.is-on { color: var(--mark); }

/* ---------- Navigation ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 8px 8px calc(8px + var(--safe-b));
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.tabbar ul { list-style: none; margin: 0 auto; padding: 0; max-width: 520px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 2px; }
.tabbar a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px;
  border-radius: 16px; color: var(--text-3); text-decoration: none; font-size: 0.7rem; white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}
.tabbar a .icon { width: 22px; height: 22px; }
.tabbar a:hover { color: var(--text); }
.tabbar a[aria-current='page'] { color: var(--text); background: var(--accent-soft); }
.tabbar a[aria-current='page'] .icon { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.tabbar .tab-add a { padding-top: 0; color: var(--text); background: transparent; }
.tabbar .tab-add a[aria-current='page'] { background: transparent; }
.tab-orb {
  width: 56px; height: 56px; margin-top: -28px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; background: var(--orb-gradient);
  box-shadow: 0 0 0 5px var(--bg), 0 0 22px rgba(124, 108, 255, 0.5), 0 0 44px rgba(96, 165, 250, 0.22);
  transition: scale 0.2s ease;
}
.tabbar .tab-add a:hover .tab-orb { scale: 1.06; }
.tabbar .tab-add a:active .tab-orb { scale: 0.95; }
.tabbar .tab-add a[aria-current='page'] .icon { color: #fff; filter: none; }
body.hide-tabbar .tabbar { display: none; }

@media (min-width: 700px) {
  .tabbar { left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); width: 480px; border-radius: 24px; border: 1px solid var(--border); padding: 8px; }
  .view { padding-top: 40px; padding-bottom: calc(var(--nav-h) + 60px); }
}

/* ---------- Home ---------- */
.orb-wrap { display: flex; flex-direction: column; align-items: center; margin: 6px 0 4px; }
.orb { width: min(72vw, 280px); height: auto; overflow: visible; }
.onb-orb .orb { width: min(52vw, 200px); }
.onb-orb { align-items: flex-start; margin: 8px 0 18px; }
.orb .orb-body { filter: drop-shadow(0 0 28px var(--orb-glow)); }
.orb .ring-seg { fill: none; stroke: color-mix(in srgb, var(--accent) 30%, transparent); stroke-width: 3; stroke-linecap: round; }
.orb .ring-seg.done { stroke: var(--accent); filter: drop-shadow(0 0 4px var(--accent-glow)); }
.orb .ring-seg.missed, .orb .ring-seg.off { stroke: var(--ring); }
.orb .orbit { fill: none; stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 5; }
.orb .orb-value { font-size: 54px; font-weight: 600; letter-spacing: -0.02em; fill: var(--text); font-variant-numeric: tabular-nums; }
.orb .orb-sub { font-size: 14px; fill: var(--text-2); letter-spacing: 0.02em; }
.orb-caption { text-align: center; margin-top: 8px; }
.orb-caption strong { display: block; font-size: 1.05rem; font-weight: 600; }
.orb-caption span { display: block; font-size: 0.86rem; color: var(--text-2); margin-top: 2px; }
.orb-caption .btn { margin-top: 10px; }
.orb-caption .tiny { font-size: 0.78rem; color: var(--text-3); margin-top: 6px; }

.home-stats { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.stat-big { font-size: 2rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: var(--lucid-ink); }
.stat-label { font-size: 0.88rem; color: var(--text-2); }

.quick-add {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600;
  transition: border-color 0.2s ease;
}
.quick-add:hover { border-color: var(--border-strong); }
.quick-add .icon-wrap { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--orb-gradient); box-shadow: 0 0 18px rgba(124, 108, 255, 0.35); }
.quick-add small { display: block; font-weight: 400; font-size: 0.82rem; color: var(--text-2); }
.quick-add > .icon { color: var(--text-3); }

.thought { display: flex; gap: 12px; align-items: flex-start; padding: 4px 2px; }
.thought .icon { color: var(--accent); margin-top: 2px; filter: drop-shadow(0 0 4px var(--accent-glow)); }
.thought p { color: var(--text-2); font-size: 0.95rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 0.76rem; font-weight: 500; white-space: nowrap; }
.badge.dream { background: var(--dream-soft); color: var(--dream-ink); }
.badge.lucid { background: var(--lucid-soft); color: var(--lucid-ink); }
.badge.norecall { background: var(--norecall-soft); color: var(--norecall-ink); }
.badge.neutral { background: var(--surface-2); color: var(--text-2); }
.badge .icon { width: 13px; height: 13px; }

/* ---------- Traumliste ---------- */
.dream-item { display: block; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); color: inherit; text-decoration: none; transition: border-color 0.2s ease; }
.dream-item:hover { border-color: var(--border-strong); }
.dream-item .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-3); margin-bottom: 6px; }
.dream-item h3 { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.dream-item h3 .icon.star { color: var(--mark); }
.dream-item p { font-size: 0.88rem; color: var(--text-2); margin-top: 2px; }
.dream-list > * + * { margin-top: 8px; }
.dream-list > .list-month { margin-top: 24px; }
.dream-list > .list-month:first-child { margin-top: 4px; }
.list-month { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 24px 2px 10px; }

/* ---------- Kalender ---------- */
.cal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 10px 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 8px; }
.cal-head h2 { font-size: 1rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 0.7rem; color: var(--text-3); padding: 4px 0 6px; }
.cal-day {
  position: relative; aspect-ratio: 1; min-height: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text); font-size: 0.92rem;
  font-variant-numeric: tabular-nums; text-decoration: none; padding: 0; transition: background 0.2s ease;
}
a.cal-day:hover { background: var(--surface-2); }
.cal-day.is-empty { visibility: hidden; }
.cal-day.is-future { color: var(--text-3); opacity: 0.45; pointer-events: none; }
.cal-day.is-today { border-color: var(--accent); }
.cal-day .mark { position: absolute; bottom: 5px; height: 6px; display: flex; gap: 2px; align-items: center; }
.cal-day .mark i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; display: block; }
.cal-day[data-status='dream'] { background: var(--dream-soft); color: var(--dream-ink); }
.cal-day[data-status='lucid'] { background: var(--lucid-soft); color: var(--lucid-ink); font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lucid) 35%, transparent); }
.cal-day[data-status='lucid'] .mark svg { width: 9px; height: 9px; }
.cal-day[data-status='norecall'] { background: var(--norecall-soft); color: var(--norecall-ink); }
.cal-day[data-status='norecall'] .mark i { width: 8px; height: 2px; border-radius: 2px; }
.cal-day .starred { position: absolute; top: 3px; right: 4px; width: 8px; height: 8px; color: var(--mark); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; padding: 0 4px; font-size: 0.78rem; color: var(--text-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.cal-legend .l-lucid { background: var(--lucid-soft); box-shadow: inset 0 0 0 1px var(--lucid); }
.cal-legend .l-dream { background: var(--dream-soft); box-shadow: inset 0 0 0 1px var(--dream); }
.cal-legend .l-norecall { background: var(--norecall-soft); box-shadow: inset 0 0 0 1px var(--norecall-ink); }
.cal-legend .l-none { box-shadow: inset 0 0 0 1px var(--border-strong); }
.cal.mini { padding: 4px 0 0; background: transparent; border: 0; }
.cal.mini .cal-day { min-height: 28px; font-size: 0.78rem; border-radius: 9px; }
.cal.mini .cal-day .mark { bottom: 3px; }

/* ---------- Tagesansicht ---------- */
.summary-grid { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.summary-item .v { font-size: 1.35rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.summary-item .k { font-size: 0.8rem; color: var(--text-2); }
.summary-item .n { font-size: 0.72rem; color: var(--text-3); }

.entry-card { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.entry-card.lucid { border-color: color-mix(in srgb, var(--lucid) 35%, transparent); box-shadow: 0 0 24px color-mix(in srgb, var(--lucid) 10%, transparent); }
.entry-card .head { display: flex; align-items: flex-start; gap: 10px; }
.entry-card .head h3 { flex: 1; font-size: 1.15rem; padding-top: 8px; }
.entry-card .facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.entry-card .body { margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; color: var(--text); }
.entry-card .body.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.entry-card .actions { display: flex; gap: 4px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ---------- Leere Zustände ---------- */
.empty { text-align: center; padding: 44px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-icon { width: 64px; height: 64px; margin-bottom: 10px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 30px var(--accent-glow); }
.empty-icon .icon { width: 28px; height: 28px; }
.card.row .empty-icon { margin: 0; flex: none; width: 56px; height: 56px; }
.empty h2 { font-size: 1.05rem; }
.empty p { color: var(--text-2); font-size: 0.9rem; max-width: 300px; }
.empty .btn { margin-top: 14px; }

/* ---------- Hinweise ---------- */
.notice { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--text); font-size: 0.88rem; }
.notice .icon { color: var(--accent); margin-top: 1px; }
.notice.warn { background: color-mix(in srgb, var(--mark) 11%, transparent); }
.notice.warn .icon { color: var(--mark); }
.notice.danger { background: var(--danger-soft); }
.notice.danger .icon { color: var(--danger); }
.notice.neutral { background: var(--surface-2); color: var(--text-2); }
.notice.neutral .icon { color: var(--text-3); }

/* ---------- Statistik ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi { padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.kpi .v { font-size: 1.6rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .k { font-size: 0.8rem; color: var(--text-2); margin-top: 4px; }
.kpi .n { font-size: 0.72rem; color: var(--text-3); margin-top: 2px; }
.kpi .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.kpi.empty-val .v { color: var(--text-3); font-size: 0.95rem; font-weight: 500; padding: 6px 0 2px; }

.period-bar { margin-bottom: 10px; }
.period-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; color: var(--text-2); font-size: 0.92rem; }

.chart-card { padding: 16px 14px 12px; }
.chart { position: relative; }
.chart > svg { width: 100%; height: auto; overflow: visible; }
.chart .bar-hit { fill: transparent; cursor: pointer; }
.chart .bar-hit:hover, .chart .bar-hit:focus-visible { fill: var(--surface-2); outline: none; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .baseline { stroke: var(--border-strong); stroke-width: 1; }
.chart-legend { display: flex; gap: 14px; font-size: 0.8rem; color: var(--text-2); margin-bottom: 10px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 50%; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; padding: 8px 10px; border-radius: 12px; min-width: 120px;
  background: var(--toast-bg); color: var(--toast-text); font-size: 0.78rem; transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap;
}
.tooltip strong { display: block; margin-bottom: 2px; }
.tooltip .t-row { display: flex; align-items: center; gap: 6px; opacity: 0.85; }
.tooltip .t-row i { width: 8px; height: 8px; border-radius: 50%; }
.tooltip .t-row b { margin-left: auto; padding-left: 10px; }

details.disclosure > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text-2); font-size: 0.86rem; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary .icon { transition: transform 0.2s ease; }
details.disclosure[open] > summary .icon { transform: rotate(180deg); }
details.more { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); padding: 4px 16px; }
details.more > summary { min-height: 54px; color: var(--text); font-weight: 600; font-size: 0.95rem; justify-content: space-between; }
details.more[open] { padding-bottom: 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.data-table th { color: var(--text-3); font-weight: 500; }
.data-table td:not(:first-child), .data-table th:not(:first-child) { text-align: right; }

.method-bars > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 0.9rem; }
.method-bars > div + div { margin-top: 10px; }
.method-bars .bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.method-bars .bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

.insight { display: flex; gap: 14px; align-items: flex-start; }
.insight + .insight { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.insight .ico { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.insight h3 { font-size: 0.92rem; }
.insight p { font-size: 0.9rem; color: var(--text); margin-top: 2px; }
.insight .cv { font-size: 0.78rem; color: var(--text-3); margin-top: 4px; }

/* ---------- Profil & Einstellungen ---------- */
.menu { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.menu a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 66px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: border-color 0.2s ease; }
.menu a:hover { border-color: var(--border-strong); }
.menu .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.menu .txt { flex: 1; min-width: 0; }
.menu .txt strong { display: block; font-weight: 500; }
.menu .txt span { display: block; font-size: 0.8rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .chev { color: var(--text-3); }

.settings-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 4px 16px; }
.settings-group > .item { padding: 14px 0; }
.settings-group > * + * { border-top: 1px solid var(--border); }
.settings-group.disabled-look .item:not(.keep) { opacity: 0.45; pointer-events: none; }
.time-pair { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.time-pair span { color: var(--text-3); }
.plan-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.plan-preview span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 0.8rem; font-variant-numeric: tabular-nums; color: var(--text-2); }

.method-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); }
.method-card + .method-card { margin-top: 8px; }
.method-card .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.method-card.is-on { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.method-card.is-on .ico { background: var(--accent-soft); color: var(--accent); }
.method-card .txt { flex: 1; min-width: 0; }
.method-card .txt strong { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 500; }
.method-card .txt span { display: block; font-size: 0.8rem; color: var(--text-2); }
.rec { font-size: 0.68rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 999px; letter-spacing: 0.02em; }

.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.method-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; min-height: 112px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); text-align: left; color: var(--text); cursor: pointer; }
.method-tile .ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.method-tile strong { font-size: 0.9rem; font-weight: 500; line-height: 1.3; }
.method-tile .check { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); background: transparent; display: grid; place-items: center; color: transparent; padding: 0; }
.method-tile[aria-pressed='true'] { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.method-tile[aria-pressed='true'] .ico { color: var(--accent); }
.method-tile[aria-pressed='true'] .check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 0 12px var(--accent-glow); }
.method-tile .info-btn { margin-top: auto; font-size: 0.76rem; color: var(--accent); background: none; border: 0; padding: 4px 0; display: inline-flex; gap: 4px; align-items: center; }

.theme-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.theme-option { display: flex; flex-direction: column; gap: 10px; padding: 8px 8px 12px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); text-align: center; font-size: 0.9rem; color: var(--text); }
.theme-option[aria-checked='true'] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); font-weight: 600; }
.theme-swatch { height: 96px; border-radius: 12px; position: relative; overflow: hidden; }
.theme-swatch.light { background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(167, 139, 250, 0.28), transparent 70%), #f5f7fc; }
.theme-swatch.night { background: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(124, 108, 255, 0.35), transparent 70%), #090c1b; }
.theme-swatch .c { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; border-radius: 50%; transform: translate(-50%, -50%); }
.theme-swatch.light .c { background: radial-gradient(circle at 35% 35%, #fff, #dde8fb); box-shadow: 0 0 18px rgba(120, 150, 255, 0.45); }
.theme-swatch.night .c { background: radial-gradient(circle at 35% 35%, #1e2452, #0e1230); box-shadow: 0 0 18px rgba(124, 108, 255, 0.6); border: 1px solid rgba(167, 139, 250, 0.3); }
.theme-swatch .s { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #ece6ff; }

/* ---------- Sheet ---------- */
dialog.sheet {
  border: 1px solid var(--border); border-bottom: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 480px; max-height: 90svh;
  background: var(--bg); color: var(--text); border-radius: 24px 24px 0 0; overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
}
dialog.sheet[open] { animation: slide-up 0.3s var(--ease); display: flex; flex-direction: column; }
dialog.sheet::backdrop { background: var(--scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in 0.2s ease-out; }
@media (min-width: 600px) { dialog.sheet { margin: auto; border-radius: 24px; border-bottom: 1px solid var(--border); } }
.sheet-inner { padding: 10px 20px calc(20px + var(--safe-b)); overflow-y: auto; background: radial-gradient(ellipse 90% 40% at 50% 0%, var(--glow-1), transparent 70%); }
.sheet-grip { width: 40px; height: 4px; border-radius: 99px; background: var(--surface-3); margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { flex: 1; padding-top: 8px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 7px 0; font-size: 0.94rem; }
.steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); }

.rc-card { text-align: center; }
.rc-card .empty-icon { margin: 4px auto 12px; }
.rc-card h2 { font-size: 1.4rem; }
.rc-card .method-name { display: inline-flex; align-items: center; gap: 8px; margin: 10px auto 2px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--text); font-weight: 500; font-size: 0.92rem; }
.rc-card .method-name .icon { color: var(--accent); }
.rc-card .steps { text-align: left; margin-top: 12px; }
.rc-card .timer { font-size: 0.8rem; color: var(--text-3); margin-top: 6px; }
.rc-inline { display: flex; align-items: center; gap: 14px; border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 24px var(--accent-soft); }
.rc-inline .ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--orb-gradient); flex: none; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + 16px + var(--safe-b)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 700px) { .toasts { bottom: calc(var(--nav-h) + 40px); } }
body.hide-tabbar .toasts { bottom: calc(24px + var(--safe-b)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 480px; padding: 12px 14px 12px 16px; border-radius: 14px; background: var(--toast-bg); color: var(--toast-text); font-size: 0.9rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); animation: toast-in 0.25s var(--ease); }
.toast.error { background: var(--danger); color: #fff; }
.toast button { background: none; border: 0; color: inherit; font-weight: 600; text-decoration: underline; padding: 6px; min-height: 36px; }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: all 0.2s ease; }

/* ---------- Klartraum-Moment ---------- */
.celebrate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: var(--scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in 0.25s ease; padding: 24px; }
.celebrate .panel { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 24px; padding: 28px 24px 22px; text-align: center; max-width: 330px; width: 100%; animation: pop-in 0.45s var(--ease); overflow: hidden; background-image: radial-gradient(ellipse 90% 60% at 50% 0%, var(--glow-1), transparent 70%); }
.celebrate .panel h2 { font-size: 1.3rem; margin-top: 6px; }
.celebrate .panel p { color: var(--text-2); margin-top: 6px; font-size: 0.92rem; }
.celebrate .empty-icon { margin: 0 auto 8px; width: 76px; height: 76px; color: #fff; background: var(--orb-gradient); }
.celebrate .spark { position: absolute; color: var(--accent); opacity: 0; animation: spark 1.6s var(--ease) forwards; }

/* ---------- Onboarding ---------- */
.onb { min-height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding: calc(18px + var(--safe-t)) 20px calc(20px + var(--safe-b)); }
.onb-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.onb-dots { display: flex; gap: 6px; }
.onb-dots span { width: 28px; height: 4px; border-radius: 999px; background: var(--surface-3); transition: background 0.25s ease; }
.onb-dots span.on { background: var(--orb-gradient); box-shadow: 0 0 8px var(--accent-glow); }
.onb-body { flex: 1; padding: 16px 0 20px; animation: fade-in 0.3s ease-out; }
.onb-body h1 { margin: 12px 0 8px; }
.onb-body .lead { color: var(--text-2); }
.onb-foot { display: flex; gap: 10px; position: sticky; bottom: 0; margin: 0 -20px; padding: 16px 20px 0; background: linear-gradient(180deg, transparent, var(--bg) 40%); }
.onb-foot .btn { flex: 1; }
.onb-foot .btn.secondary { flex: 0 0 34%; }
.profile-options { display: grid; gap: 8px; }
.profile-option { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); text-align: left; color: var(--text); }
.profile-option[aria-checked='true'] { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.profile-option .txt { flex: 1; }
.profile-option .txt strong { font-weight: 500; }
.profile-option .txt span { display: block; font-size: 0.8rem; color: var(--text-2); }
.profile-option .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; }
.profile-option[aria-checked='true'] .radio { border: 6px solid var(--accent); }

/* ---------- Laden ---------- */
.boot { min-height: 70dvh; display: grid; place-items: center; text-align: center; color: var(--text-2); }
.boot .logo { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.32em; color: var(--text); margin-top: 14px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 0 auto; }

/* ---------- Animationen ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pop-in { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spark { 0% { opacity: 0; transform: scale(0.4) translateY(8px); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1) translateY(-26px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orb-in { from { opacity: 0; scale: 0.96; } to { opacity: 1; scale: 1; } }
.orb { animation: orb-in 0.7s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
@media (forced-colors: active) {
  .cal-day[data-status] { border: 1px solid CanvasText; }
}
