/* ==========================================================================
   Fokus – Liquid-Glass-Designsystem
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --radius-xl: 30px;
  --radius-l: 24px;
  --radius-m: 18px;
  --radius-s: 12px;

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

  --accent: #0a84ff;
  --accent-2: #5e5ce6;
  --green: #30d158;
  --orange: #ff9f0a;
  --red: #ff453a;
  --pink: #ff375f;
  --teal: #40c8e0;
  --yellow: #ffd60a;
  --purple: #bf5af2;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* Dunkel (Standard) */
:root,
:root[data-theme="dark"] {
  --bg: #07070d;
  --text: rgba(255, 255, 255, .96);
  --text-2: rgba(235, 235, 245, .66);
  --text-3: rgba(235, 235, 245, .40);
  --sep: rgba(255, 255, 255, .10);
  --glass: rgba(255, 255, 255, .075);
  --glass-strong: rgba(30, 30, 44, .55);
  --glass-hi: rgba(255, 255, 255, .14);
  --glass-border: rgba(255, 255, 255, .16);
  --glass-edge: rgba(255, 255, 255, .42);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  --fill: rgba(120, 120, 128, .24);
  --fill-2: rgba(120, 120, 128, .16);
  --blob-a: #5e5ce6;
  --blob-b: #ff375f;
  --blob-c: #0a84ff;
  --blob-d: #30d158;
  --blob-opacity: .55;
  --chip-text: #fff;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eef0f7;
    --text: rgba(0, 0, 0, .9);
    --text-2: rgba(60, 60, 67, .7);
    --text-3: rgba(60, 60, 67, .45);
    --sep: rgba(0, 0, 0, .08);
    --glass: rgba(255, 255, 255, .5);
    --glass-strong: rgba(255, 255, 255, .72);
    --glass-hi: rgba(255, 255, 255, .8);
    --glass-border: rgba(255, 255, 255, .7);
    --glass-edge: rgba(255, 255, 255, 1);
    --glass-shadow: 0 10px 30px rgba(31, 38, 135, .10);
    --fill: rgba(120, 120, 128, .14);
    --fill-2: rgba(120, 120, 128, .08);
    --blob-a: #a5b4fc;
    --blob-b: #fda4af;
    --blob-c: #7dd3fc;
    --blob-d: #86efac;
    --blob-opacity: .75;
  }
}

:root[data-theme="light"] {
  --bg: #eef0f7;
  --text: rgba(0, 0, 0, .9);
  --text-2: rgba(60, 60, 67, .7);
  --text-3: rgba(60, 60, 67, .45);
  --sep: rgba(0, 0, 0, .08);
  --glass: rgba(255, 255, 255, .5);
  --glass-strong: rgba(255, 255, 255, .72);
  --glass-hi: rgba(255, 255, 255, .8);
  --glass-border: rgba(255, 255, 255, .7);
  --glass-edge: rgba(255, 255, 255, 1);
  --glass-shadow: 0 10px 30px rgba(31, 38, 135, .10);
  --fill: rgba(120, 120, 128, .14);
  --fill-2: rgba(120, 120, 128, .08);
  --blob-a: #a5b4fc;
  --blob-b: #fda4af;
  --blob-c: #7dd3fc;
  --blob-d: #86efac;
  --blob-opacity: .75;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; font-size: 16px; color: inherit; }
svg { display: block; }
.ic { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 17px; height: 17px; }
.ic.lg { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   Bühne & Gerät (am PC als iPhone-Rahmen)
   -------------------------------------------------------------------------- */
.stage { height: 100dvh; width: 100%; display: grid; place-items: center; }
.device {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}

@media (min-width: 620px) and (min-height: 700px) {
  body {
    background:
      radial-gradient(1200px 600px at 20% 10%, rgba(94, 92, 230, .18), transparent 60%),
      radial-gradient(900px 500px at 90% 90%, rgba(255, 55, 95, .12), transparent 60%),
      #05050a;
  }
  .device {
    width: 402px;
    height: min(874px, calc(100dvh - 48px));
    border-radius: 58px;
    box-shadow:
      0 0 0 11px #1b1b20,
      0 0 0 12.5px #3a3a42,
      0 40px 120px rgba(0, 0, 0, .6);
    --safe-top: 54px;
    --safe-bottom: 22px;
  }
  .device::before {
    /* Dynamic Island */
    content: "";
    position: absolute;
    top: 11px; left: 50%;
    width: 124px; height: 36px;
    transform: translateX(-50%);
    background: #000;
    border-radius: 20px;
    z-index: 100;
    pointer-events: none;
  }
}

/* --------------------------------------------------------------------------
   Hintergrund mit Farbflächen – erst dadurch wirkt Glas wie Glas
   -------------------------------------------------------------------------- */
.backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: var(--blob-opacity);
  will-change: transform;
}
.b1 { width: 340px; height: 340px; background: var(--blob-a); top: -90px; left: -110px; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 300px; height: 300px; background: var(--blob-b); top: 32%; right: -140px; animation: drift2 30s ease-in-out infinite alternate; }
.b3 { width: 280px; height: 280px; background: var(--blob-c); bottom: -80px; left: -60px; animation: drift3 34s ease-in-out infinite alternate; }
.b4 { width: 200px; height: 200px; background: var(--blob-d); top: 58%; left: 30%; opacity: calc(var(--blob-opacity) * .5); animation: drift1 38s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(90px, 120px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-110px, -70px) scale(.9); } }
@keyframes drift3 { to { transform: translate(120px, -90px) scale(1.1); } }

/* --------------------------------------------------------------------------
   Glas
   -------------------------------------------------------------------------- */
