/* Shared roles for the new workout surfaces. Existing AUXE fonts and art stay. */
:root {
  --we-canvas: #F7F8F6; --we-surface: #FDFEFE; --we-ink: #163E63;
  --we-secondary: #2F6A9A; --we-blue: #A7CFF2; --we-on-blue: #163E63;
  --we-line: rgba(47,106,154,.14); --we-selected: rgba(167,207,242,.16);
  --we-danger: #9D3542; --we-shadow: 0 6px 16px -12px rgba(22,62,99,.28);
}
:root[data-theme="dark"] {
  --we-canvas: #171C22; --we-surface: #222A33; --we-ink: #E7EDF3;
  --we-secondary: #BDCAD5; --we-on-blue: #223D53;
  --we-line: rgba(189,202,213,.18); --we-selected: rgba(167,207,242,.08);
  --we-danger: #F3A4AD; --we-shadow: 0 6px 16px -12px rgba(0,0,0,.5);
}/* Transitional ownership boundary: the new overview replaces these legacy
   workout containers. Their controls remain available through focused screens. */

body.pm-premium #progress.workout-clarity > h1,
body.pm-premium #progress.workout-clarity > #wkHero,
body.pm-premium #progress.workout-clarity > #wkSeq,
body.pm-premium #progress.workout-clarity > #wkFab,
body.pm-premium #progress.workout-clarity > #wkDayActs,
body.pm-premium #progress.workout-clarity > .hero-sec,
body.pm-premium #progress.workout-clarity > #whubTodaySec { display: none !important; }
#workoutOverview, .we-dialog { color: var(--we-ink); font-family: Sora,system-ui,sans-serif; }
#workoutOverview { max-width: 860px; margin: 16px auto 32px; padding-right: 8px; }
.we-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.we-overview-head h2 { margin: 0; font-size: clamp(28px,6vw,40px); font-weight: 700; letter-spacing: -.045em; line-height: 1.1; }
.we-overview-head p { margin: 8px 0 0; font-size: 14px; color: var(--we-secondary); }
.we-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 12px; box-shadow: none; background: none; color: var(--we-ink); font: 600 15px/1.4 Sora,system-ui,sans-serif; cursor: pointer; text-align: center; }
.we-button:active, .we-lift:active, .we-result:active { transform: scale(.99); }
.we-button:disabled { opacity: .45; cursor: default; }
.we-button:focus-visible, .we-lift:focus-visible, .we-edit-item:focus-visible, .we-result:focus-visible, .we-dialog input:focus-visible, .we-history summary:focus-visible { outline: 3px solid var(--we-blue); outline-offset: 3px; }
.we-link { color: var(--we-secondary); padding-left: 0; padding-right: 0; }
.we-primary { width: 100%; min-height: 56px; background: var(--we-blue); color: var(--we-on-blue); border-radius: 16px; box-shadow: inset 0 1px rgba(255,255,255,.45), inset 0 -3px rgba(22,62,99,.1), var(--we-shadow); font-size: 17px; }
.we-overview-list { display: grid; }
.we-lift { display: grid; grid-template-columns: 80px minmax(0,1fr) auto; gap: 16px; align-items: center; width: 100%; min-height: 112px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--we-line); border-radius: 0; background: none; box-shadow: none; color: var(--we-ink); text-align: left; font: inherit; cursor: pointer; }
.we-lift.we-next { background: var(--we-selected); border: 1px solid var(--we-line); border-left: 3px solid var(--we-blue); border-radius: 16px; padding-left: 8px; padding-right: 8px; margin: 8px 0; }
.we-lift-copy { display: grid; gap: 6px; min-width: 0; }
.we-lift-copy b, .we-edit-item b, .we-result b { font-size: 17px; letter-spacing: -.035em; line-height: 1.3; overflow-wrap: anywhere; }
.we-lift-copy small, .we-edit-item small, .we-result small { display: block; font-size:var(--ui-meta,14px); line-height: 1.45; font-weight: 500; color: var(--we-secondary); }
.we-state { color: var(--we-secondary); font-size:var(--ui-meta,14px); font-weight: 600; text-align: right; }
.we-next .we-state { background: var(--we-blue); color: var(--we-on-blue); border-radius: 24px; padding: 6px 12px; }
.we-chevron { font-size: 26px; font-weight: 400; color: var(--we-secondary); }
.we-art { display: block; width: 80px; height: 88px; overflow: hidden; border-radius: 12px; position: relative; }
.we-art > *, .we-art .we-object { display: block; width: 100%; height: 100%; margin: 0; }
.we-art img { width: 100%; height: 100%; object-fit: cover; }
.we-art svg { width: 100%; height: 100%; }
.we-suggestion-door { width: 100%; justify-content: space-between; border-top: 1px solid var(--we-line); border-radius: 0; margin-top: 16px; padding: 16px 4px; color: var(--we-secondary); font-size: 14px; }
.we-overview-actions { padding-top: 24px; }
@media (max-width: 899px) {
  #workoutOverview { padding-bottom: 148px; }
  .we-overview-actions { position: fixed; bottom: var(--we-dock-bottom,80px); left: 0; right: 0; padding: 12px 20px 0; z-index: 80; background: var(--we-canvas); border-top: 1px solid var(--we-line); }
}
.we-quick { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 8px; }
.we-quick .sv-chip { min-height: 44px; background: none; box-shadow: none; color: var(--we-secondary); }
.we-empty { padding: 40px 0; }
.we-empty h3 { font-size: 25px; letter-spacing: -.035em; }
.we-empty p { color: var(--we-secondary); line-height: 1.6; }
.we-dialog { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--we-canvas); overflow: auto; overscroll-behavior: contain; }
.we-dialog::backdrop { background: rgba(10,20,30,.55); }
.we-shell { max-width: 640px; margin: auto; min-height: 100%; display: flex; flex-direction: column; }
.we-header { display: flex; align-items: center; justify-content: space-between; padding: max(8px,env(safe-area-inset-top)) 20px 8px; }
.we-back { padding-left: 0; font-weight: 500; }
.we-back > span { font-size: 34px; line-height: 1; }
.we-quiet { color: var(--we-secondary); }
.we-main { flex: 1; padding: 16px 24px 24px; }
.we-main h1 { font-size: clamp(30px,7vw,42px); line-height: 1.12; letter-spacing: -.05em; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.we-main h1:focus { outline: none; }
.we-subtitle { margin: 12px 0 24px; font-size: 14px; color: var(--we-secondary); line-height: 1.55; }
.we-footer { position: sticky; bottom: 0; display: grid; gap: 8px; background: var(--we-canvas); padding: 16px 24px max(16px,env(safe-area-inset-bottom)); border-top: 1px solid var(--we-line); }
.we-dialog:has(input:focus) .we-footer { position: static; }
.we-edit-row { display: grid; grid-template-columns: 32px minmax(0,1fr); border-bottom: 1px solid var(--we-line); gap: 8px; align-items: center; }
.we-grip { min-width: 44px; padding: 0; margin-left: -8px; color: var(--we-secondary); font-size: 26px; font-weight: 400; touch-action: none; }
.we-dragging { background: var(--we-selected); outline: 2px solid var(--we-blue); }
.we-edit-item { display: grid; grid-template-columns: 64px minmax(0,1fr) 16px; align-items: center; gap: 12px; width: 100%; min-height: 108px; text-align: left; background: none; color: var(--we-ink); border: 0; box-shadow: none; padding: 8px 0; font: inherit; }
.we-edit-item .we-art { width: 64px; height: 76px; }
.we-edit-item small { margin-top: 6px; }
.we-add { width: 100%; min-height: 56px; margin-top: 24px; border: 1px solid var(--we-blue); color: var(--we-secondary); }
.we-note { font-size:var(--ui-meta,14px); color: var(--we-secondary); line-height: 1.6; }
.we-copy { font-size: 16px; color: var(--we-secondary); line-height: 1.65; margin: 24px 0; }
.we-exercise-art { display: flex; justify-content: flex-end; margin-top: -8px; margin-bottom: 16px; }
.we-exercise-art .we-art { width: 144px; height: 128px; border-radius: 20px; }
.we-field { padding: 0; border: 0; margin: 0 0 24px; min-width: 0; }
.we-field legend { padding: 0; margin-bottom: 12px; font-size: 16px; font-weight: 600; }
.we-stepper { display: grid; grid-template-columns: 64px minmax(0,1fr) 64px; align-items: center; min-height: 84px; padding: 8px; border: 1px solid var(--we-line); border-radius: 16px; background: var(--we-surface); }
.we-stepper .we-button { font-size: 28px; background: var(--we-selected); border-radius: 50%; width: 48px; height: 48px; justify-self: center; }
.we-dialog input[type="number"] { min-width: 0; width: 100%; color: var(--we-ink); font: 600 40px/1.2 Sora,system-ui,sans-serif; letter-spacing: -.05em; border: 0; background: transparent; text-align: center; padding: 8px; box-shadow: none; border-radius: 8px; appearance: textfield; }
.we-dialog input::-webkit-inner-spin-button, .we-dialog input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.we-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--we-line); background: var(--we-surface); border-radius: 12px; margin-bottom: 16px; }
.we-segment button[aria-pressed="true"] { background: var(--we-blue); color: var(--we-on-blue); }
.we-reps { display: flex; gap: 16px; }
.we-reps[hidden] { display: none; }
.we-reps label { flex: 1; min-width: 0; text-align: center; padding: 12px; border: 1px solid var(--we-line); border-radius: 16px; background: var(--we-surface); }
.we-reps label[hidden] { display: none; }
.we-reps label > span { font-size:var(--ui-meta,14px); color: var(--we-secondary); }
.we-scope label { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--we-surface); border: 1px solid var(--we-line); min-height: 68px; cursor: pointer; }
.we-scope label:first-of-type { border-radius: 16px 16px 0 0; }
.we-scope label:last-of-type { border-radius: 0 0 16px 16px; border-top: 0; }
.we-scope label:has(input:checked) { background: var(--we-selected); }
.we-scope input { accent-color: var(--we-secondary); width: 22px; height: 22px; flex: none; margin: 0; }
.we-scope span { font-size: 15px; font-weight: 600; }
.we-scope small { display: block; margin-top: 6px; color: var(--we-secondary); font-size:var(--ui-meta,14px); line-height: 1.5; font-weight: 400; }
.we-separate-actions { border-top: 1px solid var(--we-line); display: grid; }
.we-separate-actions button { justify-content: space-between; min-height: 56px; }
.we-remove { color: var(--we-danger); }
.we-error { padding: 16px; margin: 16px 0; border-left: 3px solid var(--we-danger); background: var(--we-surface); color: var(--we-ink); font-size: 14px; line-height: 1.6; }
.we-error .we-button { display: flex; margin-top: 8px; }
.we-search input { width: 100%; min-height: 56px; border: 1px solid var(--we-line); border-radius: 16px; background: var(--we-surface); color: var(--we-ink); padding: 16px; font: 400 16px Sora,system-ui,sans-serif; box-shadow: none; }
.we-result { display: grid; grid-template-columns: 64px minmax(0,1fr) 24px; gap: 16px; align-items: center; width: 100%; min-height: 96px; text-align: left; background: none; color: var(--we-ink); border: 0; border-bottom: 1px solid var(--we-line); box-shadow: none; padding: 12px 0; }
.we-result .we-art { width: 64px; height: 72px; }
.we-result:disabled { opacity: .55; }
.we-result > span:last-child { font-size: 24px; }
.we-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.we-suggestion { padding: 8px 0 32px; border-bottom: 1px solid var(--we-line); margin-bottom: 24px; }
.we-suggestion > .we-art { float: right; margin-left: 16px; margin-bottom: 16px; }
.we-suggestion h2 { font-size: 24px; letter-spacing: -.04em; margin: 16px 0 24px; }
.we-compare { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.we-compare > div { display: grid; gap: 8px; padding: 16px 0; border-top: 1px solid var(--we-line); }
.we-compare small { color: var(--we-secondary); font-size:var(--ui-meta,14px); }
.we-compare b { font-size: 22px; letter-spacing: -.04em; }
.we-suggestion .we-link { width: 100%; }
.we-detail-art .we-art { width: 100%; height: 240px; border-radius: 20px; }
.we-detail-art img { object-fit: contain; }
.we-progress { margin: 24px 0; font-size: 15px; color: var(--we-secondary); }
.we-history { border-top: 1px solid var(--we-line); border-bottom: 1px solid var(--we-line); }
.we-history summary { padding: 16px 0; font-size: 15px; cursor: pointer; }
.we-history div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; font-size:var(--ui-meta,14px); }
.we-detail-links { display: grid; margin-top: 16px; }
.we-detail-links button { justify-content: flex-start; }
@media (max-width: 380px) {
  .we-overview-head { align-items: flex-start; gap: 8px; }
  .we-overview-head .we-link { font-size:var(--ui-meta,14px); flex: none; }
  .we-lift { grid-template-columns: 64px minmax(0,1fr) auto; gap: 12px; }
  .we-lift .we-art { width: 64px; height: 76px; }
  .we-lift-copy b { font-size: 15px; }
  .we-state { max-width: 62px; font-size:var(--ui-meta,14px); }
  .we-main, .we-footer { padding-left: 16px; padding-right: 16px; }
  .we-edit-item { grid-template-columns: 56px minmax(0,1fr) 16px; }
  .we-edit-item .we-art { width: 56px; }
}
@media (min-width: 900px) {
  #workoutOverview { padding: 24px 32px; }
  .we-lift { min-height: 120px; grid-template-columns: 96px minmax(0,1fr) auto; }
  .we-lift .we-art { width: 96px; height: 96px; }
  .we-lift-copy b { font-size: 20px; }
  .we-lift-copy small { font-size: 14px; }
  .we-dialog { inset: 5vh 0; height: 90vh; width: 640px; margin: auto; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .we-button, .we-lift, .we-result { transition: none; transform: none; }
}
