:root  {
    --ink: #1b1b1b;
    --muted: #666;
    --paper: #fff;
    --rose: #7537a7;
    --line: #e7e7e7;
    --shadow: none;
}

.game-shell  {
    max-width: 940px;
}

.game-heading h1  {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 36px;
}

.game-heading > p:last-child  {
    margin-bottom: 18px;
}

.player-setup  {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.round-layout  {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 30px;
}

.flip-stage  {
    perspective: 1000px;
}

.member-flip  {
    position: relative;
    height: 320px;
    transform-style: preserve-3d;
    transition: transform .5s;
}

.member-flip.is-flipped  {
    transform: rotateY(180deg);
}

.card-face  {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border: 1px solid var(--line);
    background: #fff;
}

.card-front img  {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.card-back  {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px;
    text-align: center;
}

.reveal-icon  {
    font-size: 34px;
}

.card-back h2  {
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.card-back p  {
    margin: 8px 0;
}

.card-back a  {
    color: var(--rose);
    font-size: 13px;
    margin-top: 14px;
}

.flip-button  {
    display: block;
    width: 100%;
    min-height: 44px;
    border: 0;
    background: #fff;
    color: var(--rose);
    font-size: 12px;
    cursor: pointer;
}

.flip-button:disabled  {
    color: var(--muted);
    cursor: default;
}

.question-panel h2  {
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin: 6px 0 18px;
}

.answer-options  {
    display: grid;
    gap: 10px;
}

.answer-choice  {
    min-height: 48px;
    padding: 12px 16px;
    text-align: left;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    overflow-wrap: anywhere;
}

.answer-choice:hover:not(:disabled)  {
    border-color: var(--rose);
    background: #faf7fc;
}

.answer-choice.is-correct  {
    border-color: #286c3b;
    background: #f2faf3;
    color: #20522d;
}

.answer-choice.is-wrong  {
    border-color: #a13838;
    background: #fff5f5;
    color: #832a2a;
}

.answer-choice:disabled  {
    cursor: default;
    opacity: 1;
}

.answer-feedback  {
    min-height: 44px;
    font-size: 14px;
    line-height: 1.6;
    margin: 16px 0;
}

.game-finish  {
    text-align: center;
}

.game-finish h2  {
    font-size: 28px;
}

.button:hover  {
    background: #5e288b;
}

.button.secondary  {
    border-color: #d8cbe3;
}

.button.secondary:hover  {
    background: #faf7fc;
}

.player-result  {
    margin-top: 24px;
    background: #fff;
    border-color: #ddd;
    color: var(--ink);
    box-shadow: none;
}

.player-result .result-brand,
.player-result .result-game,
.player-result .result-number  {
    color: var(--rose);
}

.player-result .result-username,
.player-result .result-details,
.player-result .result-date,
.player-result .result-prompt  {
    color: var(--muted);
}

@media (max-width: 640px)  {
    .round-layout  {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .flip-stage  {
        max-width: 280px;
        margin: auto;
    }

    .member-flip  {
        height: 280px;
    }

    .game-heading h1  {
        font-size: 30px;
    }

    .game-shell  {
        padding-top: 22px;
    }

    .stats  {
        margin: 18px 0;
    }

    .question-panel h2  {
        font-size: 21px;
    }

    .panel  {
        padding: 18px;
    }

}

@media (prefers-reduced-motion: reduce)  {
    .member-flip  {
        transition: none;
    }

}
