*, *::before, *::after{box-sizing:border-box}
*{margin:0;padding:0}
@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/barlow-400.woff2') format('woff2'),url('fonts/barlow-400.ttf') format('truetype')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url('fonts/barlow-500.woff2') format('woff2'),url('fonts/barlow-500.ttf') format('truetype')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/barlow-600.woff2') format('woff2'),url('fonts/barlow-600.ttf') format('truetype')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/barlow-700.woff2') format('woff2'),url('fonts/barlow-700.ttf') format('truetype')}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url('fonts/inter-var.woff2') format('woff2'),url('fonts/inter-var.ttf') format('truetype')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:400;font-display:swap;src:url('fonts/barlow-semi-condensed-400.woff2') format('woff2'),url('fonts/barlow-semi-condensed-400.ttf') format('truetype')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:600;font-display:swap;src:url('fonts/barlow-semi-condensed-600.woff2') format('woff2'),url('fonts/barlow-semi-condensed-600.ttf') format('truetype')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:700;font-display:swap;src:url('fonts/barlow-semi-condensed-700.woff2') format('woff2'),url('fonts/barlow-semi-condensed-700.ttf') format('truetype')}
:root{
  /* Shape */
  --r:8px;--r2:12px;--r3:24px;
  /* Type */
  --ff-body:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
  --ff-display:'Barlow',system-ui,sans-serif;
  --ff-readout:'Barlow Semi Condensed',system-ui,sans-serif;
  --ff-label:'Barlow Semi Condensed',system-ui,sans-serif;
  --ff-meta:var(--ff-body);
  --ff-metric:'Barlow Semi Condensed',system-ui,sans-serif;
  --ff:var(--ff-body);--ffc:var(--ff-label);
  --ff-mono:var(--ff-readout);--ff-ui:var(--ff-display);
  --type-sm:12px;--type-base:14px;--type-lg:16px;--type-xl:20px;--type-display:32px;
  --fs-2xs:var(--type-sm);--fs-xs:var(--type-sm);--fs-sm:var(--type-sm);--fs-base:var(--type-base);--fs-md:var(--type-lg);--fs-lg:var(--type-lg);--fs-xl:var(--type-xl);--fs-2xl:var(--type-xl);--fs-3xl:var(--type-display);--fs-timer:var(--type-display);
  /* Spacing */
  --sp-1:4px;--sp-2:8px;--sp-3:12px;--sp-4:16px;--sp-5:20px;--sp-6:24px;--sp-8:32px;
  --space-card-padding:28px;
  /* Earth Power — semantic tokens (dark runtime baseline) */
  --earth-power-surface-app:#1A2A32;
  --earth-power-surface-shell:#1A2A32;
  --earth-power-surface-card:#2F3E46;
  --earth-power-surface-card-elevated:#354750;
  --earth-power-surface-raised:#3A4E58;
  --earth-power-surface-high:#4A5E68;
  --earth-power-surface-inverse:#F5F0E8;
  --earth-power-text-primary:#F5F0E8;
  --earth-power-text-secondary:#C8C0B4;
  --earth-power-text-muted:#9B8B7E;
  --earth-power-text-muted-readable:var(--earth-power-text-secondary);
  --earth-power-text-on-accent:#FFFFFF;
  --earth-power-border-subtle:#2F3E46;
  --earth-power-border-strong:#4A5E68;
  --earth-power-rust:#B85C38;
  --earth-power-rust-hover:#D4845E;
  --earth-power-rust-emphasis:#D4845E;
  --earth-power-rust-pressed:#8A3E22;
  --earth-power-focus:#D4845E;
  --earth-power-rust-soft:rgba(184,92,56,.12);
  --earth-power-rust-border:rgba(184,92,56,.28);
  --earth-power-rust-shadow:0 4px 24px rgba(184,92,56,.35);
  --earth-power-danger:#A4666B;
  --earth-power-danger-soft:rgba(164,102,107,.14);
  --earth-power-warning:#D69A2D;
  --earth-power-warning-soft:rgba(214,154,45,.12);
  --earth-power-complete:#9B8B7E;
  --earth-power-complete-soft:rgba(245,240,232,.05);
  --earth-power-complete-active:rgba(245,240,232,.08);
  --earth-power-success:#7BA05B;
  --earth-power-success-soft:rgba(123,160,91,.16);
  --earth-power-info:#6FA8C9;
  --earth-power-light-surface-app:#FFFFFF;
  --earth-power-light-surface-shell:#F9F6F2;
  --earth-power-light-surface-card:#FFFFFF;
  --earth-power-light-surface-raised:#F9F6F2;
  --earth-power-light-text-primary:#1A2A32;
  --earth-power-light-text-secondary:#2F3E46;
  --earth-power-light-text-muted:#9B8B7E;
  --earth-power-light-text-muted-readable:var(--earth-power-light-text-secondary);
  --earth-power-light-border-strong:#E8DCC4;
  --earth-power-light-border-subtle:#F5F0E8;
  --earth-power-light-border-muted:#C4B89E;
  --earth-power-light-rust:#B85C38;
  --earth-power-light-rust-hover:#8A3E22;
  --earth-power-light-rust-pressed:#6B2F1A;
  --earth-power-light-focus:#B85C38;
  --earth-power-radius-control:var(--r);
  --earth-power-radius-badge:4px;
  --earth-power-radius-pill:999px;
  --earth-power-radius-card:var(--r2);
  --earth-power-radius-sheet:var(--r3);
  --earth-power-space-xs:var(--sp-1);
  --earth-power-space-sm:var(--sp-2);
  --earth-power-space-md:var(--sp-4);
  --earth-power-space-lg:var(--sp-6);
  --earth-power-space-xl:var(--sp-8);
  --earth-power-shadow-sm:0 1px 2px rgba(47,62,70,.22);
  --earth-power-shadow-md:0 8px 18px rgba(47,62,70,.24);
  --earth-power-shadow-card:0 10px 24px rgba(10,16,20,.30),inset 0 1px 0 rgba(245,240,232,.10);
  --earth-power-shadow-popover:0 18px 40px rgba(47,62,70,.42);
  --earth-power-control-min-height:44px;
  --earth-power-sheet-max-height:82dvh;
  /* Canonical Earth Power aliases promoted by the design-system docs. */
  --earth-power-overlay-scrim:color-mix(in oklab,var(--earth-power-surface-app) 72%,transparent);
  --earth-power-surface-floating-glass:color-mix(in oklab,var(--earth-power-surface-raised) 72%,transparent);
  --earth-power-chart-series-1:var(--earth-power-rust);
  --earth-power-chart-series-2:var(--earth-power-success);
  --earth-power-chart-series-3:var(--earth-power-surface-high);
  --earth-power-chart-series-4:var(--earth-power-text-muted);
  --earth-power-chart-series-5:var(--earth-power-rust-hover);
  --color-text-muted-readable:var(--earth-power-text-muted-readable);
  --color-overlay-scrim:var(--earth-power-overlay-scrim);
  --color-surface-floating-glass:var(--earth-power-surface-floating-glass);
  --color-chart-series-1:var(--earth-power-chart-series-1);
  --color-chart-series-2:var(--earth-power-chart-series-2);
  --color-chart-series-3:var(--earth-power-chart-series-3);
  --color-chart-series-4:var(--earth-power-chart-series-4);
  --color-chart-series-5:var(--earth-power-chart-series-5);
  /* Legacy token bridge — keep runtime contracts stable while routing through Earth Power */
  --bg:var(--earth-power-surface-app);--surf1:var(--earth-power-surface-shell);--surface-1:var(--surf1);--surf2:var(--earth-power-surface-card);--surface-2:var(--surf2);--surf3:var(--earth-power-surface-raised);--surf4:var(--earth-power-surface-high);
  --volt:var(--earth-power-rust);--volt-dim:var(--earth-power-rust-hover);
  --volt-subtle:var(--earth-power-rust-soft);--volt-border:var(--earth-power-rust-border);
  --text:var(--earth-power-text-primary);--text2:var(--earth-power-text-secondary);--text3:var(--earth-power-text-muted);--text-muted-readable:var(--color-text-muted-readable);
  --border:var(--earth-power-border-subtle);--border2:var(--earth-power-border-strong);
  --red:var(--earth-power-danger);--red-bg:var(--earth-power-danger-soft);--complete:var(--earth-power-complete);--complete-subtle:var(--earth-power-complete-soft);--complete-subtle-active:var(--earth-power-complete-active);
  --amber:var(--earth-power-warning);--amber-subtle:var(--earth-power-warning-soft);
  --shadow-glow:var(--earth-power-rust-shadow);
  --accent-primary:var(--earth-power-rust);--accent-primary-hover:var(--earth-power-rust-hover);--accent-primary-emphasis:var(--earth-power-rust-emphasis);
  --accent-dim:var(--earth-power-rust-soft);
  --accent-secondary:var(--earth-power-warning);
  --card-surface-dark:var(--earth-power-surface-card);--card-surface-light:var(--earth-power-light-surface-card);--card-surface:var(--card-surface-dark);
  --accent-primary-light:rgba(184,92,56,.85);
  --completion-green:var(--earth-power-success);--completion-green-dim:var(--earth-power-success-soft);
  --base-deep:var(--earth-power-surface-app);--base-secondary:var(--earth-power-surface-shell);
  --text-primary:var(--earth-power-text-primary);--text-secondary:var(--earth-power-text-secondary);--text-tertiary:var(--earth-power-text-muted);
  --color-success:var(--text-secondary);--color-warning:var(--accent-secondary);--color-error:var(--earth-power-danger);--color-info:var(--earth-power-info);
  --accent-primary-10:var(--earth-power-rust-soft);--accent-primary-20:rgba(184,92,56,.20);--accent-primary-50:rgba(184,92,56,.50);
  --shadow-sm:var(--earth-power-shadow-sm);--shadow-md:var(--earth-power-shadow-md);--shadow-lg:var(--earth-power-shadow-card);
  --radius-sm:4px;--radius-md:var(--earth-power-radius-control);--radius-lg:var(--earth-power-radius-card);--radius-full:var(--earth-power-radius-pill);
  --space-xs:var(--sp-1);--space-sm:var(--sp-2);--space-md:var(--sp-4);--space-lg:var(--sp-6);--space-xl:var(--sp-8);--space-2xl:48px;
  /* Motion */
  --ease-standard:cubic-bezier(0.4,0,0.2,1);
  --ease-out-expo:cubic-bezier(0.16,1,0.3,1);
  --ease-spring:var(--ease-out-expo); /* spring smoothing; overshoot lives in each consumer's keyframe scale stops, not the curve */
  --ease-in-out-sharp:var(--ease-standard);
  --duration-entry:180ms;--duration-exit:180ms;--duration-interaction:120ms;
  --will-animate:transform,opacity;
  --tr:all var(--duration-interaction) var(--ease-in-out-sharp);
  /* Safe areas */
  --safe-t:env(safe-area-inset-top,0px);--safe-b:env(safe-area-inset-bottom,0px);
  --safe-l:env(safe-area-inset-left,0px);--safe-r:env(safe-area-inset-right,0px);
  --bottom-sheet-base-height:0px;--bottom-sheet-extra-gap:16px;
  --safe-area-bottom-live:env(safe-area-inset-bottom,0px);
  --safe-area-bottom-max:env(safe-area-max-inset-bottom,36px);
  --bottom-sheet-safe-padding:calc(var(--safe-area-bottom-max) + var(--bottom-sheet-extra-gap));
  --bottom-sheet-safe-offset:calc(var(--safe-area-bottom-live) - var(--safe-area-bottom-max));
  --timer-overlay-clearance:calc(168px + var(--safe-b));
  /* Layout */
  --rail-w:0px;
  --set-row-cols:24px minmax(0,1fr) minmax(0,1fr) minmax(0,.75fr) 32px 22px;
}
/* oklch upgrade — identical percepts, progressive enhancement */
@supports (color:oklch(0 0 0)){
  :root{
    --earth-power-surface-app:oklch(27.4% .026 230.6);
    --earth-power-surface-shell:oklch(27.4% .026 230.6);
    --earth-power-surface-card:oklch(35.4% .024 231.6);
    --earth-power-surface-card-elevated:oklch(38.5% .024 231.6);
    --earth-power-surface-raised:oklch(41.1% .030 230.0);
    --earth-power-surface-high:oklch(46.9% .029 229.8);
    --earth-power-surface-inverse:oklch(95.7% .012 79.8);
    --earth-power-text-primary:oklch(95.7% .012 79.8);
    --earth-power-text-secondary:oklch(81.1% .019 78.2);
    --earth-power-text-muted:oklch(64.7% .027 61.4);
    --earth-power-border-subtle:oklch(35.4% .024 231.6);
    --earth-power-border-strong:oklch(46.9% .029 229.8);
    --earth-power-rust:oklch(57.9% .129 41.3);
    --earth-power-rust-hover:oklch(68.9% .112 45.8);
    --earth-power-rust-emphasis:oklch(68.9% .112 45.8);
    --earth-power-rust-pressed:oklch(45.9% .112 40.1);
    --earth-power-focus:oklch(68.9% .112 45.8);
    --earth-power-rust-soft:oklch(57.9% .129 41.3 / 12%);
    --earth-power-rust-border:oklch(57.9% .129 41.3 / 28%);
    --earth-power-rust-shadow:0 4px 24px oklch(57.9% .129 41.3 / 35%);
    --earth-power-danger:oklch(58% .08 15);
    --earth-power-danger-soft:oklch(58% .08 15 / 14%);
    --earth-power-warning:oklch(72.7% .137 77.4);
    --earth-power-warning-soft:oklch(72.7% .137 77.4 / 12%);
    --earth-power-complete:oklch(64.7% .027 61.4);
    --earth-power-complete-soft:oklch(95.7% .012 79.8 / 5%);
    --earth-power-complete-active:oklch(95.7% .012 79.8 / 8%);
    --earth-power-success:oklch(66.1% .104 131.7);
    --earth-power-success-soft:oklch(66.1% .104 131.7 / 16%);
    --earth-power-info:oklch(70.5% .077 234.8);
    --earth-power-light-surface-app:oklch(100% 0 89.9);
    --earth-power-light-surface-shell:oklch(97.4% .006 75.4);
    --earth-power-light-surface-card:oklch(100% 0 89.9);
    --earth-power-light-surface-raised:oklch(97.4% .006 75.4);
    --earth-power-light-text-primary:oklch(27.4% .026 230.6);
    --earth-power-light-text-secondary:oklch(35.4% .024 231.6);
    --earth-power-light-text-muted:oklch(64.7% .027 61.4);
    --earth-power-light-border-strong:oklch(89.8% .035 84.6);
    --earth-power-light-border-subtle:oklch(95.7% .012 79.8);
    --earth-power-light-border-muted:oklch(78.6% .038 86.2);
    --earth-power-light-rust:oklch(57.9% .129 41.3);
    --earth-power-light-rust-hover:oklch(45.9% .112 40.1);
    --earth-power-light-rust-pressed:oklch(38.4% .092 39.4);
    --earth-power-light-focus:oklch(57.9% .129 41.3);
    --accent-primary-light:oklch(57.9% .129 41.3 / 85%);
    --accent-primary-20:oklch(57.9% .129 41.3 / 20%);--accent-primary-50:oklch(57.9% .129 41.3 / 50%);
  }
}
:root[data-theme="light"]{
  color-scheme:light;
  --earth-power-surface-app:var(--earth-power-light-surface-app);
  --earth-power-surface-shell:var(--earth-power-light-surface-shell);
  --earth-power-surface-card:var(--earth-power-light-surface-card);
  --earth-power-surface-card-elevated:var(--earth-power-light-surface-card);
  --earth-power-surface-raised:var(--earth-power-light-surface-raised);
  --earth-power-surface-high:var(--earth-power-light-border-subtle);
  --earth-power-text-primary:var(--earth-power-light-text-primary);
  --earth-power-text-secondary:var(--earth-power-light-text-secondary);
  --earth-power-text-muted:var(--earth-power-light-text-muted);
  --earth-power-text-muted-readable:var(--earth-power-light-text-muted-readable);
  --earth-power-border-subtle:var(--earth-power-light-border-subtle);
  --earth-power-border-strong:var(--earth-power-light-border-strong);
  --earth-power-rust:var(--earth-power-light-rust);
  --earth-power-rust-hover:var(--earth-power-light-rust-hover);
  --earth-power-rust-emphasis:var(--earth-power-light-rust);
  --earth-power-rust-pressed:var(--earth-power-light-rust-pressed);
  --earth-power-focus:var(--earth-power-light-focus);
}
@property --gauge-progress{
  syntax:'<percentage>';
  inherits:false;
  initial-value:0%;
}
html,body{height:100%;background:var(--earth-power-surface-app);color:var(--earth-power-text-primary);font-family:var(--ff-body);font-size:var(--fs-base);line-height:1.5;-webkit-font-smoothing:antialiased;overscroll-behavior:none;caret-color:transparent}
input,textarea,[contenteditable="true"]{caret-color:auto}
.app-shell{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;display:flex;flex-direction:column;gap:var(--earth-power-space-md);padding:var(--earth-power-space-md);background:var(--earth-power-surface-card-elevated);border-right:1px solid var(--earth-power-border-strong);box-shadow:4px 0 20px rgba(10,16,20,.22);z-index:30}
#app{padding-bottom:calc(max(12px,var(--safe-b)) + 8px);min-height:100dvh;min-width:0}
body.has-visible-timer #app[data-view="session"]{padding-bottom:calc(var(--timer-overlay-clearance) + var(--sp-4))}
.page-container{width:100%;max-width:680px;margin:0 auto;padding-inline:clamp(1rem,3vw,2rem)}
.u-transition-entry{transition-property:var(--will-animate);transition-duration:var(--duration-entry);transition-timing-function:var(--ease-out-expo)}
.u-transition-exit{transition-property:var(--will-animate);transition-duration:var(--duration-exit);transition-timing-function:var(--ease-in-out-sharp)}
.u-transition-interactive{transition:background-color var(--duration-interaction) linear,transform var(--duration-interaction) var(--ease-out-expo),box-shadow var(--duration-interaction) var(--ease-out-expo)}
.atmosphere-canvas,
#bg-canvas{position:fixed;inset:0;pointer-events:none;z-index:1;opacity:.15;mix-blend-mode:screen;will-change:opacity;transition:opacity var(--duration-entry) var(--ease-in-out-sharp),visibility 0s linear var(--duration-entry)}
body.is-session-active .atmosphere-canvas,
body.is-session-active #bg-canvas{opacity:0;visibility:hidden;will-change:auto;transition-duration:var(--duration-exit),0s;transition-delay:0s,var(--duration-exit)}
@media (prefers-reduced-motion: reduce){
  .atmosphere-canvas,
  #bg-canvas{display:none!important}
  .u-transition-entry,
  .u-transition-exit,
  .u-transition-interactive{transition:none}
  #ex-sheet,#ex-sheet .sheet,#save-workout-sheet,#save-workout-sheet .sheet,#timer-overlay,.timer-bar-fill{transition:none!important}
  #ex-sheet.is-open .sheet,#save-workout-sheet.is-open .sheet{transform:translateY(0)!important}
  .chk,
  .set-checkbox-trigger,
  .set-row-done,
  .set-row-just-done,
  .set-row-just-done::after,
  .session-primary-action,
  .set-row-input,
  .set-edit-input,
  .set-edit-input-wide,
  .exercise-target-input,
  .exercise-remove-btn,
  .set-row-delete,
  .set-row-del button,
  .lightning-strike,
  .weight-stepper-popover,
  .rest-menu-popover,
  .exercise-gauge{animation:none!important;transition:none!important;transform:none!important;text-shadow:none!important;box-shadow:none!important}
  .session-primary-action::after{display:none!important}
  .lightning-strike,
  .weight-stepper-popover{display:none!important}
}
input,textarea,select{background:var(--earth-power-surface-raised);border:1px solid var(--earth-power-border-strong);color:var(--earth-power-text-primary);border-radius:var(--earth-power-radius-control);padding:11px 13px;font-size:16px;font-family:var(--ff-body);width:100%;outline:none;transition:var(--tr);-webkit-appearance:none;}
input:focus,textarea:focus{border-color:var(--earth-power-rust);background:var(--earth-power-surface-high);box-shadow:0 0 0 3px var(--earth-power-rust-soft)}
input::placeholder,textarea::placeholder{color:var(--earth-power-text-muted)}
input[type=checkbox]{display:none}
.chk{width:26px;height:26px;border-radius:var(--earth-power-radius-control);border:2px solid var(--border2);background:transparent;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:var(--tr);touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.chk.on{background:var(--volt);border-color:var(--volt)}
.chk.on::after{content:'';display:block;width:8px;height:5px;border-left:2.5px solid var(--bg);border-bottom:2.5px solid var(--bg);transform:rotate(-45deg) translateY(-1px)}
@keyframes set-pulse{0%{transform:scale(.92)}55%{transform:scale(1.04)}100%{transform:scale(1)}}
@keyframes set-row-settle{0%{background:var(--earth-power-rust-soft)}100%{background:var(--complete-subtle)}}
@keyframes set-edge-fill{0%{opacity:.85;transform:scaleY(0)}100%{opacity:1;transform:scaleY(1)}}
@keyframes set-check-fill{0%{background:transparent;border-color:var(--earth-power-rust-border);color:var(--earth-power-text-muted);transform:scale(.92)}100%{background:var(--earth-power-rust);border-color:var(--earth-power-rust);color:var(--earth-power-text-on-accent);transform:scale(1)}}
@keyframes exercise-gauge-settle{0%{filter:saturate(1.08);box-shadow:inset 0 2px 4px rgba(255,255,255,.08),inset 0 -8px 18px rgba(47,62,70,.42),0 0 18px var(--earth-power-rust-soft)}100%{filter:saturate(1);box-shadow:inset 0 2px 4px rgba(255,255,255,.08),inset 0 -8px 18px rgba(47,62,70,.42),0 0 0 transparent}}
@keyframes exercise-gauge-core-settle{0%{color:var(--earth-power-rust-emphasis);transform:scale(.98);text-shadow:none}100%{color:var(--earth-power-text-muted);transform:scale(1);text-shadow:none}}
@keyframes input-edge-pulse{0%{opacity:0;transform:scaleY(0)}50%{opacity:.9;transform:scaleY(1);box-shadow:0 0 12px var(--earth-power-rust-soft)}100%{opacity:0;transform:scaleY(.18);box-shadow:0 0 0 transparent}}
.set-checkbox-trigger{width:26px;height:26px;border-radius:var(--earth-power-radius-control);border:2px solid var(--border2);background:transparent;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:border-color var(--duration-interaction) var(--ease-in-out-sharp),background var(--duration-interaction) var(--ease-in-out-sharp),transform var(--duration-interaction) var(--ease-in-out-sharp)}
.set-checkbox-trigger:hover{border-color:var(--volt-border)}
.set-checkbox-trigger:active{transform:scale(.94)}
.set-checkbox-trigger.is-complete{background:var(--volt);border-color:var(--volt);animation:set-pulse 280ms var(--ease-spring) both}
button{cursor:pointer;font-family:var(--ff-body);font-size:13px;font-weight:600;border:1px solid var(--earth-power-border-strong);background:var(--earth-power-surface-card);color:var(--earth-power-text-secondary);border-radius:var(--earth-power-radius-control);padding:10px 16px;min-height:var(--earth-power-control-min-height);transition:var(--tr);touch-action:manipulation;letter-spacing:.02em;-webkit-tap-highlight-color:transparent}
button:hover{background:var(--earth-power-surface-raised);color:var(--earth-power-text-primary);transform:scale(1.03)}
button:active{transform:scale(.96)}
.btn-primary{background:var(--earth-power-rust);color:var(--earth-power-text-on-accent);border-color:var(--earth-power-rust);font-weight:700;letter-spacing:.05em}
.btn-primary:hover{background:var(--earth-power-rust-hover);border-color:var(--earth-power-rust-hover);color:var(--earth-power-text-on-accent);box-shadow:var(--earth-power-rust-shadow)}
.btn-outline{background:transparent;border-color:var(--earth-power-border-strong);color:var(--earth-power-text-secondary)}
.btn-outline:hover{border-color:var(--earth-power-rust-border);color:var(--earth-power-rust-hover);background:var(--earth-power-rust-soft)}
.btn-ghost{background:transparent;border:none;color:var(--earth-power-text-secondary);padding:8px;min-height:var(--earth-power-control-min-height)}
.btn-ghost:hover{color:var(--earth-power-text-secondary);background:var(--earth-power-surface-card)}
.btn-danger{background:var(--earth-power-danger-soft);border:1px solid color-mix(in oklab,var(--earth-power-danger) 48%,var(--earth-power-text-primary));color:var(--earth-power-text-primary)}
.btn-danger:hover{background:var(--red-bg)}
.btn-sm{padding:8px 16px;font-size:12px;min-height:var(--earth-power-control-min-height);border-radius:var(--earth-power-radius-control)}
.vlabel{display:inline-flex;align-items:center;background:var(--earth-power-rust-soft);border:1px solid var(--earth-power-rust-border);border-radius:var(--earth-power-radius-badge);padding:3px 9px;font-size:11px;font-weight:700;color:var(--earth-power-text-primary);letter-spacing:.08em;text-transform:uppercase}
.pill{display:inline-flex;align-items:center;background:var(--earth-power-surface-raised);border:1px solid var(--earth-power-border-subtle);border-radius:var(--earth-power-radius-pill);padding:3px 10px;font-size:11px;color:var(--earth-power-text-secondary)}
.label{font-family:var(--ff-label);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--earth-power-text-secondary)}
.app-pad{padding:var(--sp-5) var(--sp-4)}
.stack-sm{display:grid;gap:var(--sp-2)}
.row-between{display:flex;justify-content:space-between;align-items:center}
.row-start{display:flex;align-items:flex-start;gap:var(--sp-2)}
.row-center{display:flex;align-items:center;gap:var(--sp-2)}
/* Row height contract: peer rows own the vertical rhythm; only true peer atoms inherit it (scoped, not blanket) */
.sticky-header .row-center{min-height:var(--earth-power-control-min-height)}
.sticky-header .row-center > :not(button):not(.action-row),
.session-actions > :not(button){display:inline-flex;align-items:center;min-height:inherit}
/* Buttons in an action-row render as an equal-width, equal-shape set */
.action-row{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px}
.picker-header-row{gap:var(--sp-3)}
.picker-actions{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:minmax(76px,1fr) minmax(82px,1fr) var(--earth-power-control-min-height)}
.picker-actions .icon-cloud-btn{padding-inline:0}
.action-row-start{display:flex;gap:6px;align-items:flex-start}
.push-right{margin-left:auto}
.export-stack{text-align:right}
.export-help{padding:6px 0 2px;font-size:var(--fs-xs);color:var(--earth-power-text-secondary)}
.inline-note{font-size:var(--fs-2xs);color:var(--earth-power-text-muted);margin-top:3px}
.muted-copy{font-size:var(--fs-sm);color:var(--earth-power-text-secondary);line-height:1.7}
.muted-inline{font-weight:400;color:var(--earth-power-text-secondary)}
.section-label{font-family:var(--ff-label);font-size:var(--fs-xs);font-weight:700;letter-spacing:.06em;text-transform:uppercase;margin-bottom:2px;color:var(--earth-power-text-secondary)}
.section-label-accent{color:var(--earth-power-text-secondary)}
.section-title-sm{font-size:var(--fs-base);font-weight:600}
.view-title{font-family:var(--ff-display);font-size:var(--fs-2xl);color:var(--earth-power-text-primary)}
.page-title-input{font-family:var(--ff-display);font-size:var(--fs-xl);font-weight:700;background:transparent;border:none;border-bottom:1px solid var(--earth-power-border-strong);border-radius:0;padding:5px 0;letter-spacing:.01em;margin-bottom:10px}
.field-row{display:flex;gap:var(--sp-2);margin-bottom:10px}
.field-date{font-size:var(--fs-md);flex:0 0 auto;width:152px;padding:var(--sp-2) 10px}
.field-note-wrap{position:relative;flex:1;display:flex;align-items:center}
.field-note-icon{position:absolute;left:calc(50% - 44px);top:50%;transform:translateY(-50%);width:14px;height:14px;pointer-events:none;color:var(--earth-power-text-muted);flex-shrink:0}
.field-note{font-size:var(--fs-md);padding:var(--sp-2) 10px;width:100%;text-align:center}
.primary-full{width:100%;min-height:52px;font-size:var(--fs-md);letter-spacing:.05em;border-radius:var(--earth-power-radius-sheet)}
.full-outline{width:100%;margin-top:var(--sp-3);min-height:44px;font-size:13px;padding:10px var(--sp-4)}
.icon-cloud-btn{padding:var(--sp-2) 10px;font-size:var(--fs-base)}
.panel-card{background:var(--earth-power-surface-card-elevated);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);padding:14px var(--sp-4)}
.panel-card-tight{background:var(--earth-power-surface-card-elevated);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);padding:12px 14px}
.status-banner{margin-top:var(--sp-3);background:var(--earth-power-rust-soft);border:1px solid var(--earth-power-rust-border);border-radius:var(--earth-power-radius-card);padding:var(--sp-3) 14px;display:flex;align-items:center;justify-content:space-between}
.next-workout-banner{margin-bottom:var(--sp-4);min-height:72px;background:var(--earth-power-rust-soft);border:1px solid var(--earth-power-rust-border);border-radius:var(--earth-power-radius-card);padding:var(--sp-3) 14px;display:flex;align-items:center;justify-content:space-between}
.program-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--sp-4)}
.program-card{background:var(--earth-power-surface-card-elevated);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-sheet);padding:0;transition:var(--tr);position:relative;overflow:hidden;min-height:124px}
.program-card:hover{border-color:var(--earth-power-rust-border)}
/* The whole card body is a real <button> so it's keyboard-operable (Enter/Space). */
.program-card-start{appearance:none;-webkit-appearance:none;display:flex;flex-direction:column;width:100%;min-height:124px;text-align:left;padding:14px;background:transparent;border:0;border-radius:inherit;cursor:pointer;font:inherit;color:inherit;letter-spacing:0;transition:var(--tr)}
.program-card-start:hover{background:var(--earth-power-surface-raised);transform:none}
.program-card-start:focus-visible{outline:2px solid var(--earth-power-focus);outline-offset:-2px}
/* Custom cards: faint rust-tinted border + a corner actions overlay (badge + edit + delete). */
.program-card-custom{border-color:var(--earth-power-rust-border)}
.program-card-custom .program-card-start{padding-right:140px}
.program-card-custom .program-code{font-size:var(--fs-xl)}
.program-card-actions{position:absolute;top:10px;right:10px;display:flex;align-items:center;gap:var(--sp-2)}
.program-badge{display:inline-flex;align-items:center;background:var(--earth-power-rust-soft);color:var(--earth-power-rust);border:1px solid var(--earth-power-rust-border);border-radius:var(--earth-power-radius-control);padding:2px 7px;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase}
/* Edit/Delete meet the 44px touch-target contract (min-height) with the icon
   flex-centered, so they stay easy to tap and distinct from each other. */
