/* GPFit — Trening v2 („Volt”). Korzeń: .pv.tv – bazuje na systemie z progress-v2.css, tu tylko klasy .tv- */
#view .pv.tv{padding-bottom:112px}
#view .tv label{font-size:inherit!important;color:inherit!important;letter-spacing:0!important;margin:0}
#view .tv b{font-weight:700!important}
#view .tv h2,#view .tv h3{letter-spacing:0!important}
#view .tv .tv-lbl{display:block;font-size:13px!important;font-weight:600;color:var(--t2)!important;margin:0 0 6px}
#view .tv .tv-lbl .pv-muted{font-weight:400}

/* nagłówek dnia */
#view .tv-head{padding:16px 16px 12px;display:flex;flex-direction:column;gap:4px}
#view .tv-dateline{display:flex;align-items:center;justify-content:space-between;gap:10px}
#view .tv-datetxt{font-size:14px;color:var(--t2)}
#view .tv-datebtn{position:relative;display:inline-flex!important;align-items:center;gap:6px;min-height:44px;padding:0 12px;border-radius:14px;border:1px solid var(--ln);color:var(--t1)!important;font-size:14px!important;font-weight:600;cursor:pointer;flex:none;overflow:hidden}
#view .tv-datebtn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-datebtn input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;border:0;padding:0;margin:0;min-height:0!important;font-size:16px}
#view .tv-datebtn:focus-within{outline:2px solid var(--a);outline-offset:2px}
#view .tv-title{font-size:40px;line-height:1;margin-top:2px;overflow-wrap:anywhere}
#view .tv-title.long{font-size:32px}
#view .tv-backdate{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:6px}
#view .tv-backdate .pv-pill{text-transform:none;letter-spacing:0;font-size:13px;color:var(--t1);border-color:var(--bad)}
#view .tv-backdate .pv-link{min-height:36px}
#view .tv-prog{display:flex;align-items:center;gap:10px;margin-top:10px}
#view .tv-progbar{flex:1;height:8px;background:var(--s2);border-radius:4px;overflow:hidden}
#view .tv-progbar i{display:block;height:100%;width:0;background:var(--a);border-radius:4px;transition:width .3s}
#view .tv-prog span{font-size:13px;color:var(--t2);font-variant-numeric:tabular-nums;white-space:nowrap}
#view .tv-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}

/* karta ćwiczenia */
#view .tv-card{padding:14px 12px 12px;display:flex;flex-direction:column;gap:10px;scroll-margin-top:124px}
#view .tv-cardhead{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:0 4px}
#view .tv-cardtxt{display:flex;flex-direction:column;gap:2px;min-width:0}
#view .tv-kicker{font-size:12px;font-weight:700;color:var(--a);text-transform:uppercase;letter-spacing:.06em}
#view .tv .tv-cardtitle{margin:0;font-family:inherit;font-size:20px!important;font-weight:700!important;line-height:1.2;text-transform:none;color:var(--t1)}
#view .tv-cardbtns{display:flex;gap:6px;flex:none}
#view .tv-iconbtn{width:44px;height:44px;display:inline-flex!important;align-items:center;justify-content:center;border-radius:14px!important;border:1px solid var(--ln)!important;color:var(--t1)}
#view .tv-iconbtn.ghost{border-color:transparent!important;color:var(--t2)}
#view .tv-iconbtn.sm{width:40px;height:40px}
#view .tv-iconbtn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-login{display:flex;flex-direction:column;gap:10px;align-items:flex-start}

/* boksy: notatka trenera / podpowiedź / już zapisane */
#view .tv-box{display:flex;gap:10px;align-items:flex-start;background:var(--s2);border-radius:14px;padding:12px 14px}
#view .tv-box p{margin:0;font-size:14px;line-height:1.4}
#view .tv-boxico{flex:none;margin-top:1px;color:var(--a)}
#view .tv-boxico svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view .tv .tv-boxtag{display:block;font-size:12px;font-weight:700!important;text-transform:uppercase;letter-spacing:.06em;color:var(--a);margin-bottom:2px}
#view .tv-box p b{color:var(--a)}
#view .tv-box .tv-boxmeta{margin-top:6px;font-size:13px;color:var(--t2)}
#view .tv-box.warn{background:rgba(255,138,101,.10)}
#view .tv-box.warn .tv-boxico,#view .tv-box.warn .tv-boxtag,#view .tv-box.warn p b{color:var(--bad)}
#view .tv-box.plan{background:transparent;border:1px solid var(--ln)}
#view .tv-box.plan .tv-boxico,#view .tv-box.plan .tv-boxtag{color:var(--t2)}
#view .tv-box.done{background:transparent;border:1px dashed var(--ln);padding:10px 14px}
#view .tv-box.done p{color:var(--t2)} #view .tv-box.done p b{color:var(--t1)}
#view .tv-noplan{margin:0}

