/* =====================================================================
   KVIZ MARATHON v1.2 – kviz izdržljivosti
   Tema: noćni stadion · atletska staza · startni broj
   Sve je ograničeno na .eqm da tema sajta ne bi mijenjala izgled.
   ===================================================================== */

.eqm {
    --eq-ink: #0a1d1a;
    --eq-bg: #0f2824;
    --eq-surface: #143430;
    --eq-surface-2: #1a3f39;
    --eq-line: rgba(243, 236, 218, .11);
    --eq-line-2: rgba(243, 236, 218, .2);
    --eq-text: #f3ecda;
    --eq-muted: #9fb5ab;
    --eq-amber: #ffb627;
    --eq-amber-2: #e89500;
    --eq-track: #c4553a;
    --eq-track-2: #a8432b;
    --eq-good: #3ddc97;
    --eq-bad: #ff6b5b;
    --eq-paper: #f6f0e1;
    --eq-display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
    --eq-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --eq-radius: 20px;

    font-family: var(--eq-body);
    color: var(--eq-text);
    line-height: 1.5;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}
.eqm *, .eqm *::before, .eqm *::after { box-sizing: inherit; }
.eqm [hidden] { display: none !important; }

/* Zaštita od stilova teme */
.eqm h2, .eqm h3, .eqm h4, .eqm p, .eqm ul, .eqm ol { margin: 0; padding: 0; color: inherit; }
.eqm button {
    font: inherit; color: inherit; text-transform: none; letter-spacing: normal;
    background: none; border: 0; margin: 0; box-shadow: none; text-shadow: none;
    line-height: 1.2; min-height: 0; width: auto; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.eqm button:disabled { cursor: default; }
.eqm table, .eqm th, .eqm td { border: 0; background: none; margin: 0; }
.eqm a { box-shadow: none; text-decoration: none; }

.eqm :focus-visible {
    outline: 3px solid var(--eq-amber);
    outline-offset: 3px;
    border-radius: 10px;
}

/* ---------- Zajednički elementi ---------- */
.eqm-tag {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--eq-display);
    font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
    color: var(--eq-amber);
}
.eqm-tag::before {
    content: ""; width: 18px; height: 3px; border-radius: 2px; background: currentColor;
}

.eqm .eqm-title, .eqm .eqm-h2 {
    font-family: var(--eq-display);
    font-weight: 800; text-transform: uppercase; letter-spacing: .01em;
    line-height: .95;
}
.eqm .eqm-title { font-size: clamp(44px, 9vw, 68px); margin-top: 10px; }
.eqm .eqm-title em { font-style: normal; color: var(--eq-amber); display: block; }
.eqm .eqm-h2 { font-size: clamp(30px, 6vw, 42px); margin-top: 10px; }

.eqm-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }

.eqm .eqm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--eq-display); font-weight: 700; font-size: 17px;
    letter-spacing: .08em; text-transform: uppercase;
    padding: 13px 22px; border-radius: 12px;
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease, border-color .2s ease;
}
.eqm .eqm-btn-lg { font-size: 19px; padding: 16px 30px; }
.eqm .eqm-btn-primary {
    background: var(--eq-amber); color: #241700;
    box-shadow: 0 4px 0 var(--eq-amber-2), 0 10px 24px -8px rgba(255, 182, 39, .55);
}
.eqm .eqm-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--eq-amber-2), 0 14px 28px -8px rgba(255, 182, 39, .6); }
.eqm .eqm-btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--eq-amber-2); }
.eqm .eqm-btn-ghost { color: var(--eq-text); border: 1.5px solid var(--eq-line-2); }
.eqm .eqm-btn-ghost:hover { border-color: var(--eq-amber); color: var(--eq-amber); }
.eqm .eqm-btn-ghost:disabled { opacity: .45; border-color: var(--eq-line); color: var(--eq-muted); }
.eqm .eqm-btn-danger { background: var(--eq-bad); color: #2a0703; box-shadow: 0 4px 0 #c94436; }
.eqm .eqm-btn-danger:hover { transform: translateY(-2px); }

.eqm-dots { display: inline-flex; gap: 4px; }
.eqm-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--eq-line-2); transition: background .3s; }
.eqm-dots i.is-on { background: var(--eq-amber); box-shadow: 0 0 6px rgba(255, 182, 39, .6); }

/* =====================================================================
   KONTEJNER IGRE
   ===================================================================== */