.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-l);
  box-shadow: var(--glass-shadow), inset 0 1px 0 0 var(--glass-edge), inset 0 -1px 0 0 rgba(255, 255, 255, .04);
}
.glass::before {
  /* Lichtkante wie bei Liquid Glass */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 68%, rgba(255, 255, 255, .22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-strong { background: var(--glass-strong); }

/* Statusleisten-Verlauf: Inhalt verschwindet weich unter der Uhr/Dynamic Island */
.statusfade {
  position: absolute; top: 0; left: 0; right: 0;
  height: calc(var(--safe-top) + 14px);
  z-index: 30;
  pointer-events: none;
  background: linear-gradient(var(--bg) 35%, transparent);
  opacity: .92;
}

/* --------------------------------------------------------------------------
   Screen-Layout
   -------------------------------------------------------------------------- */
.screen {
  position: absolute; inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: calc(var(--safe-top) + 8px) 16px calc(var(--safe-bottom) + 110px);
  scrollbar-width: none;
  outline: none;
  -webkit-overflow-scrolling: touch;
}
.screen::-webkit-scrollbar { display: none; }
.view { animation: viewIn .45s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px) scale(.99); } }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 6px 2px 18px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); text-transform: uppercase; }
.title { font-size: 34px; font-weight: 750; letter-spacing: -.025em; line-height: 1.08; margin: 4px 0 0; }
.subtitle { color: var(--text-2); font-size: 15px; margin-top: 4px; }
.top-actions { display: flex; gap: 8px; padding-top: 4px; }

.icon-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: transform .25s var(--spring);
}
.icon-btn:active { transform: scale(.88); }

.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 4px 10px; }
.section-h h2 { font-size: 21px; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.section-h .link { color: var(--accent); font-size: 15px; font-weight: 500; }

.card { padding: 18px; margin-bottom: 12px; }
.card-tight { padding: 14px 16px; }
.card h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.card .label { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; display: flex; align-items: center; gap: 6px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stack > * + * { margin-top: 10px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hide { display: none !important; }

/* --------------------------------------------------------------------------
   Buttons & Eingaben
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 22px;
  border-radius: 25px;
  font-weight: 650; font-size: 17px;
  transition: transform .25s var(--spring), filter .2s, opacity .2s;
  user-select: none;
}
.btn:active { transform: scale(.96); }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 15px; border-radius: 18px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn-tint { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.btn-glass {
  background: var(--glass-hi);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 4px 14px rgba(0, 0, 0, .12);
  border: 1px solid var(--glass-border);
}
.btn-plain { color: var(--accent); height: auto; padding: 6px 4px; font-weight: 500; }
.btn-danger { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.btn[disabled] { opacity: .4; pointer-events: none; }

.field {
  width: 100%;
  border: 1px solid var(--sep);
  background: var(--fill-2);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.field:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: var(--fill); }
textarea.field { resize: none; min-height: 84px; line-height: 1.4; }
.field::placeholder { color: var(--text-3); }
.field-label { font-size: 13px; color: var(--text-2); margin: 14px 4px 6px; display: block; font-weight: 500; }
.inline-input { background: none; border: 0; outline: none; width: 100%; padding: 0; font-size: 17px; }
.inline-input::placeholder { color: var(--text-3); }

.seg {
  display: flex; padding: 3px; gap: 2px;
  border-radius: 14px;
  background: var(--fill-2);
  border: 1px solid var(--sep);
}
.seg button {
  flex: 1; height: 34px; border-radius: 11px;
  font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: background .25s var(--ease), color .2s;
}
.seg button.on { background: var(--glass-hi); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .15), inset 0 1px 0 var(--glass-edge); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 13px;
  border-radius: 16px;
  background: var(--fill-2);
  border: 1px solid var(--sep);
  font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: all .2s var(--ease);
}
.chip.on { color: var(--chip-text, #fff); background: var(--c, var(--accent)); border-color: transparent; box-shadow: 0 4px 14px color-mix(in srgb, var(--c, var(--accent)) 35%, transparent); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--accent)); }
.chip.on .dot { background: #fff; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 9px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }

.check {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--text-3);
  display: grid; place-items: center;
  flex: none;
  transition: all .3s var(--spring);
}
.check svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 3; fill: none; opacity: 0; transform: scale(.4); transition: all .3s var(--spring); }
.check.on { background: var(--c, var(--green)); border-color: transparent; box-shadow: 0 4px 12px color-mix(in srgb, var(--c, var(--green)) 45%, transparent); }
.check.on svg { opacity: 1; transform: scale(1); }

.switch { width: 51px; height: 31px; border-radius: 16px; background: var(--fill); position: relative; transition: background .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .25); transition: transform .3s var(--spring); }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(20px); }

/* Listen im iOS-Stil */
.list { padding: 0; overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; min-height: 52px; position: relative; width: 100%; text-align: left; }
.list-item + .list-item::before { content: ""; position: absolute; top: 0; left: 56px; right: 0; height: 1px; background: var(--sep); }
.list-item.no-icon + .list-item.no-icon::before { left: 16px; }
.list-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--c, var(--accent)); color: #fff; flex: none; }
.list-ico .ic { width: 18px; height: 18px; }
.chev { color: var(--text-3); }

/* --------------------------------------------------------------------------
   Dock (Tab-Leiste im iOS-26-Stil)
   -------------------------------------------------------------------------- */
.dock {
  position: absolute;
  left: 14px; right: 14px;
  bottom: calc(var(--safe-bottom) + 8px);
  display: flex; gap: 10px; align-items: center;
  z-index: 40;
}
.tabbar {
  flex: 1;
  display: flex;
  height: 64px;
  padding: 5px;
  border-radius: 32px;
  position: relative;
}
.dock .glass {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 27px;
  color: var(--text-2);
  font-size: 10.5px; font-weight: 600;
  position: relative; z-index: 1;
  transition: color .25s;
}
.tab .ic { width: 23px; height: 23px; }
.tab.on { color: var(--accent); }
.tab-pill {
  position: absolute;
  top: 5px; bottom: 5px;
  border-radius: 27px;
  background: var(--glass-hi);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 2px 10px rgba(0, 0, 0, .18);
  transition: left .45s var(--spring), width .45s var(--spring);
  z-index: 0;
}
.fab {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--accent);
  flex: none;
  transition: transform .3s var(--spring);
}
.fab:active { transform: scale(.9); }
.fab .ic { width: 26px; height: 26px; stroke-width: 2.3; }
.fab.running { color: var(--orange); }

/* Mini-Timer über dem Dock, wenn ein Block läuft */
.mini-timer {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--safe-bottom) + 82px);
  z-index: 39;
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px 0 12px;
  border-radius: 20px;
  font-weight: 650; font-variant-numeric: tabular-nums;
  font-size: 15px;
  animation: popIn .4s var(--spring) both;
}
.mini-timer .pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 var(--orange); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes popIn { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.9); } }

