/* Schrift (lokal, keine Anfrage an Google) */
@font-face {
  font-family: "Manrope"; src: url("fonts/manrope.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

/* Farben (Hell & Dunkel) */
:root {
  --bg: #f4f5f1; --card: #ffffff; --fill: #e7e9e3; --line: #eef0eb; --border: #d5d8d1;
  --text: #16181a; --muted: #5e635f; --faint: #a9ada8;
  --ink: #16181a; --on-ink: #ffffff;
  --accent: #1f7a5a; --accent-soft: #e8f1ec;
  --drink: #b45309; --drink-soft: #fbebdd;
  --red: #c62828; --red-soft: #fbe5e3;
  --protein: #3b5bdb; --carbs: #2e9e74; --fat: #d9a400;
  --food: var(--accent);
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f110f; --card: #1a1d1b; --fill: #2a2e2b; --line: #262a27; --border: #353a36;
    --text: #f1f2ee; --muted: #a3a8a2; --faint: #6b706a;
    --ink: #f1f2ee; --on-ink: #16181a;
    --accent: #3dbe8b; --accent-soft: rgba(61, 190, 139, .16);
    --drink: #f0913a; --drink-soft: rgba(240, 145, 58, .16);
    --red: #ff6b5e; --red-soft: rgba(255, 107, 94, .16);
    --protein: #7c93f2; --carbs: #45c08f; --fat: #e8be3a;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 500 16px/1.35 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 560px; margin: 0 auto; padding: 8px 20px calc(110px + env(safe-area-inset-bottom)); }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 15px; font-weight: 800; margin: 0 0 12px; }
.page-head { display: flex; flex-direction: column; gap: 2px; margin: 36px 0 16px; }
.page-head .date { font-size: 13px; font-weight: 600; color: var(--muted); }
.section-title {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  margin: 24px 0 8px;
}
.section-title small { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.card { background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.muted { color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; }
.num { font-variant-numeric: tabular-nums; }
svg.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Buttons & Eingaben */
button, .btn {
  font: inherit; font-weight: 700; border: 0; border-radius: var(--radius); padding: 14px 16px; cursor: pointer;
  background: var(--ink); color: var(--on-ink); text-align: center; text-decoration: none; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
button:active, .btn:active { opacity: .7; }
button.secondary, .btn.secondary { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
button.link { background: none; color: var(--accent); padding: 4px 0; font-weight: 700; min-height: 0; }
button.plain { background: none; color: var(--faint); padding: 0; width: 36px; min-height: 36px; }
button:disabled { opacity: .35; cursor: default; }
input[type=file] { display: none; }
input[type=text], input[type=number], input[type=email], input[type=password], input[type=date], input[type=time], textarea {
  font: inherit; font-weight: 600; width: 100%; padding: 12px; border-radius: var(--radius); min-width: 0;
  border: 1px solid var(--border); background: var(--card); color: var(--text); outline: none;
}
.card input, .card textarea, .sheet .card input { background: var(--bg); }
textarea { resize: vertical; min-height: 96px; line-height: 1.4; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
label.field { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 12px 0 6px; }

/* Tageszusammenfassung: Ring + Tabelle + Makros */
.summary { display: flex; flex-direction: column; gap: 16px; }
.summary-top { display: flex; align-items: center; gap: 20px; }
.ring { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.ring svg { width: 140px; height: 140px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 14; transition: stroke-dasharray .4s, stroke-dashoffset .4s; }
.ring .track { stroke: var(--fill); }
.ring .food { stroke: var(--accent); stroke-linecap: round; }
.ring .drink { stroke: var(--drink); }
.ring.over .food { stroke: var(--red); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center .big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-center .lbl { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.ring.over .ring-center .big { color: var(--red); }
.totals { flex: 1; min-width: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.totals > div { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.totals > div + div { border-top: 1px solid var(--line); }
.totals span:first-child { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.totals span:last-child { font-weight: 700; }
.mark { width: 3px; height: 14px; border-radius: 2px; background: var(--border); flex-shrink: 0; }
.mark.food { background: var(--accent); }
.mark.drink { background: var(--drink); }
.macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-top: 12px; }
.macro { display: flex; flex-direction: column; gap: 6px; padding: 0 12px; }
.macro:first-child { padding-left: 0; }
.macro:last-child { padding-right: 0; }
.macro + .macro { border-left: 1px solid var(--line); }
.macro .l { font-size: 12px; font-weight: 600; color: var(--muted); }
.macro .v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.macro .v span { color: var(--muted); font-weight: 600; }
.thin { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.thin > div { height: 100%; border-radius: 2px; transition: width .4s; }

/* Aufnahme-Buttons */
.capture { display: grid; grid-template-columns: 1fr 60px 60px; gap: 8px; }
.capture .photo { height: 56px; padding: 0 14px; font-size: 16px; white-space: nowrap; min-width: 0; }
.capture .photo > span { display: flex; align-items: center; gap: 10px; }
.capture .square { height: 56px; padding: 0; }
.capture .drink-btn { background: var(--drink-soft); color: var(--drink); }

/* Fortschritt (Login u. a.) */
.bar { height: 6px; background: var(--fill); border-radius: 3px; overflow: hidden; margin: 12px 0 8px; }
.bar > div { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }

/* Analyse-Ergebnis */
.preview { width: 100%; border-radius: var(--radius); max-height: 280px; object-fit: cover; display: block; }
.quote { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: var(--radius); padding: 12px; font-size: 14px; }
.quote svg.icon { width: 18px; height: 18px; color: var(--muted); margin-top: 1px; }
.preview + .quote, .preview + .spinner, .quote + .spinner { margin-top: 12px; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 14px; }
.result-head .kcal-big { display: flex; flex-direction: column; align-items: flex-end; }
.result-head .kcal-big b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.result-head .kcal-big span { font-size: 12px; font-weight: 600; color: var(--muted); }
.result-head input { font-size: 18px; font-weight: 800; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; margin-top: 8px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.badge.niedrig { background: var(--drink-soft); color: var(--drink); }
.items { list-style: none; margin: 14px 0 0; padding: 0; font-size: 15px; }
.items li { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; }
.items li + li { border-top: 1px solid var(--line); }
.items .n { flex: 1; font-weight: 600; }
.items .p { font-size: 13px; color: var(--muted); font-weight: 600; text-align: right; }
.items .k { width: 52px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.spinner { text-align: center; padding: 20px; color: var(--muted); font-weight: 600; }
.error { color: var(--red); font-weight: 600; }
.macro-inputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.macro-inputs label.field { margin-top: 14px; }
.macro-inputs input { padding: 10px 8px; text-align: center; font-variant-numeric: tabular-nums; }

/* Segmentierte Auswahl (Portion, Zeitraum) */
.segmented { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; background: var(--fill); border-radius: calc(var(--radius) + 2px); }
.segmented button {
  background: none; color: var(--text); padding: 0; min-height: 38px; font-size: 14px; font-weight: 700; border-radius: 8px;
}
.segmented button.active { background: var(--card); font-weight: 800; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
#range { margin-bottom: 16px; }

/* Schnellauswahl-Kacheln */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile {
  background: var(--card); border-radius: var(--radius); padding: 12px 8px; min-height: 112px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px;
  text-align: center; color: var(--text); font-weight: 500;
}
.tile .thumb {
  width: 46px; height: 46px; border-radius: 8px; object-fit: cover; background: var(--fill); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.tile .t-name {
  font-size: 13px; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile .t-kcal { font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.tile.drinks { background: var(--drink-soft); }
.tile.drinks .thumb { background: transparent; color: var(--drink); }
.tile.drinks .thumb svg.icon { width: 28px; height: 28px; }
.tile.drinks .t-kcal { color: var(--drink); }
.tile.placeholder { background: transparent; border: 1.5px dashed var(--border); color: var(--muted); justify-content: center; font-size: 12px; font-weight: 600; }

/* Listen */
.list { background: var(--card); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.list .empty-row { padding: 14px; color: var(--muted); font-weight: 600; }
.meal, .kv, .list-row, .option {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; position: relative; min-height: 48px;
}
.meal + .meal, .kv + .kv, .list-row + .list-row, .option + .option, .kv + .option { border-top: 1px solid var(--line); }
.meal { padding-right: 6px; }
.meal .mark { height: 34px; background: var(--accent); }
.meal.drink .mark { background: var(--drink); }
.meal .time { width: 38px; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.meal .info { flex: 1; min-width: 0; }
.meal .name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meal .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.meal .kcal { font-size: 15px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.meal .plain svg.icon { width: 16px; height: 16px; }
.kv span:first-child { flex: 1; font-weight: 600; }
.kv span:last-child { color: var(--muted); text-align: right; font-weight: 600; }
.list-row { justify-content: space-between; font-size: 15px; }
.list-row .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.list-row .r { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; }
.option { width: 100%; background: none; color: var(--text); font-weight: 600; border-radius: 0; justify-content: flex-start; padding: 12px 14px; text-decoration: none; }
.option .o-icon {
  width: 32px; height: 32px; border-radius: 8px; background: var(--fill); color: var(--text);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.option .o-icon.accent { background: var(--accent-soft); color: var(--accent); }
.option .o-icon.drink { background: var(--drink-soft); color: var(--drink); }
.option .o-icon svg.icon { width: 18px; height: 18px; }
.option .o-text { flex: 1; text-align: left; }
.option .o-text small { display: block; color: var(--muted); font-size: 13px; font-weight: 500; margin-top: 2px; }
.option .chev { color: var(--faint); width: 18px; height: 18px; }

/* Balkendiagramm */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; position: relative; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; min-width: 0; }
.chart .col > div { border-radius: 3px; }
.chart .col > div[style*="height:0%"] { display: none; }
.chart .seg-food { background: var(--food); }
.chart .seg-drink { background: var(--drink); }
.chart .col.over .seg-food { background: var(--faint); }
.chart .goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--faint); pointer-events: none; }
.chart-labels { display: flex; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 6px; }
.chart-labels span { flex: 1; text-align: center; min-width: 0; white-space: nowrap; overflow: visible; }
.legend { display: flex; gap: 14px; font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 12px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }

/* Analyse */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.kpi .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v .muted { font-size: 15px; }
.kpi .l { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.stack { display: flex; height: 12px; overflow: hidden; margin: 4px 0; background: var(--fill); gap: 2px; border-radius: 6px; }
.hbar { display: grid; grid-template-columns: 92px 1fr 60px; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; font-weight: 600; }
.hbar .track { height: 6px; background: var(--fill); border-radius: 3px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--food); border-radius: 3px; }
.hbar .fill.drink { background: var(--drink); }
.hbar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.empty { text-align: center; padding: 36px 20px; }
.empty-icon { width: 56px; height: 56px; border-radius: var(--radius); background: var(--fill); color: var(--muted); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.empty-icon svg.icon { width: 28px; height: 28px; }
.empty p { margin: 0; }

/* Tab-Leiste */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: color-mix(in srgb, var(--card) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border); padding: 0 0 env(safe-area-inset-bottom); z-index: 10;
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px;
  font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none;
  border-top: 3px solid transparent; margin-top: -1px; padding-bottom: 6px;
}
.tabbar a.active { color: var(--text); font-weight: 800; border-top-color: var(--accent); }

/* Bottom-Sheets (Drinks, Manuell) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; z-index: 21;
  background: var(--bg); border-radius: 20px 20px 0 0; padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
  max-height: 90vh; overflow-y: auto; animation: up .28s cubic-bezier(.2,.9,.3,1);
}
@keyframes up { from { transform: translateY(100%); } }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 6px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 14px; }
.sheet-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.sheet-head .close { width: 44px; height: 44px; padding: 0; border-radius: 22px; background: var(--fill); color: var(--text); }
.sheet-head .close svg.icon { width: 18px; height: 18px; }
.sheet .section-title { margin-top: 18px; }
.sheet .muted.today { margin: -8px 0 4px; font-weight: 600; font-size: 13px; }

/* Drinks als Kacheln */
.drink-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.drink-grid .empty-row { grid-column: 1 / -1; padding: 4px 0; color: var(--muted); font-weight: 600; }
.drink-tile {
  background: var(--card); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s;
}
.drink-tile.active { box-shadow: inset 0 0 0 2px var(--drink); }
.drink-tile .name { font-size: 15px; font-weight: 700; line-height: 1.25; }
.drink-tile .muted { font-size: 12px; font-weight: 600; margin-top: 2px; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--fill); border-radius: 8px; }
.stepper button {
  width: 44px; min-height: 40px; padding: 0; border-radius: 8px; font-size: 22px; font-weight: 600; line-height: 1;
  background: none; color: var(--text);
}
.stepper .count { min-width: 28px; text-align: center; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper .count.zero { color: var(--muted); font-weight: 600; }
.drink-tile.active .stepper { background: var(--drink-soft); }
.drink-tile.active .stepper .count { color: var(--drink); }
.submit { width: 100%; margin-top: 4px; min-height: 56px; font-size: 16px; }
.sheet .submit { position: sticky; bottom: 0; margin-top: 16px; background: var(--drink); color: #fff; box-shadow: 0 -12px 16px var(--bg); }

/* Toast */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: 528px; margin: 0 auto;
  background: var(--ink); color: var(--on-ink); border-radius: var(--radius); padding: 14px 16px; z-index: 30;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; font-weight: 600;
}
.toast button { background: none; color: inherit; padding: 0; min-height: 0; text-decoration: underline; text-underline-offset: 3px; }

/* Listenzeilen innerhalb von Karten (Analyse) */
.card .list-row { padding-left: 0; padding-right: 0; }
.card .kpi { background: var(--bg); }
.section-title button { text-transform: none; font-size: 14px; letter-spacing: 0; }
.danger { color: var(--red) !important; }

/* Bestätigungsdialog */
.alert-backdrop {
  position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .15s;
}
.alert { width: 280px; border-radius: 14px; overflow: hidden; text-align: center; background: var(--card); animation: pop .18s ease-out; }
@keyframes pop { from { transform: scale(1.06); opacity: 0; } }
.alert-text { padding: 22px 18px; font-size: 16px; font-weight: 700; }
.alert-buttons { display: flex; border-top: 1px solid var(--line); }
.alert-buttons button { flex: 1; background: none; color: var(--text); font-weight: 600; border-radius: 0; padding: 14px; }
.alert-buttons button + button { border-left: 1px solid var(--line); }
.alert-buttons .strong { font-weight: 800; color: var(--accent); }
.alert-buttons .destructive { color: var(--red); font-weight: 800; }
.alert .form { padding: 0 16px 16px; text-align: left; }
.alert .form input { background: var(--bg); }

/* Datum & Uhrzeit */
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; min-height: 46px; text-align: left; }
input[type=date]::-webkit-date-and-time-value, input[type=time]::-webkit-date-and-time-value { text-align: left; }
.card.when { padding: 4px 14px 14px; margin: 0 0 4px; }

/* Tagesnavigation */
.day-nav { flex-direction: row; justify-content: space-between; align-items: flex-end; }
.day-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.day-arrows { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; flex-shrink: 0; }
.day-arrow { width: 44px; min-height: 40px; padding: 0; border-radius: 0; background: var(--card); color: var(--text); }
.day-arrow + .day-arrow { border-left: 1px solid var(--border); }
.day-arrow svg.icon { width: 18px; height: 18px; }
.day-arrow:disabled { opacity: 1; color: var(--faint); }

/* Einträge antippbar */
.meal[data-edit] { cursor: pointer; }
.meal[data-edit]:active { background: var(--bg); }

/* Drinks bearbeiten */
.edit-tools { display: flex; align-items: center; justify-content: space-between; gap: 4px; background: var(--fill); border-radius: 8px; }
.edit-tools .plain { color: var(--text); width: 40px; min-height: 40px; }
.edit-tools .plain svg.icon { width: 18px; height: 18px; }
.edit-tools .plain:disabled { color: var(--faint); opacity: 1; }
.edit-tools .plain.remove { color: var(--red); background: none; }
.sheet .submit:disabled { opacity: 1; background: var(--fill); color: var(--muted); box-shadow: 0 -12px 16px var(--bg); }
.edit-drink { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.edit-drink .name { font-size: 16px; font-weight: 700; }
.edit-drink .stepper { width: 140px; }

/* Gewicht */
.weight-now { text-align: left; }
.weight-big { font-size: 52px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 4px 0; font-variant-numeric: tabular-nums; }
.weight-big span { font-size: 22px; font-weight: 600; color: var(--muted); }
.kpi .v.good { color: var(--accent); }
.kpi .v.bad { color: var(--red); }
.weight-chart { width: 100%; height: auto; display: block; overflow: visible; }
.weight-chart .grid { stroke: var(--line); stroke-width: 1; }
.weight-chart .axis { fill: var(--muted); font-size: 10px; font-family: inherit; }
.weight-chart .pt { fill: var(--faint); }
.weight-chart .trend { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.weight-chart .target { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 4; }
.note-card strong { display: block; margin-bottom: 4px; }
.note-card p { margin: 0 0 12px; }
.sync-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 4px 12px; font-size: 14px; }
.section-title.split { display: flex; justify-content: space-between; align-items: baseline; }
.section-title.split button { text-transform: none; letter-spacing: 0; font-size: 15px; }
.list-row .r .plain { padding: 0 0 0 8px; vertical-align: middle; }
.kpi .l .hint { font-size: 12px; color: var(--faint); }

/* Körperzusammensetzung */
.comp-bar { display: flex; height: 16px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--fill); }
.hint-line { font-size: 12px; margin: 10px 2px 0; }
.metric-tiles { margin-top: 0; }
.metric-tile {
  display: block; width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--card);
  border: 0; cursor: pointer; position: relative; padding-bottom: 38px; font-weight: 500;
}
.metric-tile:active { opacity: .75; }
.metric-tile .l { margin: 0 0 2px; }
.metric-tile .v { font-size: 22px; }
.metric-tile .delta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.metric-tile .delta.good, .loss .good { color: var(--accent); }
.metric-tile .delta.bad, .loss .bad { color: var(--red); }
.metric-tile .spark { position: absolute; left: 14px; right: 14px; bottom: 10px; width: calc(100% - 28px); height: 24px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 10px; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: 0 0 auto; font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer;
}
.chips button.active { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

/* Was du abgenommen hast */
.loss-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.loss-head .v { font-size: 30px; font-weight: 800; }
.loss-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 12px; }
.loss-split div { background: var(--bg); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.loss-split strong { font-size: 18px; }
.loss-verdict { margin: 0; line-height: 1.45; }

/* Messungen aufklappbar */
.measure + .measure { border-top: 1px solid var(--line); }
.measure.has-details .list-row { cursor: pointer; }
.measure-details { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0 16px 12px; font-size: 13px; color: var(--muted); }
.spark polyline { stroke: var(--faint); }
.spark.good polyline { stroke: var(--accent); }
.spark.bad polyline { stroke: var(--red); }
