/* Übungsstatistik mit Bestwert (partials/screens/rekord.php) – exercise_stats_detail_page.dart */

/* Bestwert als Zähler (AppCountUp: 0 → Wert in 900 ms, easeOutCubic) */
@property --vf-rk-n { syntax: '<integer>'; inherits: false; initial-value: 85; }

/* Fixe Farben der dunklen Hero-Bühne (AppHeroColors, in beiden Modi gleich) */
.vf-phone { --a-hero-text: #F2F4F8; --a-hero-muted: #9AA1AE; --a-hero-tile: rgba(255,255,255,.08); }

/* Kopf ohne Titel; der Seitentitel erscheint dort erst, wenn er hinausgescrollt ist */
.vf-screen--rekord .vf-rk-ctitle { opacity: 0; transition: opacity .2s; }
.vf-screen--rekord .vf-rk-view { position: absolute; left: 0; right: 0; top: 114px; bottom: 0; overflow: hidden; }
.vf-screen--rekord .vf-rk-page { padding: 16px; transition: transform .45s cubic-bezier(.33,1,.68,1); }

/* AppPageTitle: Eyebrow 13 + Titel 28 */
.vf-screen--rekord .vf-rk-eyebrow { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 700; color: var(--a-muted); }
.vf-screen--rekord .vf-rk-title { margin-bottom: 20px; font-size: 28px; font-weight: 800; letter-spacing: -.8px; line-height: 1.12; }

/* Hero-Karte „Personal Record“ (Radius 20, Padding 20, Pokal 130 mit 8 % Deckkraft) */
.vf-screen--rekord .vf-rk-pr { position: relative; overflow: hidden; padding: 20px; margin-bottom: 16px; border-radius: 20px; background: var(--a-hero); color: var(--a-hero-text); }
.vf-screen--rekord .vf-rk-pr__cup { position: absolute; right: -4px; top: -4px; width: 130px; height: 130px; opacity: .08; }
.vf-screen--rekord .vf-rk-pr small { display: flex; align-items: center; }
.vf-screen--rekord .vf-rk-pr__badge { gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .6px; color: var(--a-blue); }
.vf-screen--rekord .vf-rk-pr__badge .hi { width: 16px; height: 16px; }
.vf-screen--rekord .vf-rk-pr__what { gap: 5px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--a-hero-muted); }
.vf-screen--rekord .vf-rk-pr__what .hi { width: 14px; height: 14px; }
.vf-screen--rekord .vf-rk-pr__val { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; font-variant-numeric: tabular-nums; }
.vf-screen--rekord .vf-rk-val { --vf-rk-n: 85; counter-reset: rk var(--vf-rk-n); font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; }
.vf-screen--rekord .vf-rk-val::before { content: counter(rk) " kg"; }
.vf-screen--rekord .vf-rk-pr__val span { padding-bottom: 4px; font-size: 18px; font-weight: 700; color: var(--a-hero-muted); }
.vf-screen--rekord .vf-rk-pr__date { margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--a-hero-muted); font-variant-numeric: tabular-nums; }
.vf-screen--rekord .vf-rk-pr__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.vf-screen--rekord .vf-rk-pr__chips span { padding: 5px 10px; border-radius: 999px; background: var(--a-hero-tile); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Zeitraum + Kennzahl-Chips (_MetricChip: gewählt = Akzent-Fläche mit Akzent-Rand) */
.vf-screen--rekord .vf-rk-seg { margin-bottom: 16px; }
.vf-screen--rekord .vf-rk-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; padding: 6px 0; }
.vf-screen--rekord .vf-rk-metrics span { padding: 7px 12px; border-radius: 999px; background: var(--a-card); border: 1px solid var(--a-divider); font-size: 13px; font-weight: 700; }
.vf-screen--rekord .vf-rk-metrics .is-active { background: var(--a-soft); border-color: var(--a-blue-t); color: var(--a-blue-t); }

