/* Laufendes Workout, Fokusansicht (partials/screens/workout.php) – workout_focus_view.dart, active_workout_page.dart */

/* Restzeit der Pausen-Uhr als Zähler (läuft in Echtzeit, sobald die Pause beginnt) */
@property --vf-wo-t { syntax: '<integer>'; inherits: true; initial-value: 150; }
@property --vf-wo-m { syntax: '<integer>'; inherits: true; initial-value: 2; }
@property --vf-wo-s { syntax: '<integer>'; inherits: true; initial-value: 30; }
@keyframes vfWoCount { to { --vf-wo-t: 0; } }
@keyframes vfWoDrain { to { stroke-dashoffset: 100; } }

/* Kopf (Höhe 64): Zurück · Name + „Übung 4/8 · 12/27 Sätze“ · Laufzeit-Pille · Menü */
.vf-screen--workout .vf-wo-bar { height: 64px; display: flex; align-items: center; gap: 8px; }
.vf-screen--workout .vf-wo-circle { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--a-card); border: 1px solid var(--a-divider); }
.vf-screen--workout .vf-wo-circle .hi { width: 20px; height: 20px; }
.vf-screen--workout .vf-wo-bar__title { flex: 1; min-width: 0; margin-left: 4px; display: flex; flex-direction: column; gap: 2px; }
.vf-screen--workout .vf-wo-bar__title strong { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf-screen--workout .vf-wo-bar__title small { font-size: 12px; font-weight: 600; color: var(--a-muted); font-variant-numeric: tabular-nums; }
.vf-screen--workout .vf-wo-clock { height: 44px; padding: 0 14px; display: flex; align-items: center; gap: 6px; border-radius: 999px; background: var(--a-card); border: 1px solid var(--a-divider); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vf-screen--workout .vf-wo-clock .hi { width: 16px; height: 16px; color: var(--a-blue-t); }
.vf-screen--workout .vf-wo-y, .vf-screen--workout .vf-wo-b { display: none; }

/* Satz-Pillen: erledigt = Akzent, aktuell = Textfarbe (6 hoch), offen = Linie */
.vf-screen--workout .vf-wo-line { display: flex; align-items: center; gap: 3.3px; height: 6px; margin: 4px 0 12px; }
.vf-screen--workout .vf-wo-line i { flex: 1; height: 5px; border-radius: 999px; background: var(--a-divider); transition: background-color .25s, height .25s; }
.vf-screen--workout .vf-wo-line .is-done { background: var(--a-blue); }
.vf-screen--workout .vf-wo-line .is-cur { height: 6px; background: var(--a-text); }

/* Übungs-Kacheln 96 × 76 in Kategoriefarbe, aktive mit Ring; rechts „+“ (52 × 76) */
.vf-screen--workout .vf-wo-strip { display: flex; align-items: center; height: 84px; margin: 0 -16px 8px; }
.vf-screen--workout .vf-wo-strip__list { flex: 1; min-width: 0; display: flex; gap: 10px; padding: 4px 0; overflow: hidden; }
.vf-screen--workout .vf-wo-tile { position: relative; flex-shrink: 0; width: 96px; height: 76px; border-radius: 16px; background: var(--a-blue); }
.vf-screen--workout .vf-wo-tile:first-child { margin-left: -90px; }
.vf-screen--workout .vf-wo-tile[data-c="violet"] { background: var(--a-violet); }
.vf-screen--workout .vf-wo-tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(transparent 45%, rgba(0,0,0,.35)); }
.vf-screen--workout .vf-wo-tile.is-active { outline: 2px solid var(--a-text); outline-offset: 2px; }
.vf-screen--workout .vf-wo-tile b { position: absolute; left: 8px; right: 8px; bottom: 6px; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.2; text-shadow: 0 0 4px rgba(0,0,0,.5); }
.vf-screen--workout .vf-wo-tile i { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--a-blue); }
.vf-screen--workout .vf-wo-tile[data-c="violet"] i { color: var(--a-violet); }
.vf-screen--workout .vf-wo-tile i .hi { width: 12px; height: 12px; }
.vf-screen--workout .vf-wo-add { width: 52px; height: 76px; flex-shrink: 0; margin: 0 16px 0 4px; box-sizing: border-box; border-radius: 16px; border: 1.5px solid var(--a-divider); display: grid; place-items: center; }
.vf-screen--workout .vf-wo-add .hi { width: 22px; height: 22px; }

