:root {
    color-scheme: dark;
    --background: #101418;
    --panel: #182029;
    --accent: #f6c945;
    --accent-strong: #f08a4b;
    --text: #f7f2e8;
    --muted: #aeb7c2;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background: radial-gradient(circle at top left, #2a3441, var(--background) 42rem);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

body.login-page {
    overflow: hidden;
    background:
        radial-gradient(circle at 20% -10%, rgba(255, 185, 38, .9), transparent 20rem),
        linear-gradient(160deg, #ff8a00 0%, #ff7600 58%, #f15c00 100%);
    color: #fff;
}

body.login-page::before {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 7% 34%, rgba(190, 83, 0, .22) 0 3rem, transparent 3.1rem),
        radial-gradient(circle at 76% 22%, rgba(190, 83, 0, .16) 0 5.5rem, transparent 5.6rem),
        radial-gradient(circle at 93% 82%, rgba(190, 83, 0, .20) 0 4rem, transparent 4.1rem),
        linear-gradient(8deg, rgba(206, 82, 0, .22) 0 18%, transparent 18% 100%);
    content: "";
}

button,
input,
textarea {
    font: inherit;
}

.game-shell {
    width: min(52rem, calc(100% - 2rem));
    max-width: 100%;
    margin: 0 auto;
    padding: 3rem 0;
}

header {
    margin-bottom: 2rem;
}

h1 {
    margin: 0;
    font-size: clamp(2.2rem, 7vw, 5rem);
    line-height: 1;
}

h2 {
    margin-top: 0;
}

.eyebrow {
    margin: 0 0 .5rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
}

.panel {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    padding: 1.25rem;
}

.hidden {
    display: none;
}

.join-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .75rem;
    margin-top: .5rem;
    margin-bottom: .85rem;
}

label {
    display: block;
    margin-bottom: .5rem;
    color: var(--muted);
}

input,
textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    background: #0c1014;
    color: var(--text);
    padding: .85rem 1rem;
}

button {
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #1b1607;
    cursor: pointer;
    font-weight: 700;
    padding: .85rem 1rem;
}

button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.question {
    font-size: 1.35rem;
}

.video-wrap {
    position: relative;
    width: min(100%, 42rem);
    aspect-ratio: 16 / 9;
    max-height: min(54dvh, 32rem);
    margin: clamp(.5rem, 2vw, 1rem) auto;
    overflow: hidden;
    border: .18rem solid #fff;
    border-radius: 8px;
    background: #111;
    box-shadow: .3rem .3rem 0 #8d3d00;
    pointer-events: auto;
}

.video-wrap .video-js,
.video-wrap video {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    pointer-events: none;
}

.video-wrap .vjs-tech {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.media-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.audio-panel {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    gap: .5rem;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 185, 38, .2), transparent 12rem),
        #3d2100;
    color: #fff;
    text-align: center;
}

.audio-panel strong {
    font-size: clamp(1.8rem, 7vw, 4rem);
    font-weight: 900;
    text-shadow: .08em .08em 0 #8d3d00;
}

.audio-panel span {
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: 900;
}

.video-wrap.audio-wrap {
    min-height: 9rem;
    aspect-ratio: auto;
}

.location-form,
.location-reveal {
    display: grid;
    gap: .75rem;
}

.location-map {
    width: 100%;
    min-height: min(46dvh, 24rem);
    border: .18rem solid #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: .3rem .3rem 0 #8d3d00;
    background: #fff;
}

.location-form.hidden,
.location-reveal.hidden {
    display: none;
}

.location-reveal > span {
    color: #fff7dd;
    font-weight: 900;
    text-align: center;
}

.location-reveal > strong {
    color: #fff;
    font-size: clamp(1.7rem, 6vw, 3.4rem);
    font-weight: 900;
    text-align: center;
    text-shadow: .08em .08em 0 #8d3d00;
}

.location-result-marker {
    align-items: center;
    background: var(--marker-color);
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 5px 0 rgba(93, 50, 0, .35);
    color: #fff;
    display: flex;
    font-size: 1.15rem;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    transform: rotate(-45deg);
    width: 32px;
}

.location-result-marker span {
    display: block;
    transform: rotate(45deg);
}