.program-card-edit,.program-card-delete{min-height:var(--earth-power-control-min-height);display:inline-flex;align-items:center;justify-content:center;padding:0 10px;font-size:14px;line-height:1;color:var(--earth-power-text-muted);background:transparent;border:1px solid transparent;border-radius:var(--earth-power-radius-control)}
.program-card-delete{font-size:16px}
.program-card-edit:hover{color:var(--earth-power-rust-hover);background:var(--earth-power-rust-soft);border-color:var(--earth-power-rust-border);transform:none}
.program-card-delete:hover{color:var(--earth-power-danger);background:var(--earth-power-danger-soft);border-color:var(--earth-power-danger);transform:none}
.program-card-edit:focus-visible,.program-card-delete:focus-visible{outline:2px solid var(--earth-power-focus);outline-offset:2px}
/* "+ Create workout" reads as the primary new action (rust-tinted, above "+ Start blank session"). */
.create-workout-btn{color:var(--earth-power-rust);border-color:var(--earth-power-rust-border);background:var(--earth-power-rust-soft)}
.create-workout-btn:hover{color:var(--earth-power-rust-hover);border-color:var(--earth-power-rust);background:var(--earth-power-rust-soft)}
/* ─── Workout builder (from-scratch + edit) ──────────────────────────── */
.builder-head-row{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.builder-back{padding:6px 8px;min-height:auto;font-size:18px;line-height:1;color:var(--earth-power-text-secondary)}
.builder-back:hover{color:var(--earth-power-rust-hover);background:var(--earth-power-rust-soft)}
.builder-eyebrow{font-family:var(--ff-label);font-size:var(--fs-xs);font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--earth-power-rust)}
.builder-name{width:100%;font-size:var(--fs-2xl);margin-bottom:0}
.builder-name.has-value,.builder-name:focus{border-bottom-color:var(--earth-power-rust);box-shadow:none;background:transparent}
.builder-pad{padding-bottom:var(--sp-5)}
.builder-section-head{display:flex;align-items:center;justify-content:space-between;margin:var(--sp-2) 0 var(--sp-3)}
.builder-eyebrow-sm{font-family:var(--ff-label);font-size:var(--fs-xs);font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--earth-power-text-muted)}
.builder-count{font-family:var(--ff-metric);font-size:var(--fs-md);font-weight:700;color:var(--earth-power-text-secondary)}
.builder-empty{border:1px dashed var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);padding:var(--sp-6) var(--sp-4);text-align:center}
.builder-empty-title{font-weight:700;color:var(--earth-power-text-secondary);margin-bottom:4px}
.builder-empty-sub{font-size:var(--fs-sm);color:var(--earth-power-text-muted)}
.builder-list{display:flex;flex-direction:column;gap:var(--sp-3)}
.builder-row{cursor:default;align-items:flex-start}
.builder-row-fields{display:flex;gap:var(--sp-3);margin-top:8px}
.builder-field{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
.builder-field-label{font-family:var(--ff-label);font-size:var(--fs-2xs);font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--earth-power-text-muted)}
.builder-field input{padding:7px 10px;font-size:14px}
.builder-row-actions{display:flex;flex-direction:column;align-items:flex-end;gap:var(--sp-2);flex-shrink:0}
.builder-group-btn{min-width:72px;min-height:44px;color:var(--earth-power-text-secondary);border:1px solid var(--earth-power-border-subtle);border-radius:var(--earth-power-radius-control)}
.builder-group-btn:hover,.builder-group-btn.is-active{color:var(--earth-power-rust);background:var(--earth-power-rust-soft);border-color:var(--earth-power-rust-border);transform:none}
.builder-group-btn:disabled{opacity:.42;cursor:not-allowed}
.builder-group-btn:disabled:hover{color:var(--earth-power-text-secondary);background:transparent;border-color:var(--earth-power-border-subtle)}
.builder-group{background:var(--earth-power-surface-raised);border:1px solid var(--earth-power-border-subtle);border-radius:var(--earth-power-radius-card);padding:var(--sp-3);display:flex;flex-direction:column;gap:var(--sp-2)}
.builder-group-head{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-3);padding:0 var(--sp-1)}
.builder-group-label{font-family:var(--ff-label);font-size:var(--fs-xs);font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--earth-power-rust)}
.builder-group-count{font-size:var(--fs-xs);color:var(--earth-power-text-secondary)}
.builder-group-list{display:flex;flex-direction:column;gap:var(--sp-2)}
.builder-add{margin-top:var(--sp-4);border-style:dashed}
#builder-err{color:var(--red);font-size:13px;line-height:1.23;min-height:24px;margin-top:8px}
.builder-actionbar{position:sticky;bottom:0;z-index:90;display:grid;grid-template-columns:1fr 1fr;gap:var(--sp-3);padding:var(--sp-3) 0 calc(var(--sp-3) + var(--safe-b));background:var(--earth-power-surface-shell);border-top:1px solid var(--earth-power-border-strong)}
.builder-save:disabled{opacity:.45;cursor:not-allowed}
.builder-save:disabled:hover{background:var(--earth-power-rust);border-color:var(--earth-power-rust);transform:none;box-shadow:none}
.program-code{font-family:var(--ff-metric);font-size:var(--fs-3xl);font-weight:700;color:var(--earth-power-rust);line-height:1;margin-bottom:var(--sp-1)}
.program-tag{font-family:var(--ff-label);font-size:var(--fs-xs);font-weight:700;color:var(--earth-power-text-secondary);letter-spacing:.06em;text-transform:uppercase;margin-bottom:var(--sp-2)}
.program-desc{font-size:var(--fs-sm);color:var(--earth-power-text-secondary);line-height:1.5;margin-bottom:var(--sp-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.program-count{font-size:var(--fs-xs);color:var(--earth-power-text-secondary);margin-top:auto}
/* Landing — pre-auth sync gate. Tokens only; single dominant volt CTA. */
.landing{max-width:560px;margin:0 auto;padding:calc(var(--sp-5) + var(--safe-t)) calc(var(--sp-4) + var(--safe-r)) calc(var(--sp-8) + var(--safe-b)) calc(var(--sp-4) + var(--safe-l));display:grid;gap:var(--sp-6)}
.landing-hero{display:grid;gap:var(--sp-4)}

.landing-hero-heading{font-family:var(--ff-display);font-size:var(--fs-2xl);font-weight:700;line-height:1.1;letter-spacing:.01em;color:var(--earth-power-text-primary);margin:0}
.landing-hero-heading span{display:block;color:var(--earth-power-text-secondary)}
.landing-auth{display:flex;flex-direction:column;gap:var(--sp-3);margin-top:var(--sp-2)}
.cta-button-google{width:100%;min-height:56px;font-size:var(--fs-md);border-radius:var(--earth-power-radius-sheet);display:flex;align-items:center;justify-content:center;gap:var(--sp-2)}
.cta-button-google-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:var(--earth-power-surface-app);color:var(--earth-power-rust);font-family:var(--ff-display);font-weight:700;font-size:var(--fs-sm)}
.landing-compact-benefits{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--sp-1) var(--sp-3);list-style:none;margin:0;padding:0;font-size:var(--fs-xs);color:var(--earth-power-text-secondary)}
.landing-compact-benefits li::before{content:'✓ ';color:var(--earth-power-rust-hover)}
.sync-options-panel{display:flex;flex-direction:column;gap:var(--sp-2);margin-top:var(--sp-2)}
.landing-secondary-btn{width:100%;min-height:48px}
.landing-preview{margin-top:var(--sp-5)}
.landing-preview-frame{background:var(--earth-power-surface-shell);border:1px solid var(--earth-power-border-subtle);border-radius:var(--earth-power-radius-sheet);padding:var(--sp-4);display:flex;flex-direction:column;gap:var(--sp-3)}
.landing-preview-next{background:var(--earth-power-rust-soft);border:1px solid var(--earth-power-rust-border);border-radius:var(--earth-power-radius-card);padding:var(--sp-3);display:flex;align-items:center;justify-content:space-between}
.landing-preview-cards{display:grid;gap:var(--sp-2)}
.landing-preview-card{background:var(--earth-power-surface-card-elevated);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);padding:var(--sp-3)}
.landing-preview-code{font-family:var(--ff-metric);font-size:var(--fs-xl);font-weight:700;line-height:1;color:var(--earth-power-text-primary)}
.landing-preview-tag{margin-top:var(--sp-1);font-family:var(--ff-label);font-size:var(--fs-2xs);font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--earth-power-text-secondary)}
@media (min-width:720px){
  .landing{max-width:720px}
  .landing-hero-heading{font-size:var(--fs-3xl)}
}
.progress-track{height:4px;background:var(--earth-power-surface-high);border-radius:2px;overflow:hidden;margin-bottom:var(--sp-1)}
.progress-fill{height:100%;background:linear-gradient(45deg,var(--earth-power-rust),var(--earth-power-rust-emphasis));box-shadow:0 0 8px var(--earth-power-rust-soft);transition:width .4s var(--ease-out-expo)}
.progress-fill-soft{height:100%;background:linear-gradient(45deg,var(--earth-power-rust-hover),var(--earth-power-rust));box-shadow:0 0 8px var(--earth-power-rust-soft);transition:width .3s var(--ease-out-expo)}
.progress-caption{font-size:var(--fs-xs);color:var(--earth-power-text-muted)}
.session-actions{display:flex;align-items:center;gap:var(--sp-2);min-height:var(--earth-power-control-min-height)}
.mobile-programs-action{display:none}
.session-primary-action{position:relative;flex:1;overflow:hidden;box-shadow:0 4px 24px rgba(184,92,56,.35);transition:background-color 150ms ease-out,border-color 150ms ease-out,box-shadow 150ms ease-out,transform 150ms ease-out}
.session-primary-action:hover{transform:scale(1.03);box-shadow:0 4px 28px rgba(184,92,56,.42)}
.session-primary-action:active{transform:scale(.96)}
.session-primary-action::after{content:'';position:absolute;left:var(--ripple-x,50%);top:var(--ripple-y,50%);width:160px;height:160px;border-radius:50%;background:rgba(255,255,255,.24);opacity:0;pointer-events:none;transform:translate(-50%,-50%) scale(0);will-change:transform,opacity}
.session-primary-action.is-rippling::after{animation:start-session-ripple 600ms cubic-bezier(0.4,0,0.2,1)}
@keyframes start-session-ripple{0%{opacity:.3;transform:translate(-50%,-50%) scale(0)}100%{opacity:0;transform:translate(-50%,-50%) scale(2)}}
.session-time{font-size:var(--fs-sm);color:var(--earth-power-text-secondary);margin-left:var(--sp-1)}
.session-end-action{margin-left:auto;border:1px solid var(--red)}
.exercise-add-wrap{display:grid;gap:var(--sp-3);padding:14px var(--sp-4) 0}
/* Rest-duration menu — body-level singleton popover anchored to the just-completed
   set row (JS writes inline left/top; position:fixed). Mirrors .weight-stepper-popover. */