.eqm-game {
    position: relative;
    max-width: 780px;
    margin: 30px auto;
    padding: 28px;
    border-radius: var(--eq-radius);
    overflow: hidden;
    isolation: isolate;
    background:
        repeating-radial-gradient(ellipse 120% 70% at 50% 135%, transparent 0 34px, rgba(243, 236, 218, .045) 34px 36px),
        radial-gradient(120% 80% at 85% -10%, rgba(255, 182, 39, .14), transparent 55%),
        radial-gradient(90% 70% at 0% 0%, rgba(61, 220, 151, .08), transparent 60%),
        var(--eq-bg);
    box-shadow: 0 30px 60px -30px rgba(5, 20, 17, .7), inset 0 0 0 1px var(--eq-line);
}

/* Ekrani */
.eqm-game .eqm-screen { display: none; }
.eqm-game[data-screen="loading"] .eqm-screen[data-screen="loading"],
.eqm-game[data-screen="start"] .eqm-screen[data-screen="start"],
.eqm-game[data-screen="race"] .eqm-screen[data-screen="race"],
.eqm-game[data-screen="pause"] .eqm-screen[data-screen="pause"],
.eqm-game[data-screen="checkpoint"] .eqm-screen[data-screen="checkpoint"],
.eqm-game[data-screen="finish"] .eqm-screen[data-screen="finish"] {
    display: block;
    animation: eqm-in .35s ease both;
}
@keyframes eqm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.eqm-game.is-busy { cursor: progress; }

/* ---------- Učitavanje ---------- */
.eqm-game[data-screen="loading"] .eqm-loading {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    min-height: 260px; color: var(--eq-muted);
    font-family: var(--eq-display); letter-spacing: .1em; text-transform: uppercase;
}
.eqm-spinner {
    width: 22px; height: 22px; border-radius: 50%;
    border: 3px solid var(--eq-line-2); border-top-color: var(--eq-amber);
    animation: eqm-spin .8s linear infinite;
}
@keyframes eqm-spin { to { transform: rotate(360deg); } }

/* =====================================================================
   START
   ===================================================================== */
.eqm-start-grid {
    display: grid;
    grid-template-columns: minmax(200px, 250px) 1fr;
    gap: 34px;
    align-items: center;
}

.eqm-bib {
    position: relative;
    background: var(--eq-paper);
    color: var(--eq-ink);
    border-radius: 12px;
    padding: 0 0 14px;
    transform: rotate(-3.5deg);
    box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .65), 0 2px 0 rgba(0, 0, 0, .08);
    text-align: center;
    overflow: hidden;
}
.eqm-bib::after { /* papirna tekstura */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .018) 0 2px, transparent 2px 4px);
}
.eqm-hole {
    position: absolute; width: 11px; height: 11px; border-radius: 50%;
    background: var(--eq-bg); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); z-index: 2;
}
.eqm-hole:nth-child(1) { top: 10px; left: 10px; }
.eqm-hole:nth-child(2) { top: 10px; right: 10px; }
.eqm-hole:nth-child(3) { bottom: 10px; left: 10px; }
.eqm-hole:nth-child(4) { bottom: 10px; right: 10px; }
.eqm-bib-band {
    background: var(--eq-track); color: var(--eq-paper);
    font-family: var(--eq-display); font-weight: 700; font-size: 14px; letter-spacing: .28em;
    padding: 9px 26px 8px;
}
.eqm-bib-num {
    font-family: var(--eq-display); font-weight: 800;
    font-size: 92px; line-height: 1; letter-spacing: -.01em;
    margin-top: 12px; font-variant-numeric: tabular-nums;
}
.eqm-bib-num.is-guest { font-size: 76px; color: var(--eq-track-2); }
.eqm-bib-name {
    font-weight: 600; font-size: 14px; margin-top: 2px; padding: 0 18px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.eqm-bib-foot {
    display: flex; justify-content: space-between; gap: 8px;
    margin: 12px 24px 0; padding-top: 8px; border-top: 1.5px dashed rgba(10, 29, 26, .25);
    font-family: var(--eq-display); font-weight: 600; font-size: 10.5px; letter-spacing: .12em;
}

.eqm .eqm-lead { color: var(--eq-muted); font-size: 17px; margin-top: 14px; max-width: 46ch; }

.eqm .eqm-facts { list-style: none; display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.eqm .eqm-facts li {
    list-style: none; margin: 0;
    flex: 1 1 0; min-width: 90px;
    padding: 12px 14px; border-radius: 14px;
    background: rgba(243, 236, 218, .05); border: 1px solid var(--eq-line);
}
.eqm .eqm-facts b { display: block; font-family: var(--eq-display); font-size: 30px; font-weight: 800; line-height: 1; color: var(--eq-text); }
.eqm .eqm-facts span { font-size: 12.5px; color: var(--eq-muted); text-transform: uppercase; letter-spacing: .08em; }

.eqm-start .eqm-actions { justify-content: flex-start; }

.eqm-resume {
    margin-top: 22px; padding: 16px 18px; border-radius: 16px;
    background: linear-gradient(90deg, rgba(255, 182, 39, .16), rgba(255, 182, 39, .04));
    border: 1px solid rgba(255, 182, 39, .35);
}
.eqm-resume-text strong { display: block; font-family: var(--eq-display); font-size: 20px; text-transform: uppercase; letter-spacing: .04em; color: var(--eq-amber); }
.eqm-resume-text span { font-size: 14.5px; color: var(--eq-text); opacity: .85; }
.eqm-resume .eqm-actions { margin-top: 14px; }

.eqm-rules { margin-top: 22px; border-top: 1px solid var(--eq-line); padding-top: 14px; }
.eqm-rules summary {
    cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--eq-display); font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
    color: var(--eq-muted); font-size: 14px;
}
.eqm-rules summary::-webkit-details-marker { display: none; }
.eqm-rules summary::after { content: "+"; font-size: 18px; color: var(--eq-amber); }
.eqm-rules[open] summary::after { content: "–"; }
.eqm-rules ul { list-style: none; margin-top: 10px; display: grid; gap: 8px; }
.eqm-rules li { list-style: none; margin: 0; position: relative; padding-left: 20px; font-size: 14.5px; color: var(--eq-muted); }
.eqm-rules li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 3px; border-radius: 2px; background: var(--eq-track); }
.eqm-rules b { color: var(--eq-text); }

