/* ══════════════════════════════════════════
   STRÁNKA BIATLON (core/biathlon.html)
══════════════════════════════════════════ */

/* ── HERO ── */
.biatlon-hero {
    min-height: 80svh;
    background-color: var(--g-900);
    background-image:
        linear-gradient(180deg, rgba(13, 43, 14, 0.82), rgba(13, 43, 14, 0.68)),
        var(--biatlon-hero-image);
    background-position: center 46%;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-xl) var(--space-md);
}
.biatlon-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 100%, rgba(135,210,47,0.12) 0%, transparent 70%),
        radial-gradient(circle at 15% 20%, rgba(135,210,47,0.06) 0%, transparent 50%);
}
.biatlon-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}
.biatlon-hero h1 {
    color: white;
    font-size: clamp(3.5rem, 10vw, 7.5rem);
    line-height: 0.9;
    margin-bottom: var(--space-md);
}
.biatlon-hero h1.biatlon-hero-title--long {
    font-size: 3.8rem;
    line-height: 0.95;
    max-width: 16ch;
    margin-inline: auto;
    text-wrap: balance;
}
.biatlon-hero h1 em { color: var(--g-400); font-style: normal; }
/* hlavní krok úvodu: posune stránku na první hru */
.hero-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-width: min(100%, 320px);
    padding: 1rem 2.4rem;
    background: var(--g-400);
    color: var(--g-900);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 16px;
    box-shadow: 0 5px 0 #4f8a17;
    transition: transform 0.12s, box-shadow 0.12s, background 0.2s;
    touch-action: manipulation;
}
.hero-start:hover, .hero-start:focus-visible { background: #9be03f; color: var(--g-900); }
.hero-start:active { transform: translateY(2px); box-shadow: 0 3px 0 #4f8a17; }
.hero-start-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--g-900); animation: hero-pulse 1.6s infinite; }
@keyframes hero-pulse { 0% { box-shadow: 0 0 0 0 rgba(13,43,14,0.45); } 70% { box-shadow: 0 0 0 12px rgba(13,43,14,0); } 100% { box-shadow: 0 0 0 0 rgba(13,43,14,0); } }
/* Start první hry po kliknutí na „Na start“ chvíli bliká */
.gbtn.attn { animation: gb-attn 0.9s ease-in-out 3; }
@keyframes gb-attn { 0%, 100% { box-shadow: 0 5px 0 #4f8a17; } 50% { box-shadow: 0 5px 0 #4f8a17, 0 0 0 8px rgba(135,210,47,0.45), 0 0 26px rgba(135,210,47,0.7); } }
@media (prefers-reduced-motion: reduce) { .hero-start-dot, .gbtn.attn { animation: none; } }

/* ── FÁZE ── */
.phase-section {
    padding: var(--space-xl) 0;
    position: relative;
}
.phase-section { background: var(--sw-white); }
#faze-2, #faze-4 { background: var(--sw-offwhite); }

.phase-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}
#faze-2 .phase-inner, #faze-4 .phase-inner { direction: rtl; }
#faze-2 .phase-inner > *, #faze-4 .phase-inner > * { direction: ltr; }

.phase-img-wrap {
    position: sticky;
    top: 110px;
}
.phase-img-wrap img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.12);
    display: block;
    cursor: pointer;
}
.phase-badge {
    position: absolute;
    top: -16px;
    left: -16px;
    width: 72px;
    height: 72px;
    background: var(--g-400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--sw-black);
    box-shadow: 0 8px 24px rgba(135,210,47,0.4);
    border: 3px solid white;
    z-index: 2;
}
.phase-text h2 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--sw-black);
    line-height: 0.95;
    margin-bottom: var(--space-sm);
}
.phase-text .desc {
    font-size: 1rem;
    color: #555;
    line-height: 1.75;
    margin-bottom: var(--space-md);
}

