@font-face {
    font-family: LHF_Billhead_1890;
    src: url(../../media/fonts/lhf_billhead_18901.ttf);
}

@font-face {
    font-family: Cruickshank;
    src: url(../../media/fonts/CRUICKSH.TTF);
}

@font-face {
    font-family: CherrySwash-Regular;
    src: url(../../media/fonts/GoogleFonts/Cherry_Swash/CherrySwash-Regular.ttf);
}

@font-face {
    font-family: SCOREBOARD;
    src: url(../../media/fonts/SCOREBOARD.ttf);
}

:root {
    --ink: #f5ebd5;
    --dust: #d8bf87;
    --gold: #cca24c;
    --gold-bright: #f2d27a;
    --copper: #8f5224;
    --wine: #401823;
    --night: #090c12;
    --night-soft: rgba(11, 16, 26, 0.92);
    --panel: rgba(20, 14, 11, 0.86);
    --panel-line: rgba(238, 205, 126, 0.24);
    --correct: #1e6b4d;
    --wrong: #8c2d30;
    --match-row-height: 6.5rem;
    --match-left-media-width: 16rem;
    --match-right-media-width: 8rem;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: CherrySwash-Regular, serif;
    background: black;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.38)),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 5px);
    pointer-events: none;
}

header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem 1.4rem;
    background: linear-gradient(180deg, rgba(4, 5, 9, 0.98), rgba(14, 9, 8, 0.94));
    border-bottom: 1px solid var(--panel-line);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

h1,
h2,
h3,
.panel-title,
.column-title,
.answer-letter,
button {
    font-family: CherrySwash-Regular;
    font-size: 15px;
    font-weight: normal;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2rem);
    letter-spacing: 0.04em;
}

.brand-kicker,
.eyebrow,
.status-copy,
.media-label,
.match-label,
.match-select-label {
    margin: 0;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: var(--dust);
}

.status-block {
    justify-self: center;
    text-align: center;
}

.status-copy + .status-copy {
    margin-top: 0.35rem;
}

.right-controls {
    display: flex;
    justify-content: flex-end;
}

button,
.secondary-button,
.match-select {
    border: 1px solid rgba(255, 237, 180, 0.28);
    background: linear-gradient(180deg, rgba(83, 28, 22, 0.95), rgba(42, 15, 29, 0.95));
    color: var(--ink);
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(112, 37, 28, 0.95), rgba(58, 21, 38, 0.95));
}

button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    transform: none;
}

.quiz-shell {
    position: relative;
    z-index: 1;
    width: min(1560px, calc(100% - 2rem));
    margin: 1.4rem auto 2rem;
    padding: 0 4.9rem;
}

.quiz-shell-core {
    position: relative;
    z-index: 1;
}

.quiz-bulb-rail {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    pointer-events: none;
}

.quiz-bulb-rail-left {
    left: 0.75rem;
}

.quiz-bulb-rail-right {
    right: 0.75rem;
}

.quiz-bulb {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 1px solid rgba(238, 205, 126, 0.35);
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 248, 210, 0.95), rgba(236, 180, 83, 0.65) 42%, rgba(101, 54, 18, 0.95) 100%);
    box-shadow:
        0 0 0.2rem rgba(0, 0, 0, 0.45),
        0 0 0.5rem rgba(209, 149, 57, 0.18);
    opacity: 0.6;
    transition: opacity 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.quiz-shell.is-celebrating-intro .quiz-bulb-rail-left .quiz-bulb {
    animation: carnivalIntroBoth 1.4s ease-in-out 1 both;
}

.quiz-shell.is-celebrating-intro .quiz-bulb-rail-right .quiz-bulb {
    animation: carnivalIntroBoth 1.4s ease-in-out 1 both;
}

.quiz-shell.is-celebrating-chase .quiz-bulb {
    animation: carnivalGlow 1.6s ease-in-out infinite;
}