/* =====================================================================
   UTRKA – HUD
   ===================================================================== */
.eqm-hud {
    padding: 18px 18px 16px; border-radius: 18px;
    background: rgba(10, 29, 26, .55); border: 1px solid var(--eq-line);
}
.eqm-hud-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.eqm-hud-level { display: flex; align-items: baseline; gap: 6px; font-family: var(--eq-display); }
.eqm-hud-level .eqm-k { font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--eq-muted); }
.eqm-hud-level b { font-size: 40px; font-weight: 800; line-height: 1; color: var(--eq-text); font-variant-numeric: tabular-nums; }
.eqm-hud-level .eqm-of { font-size: 18px; font-weight: 600; color: var(--eq-muted); }

.eqm-hud-km { font-family: var(--eq-display); display: flex; align-items: baseline; gap: 4px; }
.eqm-hud-km b { font-size: 30px; font-weight: 800; color: var(--eq-amber); font-variant-numeric: tabular-nums; }
.eqm-hud-km span { font-size: 15px; font-weight: 700; color: var(--eq-muted); text-transform: uppercase; }

.eqm .eqm-pause-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 13px; border-radius: 12px;
    border: 1.5px solid var(--eq-line-2); color: var(--eq-text);
    font-family: var(--eq-display); font-weight: 700; font-size: 15px; letter-spacing: .1em; text-transform: uppercase;
    transition: border-color .2s, color .2s, background .2s;
}
.eqm .eqm-pause-btn svg { fill: currentColor; }
.eqm .eqm-pause-btn:hover { border-color: var(--eq-amber); color: var(--eq-amber); background: rgba(255, 182, 39, .08); }
.eqm .eqm-pause-btn.is-empty { opacity: .5; }

