/* Kraftbuch – „Hantelscheibe“: Graphit, Kreide-Weiß, Akzent im Gelb der 15-kg-Wettkampfscheibe.
   Zahlen (Gewichte, Timer, Statistik) in Barlow Condensed wie auf einer Anzeigetafel. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(/fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(/fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600 700; font-display: swap; src: url(/fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700 800; font-display: swap; src: url(/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }

:root {
  --bg: #16181b; --card: #1f2226; --card2: #2a2e33; --line: #33383f;
  --text: #f1efea; --muted: #979ca4;
  --accent: #f2c230; --accent-d: #d9a916; --on-accent: #1d1a10;   /* Scheibengelb + dunkle Schrift darauf */
  --ok: #3fb66f; --ok-bg: rgba(63,182,111,.14);
  --danger: #e5484d;                                                /* rote 25-kg-Scheibe */
  --warm: #d8d2c2;                                                  /* Aufwärmsatz: helle 5-kg-Scheibe */
  --drop: #4c8df6;                                                  /* Dropsatz: blaue 20-kg-Scheibe */
  --pr: #f2c230;
  --radius: 18px; --radius-s: 12px; --tab-h: 64px;
  --num: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 500 16px/1.45 "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }
body { overscroll-behavior-y: contain; }
a { color: inherit; text-decoration: none; }
b, strong { font-weight: 600; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: var(--text); background: var(--card2); border: 1.5px solid transparent;
  border-radius: var(--radius-s); padding: 11px 13px; width: 100%; outline: none; transition: border-color .15s; }
input::placeholder, textarea::placeholder { color: #737881; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input[type="date"] { color-scheme: dark; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible { outline: none; }
[hidden] { display: none !important; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

#view { padding: calc(var(--safe-t) + 8px) 16px calc(var(--tab-h) + var(--safe-b) + 90px); max-width: 720px; margin: 0 auto; }

/* Tab-Leiste: aktiver Tab mit gelbem Strich wie eine Scheibenkante */
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: flex; background: rgba(22,24,27,.92); border-top: 1px solid var(--line); backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); z-index: 20; }
#tabbar a { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .01em; }
#tabbar a::before { content: ""; position: absolute; top: -1px; left: 32%; right: 32%; height: 3px; border-radius: 0 0 3px 3px;
  background: var(--accent); transform: scaleX(0); transition: transform .2s; }
#tabbar a.on { color: var(--text); }
#tabbar a.on svg { color: var(--accent); }
#tabbar a.on::before { transform: scaleX(1); }
body.in-workout #tabbar { display: none; }
body.in-workout #view { padding-bottom: calc(var(--safe-b) + 130px); }