.quiz-shell.is-celebrating-chase .bulb-1 { animation-delay: 0s; }
.quiz-shell.is-celebrating-chase .bulb-2 { animation-delay: 0.08s; }
.quiz-shell.is-celebrating-chase .bulb-3 { animation-delay: 0.16s; }
.quiz-shell.is-celebrating-chase .bulb-4 { animation-delay: 0.24s; }
.quiz-shell.is-celebrating-chase .bulb-5 { animation-delay: 0.32s; }
.quiz-shell.is-celebrating-chase .bulb-6 { animation-delay: 0.40s; }
.quiz-shell.is-celebrating-chase .bulb-7 { animation-delay: 0.48s; }
.quiz-shell.is-celebrating-chase .bulb-8 { animation-delay: 0.56s; }
.quiz-shell.is-celebrating-chase .bulb-9 { animation-delay: 0.64s; }
.quiz-shell.is-celebrating-chase .bulb-10 { animation-delay: 0.72s; }
.quiz-shell.is-celebrating-chase .bulb-11 { animation-delay: 0.80s; }
.quiz-shell.is-celebrating-chase .bulb-12 { animation-delay: 0.88s; }
.quiz-shell.is-celebrating-chase .bulb-13 { animation-delay: 0.96s; }
.quiz-shell.is-celebrating-chase .bulb-14 { animation-delay: 1.04s; }

@keyframes carnivalIntroBoth {
    0%, 12%, 50%, 62%, 100% {
        opacity: 0.45;
        transform: scale(0.96);
        box-shadow:
            0 0 0.2rem rgba(0, 0, 0, 0.45),
            0 0 0.55rem rgba(209, 149, 57, 0.2);
    }
    18%, 42%, 68%, 92% {
        opacity: 1;
        transform: scale(1.08);
        box-shadow:
            0 0 0.35rem rgba(255, 223, 132, 0.8),
            0 0 1.15rem rgba(255, 187, 71, 0.75),
            0 0 1.9rem rgba(255, 130, 43, 0.45);
    }
}

@keyframes carnivalGlow {
    0%, 100% {
        opacity: 0.45;
        transform: scale(0.96);
        box-shadow:
            0 0 0.2rem rgba(0, 0, 0, 0.45),
            0 0 0.55rem rgba(209, 149, 57, 0.2);
    }
    45% {
        opacity: 1;
        transform: scale(1.08);
        box-shadow:
            0 0 0.35rem rgba(255, 223, 132, 0.8),
            0 0 1.15rem rgba(255, 187, 71, 0.75),
            0 0 1.9rem rgba(255, 130, 43, 0.45);
    }
}

.hero-panel,
.question-layout,
.quiz-nav,
.progress-recap-panel {
    background: linear-gradient(180deg, rgba(24, 17, 13, 0.85), rgba(12, 11, 18, 0.92));
    border: 1px solid var(--panel-line);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
}

.hero-panel {
    position: relative;
    padding: 0.6rem 1rem;
}

.progress-recap-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 3rem;
    padding: 0.5rem 1rem;
    background:
        linear-gradient(180deg, rgba(57, 41, 22, 0.9), rgba(18, 15, 17, 0.93));
}

.progress-recap-kicker,
.progress-recap-copy {
    margin: 0;
}