/* Übungskopf: Vorschaubild 52 · Name (20) + Meta · (i) */
.vf-screen--workout .vf-wo-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.vf-screen--workout .vf-wo-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vf-screen--workout .vf-wo-head strong { font-size: 20px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; }
.vf-screen--workout .vf-wo-head small { font-size: 13px; font-weight: 500; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vf-screen--workout .vf-wo-thumb { width: 52px; height: 52px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; background: var(--a-soft); color: var(--a-blue-t); }
.vf-screen--workout .vf-wo-thumb .hi { width: 22px; height: 22px; }
.vf-screen--workout .vf-wo-info { width: 36px; height: 36px; flex-shrink: 0; margin-left: -4px; border-radius: 50%; display: grid; place-items: center; background: var(--a-card); border: 1px solid var(--a-divider); }

/* Satz-Tabelle (Karte Radius 22, Zeilen 44): Satz 36 | Vorher | kg 60 | Wdh 52 | Haken 36, Abstand 8 */
.vf-screen--workout .vf-wo-table { padding: 6px 8px 8px; border-radius: 22px; background: var(--a-card); border: 1px solid var(--a-divider); }
.vf-screen--workout .vf-wo-th, .vf-screen--workout .vf-wo-row { display: grid; grid-template-columns: 36px 1fr 60px 52px 36px; column-gap: 8px; align-items: center; padding: 0 4px; }
.vf-screen--workout .vf-wo-th { padding-top: 4px; padding-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .66px; color: var(--a-muted); text-align: center; }
.vf-screen--workout .vf-wo-th span:nth-child(2) { text-align: left; }
.vf-screen--workout .vf-wo-rows { position: relative; }
.vf-screen--workout .vf-wo-mark { position: absolute; left: 0; right: 0; top: 88px; height: 44px; box-sizing: border-box; border-radius: 14px; background: var(--a-soft); border: 1.5px solid color-mix(in srgb, var(--a-blue-t) 45%, transparent); transition: transform .38s cubic-bezier(.3,1.35,.6,1); }
.vf-screen--workout .vf-wo-row { position: relative; height: 44px; font-variant-numeric: tabular-nums; }
.vf-screen--workout .vf-wo-row b { text-align: center; font-size: 15px; font-weight: 800; transition: color .2s; }
.vf-screen--workout .vf-wo-row > span:not(.vf-wo-check) { font-size: 13px; font-weight: 600; color: var(--a-muted); white-space: nowrap; }
.vf-screen--workout .vf-wo-row em { height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--a-field); font-style: normal; font-size: 15px; font-weight: 800; transition: background-color .2s, color .2s; }
.vf-screen--workout .vf-wo-row--warm b,
.vf-screen--workout .vf-wo-row--cur b, .vf-screen--workout .vf-wo-row--cur em { color: var(--a-blue-t); }
.vf-screen--workout .vf-wo-row--cur em { background: var(--a-card); }

/* Haken-Kreis (SetCheckCircle): offen = Ring, erledigt = Akzent-Fläche ploppt auf, Haken zeichnet sich */
.vf-screen--workout .vf-wo-check { position: relative; width: 36px; height: 36px; box-sizing: border-box; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--a-dim) 45%, transparent); }
.vf-screen--workout .vf-wo-check i { position: absolute; inset: -2px; border-radius: 50%; background: var(--a-blue); transform: scale(0); transition: transform .25s cubic-bezier(.3,1.8,.6,1); }
.vf-screen--workout .vf-wo-tick { position: absolute; inset: -2px; width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 2.34; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .27s ease-out .18s; }
.vf-screen--workout .vf-wo-row--done .vf-wo-check { border-color: var(--a-blue); }
.vf-screen--workout .vf-wo-row--done .vf-wo-check i { transform: scale(1); }
.vf-screen--workout .vf-wo-row--done .vf-wo-tick { stroke-dashoffset: 0; }