.video-wrap .hidden {
    display: none !important;
}

.video-wrap .vjs-control-bar,
.video-wrap .vjs-big-play-button,
.video-wrap .vjs-error-display,
.video-wrap .vjs-modal-dialog,
.video-wrap .vjs-title-bar {
    display: none !important;
}

.enable-audio-button {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    z-index: 2;
    border: .16rem solid #fff;
    border-radius: 999px;
    background: #ff8a00;
    color: #fff;
    padding: .65rem .9rem;
    box-shadow: .2rem .2rem 0 #8d3d00;
    font-weight: 900;
    pointer-events: auto;
}

.audio-progress-row {
    width: min(32rem, 90%);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    color: #fff;
    font-size: .9rem;
    font-weight: 900;
}

.audio-progress-row progress {
    width: 100%;
    height: .8rem;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    accent-color: #ff8a00;
}

.audio-progress-row progress::-webkit-progress-bar {
    border-radius: 999px;
    background: rgba(255, 255, 255, .35);
}

.audio-progress-row progress::-webkit-progress-value {
    border-radius: 999px;
    background: #ff8a00;
}

.audio-progress-row span {
    font-size: .9rem;
}

.buzz-button {
    width: min(26rem, 100%);
    aspect-ratio: 1;
    display: block;
    margin: 1rem auto;
    border-radius: 50%;
    background: var(--accent-strong);
    color: white;
    font-size: clamp(2.8rem, 12vw, 6rem);
    box-shadow: 0 1.25rem 0 #9d4421;
}

.scoreboard {
    display: grid;
    gap: .75rem;
}

.question-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--muted);
}

.question-meta.hidden,
.timer-bar.hidden {
    display: none;
}

.question-meta strong {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #1b1607;
    font-size: 1.5rem;
}

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

.choice-button {
    display: grid;
    grid-template-columns: 2.75rem 1fr;
    align-items: center;
    gap: .75rem;
    min-height: 5rem;
    background: rgba(255, 255, 255, .08);
    color: var(--text);
    text-align: left;
}

.choice-button span {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #1b1607;
}

.choice-button strong {
    overflow-wrap: anywhere;
}

.multiple-choice-game,
.showquiz-game {
    position: relative;
    isolation: isolate;
    width: min(68rem, calc(100% - 2rem));
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(2rem, 5vw, 4rem) 0;
}

body:has(.multiple-choice-game),
body:has(.showquiz-game) {
    overflow-x: hidden;
    background:
        radial-gradient(circle at 20% -10%, rgba(255, 185, 38, .9), transparent 20rem),
        linear-gradient(160deg, #ff8a00 0%, #ff7600 58%, #f15c00 100%);
    color: #fff;
}

body:has(.multiple-choice-game),
body:has(.arithmetic-game),
body:has(.login-game) {
    overflow: hidden;
}

body:has(.multiple-choice-game)::before,
body:has(.showquiz-game)::before {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 7% 34%, rgba(190, 83, 0, .22) 0 3rem, transparent 3.1rem),
        radial-gradient(circle at 76% 22%, rgba(190, 83, 0, .16) 0 5.5rem, transparent 5.6rem),
        radial-gradient(circle at 93% 82%, rgba(190, 83, 0, .20) 0 4rem, transparent 4.1rem),
        linear-gradient(8deg, rgba(206, 82, 0, .22) 0 18%, transparent 18% 100%);
    content: "";
}

.mc-background-mark {
    position: fixed;
    z-index: -1;
    color: rgba(148, 60, 0, .16);
    font-size: clamp(9rem, 24vw, 18rem);
    font-weight: 900;
    line-height: 1;
    transform: rotate(-16deg);
    user-select: none;
}

.mc-mark-one {
    top: -2.5rem;
    left: 22%;
}

.mc-mark-two {
    right: -1rem;
    top: 2rem;
    transform: rotate(18deg);
}

.mc-mark-three {
    bottom: -5rem;
    left: 32%;
    transform: rotate(11deg);
}

.mc-header {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
}