/* ── STUPNĚ VÍTĚZŮ ── */
.finish-podium-hero {
    position: relative;
    min-height: clamp(550px, 85vw, 1025px);
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    background: #111;
    isolation: isolate;
}
.finish-podium-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(110deg, rgba(0,0,0,0.68) 0%, rgba(0,0,0,0.34) 35%, rgba(0,0,0,0.04) 62%),
        linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0) 48%, rgba(0,0,0,0.14) 100%);
}
.finish-podium-hero-img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    cursor: pointer;
}
.finish-podium-copy {
    position: relative;
    z-index: 2;
    max-width: min(560px, calc(100% - 32px));
    margin-left: max(var(--space-md), calc((100vw - 1200px) / 2));
    padding: clamp(32px, 6vw, 96px) var(--space-md);
    color: white;
    pointer-events: none;
}
.finish-podium-kicker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--space-xs);
    color: var(--g-400);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
.finish-podium-kicker::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--g-400);
}
.finish-podium-copy h2 {
    max-width: 10ch;
    margin-bottom: var(--space-sm);
    color: white;
    font-size: clamp(2.4rem, 6vw, 5.4rem);
    line-height: 0.9;
}
.finish-podium-copy p {
    max-width: 42ch;
    margin: 0;
    color: rgba(255,255,255,0.86);
    font-size: clamp(1rem, 1.6vw, 1.22rem);
    line-height: 1.58;
}

/* ── PRO RODIČE (jedna sekce místo boxů u fází) ── */
.parents-section { background: var(--sw-offwhite); padding: var(--space-lg) var(--space-md); }
.parents-inner { max-width: 1000px; margin: 0 auto; }
.parents-section h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--sw-black); line-height: 0.95; margin-bottom: var(--space-md); }
.parents-facts, .parents-gains { list-style: none; margin: 0; padding: 0; }
.parents-facts li { display: flex; align-items: center; gap: 0.7rem; font-weight: 700; font-size: 1.02rem; padding: 0.45rem 0; }
.parents-facts i { color: var(--g-500); width: 1.3rem; text-align: center; }
.parents-gains li { padding: 0.45rem 0 0.45rem 0.9rem; border-left: 3px solid var(--g-400); margin-bottom: 0.5rem; color: #444; line-height: 1.5; }
.parents-gains b { color: var(--sw-black); }


/* ── STUPNĚ VÍTĚZŮ: ZLATÝ ŠTÍTEK PODLE VÝSLEDKU ZÁVODU ── */
.podium-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: var(--space-sm);
    background: #ffd54a;
    color: #3a2a00;
    font-weight: 800;
    border-radius: 999px;
    padding: 0.35rem 0.95rem;
    font-size: 0.9rem;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
    font-variant-numeric: tabular-nums;
}
.podium-gold img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #3a2a00;
    margin-left: -0.55rem;
}

