/* Treino v2 — escopo exclusivo (.tv2*, #tv2-run, .tv2-sheet). Não altera componentes compartilhados.
   Linguagem: editorial e funcional — linhas finas em vez de cartões, raio 8px, tipografia do app, cor só com função. */
.tv2,.tv2-sheet,.tv2-run{--tv-line:var(--sep);--tv-r:8px;font-family:var(--fb);color:var(--t)}
.tv2 *,.tv2-sheet *,.tv2-run *{box-sizing:border-box}
.tv2 button,.tv2-sheet button,.tv2-run button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.tv2 :focus-visible,.tv2-sheet :focus-visible,.tv2-run :focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
.tv2-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
body.tv2-lock{overflow:hidden}
/* botões usados dentro da área: neutraliza só o necessário do tema compartilhado */
.tv2 .jf-outline,.tv2-sheet .jf-outline,.tv2-run .jf-outline{background:var(--card)!important;color:var(--t)!important;border:1px solid var(--tv-line)!important;border-radius:var(--tv-r)!important;min-height:44px;padding:9px 14px;font-weight:600}
.tv2 .jf-primary,.tv2-sheet .jf-primary,.tv2-run .jf-primary{border-radius:var(--tv-r)!important;min-height:44px;padding:9px 18px;font-weight:700}
.tv2 button:disabled,.tv2-sheet button:disabled,.tv2-run button:disabled{opacity:.45;cursor:not-allowed}
.tv2-link{background:none;border:0;color:var(--action-text);font-weight:600;padding:10px 6px;min-height:44px}
.tv2-ghost{background:none;border:0;color:var(--t2);font-weight:600;min-height:44px;padding:0 8px}
.tv2-danger{color:var(--r)!important}
.tv2-meta{color:var(--t2);font-size:13px;line-height:1.45;margin:4px 0}
.tv2-kicker{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--t2);font-weight:700}
.tv2-h3{font-family:var(--fd);font-size:14px;margin:22px 0 8px;letter-spacing:.01em}
.tv2-field{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--t2);font-weight:600;margin:14px 0}
.tv2 input:not([type=checkbox]),.tv2 select,.tv2 textarea,.tv2-sheet input:not([type=checkbox]),.tv2-sheet select,.tv2-sheet textarea,.tv2-run input{font:inherit;font-size:16px;color:var(--t);background:var(--card);border:1px solid var(--tv-line);border-radius:var(--tv-r);min-height:44px;padding:8px 12px;width:100%;margin:0}
.tv2-sheet textarea{min-height:96px;resize:vertical}

/* cabeçalho e abas */
.tv2-head{padding:6px 0 4px}.tv2-head h1{font-family:var(--fd);font-size:26px;line-height:1.15;margin:2px 0 4px;font-weight:700}.tv2-head p{margin:0;color:var(--t2);font-size:14px}
.tv2-tabs{display:flex;gap:4px;border-bottom:1px solid var(--tv-line);margin:14px 0 18px;overflow-x:auto;scrollbar-width:none}
.tv2-tabs::-webkit-scrollbar{display:none}
.tv2-tabs button{background:none;border:0;border-bottom:2px solid transparent;color:var(--t2);font-weight:600;min-height:46px;padding:0 14px;white-space:nowrap}
.tv2-tabs button.on{color:var(--t);border-bottom-color:var(--a)}
.tv2-grid{display:grid;gap:24px;grid-template-columns:minmax(0,1fr)}
@media(min-width:980px){.tv2-grid{grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);gap:40px}.tv2-head h1{font-size:30px}}
.tv2-side{display:flex;flex-direction:column}
.tv2-side-sec{padding:16px 0;border-top:1px solid var(--tv-line)}.tv2-side-sec:first-child{border-top:0;padding-top:0}
.tv2-side-sec h3,.tv2-main-sec>h2,.tv2-sec-head h2{font-family:var(--fd);font-size:15px;margin:0 0 10px;font-weight:700}
.tv2-sec-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.tv2-line{display:flex;justify-content:space-between;gap:10px;margin:0 0 4px}.tv2-line span{color:var(--t2);font-size:13px}

