/* Punchy: comedy club. Murstensvæg, spotlight, neon og kartotekskort med skrivemaskine. */

:root {
    --brick: #3a1d1a;
    --brick-dark: #1b0f0f;
    --night: #120b0b;
    --cream: #f6efe2;
    --paper: #fbf8f1;
    --ink: #141114;
    --red: #e63b2e;
    --red-dark: #8f1d14;
    --neon: #ff4d3d;
    --amber: #ffb547;
    --tan: #e9c9a0;
    --muted: #7a6f66;
    --rule: #b9d3ea;

    --stage: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
    --type: "Special Elite", "Courier New", monospace;
    font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 500;
}

* { box-sizing: border-box; }

html { background: var(--brick-dark); }

/* Murstensvæg med et varmt spotlight ovenfra. */
body {
    margin: 0;
    min-height: 100vh;
    color: var(--cream);
    background:
        radial-gradient(ellipse 45% 75% at 50% -10%, rgb(255 200 120 / .30), transparent 70%),
        linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / .6) 90%),
        /* Forskudte mursten med fuger; et par nuancer så væggen ikke ser trykt ud. */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='64'%3E%3Crect width='120' height='64' fill='%23170b0a'/%3E%3Crect x='1.5' y='1.5' width='57' height='29' rx='2' fill='%233d201c'/%3E%3Crect x='61.5' y='1.5' width='57' height='29' rx='2' fill='%2344241f'/%3E%3Crect x='-28.5' y='33.5' width='57' height='29' rx='2' fill='%23391d19'/%3E%3Crect x='31.5' y='33.5' width='57' height='29' rx='2' fill='%233f211d'/%3E%3Crect x='91.5' y='33.5' width='57' height='29' rx='2' fill='%23391d19'/%3E%3C/svg%3E"),
        var(--brick-dark);
    background-attachment: fixed;
    overflow-x: hidden;
}
/* Mørk kant, så midten af scenen står klarest. */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgb(0 0 0 / .55));
    pointer-events: none;
}

body.center { display: grid; place-items: center; padding: 16px; }

h1, h2 {
    font-family: var(--stage);
    font-weight: 400;
    margin: 0 0 .35em;
    line-height: 1.05;
    letter-spacing: .01em;
    text-transform: uppercase;
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: 1.7rem; }

.muted { color: var(--tan); }
.card .muted { color: var(--muted); }
.big { font-size: 1.3rem; }
.small-text { font-size: .9rem; }
.center-text { text-align: center; margin: 0; }
.error {
    font-family: var(--type);
    background: var(--red);
    color: var(--cream);
    border-radius: 4px;
    padding: 8px 12px;
}

/* ---------------------------------------------------------------------------
   Logo: "PUNCHY!" i en taleboble
   --------------------------------------------------------------------------- */

