:root {
  /* Liquid Glass — flüssig, getönt, spekular */
  --bg: #c8daf5;
  --bg-deep: rgba(255, 255, 255, 0.22);
  --surface: rgba(255, 255, 255, 0.18);
  --surface-2: rgba(255, 255, 255, 0.36);
  --ink: #0c1222;
  --ink-soft: #3a445c;
  --muted: #5c6680;
  --ink-rgb: 12, 18, 34;
  --accent: #0071e3;
  --accent-2: #0058b0;
  --accent-soft: rgba(0, 113, 227, 0.12);
  --accent-rgb: 0, 113, 227;
  --warm: #ff6259;
  --warm-soft: rgba(255, 98, 89, 0.14);
  --warm-rgb: 255, 98, 89;
  --ok: #30b566;
  --ok-soft: rgba(48, 181, 102, 0.14);
  --hero-a: #5b8def;
  --hero-b: #a78bfa;
  --hero-c: #7dd3fc;
  --pulse: #7dd3fc;
  --block-mint: #5eead4;
  --block-pink: #f9a8d4;
  --block-yellow: #fde68a;
  --block-blue: #60a5fa;
  --block-coral: #fb7185;
  --radius: 36px;
  --radius-sm: 22px;
  --line: rgba(255, 255, 255, 0.72);
  --line-ink: rgba(12, 18, 34, 0.08);
  --shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    0 12px 40px rgba(60, 100, 180, 0.14),
    0 4px 14px rgba(80, 120, 200, 0.08);
  --shadow-pop:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.16),
    0 20px 50px rgba(60, 100, 180, 0.18),
    0 6px 18px rgba(80, 120, 200, 0.1);
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.22);
  --glass-bar: rgba(255, 255, 255, 0.12);
  --blur: 24px;
  --blur-bar: 28px;
  --saturate: 2.6;
  --bright: 1.12;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --font-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --page-inline: clamp(16px, 2.5vw, 40px);
  --max: 1080px;
  --topbar-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --glass-filter: blur(var(--blur)) saturate(var(--saturate)) brightness(var(--bright));
  --glass-filter-bar: blur(var(--blur-bar)) saturate(2.8) brightness(1.14);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(160deg, #d7e8ff 0%, #e8ddff 40%, #f3d9e8 70%, #d5f3ef 100%);
}

.app-bg {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.85;
  will-change: transform;
  animation: blobDrift 18s var(--ease) infinite alternate;
}

