/* Știi România? — trivia about Romania (js/stii-romania.js).
   Theme-aware like the other game pages: tokens on :root, redefined under body.dark-theme. */
:root {
    --st-accent: #1d4ed8;
    --st-accent-2: #1e40af;
    --st-accent-soft: #e6edfd;
    --st-on-accent: #ffffff;
    --st-gold: #ca8a04;
    --st-gold-soft: #fef3c7;
    --st-red: #dc2626;
    --st-page-bg: #f4f6fb;
    --st-card-bg: #ffffff;
    --st-card-border: #dde3ef;
    --st-muted: #5b6478;
    --st-shadow: 0 10px 30px rgba(20, 40, 90, .10);
    --st-opt-bg: #f7f9fd;
    --st-opt-hover: #edf2fd;
    --st-ok: #15803d;
    --st-ok-soft: #dcfce7;
    --st-bad: #dc2626;
    --st-bad-soft: #fee2e2;
    --st-overlay: rgba(10, 20, 45, .58);
    --st-p0: #2563eb;
    --st-p1: #dc2626;
    --st-p2: #ca8a04;
    --st-p3: #16a34a;
    --st-tip-ink: #854d0e;
    --st-ref: #6d28d9;
    --st-ref-soft: #ede9fe;
}

body.dark-theme {
    --st-accent: #6b9bff;
    --st-accent-2: #93b4ff;
    --st-accent-soft: #17233f;
    --st-on-accent: #0a1430;
    --st-gold: #facc15;
    --st-gold-soft: #3a3110;
    --st-red: #f87171;
    --st-page-bg: #0e1220;
    --st-card-bg: #171c2c;
    --st-card-border: #2a3248;
    --st-muted: #a6afc4;
    --st-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    --st-opt-bg: #1d2336;
    --st-opt-hover: #232b42;
    --st-ok: #4ade80;
    --st-ok-soft: #0f3020;
    --st-bad: #f87171;
    --st-bad-soft: #3a1518;
    --st-overlay: rgba(0, 0, 0, .66);
    --st-p0: #6b9bff;
    --st-p1: #f87171;
    --st-p2: #facc15;
    --st-p3: #4ade80;
    --st-tip-ink: #fde68a;
    --st-ref: #c4b5fd;
    --st-ref-soft: #2a2147;
}

/* clip, not hidden: the site-wide `body { overflow-x: hidden }` makes <body> a scroll
   container that never scrolls, which silently kills any position: sticky inside. */
.st-body, body.st-body#page-top {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--st-page-bg);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: clip;
}
.st-main { padding-top: 92px; padding-bottom: 40px; }
.st-game .container, .st-hero .container { max-width: 720px; }