/* --------------------------------------------------------------------------
   Sheets (Modale von unten)
   -------------------------------------------------------------------------- */
.sheet-layer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.sheet-layer.open { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .38); opacity: 0; transition: opacity .35s var(--ease); }
.sheet-layer.open .scrim { opacity: 1; }
.sheet {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  max-height: calc(100% - var(--safe-top) - 16px);
  border-radius: 34px;
  display: flex; flex-direction: column;
  transform: translateY(105%);
  transition: transform .5s var(--spring);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  backdrop-filter: blur(40px) saturate(190%);
}
.sheet-layer.open .sheet { transform: translateY(0); }
.sheet-grab { width: 38px; height: 5px; border-radius: 3px; background: var(--text-3); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 6px 20px; flex: none; }
.sheet-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.sheet-body { overflow-y: auto; padding: 6px 18px calc(var(--safe-bottom) + 18px); scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet .glass { background: var(--fill-2); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.sheet .glass::before { display: none; }

/* Toast */
.toast {
  position: absolute;
  left: 50%; top: 0;
  transform: translate(-50%, calc(-100% - 20px));
  opacity: 0;
  z-index: 90;
  padding: 11px 18px;
  border-radius: 22px;
  font-weight: 600; font-size: 15px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: transform .5s var(--spring), opacity .3s;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, calc(var(--safe-top) + 6px)); opacity: 1; }

/* --------------------------------------------------------------------------
   Heute
   -------------------------------------------------------------------------- */
.hero { padding: 20px; overflow: hidden; }
.hero-glow { position: absolute; inset: -40% -20% auto auto; width: 70%; height: 140%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c, var(--accent)) 45%, transparent), transparent); pointer-events: none; opacity: .6; }
.main-task { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.main-task .text { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.main-task .text.done { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--text-2); }
.main-task .check { width: 34px; height: 34px; margin-top: 1px; }
.main-task .check svg { width: 19px; height: 19px; }
.empty-main { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.if-then { margin-top: 16px; padding: 12px 14px; border-radius: 16px; background: var(--fill-2); font-size: 15px; line-height: 1.45; }
.if-then b { font-weight: 650; color: var(--text); }
.if-then .k { color: var(--accent); font-weight: 700; }

.start-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 16px; }
.start-row .btn-glass { width: 50px; padding: 0; font-size: 15px; }

.strich-card { display: flex; align-items: center; gap: 16px; }
.strich-btn {
  width: 66px; height: 66px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--fill-2);
  border: 2px dashed var(--text-3);
  transition: all .4s var(--spring);
  flex: none;
}
.strich-btn svg { width: 34px; height: 34px; stroke: var(--text-3); stroke-width: 3.2; fill: none; stroke-linecap: round; }
.strich-btn.on { background: linear-gradient(160deg, #4ade80, #16a34a); border: 0; box-shadow: 0 10px 26px rgba(48, 209, 88, .4), inset 0 1px 0 rgba(255, 255, 255, .5); transform: rotate(-4deg); }
.strich-btn.on svg { stroke: #fff; }
.strich-btn.pop { animation: strichPop .6s var(--spring); }
@keyframes strichPop { 30% { transform: scale(1.2) rotate(-10deg); } }

.week-dots { display: flex; gap: 6px; margin-top: 8px; }
.wd { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--text-3); font-weight: 600; }
.wd i { width: 100%; max-width: 30px; height: 30px; border-radius: 10px; background: var(--fill-2); display: grid; place-items: center; }
.wd i svg { width: 15px; height: 15px; stroke: #fff; stroke-width: 3.4; fill: none; stroke-linecap: round; }
.wd.on i { background: var(--green); box-shadow: 0 3px 10px rgba(48, 209, 88, .35); }
.wd.today { color: var(--text); }
.wd.today i { outline: 2px solid var(--text-2); outline-offset: 2px; }

.habit-strip { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.habit-strip::-webkit-scrollbar { display: none; }
.habit-pill {
  flex: none; width: 96px; padding: 14px 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border-radius: 22px; text-align: center;
  scroll-snap-align: start;
  transition: transform .3s var(--spring);
}
.habit-pill:active { transform: scale(.94); }
.habit-pill .hp-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); transition: all .35s var(--spring); }
.habit-pill.on .hp-ico { background: var(--c); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 50%, transparent); }
.habit-pill .hp-name { font-size: 13px; font-weight: 600; line-height: 1.2; height: 2.4em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.phase { display: flex; align-items: center; gap: 14px; }
.phase-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, var(--teal), var(--accent)); flex: none; }
.phase-bar { height: 5px; border-radius: 3px; background: var(--fill); margin-top: 8px; overflow: hidden; }
.phase-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--accent)); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 16px; }
.banner .b-ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--c, var(--orange)); color: #fff; flex: none; }

.countdown { display: flex; align-items: center; gap: 14px; }
.cd-num { width: 56px; height: 56px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); flex: none; }
.cd-num b { font-size: 22px; line-height: 1; font-weight: 750; font-family: var(--font-round); }
.cd-num span { font-size: 10px; font-weight: 700; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Fokus
   -------------------------------------------------------------------------- */
.timer-wrap { display: grid; place-items: center; padding: 24px 0 8px; }
.ring { position: relative; width: 260px; height: 260px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--fill); }
.ring .prog { stroke: url(#ringGrad); transition: stroke-dashoffset .3s linear; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 60%, transparent)); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-time { font-family: var(--font-round); font-size: 62px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.ring-sub { color: var(--text-2); font-size: 14px; margin-top: 8px; max-width: 180px; }
.ring-glass { position: absolute; inset: 22px; border-radius: 50%; }

.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preset {
  padding: 14px 8px; border-radius: 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .25s var(--spring), background .2s;
}
.preset b { font-family: var(--font-round); font-size: 26px; font-weight: 650; }
.preset span { font-size: 12px; color: var(--text-2); font-weight: 600; }
.preset.on { background: color-mix(in srgb, var(--accent) 22%, var(--glass)); outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); }
.preset:active { transform: scale(.95); }

.zettel { display: flex; gap: 8px; }
.zettel-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.zettel-item { display: flex; gap: 10px; align-items: center; font-size: 15px; padding: 10px 12px; border-radius: 12px; background: var(--fill-2); }
.zettel-item .ic { color: var(--yellow); }

.session { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.session + .session { border-top: 1px solid var(--sep); }
.s-bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--c); }