.progress-recap-kicker {
    color: var(--gold-bright);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.progress-recap-copy {
    color: rgba(245, 235, 213, 0.92);
}

.quiz-game-select {
    padding: 1.35rem;
    background:
        radial-gradient(circle at top, rgba(157, 104, 41, 0.12), transparent 38%),
        linear-gradient(180deg, rgba(23, 16, 12, 0.92), rgba(11, 10, 16, 0.94));
}

.game-carousel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.game-carousel-copy {
    margin: 0;
    color: rgba(245, 235, 213, 0.86);
    font-size: 1rem;
}

.game-carousel-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.game-carousel-status {
    min-width: 4.4rem;
    text-align: center;
    color: var(--gold-bright);
    font-size: 1rem;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    align-items: start;
    perspective: 1800px;
}

.game-choice-tile {
    position: relative;
    min-height: 31rem;
    cursor: pointer;
    transform-origin: center center;
    transition: transform 0.22s ease, filter 0.22s ease;
}

.game-choice-tile.is-disabled {
    cursor: default;
    opacity: 0.78;
    filter: saturate(0.7);
}

.game-choice-tile:focus-visible {
    outline: 2px solid rgba(255, 226, 160, 0.85);
    outline-offset: 0.35rem;
}

.game-card-inner {
    position: relative;
    width: 100%;
    min-height: 31rem;
    transform-style: preserve-3d;
    transition: transform 0.7s ease;
}

.game-choice-tile.is-flipped .game-card-inner {
    transform: rotateY(180deg);
}

.game-card-face {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    padding: 1.4rem 1.3rem 1.5rem;
    border-radius: 0.45rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    backface-visibility: hidden;
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.28);
}

.game-card-front {
    background-image:
        linear-gradient(180deg, rgba(255, 248, 235, 0.12), rgba(31, 17, 8, 0.06)),
        url("../../media/quiz/cards/front.png");
    color: #1d120b;
}

.game-card-back {
    transform: rotateY(180deg);
    color: #f6efdf;
    background-image:
        linear-gradient(180deg, rgba(8, 7, 11, 0.32), rgba(7, 6, 10, 0.58));
}

.game-choice-tile.tarot-back-1 .game-card-back {
    background-image:
        linear-gradient(180deg, rgba(8, 7, 11, 0.34), rgba(7, 6, 10, 0.62)),
        url("../../media/quiz/cards/tarot_back_1.jpg");
}

.game-choice-tile.tarot-back-2 .game-card-back {
    background-image:
        linear-gradient(180deg, rgba(8, 7, 11, 0.34), rgba(7, 6, 10, 0.62)),
        url("../../media/quiz/cards/tarot_back_2.jpg");
}

.game-choice-tile.tarot-back-3 .game-card-back {
    background-image:
        linear-gradient(180deg, rgba(8, 7, 11, 0.34), rgba(7, 6, 10, 0.62)),
        url("../../media/quiz/cards/tarot_back_3.jpg");
}

.game-choice-tile:hover {
    transform: rotate(-0.7deg) translateY(-3px);
}

.game-choice-tile:hover .game-card-face {
    box-shadow: 0 28px 44px rgba(0, 0, 0, 0.34);
}

.game-choice-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.game-choice-number {
    color: inherit;
    letter-spacing: 0.05em;
    font-size: 1rem;
    text-shadow: 0 1px 0 rgba(255, 247, 233, 0.08);
}

.game-choice-status {
    padding: 0.28rem 0.7rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: rgba(255, 249, 238, 0.26);
    color: inherit;
    font-size: 0.92rem;
}

.game-choice-body {
    display: grid;
    align-content: start;
    gap: 0.9rem;
    align-self: center;
    justify-items: center;
    text-align: center;
}

.game-choice-tile h3 {
    margin: 0;
    font-size: clamp(1.5rem, 2.3vw, 2rem);
    line-height: 1.08;
    color: inherit;
    text-shadow: 0 1px 0 rgba(255, 240, 215, 0.14);
    text-align: center;
}

.game-choice-subtitle {
    margin: -0.3rem 0 0;
    color: inherit;
    font-size: clamp(0.95rem, 1.15vw, 1.15rem);
    line-height: 1.15;
    opacity: 0.92;
    text-align: center;
}

.game-choice-progress {
    margin: 0;
    color: inherit;
    font-size: 1.08rem;
}

.game-choice-score {
    margin: -0.15rem 0 0;
    color: inherit;
    font-size: 1.02rem;
}

.game-choice-progressbar {
    width: 100%;
    height: 0.9rem;
    padding: 0.12rem;
    border: 1px solid rgba(245, 239, 223, 0.4);
    background: rgba(18, 14, 12, 0.32);
}