/* ══════════════════════════════════════════
   MINIHRY
══════════════════════════════════════════ */
.gbox {
    --gb-green: var(--g-400);
    --gb-dark: var(--g-900);
    --gb-red: #ff7a6b;
    background: radial-gradient(120% 70% at 0% 0%, #1d3d20 0%, #0f1b10 55%, #080c08 100%);
    border-radius: 22px;
    padding: 14px;
    color: #fff;
    box-shadow: 0 20px 40px -22px rgba(13,43,14,0.7);
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.gbox [hidden] { display: none !important; }
.ghead { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.65rem; }
.gtitle {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.75rem;
    line-height: 1;
    margin: 0;
    color: #fff;
}
.ghud { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-bottom: 0.6rem; min-height: 1.65rem; }
.gchip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    padding: 0.18rem 0.6rem;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: #fff;
}
.gchip i { color: var(--gb-green); }
/* Měnící se hodnoty (čas, tep, počty) písmem s pevnou šířkou znaků,
   časomíry navíc s pevnou šířkou, ať čipy vedle necukají. */
#ski-time, #sprint-time, #cog-time, #prone-count, #prone-pulse, #prone-pulse-end,
#standing-pulse, #standing-count, #sprint-cps, #sprint-cps-end, .pf-time {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', 'Roboto Mono', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
#ski-time, #sprint-time { display: inline-block; min-width: 6ch; text-align: right; }
.gchip.hot { background: var(--gb-green); border-color: var(--gb-green); color: var(--gb-dark); }
.gchip.hot i { color: var(--gb-dark); }
.gchip.warn i { color: var(--gb-red); }
.gchip.warn { border-color: rgba(255,122,107,0.5); }
.gscene {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0b140c;
    touch-action: manipulation;
}
.gscene > svg { display: block; width: 100%; height: auto; }
.gtoken {
    position: absolute;
    aspect-ratio: 1;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gb-green);
    transform: translate(-50%, -50%);
    box-shadow: 0 5px 12px rgba(0,0,0,0.45);
    background: var(--gb-green);
    pointer-events: none;
}
.gbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: var(--gb-green);
    color: var(--gb-dark);
    font-family: var(--font-body);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.95rem;
    box-shadow: 0 4px 0 #4f8a17;
    margin-top: 12px;
    touch-action: manipulation;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.2s, opacity 0.2s;
}
.gbtn:hover:not(:disabled) { background: #9be03f; }
.gbtn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #4f8a17; }
.gbtn:disabled { cursor: not-allowed; opacity: 0.45; box-shadow: none; }
/* ovládání vidět už při odpočtu, jen vypnuté */
.gpad:disabled { opacity: 0.45; cursor: default; }
.gbtn.ghost {
    background: rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.2);
    min-height: 44px;
    font-size: 0.8rem;
    margin-top: 0;
}
.gbtn.ghost:hover { background: rgba(255,255,255,0.16); }
.gbtn.glow { box-shadow: 0 4px 0 #4f8a17, 0 0 22px rgba(135,210,47,0.55); }
.gbtn:focus-visible, .gpad:focus-visible, .gtap:focus-visible, .gtarget:focus-visible {
    outline: 3px solid #ffd54a;
    outline-offset: 2px;
}
.ghint { font-size: 0.74rem; color: rgba(255,255,255,0.7); margin: 0.55rem 0 0; line-height: 1.4; }
.ghint i { color: var(--gb-green); margin-right: 0.25rem; }
.gbox kbd { background: rgba(255,255,255,0.14); color: #fff; font-size: 0.72rem; padding: 0.05rem 0.35rem; }

/* ── bublina s návodem, v toku nad hrou ── */
.gbubble {
    position: relative;
    background: var(--gb-green);
    color: var(--gb-dark);
    border-radius: 14px;
    padding: 0.6rem 0.75rem 0.65rem;
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: left;
    margin-bottom: 14px;
    box-shadow: 0 8px 20px -8px rgba(135,210,47,0.6);
    opacity: 0;
}
.gbubble.show { opacity: 1; animation: gb-pop 0.45s ease-out both; }
.gbubble::after {
    content: '';
    position: absolute;
    left: 26px;
    bottom: -8px;           /* o 1 px pod bublinu, jinak při zaokrouhlení prosvitne mezera */
    border: 9px solid transparent;
    border-bottom: 0;
    border-top-color: var(--gb-green);
}
.gbubble { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; }
.gbubble img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gb-dark); flex-shrink: 0; }
.gbubble p { margin: 0; color: inherit; font-size: inherit; line-height: inherit; }
.gbubble kbd { background: var(--gb-dark); color: var(--gb-green); }
@keyframes gb-pop { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }

/* ── výsledek, jeden blok pod hrou ── */
.gres {
    margin-top: 12px;
    background: rgba(135,210,47,0.1);
    border: 1px solid rgba(135,210,47,0.35);
    border-radius: 16px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.1rem 0.9rem;
    align-items: center;
}
.gres .big {
    font-family: var(--font-display);
    font-size: 2.9rem;
    line-height: 0.9;
    color: var(--gb-green);
    grid-row: span 2;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.gres .head { font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.gres p { margin: 0; color: rgba(255,255,255,0.78); font-size: 0.84rem; line-height: 1.4; }
.gres .foot { grid-column: 1 / 3; margin-top: 0.45rem; display: flex; flex-direction: column; gap: 8px; }
.gres .foot .gbtn { margin-top: 0; }
/* ležka: mířidlo, které dýchá s hráčem */
.pr-sight { pointer-events: none; }
.pr-sight circle, .pr-sight path { stroke: #ff7a6b; }
.pr-sight circle[stroke="none"] { fill: #ff7a6b; }
.pr-sight.ok circle, .pr-sight.ok path { stroke: var(--gb-green); }
.pr-sight.ok circle[stroke="none"] { fill: var(--gb-green); }
.gres.bad { background: rgba(255,122,107,0.1); border-color: rgba(255,122,107,0.4); }
.gres.bad .big { color: #ff8a7a; }
.gres .note { grid-column: 1 / 3; font-size: 0.74rem; color: #ffd79a; margin-top: 0.3rem; }

/* ── postup závodu v hlavičce hry ── */
.grace { display: flex; align-items: flex-start; margin: 0 0 0.7rem; padding: 0; list-style: none; }
.grace li {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.58rem;
    color: rgba(255,255,255,0.55);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: relative;
    line-height: 1.2;
}
.grace li::before {
    content: '';
    position: absolute;
    top: 13px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.15);
}
.grace li:first-child::before { display: none; }
.grace li.done::before, .grace li.now::before { background: var(--gb-green); }
.grace .dot {
    position: relative;
    z-index: 1;             /* spojnice další fáze nesmí přejet přes kolečko */
    width: 28px;
    height: 28px;
    margin: 0 auto 3px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #1a261b;
    border: 2px solid rgba(255,255,255,0.2);
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
}
.grace li.done .dot { background: var(--gb-green); border-color: var(--gb-green); color: var(--gb-dark); }
.grace li.now .dot { border-color: var(--gb-green); box-shadow: 0 0 0 4px rgba(135,210,47,0.22); }
.grace li.now:not(.done) .dot { color: var(--gb-green); }
.grace li b { display: block; color: #fff; font-size: 0.7rem; letter-spacing: 0; min-height: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grace li.now { color: var(--gb-green); }
.gcarry {
    background: rgba(255,181,71,0.12);
    border: 1px solid rgba(255,181,71,0.4);
    color: #ffd79a;
    border-radius: 12px;
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    line-height: 1.4;
    display: flex;
    gap: 0.55rem;
    align-items: center;
    margin-bottom: 0.7rem;
}
.gcarry i { color: #ffb547; }
.gcarry.ok { background: rgba(135,210,47,0.1); border-color: rgba(135,210,47,0.35); color: #d9f0bd; }
.gcarry.ok i { color: var(--gb-green); }

/* ── HRA 1: BĚH ── */
.gbox--ski { touch-action: pan-y; }
.gprog { position: relative; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.12); margin: 14px 18px 18px 4px; }
.gprog-fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, #4f8a17, var(--gb-green)); width: 0; }
.gprog-tok { position: absolute; top: 50%; left: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--gb-green); transform: translate(-50%, -50%); object-fit: cover; }
.gprog-flag { position: absolute; right: -16px; top: 50%; transform: translateY(-50%); color: var(--gb-green); }
.grhythm { display: flex; gap: 4px; margin-top: 10px; align-items: center; }
.grhythm small { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-right: 4px; }
.grhythm b { flex: 1; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 0.62rem; background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.35); }
.grhythm b.l, .grhythm b.p { background: var(--gb-green); color: var(--gb-dark); }
.grhythm b.x { background: var(--gb-red); color: #3a0d08; }
.gtbar { height: 6px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; margin-top: 10px; }
.gtbar div { height: 100%; width: 100%; background: var(--gb-green); border-radius: 99px; }
.gtbar div.low { background: var(--gb-red); }
.gpads { display: flex; gap: 10px; margin-top: 12px; }
.gpad {
    flex: 1;
    min-height: 68px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.18);
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    touch-action: manipulation;
    cursor: pointer;
}
.gpad i { font-size: 1.35rem; }
.gpad.on { background: var(--gb-green); border-color: var(--gb-green); color: var(--gb-dark); transform: translateY(2px); }
.gpad.err { background: var(--gb-red); border-color: var(--gb-red); color: #3a0d08; }
.sk-lines line { stroke-dasharray: 5 12; animation: gb-dash 0.5s linear infinite; }
@keyframes gb-dash { to { stroke-dashoffset: -17; } }
.gtoken.bob { animation: gb-bob 0.35s ease-in-out infinite alternate; }
@keyframes gb-bob { to { translate: 0 -4%; } }
/* konfety v cíli: vyletí, padají dolů, točí se a zmizí */
.sk-confetti g { transform-box: fill-box; transform-origin: center; animation-name: gb-fall; animation-timing-function: cubic-bezier(0.3, 0.1, 0.6, 1); animation-fill-mode: both; }
@keyframes gb-fall {
    0% { opacity: 0; transform: translate(0, -30px) rotate(0deg); }
    12% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), 150px) rotate(var(--spin)); }
}

/* ── HRA 2: LEŽKA ── */
.gtarget {
    position: absolute;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    touch-action: manipulation;
}
.gbreath { margin-top: 12px; background: rgba(255,255,255,0.05); border-radius: 14px; padding: 10px 12px 8px; }
.gbreath-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    margin-bottom: 8px;
}
.gbreath-top i { color: var(--gb-green); }
/* graf dechu (ležka) */
.gbchart { position: relative; height: 64px; border-radius: 12px; background: rgba(255,255,255,.05); overflow: hidden; }
.gbchart svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gbchart-pal { position: absolute; top: 4px; transform: translateX(-50%); font-size: .6rem; font-weight: 800; letter-spacing: .1em; color: var(--gb-green); }
.gbchart-dot { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--gb-dark); transform: translate(-50%, -50%); box-shadow: 0 0 0 3px rgba(255,122,107,.55); }
.gbchart-dot.ok { background: var(--gb-green); box-shadow: 0 0 0 4px rgba(135,210,47,.45), 0 0 12px rgba(135,210,47,.8); }
.gblabels { display: grid; grid-template-columns: 1fr 1fr 1fr; text-align: center; font-size: 0.66rem; color: rgba(255,255,255,0.6); margin-top: 4px; }
.gbeat { animation: gb-beat 1s ease-in-out infinite; display: inline-block; }
@keyframes gb-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } }
.flip { transform-box: fill-box; transform-origin: center; animation: gb-flip 0.6s ease-out both; }
@keyframes gb-flip { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ── HRA 3: STOJKA ── */
.gscene--sight { cursor: crosshair; }
.st-sight { color: #fff; }
.st-sight.on { color: var(--gb-green); }
.st-over.zoom { transform-origin: 180px 116px; animation: gb-zoomout 0.7s ease-out both; }
@keyframes gb-zoomout { from { transform: scale(3); opacity: 0.4; } to { transform: none; opacity: 1; } }
.gammo { display: inline-flex; gap: 3px; align-items: center; }
.gammo b { width: 7px; height: 16px; border-radius: 3px 3px 1px 1px; background: linear-gradient(#f3cf6a 0 40%, #b8862a 40%); }
.gammo b.used { background: rgba(255,255,255,0.18); }

/* ── HRA 4: TRESTNÉ KOLO ── */
.gboard {
    position: absolute;
    right: 3%;
    top: 3%;
    background: #0a0f0a;
    border: 2px solid #2d3a2d;
    border-radius: 8px;
    padding: 4px 9px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    line-height: 1;
    min-width: 5.2rem;
}
.gboard small { display: block; font-size: 0.5rem; letter-spacing: 0.14em; font-weight: 700; color: rgba(255,255,255,0.6); text-transform: uppercase; margin-bottom: 2px; }
.gboard b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: #ffb547; text-shadow: 0 0 8px rgba(255,181,71,0.7); letter-spacing: 0.04em; }
.gboard.off b { color: #3d463d; text-shadow: none; }
/* zadání trestných kol s ubíhajícím odpočtem */
.cog-memo {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 12, 7, 0.74);
}
.cog-memo[hidden] { display: none; }
.cog-memo-dial { position: relative; width: min(64%, 220px); aspect-ratio: 1; }
.cog-memo-dial svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.cog-memo-track { fill: rgba(10, 15, 10, 0.9); stroke: rgba(255, 255, 255, 0.12); stroke-width: 8; }
.cog-memo-ring { fill: none; stroke: #ffb547; stroke-width: 8; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255, 181, 71, 0.6)); }
.cog-memo-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    color: #fff;
}
.cog-memo-text small { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: rgba(255, 255, 255, 0.78); }
.cog-memo-text b { font-family: var(--font-display); font-weight: 400; font-size: clamp(3.4rem, 13vw, 4.8rem); color: #ffb547; text-shadow: 0 0 12px rgba(255, 181, 71, 0.6); margin: 0.12em 0 0.04em; }
.cog-memo-text span { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.zone-pulse { animation: gb-zp 1.2s ease-in-out infinite; }
@keyframes gb-zp { 50% { opacity: 0.15; } }

/* ── HRA 5: SPRINT ── */
.gtap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    min-height: 88px;
    margin-top: 12px;
    border: 0;
    border-radius: 18px;
    background: var(--gb-green);
    color: var(--gb-dark);
    font-family: var(--font-display);
    font-size: 2.4rem;
    letter-spacing: 0.04em;
    box-shadow: 0 6px 0 #4f8a17;
    touch-action: manipulation;
    position: relative;
    cursor: pointer;
    font-variant-numeric: tabular-nums;
}
.gtap i { font-size: 1.8rem; }
.gtap:disabled { opacity: 0.55; cursor: default; box-shadow: 0 6px 0 #33541a; }
.gtap:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 3px 0 #4f8a17; }
.gtap.pulse { animation: gb-ring 1s ease-out infinite; }
@keyframes gb-ring { from { box-shadow: 0 6px 0 #4f8a17, 0 0 0 0 rgba(135,210,47,0.7); } to { box-shadow: 0 6px 0 #4f8a17, 0 0 0 16px rgba(135,210,47,0); } }
.gspeed { display: flex; align-items: center; gap: 0.5rem; margin-top: 10px; font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.75); font-variant-numeric: tabular-nums; }
.gspeed .bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; }
.gspeed .bar div { height: 100%; width: 0; background: linear-gradient(90deg, var(--gb-green), #ffd54a); }
.gscene.photo svg { filter: grayscale(1) sepia(0.25) contrast(1.05); }
.pf-tag {
    position: absolute;
    left: 3%;
    top: 4%;
    background: var(--gb-dark);
    color: var(--gb-green);
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    padding: 0.2rem 0.5rem;
    text-transform: uppercase;
}
.pf-time {
    position: absolute;
    background: var(--gb-green);
    color: var(--gb-dark);
    font-weight: 800;
    font-size: 0.72rem;
    border-radius: 6px;
    padding: 0.1rem 0.4rem;
    transform: translate(-50%, 0);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.pf-time { transform: translate(0, -50%); }
.pf-time.behind { transform: translate(-100%, -50%); }
.gcount {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    font-family: var(--font-display);
    font-size: clamp(4rem, 22vw, 7rem);
    color: #fff;
    text-shadow: 0 4px 18px rgba(0,0,0,0.6), 0 0 2px #0d2b0e;
    line-height: 1;
}
.gcount span { animation: gb-count 1s ease-out both; }
@keyframes gb-count { from { transform: scale(1.8); opacity: 0; } 25% { opacity: 1; } to { transform: scale(1); opacity: 0.9; } }

/* ══════════════════════════════════════════
   VÝSLEDKOVÝ LÍSTEK ZÁVODU
══════════════════════════════════════════ */
.race-ticket-section {
    padding: var(--space-xl) 0;
    background: #eef3e8;
}
.race-ticket-inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); }
.rticket {
    background: #fffdf6;
    border-radius: 18px;
    box-shadow: 0 20px 40px -24px rgba(13,43,14,0.55);
    border: 1px solid #ece6d2;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
}
.rticket-head { background: var(--g-900); color: #fff; padding: 1rem 1.2rem; display: flex; align-items: center; gap: 1rem; }
.rticket-head .t { font-family: var(--font-display); font-size: 1.7rem; line-height: 1; }
.rticket-head small { color: var(--g-300); }
.rbib {
    background: #fff;
    color: var(--g-900);
    border-radius: 8px;
    padding: 0.1rem 0.6rem;
    font-family: var(--font-display);
    font-size: 2.2rem;
    line-height: 1;
    border: 3px solid var(--g-400);
}
.rticket-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 1.2rem; border-bottom: 1px dashed #e0d9c3; }
.rticket-row > i { width: 1.4rem; text-align: center; color: var(--g-600); }
.rticket-row .v { margin-left: auto; font-weight: 800; color: var(--g-900); text-align: right; white-space: nowrap; }
.rticket-row small { color: #6b6f63; display: block; font-weight: 400; font-size: 0.75rem; }
.rticket-row.off .v { color: #8a8e82; font-weight: 700; }
.rticket-sum { padding: 1rem 1.2rem; display: flex; align-items: center; gap: 1rem; background: var(--g-100); }
.rticket-sum .pts { font-family: var(--font-display); font-size: 3rem; line-height: 0.9; color: var(--g-600); min-width: 2.2ch; }
.rticket-sum b { color: var(--g-900); }
.rticket-sum small { color: #5c6357; }
.rt-note { font-size: 0.8rem; color: #5c6357; margin-top: 0.6rem; line-height: 1.5; }
.rt-note i { color: var(--g-500); }
.rt-cta { background: var(--g-900); color: #e8f3dc; border-radius: 18px; }
.rt-cta-title { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; color: #fff; }
.rt-cta p { margin: 0.4rem 0 0; color: #e8f3dc; }
.rt-cta p b { color: var(--g-400); }
.rt-btn { background: var(--g-400); color: var(--g-900); font-weight: 800; border-radius: 14px; padding: 0.9rem 1.4rem; text-transform: uppercase; letter-spacing: 0.05em; border: 0; }
.rt-btn:hover, .rt-btn:focus { background: #9be03f; color: var(--g-900); }
.rt-again { border-radius: 14px; padding: 0.8rem 1.4rem; border: 1px solid rgba(255,255,255,0.7); color: #fff; background: transparent; }
.rt-again:hover, .rt-again:focus-visible { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .gbox *, .gbox *::before, .gbox *::after, .gbubble { animation: none !important; transition: none !important; }
}

/* ── MOBIL ── */
@media (max-width: 900px) {
    .phase-inner { grid-template-columns: 1fr; gap: var(--space-lg); }
    #faze-2 .phase-inner, #faze-4 .phase-inner { direction: ltr; }
    .phase-img-wrap { position: relative; top: auto; order: 2; }
    .biatlon-hero h1.biatlon-hero-title--long { font-size: 3.1rem; }
    .finish-podium-hero { min-height: 92.5svh; }
    .finish-podium-copy {
        margin-left: 0;
        padding-top: var(--space-lg);
    }
}

@media (max-width: 700px) {
    .biatlon-hero { background-image: linear-gradient(180deg, rgba(13, 43, 14, 0.82), rgba(13, 43, 14, 0.68)), var(--biatlon-hero-image-sm, var(--biatlon-hero-image)); }
}


@media (max-width: 600px) {
    .biatlon-hero h1.biatlon-hero-title--long {
        font-size: 2.35rem;
        line-height: 1;
    }
    .race-ticket-section { padding: var(--space-lg) 0; }
    .race-ticket-inner { padding: 0 var(--space-sm); }
    .rticket-row { padding: 0.65rem 0.9rem; gap: 0.6rem; }
    .rticket-head, .rticket-sum { padding-left: 0.9rem; padding-right: 0.9rem; }
}

@media (max-width: 380px) {
    .gbox { padding: 12px; }
    .gres .big { font-size: 2.4rem; }
    .gtap { font-size: 2rem; }
}

/* klávesy na tlačítkách: jen na počítači s myší */
.gkeys { display: none; margin-left: 0.4rem; gap: 0.2rem; }
.gkeys kbd { font-family: var(--font-body); font-size: 0.62rem; font-weight: 700; padding: 0.1rem 0.35rem; border-radius: 4px; background: rgba(13,43,14,0.18); color: inherit; letter-spacing: 0; text-transform: none; }
@media (hover: hover) and (pointer: fine) { .gkeys { display: inline-flex; } }
.gpad .gkeys { margin: 0.3rem 0 0; }
.rt-note summary { cursor: pointer; list-style: none; }
.rt-note summary::-webkit-details-marker { display: none; }
.rt-note[open] summary { margin-bottom: 0.3rem; }
.parents-section h2 { display: flex; align-items: center; gap: 0.8rem; }
.parents-frog { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid var(--g-400); flex-shrink: 0; }

/* ══════════════════════════════════════════
   OKNO „ZKUS SI BIATLON“ (titulka): hry po levelech
══════════════════════════════════════════ */
html.zsb-open { overflow: hidden; }
/* konfety v cíli: přes celou obrazovku nad oknem */
.zsb-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 20; }
.zsb {
    padding: 0;
    border: 0;
    margin: auto;
    width: min(560px, 100vw);
    max-width: 100vw;
    max-height: min(94dvh, 940px);
    border-radius: 24px;
    overflow: hidden;
    background: #0b160c;
    color: #fff;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
}
.zsb[open] { display: flex; flex-direction: column; }
.zsb::backdrop { background: rgba(5,15,5,0.78); backdrop-filter: blur(3px); }
.zsb-bar { position: absolute; top: 12px; right: 12px; z-index: 5; }
.zsb-x {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.1rem;
    display: grid;
    place-items: center;
}
.zsb-x:hover, .zsb-x:focus-visible { background: rgba(255,255,255,0.22); }
.zsb-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.zsb-level { display: none; }
.zsb-level.on { display: flex; flex-direction: column; flex: 1 0 auto; }
.zsb .gbox { flex: 1 0 auto; border-radius: 0; box-shadow: none; padding: 16px; }
/* pět koleček nahoře je mapa levelů: místo vpravo patří křížku */
.zsb .grace { margin-right: 46px; }
.zsb .grace li.done { cursor: pointer; }
/* cíl: lístek stejně jako na stránce Biatlon, krémový na světle zeleném */
/* úvod levelu: fotka fáze se žabákem, název disciplíny a jedna věta */
.zsb-level.intro .gbox, .zsb-level:not(.intro) .zsb-intro { display: none; }
.zsb-intro { flex: 1 0 auto; display: flex; flex-direction: column; background: radial-gradient(120% 70% at 0% 100%, #1d3d20 0%, #0f1b10 55%, #080c08 100%); }
.zsb-intro-img { display: block; width: 100%; height: min(58dvh, 540px); object-fit: cover; object-position: center 30%; }
.zsb-intro-text { padding: 20px 20px 24px; }
.zsb-intro h2 { color: #fff; font-size: clamp(2.6rem, 9vw, 3.4rem); line-height: 0.92; margin: 0 0 0.6rem; }
.zsb-intro p { color: rgba(255,255,255,0.8); font-size: 1.02rem; line-height: 1.5; margin: 0 0 1.3rem; }
.zsb-intro .hero-start { border: 0; font-family: inherit; width: 100%; }
/* křížek nad světlou fotkou úvodu musí být vidět */
.zsb:has(.zsb-level.intro.on) .zsb-x { background: rgba(0,0,0,0.5); }
.zsb-finish { position: relative; padding: 16px; background: #eef3e8; color: #111411; }
.zsb:has(.zsb-finish.on) { background: #eef3e8; }
.zsb:has(.zsb-finish.on) .zsb-bar { display: none; }
.zsb-finish .rticket-head { padding-right: 64px; }
/* křížek sedí v tmavé hlavičce lístku, svisle na středu čísla */
.zsb-x--ticket { position: absolute; top: 34px; right: calc(16px + 1rem); z-index: 2; }
.zsb-finish .rt-again { border-color: var(--g-900); color: var(--g-900); }
.zsb-finish .rt-again:hover, .zsb-finish .rt-again:focus-visible { background: var(--g-900); border-color: var(--g-900); color: #fff; }
@media (max-width: 600px) {
    .zsb { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; inset: 0; }
    .zsb .gbox { padding: 12px; }
    /* okno je přes celý displej: hra svisle uprostřed, ne přilepená nahoře */
    .zsb .gbox { display: flex; flex-direction: column; justify-content: center; }
    .zsb .gbox > * { flex-shrink: 0; }
}