.blob-a {
  width: 55vmax;
  height: 55vmax;
  left: -10%;
  top: -15%;
  background: radial-gradient(circle, #7dd3fc 0%, rgba(125, 211, 252, 0) 70%);
  animation-duration: 22s;
}

.blob-b {
  width: 50vmax;
  height: 50vmax;
  right: -12%;
  top: -8%;
  background: radial-gradient(circle, #c4b5fd 0%, rgba(196, 181, 253, 0) 70%);
  animation-duration: 26s;
  animation-delay: -4s;
}

.blob-c {
  width: 48vmax;
  height: 48vmax;
  right: 5%;
  bottom: -18%;
  background: radial-gradient(circle, #fda4af 0%, rgba(253, 164, 175, 0) 70%);
  animation-duration: 20s;
  animation-delay: -8s;
}

.blob-d {
  width: 52vmax;
  height: 52vmax;
  left: -8%;
  bottom: -20%;
  background: radial-gradient(circle, #5eead4 0%, rgba(94, 234, 212, 0) 70%);
  animation-duration: 24s;
  animation-delay: -2s;
}

@keyframes blobDrift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, 6%) scale(1.08); }
  100% { transform: translate(-3%, 3%) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

img {
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 100vh;
  padding-inline: var(--page-inline);
}

/* Eine gemeinsame Schiene: Nav + Content gleich breit, im Container */
.rail {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
}

/* —— Apple-style Liquid Glass top bar —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  padding: 12px 0 0;
}

.topbar-inner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  min-height: var(--topbar-h);
  padding: 8px 12px 8px 16px;
  border-radius: 999px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.08) 42%, rgba(200, 220, 255, 0.18) 100%),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-pop);
  backdrop-filter: var(--glass-filter-bar);
  -webkit-backdrop-filter: var(--glass-filter-bar);
}

.topbar-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.7) 0%,
      rgba(255, 255, 255, 0.12) 28%,
      transparent 48%,
      rgba(255, 255, 255, 0.08) 72%,
      rgba(255, 255, 255, 0.28) 100%
    );
}

.topbar-inner::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 1px;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
}

.topbar-inner > * {
  position: relative;
  z-index: 2;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  padding: 4px 6px 4px 2px;
  border-radius: 999px;
  text-align: left;
}

.brand:hover {
  background: rgba(255, 255, 255, 0.28);
}

.brand-text {
  display: none;
  flex-direction: column;
  gap: 1px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.12)),
    linear-gradient(135deg, var(--block-blue), var(--hero-b) 55%, var(--block-mint));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 8px 18px rgba(91, 141, 239, 0.32);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px 7px 7px;
  border-radius: 999px 999px 9px 9px;
  background: rgba(255, 255, 255, 0.94);
  transform: skewX(-8deg);
  box-shadow: 0 4px 10px rgba(12, 18, 34, 0.1);
}

.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.brand-tag {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    background 200ms var(--ease),
    color 200ms var(--ease),
    box-shadow 200ms var(--ease),
    border-color 200ms var(--ease);
}

.nav-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
  flex-shrink: 0;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
}

.nav-btn.is-active {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 6px 18px rgba(15, 23, 42, 0.08);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-btn-settings {
  flex-shrink: 0;
  width: 40px;
  padding: 0;
  margin-left: 2px;
}

.nav-btn-settings span {
  display: none;
}

.main {
  width: 100%;
  margin: 0;
  padding: var(--space-6) 0 var(--space-12);
}

@media (max-width: 639px) {
  .nav-btn span {
    display: none;
  }

  .nav-btn {
    width: 40px;
    padding: 0;
  }

  .nav {
    justify-content: flex-end;
    mask-image: none;
  }
}

.view[hidden] {
  display: none !important;
}

.view.is-active {
  animation: viewIn 420ms var(--ease) both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.4;
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 700;
  max-width: 14ch;
  color: var(--ink);
}

.lede {
  margin: 0 0 var(--space-6);
  color: var(--ink-soft);
  max-width: 58ch;
  font-size: 1.05rem;
}

.craving-lede {
  margin-bottom: var(--space-4);
  font-size: 0.98rem;
}

.muted {
  color: var(--muted);
}

.hero-counter {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  padding: var(--space-8) var(--space-6);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.12) 100%),
    linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(99, 102, 241, 0.8) 48%, rgba(167, 139, 250, 0.85) 100%);
  color: #fff;
  box-shadow: var(--shadow-pop);
  margin-bottom: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(28px) saturate(2.2) brightness(1.1);
  -webkit-backdrop-filter: blur(28px) saturate(2.2) brightness(1.1);
}

.hero-counter::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -20%;
  height: 90%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(125, 211, 252, 0.35), transparent 45%);
  pointer-events: none;
  animation: blobDrift 16s var(--ease) infinite alternate;
}

.hero-counter::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 18px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.15) 42%, transparent 68%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.hero-label {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.hero-days {
  position: relative;
  z-index: 1;
  margin: 12px 0 8px;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-sub {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  max-width: 36ch;
}

.hero-since {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.01em;
}

.hero-pulse {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.stat-row {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.stat-row .stat {
  border-top: 4px solid var(--block-blue);
}
.stat-row .stat:nth-child(1) { border-top-color: var(--block-yellow); }
.stat-row .stat:nth-child(2) { border-top-color: var(--block-mint); }
.stat-row .stat:nth-child(3) { border-top-color: var(--block-coral); }

#home-reasons,
#home-triggers {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

#home-reasons li,
#home-triggers li {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--block-mint);
  font-weight: 600;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.18)),
    var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
}

#home-reasons li:nth-child(2),
#home-triggers li:nth-child(2) { border-left-color: var(--block-yellow); }
#home-reasons li:nth-child(3),
#home-triggers li:nth-child(3) { border-left-color: var(--block-coral); }
#home-reasons li:nth-child(4),
#home-triggers li:nth-child(4) { border-left-color: var(--block-blue); }

#home-triggers li {
  border-left-color: var(--block-coral);
}

#home-triggers li:nth-child(2) { border-left-color: var(--block-blue); }
#home-triggers li:nth-child(3) { border-left-color: var(--block-mint); }
#home-triggers li:nth-child(4) { border-left-color: var(--block-yellow); }

#home-triggers .home-trigger-text {
  display: block;
  font-weight: 700;
}

#home-triggers .home-trigger-why {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

#triggers-list .trigger-text {
  display: block;
  font-weight: 600;
}

#triggers-list .trigger-why {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
}

.stat,
.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.05) 40%, rgba(170, 210, 255, 0.16) 100%),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease);
}

.stat::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(255, 255, 255, 0.55), transparent 45%),
    radial-gradient(90% 70% at 100% 100%, rgba(167, 139, 250, 0.12), transparent 50%);
}

.stat > *,
.panel > * {
  position: relative;
  z-index: 1;
}

.stat {
  padding: var(--space-6);
}

.stat-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  margin: 8px 0 4px;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stat-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.split {
  display: grid;
  gap: var(--space-4);
}

.split > .panel + .panel {
  margin-top: 0;
}

.home-duo {
  margin-bottom: var(--space-5);
  align-items: stretch;
}

.home-duo > .panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.home-duo .reason-list {
  flex: 1;
}

.home-next {
  margin-top: 0;
  overflow: visible;
}

.home-next .action-stack {
  gap: var(--space-4);
}

.panel {
  padding: var(--space-6);
}

.panel + .panel {
  margin-top: var(--space-4);
}

.panel h2 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.panel-head h2 {
  margin: 0;
}

.reason-list,
.editable-list,
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.reason-list li,
.editable-list li,
.timeline li {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid transparent;
}

.reason-list li:empty::before,
.editable-list:empty::before,
.timeline:empty::before {
  content: "Noch nichts hinterlegt.";
  color: var(--muted);
}

.reason-list:empty::after {
  content: "Füge unter Werkzeuge deine Gründe hinzu.";
  color: var(--muted);
  display: block;
  padding: var(--space-3) 0;
}

.editable-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: flex-start;
}

.editable-list .plan-if {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline li {
  display: grid;
  gap: 4px;
}

.timeline .meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.action-stack {
  display: grid;
  gap: var(--space-3);
}

.action-stack .action-tile:nth-child(2) { background: var(--accent-soft); }
.action-stack .action-tile:nth-child(3) { background: var(--ok-soft); }

.action-tile {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2)),
    var(--glass-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), background 220ms var(--ease);
}

.action-tile:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 16px 40px rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.82);
}

.action-tile:active {
  transform: translateY(0) scale(0.99);
}

.action-tile svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent);
  stroke-width: 1.7;
}

.action-tile strong {
  display: block;
  margin-bottom: 2px;
}

.action-tile span {
  color: var(--muted);
  font-size: 0.92rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  transition: transform 200ms var(--ease), background 200ms var(--ease), box-shadow 200ms var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
.scale-btn:focus-visible,
.halt:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, #3b9eff, var(--accent));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 10px 24px rgba(0, 113, 227, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #4aa6ff, var(--accent-2));
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 14px 28px rgba(0, 113, 227, 0.34);
}

.btn-primary:disabled,
.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.22)),
    var(--glass-strong);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.88);
}

.btn-warm {
  background: linear-gradient(180deg, #ff8a82, var(--warm));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.3) inset,
    0 10px 24px rgba(var(--warm-rgb), 0.28);
}

.btn-warm:hover {
  filter: brightness(0.96);
}

.link-btn {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 44px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.surf-panel[data-mode="idle"] .surf-guide,
.surf-panel[data-mode="idle"] .surf-done,
.surf-panel[data-mode="running"] .surf-idle,
.surf-panel[data-mode="running"] .surf-done,
.surf-panel[data-mode="done"] .surf-idle,
.surf-panel[data-mode="done"] .surf-guide {
  display: none;
}

.surf-idle {
  display: grid;
  gap: var(--space-4);
}

.surf-guide {
  display: grid;
  gap: var(--space-4);
}

.surf-done {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}

.surf-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-deep);
  overflow: hidden;
}

.surf-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 300ms var(--ease);
}

.surf-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin: 8px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.surf-step-timer {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.surf-step-timer.is-ending {
  color: var(--warm);
  animation: timerPulse 0.9s ease-in-out infinite;
}

.surf-phase-status {
  margin: 6px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

.surf-phase-status.is-ending {
  color: var(--warm);
}

.surf-phase-status.is-switch {
  color: var(--accent-2);
}

.surf-guide.is-switching .surf-step-title,
.surf-guide.is-switching .surf-prompt {
  animation: phaseIn 420ms var(--ease);
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.04); }
}

@keyframes phaseIn {
  from { opacity: 0.35; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .surf-step-timer.is-ending,
  .surf-guide.is-switching .surf-step-title,
  .surf-guide.is-switching .surf-prompt {
    animation: none;
  }
}

.surf-dots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.surf-dots li {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-deep);
}

.surf-dots li.is-done {
  background: rgba(var(--accent-rgb), 0.45);
}

.surf-dots li.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

.surf-step-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--accent-2);
}

.surf-prompt {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  max-width: 34ch;
}

.surf-detail {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 40ch;
}

.surf-actions {
  margin-top: var(--space-2);
}

.intensity {
  display: grid;
  gap: 8px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
}

.intensity.is-hidden {
  display: none;
}

.intensity label,
.form legend,
.field label {
  font-weight: 600;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.breath-panel .panel-head {
  margin-bottom: 4px;
}

.breath-panel h2 {
  margin: 0;
}

.breath-intro {
  margin: 0 0 var(--space-4);
  font-size: 0.92rem;
}

.breath-coach {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: center;
}

.breath-orb {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0;
  background: var(--accent-soft);
  border: 2px solid rgba(var(--accent-rgb), 0.22);
  transition: transform 0.9s ease-in-out, background 350ms var(--ease), border-color 350ms var(--ease);
  transform: scale(0.86);
}

.breath-orb[data-phase="inhale"] {
  transform: scale(1.06);
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 30%);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.breath-orb[data-phase="hold"] {
  transform: scale(1.06);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--accent) 45%);
  border-color: rgba(var(--accent-rgb), 0.55);
}

.breath-orb[data-phase="exhale"] {
  transform: scale(0.78);
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.2);
}

.breath-orb[data-phase="idle"] {
  transform: scale(0.86);
}

.breath-phase-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.breath-count {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.breath-side {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.breath-steps {
  display: grid;
  gap: 6px;
}

.breath-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-deep);
  border: 1px solid transparent;
  opacity: 0.5;
  transition: opacity 200ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease);
}

.breath-step.is-active {
  opacity: 1;
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.28);
}

.breath-step .step-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
}

.breath-step .step-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.breath-cue {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

@media (max-width: 639px) {
  .breath-coach {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .breath-side {
    width: 100%;
  }

  .breath-cue {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .breath-orb {
    transition: none;
  }
}

.form {
  display: grid;
  gap: var(--space-6);
}

.form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: var(--space-3);
}

.field {
  display: grid;
  gap: 8px;
}

.field-row {
  display: grid;
  gap: var(--space-4);
}

.field-hint {
  margin: -4px 0 0;
  font-size: 0.92rem;
}

.drink-fieldset {
  display: grid;
  gap: var(--space-3);
}

.drink-fieldset legend {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.drink-rows {
  display: grid;
  gap: var(--space-3);
}

.drink-row {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid transparent;
}

.drink-row-fields {
  display: grid;
  gap: var(--space-3);
}

.drink-row select,
.drink-row input[type="number"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.drink-row-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.drink-row-meta .unit {
  font-size: 0.85rem;
  color: var(--muted);
}

.drink-estimate {
  margin: var(--space-2) 0 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.95rem;
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-ink);
  background: var(--surface-2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
  font-size: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.scale-btn {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--glass);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease);
}

.scale-btn.is-selected {
  background: linear-gradient(180deg, #3b9eff, var(--accent));
  color: #fff;
  border-color: transparent;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.range-readout {
  margin: 0;
  font-weight: 600;
  color: var(--accent-2);
}

.halt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.halt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--bg-deep);
  cursor: pointer;
}

.halt input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.plan-suggestions {
  display: grid;
  gap: 10px;
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.suggestions-label {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.suggestion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.suggestion-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
}

.suggestion-item:hover {
  background: rgba(var(--accent-rgb), 0.06);
  border-color: rgba(var(--accent-rgb), 0.16);
}

.suggestion-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.suggestion-item.is-active {
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.24);
}

.suggestion-item .arrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
}

.suggestion-item .text {
  font-size: 0.92rem;
  line-height: 1.35;
}

.suggestion-item .text strong {
  font-weight: 600;
  color: var(--ink);
}

.suggestion-item .hint {
  grid-column: 2;
  font-size: 0.78rem;
  color: var(--muted);
}

.inline-form,
.plan-form {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-4) 0 var(--space-6);
}

.inline-form {
  grid-template-columns: 1fr;
}

.delete-btn {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: 8px;
}

.delete-btn:hover {
  color: var(--warm);
  background: var(--warm-soft);
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.wissen-lede {
  margin: -8px 0 var(--space-5);
  font-size: 0.95rem;
}

.wissen-personal {
  margin-bottom: var(--space-7);
}

.wissen-personal-card {
  position: relative;
  display: flex;
  min-height: 0;
}

.wissen-personal-card .wissen-card {
  width: 100%;
  height: 100%;
}

.wissen-personal-card .wissen-card-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  cursor: pointer;
}

.wissen-personal-card .wissen-card-delete:hover {
  background: rgba(15, 23, 42, 0.8);
}

.wissen-personal-card .wissen-card-delete svg {
  width: 14px;
  height: 14px;
}

.wissen-pending-list {
  display: grid;
  gap: 8px;
  margin: var(--space-3) 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.wissen-pending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.12)),
    var(--glass);
}

.wissen-pending-copy {
  min-width: 0;
}

.wissen-pending-text {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
}

.wissen-pending-why {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
}

.wissen-pending-item .btn {
  flex-shrink: 0;
}

.tag-personal {
  background: color-mix(in srgb, var(--block-coral) 28%, white);
  color: #5c2430;
}

.wissen-featured {
  margin-bottom: var(--space-6);
}

.wissen-featured-label,
.wissen-section-title {
  margin: 0 0 var(--space-3);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.wissen-section-title span {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.wissen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.wissen-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.1) 100%),
    var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.wissen-card.is-featured {
  border-color: rgba(var(--accent-rgb), 0.28);
}

.wissen-featured .wissen-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 200px;
}

.wissen-featured .wissen-cover {
  aspect-ratio: auto;
  min-height: 200px;
  height: 100%;
}

.wissen-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 18px 44px rgba(15, 23, 42, 0.12);
}

.wissen-cover {
  aspect-ratio: 5 / 4;
  width: 100%;
}

.wissen-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 12px;
  flex: 1;
}

.wissen-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wissen-card .tag {
  width: fit-content;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  border: 0;
}

.wissen-card .tag-neu {
  color: var(--ink);
  background: rgba(253, 230, 138, 0.75);
  border: 0;
}

.wissen-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.wissen-featured .wissen-card-title {
  font-size: 1.4rem;
}

.wissen-card-teaser {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wissen-featured .wissen-card-teaser {
  -webkit-line-clamp: 2;
}

.wissen-card-cta {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  gap: 6px;
  margin-top: 4px;
  font-weight: 600;
  color: var(--accent-2);
  font-size: 0.9rem;
}

.wissen-card-cta svg {
  width: 16px;
  height: 16px;
}

.wissen-player {
  position: relative;
  min-height: min(78vh, 720px);
  border-radius: var(--radius);
  background: var(--block-blue);
  color: #fff;
  padding: var(--space-4);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
}

.wissen-player::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--block-yellow), var(--block-coral), var(--block-mint));
  pointer-events: none;
  z-index: 5;
}

.wissen-player::after {
  display: none;
}

.story-visual {
  position: relative;
  z-index: 1;
  margin: var(--space-3) 0 0;
  border-radius: 20px;
  aspect-ratio: 16 / 10;
  width: 100%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.story-visual .viz-svg {
  border-radius: inherit;
}

.story-visual[data-slide="1"] .viz-svg { filter: hue-rotate(-8deg) saturate(1.05); }
.story-visual[data-slide="2"] .viz-svg { filter: hue-rotate(12deg) brightness(1.05); }
.story-visual[data-slide="3"] .viz-svg { filter: saturate(0.95) contrast(1.05); }

.story-top,
.story-visual,
.story-slide,
.story-footer {
  position: relative;
  z-index: 3;
}

.story-tap {
  z-index: 4;
}

.story-top {
  display: grid;
  gap: 10px;
}

.story-segments {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
}

.story-segment {
  height: 3px;
  border-radius: 999px;
  background: rgba(247, 241, 232, 0.22);
  overflow: hidden;
}

.story-segment span {
  display: block;
  height: 100%;
  width: 0%;
  background: #f7f1e8;
}

.story-segment.is-done span {
  width: 100%;
}

.story-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.story-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(247, 241, 232, 0.72);
}

.story-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 0;
  color: #f7f1e8;
  background: rgba(247, 241, 232, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.story-close svg {
  width: 20px;
  height: 20px;
}

.story-slide {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-2) 96px;
  max-width: 28rem;
  flex: 1;
}

.story-slide.is-enter {
  animation: storyIn 380ms var(--ease);
}

@keyframes storyIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.story-eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pulse);
}

.story-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.story-body {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(247, 241, 232, 0.88);
}

.story-tip {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(247, 241, 232, 0.1);
  border: 1px solid rgba(247, 241, 232, 0.14);
  font-size: 0.95rem;
  line-height: 1.4;
}

.story-tap {
  position: absolute;
  top: 72px;
  bottom: 72px;
  z-index: 4;
  width: 42%;
  background: transparent;
}

.story-tap-prev { left: 0; }
.story-tap-next { right: 0; }

.story-footer {
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.story-count {
  margin: 0;
  font-weight: 600;
  color: rgba(247, 241, 232, 0.7);
  font-size: 0.85rem;
}

.story-pause {
  background: rgba(247, 241, 232, 0.12);
  color: #f7f1e8;
}

.story-pause:hover {
  background: rgba(247, 241, 232, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .story-slide.is-enter {
    animation: none;
  }
}

.slip-guide {
  margin: 0 0 var(--space-6);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-8);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--ink-soft);
  display: grid;
  gap: 8px;
}

.slip-guide li {
  padding-left: 4px;
}

.slip-guide strong {
  color: var(--ink);
}

.slip-history-title {
  margin: var(--space-8) 0 var(--space-3);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.slip-entry .note {
  white-space: pre-wrap;
  line-height: 1.45;
}

.timeline-empty {
  color: var(--muted);
  background: transparent !important;
  border: 1px dashed var(--line) !important;
}

.form .field-hint {
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(8px);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 420px);
  padding: 12px 18px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.2)),
    var(--glass-bar);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-pop);
  backdrop-filter: var(--glass-filter-bar);
  -webkit-backdrop-filter: var(--glass-filter-bar);
  opacity: 0;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}

.toast-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: #b42318;
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
}

.toast-msg {
  min-width: 0;
}

.toast.is-error {
  background:
    linear-gradient(180deg, rgba(255, 236, 232, 0.95), rgba(254, 228, 226, 0.88)),
    #fef3f2;
  color: #7a271a;
  border-color: rgba(240, 68, 56, 0.35);
  box-shadow:
    0 12px 28px rgba(180, 35, 24, 0.18),
    var(--shadow-pop);
}

.toast.is-success {
  background:
    linear-gradient(180deg, rgba(236, 253, 243, 0.95), rgba(209, 250, 229, 0.85)),
    #ecfdf3;
  color: #085d3a;
  border-color: rgba(16, 185, 129, 0.35);
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 640px) {
  .stat-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .inline-form {
    grid-template-columns: 1fr auto;
  }

  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .drink-row-fields {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }

  .main {
    padding: var(--space-8) 0 var(--space-16);
  }

  .brand-text {
    display: flex;
  }

  .topbar {
    padding: 14px 0 0;
  }

  .topbar-inner {
    padding: 8px 12px 8px 18px;
  }

  .nav {
    mask-image: none;
    justify-content: flex-end;
    gap: 4px;
  }

  .nav-btn {
    padding: 9px 14px;
    font-size: 0.92rem;
  }

  .nav-btn-settings {
    width: auto;
    padding: 9px 14px;
  }

  .nav-btn-settings span {
    display: inline;
  }
}

@media (min-width: 960px) {
  .main {
    padding: 40px 0 var(--space-16);
  }

  .topbar {
    padding: 16px 0 0;
  }

  .topbar-inner {
    padding-right: 14px;
  }

  .split {
    grid-template-columns: 1.05fr 1fr;
  }

  .wissen-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .wissen-featured .wissen-card {
    grid-template-columns: 1.25fr 1fr;
    min-height: 240px;
  }

  .toast {
    bottom: 32px;
  }
}

@media (max-width: 560px) {
  .wissen-featured .wissen-card {
    grid-template-columns: 1fr;
  }

  .wissen-featured .wissen-cover {
    min-height: 140px;
    aspect-ratio: 16 / 9;
  }
}

/* —— Visual covers —— */
.viz-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.akut-cover,
.wissen-cover,
.akut-hero,
.story-visual {
  overflow: hidden;
  background: linear-gradient(160deg, #dbeafe, #ede9fe);
}

.akut-cover,
.wissen-cover {
  position: relative;
}

.akut-cover .viz-svg,
.wissen-cover .viz-svg,
.akut-hero .viz-svg {
  transform: scale(1.02);
}

.wissen-card-body .wissen-card-cta {
  font-size: 0.82rem;
}

/* —— Akut hub & tools —— */
.akut-hub {
  position: relative;
}

.akut-masthead {
  position: relative;
  margin: 0 0 var(--space-6);
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 32px);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.12) 100%),
    var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  animation: akutMastIn 520ms var(--ease) both;
}

.akut-masthead::before {
  content: "";
  position: absolute;
  left: -20%;
  top: -40%;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.35), transparent 65%);
  pointer-events: none;
}