.rest-menu-popover{position:fixed;z-index:1000;display:flex;align-items:center;gap:6px;padding:6px;border:1px solid var(--earth-power-rust-border);border-radius:var(--earth-power-radius-pill);background:color-mix(in oklab,var(--earth-power-surface-card) 92%,var(--earth-power-surface-app));box-shadow:0 10px 24px rgba(47,62,70,.36),0 0 18px var(--earth-power-rust-soft);opacity:0;pointer-events:none;transform:translateY(8px);transition:opacity 180ms var(--ease-out-expo),transform 180ms var(--ease-out-expo)}
.rest-menu-popover.active{opacity:1;pointer-events:auto;transform:translateY(0)}
/* Blur scrim — fades in behind the rest-menu popover to direct focus to the choice */
#rest-menu-backdrop{position:fixed;inset:0;z-index:998;opacity:0;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);background:rgba(0,0,0,.12);transition:opacity 180ms var(--ease-out-expo);pointer-events:none}
#rest-menu-backdrop.active{opacity:1}
@media(prefers-reduced-motion:reduce){#rest-menu-backdrop{backdrop-filter:none;-webkit-backdrop-filter:none;background:rgba(0,0,0,.35)}}
.rest-pref-chip{display:inline-flex;align-items:center;margin-top:5px;padding:3px 10px;border:1px solid var(--earth-power-border-subtle);border-radius:var(--earth-power-radius-pill);background:var(--earth-power-surface-raised);color:var(--earth-power-text-secondary);font-size:var(--fs-2xs);font-weight:700;white-space:nowrap;cursor:pointer;transition:background-color var(--duration-interaction) var(--ease-standard),border-color var(--duration-interaction) var(--ease-standard),color var(--duration-interaction) var(--ease-standard)}
.rest-pref-chip:hover{background:var(--earth-power-rust-soft);border-color:var(--earth-power-rust-border);color:var(--earth-power-text-primary)}
@media(prefers-reduced-motion:reduce){.rest-pref-chip{transition:none}}
.rest-menu-btn{min-height:34px;padding:0 12px;border-radius:var(--earth-power-radius-pill);border:1px solid var(--earth-power-border-subtle);background:var(--earth-power-surface-raised);color:var(--earth-power-text-secondary);font-size:var(--fs-xs);font-weight:700;white-space:nowrap}
.rest-menu-btn:hover{color:var(--earth-power-text-primary);border-color:var(--earth-power-rust-border);background:var(--earth-power-rust-soft)}
.rest-menu-skip{color:var(--earth-power-text-muted)}
.exercise-card-head{padding:14px var(--sp-4) var(--sp-3);border-bottom:1px solid var(--earth-power-border-subtle)}
.exercise-card[data-complete="true"] .exercise-card-head{border-bottom-color:var(--earth-power-border-subtle)}
.exercise-controls{display:flex;flex-direction:column;gap:2px;padding-top:3px;flex-shrink:0}
.exercise-move-btn{padding:3px 7px;font-size:var(--fs-2xs);min-height:auto}
.exercise-main{flex:1;min-width:0}
.exercise-title-input{font-family:var(--ff-display);font-size:var(--fs-lg);font-weight:700;background:transparent;border:none;border-bottom:1px solid var(--earth-power-border-subtle);border-radius:0;padding:var(--sp-1) 0;width:100%;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Target sets/reps — "sets × reps" readout (display) that taps to compact inputs (edit) */
.exercise-target-readout{display:inline-flex;flex-direction:column;align-items:flex-start;gap:3px;margin:0 0 0 -7px;padding:3px 7px;background:transparent;border:0;border-radius:var(--earth-power-radius-control);min-height:auto;cursor:pointer;text-align:left;letter-spacing:0;transition:background-color 140ms var(--ease-standard)}
.exercise-target-readout:hover{background:var(--earth-power-surface-raised)}
.exercise-target-label{font-family:var(--ff-label);font-size:var(--fs-2xs);font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--earth-power-text-secondary);line-height:1}
.exercise-target-figure{display:inline-flex;align-items:baseline;gap:7px;white-space:nowrap}
.exercise-target-num{font-family:var(--ff-metric);font-variant-numeric:tabular-nums;font-size:var(--fs-xl);font-weight:700;line-height:1;color:var(--earth-power-text-primary);white-space:nowrap}
.exercise-target-x{font-family:var(--ff-metric);font-size:var(--fs-lg);font-weight:600;line-height:1;color:var(--earth-power-text-muted)}
.exercise-target-unit{font-family:var(--ff-label);font-size:var(--fs-2xs);font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--earth-power-text-muted);align-self:center}
.exercise-target-empty{font-family:var(--ff-label);font-size:var(--fs-xs);font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--earth-power-text-muted)}
.exercise-targets-edit{display:inline-flex;align-items:flex-end;gap:9px;padding:1px 0}
.exercise-target-edit-field{display:inline-flex;flex-direction:column;gap:3px}
.exercise-target-edit-label{font-family:var(--ff-label);font-size:var(--fs-2xs);font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--earth-power-text-secondary);line-height:1}
.exercise-target-input{font-family:var(--ff-metric);font-variant-numeric:tabular-nums;font-size:var(--fs-md);font-weight:700;padding:6px 8px;width:auto;text-align:center;transform-origin:center;transition:background-color 180ms var(--ease-standard),transform 180ms var(--ease-standard),box-shadow 180ms var(--ease-standard)}
.exercise-target-input-sets{width:3.4em}
.exercise-target-input-reps{width:5.2em}
.exercise-targets-edit .exercise-target-x{padding-bottom:7px}
.exercise-remove-btn{padding:6px;min-height:auto;font-size:13px;flex-shrink:0;color:var(--text3)}
.exercise-remove-btn:hover{color:var(--volt);background:var(--volt-subtle);text-shadow:-1px 0 color-mix(in oklab,var(--volt) 30%,transparent),1px 0 color-mix(in oklab,var(--color-info) 30%,transparent)}
.exercise-meta-compact{margin-top:var(--sp-3)}
.target-compact-label{font-family:var(--ff-label);font-size:var(--fs-2xs);font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--earth-power-text-secondary);display:block;margin-bottom:4px}
.target-compact-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.exercise-target-readout-compact{background:transparent;border:0;padding:0;min-height:auto;cursor:pointer;font-family:var(--ff-metric);font-variant-numeric:tabular-nums;font-size:var(--fs-md);font-weight:700;color:var(--earth-power-text-primary);letter-spacing:0;transition:color 120ms var(--ease-standard)}
.exercise-target-readout-compact:hover{color:var(--earth-power-text-primary);text-decoration:underline;text-decoration-color:var(--earth-power-rust);text-underline-offset:3px;transform:none;background:transparent}
.target-set-count{font-family:var(--ff-metric);font-variant-numeric:tabular-nums;font-size:var(--fs-md);font-weight:700;color:var(--earth-power-text-primary);transition:color var(--duration-interaction) var(--ease-standard)}
.target-set-count[data-progress="partial"]{color:var(--earth-power-text-secondary)}
.target-set-count[data-progress="complete"]{color:var(--volt);animation:set-count-complete 240ms var(--ease-out-expo) both}
@keyframes set-count-complete{0%{transform:scale(1)}50%{transform:scale(1.08);text-shadow:0 0 8px var(--earth-power-rust-soft)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.target-set-count{transition:none}.target-set-count[data-progress="complete"]{animation:none}}
.target-weight-panel{min-width:0;display:grid;gap:2px}
.target-weight-label{font-family:var(--ff-label);font-size:var(--fs-2xs);font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--earth-power-text-secondary)}
.target-weight-value{display:block;font-size:var(--fs-xl);font-weight:700;line-height:1;color:var(--earth-power-text-primary);letter-spacing:0}
.target-weight-meta{font-size:var(--fs-xs);font-weight:700;color:var(--earth-power-text-secondary);min-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exercise-gauge{--exercise-gauge-size:clamp(104px,30vw,124px);position:relative;inline-size:var(--exercise-gauge-size);aspect-ratio:1;border-radius:50%;display:grid;place-items:center;justify-self:end;background:conic-gradient(var(--earth-power-rust) var(--gauge-progress),var(--earth-power-surface-high) 0);box-shadow:inset 0 2px 4px rgba(255,255,255,.08),inset 0 -8px 18px rgba(47,62,70,.42),0 0 22px var(--earth-power-rust-soft);transition:--gauge-progress 420ms var(--ease-in-out-sharp),filter 180ms var(--ease-in-out-sharp)}
.exercise-gauge::before{content:'';position:absolute;inset:calc(var(--exercise-gauge-size) * .088);border-radius:inherit;background:linear-gradient(145deg,color-mix(in oklab,var(--card-surface) 82%,white),var(--earth-power-surface-card));box-shadow:inset 0 1px 2px rgba(255,255,255,.1),inset 0 -10px 18px var(--earth-power-rust-soft)}
.exercise-gauge::after{content:'';position:absolute;inset:0;border-radius:inherit;background-image:radial-gradient(circle at 32% 24%,rgba(255,255,255,.18) 0 1px,transparent 1.8px),radial-gradient(circle at 70% 72%,rgba(255,255,255,.08) 0 1px,transparent 2px);background-size:13px 13px,17px 17px;opacity:.32;mix-blend-mode:screen;pointer-events:none}
.exercise-gauge-core{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;inline-size:calc(var(--exercise-gauge-size) * .64);aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at center,var(--earth-power-rust-soft),transparent 64%);font-weight:700;color:var(--earth-power-text-primary)}
.exercise-gauge-count{font-family:var(--ff-metric);font-variant-numeric:tabular-nums;font-size:var(--fs-xl);line-height:1}
.exercise-gauge-caption{font-family:var(--ff-label);font-size:9px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--earth-power-text-muted);line-height:1}
.exercise-gauge-complete{background:conic-gradient(color-mix(in oklab,var(--earth-power-text-muted) 54%,var(--earth-power-surface-card)) var(--gauge-progress),var(--earth-power-surface-high) 0);box-shadow:inset 0 2px 4px rgba(255,255,255,.08),inset 0 -8px 18px rgba(47,62,70,.42)}
.exercise-gauge-complete::before{background:linear-gradient(145deg,var(--earth-power-surface-card),var(--card-surface));box-shadow:inset 0 1px 2px rgba(255,255,255,.08),inset 0 -10px 18px rgba(47,62,70,.18)}
.exercise-gauge-complete .exercise-gauge-core{background:var(--earth-power-surface-card);color:var(--earth-power-text-muted)}
.exercise-gauge-just-complete{animation:exercise-gauge-settle 180ms var(--ease-in-out-sharp)}
.exercise-gauge-just-complete .exercise-gauge-core{animation:exercise-gauge-core-settle 180ms var(--ease-in-out-sharp)}
.exercise-card[data-complete="true"] .progress-fill-soft{background:linear-gradient(45deg,var(--volt),var(--accent-primary-emphasis))}
.exercise-card[data-complete="true"] .exercise-gauge{filter:saturate(1)}
.set-list{display:flex;flex-direction:column;gap:2px;padding-block:4px;background:var(--earth-power-surface-app)}
.suggestion-wrap{padding:0 14px var(--sp-2);border-bottom:1px solid var(--earth-power-border-subtle)}
.set-edit-input{font-size:var(--fs-md);padding:9px 5px;text-align:center;transform-origin:center;transition:background-color 180ms var(--ease-standard),transform 180ms var(--ease-standard),box-shadow 180ms var(--ease-standard)}
.set-edit-input-wide{font-size:var(--fs-md);padding:9px var(--sp-1);text-align:center;transform-origin:center;transition:background-color 180ms var(--ease-standard),transform 180ms var(--ease-standard),box-shadow 180ms var(--ease-standard)}
.set-edit-input:focus,.set-edit-input-wide:focus,.exercise-target-input:focus{position:relative;z-index:1;transform:scale(1.02)}
.set-muted-input{opacity:.4}
.add-set-wrap{padding:10px 14px;background:var(--earth-power-surface-shell)}
.add-set-btn{width:100%;font-weight:600}
.history-pad{padding:14px var(--sp-4)}
.history-empty{color:var(--earth-power-text-muted);font-size:var(--fs-base);padding:var(--sp-8) 0;text-align:center}
.history-empty-detail{font-size:var(--fs-sm)}
.history-backup-disclosure{margin-top:44px;border-top:1px solid var(--earth-power-border-subtle);padding-top:var(--sp-2)}
.history-backup-summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);min-height:44px;cursor:pointer;color:var(--color-text-muted-readable);font-family:var(--ff-label);font-size:11px;font-weight:700;letter-spacing:0;text-transform:uppercase;-webkit-tap-highlight-color:transparent}
.history-backup-summary::-webkit-details-marker{display:none}
.history-backup-summary:hover{color:var(--earth-power-text-secondary)}
.history-backup-summary:focus-visible{outline:2px solid var(--earth-power-focus);outline-offset:4px;border-radius:var(--earth-power-radius-control)}
.history-backup-chev{font-family:var(--ff-body);font-size:20px;line-height:1;transition:transform 160ms var(--ease-in-out-sharp,ease)}
.history-backup-disclosure[open] .history-backup-chev{transform:rotate(90deg)}
.history-backup-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding-top:var(--sp-2)}
.history-backup-actions .btn-outline{min-width:0}
.history-import-input{display:none}
.history-card{background:var(--earth-power-surface-card-elevated);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);padding:14px var(--sp-4);margin-bottom:var(--sp-2);cursor:pointer;transition:border-color .15s}
.history-card:hover{border-color:var(--earth-power-border-strong)}
.history-card-static{margin-bottom:var(--sp-2)}
.history-row{display:flex;justify-content:space-between;align-items:flex-start}
.history-main{min-width:0;flex:1}
.history-title{font-weight:700;font-size:var(--fs-md);margin-bottom:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill-row{display:flex;gap:6px;flex-wrap:wrap}
.history-delete{color:var(--earth-power-text-muted);padding:var(--sp-1);min-height:auto;flex-shrink:0;margin-left:var(--sp-2)}
.history-back{margin-bottom:var(--sp-2);padding:6px 10px}
.history-preview-title{font-size:var(--fs-xl);margin-bottom:5px}
.preview-card-title{font-size:var(--fs-md);margin-bottom:3px}
.preview-note{font-size:var(--fs-sm);color:var(--earth-power-text-muted);margin-bottom:var(--sp-2)}
.preview-set-row{margin-top:6px}
.set-pill-complete{background:var(--earth-power-rust-soft);border-color:var(--earth-power-rust-border);color:var(--earth-power-text-primary)}
.pill-accent{background:var(--earth-power-rust-soft);border-color:var(--earth-power-rust-border);color:var(--earth-power-text-primary)}
.no-sets{color:var(--earth-power-text-muted);font-size:var(--fs-sm)}
.ex-meta-line{font-size:var(--fs-sm);color:var(--earth-power-text-muted);margin-top:2px}
.lib-row-main{flex:1;min-width:0}
.lib-row-name{font-weight:600;font-size:var(--fs-md);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lib-delete-btn{flex-shrink:0;min-height:40px;padding:var(--sp-2) var(--sp-3)}
.set-grid{display:grid;grid-template-columns:var(--set-row-cols);gap:var(--sp-1);align-items:center}
.set-grid-fields{display:grid;grid-template-columns:1fr 1fr 1fr;gap:var(--sp-2);align-items:center}
.set-row{display:grid;grid-template-columns:var(--set-row-cols);gap:var(--sp-1);align-items:center;padding:6px 14px;border-bottom:0;border-left:4px solid transparent;background:transparent}
.set-row-active{background:transparent;border-left-color:var(--accent-primary-20)}
.set-row-completed{cursor:pointer;background:transparent}
.set-row-completed-editing{background:var(--earth-power-surface-card)}
.set-row-number{font-family:var(--ff-label);font-size:13px;font-weight:700;color:var(--earth-power-text-muted)}
.set-row-active .set-row-number{color:var(--earth-power-rust)}
.set-row-completed .set-row-number{color:var(--complete)}
.set-row-values{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;min-width:0}
.set-row-value{font-size:var(--fs-base);color:var(--earth-power-text-secondary);text-align:center}
.set-row-completed .set-row-value{color:var(--earth-power-text-secondary)}
.set-row-edit-hint{font-size:11px;color:var(--earth-power-text-muted);justify-self:end;white-space:nowrap}
.set-row-fields{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:stretch;background:var(--earth-power-surface-card);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-control);overflow:hidden;min-width:0}
.set-row-dormant .set-row-fields{opacity:.72}
.data-row{position:relative}
.set-row.data-row{overflow:hidden}
.set-row-active .set-row-fields,.set-row-dormant .set-row-fields{grid-column:2 / span 3}
.set-row-active .set-row-fields{background:color-mix(in oklab,var(--earth-power-surface-raised) 82%,var(--earth-power-surface-card));border-color:var(--accent-primary-20);box-shadow:inset 0 0 0 1px var(--earth-power-rust-soft)}
.set-row-completed-editing .set-row-fields{background:var(--earth-power-surface-raised);border-color:var(--earth-power-border-strong)}
.set-row-field{position:relative;min-width:0}
.set-row-field + .set-row-field{border-left:1px solid var(--earth-power-border-subtle);align-self:stretch}
.set-row-input{width:100%;min-width:0;padding:9px 10px 8px;border:0;border-radius:0;background:transparent;font-size:var(--fs-md);text-align:center;box-shadow:none;transform-origin:center;transition:background-color 180ms var(--ease-standard),transform 180ms var(--ease-standard),box-shadow 180ms var(--ease-standard)}
.set-row-input:focus{background:transparent;box-shadow:none}
.set-row-input:focus{position:relative;z-index:1;transform:scale(1.02)}
.set-row-input-rpe{font-size:13px;padding-inline:6px}
.set-row-control{display:flex;align-items:center;justify-content:center;min-width:0;width:100%;padding-inline:0}
.set-row-active .set-row-control,.set-row-dormant .set-row-control{grid-column:5}
.set-row-control .btn-sm{margin-left:auto;margin-right:0}
.set-row-control .chk{margin:0}
.set-row-control .btn-sm{justify-content:center;text-align:center;min-width:72px;min-height:40px}
.set-row-delete{padding:4px;min-height:0;min-width:0;min-block-size:0;min-inline-size:0;inline-size:22px;block-size:22px;font-size:11px;line-height:1;color:var(--earth-power-rust-hover);display:inline-flex;align-items:center;justify-content:center;border-radius:var(--earth-power-radius-badge);justify-self:end}
.set-row-active .set-row-delete,.set-row-dormant .set-row-delete{grid-column:6}
.set-row-dormant .set-row-delete{color:var(--earth-power-text-muted)}
.set-row-delete:hover{color:var(--earth-power-rust);background:var(--earth-power-rust-soft);text-shadow:-1px 0 color-mix(in oklab,var(--earth-power-rust) 30%,transparent),1px 0 color-mix(in oklab,var(--color-info) 30%,transparent)}
.set-row-dormant .set-row-delete:hover{color:var(--earth-power-text-secondary);background:var(--earth-power-surface-card);text-shadow:none}
.lightning-strike{position:absolute;top:4px;bottom:4px;inline-size:2px;z-index:10;pointer-events:none;background:linear-gradient(to bottom,transparent,var(--earth-power-rust) 20%,var(--earth-power-rust-emphasis) 50%,var(--earth-power-rust) 80%,transparent);border-radius:var(--earth-power-radius-pill);opacity:0}
.lightning-strike.active{animation:input-edge-pulse .4s ease-in-out both}
.weight-stepper-popover{position:fixed;z-index:1201;inline-size:132px;display:flex;align-items:center;justify-content:space-between;gap:4px;padding:4px;border:1px solid var(--earth-power-rust-border);border-radius:var(--earth-power-radius-pill);background:color-mix(in oklab,var(--earth-power-surface-card) 88%,var(--earth-power-surface-app));box-shadow:0 10px 24px rgba(47,62,70,.36),0 0 18px var(--earth-power-rust-soft);opacity:0;pointer-events:none;transform:translateY(8px);transition:opacity 180ms var(--ease-out-expo),transform 180ms var(--ease-out-expo)}
.weight-stepper-popover.active{opacity:1;pointer-events:auto;transform:translateY(0)}
.weight-stepper-btn{inline-size:32px;block-size:28px;min-height:0;padding:0;border-radius:var(--earth-power-radius-pill);border-color:var(--earth-power-border-subtle);background:var(--earth-power-surface-raised);color:var(--earth-power-text-secondary);font-size:12px}
.weight-stepper-btn:hover{color:var(--earth-power-text-primary);border-color:var(--earth-power-rust-border);background:var(--earth-power-rust-soft)}
.weight-stepper-label{min-width:46px;text-align:center;font-size:var(--fs-xs);font-weight:700;color:var(--earth-power-rust);white-space:nowrap}
.set-row-stack{display:flex;flex-direction:column;gap:2px;padding-block:2px}
.set-row-secondary{display:flex;justify-content:flex-end;padding:6px 14px 10px 14px;border-bottom:0;background:transparent}
.set-row-secondary .btn-ghost{padding:6px 10px;min-height:auto;font-size:11px;color:var(--earth-power-text-muted);border:1px solid var(--earth-power-border-subtle);border-radius:var(--earth-power-radius-pill);background:transparent}
.set-row-secondary .btn-ghost:hover{color:var(--earth-power-text-secondary);background:var(--earth-power-surface-card);border-color:var(--earth-power-border-strong)}
.sticky-header{padding:14px var(--sp-4)}
.session-header{margin:0 var(--sp-4);padding:14px 0 16px}
.session-header .page-title-input{font-size:var(--fs-3xl);font-weight:700;line-height:1.1;margin-bottom:16px}
.session-header .field-row{margin-bottom:16px}
#sync-badge{position:fixed;bottom:calc(16px + var(--safe-b));right:16px;z-index:99;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;padding:4px 9px;border-radius:var(--earth-power-radius-pill);border:1px solid var(--earth-power-border-strong);background:var(--earth-power-surface-card);color:var(--earth-power-text-muted);opacity:0;transition:opacity .4s;pointer-events:none}
#sync-badge.show{opacity:1}
#sync-badge.syncing{color:var(--volt);border-color:var(--volt-border)}
#sync-badge.synced{color:var(--complete);border-color:var(--border2)}
#sync-badge.local{color:var(--earth-power-text-muted);border-color:var(--earth-power-border-strong)}
#sync-badge.error{color:var(--red);border-color:var(--red-bg)}
#sync-badge.warn{color:oklch(78% .17 55);border-color:oklch(78% .17 55 / 30%)}
#save-workout-sheet,#ex-sheet{position:fixed;inset:0;background:transparent;z-index:1100;display:none;align-items:flex-end;-webkit-tap-highlight-color:transparent;transition:background-color var(--duration-entry) var(--ease-in-out-sharp)}
#save-workout-sheet.is-open,#ex-sheet.is-open{background:var(--color-overlay-scrim)}
.sheet{background:var(--earth-power-surface-shell);border-radius:var(--earth-power-radius-sheet) var(--earth-power-radius-sheet) 0 0;padding:20px 16px calc(24px + var(--safe-b));width:100%;max-height:var(--earth-power-sheet-max-height);overflow-y:auto}
#save-workout-sheet .sheet,#ex-sheet .sheet{padding:0;max-height:min(var(--earth-power-sheet-max-height),720px);overflow:hidden;transform:translateY(100%);transition:transform var(--duration-entry) var(--ease-out-expo)}
#ex-sheet.is-open .sheet,#save-workout-sheet.is-open .sheet{transform:translateY(0)}
.sheet-handle{width:36px;height:4px;background:var(--earth-power-surface-high);border-radius:2px;margin:0 auto 20px}
.lib-row{display:flex;align-items:center;gap:10px;background:var(--earth-power-surface-card-elevated);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);padding:12px 14px;cursor:pointer;transition:var(--tr);touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.lib-row:active{background:var(--earth-power-surface-raised);border-color:var(--earth-power-rust-border)}
.ex-autocomplete{container-type:inline-size;container-name:ex-sheet}
.ex-form-grid{display:grid;gap:8px}
.ex-search-stack{position:relative;display:grid;gap:8px}
.ex-helper,.ex-status,.ex-error,.ex-toast{overflow-wrap:anywhere;word-break:normal}
.ex-helper,.ex-status{min-height:20px;font-size:12px;line-height:1.3334;color:var(--earth-power-text-muted)}
.ex-status{color:var(--earth-power-rust)}
.ex-matches{position:absolute;left:0;right:0;top:calc(100% + 6px);display:grid;gap:8px;max-height:none;overflow:visible;padding:12px 10px 10px;background:var(--earth-power-surface-shell);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);box-shadow:var(--earth-power-shadow-popover);opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-6px);transition:opacity .18s ease,transform .18s ease,visibility 0s linear .18s;z-index:60}
.ex-matches.is-open{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0);transition:opacity .18s ease,transform .18s ease,visibility 0s linear 0s}
.ex-matches-heading{font-family:var(--ff-label);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--earth-power-text-muted)}
.ex-typeahead-list{display:flex;flex-direction:column;gap:8px}
.ex-typeahead-list:empty{display:none}
.ex-match-row{container-type:inline-size;container-name:ex-match;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:start;width:100%;padding:14px 16px;background:var(--earth-power-surface-card-elevated);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);text-align:left;color:var(--earth-power-text-primary);min-height:56px}
.ex-match-row:hover{background:var(--earth-power-surface-raised);border-color:var(--earth-power-border-strong)}
.ex-match-row:active{background:var(--earth-power-surface-raised);border-color:var(--earth-power-rust-border)}
.ex-match-main{display:grid;gap:2px;min-width:0}
.ex-match-name{font-size:15px;font-weight:600;line-height:1.3;color:var(--earth-power-text-primary)}
.ex-match-main > div{font-size:12px;color:var(--earth-power-text-muted);margin-top:0}
.ex-match-tag{display:inline-flex;align-items:center;justify-content:center;padding:5px 10px;border-radius:var(--earth-power-radius-pill);border:1px solid var(--earth-power-border-strong);background:var(--earth-power-surface-raised);font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--earth-power-text-secondary);white-space:nowrap}
.ex-match-row[data-source=saved] .ex-match-tag{border-color:var(--earth-power-rust-border);background:var(--earth-power-rust-soft);color:var(--earth-power-rust)}
.ex-toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translate(-50%,12px);opacity:0;pointer-events:none;z-index:1200;max-width:min(420px,calc(100vw - 32px));padding:12px 14px;border-radius:var(--earth-power-radius-card);border:1px solid var(--earth-power-border-strong);background:var(--earth-power-surface-card);color:var(--earth-power-text-primary);font-size:13px;line-height:1.35;box-shadow:var(--earth-power-shadow-md);transition:opacity .18s ease,transform .18s ease}
.ex-toast.show{opacity:1;transform:translate(-50%,0)}
@container ex-match (max-width: 260px){
  .ex-match-row{grid-template-columns:1fr}
  .ex-match-tag{justify-self:start}
}
@supports (text-wrap: pretty){
  .ex-helper,.ex-status,.ex-error,.ex-toast{text-wrap:pretty}
}

