/* TRIPELS game screen. Sized in rem; the root font scales with the viewport so the whole
   board fits a 1366x768 laptop and a 1920x1080 projector without zoom hacks. */
:root {
    --purple: #633585;
    --blue: #4aaadd;
    --orange: #ff8c00;
    --gold: #ffd700;
    --green: #2ecc71;
    --red: #ff4d5e;
    --pink: #e91e63;
    --panel: rgba(4, 12, 40, 0.72);
    --panel-strong: rgba(6, 10, 30, 0.9);
    --line: rgba(255, 255, 255, 0.22);
    --text: #fff;
    --muted: rgba(255, 255, 255, 0.78);
    --radius: 1rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: clamp(13px, calc(0.6vw + 0.85vh), 24px); background: #0b0a24; }

body {
    font-family: 'Fredoka', 'Segoe UI', Arial, sans-serif;
    color: var(--text);
    background-color: #0b0a24;
    background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url('/media/tripels/imgs/reka.jpeg?v=3');
    background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        image-set(url('/media/tripels/imgs/reka.webp?v=3') type('image/webp'), url('/media/tripels/imgs/reka.jpeg?v=3') type('image/jpeg'));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

button { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kbd { display: inline-block; min-width: 1.6em; padding: 0 .35em; border: 1px solid rgba(255,255,255,.5); border-bottom-width: 3px; border-radius: .35em; font-size: .8em; line-height: 1.4; text-align: center; background: rgba(255,255,255,.1); direction: ltr; }
body.touch .kbd, body.touch .keys-hint { display: none !important; }

/* ---------- layout ---------- */
.app {
    position: relative;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem 1.5rem 2.6rem;
}
.top-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 1rem; }
.top-row .controls { grid-column: 1; justify-self: start; }
.top-row .observer-team { grid-column: 2; }
.arena {
    display: grid;
    grid-template-columns: minmax(11rem, 1fr) minmax(0, 2.7fr) minmax(11rem, 1fr);
    gap: 1.25rem;
    min-height: 0;
}

/* ---------- top controls ---------- */
.controls { display: flex; gap: .5rem; flex-wrap: wrap; }
.ctrl {
    height: 2.8rem; min-width: 2.8rem; padding: 0 .7rem;
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    border-radius: 1.4rem; border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.14); backdrop-filter: blur(8px);
    color: #fff; text-decoration: none; font-size: .95rem; transition: background .2s, transform .2s;
}
.ctrl:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }
.ctrl .icon { width: 1.35rem; height: 1.35rem; }
.volume-pop {
    position: absolute; top: 3.3rem; inset-inline-start: 0; z-index: 30;
    display: none; align-items: center; gap: .6rem; padding: .7rem 1rem;
    background: rgba(0,0,0,.88); border: 1px solid var(--line); border-radius: .8rem;
}
.volume-pop.show { display: flex; }
.volume-pop input { width: 9rem; accent-color: var(--blue); }
.volume-wrap { position: relative; }