.akut-masthead::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9), rgba(167, 139, 250, 0.35) 55%, transparent 70%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.akut-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.4;
}

.akut-heading {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}

.akut-sub {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  max-width: 28ch;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.4;
}

@keyframes akutMastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

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

.akut-card {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  text-align: left;
  width: 100%;
  min-height: 148px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  background: rgba(12, 18, 34, 0.2);
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  isolation: isolate;
  animation: akutCardIn 480ms var(--ease) both;
  animation-delay: calc(var(--akut-i, 0) * 45ms);
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease);
}

.akut-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 0%, transparent 40%, rgba(12, 18, 34, 0.55) 100%);
  pointer-events: none;
}

.akut-card.is-featured {
  grid-column: span 2;
  min-height: 220px;
}

.akut-card.is-featured:nth-child(2) {
  grid-column: span 1;
  min-height: 148px;
}

@media (min-width: 720px) {
  .akut-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .akut-card {
    min-height: 168px;
  }

  .akut-card.is-featured {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 340px;
  }

  .akut-card.is-featured:nth-child(2) {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 340px;
  }
}

.akut-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 20px 48px rgba(15, 23, 42, 0.16);
}

.akut-card:hover .akut-cover .viz-svg {
  transform: scale(1.08);
}

.akut-card:active {
  transform: translateY(0) scale(0.99);
}

.akut-cover {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto !important;
}

.akut-cover .viz-svg {
  transition: transform 480ms var(--ease);
  transform: scale(1.04);
}

.akut-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 52px 14px 14px;
  color: #f8fafc;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.akut-card.is-featured .akut-card-overlay {
  padding: 80px 22px 20px;
}

.akut-meta {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.72);
  line-height: 1.3;
}

.akut-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.akut-card.is-featured .akut-title {
  font-size: clamp(1.4rem, 3.2vw, 1.8rem);
}

@keyframes akutCardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.akut-workspace {
  animation: akutMastIn 380ms var(--ease) both;
}