.bottom-sheet-shell{position:relative;inset-inline:0;bottom:var(--bottom-sheet-safe-offset);min-height:var(--bottom-sheet-base-height);padding-bottom:var(--bottom-sheet-safe-padding);max-height:100dvh;overflow:hidden}
.bottom-sheet-scroll{display:flex;flex-direction:column;gap:8px;overflow-y:auto;overscroll-behavior:contain;max-height:inherit}
.bottom-sheet-actions{position:sticky;bottom:0;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:12px;padding-bottom:max(var(--bottom-sheet-safe-padding),calc(16px + env(safe-area-inset-bottom,0px)));margin-top:4px;border-top:1px solid var(--earth-power-border-subtle);background:linear-gradient(to top,var(--earth-power-surface-shell) 78%,transparent)}
#save-workout-sheet .bottom-sheet-shell,#ex-sheet .bottom-sheet-shell{bottom:0;min-height:auto;padding-bottom:0;max-height:min(82dvh,720px)}
#save-workout-sheet .bottom-sheet-scroll,#ex-sheet .bottom-sheet-scroll{padding:20px 16px 16px;max-height:inherit}
#save-workout-sheet .bottom-sheet-shell .sheet-handle,#ex-sheet .bottom-sheet-shell .sheet-handle{margin-bottom:16px}
#ex-sheet .bottom-sheet-shell .lib-row{min-height:56px;gap:8px;padding:16px}
#ex-sheet .bottom-sheet-shell .btn-sm{min-height:44px;padding:8px 16px}
#ex-sheet .bottom-sheet-shell .ex-section-title{font-family:var(--ff-label);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--earth-power-text-muted);margin-bottom:8px}
#ex-sheet .bottom-sheet-shell .ex-sheet-title{font-family:var(--ff-display);font-size:24px;font-weight:700;letter-spacing:.01em;line-height:1.3334;margin-bottom:16px}
#ex-sheet .bottom-sheet-shell .ex-saved-block{margin-bottom:16px}
#ex-sheet .bottom-sheet-shell .ex-saved-list{display:flex;flex-direction:column;gap:8px;margin-bottom:16px}
#ex-sheet .bottom-sheet-shell .ex-divider{height:1px;background:var(--earth-power-border-subtle)}
#ex-sheet .bottom-sheet-shell .ex-primary-input{font-size:16px;min-height:48px}
#ex-sheet .bottom-sheet-shell .ex-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#ex-sheet .bottom-sheet-shell .ex-grid input{font-size:16px;min-height:48px}
#ex-sheet .bottom-sheet-shell .ex-error{color:var(--red);font-size:13px;line-height:1.2308;min-height:24px}
#ex-sheet .bottom-sheet-shell .bottom-sheet-actions .btn-primary{min-height:56px;font-size:15px;font-weight:700;letter-spacing:.03em}
#ex-sheet .bottom-sheet-shell .bottom-sheet-actions .btn-outline{min-height:56px;font-size:15px;font-weight:600;letter-spacing:.02em}
#ex-sheet .bottom-sheet-shell .btn-outline:disabled{opacity:.45;cursor:not-allowed}
#ex-sheet .bottom-sheet-shell .btn-outline:disabled:hover{background:transparent;border-color:var(--earth-power-border-strong);color:var(--earth-power-text-secondary)}
#ex-sheet .bottom-sheet-shell .ex-blank-btn{width:100%;font-size:14px;font-weight:600;letter-spacing:.01em;color:var(--earth-power-text-secondary);min-height:48px}
input:focus-visible,textarea:focus-visible,button:focus-visible,.ex-match-row:focus-visible{outline:2px solid var(--earth-power-rust);outline-offset:3px}
@supports not (bottom:env(safe-area-inset-bottom,0px)){
  :root{
    --safe-area-bottom-live:0px;
    --safe-area-bottom-max:36px;
    --bottom-sheet-safe-padding:calc(36px + 16px);
    --bottom-sheet-safe-offset:-36px;
  }
}
@supports not (padding-bottom:env(safe-area-max-inset-bottom,36px)){
  :root{
    --safe-area-bottom-max:36px;
    --bottom-sheet-safe-padding:calc(36px + 16px);
    --bottom-sheet-safe-offset:calc(env(safe-area-inset-bottom,0px) - 36px);
  }
}


