/*
 VOICE: spokojny dziennik treningowy na siłownię i trasę
 IDEA: kartka planu od trenera – niebieskie = plan, żółte pola = Twoje wpisy (jak w Excelu)
 PICTURE: pasek tygodnia z kropkami treningów, karty ćwiczeń z odhaczanymi seriami
 COLOUR / TYPE: granat #1f2a44, czerwień bieżni #c4432a, żółć wpisów #fff4c2; systemowy krój
 LAYOUT: jedna kolumna na telefon, dolne menu, duże pola dotykowe
*/
:root{color-scheme:light;--navy:#1f2a44;--red:#c4432a;--red2:#9f3320;--ink:#1a1716;--muted:#5c5652;--line:#e6e1dc;--bg:#f6f4f1;--card:#fff;--yel:#fff4c2;--yel2:#e6d27a;--blue:#2e5aac;--ok:#2f7d4f}
*{box-sizing:border-box;min-width:0}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;padding-bottom:calc(84px + env(safe-area-inset-bottom))}
button,input,select,textarea{font:inherit;color:inherit}
.top{position:sticky;top:0;z-index:20;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:17px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.logo{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--red);font-size:13px;font-weight:800;flex:none}
.send-top{border:0;border-radius:999px;background:#fff;color:var(--navy);font-weight:700;min-height:40px;padding:0 16px;display:flex;align-items:center;gap:6px}
.send-top.hot{background:#ffd23f}
.send-top span:empty{display:none}
.send-top span{background:var(--red);color:#fff;border-radius:999px;font-size:12px;min-width:20px;height:20px;display:grid;place-items:center;padding:0 5px}
main{max-width:720px;margin:0 auto;padding:14px 14px 24px}
h1,h2,h3{line-height:1.2;margin:0}
.date{font-size:22px;margin:14px 2px 10px;text-transform:none}
.date::first-letter{text-transform:uppercase}
.lead-s{color:var(--muted);margin:0 2px 12px}
.sub{font-size:16px;margin:20px 2px 8px;color:var(--muted)}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px;margin:0 0 12px;display:block;width:100%;text-align:left}
.kicker{font-size:13px;color:var(--muted);font-weight:600;margin-bottom:4px}
.muted,.small{color:var(--muted)}
.small{font-size:14px}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 20px;border-radius:12px;border:2px solid var(--navy);background:#fff;color:var(--navy);font-weight:700;cursor:pointer;text-decoration:none}
.btn.primary{background:var(--red);border-color:var(--red);color:#fff}
.btn.ghost{background:transparent}
.btn.danger{border-color:#b42318;color:#b42318}
.btn.big{min-height:56px;font-size:18px}
.btn.small{min-height:40px;padding:0 14px;font-size:15px}
.btn.wide{width:100%;margin-top:8px}
.btn:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #ffd23f;outline-offset:2px}
.link{background:none;border:0;padding:0;color:var(--blue);text-decoration:underline;font-weight:600;cursor:pointer}
/* tydzień */
.week{display:flex;align-items:center;gap:6px}
.days{flex:1;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.day{border:1px solid var(--line);background:#fff;border-radius:12px;min-height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:4px 0;cursor:pointer}
.day span:first-child{font-size:12px;color:var(--muted)}
.day b{font-size:18px}
.day.today{border-color:var(--navy)}
.day.sel{background:var(--navy);color:#fff;border-color:var(--navy)}
.day.sel span:first-child{color:#cdd3e0}
.mks{display:flex;gap:3px;min-height:8px}
.mk{width:8px;height:8px;border-radius:50%;display:block}
.mk.s{background:var(--red)}.mk.r{background:var(--blue)}
.mk.ok{box-shadow:0 0 0 2px #fff,0 0 0 3.5px var(--ok)}
.nav-w{border:0;background:none;font-size:30px;width:32px;min-height:66px;color:var(--navy);cursor:pointer}
/* karty treningów */
.strength{border-left:6px solid var(--red)}
.run{border-left:6px solid var(--blue)}
.run.free{border-left-color:var(--line)}
.card h3{font-size:19px;margin-bottom:6px}
.dist{color:var(--blue);font-weight:800;white-space:nowrap}
.desc{white-space:pre-line;margin:6px 0}
.pill{display:inline-block;background:#eef2fa;border-radius:999px;padding:4px 12px;margin:4px 0;font-size:15px}
.pill.ok{background:#e7f4ec}
.note{background:#eef2fa;border-radius:10px;padding:8px 12px;margin:8px 0;font-size:15px}
.mini{margin:6px 0 12px;padding-left:0;list-style:none;display:grid;gap:2px;font-size:15px}
.mini b{display:inline-block;min-width:28px;color:var(--red)}
.muted-card{background:transparent;border-style:dashed}
.info p{white-space:pre-line}
/* sesja */
.sess-head{display:flex;align-items:flex-start;gap:10px;margin:6px 0 12px}
.sess-head h2{font-size:22px}
.back{border:0;background:#fff;border:1px solid var(--line);border-radius:10px;min-height:40px;padding:0 12px;font-weight:700;color:var(--navy);flex:none;cursor:pointer}
.warm-link{display:flex;justify-content:space-between;align-items:center;gap:10px;background:#fff8e6;border-color:#f0d9a4;cursor:pointer;min-height:56px}
.ex-head{display:flex;align-items:center;gap:10px}
.ex-head h3{flex:1;margin:0}
.code{background:var(--red);color:#fff;border-radius:8px;font-weight:800;font-size:14px;padding:3px 8px;flex:none}
.film{font-weight:700;color:var(--blue);text-decoration:none;white-space:nowrap;padding:8px 4px}
.planline{font-weight:700;color:var(--navy);margin:8px 0 4px;font-size:17px}
.prev{font-size:14px;color:var(--muted);margin:4px 0}
.sets{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0}
.set{width:44px;height:44px;border-radius:50%;border:2px solid var(--navy);background:#fff;font-weight:800;cursor:pointer}
.set.on{background:var(--ok);border-color:var(--ok);color:#fff}
/* pola */
.grid2,.grid3{display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}
.fld{display:flex;flex-direction:column;gap:4px;margin:8px 0 0}
.fld span{font-size:13px;font-weight:600;color:var(--muted)}
.fld input,.fld select,.fld textarea{width:100%;min-height:48px;border:1.5px solid var(--yel2);background:var(--yel);border-radius:10px;padding:10px 12px;font-size:16px}
.fld textarea{min-height:70px;resize:vertical}
.more{margin-top:8px}
.more summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:40px;display:flex;align-items:center}
.fb{border-left:6px solid var(--navy)}
/* rozgrzewka */
.stage h3{display:flex;align-items:center;gap:10px}
.num{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--navy);color:#fff;font-size:15px;flex:none}
.stage ol{margin:10px 0 0;padding-left:20px;display:grid;gap:10px}
.ramp{display:grid;gap:6px;padding-left:20px}
/* listy */
.row-btn{display:flex;flex-direction:column;gap:2px;cursor:pointer;min-height:64px}
.list{list-style:none;margin:0;padding:0}
.list li{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}
.list li:last-child{border-bottom:0}
.rep summary{cursor:pointer;min-height:40px;display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.tag{background:#e7f4ec;color:var(--ok);border-radius:999px;padding:1px 8px;font-size:13px;font-weight:700}
.steps{display:grid;gap:10px;padding-left:20px;margin:0}
.chart{width:100%;height:auto}
/* start */
.hello{text-align:center;padding:40px 8px;display:flex;flex-direction:column;align-items:center;gap:14px}
.hello h1{font-size:30px}
.logo-big{width:84px;height:84px;border-radius:50%;background:var(--red);color:#fff;display:grid;place-items:center;font-weight:800;font-size:30px}
.err{color:#b42318;min-height:1em}
body[data-view="start"] .bottom{display:none}
/* przerwa, komunikat, menu */
.rest{position:fixed;left:12px;right:12px;bottom:calc(76px + env(safe-area-inset-bottom));z-index:30;background:var(--navy);color:#fff;border-radius:16px;display:flex;align-items:center;gap:12px;padding:10px 14px;box-shadow:0 10px 30px rgba(0,0,0,.3);max-width:696px;margin:0 auto}
.rest b{font-size:28px;flex:1;font-variant-numeric:tabular-nums}
.rest button{border:0;border-radius:10px;min-height:40px;padding:0 12px;background:#fff;color:var(--navy);font-weight:700}
.rest.done{background:var(--ok)}
.toast{position:fixed;left:50%;transform:translateX(-50%);top:calc(70px + env(safe-area-inset-top));z-index:40;background:var(--ink);color:#fff;border-radius:12px;padding:10px 16px;max-width:92vw;font-size:15px}
.bottom{position:fixed;left:0;right:0;bottom:0;z-index:25;background:#fff;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);padding-bottom:env(safe-area-inset-bottom)}
.bottom button{border:0;background:none;min-height:64px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:12px;font-weight:600;color:var(--muted);cursor:pointer}
.bottom svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.bottom button[aria-current="true"]{color:var(--red)}
[hidden]{display:none!important}
@media(max-width:380px){.grid3{grid-template-columns:repeat(2,minmax(0,1fr))}.day b{font-size:16px}}
@media(prefers-reduced-motion:no-preference){.set,.day{transition:background .15s}}
.linkbtn{background:none;border:0;padding:4px 2px;color:var(--blue,#2457c5);font:inherit;font-weight:600;text-decoration:underline;cursor:pointer;min-height:32px}
