/* «Смехлыст»: a matchup on the big screen, one look on the shared screen (/tv/) and on a PC player's stage (owner
   2026-10-29: «версии некоторых экранов в ПК и ТВ почти не отличаются» → one code for both, after hundred-board.css
   and question-stage.css). The markup and the moving part are shared/client/quiplash-matchup.ts; the page supplies
   the palette (--qp-paper, --qp-ink, --qp-ink-accent, --accent, --accent-ink, --gold).

   The prompt on its light «joke card», the two answers on the same paper dropping in one after the other, tilted
   towards each other, «VS» stamped between them. A PC player's answers are buttons: hover lifts the card, the pick
   gets the gold edge, the other fades. The letter stamps are question-stage.css .tv-option-letter. */
.qpm-root {
    --font-display: 'Unbounded', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* The /tv/ hand-cut corners (tv/style.css .tv). */
    --cut-1: 26px 12px 22px 16px / 16px 24px 12px 22px;
    --cut-2: 14px 24px 14px 26px / 24px 14px 22px 12px;
    --cut-3: 22px 16px 28px 12px / 12px 20px 16px 26px;
    --cut-shadow: 5px 6px 0 rgb(0 0 0 / 34%);
}
@keyframes qpm-cut-in { from { opacity: 0; transform: translateY(-26px) rotate(-5deg) scale(1.06); } }