.data-readout{font-family:var(--ff-readout);font-variant-numeric:tabular-nums}
.data-emphasis{font-weight:700;color:var(--earth-power-text-primary)}
.hint-muted{color:var(--earth-power-text-muted)}
.suggestion-hint{display:flex;align-items:center;gap:var(--sp-2);margin-top:var(--sp-2);padding:var(--sp-2) 10px;background:var(--earth-power-surface-raised);border:1px solid var(--earth-power-border-subtle);border-radius:var(--earth-power-radius-badge);font-size:var(--fs-sm);color:var(--earth-power-text-secondary)}
.suggestion-warning{color:var(--earth-power-warning);background:var(--earth-power-warning-soft);border:1px solid color-mix(in oklab,var(--earth-power-warning) 35%,transparent);border-radius:var(--earth-power-radius-badge);padding:6px 10px}
.suggestion-label{font-family:var(--ff-label);font-size:var(--fs-2xs);font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--earth-power-text-muted)}
.suggestion-tag{margin-left:6px;font-size:var(--fs-2xs);color:var(--earth-power-rust);background:var(--earth-power-rust-soft);border:1px solid var(--earth-power-rust-border);border-radius:4px;padding:1px 6px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.ui-header{font-family:var(--ff-display);font-weight:700;letter-spacing:.05em}
.ui-header.view-title{font-family:var(--ff-display);letter-spacing:.02em;line-height:1}

@keyframes timerPulseWarning{
  0%,100%{opacity:1;text-shadow:0 0 0 transparent}
  50%{opacity:.86;text-shadow:0 0 12px var(--red-bg)}
}
@keyframes timerPulseOverdue{
  0%,100%{opacity:1;text-shadow:0 0 0 transparent}
  50%{opacity:.82;text-shadow:0 0 16px var(--red-bg)}
}
#tdisplay[data-urgency="normal"],
#ov-display[data-urgency="normal"]{color:var(--earth-power-rust);animation:none;text-shadow:none}
#tdisplay[data-urgency="warning"]{color:var(--red);animation:timerPulseWarning 1.12s ease-in-out infinite}
#ov-display[data-urgency="warning"]{color:var(--red);animation:timerPulseWarning 1.12s ease-in-out infinite}
#tdisplay[data-urgency="overdue"]{color:var(--red);animation:timerPulseOverdue .88s ease-in-out infinite}
#ov-display[data-urgency="overdue"]{color:var(--red);animation:timerPulseOverdue .88s ease-in-out infinite}
#tdisplay[data-urgency="done"]{color:var(--earth-power-text-muted);animation:none;text-shadow:none}
#ov-display[data-urgency="done"]{color:var(--earth-power-text-muted);animation:none;text-shadow:none}
#tbar,
#ov-bar{inline-size:var(--timer-progress,0%)}
#timer-overlay{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  z-index:999;
  display:none;
  flex-direction:column;
  background:var(--earth-power-surface-card);
  border-top:1px solid var(--earth-power-border-strong);
  padding:var(--sp-4) 18px calc(var(--sp-4) + var(--safe-b));
  opacity:1;
  transform:translateY(0) scale(1);
  transform-origin:bottom center;
  transition:opacity var(--duration-entry) var(--ease-out-expo),transform var(--duration-entry) var(--ease-out-expo);
}
.timer-overlay-row{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--sp-3);align-items:center}
.timer-readout-panel{display:grid;grid-template-columns:minmax(0,1fr);gap:7px;align-items:center;justify-items:start;min-width:0}
.timer-display{font-family:var(--ff-readout);font-size:var(--fs-timer);font-weight:700;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:.04em;color:var(--earth-power-rust);min-inline-size:92px;text-align:left}
.timer-bar-track{inline-size:100%;height:5px;overflow:hidden;border-radius:999px;background:var(--earth-power-border-subtle)}
.timer-bar-fill{height:100%;border-radius:inherit;background:linear-gradient(45deg,var(--earth-power-rust),var(--earth-power-rust-emphasis));box-shadow:0 0 8px var(--earth-power-rust-soft);transition:inline-size 1s linear}
.timer-context-label{font-family:var(--ff-label);font-size:var(--fs-2xs);font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--earth-power-text-muted)}
.timer-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;width:100%;min-width:0}
.timer-action{inline-size:100%;min-width:0;min-height:48px;padding:0 8px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--earth-power-border-strong);background:color-mix(in oklab,var(--earth-power-surface-card) 84%,transparent);box-shadow:inset 0 1px 0 rgba(245,240,232,.08);color:var(--earth-power-text-secondary);font-family:var(--ff-label);font-size:var(--fs-sm);font-weight:700;letter-spacing:.03em;line-height:1}
.timer-action:hover{border-color:var(--earth-power-rust-border);background:var(--earth-power-rust-soft);color:var(--earth-power-rust-hover)}
.timer-action-icon{font-size:18px;letter-spacing:0}
.timer-action-close{color:var(--earth-power-rust-hover);border-color:var(--earth-power-rust-border)}
#timer-overlay.timer-overlay-hidden{
  opacity:0;
  transform:translateY(20px) scale(.97);
  pointer-events:none;
}
#timer-overlay.timer-overlay-exit{
  opacity:0;
  transform:scale(.94);
  pointer-events:none;
  transition:opacity var(--duration-exit) var(--ease-in-out-sharp),transform var(--duration-exit) var(--ease-in-out-sharp);
}