/* Diagramm-Karte (Padding 8/18/16/8, Höhe 200; links 48 für die Achse, unten 24 für die Daten) */
.vf-screen--rekord .vf-rk-chart { position: relative; height: 226px; padding: 18px 16px 8px 8px; border-radius: 20px; background: var(--a-card); border: 1px solid var(--a-divider); }
.vf-screen--rekord .vf-rk-y { position: absolute; left: 8px; top: 18px; width: 36px; height: 176px; }
.vf-screen--rekord .vf-rk-y span { position: absolute; right: 0; transform: translateY(-50%); font-size: 11px; color: var(--a-muted); font-variant-numeric: tabular-nums; }
.vf-screen--rekord .vf-rk-y span:nth-child(1) { top: 0; } .vf-screen--rekord .vf-rk-y span:nth-child(2) { top: 20%; }
.vf-screen--rekord .vf-rk-y span:nth-child(3) { top: 40%; } .vf-screen--rekord .vf-rk-y span:nth-child(4) { top: 60%; }
.vf-screen--rekord .vf-rk-y span:nth-child(5) { top: 80%; } .vf-screen--rekord .vf-rk-y span:nth-child(6) { top: 100%; }
.vf-screen--rekord .vf-rk-plot { position: absolute; left: 56px; right: 16px; top: 18px; bottom: 8px; clip-path: inset(-40px -40px -20px -20px); transition: clip-path .8s cubic-bezier(.65,0,.35,1); }
.vf-screen--rekord .vf-rk-plot svg { display: block; width: 100%; height: 176px; overflow: visible; }
.vf-screen--rekord .vf-rk-grid { fill: none; stroke: var(--a-divider); stroke-width: 1; }
.vf-screen--rekord .vf-rk-area { fill: color-mix(in srgb, var(--a-blue-t) 10%, transparent); }
.vf-screen--rekord .vf-rk-line { fill: none; stroke: var(--a-blue-t); stroke-width: 2.5; stroke-linecap: round; }
.vf-screen--rekord .vf-rk-dot { fill: var(--a-blue-t); }
.vf-screen--rekord .vf-rk-best { fill: var(--a-card); stroke: var(--a-blue-t); stroke-width: 2.5; }
.vf-screen--rekord .vf-rk-x { position: relative; height: 24px; }
.vf-screen--rekord .vf-rk-x span { position: absolute; top: 6px; font-size: 11px; color: var(--a-muted); font-variant-numeric: tabular-nums; transform: translateX(-50%); }
.vf-screen--rekord .vf-rk-x span:nth-child(1) { left: 0; }
.vf-screen--rekord .vf-rk-x span:nth-child(2) { left: 47.06%; }
.vf-screen--rekord .vf-rk-x span:nth-child(3) { right: 0; transform: none; }

/* Verlauf (AppSectionHeader + Karte mit Zeilen; Rekord-Pille grün) */
.vf-screen--rekord .vf-rk-sec { height: 44px; margin: 20px 0 4px; display: flex; align-items: center; font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.vf-screen--rekord .vf-rk-hist { padding: 4px 16px; border-radius: 20px; background: var(--a-card); border: 1px solid var(--a-divider); }
.vf-screen--rekord .vf-rk-row { display: flex; align-items: center; padding: 12px 0; }
.vf-screen--rekord .vf-rk-row + .vf-rk-row { border-top: 1px solid var(--a-divider); }
.vf-screen--rekord .vf-rk-row > div:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.vf-screen--rekord .vf-rk-row strong { font-size: 14px; font-weight: 700; }
.vf-screen--rekord .vf-rk-row small { font-size: 12px; color: var(--a-muted); font-variant-numeric: tabular-nums; }
.vf-screen--rekord .vf-rk-row__val { display: flex; flex-direction: column; align-items: flex-end; }
.vf-screen--rekord .vf-rk-row__val > span { display: flex; align-items: center; gap: 6px; }
.vf-screen--rekord .vf-rk-row__val b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vf-screen--rekord .vf-rk-pill { padding: 6px 10px; border-radius: 999px; background: var(--a-field); color: var(--a-green); font-style: normal; font-size: 12px; font-weight: 700; }
.vf-screen--rekord .vf-rk-more { display: block; padding: 12px 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--a-blue-t); }

/* ── Ablauf „rekord“ (Startzustand nur, wenn der Ablauf läuft – sonst Endzustand) ──
   1: Seite geöffnet – Bestwert zählt hoch, Linie zeichnet sich bis zum Rekord-Punkt */
.vf-screen--rekord .vf-rk-val[data-step] { --vf-rk-n: 0; transition: --vf-rk-n .9s cubic-bezier(.33,1,.68,1); }
.vf-screen--rekord .vf-rk-plot[data-step] { clip-path: inset(-40px 100% -20px -20px); }
.s1 .vf-screen--rekord .vf-rk-val[data-step] { --vf-rk-n: 85; }
.s1 .vf-screen--rekord .vf-rk-plot[data-step] { clip-path: inset(-40px -40px -20px -20px); }
/* 2: nach unten scrollen – Verlauf mit „Rekord“, Titel erscheint im Kopf */
.s2 .vf-screen--rekord .vf-rk-page { transform: translateY(-330px); }
.s2 .vf-screen--rekord .vf-rk-ctitle { opacity: 1; }