/* serie */
#view .tv-sethead,#view .tv-setrow{display:grid;grid-template-columns:20px minmax(0,1fr) minmax(0,1fr) 34px 44px;gap:6px;align-items:start}
#view .tv-sethead{padding:0 2px;font-size:11px;color:var(--t2);margin-bottom:-8px}
#view .tv-sethead span:last-child{text-align:center;font-size:11px}
#view .tv-sets{display:flex;flex-direction:column;gap:6px}
#view .tv-set{display:flex;flex-direction:column;gap:4px}
#view .tv-setn{font-family:var(--disp);font-weight:600;font-size:16px;color:var(--t2);text-align:center;line-height:44px}
#view .tv-field{display:flex!important;flex-direction:column;gap:2px;min-width:0}
#view .tv .tv-in{width:100%;height:44px;min-height:44px!important;border-radius:12px!important;border:1px solid #60665a!important;background:var(--bg)!important;color:var(--t1)!important;font-family:var(--disp)!important;font-weight:600!important;font-size:20px!important;text-align:center;padding:0 6px!important;outline:none;box-shadow:none!important;font-variant-numeric:tabular-nums}
#view .tv .tv-in::placeholder{color:#5c6150!important;opacity:1}
#view .tv .tv-in:focus{border-color:var(--a)!important;box-shadow:0 0 0 3px rgba(215,255,63,.2)!important}
#view .tv-field small{font-size:11px;color:var(--t3);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
#view .tv-field small.tg{color:var(--t2)}
#view .tv-more,#view .tv-check{height:44px;min-height:44px!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center;border-radius:12px!important}
#view .tv-more{width:34px;color:var(--t3)}
#view .tv-more.has{color:var(--a)}
#view .tv-more svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-check{width:44px;border:1px solid #3a3e34!important;color:var(--t3)}
#view .tv-check svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
#view .tv-set.done .tv-check{background:var(--a)!important;border-color:var(--a)!important;color:var(--ink)}
#view .tv-set.done .tv-in{background:transparent!important;border-color:#4a4f43!important;color:var(--t2)!important}
#view .tv-setplan{margin:0 0 0 26px;font-size:13px;color:var(--t2);line-height:1.35}
#view .tv-setplan b{color:var(--t1);font-weight:600!important}
#view .tv-setopts{margin-left:26px;background:var(--s2);border-radius:14px;padding:10px 12px}
#view .tv-setopts-row{display:flex;gap:8px;flex-wrap:wrap}
#view .tv-setopts-row .input{flex:1 1 180px;min-width:0}
#view .tv-del{color:var(--bad)!important;border-color:rgba(255,138,101,.4)!important}
#view .tv-exnote{padding-top:2px}
#view .tv .tv-textarea{width:100%;min-height:44px!important;resize:vertical;padding:10px 12px!important;font-size:16px!important;line-height:1.4}
#view .tv-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:8px;margin-top:2px}
#view .tv-actions .pv-btn{min-height:52px;width:100%}