@media(min-width:440px){
  :root{--timer-overlay-clearance:calc(144px + var(--safe-b))}
  .timer-overlay-row{grid-template-columns:minmax(0,1fr) auto;gap:var(--sp-4)}
  .timer-actions{grid-template-columns:repeat(2,48px);width:auto}
  .timer-action{inline-size:48px;padding:0}
}



/* View transitions — fires only on view switches, not every render() */
::view-transition-old(root){animation:var(--duration-exit) var(--ease-in-out-sharp) both _vt-out}
::view-transition-new(root){animation:var(--duration-entry) var(--ease-out-expo) both _vt-in}
@keyframes _vt-out{to{opacity:0;transform:scale(.98)}}
@keyframes _vt-in{from{opacity:0;transform:scale(.98)}}
/* Sidebar nav */
#rail-logo{padding:4px 10px 12px;margin-bottom:0;border-bottom:1px solid var(--earth-power-border-subtle)}
#rail-logo .label{font-family:var(--ff-label);font-size:9px;margin-bottom:3px}
#rail-logo .wordmark{font-family:var(--ff-display);font-size:19px;font-weight:600;color:var(--earth-power-text-primary);letter-spacing:.04em;line-height:1}
.rail-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.rail-menu{position:relative}
.rail-menu summary{list-style:none;user-select:none;-webkit-user-select:none;caret-color:transparent}
.rail-menu summary::-webkit-details-marker{display:none}
.rail-menu-trigger{inline-size:34px;block-size:34px;border:1px solid transparent;border-radius:var(--earth-power-radius-control);display:flex;align-items:center;justify-content:center;color:var(--earth-power-text-secondary);font-size:18px;line-height:1;cursor:pointer;transition:var(--tr)}
.rail-menu-trigger:hover,.rail-menu[open] .rail-menu-trigger{background:var(--earth-power-surface-card);border-color:var(--earth-power-border-subtle);color:var(--earth-power-text-primary)}
.rail-menu-trigger:focus-visible{outline:2px solid var(--earth-power-focus);outline-offset:2px;background:var(--earth-power-surface-card);color:var(--earth-power-text-primary)}
.rail-menu-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:50;inline-size:206px;display:flex;flex-direction:column;gap:6px;padding:8px;background:var(--earth-power-surface-shell);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);box-shadow:var(--earth-power-shadow-popover)}
/* Mobile-only nav menu in the session header — reuses the rail hamburger pattern.
   Desktop reaches History/Progress/Sync via the rail (#rail), hidden below 600px. */
.session-nav-menu{display:none}
@media(max-width:600px){.session-nav-menu{display:inline-flex;align-items:center}}
/* Trigger sits at the left of the session action row, so the panel opens rightward
   (the rail's default right:0 would push it off the left edge of the screen). */
.session-nav-menu .rail-menu-panel{left:0;right:auto}
.rail-menu-panel .sidebar-note.session-only.is-visible{padding:0 4px 4px}
.sidebar .progress-wrap{display:flex;flex:1;min-height:120px;flex-direction:column;align-items:center;gap:10px;padding:20px 0;margin-bottom:0;transition:margin-bottom var(--duration-entry) var(--ease-out-expo)}
body.has-visible-timer .sidebar .progress-wrap{margin-bottom:var(--timer-overlay-clearance)}
.sidebar .progress-meter{display:flex;align-items:stretch;gap:9px;flex:1;min-height:120px}
.sidebar .progress-scale{position:relative;flex:0 0 34px}
.sidebar .progress-tick{position:absolute;right:0;inline-size:14px;border-top:1px solid var(--earth-power-border-strong);transform:translateY(-.5px)}
.sidebar .progress-tick-label{position:absolute;right:18px;top:0;transform:translateY(-50%);font-family:var(--ff-label);font-size:10px;font-weight:700;color:var(--earth-power-text-secondary);line-height:1}
.sidebar .progress-track{flex:0 0 14px;height:100%;min-height:120px;background:var(--earth-power-surface-app);border:1px solid var(--earth-power-border-subtle);border-radius:999px;box-shadow:inset 0 1px 3px rgba(10,16,20,.45);display:flex;flex-direction:column;overflow:hidden}
.sidebar .progress-fill{width:100%;background:linear-gradient(to bottom,var(--earth-power-rust),var(--earth-power-rust-emphasis));transition:height 0.3s ease;border-radius:0}
.sidebar .progress-caption{font-size:var(--fs-xs);color:var(--earth-power-text-secondary);text-align:center;font-weight:500}
.rail-menu-panel button{
  width:100%;text-align:left;display:flex;align-items:center;gap:8px;
  background:transparent;border:1px solid transparent;color:var(--earth-power-text-secondary);
  border-radius:var(--earth-power-radius-control);padding:10px 12px;font-size:13px;font-weight:600;min-height:40px
}
.rail-menu-panel button:hover{background:var(--earth-power-surface-card);color:var(--earth-power-text-primary);border-color:var(--earth-power-border-subtle)}
#rail button.rail-active{border-left:3px solid var(--earth-power-rust);background:var(--earth-power-surface-card);color:var(--earth-power-rust);border-color:var(--earth-power-rust-border)}
#rail .session-only{display:none}
#rail .session-only.is-visible{display:flex}
#rail .sidebar-note.session-only.is-visible{display:block;padding:0 12px 4px}
@media(max-width:600px){body.has-session-progress{background-color:color-mix(in oklab,var(--earth-power-surface-app) calc(100% - var(--session-progress)),var(--card-surface) var(--session-progress));transition:background-color .3s ease}.app-shell{grid-template-columns:1fr}.sidebar{display:none}.session-actions{flex-wrap:wrap}.mobile-programs-action{display:inline-flex;align-items:center;justify-content:center}.session-time{margin-left:0}}