.tv-vote-main { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 0 20px; }
.tv-qp-prompt {
    position: relative; align-self: center; max-width: 1040px; padding: 26px 44px;
    background: var(--qp-paper); color: var(--qp-ink-accent);
    border-radius: var(--cut-2); box-shadow: 8px 10px 0 rgb(0 0 0 / 30%); rotate: -1deg;
    animation: qpm-cut-in .6s cubic-bezier(.3, 1.45, .5, 1) both;
}
.tv-qp-prompt-text { margin: 0; font-weight: 700; font-size: 40px; line-height: 1.25; text-align: center; text-wrap: balance; }
.tv-blank { display: inline-block; width: 3em; margin: 0 .12em; border-bottom: 4px solid currentColor; vertical-align: baseline; }
.tv-qp-answers { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 28px; }
.tv-qp-answer {
    display: flex; align-items: center; gap: 20px; min-height: 160px; padding: 24px 30px;
    background: var(--qp-paper); color: var(--qp-ink); font-size: 32px; font-weight: 700; line-height: 1.25;
    border-radius: var(--cut-1); box-shadow: var(--cut-shadow);
    opacity: 0; transform: translateY(-34px) rotate(-6deg) scale(1.08);
    transition: transform .6s cubic-bezier(.3, 1.45, .5, 1), opacity .25s ease;
}
.tv-qp-answer:first-child { rotate: -1.8deg; }
.tv-qp-answer:last-child { border-radius: var(--cut-3); rotate: 1.5deg; translate: 0 10px; transform: translateY(-34px) rotate(6deg) scale(1.08); }
.tv-qp-answer.is-in { opacity: 1; transform: none; }
/* The letter: a stamp, cut and turned (tv/style.css .tv-option-letter), the second one the other way. */
.tv-qp-answer .tv-option-letter {
    width: 58px; height: 58px; font-size: 26px;
    border-radius: 46% 54% 50% 50% / 54% 46% 54% 46%; rotate: -6deg;
    box-shadow: 2px 3px 0 rgb(0 0 0 / 30%); font-family: var(--font-display); font-weight: 800;
}
.tv-qp-answer:last-child .tv-option-letter { rotate: 5deg; border-radius: 54% 46% 46% 54% / 46% 54% 50% 50%; }
.tv-qp-answer-text { flex: 1; min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
.tv-vs {
    font-family: var(--font-display); font-weight: 800; font-size: 48px; color: var(--gold);
    rotate: -10deg; text-shadow: 4px 5px 0 rgb(0 0 0 / 35%); opacity: 0; scale: .3;
    transition: scale .45s cubic-bezier(.3, 1.6, .5, 1), opacity .2s ease;
}
.tv-qp-answers.is-in .tv-vs { opacity: 1; scale: 1; }

/* ── A PC player's answers (buttons): hover lifts the card, the pick gets the gold edge, the other fades. ── */
.qpm-root button.tv-qp-answer {
    width: 100%; margin: 0; border: 3px solid transparent; font-family: inherit; text-align: left; cursor: default;
    transition: transform .6s cubic-bezier(.3, 1.45, .5, 1), opacity .25s ease, border-color .2s ease, box-shadow .2s ease, scale .15s ease;
}
.qpm-root .is-votable button.tv-qp-answer:not(:disabled) { cursor: pointer; }
.qpm-root .is-votable button.tv-qp-answer:hover:not(:disabled) { border-color: color-mix(in srgb, var(--gold) 70%, transparent); box-shadow: 8px 10px 0 rgb(0 0 0 / 34%); }
.qpm-root button.tv-qp-answer:active:not(:disabled) { scale: .97; }
.qpm-root button.tv-qp-answer:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.qpm-root .is-locked .tv-qp-answer:not(.is-selected) { opacity: .5; }
.qpm-root .tv-qp-answer.is-selected { border-color: var(--gold); box-shadow: 6px 7px 0 color-mix(in srgb, var(--gold) 55%, #000); animation: qpm-stamp .26s cubic-bezier(.3, 1.45, .5, 1); }
.qpm-root .tv-qp-answer.is-selected .tv-option-letter { background: var(--gold); color: var(--qp-ink); }
@keyframes qpm-stamp { 0% { scale: 1; } 45% { scale: 1.04; } 100% { scale: 1; } }

/* ── The reveal (reveal-results.js `dashboard` in question-stage.css .qs-reveal: /tv/ #r-box, a PC player's
   #reveal-container on the stage) as on the phones (qp-theme.css): the prompt on its paper card, answers on the deep purple, the winning
   answer (most votes) with the green edge but no check (it isn't «right»), the «СМЕХЛЫСТ!» badge in teal. */
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-context {
    padding: 28px 32px; background: var(--qp-paper); border-radius: var(--cut-2);
    box-shadow: 8px 10px 0 rgb(0 0 0 / 30%); rotate: -1.4deg;
}
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-context-text { color: var(--qp-ink-accent); font-weight: 700; }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-option { background: var(--tv-surface); border-color: rgb(255 255 255 / 12%); }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-option.rr-type-correct { border-color: color-mix(in srgb, var(--rp-correct) 70%, transparent); }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-option.rr-type-correct .rr-option-text::before { content: none; }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-vote-count, :is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-leaderboard-title { color: var(--text-secondary); }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal :is(.rr-author, .rr-author-label, .rr-voters-label) { color: #c9b6dd; }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-author { font-size: 21px; margin-top: 12px; }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-author-name { color: var(--gold); font-weight: 700; }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-author-points { font-size: 21px; }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-vote-count { font-size: 19px; }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-voter { color: #fff; background: rgb(255 255 255 / 12%); }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal :is(.rr-badge-quiplash-badge, .quiplash-badge) {
    color: var(--qp-ink) !important; background: var(--gold) !important; box-shadow: 2px 3px 0 rgb(0 0 0 / 30%);
    font-family: var(--font-display); font-weight: 800; font-size: 18px; padding: 5px 12px; rotate: -4deg;
}
/* Leaderboard rows: only the colours of the tilted card behind the row (tv/style.css ::before on /tv/, cut-paper.css on
   the phone and the PC). A background or border on the row itself draws a second, straight card under the tilted one. */
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-lb-row {
    --tv-lb-bg: var(--tv-surface); --tv-lb-line: rgb(255 255 255 / 12%);
    --paper-surface: var(--tv-surface); --paper-line: rgb(255 255 255 / 12%);
}
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-lb-row.rr-leading { --tv-lb-line: var(--gold); --paper-lead-surface: var(--tv-surface); --paper-lead-line: var(--gold); }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-lb-pos { color: var(--text-secondary); background: rgb(255 255 255 / 12%); }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-lb-pos:is(.rr-gold, .rr-silver, .rr-bronze) { color: #fff; }
:is(body[data-tv-game="quiplash"], body[data-rp-game="quiplash"]) .qs-reveal .rr-lb-score { color: var(--gold); }

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