.game-choice-progressbar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgba(179, 121, 50, 0.95), rgba(244, 212, 142, 0.95));
    box-shadow: inset 0 0 0 1px rgba(255, 246, 222, 0.18);
}

.game-choice-ledger {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.4rem;
    color: inherit;
    font-size: 0.98rem;
    letter-spacing: 0.04em;
}

.game-card-back-copy {
    display: grid;
    align-content: start;
    gap: 0.95rem;
    min-height: 100%;
}

.game-card-front-copy {
    margin: 0.35rem 0 0;
    color: inherit;
    font-size: 1rem;
}

.game-card-enter-copy {
    margin: auto 0 0;
    color: inherit;
    font-size: 1rem;
    text-align: center;
}

.game-card-start-btn {
    margin-top: auto;
    width: 100%;
}

.quiz-shell-start {
    padding: 0;
}

.quiz-shell-start .hero-panel,
.quiz-shell-start .question-layout {
    width: min(1180px, calc(100% - 2rem));
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 860px) {
    .game-carousel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-choice-tile {
        min-height: 26rem;
    }

    .game-choice-progressbar {
        width: 100%;
    }

    .game-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem;
    }
}

@media (max-width: 560px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
}

.quiz-top-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 0.85rem;
    align-items: start;
}

.quiz-top-strip.is-review {
    grid-template-columns: minmax(0, 1fr);
}

.quiz-top-main {
    display: grid;
    gap: 0.6rem;
}

.quiz-status-panel {
    display: grid;
    gap: 0.4rem;
    align-self: start;
}

.quiz-status-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(180deg, rgba(24, 17, 13, 0.85), rgba(12, 11, 18, 0.92));
    border: 1px solid var(--panel-line);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    min-height: 0;
}

.quiz-status-block-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    height: 5.5rem;
    min-height: 5.5rem;
    padding: 0.35rem 0.7rem;
}

.quiz-status-label {
    margin: 0;
    color: var(--dust);
    letter-spacing: 0.08em;
    font-size: 0.84rem;
    white-space: nowrap;
}

.quiz-status-value {
    margin: 0;
    color: var(--ink);
    font-size: 1.25rem;
    white-space: nowrap;
}

.quiz-status-scoreboard {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
}

.quiz-status-score-window {
    width: 7.2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.2rem;
    overflow: hidden;
}

.quiz-status-score-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3ch;
    font-family: SCOREBOARD, monospace;
    font-size: 4.9rem;
    line-height: 1;
    color: #fffaf0;
    letter-spacing: 0.05em;
}

#currentScoreValue.is-updated {
    animation: scoreboardFlip 0.55s ease;
}

@keyframes scoreboardFlip {
    0% {
        transform: scaleY(1);
        color: #fff2bb;
        text-shadow: 0 0 0 rgba(255, 223, 132, 0);
    }
    50% {
        transform: scaleY(0);
        color: #fff7d1;
        text-shadow: 0 0 0.65rem rgba(255, 223, 132, 0.58);
    }
    100% {
        transform: scaleY(1);
        color: #fff7d1;
        text-shadow: 0 0 0 rgba(255, 223, 132, 0);
    }
}

.hero-copy h2 {
    margin: 0.35rem 0 0.6rem;
    /*font-size: clamp(1.9rem, 4vw, 3.2rem);*/
    font-size: 24px;
    line-height: 1.1;
}

.hero-subline {
    margin: 0;
    max-width: 42rem;
    font-size: 0.92rem;
    line-height: 1.35;
    color: rgba(245, 235, 213, 0.8);
}

.question-layout {
    margin-top: 0.5rem;
    padding: 0.8rem;
}

.question-layout-choice {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 1.4rem;
}

.stage-panel {
    display: grid;
    gap: 1rem;
}

