/* =========================================
   Routine – cozy: Weiß mit cremigem Gelb
   ========================================= */
:root {
  color-scheme: light;
  --bg: #FBF6EA;
  --card: #FFFFFF;
  --cream: #FFF5D6;
  --cream-2: #FFF9E9;
  --yellow: #F6CD4C;
  --yellow-deep: #D9A21B;
  --text: #2B261E;
  --muted: #8F8676;
  --line: #EFE6D3;
  --soft: #F7F1E3;
  --water: #5B90C6;
  --water-soft: #E7F0F9;
  --supp: #6F9C66;
  --supp-soft: #E9F2E5;
  --gym: #D47A3F;
  --gym-soft: #FBEADC;
  --sleep: #8475C1;
  --sleep-soft: #EFEBF8;
  --danger: #C4553C;
  --warn: #C98A12;
  --shadow: 0 1px 2px rgba(80, 60, 20, .04), 0 6px 18px rgba(80, 60, 20, .06);
  --r: 18px;
  --fh: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 15px/1.4 var(--fh);
  letter-spacing: -0.01em;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 0 calc(72px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
button { font: inherit; color: inherit; letter-spacing: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:disabled { cursor: default; }
input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
b, strong { font-weight: 700; }
.ic { display: inline-block; vertical-align: middle; flex: none; }
.wrap { max-width: 520px; margin: 0 auto; padding: 8px 14px 20px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.foot { font-size: 12px; color: var(--muted); margin: 6px 0 0; line-height: 1.4; }
.lead { font-size: 13px; color: var(--muted); margin: 0 2px 10px; line-height: 1.45; }
.hint-empty { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* Überschriften in Poppins Black */
h1, h2, .big, .big-num, .tile-val, .stat b, .daypill, .exh1 { font-family: var(--fh); font-weight: 900; letter-spacing: -0.02em; }
.hero { padding: 6px 2px 8px; }
.hero h1 { font-size: 28px; line-height: 1.05; margin: 2px 0 0; }

/* Tag wählen */
.daynav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.daypill { flex: 1; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; padding: 7px 10px; font-size: 16px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.daypill small { font: 500 11.5px var(--fh); color: var(--muted); letter-spacing: 0; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; flex: none; color: var(--text); }
.iconbtn:disabled { opacity: .3; }
.iconbtn.sm { width: 34px; height: 34px; box-shadow: none; background: var(--soft); }

/* Hinweis-Leiste */
.banner { display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 12px; border-radius: 14px; margin-bottom: 10px; font-size: 13.5px; }
.banner span { flex: 1; }
.banner button { background: var(--card); border-radius: 10px; padding: 6px 11px; font-weight: 700; font-size: 13px; }
.banner.sleepb { background: var(--sleep-soft); color: #4F4384; }

/* Kategorie-Kacheln */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.tile { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 12px 11px; text-align: left; display: flex; flex-direction: column; min-height: 150px; transition: transform .1s; position: relative; overflow: hidden; }
.tile:active { transform: scale(.97); }
.tile-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); margin-bottom: 8px; }
.tile-ic, .cat-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--cs, var(--soft)); color: var(--c); display: grid; place-items: center; }
.cat-ic { background: color-mix(in srgb, var(--c) 14%, white); }
.cat-ic.big { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.tile-ok { width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; }
.tile-name { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tile-val { font-size: 23px; line-height: 1.1; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-sub { font-size: 12px; color: var(--muted); margin-top: 1px; line-height: 1.3; flex: 1; }
.tile-foot { font-size: 11px; color: var(--muted); margin-top: 4px; }
.tile.ok { background: linear-gradient(180deg, var(--cream-2), #fff 60%); }
.bar { display: block; height: 6px; border-radius: 6px; background: var(--soft); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--c, var(--yellow)); transition: width .4s; }

/* Wochen-Streifen */
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wday { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 7px; border-radius: 12px; font-size: 11px; color: var(--muted); }
.wday b { font-size: 15px; color: var(--text); font-weight: 800; }
.wday.sel { background: var(--cream); }
.wday.fut { opacity: .35; }
.wdots { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-top: 3px; }
.wdots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.wdots i.on.sl { background: var(--sleep); } .wdots i.on.w { background: var(--water); } .wdots i.on.s { background: var(--supp); } .wdots i.on.g { background: var(--gym); }

/* Karten */
.card { background: var(--card); border-radius: var(--r); padding: 13px 14px; margin-bottom: 10px; box-shadow: var(--shadow); scroll-margin-top: 10px; }
.card h2 { font-size: 16px; margin: 0 0 9px; display: flex; align-items: center; gap: 8px; }
.card h3 { font-size: 14px; font-weight: 800; margin: 12px 0 6px; }
.tag { margin-left: auto; font: 700 11.5px var(--fh); letter-spacing: 0; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.tag.ok { background: var(--supp-soft); color: var(--supp); }
.note { margin-top: 8px; padding: 9px 11px; border-radius: 12px; background: var(--cream-2); font-size: 13px; color: var(--muted); }

/* Kategorie-Kopf */
.cathead { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; padding: 4px 0 10px; }
.cattitle { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cattitle h1 { font-size: 22px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exh1 { font-size: 19px !important; white-space: normal !important; line-height: 1.15; }
.daymini { display: flex; align-items: center; background: var(--card); box-shadow: var(--shadow); border-radius: 12px; padding: 3px; font-size: 12.5px; font-weight: 700; }
.daymini span { padding: 0 4px; min-width: 52px; text-align: center; }
.daymini button { width: 28px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); }
.daymini button:disabled { opacity: .3; }

/* Unter-Tabs */
.seg { display: flex; background: var(--card); box-shadow: var(--shadow); border-radius: 14px; padding: 3px; margin-bottom: 10px; gap: 2px; }
.seg button { flex: 1; padding: 8px 2px; border-radius: 11px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--yellow); color: var(--text); font-weight: 800; }
.seg.sm { box-shadow: none; background: transparent; padding: 0; margin-top: -4px; }
.seg.sm button { padding: 6px 2px; font-size: 12px; background: var(--card); }
.seg.sm button.on { background: var(--text); color: #fff; }

/* Buttons */
.btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border-radius: 14px; font-weight: 800; font-size: 15px; transition: transform .08s; }
.btn:active, .addbtn:active, .supp:active { transform: scale(.97); }
.btn.primary { background: var(--yellow); color: var(--text); box-shadow: 0 4px 14px rgba(217, 162, 27, .25); }
.btn.sm { width: auto; padding: 8px 12px; font-size: 13px; border-radius: 11px; box-shadow: none; }
.ghost { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--soft); border-radius: 12px; padding: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.ghost.full { display: flex; width: 100%; margin-top: 8px; }
.ghost.sm { padding: 7px 10px; font-size: 12.5px; }
.ghost:disabled { opacity: .4; }
.subrow { display: flex; gap: 8px; margin-top: 8px; }
.secondary { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border-radius: 12px; background: var(--soft); font-weight: 600; margin-top: 8px; font-size: 14px; }
.danger { color: var(--danger); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 12px -14px 0; padding: 0 14px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.nowrap { flex-wrap: nowrap; }
.chip { padding: 7px 13px; border-radius: 99px; background: var(--soft); font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; flex: none; }
.chip.sm { padding: 6px 11px; font-size: 12.5px; }
.chip.on { background: var(--text); color: #fff; }

/* Schlaf */
.sleep-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.big-num { font-size: 32px; line-height: 1.05; }
.qual { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--sleep-soft); border-radius: 12px; padding: 8px 11px; }
.qual small { font-size: 11.5px; color: var(--sleep); font-weight: 700; }
.qdots { display: flex; gap: 3px; }
.qdots i { width: 7px; height: 7px; border-radius: 50%; background: #D7D0EC; }
.qdots i.on { background: var(--sleep); }
.rangebar { position: relative; height: 10px; border-radius: 10px; background: var(--soft); margin: 12px 0 6px; }
.rangebar .band { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--sleep) 28%, white); border-radius: 10px; }
.rangebar .mark { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 3px; background: var(--sleep); box-shadow: 0 0 0 2px #fff; }
.status { font-weight: 700; }
.status.ok { color: var(--supp); } .status.low { color: var(--gym); } .status.high { color: var(--warn); }
.pill-line { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 99px; background: var(--soft); font-size: 12px; color: var(--muted); font-weight: 600; }
.sleeping { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.sleeping b { font-size: 16px; font-weight: 800; }
.night { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 11px; border-radius: 12px; background: var(--sleep-soft); font-size: 13px; color: #4F4384; }
.night span { flex: 1; }
.night button { font-size: 12.5px; font-weight: 700; }

/* Wasser */
.water-top { display: flex; align-items: center; gap: 14px; }
.ring { position: relative; width: 122px; height: 122px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 11; }
.ring .bgc { stroke: var(--water-soft); }
.ring .fgc { stroke: var(--water); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .big { font-size: 28px; line-height: 1; }
.ring .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.water-info { flex: 1; min-width: 0; }
.water-info .pct { font-size: 16px; font-weight: 800; }
.water-info .pct.ok { color: var(--water); }
.water-info .rest { color: var(--muted); font-size: 13px; margin-top: 1px; }
.pace { display: inline-block; margin-top: 7px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.pace.ok { background: var(--supp-soft); color: var(--supp); }
.pace.behind { background: var(--gym-soft); color: var(--gym); }
.bonus { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.btnrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.addbtn { background: var(--water-soft); color: #3F6F9F; border-radius: 14px; padding: 13px 4px; font-weight: 800; font-size: 16px; transition: transform .08s; }
.logtoggle { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.log { margin-top: 4px; border-top: 1px solid var(--line); }
.logrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.logrow .lt { color: var(--muted); font-variant-numeric: tabular-nums; width: 42px; }
.logrow .lm { font-weight: 700; }
.logrow .ld { flex: 1; color: var(--muted); font-size: 12.5px; }
.x { width: 30px; height: 30px; border-radius: 9px; background: var(--soft); color: var(--danger); display: grid; place-items: center; flex: none; }

/* Supplements */
.supp { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px; border-radius: 14px; background: var(--soft); margin-bottom: 7px; text-align: left; transition: background .15s, transform .08s; }
.supp:last-child { margin-bottom: 0; }
.check { width: 28px; height: 28px; border-radius: 9px; border: 2px solid #E3D9C3; display: grid; place-items: center; flex: none; color: transparent; transition: all .15s; background: var(--card); }
.supp .sname { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.supp .sname b { font-weight: 800; }
.supp .sname small { font-size: 12px; color: var(--muted); }
.supp .time { font-size: 12.5px; color: var(--muted); text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.supp .low { font-style: normal; font-size: 11px; font-weight: 700; color: var(--warn); }
.supp.done { background: var(--supp-soft); }
.supp.done .check { background: var(--supp); border-color: var(--supp); color: #fff; }
.supp.done .time { color: var(--supp); font-weight: 700; }

/* Gym */
.gym-done { display: flex; align-items: center; gap: 11px; padding: 11px; border-radius: 14px; background: var(--gym-soft); }
.gym-done b { font-weight: 800; }
.gym-done.rest { background: var(--soft); }
.nextplan { padding: 11px 13px; border-radius: 14px; background: var(--cream); margin-bottom: 8px; }
.nextplan b { display: block; font-size: 18px; font-weight: 900; letter-spacing: -0.02em; margin: 1px 0; }
.exlist { margin-top: 8px; }
.exrow { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; text-align: left; }
.exrow:last-child { border-bottom: 0; }
.exrow > span:last-child { text-align: right; }
.pr { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--yellow-deep); background: var(--cream); padding: 2px 6px; border-radius: 6px; margin-left: 6px; }
.prio { font-style: normal; font-size: 10px; font-weight: 800; color: var(--yellow-deep); background: var(--cream); padding: 1px 5px; border-radius: 5px; margin-left: 5px; }
.muschips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.muschips span { font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: var(--soft); color: var(--muted); font-weight: 600; }
.muschips b { color: var(--text); }
.week { margin-top: 12px; }

/* Plan-Ansicht */
.plan-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.ptable { border-top: 1px solid var(--line); }
.prow { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; }
.pnum { width: 22px; height: 22px; border-radius: 7px; background: var(--cream); color: var(--yellow-deep); font-size: 12px; font-weight: 800; display: grid; place-items: center; flex: none; margin-top: 1px; }
.pname { flex: 1; min-width: 0; font-size: 14px; }
.pname b { font-weight: 700; }
.pname small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; line-height: 1.35; }
.pmeta { text-align: right; flex: none; font-size: 13.5px; }
.pmeta b { font-weight: 800; white-space: nowrap; }
.pmeta small { display: block; font-size: 11.5px; color: var(--muted); }
.opt { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--soft); padding: 1px 6px; border-radius: 6px; margin-left: 6px; }
.tips { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; margin-top: 9px; line-height: 1.4; }
.tips div { padding-left: 10px; border-left: 3px solid var(--yellow); }
.vrow { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.vrow:last-of-type { border-bottom: 0; }
.planinfo { font-size: 13.5px; line-height: 1.5; }
.planinfo h4 { margin: 12px 0 3px; font-size: 14px; font-weight: 800; }
.planinfo h4:first-child { margin-top: 0; }
.planinfo ol { margin: 3px 0; padding-left: 20px; }
.planinfo p { margin: 5px 0; color: var(--muted); }

/* Übungen */
.exitem { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--muted); }
.exitem:last-child { border-bottom: 0; }
.exi-name { flex: 1; min-width: 0; color: var(--text); }
.exi-name b { font-weight: 700; font-size: 14px; display: block; }
.exi-name small { font-size: 11.5px; color: var(--muted); }
.exi-val { text-align: right; display: flex; flex-direction: column; align-items: flex-end; color: var(--text); font-size: 13px; }
.exi-val b { font-weight: 800; white-space: nowrap; }
.delta { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.delta.up { color: var(--supp); } .delta.down { color: var(--danger); } .delta.neu { color: var(--water); font-weight: 600; }
.exmeta { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 8px; }
.exmeta span { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--card); box-shadow: var(--shadow); }
.hist { padding: 9px 0; border-bottom: 1px solid var(--line); }
.hist:last-child { border-bottom: 0; }
.hist-h { display: flex; align-items: center; gap: 6px; }
.hist-h b { font-weight: 800; }
.hist-h .muted { margin-left: auto; }
.hist-sets { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 2px; }
.hist-sets span { font-size: 12.5px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--gym-soft); color: #9A5426; }

/* Eingabe-Fenster */
.sheet-bg { position: fixed; inset: 0; background: rgba(43, 38, 30, .35); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 30; }
.sheet-bg.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 92dvh; background: var(--bg); border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); z-index: 31; display: flex; flex-direction: column; }
.sheet.open { transform: translateY(0); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px 10px; border-bottom: 1px solid var(--line); }
.sheet-head b { font-size: 17px; font-weight: 900; letter-spacing: -0.02em; }
.sheet-body { overflow-y: auto; padding: 12px 14px calc(22px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }

/* Formulare */
.field { margin-bottom: 13px; }
.field > label, label.lbl { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
label.mini { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.inp { width: 100%; padding: 10px 11px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 16px; min-width: 0; font-weight: 500; }
.inp.strong { font-weight: 700; }
textarea.inp { resize: vertical; }
.inp:focus { outline: 2px solid var(--yellow); outline-offset: -1px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.listrow { display: flex; gap: 6px; margin-bottom: 6px; }
.listrow .inp { flex: 1; }
.del { width: 42px; border-radius: 12px; background: var(--soft); color: var(--danger); display: grid; place-items: center; flex: none; }
.del.muted { color: var(--muted); }
.del.sm { width: 32px; height: 40px; }
.durbox { margin: -3px 0 13px; padding: 9px 11px; border-radius: 12px; background: var(--sleep-soft); color: #4F4384; font-size: 14px; }
.qualrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.qbtn { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 7px 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.qbtn span { font-size: 19px; line-height: 1.1; font-weight: 900; }
.qbtn small { font-size: 10px; color: var(--muted); font-weight: 600; }
.qbtn.on { background: var(--yellow); border-color: var(--yellow); }
.qbtn.on small { color: var(--text); }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.stepper button { width: 38px; height: 34px; border-radius: 9px; background: var(--soft); font-size: 19px; font-weight: 700; }
.stepper b { min-width: 46px; text-align: center; }
.durrow { display: flex; gap: 8px; align-items: center; }
.durrow .inp { width: 92px; flex: none; }
.durrow .chips { overflow-x: auto; scrollbar-width: none; }
.planhdr { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border-radius: 14px; background: var(--cream); margin-bottom: 8px; }
.planhdr b { font-size: 16px; font-weight: 900; letter-spacing: -0.02em; }
.infotoggle { width: 100%; display: flex; align-items: center; gap: 6px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.sheet .planinfo { padding: 8px 4px 0; }
.excard { background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 10px; margin-bottom: 8px; }
.excard.complete { border-color: var(--supp); }
.exhead { display: flex; gap: 6px; }
.exhead .inp { flex: 1; font-weight: 700; }
.exhead2 { display: flex; align-items: flex-start; gap: 9px; }
.exnum { width: 26px; height: 26px; border-radius: 8px; background: var(--cream); color: var(--yellow-deep); font-weight: 800; font-size: 13px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.excard.complete .exnum { background: var(--supp); color: #fff; }
.exname { flex: 1; min-width: 0; }
.exname b { font-size: 14.5px; font-weight: 800; }
.exname small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.exnote { font-size: 12px; color: var(--muted); margin: 6px 2px 0; line-height: 1.4; }
.lasttime { font-size: 11.5px; color: var(--muted); margin: 6px 2px 0; }
.lasttime:empty { display: none; }
.hintline { font-size: 12px; font-weight: 700; margin: 5px 2px 0; color: var(--muted); }
.hintline.up { color: var(--supp); }
.hintline.new { color: var(--water); }
.hintline.big { font-size: 13px; padding: 8px 11px; background: var(--card); border-radius: 12px; box-shadow: var(--shadow); margin: 0 0 10px; }
.sets { margin-top: 7px; }
.setrow { display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.setrow .inp { flex: 1; text-align: center; padding: 8px 4px; background: var(--cream-2); }
.setn { width: 18px; font-size: 12px; color: var(--muted); font-weight: 700; text-align: center; flex: none; }
.x-mul { color: var(--muted); font-size: 13px; }
.setok { width: 38px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--muted); display: grid; place-items: center; flex: none; }
.setrow.done .setok { background: var(--supp); color: #fff; }
.setrow.done .inp { background: var(--supp-soft); border-color: transparent; }
.exfoot { display: flex; gap: 6px; margin-top: 3px; }
.exfoot .inp { flex: 1; font-size: 13px; padding: 8px 10px; }
.exfoot .ghost { flex: none; }
.restbar { display: none; position: relative; overflow: hidden; align-items: center; gap: 10px; padding: 9px 14px; background: var(--cream); border-bottom: 1px solid var(--line); }
.restbar.on { display: flex; }
.rb-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--yellow); opacity: .35; transition: width .25s linear; }
.rb-time { position: relative; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.rb-label { position: relative; flex: 1; font-size: 12.5px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.restbar button { position: relative; font-size: 12.5px; font-weight: 700; padding: 6px 10px; border-radius: 10px; background: var(--card); }

/* Statistik */
.stats4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--cream-2); border-radius: 14px; padding: 10px 11px; }
.stat b { display: block; font-size: 21px; line-height: 1.15; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 1px; }
.monthbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.monthbar b { font-size: 17px; font-weight: 900; letter-spacing: -0.02em; }
.monthbar .iconbtn { box-shadow: none; background: var(--soft); width: 36px; height: 36px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .wd { text-align: center; font-size: 11.5px; color: var(--muted); padding-bottom: 3px; font-weight: 600; }
.day { aspect-ratio: 1 / 1.12; border-radius: 10px; background: var(--soft); position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding-top: 4px; font-size: 13px; font-weight: 700; }
.day.empty { background: none; }
.day.future { opacity: .35; }
.day.today { box-shadow: inset 0 0 0 2px var(--text); }
.day .fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--water); opacity: .2; }
.day.goal .fill { opacity: .42; }
.day .n { position: relative; }
.day .dots { position: absolute; bottom: 5px; display: flex; gap: 2px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.dot.s { background: var(--supp); } .dot.g { background: var(--gym); } .dot.sl { background: var(--sleep); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.legend i.ltrend, .legend i.lgoal { width: 14px; height: 0; border-radius: 0; border-top: 2px dashed var(--text); opacity: .55; vertical-align: 3px; }
.legend i.lgoal { border-top-color: var(--muted); opacity: 1; }
.legend i.lband { width: 14px; height: 9px; border-radius: 3px; background: color-mix(in srgb, var(--sleep) 22%, white); vertical-align: -1px; }
.hrow { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 13.5px; }
.hl { width: 104px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htrack { flex: 1; height: 9px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.htrack i { display: block; height: 100%; border-radius: 6px; }
.hv { width: 54px; text-align: right; font-size: 12.5px; color: var(--muted); flex: none; font-weight: 600; }
.mini-stats { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.mini-stats b { color: var(--text); font-weight: 800; }
.heat { display: grid; gap: 4px; margin-top: 10px; align-items: center; justify-content: start; }
.heat .hm-l { font-size: 9.5px; color: var(--muted); font-weight: 600; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--line); max-height: 26px; }
.heat i.on { background: var(--supp); }
.heat i.pre, .heat i.fut { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.stockline { margin-top: 9px; font-size: 12.5px; color: var(--muted); }
.stockline.low { color: var(--warn); font-weight: 700; }
.insight { display: flex; gap: 10px; padding: 10px 11px; border-radius: 13px; background: var(--cream-2); margin-bottom: 7px; font-size: 13.5px; line-height: 1.45; }
.insight .ic { color: var(--yellow-deep); margin-top: 2px; }
.wkrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; font-size: 13.5px; }
.wkrow:last-child { border-bottom: 0; }
.wkrow .wd8 { width: 58px; color: var(--muted); font-size: 12.5px; flex: none; }
.wkrow .wt { flex: 1; font-weight: 700; }
.wkrow .wm { color: var(--muted); font-size: 12.5px; text-align: right; }

/* Grafiken */
.axchart { width: 100%; height: auto; display: block; overflow: visible; }
.axchart text { fill: var(--muted); font-size: 10px; font-family: var(--fh); font-weight: 500; }
.axchart text.unit { font-weight: 700; font-size: 9.5px; }
.axchart text.goaltxt { font-size: 9.5px; font-weight: 700; }
.axchart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.axchart .axis { stroke: #D9CFBA; stroke-width: 1; }
.axchart .goal { stroke: var(--text); stroke-width: 1.3; stroke-dasharray: 6 4; opacity: .4; }
.axchart .band { fill: color-mix(in srgb, var(--sleep) 14%, white); }
.axchart .hit { fill: transparent; cursor: pointer; }

/* Einstellungen */
.suppset { border: 1px solid var(--line); border-radius: 14px; padding: 9px; margin-bottom: 8px; }
.planday { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 7px; overflow: hidden; scroll-margin-top: 10px; }
.planday.open { padding: 0 9px; }
.planhead { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px; text-align: left; }
.planhead b { font-weight: 800; }
.planday.open .planhead { padding: 11px 2px; }
.planex { border-top: 1px solid var(--line); padding: 9px 0; }

/* Tab-Leiste */
nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
nav .inner { display: flex; width: 100%; max-width: 520px; }
nav button { flex: 1; padding: 8px 0 9px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
nav button .ic { padding: 3px 14px; box-sizing: content-box; border-radius: 99px; transition: background .2s; }
nav button.on { color: var(--text); font-weight: 800; }
nav button.on .ic { background: var(--yellow); }

.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--text); color: #fff; padding: 9px 15px; border-radius: 12px; font-size: 13.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; z-index: 40; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pop { animation: pop .6s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