/* lista planu + wyszukiwarka */
#view .tv-sechead{margin:0 0 0 0}
#view .tv-sechead .pv-h2{margin:0 4px}
#view .tv-sechead .pv-muted{margin-right:4px}
#view .tv-planrow,#view .tv-pickrow{display:grid!important;grid-template-columns:36px minmax(0,1fr) auto;gap:12px;align-items:center;width:100%;padding:12px 16px!important;min-height:64px;border-top:1px solid var(--s2)!important;text-align:left!important}
#view .tv-pickrow{grid-template-columns:minmax(0,1fr) auto 20px;min-height:58px}
#view .tv-planrow:disabled{opacity:.6;cursor:default}
#view .tv-planrow.active{background:var(--s2)!important;box-shadow:inset 3px 0 0 var(--a)}
#view .tv-num{width:36px;height:36px;border-radius:18px;background:var(--s2);display:flex;align-items:center;justify-content:center;font-family:var(--disp);font-weight:600;font-size:18px}
#view .tv-planrow.active .tv-num{background:var(--bg)}
#view .tv-planrow.done .tv-num{background:var(--a);color:var(--ink)}
#view .tv-num svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
#view .tv-planname{display:flex;flex-direction:column;min-width:0}
#view .tv .tv-planname b{font-size:15px;font-weight:600!important;line-height:1.25}
#view .tv-planname span{font-size:13px;color:var(--t2);line-height:1.35}
#view .tv-planrow.done .tv-planname b{color:var(--t2)}
#view .tv-todo{font-size:12px;font-weight:600;color:var(--t3);white-space:nowrap}
#view .tv-tag{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--a);border:1px solid rgba(215,255,63,.35);border-radius:10px;padding:2px 8px;white-space:nowrap}
#view .tv-chev{color:var(--t3);display:flex}
#view .tv-chev svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .15s}
#view .tv .tv-subh{margin:6px 4px 0;font-size:13px!important;font-weight:700!important;text-transform:uppercase;letter-spacing:.06em!important;color:var(--t2);font-family:inherit}
#view .tv-subh span{color:var(--t3);font-weight:500}
#view .tv-empty p{margin:0;color:var(--t2)}
#view .tv-addbtn{width:100%;min-height:52px;border-style:dashed!important}
#view .tv-picker{gap:12px}
#view .tv-partchips{gap:6px}
#view .tv-pickgroup{display:flex;flex-direction:column;gap:8px;margin-top:4px}
#view #tvPickList{display:flex;flex-direction:column;gap:6px}

/* dziennik */
#view .tv-jseg{grid-auto-columns:minmax(0,1fr)}
#view .tv-jdate{display:flex!important;flex-direction:column;gap:2px}
#view .tv-jlist{display:flex;flex-direction:column;gap:10px}
#view .tv-jday{background:var(--s1);border-radius:18px;overflow:hidden}
#view .tv-jdayhead{display:grid!important;grid-template-columns:minmax(0,1fr) 20px;grid-template-areas:"d c" "p c" "s c";column-gap:10px;row-gap:2px;width:100%;padding:14px 16px!important;text-align:left!important;align-items:center}
#view .tv-jdate1{grid-area:d;display:flex;align-items:baseline;gap:8px}
#view .tv .tv-jdate1 b{font-family:var(--disp);font-size:22px;font-weight:600!important;line-height:1.1}
#view .tv-jdate1 em{font-style:normal;font-size:12px;font-weight:700;color:var(--a);text-transform:uppercase;letter-spacing:.05em}
#view .tv-jparts{grid-area:p;font-size:14px;color:var(--t2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#view .tv-jstats{grid-area:s;display:flex;flex-wrap:wrap;gap:4px 12px;font-size:13px;color:var(--t2);font-variant-numeric:tabular-nums;margin-top:4px}
#view .tv-jstats b{color:var(--t1);font-weight:600!important}
#view .tv-jdayhead .tv-chev{grid-area:c}
#view .tv-jday.open .tv-jdayhead .tv-chev svg,#view .tv-jex.open .tv-jextoggle .tv-chev svg{transform:rotate(90deg)}
#view .tv-jentries{border-top:1px solid var(--s2);padding:4px 0}
#view .tv-jex{padding:4px 8px 4px 16px;border-top:1px solid var(--s2)}
#view .tv-jentries>.tv-jex:first-child{border-top:0}
#view .tv-jexhead{display:grid;grid-template-columns:minmax(0,1fr) 40px 40px;gap:4px;align-items:center}
#view .tv-jextoggle{display:flex!important;align-items:center;justify-content:space-between;gap:8px;min-height:56px;text-align:left!important;min-width:0}
#view .tv-jextoggle .pv-pill{text-transform:none;letter-spacing:0;font-size:12px}
#view .tv .pv-icon.has{color:var(--a)}
#view .tv-jexnote{margin:0 8px 8px 0;display:flex;gap:6px;font-size:13px;color:var(--t2);line-height:1.4}
#view .tv-jexnote svg,#view .tv-jsetnote svg{width:15px;height:15px;flex:none;margin-top:2px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-jsets{list-style:none;margin:0 0 8px;padding:0;display:flex;flex-direction:column}
#view .tv-jset{display:grid;grid-template-columns:22px minmax(0,1fr) 26px 40px;gap:8px;align-items:center;padding:4px 0;border-top:1px solid var(--s2);font-variant-numeric:tabular-nums}
#view .tv-jset:first-child{border-top:0}
#view .tv-jn{font-family:var(--disp);font-weight:600;font-size:18px;color:var(--t3);text-align:center}
#view .tv-jval{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 6px;font-size:15px;min-width:0}
#view .tv-jval small{font-size:11px;color:var(--t3);margin-left:1px}
#view .tv-jval em{font-style:normal;font-size:12px;color:var(--t3);margin-left:4px}
#view .tv-jsetnote{flex-basis:100%;display:flex;gap:5px;font-size:13px;color:var(--t2)}
#view .tv-jst{display:flex;justify-content:center}
#view .tv-jst svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
#view .tv-jst.ok{color:var(--a)} #view .tv-jst.bad{color:var(--bad)}
#view .tv-jset.edit{display:block;padding:8px 0}
#view .tv-jform{display:grid;grid-template-columns:22px minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:end;padding-right:8px}
#view .tv-jform .tv-jn{align-self:center;padding-top:14px}
#view .tv-jform label{display:flex!important;flex-direction:column;gap:3px}
#view .tv-jform label span{font-size:12px;color:var(--t2)}
#view .tv-jform label.wide{grid-column:2/-1}
#view .tv-jform .input{width:100%;min-width:0}
#view .tv-jformbtns{grid-column:2/-1;display:grid;grid-template-columns:1fr 1.4fr;gap:8px}
#view .tv-jnoteform{display:flex;flex-direction:column;gap:8px;padding:0 8px 10px 0}
#view .tv-jnoteform .tv-jformbtns{grid-column:auto}