/* ---------- team cards ---------- */
.team-card {
    position: relative;
    background: var(--panel);
    backdrop-filter: blur(12px);
    border-radius: var(--radius);
    border: 2px solid rgba(74,170,221,.55);
    box-shadow: 0 0 1.2rem rgba(74,170,221,.25), inset 0 0 1.5rem rgba(99,53,133,.25);
    padding: 1rem 1.2rem;
    text-align: center;
    transition: box-shadow .3s, border-color .3s, transform .3s;
}
.observer-team { min-width: min(26rem, 92vw); border-color: rgba(255,140,0,.75); box-shadow: 0 0 1.4rem rgba(255,140,0,.3), inset 0 0 1.5rem rgba(99,53,133,.25); }
.team-card.glow { border-color: var(--gold); box-shadow: 0 0 2.2rem rgba(255,215,0,.6); }
.team-card.answering { border-color: var(--orange); box-shadow: 0 0 2.4rem rgba(255,140,0,.8); transform: scale(1.03); }
.team-card.winner { border-color: var(--green); box-shadow: 0 0 2.4rem rgba(46,204,113,.8); }
.competitor { align-self: start; display: flex; flex-direction: column; gap: .6rem; }
.role { color: var(--muted); font-size: .95rem; letter-spacing: .05em; }
.observer-team .role { font-size: 1.05rem; }
.team-name { font-size: 1.9rem; font-weight: 700; line-height: 1.2; text-shadow: 0 0 1rem rgba(99,53,133,.9); overflow-wrap: anywhere; }
.observer-team .team-name { display: inline; font-size: 1.6rem; color: #fff; }
.balance { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: .3rem; }
.balance img { width: 2.6rem; height: 2.6rem; filter: drop-shadow(0 0 .6rem rgba(255,215,0,.7)); animation: coinSpin 12s ease-in-out infinite; }
.balance .num { font-size: 2.3rem; font-weight: 700; color: var(--blue); text-shadow: 0 0 .8rem rgba(74,170,221,.8); direction: ltr; font-variant-numeric: tabular-nums; }
.balance .delta { font-size: 1.2rem; font-weight: 700; direction: ltr; }
.delta { direction: ltr; unicode-bidi: isolate; }
.delta.plus { color: var(--green); }
.delta.minus { color: var(--red); }
@keyframes coinSpin { 0%, 70%, 100% { transform: rotateY(0); } 80% { transform: rotateY(720deg); } }

.points { display: flex; justify-content: center; gap: .6rem; min-height: 3rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.points[hidden] { display: none; }
.point { width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 2px dashed rgba(255,255,255,.35); display: grid; place-items: center; }
.point img { width: 100%; height: 100%; filter: drop-shadow(0 0 .7rem rgba(46,204,113,.9)); animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.buzzer {
    margin: .4rem auto 0; width: 7.5rem; height: 7.5rem; border-radius: 50%;
    border: .35rem solid #7a0000; color: #fff; font-weight: 700; font-size: 1.15rem;
    background: radial-gradient(circle at 35% 30%, #ff6b6b, #e00000 55%, #a00000);
    box-shadow: 0 .6rem 1.6rem rgba(255,0,0,.55), inset 0 -.6rem 1.2rem rgba(0,0,0,.35);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem;
    animation: buzzPulse 1.2s ease-in-out infinite;
}
.buzzer[hidden] { display: none; }
.buzzer:active { transform: translateY(.3rem) scale(.97); }
@keyframes buzzPulse { 50% { box-shadow: 0 .6rem 2.6rem rgba(255,60,60,.95), inset 0 -.6rem 1.2rem rgba(0,0,0,.35); } }

/* ---------- game area ---------- */
.game-area {
    position: relative;
    background: var(--panel-strong);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(99,53,133,.7);
    border-radius: 1.3rem;
    padding: 1.4rem 1.8rem;
    overflow-y: auto;
    min-height: 0;
    display: flex; flex-direction: column;
}
.stage { margin: auto 0; width: 100%; display: flex; flex-direction: column; gap: 1.1rem; animation: fadeIn .25s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(.5rem); } to { opacity: 1; transform: none; } }

.step-line { display: flex; justify-content: center; align-items: center; gap: .6rem; flex-wrap: wrap; color: var(--muted); font-size: 1rem; }
.badge { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem 1rem; border-radius: 2rem; border: 2px solid rgba(255,255,255,.75); background: rgba(255,255,255,.12); font-weight: 700; color: #fff; }
.category {
    background: linear-gradient(135deg, var(--purple), var(--blue));
    border-radius: .9rem; padding: .9rem 1.2rem; text-align: center;
    box-shadow: 0 0 1.6rem rgba(99,53,133,.6);
    display: flex; align-items: center; justify-content: center; gap: .8rem; flex-wrap: wrap;
}
.category h2 { font-size: 1.9rem; line-height: 1.3; overflow-wrap: anywhere; }
.category .small-btn { font-size: .85rem; }
.headline { font-size: 2rem; font-weight: 700; text-align: center; line-height: 1.35; overflow-wrap: anywhere; }
.subline { font-size: 1.25rem; text-align: center; color: var(--muted); line-height: 1.45; }

.choices { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.choice {
    position: relative; flex: 1 1 0; min-width: 9rem; max-width: 16rem;
    padding: 1.2rem 1rem; border-radius: 1rem; text-align: center;
    background: rgba(255,255,255,.08); border: 3px solid rgba(255,255,255,.3);
    transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
}
.choice:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--blue); background: rgba(74,170,221,.16); }
.choice.selected { border-color: var(--blue); background: rgba(74,170,221,.28); box-shadow: 0 0 1.4rem rgba(74,170,221,.6); }
.choice:disabled { opacity: .4; }
.choice .kbd { position: absolute; top: .4rem; inset-inline-end: .5rem; }
.choice .big { font-size: 1.6rem; font-weight: 700; overflow-wrap: anywhere; }
.choice.bet { border-color: rgba(255,215,0,.35); background: rgba(255,215,0,.08); }
.choice.bet:hover:not(:disabled) { border-color: var(--gold); background: rgba(255,215,0,.15); }
.choice.bet.selected { border-color: var(--gold); background: rgba(255,215,0,.24); box-shadow: 0 0 1.4rem rgba(255,215,0,.6); }
.choice .amount { display: flex; align-items: center; justify-content: center; gap: .4rem; color: var(--gold); font-size: 1.7rem; font-weight: 700; direction: ltr; }
.choice .amount img { width: 2rem; height: 2rem; }
.choice .pct { font-size: 1rem; color: var(--muted); margin-top: .2rem; }

.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.outcome { border-radius: .8rem; padding: .7rem 1rem; font-size: 1.05rem; line-height: 1.5; text-align: center; }
.outcome strong { display: block; font-size: 1.1rem; }
.outcome.good { background: rgba(46,204,113,.14); border: 2px solid var(--green); }
.outcome.bad { background: rgba(255,77,94,.14); border: 2px solid var(--red); }

.actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .85rem 2rem; min-height: 3.2rem; border-radius: .9rem; border: none;
    font-size: 1.35rem; font-weight: 700; color: #fff; text-decoration: none;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    box-shadow: 0 .3rem 1.2rem rgba(99,53,133,.55);
    transition: transform .2s, box-shadow .2s, opacity .2s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 .5rem 1.6rem rgba(99,53,133,.8); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.go { background: linear-gradient(135deg, #1fa855, #20c997); box-shadow: 0 .3rem 1.2rem rgba(40,167,69,.5); }
.btn.gold { background: linear-gradient(135deg, #ffd700, #ffb300); color: #2b1a00; }
.btn.danger { background: linear-gradient(135deg, #e53950, #a3172b); }
.btn.ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35); box-shadow: none; font-size: 1.05rem; padding: .6rem 1.2rem; min-height: 2.6rem; }
.btn .kbd { font-size: .7em; }
.small-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border-radius: 1rem; border: 1px solid rgba(255,255,255,.45); background: rgba(0,0,0,.2); color: #fff; font-size: .9rem; }
.small-btn:hover { background: rgba(255,255,255,.18); }
.link-btn { background: none; border: none; color: var(--muted); text-decoration: underline; font-size: 1rem; }
.keys-hint { text-align: center; color: rgba(255,255,255,.6); font-size: .85rem; }

/* questions */
.q-top { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.score { font-size: 1.15rem; font-weight: 700; display: flex; gap: .5rem; align-items: center; }
.prompt {
    background: linear-gradient(135deg, #ff8c00, #ffa733); color: #fff; border-radius: .9rem;
    padding: .7rem 1rem; text-align: center; font-size: 1.6rem; font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,.35); animation: fadeIn .3s ease-out;
}
.prompt.info { background: rgba(74,170,221,.18); border: 2px solid var(--blue); font-size: 1.3rem; }
.question-box { background: rgba(255,255,255,.08); border: 2px solid var(--line); border-radius: 1rem; padding: 1.2rem 1.4rem; text-align: center; }
.question-text { font-size: 2rem; line-height: 1.45; overflow-wrap: anywhere; }
.blurred { filter: blur(.7rem); user-select: none; pointer-events: none; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.answer {
    display: flex; align-items: center; gap: .8rem; text-align: start;
    min-height: 4.2rem; padding: .7rem 1rem; border-radius: .8rem;
    background: rgba(255,255,255,.08); border: 3px solid rgba(255,255,255,.28);
    font-size: 1.45rem; line-height: 1.3; transition: transform .15s, border-color .15s, background .15s;
}
.answer .n { color: var(--pink); font-size: 1.6rem; font-weight: 700; min-width: 1.6rem; text-align: center; text-shadow: 0 0 .6rem rgba(233,30,99,.8); }
.answer .t { overflow-wrap: anywhere; }
.answer:disabled { cursor: default; }
.answers.live .answer:hover { border-color: var(--gold); background: rgba(255,215,0,.12); transform: translateY(-2px); }
.answer.correct { border-color: var(--green); background: rgba(46,204,113,.28); }
.answer.wrong { border-color: var(--red); background: rgba(255,77,94,.28); }
.answer.dim { opacity: .45; }
.reveal-btn {
    margin: 0 auto; width: 9rem; height: 9rem; border-radius: 50%; border: none;
    background: linear-gradient(135deg, #1fa855, #20c997); color: #fff; font-size: 1.5rem; font-weight: 700;
    box-shadow: 0 .6rem 1.8rem rgba(40,167,69,.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
}
.reveal-btn:hover { transform: scale(1.06); }
.feedback { border-radius: 1rem; padding: .8rem 1rem; text-align: center; font-size: 1.5rem; font-weight: 700; animation: fadeIn .3s ease-out; }
.feedback.good { background: rgba(46,204,113,.2); border: 2px solid var(--green); }
.feedback.bad { background: rgba(255,77,94,.2); border: 2px solid var(--red); }
.feedback small { display: block; font-size: 1.1rem; font-weight: 500; color: var(--muted); margin-top: .2rem; }

/* round result */
.result-title { font-size: 2.3rem; font-weight: 700; text-align: center; color: var(--gold); text-shadow: 0 0 1.2rem rgba(255,215,0,.6); line-height: 1.3; }
.bet-box { border-radius: 1rem; padding: 1rem 1.2rem; text-align: center; font-size: 1.3rem; line-height: 1.55; }
.bet-box.good { background: rgba(46,204,113,.16); border: 2px solid var(--green); }
.bet-box.bad { background: rgba(255,77,94,.16); border: 2px solid var(--red); }
.bet-box.neutral { background: rgba(255,255,255,.08); border: 2px solid var(--line); }
.bet-box strong { font-size: 1.55rem; display: block; }
.transfers { list-style: none; display: grid; gap: .45rem; margin-top: .5rem; }
.transfers li { display: flex; justify-content: center; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: 1.15rem; }
.transfers .amt { color: var(--gold); font-weight: 700; direction: ltr; }
.ledger { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.ledger-item { background: rgba(255,255,255,.07); border: 1px solid var(--line); border-radius: .8rem; padding: .6rem; text-align: center; }
.ledger-item .nm { font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; }
.ledger-item .val { font-size: 1.5rem; font-weight: 700; color: var(--blue); direction: ltr; font-variant-numeric: tabular-nums; }

/* empty / loading */
.empty { text-align: center; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.empty .big-emoji { font-size: 3.5rem; }
.spinner { width: 3rem; height: 3rem; border-radius: 50%; border: .35rem solid rgba(255,255,255,.2); border-top-color: var(--green); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- sync indicator + toasts ---------- */
.status-bar { position: fixed; bottom: .6rem; inset-inline-end: .8rem; z-index: 40; display: flex; gap: .5rem; align-items: center; }
.sync {
    display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 1rem;
    font-size: .85rem; background: rgba(0,0,0,.6); border: 1px solid var(--line); color: var(--muted);
}
.sync.ok { color: #9ff0bf; border-color: rgba(46,204,113,.5); }
.sync.wait { color: #ffd28a; border-color: rgba(255,140,0,.6); }
.sync.err { color: #ffb3bb; border-color: rgba(255,77,94,.6); }
.sync .spin { display: inline-block; animation: spin 1.2s linear infinite; }
.fs-hint { font-size: .85rem; color: var(--muted); background: rgba(0,0,0,.55); border-radius: 1rem; padding: .3rem .8rem; border: 1px solid var(--line); }
.toasts { position: fixed; top: 4.2rem; left: 50%; transform: translateX(-50%); z-index: 3500; display: flex; flex-direction: column; gap: .5rem; width: min(34rem, 92vw); pointer-events: none; }
.toast { pointer-events: auto; background: rgba(10,10,30,.95); border: 1px solid var(--line); border-inline-start: 5px solid var(--blue); border-radius: .7rem; padding: .7rem 1rem; font-size: 1rem; line-height: 1.45; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.5); animation: fadeIn .25s ease-out; }
.toast.warn { border-inline-start-color: var(--orange); }
.toast.err { border-inline-start-color: var(--red); }
.toast.ok { border-inline-start-color: var(--green); }

/* ---------- modals ---------- */
.overlay { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.78); backdrop-filter: blur(6px); }
.overlay.show { display: flex; }
.modal { background: #171a36; color: #fff; border: 2px solid var(--purple); border-radius: 1.1rem; width: min(44rem, 100%); max-height: 92vh; overflow-y: auto; box-shadow: 0 0 2.5rem rgba(99,53,133,.6); font-size: 16px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 14px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #171a36; z-index: 1; }
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 18px 20px; display: grid; gap: 16px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.modal .btn { font-size: 16px; padding: 10px 18px; min-height: 42px; }
.x-btn { background: none; border: none; color: #fff; font-size: 26px; line-height: 1; width: 40px; height: 40px; border-radius: 50%; }
.x-btn:hover { background: rgba(255,255,255,.12); }
.field { display: grid; gap: 6px; }
.field label, .field .lbl { font-weight: 600; font-size: 15px; }
.field input[type=text], .field input[type=number] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; font: inherit; font-size: 16px; }
.field .help { font-size: 13px; color: var(--muted); }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; text-align: center; padding: 9px; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + span { color: var(--gold); font-weight: 700; }
.seg label:has(input:checked) { border-color: var(--gold); background: rgba(255,215,0,.12); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--gold); }
.danger-zone { border: 1px solid rgba(255,77,94,.5); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.danger-zone h3 { color: #ff98a3; font-size: 16px; }
.cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 20px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.06); font-size: 15px; }
.cat-chip[aria-pressed=true] { border-color: var(--green); background: rgba(46,204,113,.22); }
.cat-chip .cnt { font-size: 12px; color: var(--muted); }
.form-msg { font-size: 14px; min-height: 1.2em; }
.form-msg.err { color: #ffb3bb; }
.form-msg.ok { color: #9ff0bf; }
.help-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; font-size: 15px; }

/* ---------- local victory ---------- */
.victory { z-index: 2900; flex-direction: column; gap: 1.2rem; background: radial-gradient(circle at 50% 30%, rgba(99,53,133,.6), rgba(0,0,0,.94)); overflow-y: auto; }
.victory h1 { font-size: 3.2rem; color: var(--gold); text-shadow: 0 0 1.6rem rgba(255,215,0,.8); text-align: center; }
.victory .subline { max-width: 40rem; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1.4rem; flex-wrap: wrap; }
.podium-place { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .3rem; animation: fadeIn .6s ease-out both; }
.podium-place img { width: 8rem; height: auto; }
.podium-place.p1 { order: 2; } .podium-place.p1 img { width: 11rem; }
.podium-place.p2 { order: 1; animation-delay: .3s; } .podium-place.p3 { order: 3; animation-delay: .6s; }
.podium-place .nm { font-size: 1.6rem; font-weight: 700; overflow-wrap: anywhere; max-width: 14rem; }
.podium-place .val { font-size: 1.3rem; color: var(--gold); direction: ltr; }
.target-row { display: flex; gap: .6rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.target-row input { width: 12rem; padding: .6rem .8rem; border-radius: .7rem; border: 2px solid var(--gold); background: rgba(0,0,0,.4); color: #fff; font: inherit; font-size: 1.3rem; text-align: center; direction: ltr; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 3001; }

/* ---------- smaller screens ---------- */
@media (max-height: 620px) and (min-width: 761px) {
    html { font-size: clamp(12px, calc(0.5vw + 0.8vh), 20px); }
}
@media (max-width: 1100px) and (min-width: 761px) {
    .arena { grid-template-columns: minmax(9rem, 1fr) minmax(0, 2.4fr) minmax(9rem, 1fr); gap: .8rem; }
    .buzzer { width: 6rem; height: 6rem; }
}
@media (max-width: 760px) {
    html { font-size: 15px; }
    .app { height: auto; min-height: 100dvh; padding: .6rem .6rem 3.2rem; gap: .6rem; grid-template-rows: auto auto; }
    .top-row { grid-template-columns: 1fr; gap: .6rem; }
    .top-row .controls, .top-row .observer-team { grid-column: 1; justify-self: stretch; }
    .controls { justify-content: center; }
    .ctrl { height: 2.5rem; min-width: 2.5rem; }
    .ctrl .lbl { display: none; }
    .observer-team { min-width: 0; padding: .6rem; }
    .arena { grid-template-columns: 1fr 1fr; }
    .arena .comp1 { grid-column: 1; grid-row: 1; }
    .arena .comp2 { grid-column: 2; grid-row: 1; }
    .arena .game-area { grid-column: 1 / -1; grid-row: 2; padding: 1rem .8rem; overflow: visible; }
    .team-card { padding: .6rem; }
    .team-name { font-size: 1.3rem; }
    .balance img { width: 1.8rem; height: 1.8rem; }
    .balance .num { font-size: 1.5rem; }
    .point { width: 2rem; height: 2rem; }
    .buzzer { width: 5.2rem; height: 5.2rem; font-size: .95rem; }
    .headline { font-size: 1.4rem; }
    .category h2 { font-size: 1.35rem; }
    .question-text { font-size: 1.35rem; }
    .answers { grid-template-columns: 1fr; }
    .answer { font-size: 1.15rem; min-height: 3.2rem; }
    .outcomes, .ledger { grid-template-columns: 1fr; }
    .choice { min-width: 7rem; padding: .9rem .6rem; }
    .choice .amount { font-size: 1.3rem; }
    .result-title { font-size: 1.6rem; }
    .btn { font-size: 1.15rem; padding: .75rem 1.3rem; }
    .victory h1 { font-size: 2.1rem; }
    .row3, .row2 { grid-template-columns: 1fr; }
    .status-bar { inset-inline-end: .4rem; bottom: .4rem; }
    .fs-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
