/* HAPO výsledky – veřejné zobrazení. Barvy bere ze šablony (proměnné --hp-*), jinak výchozí oranžová/černá/bílá. */
.hapo-results, .hapo-livebox, .hapo-winners, .hapo-now-card, .hapo-hist {
  --o: var(--hp-orange, #f26a1b); --ot: var(--hp-orange-text, #bf4a00); --q3: var(--hp-q3, #f5a462);
  --ink: var(--hp-ink, #141210); --mut: var(--hp-muted, #5f5953); --rule: var(--hp-rule, #e5dfd9);
  --sf: var(--hp-surface, #fff); --sf2: var(--hp-surface-2, #f3efeb); --band: var(--hp-band, #121110); --onb: var(--hp-on-band, #fff); --onbm: var(--hp-on-band-muted, #bdb6ae);
  --live: var(--hp-live, #d92d20); --fd: var(--hp-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
}
.hapo-results { display: flex; flex-direction: column; gap: 36px; }
.hapo-muted { color: var(--mut); }
.hapo-eyebrow { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--mut); }
.hapo-bar { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: .9rem; }
.hapo-live { display: inline-flex; align-items: center; gap: 6px; color: var(--live); font-weight: 700; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.hapo-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: hapo-pulse 1.6s infinite; }
@keyframes hapo-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .hapo-live::before { animation: none; } }

.hapo-champ { display: flex; align-items: center; gap: 16px; background: var(--band); color: var(--onb); border-left: 6px solid var(--o); border-radius: 12px; padding: 14px 18px; }
.hapo-champ-cup { font-family: var(--fd); font-size: 2.4rem; color: var(--o); line-height: 1; }
.hapo-champ b { font-family: var(--fd); font-size: 1.7rem; display: block; line-height: 1.1; }
.hapo-champ .hapo-eyebrow, .hapo-champ .hapo-sub { color: var(--onbm); }
.hapo-sub { font-size: .9rem; }

.hapo-block { display: flex; flex-direction: column; gap: 12px; }
.hapo-stitle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.hapo-stitle h2 { margin: 0; font-family: var(--fd); font-size: 1.7rem; text-transform: uppercase; line-height: 1.1; }
.hapo-stitle span { color: var(--mut); font-size: .88rem; }
.hapo-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .82rem; color: var(--mut); }
.hapo-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; background: var(--o); }
.hapo-legend i.q3 { background: var(--q3); }

