/* Workout-only layout refinements. Recorded values and plan targets stay unchanged. */
.workout-shell .workout-main,
.workout-shell .workout-aside,
.workout-shell .number-control,
.workout-shell .number-field{min-width:0}
.workout-shell .input-card{grid-template-columns:repeat(2,minmax(0,1fr))}
.workout-shell .number-field input{font-size:clamp(1.5rem,3.5vw,3.5rem)}
.workout-shell .exercise-heading h2,
.workout-shell .exercise-item h3{overflow-wrap:anywhere}
.workout-shell .workout-bodyweight{grid-template-columns:minmax(0,1fr) auto}
.workout-shell .workout-bodyweight strong{overflow-wrap:anywhere}
.workout-shell .set-row{grid-template-columns:26px minmax(0,1fr) minmax(0,1.6fr) 24px}
.workout-shell .set-value{text-align:right;overflow-wrap:anywhere}
.workout-shell .workout-aside .card-header{flex-wrap:wrap}

@media(max-width:759px){
 /* Prefix and unit have their own corners, so precise weights use the full field. */
 .workout-shell .number-field{position:relative}
 .workout-shell .number-field input{width:100%;font-size:clamp(1.5rem,8vw,2.7rem)}
 .workout-shell .number-field .prefix{position:absolute;left:var(--s2);top:var(--s1);font-size:var(--text-xs);line-height:1.2;pointer-events:none}
 .workout-shell .number-field .unit{position:absolute;right:var(--s2);bottom:var(--s1);font-size:var(--text-xs);line-height:1.2;pointer-events:none}
 .workout-shell .number-control>label{min-height:1.5em}
 .workout-shell .workout-bodyweight{grid-template-columns:minmax(0,1fr)}
 .workout-shell .workout-secondary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
 .workout-shell .workout-secondary .text-btn{justify-content:center;gap:var(--s1);text-align:center;line-height:1.35}
 .workout-shell .set-list>.row{flex-wrap:wrap;gap:var(--s2)}
 /* Keep set submission above the keyboard; secondary actions return after editing. */
 .workout-shell.workout-keyboard .workout-actions{display:block;padding-block:var(--s2)}
 .workout-shell.workout-keyboard .workout-actions .primary{min-height:44px;font-size:var(--text-sm)}
 .workout-shell.workout-keyboard .workout-secondary{display:none}
 .workout-shell.workout-keyboard .workout-grid{scroll-padding-block:var(--s3)}
 .workout-shell .rest-actions{flex-wrap:wrap;max-width:100%}
 .workout-shell .rest-actions .btn{min-height:44px}
}

@media(max-width:359px){
 .workout-shell .workout-secondary .text-btn{font-size:.68rem}
 .workout-shell .workout-secondary .text-btn svg{width:12px;height:12px}
 .workout-shell .set-row{grid-template-columns:22px minmax(0,1fr) minmax(0,1.7fr) 18px;gap:var(--s2)}
}

@media(prefers-reduced-motion:reduce){
 .workout-shell .workout-grid{scroll-behavior:auto}
}