.multiple-choice-game .eyebrow,
.showquiz-game .eyebrow {
    color: #fff;
    font-size: clamp(1.8rem, 5vw, 3rem);
    letter-spacing: 0;
    line-height: 1;
    text-transform: none;
    text-shadow: .12em .12em 0 #8d3d00;
}

.multiple-choice-game h1,
.showquiz-game h1 {
    color: #fff;
    font-size: clamp(4rem, 15vw, 9rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: .88;
    text-shadow:
        .07em .07em 0 #9b4200,
        0 .02em 0 rgba(255, 255, 255, .35);
    transform: rotate(-1deg);
}

.mc-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    margin: 1rem 0 0;
    border-radius: 999px;
    background: rgba(124, 53, 0, .24);
    color: #fff8e8;
    padding: .35rem .85rem;
    font-weight: 700;
}

.mc-panel {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: .25rem solid #fff;
    border-radius: 8px;
    background: #fff7e8;
    color: #3d2100;
    box-shadow: .8rem .8rem 0 #933f00;
}

.mc-panel::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 8% 12%, rgba(255, 137, 0, .15) 0 3.5rem, transparent 3.6rem),
        radial-gradient(circle at 91% 18%, rgba(255, 137, 0, .13) 0 4rem, transparent 4.1rem);
    content: "";
}

.showquiz-game label,
.showquiz-game #feedback,
.showquiz-game .scoreboard {
    position: relative;
}

.showquiz-game label {
    color: #8d3d00;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
}

.showquiz-game input {
    border: .18rem solid #fff;
    background: #fff;
    color: #3d2100;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: 800;
    box-shadow: .25rem .25rem 0 rgba(141, 61, 0, .45);
}

.showquiz-game input::placeholder {
    color: rgba(61, 33, 0, .5);
}

.showquiz-game .join-row button {
    border: .18rem solid #fff;
    background: #ff8a00;
    color: #fff;
    font-weight: 900;
    box-shadow: .25rem .25rem 0 #8d3d00;
}

.showquiz-game .join-row button:hover:not(:disabled),
.showquiz-game .join-row button:focus-visible:not(:disabled) {
    background: #ffb02e;
}

.login-start-button {
    position: relative;
    width: 100%;
    margin-top: .85rem;
    border: .18rem solid #fff;
    background: #ff8a00;
    color: #fff;
    font-weight: 900;
    box-shadow: .2rem .2rem 0 #8d3d00;
}

.login-start-button:hover:not(:disabled),
.login-start-button:focus-visible:not(:disabled) {
    background: #ffb02e;
}

.spectator-choice {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: .25rem 0 1rem;
    color: #3d2100;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
}

.showquiz-game .spectator-choice input {
    width: 1.35rem;
    height: 1.35rem;
    min-height: 0;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: .15rem solid #8d3d00;
    border-radius: 4px;
    box-shadow: none;
    accent-color: #ff8a00;
}

.showquiz-game #feedback {
    margin: 1rem 0 0;
    color: #8d3d00;
    font-weight: 900;
}

.multiple-choice-game .question-meta,
.multiple-choice-game .timer-bar,
.multiple-choice-game .question,
.multiple-choice-game .choice-grid,
.multiple-choice-game #answerStatus {
    position: relative;
}

.multiple-choice-game .question {
    white-space: pre-line;
}

.multiple-choice-game #startRoundButton {
    position: relative;
}

.multiple-choice-game .question-meta {
    color: #8d3d00;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
}

.multiple-choice-game .question-meta strong {
    width: 4rem;
    height: 4rem;
    border: .18rem solid #fff;
    background: #ff7f00;
    color: #fff;
    font-size: 1.85rem;
    box-shadow: .25rem .25rem 0 #8d3d00;
}

.timer-bar {
    height: 1.15rem;
    margin: 0 0 1.25rem;
    overflow: hidden;
    border: .16rem solid #fff;
    border-radius: 999px;
    background: #8d3d00;
    box-shadow: .2rem .2rem 0 rgba(141, 61, 0, .45);
}

.timer-bar-fill {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffe761 0%, #ffbd2f 48%, #ff7f00 100%);
    transition: width .22s linear;
}