/* hoje */
.tv2-resume{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;margin-bottom:18px;border:1px solid var(--soft-border);background:var(--soft);border-radius:var(--tv-r)}
.tv2-resume strong{display:block;font-size:14px}.tv2-resume span{font-size:13px;color:var(--t2)}
.tv2-today h2{font-family:var(--fd);font-size:22px;margin:4px 0 4px;font-weight:700}
.tv2-today>p{color:var(--t2);margin:6px 0 14px;max-width:52ch;line-height:1.5}
.tv2-exlist{list-style:none;margin:14px 0 18px;padding:0;border-top:1px solid var(--tv-line);counter-reset:ex}
.tv2-exlist li{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:12px 0;border-bottom:1px solid var(--tv-line);counter-increment:ex}
.tv2-exlist .n::before{content:counter(ex) ".";color:var(--t2);display:inline-block;width:24px;font-variant-numeric:tabular-nums}.tv2-exlist .n{font-weight:600}
.tv2-exlist .m{color:var(--t2);font-size:13px;text-align:right}
.tv2-actions{display:flex;flex-wrap:wrap;gap:10px}.tv2-start{flex:1 1 220px;min-height:50px!important;font-size:16px}
.tv2-empty h2{font-size:20px}.tv2-restday .tv2-field{max-width:340px}
.tv2-week{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;margin-bottom:10px}
.tv2-week div{display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 0;border-radius:var(--tv-r);font-size:12px;color:var(--t2)}
.tv2-week b{font-size:14px;color:var(--t2)}.tv2-week .plan b{color:var(--a)}.tv2-week .done b{color:var(--g)}
.tv2-week .today{background:var(--soft);color:var(--t);font-weight:700}
.tv2-bar{height:4px;border-radius:2px;background:var(--tv-line);overflow:hidden}.tv2-bar i{display:block;height:100%;background:var(--a);transition:width .3s}

/* listas */
.tv2-rows{list-style:none;margin:8px 0;padding:0;border-top:1px solid var(--tv-line)}
.tv2-row{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--tv-line)}
.tv2-row-main{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;background:none;border:0;padding:12px 0;color:var(--t);min-height:56px}
.tv2-row-main .t{font-weight:600;font-size:15px}.tv2-row-main .m{color:var(--t2);font-size:13px}
.tv2-tag{font-style:normal;font-size:11px;font-weight:700;color:var(--g);margin-left:8px;text-transform:uppercase;letter-spacing:.05em}
.tv2-add{white-space:nowrap;flex:none;min-height:40px!important;padding:6px 12px!important}
.tv2-chips{display:flex;gap:6px;overflow-x:auto;padding:4px 0 8px;scrollbar-width:none;flex-wrap:nowrap}
.tv2-chips::-webkit-scrollbar{display:none}
@media(min-width:980px){.tv2-chips{flex-wrap:wrap}}
.tv2-chip{flex:none;background:var(--card);border:1px solid var(--tv-line);color:var(--t);border-radius:var(--tv-r);min-height:40px;padding:0 12px;font-weight:600;font-size:14px}
.tv2-chip.on{background:var(--t);color:var(--bg);border-color:var(--t)}
.tv2-filters{margin-bottom:6px}.tv2-filters input[type=search]{margin-bottom:8px}
.tv2-sched{list-style:none;margin:0;padding:0}.tv2-sched li{display:grid;grid-template-columns:84px 1fr;gap:2px 8px;padding:10px 0;border-bottom:1px solid var(--tv-line);font-size:14px}
.tv2-sched li span{color:var(--t2)}.tv2-sched li small{grid-column:2;color:var(--t2)}.tv2-sched em{color:var(--t2)}

