/* Phone layout and iOS standalone safe areas. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--nav-height:72px;--muted:#b6b6ac}
body{padding:0}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button,input,select{touch-action:manipulation}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button:disabled{opacity:.35;cursor:default}[hidden]{display:none!important}main:focus{outline:none}
.app-shell{max-width:620px;padding:calc(var(--safe-top) + 12px) 16px calc(var(--nav-height) + var(--safe-bottom) + 24px);min-height:100dvh}.topbar{margin:0 0 20px;min-height:40px}.topbar h1{font-size:22px;letter-spacing:-.04em;margin:0}.topbar h1::before{content:'';display:inline-block;background:var(--accent);width:8px;height:8px;border-radius:50%;margin-right:9px;vertical-align:middle}.topbar .eyebrow{display:none}.topbar .ghost{min-height:44px;font-size:14px}
@media(display-mode:standalone){.app-shell{padding-top:calc(max(var(--safe-top),24px) + 12px)}}
.bottom-nav{max-width:620px;grid-template-columns:repeat(5,minmax(0,1fr));min-height:calc(var(--nav-height) + var(--safe-bottom));padding:6px 8px calc(6px + var(--safe-bottom))}.bottom-nav .nav-btn{font-size:12px;min-height:58px;padding:8px 0;line-height:1.2}.bottom-nav .nav-btn svg{width:23px;height:23px;margin-bottom:5px}.bottom-nav .nav-btn.active{font-weight:750}
.gym-launch{padding:18px;background:linear-gradient(135deg,#22261b,#191c16);border:1px solid #3b4430;border-radius:20px;margin-bottom:16px}.gym-kicker{font-size:12px;font-weight:800;letter-spacing:.1em;color:var(--accent);margin-bottom:6px}.gym-launch h2{font-size:30px;line-height:1.1}.workout-letter{display:grid;place-items:center;font-size:23px;font-weight:800;width:42px;height:42px;background:#d9ff6410;color:var(--accent);border-radius:12px}.equipment-row{display:flex;flex-wrap:wrap;gap:12px;margin:14px 0 8px}.equipment-row span,.dose,.gym-rest-row>span{display:flex;align-items:center;gap:5px;font-size:13px;color:var(--muted)}.equipment-row svg,.dose svg,.gym-rest-row svg{width:20px;height:20px}.session-facts{font-size:14px;margin:8px 0 16px;line-height:1.4}.launch-button,.gym-action>.primary{display:flex;align-items:center;justify-content:center;gap:10px;min-height:54px;font-size:17px}.launch-button svg,.gym-action svg{width:20px;height:20px}.resume-context{font-size:13px;margin:0 0 14px}.resume-context>span{color:var(--muted);display:block;margin-bottom:3px}.resume-context>b{display:block;font-size:15px}
.gym-week{display:flex;align-items:center;gap:14px;padding:2px 2px 18px;border-bottom:1px solid var(--line);margin-bottom:16px}.gym-week>div:first-child{margin-right:auto}.gym-week b{font-size:15px}.gym-week>div>span{display:block;font-size:13px;color:var(--muted);margin-top:3px}.gym-week>b{font-size:22px;white-space:nowrap}.gym-week>b span{font-size:15px;color:var(--muted)}.week-marks{display:flex;gap:6px}.week-marks i{width:24px;height:24px;border:1px solid #51564a;border-radius:50%;display:grid;place-items:center}.week-marks i.done{background:var(--accent);color:#111}.week-marks svg{width:16px;height:16px}
.gym-preview h3{font-size:18px}.gym-preview .ghost{font-size:14px;border:0;min-height:44px}.preview-list{margin-top:6px}.preview-item{display:grid;grid-template-columns:42px 1fr 22px;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid #ffffff0b}.equipment-tile{display:grid;place-items:center;background:#23251f;color:var(--accent);border-radius:12px;width:42px;height:42px}.equipment-tile svg{width:26px;height:26px}.preview-item b{font-size:15px;font-weight:650;line-height:1.3;display:block}.preview-item div>span{display:block;font-size:13px;margin-top:3px;color:var(--muted)}.preview-state{color:#82877a;font-size:13px}.preview-state svg{width:20px;height:20px}.preview-state.done{color:var(--accent)}
svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.text-button{background:none;border:0;color:var(--muted);padding:10px 4px;font-size:14px;min-height:44px;text-align:center}.gym-session-title{display:flex;align-items:center;justify-content:space-between;margin:-12px 0 8px}.gym-session-title>b{font-size:18px}.gym-stages{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin:0 0 20px;padding-bottom:14px;border-bottom:1px solid var(--line)}.gym-stages button{min-height:48px;padding:6px 0;background:none;border:0;color:var(--muted);font-size:12px;display:flex;align-items:center;justify-content:center;gap:5px;border-radius:9px}.gym-stages button>span{display:grid;place-items:center;width:19px;height:19px;border:1px solid #44483c;border-radius:50%;font-size:11px}.gym-stages button[aria-current]{color:var(--accent);background:#d9ff640b}.gym-stages button[aria-current]>span{background:var(--accent);color:#111;border-color:var(--accent)}
.gym-in-session .topbar{margin-bottom:14px}.gym-focus h2{font-size:26px;line-height:1.15;margin:4px 0 10px;max-width:95%;letter-spacing:-.035em}.set-count{font-size:13px;color:var(--muted)}.focus-visual{border-radius:16px;background:#171a14;margin:0 0 10px;overflow:hidden}.focus-visual .movement-diagram{padding:0;border:0;background:none}.focus-visual .movement-diagram svg{height:112px;width:100%}.focus-visual .diagram-title,.focus-visual .movement-diagram>.meta{display:none}.focus-visual .movement-diagram .diagram-panel{fill:none;stroke:none}.equipment-visual{display:flex;align-items:center;gap:16px;padding:14px}.equipment-visual>.equipment-tile{flex-shrink:0;width:64px;height:64px}.equipment-visual svg{width:42px;height:42px}.equipment-visual p{font-size:14px;line-height:1.4;margin:0}.exercise-dose{display:flex;align-items:center;justify-content:space-between;gap:12px}.exercise-dose>b{font-size:22px}.exercise-dose>span{font-size:14px;color:var(--accent)}.gym-cue{font-size:14px;line-height:1.4;margin:8px 0 12px}.gym-hint{font-size:13px;line-height:1.45;color:var(--muted)}.gym-previous{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px;padding:8px 0;font-size:13px;border-top:1px solid var(--line)}.gym-previous b{font-weight:650;color:var(--text);display:block;margin-top:2px}.gym-previous button{white-space:nowrap;color:var(--accent)}
.gym-set-labels,.gym-set{display:grid;grid-template-columns:28px minmax(0,1fr) minmax(0,1fr) 48px;gap:8px;align-items:center}.gym-set-labels{font-size:12px;color:var(--muted);padding:6px 8px}.gym-set-labels span{text-align:center}.gym-set{padding:8px;border:1px solid transparent;border-radius:14px;margin:3px 0}.gym-set.is-current{border-color:#525e36;background:#d9ff6405}.gym-set>b{text-align:center;font-size:16px}.gym-set input{width:100%;min-width:0;height:50px;font-size:23px;font-weight:700;font-variant-numeric:tabular-nums;text-align:center;border:1px solid #43463d;border-radius:10px;background:#1b1e17;color:var(--text);padding:6px}.gym-set input:focus{outline:2px solid var(--accent);outline-offset:1px}.gym-set.is-done{opacity:.65}.gym-set .set-done{width:48px;height:50px}.set-done svg{width:22px;height:22px}.bw-label{text-align:center;color:var(--muted);font-size:19px}.gym-error:empty{display:none}.gym-error{font-size:14px;color:#ffb2a5;margin:8px 0}.gym-rest-row{display:flex;align-items:center;justify-content:space-between;padding:0 6px}.gym-details{border-top:1px solid var(--line)}.gym-details>summary{min-height:48px;display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:650;cursor:pointer;list-style:none}.gym-details>summary::-webkit-details-marker{display:none}.gym-details>summary>span{font-size:20px;color:var(--muted)}.gym-detail-body{padding:0 0 12px;font-size:15px;line-height:1.5}.gym-detail-body ol{padding-left:22px}.gym-detail-body li{margin-bottom:8px}.gym-detail-body input{font-size:16px;min-height:48px}.gym-detail-body .set-done{width:48px;height:48px}.gym-detail-body .form-group{display:block;color:var(--muted);font-size:14px}.gym-detail-body .form-group input{margin-top:8px}
.gym-action{position:sticky;bottom:calc(var(--nav-height) + var(--safe-bottom));z-index:6;background:rgba(16,17,15,.97);padding:10px 0 4px;margin-top:12px;display:flex;flex-direction:column;align-items:center;backdrop-filter:blur(12px)}.gym-ex-nav{display:flex;width:100%;align-items:center;justify-content:space-between}.gym-session-options{margin-top:12px;color:var(--muted);font-size:13px}.gym-session-options summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.gym-session-options button{color:#ffb2a5}
.gym-warm-list{margin-top:20px}.gym-warm-row{display:grid;grid-template-columns:48px 1fr;align-items:start;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.gym-warm-row>.warm-check{width:48px;height:48px;color:var(--muted);background:#1c1f18;border-radius:12px;font-size:16px}.gym-warm-row>.warm-check.done{background:var(--accent);color:#111}.warm-check svg{width:23px;height:23px}.gym-warm-row details>summary{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:48px;font-size:15px;list-style:none;cursor:pointer}.gym-warm-row summary::-webkit-details-marker{display:none}.gym-warm-row summary span{color:var(--accent);font-size:13px;white-space:nowrap}.gym-warm-row p{font-size:14px;line-height:1.45;margin:4px 0 8px}
.gym-cardio .form-group{display:block;font-size:15px;color:var(--muted);margin-top:24px}.gym-cardio input,.gym-cardio select{margin-top:8px;min-height:56px;font-size:18px}.gym-cardio input{font-size:36px;text-align:center}.logged-state{color:var(--accent)}.summary-stats{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:24px 0;border-bottom:1px solid var(--line)}.summary-stats b{display:block;font-size:36px}.summary-stats small{font-size:18px;color:var(--muted)}.summary-stats div>span{font-size:14px;color:var(--muted)}.gym-rating{border:0;padding:0;margin:24px 0}.gym-rating legend{font-size:16px;margin-bottom:12px}.gym-rating>div{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.gym-rating button{height:48px;font-size:19px;border:1px solid var(--line);border-radius:12px;color:var(--text);background:var(--panel)}.gym-rating button[aria-pressed=true]{background:var(--accent);color:#111}.gym-rating>span{display:flex;justify-content:space-between;color:var(--muted);font-size:13px;margin-top:7px}.gym-pain{display:flex;align-items:center;gap:10px;min-height:48px;font-size:15px}.gym-pain input{width:24px;height:24px;accent-color:var(--accent)}
.gym-dialog{color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:22px;padding:20px;width:min(540px,calc(100% - 24px));max-height:85dvh}.gym-dialog::backdrop{background:#000b;backdrop-filter:blur(3px)}.gym-dialog h2{font-size:22px}.gym-dialog .ghost{min-height:48px;font-size:15px}.overview-exercise{display:flex;align-items:center;gap:14px;width:100%;padding:16px 0;border:0;border-bottom:1px solid var(--line);background:none;text-align:left;color:var(--text)}.overview-exercise b{font-size:15px}.overview-exercise small{display:block;color:var(--muted);font-size:13px;margin-top:4px}
.rest-timer{bottom:calc(var(--nav-height) + var(--safe-bottom) + 8px);max-width:580px;padding:18px;background:#29321d;border-color:#6b8043;min-height:112px}.rest-timer span{font-size:14px}.rest-timer strong{font-size:40px;font-variant-numeric:tabular-nums}.rest-actions button,.rest-timer>button{min-height:48px;font-size:15px;padding:10px 12px}.rest-timer:not(.show){visibility:hidden}
.food-caption,.food-meal-nutrition span{font-size:14px}.food-page select,.food-page input{font-size:16px}.food-tabs button{min-height:48px}.food-page .card{box-shadow:none}.food-heading .eyebrow{display:none}
@media(min-width:700px){.app-shell{padding-top:26px}.gym-launch{padding:22px}.focus-visual .movement-diagram svg{height:140px}}
@media(max-width:360px){.app-shell{padding-left:12px;padding-right:12px}.equipment-row{gap:8px}.equipment-row span{font-size:12px}.gym-stages button{font-size:11px;gap:3px}.gym-focus h2{font-size:24px}.gym-set{gap:6px}.gym-set-labels{gap:6px}.rest-timer{gap:8px;padding:14px 12px}.rest-actions{gap:5px}.rest-actions button{padding:8px}.gym-warm-row summary{flex-wrap:wrap;justify-content:start}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

/* Keep both working sets above the action area on smaller phones. */
.gym-in-session .topbar{display:none}.gym-session-title{margin:0 0 6px}.gym-stages{margin-bottom:14px;padding-bottom:8px}.focus-visual{position:relative;display:block;width:100%;border:0;color:var(--text);padding:0;text-align:left;cursor:pointer}.focus-visual .movement-diagram svg{height:100px}.focus-visual.equipment-visual{display:flex;padding:12px}.visual-help{position:absolute;right:8px;top:8px;display:grid;place-items:center;width:20px;height:20px;border:1px solid #626952;border-radius:50%;font-size:12px;color:var(--accent)}.equipment-visual p{padding-right:10px}.gym-previous:empty{display:none}.gym-stages button{white-space:nowrap}@media(max-width:360px){.gym-stages button>span{display:none}.gym-stages button{font-size:12px}.focus-visual.equipment-visual{padding:10px;gap:10px}.equipment-visual>.equipment-tile{width:48px;height:48px}.equipment-visual p{font-size:13px}.gym-focus h2{font-size:23px}.gym-cue{font-size:13px}.focus-visual .movement-diagram svg{height:88px}}

@media(max-width:600px){.focus-visual .movement-diagram svg{height:84px}.gym-stages button{min-height:44px}.gym-stages{margin-bottom:10px}}

.pt-pair-nav{position:sticky;top:0;z-index:12;background:var(--bg,#10110f);padding:10px 0 12px;border-bottom:1px solid #35382f;margin-bottom:16px}
.pt-pair-nav>.row{gap:6px}.pt-pair-nav>.row>b{font-size:12px;text-align:center}
.pt-pair-nav .text-button{min-height:44px;font-size:12px;padding:6px}
.pt-pair-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pt-pair-tabs button{min-height:72px;padding:12px 10px;border-radius:12px;border:1px solid #414738;background:#1b1e18;color:#ecefe8;text-align:left}
.pt-pair-tabs button[aria-pressed="true"]{background:#dcff61;color:#13170c;border-color:#dcff61}
.pt-pair-tabs b,.pt-pair-tabs span{display:block}.pt-pair-tabs b{font-size:14px;line-height:1.35}.pt-pair-tabs span{font-size:12px;margin-top:5px}