.multiple-choice-game.revealing-mode .timer-bar-fill {
    background: linear-gradient(90deg, #20a85b 0%, #7ee08f 100%);
}

.multiple-choice-game .question {
    margin: 0 0 1.25rem;
    color: #3d2100;
    font-size: clamp(1.6rem, 4vw, 2.7rem);
    font-weight: 900;
    line-height: 1.05;
}

.multiple-choice-game .choice-grid {
    gap: 1rem;
}

.estimation-form {
    position: relative;
    display: grid;
    gap: .75rem;
}

.estimation-form.hidden {
    display: none;
}

.estimation-reveal {
    position: relative;
    display: grid;
    gap: .65rem;
    text-align: center;
}

.estimation-reveal.hidden {
    display: none;
}

.estimation-reveal > span {
    color: #8d3d00;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
}

.estimation-reveal > strong {
    color: #3d2100;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    line-height: .95;
    text-shadow: .06em .06em 0 rgba(141, 61, 0, .28);
}

.estimation-ranking {
    display: grid;
    gap: .45rem;
    text-align: left;
}

.estimation-rank-row {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    border: .16rem solid #fff;
    border-radius: 8px;
    background: #ff8a00;
    color: #fff;
    padding: .45rem .55rem;
    box-shadow: .18rem .18rem 0 #8d3d00;
}

.estimation-rank-row.winner {
    background: #20a85b;
    box-shadow: .18rem .18rem 0 #0c6532;
}

.estimation-rank-row .rank {
    border: .14rem solid #fff;
    background: #3d2100;
    color: #fff;
}

.estimation-rank-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: .07em .07em 0 #8d3d00;
}

.estimation-rank-row span:last-child {
    font-weight: 900;
    white-space: nowrap;
    text-shadow: .07em .07em 0 #8d3d00;
}

.artist-form {
    position: relative;
    display: grid;
    gap: .75rem;
}

.artist-form.hidden {
    display: none;
}

.artist-form input {
    border: .2rem solid #fff;
    border-radius: 8px;
    background: #fff;
    color: #3d2100;
    font-size: clamp(1.15rem, 3.4vw, 1.65rem);
    font-weight: 900;
    box-shadow: .25rem .25rem 0 rgba(141, 61, 0, .45);
}

.artist-options {
    display: grid;
    gap: .45rem;
    max-height: min(34dvh, 18rem);
    overflow: auto;
    padding-right: .2rem;
}

.artist-option {
    border: .16rem solid #fff;
    border-radius: 8px;
    background: #ff8a00;
    color: #fff;
    padding: .7rem .8rem;
    box-shadow: .18rem .18rem 0 #8d3d00;
    font-size: clamp(1rem, 2.8vw, 1.25rem);
    font-weight: 900;
    text-align: left;
    text-shadow: .07em .07em 0 #8d3d00;
}

.artist-option:hover:not(:disabled),
.artist-option:focus-visible:not(:disabled) {
    background: #ffb02e;
}

.multiple-choice-game.statement-mode .choice-grid {
    grid-template-columns: 1fr;
}

.multiple-choice-game .choice-button {
    min-height: 6.25rem;
    border: .2rem solid #fff;
    border-radius: 8px;
    background: #ff8a00;
    color: #fff;
    box-shadow: .35rem .35rem 0 #8d3d00;
    transform: rotate(-.4deg);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.multiple-choice-game .choice-button:nth-child(even) {
    transform: rotate(.4deg);
}

.multiple-choice-game .choice-button:hover:not(:disabled),
.multiple-choice-game .choice-button:focus-visible:not(:disabled) {
    background: #ffb02e;
    box-shadow: .2rem .2rem 0 #8d3d00;
    transform: translate(.15rem, .15rem) rotate(0);
}

.multiple-choice-game .choice-button:disabled {
    opacity: .78;
}

.multiple-choice-game .choice-button.selected {
    border-color: #3d2100;
    outline: .32rem solid #fff;
    outline-offset: .18rem;
    box-shadow: .35rem .35rem 0 #3d2100;
}

.multiple-choice-game .choice-button.correct {
    border-color: #fff;
    background: #20a85b;
    box-shadow: .35rem .35rem 0 #0c6532;
    opacity: 1;
}

.multiple-choice-game .choice-button.wrong {
    border-color: #fff;
    background: #d63d2e;
    box-shadow: .35rem .35rem 0 #8f1d15;
    opacity: 1;
}

.multiple-choice-game .choice-button span {
    width: 3.1rem;
    height: 3.1rem;
    border: .16rem solid #fff;
    background: #3d2100;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 900;
}

.multiple-choice-game .choice-button strong {
    color: #fff;
    font-size: clamp(1.1rem, 2.6vw, 1.45rem);
    text-shadow: .08em .08em 0 #8d3d00;
}

.multiple-choice-game #answerStatus {
    margin: 1rem 0 0;
    color: #8d3d00;
    font-size: clamp(1.6rem, 4vw, 2.7rem);
    font-weight: 900;
    line-height: 1.05;
}