.logo {
    --b: 5px;
    --fill: var(--cream);
    --edge: var(--cream);
    position: relative;
    display: inline-block;
    font-family: "Archivo Black", var(--stage);
    font-weight: 400;
    font-size: 2.6rem;
    line-height: 1.1;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--fill);
    border: var(--b) solid var(--edge);
    border-radius: 18px;
    padding: .1em .45em .14em;
    box-shadow: 0 10px 30px rgb(0 0 0 / .45);
    transform: rotate(-3deg);
    margin: 4px 0 24px;
}
.logo::after {
    content: "";
    position: absolute;
    left: .6em;
    bottom: calc(-.5em - var(--b) / 2);
    width: .55em;
    height: .55em;
    background: var(--fill);
    border-right: var(--b) solid var(--edge);
    border-bottom: var(--b) solid var(--edge);
    transform: rotate(45deg) skew(12deg, 12deg);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.logo .bang { color: var(--red); }
.card .logo { --fill: var(--white, #fff); --edge: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.logo.small { --b: 3px; font-size: 1.4rem; border-radius: 10px; margin: 0 0 8px; }
@keyframes letter {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-4px) rotate(3deg); }
}

/* ---------------------------------------------------------------------------
   Kartotekskort, felter og knapper
   --------------------------------------------------------------------------- */

/* Et linjeret kartotekskort med rød margen. */
.card {
    background-color: var(--paper);
    background-image:
        linear-gradient(90deg, transparent 30px, var(--red) 30px 32px, transparent 32px),
        repeating-linear-gradient(var(--paper) 0 35px, var(--rule) 35px 36px);
    background-attachment: local;
    color: var(--ink);
    border-radius: 3px;
    padding: 28px 24px 28px 48px;
    box-shadow: 0 24px 50px rgb(0 0 0 / .55);
}
.narrow { width: 100%; max-width: 420px; text-align: center; transform: rotate(-1deg); }
.narrow > .muted { font-family: var(--type); font-size: 1.05rem; }
.narrow > .button { font-size: 1.1rem; padding-inline: 16px; }

.stack { display: flex; flex-direction: column; gap: 14px; text-align: left; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }

input, textarea {
    font: inherit;
    font-family: var(--type);
    font-size: 1.2rem;
    padding: 12px 14px;
    border: 2px solid var(--ink);
    border-radius: 3px;
    width: 100%;
    background: #fff;
    color: var(--ink);
}
input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 3px var(--amber); }
input::placeholder, textarea::placeholder { color: #a59b90; }
input[name=code] {
    font-family: var(--stage);
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: .35em;
    text-align: center;
    padding-left: calc(14px + .35em);
}

button, .button {
    font: inherit;
    font-family: var(--stage);
    font-weight: 400;
    font-size: 1.35rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 12px 26px;
    border: 0;
    border-radius: 6px;
    background: var(--red);
    color: var(--cream);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 5px 0 var(--red-dark), 0 10px 20px rgb(0 0 0 / .35);
    transition: transform .08s, box-shadow .08s, background .15s, filter .15s;
}
button:hover:not(:disabled), .button:hover { filter: brightness(1.08); box-shadow: 0 5px 0 var(--red-dark), 0 0 24px rgb(255 77 61 / .45); }
button:active:not(:disabled), .button:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--red-dark); }
button:disabled { background: #6e5f58; box-shadow: 0 5px 0 #3e3430; color: #cfc4b8; cursor: default; }
button.secondary, .button.secondary {
    background: transparent;
    color: var(--cream);
    box-shadow: inset 0 0 0 2px var(--cream);
}
button.secondary:hover:not(:disabled), .button.secondary:hover { box-shadow: inset 0 0 0 2px var(--cream), 0 0 18px rgb(246 239 226 / .25); }
button.secondary:active:not(:disabled) { transform: translateY(2px); }
.card button.secondary, .card .button.secondary { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
button.small { font-size: 1rem; padding: 6px 14px; }
button.skip { margin-top: 8px; opacity: .8; }

.button-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 8px; }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    font-family: var(--type);
    color: var(--muted);
}
.divider::before, .divider::after { content: ""; flex: 1; border-top: 2px dashed #cfc3b2; }

label.check { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
label.check input {
    appearance: none;
    width: 24px;
    height: 24px;
    flex: none;
    padding: 0;
    display: grid;
    place-content: center;
}
label.check input:checked { background: var(--ink); }
label.check input:checked::after { content: "✓"; font-weight: 900; font-size: 1rem; color: var(--cream); }

/* ---------------------------------------------------------------------------
   Topbar og nedtælling
   --------------------------------------------------------------------------- */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    gap: 12px;
}
.topbar-right { display: flex; align-items: center; gap: 16px; }

.round-badge {
    font-family: var(--type);
    font-size: 1.05rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--cream);
}
.round-badge:empty { display: none; }