/* timer przerwy – pasek nad dolną nawigacją */
#view .tv-timer{position:fixed;z-index:39;left:50%;transform:translateX(-50%);bottom:calc(72px + env(safe-area-inset-bottom));width:calc(100% - 24px);max-width:536px;background:var(--s2);border:1px solid var(--ln);color:var(--t1);border-radius:20px;padding:8px 8px 8px 14px;display:flex;align-items:center;gap:6px;box-shadow:0 10px 30px rgba(0,0,0,.45)}
#view .tv-timer.run{background:#f3f4ee;border-color:#f3f4ee;color:#141510}
#view .tv-timer.fin{background:var(--a);border-color:var(--a);color:var(--ink)}
#view .tv-tdisp{flex:1;min-width:0;display:flex!important;flex-direction:column;align-items:flex-start;line-height:1.05;min-height:48px;justify-content:center}
#view .tv-tlabel{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:600;opacity:.75;white-space:nowrap;overflow:hidden;max-width:100%}
#view .tv-tlabel svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-ttime{font-family:var(--disp);font-weight:700;font-size:32px;font-variant-numeric:tabular-nums;letter-spacing:.01em}
#view .tv-tbtn{min-height:46px;min-width:56px;padding:0 10px!important;border-radius:14px!important;display:inline-flex!important;align-items:center;justify-content:center;gap:5px;font-size:14px;font-weight:700!important;background:rgba(255,255,255,.07)!important;text-align:center!important;flex:none}
#view .tv-tbtn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-tbtn[data-t="start"] svg{fill:currentColor;stroke:none}
#view .tv-tbtn.main{background:var(--a)!important;color:var(--ink)!important;min-width:76px}
#view .tv-tbtn.icon{min-width:46px;width:46px;padding:0!important}
#view .tv-timer.run .tv-tbtn{background:#dfe1d8!important;color:#141510!important}
#view .tv-timer.run .tv-tbtn.main{background:#141510!important;color:#f3f4ee!important}
#view .tv-timer.fin .tv-tbtn{background:rgba(20,21,16,.12)!important;color:var(--ink)!important}
#view .tv-timer.fin .tv-tbtn.main{background:var(--ink)!important;color:var(--a)!important}
#view .tv-tset{position:absolute;left:0;right:0;bottom:calc(100% + 8px);background:var(--s1);color:var(--t1);border:1px solid var(--ln);border-radius:18px;padding:12px 14px 14px;display:flex;flex-direction:column;gap:12px;box-shadow:0 14px 40px rgba(0,0,0,.55)}
#view .tv-tsethead{display:flex;align-items:center;justify-content:space-between}
#view .tv-tpresets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#view .tv-tpresets .pv-chip{text-align:center!important;font-variant-numeric:tabular-nums}
#view .tv-tcustom .input{width:100%}
#view .tv-tauto{display:flex!important;align-items:center;gap:10px;min-height:44px;font-size:14px!important;color:var(--t1)!important;cursor:pointer}
#view .tv-tauto input{width:22px;height:22px;accent-color:var(--a);flex:none}