.akut-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  width: calc(100% + 2 * var(--space-6));
  margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) var(--space-5);
  border-radius: var(--radius) var(--radius) 0 0;
}

.akut-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.92));
  pointer-events: none;
}

.akut-tool {
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.1) 100%),
    var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
}

.akut-tool h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.akut-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-4);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 200ms var(--ease), background 200ms var(--ease);
}

.akut-back:hover {
  transform: translateX(-2px);
  background: var(--surface-2);
}

.akut-back svg {
  width: 16px;
  height: 16px;
}

.akut-step-label {
  margin: var(--space-4) 0 var(--space-2);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.delay-stage {
  margin: var(--space-6) 0;
  text-align: center;
}

.delay-timer {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.delay-cue {
  margin: var(--space-3) auto var(--space-5);
  max-width: 28ch;
  color: var(--muted);
  font-size: 1rem;
}

.delay-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  overflow: hidden;
}

.delay-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  transition: width 400ms linear;
}

.reason-flash {
  margin: var(--space-6) 0;
  padding: clamp(28px, 5vw, 40px);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(253, 230, 138, 0.55));
  border: 1px solid var(--line);
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.reason-flash .surf-prompt {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.halt-result {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

#view-craving .surf-prompt {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.2vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

#view-craving .surf-detail,
#view-craving .muted {
  font-size: 0.98rem;
}

#view-craving .breath-orb {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.18), 0 20px 50px rgba(var(--accent-rgb), 0.18);
}

/* —— Recovery journey path —— */
.journey {
  margin-bottom: var(--space-6);
}

.journey-kicker {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.journey .panel-head h2 {
  margin: 0;
}

.journey-progress-label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line);
}

.journey-lede {
  margin: 0 0 var(--space-4);
}

.journey-next {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-6);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(167, 139, 250, 0.18)),
    rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
}

.journey-next--success {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(52, 211, 153, 0.22)),
    rgba(255, 255, 255, 0.28);
  border-color: rgba(167, 243, 208, 0.85);
}

.journey-next--success .journey-next-eta {
  color: var(--ok);
}

.journey-next--success .journey-next-orb {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.98), rgba(52, 211, 153, 0.5) 48%, rgba(16, 185, 129, 0.35) 72%, transparent 78%);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.5),
    0 10px 28px rgba(16, 185, 129, 0.28);
}

.journey-next-orb {
  width: 56px;
  height: 56px;
  margin-top: 4px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95), rgba(96, 165, 250, 0.45) 45%, rgba(167, 139, 250, 0.35) 70%, transparent 75%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.45),
    0 10px 28px rgba(99, 102, 241, 0.25);
  animation: journeyPulse 2.8s var(--ease) infinite;
}

@keyframes journeyPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.88; }
}

.journey-next-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 6px;
}

.journey-next-eta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.journey-next-when {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.65);
  text-transform: none;
}

.journey-next-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.journey-next-teaser {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.journey-next-detail {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.45;
  opacity: 0.92;
}

.journey-note.letter {
  position: relative;
  margin: 4px 0 16px;
  padding: 18px 18px 16px;
  border-radius: 4px 14px 14px 14px;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(96, 165, 250, 0.1) 27px,
      rgba(96, 165, 250, 0.1) 28px
    ),
    linear-gradient(165deg, #fffdf7 0%, #f8f0e0 58%, #f3e8d2 100%);
  border: 1px solid rgba(214, 196, 160, 0.65);
  box-shadow:
    0 10px 28px rgba(68, 48, 20, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transform: rotate(-0.35deg);
}

.journey-note.letter::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: rgba(248, 113, 113, 0.28);
  border-radius: 2px;
}

.letter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px 12px;
}

.letter-stamp {
  display: inline-block;
  padding: 3px 9px 2px;
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-radius: 4px;
  color: rgba(5, 150, 105, 0.85);
  font-family: var(--font-hand);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  transform: rotate(-3deg);
}

.letter-date {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: rgba(68, 64, 60, 0.55);
}

.letter-body {
  margin: 0 0 12px 12px;
  white-space: pre-wrap;
  font-family: var(--font-hand);
  font-size: clamp(1.28rem, 2.8vw, 1.45rem);
  font-weight: 500;
  line-height: 1.45;
  color: #3f3a34;
}

.letter-sign {
  margin: 0 0 0 12px;
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: rgba(68, 64, 60, 0.55);
  transform: rotate(-1deg);
}

.journey-upcoming {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(12, 18, 34, 0.08);
}

.journey-upcoming-label {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.journey-upcoming-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.journey-upcoming-line strong {
  color: var(--ink);
  font-weight: 650;
}

.journey-upcoming-line span {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--accent);
}

.journey-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(12, 18, 34, 0.08);
  overflow: hidden;
}

.journey-track-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #60a5fa 55%, #a78bfa);
  transition: width 500ms var(--ease);
}

.journey-path {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  position: relative;
}

.journey-fold {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  margin: 2px 0 6px;
  align-items: center;
}

.journey-fold::before {
  content: "";
  width: 3px;
  height: 18px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(12, 18, 34, 0.1);
}

.journey-fold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px dashed rgba(12, 18, 34, 0.14);
  background: rgba(255, 255, 255, 0.28);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}

.journey-fold-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  border-color: rgba(12, 18, 34, 0.22);
}

.journey-fold-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.journey-fold--ahead .journey-fold-btn {
  border-style: solid;
  border-color: rgba(96, 165, 250, 0.28);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.35);
}

.journey-node.is-blurred {
  filter: blur(2.5px);
  opacity: 0.55;
  transform: scale(0.985);
  transition: filter 220ms var(--ease), opacity 220ms var(--ease), transform 220ms var(--ease);
}

.journey-node.is-blurred:hover,
.journey-node.is-blurred:focus-within {
  filter: blur(1.2px);
  opacity: 0.78;
}

.journey-node.is-blurred .journey-node-card {
  cursor: pointer;
}

.journey-node.is-blurred .journey-node-detail,
.journey-node.is-blurred .journey-node-when {
  display: none;
}

.journey-node {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: stretch;
  position: relative;
}

.journey-node + .journey-node {
  margin-top: 4px;
}

.journey-node-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.journey-node-rail::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: rgba(12, 18, 34, 0.08);
  border-radius: 999px;
}

.journey-node:first-child .journey-node-rail::before {
  top: 22px;
}

.journey-node:last-child .journey-node-rail::before {
  bottom: calc(100% - 22px);
}

.journey-node.is-done .journey-node-rail::before,
.journey-node.is-next .journey-node-rail::before {
  background: linear-gradient(180deg, #34d399, #60a5fa);
}

.journey-node-dot {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  margin-top: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  color: var(--muted);
}

.journey-node-dot svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.journey-node.is-done .journey-node-dot {
  background: linear-gradient(145deg, #34d399, #059669);
  color: #fff;
  border-color: transparent;
}

.journey-node.is-current .journey-node-dot {
  box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.18),
    var(--shadow);
}

.journey-node.is-next .journey-node-dot {
  background: rgba(255, 255, 255, 0.85);
  color: var(--accent);
  box-shadow:
    0 0 0 4px rgba(0, 113, 227, 0.12),
    var(--shadow);
}

.journey-node-card {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: inherit;
  transition: background 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
}

.journey-node-card:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.journey-node.is-done .journey-node-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(52, 211, 153, 0.12));
  border-color: rgba(167, 243, 208, 0.55);
}

.journey-node.is-current .journey-node-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.65), rgba(52, 211, 153, 0.2));
  border-color: rgba(110, 231, 183, 0.85);
  box-shadow: var(--shadow);
}

.journey-node.is-next .journey-node-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.55), rgba(96, 165, 250, 0.15));
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.journey-node.is-locked .journey-node-card {
  opacity: 0.72;
}

.journey-node-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.journey-node.is-next .journey-node-status {
  color: var(--accent);
}

.journey-node.is-done .journey-node-status {
  color: var(--ok);
}

.journey-node.is-current .journey-node-status {
  color: var(--ok);
}

.journey-node-title {
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.journey-node-teaser {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.journey-node-detail {
  display: none;
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

.journey-node.is-open .journey-node-detail {
  display: block;
}

.journey-node.is-open .journey-node-card {
  background: rgba(255, 255, 255, 0.58);
}

.journey-node.is-current.is-open .journey-node-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(52, 211, 153, 0.18));
}

.journey-node-when {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(12, 18, 34, 0.06);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.journey-footnote {
  margin: var(--space-4) 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

@media (min-width: 720px) {
  .journey-next {
    padding: 22px 24px;
  }

  .journey-next-title {
    font-size: 1.4rem;
  }
}

/* Fabulous-style milestone note */
.note-celebration {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.note-celebration[hidden] {
  display: none !important;
}

.note-celebration-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 34, 0.35);
  backdrop-filter: blur(10px) saturate(1.2);
}

.note-celebration-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(52, 211, 153, 0.35), transparent 18%),
    radial-gradient(circle at 78% 24%, rgba(96, 165, 250, 0.3), transparent 16%),
    radial-gradient(circle at 55% 70%, rgba(251, 191, 36, 0.28), transparent 20%);
  animation: noteSpark 1.8s var(--ease) both;
}

@keyframes noteSpark {
  0% { opacity: 0; transform: scale(0.92); }
  40% { opacity: 1; }
  100% { opacity: 0.55; transform: scale(1.05); }
}