/* Staza */
.eqm-track { margin: 18px 4px 4px; }
.eqm-track-lane {
    position: relative; height: 14px; border-radius: 99px;
    background:
        linear-gradient(90deg, transparent 0 calc(100% - 2px), rgba(255, 255, 255, .55) calc(100% - 2px)) right / 12px 100% no-repeat,
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .22) 0 10px, transparent 10px 20px) center / 100% 2px no-repeat,
        var(--eq-track-2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35);
}
.eqm-track-fill {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #ff8a3d, var(--eq-amber));
    box-shadow: 0 0 14px rgba(255, 182, 39, .5);
    transition: width .8s cubic-bezier(.2, .8, .2, 1);
}
.eqm-runner {
    position: absolute; top: 50%; left: 0;
    width: 30px; height: 30px; margin-left: -15px; margin-top: -15px;
    border-radius: 50%; background: var(--eq-paper); color: var(--eq-ink);
    border: 3px solid var(--eq-amber);
    display: grid; place-items: center;
    font-family: var(--eq-display); font-weight: 800; font-size: 11px; letter-spacing: .04em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    transition: left .8s cubic-bezier(.2, .8, .2, 1);
}
.eqm-runner::after {
    content: ""; position: absolute; inset: -7px; border-radius: 50%;
    border: 2px solid rgba(255, 182, 39, .5);
    animation: eqm-pulse 2s ease-out infinite;
}
@keyframes eqm-pulse { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.eqm-track-marks { position: relative; height: 18px; margin-top: 10px; }
.eqm-track-marks span {
    position: absolute; top: 0; transform: translateX(-50%);
    font-family: var(--eq-display); font-weight: 700; font-size: 11px; letter-spacing: .12em; color: var(--eq-muted);
}
.eqm-track-marks span:first-child { transform: none; }
.eqm-track-marks span:last-child { transform: translateX(-100%); color: var(--eq-amber); }

/* Statistika u HUD-u */
.eqm-hud-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.eqm-stat {
    padding: 9px 10px; border-radius: 12px;
    background: rgba(243, 236, 218, .04); border: 1px solid var(--eq-line);
    text-align: center;
}
.eqm-stat span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--eq-muted); }
.eqm-stat b { font-family: var(--eq-display); font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.eqm-stat.is-good b { color: var(--eq-good); }
.eqm-stat.is-bad b { color: var(--eq-bad); }
.eqm-stat.is-bump { animation: eqm-bump .45s ease; }
@keyframes eqm-bump { 40% { transform: scale(1.08); } }

/* =====================================================================
   PITANJE I ODGOVORI
   ===================================================================== */
.eqm-qcard {
    margin-top: 16px; padding: 22px; border-radius: 18px;
    background: var(--eq-surface); border: 1px solid var(--eq-line);
}
.eqm-qcard.is-in { animation: eqm-in .35s ease both; }

.eqm-pips { display: flex; gap: 5px; }
.eqm-pips i { flex: 1; height: 5px; border-radius: 3px; background: var(--eq-line); transition: background .3s; }
.eqm-pips i.is-good { background: var(--eq-good); }
.eqm-pips i.is-bad { background: var(--eq-bad); }
.eqm-pips i.is-done { background: var(--eq-muted); }
.eqm-pips i.is-now { background: var(--eq-amber); animation: eqm-blink 1.4s ease-in-out infinite; }
@keyframes eqm-blink { 50% { opacity: .35; } }

.eqm-question { margin-top: 18px; }
.eqm-q-meta {
    font-family: var(--eq-display); font-weight: 700; font-size: 13px;
    letter-spacing: .16em; text-transform: uppercase; color: var(--eq-muted);
}
.eqm .eqm-q-text {
    margin-top: 8px;
    font-family: var(--eq-body); font-size: clamp(19px, 3.6vw, 23px); font-weight: 600;
    line-height: 1.38; color: var(--eq-text); text-transform: none; letter-spacing: 0;
}
.eqm-q-text p { margin: 0 0 .4em; }
.eqm-q-text img { max-width: 100%; height: auto; border-radius: 10px; margin-top: 8px; }

.eqm-answers { display: grid; gap: 10px; margin-top: 20px; }
.eqm .eqm-answer {
    display: flex; align-items: center; gap: 14px; width: 100%;
    padding: 12px 16px 12px 12px; border-radius: 14px; text-align: left;
    background: var(--eq-surface-2); border: 1.5px solid transparent;
    color: var(--eq-text); font-size: 16.5px; font-weight: 500; line-height: 1.35;
    transition: border-color .18s, background .18s, transform .18s;
}
.eqm .eqm-answer:not(:disabled):hover { border-color: var(--eq-amber); transform: translateX(4px); }
.eqm-letter {
    flex: none; width: 34px; height: 34px; border-radius: 10px;
    display: grid; place-items: center;
    font-family: var(--eq-display); font-weight: 800; font-size: 17px;
    background: rgba(243, 236, 218, .08); color: var(--eq-amber);
    transition: background .18s, color .18s;
}
.eqm-answer-text { flex: 1; }
.eqm-answer-text p { margin: 0; }
.eqm .eqm-answer:disabled { opacity: .55; }
.eqm .eqm-answer.is-pending { opacity: 1; border-color: var(--eq-amber); background-image: linear-gradient(90deg, transparent, rgba(255, 182, 39, .12), transparent); background-size: 200% 100%; animation: eqm-shimmer 1s linear infinite; }
@keyframes eqm-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.eqm .eqm-answer.is-correct { opacity: 1; background: rgba(61, 220, 151, .16); border-color: var(--eq-good); }
.eqm .eqm-answer.is-correct .eqm-letter { background: var(--eq-good); color: #04271a; }
.eqm .eqm-answer.is-wrong { opacity: 1; background: rgba(255, 107, 91, .15); border-color: var(--eq-bad); animation: eqm-shake .4s ease; }
.eqm .eqm-answer.is-wrong .eqm-letter { background: var(--eq-bad); color: #2a0703; }
.eqm .eqm-answer.is-reveal { animation: eqm-glow 1s ease 2; }
@keyframes eqm-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes eqm-glow { 50% { box-shadow: 0 0 0 4px rgba(61, 220, 151, .25); } }

.eqm-race-foot { display: flex; justify-content: center; margin-top: 16px; }
.eqm .eqm-link-btn {
    color: var(--eq-muted); font-size: 14px; padding: 8px 10px;
    text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--eq-line-2);
}
.eqm .eqm-link-btn:hover { color: var(--eq-bad); text-decoration-color: currentColor; }

/* =====================================================================
   PAUZA – OKREPNA STANICA
   ===================================================================== */
.eqm-pause, .eqm-checkpoint, .eqm-finish { text-align: center; padding: 10px 0 4px; position: relative; }

.eqm-ring { position: relative; width: 230px; height: 230px; margin: 26px auto 18px; }
.eqm-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.eqm-ring circle { fill: none; stroke-width: 7; }
.eqm-ring-bg { stroke: var(--eq-line); }
.eqm-ring-fg { stroke: var(--eq-amber); stroke-linecap: round; transition: stroke .3s; filter: drop-shadow(0 0 6px rgba(255, 182, 39, .45)); }
.eqm-ring.is-low .eqm-ring-fg { stroke: var(--eq-bad); filter: drop-shadow(0 0 6px rgba(255, 107, 91, .5)); }
.eqm-ring.is-low .eqm-countdown { color: var(--eq-bad); animation: eqm-blink 1s ease-in-out infinite; }
.eqm-ring-inner { position: absolute; inset: 0; display: grid; place-content: center; }
.eqm-countdown {
    font-family: var(--eq-display); font-weight: 800; font-size: 58px; line-height: 1;
    font-variant-numeric: tabular-nums; letter-spacing: .01em;
}
.eqm-ring-inner small { font-size: 11.5px; letter-spacing: .08em; max-width: 150px; margin-left: auto; margin-right: auto; text-align: center; line-height: 1.3; text-transform: uppercase; color: var(--eq-muted); margin-top: 6px; }

.eqm .eqm-pause-note { max-width: 48ch; margin: 0 auto; color: var(--eq-muted); font-size: 15.5px; }
.eqm .eqm-pause-note b { color: var(--eq-text); }
.eqm-pause-left {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 16px;
    padding: 8px 14px; border-radius: 99px; background: rgba(243, 236, 218, .05); border: 1px solid var(--eq-line);
    font-size: 14px; color: var(--eq-text);
}

/* =====================================================================
   KONTROLNA TAČKA
   ===================================================================== */
.eqm .eqm-split { margin-top: 20px; display: flex; flex-direction: column; align-items: center; }
.eqm .eqm-split b { font-family: var(--eq-display); font-weight: 800; font-size: 76px; line-height: 1; color: var(--eq-amber); font-variant-numeric: tabular-nums; }
.eqm .eqm-split span { color: var(--eq-muted); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.eqm-pips-lg { max-width: 360px; margin: 18px auto 0; }
.eqm-pips-lg i { height: 9px; }
.eqm .eqm-cp-total { margin-top: 16px; color: var(--eq-muted); font-size: 15px; }

/* =====================================================================
   CILJ
   ===================================================================== */
.eqm-medal { position: relative; width: 120px; height: 150px; margin: 0 auto 8px; }
.eqm-ribbon {
    position: absolute; left: 50%; top: 0; width: 70px; height: 70px; margin-left: -35px;
    background: linear-gradient(90deg, var(--eq-track) 0 50%, #1f7a5a 50% 100%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}
.eqm-disc {
    position: absolute; left: 50%; bottom: 0; width: 104px; height: 104px; margin-left: -52px;
    border-radius: 50%; display: grid; place-content: center; text-align: center;
    background: radial-gradient(circle at 35% 30%, #fff1b8, #ffcc4d 35%, #e89500 75%, #b86f00);
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .25), inset 0 -6px 12px rgba(120, 60, 0, .4), 0 14px 30px -10px rgba(255, 182, 39, .6);
    color: #3a2400;
    animation: eqm-swing 3s ease-in-out infinite; transform-origin: 50% -40px;
}
.eqm-disc b { font-family: var(--eq-display); font-weight: 800; font-size: 40px; line-height: 1; }
.eqm-disc small { font-family: var(--eq-display); font-weight: 700; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
@keyframes eqm-swing { 50% { transform: rotate(4deg); } }
.eqm-game[data-reason="pause_expired"] .eqm-disc,
.eqm-game[data-reason="inactive"] .eqm-disc {
    background: radial-gradient(circle at 35% 30%, #ffffff, #d9dde0 35%, #a5adb3 75%, #7d868c);
    color: #1f2a30; box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .25), 0 14px 30px -12px rgba(0, 0, 0, .5);
}
.eqm-game[data-reason="pause_expired"] .eqm-finish-tag,
.eqm-game[data-reason="inactive"] .eqm-finish-tag { color: var(--eq-bad); }

.eqm .eqm-finish-msg { max-width: 50ch; margin: 12px auto 0; color: var(--eq-muted); font-size: 16px; }
.eqm .eqm-final {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    max-width: 560px; margin: 22px auto 0;
}
.eqm .eqm-final div { padding: 12px 8px; border-radius: 14px; background: rgba(243, 236, 218, .05); border: 1px solid var(--eq-line); }
.eqm .eqm-final span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--eq-muted); }
.eqm .eqm-final b { font-family: var(--eq-display); font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.eqm .eqm-final .is-good b { color: var(--eq-good); }
.eqm .eqm-final .is-bad b { color: var(--eq-bad); }
.eqm .eqm-rank { margin-top: 16px; font-size: 16px; color: var(--eq-text); }
.eqm .eqm-rank b { font-family: var(--eq-display); font-size: 24px; color: var(--eq-amber); }

.eqm-confetti { position: absolute; inset: -30px 0 auto; height: 0; pointer-events: none; z-index: 3; }
.eqm-confetti i {
    position: absolute; top: 0; width: 8px; height: 13px; border-radius: 2px;
    animation-name: eqm-fall; animation-timing-function: cubic-bezier(.3, .6, .5, 1); animation-fill-mode: both;
}
@keyframes eqm-fall {
    from { transform: translateY(0) rotate(0); opacity: 1; }
    to { transform: translateY(520px) rotate(540deg); opacity: 0; }
}

/* =====================================================================
   MODAL I TOAST
   ===================================================================== */
.eqm-modal {
    position: absolute; inset: 0; z-index: 20;
    display: grid; place-items: center; padding: 20px;
    background: rgba(6, 18, 16, .78); backdrop-filter: blur(4px);
    animation: eqm-fade .2s ease both;
}
@keyframes eqm-fade { from { opacity: 0; } }
.eqm-modal-card {
    max-width: 400px; width: 100%; padding: 26px 24px; border-radius: 18px; text-align: center;
    background: var(--eq-surface); border: 1px solid var(--eq-line-2);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.eqm-modal-card h3 { font-family: var(--eq-display); font-weight: 800; font-size: 28px; text-transform: uppercase; }
.eqm-modal-card p { margin-top: 10px; color: var(--eq-muted); }
.eqm-modal-card p b { color: var(--eq-text); }
.eqm-modal-card .eqm-actions { margin-top: 20px; }

.eqm-toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 99999;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
    background: var(--eq-ink); color: var(--eq-text); border: 1px solid var(--eq-line-2);
    font-size: 15px; box-shadow: 0 16px 30px -10px rgba(0, 0, 0, .5);
    transition: opacity .25s, transform .25s;
}
.eqm-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.eqm-noscript { padding: 20px; text-align: center; }

/* =====================================================================
   RANGLISTE
   ===================================================================== */
.eqm-board {
    max-width: 780px; margin: 30px auto; padding: 22px;
    border-radius: var(--eq-radius); position: relative; overflow: hidden;
    background:
        radial-gradient(90% 60% at 100% 0%, rgba(255, 182, 39, .1), transparent 60%),
        var(--eq-bg);
    box-shadow: 0 24px 50px -30px rgba(5, 20, 17, .7), inset 0 0 0 1px var(--eq-line);
}
.eqm-board::before { /* traka učitavanja */
    content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
    background: var(--eq-amber); opacity: 0; transition: opacity .2s;
}
.eqm-board.is-loading::before { opacity: 1; animation: eqm-load 1s ease-in-out infinite; }
@keyframes eqm-load { 0% { left: 0; width: 0; } 50% { left: 20%; width: 60%; } 100% { left: 100%; width: 0; } }
.eqm-board.is-loading tbody { opacity: .45; transition: opacity .15s; }

.eqm-board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.eqm .eqm-board-title {
    font-family: var(--eq-display); font-weight: 800; font-size: 30px;
    text-transform: uppercase; line-height: 1; margin-top: 6px; color: var(--eq-text);
}
.eqm-board-count { font-size: 13px; color: var(--eq-muted); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.eqm-board-count b { font-family: var(--eq-display); font-size: 18px; color: var(--eq-text); }

.eqm .eqm-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 15.5px; table-layout: auto; }
.eqm .eqm-table th {
    padding: 0 12px 2px; text-align: left;
    font-family: var(--eq-display); font-weight: 700; font-size: 12px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--eq-muted);
}
.eqm .eqm-table td {
    padding: 11px 12px; background: rgba(243, 236, 218, .045); color: var(--eq-text);
    border-top: 1px solid var(--eq-line); border-bottom: 1px solid var(--eq-line); vertical-align: middle;
}
.eqm .eqm-table td:first-child { border-left: 1px solid var(--eq-line); border-radius: 12px 0 0 12px; }
.eqm .eqm-table td:last-child { border-right: 1px solid var(--eq-line); border-radius: 0 12px 12px 0; }
.eqm .eqm-table .eqm-c-pos { width: 56px; }
.eqm .eqm-table .eqm-c-num { width: 76px; text-align: center; font-variant-numeric: tabular-nums; }
.eqm .eqm-table td.eqm-c-num b { font-family: var(--eq-display); font-size: 20px; font-weight: 800; color: var(--eq-amber); }
.eqm .eqm-table td.eqm-c-num:last-child { font-family: var(--eq-display); font-size: 18px; font-weight: 700; }

.eqm .eqm-table .eqm-c-acc { width: 110px; text-align: center; }
.eqm-acc { display: block; font-family: var(--eq-display); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.eqm-acc.is-high { color: var(--eq-good); }
.eqm-acc.is-mid { color: var(--eq-text); }
.eqm-acc.is-low { color: var(--eq-bad); }
.eqm-acc-bar { display: block; height: 4px; margin: 5px auto 0; max-width: 70px; border-radius: 3px; background: var(--eq-line); overflow: hidden; }
.eqm-acc-bar span { display: block; height: 100%; border-radius: 3px; background: var(--eq-muted); }
.eqm-acc-bar span.is-high { background: var(--eq-good); }
.eqm-acc-bar span.is-low { background: var(--eq-bad); }

.eqm-place {
    display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px;
    font-family: var(--eq-display); font-weight: 800; font-size: 16px;
    background: rgba(243, 236, 218, .07); color: var(--eq-muted);
}
.eqm-place-1 { background: linear-gradient(135deg, #ffe08a, #e8a400); color: #3a2400; }
.eqm-place-2 { background: linear-gradient(135deg, #f1f3f4, #a9b2b8); color: #1f2a30; }
.eqm-place-3 { background: linear-gradient(135deg, #f3b98c, #b56a35); color: #2e1405; }
.eqm .eqm-table tr.is-p1 td { background: rgba(255, 182, 39, .1); border-color: rgba(255, 182, 39, .3); }

.eqm-name { font-weight: 600; word-break: break-word; }
.eqm-me {
    display: inline-block; margin-left: 6px; padding: 1px 7px 0; border-radius: 6px; vertical-align: 1px;
    background: var(--eq-amber); color: #241700;
    font-family: var(--eq-display); font-weight: 800; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
}
.eqm .eqm-table tr.is-me td { background: rgba(255, 182, 39, .12); }
.eqm .eqm-table tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--eq-amber); }
.eqm-when { display: block; font-size: 12.5px; color: var(--eq-muted); margin-top: 1px; }
.eqm .eqm-table tr.eqm-empty td { text-align: center; color: var(--eq-muted); padding: 26px 12px; border-radius: 12px; border: 1px dashed var(--eq-line-2); }

.eqm-board.is-swapped tbody tr { animation: eqm-row .35s ease both; }
.eqm-board.is-swapped tbody tr:nth-child(2) { animation-delay: .03s; }
.eqm-board.is-swapped tbody tr:nth-child(3) { animation-delay: .06s; }
.eqm-board.is-swapped tbody tr:nth-child(4) { animation-delay: .09s; }
.eqm-board.is-swapped tbody tr:nth-child(5) { animation-delay: .12s; }
.eqm-board.is-swapped tbody tr:nth-child(6) { animation-delay: .15s; }
.eqm-board.is-swapped tbody tr:nth-child(7) { animation-delay: .18s; }
.eqm-board.is-swapped tbody tr:nth-child(8) { animation-delay: .21s; }
.eqm-board.is-swapped tbody tr:nth-child(9) { animation-delay: .24s; }
.eqm-board.is-swapped tbody tr:nth-child(10) { animation-delay: .27s; }
@keyframes eqm-row { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

.eqm-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.eqm-pager:empty { display: none; }
.eqm .eqm-pg {
    display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px;
    font-family: var(--eq-display); font-weight: 700; font-size: 16px;
    color: var(--eq-text); border: 1.5px solid var(--eq-line); text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
}
.eqm a.eqm-pg:hover { border-color: var(--eq-amber); color: var(--eq-amber); }
.eqm .eqm-pg.is-current { background: var(--eq-amber); color: #241700; border-color: var(--eq-amber); }
.eqm .eqm-pg.is-off { opacity: .3; }
.eqm .eqm-pg-arrow { font-size: 22px; line-height: 1; }
.eqm-pg-gap { color: var(--eq-muted); padding: 0 2px; }

/* =====================================================================
   STATISTIKA
   ===================================================================== */
.eqm-stats {
    max-width: 780px; margin: 0 auto 25px; padding: 20px 22px; border-radius: var(--eq-radius);
    background: var(--eq-bg); box-shadow: inset 0 0 0 1px var(--eq-line);
}
.eqm-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.eqm-stats-item { padding: 12px 14px; border-radius: 14px; background: rgba(243, 236, 218, .05); border: 1px solid var(--eq-line); }
.eqm-stats-item span { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--eq-muted); }
.eqm-stats-item b { font-family: var(--eq-display); font-size: 30px; font-weight: 800; line-height: 1.1; color: var(--eq-text); }
.eqm-stats-item b small { font-size: 14px; font-weight: 600; color: var(--eq-muted); }

/* Naslovi uvijek svijetli – tema sajta ih ne smije prebojiti u crno */
.eqm .eqm-h2,
.eqm .eqm-title,
.eqm .eqm-q-text,
.eqm .eqm-q-text *,
.eqm .eqm-modal-card h3,
.eqm .eqm-board-title { color: #ffffff !important; }
.eqm .eqm-title em { color: var(--eq-amber) !important; }

/* =====================================================================
   MOBITEL
   ===================================================================== */
@media (max-width: 640px) {
    .eqm-game { padding: 18px 16px; margin: 16px auto; border-radius: 16px; }
    .eqm-start-grid { grid-template-columns: 1fr; gap: 22px; }
    .eqm-bib { max-width: 230px; margin: 6px auto 0; width: 100%; }
    .eqm-bib-num { font-size: 76px; }
    .eqm-bib-num.is-guest { font-size: 64px; }
    .eqm-start-copy { text-align: center; }
    .eqm .eqm-lead { margin-left: auto; margin-right: auto; }
    .eqm-start .eqm-actions { justify-content: center; }
    .eqm-rules { text-align: left; }

    .eqm-hud { padding: 14px 12px 12px; }
    .eqm-hud-level b { font-size: 32px; }
    .eqm-hud-km b { font-size: 24px; }
    .eqm .eqm-pause-btn { padding: 8px 10px; }
    .eqm .eqm-pause-btn .eqm-pause-label { display: none; }
    .eqm-hud-stats { gap: 6px; }
    .eqm-stat { padding: 7px 4px; }
    .eqm-stat span { font-size: 9.5px; letter-spacing: .08em; }
    .eqm-stat b { font-size: 20px; }
    .eqm-track-marks span { font-size: 9.5px; }

    .eqm-qcard { padding: 16px; }
    .eqm .eqm-answer { font-size: 15.5px; padding: 10px 12px 10px 10px; gap: 11px; }
    .eqm-letter { width: 30px; height: 30px; font-size: 15px; }

    .eqm-ring { width: 200px; height: 200px; }
    .eqm-countdown { font-size: 50px; }
    .eqm .eqm-final { grid-template-columns: repeat(2, 1fr); }
    .eqm .eqm-btn-lg { width: 100%; }
    .eqm-actions { flex-direction: column; align-items: stretch; }

    .eqm-board { padding: 16px 12px; border-radius: 16px; }
    .eqm .eqm-board-title { font-size: 24px; }
    .eqm .eqm-table { font-size: 14.5px; }
    .eqm .eqm-table th, .eqm .eqm-table td { padding-left: 8px; padding-right: 8px; }
    .eqm .eqm-table .eqm-c-pos { width: 44px; }
    .eqm .eqm-table .eqm-c-num { width: 54px; }
    .eqm .eqm-table .eqm-c-acc { width: 56px; }
    .eqm .eqm-table th.eqm-c-acc { font-size: 0; }
    .eqm .eqm-table th.eqm-c-acc::after { content: "%"; font-size: 12px; }
    .eqm-acc { font-size: 16px; }
    .eqm-acc-bar { display: none; }
    .eqm-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .eqm *, .eqm *::before, .eqm *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .eqm-confetti { display: none; }
}
