/* @session  2026-08-06 11:05  b5546ee4-ed33-47fb-9b31-29c0ba809be0
   @purpose  Style aplikacji treningowej - fork zaakceptowanej karty workouts/2026-08-06-dzien-A.html
   @version  1.0
   @change   Initial

   WYMOGI (user testowal na telefonie, bez tego karta jest bezuzyteczna):
   light only (Chrome mobile wymusza dark), zero marginesow bocznych, tap-targety >=56px,
   font >=18px, tabular-nums na liczbach. */

:root {
  color-scheme: light only;
  /* 🎨 GLOBALNA PALETA KATEGORII - JEDYNE miejsce definicji (decyzja Bartka: zmiana palety
     = edycja tych linii). Jeden kolor = jedno znaczenie WSZEDZIE (kalendarz/mapa/wykresy/tagi). */
  --cat-push:   #c0392b;   /* czerwony */
  --cat-pull:   #1a5fa8;   /* niebieski */
  --cat-legs:   #1a7a45;   /* zielony */
  --cat-core:   #7d3ca3;   /* fiolet */
  --cat-cardio: #d97a1a;   /* pomaranczowy - zone2/bieznia */
  --cat-none:   #b9b9b4;   /* szary - brak/inne */
  /* mapa ekspozycji: stopnie swiezosci bodzca (S3) */
  --expo-fresh:  1.0;   /* dzis/wczoraj - pelny kolor */
  --expo-mid:    0.55;  /* 2-4 dni */
  --expo-old:    0.25;  /* 5-7 dni */
}
* { box-sizing: border-box; }
/* atrybut hidden MUSI wygrywac z display:flex/block z klas (inaczej arkusze wisza na ekranie) */
[hidden] { display: none !important; }
html, body { background:#fff; color:#111; margin:0; padding:0; }
body {
  font: 18px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;            /* zabija 300ms delay + double-tap-zoom (fable) */
  padding-bottom: 84px;                  /* miejsce na dolny pasek */
}

/* ---------- naglowek ---------- */
.hd { background:#1a5fa8; color:#fff; padding:12px 14px; }
.hd h1 { margin:0; font-size:21px; font-weight:700; }
.hd .d { font-size:15px; opacity:.9; margin-top:2px; }

/* ---------- sticky pasek postepu ---------- */
.bar {
  position:sticky; top:0; z-index:20; background:#f2f2f0; border-bottom:1px solid #ccc;
  display:flex; align-items:center; gap:10px; padding:8px 14px;
}
.cnt { font-variant-numeric:tabular-nums; font-weight:700; font-size:17px; min-width:66px; }
.track { flex:1; height:7px; background:#dcdcda; border-radius:99px; overflow:hidden; }
.fill { display:block; height:100%; width:0; background:#1a7a45; transition:width .2s; }
.tmr {
  font:inherit; font-size:16px; font-weight:700; padding:8px 12px; border:1px solid #111;
  background:#fff; color:#111; border-radius:6px; min-width:92px;
  font-variant-numeric:tabular-nums; cursor:pointer;
}
.tmr.run { background:#e8f1fd; border-color:#1a5fa8; color:#1a5fa8; }
.dot { font-size:14px; color:#1a7a45; }
.dot.pending { color:#c8891a; }
.dot.err { color:#c0392b; }

/* ---------- ostrzezenie z planu ---------- */
.warn { background:#fdecea; border-top:3px solid #c0392b; border-bottom:3px solid #c0392b; padding:12px 14px; font-size:17px; }
.warn b { color:#c0392b; }
/* baner zaleglej sesji z poprzedniego dnia */
.warn.openses { background:#fff6e5; border-color:#c8891a; }
.warn.openses b { color:#a8700f; }
.acts2 { display:flex; gap:8px; margin-top:10px; }
.acts2 button { flex:1; min-height:52px; border-radius:8px; font:inherit; font-size:16px; font-weight:700; cursor:pointer; }

/* ---------- sekcje / cwiczenia ---------- */
.sec {
  margin:0; background:#f2f2f0; border-top:1px solid #ccc; border-bottom:1px solid #ccc;
  padding:9px 14px; font-size:15px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
}
figure { margin:0; position:relative; }
figure img { width:100%; display:block; }
figcaption {
  position:absolute; left:0; right:0; bottom:0; background:rgba(0,0,0,.72); color:#fff;
  font-size:14px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:7px 12px;
}
.cue { padding:10px 14px; color:#666; font-size:16px; border-bottom:1px solid #e6e6e4; }
.cue b { color:#111; }

/* ---------- wiersz serii: DWIE STREFY TAPU (fable) ---------- */
ul { list-style:none; margin:0; padding:0; }
li.s {
  display:flex; align-items:center; min-height:64px; border-bottom:1px solid #e6e6e4;
  -webkit-tap-highlight-color:transparent;
}
.tapdone { flex:1; display:flex; align-items:center; gap:12px; padding:12px 14px; cursor:pointer; }
.bx {
  flex:none; width:30px; height:30px; border:3px solid #b9b9b4; border-radius:7px;
  display:grid; place-items:center; font-size:18px; color:transparent;
}
li.s.on .bx { background:#1a7a45; border-color:#1a7a45; color:#fff; }
.kg { font-variant-numeric:tabular-nums; font-weight:800; font-size:22px; min-width:126px; }
.d2 { color:#666; font-size:16px; flex:1; }
li.s.w .kg { color:#1a5fa8; }
li.s.on .kg, li.s.on .d2 { color:#aaa; text-decoration:line-through; }
li.s.opt { opacity:.72; }
.tapedit {
  flex:none; width:64px; align-self:stretch; border:0; border-left:1px solid #e6e6e4;
  background:#fafaf9; font-size:22px; color:#666; cursor:pointer;
}
.feelmark { font-size:20px; margin-left:4px; }

/* rzad zapasu pod odhaczona seria robocza - ocena jednym tapem zamiast czterech przez arkusz */
li.rirbar {
  display:flex; align-items:center; gap:6px; padding:8px 14px 10px;
  background:#f2f7fb; border-bottom:1px solid #e6e6e4;
}
.rirlbl { font-size:14px; color:#555; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
li.rirbar button {
  flex:1; min-height:52px; border:2px solid #c9d8e8; background:#fff; border-radius:10px;
  font:inherit; font-size:20px; font-weight:800; color:#1a5fa8; cursor:pointer;
}
li.rirbar button.rirskip { flex:none; width:52px; font-size:22px; color:#999; border-color:#e0e0dd; }

/* "ostatnio: 36 kg x 9" pod naglowkiem cwiczenia */
.lastbar { display:flex; gap:14px; flex-wrap:wrap; padding:6px 14px 10px; font-size:14px; color:#777; }
.lastbar b { color:#444; font-variant-numeric:tabular-nums; }
.lastbar:empty { display:none; }

/* seria dorzucona ponad plan + przycisk dodawania */
li.s.extra { background:#f7fbf8; }
/* usuwanie dodatkowej serii - w arkuszu, wyraznie oddzielone od Zapisz/Anuluj */
.sdel { width:100%; min-height:48px; border:2px solid #e5b9b3 !important; color:#c0392b !important;
        border-radius:10px; font:inherit; font-size:16px; font-weight:700; background:#fff; margin-bottom:10px; cursor:pointer; }
li.s.extra .d2 { color:#1a7a45; font-weight:600; }
li.addrow { border-bottom:1px solid #e6e6e4; }
button.addset {
  width:100%; min-height:52px; border:0; border-top:1px dashed #cfd8d2; background:#fafcfb;
  font:inherit; font-size:16px; font-weight:700; color:#1a7a45; cursor:pointer;
}

/* ---------- dolny pasek (strefa kciuka) ---------- */
.footbar {
  position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex; gap:8px;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom)); background:#fff; border-top:2px solid #111;
}
/* ikona + PODPIS: sama emotka nie mowila userowi co robi przycisk (feedback 2026-08-06) */
.footbar button {
  font:inherit; font-weight:700; font-size:20px; border-radius:8px; min-height:60px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; line-height:1.1;
}
.footbar button b { font-size:13px; font-weight:700; letter-spacing:.01em; }
.pain { flex:1; background:#c0392b; color:#fff; border:0; }
.undo { flex:1; background:#fff; color:#111; border:2px solid #111; }
.finish { flex:1; background:#1a7a45; color:#fff; border:0; }

/* ---------- arkusze (bottom sheets) ---------- */
.sheet { position:fixed; inset:0; z-index:40; background:rgba(0,0,0,.45); display:flex; align-items:flex-end; }
/* custom-elementy (preferencja Bartka): tagi strukturalne zamiast div+klasa;
   pamietaj o jawnym display - custom tag to domyslnie inline */
sheet-box { display:block; width:100%; background:#fff; border-radius:16px 16px 0 0; padding:16px 14px calc(16px + env(safe-area-inset-bottom)); max-height:92vh; overflow-y:auto; }
sheet-title { display:block; font-size:19px; font-weight:700; margin:4px 0 12px; }

/* etykieta | minus | WARTOSC | plus - kolumny musza byc rowne w kazdym wierszu,
   inaczej "Wzniesienie" rozpycha wiersz i steppery skacza (feedback 2026-08-06) */
.row { display:grid; grid-template-columns:1fr 64px minmax(96px,1.2fr) 64px; align-items:center; gap:8px; margin-bottom:12px; }
.lbl { font-size:15px; color:#555; font-weight:600; }
.val { font-variant-numeric:tabular-nums; font-weight:800; font-size:24px; text-align:center; white-space:nowrap; }
.step {
  width:64px; height:64px; font-size:30px; font-weight:700; border:2px solid #111;
  background:#fff; color:#111; border-radius:12px; cursor:pointer;
}
.step:active { background:#e8f1fd; }

.feels { display:flex; gap:6px; margin-bottom:14px; }
.feels button {
  flex:1; min-height:70px; border:2px solid #ddd; background:#fff; border-radius:12px;
  font-size:26px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; cursor:pointer;
}
.feels button i { font-size:11px; font-style:normal; color:#666; }
.feels button.sel { border-color:#1a5fa8; background:#e8f1fd; border-width:3px; }
.feels.three button { min-height:76px; font-size:30px; }
.lblrow { display:block; margin:0 0 6px; font-size:15px; font-weight:700; color:#444; text-transform:uppercase; letter-spacing:.04em; }
.rir {
  font-variant-numeric:tabular-nums; font-weight:800; font-size:15px; color:#1a5fa8;
  background:#e8f1fd; border-radius:6px; padding:2px 7px; margin-left:4px;
}
li.s.on .rir { color:#8aa8c8; background:#f2f5f8; }
.ta { min-height:96px; resize:vertical; }
.startbox .wide { width:100%; margin-top:10px; min-height:56px; font-size:17px; }
.startbox .scale { grid-template-columns:repeat(5,1fr); }

.grips, .chips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.grips button, .chips button {
  min-height:52px; padding:0 16px; border:2px solid #ddd; background:#fff; border-radius:10px;
  font:inherit; font-size:16px; cursor:pointer;
}
.grips button.sel, .chips button.sel { border-color:#1a5fa8; background:#e8f1fd; }
.chips.big button { min-height:60px; font-size:17px; font-weight:600; }

.scale { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; margin-bottom:14px; }
.scale button {
  min-height:60px; border:2px solid #ddd; background:#fff; border-radius:10px;
  font:inherit; font-size:20px; font-weight:700; cursor:pointer;
}
.scale button.zero { grid-column:span 6; background:#f2f7f4; border-color:#1a7a45; color:#1a7a45; }

.note { width:100%; min-height:52px; padding:10px 12px; border:2px solid #ddd; border-radius:10px; font:inherit; font-size:17px; margin-bottom:14px; }
/* Zapisz ZAWSZE widoczny - arkusz serii nie mieści się na małym ekranie, a przewijanie
   do przycisku przy każdej z ~20 serii to realny koszt na treningu (CR r3/fable) */
.acts {
  display:flex; gap:10px; position:sticky; bottom:0; z-index:2;
  background:#fff; padding-top:10px; margin-top:2px; box-shadow:0 -8px 12px -8px rgba(0,0,0,.18);
}
.acts button { flex:1; min-height:60px; border-radius:10px; font:inherit; font-size:18px; font-weight:700; cursor:pointer; }
.primary { background:#1a7a45; color:#fff; border:0; }
.ghost { background:#fff; color:#111; border:2px solid #ccc; }

/* ---------- pozostale ---------- */
.loading, .empty { padding:40px 16px; text-align:center; color:#666; font-size:17px; }

/* ============ GLOBALNA NAWIGACJA: dolny pasek 4 zakladek ============ */
.mainnav {
  position:fixed; left:0; right:0; bottom:0; z-index:28; display:flex;
  background:#fff; border-top:1px solid #e2e2df; box-shadow:0 -2px 12px rgba(0,0,0,.07);
  padding-bottom:env(safe-area-inset-bottom);
  & > button {
    flex:1; min-height:58px; padding-top:5px; border:0; background:transparent;
    font:inherit; font-size:11.5px; font-weight:700; color:#8a8a86; cursor:pointer;
    display:flex; flex-direction:column; align-items:center; gap:2px; line-height:1.1;
    -webkit-tap-highlight-color:transparent;
    & > b { font-size:20px; font-weight:400; filter:grayscale(1) opacity(.5); }
    &.on {
      color:#1a5fa8;
      & > b { filter:none; }
    }
  }
}
body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
/* w trybie treningu footbar siedzi NAD nawigacja */
.footbar { bottom: calc(56px + env(safe-area-inset-bottom)); }
body.training { padding-bottom: calc(126px + env(safe-area-inset-bottom)); }

/* mini-pasek "trening w toku" na innych zakladkach */
.wobar {
  position:sticky; top:0; z-index:26; display:flex; align-items:center; justify-content:space-between;
  gap:10px; background:#1a7a45; color:#fff; padding:10px 14px; font-size:16px; font-weight:700; cursor:pointer;
}
.wobar .t { font-variant-numeric:tabular-nums; }

/* ============ S1: centrum sterowania ============ */
.dash { padding-bottom:8px; }
.dashhead { display:flex; align-items:baseline; justify-content:space-between; padding:12px 14px 4px; }
.dashhead .dt { font-size:19px; font-weight:800; }
.dashhead .wk { font-size:14px; color:#666; }
.card {
  margin:10px 12px; border:1px solid #e2e2df; border-radius:14px; background:#fff;
  box-shadow:0 1px 4px rgba(0,0,0,.05); overflow:hidden;
}
.card .chead { padding:10px 14px 2px; font-size:13px; font-weight:800; letter-spacing:.06em; color:#888; text-transform:uppercase; }
.card .cbody { padding:8px 14px 12px; }
.cta {
  display:block; width:calc(100% - 28px); margin:4px 14px 14px; min-height:64px; border:0; border-radius:12px;
  background:#1a7a45; color:#fff; font:inherit; font-size:19px; font-weight:800; cursor:pointer;
}
.cta.cont { background:#1a5fa8; }
/* drugorzedna akcja na karcie ("Dzis nie trenuje...") - bez tego renderowal sie goly
   systemowy przycisk (feedback usera ze screenshota) */
button.ghost.wide {
  display:block; width:calc(100% - 28px); margin:0 14px 14px; min-height:50px;
  border:2px solid #d5d4d0; border-radius:12px; background:#fff;
  font:inherit; font-size:16px; font-weight:700; color:#555; cursor:pointer;
}
.planline { font-size:16px; color:#444; }
.planline b { font-size:18px; }
/* pigulki ekspozycji */
.expor { display:flex; gap:8px; overflow-x:auto; padding:4px 14px 12px; -webkit-overflow-scrolling:touch; }
.expor::-webkit-scrollbar { display:none; }
.pill {
  flex:none; display:flex; flex-direction:column; align-items:center; gap:1px;
  min-width:86px; padding:8px 10px; border-radius:12px; border:2px solid #e2e2df; background:#fff;
  font-size:13px; font-weight:700; color:#555; cursor:pointer;
}
.pill b { font-size:15px; color:#111; }
.pill.alert { border-color:#c0392b; }
.pill.alert b { color:#c0392b; }
.pill .w { color:#c0392b; }
/* mini-tydzien */
.wkdots { display:flex; justify-content:space-between; padding:2px 18px 12px; }
.wkdots .d { display:flex; flex-direction:column; align-items:center; gap:4px; font-size:12px; color:#888; }
.wkdots .dot2 { width:14px; height:14px; border-radius:50%; background:var(--cat-none); }
.wkdots .dot2.plan { background:#fff; border:2px solid var(--cat-none); }
.wkdots .today .dlabel { color:#1a5fa8; font-weight:800; }
.lastline { display:flex; justify-content:space-between; align-items:center; font-size:15px; color:#555; }
.lastline b { color:#111; }

/* podglad przyszlego dnia + nadchodzace treningi */
.previewbar {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:#eef4fb; border-bottom:2px solid #1a5fa8; padding:10px 14px; font-size:16px;
}
.previewbar button { min-height:44px; padding:0 12px; border:2px solid #1a5fa8; color:#1a5fa8;
  background:#fff; border-radius:8px; font:inherit; font-size:15px; font-weight:700; cursor:pointer; white-space:nowrap; }
tr.dayrow.current td { background:#eef4fb; }

/* przeglad historii */
tr.dayrow.clickable { cursor:pointer; }
tr.dayrow.clickable:active { background:#eef4fa; }
.backrow { padding:10px 14px 0; }
.backrow button { min-height:44px; padding:0 14px; border:2px solid #ccc; background:#fff; border-radius:8px; font:inherit; font-size:16px; cursor:pointer; }
#exlist { padding:0 14px 6px; }
#exlist button i { font-style:normal; color:#888; font-size:13px; margin-left:4px; }
.chartbox { padding:6px 0 10px; }
.charthead { padding:8px 14px 4px; font-size:18px; font-weight:800; }
.chartsvg { display:block; width:100%; height:150px; padding:0 8px; }
.chartsvg circle { fill:#1a5fa8; }

/* podsumowanie po zakonczonym treningu */
.donebox { padding:18px 0 8px; }
.donehead { font-size:21px; font-weight:800; text-align:center; padding:0 14px 14px; color:#1a7a45; }

/* podglad planu na ekranie startowym: ten sam uklad co karta treningowa (zdjecia + serie),
   tylko bez odhaczania - wiersze nieklikalne */
li.s.pv { min-height:52px; cursor:default; }
li.s.pv .tapdone { cursor:default; padding:9px 14px; }

/* karta treningowa od coacha, osadzona bez ramki i bez wlasnego scrolla */
.cardframe { display:block; width:100%; border:0; min-height:60vh; }

/* lista dzisiejszych wpisow biezni w arkuszu */
.cardiorow {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 0; border-bottom:1px solid #e6e6e4; font-size:16px;
}
.cardiorow button.del { min-height:44px; padding:0 14px; border-radius:8px; font:inherit; font-size:15px; }
.startbox { padding:18px 14px; }
/* tylko BEZPOSREDNIE dzieci - inaczej zielen START-u zalewala skale energii i emotki */
.startbox > button { width:100%; min-height:72px; font-size:20px; font-weight:800; background:#1a7a45; color:#fff; border:0; border-radius:12px; cursor:pointer; }
.startbox > button.ghost { background:#fff; color:#111; border:2px solid #ccc; font-weight:700; }
.toast {
  position:fixed; left:12px; right:12px; bottom:96px; z-index:60; background:#111; color:#fff;
  padding:14px 16px; border-radius:10px; font-size:17px; text-align:center;
  pointer-events:none;                 /* nie moze przechwycic tapu w przycisk pod spodem */
}
.toast.rule { background:#c0392b; font-weight:700; }

/* ============ S2: KALENDARZ (custom-elementy + nested CSS) ============ */
cal-head {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:10px 14px; position:sticky; top:0; background:#f7f6f3; z-index:5;
  & view-toggle {
    display:inline-flex; border:1.5px solid #ccc; border-radius:10px; overflow:hidden;
    & > button {
      min-height:42px; padding:0 16px; border:0; background:#fff; font:inherit; font-size:15px; cursor:pointer;
      &.on { background:#1a5fa8; color:#fff; font-weight:700; }
    }
  }
  & > button.ghost { min-height:42px; padding:0 14px; border-radius:10px; }
}
cal-filters {
  display:block; padding:4px 14px 12px; border-bottom:1px solid #e6e6e4; background:#fbfaf8;
  & filter-cats {
    display:flex; flex-wrap:wrap; gap:8px; padding:6px 0;
    & > button {
      display:inline-flex; align-items:center; gap:7px; min-height:42px; padding:0 13px;
      border:1.5px solid #ccc; border-radius:21px; background:#fff; font:inherit; font-size:15px; cursor:pointer;
      & > i { width:12px; height:12px; border-radius:50%; }
      &.sel { border-color:#1a5fa8; background:#eaf2fb; font-weight:700; }
    }
  }
  & filter-row {
    display:flex; gap:8px; padding:4px 0;
    & > input.note { margin:0; }
    & > input.nrw { flex:0 0 84px; }
    & > button.ghost { min-height:42px; padding:0 12px; border-radius:10px; font-size:14px; }
  }
}
cal-scroll { display:block; }
cal-month {
  display:block; padding:6px 10px 14px;
  & month-title { display:block; font-weight:800; font-size:17px; padding:10px 6px 6px; text-transform:capitalize; }
  & month-grid {
    display:grid; grid-template-columns:repeat(7,1fr); gap:2px;
    & > b.dow { text-align:center; font-size:12px; color:#999; font-weight:600; padding-bottom:2px; }
    & day-cell {
      display:flex; flex-direction:column; align-items:center; gap:2px;
      min-height:52px; padding:4px 0 2px; border-radius:9px; cursor:pointer; position:relative;
      & > b { font-size:15px; font-weight:600; width:28px; height:28px; line-height:28px;
              text-align:center; border-radius:50%; }
      &.today > b { border:2px solid #1a5fa8; color:#1a5fa8; font-weight:800; line-height:24px; }
      &.dim { opacity:.22; }
      & > i.dl { width:14px; height:3px; border-radius:2px; background:#bbb; }
    }
  }
}
dot-row {
  display:flex; gap:3px; min-height:7px;
  & > i.cdot {
    width:7px; height:7px; border-radius:50%; background:var(--c);
    &.plan { background:transparent; border:1.5px solid var(--c); }
    &.half { background:linear-gradient(90deg, var(--c) 50%, transparent 50%); border:1.5px solid var(--c); }
  }
}
cal-foot {
  display:block; position:sticky; bottom:calc(56px + env(safe-area-inset-bottom));
  padding:9px 14px; background:#f0efec; border-top:1px solid #e2e1de;
  font-size:14px; color:#555; font-weight:600;
}
list-day {
  display:flex; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid #eceae6; cursor:pointer;
  &.fut { opacity:.6; }
  & > .ld { flex:0 0 74px; font-weight:800; & > i { font-style:normal; color:#999; font-weight:600; font-size:13px; } }
  & > .lw { flex:1; font-size:15px; color:#333; }
  & > .dots { display:flex; gap:3px; }
  & .cdot { width:9px; height:9px; border-radius:50%; background:var(--c); display:inline-block;
            &.plan { background:transparent; border:1.5px solid var(--c); }
            &.half { background:linear-gradient(90deg,var(--c) 50%,transparent 50%); border:1.5px solid var(--c); } }
}
/* ============ S6: PODSUMOWANIE SESJI ============ */
sum-screen {
  display:flex; align-items:flex-end; position:fixed; inset:0; z-index:85; background:rgba(0,0,0,.5);
  & sum-box {
    display:block; width:100%; max-height:86vh; overflow-y:auto; background:#fff;
    border-radius:18px 18px 0 0; padding:12px 16px calc(20px + env(safe-area-inset-bottom));
  }
}
sum-stats {
  display:flex; gap:8px; padding:6px 0 10px;
  & sum-stat {
    flex:1; display:flex; flex-direction:column; align-items:center; gap:2px;
    background:#f4f3f0; border-radius:12px; padding:10px 4px;
    & > b { font-size:21px; } & > span { font-size:12px; color:#777; }
  }
}

/* upgrady logowania: badge PR + zielony wiersz odhaczonej serii */
.prbadge {
  display:inline-block; background:#c8891a; color:#fff; font-size:12px; font-weight:800;
  padding:2px 7px; border-radius:9px; margin-left:6px; cursor:pointer;
}
li.s.on { background:#edf6ef; }
li.s.on.extra { background:#e6f2e9; }

/* ============ S4: POSTEP - hub ============ */
cat-row {
  display:flex; align-items:center; gap:10px; padding:5px 0; font-size:14.5px;
  & > span { flex:0 0 44px; font-weight:700; color:#666; }
  & > b { flex:0 0 26px; text-align:right; }
  & bar-track { flex:1; display:block; height:12px; background:#eeede9; border-radius:6px; overflow:hidden;
    & bar-fill { display:block; height:100%; border-radius:6px; } }
}
ratio-line { display:block; padding:7px 0 2px; font-size:15px; font-weight:700; color:#1a7a45;
  &.bad { color:#c0392b; } }
.spark { width:100%; height:auto; display:block; }
ex-line i.up { font-style:normal; color:#1a7a45; font-size:13px; }
ex-line i.dn { font-style:normal; color:#c0392b; font-size:13px; }
ex-line i.fl { font-style:normal; color:#999; font-size:13px; }
#pgList ex-line { border-top:1px solid #f0efec; }
.card .cbody ex-line:first-child { border-top:0; }

/* ============ S3: MAPA MIESNI ============ */
map-figs {
  display:flex; justify-content:center; gap:6px; padding:12px 10px 2px;
  & figure {
    flex:1; max-width:200px; margin:0; text-align:center;
    & figcaption { font-size:12px; color:#999; font-weight:700; padding-top:2px; }
  }
}
.bodysvg { width:100%; height:auto; & g { transition:fill .2s; } }
map-legend {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px 10px;
  padding:8px 14px 12px; font-size:12.5px; color:#666;
  & i { width:13px; height:13px; border-radius:50%; display:inline-block; vertical-align:-2px; margin-right:4px;
        &.al { background:#d0cfcb; border:1.6px dashed #b0463a; } }
}
.expor.wrap { flex-wrap:wrap; overflow:visible; }
map-panel { display:block; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:70; }
day-session.inj { border-color:#e5b6ae; background:#fdf6f4; }
pain-bars {
  display:flex; align-items:flex-end; gap:3px; min-height:80px; padding:8px 2px 2px;
  & > i { flex:1; max-width:16px; background:#c0392b; border-radius:3px 3px 0 0; opacity:.85;
          &.z { background:#1a7a45; height:6px !important; } }
}
gate-line {
  display:block; padding:7px 2px; font-size:14.5px; color:#8a4a00; border-top:1px solid #f0e4de;
  &.open { color:#1a7a45; }
}

/* ============ S5: EKRAN CWICZENIA (overlay) ============ */
ex-screen {
  display:block; position:fixed; inset:0; z-index:80; background:#f7f6f3; overflow-y:auto;
  padding-bottom:calc(20px + env(safe-area-inset-bottom));
  & ex-head {
    display:flex; align-items:center; gap:12px; padding:10px 14px;
    background:#fff; border-bottom:1px solid #e6e6e4;
    & > button.nav { min-width:46px; min-height:46px; border-radius:10px; font-size:24px; }
    & img { width:64px; height:64px; object-fit:cover; border-radius:12px; border:1px solid #e2e2df; }
    & ex-title {
      display:flex; flex-direction:column; gap:6px; min-width:0;
      & > b { font-size:18px; line-height:1.2; }
      & grip-bar {
        display:flex; flex-wrap:wrap; gap:6px;
        & > button {
          min-height:34px; padding:0 11px; border:1.5px solid #ccc; border-radius:17px;
          background:#fff; font:inherit; font-size:13px; cursor:pointer;
          &.on { border-color:#1a5fa8; background:#eaf2fb; color:#1a5fa8; font-weight:700; }
        }
      }
    }
  }
  & tab-bar {
    display:flex; background:#fff; border-bottom:2px solid #e6e6e4; position:sticky; top:0; z-index:3;
    & > button {
      flex:1; min-height:48px; border:0; background:transparent; font:inherit; font-size:15px;
      font-weight:700; color:#888; cursor:pointer; border-bottom:3px solid transparent; margin-bottom:-2px;
      &.on { color:#1a5fa8; border-bottom-color:#1a5fa8; }
    }
  }
  & ex-body { display:block; padding:10px 14px; }
  & ex-day {
    display:block; background:#fff; border:1px solid #e6e6e4; border-radius:12px;
    margin-bottom:10px; overflow:hidden;
    & day-head {
      display:flex; align-items:center; gap:8px; padding:9px 12px; background:#fbfaf8;
      border-bottom:1px solid #f0efec; cursor:pointer; font-size:15px;
      & > i { margin-left:auto; font-style:normal; color:#999; font-size:13px; }
    }
    & set-row {
      display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:4px;
      padding:8px 12px; border-bottom:1px solid #f5f4f1; font-size:16px; cursor:pointer;
      &.warm { color:#999; font-size:14px; & i { font-style:normal; } }
      & .chips2 { color:#666; font-size:14px; }
      & set-detail { display:block; width:100%; font-size:13.5px; color:#555; padding-top:4px; }
    }
  }
  & chart-ctl {
    display:block; padding-bottom:6px;
    & .chips { padding:3px 0; & > button { min-height:38px; } }
  }
  & chart-box { display:block; background:#fff; border:1px solid #e6e6e4; border-radius:12px; padding:6px; }
  & .exsvg { width:100%; height:auto; & .ax { font-size:11px; fill:#999; } & circle { cursor:pointer; } }
  & point-detail {
    display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px;
    background:#fff; border:1px solid #e6e6e4; border-radius:12px; padding:10px 12px; font-size:15px;
    & i { color:#1a5fa8; font-style:normal; cursor:pointer; font-size:14px; }
    & > button.nav { min-width:44px; min-height:44px; border-radius:10px; font-size:20px; }
  }
  & rec-toggle {
    display:inline-flex; border:1.5px solid #ccc; border-radius:10px; overflow:hidden; margin-bottom:6px;
    & > button {
      min-height:42px; padding:0 16px; border:0; background:#fff; font:inherit; font-size:15px; cursor:pointer;
      &.on { background:#1a5fa8; color:#fff; font-weight:700; }
    }
  }
  & table.rec {
    width:100%; margin-top:8px; background:#fff; border:1px solid #e6e6e4; border-radius:12px;
    & td { padding:11px 12px; border-bottom:1px solid #f0efec; font-size:16px;
           & i { color:#999; font-style:normal; font-size:13px; } }
    & tr.dom { opacity:.4; }
    & tr { cursor:pointer; }
  }
}

/* panel dnia (S2) i panel partii (S3) uzywaja tych samych klockow: day-box + day-session */
day-panel {
  display:block; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:70;
}
day-panel day-box, map-panel day-box {
  display:block; position:absolute; left:0; right:0; bottom:0; max-height:78vh; overflow-y:auto;
  background:#fff; border-radius:18px 18px 0 0; padding:10px 14px calc(20px + env(safe-area-inset-bottom));
}
panel-head {
  display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0 10px;
  & > b { font-size:17px; text-transform:capitalize; }
  & > button.nav { min-width:46px; min-height:44px; border-radius:10px; font-size:22px; }
  & .pd { color:#666; font-size:14px; }
}
day-session {
  display:block; border:1px solid #e6e6e4; border-radius:12px; padding:10px 12px; margin-bottom:10px;
  & session-line { display:flex; justify-content:space-between; gap:8px; font-size:16px; padding-bottom:6px;
                   & > span { color:#666; font-size:14px; align-self:center; } }
  & ex-line {
    display:flex; justify-content:space-between; gap:8px; padding:7px 0; border-top:1px solid #f0efec;
    cursor:pointer; font-size:15px;
    & .en { & > i { font-style:normal; color:#999; font-size:13px; } }
    & .es { color:#333; font-weight:600; white-space:nowrap; }
  }
  & > button.cta { margin-top:8px; }
}
pain-line, note-line { display:block; font-size:14px; color:#8a4a00; padding:4px 2px; }
note-line { color:#555; }