@keyframes notePop {
  0% { opacity: 0; transform: translateY(28px) rotate(-2deg) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
}

.note-card.letter {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 26px 24px 20px;
  border-radius: 6px 18px 18px 18px;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 29px,
      rgba(96, 165, 250, 0.11) 29px,
      rgba(96, 165, 250, 0.11) 30px
    ),
    linear-gradient(165deg, #fffdf8 0%, #f7f1e4 55%, #efe6d4 100%);
  border: 1px solid rgba(214, 196, 160, 0.75);
  box-shadow:
    0 24px 60px rgba(12, 18, 34, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform-origin: 50% 110%;
  animation: notePop 560ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.note-card.letter::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: rgba(248, 113, 113, 0.28);
  border-radius: 2px;
}

.note-card.letter .letter-head {
  margin-left: 14px;
}

.note-card.letter .letter-body,
.note-card.letter .letter-sign {
  margin-left: 14px;
}

.note-card-title {
  margin: 0 0 10px 14px;
  font-family: var(--font-hand);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #1c1917;
  line-height: 1.15;
}

.note-card-folded {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 28px 28px 0;
  border-color: transparent #e7dcc6 transparent transparent;
  filter: drop-shadow(-1px 1px 0 rgba(0, 0, 0, 0.04));
}

.note-card.letter .letter-body {
  margin-bottom: 14px;
  max-height: min(42vh, 340px);
  overflow: auto;
  font-size: clamp(1.35rem, 3vw, 1.55rem);
}

.note-card-btn {
  width: calc(100% - 14px);
  margin-left: 14px;
  margin-top: 6px;
}

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

/* —— Life List: Todos —— */
.life-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 4px);
  padding: var(--space-8) var(--space-6);
  margin-bottom: var(--space-6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(28px) saturate(2.2) brightness(1.1);
  -webkit-backdrop-filter: blur(28px) saturate(2.2) brightness(1.1);
}

.life-hero[data-list="long"] {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.12) 100%),
    linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(99, 102, 241, 0.8) 48%, rgba(167, 139, 250, 0.85) 100%);
}

.life-hero[data-list="weekly"] {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.12) 100%),
    linear-gradient(135deg, rgba(14, 165, 233, 0.88) 0%, rgba(45, 212, 191, 0.78) 55%, rgba(52, 211, 153, 0.82) 100%);
}

.life-hero[data-list="daily"] {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.05) 45%, rgba(255, 255, 255, 0.12) 100%),
    linear-gradient(135deg, rgba(251, 113, 133, 0.88) 0%, rgba(251, 146, 60, 0.78) 50%, rgba(250, 204, 21, 0.75) 100%);
}

.life-hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -20%;
  height: 90%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.55), transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(125, 211, 252, 0.35), transparent 45%);
  pointer-events: none;
  animation: blobDrift 16s var(--ease) infinite alternate;
}

.life-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-4);
}

.life-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.life-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.life-chip strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.composer {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.composer-row {
  display: flex;
  align-items: stretch;
  gap: var(--space-2);
}

.composer-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 4px 4px 6px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.28)),
    var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.composer-field:focus-within {
  border-color: rgba(48, 181, 102, 0.45);
  box-shadow: var(--shadow-pop);
}

.composer-field input[type="text"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 40px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 10px 12px 10px 6px;
  font: inherit;
  color: var(--ink);
  outline: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.composer-field input[type="text"]::placeholder {
  color: var(--muted);
}

.composer-quick {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--muted);
  cursor: pointer;
  transition: color 160ms var(--ease), background 160ms var(--ease), transform 160ms var(--ease);
}

.composer-quick input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.composer-quick svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.composer-quick:hover {
  color: #b45309;
  background: rgba(251, 191, 36, 0.18);
}

.composer-quick:has(input:checked),
.composer-quick:has(input:checked):hover {
  color: #92400e;
  background: rgba(251, 191, 36, 0.38);
}

.composer-quick:has(input:focus-visible) {
  outline: 2px solid rgba(48, 181, 102, 0.55);
  outline-offset: 2px;
}

.composer-submit {
  flex: 0 0 auto;
  white-space: nowrap;
  align-self: stretch;
}

@media (max-width: 480px) {
  .composer-submit span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .composer-submit {
    width: 48px;
    padding-inline: 0;
    justify-content: center;
  }
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.todo-list:empty::before {
  content: attr(data-empty);
  display: block;
  padding: var(--space-6) var(--space-4);
  text-align: center;
  color: var(--muted);
  font-size: 0.98rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(12, 18, 34, 0.14);
  background: rgba(255, 255, 255, 0.2);
}

.todo-item {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: opacity 220ms var(--ease);
  animation: none;
  touch-action: pan-y;
  content-visibility: auto;
  contain-intrinsic-size: auto 96px;
}

.swipe-rail {
  display: none;
}

.swipe-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 14px 14px 12px;
  border-radius: var(--radius-sm);
  /* Deckkend — sonst scheinen Swipe-Hints durchs Glas */
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.62)),
    #d7e5f8;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  /* Kein backdrop-filter auf Listen-Zeilen — killt Scroll-Performance */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: relative;
  z-index: 1;
}

.todo-item.is-swiping .swipe-content,
.todo-item.is-swipe-out .swipe-content {
  will-change: transform;
}

.todo-item:hover .swipe-content {
  box-shadow: var(--shadow-pop);
}

.todo-item.is-done {
  opacity: 0.72;
}

.todo-item.is-done .todo-text {
  text-decoration: line-through;
  color: var(--muted);
}

.todo-check {
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 10px;
  border: 1.5px solid rgba(12, 18, 34, 0.18);
  background: rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
  color: transparent;
  flex-shrink: 0;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}

.todo-check:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.todo-item.is-done .todo-check {
  background: linear-gradient(180deg, #4ade80, var(--ok));
  border-color: transparent;
  color: #fff;
}

.todo-check svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.todo-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.todo-mainline {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.todo-text {
  margin: 0;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
  word-break: break-word;
}

.todo-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.todo-meta {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.todo-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--ink-soft);
  transition: background 160ms var(--ease), color 160ms var(--ease);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon-btn.is-danger:hover {
  background: var(--warm-soft);
  color: var(--warm);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
}

.todo-edit {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.todo-edit textarea {
  min-height: 72px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.filter-tab {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 180ms var(--ease), color 180ms var(--ease);
}

.filter-tab.is-active {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 12px rgba(15, 23, 42, 0.06);
}

.phase-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 var(--space-6);
}

.phase-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--line);
}

.phase-pill.is-here {
  color: var(--accent-2);
  background: var(--accent-soft);
  border-color: rgba(var(--accent-rgb), 0.22);
}

.phase-pill svg {
  width: 14px;
  height: 14px;
}

.section-done {
  margin-top: var(--space-6);
}

.section-done h2 {
  font-size: 1.05rem;
  color: var(--muted);
}

@media (max-width: 639px) {
  .todo-item {
    grid-template-columns: auto 1fr;
  }

  .todo-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

.close-day-panel {
  margin-top: var(--space-4);
}

.close-day-copy {
  margin: 0 0 var(--space-4);
  max-width: 48ch;
}

.close-day-meta {
  margin: var(--space-4) 0 0;
  font-size: 0.85rem;
}

#btn-close-day:disabled,
[data-action="close-day"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* —— Planning extras: Eisenhower, Outcomes, Capacity, Energy —— */
.filter-row-secondary {
  margin-top: -8px;
}

.tier-legend {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 8px 12px;
  display: grid;
  gap: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.28);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

.tier-legend strong {
  color: var(--ink-soft);
  font-weight: 700;
}

/* Planungsstufen-Gruppen in der Wochenliste */
#list-weekly .tier-section {
  list-style: none;
  margin: 14px 0 4px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  content-visibility: visible;
}

#list-weekly .tier-section:first-child {
  margin-top: 0;
}

#list-weekly .tier-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 4px;
  min-height: 30px;
  border-bottom: 1px solid var(--line);
}

#list-weekly .tier-section-hint {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#list-weekly .tier-section-count {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

#list-weekly .tier-section-minimum .tier-badge {
  background: var(--ok-soft);
  color: #166534;
}

#list-weekly .tier-section-realistic .tier-badge {
  background: var(--accent-soft);
  color: var(--accent-2);
}

#list-weekly .tier-section-optimal .tier-badge {
  background: rgba(167, 139, 250, 0.22);
  color: #5b21b6;
}

@media (max-width: 720px) {
  #list-weekly .tier-section-hint {
    display: none;
  }
}

/* Weekly-Kacheln: neutrale Fläche, ohne Farbton */
#list-weekly .todo-item .swipe-content {
  background: #fff;
  border-color: rgba(12, 18, 34, 0.1);
}

#list-weekly .todo-item:hover .swipe-content {
  background: #fff;
}

/* Outcome-verknüpfte Weekly-Tasks: ruhig, nur linker Akzent */
#list-weekly .todo-item.is-outcome-linked .swipe-content {
  background: #fff;
  box-shadow:
    inset 3px 0 0 var(--accent),
    var(--shadow);
}

#list-weekly .todo-item.is-outcome-linked:hover .swipe-content {
  background: #fff;
  box-shadow:
    inset 3px 0 0 var(--accent),
    var(--shadow-pop);
}

#list-weekly .todo-item.is-outcome-linked .todo-text,
#list-weekly .todo-item.is-outcome-linked button.todo-text {
  font-weight: 700;
}

#list-weekly .todo-item.is-outcome-linked.is-done .swipe-content {
  opacity: 0.72;
  box-shadow:
    inset 3px 0 0 color-mix(in srgb, var(--accent) 45%, transparent),
    var(--shadow);
}

.eisen-row,
.meta-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}

.chip-toggle {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--line);
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease);
}