/* --------------------------------------------------------------------------
   Habits & Sport
   -------------------------------------------------------------------------- */
.habit-row { padding: 14px 16px; }
.habit-head { display: flex; align-items: center; gap: 12px; }
.habit-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 35%, transparent); flex: none; }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; margin-top: 12px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--fill-2); }
.heat i.on { background: var(--c); }
.heat i.future { background: transparent; }
.heat i.today { outline: 1.5px solid var(--text-2); outline-offset: 0; }
.mini-week { display: flex; gap: 5px; }
.mini-week button { width: 30px; height: 30px; border-radius: 50%; background: var(--fill-2); font-size: 11px; font-weight: 700; color: var(--text-3); display: grid; place-items: center; transition: all .25s var(--spring); }
.mini-week button.on { background: var(--c); color: #fff; }
.mini-week button.today { box-shadow: 0 0 0 2px var(--text-2); }

.stat { padding: 16px; }
.stat .v { font-family: var(--font-round); font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin-top: 6px; }
.stat .v small { font-size: 15px; font-weight: 600; color: var(--text-2); margin-left: 2px; }
.stat .k { font-size: 13px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .k .ic { width: 16px; height: 16px; color: var(--c, var(--accent)); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 14px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar i { width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--c, var(--accent)), color-mix(in srgb, var(--c, var(--accent)) 55%, transparent)); min-height: 3px; transition: height .6s var(--ease); }
.bar i.zero { background: var(--fill); }
.bar span { font-size: 10.5px; color: var(--text-3); font-weight: 600; }
.bar.today span { color: var(--text); }

.ring-sm { width: 64px; height: 64px; position: relative; flex: none; }
.ring-sm svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-sm .t { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 15px; font-family: var(--font-round); }

.workout { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.workout + .workout { border-top: 1px solid var(--sep); }
.dots5 { display: flex; gap: 3px; }
.dots5 i { width: 6px; height: 6px; border-radius: 50%; background: var(--fill); }
.dots5 i.on { background: var(--orange); }

/* Strichkalender */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.cal .dh { font-size: 11px; font-weight: 700; color: var(--text-3); text-align: center; padding-bottom: 2px; }
.cal .d { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--fill-2); position: relative; }
.cal .d.out { background: transparent; }
.cal .d.on { background: color-mix(in srgb, var(--green) 22%, transparent); color: var(--green); }
.cal .d.on::after { content: ""; position: absolute; width: 60%; height: 2.5px; border-radius: 2px; background: var(--green); transform: rotate(-55deg); }
.cal .d.today { outline: 2px solid var(--text-2); outline-offset: 1px; }
.cal .d.future { color: var(--text-3); background: transparent; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.stackbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-top: 12px; background: var(--fill-2); }
.stackbar i { background: var(--c); }

/* Woche */
.goal { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.goal + .goal { border-top: 1px solid var(--sep); }
.goal .next { font-size: 14px; color: var(--text-2); margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.goal .next .ic { width: 14px; height: 14px; color: var(--accent); }
.week-nav { display: flex; align-items: center; justify-content: space-between; padding: 8px; border-radius: 22px; margin-bottom: 12px; }
.weekday-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; }
.weekday-row + .weekday-row { border-top: 1px solid var(--sep); }
.weekday-row .wdn { width: 34px; font-weight: 700; font-size: 13px; color: var(--text-2); text-align: center; line-height: 1.1; }
.weekday-row .wdn b { display: block; font-size: 18px; color: var(--text); font-family: var(--font-round); }
.weekday-row.today .wdn b { color: var(--accent); }
.mini-strich { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--fill-2); flex: none; }
.mini-strich.on { background: var(--green); }
.mini-strich svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3.4; fill: none; stroke-linecap: round; }

.ramp { display: flex; gap: 6px; margin-top: 12px; }
.ramp div { flex: 1; height: 6px; border-radius: 3px; background: var(--fill); }
.ramp div.on { background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.ramp div.now { background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 10px var(--accent); }

/* Notfall */
.sos-item { padding: 14px 16px; width: 100%; text-align: left; display: flex; gap: 12px; align-items: flex-start; }
.sos-wrap + .sos-wrap { border-top: 1px solid var(--sep); }
.sos-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; }
.sos-ico .ic { width: 18px; height: 18px; }
.sos-detail { font-size: 15px; color: var(--text-2); margin-top: 4px; line-height: 1.45; }
.q-step { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }

.empty { text-align: center; padding: 26px 18px; color: var(--text-2); font-size: 15px; }
.empty .ic { margin: 0 auto 10px; width: 34px; height: 34px; color: var(--text-3); }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--c); transition: transform .25s var(--spring); }
.swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c); transform: scale(1.05); }
.icon-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.icon-pick button { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; background: var(--fill-2); color: var(--text-2); }
.icon-pick button.on { background: var(--c, var(--accent)); color: #fff; }

.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 1.6s var(--ease) forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .2; } }

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

/* --------------------------------------------------------------------------
   Externe Daten: Diagramme, Fortschrittsbalken, Termine
   -------------------------------------------------------------------------- */