/* ---- hero ---- */
.st-hero { text-align: center; padding: 4px 0 8px; }
.st-hero h1 { font-weight: 800; font-size: clamp(1.6rem, 5vw, 2.2rem); margin-bottom: 4px; }
.st-hero-icon { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 12px; font-size: .8em; vertical-align: .08em; color: #fff; background: linear-gradient(90deg, #1d4ed8 0 33.3%, #eab308 33.3% 66.6%, #dc2626 66.6%); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.st-hero-icon svg { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.st-lead { margin: 0 auto; max-width: 560px; color: var(--st-muted); font-size: .98rem; line-height: 1.45; }
body.st-playing .st-hero { display: none; }
body.st-playing .st-main { padding-top: 84px; }
.st-loading { text-align: center; color: var(--st-muted); font-weight: 700; padding: 30px 0; }
.st-loading[hidden] { display: none; }

/* ---- buttons ---- */
.st-btn { min-height: 48px; padding: 8px 16px; border-radius: 14px; border: 1px solid var(--st-card-border); background: var(--st-card-bg); color: inherit; font-weight: 700; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; touch-action: manipulation; transition: background .15s, border-color .15s, transform .1s; }
.st-btn:hover { border-color: var(--st-accent); }
.st-btn:active { transform: scale(.98); }
.st-btn[hidden] { display: none; }
.st-btn:disabled { opacity: .45; cursor: default; transform: none; }
.st-btn-primary { background: var(--st-accent); border-color: var(--st-accent); color: var(--st-on-accent); }
.st-btn-primary:hover { background: var(--st-accent-2); border-color: var(--st-accent-2); }
.st-btn-ghost { background: transparent; border-color: transparent; color: var(--st-muted); }
.st-wide { width: 100%; }
.st-btn:focus-visible, .st-chip:focus-visible, .st-mode:focus-visible, .st-catchip:focus-visible, .st-opt:focus-visible, .st-round:focus-visible, .st-link:focus-visible { outline: 3px solid var(--st-accent); outline-offset: 2px; }
.st-link { border: 0; background: none; padding: 6px; color: var(--st-muted); font-size: .85rem; text-decoration: underline; cursor: pointer; }
.st-link[hidden] { display: none; }

/* ---- setup ---- */
.st-setup { max-width: 560px; margin: 6px auto 0; padding: 16px; border-radius: 18px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); box-shadow: var(--st-shadow); display: flex; flex-direction: column; gap: 14px; }
.st-setup[hidden] { display: none; }
.st-setup-title { margin: 0; font-size: 1.3rem; font-weight: 800; text-align: center; }
.st-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-mode { min-height: 64px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--st-card-border); background: var(--st-page-bg); color: inherit; cursor: pointer; touch-action: manipulation; display: flex; align-items: center; gap: 10px; text-align: left; transition: background .15s, border-color .15s; }
.st-mode:hover { border-color: var(--st-accent); }
.st-mode-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--st-accent-soft); color: var(--st-accent); font-size: 16px; }
.st-mode-t { display: flex; flex-direction: column; font-weight: 800; font-size: .95rem; line-height: 1.15; min-width: 0; }
.st-mode-t small { font-weight: 600; font-size: .74rem; color: var(--st-muted); margin-top: 2px; }
.st-mode[aria-checked="true"] { background: var(--st-accent); border-color: var(--st-accent); color: var(--st-on-accent); }
.st-mode[aria-checked="true"] .st-mode-t small { color: inherit; opacity: .85; }
.st-mode[aria-checked="true"] .st-mode-icon { background: rgba(255, 255, 255, .2); color: inherit; }
.st-mode-daily { grid-column: 1 / -1; }
.st-mode-daily .st-mode-icon { background: var(--st-gold-soft); color: var(--st-gold); }
.st-field { display: flex; flex-direction: column; gap: 6px; }
.st-field[hidden] { display: none; }
.st-label { font-weight: 700; font-size: .9rem; color: var(--st-muted); }
.st-note { color: var(--st-muted); font-size: .84rem; line-height: 1.4; margin: 0; }
.st-chips { display: flex; gap: 6px; }
.st-chip { flex: 1; min-height: 46px; padding: 4px 6px; border-radius: 12px; border: 1px solid var(--st-card-border); background: var(--st-page-bg); color: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; touch-action: manipulation; }
.st-chip[aria-checked="true"] { background: var(--st-accent); border-color: var(--st-accent); color: var(--st-on-accent); }
.st-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-catchip { min-height: 52px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--st-card-border); background: var(--st-page-bg); color: inherit; cursor: pointer; touch-action: manipulation; display: grid; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; }
.st-catchip svg, .st-catchip i { grid-row: 1 / 3; color: var(--st-accent); font-size: 17px; justify-self: center; }
.st-catchip span { font-weight: 800; font-size: .92rem; line-height: 1.15; }
.st-catchip small { color: var(--st-muted); font-size: .72rem; font-weight: 600; }
.st-catchip[aria-checked="true"] { background: var(--st-accent); border-color: var(--st-accent); color: var(--st-on-accent); }
.st-catchip[aria-checked="true"] svg, .st-catchip[aria-checked="true"] small { color: inherit; }
.st-seats { display: grid; gap: 6px; margin-bottom: 4px; }
.st-seat { display: flex; align-items: center; gap: 8px; margin: 0; }
.st-seat input { flex: 1; min-width: 0; min-height: 44px; padding: 6px 12px; border-radius: 12px; border: 1px solid var(--st-card-border); background: var(--st-page-bg); color: inherit; font-size: 1rem; }
.st-seat input:focus { outline: 2px solid var(--st-accent); outline-offset: 1px; }
.st-seat-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; font-size: .9rem; color: #fff; background: var(--pc, var(--st-p0)); }
body.dark-theme .st-seat-n { color: #0a1020; }
.st-p0 { --pc: var(--st-p0); }
.st-p1 { --pc: var(--st-p1); }
.st-p2 { --pc: var(--st-p2); }
.st-p3 { --pc: var(--st-p3); }
.st-daily { padding: 12px 14px; border-radius: 14px; background: var(--st-gold-soft); border: 1px solid color-mix(in srgb, var(--st-gold) 40%, transparent); display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.st-daily[hidden] { display: none; }
.st-daily p { margin: 0; }
.st-daily-date { font-weight: 800; font-size: 1.05rem; }
.st-daily-done { font-size: .98rem; }
.st-daily-streak { font-weight: 800; color: var(--st-gold); font-size: .9rem; }
.st-daily .st-btn { min-height: 42px; padding: 6px 4px; color: var(--st-accent); }
.st-marks { display: flex; gap: 4px; }
.st-mark { width: 18px; height: 18px; border-radius: 4px; background: var(--st-bad); }
.st-mark.is-ok { background: var(--st-ok); }
.st-marks-big { justify-content: center; margin: 6px 0; }
.st-marks-big .st-mark { width: 24px; height: 24px; border-radius: 6px; }

/* ---- play ---- */
.st-play { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: 0 auto; }
.st-play[hidden] { display: none; }
.st-top { display: flex; align-items: center; gap: 6px; min-height: 50px; padding: 4px 6px 4px 12px; border-radius: 14px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); }
.st-top-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.st-top-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .98rem; }
.st-top-info small { color: var(--st-muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-score { min-width: 54px; padding: 4px 10px; border-radius: 999px; background: var(--st-accent-soft); color: var(--st-accent); font-weight: 900; font-size: 1.05rem; text-align: center; font-variant-numeric: tabular-nums; }
.st-streak { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: var(--st-gold-soft); color: var(--st-gold); font-weight: 900; font-size: .92rem; animation: st-pop .3s ease-out; }
.st-streak[hidden] { display: none; }
@keyframes st-pop { 0% { transform: scale(.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.st-round { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--st-card-border); display: grid; place-items: center; background: var(--st-page-bg); color: inherit; font-size: 14px; cursor: pointer; touch-action: manipulation; padding: 0; }
.st-round[hidden], .st-round span[hidden] { display: none; }
.st-players { display: flex; gap: 6px; flex-wrap: wrap; }
.st-players[hidden] { display: none; }
.st-pl { flex: 1 1 0; min-width: 70px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px; border-radius: 12px; background: var(--st-card-bg); border: 2px solid var(--st-card-border); font-size: .88rem; }
.st-pl b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.st-pl span { font-weight: 900; font-variant-numeric: tabular-nums; color: var(--pc); }
.st-pl.is-turn { border-color: var(--pc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 25%, transparent); }

.st-timer { display: flex; align-items: center; gap: 10px; height: 26px; }
.st-timer-track { flex: 1; height: 10px; border-radius: 999px; background: var(--st-card-border); overflow: hidden; }
.st-timer-fill { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #1d4ed8, #eab308 55%, #dc2626); background-size: 100% 100%; transform-origin: left center; transition: transform .1s linear; }
.st-timer-text { width: 30px; text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--st-muted); }
.st-timer.is-low .st-timer-text { color: var(--st-bad); animation: st-blink 1s steps(2, start) infinite; }
/* untimed games: the bar is gone for the whole game, so hiding it shifts nothing mid-game */
.st-timer.is-off { display: none; }
@keyframes st-blink { 50% { opacity: .45; } }

.st-card { position: relative; padding: 16px; border-radius: 20px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); box-shadow: var(--st-shadow); }
.st-card.is-covered > * { visibility: hidden; }
.st-qmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.st-qcat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--st-accent-soft); color: var(--st-accent); font-weight: 800; font-size: .8rem; }
.st-qlvl { display: inline-flex; align-items: center; gap: 6px; color: var(--st-muted); font-weight: 700; font-size: .8rem; }
.st-lvl-dots { display: inline-flex; gap: 3px; }
.st-lvl-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--st-card-border); }
.st-lvl-dots i.is-on { background: var(--st-gold); }
.st-q { margin: 0 0 14px; font-size: clamp(1.12rem, 4.6vw, 1.4rem); font-weight: 800; line-height: 1.3; min-height: 2.6em; }
.st-opts { display: grid; gap: 8px; }
@media (min-width: 640px) { .st-opts { grid-template-columns: 1fr 1fr; } }
.st-opt { position: relative; min-height: 56px; padding: 8px 12px 8px 8px; border-radius: 14px; border: 2px solid var(--st-card-border); background: var(--st-opt-bg); color: inherit; font-weight: 700; font-size: 1rem; line-height: 1.25; text-align: left; display: flex; align-items: center; gap: 10px; cursor: pointer; touch-action: manipulation; transition: background .15s, border-color .15s, opacity .2s, transform .1s; }
.st-opt:hover:not(:disabled) { border-color: var(--st-accent); background: var(--st-opt-hover); }
.st-opt:active:not(:disabled) { transform: scale(.985); }
.st-opt:disabled { cursor: default; }
.st-key { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--st-card-bg); border: 1px solid var(--st-card-border); font-weight: 900; font-size: .85rem; color: var(--st-muted); }
.st-otext { min-width: 0; overflow-wrap: anywhere; }
.st-opt.is-correct { border-color: var(--st-ok); background: var(--st-ok-soft); animation: st-pop .35s ease-out; }
.st-opt.is-correct .st-key { background: var(--st-ok); border-color: var(--st-ok); color: #fff; }
.st-opt.is-wrong { border-color: var(--st-bad); background: var(--st-bad-soft); animation: st-shake .35s ease-in-out; }
.st-opt.is-wrong .st-key { background: var(--st-bad); border-color: var(--st-bad); color: #fff; }
body.dark-theme .st-opt.is-correct .st-key, body.dark-theme .st-opt.is-wrong .st-key { color: #0a1020; }
.st-opt.is-dim { opacity: .5; }
.st-opt.is-gone { visibility: hidden; }
@keyframes st-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.st-feedback { margin-top: 12px; min-height: 4.6em; padding: 8px 12px; border-radius: 12px; visibility: hidden; }
.st-feedback.is-on { visibility: visible; }
.st-feedback.is-ok { background: var(--st-ok-soft); }
.st-feedback.is-bad { background: var(--st-bad-soft); }
.st-feedback p { margin: 0; }
.st-verdict { font-weight: 800; }
.st-feedback.is-ok .st-verdict { color: var(--st-ok); }
.st-feedback.is-bad .st-verdict { color: var(--st-bad); }
.st-expl { font-size: .9rem; line-height: 1.4; margin-top: 2px !important; }
.st-expl a { color: var(--st-accent); font-weight: 700; white-space: nowrap; font-size: .85rem; }
.st-expl a[hidden] { display: none; }
.st-verdict small { font-weight: 600; font-size: .8rem; color: var(--st-muted); }
.st-picked { margin-top: 4px; font-size: .9rem; line-height: 1.4; }
.st-picked[hidden] { display: none; }
.st-picked-h b { color: var(--st-bad); }
.st-picked-d { margin-top: 2px !important; }
.st-right b { color: var(--st-ok); }
.st-feedback .st-expl { margin-top: 6px !important; }

/* ---- notes: tip, the note's source, timeline, "Știai că…" ---- */
.st-tip { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--st-gold-soft); border-left: 4px solid var(--st-gold); font-size: .9rem; line-height: 1.4; }
.st-tip p { margin: 0; }
.st-tip-h { font-weight: 800; color: var(--st-tip-ink); display: flex; align-items: center; gap: 6px; }
.st-dsrc { margin: 6px 0 0 !important; font-size: .78rem; line-height: 1.45; color: var(--st-muted); overflow-wrap: anywhere; }
.st-dsrc a { color: var(--st-accent); font-weight: 600; }
.st-badge { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: .68rem; font-weight: 800; line-height: 1.6; white-space: nowrap; vertical-align: 1px; background: var(--st-accent-soft); color: var(--st-accent); }
.st-badge.is-reference { background: var(--st-ref-soft); color: var(--st-ref); }
.st-badge.is-official { background: var(--st-ok-soft); color: var(--st-ok); border: 1px solid color-mix(in srgb, var(--st-ok) 35%, transparent); }
.st-cites { font-weight: 700; white-space: nowrap; }
/* the explanation's source, right under it: "Sursa: <title>" + badge (plain link for Wikipedia / news) */
.st-esrc-box[hidden] { display: none; }
.st-esrc { margin-top: 3px !important; }
.st-rev-body .st-esrc { margin-top: 0 !important; }
.st-tl { margin: 8px 0 0; padding: 8px 10px 6px; border-radius: 10px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); }
.st-tl figcaption { font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--st-muted); }
.st-tl ol { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; }
.st-tl-row { --tl-c: var(--st-muted); }
.st-tl-row.is-pick { --tl-c: var(--st-bad); }
.st-tl-row.is-correct { --tl-c: var(--st-ok); }
.st-tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .8rem; line-height: 1.3; }
.st-tl-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.st-tl-row.is-other .st-tl-name { color: var(--st-muted); }
.st-tl-yr { flex: none; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--tl-c); text-align: right; }
.st-tl-row.is-other .st-tl-yr { font-weight: 700; }
.st-tl-tag { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 999px; font-size: .66rem; font-weight: 800; line-height: 1.55; color: #fff; background: var(--tl-c); vertical-align: 1px; }
body.dark-theme .st-tl-tag { color: #0a1020; }
.st-tl-track { position: relative; display: block; height: 10px; margin: 3px 5px 0; background: linear-gradient(var(--st-card-border), var(--st-card-border)) center / 100% 2px no-repeat; }
.st-tl-dot { position: absolute; top: 0; width: 10px; height: 10px; border-radius: 50%; transform: translateX(-50%); background: var(--tl-c); box-shadow: 0 0 0 2px var(--st-card-bg); }
.st-tl-bar { position: absolute; top: 2px; height: 6px; min-width: 6px; border-radius: 999px; background: var(--tl-c); }
.st-tl-row.is-other .st-tl-dot, .st-tl-row.is-other .st-tl-bar { opacity: .55; }
.st-tl-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 3px; border-top: 1px dashed var(--st-card-border); font-size: .68rem; color: var(--st-muted); font-variant-numeric: tabular-nums; }
.st-more { margin-top: 8px; }
.st-more summary { font-weight: 700; font-size: .88rem; cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 6px; color: var(--st-ok); }
.st-feedback.is-bad .st-more summary { color: var(--st-bad); }
.st-more ul { margin: 4px 0 0; padding-left: 18px; font-size: .86rem; line-height: 1.4; }
.st-more li { margin-bottom: 6px; }
.st-more-y { color: var(--st-muted); font-variant-numeric: tabular-nums; }
.st-more .st-dsrc { margin-top: 1px !important; }
.st-more summary:focus-visible, .st-recap-box summary:focus-visible, .st-review summary:focus-visible, .st-dsrc a:focus-visible { outline: 3px solid var(--st-accent); outline-offset: 2px; }

.st-bar { display: flex; gap: 8px; min-height: 54px; }
.st-bar .st-btn { flex: 1; min-height: 54px; font-size: 1.05rem; }
.st-fifty { color: var(--st-accent); }

/* ---- result ---- */
.st-result { max-width: 600px; margin: 0 auto; }
.st-result[hidden] { display: none; }
.st-result-card { padding: 20px 16px; border-radius: 20px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); box-shadow: var(--st-shadow); text-align: center; display: flex; flex-direction: column; gap: 10px; }
.st-result-card h2 { margin: 0; font-weight: 900; font-size: 1.6rem; }
.st-res-icon { width: 60px; height: 60px; margin: 0 auto 4px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; color: #fff; background: linear-gradient(135deg, #1d4ed8, #eab308 60%, #dc2626); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.st-stars { display: flex; justify-content: center; gap: 6px; font-size: 26px; color: var(--st-card-border); margin: 4px 0; }
.st-stars .is-on { color: var(--st-gold); }
.st-big { margin: 0; font-size: 3rem; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.st-big small { font-size: .45em; color: var(--st-muted); font-weight: 800; }
.st-res-pts { margin: 6px 0 0; font-weight: 700; color: var(--st-muted); }
.st-res-rec { margin: 0; font-weight: 800; color: var(--st-gold); }
.st-rank { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.st-rank li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--st-page-bg); font-weight: 700; }
.st-rank li.is-win { background: var(--st-gold-soft); }
.st-rank-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-rank small { color: var(--st-muted); font-weight: 600; }
.st-rank strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.st-review { text-align: left; margin-top: 4px; border-radius: 14px; background: var(--st-page-bg); padding: 10px 12px; }
.st-review summary { font-weight: 800; cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.st-review ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.st-review li { display: flex; gap: 10px; padding: 10px; border-radius: 12px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); }
.st-rev-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; background: var(--st-bad); }
.st-review li.is-ok .st-rev-icon { background: var(--st-ok); }
body.dark-theme .st-rev-icon { color: #0a1020; }
.st-review p { margin: 0; }
.st-rev-q { font-weight: 700; font-size: .92rem; }
.st-rev-a { font-size: .88rem; color: var(--st-muted); }
.st-rev-a b { color: var(--st-ok); }
.st-rev-e { font-size: .84rem; color: var(--st-muted); margin-top: 2px !important; }
.st-rev-e a { color: var(--st-accent); font-weight: 700; }
.st-rev-body { flex: 1; min-width: 0; }
.st-rev-a s { color: var(--st-bad); text-decoration-thickness: 1px; }
.st-rev-d { font-size: .86rem; margin-top: 2px !important; }
.st-review .st-tl { background: var(--st-page-bg); }
.st-review .st-tip { font-size: .86rem; }
.st-rev-who { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; color: #fff; background: var(--pc); }
body.dark-theme .st-rev-who { color: #0a1020; }
.st-result-actions { display: grid; gap: 8px; margin-top: 6px; }
@media (min-width: 560px) { .st-result-actions { grid-template-columns: 1fr 1fr; } .st-result-actions .st-btn-ghost { grid-column: 1 / -1; } }

/* ---- "De recapitulat" (start screen) ---- */
.st-recap { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; border-top: 1px solid var(--st-card-border); }
.st-recap[hidden] { display: none; }
.st-recap-box { border-radius: 14px; background: var(--st-page-bg); border: 1px solid var(--st-card-border); padding: 6px 12px; }
.st-recap-box summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; font-weight: 800; cursor: pointer; }
.st-recap-box summary > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.st-recap-box summary svg { color: var(--st-accent); }
.st-recap-n { min-width: 28px; padding: 1px 8px; border-radius: 999px; background: var(--st-bad-soft); color: var(--st-bad); font-weight: 900; font-size: .85rem; text-align: center; font-variant-numeric: tabular-nums; }
.st-recap-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.st-recap-list li { padding: 8px 10px; border-radius: 10px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); }
.st-recap-list p { margin: 0; }
.st-rc-q { font-weight: 700; font-size: .88rem; line-height: 1.3; }
.st-rc-cat { color: var(--st-accent); }
.st-rc-tip { margin-top: 4px !important; padding: 4px 8px; border-radius: 8px; background: var(--st-gold-soft); font-size: .84rem; line-height: 1.35; }
.st-rc-tip svg { color: var(--st-gold); }
.st-recap .st-rev-a { font-size: .84rem; color: var(--st-muted); margin-top: 2px; }
.st-recap .st-rev-a b { color: var(--st-ok); }
.st-recap .st-rev-a s { color: var(--st-bad); }
.st-recap .st-rev-e { font-size: .82rem; color: var(--st-muted); margin-top: 2px; }
.st-recap-start { color: var(--st-accent); border-color: color-mix(in srgb, var(--st-accent) 45%, transparent); }

/* ---- stats ---- */
.st-stats { max-width: 600px; margin: 18px auto 0; padding: 14px 16px; border-radius: 18px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); }
body.st-playing .st-stats { display: none; }
.st-stats h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.st-stats h2 svg { color: var(--st-accent); }
.st-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.st-kpis div { padding: 8px 4px; border-radius: 12px; background: var(--st-page-bg); text-align: center; display: flex; flex-direction: column; }
.st-kpis strong { font-size: 1.25rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.st-kpis small { color: var(--st-muted); font-size: .7rem; line-height: 1.2; }
.st-statlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.st-statlist li { display: grid; grid-template-columns: minmax(0, 9.5em) 1fr 4.2em; align-items: center; gap: 10px; font-size: .88rem; }
.st-stat-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-stat-name svg { color: var(--st-accent); width: 1.1em; }
.st-stat-bar { height: 10px; border-radius: 999px; background: var(--st-page-bg); border: 1px solid var(--st-card-border); overflow: hidden; }
.st-stat-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--st-accent), var(--st-ok)); transform-origin: left center; }
.st-stat-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; line-height: 1.05; }
.st-stat-val small { font-weight: 600; color: var(--st-muted); font-size: .7rem; }
.st-records { margin: 12px 0 0; font-size: .84rem; color: var(--st-muted); line-height: 1.5; }
.st-records b { color: var(--text-color); }
.st-reset-wrap { text-align: center; margin: 4px 0 0; }