.chip-toggle.is-on {
  background: var(--accent-soft);
  color: var(--accent-2);
  border-color: rgba(var(--accent-rgb), 0.28);
}

.todo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  align-items: center;
}

.todo-tags {
  margin-top: 4px;
}

/* Tag-Selects: neutral, Farbe nur wo sie Bedeutung trägt */
.tag-select {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  max-width: 11ch;
  min-height: 0;
  margin: 0;
  padding: 3px 18px 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(12, 18, 34, 0.1);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 9px) 55%,
    calc(100% - 5px) 55%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  color: var(--ink-soft);
  background-color: rgba(255, 255, 255, 0.55);
}

.tag-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.tag-select.tag-outcome,
.tag-select.tag-depends {
  max-width: 16ch;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 650;
}

/* Minimum = muss sitzen */
.tag-select.tag-tier.tier-minimum {
  background-color: var(--ok-soft);
  color: #166534;
  border-color: transparent;
}

.tag-select.tag-energy.energy-unset {
  color: var(--muted);
  border-style: dashed;
}

.tag-select.tag-outcome.has-value {
  max-width: 22ch;
  font-weight: 750;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

/* Blockierte Abhängigkeit = Warnung */
.tag-select.tag-depends.is-blocked {
  background-color: rgba(255, 98, 89, 0.14);
  color: #b42318;
  border-color: transparent;
}

#list-weekly .todo-mainline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

#list-weekly .todo-badges.todo-tags {
  margin-top: 0;
}

/* Projekt-/Puffer-Badges: Puffer ruhig, Projekte nutzen --proj-* */
#list-weekly .puffer-badge {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  border: 1px solid rgba(12, 18, 34, 0.1);
  font-weight: 700;
}

#list-weekly .todo-item.tier-minimum {
  border-color: transparent;
}

#list-weekly .todo-item.is-quick .swipe-content {
  border-color: var(--line);
}

#list-weekly .todo-item.is-outcome-linked.is-quick .swipe-content {
  box-shadow:
    inset 3px 0 0 var(--accent),
    var(--shadow);
}

.quad-badge,
.tier-badge,
.size-badge,
.outcome-badge,
.energy-badge,
.when-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quad-do { background: rgba(255, 98, 89, 0.16); color: #b42318; }
.quad-schedule { background: var(--accent-soft); color: var(--accent-2); }
.quad-swift,
.quad-delegate { background: rgba(253, 230, 138, 0.55); color: #92400e; }
.quad-park { background: rgba(12, 18, 34, 0.06); color: var(--muted); }
.quad-unset { background: rgba(255, 255, 255, 0.5); color: var(--muted); border: 1px dashed rgba(12, 18, 34, 0.14); }

.eisen-legend {
  margin: -4px 0 var(--space-4);
  font-size: 0.85rem;
  max-width: 62ch;
}

.eisen-legend strong {
  color: #92400e;
}

.tier-minimum { background: var(--ok-soft); color: #166534; }
.tier-realistic { background: var(--accent-soft); color: var(--accent-2); }
.tier-optimal { background: rgba(167, 139, 250, 0.22); color: #5b21b6; }

.depends-badge {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(12, 18, 34, 0.06);
  color: var(--muted);
  cursor: default;
}

button.depends-badge {
  cursor: pointer;
}

.depends-badge.is-blocked {
  background: rgba(180, 83, 9, 0.14);
  color: #9a3412;
}

.todo-item.is-blocked .swipe-content {
  opacity: 0.72;
}

.todo-item.is-blocked .todo-check:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

.size-badge,
.when-badge {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
}

.outcome-badge {
  background: rgba(94, 234, 212, 0.28);
  color: #0f766e;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  max-width: 18ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.energy-badge.energy-high { background: rgba(251, 191, 36, 0.28); color: #92400e; }
.energy-badge.energy-low { background: rgba(125, 211, 252, 0.35); color: #075985; }
.energy-badge.energy-unset { background: rgba(12, 18, 34, 0.06); color: var(--muted); border: 1px dashed rgba(12, 18, 34, 0.14); }

/* Daily: nach Tageszeit, Energie an der Kachel */
#list-daily .when-section {
  list-style: none;
  margin: 14px 0 4px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

#list-daily .when-section:first-child {
  margin-top: 0;
}

#list-daily .when-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 6px 2px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--line-ink) 35%, transparent);
}

#list-daily .when-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

#list-daily .when-section-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

#list-daily .when-section-hint {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

#list-daily .when-section-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

#list-daily .when-now-pill {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
}

#list-daily .when-section.is-now .when-section-head {
  border-bottom-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

#list-daily .todo-item.is-energy-high .swipe-content,
#list-daily > .todo-item.is-energy-high {
  box-shadow:
    inset 3px 0 0 #f59e0b,
    var(--shadow);
}

#list-daily .todo-item.is-energy-low .swipe-content,
#list-daily > .todo-item.is-energy-low {
  box-shadow:
    inset 3px 0 0 #0ea5e9,
    var(--shadow);
}

#list-daily .todo-item.is-energy-unset .swipe-content,
#list-daily > .todo-item.is-energy-unset {
  box-shadow:
    inset 3px 0 0 rgba(12, 18, 34, 0.18),
    var(--shadow);
}

#list-daily .todo-item.is-quick.is-energy-high .swipe-content {
  box-shadow:
    inset 3px 0 0 #f59e0b,
    inset 0 0 0 1px rgba(245, 158, 11, 0.15),
    var(--shadow);
}

@media (max-width: 720px) {
  #list-daily .when-section-hint {
    display: none;
  }
}

.mini-select {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-ink);
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 160px;
}

.outcome-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.outcome-list:empty::before {
  content: attr(data-empty);
  display: block;
  padding: var(--space-4);
  color: var(--muted);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(12, 18, 34, 0.14);
  background: rgba(255, 255, 255, 0.2);
  text-align: center;
}

.outcome-lede {
  margin: -4px 0 var(--space-3);
  font-size: 0.82rem;
  max-width: 48ch;
}

.outcome-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px 10px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16)),
    var(--glass);
  border: 1px solid var(--line);
  box-shadow: none;
}

.outcome-item .todo-check {
  width: 28px;
  height: 28px;
  margin-top: 1px;
}

.outcome-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.outcome-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
}

.outcome-item.is-done .outcome-text {
  text-decoration: line-through;
  color: var(--muted);
}

.outcome-item.is-done .todo-check,
.outcome-item.is-complete .todo-check {
  background: linear-gradient(180deg, #4ade80, var(--ok));
  border-color: transparent;
  color: #fff;
}

.outcome-text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.outcome-progress-pill {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.outcome-delete {
  width: 30px;
  height: 30px;
  margin-top: 0;
}

.outcome-task-tags {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.outcome-task-tag {
  display: inline-flex;
  align-items: center;
  max-width: min(200px, 70vw);
  border-radius: 999px;
  border: 1px solid var(--line-ink);
  background: var(--surface-2);
  overflow: hidden;
  line-height: 1;
}

.outcome-task-tag.is-tag-green {
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(34, 197, 94, 0.16);
}

.outcome-task-tag.is-tag-green .outcome-task-tag-go {
  color: #166534;
}

.outcome-task-tag.is-tag-yellow {
  border-color: rgba(202, 138, 4, 0.5);
  background: rgba(250, 204, 21, 0.28);
}

.outcome-task-tag.is-tag-yellow .outcome-task-tag-go {
  color: #854d0e;
}

.outcome-task-tag.is-tag-red {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(248, 113, 113, 0.18);
}

.outcome-task-tag.is-tag-red .outcome-task-tag-go {
  color: #991b1b;
}

.outcome-tag-where {
  margin-left: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}

.outcome-min-status {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
}

.outcome-min-status.is-ok {
  background: rgba(34, 197, 94, 0.18);
  color: #166534;
}

.outcome-min-status.is-warn {
  background: rgba(250, 204, 21, 0.32);
  color: #854d0e;
}

.outcome-min-status.is-miss {
  background: rgba(248, 113, 113, 0.2);
  color: #991b1b;
}

.outcome-item.is-min-ready {
  border-color: rgba(202, 138, 4, 0.4);
}

.outcome-item.is-min-gap {
  border-color: rgba(220, 38, 38, 0.28);
}

.outcome-item.is-daily-ready {
  border-color: rgba(22, 163, 74, 0.35);
}

.outcome-task-tag.is-done {
  opacity: 0.5;
}

.outcome-task-tag.is-done .outcome-task-tag-go {
  text-decoration: line-through;
}

.outcome-task-tag-go {
  appearance: none;
  border: 0;
  background: transparent;
  margin: 0;
  padding: 3px 6px 3px 8px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.outcome-task-tag-go:hover,
.outcome-task-tag-go:focus-visible {
  color: var(--accent);
  outline: none;
}

.outcome-task-tag-x {
  appearance: none;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  margin: 0;
  padding: 3px 6px;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.outcome-task-tag-x:hover,
.outcome-task-tag-x:focus-visible {
  color: var(--danger, #b42318);
  outline: none;
}

.outcome-link-btn {
  appearance: none;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1px dashed var(--line-ink);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
}

.outcome-link-btn:hover,
.outcome-link-btn:focus-visible,
.outcome-link-btn.is-open {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.outcome-link-select {
  width: 100%;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-ink);
  background: var(--surface-2);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.weekly-pool-lede {
  margin: -4px 0 var(--space-3);
  font-size: 0.88rem;
  max-width: 48ch;
}

.todo-item.is-flash .swipe-content {
  animation: taskFlash 1.25s ease;
}

@keyframes taskFlash {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  }
  35% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.capacity-copy {
  margin: 0 0 var(--space-4);
  max-width: 52ch;
}

.capacity-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(12, 18, 34, 0.08);
  overflow: hidden;
  margin-bottom: 10px;
}

.capacity-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #60a5fa 55%, #a78bfa);
  transition: width 400ms var(--ease), background 200ms var(--ease);
}

.capacity-bar[data-status="warn"] .capacity-bar-fill,
#capacity-chip[data-status="warn"] {
  /* chip handled below */
}

.cap-badge {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--ok-soft);
  color: #166534;
}

.cap-badge[data-status="warn"] {
  background: rgba(253, 230, 138, 0.65);
  color: #92400e;
}

.cap-badge[data-status="over"] {
  background: var(--warm-soft);
  color: #b42318;
}

.capacity-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.capacity-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: end;
}

.field-inline {
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field-inline input,
.field-inline select {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--line-ink);
  background: var(--surface-2);
  font-weight: 600;
  color: var(--ink);
  min-width: 120px;
}

.composer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.energy-profile-copy {
  margin: -4px 0 var(--space-3);
  font-size: 0.88rem;
  max-width: 52ch;
}

.energy-profile-fields {
  display: grid;
  gap: 8px;
  margin-bottom: var(--space-3);
}

.energy-profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.energy-profile-row.is-now {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: inset 3px 0 0 var(--accent);
}

.energy-profile-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.energy-profile-label strong {
  font-size: 0.9rem;
}

.energy-profile-label small {
  font-size: 0.72rem;
  color: var(--muted);
}

.energy-profile-row select {
  min-width: 88px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-ink);
  background: var(--surface-2);
  font-weight: 600;
  color: var(--ink);
}

.energy-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.energy-suggest-chip {
  appearance: none;
  border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line-ink));
  background: var(--accent-soft);
  color: var(--accent-2);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}