.media-card,
.answer-panel,
.match-card {
    border: 1px solid rgba(245, 214, 139, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 210, 133, 0.06), transparent 20%),
        var(--night-soft);
    padding: 0.4rem;
}

.panel-title {
    margin: 0 0 1rem;
    font-size: 1.6rem;
    color: var(--gold-bright);
}

.media-frame {
    width: 100%;
    border: 1px solid rgba(255, 216, 150, 0.14);
    background: rgba(5, 7, 11, 0.55);
}

.audio-frame {
    min-height: 56px;
}

.video-frame {
    max-height: 24rem;
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.answer-action-box {
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(245, 214, 139, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 210, 133, 0.05), transparent 20%),
        rgba(8, 13, 22, 0.78);
}

.answer-action-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.answer-proof-box {
    margin-top: 0.85rem;
    display: flex;
    justify-content: center;
}

.answer-proof-box[hidden] {
    display: none;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    width: 100%;
    min-height: 5rem;
    text-align: left;
    padding: 1rem 1.1rem;
    background:
        linear-gradient(90deg, rgba(13, 47, 101, 0.85), rgba(24, 12, 52, 0.92));
}

.answer-letter {
    display: inline-flex;
    width: 2.2rem;
    height: 2.2rem;
    align-items: center;
    justify-content: center;
    background: rgba(255, 213, 118, 0.14);
    color: var(--gold-bright);
    font-size: 1.25rem;
}

.answer-option.is-selected {
    outline: 2px solid rgba(255, 243, 199, 0.55);
}

.answer-option.is-correct {
    background: linear-gradient(90deg, rgba(28, 111, 79, 0.95), rgba(13, 64, 52, 0.95));
}

.answer-option.is-wrong {
    background: linear-gradient(90deg, rgba(140, 45, 48, 0.95), rgba(81, 23, 28, 0.95));
}

.feedback-box {
    margin-top: 0;
    min-height: 3rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    background: rgba(252, 217, 147, 0.06);
    border: 1px solid rgba(252, 217, 147, 0.12);
    color: rgba(245, 235, 213, 0.88);
}

.question-layout-match {
    display: grid;
    gap: 1rem;
}

.question-layout-match.has-video-clues {
    --match-row-height: 8.9rem;
}

.match-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 1.15rem;
    font-family: CherrySwash-Regular;
    font-size: 15px;
    font-weight: normal;
}

.match-grid-three {
    grid-template-columns: 1.1fr 0.72fr 1.08fr;
    align-items: start;
}

.match-column {
    display: grid;
    gap: 0.6rem;
    align-content: start;
}

.column-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--gold-bright);
}

.match-card h3 {
    margin: 0.3rem 0 0.8rem;
    font-size: 1.4rem;
}

.match-card.is-correct {
    border-color: rgba(80, 204, 153, 0.45);
    box-shadow: inset 0 0 0 1px rgba(80, 204, 153, 0.2);
}

.match-card.is-wrong {
    border-color: rgba(224, 95, 95, 0.4);
    box-shadow: inset 0 0 0 1px rgba(224, 95, 95, 0.16);
}

.bank-card {
    padding: 0;
}

.clue-card,
.slot-card {
    min-height: var(--match-row-height);
}

.clue-card {
    display: flex;
    align-items: center;
    height: var(--match-row-height);
    padding: 0.25rem 0.45rem;
}

.slot-card {
    display: flex;
    align-items: center;
    width: 100%;
    height: var(--match-row-height);
    padding: 0.25rem 0.45rem;
}

.clue-headline-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--match-left-media-width);
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    height: 100%;
}

.clue-headline-row h3 {
    margin: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    padding-right: 0.2rem;
}

.play-clue-btn {
    flex-shrink: 0;
    padding: 0.6rem 1rem;
}