.score-row {
    display: grid;
    grid-template-columns: 3rem 1fr auto;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .04);
    padding: 1rem;
}

.showquiz-game .score-row {
    border: .18rem solid #fff;
    background: #ff8a00;
    color: #fff;
    box-shadow: .28rem .28rem 0 #8d3d00;
}

.showquiz-game .score-row.own-team {
    border-width: .34rem;
    box-shadow: .34rem .34rem 0 #5c2600;
}

.showquiz-game .score-row strong {
    font-size: clamp(1.15rem, 2.6vw, 1.6rem);
    text-shadow: .08em .08em 0 #8d3d00;
}

.arithmetic-expression {
    position: relative;
    margin: 0 0 1rem;
    color: #3d2100;
    font-size: clamp(3rem, 10vw, 6.5rem);
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.typed-answer {
    position: relative;
    min-height: 4.5rem;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    border: .18rem solid #fff;
    border-radius: 8px;
    background: #fff;
    color: #3d2100;
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 900;
    box-shadow: .25rem .25rem 0 rgba(141, 61, 0, .45);
}

.arithmetic-feedback {
    position: relative;
    min-height: 2rem;
    margin: 0 0 1rem;
    color: #8d3d00;
    font-weight: 900;
    text-align: center;
}

.arithmetic-game .question-meta,
.arithmetic-game .timer-bar,
.arithmetic-game .arithmetic-expression,
.arithmetic-game .typed-answer,
.arithmetic-game .arithmetic-feedback,
.arithmetic-game .keypad {
    position: relative;
}

.arithmetic-feedback.good {
    color: #137a3d;
}

.arithmetic-feedback.wrong {
    color: #b72f23;
}

.keypad {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}

.keypad button {
    min-height: 4.75rem;
    border: .18rem solid #fff;
    border-radius: 8px;
    background: #ff8a00;
    color: #fff;
    font-size: clamp(1.35rem, 4vw, 2rem);
    font-weight: 900;
    box-shadow: .28rem .28rem 0 #8d3d00;
}

.keypad button:hover:not(:disabled),
.keypad button:focus-visible:not(:disabled) {
    background: #ffb02e;
}

.keypad button[data-key="enter"] {
    background: #20a85b;
    box-shadow: .28rem .28rem 0 #0c6532;
}

.keypad button[data-key="backspace"] {
    background: #3d2100;
}

.showquiz-game .score-row span:last-child {
    font-weight: 900;
    text-shadow: .08em .08em 0 #8d3d00;
}

.scoreboard-next {
    display: block;
    width: min(100%, 22rem);
    min-height: 3.25rem;
    margin: clamp(.7rem, 2.4vw, 1.2rem) auto 0;
    border: .18rem solid #fff;
    border-radius: 999px;
    background: #ff8a00;
    color: #fff;
    box-shadow: 0 .38rem 0 #8d3d00;
    font: inherit;
    font-size: clamp(1rem, 4vw, 1.35rem);
    font-weight: 900;
    text-shadow: .08em .08em 0 #8d3d00;
}

.scoreboard-next:hover:not(:disabled),
.scoreboard-next:focus-visible:not(:disabled) {
    background: #ffb02e;
}

.scoreboard-next.hidden {
    display: none;
}

.scoreboard-next:disabled {
    opacity: .7;
}

.score-reveal-game h1 {
    display: grid;
    justify-items: center;
    font-size: clamp(1.8rem, 8vw, 3.25rem);
    line-height: .84;
    text-align: center;
}

.score-reveal-game h1 span {
    display: block;
}

.score-reveal-panel {
    display: grid;
    align-content: start;
    gap: .8rem;
}

.score-reveal-list {
    display: grid;
    gap: clamp(.35rem, 1.2vh, .7rem);
}

.score-reveal-row {
    display: grid;
    gap: .4rem;
    border: .16rem solid #fff;
    border-radius: 8px;
    background: rgba(40, 40, 40, .4);
    padding: clamp(.45rem, 1.5vw, .7rem);
    box-shadow: .2rem .22rem 0 #8d3d00;
    transition: background-color .25s ease, transform .25s ease;
}

.score-reveal-row:first-child {
    background: rgba(255, 210, 60, .4);
}

.score-reveal-row.own-team {
    border-width: .28rem;
    background: rgba(31, 159, 40, .3);
}

.score-reveal-heading {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    color: #fff;
}

.score-reveal-heading strong {
    min-width: 0;
    overflow: hidden;
    font-size: clamp(.9rem, 3.4vw, 1.25rem);
    text-overflow: ellipsis;
    text-shadow:
        -.06em -.06em 0 #4a2100,
        .06em -.06em 0 #4a2100,
        -.06em .06em 0 #4a2100,
        .06em .06em 0 #4a2100,
        .12em .14em .08em rgba(48, 20, 0, .85);
    white-space: nowrap;
}

.score-reveal-rank {
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: .13rem solid #fff;
    border-radius: 50%;
    background: #3d2100;
    font-weight: 900;
}

.score-reveal-points {
    font-size: clamp(.82rem, 3vw, 1.05rem);
    font-weight: 900;
    text-shadow:
        -.06em -.06em 0 #4a2100,
        .06em -.06em 0 #4a2100,
        -.06em .06em 0 #4a2100,
        .06em .06em 0 #4a2100,
        .12em .14em .08em rgba(48, 20, 0, .85);
    white-space: nowrap;
}

.score-reveal-track {
    height: clamp(.7rem, 2.4vh, 1.05rem);
    overflow: hidden;
    border: .12rem solid #fff;
    border-radius: 999px;
    background: rgba(61, 33, 0, .55);
}

.score-reveal-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #20a85b 0 58%, #ffd23c 100%);
    box-shadow: inset 0 -.16rem 0 rgba(12, 101, 50, .45);
}

