.athlete-view-switch{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:16px 0 12px;font:inherit;color:var(--text-primary)}
.athlete-view-switch>span{margin-right:auto;font-size:.85rem;font-weight:700}
.athlete-view-switch button,.athlete-carousel-controls button{min-height:44px;padding:9px 13px;border:1px solid var(--border-strong,#737373);border-radius:12px;background:var(--bg-secondary,#202027);color:var(--text-primary,#fff);font:inherit;font-size:.85rem;cursor:pointer}
.athlete-view-switch button[aria-pressed=true]{border-color:var(--fz-orange,#ff6b00);box-shadow:inset 0 0 0 1px var(--fz-orange,#ff6b00);font-weight:800}
.athlete-carousel-controls{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;margin:0 0 12px;color:var(--text-primary)}
.athlete-carousel-controls[hidden],.athlete-carousel-help[hidden]{display:none}
.athlete-carousel-controls button{white-space:normal;min-width:0}.athlete-carousel-controls button:disabled{opacity:.4;cursor:default}
.athlete-carousel-controls [data-carousel-status]{font-size:.8rem;text-align:center;font-weight:700}
.athlete-exercise-list.is-carousel{position:relative;display:flex;flex-direction:row;align-items:flex-start;gap:14px;min-width:0;max-width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-width:none;padding:0 0 12px}
.athlete-exercise-list.is-carousel::-webkit-scrollbar{display:none}
.athlete-exercise-list.is-carousel>.athlete-ex-card{flex:0 0 100%;width:100%;min-width:0;max-width:100%;box-sizing:border-box;scroll-snap-align:start;scroll-snap-stop:always;margin:0}
.athlete-carousel-help{font-size:.8rem;color:var(--text-secondary);line-height:1.5;margin:0 0 18px}
.athlete-view-switch button:focus-visible,.athlete-carousel-controls button:focus-visible,.athlete-exercise-list.is-carousel:focus-visible{outline:3px solid var(--fz-orange,#ff6b00);outline-offset:3px}
@media(max-width:400px){.athlete-carousel-controls{grid-template-columns:1fr 1fr}.athlete-carousel-controls [data-carousel-status]{grid-column:1/-1;grid-row:1}.athlete-view-switch>span{width:100%;margin:0}.athlete-view-switch button{flex:1}}
@media print{.athlete-view-switch,.athlete-carousel-controls,.athlete-carousel-help{display:none!important}.athlete-exercise-list.is-carousel{display:block;overflow:visible}.athlete-exercise-list.is-carousel>.athlete-ex-card{width:100%}}

/* Carosello a tutta pagina: la scheda resta sotto le finestre di serie, note e timer. */
#athlete-page-scheda.carousel-fullscreen{animation:none;transform:none}
html:has(#athlete-page-scheda.carousel-fullscreen:not([style*="none"])),body:has(#athlete-page-scheda.carousel-fullscreen:not([style*="none"])){overflow:hidden}
.carousel-fullscreen .athlete-day-content{position:fixed;inset:0;z-index:1500;height:100vh;height:100dvh;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:var(--bg-primary,#09090c);color:var(--text-primary,#fff);overflow:hidden}
.carousel-fullscreen .athlete-day-header{margin:0;flex-shrink:0}
.carousel-fullscreen .athlete-day-title{font-size:1rem;line-height:1.25}
.carousel-fullscreen .athlete-day-title br,.carousel-fullscreen .athlete-day-subtitle{display:none}
.carousel-fullscreen .athlete-session-progress-wrap,.carousel-fullscreen .athlete-session-sub-stats,.carousel-fullscreen .athlete-carousel-help,.carousel-fullscreen .athlete-day-content>.athlete-weeks-section{display:none}
.carousel-fullscreen .athlete-view-switch{margin:0;flex-shrink:0;flex-wrap:nowrap}
.carousel-fullscreen .athlete-view-switch>span{width:auto;font-size:.78rem}
.carousel-fullscreen .athlete-view-switch button{flex:0 1 auto;min-height:40px;padding:6px 14px}
.carousel-fullscreen .athlete-carousel-controls{margin:0;flex-shrink:0;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.carousel-fullscreen .athlete-carousel-controls [data-carousel-status]{grid-column:auto;grid-row:auto}
.carousel-fullscreen .athlete-carousel-controls button{padding:7px;min-height:44px;font-size:.78rem}
.carousel-fullscreen .athlete-exercise-list.is-carousel{flex:1;min-height:0;height:auto!important;padding:0;gap:12px}
.carousel-fullscreen .athlete-exercise-list.is-carousel>.athlete-ex-card{height:100%;overflow-y:auto;overscroll-behavior-y:contain;padding:16px;display:flex;flex-direction:column;scrollbar-width:thin;border-radius:18px}
.carousel-fullscreen .athlete-ex-top{flex-shrink:0;gap:8px;margin-bottom:12px}
.carousel-fullscreen .athlete-ex-name{font-size:1.08rem;line-height:1.3}
.carousel-fullscreen .athlete-ex-middle-row{display:flex;flex-direction:column;align-items:stretch;gap:14px;flex-shrink:0}
.carousel-fullscreen .athlete-ex-middle-left{flex:none}
.carousel-fullscreen .athlete-ex-thumb-wrap{order:-1;width:100%;min-width:0;height:clamp(220px,36dvh,440px);min-height:220px;box-sizing:border-box;flex-shrink:0;background:#fff;box-shadow:none}
.carousel-fullscreen .athlete-ex-thumb-wrap:hover,.carousel-fullscreen .athlete-ex-thumb-wrap:active{transform:none}
.carousel-fullscreen .athlete-ex-thumb-img{width:100%;height:100%;object-fit:contain}
.carousel-fullscreen .athlete-sets-tracker,.carousel-fullscreen .athlete-completed-container,.carousel-fullscreen .athlete-cardio-actions{margin-top:auto;flex-shrink:0}
.carousel-fullscreen .athlete-day-content>.athlete-exercise-list~*:not(.athlete-carousel-help){display:none}
@media(min-width:800px){.carousel-fullscreen .athlete-day-content{padding-left:max(24px,calc((100vw - 1100px)/2));padding-right:max(24px,calc((100vw - 1100px)/2))}.carousel-fullscreen .athlete-ex-thumb-wrap{height:clamp(280px,44dvh,500px)}}
/* Gerarchia visiva del player, senza cambiare comandi o dati. */
.carousel-fullscreen .athlete-day-content{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto minmax(0,1fr);gap:12px;padding-top:max(14px,env(safe-area-inset-top));background:var(--bg-primary,#09090c)}
.carousel-fullscreen .athlete-day-header{align-self:center;min-width:0}
.carousel-fullscreen .athlete-day-title{font-size:.8rem;letter-spacing:.07em;font-weight:800;color:var(--text-secondary,#b6b6c0)}
.carousel-fullscreen .athlete-view-switch{gap:3px;padding:3px;border:1px solid var(--border-subtle,#303038);border-radius:14px;background:var(--bg-secondary,#17171d)}
.carousel-fullscreen .athlete-view-switch>span{display:none}
.carousel-fullscreen .athlete-view-switch button{border:0;border-radius:10px;background:transparent;min-height:38px;padding:7px 12px;font-size:.78rem;box-shadow:none}
.carousel-fullscreen .athlete-view-switch button[aria-pressed=true]{background:var(--fz-orange,#ff6b00);color:#111;font-weight:850;box-shadow:0 2px 8px #0002}
.carousel-fullscreen .athlete-carousel-controls{grid-column:1/-1;gap:12px}
.carousel-fullscreen .athlete-carousel-controls button{border-color:var(--border-subtle,#34343c);background:var(--bg-secondary,#17171d);border-radius:12px;font-weight:650}
.carousel-fullscreen .athlete-carousel-controls [data-carousel-status]{font-size:.75rem;color:var(--text-secondary,#b6b6c0);font-variant-numeric:tabular-nums}
.carousel-fullscreen .athlete-exercise-list.is-carousel{grid-column:1/-1;width:100%;align-self:stretch}
.carousel-fullscreen .athlete-exercise-list.is-carousel>.athlete-ex-card{padding:18px;border:1px solid var(--border-subtle,#303038);border-radius:22px;background:var(--bg-secondary,#141419);box-shadow:0 8px 28px #0002}
.carousel-fullscreen .athlete-ex-top{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:14px}
.carousel-fullscreen .athlete-ex-title-row{flex:1 1 210px;align-items:center;gap:10px;min-width:0}
.carousel-fullscreen .athlete-ex-index{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:10px;font-size:.95rem;font-style:normal;line-height:1;background:rgba(var(--fz-orange-rgb,255,107,0),.12)!important;color:var(--fz-orange,#ff6b00);transform:none;text-shadow:none;margin:0}
.carousel-fullscreen .athlete-ex-name{font-size:1rem;line-height:1.4;letter-spacing:.01em}
.carousel-fullscreen .athlete-ex-actions{margin-left:auto;gap:6px}
.carousel-fullscreen .athlete-ex-actions button{min-height:44px;min-width:44px;padding:6px 12px;border:1px solid var(--border-subtle,#34343c);border-radius:9px;background:var(--bg-primary,#09090c);color:var(--text-primary,#fff);font-family:inherit;font-size:.75rem;font-weight:650;font-style:normal;transform:none;text-shadow:none}
.carousel-fullscreen .athlete-ex-actions button.has-note,.carousel-fullscreen .athlete-ex-actions button.has-coach-reply{color:var(--fz-orange,#ff6b00);border-color:var(--fz-orange,#ff6b00)}
.carousel-fullscreen .athlete-ex-middle-row{gap:16px}
.carousel-fullscreen .athlete-ex-thumb-wrap{height:clamp(220px,34dvh,420px);border-radius:16px;border:1px solid #e5e5e7;overflow:hidden}
.carousel-fullscreen .athlete-ex-details{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.carousel-fullscreen .athlete-detail-item{padding:10px 12px;border-radius:12px;background:var(--bg-primary,#09090c);border:1px solid var(--border-subtle,#303038);align-items:flex-start}
.carousel-fullscreen .athlete-detail-label{font-size:.65rem;letter-spacing:.09em;color:var(--text-secondary,#b6b6c0)}
.carousel-fullscreen .athlete-detail-val{font-size:1.05rem}
.carousel-fullscreen .athlete-rest-pill{margin-top:3px}
.carousel-fullscreen .athlete-benchmark-banner{margin-top:10px;padding:10px 12px;border-radius:12px;font-size:.75rem}
.carousel-fullscreen .athlete-sets-tracker,.carousel-fullscreen .athlete-completed-container{border-top:1px solid var(--border-subtle,#303038);padding-top:14px}
.carousel-fullscreen .athlete-sets-label{font-size:.67rem;letter-spacing:.09em;color:var(--text-secondary,#b6b6c0)}
.carousel-fullscreen .athlete-sets-grid,.carousel-fullscreen .athlete-completed-grid{gap:8px}
.carousel-fullscreen .athlete-set-btn{border-radius:13px;min-height:56px}
@media(min-width:800px){.carousel-fullscreen .athlete-ex-top{flex-wrap:nowrap}.carousel-fullscreen .athlete-ex-middle-row{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:center;gap:28px}.carousel-fullscreen .athlete-ex-thumb-wrap{order:0;grid-column:1;grid-row:1;height:clamp(280px,48dvh,540px)}.carousel-fullscreen .athlete-ex-middle-left{grid-column:2;grid-row:1}.carousel-fullscreen .athlete-ex-name{font-size:1.25rem}}
@media print{.carousel-fullscreen .athlete-day-content{position:static;height:auto;display:block;overflow:visible}.carousel-fullscreen .athlete-exercise-list.is-carousel>.athlete-ex-card{height:auto;overflow:visible;display:block}.carousel-fullscreen .athlete-view-switch,.carousel-fullscreen .athlete-carousel-controls{display:none}.carousel-fullscreen .athlete-exercise-list.is-carousel{display:block}}
/* Keep the client sections reachable while the workout uses its full-screen layout. */
body:has(#athlete-page-scheda.carousel-fullscreen:not([style*="none"])) #athlete-bottom-nav{
  z-index:1600;
  transform:translateX(-50%) scale(1);
  bottom:calc(16px + env(safe-area-inset-bottom,0px));
  opacity:1;
  height:55px;
  padding:5px 8px;
}
.carousel-fullscreen .athlete-day-content{
  bottom:calc(87px + env(safe-area-inset-bottom,0px));
  height:calc(100vh - 87px - env(safe-area-inset-bottom,0px));
  height:calc(100dvh - 87px - env(safe-area-inset-bottom,0px));
  padding-bottom:10px;
}
@media print{.carousel-fullscreen .athlete-day-content{bottom:auto;height:auto}#athlete-bottom-nav{display:none!important}}
/* Complete app-page selector: the same four destinations, with equal weight. */
#athlete-bottom-nav{width:min(420px,calc(100vw - 24px));max-width:calc(100vw - 24px);height:64px;gap:4px;padding:5px 7px}
#athlete-bottom-nav .abn-item{flex:1 1 0;min-width:0;height:52px;padding:3px 4px}
#athlete-bottom-nav .abn-icon-wrap{flex-direction:column;gap:4px}
#athlete-bottom-nav .abn-icon{width:22px;height:22px}
#athlete-bottom-nav .abn-label{display:block;font-size:10.5px;font-weight:650;line-height:1.2;letter-spacing:0;white-space:nowrap}
#athlete-bottom-nav.nav-scrolled-down{transform:translateX(-50%) scale(1);bottom:calc(16px + env(safe-area-inset-bottom,0px));opacity:1}
body:has(#athlete-page-scheda.carousel-fullscreen:not([style*="none"])) #athlete-bottom-nav{height:64px;padding:5px 7px}
.carousel-fullscreen .athlete-day-content{bottom:calc(96px + env(safe-area-inset-bottom,0px));height:calc(100vh - 96px - env(safe-area-inset-bottom,0px));height:calc(100dvh - 96px - env(safe-area-inset-bottom,0px))}
@media print{.carousel-fullscreen .athlete-day-content{bottom:auto;height:auto}}

/* The trainer preview banner must never cover carousel controls. */
body.coach-preview-active .carousel-fullscreen .athlete-day-content{
  top:var(--coach-preview-height,110px);
  height:auto;
  padding-top:16px;
}
@media print{body.coach-preview-active .carousel-fullscreen .athlete-day-content{top:auto;height:auto}}

@media screen{
 .carousel-fullscreen .athlete-day-content{padding-top:calc(env(safe-area-inset-top, 0px) + 14px)}
 body.coach-preview-active #coach-preview-banner{padding-top:calc(env(safe-area-inset-top, 0px) + 10px)!important}
 body.coach-preview-active .carousel-fullscreen .athlete-day-content{padding-top:16px}
}