.play-clue-btn.is-playing {
    animation: unlockedButtonPulse 1s ease-in-out infinite;
    border-color: rgba(255, 223, 132, 0.72);
    box-shadow:
        0 0 0.35rem rgba(255, 223, 132, 0.55),
        0 0 1rem rgba(255, 187, 71, 0.38),
        0 10px 24px rgba(0, 0, 0, 0.22);
    background: linear-gradient(180deg, rgba(138, 47, 25, 0.98), rgba(76, 25, 40, 0.98));
}

.audio-warning-box {
    margin-bottom: 0.7rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(255, 223, 132, 0.42);
    background: linear-gradient(180deg, rgba(58, 21, 18, 0.92), rgba(34, 15, 24, 0.94));
    box-shadow: inset 0 0 0.3rem rgba(255, 223, 132, 0.12);
}

.audio-warning-title {
    margin: 0;
    font-family: "Rye", "Georgia", serif;
    font-size: 1rem;
    color: var(--gold);
}

.audio-warning-copy {
    margin: 0.2rem 0 0;
    font-size: 0.95rem;
    line-height: 1.35;
}

.audio-warning-actions {
    display: flex;
    gap: 0.55rem;
    margin-top: 0.55rem;
}

.audio-warning-actions .secondary-button {
    padding: 0.5rem 0.9rem;
}

.clue-image-trigger {
    height: 100%;
    width: 100%;
    padding: 0.2rem;
    border: 1px solid rgba(255, 237, 180, 0.2);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.clue-image-trigger:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.08);
}

.clue-card-video .clue-headline-row {
    align-items: stretch;
}

.clue-card-video .clue-headline-row h3 {
    height: 100%;
    justify-content: center;
}

.clue-video-frame {
    width: 100%;
    height: 100%;
    padding: 0.2rem;
    border: 1px solid rgba(255, 237, 180, 0.2);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.clue-video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.clue-thumb {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.compact-media-holder .media-frame {
    max-height: 8rem;
    object-fit: contain;
}

.drop-slot {
    min-height: 0;
    height: 100%;
    width: 100%;
    border: 1px dashed rgba(242, 210, 122, 0.45);
    padding: 0.25rem 0.45rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 226, 160, 0.02);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.drop-slot.is-hovered,
.tile-bank-dropzone.is-hovered {
    border-color: rgba(242, 210, 122, 0.75);
    background: rgba(255, 226, 160, 0.08);
}

.drop-placeholder {
    display: inline-flex;
    position: absolute;
    inset: 0.25rem 0.45rem;
    align-items: center;
    justify-content: center;
    color: rgba(245, 235, 213, 0.48);
    letter-spacing: 0.12em;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

.slot-tile-host {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    height: 100%;
}

.slot-tile-host .match-name-tile {
    width: 100%;
    display: grid;
    height: 100%;
    min-height: 100%;
}

.slot-main-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: center;
    width: 100%;
    height: 100%;
}

.slot-card-replay .drop-slot {
    border-style: solid;
    border-color: rgba(242, 210, 122, 0.18);
    background: rgba(255, 226, 160, 0.015);
}

.match-name-tile {
    width: 100%;
    height: 100%;
    min-height: 100%;
    padding: 0.2rem 0.3rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(17, 61, 108, 0.92), rgba(26, 23, 79, 0.95));
    color: var(--ink);
    border: 1px solid rgba(255, 237, 180, 0.18);
    cursor: grab;
    overflow: hidden;
    white-space: normal;
    display: grid;
    grid-template-columns: var(--match-right-media-width) minmax(0, 1fr);
    align-items: stretch;
    gap: 0.5rem;
}

.match-name-tile:active {
    cursor: grabbing;
}

.match-name-tile.is-dragging {
    opacity: 0.45;
}

.match-name-tile-replay {
    cursor: default;
}

.match-name-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    overflow: hidden;
}

.match-name-copy:only-child {
    grid-column: 1 / -1;
}

