/* CSS Document */
:root{
  --bg:#f6f7f9;
  --card:#fff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --ring:rgba(14,165,233,.35);
}

/* Kompaktní základ */
*,
*::before,
*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font: 13px/1.3 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Arial;
  padding:8px;
}

/* Nadpis */
h1,H1{
  margin:0 0 8px;
  font-size: clamp(18px,4.2vw,22px);
  font-weight:800;
  text-align:center;
}

/* Tlačítka */
a.tlacitko{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:0 8px;
  margin:4px 6px 8px 0;
  background:var(--card);
  color:#0f172a;
  border:1px solid var(--border);
  border-radius:8px;
  text-decoration:none;
  font-weight:600;
  font-size:0.85rem;
}
a.tlacitko:hover{ background:#f3f4f6; }

/* Tabulka – mobilní horizontální scroll */
table{
  border-collapse:collapse;
  width:100%;
  background:var(--card);
  border:1px solid var(--border);
  display:block;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  white-space:nowrap;
  border-radius:6px;
}

/* Hlavička */
th{
  position:sticky;
  top:0;
  color:#111827;
  font-weight:700;
  font-size:0.85rem;
  z-index:2;
  text-align:left;
  padding:6px 6px;
}

/* Buňky */
td{
  padding:5px 6px;
  border-bottom:1px solid var(--border);
  text-align:left;
}

/* Sticky první sloupec */
th:first-child, td:first-child{
  position:sticky;
  left:0;
  background:#f1f5f9;
  z-index:3;
  box-shadow:1px 0 0 rgba(0,0,0,.05);
}

/* Alternace – vypnuto kvůli barvám po sloupcích */
/* tbody tr:nth-child(even) td{ background:#fbfcfd; } */

/* Zvýraznění Součet a Body */
td.soucet{
  background:#fde68a !important;
  font-weight:700;
}
td.body{
  background:#fecaca !important;
  font-weight:700;
}

/* Barevné sloupce podle typu (sjednocené napříč řádky) */
thead tr > th:nth-child(1),
tbody tr > td:nth-child(1),
thead tr > th:nth-child(2),
tbody tr > td:nth-child(2){
  background: rgba(255,255,255,1);
}

thead tr > th:nth-child(3),
tbody tr > td:nth-child(3):not(.soucet):not(.body),
thead tr > th:nth-child(4),
tbody tr > td:nth-child(4):not(.soucet):not(.body){
  background:rgba(173,216,230,0.3); /* modrá – voda */
}

thead tr > th:nth-child(5),
tbody tr > td:nth-child(5):not(.soucet):not(.body){
  background:rgba(205,133,63,0.25); /* hnědá – běh */
}

thead tr > th:nth-child(6),
thead tr > th:nth-child(7),
tbody tr > td:nth-child(6):not(.soucet):not(.body),
tbody tr > td:nth-child(7):not(.soucet):not(.body){
  background:rgba(255,182,193,0.35); /* červená – posilovna */
}

thead tr > th:nth-child(8),
tbody tr > td:nth-child(8):not(.soucet):not(.body){
  background:rgba(144,238,144,0.35); /* zelená – plavání */
}

thead tr > th:nth-child(9),
thead tr > th:nth-child(10),
tbody tr > td:nth-child(9):not(.soucet):not(.body),
tbody tr > td:nth-child(10):not(.soucet):not(.body){
  background:rgba(255,255,153,0.4); /* žlutá – hry + kolo */
}

thead tr > th:nth-child(11),
tbody tr > td:nth-child(11):not(.soucet):not(.body){
  background:rgba(255,192,203,0.4); /* růžová – protahování */
}

/* Drobnosti */
.mensi{ font-size:.8rem; color:var(--muted); }
.zavodnik{ text-decoration:none; color:#0f172a; font-weight:700; }

/* Desktop */
@media (min-width:768px){
  body{ padding:10px; }
  table{ display:table; white-space:normal; overflow:visible; }
}


