/* ===== FitTrack – Design "Milchglas Neon" (Glassmorphism + Neon) ===== */
:root {
  --bg: #06060E;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.1);
  --line: rgba(180, 240, 255, 0.14);
  --line-strong: rgba(180, 240, 255, 0.28);
  --text: #EAF6FF;
  --muted: #8B97AE;
  --accent: #18E5FF;
  --accent-deep: #00B4E6;
  --on-accent: #041016;
  --accent-dim: rgba(24, 224, 255, 0.15);
  --danger: #FF3C6E;
  --protein: #FF3DA6;
  --carbs: #37B7FF;
  --fat: #C9FF3D;
  --amber: #FFC24D;
  --r-lg: 20px;
  --r-md: 14px;
  --blur: blur(24px) saturate(1.6);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, sans-serif;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- Eigene Icons (einfarbig, erben Textfarbe) ---- */
.icn { display: inline-block; flex: none; }
.big .icn { width: 34px; height: 34px; opacity: 0.85; }
.wiz-hero .icn { width: 48px; height: 48px; }
.ai-choice-ico .icn { width: 34px; height: 34px; }
.stat-ico .icn { width: 20px; height: 20px; }
.meal-ico .icn { width: 19px; height: 19px; }
.wopt-ico .icn { width: 22px; height: 22px; }
.supp-group .icn, .food-row .icn { vertical-align: -0.15em; }
.water-cup .icn { color: var(--carbs); }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

/* Weiche Farbwolken hinter dem Glas – das macht den Milchglas-Effekt sichtbar */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 36% at 82% 4%, rgba(24, 224, 255, 0.26), transparent 65%),
    radial-gradient(42% 36% at 4% 26%, rgba(88, 101, 242, 0.22), transparent 65%),
    radial-gradient(50% 42% at 50% 106%, rgba(255, 61, 166, 0.16), transparent 68%),
    radial-gradient(30% 26% at 60% 55%, rgba(77, 159, 255, 0.1), transparent 70%);
}

#app {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Topbar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 10px;
  background: linear-gradient(to bottom, rgba(10, 10, 15, 0.82) 55%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.topbar-title {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.icon-btn {
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  color: var(--muted);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}
.icon-btn:active { transform: scale(0.92); color: var(--text); }

/* ---- Main ---- */
main {
  flex: 1;
  padding: 4px 16px calc(env(safe-area-inset-bottom, 0px) + 122px);
}
#view > * { animation: rise 0.32s cubic-bezier(0.21, 0.9, 0.27, 1) both; }
#view > *:nth-child(2) { animation-delay: 0.03s; }
#view > *:nth-child(3) { animation-delay: 0.06s; }
#view > *:nth-child(4) { animation-delay: 0.09s; }
#view > *:nth-child(5) { animation-delay: 0.12s; }
#view > *:nth-child(6) { animation-delay: 0.15s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---- Dock (Milchglas) ---- */
.tabbar {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  left: 14px; right: 14px;
  z-index: 30;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 8px;
  background: rgba(22, 22, 30, 0.55);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 18px 40px -14px rgba(0, 0, 0, 0.7);
}
.tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
  padding: 8px 0 7px;
  border-radius: 22px;
  transition: background 0.2s ease, color 0.2s ease;
}
.tab svg { width: 23px; height: 23px; }
.tab.active {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.09);
}