.energy-suggest-chip:hover,
.energy-suggest-chip:focus-visible {
  border-style: solid;
  outline: none;
}

.energy-unset-hint {
  margin-left: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--font-body, inherit);
  letter-spacing: 0;
}

.energy-section {
  margin-top: var(--space-5);
}

.energy-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.energy-heading svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

#capacity-chip[data-status="warn"] strong,
#capacity-chip[data-status="over"] strong {
  color: #fff;
}

.todo-item.tier-optimal {
  opacity: 0.92;
}

.todo-item.tier-minimum {
  border-color: rgba(48, 181, 102, 0.35);
}

/* —— Project / Area filter —— */
.project-bar {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  z-index: 35;
  padding: 10px 0 0;
}

body.on-settings .project-bar,
body.on-settings .puffer-banner {
  display: none;
}

.project-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.12) 100%),
    rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-filter-bar);
  -webkit-backdrop-filter: var(--glass-filter-bar);
  overflow: hidden;
}

.project-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 4px;
}

.project-bar-label svg {
  width: 14px;
  height: 14px;
}

.project-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.project-chips::-webkit-scrollbar {
  display: none;
}

.project-chip {
  flex-shrink: 0;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--proj-mid, var(--ink-soft));
  background: var(--proj-soft, transparent);
  border: 1px solid var(--proj-border, transparent);
  transition: background 160ms var(--ease), color 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.project-chip:hover {
  filter: brightness(0.97);
  color: var(--proj-mid, var(--ink));
}

.project-chip[data-project="all"] {
  color: var(--ink-soft);
  background: transparent;
  border-color: transparent;
}

.project-chip[data-project="all"]:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  filter: none;
}

.project-chip.is-active {
  background: var(--proj-mid, rgba(255, 255, 255, 0.88));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 4px 12px rgba(15, 23, 42, 0.08);
}

.project-chip[data-project="all"].is-active {
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-2);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 12px rgba(15, 23, 42, 0.06);
  filter: none;
}

.project-chip-sm {
  min-height: 28px;
  padding: 2px 10px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--line);
}

.project-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.composer-hint {
  margin: 0;
  font-size: 0.85rem;
}

.composer-hint strong {
  color: var(--accent-2);
  font-weight: 700;
}

.hash-tag {
  color: var(--accent-2);
  font-weight: 700;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--proj-soft, rgba(96, 165, 250, 0.22));
  color: var(--proj-mid, var(--accent-2));
  border: 1px solid var(--proj-border, transparent);
  cursor: pointer;
}

.project-badge:hover {
  filter: brightness(0.96);
}

.project-chip {
  font-weight: 700;
}

/* Seite in Projektfarbe tauchen, wenn gefiltert */
body.project-filtered .app-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, var(--proj-glow, transparent), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 80%, var(--proj-tint, transparent), transparent 50%),
    var(--proj-tint, transparent);
  pointer-events: none;
}

body.project-filtered .project-bar-inner {
  border-color: var(--proj-border, rgba(255, 255, 255, 0.7));
  box-shadow:
    0 0 0 1px var(--proj-border, transparent),
    var(--shadow);
}

body.project-filtered .topbar {
  box-shadow: 0 8px 28px var(--proj-tint, transparent);
}

.hash-suggest-item[style*="--proj-soft"] .hash-suggest-tag {
  color: var(--proj-mid);
  font-weight: 700;
}

@media (max-width: 639px) {
  .project-bar-label span,
  .project-bar-label {
    font-size: 0;
  }

  .project-bar-label svg {
    width: 16px;
    height: 16px;
  }

  .project-bar-label {
    font-size: 0;
    padding-left: 2px;
  }
}

/* —— Puffer-Banger (quick wins <5 min) —— */
.puffer-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  background: rgba(251, 191, 36, 0.18);
  color: #92400e;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.puffer-chip svg {
  width: 14px;
  height: 14px;
}

.puffer-chip.is-active {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
  color: #1c1917;
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset, 0 6px 16px rgba(245, 158, 11, 0.28);
}

.puffer-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4em;
  height: 1.4em;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(28, 25, 23, 0.12);
}

.puffer-chip.is-active .puffer-count {
  background: rgba(28, 25, 23, 0.18);
}

.puffer-banner {
  margin-top: 12px;
}

.puffer-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.35), rgba(253, 186, 116, 0.22)),
    rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.puffer-banner-inner svg {
  width: 20px;
  height: 20px;
  color: #b45309;
  flex-shrink: 0;
}

.puffer-banner-inner p {
  margin: 0;
  flex: 1;
  min-width: 16ch;
  font-size: 0.92rem;
}

.puffer-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.35);
  color: #92400e;
}

.todo-item.is-quick .swipe-content {
  border-color: rgba(251, 191, 36, 0.45);
}

.icon-btn.is-puffer {
  color: #b45309;
  background: rgba(251, 191, 36, 0.28);
}

.icon-btn.is-puffer:hover {
  color: #92400e;
  background: rgba(251, 191, 36, 0.42);
}

.quick-check {
  display: none;
}

.composer-quick.is-on {
  color: #92400e;
  background: rgba(251, 191, 36, 0.38);
}

body.puffer-mode .life-hero::after {
  content: "Puffer-Modus";
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(251, 191, 36, 0.9);
  color: #1c1917;
}

/* —— Inline title edit (in place, same row) —— */
button.todo-text {
  display: block;
  width: 100%;
  margin: 0 0 0 -4px;
  padding: 2px 4px;
  text-align: left;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
  word-break: break-word;
  color: inherit;
  cursor: text;
  border-radius: 6px;
  transition: background 160ms var(--ease);
}

button.todo-text:hover {
  background: rgba(255, 255, 255, 0.35);
}

button.todo-text:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.todo-item.is-done button.todo-text {
  text-decoration: line-through;
  color: var(--muted);
}

.todo-item.is-editing {
  box-shadow: var(--shadow-pop);
}

.todo-item.is-editing .todo-body {
  min-width: 0;
}

.todo-edit-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0 !important;
  margin: 0 0 0 -4px;
  padding: 2px 4px !important;
  border: 0 !important;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55) !important;
  box-shadow: inset 0 -2px 0 rgba(var(--accent-rgb), 0.55) !important;
  font: inherit;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--ink);
  outline: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.todo-edit-input:focus {
  background: rgba(255, 255, 255, 0.78) !important;
  box-shadow:
    inset 0 -2px 0 rgba(var(--accent-rgb), 0.75),
    0 0 0 3px rgba(var(--accent-rgb), 0.12) !important;
}

.todo-item.is-done .todo-edit-input {
  color: var(--muted);
}

.icon-btn.is-save {
  color: var(--accent-2);
  background: var(--accent-soft);
}

.todo-edit-hint {
  display: none;
}

/* —— PIN Lock —— */
body.is-locked {
  overflow: hidden;
}

.pin-lock {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pin-lock[hidden] {
  display: none !important;
}

.pin-card {
  width: min(380px, 100%);
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.pin-mark {
  display: inline-block;
  margin-bottom: var(--space-4);
}

.pin-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2rem);
  letter-spacing: -0.03em;
}

.pin-sub {
  margin: 0 0 var(--space-6);
}

.pin-input {
  width: 100%;
  min-height: 56px;
  margin-bottom: var(--space-4);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-ink);
  background: var(--surface-2);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.pin-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pin-error {
  margin: 0 0 var(--space-4);
  color: var(--warm);
  font-weight: 600;
  font-size: 0.92rem;
}

.pin-submit {
  width: 100%;
}

#app-shell[hidden] {
  display: none !important;
}

.bottom-nav {
  display: none;
}

/* —— Hashtag Projekt-Vorschläge —— */
.hash-suggest {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 2px;
  padding: 6px;
  max-height: min(240px, 40vh);
  overflow: auto;
  border-radius: 16px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.55)),
    #d7e5f8;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  backdrop-filter: var(--glass-filter-bar);
  -webkit-backdrop-filter: var(--glass-filter-bar);
}

