/* FORMA 2.1 — ice 50 / navy 20 / blue 20 / amber accents 10.
   Visual balance across the interface, not a rigid per-screen pixel quota. */
:root{--ice:#EDF2F6;--ice-panel:#F7F9FB;--navy:#14213D;--blue:#527AA6;--blue-pale:#D6E3EF;--orange:#FCA311;--muted:#536981;color-scheme:light}
html{touch-action:manipulation;-webkit-text-size-adjust:100%}
input,select,textarea{font-size:16px!important}
html,body.theme-ice{background:#E2EAF1;color:var(--navy)}
body.theme-ice .app-shell{background:var(--ice);box-shadow:0 20px 65px #14213d12}
body.theme-ice .topbar{background:#edf2f6f5;border-bottom:1px solid #CAD7E3;color:var(--navy)}
body.theme-ice .topbar-title small,body.theme-ice .muted{color:#536981}
body.theme-ice .avatar{background:var(--navy);color:#fff;box-shadow:0 5px 16px #14213d20}
body.theme-ice .streak-pill{background:#D6E3EF;border-color:#BCCEDD;color:#234367}
body.theme-ice .bottom-nav{background:var(--navy);border-color:#2D4565;color:#fff}
body.theme-ice .bottom-nav button{color:#B8CADE}
body.theme-ice .bottom-nav button.active{background:#527aa638;color:#FCA311}
body.theme-ice .bottom-nav:before{color:#B8CADE}
body.theme-ice .card{background:var(--ice-panel);color:var(--navy);border-color:#CCD8E4;box-shadow:0 8px 28px #14213d07}
body.theme-ice .eyebrow{color:#395E87}
body.theme-ice .page-intro em{color:var(--blue)}
body.theme-ice .page-intro{padding-top:8px}
body.theme-ice .welcome-hero{background:var(--navy);border-color:var(--navy);color:#fff}
body.theme-ice .welcome-hero .eyebrow{color:#A8C8E7}
body.theme-ice .welcome-hero em{color:#A8C8E7}
body.theme-ice .welcome-hero>p:not(.eyebrow):not(.hello){color:#D1DEEB}
body.theme-ice .orbit-bg,body.theme-ice .orbit-bg:before{border-color:#527AA655}
body.theme-ice .orbit-bg:after{background:radial-gradient(circle,#527AA633,transparent);border-color:#527AA655}
body.theme-ice .hero-badges span{background:#527AA62B;border-color:#527AA670;color:#DDEAF6}
body.theme-ice .hero-badges span:first-child{border-left:3px solid #FCA311}
body.theme-ice .week-day{color:#536981}
body.theme-ice .week-day b{border-color:#C1D0DF;background:#F7F9FB;color:#395675}
body.theme-ice .week-day.today b{border-color:var(--blue);color:var(--navy);box-shadow:0 0 0 3px #527AA615}
body.theme-ice .week-day.trained b{background:var(--navy);color:#FCA311;border-color:var(--navy);box-shadow:none}
body.theme-ice .section-head p{color:#536981}
body.theme-ice .btn:not(.primary){background:#DFE8F1;border-color:#BECFDF;color:var(--navy)}
body.theme-ice .btn.ghost{background:transparent}
body.theme-ice .btn.primary{background:#FCA311;color:#14213D;border-color:#FCA311;box-shadow:0 5px 14px #fca31120}
body.theme-ice .btn.primary:hover{background:#FFB62F}
body.theme-ice .btn.danger{color:#9C362D;background:#F7E9E6;border-color:#DDC6BF}
body.theme-ice .chip{background:#DCE7F1;color:#294E75}
body.theme-ice .launch-card{background:linear-gradient(155deg,#F7F9FB 55%,#E5EDF5);border-top:4px solid var(--blue)}
body.theme-ice .launch-art{background:#D6E3EF;border-radius:24px;padding:5px;margin-bottom:-10px;color:var(--blue)}
body.theme-ice .launch-number{color:#14213D0D}
body.theme-ice .launch-card p{color:#536981}
body.theme-ice .launch-card:hover .launch-art{transform:none}
body.theme-ice .workout-summary{background:#E5EDF5;border-bottom:1px solid #D4E0EB}
body.theme-ice .workout-letter{background:#527AA6;color:#fff;box-shadow:0 6px 14px #527aa620}
body.theme-ice .workout-summary p,body.theme-ice .exercise-row small{color:#536981}
body.theme-ice .exercise-row{border-color:#D6E0E9}
body.theme-ice .exercise-row:hover{background:#EAF0F6}
body.theme-ice .exercise-row .index{color:#527AA6}
body.theme-ice .exercise-row .row-icon{background:#D6E3EF;border:1px solid #C4D5E5}
body.theme-ice .muscle-tag{background:#E1EAF3;color:#355D87}
body.theme-ice .dashed-add{background:#EAF0F6;border-color:#8CA8C4;color:#294E75}
body.theme-ice .live-indicator{color:#395E87}
body.theme-ice .live-indicator i{background:#527AA6;box-shadow:0 0 0 5px #527AA610}
body.theme-ice .progress-row{color:#395E87}
body.theme-ice .progress-track{background:#CDDBE7}
body.theme-ice .progress-fill{background:#527AA6;box-shadow:none}
body.theme-ice .exercise-number{color:#527AA6}
body.theme-ice .machine-visual{background:linear-gradient(145deg,#CCDEEE,#E0EBF4);border-color:#B7CADC;height:265px}
body.theme-ice .technical-grid{background-image:linear-gradient(#527AA60C 1px,transparent 1px),linear-gradient(90deg,#527AA60C 1px,transparent 1px)}
body.theme-ice .machine-stage{height:230px;filter:drop-shadow(0 10px 7px #14213d10)}
body.theme-ice .equipment{color:#335D87}
.machine-movement,.equipment-static .machine-movement{animation:none!important;transform:none!important}
body.theme-ice .muscle-panel{border-left:1px solid #9EB5CB;width:90px;padding-left:14px}
body.theme-ice .muscle-map{width:77px;height:144px;overflow:visible}
body.theme-ice .muscle-panel span{color:#294E75;font-size:9px;font-weight:800;margin-top:6px}
body.theme-ice .muscles-primary{filter:drop-shadow(0 0 2px #FCA31190)}
body.theme-ice .visual-caption{color:#486990;font-size:8px}
body.theme-ice .machine-name{color:#536981}
body.theme-ice .metric{background:#527AA6;border-color:#527AA6;color:#fff}
body.theme-ice .metric b{color:#fff}
body.theme-ice .metric small{color:#EDF4FC}
body.theme-ice .metric.weight button{background:#FFFFFF26;color:#fff}
body.theme-ice .sets-title{color:#48617D}
body.theme-ice .set-dot{background:#E3ECF4;border-color:#C0D1E0;color:#48617D}
body.theme-ice .set-dot.next{background:#F7F9FB;border-color:#D98A06;color:#815107;box-shadow:0 0 0 5px #FCA31112}
body.theme-ice .set-dot.done{background:#FCA311;color:#14213D;border-color:#FCA311}
body.theme-ice .live-volume{color:#536981}
body.theme-ice .live-volume strong{color:#294E75}
body.theme-ice .next-preview{background:#D6E3EF}
body.theme-ice .next-preview small{color:#48617D}
body.theme-ice .next-preview .mini-machine{background:#C2D6E7}
body.theme-ice .session-queue{background:#14213D;color:#fff;border-color:#14213D}
body.theme-ice .session-queue .eyebrow{color:#A8C8E7}
body.theme-ice .queue-step{color:#AFBED2;border-color:#344963}
body.theme-ice .queue-step.current{color:#fff}
body.theme-ice .queue-step.current>span{background:#527AA6;color:#fff;border-color:#527AA6}
body.theme-ice .queue-step.finished>span{background:#FCA311;color:#14213D}
body.theme-ice .queue-foot{color:#B8CADE}
body.theme-ice .stat-card b{color:#14213D}
body.theme-ice .stat-card span{color:#536981}
body.theme-ice .stat-card:after{border-color:#527AA640}
body.theme-ice .stat-card:nth-child(2){background:#527AA6;border-color:#527AA6}
body.theme-ice .stat-card:nth-child(2) b,body.theme-ice .stat-card:nth-child(2) span{color:#fff}
body.theme-ice .stat-card:nth-child(4){background:#14213D;border-color:#14213D}
body.theme-ice .stat-card:nth-child(4) b,body.theme-ice .stat-card:nth-child(4) span{color:#fff}
body.theme-ice .ring{background:conic-gradient(#527AA6 calc(var(--p)*1%),#D5E1EB 0);box-shadow:0 8px 24px #14213d08}
body.theme-ice .ring:after{background:#EDF2F6}
body.theme-ice .ring b{color:#14213D}
body.theme-ice .ring small{color:#536981}
body.theme-ice .spark-head span{color:#395E87}
body.theme-ice .sparkline polyline{stroke:#527AA6}
body.theme-ice .sparkline line{stroke:#C7D7E5}
body.theme-ice .badge.unlocked{background:#F7F9FB}
body.theme-ice .badge small{color:#536981}
body.theme-ice .medal{color:#9C6406}
body.theme-ice .badge.unlocked .medal{color:#C47D08;box-shadow:inset 0 0 0 3px #FCA31126}
body.theme-ice .history-date{background:#527AA6;color:#fff}
body.theme-ice .history-title small,body.theme-ice .history-exercise{color:#536981}
body.theme-ice .history-detail{border-color:#D1DFEB}
body.theme-ice .history-exercise b{color:#14213D}
body.theme-ice .big-avatar{background:#527AA6;color:#fff}
body.theme-ice .settings-hero p,body.theme-ice .settings-group>span{color:#536981}
body.theme-ice .setting-row{background:transparent;border-color:#D6E0E9}
body.theme-ice .setting-row .setting-icon{background:#D6E3EF;color:#294E75}
body.theme-ice .setting-row small{color:#536981}
body.theme-ice .setting-row select{color:#294E75}
body.theme-ice .switch{background:#B9CADB}
body.theme-ice .switch.on{background:#527AA6}
body.theme-ice .switch.on:after{background:#fff}
.palette-label{font-size:11px;color:#395E87;font-weight:700}
body.theme-ice .admin-entry{background:#14213D;color:#fff;border-color:#14213D}
body.theme-ice .admin-entry small{color:#B8CADE}
body.theme-ice .admin-entry>svg{color:#A8C8E7}
body.theme-ice .modal-card{background:#EDF2F6;color:#14213D;border-color:#C2D2E2}
body.theme-ice .modal-handle{background:#A0B5CA}
body.theme-ice .modal-card p,body.theme-ice .form-grid label{color:#536981}
body.theme-ice .form-grid input,body.theme-ice .form-grid select{background:#F7F9FB;color:#14213D;border-color:#B9CADB}
body.theme-ice .form-grid select option{background:#F7F9FB;color:#14213D}
body.theme-ice .selected-machine{background:#D6E3EF;color:#294E75}
body.theme-ice .selected-machine small{color:#536981}
body.theme-ice .timer-ring{background:conic-gradient(#527AA6 calc(var(--timer)*1%),#D5E1EB 0);box-shadow:0 0 35px #527AA618}
body.theme-ice .timer-ring:after{background:#EDF2F6}
body.theme-ice .timer-ring small,body.theme-ice .breath-indicator{color:#536981}
body.theme-ice .breath-indicator i{background:#527AA6}
body.theme-ice .recap-row div{background:#D6E3EF}
body.theme-ice .recap-row b{color:#14213D}
body.theme-ice .recap-row small{color:#536981}
body.theme-ice .celebrate-icon{background:#FCA311;color:#14213D;box-shadow:0 0 0 12px #FCA31112}
body.theme-ice .segmented{background:#D6E3EF}
body.theme-ice .segmented button{color:#395E87}
body.theme-ice .segmented button.active{background:#14213D;color:#fff}
body.theme-ice .loading{color:#536981}
body.theme-ice .loading span{border-color:#D6E3EF;border-top-color:#527AA6}
body.theme-ice .auth-screen{background:linear-gradient(140deg,#EDF2F6 55%,#D6E3EF);color:#14213D}
body.theme-ice .auth-card{background:#F7F9FB;border:1px solid #C2D2E2;border-radius:28px;box-shadow:0 20px 60px #14213d10}
body.theme-ice .auth-card h1 em{color:#527AA6}
body.theme-ice .auth-glow{background:#527AA6;opacity:.14}
body.theme-ice .auth-copy,body.theme-ice .auth-form label{color:#536981}
body.theme-ice .auth-form input{background:#EDF2F6;border-color:#B9CADB;color:#14213D}
body.theme-ice .admin-login-link{color:#395E87}
body.theme-ice.admin-body{background:linear-gradient(140deg,#EDF2F6 60%,#D6E3EF);color:#14213D}
body.theme-ice .back-link{color:#395E87}
body.theme-ice .admin-shell em{color:#527AA6}
body.theme-ice .brand-preview{background:#14213D;color:#fff;border-color:#14213D}
body.theme-ice .brand-preview .eyebrow{color:#A8C8E7}
body.theme-ice .brand-preview p,body.theme-ice .brand-preview small{color:#C0D1E2}
body.theme-ice .brand-preview .preview-bars i{background:#7EA3CB}
body.theme-ice .alert.danger{background:#F7E5E2;color:#923B32;border-color:#E7C3BD}
@media(min-width:900px){body.theme-ice .machine-visual{height:305px}body.theme-ice .machine-stage{height:265px}body.theme-ice .muscle-panel{width:110px}body.theme-ice .muscle-map{height:174px;width:90px}}
@media(max-width:360px){body.theme-ice .machine-visual{padding-left:5px;padding-right:8px}body.theme-ice .muscle-panel{width:70px;padding-left:5px}body.theme-ice .muscle-map{width:60px}}

/* Thumb navigation: reachable on iPhone without stretching to the top edge. */
.menu-btn{position:fixed;z-index:64;right:max(16px,env(safe-area-inset-right));bottom:calc(18px + env(safe-area-inset-bottom));width:58px;height:58px;flex:none;border:1px solid #AFC3D5;border-radius:19px;background:#14213D;display:grid;place-content:center;gap:5px;padding:0;box-shadow:0 12px 30px #14213D38;transition:transform .2s ease,background .2s ease}
.menu-btn i{display:block;width:21px;height:2.5px;border-radius:3px;background:#fff;transition:transform .2s ease,opacity .2s ease}
.menu-btn:active{transform:scale(.94)}
.menu-btn[aria-expanded="true"]{background:#527AA6}
.menu-btn[aria-expanded="true"] i:nth-child(1){transform:translateY(6px) rotate(45deg)}
.menu-btn[aria-expanded="true"] i:nth-child(2){opacity:0}
.menu-btn[aria-expanded="true"] i:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
.section-nav{position:fixed;z-index:63;top:auto;bottom:calc(88px + env(safe-area-inset-bottom));left:50%;width:min(calc(100% - 24px),430px);padding:12px;display:grid;grid-template-columns:repeat(2,1fr);gap:9px;background:#14213DF8;border:1px solid #38516F;border-radius:22px;box-shadow:0 22px 55px #14213D42;opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,12px) scale(.98);transform-origin:bottom right;transition:opacity .18s ease,transform .18s ease,visibility .18s}
.section-nav.open{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0) scale(1)}
.section-nav button{min-height:62px;border:0;border-radius:14px;background:#FFFFFF0A;color:#C7D6E6;display:flex;align-items:center;gap:12px;padding:12px 14px;font-size:12px;font-weight:800;text-align:left}
.section-nav button.active{background:#527AA64A;color:#fff}
.section-nav button.active .nav-icon{color:#FCA311}
.section-nav .nav-icon{width:25px;height:25px;display:grid;place-items:center;color:#91AEC9}
.section-nav .nav-icon svg{width:24px;height:24px}
.section-nav small{font-size:12px}
.view{padding-bottom:100px}
body.session-active .menu-btn{bottom:calc(14px + env(safe-area-inset-bottom));width:54px;height:54px;border-radius:18px}
body.session-active .section-nav{bottom:calc(78px + env(safe-area-inset-bottom))}

/* Workout mode: every operational control fits in one viewport. */
body.session-active{overflow:hidden;overscroll-behavior:none}
body.session-active .app-shell{height:100dvh;min-height:100dvh;overflow:hidden}
body.session-active .view{height:100dvh;min-height:0;overflow:hidden;padding:calc(72px + env(safe-area-inset-top)) 10px 8px}
body.session-active .view>.screen-enter{height:100%;display:flex;flex-direction:column}
body.session-active .session-heading{height:42px;min-height:42px;margin:0 3px 5px}
body.session-active .session-heading .eyebrow{display:none}
body.session-active .session-heading h2{font-size:25px;margin:0}
body.session-active .session-layout{height:calc(100% - 47px);min-height:0;display:block}
body.session-active .session-layout>div{height:100%;display:flex;flex-direction:column;min-height:0}
body.session-active .hero-progress{height:28px;min-height:28px;margin:0 4px 5px}
body.session-active .progress-row{font-size:8px}
body.session-active .progress-track{height:4px;margin-top:5px}
body.session-active .training-card{height:calc(100% - 33px);min-height:0;padding:10px 12px;display:flex;flex-direction:column;gap:4px;overflow:hidden}
body.session-active .exercise-number{font-size:9px}
body.session-active .machine-visual{height:auto;min-height:112px;flex:1;margin:2px 0 3px;padding:3px 9px 14px;border-radius:14px}
body.session-active .machine-stage{height:100%;min-height:105px}
body.session-active .muscle-panel{height:100%;width:75px;padding-left:7px}
body.session-active .muscle-map{height:min(100%,135px);width:66px}
body.session-active .visual-caption{bottom:4px;left:10px;font-size:6px}
body.session-active .training-card>.chip{display:none}
body.session-active .exercise-title{font-size:clamp(25px,7vw,34px);line-height:.95;margin:3px 0 0}
body.session-active .machine-name{font-size:9px;line-height:1.3;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.session-active .metrics{height:48px;margin:2px 0;gap:5px}
body.session-active .metric{padding:3px 2px;border-radius:9px}
body.session-active .metric b{font-size:23px}
body.session-active .metric small{font-size:7px}
body.session-active .metric.weight button{width:24px;height:24px;font-size:10px}
body.session-active .sets-title{font-size:8px;margin:1px 0 3px}
body.session-active .set-dots{gap:5px;flex-wrap:nowrap;overflow:hidden}
body.session-active .set-dot{width:36px;height:36px;min-width:36px;font-size:11px}
body.session-active .training-actions{display:flex;gap:5px;margin-top:3px}
body.session-active .training-actions .btn{min-height:40px;height:40px;padding:0 9px;font-size:10px;flex:1}
body.session-active .training-actions .btn.primary{height:40px;font-size:11px;flex:1.4}
body.session-active .live-volume{font-size:8px;margin:2px 0 0}
body.session-active .next-preview,body.session-active .session-queue{display:none}

@media(max-height:700px){
  body.session-active .topbar{height:62px;padding-top:calc(7px + env(safe-area-inset-top))}
  body.session-active .view{padding-top:calc(61px + env(safe-area-inset-top))}
  body.session-active .session-heading{height:34px;min-height:34px}
  body.session-active .session-heading h2{font-size:21px}
  body.session-active .session-layout{height:calc(100% - 39px)}
  body.session-active .machine-visual{min-height:90px}
  body.session-active .machine-stage{min-height:85px}
  body.session-active .machine-name{display:none}
  body.session-active .metrics{height:42px}
  body.session-active .metric b{font-size:20px}
  body.session-active .set-dot{width:32px;height:32px;min-width:32px}
}

@media(min-width:900px){
  .app-shell{padding-left:0;max-width:1200px}
  .topbar{left:50%;transform:translateX(-50%);top:0;width:min(100%,1200px);max-width:none;padding-left:36px;padding-right:36px}
  .view{padding:108px 36px 38px;min-height:100vh}
  .section-nav{left:calc(50% + 375px);width:390px;grid-template-columns:repeat(2,1fr)}
  body.session-active .view{padding:82px 24px 12px}
  body.session-active .session-heading{height:48px;min-height:48px}
  body.session-active .session-layout{height:calc(100% - 53px);display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px}
  body.session-active .training-card{height:calc(100% - 33px)}
  body.session-active .machine-visual{min-height:170px}
  body.session-active .machine-stage{min-height:165px}
  body.session-active .session-queue{display:block;margin:33px 0 0;height:calc(100% - 33px);overflow:hidden;position:static}
}

/* V2.3 session console: fixed rows prevent labels and controls from colliding. */
body.session-active .view>.screen-enter{display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:5px}
body.session-active .session-heading{height:auto;min-height:38px;margin:0 3px}
body.session-active .session-heading h2{font-size:22px;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:230px}
body.session-active .hero-progress{height:25px;min-height:25px;margin:0 4px}
body.session-active .session-layout{height:auto;min-height:0;display:block}
body.session-active .training-console{height:100%;min-height:0;padding:12px;display:grid;grid-template-rows:auto clamp(125px,24dvh,205px) 54px 51px 43px 17px;gap:7px;overflow:hidden;border-radius:22px}
.exercise-head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;min-width:0}
.exercise-head>div{min-width:0}
body.session-active .exercise-number{display:block;font-size:9px;line-height:1;color:#527AA6;margin-bottom:4px}
body.session-active .exercise-title{font-size:clamp(26px,7.5vw,36px);line-height:.88;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.muscle-focus{display:inline-flex;align-items:center;min-height:27px;padding:0 9px;border-radius:999px;background:#D6E3EF;color:#294E75;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;white-space:nowrap}
.exercise-visual{position:relative;min-height:0;display:grid;grid-template-columns:minmax(0,1.55fr) minmax(105px,.9fr);gap:0;border:1px solid #C3D2DF;border-radius:16px;background:#F3F7FA;overflow:hidden}
.exercise-visual .technical-grid{display:none}
body.session-active .exercise-visual .machine-stage{height:100%;min-height:0;padding:4px 3px 3px 7px;display:grid;grid-template-rows:minmax(0,1fr);align-items:center;position:relative;z-index:1;border-right:1px solid #D3DFE8;background:linear-gradient(145deg,#F8FAFC,#EDF3F7)}
.exercise-visual .machine-stage .equipment{width:100%;height:100%;min-height:0;color:#294E75;transform:scale(.9);transform-origin:center}
.exercise-visual .machine-stage>small{display:none}
body.session-active .exercise-visual .muscle-panel{width:auto;height:100%;padding:5px 7px 4px;border:0;display:grid;grid-template-rows:minmax(0,1fr) auto;align-items:center;justify-items:center;position:relative;z-index:1;background:#E3EDF5}
body.session-active .exercise-visual .muscle-map{width:78px;height:100%;max-height:142px;min-height:0;filter:drop-shadow(0 2px 2px #14213D12)}
.exercise-visual .muscle-panel>div{text-align:center;min-width:0;width:100%}
.exercise-visual .muscle-panel b{display:block;color:#294E75;font-size:9px;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exercise-visual .muscle-panel small{display:block;color:#617B96;font-size:6px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
body.session-active .training-console .metrics{height:54px;margin:0;gap:7px}
body.session-active .training-console .metric{min-width:0;padding:6px 3px;border-radius:11px;display:grid;place-content:center}
body.session-active .training-console .metric b{font-size:23px;line-height:1}
body.session-active .training-console .metric small{font-size:7px;margin-top:4px}
body.session-active .training-console .metric.weight button{top:4px;right:4px;width:23px;height:23px}
.series-zone{min-width:0;display:grid;grid-template-rows:14px 36px;gap:1px}
body.session-active .series-zone .sets-title{height:14px;margin:0;display:flex;align-items:center;font-size:8px;line-height:1}
.series-zone .sets-title strong{color:#294E75}
body.session-active .series-zone .set-dots{height:36px;display:flex;gap:7px;overflow:hidden;align-items:center}
body.session-active .series-zone .set-dot{width:34px;height:34px;min-width:34px;border-width:2px;font-size:11px}
body.session-active .training-console .training-actions{height:43px;margin:0;display:flex;gap:7px;min-width:0}
body.session-active .training-console .training-actions .btn{height:43px;min-height:43px;margin:0;padding:0 10px;border-radius:12px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.session-active .training-console .training-actions .btn.primary{height:43px;flex:1.6;font-size:11px}
body.session-active .training-console .action-secondary{flex:.8}
body.session-active .training-console .action-tertiary{flex:.8}
.session-volume{height:17px;display:flex;align-items:center;justify-content:center;gap:4px;color:#617B96;font-size:8px;white-space:nowrap}
.session-volume strong{color:#294E75}

@media(max-height:700px){
  body.session-active .view>.screen-enter{gap:3px}
  body.session-active .session-heading{min-height:31px}
  body.session-active .session-heading h2{font-size:19px}
  body.session-active .hero-progress{height:22px;min-height:22px}
  body.session-active .training-console{padding:9px;grid-template-rows:auto minmax(105px,19dvh) 46px 45px 39px 14px;gap:4px}
  body.session-active .exercise-title{font-size:25px}
  body.session-active .training-console .metrics{height:46px}
  body.session-active .training-console .metric b{font-size:19px}
  .series-zone{grid-template-rows:12px 32px}
  body.session-active .series-zone .set-dots{height:32px}
  body.session-active .series-zone .set-dot{width:30px;height:30px;min-width:30px}
  body.session-active .training-console .training-actions,body.session-active .training-console .training-actions .btn,body.session-active .training-console .training-actions .btn.primary{height:39px;min-height:39px}
  .session-volume{height:14px}
}

@media(min-width:900px){
  body.session-active .view>.screen-enter{grid-template-rows:auto auto minmax(0,1fr)}
  body.session-active .session-heading h2{max-width:600px;font-size:28px}
  body.session-active .session-layout{height:auto;display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px}
  body.session-active .training-console{grid-template-rows:auto minmax(190px,1fr) 58px 54px 46px 18px}
  body.session-active .exercise-title{font-size:42px}
  body.session-active .exercise-visual .muscle-map{width:92px;max-height:178px}
  body.session-active .session-queue{display:block;margin:0;height:100%;overflow:hidden;position:static}
}

/* V2.3.1 — spacing system and professional equipment artwork. */
:root{--ui-gap-1:6px;--ui-gap-2:10px;--ui-gap-3:14px;--ui-touch:44px}
.equipment-static{display:block;object-fit:contain;object-position:center;filter:drop-shadow(0 7px 8px #14213D14)}
.launch-art .equipment-static,.row-icon .equipment-static{object-fit:contain}
.exercise-head{min-height:42px;padding:2px 2px 0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:var(--ui-gap-2)}
body.session-active .exercise-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;overflow:hidden;line-height:.9;max-width:100%}
.muscle-focus{margin-bottom:1px;padding-inline:10px;max-width:112px;overflow:hidden;text-overflow:ellipsis}
body.session-active .training-console{padding:var(--ui-gap-3);gap:var(--ui-gap-2);grid-template-rows:42px minmax(128px,1fr) 58px 52px 46px 18px}
body.session-active .exercise-visual .machine-stage{padding:var(--ui-gap-2)}
.exercise-visual .machine-stage .equipment{transform:none;object-fit:contain;padding:3px}
body.session-active .exercise-visual .muscle-panel{padding:var(--ui-gap-2) 8px 7px}
body.session-active .training-console .metrics{height:58px;gap:var(--ui-gap-2)}
body.session-active .training-console .metric{padding:8px 7px;border-radius:13px}
body.session-active .training-console .metric small{margin-top:5px;line-height:1}
.series-zone{grid-template-rows:15px 36px;gap:1px;padding-inline:2px}
body.session-active .series-zone .sets-title{padding-inline:1px}
body.session-active .series-zone .set-dots{gap:8px;padding:1px 0}
body.session-active .training-console .training-actions{height:46px;gap:var(--ui-gap-2)}
body.session-active .training-console .training-actions .btn,body.session-active .training-console .training-actions .btn.primary{height:46px;min-height:46px;padding:0 13px;border-radius:13px;line-height:1.15}
.session-volume{padding-top:1px}

.exercise-visual-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.exercise-visual-fields>label{min-width:0}
.exercise-visual-fields .selected-machine{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1.4fr) 72px minmax(78px,.7fr);align-items:center;gap:12px;min-height:126px;padding:14px;border:1px solid #B9CADB;border-radius:16px;background:#EDF3F7}
.selected-machine>.equipment{width:100%;height:96px;min-width:0;object-fit:contain}
.selected-machine .selected-anatomy{height:96px;display:grid;place-items:center;padding-left:9px;border-left:1px solid #C5D3DF}
.selected-machine .muscle-map{width:56px;height:92px}
.selected-machine>span{min-width:0}
.selected-machine>span b,.selected-machine>span small{display:block;overflow:hidden;text-overflow:ellipsis}
.selected-machine>span b{color:#294E75;font-size:11px;text-transform:uppercase}
.selected-machine>span small{margin-top:5px;color:#617B96;font-size:9px;line-height:1.3}
.modal-card{padding-inline:22px}
.form-grid{gap:14px 12px}
.form-grid label{min-width:0}
.form-grid input,.form-grid select{padding-inline:14px}
.modal-actions{gap:10px;margin-top:8px}
.modal-actions .btn{padding-inline:16px}

@media(max-height:700px){
 body.session-active .training-console{padding:10px;gap:5px;grid-template-rows:36px minmax(98px,1fr) 48px 44px 40px 14px}
 body.session-active .training-console .metrics{height:48px;gap:6px}
 body.session-active .training-console .metric{padding:5px}
 .series-zone{grid-template-rows:12px 31px}
 body.session-active .training-console .training-actions,body.session-active .training-console .training-actions .btn,body.session-active .training-console .training-actions .btn.primary{height:40px;min-height:40px;padding-inline:8px}
}
@media(max-width:430px){
 .exercise-visual-fields{grid-template-columns:1fr}
 .exercise-visual-fields .selected-machine{grid-column:1;grid-template-columns:minmax(0,1fr) 62px;min-height:112px;padding:10px}
 .selected-machine>.equipment{height:84px}
 .selected-machine .selected-anatomy{height:84px}
 .selected-machine>span{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px}
}

/* V2.4 — professional anatomy and a calmer, roomier spacing rhythm. */
:root{--space-xs:6px;--space-sm:10px;--space-md:16px;--space-lg:22px;--space-xl:30px}
.muscle-map-pro{display:block;object-fit:contain;object-position:center;filter:drop-shadow(0 7px 8px #14213D16)}

body:not(.session-active) .view{padding-left:22px;padding-right:22px;padding-top:104px}
body:not(.session-active) .page-intro{padding:16px 3px 32px}
body:not(.session-active) .section-head{gap:18px;margin-bottom:24px;padding-inline:2px}
body:not(.session-active) .section-head h2{margin-bottom:10px}
body:not(.session-active) .card+.card{margin-top:18px}
body:not(.session-active) .launch-grid{gap:20px}
body:not(.session-active) .launch-card{padding:24px;border-radius:24px}
body:not(.session-active) .launch-card h2{margin:14px 0 8px}
body:not(.session-active) .launch-card p{margin-bottom:24px;line-height:1.55}
body:not(.session-active) .workout-summary{min-height:108px;padding:21px 20px;gap:16px}
body:not(.session-active) .workout-letter{width:54px;height:54px;flex:none}
body:not(.session-active) .workout-summary h3{margin-bottom:6px}
body:not(.session-active) .workout-summary p{line-height:1.4}
body:not(.session-active) .workout-body{padding:4px 18px 20px}
body:not(.session-active) .exercise-row{min-height:92px;gap:13px;padding:14px 4px}
body:not(.session-active) .exercise-row .row-icon{width:66px;height:60px;padding:5px;flex:none}
body:not(.session-active) .exercise-row b{display:block;line-height:1.3;margin-bottom:3px}
body:not(.session-active) .dashed-add{margin-top:10px;padding:15px}
body:not(.session-active) .workout-actions{gap:10px;margin-top:14px}
body:not(.session-active) .stat-grid{gap:14px;margin-bottom:24px}
body:not(.session-active) .stat-card{padding:21px 18px}
body:not(.session-active) .ring-grid{gap:12px;margin:22px 0 28px}
body:not(.session-active) .spark-card{padding:18px}
body:not(.session-active) .badge-list{gap:12px}
body:not(.session-active) .badge{padding:20px 12px}
body:not(.session-active) .settings-hero{gap:20px;margin-bottom:28px;padding-inline:4px}
body:not(.session-active) .settings-group{margin-bottom:20px}
body:not(.session-active) .settings-group>span{margin-bottom:9px}
body:not(.session-active) .settings-group .card{padding:7px 12px}
body:not(.session-active) .setting-row{min-height:72px;gap:14px;padding:13px 10px}
body:not(.session-active) .admin-entry{padding:22px 18px;margin-top:24px}
.btn{padding-inline:18px}

body.session-active .view>.screen-enter{gap:8px}
body.session-active .session-heading{min-height:42px;margin-inline:5px}
body.session-active .hero-progress{height:29px;min-height:29px;margin-inline:6px}
body.session-active .training-console{padding:18px;gap:11px;grid-template-rows:46px minmax(150px,1fr) 62px 58px 50px 20px;border-radius:25px}
.exercise-head{min-height:46px;padding:3px 3px 1px;gap:14px}
body.session-active .exercise-number{margin-bottom:6px}
.muscle-focus{min-height:30px;padding-inline:12px;margin-bottom:2px}
.exercise-visual{grid-template-columns:minmax(0,1.42fr) minmax(122px,.95fr);border-radius:19px}
body.session-active .exercise-visual .machine-stage{padding:14px}
.exercise-visual .machine-stage .equipment{padding:5px}
body.session-active .exercise-visual .muscle-panel{padding:12px 9px 9px;gap:5px}
body.session-active .exercise-visual .muscle-map{width:100%;height:100%;max-width:108px;max-height:none;min-height:0}
.exercise-visual .muscle-panel b{font-size:10px;line-height:1.2}
.exercise-visual .muscle-panel small{font-size:7px;line-height:1.35;margin-top:3px}
body.session-active .training-console .metrics{height:62px;gap:11px}
body.session-active .training-console .metric{padding:10px 8px;border-radius:14px}
body.session-active .training-console .metric small{margin-top:6px}
.series-zone{grid-template-rows:17px 39px;gap:2px;padding-inline:4px}
body.session-active .series-zone .sets-title{height:17px;padding-inline:2px}
body.session-active .series-zone .set-dots{height:39px;gap:10px;padding:2px 0}
body.session-active .series-zone .set-dot{width:36px;height:36px;min-width:36px}
body.session-active .training-console .training-actions{height:50px;gap:11px}
body.session-active .training-console .training-actions .btn,body.session-active .training-console .training-actions .btn.primary{height:50px;min-height:50px;padding-inline:15px;border-radius:14px;line-height:1.2}
.session-volume{height:20px;padding-top:3px}

.exercise-visual-fields{gap:16px 14px}
.exercise-visual-fields .selected-machine{min-height:148px;padding:18px;gap:16px;border-radius:18px}
.selected-machine>.equipment{height:112px}
.selected-machine .selected-anatomy{height:112px;padding-left:13px}
.selected-machine .muscle-map{width:68px;height:108px;object-fit:contain}
.modal-card{padding:14px 24px calc(28px + env(safe-area-inset-bottom))}
.modal-card h2{margin-bottom:12px}
.modal-card p{margin-bottom:20px}
.form-grid{gap:17px 14px}
.form-grid input,.form-grid select{height:52px;padding-inline:16px}
.modal-actions{gap:12px;margin-top:12px}

@media(max-height:700px){
 body.session-active .view>.screen-enter{gap:4px}
 body.session-active .session-heading{min-height:32px}
 body.session-active .hero-progress{height:23px;min-height:23px}
 body.session-active .training-console{padding:11px;gap:5px;grid-template-rows:37px minmax(98px,1fr) 48px 44px 40px 14px}
 .exercise-head{min-height:37px;gap:8px}
 .muscle-focus{min-height:25px;padding-inline:8px}
 body.session-active .exercise-visual .machine-stage{padding:7px}
 body.session-active .exercise-visual .muscle-panel{padding:6px}
 body.session-active .training-console .metrics{height:48px;gap:6px}
 body.session-active .training-console .metric{padding:5px}
 .series-zone{grid-template-rows:12px 31px;gap:1px;padding-inline:1px}
 body.session-active .series-zone .sets-title{height:12px}
 body.session-active .series-zone .set-dots{height:31px;gap:6px;padding:0}
 body.session-active .series-zone .set-dot{width:30px;height:30px;min-width:30px}
 body.session-active .training-console .training-actions,body.session-active .training-console .training-actions .btn,body.session-active .training-console .training-actions .btn.primary{height:40px;min-height:40px;padding-inline:9px}
 .session-volume{height:14px;padding-top:0}
}

@media(min-width:900px){
 body:not(.session-active) .view{padding-left:42px;padding-right:42px}
 body.session-active .training-console{padding:22px;gap:14px;grid-template-rows:54px minmax(210px,1fr) 68px 62px 54px 22px}
 body.session-active .exercise-visual .muscle-map{max-width:138px}
}

/* Final V2.5 cascade: controls intentionally override the earlier responsive system. */
body.session-active .training-console{align-content:space-between;grid-template-rows:46px clamp(145px,23dvh,205px) 78px 66px 56px 20px}
body.session-active .exercise-visual{box-shadow:none}
body.session-active .exercise-visual .machine-stage{padding:11px 14px}
body.session-active .exercise-visual .muscle-panel{padding-block:9px 7px}
body.session-active .training-console .metrics-featured{height:78px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0}
body.session-active .training-console .metrics-featured .metric{height:78px;min-width:0;margin:0;padding:10px 11px;border:1px solid transparent;border-radius:15px;display:grid;grid-template-rows:auto 1fr auto;align-items:center;place-content:initial;text-align:left;box-shadow:0 6px 14px #14213D10}
body.session-active .metrics-featured .metric small{margin:0;color:inherit;font-size:7.5px;line-height:1.05;font-weight:800;letter-spacing:.07em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.8}
body.session-active .metrics-featured .metric b{display:flex;align-items:baseline;gap:2px;margin:1px 0 0;color:inherit;font-family:'Barlow Condensed',sans-serif;font-size:31px;line-height:.9;font-style:normal;white-space:nowrap}
body.session-active .metrics-featured .metric b i{font-family:inherit;font-size:15px;font-weight:700;font-style:normal;opacity:.72;text-transform:lowercase}
body.session-active .metrics-featured .metric>span{display:flex;align-items:center;justify-content:space-between;color:inherit;font-size:7.5px;line-height:1;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.72}
body.session-active .metrics-featured .metric-series{background:#14213D;border-color:#14213D;color:#fff}
body.session-active .metrics-featured .metric-reps{background:#527AA6;border-color:#527AA6;color:#fff}
body.session-active .metrics-featured .metric-weight{appearance:none;width:100%;font-family:inherit;background:#FFF8EA;border:2px solid #FCA311;color:#14213D;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}
body.session-active .metrics-featured .metric-weight:active{transform:scale(.97)}
body.session-active .metrics-featured .metric-weight:focus-visible{outline:3px solid #527AA655;outline-offset:2px}
body.session-active .metrics-featured .metric-weight>span{color:#805107;opacity:1}
body.session-active .metrics-featured .metric-weight>span strong{font-size:11px}
body.session-active .series-zone{grid-template-rows:18px 46px;gap:2px;padding:0 4px}
body.session-active .series-zone .sets-title{height:18px;font-size:8.5px;letter-spacing:.04em}
body.session-active .series-zone .sets-title strong{font-size:10px}
body.session-active .series-zone .set-dots{height:46px;gap:10px;padding:2px 0}
body.session-active .series-zone .set-dot{width:42px;height:42px;min-width:42px;border-width:2px;font-size:13px}
body.session-active .series-zone .set-dot.next{box-shadow:0 0 0 5px #FCA3111F}
body.session-active .training-console .training-actions{height:56px;gap:10px}
body.session-active .training-console .training-actions .btn,body.session-active .training-console .training-actions .btn.primary{height:56px;min-height:56px;padding-inline:16px;border-radius:15px;font-size:11px}
body.session-active .training-console .training-actions .btn.primary{font-size:13px;box-shadow:0 8px 18px #FCA3112B}

@media(max-height:700px){
 body.session-active .training-console{align-content:space-between;grid-template-rows:37px clamp(96px,18dvh,120px) 64px 50px 44px 14px}
 body.session-active .training-console .metrics-featured{height:64px;gap:6px}
 body.session-active .training-console .metrics-featured .metric{height:64px;padding:7px 8px;border-radius:12px}
 body.session-active .metrics-featured .metric small{font-size:6.5px}
 body.session-active .metrics-featured .metric b{font-size:25px}
 body.session-active .metrics-featured .metric b i{font-size:12px}
 body.session-active .metrics-featured .metric>span{font-size:6.5px}
 body.session-active .series-zone{grid-template-rows:13px 35px;gap:2px}
 body.session-active .series-zone .sets-title{height:13px;font-size:7px}
 body.session-active .series-zone .set-dots{height:35px;gap:7px;padding:1px 0}
 body.session-active .series-zone .set-dot{width:33px;height:33px;min-width:33px;font-size:10px}
 body.session-active .training-console .training-actions,body.session-active .training-console .training-actions .btn,body.session-active .training-console .training-actions .btn.primary{height:44px;min-height:44px;padding-inline:10px}
 body.session-active .training-console .training-actions .btn.primary{font-size:11px}
}

@media(min-width:900px){
 body.session-active .training-console{grid-template-rows:54px minmax(190px,1fr) 86px 72px 60px 22px}
 body.session-active .training-console .metrics-featured{height:86px;gap:14px}
 body.session-active .training-console .metrics-featured .metric{height:86px;padding:12px 15px}
 body.session-active .metrics-featured .metric b{font-size:38px}
}

/* ========================================================================== 
   REPZY / FORMA v2.6 — iPhone safe areas + compact training console
   ========================================================================== */
:root{
  --app-safe-top:env(safe-area-inset-top,0px);
  --app-safe-right:env(safe-area-inset-right,0px);
  --app-safe-bottom:env(safe-area-inset-bottom,0px);
  --app-safe-left:env(safe-area-inset-left,0px);
}
html.standalone-ios{
  /* Fallback protects Home Screen PWAs if iOS reports a zero inset on startup. */
  --app-safe-top:max(env(safe-area-inset-top,0px),44px);
  --app-safe-bottom:max(env(safe-area-inset-bottom,0px),18px);
}

/* Header always starts below the iOS status area. */
.topbar{
  height:calc(72px + var(--app-safe-top));
  padding:calc(10px + var(--app-safe-top)) max(18px,var(--app-safe-right)) 10px max(18px,var(--app-safe-left));
  align-items:center;
}
body:not(.session-active) .view{
  padding-top:calc(92px + var(--app-safe-top));
}
body.session-active .view{
  padding-top:calc(80px + var(--app-safe-top));
}

/* The hamburger is intentionally kept in the thumb zone, never beneath battery/notch. */
.menu-btn,
body.session-active .menu-btn{
  top:auto!important;
  right:max(16px,var(--app-safe-right))!important;
  bottom:calc(18px + var(--app-safe-bottom))!important;
  width:58px;
  height:58px;
  min-width:58px;
  min-height:58px;
  touch-action:manipulation;
  -webkit-user-select:none;
  user-select:none;
}
body.session-active .menu-btn{width:56px;height:56px;min-width:56px;min-height:56px}
.section-nav,
body.session-active .section-nav{
  top:auto!important;
  bottom:calc(88px + var(--app-safe-bottom))!important;
  max-height:calc(100dvh - 120px - var(--app-safe-top) - var(--app-safe-bottom));
  overflow:auto;
}
html.standalone-ios .section-nav,
html.standalone-ios body.session-active .section-nav{bottom:calc(92px + var(--app-safe-bottom))!important}

/* Session: less decorative space, more room for the controls the athlete actually uses. */
body.session-active .view>.screen-enter{gap:7px}
body.session-active .session-heading{min-height:38px;margin-inline:5px}
body.session-active .hero-progress{height:28px;min-height:28px;margin-inline:6px}
body.session-active .session-layout{min-height:0}
body.session-active .training-console{
  height:auto;
  padding:16px;
  gap:10px;
  align-content:start;
  grid-template-rows:46px clamp(150px,21dvh,190px) 86px 76px 56px 20px;
  border-radius:25px;
}

/* Exercise illustrations: real contain/center behaviour, no crop. */
body.session-active .exercise-visual{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  grid-template-columns:minmax(0,1.62fr) minmax(108px,1fr);
  overflow:hidden;
  border-radius:19px;
}
body.session-active .exercise-visual .machine-stage{
  min-width:0;
  min-height:0;
  height:100%;
  padding:12px 16px;
  display:grid;
  place-items:center;
  overflow:hidden;
}
body.session-active .exercise-visual .machine-stage>.equipment,
body.session-active .exercise-visual .machine-stage>.equipment-static{
  display:block;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  padding:0!important;
  margin:0!important;
  transform:none!important;
  object-fit:contain!important;
  object-position:50% 50%!important;
}
body.session-active .exercise-visual .muscle-panel{
  min-width:0;
  min-height:0;
  height:100%;
  padding:10px 10px;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  place-items:center;
  overflow:hidden;
}
body.session-active .exercise-visual .muscle-map,
body.session-active .exercise-visual .muscle-map-pro{
  display:block;
  width:min(100%,112px)!important;
  height:100%!important;
  min-height:0!important;
  max-width:112px!important;
  max-height:100%!important;
  margin:auto!important;
  object-fit:contain!important;
  object-position:50% 50%!important;
}

/* Repetitions + weight: two large cards instead of three compressed columns. */
body.session-active .training-console .metrics-featured{
  height:86px;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  margin:0;
}
body.session-active .training-console .metrics-featured .metric{
  height:86px;
  min-width:0;
  padding:11px 14px;
  border-radius:16px;
  grid-template-rows:auto 1fr auto;
}
body.session-active .metrics-featured .metric small{
  font-size:8px;
  letter-spacing:.065em;
}
body.session-active .metrics-featured .metric b{
  font-size:39px;
  line-height:.88;
}
body.session-active .metrics-featured .metric b i{
  font-size:16px;
  margin-left:2px;
}
body.session-active .metrics-featured .metric>span{font-size:8px}
body.session-active .metrics-featured .metric-reps{background:#527AA6;border-color:#527AA6;color:#fff}
body.session-active .metrics-featured .metric-weight{border:1.5px solid #F4C66F;background:#FFF8EA}

/* Series become the main interaction, without duplicating a third metric card. */
body.session-active .series-zone{
  height:76px;
  grid-template-rows:28px 46px;
  gap:2px;
  padding:0 4px;
}
body.session-active .series-zone .sets-title{
  height:28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0;
  padding:0 2px;
}
body.session-active .series-zone .sets-title>span{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
  text-transform:none;
  letter-spacing:0;
}
body.session-active .series-zone .sets-title>span>b{
  color:#14213D;
  font-family:'Barlow Condensed',sans-serif;
  font-size:17px;
  line-height:1;
  text-transform:uppercase;
  letter-spacing:.025em;
  white-space:nowrap;
}
body.session-active .series-zone .sets-title>span>small{
  color:#617B96;
  font-size:8px;
  font-weight:700;
  white-space:nowrap;
}
body.session-active .series-zone .sets-title>strong{font-size:12px}
body.session-active .series-zone .set-dots{
  height:46px;
  gap:10px;
  padding:2px 0;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}
body.session-active .series-zone .set-dots::-webkit-scrollbar{display:none}
body.session-active .series-zone .set-dot{width:42px;height:42px;min-width:42px;font-size:13px}

body.session-active .training-console .training-actions,
body.session-active .training-console .training-actions .btn,
body.session-active .training-console .training-actions .btn.primary{
  height:56px;
  min-height:56px;
}
body.session-active .training-console .training-actions .btn.primary{font-size:13px}
body.session-active .session-volume{height:20px;padding-top:3px}

/* Saving feedback for workout/exercise forms too. */
body.saving #workout-form button[type="submit"],
body.saving #exercise-form button[type="submit"]{opacity:.58;pointer-events:none}

@media(max-width:699px){
  /* The muscle name is already in the focus pill: use the panel for the illustration. */
  body.session-active .exercise-visual .muscle-panel>div{display:none}
  body.session-active .exercise-visual .muscle-panel{grid-template-rows:minmax(0,1fr);padding:9px}
  body.session-active .exercise-visual .muscle-map,
  body.session-active .exercise-visual .muscle-map-pro{width:min(100%,118px)!important;max-width:118px!important}
}

@media(max-height:760px){
  body.session-active .training-console{
    padding:12px;
    gap:6px;
    grid-template-rows:39px clamp(118px,18dvh,145px) 72px 64px 48px 16px;
  }
  body.session-active .training-console .metrics-featured{height:72px;gap:8px}
  body.session-active .training-console .metrics-featured .metric{height:72px;padding:8px 10px;border-radius:13px}
  body.session-active .metrics-featured .metric b{font-size:32px}
  body.session-active .metrics-featured .metric b i{font-size:14px}
  body.session-active .series-zone{height:64px;grid-template-rows:23px 39px}
  body.session-active .series-zone .sets-title{height:23px}
  body.session-active .series-zone .sets-title>span>b{font-size:15px}
  body.session-active .series-zone .set-dots{height:39px;gap:8px;padding:1px 0}
  body.session-active .series-zone .set-dot{width:36px;height:36px;min-width:36px;font-size:11px}
  body.session-active .training-console .training-actions,
  body.session-active .training-console .training-actions .btn,
  body.session-active .training-console .training-actions .btn.primary{height:48px;min-height:48px}
  body.session-active .session-volume{height:16px;padding-top:1px}
}

@media(max-width:365px){
  body.session-active .training-console{padding:11px;gap:6px}
  body.session-active .exercise-visual{grid-template-columns:minmax(0,1.55fr) minmax(94px,.9fr)}
  body.session-active .exercise-visual .machine-stage{padding:9px}
  body.session-active .training-console .metrics-featured{gap:7px}
  body.session-active .training-console .metrics-featured .metric{padding-inline:9px}
  body.session-active .metrics-featured .metric b{font-size:34px}
  body.session-active .series-zone .sets-title>span>small{display:none}
}

@media(min-width:900px){
  .topbar{height:80px;padding-top:14px}
  body:not(.session-active) .view{padding-top:108px}
  body.session-active .view{padding-top:82px}
  .menu-btn,body.session-active .menu-btn{right:32px!important;bottom:28px!important}
  .section-nav,body.session-active .section-nav{bottom:98px!important}
  body.session-active .training-console{height:100%;grid-template-rows:54px minmax(190px,1fr) 92px 82px 60px 22px;gap:14px}
  body.session-active .training-console .metrics-featured,
  body.session-active .training-console .metrics-featured .metric{height:92px}
  body.session-active .metrics-featured .metric b{font-size:43px}
  body.session-active .series-zone{height:82px;grid-template-rows:30px 50px}
}

/* ========================================================================== 
   REPZY / FORMA v2.7 — full-height iPhone layout + reliable top navigation
   ========================================================================== */
:root{
  --app-height:100dvh;
  --nav-touch:54px;
}

/* The previous v2.6 thumb-menu reserved space at the bottom. v2.7 puts the
   navigation back in the header, safely below the iOS status area. */
.view{
  padding-bottom:calc(24px + var(--app-safe-bottom))!important;
}
.topbar{
  z-index:110;
  min-height:calc(70px + var(--app-safe-top));
  height:calc(70px + var(--app-safe-top));
  padding-top:var(--app-safe-top);
  padding-bottom:0;
  padding-left:max(16px,var(--app-safe-left));
  padding-right:max(78px,calc(var(--app-safe-right) + 70px));
  background:#E7EEF4F2;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-bottom:1px solid #C7D5E1;
  overflow:visible;
}
@media(max-width:430px){
  .topbar .streak-pill{display:none}
}

.menu-btn,
body.session-active .menu-btn{
  position:fixed!important;
  z-index:130!important;
  top:calc(var(--app-safe-top) + 8px)!important;
  right:max(12px,var(--app-safe-right))!important;
  bottom:auto!important;
  left:auto!important;
  width:var(--nav-touch)!important;
  height:var(--nav-touch)!important;
  min-width:var(--nav-touch)!important;
  min-height:var(--nav-touch)!important;
  border-radius:17px!important;
  display:grid!important;
  place-content:center!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  -webkit-tap-highlight-color:transparent;
}
.menu-btn::after{
  content:'';
  position:absolute;
  inset:-6px;
}

/* Menu panel opens below the header, rather than from the bottom of the app. */
.section-nav,
body.session-active .section-nav,
html.standalone-ios .section-nav,
html.standalone-ios body.session-active .section-nav{
  z-index:125!important;
  top:calc(var(--app-safe-top) + 68px)!important;
  right:max(12px,var(--app-safe-right))!important;
  bottom:auto!important;
  left:auto!important;
  width:min(calc(100vw - 24px - var(--app-safe-left) - var(--app-safe-right)),390px)!important;
  max-height:calc(var(--app-height) - var(--app-safe-top) - var(--app-safe-bottom) - 88px)!important;
  padding:12px!important;
  transform:translateY(-8px) scale(.985)!important;
  transform-origin:top right!important;
  overflow:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.section-nav.open,
body.session-active .section-nav.open{
  transform:translateY(0) scale(1)!important;
}
.section-nav button{
  min-height:58px;
  touch-action:manipulation;
}

/* In Home Screen mode iOS can briefly report a zero inset during launch.
   Keep the menu outside the battery/notch area even in that frame. */
html.standalone-ios{
  --app-safe-top:max(env(safe-area-inset-top,0px),47px);
  --app-safe-bottom:max(env(safe-area-inset-bottom,0px),18px);
}

/* Use the actual visual viewport reported by JS. This avoids the dead area
   that can appear below the app in standalone Safari/PWA mode. */
body.session-active{
  min-height:var(--app-height);
  height:var(--app-height);
  overflow:hidden;
}
body.session-active .app-shell{
  height:var(--app-height)!important;
  min-height:var(--app-height)!important;
  overflow:hidden;
}
body.session-active .view{
  height:var(--app-height)!important;
  min-height:0!important;
  padding:calc(78px + var(--app-safe-top)) 10px calc(10px + var(--app-safe-bottom))!important;
  overflow:hidden;
}
body.session-active .view>.screen-enter{
  width:100%;
  height:100%!important;
  min-height:0;
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr);
  gap:7px;
}
body.session-active .session-layout{
  width:100%;
  height:100%!important;
  min-height:0!important;
  display:block;
}
body.session-active .session-layout>div{
  height:100%;
  min-height:0;
}
body.session-active .training-console{
  width:100%;
  height:100%!important;
  min-height:0!important;
  padding:15px;
  gap:9px;
  align-content:stretch!important;
  grid-template-rows:46px minmax(0,1fr) 82px 72px 54px 19px!important;
  overflow:hidden;
}

/* Let the illustration area consume the remaining space instead of leaving
   a large blank block below the primary action. */
body.session-active .exercise-visual{
  min-height:150px;
  height:100%;
}
body.session-active .exercise-visual .machine-stage,
body.session-active .exercise-visual .muscle-panel{
  height:100%;
  min-height:0;
}
body.session-active .training-console .metrics-featured,
body.session-active .training-console .metrics-featured .metric{
  height:82px;
}
body.session-active .series-zone{
  height:72px;
  grid-template-rows:26px 44px;
}
body.session-active .series-zone .sets-title{height:26px}
body.session-active .series-zone .set-dots{height:44px}
body.session-active .series-zone .set-dot{
  width:40px;
  height:40px;
  min-width:40px;
}
body.session-active .training-console .training-actions,
body.session-active .training-console .training-actions .btn,
body.session-active .training-console .training-actions .btn.primary{
  height:54px;
  min-height:54px;
}
body.session-active .session-volume{
  height:19px;
  padding:0;
}

/* Small-height iPhones: preserve all controls while still filling the panel. */
@media(max-height:760px){
  body.session-active .view{
    padding-top:calc(74px + var(--app-safe-top))!important;
    padding-bottom:calc(7px + var(--app-safe-bottom))!important;
  }
  body.session-active .view>.screen-enter{gap:4px}
  body.session-active .session-heading{min-height:32px}
  body.session-active .hero-progress{height:23px;min-height:23px}
  body.session-active .training-console{
    padding:10px;
    gap:5px;
    grid-template-rows:38px minmax(0,1fr) 68px 60px 46px 15px!important;
  }
  body.session-active .exercise-visual{min-height:105px}
  body.session-active .training-console .metrics-featured,
  body.session-active .training-console .metrics-featured .metric{height:68px}
  body.session-active .series-zone{height:60px;grid-template-rows:22px 36px}
  body.session-active .series-zone .sets-title{height:22px}
  body.session-active .series-zone .set-dots{height:36px}
  body.session-active .series-zone .set-dot{width:34px;height:34px;min-width:34px}
  body.session-active .training-console .training-actions,
  body.session-active .training-console .training-actions .btn,
  body.session-active .training-console .training-actions .btn.primary{height:46px;min-height:46px}
  body.session-active .session-volume{height:15px}
}

@media(min-width:900px){
  .topbar{padding-right:36px}
  .topbar .streak-pill{display:block}
  .menu-btn,body.session-active .menu-btn{
    top:auto!important;
    right:32px!important;
    bottom:28px!important;
  }
  .section-nav,body.session-active .section-nav{
    top:auto!important;
    right:24px!important;
    bottom:98px!important;
    width:390px!important;
    transform:translateY(8px) scale(.985)!important;
    transform-origin:bottom right!important;
  }
  .section-nav.open,body.session-active .section-nav.open{transform:translateY(0) scale(1)!important}
  body.session-active .view{height:100dvh!important;padding:82px 24px 12px!important}
  body.session-active .app-shell{height:100dvh!important;min-height:100dvh!important}
  body.session-active .training-console{grid-template-rows:54px minmax(190px,1fr) 92px 82px 60px 22px!important;gap:14px}
}
