:root {
  --bg: #0c0c0e;
  --card: #18181c;
  --card-2: #222228;
  --line: #2e2e36;
  --text: #f4f4f5;
  --muted: #9a9aa3;
  --accent: #ff7a00;
  --accent-ink: #1a0c00;
  --rest: #3aa0ff;
  --soon: #35d07f;
  --ok: #3ccf7a;
  --radius: 18px;
  font-family: 'Montserrat', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 96px; }
.h1 { font-weight: 900; font-size: 34px; line-height: 1.02; text-transform: uppercase; letter-spacing: -0.5px; margin: 8px 0 6px; }
.h1 em { font-style: normal; color: var(--accent); }
.h2 { font-weight: 900; font-size: 20px; text-transform: uppercase; margin: 24px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pill { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; padding: 5px 10px; border-radius: 99px; background: var(--card-2); color: var(--muted); }
.pill.accent { background: rgba(255, 122, 0, .15); color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; background: var(--card-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .4; }

/* lista programmi */
.prog { position: relative; display: block; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: var(--card); margin-bottom: 14px; }
.prog .cover { aspect-ratio: 16/9; background: linear-gradient(135deg, #2a1608, #0c0c0e); background-size: cover; background-position: center; }
.prog .body { padding: 14px 16px 16px; }
.prog .title { font-weight: 900; font-size: 20px; text-transform: uppercase; margin: 8px 0 4px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* lista allenamenti */
.wo { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--card); border-radius: 14px; margin-bottom: 10px; text-decoration: none; }
.wo .num { width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--card-2); display: grid; place-items: center; font-weight: 900; }
.wo.done .num { background: rgba(60, 207, 122, .15); color: var(--ok); }
.wo .t { font-weight: 800; }
.wo .go { margin-left: auto; color: var(--accent); font-weight: 900; }

.blocklist { background: var(--card); border-radius: var(--radius); padding: 6px 16px; }
.blocklist .ph { font-size: 11px; font-weight: 800; letter-spacing: .8px; color: var(--accent); text-transform: uppercase; margin-top: 14px; }
.blocklist .bl { padding: 10px 0; border-bottom: 1px solid var(--line); }
.blocklist .bl:last-child { border: 0; }
.blocklist .ex { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 14px; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--card-2); flex: none; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 6px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(12, 12, 14, .92); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.tabbar a { flex: 1; max-width: 200px; text-align: center; text-decoration: none; font-weight: 800; font-size: 13px; padding: 10px; border-radius: 12px; color: var(--muted); }
.tabbar a.on { color: var(--text); background: var(--card-2); }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; font-weight: 700; padding: 6px 0; }

/* player */
.player { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); max-width: 560px; margin: 0 auto; }
.p-top { display: flex; align-items: center; gap: 10px; padding: 12px 16px 6px; }
.p-top .ttl { flex: 1; text-align: center; font-weight: 900; text-transform: uppercase; font-size: 15px; line-height: 1.15; }
.p-top .ttl small { display: block; color: var(--accent); font-size: 11px; letter-spacing: .8px; }
.icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card); font-size: 18px; }
.icon.on { color: var(--accent); }
.p-scroll { flex: 1; overflow-y: auto; padding: 4px 16px 12px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { background: var(--card); border-radius: 16px; padding: 12px; text-align: center; }
.tile .big { font-weight: 900; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .lbl { font-size: 11px; font-weight: 800; letter-spacing: .6px; color: var(--muted); margin-top: 6px; text-transform: uppercase; }
.tile.rest .big { color: var(--rest); }
.tile.ready .big { color: var(--accent); }
.tile .plus { margin-top: 8px; width: 100%; padding: 8px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 900; }
.bar { display: flex; gap: 4px; margin: 12px 0; }
.bar i { flex: 1; height: 5px; border-radius: 3px; background: var(--card-2); }
.bar i.done { background: var(--accent); }
.bar i.cur { background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--card-2) var(--p, 0%)); }
.now { background: var(--card); border-radius: 16px; padding: 14px 16px; }
.now .lab { font-size: 11px; font-weight: 800; letter-spacing: .8px; color: var(--accent); text-transform: uppercase; }
.now.rest .lab { color: var(--rest); }
.now .reps { font-weight: 900; font-size: 30px; text-transform: uppercase; line-height: 1.05; margin-top: 4px; }
.now .name { font-weight: 800; font-size: 18px; text-transform: uppercase; margin-top: 2px; }
.now .note { color: var(--muted); font-size: 13px; margin-top: 6px; }
.subs { display: flex; gap: 8px; margin-top: 10px; }
.subs button { flex: 1; padding: 9px 6px; border-radius: 10px; background: var(--card-2); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.subs button.on { background: rgba(255, 122, 0, .18); color: var(--accent); }
.circuit { margin-top: 10px; display: grid; gap: 6px; }
.circuit button { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 12px; background: var(--card-2); }
.circuit button.sel { outline: 2px solid var(--accent); }
.circuit b { font-weight: 900; min-width: 52px; }
.video { position: relative; margin-top: 12px; border-radius: 16px; overflow: hidden; background: #000; height: 52dvh; min-height: 300px; width: 100%; margin-inline: auto; }
/* contain: il video si vede sempre intero, niente tagli sopra o sotto */
.video video, .video img { width: 100%; height: 100%; object-fit: contain; display: block; }
.video .novid { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 800; text-transform: uppercase; font-size: 13px; text-align: center; padding: 20px; }
.next { display: flex; gap: 12px; align-items: center; margin-top: 12px; background: var(--card); border-radius: 14px; padding: 10px; }
.next video, .next .ph { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--card-2); flex: none; }
.next .k { font-size: 11px; font-weight: 800; color: var(--accent); letter-spacing: .6px; }
.next .v { font-weight: 800; font-size: 14px; text-transform: uppercase; }
.p-ctrl { display: flex; gap: 10px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.p-ctrl .btn { flex: 1; }
.p-ctrl .sq { flex: 0 0 56px; padding: 0; }
.finish { text-align: center; padding: 40px 16px; }
.finish .big { font-size: 64px; font-weight: 900; color: var(--accent); }
.stat { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* ---- shell membri ---- */
.brand { font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.row.between { justify-content: space-between; }
.lab { font-size: 11px; font-weight: 800; letter-spacing: .8px; color: var(--accent); text-transform: uppercase; }
.pill.ok { background: rgba(60, 207, 122, .15); color: var(--ok); }
.sbtn { padding: 8px 12px; border-radius: 10px; background: var(--card-2); font-weight: 800; font-size: 13px; text-decoration: none; display: inline-block; }
.sbtn.ghost { background: transparent; color: var(--muted); }
.lbl2 { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.tabbar { gap: 2px; padding-left: 6px; padding-right: 6px; }
.tabbar a { display: grid; gap: 2px; font-size: 10.5px; padding: 6px 2px; }
.tabbar a span { font-size: 16px; line-height: 1; }
.tabbar a.on { color: var(--accent); background: transparent; }
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--ok); color: #04210f; font-weight: 800; padding: 10px 18px; border-radius: 12px; z-index: 9; }
.toast.err { background: #ff6b6b; color: #2a0000; }

.auth { padding-top: 12vh; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.wrap input:not([type=checkbox]):not([type=file]), .wrap select { width: 100%; min-width: 0; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; outline: none; text-transform: none; letter-spacing: 0; font-weight: 600; }
.wrap input:focus, .wrap select:focus { border-color: var(--accent); }
.form .row > * { flex: 1; }
.form .row > .av { flex: none; }

/* settimana */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0 10px; text-align: center; }
.day, .day.plan { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; border-radius: 0; background: none; position: static; }
.day span { font-size: 11px; font-weight: 800; color: var(--muted); }
.day b { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; background: var(--card-2); }
.day u { width: 5px; height: 5px; border-radius: 50%; }
.day.plan b { box-shadow: inset 0 0 0 2px var(--accent); }
.day.plan u { background: var(--accent); }
.day.miss b { box-shadow: inset 0 0 0 2px #e5484d; color: #e5484d; }
.day.done b { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.day.today span { color: var(--text); }
.day.today b { outline: 2px solid var(--text); outline-offset: 2px; }
.next-wo .t { font-weight: 900; font-size: 22px; text-transform: uppercase; margin: 4px 0 2px; }

/* challenge */
.meter { height: 10px; border-radius: 6px; background: var(--card-2); overflow: hidden; margin: 8px 0 12px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s; }
.chval { margin-top: 12px; }
.chval b { font-size: 30px; font-weight: 900; }
.dots { display: flex; gap: 6px; margin-top: 12px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--card-2); }
.dots i.ok { background: var(--accent); }
.dots i.part { background: rgba(255, 122, 0, .4); }
.tip img { width: 100%; border-radius: 12px; margin-bottom: 10px; }
.tip b { display: block; margin-bottom: 4px; }

/* progressi */
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stats3 div { background: var(--card); border-radius: 14px; padding: 14px 8px; text-align: center; }
.stats3 b { display: block; font-size: 26px; font-weight: 900; }
.stats3 span { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.chart { width: 100%; height: auto; display: block; }
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ba figure { margin: 0; }
.ba img, .pgrid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; display: block; background: var(--card-2); }
.ba figcaption { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.pgrid div { position: relative; }
.pgrid span { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .6); padding: 2px 6px; border-radius: 6px; }
.pgrid .x { position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0, 0, 0, .6); font-size: 12px; }

/* cibo */
.daynav { margin: 4px 0 12px; }
.daynav b { text-transform: capitalize; }
.kcal b { font-size: 40px; font-weight: 900; }
.kcal span { color: var(--muted); font-weight: 700; margin-left: 6px; }
.food { display: flex; justify-content: space-between; align-items: center; background: var(--card); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }

/* profilo */
.daypick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.daypick label { display: block; }
.daypick input { position: absolute; opacity: 0; pointer-events: none; }
.daypick span { display: block; text-align: center; padding: 10px 0; border-radius: 10px; background: var(--card-2); font-weight: 800; font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.daypick input:checked + span { background: var(--accent); color: var(--accent-ink); }

/* player: giro guidato */
.repline { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.repnow { font-weight: 900; font-size: 64px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; display: inline-block; }
.repnow.pulse { animation: pulse .35s ease-out; }
@keyframes pulse { 0% { transform: scale(1.25); color: var(--accent); } 100% { transform: scale(1); } }
.reptot { font-weight: 800; color: var(--muted); font-size: 18px; text-transform: uppercase; }
.gbar { height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; margin-top: 10px; }
.gbar i { display: block; height: 100%; width: 0; background: var(--accent); }
.circuit button.past { opacity: .5; }
.tabbar a span { display: flex; justify-content: center; }
.p-ctrl .btn { white-space: nowrap; padding: 0 14px; }
.row.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-items: end; }
.row.four label { font-size: 11px; }
.meter.thin { height: 7px; margin: 5px 0 10px; }
.mac .small span:first-child { color: var(--muted); font-weight: 700; }
.macpct { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; text-align: center; }
.macpct span { background: var(--card-2); border-radius: 12px; padding: 10px 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.macpct b { display: block; font-size: 24px; color: var(--text); }
.note-coach { margin-top: 10px; padding: 12px; border-left: 3px solid var(--accent); background: var(--card-2); border-radius: 8px; font-size: 14px; }
.sbtn.on { background: rgba(255, 122, 0, .18); color: var(--accent); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video.wide { aspect-ratio: 16/9; height: auto; min-height: 0; }
.tip .tvid { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; margin-bottom: 10px; background: #000; }
.tip .tvid iframe { width: 100%; height: 100%; border: 0; }

/* ---- community e tutorial ---- */
.av { border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; background: var(--card-2); color: var(--accent); font-weight: 900; }
.meav { display: inline-flex; text-decoration: none; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-style: normal; font-weight: 900; }
.badge[hidden] { display: none; }
.tabbar .badge { position: absolute; top: 2px; left: calc(50% + 4px); }
.tabbar a { position: relative; }
.seg { display: flex; gap: 4px; background: var(--card); padding: 4px; border-radius: 14px; margin: 10px 0 16px; }
.seg a { flex: 1; text-align: center; padding: 10px 4px; border-radius: 10px; text-decoration: none; font-weight: 800; font-size: 13px; color: var(--muted); }
.seg a.on { background: var(--card-2); color: var(--text); }
.chips { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 4px; }
.chips a { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--card); text-decoration: none; font-weight: 800; font-size: 13px; color: var(--muted); }
.chips a.on { background: var(--accent); color: var(--accent-ink); }
.tut { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 14px; padding: 12px; margin-bottom: 10px; text-decoration: none; }
.tut .play { width: 64px; height: 48px; border-radius: 10px; background: rgba(255, 122, 0, .15); color: var(--accent); display: grid; place-items: center; font-size: 18px; flex: none; }
.tut .t { font-weight: 800; }
.tutbtn { margin-top: 10px; width: 100%; padding: 10px; border-radius: 10px; background: rgba(255, 122, 0, .12); color: var(--accent); font-weight: 800; font-size: 13px; text-transform: uppercase; }
.tutmodal { position: absolute; inset: 0; background: rgba(12, 12, 14, .97); z-index: 5; padding: 16px; overflow-y: auto; }
.tm-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.room { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ell2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mcard { display: grid; justify-items: center; gap: 6px; text-align: center; background: var(--card); border-radius: 16px; padding: 16px 10px; text-decoration: none; }
.profile-head { text-align: center; padding: 10px 0 18px; display: grid; justify-items: center; }
.rules { background: var(--card-2); border-radius: 12px; padding: 12px; }
.chk2 { display: flex !important; gap: 10px; align-items: flex-start; text-transform: none !important; letter-spacing: 0 !important; font-size: 13px !important; color: var(--text) !important; font-weight: 600 !important; }
.chk2 input { margin-top: 3px; }
.form textarea, .chat textarea { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; resize: none; outline: none; font-family: inherit; }
.chat { position: fixed; inset: env(safe-area-inset-top) 0 calc(64px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.chat-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.msgs { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 85%; }
.msg.mine { align-self: flex-end; }
.bub { background: var(--card); border-radius: 16px 16px 16px 4px; padding: 8px 12px; min-width: 0; }
.msg.mine .bub { background: var(--accent); color: var(--accent-ink); border-radius: 16px 16px 4px 16px; }
.who { display: block; font-size: 12px; color: var(--accent); margin-bottom: 2px; }
.txt { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; font-size: 15px; }
.tm { display: block; font-size: 10.5px; opacity: .6; margin-top: 3px; text-align: right; }
.tm button { font-size: 10.5px; text-decoration: underline; color: inherit; padding: 0; }
.chat-in { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--bg); flex: none; }
.chat .chat-top { flex: none; }
.msgs { min-height: 0; overscroll-behavior: contain; }
body.kbd .tabbar { display: none; }
.chat-in textarea { flex: 1; min-width: 0; }
.chat-in textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-in .btn { min-height: 46px; padding: 0 16px; }

.pvbar { position: sticky; top: 0; z-index: 8; background: #3a2a00; color: #ffd27a; font-size: 13px; font-weight: 700; padding: 10px 16px; text-align: center; }
.pvbar a { color: #fff; }

.subs .lvl { flex: 1.2; display: grid; place-items: center; gap: 4px; font-size: 11px; text-transform: uppercase; color: var(--accent); }
.subs button:disabled { opacity: .3; }
.dots2 { display: flex; gap: 4px; }
.dots2 i { width: 7px; height: 7px; border-radius: 50%; background: var(--card-2); }
.dots2 i.std { outline: 1px solid var(--muted); }
.dots2 i.on { background: var(--accent); }
.scoremodal { display: grid; place-items: center; }
.sc-box { width: 100%; max-width: 380px; text-align: center; }
.stepper { background: var(--card); border-radius: 16px; padding: 12px; margin-bottom: 10px; }
.stepper .lbl { display: block; font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.stepper .row { justify-content: center; gap: 10px; flex-wrap: nowrap; }
.stepper button { width: 52px; height: 52px; border-radius: 14px; background: var(--card-2); font-size: 26px; font-weight: 900; }
.stepper input { width: 96px; text-align: center; font-size: 34px; font-weight: 900; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.stepper b { font-size: 30px; }
.cmp { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.cmp.pr { color: #ffd166; } .cmp.up { color: var(--ok); } .cmp.down { color: #ff8f8f; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 12px 0 8px; text-align: center; }
.cal > span { font-size: 11px; font-weight: 800; color: var(--muted); padding-bottom: 2px; }
.cd { position: relative; padding: 9px 0; border-radius: 10px; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--muted); }
.cd.on { background: var(--accent); color: var(--accent-ink); }
.cd.today { box-shadow: 0 0 0 2px var(--text) inset; }
.cd.sel { outline: 2px solid #fff; }
.cd i { position: absolute; top: 1px; right: 4px; font-size: 9px; font-style: normal; }
.rec { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.now .lab.rest-lab { color: var(--rest); }
.cropmodal { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 16px; }
.crop-box { width: 100%; max-width: 380px; display: grid; gap: 14px; text-align: center; }
.crop-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 16px; background: #000; touch-action: none; cursor: grab; }
.crop-stage img { position: absolute; left: 50%; top: 50%; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .55); outline: 2px solid rgba(255, 255, 255, .8); outline-offset: -2px; pointer-events: none; }
.crop-zoom { width: 100%; accent-color: var(--accent); }
/* modalità normale: tutto in una schermata, il video prende lo spazio che resta */
.player:not(.full) .p-scroll { display: flex; flex-direction: column; gap: 8px; padding-top: 2px; }
.player:not(.full) .tile { padding: 8px 10px; border-radius: 14px; }
.player:not(.full) .tile .big { font-size: 34px; }
.player:not(.full) .tile .lbl { font-size: 10px; margin-top: 4px; }
.player:not(.full) .bar { margin: 2px 0; }
.player:not(.full) .now { padding: 10px 14px; border-radius: 14px; }
.player:not(.full) .now .reps { font-size: 24px; margin-top: 2px; }
.player:not(.full) .now .name { font-size: 16px; }
.player:not(.full) .repnow { font-size: 44px; }
.player:not(.full) .circuit { margin-top: 6px; gap: 4px; }
.player:not(.full) .circuit button { padding: 6px 10px; font-size: 13px; }
.player:not(.full) .subs { margin-top: 6px; }
.player:not(.full) .subs button { padding: 6px; font-size: 11px; }
.now .note { cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.now .note.open { -webkit-line-clamp: unset; display: block; }
.video.sq { flex: 1 1 0; height: auto; min-height: 200px; margin-top: 0; }
.video.sq video { position: relative; object-fit: contain; }
/* il video si vede intero; ai lati la stessa scena sfocata al posto delle bande nere */
.video.sq video.blurbg { position: absolute; inset: 0; object-fit: cover; filter: blur(22px) brightness(.55); transform: scale(1.15); }
.player:not(.full) .next { margin-top: 0; padding: 6px 8px; }
.player:not(.full) .next video, .player:not(.full) .next .ph { width: 48px; height: 48px; }
.vfull { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 12px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 20px; backdrop-filter: blur(6px); }
/* modalità video a tutto schermo: timer e indicazioni sopra il video */
.player.full { background: #000; }
.bgvid { position: absolute; inset: 0 0 calc(78px + env(safe-area-inset-bottom)) 0; z-index: 0; }
.bgvid video, .bgvid iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; pointer-events: none; }
.bgvid .novid { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 800; text-transform: uppercase; text-align: center; }
.player.full > .p-top, .player.full > .p-scroll, .player.full > .p-ctrl { position: relative; z-index: 1; }
.player.full > .p-top { background: linear-gradient(rgba(0, 0, 0, .65), transparent); padding-bottom: 14px; }
.player.full .p-scroll { display: flex; flex-direction: column; gap: 8px; }
/* scritte in alto e quasi trasparenti: la parte bassa (esercizi a terra) resta libera */
.player.full .tile, .player.full .now { background: rgba(0, 0, 0, .22); backdrop-filter: none; -webkit-backdrop-filter: none; padding: 8px 12px; }
.player.full .tile .big { font-size: 38px; }
.player.full .tile, .player.full .now, .player.full .p-top { text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 12px rgba(0, 0, 0, .6); }
.player.full .now .reps, .player.full .repnow { font-size: 40px; }
.player.full .gbar { background: rgba(255, 255, 255, .25); }
.player.full .bar i:not(.done):not(.cur) { background: rgba(255, 255, 255, .25); }
.player.full .now .note, .player.full .now .subs, .player.full .now .tutbtn, .player.full .next { display: none; }
.player.full .circuit button { background: rgba(255, 255, 255, .1); }
.player.full > .p-ctrl { background: #000; border-top: 0; }
.player.full .tile .lbl, .player.full .now .note { color: rgba(255, 255, 255, .8); }
@media (max-height: 760px) {
  .player:not(.full) .video.sq { min-height: 140px; }
  .player:not(.full) .now .note { -webkit-line-clamp: 1; }
  .player:not(.full) .next { display: none; }
  .player:not(.full) .tile .big { font-size: 28px; }
  .player:not(.full) .p-top { padding-top: 8px; }
}
/* recupero: in evidenza il prossimo esercizio */
.upnext { margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 122, 0, .12); border-left: 3px solid var(--accent); }
.upnext span { display: block; font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); }
.upnext b { display: block; font-size: 18px; font-weight: 900; text-transform: uppercase; }
.player.full .upnext { background: rgba(0, 0, 0, .2); }
/* recupero: il colore cambia (timer, bordo del video, etichetta), il video resta nitido per studiare il prossimo esercizio */
.vbadge { position: absolute; left: 10px; top: 10px; z-index: 2; padding: 6px 10px; border-radius: 99px; background: var(--rest); color: #04121f; font-size: 11px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; }
.player.resting .video.sq { box-shadow: 0 0 0 3px var(--rest); }
.player.resting .upnext { border-left-color: var(--rest); background: rgba(80, 170, 255, .12); }
.player.resting .upnext span { color: var(--rest); }
.player.resting.full .tile .big { color: var(--rest); }
/* prova gratuita */
.trialbar { position: sticky; top: 0; z-index: 8; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; padding: 9px 16px; text-align: center; }
.trialbar a { color: var(--accent-ink); text-decoration: underline; }
.trialcard { outline: 2px solid var(--accent); }
.wo.locked { opacity: .55; }
.locksheet { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .7); display: flex; align-items: flex-end; padding: 16px; }
.locksheet .card { width: 100%; max-width: 520px; margin: 0 auto; }
/* varianti scelte dal membro */
.subnote { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 122, 0, .12); font-size: 13px; }
.subnote button { display: block; margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--card-2); font-weight: 800; font-size: 12px; }
.subcard { outline: 1px solid var(--accent); margin-bottom: 16px; }
a.btn { text-decoration: none; }
/* piani di abbonamento */
.plans { display: grid; gap: 10px; }
.plan { position: relative; display: block; padding: 14px 16px; border-radius: 16px; background: var(--card-2); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.plan.best { border: 2px solid var(--accent); }
.plan .tag { position: absolute; top: -9px; right: 12px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 900; padding: 3px 8px; border-radius: 99px; text-transform: uppercase; }
.plan .pt { font-weight: 900; text-transform: uppercase; font-size: 15px; }
.plan .pp b { font-size: 26px; font-weight: 900; color: var(--accent); }
.plan .pp span { color: var(--muted); font-size: 13px; }
.plan .pn { color: var(--muted); font-size: 13px; margin-top: 2px; }
.plan .pgo { margin-top: 6px; font-weight: 800; font-size: 13px; color: var(--accent); }
/* foto in chat */
.photobtn { flex: 0 0 auto; padding: 0 12px; font-size: 20px; cursor: pointer; }
.photobtn.busy { opacity: .4; pointer-events: none; animation: pulse 1s infinite; }
.bub .cphoto { display: block; max-width: 100%; width: 240px; max-height: 320px; object-fit: cover; border-radius: 12px; margin: 4px 0; cursor: zoom-in; background: var(--card-2); }
.photoview { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .95); display: grid; place-items: center; }
.photoview img { max-width: 100vw; max-height: 100dvh; object-fit: contain; }
.photoview .icon { position: absolute; top: 14px; right: 14px; }
.welcomeview video, .welcomeview iframe { width: 100vw; max-height: 100dvh; aspect-ratio: 9 / 16; max-width: calc(100dvh * 9 / 16); border: 0; background: #000; }
.welcomeview .icon { z-index: 1; }
.card.welcome { display: flex; align-items: center; gap: 12px; cursor: pointer; border-color: var(--accent); }
.card.welcome .wplay { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 18px; flex: none; cursor: pointer; }
.video.sq.boxfit video { object-fit: cover; }
/* demo esercizio dall'anteprima dell'allenamento */
button.ex { width: 100%; text-align: left; background: none; color: inherit; cursor: pointer; }
.ex .demo-go { color: var(--accent); font-size: 14px; padding: 0 4px; }
.demosheet { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .8); display: flex; align-items: flex-end; padding: 12px; }
.demosheet .card { width: 100%; max-width: 520px; margin: 0 auto; max-height: 92dvh; overflow: auto; }
.demovid { margin-top: 10px; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-height: 60dvh; }
.demovid video, .demovid iframe { width: 100%; height: 100%; object-fit: contain; border: 0; display: block; }
/* ricerca cibi */
.fres { display: grid; gap: 4px; margin-top: 6px; }
.fres button { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--card-2); text-align: left; }
.fres button span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.fpick { margin-top: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--accent); }
.fpick input { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.fcalc { margin: 10px 0; font-size: 15px; }
.fcalc b { color: var(--accent); font-size: 20px; }

/* EMOM: ultimi secondi dell'intervallo, si guarda già il prossimo esercizio */
.now .lab.soon-lab { color: var(--soon); font-size: 15px; }
.soonlist { display: grid; gap: 4px; margin-top: 6px; }
.soonlist span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.soonlist b { font-size: 22px; font-weight: 900; text-transform: uppercase; }
.vbadge.soon { background: var(--soon); color: #032312; }
.player.soon .video.sq { box-shadow: 0 0 0 3px var(--soon); }
.tile.soon .big { color: var(--soon); }

/* iPhone in risparmio energetico: i video non partono da soli */
.tapplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; padding: 14px 20px; border-radius: 99px; border: 0; background: var(--accent); color: var(--accent-ink, #1a0c00); font-weight: 900; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* "Dopo": il prossimo esercizio in un riquadro sotto il video, su nero (come nelle app di allenamento) */
.nextcard { flex: none; display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: #000; border: 1px solid var(--line); }
.nextcard .athumb, .nextcard video.athumb { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #1a1a1d; flex: none; }
.nextcard .atxt { display: grid; min-width: 0; }
.nextcard .atxt span { color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; }
.nextcard .atxt b { font-size: 15px; font-weight: 900; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* schermo intero: il video si ferma più in alto e sotto, sopra i comandi, c'è il riquadro "Dopo" */
.player.full .bgvid { bottom: calc(78px + 84px + env(safe-area-inset-bottom)); }
.player.full .nextcard { position: fixed; z-index: 2; left: max(16px, calc(50% - 264px)); right: max(16px, calc(50% - 264px)); bottom: calc(78px + 10px + env(safe-area-inset-bottom)); border-color: transparent; }
/* nel recupero niente sfondo sfocato: nero pulito */
.player.resting .video.sq video.blurbg, .player.soon .video.sq video.blurbg { display: none; }
.player.resting .video.sq, .player.soon .video.sq { background: #000; }

/* prima visita di Allenamenti: da dove partire */
.introsheet .intro-opt { background: var(--card-2, #1c1c20); border-radius: 14px; padding: 12px 14px; margin-top: 10px; display: grid; gap: 4px; }
.introsheet .intro-warn { margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent); font-size: 14px; }
.tutmodal.introsheet { position: fixed; z-index: 60; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.introsheet .sc-box { text-align: left; }

/* scelta del giorno per "Segna come fatto" */
.daychips { display: flex; flex-wrap: wrap; gap: 8px; }
.daychips button { padding: 10px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--card-2, #1c1c20); color: var(--text, #fff); font-weight: 800; text-transform: capitalize; }
.daychips button.on { background: var(--accent); color: var(--accent-ink, #1a0c00); border-color: var(--accent); }

/* Player come KBMH: timer in una riga, riquadro video 4:3, "Dopo" sotto (niente schermo intero) */
.timer { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 14px; padding: 10px 16px; border-left: 5px solid var(--accent); }
.timer .tinfo { display: grid; min-width: 0; }
.timer .tinfo span { font-size: 11px; font-weight: 800; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer .tinfo b { font-size: 22px; font-weight: 900; text-transform: uppercase; line-height: 1.1; }
.timer .tclock { text-align: right; }
.timer .big { font-weight: 900; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; }
.timer small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .6px; color: var(--muted); text-transform: uppercase; margin-top: 2px; }
.timer.rest { border-left-color: var(--rest); } .timer.rest .big { color: var(--rest); }
.timer.soon { border-left-color: var(--soon); } .timer.soon .big { color: var(--soon); }
.timer.ready .big { color: var(--accent); }
.player .now { background: transparent; padding: 4px 2px; }
.player .video.sq { flex: none; aspect-ratio: 4 / 3; height: auto; min-height: 0; background: #000; }
.player .video.sq video { position: relative; width: 100%; height: 100%; object-fit: contain; }
.player .video.sq video.land { object-fit: cover; }
.nexthead { font-weight: 900; font-size: 16px; text-transform: uppercase; letter-spacing: .4px; margin-top: 6px; }
.nextcard { background: var(--card); border: 0; padding: 10px; }
.nextcard .athumb, .nextcard video.athumb { width: 84px; height: 63px; }
.nextcard .atxt span { color: var(--text, #fff); font-size: 13px; }
.nextcard .atxt b { color: var(--muted); font-weight: 700; text-transform: none; font-size: 15px; }
/* zoom dei video orizzontali (Impostazioni → Zoom dei video): ingrandisce tenendo i piedi in basso */
.player .video.sq video.land, .demovid video.land { transform: scale(var(--vzoom, 1.2)); transform-origin: 50% 78%; }
/* Player che sta tutto nello schermo (senza scorrere) su qualsiasi telefono: il video prende lo spazio che resta */
.player .p-scroll { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; padding-bottom: 8px; }
.player .p-scroll > * { flex: none; }
.player .timer { padding: 6px 12px; border-left-width: 4px; }
.player .timer .big { font-size: 38px; }
.player .timer .tinfo b { font-size: 17px; }
.player .timer small { font-size: 9px; }
.player .bar { margin: 2px 0; }
.player .now { padding: 2px 2px 0; }
.player .now .lab { font-size: 10px; }
.player .now .reps { font-size: 20px; margin-top: 0; }
.player .now .name { font-size: 15px; margin-top: 0; }
.player .repnow { font-size: 34px; }
.player .now .note { font-size: 12px; margin-top: 2px; -webkit-line-clamp: 1; }
.player .now .subs { margin-top: 4px; }
.player .now .subs button { padding: 4px 8px; font-size: 10px; }
.player .upnext { padding: 6px 10px; margin-top: 4px; }
.player .p-scroll > .video.sq { flex: 1 1 auto; aspect-ratio: auto; min-height: 140px; max-height: calc((100vw - 32px) * 0.75); height: auto; }
.player .video.sq video { position: absolute; inset: 0; width: 100%; height: 100%; }
.player .video.sq video.land { object-fit: cover; }
.player .nexthead { font-size: 12px; margin-top: 2px; color: var(--muted); letter-spacing: .6px; }
.player .nextcard { padding: 6px; gap: 10px; }
.player .nextcard .athumb, .player .nextcard video.athumb { width: 64px; height: 48px; border-radius: 8px; }
.player .nextcard .atxt span { font-size: 12px; }
.player .nextcard .atxt b { font-size: 14px; }
.player .p-ctrl { padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.player .p-ctrl .btn { min-height: 48px; }
/* lista dei movimenti del giro: una riga che scorre di lato, così il video resta grande */
.player .circuit { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin-top: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.player .circuit::-webkit-scrollbar { display: none; }
.player .circuit button { flex: none; width: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 10px; border-radius: 10px; font-size: 12px; line-height: 1.2; text-align: left; }
.player .circuit button b { font-size: 12px; }
.player .circuit button span { white-space: nowrap; }
.player .subnote { padding: 6px 10px; font-size: 12px; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.player .subnote button { padding: 4px 8px; font-size: 11px; }
.player .circuit button.sel { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.player .circuit b { min-width: 0; }
/* più spazio al video: niente frasi di aiuto ripetute, numeri più compatti */
.player .now .donehint { display: none; }
.player .repline { margin-top: 0; }
.player .now .repnow, .player:not(.full) .now .repnow { font-size: 30px; }
.player .reptot { font-size: 13px; }
.player .now:has(.circuit) .note:not(.donehint) { display: none; }
.player .now .subs { margin-top: 4px; }
/* il video si vede sempre intero (mai piedi o testa tagliati), anche quando il riquadro è più basso */
.player .video.sq video, .player .video.sq video.land { object-fit: contain; transform: none; }
/* questionario del primo accesso */
.quizsheet .qlab { font-weight: 900; text-transform: uppercase; font-size: 13px; letter-spacing: .5px; margin: 16px 0 8px; }
.qchips, .quizsheet .qchips { display: flex; flex-wrap: wrap; gap: 8px; }
.qchip, .quizsheet .qchip { padding: 10px 14px; border-radius: 12px; background: var(--card-2, #1c1c20); font-weight: 700; border: 2px solid transparent; color: inherit; }
.qchip.on, .quizsheet .qchip.on { border-color: var(--accent); background: rgba(255, 122, 0, .15); }
.quizsheet .qgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.quizsheet .qgrid label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.quizsheet .qgrid input { width: 100%; padding: 10px; border-radius: 10px; background: var(--card-2, #1c1c20); border: 1px solid var(--line); color: var(--text); font-size: 16px; }
.quizsheet .qdots { display: flex; gap: 6px; margin-bottom: 14px; }
.quizsheet .qdots i { flex: 1; height: 4px; border-radius: 2px; background: var(--card-2, #222228); }
.quizsheet .qdots i.on { background: var(--accent); }
.quizsheet .qskip { display: block; margin: 14px auto 0; color: var(--muted); font-size: 13px; text-decoration: underline; background: none; }
.otherprogs { margin-top: 18px; }
.otherprogs summary { cursor: pointer; font-weight: 800; color: var(--muted); padding: 10px 0; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px 14px; padding: 0 16px 4px; scroll-padding: 0 16px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > .prog { flex: 0 0 84%; margin-bottom: 0; scroll-snap-align: start; }
.hscroll > .prog:only-child { flex-basis: 100%; }
.rowhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rowhead span { font-family: inherit; text-transform: none; letter-spacing: 0; font-weight: 600; }
/* test livelli */
.ltbadge { display: inline-block; margin-top: 4px; padding: 4px 12px; border-radius: 99px; font-weight: 900; text-transform: uppercase; letter-spacing: .6px; font-size: 13px; color: var(--lc); background: color-mix(in srgb, var(--lc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--lc) 50%, transparent); }
.ltpts { font-size: 30px; font-weight: 900; line-height: 1; }
.ltparts { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ltparts div { display: flex; justify-content: space-between; font-size: 14px; }
.ltparts span { color: var(--muted); }
.lthist { margin-top: 12px; }
.lthist summary { cursor: pointer; font-weight: 800; color: var(--muted); font-size: 13px; padding: 4px 0; }
.lthist .row { padding: 6px 0; font-size: 14px; align-items: center; }
.lthist .ltbadge { font-size: 10px; padding: 2px 8px; margin: 0 4px; }
.lthist .x { background: none; border: 0; color: var(--muted); }
.ltsheet .sc-box { max-height: calc(100dvh - 32px); overflow: auto; background: var(--card); border-radius: 18px; padding: 18px; }
.ltsheet .qgrid { grid-template-columns: repeat(2, 1fr); }
.ltsheet select { width: 100%; padding: 10px; border-radius: 10px; background: var(--card-2, #1c1c20); border: 1px solid var(--line); color: var(--text); font-size: 16px; }
.ltprev { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--card-2); display: grid; gap: 6px; }
.ltlevels { display: grid; gap: 6px; }
.ltlevels div { display: flex; align-items: center; gap: 10px; }
.ltcard .btn { padding: 0 14px; white-space: nowrap; }
/* messaggi del coach */
.coachmsg { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); border: 1px solid var(--accent); margin-bottom: 14px; }
.coachmsg .cm-ico { font-size: 26px; }
.coachmsg .badge, #coachbtn .badge { position: static; display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 900; font-style: normal; }
.bub .wvid { margin-top: 8px; min-height: 40px; padding: 0 14px; font-size: 13px; }
/* pagina della prova (#/prova, arrivo dalle pubblicità) */
.auth.lpage { padding-top: 20px; }
.auth input { scroll-margin: 90px 0 140px; }
.landing { display: grid; gap: 14px; }
.landing .h2 { margin: 6px 0 -4px; }
.lcoach { display: flex; gap: 14px; align-items: center; padding: 12px; font-size: 15px; line-height: 1.45; }
.lcoach > img, .lcoach .lph { width: 128px; height: auto; aspect-ratio: 2 / 3; flex: 0 0 128px; border-radius: 16px; object-fit: cover; border: 2px solid var(--accent); }
.lcoach .lph { display: grid; place-items: center; background: var(--card-2); color: var(--accent); font-weight: 900; font-size: 28px; }
.lfeat { display: grid; gap: 14px; }
.lfeat div { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.lfeat span { flex: 0 0 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 122, 0, .14); font-size: 20px; }
.lshots { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; overscroll-behavior-x: contain; }
.lshots::-webkit-scrollbar { display: none; }
.lshots img { flex: 0 0 62%; max-width: 240px; height: auto; aspect-ratio: 480 / 1039; border-radius: 18px; border: 1px solid var(--line); scroll-snap-align: center; background: var(--card); }
.ltesti { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.ltesti img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 56px; }
.landing #lgo { margin: 4px 0 8px; }
.landing .lsign { display: block; width: 72px; height: auto; margin: 4px auto 0; opacity: .55; }
.linkbtn { background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 6px; font: inherit; }
/* EMOM con più esercizi nello stesso minuto: riquadro diviso in colonne, tutti i video insieme */
.player .video.sq.split { display: grid; gap: 3px; background: #000; }
.player .video.sq.split.n2 { grid-template-columns: 1fr 1fr; }
.player .video.sq.split.n3 { grid-template-columns: 1fr 1fr 1fr; }
.player .video.sq.split video, .player .video.sq.split video.land { position: relative; inset: auto; width: 100%; height: 100%; object-fit: cover; transform: none; }
.player .splitlist { display: flex; gap: 6px; margin-top: 6px; }
.player .splitlist div { flex: 1; min-width: 0; background: var(--card-2); border-radius: 10px; padding: 6px 8px; display: grid; }
.player .splitlist b { color: var(--accent); font-size: 15px; }
.player .splitlist span { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nextcard .agrp { display: block; line-height: 1.3; } .nextcard .agrp span, .nextcard .agrp b { display: inline; font-size: 14px; }
/* barra di tutto l'allenamento, salta riscaldamento/defaticamento, grandezza del testo */
.player .wbar { display: flex; gap: 4px; margin: 2px 0 6px; }
.player .wbar i { height: 4px; border-radius: 2px; background: var(--card-2); overflow: hidden; display: block; }
.player .wbar b { display: block; height: 100%; background: var(--accent); }
.player .skipph { display: block; margin: 0 0 8px auto; background: var(--card-2); color: var(--text); border: 0; border-radius: 99px; padding: 6px 12px; font: inherit; font-size: 12px; font-weight: 800; }
.player .icon.tz { font-weight: 900; font-size: 15px; }
.player .icon.tz small { font-size: 10px; }
.player.tz1 .now, .player.tz1 .timer { zoom: 1.15; }
.player.tz2 .now, .player.tz2 .timer { zoom: 1.3; }
.pill.opt { font-size: 9px; padding: 3px 7px; vertical-align: 2px; }
.now .note .mus { display: block; margin-top: 4px; color: var(--text); }
.pdesc { white-space: pre-line; }
/* ---- schermi larghi (PC, tablet orizzontale, TV): player a 3 colonne, pagine più ampie ---- */
.uplist { display: none; }
@media (min-width: 760px) and (orientation: landscape) {
  .player { max-width: none; }
  .player .p-top { padding-left: 24px; padding-right: 24px; }
  .player .p-scroll { display: grid !important; grid-template-columns: minmax(240px, 22%) 1fr minmax(220px, 20%); grid-template-rows: auto auto 1fr auto; column-gap: 20px; row-gap: 10px; padding: 8px 24px; overflow: hidden; align-items: start; }
  .player .p-scroll > .wbar { grid-column: 1 / -1; }
  .player .p-scroll > .skipph { grid-column: 1; grid-row: 4; justify-self: start; margin: 0; }
  .player .p-scroll > .timer { grid-column: 1; grid-row: 2; flex-direction: column; align-items: flex-start; gap: 6px; }
  .player .p-scroll > .timer .tclock .big { font-size: clamp(56px, 6vw, 110px); }
  .player .p-scroll > .bar, .player .p-scroll > div[style*="height:12px"] { display: none; }
  .player .p-scroll > .now { grid-column: 1; grid-row: 3; align-self: stretch; overflow: auto; }
  .player .p-scroll > .now .repnow { font-size: clamp(48px, 5vw, 96px); }
  .player .p-scroll > .now .name { font-size: clamp(20px, 2vw, 34px); }
  .player .p-scroll > .now .note { -webkit-line-clamp: 6; font-size: 15px; }
  .player .p-scroll > .video.sq { grid-column: 2; grid-row: 2 / span 3; max-height: calc(100vh - 210px); max-width: none; height: auto; aspect-ratio: 4 / 3; width: 100%; justify-self: center; align-self: center; }
  .player .p-scroll > .nexthead, .player .p-scroll > .nextcard { display: none; }
  .player .uplist { display: block; grid-column: 3; grid-row: 2 / span 3; }
  .player .uplist .upi { background: var(--card); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; display: grid; gap: 2px; }
  .player .uplist .upi:first-of-type { border: 2px solid var(--accent); }
  .player .uplist .upi b { font-size: clamp(15px, 1.3vw, 22px); }
  .player .uplist .upi span { color: var(--muted); font-size: 12px; text-transform: uppercase; font-weight: 800; }
  .player .uplist .upi.rest b { color: var(--muted); }
  .player .p-ctrl { max-width: 720px; margin: 0 auto; width: 100%; }
  .player .video.sq.split { aspect-ratio: auto; height: calc(100vh - 210px); }
  /* pagine dell'app: più larghe, liste di programmi a griglia */
  .wrap { max-width: 1100px; }
  .chat { max-width: 900px; }
  .hscroll > .prog { flex: 0 0 calc((100% - 24px) / 3); }
  .hscroll > .prog:only-child { flex-basis: calc((100% - 24px) / 3); }
}
@media (min-width: 1600px) and (orientation: landscape) {
  .player .p-scroll { grid-template-columns: minmax(300px, 22%) 1fr minmax(280px, 20%); }
}
.tvhelp ol { padding-left: 20px; line-height: 1.6; margin: 14px 0; }
.tvhelp { max-width: 560px; margin: 0 auto; }
/* telefono girato in orizzontale (o duplicato sulla TV): poco spazio in altezza */
@media (min-width: 760px) and (orientation: landscape) and (max-height: 500px) {
  .player .p-top { padding-top: 4px; padding-bottom: 0; }
  .player .p-scroll { padding-top: 2px; row-gap: 4px; }
  .player .p-scroll > .timer .tclock .big { font-size: 40px; }
  .player .p-scroll > .now .repnow { font-size: 34px; }
  .player .p-scroll > .now .name { font-size: 18px; }
  .player .p-scroll > .now .note { display: none; }
  .player .p-scroll > .video.sq, .player .video.sq.split { max-height: calc(100vh - 120px); height: calc(100vh - 120px); }
  .player .uplist .upi { padding: 6px 10px; margin-bottom: 4px; }
  .player .uplist .upi:nth-of-type(n + 4) { display: none; }
  .player .uplist .upi b { font-size: 14px; }
  .player .p-ctrl .btn { min-height: 40px; }
}

/* Quality Test: la fotocamera conta le ripetizioni valide (public/qtest.js) */
.qtbtn { margin-top: 8px; flex-direction: column; gap: 2px; min-height: 58px; background: rgba(255, 122, 0, .12); color: var(--accent); border: 1px solid rgba(255, 122, 0, .35); }
.qtbtn span { font-size: 11px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--muted); }
.qtcards { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; }
.qtcards > div { position: relative; flex: 0 0 96px; }
.qtcards img { width: 96px; aspect-ratio: 4/5; object-fit: cover; border-radius: 10px; display: block; }
.qtcards span { display: block; font-size: 11px; font-weight: 800; color: var(--muted); margin-top: 4px; }
.qtcards .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; }
.qtopt { display: block; width: 100%; text-align: left; }
body.qt-open { overflow: hidden; }
.qt { position: fixed; inset: 0; z-index: 70; background: var(--bg); overflow-y: auto; padding: max(12px, env(safe-area-inset-top)) 0 max(16px, env(safe-area-inset-bottom)); }
.qt-top { display: flex; align-items: center; gap: 12px; padding: 4px 16px 12px; }
.qt-x { width: 36px; height: 36px; border-radius: 50%; background: var(--card-2); font-weight: 900; flex: 0 0 36px; }
.qt-t { font-weight: 900; text-transform: uppercase; font-size: 15px; letter-spacing: .5px; }
.qt-t small { display: block; color: var(--accent); font-size: 11px; letter-spacing: 1px; }
.qt-cam { position: relative; margin: 0 16px; border-radius: 18px; overflow: hidden; aspect-ratio: 3/4; max-height: 56dvh; background: radial-gradient(120% 80% at 50% 30%, #2a2a30, #121215); }
.qt-cam video, .qt-cam canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform: scaleX(-1); }
.qt-final .qt-cam { display: none; }
.qt-shot .qt-cam::after { content: ''; position: absolute; inset: 0; background: #fff; }
.qt-badge { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 800; background: rgba(0, 0, 0, .7); padding: 6px 10px; border-radius: 99px; letter-spacing: .4px; }
.qt-badge:empty { display: none; }
.qt-badge.ok { color: var(--ok); }
.qt-badge.warn { color: #ffd166; }
.qt-toast { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); font-weight: 900; font-size: 13px; padding: 8px 14px; border-radius: 99px; white-space: nowrap; text-transform: uppercase; opacity: 0; transition: opacity .2s; }
.qt-toast.on { opacity: 1; }
.qt-toast.ok { background: var(--ok); color: #04210f; }
.qt-toast.bad { background: #ff4d4d; color: #fff; }
.qt-depth { position: absolute; left: 12px; top: 56px; bottom: 56px; width: 14px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.qt-depth i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 99px; background: var(--accent); }
.qt-depth b { position: absolute; left: -6px; right: -6px; top: 0; height: 3px; background: #fff; }
.qt-count { position: absolute; right: 12px; bottom: 12px; text-align: right; background: rgba(0, 0, 0, .75); border-radius: 16px; padding: 6px 14px; }
.qt-count b { font-size: 60px; font-weight: 900; line-height: 1; color: var(--accent); }
.qt-count span { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.qt-body { margin: 14px 16px 0; background: var(--card); border-radius: 18px; padding: 16px; }
.qt-final .qt-body { margin-top: 0; background: none; padding: 0; }
.qt-pill { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; padding: 5px 10px; border-radius: 99px; background: rgba(255, 122, 0, .15); color: var(--accent); }
.qt-h { font-weight: 900; text-transform: uppercase; font-size: 18px; line-height: 1.2; margin: 8px 0 6px; }
.qt-m { color: var(--muted); font-size: 13px; line-height: 1.45; }
.qt-big { font-size: 96px; font-weight: 900; text-align: center; color: var(--accent); line-height: 1.1; }
.qt-timer { font-weight: 900; font-size: 40px; text-align: center; letter-spacing: 1px; }
.qt-stats { display: flex; gap: 8px; margin-top: 12px; }
.qt-stats:empty { display: none; }
.qt-stats div { flex: 1; background: var(--card-2); border-radius: 14px; padding: 10px 12px; }
.qt-stats b { display: block; font-size: 22px; font-weight: 900; }
.qt-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 700; letter-spacing: .4px; }
.qt-stats .ok { color: var(--ok); }
.qt-stats .bad { color: #ff4d4d; }
.qt-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: 12px; border-radius: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; background: var(--card-2); font-size: 14px; }
.qt-btn.p { background: var(--accent); color: var(--accent-ink); }
.qt-btn:disabled { opacity: .5; }
.qt-seg { display: flex; background: var(--card-2); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.qt-seg button { flex: 1; padding: 9px; border-radius: 9px; font-weight: 800; font-size: 12px; text-transform: uppercase; }
.qt-seg .on { background: var(--accent); color: var(--accent-ink); }
.qt-card img { display: block; width: 100%; max-height: 62dvh; object-fit: contain; border-radius: 16px; background: #000; }
.qt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.qt-grid .qt-btn { font-size: 12px; min-height: 48px; }
@media (min-width: 760px) and (orientation: landscape) { .qt { display: grid; grid-template-columns: 1fr 380px; grid-template-rows: auto 1fr; align-content: start; max-width: 1100px; margin: 0 auto; } .qt-top { grid-column: 1 / -1; } .qt-cam { max-height: 80dvh; } .qt-body { margin-top: 0; } .qt-final .qt-body { grid-column: 1 / -1; max-width: 420px; justify-self: center; } }