.round-end-game h1 {
    display: grid;
    width: 100%;
    max-width: 100%;
    line-height: .84;
}

.round-end-game h1 span {
    display: block;
    max-width: 100%;
}

.round-end-panel {
    text-align: center;
}

.round-end-text {
    margin: 0;
    color: #8d3d00;
    font-size: clamp(1.15rem, 4.5vw, 1.8rem);
    font-weight: 900;
}

.scoreboard-game h1 {
    display: grid;
    width: 100%;
    max-width: 100%;
    justify-items: center;
    overflow-wrap: anywhere;
    font-size: clamp(2rem, 10vw, 3.1rem);
    line-height: .82;
    text-shadow: .05em .05em 0 #9b4200;
    transform: none;
}

.scoreboard-game h1 span {
    display: block;
    max-width: 100%;
}

.showquiz-game .rank {
    border: .16rem solid #fff;
    background: #3d2100;
    color: #fff;
    font-size: 1.1rem;
}

.rank {
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #1b1607;
    font-weight: 700;
}

#winnerText,
#feedback,
#connectionStatus {
    color: var(--muted);
}

.multiple-choice-game #connectionStatus,
.showquiz-game #connectionStatus {
    color: #fff8e8;
}

@media (max-width: 42rem) {
    body:has(.showquiz-game),
    body:has(.multiple-choice-game) {
        overflow: hidden;
    }

    .game-shell,
    .multiple-choice-game,
    .showquiz-game {
        width: calc(100% - .75rem);
        max-width: calc(100vw - .75rem);
        min-width: 0;
        min-height: 100dvh;
        padding: .55rem 0;
    }

    header,
    .mc-header {
        margin-bottom: 1.45rem;
    }

    .multiple-choice-game .eyebrow,
    .showquiz-game .eyebrow {
        margin-bottom: .05rem;
        font-size: clamp(1rem, 4.5vw, 1.35rem);
        text-shadow: .08em .08em 0 #8d3d00;
    }

    .join-row {
        grid-template-columns: 1fr;
        gap: .5rem;
    }

    .showquiz-game .join-row {
        grid-template-columns: 1fr auto;
    }

    .login-game .join-row {
        grid-template-columns: 1fr;
    }

    .login-game .join-row button {
        width: 100%;
    }

    .showquiz-game input,
    .showquiz-game .join-row button {
        min-height: 3rem;
        padding: .55rem .7rem;
    }

    .score-row {
        grid-template-columns: 2.5rem 1fr;
    }

    .score-row span:last-child {
        grid-column: 2;
    }

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

    .multiple-choice-game.statement-mode .choice-grid {
        grid-template-columns: 1fr;
    }

    .multiple-choice-game h1,
    .showquiz-game h1 {
        font-size: clamp(2.25rem, 12vw, 3.65rem);
        line-height: .9;
    }

    .login-game h1 {
        display: grid;
        justify-items: center;
        font-size: clamp(2rem, 10vw, 3rem);
        transform: none;
    }

    .login-game h1 span {
        display: block;
        max-width: 100%;
    }

    .mc-panel {
        border-width: .18rem;
        padding: .65rem;
        box-shadow: .28rem .28rem 0 #933f00;
    }

    .question-meta {
        gap: .5rem;
        margin-bottom: .45rem;
        font-size: .82rem;
    }

    .multiple-choice-game .question-meta strong,
    .question-meta strong {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.25rem;
        box-shadow: .16rem .16rem 0 #8d3d00;
    }

    .timer-bar {
        height: .75rem;
        margin-bottom: .55rem;
        border-width: .1rem;
    }

    .multiple-choice-game .question {
        margin-bottom: .55rem;
        font-size: clamp(1rem, 4.9vw, 1.5rem);
        line-height: 1.05;
    }

    .multiple-choice-game .choice-button {
        grid-template-columns: 2rem 1fr;
        gap: .45rem;
        min-height: 4.05rem;
        padding: .45rem;
        border-width: .14rem;
        box-shadow: .18rem .18rem 0 #8d3d00;
        transform: none;
    }

    .multiple-choice-game .choice-button:nth-child(even) {
        transform: none;
    }

    .multiple-choice-game .choice-button span {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 1rem;
    }

    .multiple-choice-game .choice-button strong {
        font-size: clamp(.82rem, 3.6vw, 1rem);
        line-height: 1.05;
        text-shadow: .06em .06em 0 #8d3d00;
    }

    .estimation-form {
        gap: .45rem;
    }

    .estimation-reveal {
        gap: .42rem;
    }

    .estimation-reveal > span {
        font-size: .78rem;
    }

    .estimation-reveal > strong {
        font-size: clamp(2rem, 12vw, 3.2rem);
    }

    .estimation-ranking {
        gap: .3rem;
    }

    .estimation-rank-row {
        grid-template-columns: 1.7rem minmax(0, 1fr);
        gap: .2rem .4rem;
        padding: .32rem .4rem;
        box-shadow: none;
    }

    .estimation-rank-row .rank {
        width: 1.65rem;
        height: 1.65rem;
        font-size: .82rem;
    }

    .estimation-rank-row strong {
        font-size: .92rem;
    }

    .estimation-rank-row span:last-child {
        grid-column: 2;
        justify-self: start;
        font-size: .78rem;
    }

    .artist-form {
        gap: .45rem;
    }

    .artist-form input {
        min-height: 3rem;
        padding: .55rem .7rem;
        border-width: .14rem;
        box-shadow: .16rem .16rem 0 #8d3d00;
        font-size: 1rem;
    }

    .artist-options {
        gap: .32rem;
        max-height: min(28dvh, 12rem);
    }

    .artist-option {
        padding: .48rem .58rem;
        border-width: .13rem;
        box-shadow: none;
        font-size: .92rem;
    }

    .multiple-choice-game #answerStatus {
        margin-top: .5rem;
        min-height: 1.7rem;
        font-size: clamp(1rem, 4.9vw, 1.5rem);
        line-height: 1.05;
    }

    .arithmetic-game h1 {
        font-size: clamp(2.15rem, 11vw, 3.4rem);
    }

    .arithmetic-expression {
        margin-bottom: .45rem;
        font-size: clamp(2rem, 11vw, 3.15rem);
    }

    .typed-answer {
        min-height: 2.8rem;
        margin-bottom: .45rem;
        font-size: clamp(1.7rem, 8vw, 2.4rem);
        box-shadow: .16rem .16rem 0 rgba(141, 61, 0, .45);
    }

    .arithmetic-feedback {
        min-height: 1.65rem;
        margin-bottom: .45rem;
        font-size: .82rem;
        line-height: 1.15;
    }

    .keypad {
        gap: .42rem;
    }

    .keypad button {
        min-height: min(3.25rem, 8.7dvh);
        padding: .35rem;
        border-width: .13rem;
        font-size: clamp(1.1rem, 5vw, 1.45rem);
        box-shadow: .16rem .16rem 0 #8d3d00;
    }

    .scoreboard {
        gap: .4rem;
    }

    .showquiz-game .score-row {
        grid-template-columns: 1.65rem minmax(0, 1fr);
        gap: .2rem .42rem;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 3rem;
        padding: .34rem .42rem;
        box-shadow: none;
    }

    .showquiz-game .score-row strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .95rem;
    }

    .showquiz-game .score-row span:last-child {
        grid-column: 2;
        justify-self: start;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: clamp(.72rem, 3.2vw, .86rem);
        white-space: nowrap;
    }

    .showquiz-game .rank,
    .rank {
        width: 1.65rem;
        height: 1.65rem;
        font-size: .82rem;
    }

    .score-reveal-game {
        padding: .5rem;
    }

        .score-reveal-game .mc-header {
            /*margin-bottom: .35rem;*/
            margin-bottom: 1.45rem;
        }

    .score-reveal-game h1 {
        font-size: clamp(1.55rem, 8vw, 2.25rem);
    }

    .score-reveal-panel {
        gap: .45rem;
        padding: .55rem;
    }

    .score-reveal-list {
        gap: .3rem;
    }

    .score-reveal-row {
        gap: .25rem;
        padding: .32rem .4rem;
        box-shadow: none;
    }

    .score-reveal-heading {
        grid-template-columns: 1.6rem minmax(0, 1fr) auto;
        gap: .35rem;
    }

    .score-reveal-rank {
        width: 1.6rem;
        height: 1.6rem;
        font-size: .8rem;
    }

    .score-reveal-track {
        height: 1.6rem;
    }

    .scoreboard-game {
        width: 100%;
        max-width: 100%;
        padding-right: .65rem;
        padding-left: .65rem;
        overflow: hidden;
    }

    .scoreboard-game h1 {
        font-size: clamp(1.75rem, 9vw, 2.55rem);
    }

    .scoreboard-game .mc-panel {
        width: 100%;
        max-width: 100%;
        padding: .28rem;
        overflow: hidden;
        box-shadow: none;
    }

    .scoreboard-game .scoreboard {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .scoreboard-game .score-row {
        border-width: .14rem;
        padding-right: .32rem;
    }

    .scoreboard-game .score-row.own-team {
        border-width: .26rem;
    }

    .scoreboard-game .score-row strong {
        font-size: clamp(.9rem, 4vw, 1.05rem);
    }
}

@media (max-width: 42rem) and (max-height: 740px) {
    .multiple-choice-game,
    .showquiz-game {
        padding: .35rem 0;
    }

    .mc-status {
        display: none;
    }

    .multiple-choice-game h1,
    .showquiz-game h1 {
        font-size: clamp(1.9rem, 10vw, 3rem);
    }

    .mc-panel {
        padding: .5rem;
    }

    .multiple-choice-game .choice-button {
        min-height: 3.55rem;
    }

    .keypad button {
        min-height: min(2.85rem, 8.3dvh);
    }

    .arithmetic-expression {
        font-size: clamp(1.75rem, 9.5vw, 2.75rem);
    }

    .typed-answer {
        min-height: 2.45rem;
    }

    .scoreboard {
        gap: .3rem;
    }
}
