/* Historie oddílu – navazuje na proměnné webu (style.css) */
#hi-app { --hi-blue: var(--blue, #1e3a7b); --hi-pale: var(--blue-pale, #e8f0fe); --hi-acc: var(--accent, #e8a000);
  --hi-border: var(--border, #dde3f0); --hi-muted: var(--muted, #6b7280); color: var(--text, #1a1a2e); }
.hi-intro p { max-width: 820px; line-height: 1.6; margin: 0 0 10px; }
.hi-abbr { font-size: 13px; color: var(--hi-muted); }
.hi-h2 { font-size: 1.35rem; font-weight: 800; color: var(--hi-blue); margin: 26px 0 10px; }
/* milníky – časová osa spojená čarou */
.hi-tl { overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.hi-tl ol { position: relative; display: flex; width: max-content; margin: 0; padding: 0; list-style: none; }
.hi-tl ol::before { content: ''; position: absolute; top: 37px; left: 9px; right: 205px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, #0b1230, var(--hi-blue) 45%, var(--hi-acc)); }
.hi-tl li { position: relative; width: 214px; padding: 50px 16px 0 0; font-size: 14px; line-height: 1.45; }
.hi-tl li::before { content: ''; position: absolute; top: 29px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: #fff;
  border: 3px solid var(--hi-blue); border-color: color-mix(in srgb, var(--hi-acc) calc(var(--k) * 100%), var(--hi-blue)); box-shadow: 0 0 0 4px var(--bg, #f0f4ff); }
.hi-tl li a { position: absolute; top: 0; left: 0; font-size: 1.3rem; font-weight: 800; color: var(--hi-blue); text-decoration: none; }
.hi-tl li a:hover { color: var(--hi-acc); }
.hi-tl-gap { position: absolute; top: 19px; left: -132px; width: 64px; text-align: center; font-size: 11px; font-weight: 600; color: var(--hi-muted); }
.hi-tl-t { display: block; background: #fff; border: 1px solid var(--hi-border); border-radius: 10px; padding: 9px 11px; }
@media (max-width: 640px) {
  .hi-tl { overflow: visible; }
  .hi-tl ol { display: block; width: auto; }
  .hi-tl ol::before { top: 8px; bottom: 8px; left: 7px; right: auto; width: 4px; height: auto; background: linear-gradient(180deg, #0b1230, var(--hi-blue) 45%, var(--hi-acc)); }
  .hi-tl li { width: auto; padding: 0 0 14px 34px; }
  .hi-tl li::before { top: 4px; }
  .hi-tl li a { position: static; display: block; font-size: 1.15rem; }
  .hi-tl-gap { display: none; }
}

/* období – svislá osa */
.hi-ob-line { position: relative; padding-left: 30px; max-width: 900px; }
.hi-ob-line::before { content: ''; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, #0b1230, var(--hi-blue) 45%, var(--hi-acc)); }
.hi-ob { position: relative; background: #fff; border: 1px solid var(--hi-border); border-radius: 12px; padding: 14px 18px 12px; margin: 0 0 14px; scroll-margin-top: 70px; }
.hi-ob::before { content: ''; position: absolute; left: -27px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--hi-blue); }
.hi-ob:last-child::before { border-color: var(--hi-acc); }
.hi-ob-y { font-size: 13px; font-weight: 800; letter-spacing: .04em; color: var(--hi-acc); }
.hi-ob h3 { margin: 2px 0 8px; font-size: 1.15rem; color: var(--hi-blue); }
.hi-ob p { margin: 0 0 9px; line-height: 1.62; font-size: 15px; }
.hi-ob-sez { font-size: 12.5px; color: var(--hi-muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 4px; }
.hi-ob-sez a { color: var(--hi-blue); text-decoration: none; background: var(--hi-pale); border-radius: 5px; padding: 1px 6px; }
.hi-ob-sez a:hover { background: #fff2cc; }
@media (max-width: 640px) { .hi-ob-line { padding-left: 24px; } .hi-ob-line::before { left: 5px; } .hi-ob::before { left: -25px; } .hi-ob { padding: 12px 13px 10px; } }

/* přebory – jen naše medaile */
.hi-prlist { list-style: none; margin: 4px 0 8px; padding: 0; }
.hi-prlist li { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--hi-border); font-size: 14px; }
.hi-py { font-weight: 800; color: var(--hi-blue); min-width: 40px; }
.hi-pl { display: flex; flex-direction: column; gap: 2px; }
.hi-pm.gold b { color: #8a5a00; }

/* graf úrovní */
.hi-ladder { background: #fff; border: 1px solid var(--hi-border); border-radius: 12px; padding: 14px 14px 10px; margin: 24px 0 8px; box-shadow: var(--shadow-sm, none); }
.hi-ladder-title { font-weight: 700; font-size: 14px; color: var(--hi-blue); margin-bottom: 10px; }
.hi-ladder-row { display: flex; align-items: flex-end; gap: 3px; height: 150px; overflow-x: auto; padding-bottom: 2px; }
.hi-bar { flex: 1 0 14px; min-width: 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; }
.hi-bar-fill { width: 100%; height: calc(var(--h) * 17px); min-height: 3px; background: var(--hi-blue); opacity: .75; border-radius: 4px 4px 0 0; transition: opacity .15s; }
.hi-bar.win .hi-bar-fill { background: var(--hi-acc); opacity: 1; }
.hi-bar.none .hi-bar-fill { background: var(--hi-border); }
.hi-bar:hover .hi-bar-fill { opacity: 1; }
.hi-bar-lab { font-size: 9px; color: var(--hi-muted); margin-top: 3px; }
.hi-ladder-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--hi-muted); margin-top: 8px; }
.hi-leg-win { color: var(--hi-acc); font-weight: 700; }

/* lišta */
.hi-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; background: var(--bg, #f0f4ff);
  padding: 10px 0; margin: 18px 0 8px; border-bottom: 1px solid var(--hi-border); }
.hi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hi-chip { padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--hi-border); color: var(--hi-blue); font-size: 13px; font-weight: 600; text-decoration: none; }
.hi-chip:hover { background: var(--hi-pale); }
.hi-tog { font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.hi-btn { margin-left: auto; border: 1px solid var(--hi-border); background: #fff; color: var(--hi-blue); border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }

/* sezóny */
.hi-season { background: #fff; border: 1px solid var(--hi-border); border-radius: 12px; margin: 10px 0; scroll-margin-top: 70px; }
.hi-season > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; }
.hi-season > summary::-webkit-details-marker { display: none; }
.hi-season > summary::before { content: '▸'; color: var(--hi-muted); transition: transform .15s; }
.hi-season[open] > summary::before { transform: rotate(90deg); }
.hi-sname { font-size: 1.15rem; font-weight: 800; color: var(--hi-blue); min-width: 92px; }
.hi-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.hi-badge { font-size: 12px; background: var(--hi-pale); color: var(--hi-blue); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.hi-badge i { font-style: normal; color: var(--hi-muted); }
.hi-badge.win { background: var(--hi-acc); color: #fff; }
.hi-badge.win i { color: rgba(255,255,255,.85); }
.hi-badge.none { background: #f3f4f6; color: var(--hi-muted); }
.hi-sbody { padding: 0 16px 16px; }
.hi-tbl { margin: 14px 0 6px; }
.hi-tbl-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.hi-comp { font-weight: 700; font-size: 15px; }
.hi-tnote { font-size: 12px; color: var(--hi-muted); }
.hi-tnote.warn { color: #b7791f; }
.hi-scroll { overflow-x: auto; }
.hi-t { min-width: 520px; width: auto !important; max-width: 860px; }
.hi-t td.tm { min-width: 220px; }
.hi-t th, .hi-t td { padding: 6px 10px !important; font-size: 13px; text-align: right; }
.hi-t th:nth-child(2), .hi-t td.tm { text-align: left; }
.hi-t td.pos { font-weight: 700; color: var(--hi-muted); }
.hi-t td.pts { font-weight: 700; }
.hi-t tr.ours td { background: #fff7e0; font-weight: 700; }
.hi-t tr.ours td.tm { box-shadow: inset 4px 0 0 var(--hi-acc); color: var(--hi-blue); }
.hi-t tr.hi-hide { display: none; }
.hi-tbl-src, .hi-nlinks { font-size: 12px; color: var(--hi-muted); margin-top: 4px; }
.hi-src { color: var(--hi-blue); text-decoration: none; border-bottom: 1px dotted currentColor; margin-right: 10px; overflow-wrap: anywhere; }
.hi-notes { margin-top: 14px; border-top: 1px solid var(--hi-border); padding-top: 10px; }
.hi-note { font-size: 14px; line-height: 1.5; margin: 0 0 10px; }
.hi-nlab { font-weight: 700; color: var(--hi-blue); }
.hi-nlab::after { content: ':'; }
.hi-extra { font-size: 14px; margin-top: 10px; }
.hi-extra ul { margin: 4px 0 0 18px; }
.hi-empty { color: var(--hi-muted); font-size: 14px; }
.hi-end ul { padding-left: 18px; line-height: 1.6; }
@media (max-width: 640px) {
  .hi-toolbar { position: static; }
  .hi-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
  .hi-chip { flex: 0 0 auto; }
  .hi-t { min-width: 0; }
  .hi-t th, .hi-t td { padding: 5px 6px !important; font-size: 12px; }
  .hi-sbody { padding: 0 10px 12px; }
  .hi-sname { min-width: 0; }
  .hi-btn { margin-left: 0; }
  .hi-ladder-row { height: 120px; }
  .hi-bar-fill { height: calc(var(--h) * 13px); }
}

.hi-members { margin-top: 12px; background: var(--hi-pale); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.hi-members > summary { cursor: pointer; font-weight: 700; color: var(--hi-blue); }
.hi-mteams { margin: 8px 0 4px; }
.hi-mlist { line-height: 1.6; }
.hi-vedeni ul { padding-left: 18px; line-height: 1.7; }
.hi-mt { min-width: 0 !important; }
.hi-mt td, .hi-mt th { text-align: left !important; }

.hi-pocatky p { max-width: 860px; line-height: 1.65; margin: 0 0 10px; }

.hi-mhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.hi-mhead .hi-h2 { margin: 0; }
.hi-story-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
  color: #fff; text-decoration: none; background: linear-gradient(135deg, #0b1230, var(--hi-blue)); box-shadow: 0 6px 18px rgba(30,58,123,.3); transition: transform .15s; }
.hi-story-btn:hover { transform: translateY(-1px); color: #fff; }
.hi-milniky li a { font-size: 1.15rem; }

.hi-our { color: var(--hi-blue); background: #fff2cc; border-radius: 4px; padding: 0 3px; }
.hi-pt td.tm { min-width: 0 !important; white-space: nowrap; font-size: 12.5px; }
.hi-pt tr.hi-sub td { font-size: 12px; color: var(--hi-muted); padding-top: 0 !important; }
.hi-medals { margin: 10px 0 12px 18px; line-height: 1.7; font-size: 14px; }
.hi-gen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.hi-gen-card { background: #fff; border: 1px solid var(--hi-border); border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.55; }
.hi-gen-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--hi-blue); }
.hi-gen-card p { margin: 0 0 8px; }
.hi-gen-card ul { margin: 0; padding-left: 18px; }
.hi-mapa { margin-top: 20px; }
/* mapa */
.hm { background: #fff; color: #1a2340; border-radius: 14px; padding: 12px; border: 1px solid var(--hi-border); max-width: 860px; }
.hm-wrap { position: relative; }
.hm-svg { width: 100%; height: auto; display: block; border-radius: 12px; touch-action: manipulation; }
.hm-bg { fill: #f3f5f9; } .hm-kraj { fill: #eceff5; stroke: #cfd6e4; stroke-width: 1; }
.hm-obec { fill: #fbfcfe; stroke: #c3cbdb; stroke-width: .7; stroke-linejoin: round; cursor: pointer; transition: fill .15s; }
.hm-obec.s1 { fill: #cdd9f3; stroke: #9fb3e0; } .hm-obec.s2 { fill: #7f9de0; stroke: #5f80cf; } .hm-obec.s3 { fill: #2b52b3; stroke: #1f3f94; }
.hm-obec.home { fill: #f0b43c; stroke: #b97b06; stroke-width: 1.2; }
.hm-obec:hover, .hm-obec.hov { stroke: #0f1a3a; stroke-width: 2; }
.hm-obec.hov:not(.s1):not(.s2):not(.s3):not(.home) { fill: #e6ebf5; }
.hm-okres { fill: none; stroke: #1a2340; stroke-width: 1.6; stroke-dasharray: 6 4; stroke-opacity: .55; pointer-events: none; }
.hm-river-b { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-opacity: .9; pointer-events: none; }
.hm-river { fill: none; stroke: #3d8fd1; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.hm-rlab { font-size: 13px; font-style: italic; font-weight: 600; fill: #2f78b5; letter-spacing: .08em; paint-order: stroke; stroke: #f3f5f9; stroke-width: 3px; pointer-events: none; }
.hm-home { pointer-events: none; } .hm-home circle { fill: #1a2340; stroke: #fff; stroke-width: 1.5; }
.hm-home text { font-size: 15px; font-weight: 800; fill: #1a2340; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.hm-cap { font-size: 12px; fill: #6b7385; pointer-events: none; }
.hm-tip { position: absolute; z-index: 3; pointer-events: none; background: #0f1a3a; color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 13px; line-height: 1.3;
  white-space: nowrap; box-shadow: 0 6px 18px rgba(10,20,60,.25); }
.hm-tip b { display: block; font-size: 14px; } .hm-tip span { color: #ffd27a; font-weight: 600; } .hm-tip span.no { color: #b8c2dc; font-weight: 400; }
.hm-leg { font-size: 13px; color: #4b5468; margin: 8px 4px 2px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.hm-tot { margin-top: 0; }
.hm-k { display: inline-block; width: 16px; height: 11px; border-radius: 3px; margin-left: 8px; } .hm-k:first-child { margin-left: 0; }
.hm-k.home { background: #f0b43c; } .hm-k.s1 { background: #cdd9f3; } .hm-k.s2 { background: #7f9de0; } .hm-k.s3 { background: #2b52b3; }
.hm-k.riv { height: 3px; background: #3d8fd1; }
.hm-src { font-size: 11.5px; color: #6b7385; margin: 2px 4px; }

/* nábor */
.hi-join { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 26px 0 8px; padding: 18px 22px; border-radius: 16px; color: #eef2ff;
  background: radial-gradient(120% 140% at 100% 0%, rgba(232,160,0,.28), transparent 55%), linear-gradient(135deg, #060912, #1e3a7b); }
.hi-join > div { max-width: 620px; } .hi-join b { display: block; font-size: 18px; color: #fff; } .hi-join span { display: block; font-size: 14.5px; line-height: 1.5; color: rgba(238,242,255,.85); margin-top: 3px; }
.hi-join-top { margin: 0 0 22px; }
.hi-join-btn { background: #e8a000 !important; color: #1a1200 !important; box-shadow: none !important; }
.hi-nabor { position: fixed; z-index: 30; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); padding: 12px 20px; border-radius: 999px; background: #e8a000; color: #1a1200;
  font-weight: 800; font-size: 14.5px; text-decoration: none; box-shadow: 0 10px 28px rgba(10,20,60,.3); }
.hi-nabor:hover { background: #ffb820; color: #1a1200; }
@media (max-width: 640px) { .hi-nabor { right: 50%; transform: translateX(50%); white-space: nowrap; } }

/* fotky – v přirozeném poměru stran (nic se neořízne), nejvýš ve své skutečné velikosti, popisek pod fotkou */
.hf { margin: 0 auto; width: 100%; max-width: 414px; }
.hf-s { cursor: zoom-in; }
.hf-frame { position: relative; display: grid; border-radius: 14px; overflow: hidden; }
.hf[data-n]:not([data-n="1"]) .hf-frame { cursor: pointer; }
.hf-s { grid-area: 1 / 1; width: 100%; height: auto; max-height: 460px; object-fit: contain; align-self: center; opacity: 0; transition: opacity 1.1s ease; display: block; }
.hf-s.on { opacity: 1; }
.hf-dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; }
.hf-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 3px rgba(0,0,0,.5); transition: width .3s, background .3s; }
.hf-dots i.on { background: #fff; width: 16px; border-radius: 3px; }
.hf-c { display: none; font-size: 12.5px; line-height: 1.45; margin-top: 7px; } .hf-c.on { display: block; }
.hf-a { opacity: .75; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .hf-s { transition: none; } }

.hf-frame { background: #eef1f7; }
.hf-c { color: var(--hi-muted); } .hf-c b { color: var(--hi-blue); }
.hi-ob-f .hf-ob { float: right; width: 280px; margin: 0 0 10px 18px; }
.hi-ob-f::after { content: ''; display: block; clear: both; }
.hf-gen { margin: 0 0 10px; max-width: 280px; }
.hf-pr { margin: 4px 0 12px; max-width: 320px; }
.hi-str-top { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; max-width: 920px; }
.hi-str-top p { margin: 0 0 10px; line-height: 1.62; font-size: 15px; }
.hi-str-d { margin-top: 12px; } .hi-str-na { color: var(--hi-muted); font-style: italic; }
.hi-str-p { font-size: 12.5px; color: var(--hi-muted); margin-top: 2px; } .hi-str-l { white-space: nowrap; font-size: 12.5px; }
.hi-str .hi-t td.tm { line-height: 1.55; }
@media (max-width: 760px) { .hi-ob-f .hf-ob { float: none; width: auto; margin: 0 auto 12px; } .hi-str-top { grid-template-columns: 1fr; } }

/* rozkliknutá fotka */
.hf-dots i { cursor: pointer; }
.hf-lb { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: rgba(4,7,16,.92); padding: 56px 64px 24px; }
.hf-lb.on { display: flex; }
.hf-lb figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.hf-lb img { max-width: min(1100px, 100%); max-height: calc(100vh - 150px); width: auto; height: auto; min-width: min(640px, 100%); object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #111; }
.hf-lb figcaption { color: #e8ecf8; font-size: 14px; line-height: 1.5; margin-top: 12px; max-width: 760px; text-align: center; }
.hf-lb figcaption b { color: #ffd27a; } .hf-lb-n { opacity: .6; margin-left: 6px; }
.hf-lb button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.hf-lb button:hover { background: rgba(255,255,255,.24); }
.hf-lb-x { top: 14px; right: 14px; } .hf-lb-p { left: 14px; top: 50%; transform: translateY(-50%); } .hf-lb-nx { right: 14px; top: 50%; transform: translateY(-50%); }
.hf-lb:not(.multi) .hf-lb-p, .hf-lb:not(.multi) .hf-lb-nx { display: none; }
html.hf-lock { overflow: hidden; }
@media (max-width: 640px) { .hf-lb { padding: 56px 8px 16px; } .hf-lb img { min-width: 0; max-height: calc(100vh - 190px); } .hf-lb-p, .hf-lb-nx { top: auto; bottom: 14px; transform: none; } }