.match-help-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 237, 180, 0.14);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.match-help-thumb {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.tile-bank-grid {
    margin-top: 0;
    display: grid;
    grid-auto-rows: var(--match-row-height);
    gap: 0.6rem;
}

.match-action-box[hidden] {
    display: none;
}

.match-action-box {
    padding: 0.75rem;
}

.match-replay-summary {
    padding: 1rem;
    color: rgba(245, 235, 213, 0.92);
    text-align: center;
}

.match-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.match-results-rail[hidden] {
    display: none;
}

.match-results-grid {
    margin-top: 0;
    display: grid;
    gap: 0.4rem;
}

.match-result-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: center;
    width: 100%;
    min-height: var(--match-row-height);
    height: var(--match-row-height);
}

.match-results-rail .match-label {
    display: none;
}

.match-result-box {
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-result-answer {
    min-width: 0;
    display: flex;
    align-items: center;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.25;
    white-space: nowrap;
}

.result-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.6rem;
    border: 1px solid rgba(255, 237, 180, 0.18);
    background: rgba(255, 255, 255, 0.03);
}

.result-indicator img {
    width: 2.25rem;
    height: 2.25rem;
    opacity: 0;
    transform: scale(0.6);
}

.result-indicator {
    background: white;
}

@keyframes quizCorrectReveal {
    0% {
        opacity: 0;
        transform: scale(0.3);
        filter: drop-shadow(0 0 0 rgba(255, 0, 0, 0));
    }
    60% {
        opacity: 1;
        transform: scale(1.2);
        filter: drop-shadow(0 0 12px rgba(255, 0, 0, 0.9));
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.55));
    }
}

@keyframes quizWrongReveal {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-20deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.08) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.result-indicator.is-revealed.is-correct img {
    animation: quizCorrectReveal 0.6s ease-out forwards;
}

.result-indicator.is-revealed.is-wrong img {
    animation: quizWrongReveal 0.4s ease-out forwards;
    filter: invert(1);
}

.reveal-media-btn {
    padding: 0.65rem 0.95rem;
    white-space: nowrap;
}

.reveal-modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
}

.reveal-modal[hidden] {
    display: none;
}

.reveal-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.reveal-modal-panel {
    position: relative;
    z-index: 1;
    width: min(1400px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1rem;
    border: 1px solid var(--panel-line);
    background: linear-gradient(180deg, rgba(24, 17, 13, 0.96), rgba(12, 11, 18, 0.98));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}

.reveal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reveal-modal-header h3 {
    margin: 0;
}

.reveal-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.9rem 0 0.15rem;
}

.reveal-modal-footer[hidden] {
    display: none;
}

.reveal-modal-counter {
    min-width: 4.4rem;
    text-align: center;
    color: var(--ink);
}

.modal-media-frame {
    width: 100%;
    max-height: calc(100vh - 10rem);
    border: 1px solid rgba(255, 216, 150, 0.14);
    background: rgba(5, 7, 11, 0.55);
    object-fit: contain;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1.2rem;
}

.quiz-nav button {
    flex: 1;
}

.quiz-nav button.is-unlocked {
    animation: unlockedButtonPulse 1s ease-in-out infinite;
    border-color: rgba(255, 223, 132, 0.72);
    box-shadow:
        0 0 0.35rem rgba(255, 223, 132, 0.55),
        0 0 1rem rgba(255, 187, 71, 0.38),
        0 10px 24px rgba(0, 0, 0, 0.22);
}

@keyframes unlockedButtonPulse {
    0%, 100% {
        transform: translateY(0);
        filter: brightness(1);
    }
    50% {
        transform: translateY(-1px);
        filter: brightness(1.18);
    }
}

.empty-state {
    text-align: center;
    padding: 2.4rem 1.2rem;
}

.quiz-result-shell {
    padding: 0;
}