/* Base exercise card wrapper for session exercises */
.exercise-card{margin:var(--sp-3) var(--sp-4) 0;background:var(--earth-power-surface-card-elevated);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-sheet);overflow:hidden;box-shadow:var(--earth-power-shadow-card);transition:border-color .25s ease,box-shadow .25s ease}
.exercise-card + .exercise-card{margin-top:28px}
.exercise-card[data-complete="true"]{border-color:var(--earth-power-border-strong)}

/* Desktop bottom sheet */
@media(min-width:900px){
  #app{padding-bottom:40px}
  /* Bottom sheet → centered modal on desktop */
  #ex-sheet{align-items:center;justify-content:center}
  .sheet{width:min(480px,100%);border-radius:var(--earth-power-radius-sheet);padding-bottom:24px;max-height:80dvh}
  #ex-sheet .sheet{width:min(480px,100%);max-height:80dvh}
  #ex-sheet .bottom-sheet-shell{max-height:80dvh}
}

@media(min-width:900px){
  #app[data-view="picker"]{max-width:860px}
  .program-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-4)}
}

/* ─── Set-row shared layout ──────────────────────────────────── */
.sr-num{font-family:var(--ff-label);font-size:13px;font-weight:700;color:var(--earth-power-text-muted)}
.sr-num-active{color:var(--earth-power-rust)}
.sr-num-done{color:var(--complete)}
.sr-val{font-family:var(--ff-readout);font-size:13px;color:var(--earth-power-text-secondary);text-align:center;font-variant-numeric:tabular-nums}
.sr-val-muted{color:var(--earth-power-text-muted)}
.sr-hint{font-size:11px;color:var(--earth-power-text-secondary);text-align:right}
.sr-check{inline-size:22px;block-size:22px;border-radius:var(--earth-power-radius-control);display:inline-flex;align-items:center;justify-content:center;justify-self:end;background:var(--earth-power-surface-card);color:var(--earth-power-text-muted);font-size:12px;font-weight:700;border:1px solid color-mix(in oklab,var(--earth-power-text-muted) 36%,transparent)}
/* Completed row — subdued charcoal confirmation */
.set-row-done{cursor:pointer;background:var(--complete-subtle);padding-top:8px;padding-bottom:8px;border-bottom:0;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transform-origin:center}
.set-row-done + :is(.set-row-active,.set-row-dormant,.set-row-wrap){margin-top:var(--sp-2)}
:is(.set-row-active,.set-row-dormant,.set-row-wrap) + .set-row-done{margin-top:var(--sp-2)}
.set-row-done .sr-val{text-decoration-line:line-through;text-decoration-color:color-mix(in oklab,var(--completion-green) 48%,transparent);text-decoration-thickness:1px;text-underline-offset:3px}
.set-row-just-done{position:relative;overflow:hidden;animation:set-row-settle 180ms var(--ease-standard) both}
.set-row-just-done::after{content:'';position:absolute;top:6px;bottom:6px;left:0;inline-size:4px;pointer-events:none;background:var(--earth-power-rust);border-radius:0 var(--earth-power-radius-badge) var(--earth-power-radius-badge) 0;transform-origin:top;animation:set-edge-fill 180ms var(--ease-standard) both}
.set-row-just-done .sr-check{animation:set-check-fill 180ms var(--ease-standard) both}
.set-row-done:active{background:var(--complete-subtle-active)}
/* Rows with secondary delete lane */
.set-row-wrap{border-bottom:0}
/* Active row — subtle inset emphasis on the input field strip */
.set-row-active input{background:var(--earth-power-surface-raised);border-color:var(--earth-power-border-strong);box-shadow:inset 0 1px 0 rgba(255,255,255,.04)}
/* Checkbox centering only for direct-row checkboxes, not nested control cells */
.set-row > .chk{margin:0 auto}
/* Done button in editing/active row */
.set-row-wrap .set-row{grid-template-columns:24px minmax(0,1fr) minmax(0,1fr) minmax(0,.75fr) 76px;gap:var(--sp-2);padding-right:14px}
.sr-done-btn{width:76px;min-width:0;padding:0 10px;min-height:40px;height:40px;font-size:11px;font-weight:700;color:var(--earth-power-text-on-accent);border-color:var(--earth-power-rust);background:var(--earth-power-rust);border-radius:var(--earth-power-radius-control)}
.sr-done-btn:hover{background:var(--earth-power-rust-hover);color:var(--earth-power-text-on-accent);border-color:var(--earth-power-rust-hover);box-shadow:var(--earth-power-rust-shadow)}
/* Secondary delete lane */
.set-row-del{display:flex;justify-content:flex-end;padding:2px 14px 4px}
.set-row-del button{padding:2px 8px;min-height:26px;font-size:11px;color:var(--earth-power-text-muted);background:transparent;border:none;border-radius:4px;cursor:pointer;letter-spacing:.02em;font-family:var(--ff-body)}
.set-row-del button:hover{color:var(--earth-power-danger);background:var(--earth-power-danger-soft);text-shadow:-1px 0 color-mix(in oklab,var(--earth-power-rust) 30%,transparent),1px 0 color-mix(in oklab,var(--color-info) 30%,transparent)}

/* ─────────────────────────────────────────────
   Ambient forest backdrop + Strata page entrance (Earth Power)
   Additive — present behind / on every view. No existing names changed.
   ───────────────────────────────────────────── */
.app-shell{position:relative;z-index:1}
/* === LOCKED (2026-06-21): owner-approved forest background + motion toggle.
   Do not modify without a new dated decision in docs/decisions/. Enforced by
   tests/forest-background-lock.test.js. Spec: docs/decisions/2026-06-21-forest-background-lock.md === */
/* Blue Ridge backdrop: one moody forest photo, mirror-looped. Alternating
   normal/flipped tiles make every seam a mirror seam, so the strip scrolls as a
   single seamless parallax plane. Bottom-anchored, masked to fade up into the
   app surface so upper content stays on clean dark ground. */
#forest-bg{position:fixed;left:0;right:0;bottom:0;width:100%;height:min(70vh,540px);z-index:0;pointer-events:none;overflow:hidden;opacity:1;transition:opacity var(--duration-entry,200ms) var(--ease-in-out-sharp,ease);-webkit-mask-image:linear-gradient(to top,black 60%,transparent);mask-image:linear-gradient(to top,black 60%,transparent)}
.forest-track{display:flex;width:max-content;height:100%;will-change:transform;animation:ep-forest-scroll 282s linear infinite}
#forest-bg .forest-tile{height:100%;width:auto;display:block;flex:0 0 auto}
#forest-bg .forest-tile.flip{transform:scaleX(-1)}
/* Two identical [normal,flip,normal,flip] sequences; -50% lands on an identical frame. */
@keyframes ep-forest-scroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}
/* 2026-06-21 superseding decision: keep the forest persistent behind every view,
   including active-session cards. Drift remains locked at 282s unless paused by
   the owner control or stopped by the reduced-motion media query. */
body.is-session-active #forest-bg{opacity:1}
/* Liquid-glass pause/play for the ambient drift — opt-in floating glass, bottom-left.
   Lets the user halt the scroll; choice persists in localStorage. Subtle at rest,
   hidden while a session is active so logging controls keep priority. */
#forest-toggle{position:fixed;left:calc(16px + var(--safe-l));bottom:calc(16px + var(--safe-b));z-index:90;width:44px;height:44px;display:grid;place-items:center;padding:0;border-radius:var(--earth-power-radius-pill,999px);border:1px solid var(--earth-power-border-strong);background:var(--color-surface-floating-glass);-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4);box-shadow:0 2px 10px rgba(47,62,70,.32),inset 0 1px 0 rgba(245,240,232,.16);color:var(--earth-power-text-secondary);cursor:pointer;-webkit-tap-highlight-color:transparent;opacity:0;visibility:hidden;pointer-events:none;transition:opacity 380ms var(--ease-in-out-sharp),transform var(--duration-interaction) var(--ease-out-expo),color var(--duration-interaction) linear,visibility 0s linear 380ms}
#forest-toggle.show{opacity:.15;visibility:visible;pointer-events:auto;transition:opacity 380ms var(--ease-in-out-sharp),transform var(--duration-interaction) var(--ease-out-expo),color var(--duration-interaction) linear,visibility 0s}
html.forest-paused #forest-toggle.show{opacity:.30}
#forest-toggle.show:hover,#forest-toggle.show:focus-visible{opacity:1;color:var(--earth-power-text-primary)}
#forest-toggle:active{transform:scale(.93)}
#forest-toggle:focus-visible{outline:2px solid var(--earth-power-focus);outline-offset:2px}
#forest-toggle svg{width:18px;height:18px;display:block;fill:currentColor}
#forest-toggle .ico-play{display:none}
html.forest-paused #forest-toggle .ico-pause{display:none}
html.forest-paused #forest-toggle .ico-play{display:block}
html.forest-paused .forest-track{animation-play-state:paused}
body.is-session-active #forest-toggle{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
@media (prefers-reduced-motion: reduce){#forest-toggle,#forest-toggle.show{transition:opacity 200ms linear,visibility 0s linear 200ms}}

@keyframes ep-strata-rise{from{transform:translateY(12px)}to{transform:none}}
#app.ep-view-enter>*:not(.sticky-header){animation:ep-strata-rise 420ms var(--ease-out-expo,cubic-bezier(.16,1,.3,1)) both}
#app.ep-view-enter>*:nth-child(1){animation-delay:0ms}
#app.ep-view-enter>*:nth-child(2){animation-delay:60ms}
#app.ep-view-enter>*:nth-child(3){animation-delay:120ms}
#app.ep-view-enter>*:nth-child(4){animation-delay:180ms}
#app.ep-view-enter>*:nth-child(5){animation-delay:240ms}
#app.ep-view-enter>*:nth-child(6){animation-delay:300ms}
#app.ep-view-enter>*:nth-child(7){animation-delay:360ms}
#app.ep-view-enter>*:nth-child(8){animation-delay:420ms}

@media (prefers-reduced-motion: reduce){
  .forest-track{animation:none!important}
  #app.ep-view-enter>*{animation:none!important}
  ::view-transition-old(root),
  ::view-transition-new(root){animation:none!important}
}

/* ─────────────────────────────────────────────
   History → training timeline (weekly bands + accent rail + expandable cards)
   Earth Power tokens only. Additive ep-* names; no existing rules changed.
   ───────────────────────────────────────────── */
.ep-timeline{display:flex;flex-direction:column;gap:36px}
.ep-band-head{display:flex;align-items:baseline;gap:10px;padding-bottom:12px;margin-bottom:20px;border-bottom:1px solid var(--earth-power-surface-card)}
.ep-band-label{font-family:var(--ff-display);font-weight:600;font-size:14px;letter-spacing:.01em;color:var(--earth-power-text-primary)}
.ep-band-range{font-size:12px;color:var(--color-text-muted-readable)}
.ep-band-count{margin-left:auto;font-family:var(--ff-label);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--color-text-muted-readable)}

.ep-rail-wrap{position:relative}
.ep-rail-line{position:absolute;left:69px;top:30px;bottom:30px;width:2px;background:var(--earth-power-border-strong);border-radius:2px;z-index:0}

.ep-entry{position:relative;z-index:1;display:grid;grid-template-columns:56px 28px minmax(0,1fr);align-items:start;margin-bottom:14px}
.ep-gutter{text-align:right;padding-right:14px;padding-top:16px}
.ep-wd{font-family:var(--ff-label);font-size:11px;font-weight:600;letter-spacing:.1em;color:var(--color-text-muted-readable)}
.ep-day{font-family:var(--ff-display);font-weight:700;font-size:26px;line-height:1;color:var(--earth-power-text-primary);margin-top:3px}
.ep-mo{font-size:11px;color:var(--color-text-muted-readable);margin-top:3px}

.ep-node-cell{display:flex;justify-content:center}
.ep-node{width:12px;height:12px;border-radius:50%;margin-top:25px;box-shadow:0 0 0 4px var(--earth-power-surface-app)}
.ep-node.done{background:var(--earth-power-rust)}
.ep-node.incomplete{background:var(--earth-power-surface-app);border:2px solid var(--earth-power-rust)}

.session-group-band{margin:var(--sp-4) var(--sp-4) var(--sp-5)}
.session-group-band .ep-band-head{margin-bottom:var(--sp-2)}
.session-group-band .ep-rail-line{left:13px;top:30px;bottom:30px}
.session-group-entry{grid-template-columns:28px minmax(0,1fr);margin-bottom:var(--sp-3)}
.session-group-entry:last-child{margin-bottom:0}
.session-group-entry .exercise-card{margin:0}

.ep-hist-card{display:flex;flex-direction:column;padding:22px 26px;background:var(--earth-power-surface-card);border:1px solid var(--earth-power-border-strong);border-radius:12px;cursor:default;transition:transform 160ms var(--ease-in-out-sharp,ease),border-color 160ms,box-shadow 160ms}
.ep-hist-card:hover{transform:translateY(-2px);border-color:var(--earth-power-rust);box-shadow:var(--shadow-md,0 10px 22px rgba(15,24,30,.45))}
.ep-card-top{display:flex;align-items:center;gap:6px}
.ep-card-summary{flex:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:16px;background:transparent;border:0;margin:0;padding:0;font:inherit;color:inherit;text-align:left;cursor:pointer}
.ep-card-summary:hover{background:transparent;color:inherit;transform:none}
.ep-card-summary:focus-visible{outline:2px solid var(--earth-power-rust);outline-offset:4px;border-radius:8px}
.ep-card-info{display:flex;flex-direction:column;gap:10px;min-width:0}
/* Single-line ellipsis like the legacy .history-title: a long unbroken (imported/
   generated) title clips instead of wrapping or forcing the card past the viewport.
   Works because every ancestor can shrink — .ep-entry track is minmax(0,1fr) and
   .ep-card-summary/.ep-card-info carry min-width:0. */