/* ---- Schnell-Button ---- */
.tab-plus {
  flex: none;
  width: 58px; height: 58px;
  margin: -18px 4px 0;
  border-radius: 50%;
  border: none;
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 26px -6px rgba(24, 224, 255, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease;
}
.tab-plus svg { width: 27px; height: 27px; }
.tab-plus:active { transform: scale(0.92); }
.qa-tile {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13.5px;
  padding: 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.qa-tile:active { transform: scale(0.96); border-color: var(--accent); }
.qa-ico { font-size: 27px; }

/* ---- Karten (Milchglas) ---- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 30px -16px rgba(0, 0, 0, 0.65);
}
.card-title, .eyebrow {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}
.card-title { margin-bottom: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }
h3.section {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 20px 6px 12px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  border: none;
  font-family: var(--font-sans);
  font-weight: 750;
  font-size: 15.5px;
  padding: 15px 22px;
  border-radius: var(--r-md);
  cursor: pointer;
  width: 100%;
  box-shadow: 0 8px 22px -8px rgba(24, 224, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn.secondary {
  background: var(--glass-2);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.danger {
  background: rgba(255, 60, 110, 0.14);
  color: var(--danger);
  border: 1px solid rgba(255, 60, 110, 0.25);
  box-shadow: none;
}
.btn.sm { padding: 10px 16px; font-size: 13.5px; width: auto; }
.btn-ghost {
  background: none;
  border: 1.5px dashed var(--line-strong);
  color: var(--muted);
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: 13.5px;
  padding: 12px;
  border-radius: var(--r-md);
  width: 100%;
  cursor: pointer;
  margin-top: 10px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.btn-ghost:active { color: var(--accent); border-color: var(--accent); }
.x-btn {
  background: none; border: none;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.15s ease;
}
.x-btn:active { color: var(--danger); }

/* ---- Inputs ---- */
input, textarea, select {
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid var(--line);
  color: var(--text);
  border-radius: var(--r-md);
  padding: 13px;
  font-size: 16px;
  font-family: var(--font-sans);
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: rgba(155, 160, 172, 0.7); }
textarea { resize: vertical; min-height: 66px; line-height: 1.45; }
label.field { display: block; margin-bottom: 13px; }
label.field > span {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 7px;
}

/* ---- Kalorien-Ring ---- */
.ring-row { display: flex; align-items: center; gap: 20px; }
.ring-wrap { position: relative; flex: none; }
.ring-wrap svg { display: block; }
.ring-track { stroke: rgba(255, 255, 255, 0.12); }
.ring-arc {
  stroke: var(--accent);
  filter: drop-shadow(0 0 8px rgba(24, 224, 255, 0.55));
  transition: stroke-dasharray 0.5s ease;
}
.ring-arc.over { stroke: var(--danger); filter: drop-shadow(0 0 8px rgba(255, 60, 110, 0.55)); }
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ring-num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.ring-sub { font-size: 11.5px; color: var(--accent); font-weight: 700; margin-top: 2px; }
.ring-label { display: none; }
.ring-macros { flex: 1; display: flex; flex-direction: column; gap: 13px; min-width: 0; }
.macro-row .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.macro-row .top .lbl { color: var(--text); font-weight: 650; display: inline-flex; align-items: center; gap: 6px; }
.macro-row .top .val { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mdot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.mdot.p { background: var(--protein); }
.mdot.c { background: var(--carbs); }
.mdot.f { background: var(--fat); }

/* ---- Balken ---- */
.bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.5s ease;
}
.bar > i.over { background: var(--danger); }
.bar > i.p { background: var(--protein); }
.bar > i.c { background: var(--carbs); }
.bar > i.f { background: var(--fat); }

/* ---- Tages-Chips ---- */
.day-chips { display: flex; gap: 7px; margin-bottom: 16px; }
.chip {
  flex: 1;
  min-width: 0;
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  color: var(--muted);
  border-radius: var(--r-md);
  padding: 11px 0 9px;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
}
.chip.active {
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  border-color: transparent;
  box-shadow: 0 6px 16px -6px rgba(24, 224, 255, 0.6);
}
.chip .dot {
  display: block;
  width: 4px; height: 4px;
  border-radius: 99px;
  background: var(--accent);
  margin: 4px auto 0;
}
.chip.active .dot { background: #fff; }

/* ---- Segmented Control ---- */
.seg {
  display: flex;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: 15px;
}
.seg button {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.seg button.active {
  background: var(--glass-2);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ---- Listen ---- */
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.list-row:last-child { border-bottom: none; }
.list-row .title { font-weight: 700; font-size: 15px; }
.list-row .sub { color: var(--muted); font-size: 12.5px; margin-top: 2.5px; }

/* ---- Wochen-Hero & Statistiken ---- */
.hero-num {
  font-size: 40px;
  font-weight: 850;
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero-num small { font-size: 17px; color: var(--muted); font-weight: 650; }
.week-dots { display: flex; gap: 7px; margin-top: 16px; }
.wdot {
  flex: 1;
  max-width: 46px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 720;
  border: 1.5px solid var(--line-strong);
  color: var(--muted);
  transition: all 0.2s ease;
}
.wdot.done {
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  border-color: transparent;
  font-size: 14px;
  box-shadow: 0 5px 14px -5px rgba(24, 224, 255, 0.6);
}
.wdot.today { border-color: var(--accent); color: var(--accent); }
.wdot.missed { opacity: 0.35; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.stat {
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-radius: var(--r-md);
  padding: 14px 10px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.stat.tint-g { background: rgba(24, 224, 255, 0.12); border-color: rgba(24, 224, 255, 0.2); }
.stat.tint-a { background: rgba(255, 179, 64, 0.1); border-color: rgba(255, 179, 64, 0.18); }
.stat-ico { font-size: 17px; margin-bottom: 5px; }
.stat-num {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat-num small { font-size: 12px; color: var(--muted); font-weight: 650; }
.stat-lbl {
  font-size: 10px;
  font-weight: 720;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 4px;
}
.pill {
  display: inline-flex;
  align-items: center;
  background: var(--accent-dim);
  border: 1px solid rgba(24, 224, 255, 0.3);
  color: #5EEBFF;
  font-size: 11.5px;
  font-weight: 750;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.pill.gold { background: rgba(255, 179, 64, 0.13); border-color: rgba(255, 179, 64, 0.25); color: var(--amber); }
.pill.neutral { background: var(--glass); border-color: var(--line); color: var(--muted); }

/* ---- Satzpausen-Stoppuhr ---- */
#rest-float {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 86px);
  left: 22px; right: 22px;
  z-index: 40;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(24, 24, 32, 0.6);
  -webkit-backdrop-filter: blur(30px) saturate(1.6);
  backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid rgba(24, 224, 255, 0.35);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 36px -10px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.25s ease;
}
.rest-info { display: flex; flex-direction: column; gap: 1px; min-width: 62px; }
.rest-lbl {
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.rest-time {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  line-height: 1;
}
.rest-bar { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.12); border-radius: 99px; overflow: hidden; }
.rest-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.25s linear;
}
.rest-bar i.over { background: var(--amber); }
.rest-btn {
  background: var(--glass-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 720;
  font-size: 12.5px;
  padding: 9px 13px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.rest-btn.primary {
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  border: none;
  box-shadow: 0 6px 14px -6px rgba(24, 224, 255, 0.6);
}
.rest-start {
  flex: 1;
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  border: none;
  font-family: var(--font-sans);
  font-weight: 750;
  font-size: 14px;
  padding: 11px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 14px -6px rgba(24, 224, 255, 0.6);
}
.rest-start:active { transform: scale(0.98); }

/* ---- Workout-Sätze ---- */
.ex-block { padding: 16px; }
.ex-block-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.ex-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.set-grid {
  display: grid;
  grid-template-columns: 34px 1fr 1fr 40px 20px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  padding: 3px 6px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}
.set-grid.current { border-color: var(--accent); background: var(--accent-dim); }
.set-grid.done { opacity: 0.5; }
.set-grid.head { padding: 0 6px; border: none; }
.set-hint {
  background: var(--accent-dim);
  border: 1px solid rgba(24, 224, 255, 0.3);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 11px;
  margin: 2px 0 8px;
  cursor: pointer;
  text-align: center;
}
.set-hint b { color: var(--accent); font-weight: 800; }
.set-hint:active { transform: scale(0.98); }
.set-grid.head {
  font-size: 9.5px;
  font-weight: 750;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 7px;
}
.set-grid .idx {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.set-grid input {
  text-align: center;
  padding: 11px 4px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.prev-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
  padding: 6px 0;
  border-radius: 8px;
  text-decoration: underline dotted rgba(155, 160, 172, 0.5);
  text-underline-offset: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prev-btn:active { color: var(--accent); }
.prev-btn.empty { text-decoration: none; cursor: default; }
.check-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--glass-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.check-btn.done {
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  border-color: transparent;
  box-shadow: 0 5px 12px -5px rgba(24, 224, 255, 0.6);
}

/* ---- Mahlzeiten ---- */
.meal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.meal-head strong { font-size: 16px; font-weight: 800; }
.meal-ico {
  width: 36px; height: 36px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.meal-head .kcal { font-size: 12.5px; color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }
.meal-toggle { -webkit-tap-highlight-color: transparent; }
.meal-toggle .row { gap: 8px; }
.meal-head .chev { display: inline-flex; color: var(--muted); transition: transform .22s ease; }
.meal-head .chev.open { transform: rotate(180deg); color: var(--accent); }
.food-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.food-row:last-of-type { border-bottom: none; }
.food-row .name { font-size: 14.5px; font-weight: 650; }
.food-row .detail { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.food-row .kcal { font-size: 14px; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- Wochenstreifen ---- */
.week-strip { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.ws-nav {
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--text);
  width: 30px; height: 48px;
  border-radius: var(--r-md);
  font-size: 15px;
  cursor: pointer;
  flex: none;
}
.ws-days { flex: 1; display: flex; gap: 4px; }
.ws-day {
  flex: 1;
  min-width: 0;
  background: none;
  border: 1.5px solid transparent;
  border-radius: var(--r-md);
  color: var(--muted);
  padding: 7px 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ws-day .ws-lbl { font-size: 9px; font-weight: 720; text-transform: uppercase; letter-spacing: 0.05em; }
.ws-day .ws-num { font-size: 15px; font-weight: 750; color: var(--text); }
.ws-day.today { border-color: var(--line-strong); }
.ws-day.active {
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  box-shadow: 0 5px 14px -5px rgba(24, 224, 255, 0.6);
}
.ws-day.active .ws-lbl, .ws-day.active .ws-num { color: var(--on-accent); }
.ws-dot { width: 4px; height: 4px; border-radius: 99px; background: var(--accent); }
.ws-dot.off { background: transparent; }
.ws-day.active .ws-dot { background: #fff; }

/* ---- Level & XP ---- */
.lvl-ring { position: relative; width: 52px; height: 52px; flex: none; }
.lvl-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
}

/* ---- Ziel-Assistent ---- */
.wiz-progress {
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}
.wiz-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4DF3FF, #00B4E6);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.wiz-hero { font-size: 46px; text-align: center; margin: 12px 0 4px; }
.wiz-text { font-size: 15px; line-height: 1.5; color: var(--text); text-align: center; margin: 6px 0 18px; }
.wiz-text.muted { color: var(--muted); }
.wopt {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 14px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.wopt.on {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 6px 18px -8px rgba(24, 224, 255, 0.4);
}
.wopt-ico { font-size: 22px; }
.wopt-lbl { font-weight: 750; font-size: 15px; }
.wopt-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.wopt-check {
  width: 25px; height: 25px;
  border-radius: 50%;
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
}
.wiz-teaser { border: 1.5px solid rgba(24, 224, 255, 0.4); }

/* ---- Barcode ---- */
.bc-video {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--r-md);
  background: #000;
  border: 1px solid var(--line);
}

/* ---- Modal (Milchglas-Sheet) ---- */
#modal-root:empty { display: none; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: rgba(26, 26, 34, 0.82);
  -webkit-backdrop-filter: blur(34px) saturate(1.6);
  backdrop-filter: blur(34px) saturate(1.6);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 12px 18px calc(env(safe-area-inset-bottom, 0px) + 26px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: slideUp 0.28s cubic-bezier(0.21, 0.9, 0.27, 1);
}
.modal::before {
  content: "";
  display: block;
  width: 40px;
  height: 4.5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  margin: 2px auto 16px;
}
.modal.wizard {
  height: 96dvh;
  max-height: 96dvh;
}
.modal .card, .modal .stat, .modal .qa-tile, .modal .wopt, .modal .chip {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-head .title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(48px); opacity: 0; } }

/* ---- Toast ---- */
#toast-root {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 108px);
  left: 0; right: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(30, 30, 40, 0.75);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.28s cubic-bezier(0.21, 0.9, 0.27, 1);
}
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } }

/* ---- Supplements & Quests ---- */
.supp-group {
  font-size: 10.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 14px 0 4px;
}
.supp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.supp-row:last-child { border-bottom: none; }
.supp-check {
  width: 27px; height: 27px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--on-accent);
  transition: all 0.18s ease;
}
.supp-check.on {
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  border-color: transparent;
  box-shadow: 0 4px 10px -4px rgba(24, 224, 255, 0.6);
}
.supp-name { font-size: 15px; font-weight: 650; transition: color 0.18s ease; }
.supp-name.taken { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(155, 160, 172, 0.45); }

/* ---- Schlaf ---- */
.sleep-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sleep-time-field {
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px 8px;
}
.stf-lbl {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 2px;
  white-space: nowrap;
}
.sleep-time-field input[type="time"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-appearance: none;
  appearance: none;
}
.sleep-time-field input[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.sleep-time-field input[type="time"]:focus { box-shadow: none; }
.sleep-chart { display: flex; gap: 7px; }
.sleep-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.sleep-bar-area {
  height: 54px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.sleep-bar {
  width: 100%;
  background: linear-gradient(180deg, #4DF3FF, #00B4E6);
  border-radius: 9px 9px 0 0;
  transition: height 0.35s ease;
}
.sleep-bar.mid { background: var(--amber); }
.sleep-bar.low { background: var(--danger); }
.sleep-col > span { font-size: 10px; color: var(--muted); font-weight: 700; }
.sleep-col > span.today { color: var(--accent); }
.sleep-row {
  display: grid;
  grid-template-columns: 74px 1fr 1fr 72px;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.sleep-row:last-child { border-bottom: none; }
.sleep-row-date { font-size: 12.5px; font-weight: 650; }
.sleep-row input { padding: 8px 6px; font-size: 13px; }
.sleep-row .sleep-dur { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- KI-Eintrag ---- */
.ai-entry-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: linear-gradient(135deg, rgba(24, 224, 255, 0.18), rgba(24, 224, 255, 0.06));
  border: 1px solid rgba(24, 224, 255, 0.35);
  border-radius: var(--r-md);
  padding: 16px;
  color: var(--text);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.ai-entry-btn:active { transform: scale(0.98); }
.ai-entry-btn .qa-ico { font-size: 26px; }
.ai-entry-btn b { display: block; font-size: 15.5px; font-weight: 750; }
.ai-entry-btn small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.ai-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px 12px;
  color: var(--text);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.ai-choice:active { transform: scale(0.96); border-color: var(--accent); }
.ai-choice-ico { font-size: 34px; margin-bottom: 4px; }
.ai-choice b { font-size: 16px; font-weight: 750; }
.ai-choice small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.cam-preview {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.ai-intro { font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; margin: 0 0 18px; }
.ai-mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ai-mic {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 28px -6px rgba(24, 224, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease;
}
.ai-mic:active { transform: scale(0.94); }
.ai-mic.rec {
  background: linear-gradient(160deg, #FF4F5E, #D6203A);
  color: #fff;
  animation: micPulse 1.2s ease-in-out infinite;
}
.ai-mic.busy { background: var(--glass-2); color: var(--muted); pointer-events: none; }
.ai-mic.busy svg { animation: spin 0.9s linear infinite; }
@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 60, 110, 0.5), 0 10px 28px -6px rgba(255, 60, 110, 0.5); }
  50% { box-shadow: 0 0 0 16px rgba(255, 60, 110, 0), 0 10px 28px -6px rgba(255, 60, 110, 0.4); }
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-mic-label { font-size: 13px; font-weight: 650; color: var(--muted); text-align: center; }
.ai-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ai-or::before, .ai-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- Login ---- */
#auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  overflow-y: auto;
}
#auth-gate::before {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
  background:
    radial-gradient(46% 36% at 82% 4%, rgba(24, 224, 255, 0.28), transparent 65%),
    radial-gradient(42% 36% at 4% 30%, rgba(88, 101, 242, 0.24), transparent 65%),
    radial-gradient(50% 42% at 50% 106%, rgba(255, 61, 166, 0.18), transparent 68%);
}
.auth-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 24px 60px -20px rgba(0, 0, 0, 0.8);
}
.auth-logo {
  width: 68px; height: 68px;
  margin: 0 auto 14px;
  border-radius: 22px;
  background: linear-gradient(160deg, #4DF3FF, #00B4E6);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px -8px rgba(24, 224, 255, 0.6);
}
.auth-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
}
.auth-sub {
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  margin: 4px 0 20px;
}
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  cursor: pointer;
}
.auth-switch b { color: var(--accent); }

.sync-url {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 12px;
  font-size: 11.5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--muted);
  word-break: break-all;
  line-height: 1.4;
}

/* ---- Wasser ---- */
.water-cups {
  display: flex;
  gap: 6px;
  justify-content: space-between;
}
.water-cup {
  flex: 1;
  aspect-ratio: 1;
  max-width: 40px;
  display: grid;
  place-items: center;
  font-size: 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: all 0.2s ease;
}
.water-cup.on {
  background: rgba(77, 159, 255, 0.16);
  border-color: rgba(77, 159, 255, 0.3);
}

/* ---- Diverses ---- */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 16px;
  font-size: 14px;
  line-height: 1.5;
}
.empty .big { font-size: 34px; margin-bottom: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.chart { width: 100%; height: auto; margin: 8px 0 4px; }
.chart-line { stroke: var(--accent); }
.chart-dot { fill: var(--accent); }
.date-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.date-nav .label { font-weight: 800; font-size: 17px; }
.date-nav button {
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  font-size: 16px;
  cursor: pointer;
}