/* Rødt neon-ur. --p er andelen af tiden der er tilbage og tegnes som en streg under tallet. */
.timer {
    --p: 1;
    --glow: var(--neon);
    position: relative;
    min-width: 76px;
    height: 54px;
    padding: 0 14px;
    display: grid;
    place-items: center;
    font-family: var(--stage);
    font-size: 2rem;
    font-variant-numeric: tabular-nums;
    color: var(--glow);
    border: 3px solid var(--glow);
    border-radius: 8px;
    text-shadow: 0 0 8px var(--glow), 0 0 22px var(--glow);
    box-shadow: 0 0 14px color-mix(in srgb, var(--glow) 70%, transparent), inset 0 0 10px color-mix(in srgb, var(--glow) 45%, transparent);
    background: rgb(0 0 0 / .35);
}
.timer::after {
    content: "";
    position: absolute;
    left: 6px;
    bottom: 5px;
    height: 3px;
    width: calc((100% - 12px) * var(--p));
    background: var(--glow);
    box-shadow: 0 0 6px var(--glow);
    border-radius: 2px;
    transition: width 1s linear;
}
.timer:empty { display: none; }
.timer.low { --glow: var(--amber); }
.timer.urgent { --glow: var(--neon); animation: flicker .8s steps(2) infinite; }
@property --p { syntax: "<number>"; inherits: true; initial-value: 1; }
@keyframes flicker { 50% { opacity: .55; } }

/* ---------------------------------------------------------------------------
   Storskærm
   --------------------------------------------------------------------------- */

/* Indholdet centreres lodret, så det står midt på TV'et i stedet for i toppen. */
.host main {
    padding: 8px 48px 48px;
    min-height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.host main > * { width: 100%; }
.host main > .center-col { margin-bottom: 6vh; }

.center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    max-width: 1180px;
    margin: 0 auto;
}

/* Ekstra spotlight på scenen bag spørgsmålet. */
.stage { position: relative; isolation: isolate; }
.stage::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    top: -120px;
    width: 900px;
    height: 620px;
    margin-left: -450px;
    background: radial-gradient(ellipse at 50% 0, rgb(255 205 130 / .22), transparent 65%);
    pointer-events: none;
}

.kicker {
    font-family: var(--type);
    font-size: 1.05rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--tan);
    margin: 0;
}

/* Spørgsmålet står som en stor sceneoverskrift. */
.prompt {
    font-family: var(--stage);
    font-weight: 400;
    text-transform: uppercase;
    color: var(--cream);
    max-width: 1000px;
    font-size: clamp(2.2rem, 4.6vw, 4.2rem);
    line-height: 1.02;
    margin: 0 0 18px;
    text-shadow: 0 4px 34px rgb(255 190 120 / .35);
}

.answers {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 34px;
    width: 100%;
}
.vs {
    font-family: var(--type);
    font-size: 1.3rem;
    color: var(--tan);
    display: flex;
    align-items: center;
    gap: 8px;
}
.vs::before, .vs::after { content: ""; width: 18px; border-top: 2px solid var(--tan); }