.hash-suggest[hidden] {
  display: none !important;
}

.hash-suggest-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.hash-suggest-item:hover,
.hash-suggest-item.is-active {
  background: rgba(255, 255, 255, 0.72);
}

.hash-suggest-tag {
  font-weight: 750;
  color: var(--accent-2);
  font-size: 0.92rem;
}

.hash-suggest-name {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

/* —— Longlist Capture Mode —— */
.capture-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.capture-dock {
  position: relative;
  z-index: 5;
  padding: 14px 14px 12px;
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.28)),
    var(--glass);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  backdrop-filter: var(--glass-filter);
  -webkit-backdrop-filter: var(--glass-filter);
}

.capture-dock-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.capture-kicker {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.capture-stat {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.capture-stat strong {
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.capture-composer {
  margin-bottom: 0;
  gap: 10px;
}

.capture-composer .composer-field {
  min-height: 56px;
  padding: 6px 6px 6px 8px;
}

.capture-composer .composer-field input[type="text"] {
  min-height: 44px;
  font-size: 1.08rem;
  font-weight: 600;
}

.capture-composer .composer-quick {
  width: 44px;
  height: 44px;
}

.capture-composer .composer-submit {
  min-height: 56px;
  padding-inline: 18px;
  font-size: 1rem;
}

.capture-inbox {
  margin: 0;
}

.capture-inbox > .todo-list {
  margin-top: var(--space-3);
}

.capture-tools {
  margin: 0 0 var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.28);
}

.capture-tools > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--ink-soft);
  user-select: none;
}

.capture-tools > summary::-webkit-details-marker {
  display: none;
}

.capture-tools > summary svg {
  width: 16px;
  height: 16px;
  opacity: 0.75;
}

.capture-tools[open] > summary {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.capture-tools-body {
  padding: 12px 14px 14px;
  display: grid;
  gap: var(--space-3);
}

.capture-tools .eisen-legend {
  margin: 0;
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .shell {
    --topbar-h: 0px;
  }

  /* Topbar inkl. „Life List“ weg — Bottom-Tabs reichen */
  .topbar {
    display: none !important;
  }

  .project-bar {
    position: relative;
    top: auto;
    z-index: 5;
    padding-top: 8px;
  }

  body.on-settings .project-bar,
  body.on-settings .puffer-banner {
    display: none;
  }

  body.on-longlist .project-bar-label {
    display: none;
  }

  .main {
    padding-top: var(--space-3);
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .capture-view {
    gap: var(--space-3);
  }

  /* Erfassen oben, klebt beim Scrollen */
  #view-long .capture-dock {
    position: sticky;
    top: 8px;
    z-index: 30;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 18px;
    box-shadow: var(--shadow-pop);
  }

  #view-long .capture-dock-top {
    margin-bottom: 8px;
  }

  #view-long .capture-kicker {
    font-size: 1.1rem;
  }

  #view-long .capture-stat {
    font-size: 0.72rem;
  }

  #view-long .capture-composer .composer-submit {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding-inline: 0;
    justify-content: center;
  }

  #view-long .capture-composer .composer-submit span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  #view-long .capture-composer .composer-field {
    min-height: 48px;
  }

  /* —— Liquid Glass Bottom Tab Bar —— */
  .bottom-nav {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 0 var(--page-inline) calc(10px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
  }

  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .bottom-nav-inner {
    pointer-events: auto;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 6px;
    border-radius: 28px;
    background:
      linear-gradient(165deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.1) 42%, rgba(200, 220, 255, 0.16) 100%),
      rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow:
      0 16px 40px rgba(12, 18, 34, 0.16),
      var(--shadow-pop);
    backdrop-filter: var(--glass-filter-bar);
    -webkit-backdrop-filter: var(--glass-filter-bar);
  }

  .bottom-nav-inner::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.65) 0%,
      rgba(255, 255, 255, 0.1) 30%,
      transparent 50%,
      rgba(255, 255, 255, 0.2) 100%
    );
  }

  .bottom-nav-inner::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    top: 0;
    height: 1px;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  }

  .bottom-nav-btn {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 52px;
    padding: 6px 4px;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    transition: background 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
  }

  .bottom-nav-btn svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
  }

  .bottom-nav-btn.is-active {
    color: var(--accent-2);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  }

  .bottom-nav-btn:active {
    transform: scale(0.96);
  }
}

@media (min-width: 721px) {
  .bottom-nav {
    display: none !important;
  }
}

/* —— Longlist: kompakte Zeilen —— */
#list-long {
  gap: 4px;
}

#list-long .todo-item,
#list-long .todo-compact {
  gap: 0;
  align-items: stretch;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: none;
}

#list-long .swipe-content {
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.68)),
    #d7e5f8;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

#list-long .todo-item:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
}

#list-long .todo-item:hover .swipe-content {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78)),
    #dce9f9;
  box-shadow: var(--shadow-pop);
}

#list-long .todo-check {
  width: 22px;
  height: 22px;
  margin-top: 0;
  border-radius: 7px;
}

#list-long .todo-check svg {
  width: 13px;
  height: 13px;
}

#list-long .todo-mainline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

#list-long .todo-text,
#list-long button.todo-text {
  flex: 1 1 140px;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 1px 2px;
  margin-left: 0;
}

#list-long .todo-edit-input {
  flex: 1 1 140px;
  min-height: 0 !important;
  margin: 0;
  padding: 2px 4px !important;
  font-size: 0.92rem;
}

#list-long .todo-badges {
  margin: 0;
  gap: 4px;
}

#list-long .todo-badges:empty {
  display: none;
}

#list-long .puffer-badge,
#list-long .project-badge,
#list-long .quad-badge {
  padding: 1px 7px;
  font-size: 0.62rem;
}

#list-long .eisen-row {
  margin: 0;
  gap: 4px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
}

#list-long .depends-select {
  max-width: 140px;
  font-size: 0.68rem;
  min-height: 22px;
  padding: 0 4px;
}

#list-long .depends-badge {
  padding: 1px 7px;
  font-size: 0.62rem;
}

#list-long .chip-toggle {
  min-height: 22px;
  min-width: 22px;
  padding: 0 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-radius: 8px;
}

#list-long .todo-actions {
  gap: 1px;
}

#list-long .icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

#list-long .icon-btn svg {
  width: 14px;
  height: 14px;
}

#list-long .todo-item.is-quick .swipe-content {
  box-shadow:
    inset 3px 0 0 #f59e0b,
    var(--shadow);
}

/* Eisenhower-Gruppen auf der Longlist */
#list-long .quad-section {
  list-style: none;
  margin: 10px 0 2px;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

#list-long .quad-section:first-child {
  margin-top: 0;
}

#list-long .quad-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  min-height: 28px;
}

#list-long .quad-section-hint {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#list-long .quad-section-count {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

#list-long .quad-section-do .quad-badge {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

#list-long .quad-section-schedule .quad-badge {
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

#list-long .quad-section-swift .quad-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

#list-long .quad-section-park .quad-badge {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

#list-long .quad-section-unset .quad-badge {
  background: rgba(148, 163, 184, 0.2);
  color: #64748b;
}

@media (max-width: 720px) {
  #list-long .quad-section-hint {
    display: none;
  }

  #list-long .quad-section-head {
    padding: 2px 2px;
  }

  #list-long .todo-item {
    padding: 0;
  }

  #list-long .swipe-content {
    padding: 5px 6px;
    gap: 6px;
  }

  /* Swipe: → nächste Liste · ← vorherige Liste */
  .swipe-rail {
    display: flex;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 96px;
    z-index: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-align: center;
    line-height: 1.15;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 140ms ease, visibility 140ms ease;
  }

  .swipe-rail svg {
    width: 18px;
    height: 18px;
  }

  .swipe-rail-next {
    left: 0;
    color: #166534;
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.85), rgba(74, 222, 128, 0.35));
  }

  .swipe-rail-prev {
    right: 0;
    color: #1e3a8a;
    background: linear-gradient(270deg, rgba(96, 165, 250, 0.85), rgba(96, 165, 250, 0.35));
  }

  .swipe-rail.is-disabled {
    display: none;
  }

  .todo-item.is-swipe-next .swipe-rail-next,
  .todo-item.is-swipe-prev .swipe-rail-prev,
  .todo-item.is-swipe-out.is-swipe-next .swipe-rail-next,
  .todo-item.is-swipe-out.is-swipe-prev .swipe-rail-prev {
    opacity: 1;
    visibility: visible;
  }

  .todo-item.is-swipe-out {
    pointer-events: none;
  }

  /* Move-Buttons mobil aus — Swipe übernimmt */
  .todo-actions .icon-btn[data-action="move"] {
    display: none;
  }

  /* Mobile: gleiche Kachel-Optik wie Desktop (nicht flaches Transparent) */
  .todo-item .swipe-content {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.66)),
      #d7e5f8;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .panel {
    background:
      linear-gradient(165deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.22) 100%),
      rgba(255, 255, 255, 0.16);
  }

  .capture-dock {
    background:
      linear-gradient(165deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
      #dce8f8;
  }
}

@media (min-width: 721px) {
  .swipe-rail {
    display: none !important;
  }

  .swipe-content {
    transform: none !important;
  }

  .capture-dock {
    padding: 18px 18px 16px;
  }

  .capture-kicker {
    font-size: 1.55rem;
  }

  .capture-composer .composer-field {
    min-height: 60px;
  }
}