/* Überschriften: schmal, kräftig, groß */
.topbar { display: flex; align-items: center; gap: 10px; min-height: 60px; position: sticky; top: 0; z-index: 10;
  background: rgba(22,24,27,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  margin: 0 -16px 8px; padding: calc(var(--safe-t)) 16px 0; }
.topbar h1 { font: 700 30px/1.1 var(--num); letter-spacing: .005em; margin: 0; flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { padding: 8px 6px 8px 0; display: flex; }
h2 { font: 700 21px/1.2 var(--num); letter-spacing: .01em; margin: 28px 0 12px; display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-s);
  padding: 12px 18px; font-weight: 600; background: var(--card2); transition: background .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; stroke-width: 2.2; }
.btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.btn.primary:active { background: var(--accent-d); }
/* Routinen-Karten: Starten ist wichtig, aber nicht die Hauptaktion des Bildschirms */
.btn.primary[data-start-routine] { background: rgba(242,194,48,.13); color: var(--accent); }
.btn.primary[data-start-routine]:active { background: rgba(242,194,48,.22); }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.small { padding: 8px 13px; font-size: 14.5px; border-radius: 10px; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: .45; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--muted); flex: none; }
.icon-btn:active { background: var(--card2); color: var(--text); }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,.035); }
a.card:active { background: #24282d; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Übungsbilder auf weißem Grund (die Animationen sind weiß hinterlegt) */
.thumb { width: 52px; height: 52px; border-radius: 14px; background: #fff; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; }
.thumb img { width: 108%; height: 108%; object-fit: contain; }
.thumb.sq { border-radius: 14px; }
.thumb.noimg { background: var(--card2); }
.thumb.noimg img { display: none; }
.gif-hero { background: #fff; border-radius: 22px; display: flex; justify-content: center; margin-bottom: 16px; overflow: hidden; }
.gif-hero img { width: 100%; max-width: 420px; aspect-ratio: 1; object-fit: contain; display: block; }
.gif-hero .no-img { display: none; padding: 40px 20px; text-align: center; color: #5d6168; }
.gif-hero.missing { background: var(--card); }
.gif-hero.missing .no-img { color: var(--muted); }
.gif-hero.missing img { display: none; }
.gif-hero.missing .no-img { display: block; }

.list-item { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .t { font-weight: 600; }
.list-item.sel { background: rgba(242,194,48,.1); margin: 0 -10px; padding: 11px 10px; border-radius: 14px; border-color: transparent; }
.check-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: flex; align-items: center; justify-content: center; }
.sel .check-dot { background: var(--accent); border-color: var(--accent); }
.sel .check-dot::after { content: "✓"; color: var(--on-accent); font-size: 15px; font-weight: 700; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; background: transparent; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--muted); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Segment-Tabs (Übersicht / Verlauf / So geht's) */
.tabs { display: flex; gap: 4px; background: var(--card); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.tabs button { flex: 1; padding: 9px 4px; color: var(--muted); font-weight: 600; border-radius: 10px; transition: background .15s, color .15s; }
.tabs button.on { color: var(--text); background: var(--card2); }
.search { position: relative; margin-bottom: 12px; }
.search input { padding-left: 42px; border-radius: 999px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }

/* ---------------------------------------------------------------- Training loggen */
.w-name { font-family: var(--num) !important; font-size: 30px !important; letter-spacing: .005em; }
.w-stats { display: flex; gap: 0; padding: 6px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.w-stats div { flex: 1; }
.w-stats div + div { padding-left: 14px; border-left: 1px solid var(--line); margin-left: 14px; }
.w-stats div b { display: block; font: 700 26px/1.1 var(--num); font-variant-numeric: tabular-nums; }
.w-stats div span { color: var(--muted); font-size: 13px; }
.wex { margin-bottom: 18px; background: var(--card); border-radius: var(--radius); padding: 14px 12px 12px; border: 1px solid rgba(255,255,255,.035); }
.wex .head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.wex .name { color: var(--text); font: 700 20px/1.15 var(--num); letter-spacing: .01em; }
.wex textarea { background: transparent; padding: 4px 0; border-radius: 0; border: 0; resize: none; min-height: 28px; color: var(--muted); font-size: 14px; }
.rest-pill { color: var(--accent); font-size: 14px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; padding: 6px 0; }
.rest-pill svg { width: 18px; height: 18px; }
.sets { width: 100%; border-collapse: separate; border-spacing: 0 5px; }
.sets th { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-align: center; padding: 4px 2px; }
.sets td { text-align: center; padding: 3px 3px; }
.sets tr.done td { background: var(--ok-bg); }
.sets tr.done td:first-child { border-radius: 10px 0 0 10px; } .sets tr.done td:last-child { border-radius: 0 10px 10px 0; }
.sets .setno { font: 700 19px/1 var(--num); width: 40px; height: 38px; border-radius: 10px; }
.setno.warmup { color: var(--warm); } .setno.drop { color: var(--drop); } .setno.failure { color: var(--danger); }
.sets .prev { color: var(--muted); font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sets input { text-align: center; padding: 8px 4px; width: 66px; background: var(--card2); font: 700 19px/1.1 var(--num);
  font-variant-numeric: tabular-nums; border-radius: 10px; }
.sets tr.done input { background: transparent; }
.sets .sec-in { position: relative; display: inline-block; }
.sets .sec-in input { padding-right: 24px; }
.sets .sec-in .sw { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 22px; height: 26px; border-radius: 7px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; line-height: 26px; padding: 0; }
.sets .ok { width: 40px; height: 38px; border-radius: 10px; background: var(--card2); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.sets tr.done .ok { background: var(--ok); color: #fff; }
.sets .ok svg { width: 20px; height: 20px; stroke-width: 2.8; }
.add-set { width: 100%; background: transparent; border: 1.5px dashed var(--line); color: var(--muted); border-radius: var(--radius-s); padding: 9px; font-weight: 600; margin-top: 6px; }

/* Pausentimer: die große Zahl ist das Wichtigste auf dem Bildschirm */
#rest-bar, #sw-bar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); z-index: 30; background: #24282d;
  border: 1px solid var(--line); border-radius: 22px; padding: 12px 14px 12px; box-shadow: 0 10px 34px rgba(0,0,0,.5);
  max-width: 704px; margin: 0 auto; }
#rest-bar .bar { height: 5px; background: var(--card2); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
#rest-bar .bar i { display: block; height: 100%; background: var(--accent); transition: width .25s linear; }
#sw-bar .time.reached { color: var(--accent); }
#rest-bar .time, #sw-bar .time { font: 700 44px/1 var(--num); font-variant-numeric: tabular-nums; flex: 1; text-align: center; letter-spacing: .01em; }
#active-banner { position: fixed; left: 10px; right: 10px; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 19;
  background: var(--accent); color: var(--on-accent); border-radius: 18px; padding: 13px 16px; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); font-weight: 700; max-width: 700px; margin: 0 auto; }

/* ---------------------------------------------------------------- Overlays */
.overlay { position: fixed; inset: 0; background: rgba(5,6,8,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { background: var(--card); width: 100%; max-width: 720px; border-radius: 24px 24px 0 0; padding: 8px 14px calc(14px + var(--safe-b));
  animation: up .22s cubic-bezier(.2,.8,.2,1); max-height: 88vh; overflow: auto; }
.sheet::before { content: ""; display: block; width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 2px auto 8px; }
.sheet h3 { margin: 4px 4px 10px; font-size: 15px; color: var(--muted); font-weight: 600; text-align: center; }
.sheet .opt { display: block; width: 100%; text-align: left; padding: 15px 12px; border-radius: 14px; font-size: 17px; font-weight: 500; }
.sheet .opt:active { background: var(--card2); }
.sheet .opt.danger { color: var(--danger); }
.full { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column; animation: up .22s cubic-bezier(.2,.8,.2,1); }
.full .full-head { padding: calc(var(--safe-t) + 8px) 16px 8px; }
.full .full-body { flex: 1; overflow: auto; padding: 0 16px 100px; }
.full .full-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 84px); transform: translateX(-50%); background: var(--text); color: var(--bg);
  font-weight: 600; padding: 11px 18px; border-radius: 999px; z-index: 90; box-shadow: 0 8px 26px rgba(0,0,0,.45); animation: fade .2s; white-space: nowrap; }

/* ---------------------------------------------------------------- Verlauf, Profil, Statistik */
h2.week { justify-content: flex-start; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
h2 .muted { font-family: "Barlow", sans-serif; font-weight: 500; letter-spacing: 0; }
.day .day-name { font: 700 21px/1.15 var(--num); letter-spacing: .01em; }
.day-ex { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.day-ex .thumb { border-radius: 10px; }
.day-ex .small.muted { font-variant-numeric: tabular-nums; }
.day-ex .setno { font-weight: 700; }
.nowrap { white-space: nowrap; }
.profile-card { display: flex; align-items: center; gap: 16px; }
.avatar { width: 80px; height: 80px; border-radius: 50%; flex: none; overflow: hidden; padding: 0; border: 3px solid var(--accent);
  background: var(--card2); color: var(--text); font: 700 30px/1 var(--num); cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-fields { flex: 1; min-width: 0; display: grid; gap: 8px; }
.profile-fields input { width: 100%; }
.cardio-set { padding: 4px 0 10px; }
.cardio-set + .cardio-set { border-top: 1px solid var(--line); padding-top: 12px; }
.cardio-run { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.cardio-time { font: 700 46px/1 var(--num); font-variant-numeric: tabular-nums; }
.cardio-hr { font-size: 20px; color: var(--muted); }
.cardio-hr b { font: 700 34px/1 var(--num); }
.cardio-done { gap: 10px; align-items: center; }
.cardio-done > b { font: 700 28px/1 var(--num); font-variant-numeric: tabular-nums; }
.cardio-in { gap: 8px; margin-top: 10px; }
.cardio-in input { width: 80px; text-align: center; }
.hr-hero { text-align: center; padding: 22px 14px; }
.hr-big b { font: 700 72px/1 var(--num); font-variant-numeric: tabular-nums; transition: color .3s; }
.hr-big span { color: var(--muted); margin-left: 6px; }
.hr-zone { margin-top: 6px; }
.hr-zrow { gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.hr-zrow i, .hr-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.hr-zrow b { min-width: 74px; text-align: right; font-variant-numeric: tabular-nums; }
.hr-zbar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--card2); }
.hr-avg b { font: 700 54px/1 var(--num); }
.hr-avg span { font-weight: 600; margin-left: 8px; }
.hr-chart { margin-top: 8px; }
.hr-chart text { fill: var(--muted); font-size: 11px; }
.hr-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.hr-legend i { margin-right: 6px; vertical-align: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--card); border-radius: 16px; padding: 12px 14px 14px; border: 1px solid rgba(255,255,255,.035); }
.stat { min-width: 0; }
.stat b { display: block; font: 700 clamp(22px, 7.6vw, 32px)/1.05 var(--num); font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.stat span { color: var(--muted); font-size: 13px; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 10px; stroke: none; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 96px; }
.bars div { flex: 1; background: var(--accent); border-radius: 6px 6px 3px 3px; min-height: 4px; }
.bars div:not(:last-child) { background: #4a4f57; }
.hbar { display: flex; align-items: center; gap: 10px; margin: 9px 0; font-size: 14.5px; }
.hbar .lbl { width: 120px; flex: none; }
.hbar .track { flex: 1; height: 8px; background: var(--card2); border-radius: 6px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.hbar b { font: 700 18px/1 var(--num); min-width: 22px; text-align: right; }
.pr { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pr:last-child { border: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(242,194,48,.14); color: var(--pr); border-radius: 8px; padding: 2px 8px; font-size: 12.5px; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 40px 14px; line-height: 1.5; }
.card.empty { padding: 28px 18px; border: 1.5px dashed var(--line); background: transparent; }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--card2); border-radius: 12px; }
.stepper button { width: 36px; height: 36px; font-size: 20px; color: var(--accent); }
.stepper span { min-width: 22px; text-align: center; font: 700 19px/1 var(--num); }
.login { max-width: 360px; margin: 16vh auto 0; text-align: center; }
.login h1 { font: 700 40px/1 var(--num); letter-spacing: .01em; margin: 6px 0 14px; }
.login .logo { width: 84px; height: 84px; border-radius: 22px; margin-bottom: 8px; }
.credit { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 30px; }

/* ---------------------------------------------------------------- Maße */
.m-grid { display: grid; grid-template-columns: 1fr .82fr 1fr; gap: 9px; }
/* Figur darf etwas in die Lücken neben der Mittelspalte ragen */
.body-fig { grid-column: 2; grid-row: 1 / span 6; width: calc(100% + 18px); margin: 0 -9px; height: 100%; max-height: 520px; align-self: center; overflow: visible; }
.body-fig .fig { fill: url(#kb-fig-shade); stroke: #8a919b; stroke-width: 1.1; stroke-linejoin: round; }
.body-fig .mark { opacity: 0; transition: opacity .2s; }
.body-fig .mark line { stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; }
.body-fig .mark circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.6; }
.body-fig .mark.on { opacity: 1; }
.m-tile.on { position: relative; z-index: 51; }
.m-tile.on.under { z-index: auto; }
.m-tile { text-align: left; background: var(--card); border: 1px solid rgba(255,255,255,.035); border-radius: 16px; padding: 9px 11px 10px; min-width: 0;
  display: flex; flex-direction: column; gap: 2px; transition: background .15s; }
.m-tile:active { background: #24282d; }
.m-tile .lbl { color: var(--muted); font-size: 13px; max-width: 100%; }
.m-tile b { font: 700 clamp(24px, 7.4vw, 32px)/1 var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-tile b small { font: 500 13px/1 "Barlow", sans-serif; color: var(--muted); margin-left: 3px; }
.m-tile.empty b { color: #5b616a; }
.m-tile.on { background: var(--accent); color: var(--on-accent); }
.m-tile.on .lbl, .m-tile.on b small, .m-tile.on.empty b { color: var(--on-accent); }
.whr { text-align: center; margin-top: 9px; }   /* gleicher Abstand wie zwischen den Kacheln */
.whr-title { font: 700 21px/1.2 var(--num); letter-spacing: .01em; }
.whr-val { font: 700 46px/1.1 var(--num); margin: 4px 0 2px; }
.whr-val.low { color: var(--drop); } .whr-val.mid { color: var(--ok); } .whr-val.high { color: var(--accent); }
.whr-scale { position: relative; height: 20px; font-size: 13px; color: var(--muted); }
.whr-scale span { position: absolute; transform: translateX(-50%); }
.whr-bar { position: relative; display: flex; height: 8px; margin: 6px 4px; }
.whr-bar i { flex: 1; } .whr-bar i:nth-child(1) { background: var(--drop); border-radius: 4px 0 0 4px; }
.whr-bar i:nth-child(2) { background: var(--ok); } .whr-bar i:nth-child(3) { background: var(--accent); border-radius: 0 4px 4px 0; }
.whr-bar b { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--card); border: 3px solid var(--text); transform: translate(-50%, -50%); }
.whr-lbl { display: flex; font-size: 14px; color: var(--muted); margin-top: 6px; }
.whr-lbl span { flex: 1; }
.m-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; }
.m-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.m-row b { font: 700 19px/1 var(--num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-delta { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.m-sheet h3 { font-size: 19px; color: var(--text); font-family: var(--num); font-weight: 700; margin-bottom: 12px; }
.m-card { position: relative; background: var(--card2); border-radius: 18px; padding: 14px 0 6px; }
.m-site, .m-name { display: block; margin: 0 16px; font-size: 17px; font-weight: 600; }
.m-name { width: calc(100% - 32px); background: var(--card); padding: 8px 12px; }
.m-val { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 10px 0 4px; }
.m-val input { width: 5.6ch; padding: 0; background: transparent; border: 0; border-bottom: 2px dashed transparent; border-radius: 0;
  text-align: center; font: 700 52px/1 var(--num); font-variant-numeric: tabular-nums; }
/* Feld so breit wie die Zahl („114,2“, „100,0“) – sonst wird die Nachkommastelle abgeschnitten */
@supports (field-sizing: content) { .m-val input { width: auto; min-width: 2ch; field-sizing: content; } }
.m-val input:focus { border-bottom-color: var(--accent); }
.m-val span { color: var(--muted); font-size: 17px; }
/* Lineal: Striche als Hintergrund (0,1 cm = 8 px), Zahlen nur je cm; die gelbe Mittellinie zeigt den Wert */
.ruler { position: relative; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; cursor: grab; padding-bottom: 6px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); }
.ruler::-webkit-scrollbar { display: none; }
.ruler-track { position: relative; height: 70px; width: calc(240 * 80px + 2px);   /* (RULER.max − RULER.min) cm × 80 px */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='38'%3E%3Cpath d='M1 0v38' stroke='%23f1efea' stroke-width='2'/%3E%3Cpath d='M41 0v27' stroke='%23979ca4' stroke-width='1.5'/%3E%3Cpath d='M9 0v18M17 0v18M25 0v18M33 0v18M49 0v18M57 0v18M65 0v18M73 0v18' stroke='%236b7179' stroke-width='1.5'/%3E%3C/svg%3E") 0 0 / 80px 38px repeat-x; }
.ruler-track span { position: absolute; bottom: 4px; transform: translateX(calc(-50% + 1px)); font: 600 20px/1 var(--num); color: var(--muted); }
.m-card::after { content: ""; position: absolute; left: 50%; bottom: 30px; width: 3px; height: 46px; transform: translateX(-50%);
  background: var(--accent); border-radius: 2px; pointer-events: none; }
.m-foot { display: flex; gap: 10px; margin-top: 14px; }
/* Maßband: Verbindungszustand unter dem Lineal */
.tape-row { margin-top: 10px; }
.tape-state { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 12px; background: var(--card2); border-radius: var(--radius-s); font-size: 14px; }
.tape-state i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.tape-state span { flex: 1; min-width: 0; }
.tape-state button { flex: none; color: var(--accent); font-weight: 600; }
.m-date { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--card2); border-radius: var(--radius-s); padding: 0 12px; min-width: 0; }
.m-date svg { flex: none; color: var(--muted); width: 22px; height: 22px; }
.m-date input { background: transparent; padding: 12px 0; font-size: 17px; min-width: 0; }
.m-foot .btn { flex: 1; font-size: 17px; }

/* ---------------------------------------------------------------- Profil: Körperdaten */
.stat-grid.two { grid-template-columns: repeat(2, 1fr); margin-bottom: 10px; }
.stat b small { font: 500 14px/1 "Barlow", sans-serif; color: var(--muted); margin-left: 3px; }
.stat-note { display: block; min-height: 1.3em; font-size: 12.5px !important; }
.body-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.body-fields label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.body-fields label:first-child { grid-column: 1 / -1; }
.body-fields span { color: var(--muted); font-size: 13px; }
.body-fields input, .body-fields select { width: 100%; min-width: 0; }
.remind-fields { grid-template-columns: 1fr; }

/* ---------------------------------------------------------------- Gewicht */
/* Energieverbrauch: echter bzw. geschätzter Verbrauch und Kalorien-Eintrag */
.e-title { font: 700 21px/1.2 var(--num); letter-spacing: .01em; }
.e-big { font: 700 40px/1.1 var(--num); font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.e-big small { font: 500 15px/1 "Barlow", sans-serif; color: var(--muted); margin-left: 5px; }
.e-card > .muted.small { display: block; line-height: 1.45; }
.e-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.e-form label:first-child { grid-column: 1 / -1; }
.e-form label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.e-form label span { color: var(--muted); font-size: 13px; }
.e-form input { width: 100%; min-width: 0; }
.e-form .btn { grid-column: 1 / -1; }
.w-hero { text-align: center; padding-top: 18px; }
.w-big { display: block; font: 700 64px/1.05 var(--num); font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.w-big small { font: 500 18px/1 "Barlow", sans-serif; color: var(--muted); margin-left: 5px; }
.w-hint { margin: 10px 4px 2px; line-height: 1.45; }
.w-hint b { color: var(--text); font-weight: 600; }
.w-card { padding: 10px 0 12px; }
.w-card::after { display: none; }   /* keine Lineal-Mittellinie */

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
