/* Safe areas and touch controls apply to browser and installed PWA alike. */
html{scroll-padding-bottom:180px}
.install-top{white-space:nowrap}.install-steps{padding-left:22px;font-size:14px;line-height:1.8}.install-steps li{margin:12px 0}.install-note{color:var(--muted);font-size:12px;line-height:1.6}
.timer{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;gap:8px 12px;max-width:calc(100vw - 24px);bottom:max(14px,env(safe-area-inset-bottom));padding:12px 14px}.timer>div:first-child{min-width:0}.timer .eyebrow{white-space:normal}.timer-main{gap:12px}.timer-toggle,.timer-close{width:44px;height:44px}.timer-options{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px}.timer-sound{font-size:12px;border:1px solid var(--line);background:var(--soft);color:var(--ink);border-radius:8px;padding:8px 12px;min-height:36px}.timer-sound[aria-pressed=true]{color:var(--lime)}.timer-hint{font-size:10px;color:var(--muted);max-width:190px;line-height:1.4}.timer-presets button{min-height:36px;min-width:42px}.toast{bottom:190px}
body:has(#timer:not([hidden])){padding-bottom:190px}
@media(max-width:1000px){
 .topbar{padding-top:env(safe-area-inset-top);height:auto;min-height:64px;gap:8px;flex-wrap:wrap;padding-bottom:8px}.header-actions{gap:6px;flex-wrap:wrap}.header-actions .button{font-size:11px;min-height:40px;padding:8px 10px}.private-note{display:none}
 .wrap{width:calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right));margin-inline:auto}
 .library{padding-top:max(15px,env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));height:100dvh;padding-bottom:env(safe-area-inset-bottom);overscroll-behavior:contain}.library-content{overscroll-behavior:contain}.library-heading h2{font-size:21px}.library-heading button{min-width:44px;min-height:44px}
 .library-group summary{min-height:44px}.quick-add{min-height:44px;min-width:40px}.library-item{min-height:48px}.library-item strong{font-size:12px}.library-item small{font-size:10px}.library-modes button{min-height:40px}.search-box input,.library-filters select,select{font-size:16px;min-height:44px}.library-filters{grid-template-columns:1fr}.library-filters select{font-size:16px}.library-dose{font-size:13px}.library-preview p{font-size:12px}.library-add{min-height:44px}.recommendation-add{width:44px;min-height:44px}.recommendation-name{font-size:12px}.recommendation-name small{font-size:10px}
 .day-circle{min-height:44px;max-width:none;border-radius:10px}.week-strip{gap:5px}.week-count-label select{min-width:64px}.week-assignment select{font-size:16px;min-height:44px}.day-tabs{scroll-padding:8px;scroll-snap-type:x proximity}.day-tab{scroll-snap-align:start;min-height:64px}.day-tab .tab-label strong{font-size:14px}
 .set-button,.rest-button,.stretch-remove,.exercise-edit button,.phase-switch button{min-height:44px}.exercise-edit button{min-width:44px}.set-button{font-size:12px}.rest-button{font-size:12px}.technique summary{min-height:44px;font-size:12px;padding-block:12px}.technique ol,.technique p,.cue{font-size:13px}.phase-label{font-size:10px}.phase-label b{font-size:9px}.card-header h3{font-size:17px}.card-header p{font-size:11px}.equipment{font-size:10px}
 .timer{left:50%;width:min(460px,calc(100% - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)));grid-template-columns:minmax(0,1fr) 44px 44px;gap:6px;padding:10px}.timer-main{flex-wrap:wrap;gap:6px}.timer-main>strong{font-size:30px}.timer-presets{gap:4px}.timer-hint{font-size:10px}.timer-sound{min-height:44px}.offline-actions button{min-height:44px}.footer{padding-bottom:max(24px,env(safe-area-inset-bottom))}
 dialog{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px)}.dialog-heading>.dialog-close{min-width:44px;min-height:44px}.image-dialog .phase-label{font-size:10px}
}
@media(max-width:400px){.header-actions{width:100%;justify-content:space-between}.header-actions .button{flex:1}.brand{padding-top:6px}.week-card{padding:14px 10px}.week-strip{gap:3px}.day-circle{font-size:13px}.prescription{gap:8px;padding:12px}.rep-value{font-size:18px}.rep-unit{font-size:10px}.set-controls{flex-wrap:wrap}.set-help{margin-left:0}.timer-options{align-items:start}.timer-hint{max-width:150px}}
@media(max-height:500px) and (max-width:1000px){.library-heading h2{font-size:18px}.library-destination{margin:2px 0}.library-filters{grid-template-columns:1fr 1fr}.library-filters select{font-size:14px}.library-preview-image img{height:100px}.timer{width:460px}.timer-main{flex-wrap:nowrap}.timer-hint{max-width:none}}
@media(display-mode:standalone){.install-top{display:none}.topbar{padding-top:max(10px,env(safe-area-inset-top))}}
@media print{.install-top{display:none!important}body:has(#timer:not([hidden])){padding-bottom:0}}