/* „+ Satz“ und Spalten-Chips */
.vf-screen--workout .vf-wo-tools { display: flex; gap: 8px; margin-top: 8px; }
.vf-screen--workout .vf-wo-tools span { height: 36px; box-sizing: border-box; padding: 0 12px; display: flex; align-items: center; border-radius: 999px; background: var(--a-card); border: 1px solid var(--a-divider); font-size: 12px; font-weight: 700; white-space: nowrap; }
.vf-screen--workout .vf-wo-tools .is-on { background: var(--a-tab); border-color: var(--a-tab); color: var(--a-on-tab); }
.vf-screen--workout .vf-wo-tools .vf-wo-addset { flex: 1; justify-content: center; gap: 6px; border-radius: 14px; border-width: 1.5px; background: none; font-size: 14px; }
.vf-screen--workout .vf-wo-addset .hi { width: 16px; height: 16px; }

/* Leiste unten (Karte, oben Radius 26): Eingabe + Aktionsleiste; in der Pause rutscht sie um den
   Höhenunterschied nach unten (AnimatedSize) und zeigt die Pausen-Uhr. */
.vf-screen--workout .vf-wo-dock { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 12px 16px 46px; border-radius: 26px 26px 0 0; background: var(--a-card); border-top: 1px solid var(--a-divider); transition: transform .28s cubic-bezier(.33,1,.68,1); }
.vf-screen--workout .vf-wo-inputs { transition: opacity .36s ease-out, transform .36s cubic-bezier(.3,1.5,.6,1); }
.vf-screen--workout .vf-wo-dock__head { display: flex; align-items: center; gap: 8px; }
.vf-screen--workout .vf-wo-dock__head strong { font-size: 14px; font-weight: 800; }
.vf-screen--workout .vf-wo-plan { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; background: var(--a-field); font-size: 13px; font-variant-numeric: tabular-nums; }
.vf-screen--workout .vf-wo-plan .hi { width: 13px; height: 13px; margin-right: 6px; color: var(--a-blue-t); }
.vf-screen--workout .vf-wo-plan small { font-size: 11px; font-weight: 800; letter-spacing: .6px; color: var(--a-muted); }
.vf-screen--workout .vf-wo-plan i { width: 1px; height: 12px; margin: 0 8px; background: var(--a-divider); }
.vf-screen--workout .vf-wo-plan b { font-weight: 700; }
.vf-screen--workout .vf-wo-plan u { margin: 0 8px; text-decoration: none; font-size: 12px; color: var(--a-muted); }
.vf-screen--workout .vf-wo-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 12px; }
.vf-screen--workout .vf-wo-num { padding: 10px; border-radius: 20px; background: var(--a-field); text-align: center; }
.vf-screen--workout .vf-wo-num > small { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .6px; color: var(--a-muted); }
.vf-screen--workout .vf-wo-num > div { display: flex; align-items: center; gap: 6px; }
.vf-screen--workout .vf-wo-num span { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--a-card); }
.vf-screen--workout .vf-wo-num b { flex: 1; display: flex; justify-content: center; align-items: baseline; gap: 3px; }
.vf-screen--workout .vf-wo-num em { font-style: normal; font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.vf-screen--workout .vf-wo-num em.vf-wo-small { font-size: 17.5px; } /* Schrift schrumpft mit der Länge (82.5) */
.vf-screen--workout .vf-wo-num b small { font-size: 13px; font-weight: 600; color: var(--a-muted); }
.vf-screen--workout .vf-wo-nav { display: flex; gap: 12px; }
.vf-screen--workout .vf-wo-navbtn { width: 56px; height: 56px; box-sizing: border-box; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--a-card); border: 1px solid var(--a-divider); }
.vf-screen--workout .vf-wo-navbtn .hi { width: 24px; height: 24px; }
.vf-screen--workout .vf-wo-done { flex: 1; height: 56px; border-radius: 999px; display: grid; place-items: center; background: var(--a-blue); color: #fff; }
.vf-screen--workout .vf-wo-done .hi { width: 28px; height: 28px; }

/* Pausen-Uhr (RestTimerCard embedded): Ring 64 · „Pause · danach Satz 3“ · −15 s / +15 s / Überspringen */
.vf-screen--workout .vf-wo-rest { position: absolute; top: 12px; left: 16px; right: 16px; opacity: 0; transform: translateY(31px); pointer-events: none; }
.vf-screen--workout .vf-wo-rest__top { display: flex; align-items: center; gap: 14px; }
.vf-screen--workout .vf-wo-rest__top > div { display: flex; flex-direction: column; gap: 2px; }
.vf-screen--workout .vf-wo-rest__top small { font-size: 12px; font-weight: 700; color: var(--a-muted); }
.vf-screen--workout .vf-wo-rest__top strong { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vf-screen--workout .vf-wo-ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; display: grid; place-items: center; }
.vf-screen--workout .vf-wo-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); fill: none; stroke-width: 6; }
.vf-screen--workout .vf-wo-ring circle { stroke: var(--a-field); }
.vf-screen--workout .vf-wo-ring .vf-wo-ring__bar { stroke: var(--a-blue); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; }
.vf-screen--workout .vf-wo-time { --vf-wo-m: calc((var(--vf-wo-t) - 30) / 60); --vf-wo-s: calc(var(--vf-wo-t) - var(--vf-wo-m) * 60); counter-reset: m var(--vf-wo-m) s var(--vf-wo-s); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vf-screen--workout .vf-wo-time::after { content: counter(m) ":" counter(s, decimal-leading-zero); }
.vf-screen--workout .vf-wo-rest__btns { display: flex; gap: 8px; margin-top: 12px; }
.vf-screen--workout .vf-wo-rest__btns span { width: 68px; height: 48px; flex-shrink: 0; border-radius: 999px; display: grid; place-items: center; background: var(--a-field); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vf-screen--workout .vf-wo-rest__btns .vf-wo-skip { flex: 1; width: auto; border-radius: 14px; background: var(--a-blue); color: #fff; font-size: 16px; }

/* ── Ablauf „satz“ ──────────────────────────────────────────────────────────
   1: Haken antippen → gefüllt, Zähler 13/27, Leiste wird zur Pausen-Uhr (läuft ab 2:30) */
.s1 .vf-screen--workout .vf-wo-row--cur .vf-wo-check { border-color: var(--a-blue); }
.s1 .vf-screen--workout .vf-wo-row--cur .vf-wo-check i { transform: scale(1); }
.s1 .vf-screen--workout .vf-wo-row--cur .vf-wo-tick { stroke-dashoffset: 0; }
.s1 .vf-screen--workout .vf-wo-x { display: none; }
.s1 .vf-screen--workout .vf-wo-y { display: inline; }
.s1 .vf-screen--workout .vf-wo-dock { transform: translateY(65px); }
.s1 .vf-screen--workout .vf-wo-inputs { opacity: 0; transform: translateY(40px); transition: none; }
.s1 .vf-screen--workout .vf-wo-rest { opacity: 1; transform: none; transition: opacity .36s ease-out, transform .36s cubic-bezier(.3,1.5,.6,1); }
.s1 .vf-screen--workout .vf-wo-time { animation: vfWoCount 150s linear forwards; }
.s1 .vf-screen--workout .vf-wo-ring__bar { animation: vfWoDrain 150s linear forwards; }
/* 2: „Überspringen“ → Satz 3 aktiv: Markierung gleitet, Satz-Pille erledigt, Eingabe kommt mit 85 kg zurück */
.s2 .vf-screen--workout .vf-wo-mark { transform: translateY(44px); }
.s2 .vf-screen--workout .vf-wo-row--cur b { color: var(--a-text); }
.s2 .vf-screen--workout .vf-wo-row--cur em { color: var(--a-text); background: var(--a-field); }
.s2 .vf-screen--workout .vf-wo-row--next b, .s2 .vf-screen--workout .vf-wo-row--next em { color: var(--a-blue-t); }
.s2 .vf-screen--workout .vf-wo-row--next em { background: var(--a-card); }
.s2 .vf-screen--workout .vf-wo-line .is-cur { height: 5px; background: var(--a-blue); }
.s2 .vf-screen--workout .vf-wo-line .is-next { height: 6px; background: var(--a-text); }
.s2 .vf-screen--workout .vf-wo-dock { transform: none; }
.s2 .vf-screen--workout .vf-wo-inputs { opacity: 1; transform: none; transition: opacity .36s ease-out, transform .36s cubic-bezier(.3,1.5,.6,1); }
.s2 .vf-screen--workout .vf-wo-rest { opacity: 0; transition: none; }
.s2 .vf-screen--workout .vf-wo-a { display: none; }
.s2 .vf-screen--workout .vf-wo-b { display: inline; }