/* ---- help ---- */
.st-help { max-width: 600px; margin: 12px auto 0; padding: 12px 14px; border-radius: 14px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); }
body.st-playing .st-help { display: none; }
.st-help summary { font-weight: 700; cursor: pointer; min-height: 32px; }
.st-help ul { margin: 10px 0 4px; padding-left: 20px; line-height: 1.55; }
.st-help li { margin-bottom: 4px; }
.st-credit { margin: 8px 0 0; font-size: .82rem; color: var(--st-muted); }
.st-credit a, .st-powered a { color: var(--st-accent); }
.st-powered { text-align: center; color: var(--st-muted); font-size: .85rem; margin: 22px 0 0; }

/* ---- overlays ---- */
.st-overlay { position: fixed; inset: 0; z-index: 1060; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--st-overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); overflow-y: auto; }
.st-overlay[hidden] { display: none; }
.st-dialog { width: 100%; max-width: 360px; margin: auto; display: flex; flex-direction: column; gap: 10px; padding: 22px 18px; border-radius: 20px; background: var(--st-card-bg); border: 1px solid var(--st-card-border); box-shadow: var(--st-shadow); color: var(--text-color); text-align: center; }
.st-dialog h2 { margin: 0; font-weight: 900; font-size: 1.45rem; }
.st-dialog-sub { margin: 0; color: var(--st-muted); }
.st-dialog-icon { width: 58px; height: 58px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 24px; color: #fff; background: linear-gradient(135deg, #1d4ed8, #dc2626); }
#st-cover[data-p] .st-dialog-icon { background: var(--pc); }
#st-cover[data-p="0"] { --pc: var(--st-p0); }
#st-cover[data-p="1"] { --pc: var(--st-p1); }
#st-cover[data-p="2"] { --pc: var(--st-p2); }
#st-cover[data-p="3"] { --pc: var(--st-p3); }
.st-toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 1070; transform: translateX(-50%); margin: 0; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: #111827; color: #fff; font-weight: 700; font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); text-align: center; pointer-events: none; }
.st-toast[hidden] { display: none; }

@media (max-width: 420px) {
    .st-setup { padding: 12px; gap: 12px; }
    .st-mode { padding: 8px; gap: 8px; min-height: 60px; }
    .st-mode-icon { width: 32px; height: 32px; font-size: 14px; }
    .st-mode-t { font-size: .88rem; }
    .st-mode-t small { font-size: .7rem; }
    .st-chip { font-size: .88rem; }
    .st-card { padding: 14px 12px; }
    .st-top { padding-left: 10px; gap: 4px; }
    .st-round { width: 36px; height: 36px; }
    .st-kpis strong { font-size: 1.1rem; }
    .st-statlist li { grid-template-columns: minmax(0, 8em) 1fr 3.8em; gap: 8px; font-size: .84rem; }
}
@media (max-width: 899px) {
    .st-main { padding-top: 84px; }
}
@media (prefers-reduced-motion: reduce) {
    .st-opt, .st-streak, .st-timer-fill { animation: none !important; transition: none; }
    .st-timer.is-low .st-timer-text { animation: none; }
}