.hapo-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.hapo-group { background: var(--sf); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; min-width: 0; }
.hapo-group header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--band); color: var(--onb); }
.hapo-group h3 { margin: 0; font-family: var(--fd); font-size: 1.3rem; text-transform: uppercase; color: inherit; }
.hapo-group header span { font-size: .78rem; color: var(--onbm); }
.hapo-st { width: 100%; border-collapse: collapse; font-size: .87rem; font-variant-numeric: tabular-nums; }
.hapo-st th { font-size: .68rem; color: var(--mut); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 6px 4px; text-align: center; }
.hapo-st th:nth-child(2) { text-align: left; }
.hapo-st td { padding: 6px 4px; text-align: center; border-top: 1px solid var(--rule); }
.hapo-st td.tm { text-align: left; font-weight: 500; width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hapo-st td.pos { width: 28px; font-family: var(--fd); font-weight: 700; font-size: 1rem; }
.hapo-st td.pts { font-weight: 700; }
.hapo-st tr td:first-child { border-left: 4px solid transparent; }
.hapo-st tr.q td:first-child { border-left-color: var(--o); }
.hapo-st tr.q td.pos { color: var(--ot); }
.hapo-st tr.q3 td:first-child { border-left-color: var(--q3); }
.hapo-card { background: var(--sf); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; max-width: 560px; }
.hapo-ml { border-top: 1px solid var(--rule); padding: 6px 0; }
.hapo-m { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 14px; font-size: .85rem; }
.hapo-m .t { color: var(--mut); font-size: .72rem; line-height: 1.2; }
.hapo-m .h { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hapo-m .a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hapo-m .s { font-family: var(--fd); font-weight: 700; font-size: 1.05rem; min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.hapo-m .s.pend { color: var(--mut); font-weight: 500; font-size: .85rem; }
.hapo-m.now .s { color: var(--live); }

.hapo-bracket-scroll { overflow-x: auto; padding-bottom: 8px; }
.hapo-bracket { display: grid; grid-template-columns: repeat(var(--cols), minmax(210px, 1fr)); gap: 0 26px; min-width: calc(var(--cols) * 230px); }
.hapo-col { display: flex; flex-direction: column; }
.hapo-col h4 { margin: 0 0 10px; font-family: var(--fd); font-size: 1rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.hapo-col .slots { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.hapo-col .finals { gap: 22px; }
.hapo-col .lbl { font-family: var(--fd); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); margin-bottom: 4px; }
.hapo-km { background: var(--sf); border: 1px solid var(--rule); border-radius: 8px; font-size: .85rem; }
.hapo-km.now { border-color: var(--live); }
.hapo-km.fin { border: 2px solid var(--o); }
.hapo-km.bye { opacity: .7; }
.hapo-km .meta { display: flex; justify-content: space-between; padding: 4px 10px 0; font-size: .7rem; color: var(--mut); }
.hapo-km .meta .lv { color: var(--live); font-weight: 700; letter-spacing: .08em; }
.hapo-km .ln { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 4px 10px; }
.hapo-km .ln + .ln { border-top: 1px solid var(--rule); }
.hapo-km .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hapo-km .n.ph { color: var(--mut); font-style: italic; }
.hapo-km .ln.w .n { font-weight: 700; }
.hapo-km .ln.w .g { color: var(--ot); }
.hapo-km .ln.l .n { color: var(--mut); }
.hapo-km .g { font-family: var(--fd); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hapo-km .pn { font-size: .72rem; color: var(--mut); padding: 0 10px 5px; text-align: right; }

.hapo-finalgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px 40px; }
.hapo-stand { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.hapo-stand li { break-inside: avoid; display: grid; grid-template-columns: 56px 1fr; padding: 3px 0; border-bottom: 1px solid var(--rule); font-size: .9rem; }
.hapo-stand li b { font-family: var(--fd); }
.hapo-stand li:nth-child(-n+3) span { font-weight: 700; }
.hapo-aw { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 12px; }
.hapo-aw dt { color: var(--mut); }
.hapo-aw dd { margin: 0; font-weight: 600; }
.hapo-links a { margin-right: 16px; font-weight: 600; }

.hapo-program summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.hapo-program td.h { text-align: right; }
.hapo-program td.s { font-family: var(--fd); font-weight: 700; }
.hapo-program tr.now td { color: var(--live); }
.hapo-tbl-scroll { overflow-x: auto; }

/* živý blok v hlavičce úvodní stránky */
.hapo-livebox { display: flex; flex-direction: column; gap: 8px; }
.hapo-lb-head { font-size: .85rem; color: var(--onbm); }
.hapo-lb-head b { color: var(--onb); }
.hapo-lm { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; font-size: .95rem; }
.hapo-lm .pt { font-size: .72rem; color: var(--onbm); }
.hapo-lm .h { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hapo-lm .a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hapo-lm .s { font-family: var(--fd); font-weight: 700; font-size: 1.35rem; color: var(--o); font-variant-numeric: tabular-nums; }

/* vítězové a karta turnaje */
.hapo-winners { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hapo-winners th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mut); padding: 8px 10px; border-bottom: 2px solid var(--ink); }
.hapo-winners td { padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.hapo-now-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin: 20px 0 28px; }
.hapo-now-card > div { background: var(--band); color: var(--onb); border-radius: 10px; padding: 14px 16px; border-top: 4px solid var(--o); display: flex; flex-direction: column; gap: 4px; }
.hapo-now-card .hapo-eyebrow { color: var(--onbm); }
.hapo-now-card b { font-family: var(--fd); font-size: 1.4rem; line-height: 1.15; }
.hapo-now-card a { color: var(--o); font-weight: 600; text-decoration: none; }
.hapo-hist { display: flex; flex-direction: column; gap: 8px; }
.hapo-hist-w span { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mut); }
.hapo-hist-w b { font-family: var(--fd); font-size: 2rem; }

@media (max-width: 520px) {
  .hapo-m { grid-template-columns: 36px minmax(0, 1fr) auto minmax(0, 1fr); padding: 4px 10px; gap: 6px; }
  .hapo-stand { columns: 1; }
}