.ep-card-title{font-family:var(--ff-display);font-weight:600;font-size:19px;letter-spacing:-.01em;color:var(--earth-power-text-primary);min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep-card-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
.ep-del{color:var(--color-text-muted-readable)}
.ep-chev{font-size:24px;line-height:1;color:var(--color-text-muted-readable);transition:transform 160ms var(--ease-in-out-sharp,ease),color 160ms;display:inline-block}
.ep-hist-card:hover .ep-chev{color:var(--earth-power-rust)}
.ep-hist-card.open .ep-chev{transform:rotate(90deg);color:var(--earth-power-rust)}

/* Mobile: back collapses to an icon and the History title becomes sentence-case. */
@media(max-width:600px){
  .sticky-header .history-head-title{text-transform:none;font-size:17px;font-weight:600;letter-spacing:-.01em;color:var(--earth-power-text-primary)}
  .history-back .history-back-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .history-backup-actions{grid-template-columns:1fr}
}

.ep-detail{display:none;margin-top:18px;padding-top:18px;border-top:1px solid var(--earth-power-border-strong);flex-direction:column;gap:16px;cursor:default}
.ep-hist-card.open .ep-detail{display:flex;animation:ep-detail-in 200ms var(--ease-out-expo,cubic-bezier(.16,1,.3,1)) both}
@keyframes ep-detail-in{from{transform:translateY(-6px)}to{transform:none}}
.ep-ex{display:flex;flex-direction:column;gap:8px}
.ep-ex-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.ep-ex-name{font-family:var(--ff-display);font-weight:600;font-size:15px;color:var(--earth-power-text-primary);min-width:0;overflow-wrap:anywhere}
.ep-ex-count{font-family:var(--ff-label);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--color-text-muted-readable);white-space:nowrap}
.ep-ex-note{font-size:12.5px;color:var(--color-text-muted-readable)}
.ep-chips{display:flex;flex-wrap:wrap;gap:6px}
.ep-chip{display:inline-flex;align-items:center;padding:4px 10px;border-radius:6px;border:1px solid var(--earth-power-border-strong);background:color-mix(in oklab,var(--earth-power-text-primary) 3%,transparent);color:var(--earth-power-text-secondary);font-family:var(--ff-display);font-weight:600;font-size:13px;letter-spacing:.02em}
.ep-chip-rpe{color:var(--color-text-muted-readable);margin-left:4px}
.ep-chip-empty{color:var(--color-text-muted-readable);font-family:var(--ff-body);font-weight:400}
.ep-view-full{align-self:flex-start}

/* Progress dashboard — static Phase 2 dataviz shell. SVG colors resolve only through classes. */
.progress-pad{--progress-primary-block:220px;--progress-secondary-block:110px;display:grid;gap:var(--sp-5);padding-bottom:calc(var(--sp-6) + var(--safe-b))}
.progress-glass-panel,.progress-panel{border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);box-shadow:var(--earth-power-shadow-card)}
.progress-glass-panel{display:grid;gap:var(--sp-5);padding:var(--sp-5);background:color-mix(in oklab,var(--earth-power-surface-raised) 88%,transparent);-webkit-backdrop-filter:blur(16px) saturate(1.4);backdrop-filter:blur(16px) saturate(1.4)}
.progress-panel{display:grid;gap:var(--sp-4);padding:var(--sp-5);background:var(--earth-power-surface-card)}
.progress-hero-head,.progress-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--sp-4);margin-bottom:0}
.progress-title,.progress-section-title{font-family:var(--ff-display);font-weight:700;color:var(--earth-power-text-primary);line-height:1.05;margin:0}
.progress-title{font-size:var(--fs-2xl)}
.progress-section-title{font-size:var(--fs-xl)}
.progress-range{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:4px;flex-shrink:0;padding:4px;border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);background:color-mix(in oklab,var(--earth-power-surface-card) 58%,transparent)}
.progress-range-btn{min-inline-size:54px;min-height:40px;padding:0 var(--sp-3);border-color:transparent;background:transparent;box-shadow:none}
.progress-range-btn:hover{transform:none;background:var(--earth-power-surface-raised)}
.progress-range-btn.is-active{background:var(--earth-power-rust);border-color:var(--earth-power-rust);color:var(--earth-power-text-on-accent)}
.progress-range-btn.is-active:hover{background:var(--earth-power-rust-hover);border-color:var(--earth-power-rust-hover);color:var(--earth-power-text-on-accent)}
/* zone -> accent token: one mapping drives the line, fill gradient, dot, and chip */
.progress-trail-zone-light{--progress-trail-accent:var(--earth-power-info)}
.progress-trail-zone-building{--progress-trail-accent:var(--earth-power-success)}
.progress-trail-zone-moderate{--progress-trail-accent:var(--earth-power-warning)}
.progress-trail-zone-high{--progress-trail-accent:var(--earth-power-rust)}
.progress-pulse-summary{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--sp-2) var(--sp-4)}
.progress-pulse-readout{display:flex;align-items:baseline;gap:8px;min-width:0}
.progress-pulse-number{font-family:var(--ff-metric);font-variant-numeric:tabular-nums;font-size:64px;font-weight:700;line-height:.9;color:var(--earth-power-text-primary)}
.progress-pulse-scale{font-family:var(--ff-label);font-size:var(--fs-md);font-weight:700;color:var(--earth-power-text-secondary)}
.progress-pulse-zone{display:inline-flex;align-items:center;gap:8px;margin-left:auto;align-self:center;font-family:var(--ff-label);font-size:var(--fs-sm);font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--earth-power-text-secondary);padding:6px 12px;border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-pill,999px);background:color-mix(in oklab,var(--earth-power-surface-card) 72%,transparent)}
.progress-zone-dot{inline-size:10px;block-size:10px;border-radius:50%;background:var(--progress-trail-accent,var(--earth-power-rust));box-shadow:0 0 8px var(--progress-trail-accent,var(--earth-power-rust))}
.progress-chart-wrap{min-width:0}
.progress-chart{display:grid;grid-template-columns:minmax(40px,auto) minmax(0,1fr);grid-template-rows:auto auto;column-gap:var(--sp-3);align-items:stretch}
.progress-yaxis{position:relative;grid-column:1;grid-row:1}
.progress-ylabel{position:absolute;right:0;transform:translateY(-50%);font-family:var(--ff-label);font-size:13px;font-weight:700;line-height:1;white-space:nowrap;color:var(--earth-power-text-secondary)}
.progress-plot{position:relative;grid-column:2;grid-row:1;min-width:0}
.progress-trail-svg{display:block;width:100%;aspect-ratio:672/300;overflow:visible}
.progress-xaxis{position:relative;grid-column:2;grid-row:2;block-size:16px;margin-top:8px}
.progress-xlabel{position:absolute;top:0;transform:translateX(-50%);font-family:var(--ff-label);font-size:12px;font-weight:600;line-height:1;white-space:nowrap;color:var(--earth-power-text-secondary)}
.progress-xlabel.is-now{font-weight:700;color:var(--earth-power-text-primary)}
.progress-grid-line{stroke:var(--earth-power-border-strong);stroke-width:1;opacity:.45}
.progress-terrain-band{opacity:.12}
.progress-terrain-band.progress-trail-zone-light{fill:var(--earth-power-info)}
.progress-terrain-band.progress-trail-zone-building{fill:var(--earth-power-success)}
.progress-terrain-band.progress-trail-zone-moderate{fill:var(--earth-power-warning)}
.progress-terrain-band.progress-trail-zone-high{fill:var(--earth-power-rust)}
.progress-trail-fill-top{stop-color:var(--progress-trail-accent);stop-opacity:.34}
.progress-trail-fill-bottom{stop-color:var(--progress-trail-accent);stop-opacity:0}
.progress-trail-area{fill:url(#progress-trail-fill)}
.progress-trail-line{fill:none;stroke:var(--progress-trail-accent);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.progress-point-dot{fill:var(--progress-trail-accent);stroke:var(--earth-power-surface-raised);stroke-width:2.5}
.progress-point-halo{fill:none;stroke:var(--earth-power-text-primary);stroke-width:2;opacity:.9}
.progress-point.is-now .progress-point-dot{stroke:var(--earth-power-text-primary)}
.progress-hero-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-2);font-size:var(--fs-xs);color:var(--color-text-muted-readable)}
.progress-hero-meta span{display:inline-flex;align-items:center;justify-content:center;min-width:0;min-height:44px;border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-control);padding:var(--sp-2) var(--sp-3);background:color-mix(in oklab,var(--earth-power-surface-card) 68%,transparent);text-align:center}
.progress-move-list{display:grid;gap:var(--sp-3);min-height:var(--progress-secondary-block)}
.progress-move-row{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(160px,1.4fr) minmax(108px,.7fr);gap:var(--sp-3);align-items:center;padding:var(--sp-3);border:1px solid var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);background:var(--earth-power-surface-card-elevated)}
.progress-move-copy{min-width:0}
.progress-move-title{font-family:var(--ff-display);font-size:var(--fs-md);font-weight:700;color:var(--earth-power-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.progress-move-meta{margin-top:3px;font-size:var(--fs-xs);color:var(--color-text-muted-readable)}
.progress-move-chart{min-width:0}
.progress-move-svg{display:block;width:100%;height:auto;aspect-ratio:15/4;min-height:58px}
.progress-move-bar{fill:var(--earth-power-surface-high);opacity:.62}
.progress-move-line{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.progress-move-node{stroke:var(--earth-power-surface-card-elevated);stroke-width:2}
.progress-kind-load{stroke:var(--earth-power-rust)}
.progress-kind-reps{stroke:var(--earth-power-info)}
.progress-move-node.progress-kind-load{fill:var(--earth-power-rust)}
.progress-move-node.progress-kind-reps{fill:var(--earth-power-info)}
.progress-move-stat{display:flex;flex-direction:column;align-items:flex-end;gap:4px;text-align:right;min-width:0}
.progress-move-value{font-family:var(--ff-metric);font-variant-numeric:tabular-nums;font-size:var(--fs-lg);font-weight:700;color:var(--earth-power-text-primary)}
.progress-move-delta{font-size:var(--fs-xs);font-weight:700;color:var(--color-text-muted-readable)}
.progress-move-delta.is-up,.progress-move-delta.is-down{color:var(--earth-power-text-secondary)}
.progress-spark-empty,.progress-empty-line{display:grid;place-items:center;min-height:var(--progress-secondary-block);padding:var(--sp-3);border:1px dashed var(--earth-power-border-strong);border-radius:var(--earth-power-radius-card);background:color-mix(in oklab,var(--earth-power-surface-card-elevated) 44%,transparent);color:var(--color-text-muted-readable);font-size:var(--fs-sm);text-align:center}
.progress-win-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-3);min-height:var(--progress-primary-block)}
.progress-win-hex{--progress-win-value-color:color-mix(in oklab,currentColor 85%,var(--earth-power-text-primary));min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:var(--sp-3);clip-path:polygon(25% 4%,75% 4%,100% 50%,75% 96%,25% 96%,0 50%);background:color-mix(in oklab,currentColor 8%,var(--earth-power-surface-card-elevated));box-shadow:inset 0 0 0 1.5px color-mix(in oklab,currentColor 48%,transparent)}
:root[data-theme="light"] .progress-win-hex{--progress-win-value-color:color-mix(in oklab,currentColor 80%,var(--earth-power-text-primary))}
.progress-win-emblem{inline-size:44px;block-size:auto;margin-bottom:2px}
.progress-win-value{font-family:var(--ff-metric);font-variant-numeric:tabular-nums;font-size:32px;font-weight:700;line-height:1;color:var(--progress-win-value-color)}
.progress-win-label{font-family:var(--ff-label);font-size:var(--fs-xs);font-weight:700;color:var(--earth-power-text-secondary)}
.progress-win-meta{max-width:120px;text-align:center;font-size:var(--fs-2xs);color:var(--color-text-muted-readable);line-height:1.25}
.progress-win-hex--sessions{color:var(--earth-power-success)}
.progress-win-hex--prs{color:var(--earth-power-warning)}
.progress-win-hex--tonnage{color:var(--earth-power-rust-emphasis)}
.progress-win-hex--duration{color:var(--earth-power-info)}
.progress-nudge.ep-hist-card{min-height:var(--progress-secondary-block);margin:0;padding:var(--sp-5);background:var(--earth-power-surface-card);cursor:default}
.progress-nudge-copy{color:var(--earth-power-text-secondary);line-height:1.6}

@media(min-width:720px){
  .progress-pad{--progress-primary-block:240px;--progress-secondary-block:120px}
  .progress-pulse-number{font-size:76px}
}

@media(max-width:760px){
  .progress-pad{--progress-primary-block:190px;--progress-secondary-block:96px}
  .progress-hero-head,.progress-section-head{flex-direction:column;align-items:stretch}
  .progress-range{width:100%}
  .progress-range-btn{min-inline-size:0}
  .progress-pulse-number{font-size:52px}
  .progress-pulse-zone{margin-left:0}
  .progress-chart{column-gap:var(--sp-2)}
  .progress-ylabel{font-size:12px}
  .progress-hero-meta{grid-template-columns:repeat(2,minmax(0,1fr))}
  .progress-hero-meta span{min-height:52px}
  .progress-move-row{grid-template-columns:1fr;gap:var(--sp-2)}
  .progress-move-stat{align-items:flex-start;text-align:left}
  .progress-win-grid{grid-template-columns:repeat(2,minmax(0,1fr));min-height:0}
  .progress-win-hex{min-height:140px}
  .progress-win-emblem{inline-size:40px}
}

@media(max-width:420px){
  .progress-win-grid{grid-template-columns:1fr}
  .progress-win-hex{min-height:116px}
}