.quiz-result-paper {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto 2rem;
    padding: 1.35rem;
    color: #24160d;
    background:
        linear-gradient(180deg, rgba(255, 250, 238, 0.84), rgba(224, 205, 166, 0.92)),
        url("../../media/img/paper_2.png") top center / cover;
    border: 6px double rgba(43, 26, 16, 0.9);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.quiz-result-hero {
    text-align: center;
    padding: 0.35rem 1rem 1.25rem;
    border-bottom: 2px solid rgba(43, 26, 16, 0.18);
}

.quiz-result-kicker {
    margin: 0;
    font-family: Cruickshank;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    color: #5d3c1d;
}

.quiz-result-hero h2 {
    margin: 0.45rem 0 0;
    font-family: Cruickshank;
    font-size: clamp(2.2rem, 3.6vw, 3.35rem);
    font-weight: normal;
    color: #221108;
}

.quiz-result-subtitle {
    margin: 0.35rem 0 0;
    font-size: 1.1rem;
    color: rgba(36, 22, 13, 0.8);
}

.quiz-result-message {
    max-width: 52rem;
    margin: 1rem auto 0;
    font-size: 1.15rem;
    line-height: 1.45;
    color: #3a2618;
}

.quiz-result-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1rem 0 0.5rem;
}

.quiz-result-stat {
    padding: 0.9rem 0.95rem;
    background: rgba(25, 16, 11, 0.09);
    border: 1px solid rgba(43, 26, 16, 0.22);
    text-align: center;
}

.quiz-result-stat-label,
.quiz-result-stat-value {
    margin: 0;
}

.quiz-result-stat-label {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: #69472b;
}

.quiz-result-stat-value {
    margin-top: 0.35rem;
    font-family: Cruickshank;
    font-size: 1.55rem;
    color: #21140c;
}

.quiz-result-ledger-wrap {
    overflow-x: auto;
    padding-top: 0.25rem;
}

.quiz-result-ledger {
    width: 100%;
    border-collapse: collapse;
    background: rgba(19, 12, 10, 0.92);
    color: var(--ink);
    border: 4px double rgba(245, 235, 213, 0.92);
}

.quiz-result-ledger th,
.quiz-result-ledger td {
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(245, 235, 213, 0.28);
    vertical-align: middle;
}

.quiz-result-ledger th {
    font-size: 0.95rem;
    color: var(--gold-bright);
    background: rgba(0, 0, 0, 0.22);
}

.quiz-result-ledger td {
    font-size: 0.98rem;
    color: rgba(245, 235, 213, 0.95);
}

.quiz-result-ledger td.quiz-result-scoreboard {
    font-family: SCOREBOARD, monospace;
    font-size: 2rem;
    text-align: center;
    white-space: nowrap;
}

.quiz-result-seq {
    font-family: CherrySwash-Regular, serif;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap;
}

.quiz-result-review-btn {
    width: 100%;
    min-width: 6.5rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.quiz-result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.quiz-result-action-card {
    display: grid;
    gap: 0.85rem;
    align-content: start;
    padding: 1rem;
    background: rgba(36, 23, 16, 0.09);
    border: 1px solid rgba(43, 26, 16, 0.22);
    text-align: center;
}

.quiz-result-action-card p {
    margin: 0;
    color: #3a2618;
    line-height: 1.45;
}

.quiz-result-action-card button {
    width: auto;
    min-width: 10rem;
    justify-self: center;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
}

@media (max-width: 980px) {
    header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .right-controls,
    .status-block {
        justify-self: center;
    }

    .question-layout-choice,
    .match-grid {
        grid-template-columns: 1fr;
    }

    .quiz-top-strip {
        grid-template-columns: 1fr;
    }

    .clue-headline-row {
        align-items: stretch;
        flex-direction: column;
    }

    .slot-main-row {
        grid-template-columns: 1fr;
    }

    .quiz-result-summary,
    .quiz-result-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .quiz-shell {
        width: min(100% - 1rem, 100%);
        margin: 0.6rem auto 1rem;
    }

    .hero-panel,
    .question-layout,
    .quiz-nav {
        padding: 1rem;
    }

    .answer-grid,
    .quiz-nav {
        grid-template-columns: 1fr;
        display: grid;
    }
}