@media (max-width:360px){
  #view .tv-sethead,#view .tv-setrow{grid-template-columns:18px minmax(0,1fr) minmax(0,1fr) 30px 42px;gap:5px}
  #view .tv-more{width:30px} #view .tv-check{width:42px}
  #view .tv-setplan,#view .tv-setopts{margin-left:26px}
  #view .tv-tbtn{min-width:48px} #view .tv-tbtn.main{min-width:64px}
}
@media (prefers-reduced-motion:reduce){#view .tv-progbar i,#view .tv-chev svg{transition:none}}
#view .tv .pv-search input:focus-visible{outline:none}
#view .tv .pv-search:focus-within{box-shadow:0 0 0 2px var(--a)}
#view .tv a.pv-btn,#view .tv a.pv-link{text-decoration:none!important}
/* wartości z poprzedniego treningu (jeszcze niepotwierdzone) – szare */
#view .tv .tv-in.pre{color:var(--t2)!important;border-style:dashed!important}
#view .tv-ask{display:flex;flex-direction:column;gap:10px;background:var(--s2);border-radius:16px;padding:14px;box-shadow:inset 0 0 0 1px var(--a)}
#view .tv-ask p{margin:0;font-size:14px;line-height:1.4}
#view .tv-askbtns{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:8px}
#view .tv-askbtns .pv-btn{min-height:52px;width:100%;padding:0 10px!important}
#view .tv-ask .pv-link{align-self:center}
#view .tv-draftbtns{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
/* miejsce na pasek timera (≈66 px) nad dolną nawigacją */
#view .pv.tv{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}

/* ===== etap 4: trening z planu „Treningi” ===== */
#view .tv-pw{display:flex;flex-direction:column;gap:8px;margin-top:6px}
#view .tv-pwbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
#view .tv-pwlab{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--t2);min-width:0}
#view .tv-pwlab svg{width:16px;height:16px;flex:none;fill:none;stroke:var(--a);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-pwbar .pv-btn{min-height:44px}
#view .tv-pwparts{margin-top:-4px}
#view .tv-pwlist{display:flex;flex-direction:column;gap:6px;background:var(--s1);border-radius:18px;padding:6px}
#view .tv-pwopt{display:flex!important;align-items:center;gap:12px;min-height:58px;padding:8px 10px!important;border-radius:14px!important;text-align:left!important;width:100%}
#view .tv-pwopt:hover,#view .tv-pwopt:focus-visible{background:var(--s2)!important}
#view .tv-pwopt.on{background:var(--s2)!important;box-shadow:inset 0 0 0 1px var(--a)}
#view .tv-pwopt .tv-planname{flex:1}
#view .tv-pwopt .tv-num svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
#view .tv-chk svg{width:20px;height:20px;fill:none;stroke:var(--a);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#view .tv-h2sub{font-family:var(--g-font);font-size:13px;font-weight:500;color:var(--t2);text-transform:none;letter-spacing:0}
#view .tv-trn{display:inline-block;vertical-align:middle;font-family:var(--g-font);font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:#9fd3ff;border:1px solid rgba(159,211,255,.45);border-radius:8px;padding:1px 6px;margin-right:4px;white-space:nowrap;line-height:1.5}
#view .tv-jdate1 .tv-pwtag{margin-left:8px;font-size:10.5px;padding:1px 7px}

/* ===== klawiatura ekranowa (html.kb-open – globalny skrypt w index.html) ===== */
#view .tv-set:has(.tv-in:focus,.tv-plates button:focus){background:var(--s2);border-radius:14px;margin:-2px -6px 8px;padding:6px 6px 8px;box-shadow:inset 0 0 0 1px rgba(215,255,63,.35)}
#view .tv-set:has(.tv-in:focus,.tv-plates button:focus) .tv-setn{color:var(--a)}
#view .tv .tv-set:has(.tv-in:focus,.tv-plates button:focus) .tv-in{height:48px;min-height:48px!important;font-size:24px!important}
#view .tv .tv-set:has(.tv-in:focus,.tv-plates button:focus) .tv-in:focus{background:#0b0c09!important;border-width:1px!important;border-color:#c9cdbd!important;box-shadow:none!important;outline:none!important}
#view .tv-set:has(.tv-in:focus,.tv-plates button:focus) .tv-field small{color:var(--t1)}
html.kb-open #view .tv-timer:not(.run):not(.fin){display:none}
html.kb-open #view .tv-timer.run,html.kb-open #view .tv-timer.fin{z-index:60;bottom:auto;top:calc(var(--vv-top,0px) + env(safe-area-inset-top,0px) + 8px);left:auto;right:12px;transform:none;width:auto;max-width:none;padding:4px 12px;border-radius:999px;gap:0;pointer-events:none;box-shadow:0 6px 18px rgba(0,0,0,.45)}
html.kb-open #view .tv-timer .tv-tbtn,html.kb-open #view .tv-timer .tv-tset,html.kb-open #view .tv-timer .tv-tlabel{display:none!important}
html.kb-open #view .tv-timer .tv-tdisp{min-height:30px}
html.kb-open #view .tv-timer .tv-ttime{font-size:20px}
#view .tv .tv-in.pre:focus{border-style:solid!important;color:var(--t1)!important}
/* ćwiczenie wpisane przez trenera – dopisywanie serii */
#view .tv-box.trn{border:1px solid rgba(159,211,255,.45)}
#view .tv-box.trn .tv-boxtag{color:#9fd3ff}
#view .tv-box.trn .tv-boxico svg{stroke:#9fd3ff}
#view .tv-saved{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border-top:1px solid var(--s2)}
#view .tv-saved li{display:grid;grid-template-columns:24px minmax(0,1fr) 22px;gap:8px;align-items:center;padding:8px 2px;border-bottom:1px solid var(--s2)}
#view .tv-saved li .tv-setn{line-height:1.2}
#view .tv-saved li>svg{width:20px;height:20px;fill:none;stroke:var(--a);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
#view .tv-aphead,#view .tv-aprow{grid-template-columns:24px minmax(0,1fr) minmax(0,1fr)}
#view .tv-apacts{grid-template-columns:1fr!important}
#view .tv-apacts .pv-btn{width:100%}
/* ===== kompaktowy nagłówek (s7) ===== */
#view .tv-head{padding:10px 16px 8px;gap:2px}
#view .tv-dateline{justify-content:flex-start;gap:6px;min-height:36px}
#view .tv-datetxt{font-size:13px}
#view .tv-datebtn{width:36px;height:36px;min-height:36px;padding:0!important;justify-content:center;border-radius:10px}
#view .tv-datebtn svg{width:17px;height:17px}
#view .tv-titlerow{display:flex;align-items:center;gap:10px;min-width:0}
#view .tv-title,#view .tv-title.long{flex:1;min-width:0;font-size:30px!important;line-height:1.1;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
#view .tv-pwbtn{flex:none;min-height:40px!important;padding:0 12px!important;font-size:13px!important;gap:6px!important}
#view .tv-pwbtn svg{width:16px!important;height:16px!important}
#view .tv-sub{margin:0!important;font-size:13px;line-height:1.35;color:var(--t2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#view .tv-pw{margin-top:6px}
#view .tv-pwprev{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;color:var(--t3);max-width:100%}
#view .tv-pwopt .tv-planname{min-width:0}
#view .tv-daylab{font-size:11px;font-weight:600;color:var(--t2);text-transform:uppercase;letter-spacing:.04em;margin-left:4px}
#view .tv-prog{margin-top:6px}
#view .tv-backdate{margin-top:4px}
/* Czat nad paskiem timera: mniejszy dymek po LEWEJ (nad numerami serii), żeby nie zasłaniał „zrobiona” ani pól */
html:has(#view .tv-timer) #gptfit-chat-bubble{left:8px!important;right:auto!important;width:44px!important;height:44px!important;font-size:18px!important}

/* podpowiedź: zwijanie / wersja jednoliniowa */
#view .tv-box.hint{position:relative;padding-right:44px}
#view .tv-box .tv-boxbody{min-width:0}
#view .tv-hintfold{position:absolute;top:6px;right:6px;width:36px;height:36px;min-height:0!important;padding:0!important;border:0!important;border-radius:10px!important;background:none!important;box-shadow:none!important;color:var(--t3);display:grid;place-items:center;cursor:pointer}
#view .tv-hintfold:hover,#view .tv-hintfold:focus-visible{background:rgba(255,255,255,.06);color:var(--t1)}
#view .tv-hintfold svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
#view .tv-hintmini{display:flex!important;align-items:center;gap:8px;width:100%;min-height:38px;padding:4px 10px 4px 12px!important;border:0!important;border-radius:12px!important;background:var(--s2)!important;box-shadow:none!important;color:var(--t1);font:inherit;font-size:14px;font-weight:600;text-align:left;cursor:pointer}
#view .tv-hintmini .tv-boxico svg{width:18px;height:18px}
#view .tv-hintmini-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#view .tv-hintmini.ok .tv-hintmini-t{color:var(--a)}
#view .tv-hintmini.warn{background:rgba(255,138,101,.10)!important}
#view .tv-hintmini.warn .tv-boxico,#view .tv-hintmini.warn .tv-hintmini-t{color:var(--bad)}
#view .tv-hintmini-c{color:var(--t3);transform:rotate(90deg);display:grid}
#view .tv-hintmini-c svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Zakończ trening */
#view .tv-fintop{display:inline-flex!important;align-items:center;gap:5px;min-height:32px;padding:0 10px!important;border:1px solid var(--ln)!important;border-radius:99px!important;background:none!important;color:var(--t1)!important;font:inherit;font-size:13px!important;font-weight:600!important;white-space:nowrap;cursor:pointer;box-shadow:none!important}
#view .tv-fintop[hidden]{display:none!important}
#view .tv-fintop svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-fintop.on{border-color:rgba(215,255,63,.4)!important;color:var(--a)!important}
#view .tv-finishwrap{margin:14px 0 4px}
#view .tv-finish{width:100%;justify-content:center;min-height:52px;font-size:16px}
#view .tv-finish svg,#view .tv-finishask .pv-btn svg,#view .tv-finico svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-finishask{margin:14px 0;display:flex;flex-direction:column;gap:10px;box-shadow:inset 0 0 0 1px rgba(215,255,63,.35)}
#view .tv-finishask p{margin:0}
#view .tv-finishask .tv-askbtns,#view .tv-finished .tv-askbtns{display:flex;flex-wrap:wrap;gap:8px}
#view .tv-finishask .tv-askbtns .pv-btn,#view .tv-finished .tv-askbtns .pv-btn{flex:1 1 160px;justify-content:center}
#view .tv-finished{display:flex;flex-direction:column;gap:12px;background:linear-gradient(160deg,#262c12,var(--s1) 65%);box-shadow:inset 0 0 0 1px rgba(215,255,63,.35);margin-bottom:14px}
#view .tv-finhead{display:flex;gap:12px;align-items:center}
#view .tv-finhead p{margin:2px 0 0}
#view .tv-finico{flex:none;width:44px;height:44px;border-radius:50%;background:var(--a);color:var(--ink);display:grid;place-items:center}
#view .tv-finstats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#view .tv-finstats div{background:rgba(0,0,0,.25);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;min-width:0}
#view .tv-finstats b{font-family:var(--g-display,inherit);font-weight:700;font-size:28px;line-height:1.1;color:var(--a)}
#view .tv-finstats span{font-size:12.5px;color:var(--t2)}
#view .tv-finished p{margin:0}
#view .tv-finlink{display:flex!important;align-items:center;justify-content:center;gap:8px;width:100%;min-height:46px;margin-top:10px;padding:0 14px!important;border:1px dashed var(--ln)!important;border-radius:14px!important;background:none!important;color:var(--t2)!important;font:inherit;font-size:15px!important;font-weight:600!important;cursor:pointer;box-shadow:none!important}
#view .tv-finlink:hover,#view .tv-finlink:focus-visible{color:var(--t1)!important;border-color:var(--t3)!important}
#view .tv-finlink svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* rekordy po treningu */
#view .tv-recs{background:rgba(215,255,63,.08);border:1px solid rgba(215,255,63,.35);border-radius:14px;padding:10px 12px}
#view .tv-recs-h{display:flex;align-items:center;gap:8px;margin:0 0 6px!important;color:var(--a);font-size:15px}
#view .tv-recs-h svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view .tv-recs ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
#view .tv-recs li{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:7px 0;border-top:1px solid rgba(255,255,255,.06)}
#view .tv-recs li:first-child{border-top:0}
#view .tv-rec-n{font-weight:600;font-size:14px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#view .tv-rec-v{display:flex;flex-direction:column;align-items:flex-end;flex:none;line-height:1.2}
#view .tv-rec-v small{font-size:11px;color:var(--t2);text-transform:uppercase;letter-spacing:.05em}
#view .tv-rec-v b{font-family:var(--g-display,inherit);font-size:20px;color:var(--t1)}
#view .tv-rec-v em{font-style:normal;font-size:11.5px;color:var(--t3)}
#view .tv-finished .tv-sharebtn{width:100%;min-height:52px;justify-content:center;gap:8px}
#view .tv-jentries .tv-jshare{width:100%;min-height:46px;justify-content:center;gap:8px;margin-top:10px}
/* dokładki pod serią */
#view .tv-plates{display:flex;gap:6px;margin:6px 0 2px 26px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
#view .tv-plates::-webkit-scrollbar{display:none}
#view .tv-plates button{flex:none;min-width:48px;min-height:38px;padding:0 10px;border-radius:11px;border:1px solid rgba(255,255,255,.14);background:var(--s2);color:var(--t1);font:inherit;font-weight:700;font-size:14px;cursor:pointer}
#view .tv-plates button::before{content:'+';opacity:.7;margin-right:1px}
#view .tv-plates.minus button[data-plate]::before{content:'−'}
#view .tv-plates .tv-plsign{min-width:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;line-height:1;background:transparent;color:var(--a);border-color:rgba(215,255,63,.45);font-size:20px}
#view .tv-plates .tv-plsign::before{content:none}
#view .tv-plates button.hit{background:var(--a);color:var(--ink);border-color:var(--a)}
/* tryb skupienia: przy wpisywaniu serii reszta ekranu przyciemniona */
#view .tv :is(.tv-head,.tv-tabs,.tv-cardhead,.tv-hintmini,.tv-sethead,.tv-set,.tv-exnote,.tv-actions,.tv-addbtn,#tvPanelToday>.pv-sec){transition:opacity .15s ease}
#view .tv:has(.tv-set .tv-in:focus,.tv-set .tv-plates button:focus) :is(.tv-head,.tv-tabs,.tv-cardhead,.tv-hintmini,.tv-sethead,.tv-set:not(:has(.tv-in:focus,.tv-plates button:focus)),.tv-exnote,.tv-actions,.tv-addbtn,#tvPanelToday>.pv-sec){opacity:.28}
/* po odhaczeniu serii ramka przechodzi na następną niezrobioną serię ćwiczenia (bez klawiatury) */
#view .tv-sets:has(>.tv-set.done):not(:has(.tv-in:focus,.tv-plates button:focus))>.tv-set:not(.done):not(.tv-set:not(.done) ~ .tv-set){background:var(--s2);border-radius:14px;margin:-2px -6px 8px;padding:6px 6px 8px;box-shadow:inset 0 0 0 1px rgba(215,255,63,.35)}
#view .tv-sets:has(>.tv-set.done):not(:has(.tv-in:focus,.tv-plates button:focus))>.tv-set:not(.done):not(.tv-set:not(.done) ~ .tv-set) .tv-setn{color:var(--a)}
#view .tv-set.done .tv-plates{display:none}
#view .tv-finstats .tv-finsub{font-size:11.5px;color:var(--t3,#8a8d82)}