/* Svarene er kartotekskort med skrivemaskineskrift. */
.answer {
    --tilt: 0deg;
    position: relative;
    text-align: left;
    background-color: var(--paper);
    background-image:
        linear-gradient(90deg, transparent 38px, var(--red) 38px 40px, transparent 40px),
        repeating-linear-gradient(var(--paper) 0 38px, var(--rule) 38px 39px);
    color: var(--ink);
    border-radius: 2px;
    box-shadow: 0 20px 36px rgb(0 0 0 / .55);
    padding: 30px 28px 26px 58px;
    font-family: var(--type);
    font-size: clamp(1.35rem, 2.3vw, 2rem);
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
    min-height: 180px;
    transform: rotate(var(--tilt));
}
.answers > .answer:first-child { --tilt: -2.5deg; }
.answers > .answer:last-child { --tilt: 2deg; }
.answer.pop-in { animation-name: deal; }
@keyframes deal {
    from { opacity: 0; transform: translateY(60px) rotate(calc(var(--tilt) * 4)); }
    to { opacity: 1; transform: rotate(var(--tilt)); }
}
.answer.empty { opacity: .65; font-style: italic; }
.answer .author {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Archivo", sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--red);
}
/* Point som et rødt gummistempel. */
.answer .points {
    position: absolute;
    top: -20px;
    right: -14px;
    font-family: var(--stage);
    font-size: 1.9rem;
    color: var(--red);
    background: rgb(251 248 241 / .92);
    border: 4px solid var(--red);
    border-radius: 6px;
    padding: 0 12px;
    transform: rotate(8deg);
    box-shadow: 0 4px 10px rgb(0 0 0 / .25);
}
.answer .halved-badge {
    align-self: flex-start;
    font-family: var(--type);
    font-size: .95rem;
    background: var(--ink);
    color: var(--amber);
    border-radius: 3px;
    padding: 3px 10px;
}
.answer .voters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 34px; }
.answer.winner { animation: winner .7s 1.2s both; }
@keyframes winner {
    to {
        transform: rotate(var(--tilt)) scale(1.05);
        box-shadow: 0 0 0 4px var(--amber), 0 0 70px rgb(255 181 71 / .55), 0 20px 36px rgb(0 0 0 / .55);
    }
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ink);
    color: var(--cream);
    padding: 2px 12px 2px 3px;
    border-radius: 999px;
    font-family: "Archivo", sans-serif;
    font-size: .95rem;
    font-weight: 700;
}
.chip.audience { background: var(--amber); color: var(--ink); padding-left: 10px; }

.sweep-badge {
    position: absolute;
    bottom: -18px;
    right: 18px;
    font-family: var(--stage);
    font-size: 1.4rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--red);
    background: rgb(251 248 241 / .95);
    border: 4px double var(--red);
    border-radius: 4px;
    padding: 2px 14px;
    animation-delay: 1.4s;
}

/* Stemmer vises som små lamper, der tænder. */
.vote-progress {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--type);
    font-size: 1.05rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--tan);
}
.vote-progress .dots { display: inline-flex; gap: 8px; }
.vote-progress .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4a3533;
    transition: background .2s, box-shadow .2s;
}
.vote-progress .dot.on { background: var(--neon); box-shadow: 0 0 10px var(--neon), 0 0 20px rgb(255 77 61 / .6); }

.asked-by { display: inline-flex; align-items: center; gap: 10px; }

/* Lobby */

.lobby {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: 1080px;
    margin: 24px auto;
    align-items: start;
}
.join-info { text-align: center; }
.join-info p { margin: 4px 0; }
.url {
    font-family: var(--type);
    font-size: 1.3rem;
    word-break: break-all;
    color: var(--cream);
}