.duo { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: 100%; }
.duo i { flex: 1; width: auto !important; min-height: 3px; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 55%, transparent)) !important; }
.duo i.zero { background: var(--fill) !important; }
.spark { width: 100%; height: 36px; margin-top: 8px; display: block; }
.prog { height: 7px; border-radius: 4px; background: var(--fill); overflow: hidden; margin-top: 6px; }
.prog i { display: block; height: 100%; border-radius: 4px; transition: width .6s var(--ease); }
.ev { display: flex; gap: 12px; align-items: baseline; font-size: 15px; }
.ev-t { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 13px; font-weight: 600; min-width: 84px; }
.mono { font-family: var(--mono); font-size: 14px; }
select.field { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
select.field option { color: #000; }
button.stat { width: 100%; }

/* --------------------------------------------------------------------------
   Vokabeltrainer: Karte und Vollbild-Ebene
   -------------------------------------------------------------------------- */
.vok-card { width: 100%; text-align: left; display: block; }
.vok-logo { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; font-family: "Times New Roman", Georgia, serif; font-weight: 700; font-size: 20px; color: #fff; background: linear-gradient(150deg, #64d2ff, #0a84ff 55%, #bf5af2); box-shadow: 0 6px 16px rgba(10, 132, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .45); }
.vok-badge { min-width: 30px; height: 30px; padding: 0 9px; border-radius: 15px; display: grid; place-items: center; background: var(--red); color: #fff; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; box-shadow: 0 4px 12px rgba(255, 69, 58, .4); }
.app-overlay { position: absolute; inset: 0; z-index: 55; display: flex; flex-direction: column; padding: var(--safe-top) 0 var(--safe-bottom); background: var(--bg); transform: translateX(104%); transition: transform .45s var(--spring); box-shadow: -20px 0 60px rgba(0, 0, 0, .35); }
.app-overlay.open { transform: none; }
.app-overlay iframe { flex: 1; width: 100%; border: 0; display: block; background: var(--bg); }

/* Quellen im Import-Bereich */
.src + .src { border-top: 1px solid var(--sep); }
.src .list-item + .list-item::before { display: none; }
.src-body { padding: 0 16px 16px 58px; }
.src-steps { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.src-steps b { color: var(--text); font-weight: 600; }
.src-steps li::marker { color: var(--accent); font-weight: 700; }

/* --------------------------------------------------------------------------
   Adventskalender
   -------------------------------------------------------------------------- */
.advent-card { width: 100%; text-align: left; display: block; overflow: hidden; }
.advent-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at 12% 18%, rgba(255,255,255,.18) 0 1.5px, transparent 2px), radial-gradient(circle at 78% 12%, rgba(255,255,255,.14) 0 1.5px, transparent 2px), radial-gradient(circle at 92% 64%, rgba(255,255,255,.12) 0 1.5px, transparent 2px), radial-gradient(circle at 40% 88%, rgba(255,255,255,.1) 0 1.5px, transparent 2px), radial-gradient(120% 90% at 100% 0%, rgba(255,69,58,.22), transparent 55%), radial-gradient(90% 80% at 0% 100%, rgba(255,214,10,.12), transparent 60%); }
.advent-card > * { position: relative; z-index: 1; }
.advent-big { display: flex; align-items: center; gap: 8px; font-family: var(--font-round); }
.advent-big b { font-size: 40px; font-weight: 750; line-height: 1; letter-spacing: -.02em; }
.advent-big span { font-size: 16px; font-weight: 600; color: var(--text-2); }
.advent-big .ic { color: var(--green); width: 30px; height: 30px; stroke-width: 2.6; }
.advent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.advent-actions .btn { flex: 1; min-width: 56px; }
.advent-btn { --accent: #ff453a; }
.advent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.door {
  aspect-ratio: 1 / 1.08; border-radius: 16px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 var(--glass-edge);
  background: linear-gradient(160deg, rgba(255, 69, 58, .30), rgba(255, 69, 58, .08));
  transition: transform .3s var(--spring), box-shadow .3s;
}
.door:nth-child(3n+2) { background: linear-gradient(160deg, rgba(48, 209, 88, .26), rgba(48, 209, 88, .06)); }
.door:nth-child(4n+3) { background: linear-gradient(160deg, rgba(255, 214, 10, .26), rgba(255, 159, 10, .06)); }
.door b { font-family: var(--font-round); font-size: 24px; font-weight: 750; line-height: 1; }
.door small { display: flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 650; color: var(--text-2); }
.door small .ic { width: 13px; height: 13px; }
.door.locked { opacity: .5; }
.door.part::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p) * 100%); background: linear-gradient(90deg, #ffd60a, #ff453a); }
.door.done { background: linear-gradient(160deg, #34c759, #1e8e3e); border-color: transparent; color: #fff; }
.door.done small { color: rgba(255, 255, 255, .9); }
.door.today { box-shadow: 0 0 0 2px #ffd60a, 0 0 18px rgba(255, 214, 10, .45); }
.door.sel { transform: scale(1.07); z-index: 1; }
.door:active { transform: scale(.94); }

/* --------------------------------------------------------------------------
   Finanzen & Nachrichten
   -------------------------------------------------------------------------- */
.news-refresh { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.news-refresh.spin .ic { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quote { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 14px; background: var(--fill-2); border: 1px solid var(--sep); min-width: 0; }
.q-label { font-size: 11.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-val { font-family: var(--font-round); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.q-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.q-ch { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.q-ch.up { color: var(--green); }
.q-ch.down { color: var(--red); }
.news-item { display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; padding: 2px 0; }
.news-item + .news-item { border-top: 1px solid var(--sep); padding-top: 10px; }
.news-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--accent); }
.news-title { font-weight: 650; font-size: 15.5px; line-height: 1.3; }
.news-first { font-size: 14px; color: var(--text-2); line-height: 1.4; margin-top: 2px; }
.news-foot { margin-top: 10px; }

/* --------------------------------------------------------------------------
   Finanzen (Farben validiert: feste Slots je Kategorie, Hell/Dunkel getrennt)
   -------------------------------------------------------------------------- */
:root, :root[data-theme="dark"] {
  --fin-1: #3987e5; --fin-2: #d95926; --fin-3: #199e70; --fin-4: #c98500; --fin-5: #d55181; --fin-6: #9085e9; --fin-7: #e66767;
  --fin-0: #8e8e93; --fin-save: #0ca30c; --fin-in: #7d8ba1; --fin-deficit: #a1a1aa;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --fin-1: #2a78d6; --fin-2: #eb6834; --fin-3: #1baf7a; --fin-4: #eda100; --fin-5: #e87ba4; --fin-6: #6250d6; --fin-7: #e34948; --fin-0: #8e8e93; --fin-save: #008300; --fin-in: #64748b; --fin-deficit: #a1a1aa; }
}
:root[data-theme="light"] { --fin-1: #2a78d6; --fin-2: #eb6834; --fin-3: #1baf7a; --fin-4: #eda100; --fin-5: #e87ba4; --fin-6: #6250d6; --fin-7: #e34948; --fin-0: #8e8e93; --fin-save: #008300; --fin-in: #64748b; --fin-deficit: #a1a1aa; }
.seg5 button { font-size: 12.5px; padding: 0 2px; }
.sankey { width: 100%; height: auto; display: block; margin-top: 8px; overflow: visible; }
.sk-band { opacity: .42; transition: opacity .2s; }
.sk-band:hover { opacity: .78; }
.sk-name { font-size: 10.5px; font-weight: 600; fill: var(--text-2); font-family: var(--font); }
.sk-val { font-size: 12px; font-weight: 700; fill: var(--text); font-family: var(--font-round); }
.fin-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; flex: none; }
.fin-pos { color: var(--green); }
.fin-amount { font-family: var(--font-round); font-size: 28px; font-weight: 700; text-align: center; }
.fin-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.fin-table th { text-align: left; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 4px 4px 6px; border-bottom: 1px solid var(--sep); }
.fin-table td { padding: 7px 4px; border-bottom: 1px solid var(--sep); }
.fin-table td:nth-child(n+2), .fin-table th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.fin-table .fin-sum td { font-weight: 700; border-bottom: 0; }

/* --------------------------------------------------------------------------
   Körper-Übersicht: Körpermodell
   -------------------------------------------------------------------------- */
:root, :root[data-theme="dark"] { --heat-1: #2c5a3f; --heat-2: #2f8148; --heat-3: #30a950; --heat-4: #30d158; --fig-idle: #3d4054; --fig-edge: rgba(255, 255, 255, .18); --fig-cut: #191b27; --fs-edge: #232536; --fs-mid: #3a3d52; --fs-hi: #484c65; --pg-flat: #6d7290; --mac-p: #3987e5; --mac-c: #c98500; --mac-f: #d55181; --y1: #24413a; --y2: #2c6b48; --y3: #2fa052; --y4: #30d158; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --heat-1: #bfe0c6; --heat-2: #8cc79a; --heat-3: #55a76b; --heat-4: #248a3d; --fig-idle: #d5d9e6; --fig-edge: rgba(60, 66, 95, .28); --fig-cut: #f7f8fc; --fs-edge: #b4bacc; --fs-mid: #cfd4e2; --fs-hi: #e3e7f1; --pg-flat: #a3a9bd; --mac-p: #2a78d6; --mac-c: #c98500; --mac-f: #d64a86; --y1: #cfe8d5; --y2: #93cda2; --y3: #57ac6e; --y4: #248a3d; } }
:root[data-theme="light"] { --heat-1: #bfe0c6; --heat-2: #8cc79a; --heat-3: #55a76b; --heat-4: #248a3d; --fig-idle: #d5d9e6; --fig-edge: rgba(60, 66, 95, .28); --fig-cut: #f7f8fc; --fs-edge: #b4bacc; --fs-mid: #cfd4e2; --fs-hi: #e3e7f1; --pg-flat: #a3a9bd; --mac-p: #2a78d6; --mac-c: #c98500; --mac-f: #d64a86; --y1: #cfe8d5; --y2: #93cda2; --y3: #57ac6e; --y4: #248a3d; }
.body-hero { overflow: hidden; }
.body-hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(60% 45% at 50% 42%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.body-hero > * { position: relative; z-index: 1; }
.body-seg { flex: 1; max-width: 270px; }
.body-flip { position: absolute; right: 8px; top: 6px; width: 40px; height: 40px; }
.body-stage { position: relative; margin: 6px -6px 0; perspective: 900px; }
.body-stage.flip .body-svg { animation: bodyFlip .55s var(--spring); }
@keyframes bodyFlip { from { transform: rotateY(90deg) scale(.96); opacity: .3; } }
.body-svg { width: 100%; height: auto; display: block; max-height: 480px; touch-action: pan-y; }
.body-side-label { position: absolute; left: 6px; top: 4px; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.fig-base > * { fill: url(#figSkin); stroke: var(--fig-edge); stroke-width: .8; }
.mz > path { stroke: var(--fig-cut); stroke-width: .9; stroke-linejoin: round; transition: fill .35s, opacity .2s; cursor: pointer; }
.mz.plain > * { fill: var(--fig-idle); cursor: default; }
.mz.heat-0 > *, .mz.idle > *, .mz.pg-none > * { fill: var(--fig-idle); }
.mz.pg-flat > * { fill: var(--pg-flat); }
.mz.pg-up1 > * { fill: var(--heat-2); }
.mz.pg-up2 > * { fill: var(--heat-3); }
.mz.pg-up3 > * { fill: var(--heat-4); }
.mz.pg-down > * { fill: var(--orange); }
.mz.heat-1 > * { fill: var(--heat-1); }
.mz.heat-2 > * { fill: var(--heat-2); }
.mz.heat-3 > * { fill: var(--heat-3); }
.mz.heat-4 > * { fill: var(--heat-4); }
.mz.rec > * { fill: var(--orange); }
.mz.ready > * { fill: var(--green); }
.mz.sel > * { stroke: var(--text); stroke-opacity: 1; stroke-width: 2; }
.mz:hover > * { opacity: .85; }
.m-line { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 3; }
.m-dot { fill: var(--accent); }
.m-name { font-size: 10.5px; font-weight: 600; fill: var(--text-2); font-family: var(--font); }
.m-val { font-size: 13px; font-weight: 700; fill: var(--text); font-family: var(--font-round); }
.m-delta { font-size: 10.5px; font-weight: 700; fill: var(--text-2); }
.m-delta.good { fill: var(--green); }
.m-delta.warn { fill: var(--orange); }
.body-info { text-align: center; margin-top: 2px; min-height: 18px; }
.body-legend { justify-content: center; }
.body-tile { padding: 10px; border-radius: 14px; background: var(--fill-2); border: 1px solid var(--sep); min-width: 0; }
.body-tile .k { font-size: 11.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.body-tile .v { font-family: var(--font-round); font-size: 18px; font-weight: 700; margin-top: 2px; white-space: nowrap; }
.body-tile .d { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.body-tile .d.good { color: var(--green); }
.muscle-row { display: block; width: 100%; text-align: left; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.m-field { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 6px; }
.m-field label { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.m-field .field { padding: 10px 12px; }
.m-field span { font-size: 13px; color: var(--text-3); }

/* --------------------------------------------------------------------------
   Abitur
   -------------------------------------------------------------------------- */
.abi-hero { overflow: hidden; }
.abi-hero::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(70% 60% at 0% 0%, rgba(191, 90, 242, .22), transparent 60%); }
.abi-hero > * { position: relative; z-index: 1; }
.abi-list { padding: 4px 0; }
.abi-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(5, 30px) 34px; gap: 4px; align-items: center; width: 100%; text-align: left; padding: 8px 12px; }
.abi-row + .abi-row { border-top: 1px solid var(--sep); }
.abi-headrow { font-size: 10.5px; font-weight: 700; color: var(--text-3); padding-top: 6px; padding-bottom: 6px; }
.abi-headrow span { text-align: center; }
.abi-name { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.abi-name b { font-size: 14.5px; font-weight: 650; }
.abi-tags { display: flex; gap: 4px; }
.abi-tags i { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: rgba(191, 90, 242, .18); color: #bf5af2; }
.pts { height: 28px; border-radius: 8px; display: grid; place-items: center; font-family: var(--font-round); font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pts.open { color: var(--text-3); border: 1px dashed var(--sep); }
.pts.out { opacity: .38; }
.p-top { background: rgba(48, 209, 88, .32); }
.p-good { background: rgba(48, 209, 88, .16); }
.p-mid { background: var(--fill-2); }
.p-low { background: rgba(255, 159, 10, .22); }
.p-def { background: rgba(255, 69, 58, .3); }
.abi-avg { text-align: right; font-family: var(--font-round); font-weight: 700; font-size: 13.5px; color: var(--text-2); }
.abi-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.abi-inputs label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); font-weight: 600; text-align: center; }
.abi-inputs .field { text-align: center; font-family: var(--font-round); font-weight: 700; font-size: 18px; padding: 10px 4px; }
.abi-range { width: 100%; margin-top: 10px; accent-color: #bf5af2; }

/* --------------------------------------------------------------------------
   Körpermodell: Details
   -------------------------------------------------------------------------- */
.fs-edge { stop-color: var(--fs-edge); } .fs-mid { stop-color: var(--fs-mid); } .fs-hi { stop-color: var(--fs-hi); }
.fig-lines path { fill: none; stroke: var(--fig-cut); stroke-width: 1.1; stroke-linecap: round; opacity: .8; pointer-events: none; }
.fig-ghost path { fill: none; stroke: var(--text); stroke-width: 1.4; stroke-dasharray: 4 3; opacity: .85; pointer-events: none; }
.m-call { cursor: pointer; }
.body-seg4 button { font-size: 12.5px; padding: 0 2px; }
.divbar { position: relative; height: 7px; border-radius: 4px; background: var(--fill); margin-top: 6px; overflow: hidden; }
.divbar::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--text-3); }
.divbar i { position: absolute; top: 0; bottom: 0; }
button.body-tile { text-align: left; width: 100%; }
button.body-tile:active { transform: scale(.97); }
.tabs-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px 14px; padding: 2px 4px; }
.tabs-chips::-webkit-scrollbar { display: none; }
.tabs-chips .chip { flex: 1 0 auto; justify-content: center; padding-left: 12px; padding-right: 12px; }

/* Diagramme */
.lc { position: relative; touch-action: pan-y; cursor: crosshair; }
.lc svg { width: 100%; height: auto; display: block; overflow: visible; }
.lc-grid { stroke: var(--sep); stroke-width: 1; }
.lc-tick { font-size: 10px; fill: var(--text-2); font-family: var(--font); font-variant-numeric: tabular-nums; }
.lc-line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lc-dot { stroke: var(--bg); stroke-width: 1.5; }
.lc-goal { stroke: var(--text-2); stroke-width: 1.2; stroke-dasharray: 4 4; }
.lc-goal-t { font-size: 10px; font-weight: 650; fill: var(--text-2); font-family: var(--font); paint-order: stroke; stroke: var(--bg); stroke-width: 3px; }
.lc-cross { stroke: var(--text-3); stroke-width: 1; opacity: 0; }
.lc-hit { stroke: var(--bg); stroke-width: 2; opacity: 0; }
.lc.show .lc-cross, .lc.show .lc-hit { opacity: 1; }
.lc-tip { position: absolute; top: -8px; transform: translateX(-50%); display: none; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); font-size: 11.5px; color: var(--text-2); white-space: nowrap; pointer-events: none; z-index: 3; text-align: center; }
.lc-tip b { font-size: 14px; color: var(--text); font-family: var(--font-round); }
.lc.show .lc-tip { display: flex; }

/* Vorher-Nachher */
.ph-cmp { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--fill-2); }
.ph-cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-cmp img.after { clip-path: inset(0 0 0 var(--cut)); }
.ph-line { position: absolute; top: 0; bottom: 0; left: var(--cut); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, .5); pointer-events: none; }
.ph-line::after { content: "↔"; position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-size: 18px; font-style: normal; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.ph-cmp input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; touch-action: pan-y; }
.ph-tag { position: absolute; bottom: 10px; padding: 4px 9px; border-radius: 10px; font-size: 11.5px; font-weight: 650; color: #fff; background: rgba(0, 0, 0, .55); pointer-events: none; }
.ph-tag.l { left: 10px; } .ph-tag.r { right: 10px; }
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-th { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--fill-2); border: 2px solid transparent; padding: 0; }
.ph-th.a { border-color: var(--text-3); } .ph-th.b { border-color: var(--accent); }
.ph-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-th span { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 6px 5px; font-size: 10.5px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); text-align: center; }
.ph-prev img { width: 100%; max-height: 46vh; object-fit: contain; border-radius: 18px; background: var(--fill-2); display: block; }

/* Noten */
.pts.prov { outline: 1.5px dashed var(--text-3); outline-offset: -1.5px; }
.pts-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.pts-grid .pts { height: 44px; font-size: 16px; }
.pts.sel { outline: 2.5px solid var(--accent); outline-offset: 1px; }
.hj-row { display: flex; align-items: center; gap: 4px; padding: 6px 10px 6px 14px; }
.hj-row + .hj-row { border-top: 1px solid var(--sep); }
.hj-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-align: left; padding: 5px 0; min-height: 44px; }
.hj-main .grow { min-width: 0; }
.hj-add { width: 40px; height: 40px; flex: none; color: var(--accent); }
.hj-mini { display: flex; gap: 8px; align-items: flex-end; }
.hj-mini div { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 34px; font-size: 10px; color: var(--text-3); }
.hj-mini b { font-size: 11px; color: var(--text-2); font-family: var(--font-round); }
.hj-mini i { width: 16px; border-radius: 5px 5px 2px 2px; background: var(--fill); }
.hj-mini .on i { background: var(--purple); } .hj-mini .on { color: var(--text); }
.g-dots { display: flex; gap: 3px; flex: none; }
.g-dots i { font-style: normal; min-width: 21px; height: 21px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.g-dots i.k { box-shadow: inset 0 0 0 1.5px var(--purple); }

/* Lernen */
.lern-items { margin-top: 10px; border-top: 1px solid var(--sep); }
.lern-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; min-height: 52px; }
.lern-row + .lern-row { border-top: 1px solid var(--sep); }
.lern-row .grow { min-width: 0; }
.lern-card .lern-row:last-child { padding-bottom: 0; }
.ampel { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: 14px; background: color-mix(in srgb, var(--c) 15%, transparent); font-size: 13px; font-weight: 650; flex: none; }
.ampel i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.flash { width: 100%; min-height: 300px; margin-top: 16px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 18px; padding: 22px 20px; text-align: center; }
.flash-t { font-size: 24px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.flash.flip { animation: flashFlip .35s var(--ease); }
@keyframes flashFlip { from { transform: rotateY(70deg); opacity: .3; } }
.step { width: 36px; height: 36px; flex: none; font-size: 20px; font-weight: 500; }
.step:disabled { opacity: .25; }

/* Level, Statistik, Startseite */
.lv-card { width: 100%; text-align: left; }
.lv-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 12px; }
.lv { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.lv .small { font-size: 12px; font-weight: 600; }
.lv-ring { position: relative; display: grid; place-items: center; flex: none; }
.lv-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.lv-ring b { font-family: var(--font-round); font-size: 18px; font-weight: 750; }
.delta { font-size: 12px; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.delta.good { color: var(--green); } .delta.warn { color: var(--orange); }
.year-wrap { overflow-x: auto; margin: 10px -4px 0; padding: 0 4px; direction: rtl; scrollbar-width: none; }
.year-wrap::-webkit-scrollbar { display: none; }
.year { direction: ltr; display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 11px); grid-auto-columns: 11px; gap: 3px; width: max-content; }
.year i { border-radius: 3px; background: var(--fill); }
.year i.y1 { background: var(--y1); } .year i.y2 { background: var(--y2); } .year i.y3 { background: var(--y3); } .year i.y4 { background: var(--y4); }
.year i.future { background: transparent; }
.rv .body-tile .k svg { width: 14px; height: 14px; }
.home-row { gap: 8px; padding: 8px 12px; }
.home-row.off .grow { color: var(--text-3); }

/* Sperre */
.lock { position: absolute; inset: 0; z-index: 200; display: grid; place-items: center; padding: calc(var(--safe-top) + 20px) 24px calc(var(--safe-bottom) + 20px); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(40px) saturate(160%); -webkit-backdrop-filter: blur(40px) saturate(160%); opacity: 0; transition: opacity .3s; overflow-y: auto; }
.lock.on { opacity: 1; }
.lock-in { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 320px; }
.lock-ico { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(150deg, #64d2ff, #0a84ff); color: #fff; }
.lock-t { font-size: 22px; font-weight: 750; margin-top: 16px; }
.lock-s { font-size: 14px; color: var(--text-2); margin-top: 4px; text-align: center; min-height: 20px; line-height: 1.4; }
.lock-dots { display: flex; gap: 14px; margin: 20px 0 24px; }
.lock-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--text-2); transition: background .15s; }
.lock-dots i.on { background: var(--text); border-color: var(--text); }
.lock-dots.shake { animation: lockShake .4s; }
@keyframes lockShake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.lock-pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 20px; margin-bottom: 22px; }
.lock-pad button { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-round); font-size: 29px; font-weight: 500; }
.lock-pad button:active { background: var(--fill); }
.lock-forgot { margin-top: 12px; padding: 10px; font-size: 14px; color: var(--text-2); }
body.covered .screen, body.covered .dock, body.covered .sheet-layer, body.covered .app-overlay, body.covered .mini-timer { visibility: hidden; }
@media (max-height: 700px) { .lock-pad { grid-template-columns: repeat(3, 62px); gap: 10px 18px; } .lock-pad button { width: 62px; height: 62px; } .lock-dots { margin: 12px 0 14px; } }
@media (prefers-reduced-motion: reduce) { .flash.flip, .lock-dots.shake, .body-stage.flip .body-svg { animation: none; } }

.habit-strip + .lv-card, .habit-strip + .card { margin-top: 12px; }
/* Feinschliff nach Sichtprüfung */
.home-row .switch { display: block; }
.home-row { gap: 6px; }
.fin-kpis + .card { margin-top: 12px; }
.empty .btn .ic { margin: 0; width: 18px; height: 18px; color: inherit; }
