/* The studio palette, kept quiet around the working set. No control is decorative. */
body dialog.gym-session-dialog{
 --gym-lime:var(--studio-lime,#d5fc73);--gym-line:var(--studio-line,#34463b);
 color-scheme:dark;color:var(--studio-text,#f2f6ed);
 background:radial-gradient(ellipse at 100% 0,#5c813015,transparent 40%),var(--studio-panel,#131d18);
 border:1px solid var(--gym-line);border-radius:24px;box-shadow:0 28px 100px #0009,0 0 0 1px #b7df7010;
 padding:28px;max-width:680px;overflow-x:hidden;overscroll-behavior:contain;
}
body dialog.gym-session-dialog::backdrop{background:#020805c9;backdrop-filter:blur(8px)}
body dialog.gym-session-dialog .dialog-close{min-width:46px;min-height:46px;background:#1b2a20;border:1px solid #435a48;color:#e5efdf;border-radius:50%}
body dialog.gym-session-dialog .gym-session-top{gap:14px;padding-bottom:20px;border-color:var(--gym-line)}
body dialog.gym-session-dialog .gym-session-top>span{font:600 10px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1.3px;color:#c5d9b6;min-width:0}
body dialog.gym-session-dialog .gym-session-top i{width:6px;height:6px;background:var(--gym-lime);box-shadow:0 0 10px #b7ef6638}
body dialog.gym-session-dialog .gym-session-top strong{font:500 25px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:-1px;color:#f1f7e8;min-width:0;overflow-wrap:anywhere}
body dialog.gym-session-dialog .gym-session-top small{font-family:inherit;font-size:12px;letter-spacing:0;color:var(--studio-muted,#b0bcb3)}
body dialog.gym-session-dialog .gym-session-top progress{height:5px;background:#25382a;accent-color:var(--gym-lime);border-radius:10px;margin-top:2px}
body dialog.gym-session-dialog .gym-save-note{font:12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;color:#bed6ad;margin:0 0 18px;padding:7px 0 11px;border-bottom:1px solid #293d2e;overflow-wrap:anywhere}
body dialog.gym-session-dialog .gym-save-note strong{font-weight:500}
body dialog.gym-session-dialog .dialog-title{font-size:clamp(28px,5vw,38px);font-weight:600;letter-spacing:-1.4px;line-height:1.13;color:#f2f6ed;margin-top:16px}
body dialog.gym-session-dialog .description{font-size:14px;line-height:1.75;color:var(--studio-muted,#b0bcb3)}
body dialog.gym-session-dialog .eyebrow{font-size:10px;letter-spacing:1.4px;color:#d3e9b7;line-height:1.6}
body dialog.gym-session-dialog .eyebrow::before{display:none}
body dialog.gym-session-dialog .chip{background:#1d3020;color:#cce4b7;border:1px solid #405a3a;border-radius:100px}
body dialog.gym-session-dialog .input,body dialog.gym-session-dialog select{
 min-width:0;max-width:100%;min-height:54px;background:var(--studio-bg,#090f0c);border:1px solid #48604d;
 color:#f2f6ed;border-radius:11px;padding:13px;font-size:16px;box-shadow:inset 0 2px 4px #0002;
}
body dialog.gym-session-dialog .input:focus-visible{border-color:var(--gym-lime);outline:2px solid var(--gym-lime);outline-offset:3px}
body dialog.gym-session-dialog .field-label,body dialog.gym-session-dialog .setting-label{color:#cedbc7;line-height:1.7}
body dialog.gym-session-dialog .button{min-height:52px;font-size:14px;line-height:1.45;border-radius:11px;white-space:normal;overflow-wrap:anywhere;padding:13px 18px;box-shadow:none}
body dialog.gym-session-dialog .button.dark{background:var(--gym-lime);border:1px solid var(--gym-lime);color:#18240d;font-weight:700}
body dialog.gym-session-dialog .button.ghost{background:#1b2b20;border:1px solid #486144;color:#e0ecd7}
body dialog.gym-session-dialog .button.dark:not(:disabled):hover{background:#e4ffa0;color:#15200b}
body dialog.gym-session-dialog .button.ghost:not(:disabled):hover{background:#2b412b;border-color:#9ebe7c}
body dialog.gym-session-dialog button:disabled{opacity:.45;cursor:wait}
body dialog.gym-session-dialog .quick-guide{border-color:var(--gym-line);padding-bottom:15px;margin-bottom:20px}
body dialog.gym-session-dialog .quick-guide summary{color:#d5eabb;min-height:48px;padding:12px 0;font-size:13px;line-height:1.7}
body dialog.gym-session-dialog .detail-instructions,body dialog.gym-session-dialog .detail-credit{color:#c0cdb8}
body dialog.gym-session-dialog .gym-set-screen .log-inputs{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 14px}
body dialog.gym-session-dialog .log-inputs label{min-width:0;font-size:12px;line-height:1.6;font-weight:500;color:#c9d8bf}
body dialog.gym-session-dialog .log-inputs input{
 min-width:0;max-width:100%;width:100%;min-height:86px;padding:13px 8px;margin-top:9px;
 font:550 clamp(34px,7vw,44px)/1.1 ui-monospace,SFMono-Regular,Consolas,monospace;
 letter-spacing:-1.8px;color:#f5f9ef;border-color:#527044;background:#0b150e;text-align:center;
}
body dialog.gym-session-dialog .quick-adjust{gap:8px;margin-top:9px;display:flex}
body dialog.gym-session-dialog .quick-adjust button{flex:1;min-width:0;min-height:49px;background:#1e3222;color:#deefc8;border:1px solid #486340;border-radius:10px;font-size:19px;font-weight:500;touch-action:manipulation}
body dialog.gym-session-dialog .quick-adjust button:not(:disabled):hover{background:#304b2c;border-color:#accf78}
body dialog.gym-session-dialog .gym-effort-buttons{gap:8px;margin-top:11px;grid-template-columns:repeat(5,minmax(0,1fr))}
body dialog.gym-session-dialog .gym-effort-buttons button{min-height:69px;min-width:0;background:#17261c;border:1px solid #435e40;border-radius:11px;color:#dce8d3;padding:10px 3px}
body dialog.gym-session-dialog .gym-effort-buttons strong{font:500 25px/1.1 ui-monospace,SFMono-Regular,Consolas,monospace}
body dialog.gym-session-dialog .gym-effort-buttons span{font-size:10px;line-height:1.4;margin-top:7px}
body dialog.gym-session-dialog .gym-effort-buttons button[aria-pressed=true]{background:var(--gym-lime);border-color:var(--gym-lime);color:#19260f;box-shadow:0 0 0 2px #c4ed6d14}
body dialog.gym-session-dialog .gym-confirm-copy{font-size:12px;line-height:1.7;color:#b8c7af;margin:18px 0 1px}
body dialog.gym-session-dialog .gym-concern{color:#f0c4a5;min-height:49px;font-size:13px;line-height:1.7;padding:12px 0;white-space:normal}
body dialog.gym-session-dialog .gym-set-screen .workout-controls{
 background:linear-gradient(#131d18f5,#131d18);border-top:1px solid #3a5038;padding:13px 0 12px;
 gap:10px;isolation:isolate;box-shadow:0 -10px 18px #131d1860;
}
body dialog.gym-session-dialog .gym-set-screen .workout-controls>[data-step=log]{min-height:64px;font-size:15px;line-height:1.45;flex:1;padding:14px 13px}
body dialog.gym-session-dialog .gym-set-screen .workout-controls>[data-step=setup]{min-height:64px;flex:0 1 28%;font-size:12px;padding:12px 9px}
body dialog.gym-session-dialog .gym-set-screen .workout-controls>.button{min-width:0}
body dialog.gym-session-dialog #rest-time{
 color:var(--gym-lime);font:500 clamp(76px,16vw,108px)/1.15 ui-monospace,SFMono-Regular,Consolas,monospace;
 letter-spacing:-6px;margin:24px auto 18px;padding:25px 10px;border:1px solid #3c5739;border-radius:23px;
 background:radial-gradient(ellipse,#8abb4213,transparent 75%),#0a130d;max-width:380px;
}
body dialog.gym-session-dialog .gym-rest-adjust{gap:15px;margin-bottom:24px;flex-wrap:wrap}
body dialog.gym-session-dialog .gym-rest-adjust button{min-height:50px;background:#1c3021;border-color:#4a6942;color:#dbecc7;font-size:14px;border-radius:11px;padding:12px 18px}
body dialog.gym-session-dialog .gym-rest-adjust>span{color:#bac9ae;letter-spacing:1.2px;font:9px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}
body dialog.gym-session-dialog .gym-repeat{background:linear-gradient(120deg,#5d832b16,transparent),#16251a;border:1px solid #597641;border-radius:17px;padding:20px}
body dialog.gym-session-dialog .gym-repeat>span{color:#c0d6a8;font:10px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1px}
body dialog.gym-session-dialog .gym-repeat p{color:#cbddbe;line-height:1.7}
body dialog.gym-session-dialog .gym-repeat p strong{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:500;color:#f0f6e6;font-size:26px;letter-spacing:-1px}
body dialog.gym-session-dialog .gym-repeat button{min-height:60px;background:var(--gym-lime);color:#18250d;border-radius:11px;font-size:15px;line-height:1.5;padding:13px 16px}
body dialog.gym-session-dialog .gym-repeat small{font-size:11px;color:#bacdad;line-height:1.7}
body dialog.gym-session-dialog .gym-busy{border-color:var(--gym-line)}
body dialog.gym-session-dialog .gym-busy summary{color:#c8dfb1;min-height:49px;line-height:1.6;padding:14px 0;font-size:13px}
body dialog.gym-session-dialog .gym-busy p{color:var(--studio-muted,#b0bcb3);line-height:1.7}
body dialog.gym-session-dialog .weight-row{border-color:#304632;padding:14px 0;color:#d4e2ca;min-width:0}
body dialog.gym-session-dialog .weight-row>span{min-width:0;overflow-wrap:anywhere}
body dialog.gym-session-dialog .small-notice{background:#1c2c20;color:#cbdcc1;border:1px solid #3e573c;border-radius:10px;line-height:1.7}
body dialog.gym-session-dialog .caption{color:#b7c8ab;font-size:12px;line-height:1.7}
body dialog.gym-session-dialog .working-set-plan,body dialog.gym-session-dialog .adaptive-target-panel{border:1px solid #3d5739;background:#0d1811;border-radius:14px;padding:20px}
body dialog.gym-session-dialog .adaptive-target-panel h3,body dialog.gym-session-dialog .working-set-plan h3{font-size:20px;letter-spacing:-.5px;color:#edf4e5}
body dialog.gym-session-dialog .adaptive-target-panel p{color:#bacdb1;font-size:13px;line-height:1.75}
body dialog.gym-session-dialog .adaptive-target-value{color:#d9f8b4!important}
body dialog.gym-session-dialog .text-link{color:#d4e9bc;min-height:44px;font-size:13px;line-height:1.65;padding-top:10px;padding-bottom:10px}
body dialog.gym-session-dialog[data-workout-stage=review] .gym-session-top{border-bottom-color:#66854b}
body dialog.gym-session-dialog[data-workout-stage=review] .dialog-title{color:#def6ba}
body dialog.gym-session-dialog[data-workout-stage=paused]{border-color:#9b6855;background:radial-gradient(ellipse at 100% 0,#a16d3410,transparent 50%),#1b1b15}
body dialog.gym-session-dialog[data-workout-stage=paused] .gym-session-top i{background:#ffc29c;box-shadow:none}
body dialog.gym-session-dialog[data-workout-stage=paused] .eyebrow{color:#f4c7a8}
body dialog.gym-session-dialog[data-workout-stage=paused] .description{color:#d6c8ba}
body dialog.gym-session-dialog[data-workout-stage=paused] .button.dark{background:#f2c59d;border-color:#f2c59d;color:#332112}
body dialog.gym-session-dialog :is(button,a,input,select,summary):focus-visible{outline:2px solid #dcff97;outline-offset:4px}

/* Device status stays in the document flow; it never covers workout controls. */
body .workout-recovery{background:linear-gradient(120deg,#7ca94014,transparent 70%),#142219;border:1px solid #4c683f;border-radius:16px;color:#eef6e7;padding:20px 23px;gap:18px}
body .workout-recovery strong{font-size:16px;font-weight:600;letter-spacing:-.3px}
body .workout-recovery p{color:#c0d0b5;font-size:12px;line-height:1.75;overflow-wrap:anywhere}
body .workout-recovery .recovery-actions{gap:10px 14px;min-width:0}
body .workout-recovery .button{min-height:48px;font-size:13px;line-height:1.5}
body .workout-recovery .button.dark{background:#d5fc73;border-color:#d5fc73;color:#19250d}
body .workout-recovery .text-link{min-height:44px;color:#d4e6bf;line-height:1.6}
body #workout-recovery :is(#device-export,#device-discard,#export-workout-draft,#discard-workout,a.text-link[href="/offline-workout.html"]){
 display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:46px;
 padding:11px 14px;border:1px solid #486442;border-radius:10px;background:#182b1f;
 color:#dcebd0;font-family:inherit;font-weight:500;font-size:13px;line-height:1.6;text-decoration:none;white-space:normal;text-align:center;cursor:pointer;
}
body #workout-recovery :is(#device-export,#export-workout-draft,a.text-link[href="/offline-workout.html"]):not(:disabled):hover{background:#2b4229;border-color:#9ebe7c}
body #workout-recovery :is(#device-discard,#discard-workout){color:#f0c4a5;border-color:#75563d;background:#241f18}
body #workout-recovery :is(#device-discard,#discard-workout):not(:disabled):hover{background:#392a20;border-color:#b58b63}
body #workout-recovery :is(#device-export,#device-discard,#export-workout-draft,#discard-workout,a.text-link[href="/offline-workout.html"]):focus-visible{outline:2px solid #dcff97;outline-offset:4px}
body .device-copy-comparison{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body .device-copy-comparison section{min-width:0;background:#101d14;border:1px solid #577346;border-radius:13px;padding:18px}
body .device-copy-comparison h3{color:#eef5e4;font-size:18px;letter-spacing:-.4px}
body .device-copy-comparison p{color:#c4d5b8;font-size:13px;line-height:1.75;overflow-wrap:anywhere}
body :is(#device-conflict-error,#workout-finish-error,#gym-correction-error,#discard-workout-error,#device-discard-error){color:#ffd4b5;font-size:13px;line-height:1.75;overflow-wrap:anywhere}
body #workout-finish-error:not(:empty){border:1px solid #916147;border-radius:12px;padding:17px;background:#2d2119;margin-top:20px;scroll-margin-bottom:90px}
body #workout-finish-error .button{display:flex;min-height:48px;margin-top:12px}

@media(max-width:600px){
 body dialog.gym-session-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;padding:calc(20px + env(safe-area-inset-top)) 18px calc(16px + env(safe-area-inset-bottom))}
 body dialog.gym-session-dialog .gym-session-top{padding-right:40px;gap:12px}
 body dialog.gym-session-dialog .gym-session-top>span{font-size:9px;letter-spacing:.8px}
 body dialog.gym-session-dialog .gym-session-top strong{font-size:23px}
 body dialog.gym-session-dialog .dialog-title{font-size:30px;letter-spacing:-1px}
 body dialog.gym-session-dialog .log-inputs input{font-size:36px;min-height:80px}
 body dialog.gym-session-dialog .gym-set-screen .log-inputs{gap:20px 12px}
 body dialog.gym-session-dialog .gym-effort-buttons{gap:6px}
 body dialog.gym-session-dialog .gym-effort-buttons button{min-height:66px}
 body dialog.gym-session-dialog .gym-effort-buttons span{font-size:9px}
 body dialog.gym-session-dialog .gym-set-screen .workout-controls{bottom:calc(-16px - env(safe-area-inset-bottom));padding:12px 0 calc(14px + env(safe-area-inset-bottom));gap:9px}
 body dialog.gym-session-dialog .gym-set-screen .workout-controls>[data-step=log]{font-size:14px;padding:13px 10px;min-height:64px}
 body dialog.gym-session-dialog .gym-set-screen .workout-controls>[data-step=setup]{font-size:11px;flex-basis:27%;padding:12px 7px}
 body dialog.gym-session-dialog .gym-rest-adjust{gap:10px}
 body dialog.gym-session-dialog .gym-rest-adjust button{padding:12px 15px}
 body dialog.gym-session-dialog .gym-rest-adjust>span{font-size:8px;letter-spacing:.9px}
 body dialog.gym-session-dialog .gym-repeat{padding:17px}
 body dialog.gym-session-dialog .gym-repeat p strong{font-size:24px}
 body dialog.gym-session-dialog .working-set-plan,body dialog.gym-session-dialog .adaptive-target-panel{padding:17px}
 body .workout-recovery{padding:18px;margin:14px 18px 0}
 body .device-copy-comparison{grid-template-columns:minmax(0,1fr)}
}
/* These are working-set readouts; retain their size above the general mobile input rule. */
@media(max-width:900px){body dialog.gym-session-dialog :is(#actual-load,#actual-reps){font-size:clamp(34px,7vw,44px)}}
@media(max-width:600px){body dialog.gym-session-dialog :is(#actual-load,#actual-reps){font-size:36px}}
@media(prefers-reduced-motion:reduce){body dialog.gym-session-dialog *,body .workout-recovery *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