/* Rumkoden på et teaterskilt med pærer rundt om. */
.code {
    display: inline-flex !important;
    justify-content: center;
    gap: 10px;
    margin: 18px 0 !important;
    padding: 22px 26px;
    border-radius: 10px;
    background:
        radial-gradient(circle, #ffe0a0 0 3px, rgb(255 190 90 / .45) 4px, transparent 6px) 0 0 / 22px 22px,
        #2a1512;
    box-shadow: 0 0 40px rgb(255 181 71 / .35), inset 0 0 0 12px #2a1512;
}
.code span {
    font-family: var(--stage);
    font-size: 4.4rem;
    line-height: 1;
    width: 1.1em;
    padding: 10px 0 6px;
    background: var(--cream);
    color: var(--ink);
    border-radius: 4px;
    box-shadow: inset 0 -4px 0 rgb(0 0 0 / .12), 0 0 18px rgb(255 230 180 / .5);
}
.qr {
    display: inline-block;
    padding: 12px;
    background: var(--cream);
    border-radius: 6px;
    box-shadow: 0 16px 30px rgb(0 0 0 / .45);
    margin-top: 10px;
}
.qr img, .qr canvas { display: block; }

.lobby-panel {
    background: rgb(0 0 0 / .42);
    border: 2px solid rgb(233 201 160 / .25);
    border-radius: 10px;
    padding: 26px;
    text-align: center;
    backdrop-filter: blur(4px);
}
.lobby-panel .players { min-height: 64px; }
.empty-hint { font-family: var(--type); color: var(--tan); }

.mode-line { font-family: var(--type); color: var(--tan); margin: 14px 0 0; }
.mode-line strong { color: var(--cream); font-family: "Archivo", sans-serif; }
button.link {
    background: none;
    box-shadow: none;
    padding: 0;
    font: inherit;
    color: var(--amber);
    text-decoration: underline;
    text-transform: none;
    letter-spacing: 0;
}
button.link:hover:not(:disabled), button.link:active:not(:disabled) { box-shadow: none; transform: none; filter: brightness(1.2); }

/* Indstillinger: et kartotekskort i en dialog. */
dialog.settings {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    border: 0;
    text-align: left;
}
dialog.settings::backdrop { background: rgb(0 0 0 / .65); backdrop-filter: blur(3px); }
dialog.settings h2 { margin-bottom: 10px; }
dialog.settings h3 {
    font-family: var(--type);
    font-weight: 400;
    font-size: 1.05rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--red);
    margin: 18px 0 10px;
}
dialog.settings section { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
dialog.settings .muted { margin: 0; }
.volume { display: flex; align-items: center; gap: 12px; width: 100%; font-weight: 600; }
.volume input[type=range] { flex: 1; padding: 0; border: 0; accent-color: var(--red); background: transparent; }
.volume-value { font-family: var(--type); min-width: 3.5em; text-align: right; }

.mode-options { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.mode-option {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 2px solid #d8cfc0;
    border-radius: 4px;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 400;
    transition: border-color .15s, box-shadow .15s;
}
.mode-option:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 3px rgb(230 59 46 / .18); }
.mode-option input { width: auto; margin-top: 4px; accent-color: var(--red); }
.mode-body { display: flex; flex-direction: column; gap: 2px; }
.mode-body strong { font-family: var(--stage); font-weight: 400; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .03em; }
.mode-body small { font-family: var(--type); color: var(--muted); }

/* Spillerliste: navneskilte der lyser op, når man er færdig. */

.players {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.players li {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgb(246 239 226 / .08);
    color: var(--cream);
    border: 2px solid rgb(246 239 226 / .22);
    padding: 4px 16px 4px 4px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background .25s, border-color .25s, box-shadow .25s, color .25s;
}
.players li.done {
    background: rgb(255 181 71 / .2);
    border-color: var(--amber);
    box-shadow: 0 0 16px rgb(255 181 71 / .45);
}
.card .players li { background: #efe7d8; color: var(--ink); border-color: transparent; }

/* Stilling */

.scoreboard {
    list-style: none;
    counter-reset: place;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.scoreboard li {
    counter-increment: place;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgb(0 0 0 / .45);
    color: var(--cream);
    border: 2px solid rgb(246 239 226 / .18);
    padding: 10px 22px 10px 16px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
}
.scoreboard li > * { position: relative; }
.scoreboard li::before {
    content: counter(place);
    position: relative;
    z-index: 1;
    font-family: var(--stage);
    font-size: 1.6rem;
    width: 1.2em;
    color: var(--tan);
}
.scoreboard li span { flex: 1; text-align: left; }
.scoreboard li strong { font-family: var(--stage); font-weight: 400; font-size: 2rem; }
.scoreboard .bar {
    position: absolute;
    inset: 0 auto 0 0;
    background: linear-gradient(90deg, rgb(255 181 71 / .05), rgb(255 181 71 / .22));
    transition: width 1.5s cubic-bezier(.2, .8, .2, 1);
}
.scoreboard li:first-child {
    border-color: var(--amber);
    box-shadow: 0 0 30px rgb(255 181 71 / .35);
    transform: scale(1.04);
}
.scoreboard li:first-child::before { content: "★"; color: var(--amber); }
.scoreboard li:first-child .bar { background: linear-gradient(90deg, rgb(255 181 71 / .1), rgb(255 181 71 / .4)); }

/* ---------------------------------------------------------------------------
   Telefon
   --------------------------------------------------------------------------- */

.player .topbar { padding: 12px 16px; }
.player main { margin: 0 14px 24px; }
.player main.card { min-height: 60vh; transform: rotate(-.6deg); }
.player main h1, .player main h2 { color: var(--ink); }
.player #me {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgb(0 0 0 / .45);
    color: var(--cream);
    border: 2px solid rgb(246 239 226 / .22);
    border-radius: 999px;
    padding: 3px 14px 3px 3px;
    font-weight: 700;
}
.player .timer { min-width: 60px; height: 44px; font-size: 1.6rem; }

.audience-badge {
    display: inline-block;
    background: var(--amber);
    color: var(--ink);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 1px 8px;
    border-radius: 999px;
    margin-left: 6px;
}

.player main .task-prompt {
    background: var(--ink);
    color: var(--cream);
    border-radius: 3px;
    padding: 16px 18px;
    font-size: 1.55rem;
    line-height: 1.08;
    box-shadow: 0 8px 18px rgb(0 0 0 / .25);
}

button.vote {
    font-family: var(--type);
    font-size: 1.2rem;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    color: var(--ink);
    background: #fff;
    padding: 18px 20px 18px 26px;
    border-radius: 3px;
    border-left: 6px solid var(--red);
    box-shadow: 0 4px 0 #d8cfc0, 0 8px 16px rgb(0 0 0 / .12);
}
button.vote:hover:not(:disabled) { box-shadow: 0 4px 0 #d8cfc0, 0 0 0 3px var(--amber); }
button.vote:active:not(:disabled) { box-shadow: 0 1px 0 #d8cfc0; }

.message { text-align: center; padding: 28px 0; }
.message .emoji { font-size: 4rem; margin-bottom: 8px; animation: letter 2s ease-in-out infinite; display: inline-block; }
.message .avatar.huge { margin: 0 auto 12px; }
.message p { font-family: var(--type); }
.message + .players { margin-top: 8px; }

/* ---------------------------------------------------------------------------
   Avatarer
   --------------------------------------------------------------------------- */

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex: none;
    display: block;
    border: 3px solid var(--cream);
    background: var(--cream);
}
.card .avatar, .answer .avatar, .chip .avatar { border-color: var(--ink); }
.avatar.tiny { width: 26px; height: 26px; border-width: 2px; }
.avatar.small { width: 36px; height: 36px; border-width: 2px; }
.avatar.medium { width: 44px; height: 44px; }
.avatar.huge { width: 150px; height: 150px; border-width: 5px; box-shadow: 0 0 0 6px rgb(255 181 71 / .35), 0 16px 40px rgb(0 0 0 / .5); }
.players li .avatar { width: 40px; height: 40px; border-width: 2px; }
.lobby-panel .players li .avatar { width: 52px; height: 52px; }
.lobby-panel .players li { font-size: 1.3rem; }

.avatar.idle { animation: bob 2.4s ease-in-out infinite; }
.players li.hop .avatar { animation: hop .6s cubic-bezier(.3, 1.8, .5, 1); }
.avatar.wiggle { animation: wiggle .5s ease-in-out 1.4s infinite alternate; }
.avatar.dance { animation: dance 1s ease-in-out infinite; }

.avatar-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.avatar-picker label { position: relative; cursor: pointer; }
.avatar-picker input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-picker .avatar {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border-width: 3px;
    transition: transform .15s, opacity .15s, box-shadow .15s;
}
.avatar-picker label:hover .avatar { animation: wiggle .3s ease-in-out 2 alternate; }
.avatar-picker input:checked + .avatar {
    box-shadow: 0 0 0 4px var(--red);
    animation: hop .5s cubic-bezier(.3, 1.8, .5, 1), bob 2.4s ease-in-out .5s infinite;
}
.avatar-picker input:disabled + .avatar { opacity: .25; filter: grayscale(1); cursor: not-allowed; animation: none; }
.avatar-picker input:focus-visible + .avatar { outline: 3px solid var(--amber); outline-offset: 3px; }

/* ---------------------------------------------------------------------------
   Animationer
   --------------------------------------------------------------------------- */

.pop-in { animation: pop-in .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.slide-in { animation: slide-in .5s ease-out both; }
.fade-in { animation: fade-in .5s ease-out both; }
.stamp { animation: stamp .35s cubic-bezier(.2, 1.6, .4, 1) both; }
.delay-1 { animation-delay: .15s; }
.delay-2 { animation-delay: .4s; }
.delay-3 { animation-delay: .65s; }
.delay-4 { animation-delay: .9s; }

@keyframes pop-in {
    from { opacity: 0; transform: scale(.6); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slide-in {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes stamp {
    from { opacity: 0; transform: scale(2.4) rotate(-14deg); }
    to { opacity: 1; transform: scale(1) rotate(-4deg); }
}
@keyframes bob {
    0%, 100% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-2px) rotate(-3deg); }
    75% { transform: translateY(1px) rotate(3deg); }
}
@keyframes hop {
    0% { transform: translateY(0) scale(1); }
    30% { transform: translateY(-10px) scale(1.15, .9); }
    60% { transform: translateY(0) scale(.92, 1.08); }
    100% { transform: none; }
}
@keyframes wiggle {
    from { transform: rotate(-10deg) scale(1.05); }
    to { transform: rotate(10deg) scale(1.05); }
}
@keyframes dance {
    0%, 100% { transform: translateY(0) rotate(-8deg); }
    25% { transform: translateY(-16px) rotate(0); }
    50% { transform: translateY(0) rotate(8deg); }
    75% { transform: translateY(-16px) rotate(0); }
}

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

@media (max-width: 760px) {
    .lobby { grid-template-columns: 1fr; }
    .answers { grid-template-columns: 1fr; }
    .host main { padding: 8px 16px 24px; }
    .code span { font-size: 3rem; }
    .logo { font-size: 2.2rem; }
    .card { padding-left: 42px; }
}

/* Kategorien er låst under et spil. */
.mode-options.locked .mode-option { cursor: not-allowed; opacity: .55; }
.mode-options.locked .mode-option:has(input:checked) { opacity: 1; }
.locked-note { font-family: var(--type); color: var(--red); margin: 0; }

/* Sprogvalg nederst på forsiden: klistermærker tapet skævt op på murstensvæggen. */
body.center { grid-template-rows: 1fr auto; gap: 28px; }
body.center > main { align-self: center; }
.lang-switch { display: flex; gap: 22px; justify-content: center; padding: 10px 0 14px; }
button.flag {
    --tilt: -5deg;
    position: relative;
    width: 82px;
    padding: 5px 5px 4px;
    background: #fff;
    border-radius: 1px;
    box-shadow: 0 10px 18px rgb(0 0 0 / .5);
    transform: rotate(var(--tilt));
    opacity: .6;
    filter: sepia(.35) saturate(.7);
    transition: opacity .2s, filter .2s, transform .2s;
}
button.flag + button.flag { --tilt: 4deg; }
/* Et stykke tape hen over toppen. */
button.flag::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 50%;
    width: 46px;
    height: 16px;
    margin-left: -23px;
    background: rgb(255 230 170 / .7);
    transform: rotate(calc(var(--tilt) * -.8));
}
button.flag svg { display: block; width: 100%; height: 46px; }
button.flag .label {
    display: block;
    padding-top: 5px;
    font-family: var(--type);
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink);
    text-shadow: none;
}
button.flag:hover:not(:disabled) { opacity: .9; filter: none; transform: rotate(calc(var(--tilt) / 2)) translateY(-2px); box-shadow: 0 14px 22px rgb(0 0 0 / .5); }
button.flag:active:not(:disabled) { transform: rotate(calc(var(--tilt) / 2)); box-shadow: 0 6px 12px rgb(0 0 0 / .5); }
button.flag[aria-pressed="true"] { opacity: 1; filter: none; }
button.flag[aria-pressed="true"] .label { color: var(--red); }
button.flag:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