/* sheets (editor, picker, resumo): tela cheia no celular, painel no desktop */
.tv2-sheet{padding:0!important;align-items:stretch!important}
.tv2-sheet .box.tv2-box{max-width:none;width:100%;height:100%;max-height:none;border-radius:0;padding:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}
@media(min-width:760px){.tv2-sheet{align-items:center!important;padding:24px!important}.tv2-sheet .box.tv2-box{max-width:760px;height:auto;max-height:min(92vh,900px);border-radius:12px;margin:0 auto;background:var(--card)}}
.tv2-sheet-bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;padding:calc(8px + env(safe-area-inset-top,0px)) 12px 8px;border-bottom:1px solid var(--tv-line);background:inherit}
.tv2-sheet-bar>:first-child{justify-self:start}.tv2-sheet-bar>:last-child{justify-self:end}.tv2-sheet-bar strong{font-family:var(--fd);font-size:15px;text-align:center}
.tv2-sheet-body{flex:1;overflow:auto;padding:16px 16px calc(24px + env(safe-area-inset-bottom,0px));-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.tv2-box .jf-save-error{margin:12px 16px 0;color:var(--r);font-size:14px}
.tv2-why{border-left:3px solid var(--a);padding:6px 0 6px 12px;margin-bottom:12px;font-size:14px}.tv2-why ul{margin:6px 0;padding-left:18px}.tv2-why p{color:var(--t2);font-size:13px;margin:4px 0}
.tv2-sched-ed{border:0;margin:14px 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.tv2-sched-ed legend{font-weight:700;font-size:14px;margin-bottom:8px;padding:0}.tv2-sched-ed label{display:grid;grid-template-columns:40px 1fr;align-items:center;gap:6px;font-size:13px;color:var(--t2)}
.tv2-ed-sess{border-top:1px solid var(--tv-line);padding:16px 0}
.tv2-ed-sess-h{display:flex;gap:8px;align-items:center;margin-bottom:8px}.tv2-ed-sess-h input{font-weight:700}
.tv2-ed-list{list-style:none;margin:0 0 10px;padding:0}
.tv2-ed-ex{display:grid;grid-template-columns:1fr repeat(3,64px) auto;gap:8px;align-items:end;padding:10px 0;border-bottom:1px solid var(--tv-line)}
.tv2-ed-ex label{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--t2)}.tv2-ed-ex input{padding:6px 4px!important;text-align:center}
.tv2-ed-name{min-width:0;align-self:center}.tv2-ed-name strong{display:block;font-size:14px}.tv2-ed-name small{color:var(--t2)}
.tv2-ed-btns{display:flex;gap:2px}.tv2-ed-btns button{width:36px;height:44px;border:1px solid var(--tv-line);background:var(--card);color:var(--t);border-radius:6px}
@media(max-width:560px){.tv2-ed-ex{grid-template-columns:repeat(3,1fr)}.tv2-ed-name{grid-column:1/-1}.tv2-ed-btns{grid-column:1/-1;justify-content:flex-end}}
.tv2-check{display:flex;align-items:center;gap:10px;margin:16px 0;font-size:14px;min-height:44px}.tv2-check input{width:20px!important;min-height:20px!important}
.tv2-danger-row,.tv2-menu{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.tv2-menu{flex-direction:column}
.tv2-custom{margin-top:16px}.tv2-custom summary{cursor:pointer;color:var(--action-text);font-weight:600;min-height:44px;display:flex;align-items:center}
.tv2-det-ex h3{font-size:14px;margin:16px 0 4px}.tv2-det-ex ol{margin:0;padding-left:20px;color:var(--t2);font-size:14px;line-height:1.7}.tv2-det-ex li.skip{opacity:.55}
.tv2-sum-lead{color:var(--t2);margin:0 0 12px}
.tv2-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0;padding:12px 0;border-top:1px solid var(--tv-line);border-bottom:1px solid var(--tv-line)}
.tv2-stats dt{font-size:12px;color:var(--t2)}.tv2-stats dd{margin:2px 0 0;font-family:var(--fd);font-size:20px;font-weight:700}
.tv2-stats-s{grid-template-columns:1fr 1fr;border:0;padding:0}
@media(max-width:420px){.tv2-stats{grid-template-columns:repeat(2,1fr)}}
.tv2-cmp{font-size:14px;margin:8px 0}.tv2-cmp.up{color:var(--g)}.tv2-cmp.down{color:var(--t2)}
.tv2-prs,.tv2-muscles{margin:0;padding:0;list-style:none}.tv2-prs li{padding:6px 0;font-size:14px;border-bottom:1px solid var(--tv-line)}.tv2-prs small{color:var(--t2)}
.tv2-muscles{display:flex;flex-wrap:wrap;gap:6px}.tv2-muscles li{border:1px solid var(--tv-line);border-radius:var(--tv-r);padding:6px 10px;font-size:13px}.tv2-muscles b{color:var(--a);margin-left:4px}

/* histórico */
.tv2-table-wrap{overflow-x:auto;border-top:1px solid var(--tv-line)}
.tv2-table{width:100%;border-collapse:collapse;font-size:14px}.tv2-table th{text-align:left;font-size:12px;color:var(--t2);font-weight:600;padding:10px 8px;border-bottom:1px solid var(--tv-line);white-space:nowrap}
.tv2-table td{padding:13px 8px;border-bottom:1px solid var(--tv-line)}.tv2-table .r{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tv2-table tr[tabindex]{cursor:pointer}.tv2-table tr[tabindex]:hover{background:var(--soft)}.tv2-table tr.legacy td{color:var(--t2)}
@media(max-width:600px){.tv2-table th:nth-child(3),.tv2-table td:nth-child(3){display:none}.tv2-table td:nth-child(2){max-width:34vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
.tv2-chart{width:100%;height:auto;max-height:160px}.tv2-ax{font-size:9px;fill:var(--t2)}
.tv2-bars{display:flex;align-items:flex-end;gap:6px;height:110px}.tv2-bars div{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;font-size:10px;color:var(--t2);gap:2px}
.tv2-bars i{display:block;width:100%;background:var(--a);border-radius:3px 3px 0 0;min-height:2px;opacity:.85}.tv2-bars b{font-weight:600;color:var(--t)}
.tv2-maps{display:flex;justify-content:center;gap:12px;margin:6px 0 10px}.tv2-body{width:42%;max-width:120px;height:auto}
.tv2-mrows{list-style:none;margin:0;padding:0}.tv2-mrows li{display:grid;grid-template-columns:92px 1fr 28px;align-items:center;gap:10px;padding:5px 0;font-size:13px}.tv2-mrows b{text-align:right;font-weight:600}

/* execução */
/* acima da navegação inferior (z 80) e abaixo de sheets (z 120) e do aviso; a navegação fica oculta durante o treino */
.tv2-run{position:fixed;inset:0;z-index:100;background:var(--bg);overflow:hidden}
body.tv2-lock #nav{visibility:hidden!important;pointer-events:none!important}
body.tv2-lock #nt{z-index:130}
.tv2-run-in{height:100%;height:100dvh;display:flex;flex-direction:column;max-width:1100px;margin:0 auto;position:relative}
.tv2-run-h{display:flex;align-items:center;gap:8px;padding:calc(10px + env(safe-area-inset-top,0px)) 12px 8px}
.tv2-run-title{flex:1;min-width:0;display:flex;flex-direction:column}.tv2-run-title strong{font-family:var(--fd);font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv2-run-title span{font-size:13px;color:var(--t2);font-variant-numeric:tabular-nums}
.tv2-ic{width:44px;height:44px;border:1px solid var(--tv-line);background:var(--card);color:var(--t);border-radius:var(--tv-r);font-size:20px;line-height:1}
.tv2-prog{height:3px;background:var(--tv-line);margin:0 12px}.tv2-prog i{display:block;height:100%;background:var(--a);transition:width .25s}
.tv2-run-grid{flex:1;min-height:0;display:flex;flex-direction:column}
.tv2-pager{display:flex;gap:6px;overflow-x:auto;padding:12px;scrollbar-width:none;flex:none}.tv2-pager::-webkit-scrollbar{display:none}
.tv2-pg{flex:none;min-width:44px;height:44px;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--tv-line);background:var(--card);color:var(--t);border-radius:var(--tv-r);padding:0 10px}
.tv2-pg span,.tv2-pg small{display:none}.tv2-pg b{font-variant-numeric:tabular-nums}
.tv2-pg.cur{border-color:var(--a);box-shadow:inset 0 0 0 1px var(--a)}.tv2-pg.ok b{color:var(--g)}.tv2-pg.add{color:var(--action-text)}
.tv2-run-main{flex:1;min-height:0;overflow:auto;padding:4px 14px calc(110px + env(safe-area-inset-bottom,0px));overscroll-behavior:contain}
.tv2-ex-h{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.tv2-ex-h h2{font-family:var(--fd);font-size:20px;line-height:1.2;margin:0 0 2px}
.tv2-hint{font-size:13px;color:var(--action-text);margin:10px 0 14px;line-height:1.45}
.tv2-sets-h,.tv2-set{display:grid;grid-template-columns:40px 1fr 1fr 48px;gap:8px;align-items:center}
.tv2-sets-h{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--t2);text-align:center;margin-bottom:6px}
.tv2-set{padding:6px 0;border-top:1px solid var(--tv-line)}
.tv2-setno{width:36px;height:44px;border:0;background:none;color:var(--t2);font-weight:700;font-size:15px}.tv2-set.warm .tv2-setno{color:var(--y)}
.tv2-step{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;align-items:stretch;background:var(--card);border:1px solid var(--tv-line);border-radius:var(--tv-r);overflow:hidden}
.tv2-step button{border:0;background:none;color:var(--t);font-size:22px;min-height:46px}.tv2-step button:active{background:var(--soft)}
.tv2-step input{border:0!important;border-radius:0!important;text-align:center;font-weight:700;font-variant-numeric:tabular-nums;padding:0 2px!important;min-height:46px!important;background:transparent!important}
.tv2-ok{width:46px;height:46px;border-radius:50%;border:2px solid var(--tv-line);background:none;color:var(--bg);font-size:20px;font-weight:700}
.tv2-set.done .tv2-ok{background:var(--g);border-color:var(--g)}.tv2-set.done .tv2-step{opacity:.75}
.tv2-ex-actions{display:flex;gap:6px;margin-top:6px}.tv2-nav{display:flex;justify-content:space-between;margin-top:16px;border-top:1px solid var(--tv-line);padding-top:8px}
.tv2-run-empty{text-align:center;padding:48px 16px}
.tv2-rest{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;gap:10px;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));background:var(--card);border-top:1px solid var(--tv-line);flex-wrap:wrap}
.tv2-rest[hidden]{display:none}.tv2-rest>span{font-size:13px;color:var(--t2)}.tv2-rest strong{font-family:var(--fd);font-size:22px;font-variant-numeric:tabular-nums}
.tv2-rest-bar{flex:1 1 60px;height:4px;background:var(--tv-line);border-radius:2px;overflow:hidden}.tv2-rest-bar i{display:block;height:100%;background:var(--a);transition:width .25s linear}
.tv2-rest button{min-height:44px;padding:0 12px;border:1px solid var(--tv-line);background:var(--card);color:var(--t);border-radius:var(--tv-r);font-weight:600}
@media(max-width:480px){.tv2-rest{flex-wrap:nowrap;gap:6px}.tv2-rest>span{display:none}.tv2-rest button{padding:0 9px;font-size:14px}.tv2-rest-bar{flex:1 1 16px;min-width:16px}}
@media(min-width:900px){
 .tv2-run-grid{flex-direction:row}.tv2-pager{flex-direction:column;width:280px;overflow-y:auto;overflow-x:hidden;border-right:1px solid var(--tv-line);padding:14px 12px}
 .tv2-pg{justify-content:flex-start;height:auto;min-height:48px;padding:8px 12px;text-align:left}.tv2-pg span{display:block;flex:1;font-size:14px;font-weight:600}.tv2-pg small{display:block;color:var(--t2);font-size:12px}
 .tv2-run-main{padding:18px 32px 110px}.tv2-sets{max-width:640px}
}
@media(prefers-reduced-motion:reduce){.tv2 *,.tv2-sheet *,.tv2-run *{transition:none!important;animation:none!important}}
