.phone-live-dialog{width:min(1200px,97vw);max-height:97dvh;padding:22px;background:#101c16;color:#e4ebdf;border:1px solid #394c3a;border-radius:24px;overflow:auto}.phone-live-dialog::backdrop{background:#030a08e8}.phone-live-header,.phone-live-actions,.phone-chart-nav{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}.phone-live-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,1fr);gap:20px;margin:18px 0}.phone-video-box{background:#07110c;border-radius:20px;overflow:hidden;position:relative;min-height:260px;display:grid;place-items:center}.phone-video-box img,.phone-video-box video,.phone-video-box canvas{width:100%;max-height:65dvh;object-fit:contain}.phone-source{position:fixed;width:2px;height:2px;opacity:.001;pointer-events:none;left:0;top:0}.phone-live-info{background:#17271d;border:1px solid #344637;padding:18px;border-radius:20px}.phone-live-info canvas{display:block;width:100%;height:240px}.phone-live-note{color:#a8b9a7;font-size:.9rem;line-height:1.5}.phone-live-status{font-weight:650;min-height:2.7em}.phone-pending{border:1px solid #99bb65;background:#24361b;color:#d7f0bc;border-radius:14px;padding:12px 18px;margin:8px}.phone-warning{color:#f1cb81}.phone-primary-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.phone-primary-actions button{flex:1;min-height:48px}.phone-live-small{font-size:.85rem}.phone-live-guide{max-width:min(100%,420px);max-height:280px}.phone-live-metric{font-size:1.7rem;font-variant-numeric:tabular-nums}.phone-backup-error{padding:12px;border:1px solid #db936f;border-radius:12px;color:#f4b99b}.phone-pending-row{border-bottom:1px solid #40513f;padding:15px 0}.phone-pending-row button{margin-right:8px}@media(max-width:760px){.phone-live-dialog{padding:14px;width:100vw;max-height:100dvh;border-radius:0}.phone-live-grid{grid-template-columns:1fr}.phone-video-box img,.phone-video-box video,.phone-video-box canvas{max-height:57dvh}.phone-live-info canvas{height:185px}.phone-live-header h2{font-size:1.25rem}}

.phone-remote #openCamera,.phone-remote .camera-guide-controls button,.phone-remote .camera-footer,.phone-remote #liveSensors,.phone-remote .session-options,.phone-remote #phaseTitle,.phone-remote #phaseHelp,.phone-remote #stabilityProgress,.phone-remote .steps{display:none!important}

.phone-remote #body360Tool video,.phone-remote #body360Tool a[href*=".mp4"]{display:none!important}

.phone-remote a[href*=".mp4"],.phone-remote a[href$="bundle.zip"],.phone-remote .mobile-capture-action,.phone-remote #importVideo{display:none!important}

.phone-primary-actions{position:sticky;bottom:0;z-index:5;background:#101c16;padding:12px 0;border-top:1px solid #344637}

.phone-perspective-check{display:flex;align-items:flex-start;gap:10px;color:#d6e3cb;font-size:.9rem;margin:0 0 16px}.phone-perspective-check input{width:20px!important;height:20px!important;min-height:20px;flex:none;padding:0;margin:0;accent-color:#c5f567}

/* v014: one clear action per stage, readable within the phone's safe area. */
.phone-live-dialog{box-sizing:border-box;padding:clamp(14px,2vw,24px);max-width:1200px;overscroll-behavior:contain;scrollbar-gutter:stable}
.phone-live-dialog [hidden]{display:none!important}
.phone-live-header{gap:8px;align-items:center}
.phone-live-header h2{flex:1 1 55%;margin:0;font-size:clamp(1.05rem,2.2vw,1.5rem);line-height:1.3;overflow-wrap:anywhere}
.phone-brand{color:#c5f567;font-weight:750;letter-spacing:-.04em;font-size:1.1rem}
.phone-live-header>button{min-height:44px}
.phone-steps{display:flex;list-style:none;padding:0;gap:8px;margin:18px 0 8px;font-size:.84rem;color:#9caf9c}
.phone-steps li{flex:1;border-bottom:3px solid #304437;padding-bottom:9px}
.phone-steps .current{border-color:#c5f567;color:#d6f5ad;font-weight:700}
.phone-guide{text-align:center;padding:26px 16px}.phone-guide p{margin:8px 0}
.phone-video-box{min-width:0;min-height:210px;align-self:start}
.phone-video-box .phone-video-badge{position:absolute;left:12px;top:12px;padding:6px 10px;border-radius:8px;background:#10271fe6;color:#d7f2ca;font-size:.72rem;letter-spacing:.03em;pointer-events:none}
.phone-video-badge.warning{background:#3e2f19ed;color:#f3d294}
.phone-video-box .phone-source{width:2px;max-height:2px;height:2px;position:fixed;opacity:.001;left:0;top:0}
.phone-live-status{margin:0 0 8px;min-height:2.7em;font-size:1.03rem;line-height:1.45}
.phone-live-info{min-width:0}.phone-live-info>canvas{height:190px}
.phone-chart-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px}
.phone-chart-nav>span{text-align:center;font-size:.9rem;font-weight:600;line-height:1.3}
.phone-chart-nav button{min-width:44px;min-height:44px;padding:6px}
.phone-live-metric{font-size:clamp(1.15rem,4.8vw,1.7rem);margin:12px 0 4px;overflow-wrap:anywhere;line-height:1.4}
.phone-chart-legend{display:flex;gap:18px;margin:0 0 8px;font-size:.78rem}.phone-left{color:#6ee8c5}.phone-right{color:#c9a6ee}
.phone-chart-help{font-size:.84rem;color:#a8b9a7;margin-top:8px}.phone-chart-help summary{padding:10px 0;cursor:pointer}.phone-chart-help p{line-height:1.5}
.phone-primary-actions{padding-bottom:max(12px,env(safe-area-inset-bottom));align-items:center}
.phone-primary-actions button{flex:1 1 180px}.phone-primary-actions .text-button{flex-basis:auto;font-size:.85rem;color:#b7c7b2;background:transparent;border-color:transparent}
.phone-live-actions{justify-content:flex-start}.phone-live-actions button{min-height:44px;font-size:.85rem}.phone-live-actions button[aria-pressed="true"]{border-color:#698944}
.phone-perspective-check{padding:12px;border:1px solid #3b543f;border-radius:12px;line-height:1.4;margin:14px 0}
.phone-perspective-check:has(input:checked){background:#24351d;border-color:#719340}
.phone-pending-row h3{font-size:1rem;line-height:1.35;overflow-wrap:anywhere}.phone-pending-row p{font-size:.9rem;line-height:1.45}.phone-pending-row button{min-height:44px;margin-top:8px}
@media(max-width:760px){
 .phone-live-dialog{width:100%;max-width:100%;max-height:100dvh;margin:0;padding:14px 14px 0;min-height:100dvh;border:0;border-radius:0}
 .phone-live-header{position:sticky;top:-14px;background:#101c16;z-index:8;padding:12px 0;border-bottom:1px solid #344637}
 .phone-brand{flex:1 1 calc(100% - 90px)}.phone-live-header h2{order:3;flex-basis:100%;font-size:1.05rem}
 .phone-steps{margin-top:12px}.phone-live-grid{gap:12px;margin:12px 0}.phone-live-info{padding:14px}
 .phone-video-box img,.phone-video-box video,.phone-video-box canvas{max-height:48dvh}.phone-live-info>canvas{height:150px}
 .phone-live-note{font-size:.8rem}.phone-primary-actions{gap:8px}.phone-primary-actions button{flex-basis:140px}
 .phone-primary-actions .text-button{flex:1 1 100%;order:3;min-height:36px}.phone-live-actions{padding-bottom:20px}
 .bio-nav .phone-pending{position:fixed;right:12px;bottom:max(12px,env(safe-area-inset-bottom));z-index:30;max-width:calc(100vw - 24px);margin:0;font-size:.82rem;box-shadow:0 6px 24px #0007}
}
@media(prefers-reduced-motion:reduce){.phone-live-dialog *{scroll-behavior:auto!important}}
@media(max-width:760px){
 .phone-live-header{display:grid;grid-template-columns:minmax(0,1fr) auto}
 .phone-live-header .phone-brand{grid-column:1;grid-row:1}
 .phone-live-header>button{grid-column:2;grid-row:1;margin:0;width:auto}
 .phone-live-header h2{grid-column:1/-1;grid-row:2}
}

.phone-live-info .phone-chart-dial{float:right;width:150px;height:100px;margin-top:-68px;max-width:40%}
.phone-live-info:has(.phone-chart-dial:not([hidden])) .phone-live-metric{max-width:58%;min-height:64px}
.phone-chart-legend{clear:both}

/* v015 — the capture workspace uses the viewport, not a scaled desktop page.
   Header/status/actions stay visible; only the selected work panel scrolls. */
.phone-capture-workspace[open]{
 display:flex;flex-direction:column;gap:8px;box-sizing:border-box;
 width:100%;max-width:none;height:100dvh;min-height:0;max-height:100dvh;
 margin:0;border:0;border-radius:0;overflow:hidden;scrollbar-gutter:auto;
 padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
}
.phone-capture-workspace .phone-live-header{position:static;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 8px;flex:none;padding:0 0 6px;border-bottom:1px solid #344637;min-width:0}
.phone-capture-workspace .phone-brand{grid-column:1;grid-row:1;font-size:1rem}
.phone-capture-workspace .phone-live-header h2{grid-column:1;grid-row:2;font-size:1rem;line-height:1.25;min-width:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}
.phone-capture-workspace .phone-live-header>button{grid-column:2;grid-row:1 / 3;min-width:64px;min-height:44px;width:auto;padding:8px 12px;font-size:.85rem}
.phone-capture-workspace .phone-steps{flex:none;margin:0;font-size:.72rem;gap:10px;line-height:1.2}
.phone-capture-workspace .phone-steps li{padding-bottom:5px;border-bottom-width:2px}
.phone-session-status{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:6px 10px;flex:none;max-height:110px;overflow:auto}
.phone-recording-state{font-size:.64rem;font-weight:750;letter-spacing:.025em;border:1px solid #50664d;border-radius:7px;padding:5px 7px;line-height:1.2;white-space:nowrap;align-self:start}
[data-phase="recording"] .phone-recording-state{color:#d2ff9b;background:#304b1e;border-color:#7b9c4b}
[data-phase="saving"] .phone-recording-state{color:#ffe0a0;border-color:#846a37}
.phone-capture-workspace .phone-live-status{font-size:.85rem;line-height:1.35;min-height:0;margin:2px 0 0;overflow-wrap:anywhere}
.phone-urgent{grid-column:1/-1;background:#38281b;border-left:3px solid #e4b176;color:#ffe0b4;padding:8px 10px;margin:0;font-size:.78rem;line-height:1.35}
.phone-panel-tabs{display:flex;flex:none;gap:4px;padding:4px;background:#0b1510;border:1px solid #334b39;border-radius:12px}
.phone-panel-tab{flex:1;min-width:0;min-height:44px;padding:8px;font-size:.9rem;font-weight:650;color:#aebfae;border:1px solid transparent;border-radius:8px;background:transparent}
.phone-panel-tab[aria-selected="true"]{background:#29422a;border-color:#668b49;color:#d5ff9f}
.phone-panel-tab:focus-visible{outline:2px solid #c5f567;outline-offset:1px}
.phone-capture-workspace .phone-live-grid{flex:1;min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:0;overflow:hidden}
.phone-capture-workspace .phone-camera-pane{min-width:0;min-height:0;display:flex;flex-direction:column;gap:8px;overflow:auto;overscroll-behavior:contain}
.phone-capture-workspace .phone-video-box{position:relative;flex:1;min-height:140px;width:100%;height:auto;max-height:none;align-self:stretch;border-radius:14px}
.phone-capture-workspace .phone-video-box>canvas,.phone-capture-workspace .phone-video-box>video:not(.phone-source){position:absolute;inset:0;width:100%;height:100%;max-height:none;object-fit:contain}
.phone-capture-workspace .phone-video-box>.phone-source{position:fixed;width:2px;height:2px;max-height:2px;opacity:.001}
.phone-capture-workspace .phone-video-badge{max-width:calc(100% - 20px);left:10px;top:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.65rem}
.phone-capture-workspace .phone-guide{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:30px 10px 8px;overflow:auto}
.phone-capture-workspace .phone-guide .phone-live-guide{height:0;min-height:70px;flex:1;width:100%;max-width:480px;max-height:420px;object-fit:contain}
.phone-capture-workspace .phone-guide p{font-size:.78rem;line-height:1.3;margin:3px 0}
.phone-capture-workspace .phone-perspective-check{flex:none;margin:0;padding:9px 10px;font-size:.77rem;line-height:1.3;min-height:44px;align-items:center}
.phone-capture-workspace .phone-camera-options{flex:none;border:1px solid #344a38;border-radius:10px;padding:0 10px;background:#15261a}
.phone-camera-options>summary{cursor:pointer;min-height:38px;padding:10px 0;font-size:.77rem;font-weight:600;color:#bfcfb9}
.phone-capture-workspace .phone-live-actions{padding:4px 0 8px;gap:7px;display:flex;flex-wrap:wrap}
.phone-capture-workspace .phone-live-actions button{font-size:.75rem;min-height:44px;flex:1 1 110px;padding:8px}
.phone-capture-workspace .phone-camera-options .phone-live-note{font-size:.75rem;line-height:1.4;margin:4px 0 10px}
.phone-capture-workspace .phone-live-info,.phone-capture-workspace .phone-sensor-pane{min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px;border-radius:14px;align-self:stretch}
.phone-capture-workspace .phone-live-info>canvas:not(.phone-chart-dial){height:clamp(140px,30dvh,320px)}
.phone-capture-workspace .phone-chart-help{margin:0}.phone-capture-workspace .phone-chart-help p{font-size:.85rem}
.phone-capture-workspace .phone-primary-actions{position:static;flex:none;display:flex;flex-wrap:wrap;gap:7px;margin:0;padding:8px 0 0;min-height:0;border-top:1px solid #344637}
.phone-capture-workspace .phone-primary-actions button{flex:1 1 40%;width:auto;min-width:0;min-height:46px;padding:10px;font-size:.85rem;line-height:1.2}
.phone-capture-workspace .phone-primary-actions .text-button{order:3;flex:1 1 100%;min-height:36px;padding:5px 8px;font-size:.75rem}
.phone-capture-workspace.phone-wide .phone-live-grid{grid-template-columns:minmax(0,1.3fr) minmax(280px,1fr)}
.phone-capture-workspace.phone-wide[data-panel="camera"] .phone-live-grid{grid-template-columns:minmax(0,1fr)}
.phone-capture-workspace.phone-wide .phone-live-header{grid-template-columns:auto minmax(0,1fr) auto;gap:18px;align-items:center}
.phone-capture-workspace.phone-wide .phone-live-header h2{grid-column:2;grid-row:1}
.phone-capture-workspace.phone-wide .phone-live-header>button{grid-column:3;grid-row:1}
.phone-capture-workspace.phone-wide .phone-primary-actions{justify-content:flex-end}
.phone-capture-workspace.phone-wide .phone-primary-actions button{flex:0 1 250px}
.phone-capture-workspace.phone-wide .phone-primary-actions .text-button{order:0;flex:0 1 auto;margin-right:auto}
@media(max-height:480px) and (orientation:landscape){
 .phone-capture-workspace[open]{gap:5px;padding-top:max(4px,env(safe-area-inset-top));padding-bottom:max(4px,env(safe-area-inset-bottom))}
 .phone-capture-workspace .phone-steps{display:none}
 .phone-capture-workspace .phone-live-header{padding-bottom:3px}
 .phone-capture-workspace .phone-live-header h2{font-size:.85rem}
 .phone-session-status{max-height:55px}.phone-capture-workspace .phone-live-status{font-size:.75rem}
 .phone-panel-tabs{padding:2px}.phone-panel-tab{min-height:44px;padding:5px;font-size:.8rem}
 .phone-capture-workspace .phone-video-box{min-height:110px}
 .phone-capture-workspace .phone-live-info,.phone-capture-workspace .phone-sensor-pane{padding:10px}
 .phone-capture-workspace .phone-perspective-check{font-size:.7rem;min-height:38px;padding:6px}
 .phone-capture-workspace .phone-primary-actions{padding-top:5px}
 .phone-capture-workspace .phone-primary-actions button{min-height:44px;padding:7px;font-size:.78rem}
 .phone-capture-workspace .phone-live-info>canvas:not(.phone-chart-dial){height:140px}
}
@media(min-width:1500px){.phone-capture-workspace[open]{width:min(1400px,96vw);height:96dvh;max-height:96dvh;margin:auto;border:1px solid #3f5946;border-radius:20px;padding:18px}}

/* Coach navigation and forms remain readable on touch devices outside capture. */
@media(max-width:1024px){
 .main-nav{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:thin;overscroll-behavior-x:contain}
 .main-nav button{flex:none;min-height:44px;font-size:12px}
 .page,.live-layout,.live-data,.camera-card,.chart-card,.review-body,.review-media,.review-analysis{min-width:0;max-width:100%}
 .library-filters{max-width:100%;gap:10px}.library-filters>label{min-width:0;flex:1 1 140px}.library-filters input,.library-filters select{min-width:0;max-width:100%}
 dialog:not(.phone-live-dialog){max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:20px}
 input,select,textarea{font-size:16px}
 .review-viewport-actions{position:static;flex-wrap:wrap;min-height:46px;gap:6px}
 .review-viewport{display:flex;flex-direction:column;height:auto;min-height:0;overflow:visible}
 .review-viewport video{position:static;height:clamp(220px,48dvh,520px);min-height:0}
 .review-viewport canvas{height:clamp(220px,48dvh,520px)}
 .review-viewport-actions button{min-height:44px!important;flex:1 1 110px}
 .review-viewport:fullscreen video,.review-viewport:fullscreen canvas{height:calc(100dvh - 108px)}
 #phoneLiveLaunch{min-height:50px;font-size:14px}
 .live-heading #phoneLiveLaunch{width:100%;order:10}
 .phone-remote .live-heading #phoneLiveLaunch{font-size:15px}
 .phone-remote .live-layout{display:none}
 .phone-remote #livePage>.guide-details{margin-top:18px}
 .phone-remote .live-heading{padding-bottom:18px;border-bottom:1px solid #344637}
 .phone-remote #liveFullscreen{display:none}
 .phone-remote #livePage{min-height:calc(100dvh - 150px)}
 .phone-remote #livePage:after{content:'La cámara y los controles se abren en una pantalla pensada para este dispositivo. Al finalizar, revisá tus sesiones en Grabaciones.';display:block;margin:20px 0;color:#aabcad;font-size:14px;line-height:1.6;max-width:600px}
}
@media(max-width:600px){
 .bio-masthead{height:60px;padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right))}
 body{padding-top:60px}.main-nav{top:60px;padding:6px 10px;gap:3px}
 .bio-nav #mobileConnect{display:none}.bio-nav #logout{min-width:44px;min-height:44px}
 .bio-brand{font-size:17px}.bio-brand img{width:29px;height:29px}
 .main-nav button{font-size:11px;min-height:44px;padding:9px 12px}
 .page{padding-top:22px;padding-inline:14px}
 .section-heading h1{font-size:clamp(26px,7.5vw,34px);line-height:1.1}
 .section-heading p{font-size:14px;line-height:1.5}
 .section-heading{margin-bottom:20px}
 .exercise-select .exercise-copy{min-height:96px}.exercise-copy h3{font-size:16px;overflow-wrap:anywhere}
 .exercise-extras .info-button{width:40px;min-width:40px;height:40px}
 .exercise-card .favorite-button{min-width:44px;min-height:44px}
 .exercise-extras{top:5px;left:5px;right:5px}
 .chips button{min-height:44px}
 .athlete-card{min-width:0}.athlete-card b{overflow-wrap:anywhere}
 .review-controls{gap:7px}.review-controls>button{flex:1 1 40%;min-height:44px}
 .review-controls label{width:100%;justify-content:space-between}.review-controls label select{width:140px}
 .review-status{font-size:12px;gap:8px;flex-wrap:wrap}
 .recording-actions .primary,.recording-actions .secondary{flex:1 1 40%;min-height:44px}
 .pattern-card,.athlete-sheet-card,.bio-nutrition-card{padding:18px;min-width:0}
 .phone-pending{font-size:11px!important;padding:8px!important;max-width:110px!important;position:static!important;box-shadow:none!important}
}

.account-storage-status{border:1px solid #374b3c;border-radius:12px;background:#14211a;color:#b7c9b9;margin:-6px 0 22px;padding:0 14px;font-size:12px;max-width:660px}.account-storage-status>summary{cursor:pointer;min-height:44px;padding:13px 0;font-weight:600}.account-storage-status>div{border-top:1px solid #304536;padding:8px 0 12px}.account-storage-status p{margin:7px 0;line-height:1.5;font-size:12px}.account-storage-status[data-state="synced"]>summary{color:#c8f29a}.account-storage-status[data-state="error"]>summary{color:#f2c99b}.account-storage-status button{min-height:44px;padding:8px 0}.account-storage-status[hidden]{display:none!important}
.phone-entry-note{font-size:14px;line-height:1.5;color:#adbfaf;margin:0;max-width:650px;flex:1 1 100%;order:12}
#phoneServerCamera{order:11;font-size:13px;min-height:44px}
.phone-load-field{display:grid;grid-template-columns:1fr 100px;align-items:center;gap:4px 10px;font-size:.8rem;margin:4px 0 12px}
.phone-load-field input{min-width:0;max-width:100%;min-height:44px;margin:0;font-size:16px}
.phone-load-field>span{grid-column:1/-1}
@media(max-width:1024px){
 .mobile-coach:not(.mobile-server-camera) .live-layout{display:none}
 .mobile-coach:not(.mobile-server-camera) #liveFullscreen,.mobile-coach #livePage>.live-heading>.mobile-capture-action,.mobile-coach #modeBadge{display:none!important}
 .mobile-coach .live-heading{padding-bottom:18px;border-bottom:1px solid #344637}
 .mobile-coach .live-heading #phoneServerCamera{width:100%;text-align:center}
 .phone-remote #livePage:after{content:none}
 .phone-remote .live-heading #phoneLiveLaunch{width:100%}
}

@media(max-width:600px){.bio-nav:has(.phone-pending:not([hidden])) #bioBack{display:none}.bio-nav .phone-pending{max-width:100px!important}}
