@font-face {
    font-family: 'Tinos';
    src: url('/static/tinos-regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Tinos';
    src: url('/static/tinos-bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Jersey 10';
    src: url('/static/jersey-10.ttf') format('truetype');
    font-weight: 400;
    font-display: block;
}

:root {
    --room: #07060f;
    --panel: #120f28;
    --text: #efeaff;
    --muted: #a7a0d6;
    --faint: #6f68a3;
    --cyan: #22d3ee;
    --pink: #ff4fa3;
    --green: #3df58c;
    --yellow: #fde047;
    --orange: #fb923c;
    --purple: #8b5cf6;
    --discord: #5865f2;
    --font: 'Tinos', Georgia, 'Times New Roman', serif;
    --pixel: 'Jersey 10', 'Tinos', Georgia, serif;
    --neon: #22d3ee;
    --neon-soft: rgba(34, 211, 238, 0.35);
    --paint: #1c1839;
    --cursor: url('/static/cursor.svg?v=4') 3 0, url('/static/cursor.png?v=4') 3 0, auto;
    --cursor-hand: url('/static/cursor-hover.svg?v=4') 6 0, url('/static/cursor-hover.png?v=4') 6 0, pointer;
}

html {
    cursor: var(--cursor);
}

a[href],
button,
summary,
label[for],
select,
[role="tab"],
[role="option"] {
    cursor: var(--cursor-hand);
}

button:disabled {
    cursor: var(--cursor);
}

input:not([type]),
input[type="text"],
input[type="search"],
input[type="number"],
input[type="url"],
textarea {
    cursor: text;
}

.game-1 {
    --neon: #3df58c;
    --neon-soft: rgba(61, 245, 140, 0.35);
    --paint: #11683c;
}

.game-2 {
    --neon: #22d3ee;
    --neon-soft: rgba(34, 211, 238, 0.35);
    --paint: #0e6f80;
}

.game-3 {
    --neon: #a3e635;
    --neon-soft: rgba(163, 230, 53, 0.35);
    --paint: #4d7c0f;
}

.game-4 {
    --neon: #fde047;
    --neon-soft: rgba(253, 224, 71, 0.35);
    --paint: #b88a07;
}

.game-5 {
    --neon: #fb923c;
    --neon-soft: rgba(251, 146, 60, 0.35);
    --paint: #b45309;
}

.game-6 {
    --neon: #ff4fa3;
    --neon-soft: rgba(255, 79, 163, 0.35);
    --paint: #a3195b;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    background: var(--room);
}

html,
.messages-scroll,
.queue,
.recent,
.pick-list,
.people,
.card-shelf {
    scrollbar-width: none;
}

html::-webkit-scrollbar,
.messages-scroll::-webkit-scrollbar,
.queue::-webkit-scrollbar,
.recent::-webkit-scrollbar,
.pick-list::-webkit-scrollbar,
.people::-webkit-scrollbar,
.card-shelf::-webkit-scrollbar {
    display: none;
}

.scroll-rail {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    width: 14px;
    pointer-events: none;
}

.scroll-rail.inner {
    right: auto;
    bottom: auto;
    left: 0;
}

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

.scroll-thumb {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    opacity: 0;
    transition: opacity 0.45s ease;
    touch-action: none;
}

@media (pointer: coarse) {
    .scroll-rail,
    .scroll-thumb {
        width: 24px;
    }
}

.scroll-thumb::before {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    bottom: 3px;
    width: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.85);
    transition: width 0.15s ease, background-color 0.15s ease;
}

.scroll-rail.shown .scroll-thumb {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.15s ease;
}

.scroll-thumb:hover::before,
.scroll-rail.dragging .scroll-thumb::before {
    width: 8px;
    background: #ffffff;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font: 17px/1.5 var(--font);
    background-color: var(--room);
    background-image:
        radial-gradient(1000px 520px at 50% -160px, rgba(139, 92, 246, 0.38), transparent 70%),
        linear-gradient(rgba(7, 6, 15, 0.58), rgba(7, 6, 15, 0.82)),
        url('/static/pattern.svg');
    background-size: auto, auto, 450px 600px;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

input,
textarea {
    -webkit-user-select: text;
    user-select: text;
}

a {
    color: inherit;
}

h1, h2, p {
    margin: 0;
}

button, input {
    font-family: var(--font);
}

:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.logo {
    width: 34px;
    height: 34px;
    flex: none;
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 30px 22px 70px;
}

.page.hall {
    max-width: 1680px;
}

.page.game {
    max-width: none;
    padding: 10px 22px 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    font: 700 19px/1 var(--font);
    text-decoration: none;
    cursor: var(--cursor-hand);
}

.btn:disabled {
    opacity: 0.6;
    cursor: progress;
}

.btn.primary {
    color: #052029;
    background: radial-gradient(120% 130% at 50% 0%, #b6f6ff 0%, #22d3ee 45%, #0891b2 100%);
    box-shadow: 0 5px 0 #0e5f74, 0 0 24px rgba(34, 211, 238, 0.55);
}

.btn.primary:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #0e5f74, 0 0 18px rgba(34, 211, 238, 0.5);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 2px #3b3470;
}

.btn.ghost:hover {
    box-shadow: inset 0 0 0 2px var(--cyan), 0 0 16px rgba(34, 211, 238, 0.35);
}

.btn.discord {
    background: radial-gradient(120% 130% at 50% 0%, #9aa3ff 0%, #5865f2 50%, #3c45c9 100%);
    box-shadow: 0 5px 0 #2f379e, 0 0 24px rgba(88, 101, 242, 0.55);
}

.gate {
    min-height: 72vh;
    display: grid;
    place-items: center;
}

.gate-card {
    width: min(100%, 420px);
    padding: 36px 30px 34px;
    text-align: center;
    background: rgba(18, 15, 40, 0.94);
    border: 2px solid rgba(255, 79, 163, 0.65);
    border-radius: 24px;
    box-shadow: 0 0 20px rgba(255, 79, 163, 0.35), inset 0 0 20px rgba(255, 79, 163, 0.12);
}

.gate-card .logo {
    display: block;
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
}

.gate-card h1 {
    color: #ffe4f3;
    font: 700 36px/1.1 var(--font);
    text-shadow: 0 0 6px var(--pink), 0 0 18px var(--pink);
}

.gate-card p {
    margin-top: 10px;
    color: var(--muted);
}

.gate-card .btn {
    margin-top: 24px;
}

.gate-card form {
    margin: 0;
}

.notice {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 79, 163, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 79, 163, 0.5);
    color: #ffd0e6 !important;
}

.hero {
    display: grid;
    justify-items: center;
    gap: 26px;
    margin: 6px 0 42px;
}

.player {
    width: min(100%, 360px);
}

.player-card {
    container-type: inline-size;
    position: relative;
    width: 100%;
    aspect-ratio: 1.586;
    overflow: hidden;
    border-radius: 12px;
    color: #f4e6c4;
    background:
        repeating-radial-gradient(circle at 104% -8%, rgba(240, 200, 110, 0.075) 0 1px, transparent 1.5px 6px),
        radial-gradient(130% 120% at 100% 0%, rgba(231, 184, 79, 0.16), transparent 55%),
        linear-gradient(150deg, #1d1b26 0%, #0b0a10 58%, #17141f 100%);
    box-shadow: 0 18px 34px -16px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(240, 200, 110, 0.38), inset 0 1px 0 rgba(255, 240, 200, 0.35), 0 0 24px rgba(231, 184, 79, 0.12);
}

.player-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(118deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.035) 30%, transparent 44%);
    pointer-events: none;
}

.card-face {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 6cqw 6.6cqw 5.6cqw;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3cqw;
}

.card-brand {
    min-width: 0;
}

.card-brand strong,
.card-kind,
.card-money strong {
    background: linear-gradient(180deg, #fff3c4 0%, #f2cd72 42%, #b07a26 62%, #f6d888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-brand strong {
    display: block;
    font: 700 6.4cqw/1 var(--font);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
}

.card-brand span {
    display: block;
    margin-top: 1.5cqw;
    color: #cfc6b0;
    font-size: max(9px, 2.9cqw);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.card-kind {
    flex: none;
    margin: 0;
    font: 700 max(8px, 2.5cqw)/1.3 var(--font);
    letter-spacing: 0.22em;
    text-align: right;
    text-transform: uppercase;
}

.card-member {
    display: flex;
    align-items: center;
    gap: 4cqw;
    margin: auto 0;
}

.card-member img {
    width: 17cqw;
    height: 17cqw;
    flex: none;
    border-radius: 3.6cqw;
    box-shadow: 0 0 0 0.5cqw #e9c46a, 0 0 0 1cqw rgba(0, 0, 0, 0.6);
}

.card-who {
    min-width: 0;
}

.card-label {
    display: block;
    color: rgba(240, 205, 120, 0.75);
    font: 700 max(8px, 2.3cqw)/1 var(--font);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.card-name {
    margin: 1.2cqw 0 0;
    overflow: hidden;
    color: #f5f1ea;
    font: 700 6.2cqw/1.1 var(--font);
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.8), 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.card-since {
    display: flex;
    align-items: baseline;
    gap: 1.6cqw;
    margin: 1.6cqw 0 0;
    font-size: max(10px, 3.2cqw);
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 3cqw;
}

.card-money {
    margin: 0;
}

.card-money strong {
    display: block;
    margin-top: 1cqw;
    font: 700 5.6cqw/1 var(--font);
}

.card-site {
    margin: 0;
    color: rgba(240, 205, 120, 0.7);
    font-size: max(9px, 2.6cqw);
    letter-spacing: 0.16em;
}

.quit {
    margin: 0;
}

.quit button {
    padding: 4px 6px;
    border: 0;
    color: var(--muted);
    background: none;
    font: 700 16px/1 var(--font);
    cursor: var(--cursor-hand);
}

.quit button:hover {
    color: #ffd0e6;
    text-shadow: 0 0 10px var(--pink);
}

.sound-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 0;
    color: var(--muted);
    background: none;
    cursor: var(--cursor-hand);
    transition: color 0.15s ease, filter 0.15s ease;
}

.sound-toggle svg {
    width: 24px;
    height: 24px;
}

.sound-toggle .speaker {
    fill: currentColor;
}

.sound-toggle .waves,
.sound-toggle .mute {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.sound-toggle .mute,
.sound-toggle.off .waves {
    display: none;
}

.sound-toggle.off .mute {
    display: inline;
}

.sound-toggle:hover {
    color: #ffd0e6;
    filter: drop-shadow(0 0 6px var(--pink));
}

.sound-toggle.blocked {
    position: relative;
    z-index: 60;
    color: var(--yellow);
    animation: sound-call 1.4s ease-in-out infinite;
}

.sound-toggle.blocked:hover {
    color: #fef08a;
}

.sound-toggle.blocked .waves {
    display: none;
}

.sound-toggle.blocked .mute {
    display: inline;
}

.sound-toggle.blocked::before {
    content: '';
    position: absolute;
    top: calc(100% + 5px);
    right: 10px;
    width: 12px;
    height: 12px;
    background: var(--yellow);
    transform: rotate(45deg);
}

.sound-toggle.blocked::after {
    content: 'Apasă pentru sunet';
    position: absolute;
    top: calc(100% + 10px);
    right: -6px;
    padding: 7px 12px;
    border-radius: 10px;
    color: #1c1500;
    background: var(--yellow);
    box-shadow: 0 0 16px rgba(253, 224, 71, 0.75);
    font: 700 14px/1 var(--font);
    white-space: nowrap;
    animation: sound-hint 1.4s ease-in-out infinite;
}

@keyframes sound-hint {
    0%,
    100% {
        box-shadow: 0 0 8px rgba(253, 224, 71, 0.45);
    }
    50% {
        box-shadow: 0 0 20px rgba(253, 224, 71, 0.95);
    }
}

@keyframes sound-call {
    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(253, 224, 71, 0.45));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(253, 224, 71, 1));
    }
}

.hero .quit {
    order: -1;
    justify-self: end;
    margin: -14px 0 -12px;
}

@media (min-width: 1200px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
    }

    .hero .neon-sign {
        grid-column: 2;
        grid-row: 1;
    }

    .hero .player {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .hero .player-card {
        transform: rotate(-3deg);
    }

    .hero .quit {
        order: 0;
        grid-column: 3;
        grid-row: 1;
        align-self: start;
        margin: 0;
    }
}

.neon-sign {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.28em;
    padding: 16px 34px 20px;
    border: 3px solid #f5b8ff;
    border-radius: 26px;
    box-shadow: 0 0 6px #e879f9, 0 0 22px rgba(192, 38, 211, 0.8), inset 0 0 14px rgba(192, 38, 211, 0.6);
    font: 700 clamp(40px, 8vw, 76px)/1.05 var(--font);
    letter-spacing: 0.01em;
    text-align: center;
    animation: sign-on 1.7s ease-out both, sign-buzz 11s 2.5s infinite;
}

@keyframes sign-on {
    0% {
        opacity: 0.12;
    }
    9% {
        opacity: 1;
    }
    13% {
        opacity: 0.15;
    }
    21% {
        opacity: 0.85;
    }
    25% {
        opacity: 0.2;
    }
    38% {
        opacity: 1;
    }
    43% {
        opacity: 0.45;
    }
    52%,
    100% {
        opacity: 1;
    }
}

@keyframes sign-buzz {
    0%,
    93%,
    100% {
        opacity: 1;
    }
    94% {
        opacity: 0.4;
    }
    95% {
        opacity: 1;
    }
    96.5% {
        opacity: 0.6;
    }
    97.5% {
        opacity: 1;
    }
}

.glow {
    padding: 0 0.04em 0.06em;
    color: transparent;
    background: linear-gradient(90deg, #ffc2e2 0%, #e4d0ff 50%, #b5f5ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 5px rgba(255, 79, 163, 0.8)) drop-shadow(0 0 16px rgba(192, 132, 252, 0.6)) drop-shadow(0 0 30px rgba(34, 211, 238, 0.45));
}

.games {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
    gap: 60px 26px;
    padding-bottom: 24px;
}

.games .cabinet::after {
    content: '';
    position: absolute;
    left: 4%;
    right: 4%;
    bottom: -16px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--neon-soft), transparent);
    pointer-events: none;
}

.cab-art {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    font-family: var(--font);
}

.cab-line {
    fill: #05040b;
    stroke: #05040b;
    stroke-width: 8;
    stroke-linejoin: round;
}

.cab-paint {
    fill: var(--paint);
}

.cab-trim {
    fill: none;
    stroke: var(--neon);
    stroke-width: 1.8;
    stroke-linejoin: round;
}

.cabinet.later .cab-trim {
    stroke-opacity: 0.4;
}

.cab-glow {
    stop-color: var(--neon);
}

.cabinet.later .cab-glow {
    stop-color: #8b5cf6;
}

.games .cabinet.live .cab-art {
    filter: drop-shadow(0 0 12px var(--neon-soft));
    transition: filter 0.2s ease;
}

.games .cabinet.live:hover .cab-art {
    filter: drop-shadow(0 0 24px var(--neon));
}

.games .cabinet .cab-art,
.games .cabinet::after {
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.games .cabinet.locked {
    pointer-events: none;
    cursor: var(--cursor);
}

.games .cabinet.locked .cab-art {
    filter: brightness(0.6) saturate(0.75);
}

.games .cabinet.live.locked .cab-art {
    filter: brightness(0.6) saturate(0.75) drop-shadow(0 0 8px var(--neon-soft));
}

.games .cabinet.locked::after {
    opacity: 0.4;
}

.cab-name {
    fill: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-anchor: middle;
}

.cabinet.live .cab-name {
    filter: drop-shadow(0 0 2px var(--neon)) drop-shadow(0 0 6px var(--neon));
}

.cabinet.later .cab-name {
    fill: var(--neon);
    fill-opacity: 0.6;
}

.cabinet.later .cab-game {
    opacity: 0.22;
    filter: grayscale(0.7);
}

.cab-hi {
    fill: #fef9c3;
    font-size: 8.5px;
    font-weight: 700;
}

.cab-playing {
    fill: #dcfce7;
    font-size: 8.5px;
    font-weight: 700;
    text-anchor: end;
    animation: blink 1.2s steps(2, start) infinite;
}

.cab-playing,
.cab-resume,
.cabinet.playing .cab-play {
    display: none;
}

.cabinet.playing .cab-playing,
.cabinet.playing .cab-resume {
    display: inline;
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

.cab-off rect {
    fill: rgba(7, 6, 15, 0.85);
    stroke: #3b3470;
}

.cab-off text {
    fill: var(--muted);
    font-size: 9.5px;
    font-weight: 700;
    text-anchor: middle;
}

.cab-slot {
    fill: #05040b;
    stroke: #fb923c;
    stroke-width: 1.2;
}

.cab-tokens {
    fill: #fed7aa;
    font-family: var(--pixel);
    font-size: 13.5px;
    font-weight: 400;
    text-anchor: middle;
}

.cab-cta rect {
    fill: #22d3ee;
}

.cab-cta text {
    fill: #052029;
    font-size: 9px;
    font-weight: 700;
    text-anchor: middle;
}

@media (max-width: 1299px) {
    .games {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 759px) {
    .games {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 439px) {
    .hero {
        gap: 16px;
        margin: 0 0 30px;
    }

    .hero .player {
        width: min(100%, 300px);
    }

    .games {
        gap: 34px 14px;
    }

    .cab-hi,
    .cab-playing,
    .cab-cta text {
        font-size: 11px;
    }

    .cab-cta text {
        transform: translateY(0.9px);
    }

    .cab-tokens {
        font-size: 16px;
    }

    .cabinet.playing .cab-hi {
        display: none;
    }
}

.cabinet {
    position: relative;
    display: block;
    color: inherit;
    text-decoration: none;
}

.marquee {
    display: grid;
    place-items: center;
    min-height: 66px;
    padding: 8px 12px;
    text-align: center;
    border-radius: 16px;
    background: radial-gradient(120% 150% at 50% 0%, rgba(255, 255, 255, 0.12), transparent 60%), #0d0b1e;
    box-shadow: inset 0 0 0 1px var(--neon-soft), inset 0 0 22px var(--neon-soft);
}

.marquee span {
    color: #ffffff;
    font: 700 31px/1 var(--font);
    letter-spacing: 0.02em;
    text-shadow: 0 0 2px #ffffff, 0 0 9px var(--neon), 0 0 20px var(--neon), 0 0 38px var(--neon);
}

.screen {
    padding: 10px;
    border-radius: 18px;
    background: #0f0d1d;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), inset 0 10px 20px rgba(0, 0, 0, 0.6);
}

.stage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
    pointer-events: none;
}

.deck {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 22px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(8, 6, 20, 0.5), rgba(8, 6, 20, 0.72));
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.09), 0 6px 0 rgba(0, 0, 0, 0.35);
}

.coin {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #0d0b1e;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.slot {
    width: 10px;
    height: 28px;
    flex: none;
    border-radius: 4px;
    background: #05040b;
    box-shadow: 0 0 0 2px var(--orange), 0 0 14px rgba(251, 146, 60, 0.65);
}

.cabinet.big .coin {
    position: relative;
}

.slot.hit {
    animation: slot-hit 0.6s ease-out;
}

@keyframes slot-hit {
    30% {
        background: #7a4a10;
        box-shadow: 0 0 0 2px var(--yellow), 0 0 24px rgba(253, 224, 71, 0.95);
    }
}

.coin-chute {
    position: absolute;
    z-index: 2;
    width: 30px;
    height: 64px;
    overflow: hidden;
    pointer-events: none;
}

.coin-drop {
    position: absolute;
    top: 0;
    left: 2px;
    width: 26px;
    height: 26px;
    animation: coin-fall 0.6s cubic-bezier(0.55, 0, 0.9, 0.45) forwards;
}

.coin-drop::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #fff3b0 0%, #fbbf24 45%, #b45309 100%);
    box-shadow: inset 0 0 0 2px #b45309, inset 0 0 0 5px rgba(255, 243, 176, 0.5);
    animation: coin-turn 0.32s 0.06s ease-in-out forwards;
}

@keyframes coin-turn {
    to {
        transform: scaleX(0.28);
    }
}

@keyframes coin-fall {
    0% {
        transform: translateY(-4px);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    100% {
        transform: translateY(70px);
        opacity: 1;
    }
}

.tv {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    overflow: hidden;
    border-radius: 18px;
    pointer-events: none;
}

.tv.on {
    display: block;
    animation: tv-dark 1s ease-out forwards;
}

.tv.on::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    background: #e0fbff;
    box-shadow: 0 0 22px #e0fbff, 0 0 44px var(--cyan);
    animation: tv-line 1s ease-out forwards;
}

@keyframes tv-dark {
    0%,
    45% {
        background: #000000;
    }
    100% {
        background: transparent;
    }
}

@keyframes tv-line {
    0% {
        transform: scaleX(0);
    }
    28% {
        top: 50%;
        height: 4px;
        margin-top: -2px;
        transform: scaleX(1);
        opacity: 1;
    }
    50% {
        top: 0;
        height: 100%;
        margin-top: 0;
        transform: scaleX(1);
        opacity: 0.85;
    }
    100% {
        top: 0;
        height: 100%;
        margin-top: 0;
        transform: scaleX(1);
        opacity: 0;
    }
}

.arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.cabinet.big {
    container: cabinet / inline-size;
    order: -1;
    display: flex;
    flex-direction: column;
    width: min(100%, 620px);
    gap: 8px;
    padding: 12px 12px 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0.3)), var(--paint);
    border-radius: 24px 24px 12px 12px;
    box-shadow: 0 0 0 2px var(--neon), 0 0 22px var(--neon-soft), 0 26px 50px -26px var(--neon-soft), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.cabinet.big .marquee {
    min-height: 48px;
    padding: 4px 12px;
    border-radius: 12px;
}

.cabinet.big .marquee span {
    font-size: 34px;
}

.cabinet.big .screen {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.cabinet.big .hud {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-around;
    gap: 4px 18px;
    padding: 5px 14px 6px;
    border-radius: 10px;
}

.cabinet.big .stat {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    min-width: max-content;
}

.cabinet.big .stat .label {
    font: 400 17px/1 var(--pixel);
    letter-spacing: 0.08em;
}

.cabinet.big .stat strong {
    font: 400 31px/1 var(--pixel);
    letter-spacing: 0.02em;
}

.cabinet.big .hearts {
    margin-top: 3px;
}

.cabinet.big .deck.controls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 16px;
    padding: 8px 16px;
}

.cabinet.big .coin-door {
    display: flex;
    justify-content: center;
}

.cabinet.big .coin {
    gap: 16px;
    min-height: 0;
    padding: 9px 20px;
    background: #07060f;
    box-shadow: inset 0 0 0 1.5px rgba(251, 146, 60, 0.55), inset 0 3px 8px rgba(0, 0, 0, 0.7);
}

.credits {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 30px;
    padding: 0 11px;
    border-radius: 8px;
    background: #040208;
    box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.4), inset 0 2px 6px rgba(0, 0, 0, 0.85);
}

.credits span {
    color: rgba(254, 215, 170, 0.75);
    font: 400 17px/1 var(--pixel);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.credits strong {
    min-width: 3.6ch;
    color: #fed7aa;
    font: 400 27px/1 var(--pixel);
    text-align: center;
    text-shadow: 0 0 6px rgba(251, 146, 60, 0.9), 0 0 14px rgba(251, 146, 60, 0.5);
}

.wall {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(100%, 340px);
}

.wall-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}

.wall.right .wall-top {
    justify-content: flex-end;
}

.game-bar {
    display: none;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    color: #f5d0fe;
    background: rgba(7, 6, 15, 0.85);
    box-shadow: inset 0 0 0 2px #e879f9, 0 0 14px rgba(232, 121, 249, 0.35);
    font: 700 16px/1 var(--font);
    text-decoration: none;
    white-space: nowrap;
}

.back:hover {
    color: #ffffff;
    box-shadow: inset 0 0 0 2px #f5b8ff, 0 0 22px rgba(232, 121, 249, 0.6);
}

.wall .player {
    width: 100%;
}

.wall .scores {
    padding: 16px 18px 18px;
    border-radius: 14px;
    box-shadow: inset 0 0 0 2px #fde047, 0 0 20px rgba(253, 224, 71, 0.3), inset 0 0 22px rgba(253, 224, 71, 0.1);
}

.wall .scores h2 {
    color: #fef9c3;
    text-shadow: 0 0 2px #ffffff, 0 0 9px var(--yellow), 0 0 22px var(--yellow);
}

.wall .scores li:nth-child(1) span {
    color: #fde047;
}

.wall .scores li:nth-child(2) span {
    color: #e2e8f0;
}

.wall .scores li:nth-child(3) span {
    color: #fdba74;
}

.hud {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #07060f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.stat {
    min-width: 0;
}

.stat .label {
    display: block;
    color: var(--faint);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.stat strong {
    display: block;
    color: #ffffff;
    font: 700 25px/1.15 var(--font);
    white-space: nowrap;
}

.stat.score strong {
    color: #e0fbff;
    text-shadow: 0 0 8px var(--cyan);
}

.stat.combo strong {
    color: #ffe4f3;
    text-shadow: 0 0 8px var(--pink);
}

.stat.bump strong {
    animation: glow 0.45s ease;
}

.stat.time strong {
    min-width: 2ch;
    text-align: center;
}

.stat.time.low strong {
    color: #fecaca;
    text-shadow: 0 0 8px #ef4444;
    animation: time-low 0.5s ease-in-out infinite alternate;
}

@keyframes time-low {
    to {
        opacity: 0.55;
    }
}

@keyframes glow {
    40% {
        text-shadow: 0 0 6px #ffffff, 0 0 18px var(--pink), 0 0 32px var(--pink);
    }
}

.hearts {
    display: flex;
    gap: 4px;
    margin-top: 5px;
}

.hearts svg {
    width: 21px;
    height: 21px;
    fill: var(--pink);
    filter: drop-shadow(0 0 6px rgba(255, 79, 163, 0.7));
}

.hearts svg.lost {
    fill: #2f2a5c;
    filter: none;
}

.hearts.many {
    gap: 2px;
}

.hearts.many svg {
    width: 15px;
    height: 15px;
}

.cabinet.big .screen {
    padding: 12px;
}

.stage {
    container: stage / size;
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 18px;
    touch-action: none;
    user-select: none;
}

.stage canvas {
    display: block;
    border-radius: 18px;
}

.overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: clamp(6px, 3cqmin, 18px);
    border-radius: 18px;
    background: rgba(7, 6, 15, 0.7);
    backdrop-filter: blur(3px);
}

.sheet {
    width: min(100%, 400px);
    padding: clamp(10px, 4.5cqmin, 24px) clamp(10px, 4cqmin, 22px);
    text-align: center;
    background: rgba(13, 11, 30, 0.95);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--neon-soft), 0 0 26px var(--neon-soft);
}

.sheet.small {
    width: min(100%, 320px);
    padding: clamp(10px, 3cqmin, 16px) clamp(12px, 3.5cqmin, 18px);
}

.sheet > :first-child {
    margin-top: 0 !important;
}

.sheet h2 {
    color: #ffffff;
    font: 700 clamp(18px, 7cqmin, 36px)/1.1 var(--font);
    text-shadow: 0 0 6px var(--neon), 0 0 18px var(--neon);
}

.sheet p {
    margin-top: clamp(4px, 1.6cqmin, 10px);
    color: var(--muted);
}

.sheet .btn {
    min-height: clamp(34px, 10cqmin, 50px);
    padding: 0 clamp(12px, 4cqmin, 28px);
    font-size: clamp(14px, 3.6cqmin, 19px);
}

.field {
    display: block;
    margin-top: clamp(10px, 3.2cqmin, 18px);
    text-align: left;
}

.field span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.field input {
    width: 100%;
    min-height: clamp(36px, 8.5cqmin, 46px);
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    color: var(--text);
    font: 700 17px/1 var(--font);
    background: #07060f;
    box-shadow: inset 0 0 0 1px #3b3470;
}

.field input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--cyan), 0 0 14px rgba(34, 211, 238, 0.35);
}

.error {
    color: #ffd0e6 !important;
    font-weight: 700;
}

.actions {
    margin-top: clamp(8px, 3.6cqmin, 20px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(6px, 2cqmin, 12px);
}

.big-score {
    margin-top: 6px !important;
    color: #e0fbff !important;
    font: 400 clamp(30px, 15cqmin, 80px)/1 var(--pixel);
    text-shadow: 0 0 10px var(--cyan), 0 0 26px var(--cyan);
}

.gain {
    margin-top: 4px !important;
    color: #fef9c3 !important;
    font-size: clamp(14px, 3.8cqmin, 21px);
    font-weight: 700;
    text-shadow: 0 0 8px var(--yellow);
}

.count {
    color: #e0fbff;
    font: 400 clamp(80px, 36cqmin, 190px)/1 var(--pixel);
    text-shadow: 0 0 12px var(--cyan), 0 0 36px var(--cyan);
    animation: count-tick 1s ease-out forwards;
}

@keyframes count-tick {
    0% {
        opacity: 0;
        transform: scale(1.8);
    }
    22% {
        opacity: 1;
        transform: scale(0.94);
    }
    34% {
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.55);
    }
}

.count.go {
    color: #fef9c3;
    text-shadow: 0 0 12px var(--yellow), 0 0 36px var(--yellow);
    animation: go-pop 0.75s ease-out forwards;
}

.overlay.going {
    overflow: hidden;
    pointer-events: none;
    animation: veil-lift 0.3s ease-out forwards;
}

@keyframes go-pop {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    20% {
        opacity: 1;
        transform: scale(1.15);
    }
    34% {
        transform: scale(1);
    }
    60% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0;
        transform: scale(2.3);
    }
}

@keyframes veil-lift {
    to {
        background: rgba(7, 6, 15, 0);
        backdrop-filter: blur(0);
    }
}

.net {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 3;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 700;
    background: rgba(255, 79, 163, 0.9);
}

.deck.controls {
    justify-content: center;
    padding: 14px;
}

.pad {
    display: grid;
    grid-template-columns: repeat(3, 70px);
    grid-template-rows: repeat(2, 58px);
    gap: 10px;
}

.pad button {
    position: relative;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 16px;
    color: var(--cyan);
    background: radial-gradient(120% 120% at 50% 0%, #4b437f, #2a2552);
    box-shadow: 0 5px 0 #0b0919, inset 0 1px 0 rgba(255, 255, 255, 0.16);
    cursor: var(--cursor-hand);
    touch-action: none;
}

.pad button:active,
.pad button.pressed {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #0b0919, 0 0 18px rgba(34, 211, 238, 0.6);
}

.pad svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.7));
}

.pad .key {
    position: absolute;
    right: 6px;
    bottom: 4px;
    color: rgba(165, 243, 252, 0.8);
    font: 400 16px/1 var(--pixel);
    text-transform: uppercase;
    pointer-events: none;
}

.pad .pad-bomb .key {
    right: 0;
    bottom: 9px;
    left: 0;
    color: rgba(255, 247, 237, 0.92);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-align: center;
}

.pad-up {
    grid-column: 2;
    grid-row: 1;
}

.pad-left {
    grid-column: 1;
    grid-row: 2;
}

.pad-left svg {
    transform: rotate(-90deg);
}

.pad-down {
    grid-column: 2;
    grid-row: 2;
}

.pad-down svg {
    transform: rotate(180deg);
}

.pad-right {
    grid-column: 3;
    grid-row: 2;
}

.pad-right svg {
    transform: rotate(90deg);
}

.pad.two {
    grid-template-columns: repeat(2, 110px);
    grid-template-rows: 64px;
}

.cabinet.big .pad.two {
    grid-template-columns: repeat(2, 110px);
    grid-template-rows: 64px;
}

.pad.two .pad-left,
.pad.two .pad-right {
    grid-row: 1;
}

.pad.two .pad-left {
    grid-column: 1;
}

.pad.two .pad-right {
    grid-column: 2;
}

.cabinet.big .deck.controls.round-deck {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: 12px 16px;
}

.pad.round {
    display: contents;
}

.pad.round .arrows {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    grid-template-rows: repeat(2, 54px);
    gap: 8px;
}

@container cabinet (min-width: 500px) {
    .cabinet.big .deck.controls.round-deck {
        grid-template-columns: 1fr auto 1fr;
        justify-content: normal;
    }

    .pad.round .arrows {
        grid-template-columns: repeat(3, 52px);
        grid-template-rows: repeat(2, 38px);
        gap: 6px;
        justify-self: center;
    }

    .pad.round .arrows svg {
        width: 22px;
        height: 22px;
    }
}

.pad .pad-bomb,
.pad .pad-press {
    position: relative;
    align-self: center;
    justify-self: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 28%, #ffb08a, #f0532a 48%, #9a1f0b);
    box-shadow: 0 6px 0 #4a0f05, inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 0 22px rgba(251, 146, 60, 0.45);
}

.pad .pad-bomb:active,
.pad .pad-bomb.pressed {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #4a0f05, inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 0 28px rgba(251, 146, 60, 0.85);
}

.cabinet.big .pad .pad-bomb svg {
    width: 38px;
    height: 38px;
    fill: #170d24;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.35));
    transform: translateY(-7px);
}

.pad .pad-press {
    background: radial-gradient(circle at 50% 28%, #fff7c2, #facc15 48%, #a16207);
    box-shadow: 0 6px 0 #4d3304, inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 0 22px rgba(253, 224, 71, 0.45);
}

.pad .pad-press:active,
.pad .pad-press.pressed {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #4d3304, inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 0 30px rgba(253, 224, 71, 0.9);
}

.cabinet.big .pad .pad-press svg {
    width: 36px;
    height: 36px;
    fill: #1d1405;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.4));
    transform: translateY(-7px);
}

.pad-press .base {
    fill: #3b2a08;
}

.pad-press .shine {
    fill: rgba(255, 255, 255, 0.55);
}

.pad .pad-press .key {
    right: 0;
    bottom: 9px;
    left: 0;
    color: #2b1d03;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-align: center;
}

.pad.digits {
    grid-template-columns: repeat(4, 64px);
    grid-template-rows: repeat(2, 52px);
}

.cabinet.big .pad.digits {
    grid-template-columns: repeat(4, 64px);
    grid-template-rows: repeat(2, 48px);
    gap: 8px;
}

.pad .pad-digit {
    color: #e0fbff;
    font: 400 34px/1 var(--pixel);
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.8);
}

.pad .pad-digit:disabled {
    color: rgba(167, 160, 214, 0.35);
    text-shadow: none;
    background: #1d1938;
    box-shadow: 0 5px 0 #0b0919, inset 0 1px 0 rgba(255, 255, 255, 0.05);
    cursor: var(--cursor);
}

.pad-bomb .fuse {
    stroke: #fde68a;
}

.pad-bomb .shine {
    fill: rgba(255, 255, 255, 0.42);
}

.bomb-count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 14px;
    color: #fde68a;
    font: 400 24px/28px var(--pixel);
    text-align: center;
    background: #0b0918;
    box-shadow: 0 0 0 2px #fb923c, 0 0 10px rgba(251, 146, 60, 0.6);
    pointer-events: none;
}

.door-icon {
    display: block;
    margin-top: 3px;
}

.door-icon svg {
    display: block;
    width: 27px;
    height: 27px;
    fill: #2f2a5c;
}

.door-icon .door-wood {
    fill: #221d47;
}

.door-icon .door-knob {
    fill: #3b3570;
}

.stat.door.found .door-icon svg {
    fill: #fdba74;
    filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.85));
}

.stat.door.found .door-wood {
    fill: #c2410c;
}

.stat.door.found .door-knob {
    fill: #fde047;
}

.stat.door.bump .door-icon svg {
    animation: door-glow 0.7s ease;
}

@keyframes door-glow {
    40% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 16px #fb923c);
    }
}

.sheet .level-bonus {
    margin-top: 6px;
    color: #fef08a;
    font: 400 clamp(34px, 12cqmin, 64px)/1 var(--pixel);
    text-shadow: 0 0 10px var(--yellow), 0 0 24px var(--yellow);
}

@media (hover: none) and (pointer: coarse) {
    .pad .key {
        display: none;
    }

    .cabinet.big .pad .pad-bomb svg {
        transform: none;
    }
}

.scores {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 16px;
    border-radius: 12px;
    background: #07060f;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.scores h2 {
    margin: 0;
    color: #ffffff;
    font: 400 36px/1 var(--pixel);
    letter-spacing: 0.02em;
    text-align: center;
    text-shadow: 0 0 2px #ffffff, 0 0 9px var(--neon), 0 0 20px var(--neon);
}

.scores ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.scores li {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: baseline;
    font: 400 25px/1.05 var(--pixel);
    letter-spacing: 0.02em;
}

.scores .place {
    color: var(--faint);
    text-align: left;
}

.scores .who {
    overflow: hidden;
    color: var(--text);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.scores .pts {
    color: #e0fbff;
}

.scores li.me span {
    color: #fef9c3;
    text-shadow: 0 0 6px var(--yellow);
}

.scores li.gap,
.scores li.empty {
    display: block;
    color: var(--faint);
    text-align: center;
}

@media (max-width: 979px) {
    .arena {
        --fit: max(260px, calc(100dvh - 290px));
        gap: 14px;
    }

    .game-bar {
        order: -2;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
        width: min(100%, 620px);
    }

    .game-bar .back {
        gap: 6px;
    }

    .game-bar .sound-toggle {
        margin-left: auto;
    }

    .game-bar .watching-bar {
        order: 1;
        flex: 1 1 100%;
    }

    .cabinet.big .stage {
        width: min(100%, var(--fit));
        margin: 0 auto;
    }

    .cabinet.big .deck.controls {
        flex-direction: column;
        gap: 12px;
    }

    .wall.left,
    .wall.right {
        display: contents;
    }

    .wall.left .wall-top,
    .wall.right .wall-top .sound-toggle {
        display: none;
    }

    .wall.left .scores {
        width: min(100%, 340px);
    }

    .wall.right .chat {
        order: -1;
        width: min(100%, 620px);
        margin-top: 0;
    }

    .wall.right .wall-top {
        order: 1;
    }

    .wall.right .wall-top,
    .wall.right .player {
        width: min(100%, 340px);
    }
}

@media (min-width: 980px) {
    .arena {
        --wall: clamp(240px, 19vw, 370px);
        --board: max(300px, min(760px, calc(100vh - 358px), calc(100vw - 2 * var(--wall) - 190px)));
        --cabinet: max(calc(var(--board) + 40px), min(660px, calc(100vw - 2 * var(--wall) - 150px)));
        display: grid;
        grid-template-columns: var(--wall) auto var(--wall);
        justify-content: center;
        align-items: start;
        gap: 36px;
    }

    .cabinet.big {
        order: 0;
        width: var(--cabinet);
    }

    .cabinet.big .stage {
        width: min(100%, var(--board));
        margin: 0 auto;
    }

    .pad.round .arrows {
        grid-template-columns: repeat(3, 52px);
        grid-template-rows: repeat(2, 38px);
        gap: 6px;
    }

    .wall {
        width: 100%;
        gap: 0;
    }

    .wall.right {
        align-self: stretch;
    }

    .wall.right .chat {
        flex: 1 1 auto;
    }

    .wall.right .messages-scroll {
        flex: 1 1 0;
        height: auto;
        min-height: 220px;
        contain: size;
    }

    .wall-top {
        min-height: 68px;
    }

    .wall .player-card {
        transform: rotate(2deg);
    }

    .cabinet.big .pad {
        grid-template-columns: repeat(3, 52px);
        grid-template-rows: repeat(2, 38px);
        gap: 6px;
    }

    .cabinet.big .pad svg {
        width: 22px;
        height: 22px;
    }

    .cabinet.big .pad.two {
        grid-template-columns: repeat(2, 84px);
        grid-template-rows: 44px;
        gap: 10px;
    }

}

@media (max-width: 560px) {
    .page {
        padding: 22px 14px 48px;
    }

    .page.game {
        padding: 8px 8px 32px;
    }

    .arena {
        --fit: max(240px, calc(100dvh - 270px));
    }

    .neon-sign {
        padding: 12px 20px 16px;
    }

    .game-bar .back {
        min-height: 36px;
        padding: 0 13px;
        font-size: 15px;
    }

    .cabinet.big {
        gap: 6px;
        padding: 8px 8px 10px;
        border-radius: 18px 18px 10px 10px;
    }

    .cabinet.big .marquee {
        min-height: 40px;
    }

    .cabinet.big .marquee span {
        font-size: 26px;
    }

    .stat strong {
        font-size: 21px;
    }

    .cabinet.big .screen {
        gap: 4px;
        padding: 6px;
    }

    .cabinet.big .hud {
        gap: 2px 8px;
        padding: 4px 6px;
    }

    .cabinet.big .stat .label {
        font-size: 13px;
        letter-spacing: 0.05em;
    }

    .cabinet.big .stat strong {
        font-size: 22px;
    }

    .cabinet.big .deck.controls {
        padding: 8px 10px;
    }

    .pad {
        grid-template-columns: repeat(3, 74px);
        grid-template-rows: repeat(2, 56px);
    }

    .cabinet.big .coin {
        gap: 12px;
        padding: 5px 14px;
    }

    .cabinet.big .slot {
        height: 22px;
    }

    .cabinet.big .credits {
        height: 26px;
    }

    .cabinet.big .credits span {
        font-size: 15px;
    }

    .cabinet.big .credits strong {
        font-size: 23px;
    }

}

@media (hover: none) and (pointer: coarse) and (min-width: 561px) {
    .cabinet.big .pad,
    .cabinet.big .pad.round .arrows {
        grid-template-columns: repeat(3, 66px);
        grid-template-rows: repeat(2, 54px);
        gap: 8px;
    }

    .cabinet.big .pad svg {
        width: 26px;
        height: 26px;
    }
}

@media (orientation: landscape) and (max-height: 520px) and (pointer: coarse) {
    .page.game {
        padding: 6px 10px 24px;
    }

    .arena {
        --fit: min(calc(100dvh - 28px), calc(100vw - 460px));
        display: grid;
        grid-template-columns: auto auto;
        justify-content: center;
        align-items: start;
        gap: 12px 10px;
    }

    .arena > *,
    .wall.left > *,
    .wall.right > * {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .wall.left,
    .wall.right {
        display: contents;
    }

    .wall.left .wall-top,
    .wall.right .wall-top .sound-toggle {
        display: none;
    }

    .game-bar {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-self: stretch;
        width: auto;
        padding: 4px 0;
    }

    .game-bar .back {
        justify-content: center;
        width: 44px;
        min-height: 44px;
        padding: 0;
        font-size: 26px;
    }

    .game-bar .back-text,
    .game-bar .watching-bar strong {
        display: none;
    }

    .game-bar .sound-toggle {
        margin-left: 0;
    }

    .game-bar .watching-bar {
        order: 0;
        flex: none;
    }

    .cabinet.big {
        container-type: normal;
        grid-column: 2;
        grid-row: 1;
        display: grid;
        grid-template-columns: auto var(--fit) 156px;
        grid-template-rows: auto 1fr auto;
        grid-template-areas: "left board hud" "left board action" "left board coins";
        align-items: center;
        gap: 6px 14px;
        width: auto;
        height: calc(100dvh - 12px);
        padding: 6px 12px;
        border-radius: 18px;
    }

    .cabinet.big .marquee {
        display: none;
    }

    .cabinet.big .screen {
        display: contents;
    }

    .cabinet.big .stage {
        grid-area: board;
        width: var(--fit);
        margin: 0;
    }

    .cabinet.big .hud {
        grid-area: hud;
        align-self: start;
        justify-content: center;
        gap: 6px 10px;
        padding: 6px 8px;
    }

    .cabinet.big .stat .label {
        font-size: 13px;
        letter-spacing: 0.05em;
    }

    .cabinet.big .stat strong {
        font-size: 22px;
    }

    .cabinet.big .deck.controls {
        grid-area: left;
        padding: 6px;
    }

    .cabinet.big .deck.controls.round-deck,
    .cabinet.big .deck.controls.two-deck,
    .cabinet.big .two-deck .pad.two {
        display: contents;
    }

    .cabinet.big .pad {
        grid-template-columns: repeat(3, 50px);
        grid-template-rows: repeat(2, 46px);
        gap: 6px;
    }

    .cabinet.big .pad.round .arrows {
        grid-area: left;
        grid-template-columns: repeat(3, 50px);
        grid-template-rows: repeat(2, 46px);
        gap: 6px;
    }

    .cabinet.big .pad .pad-bomb,
    .cabinet.big .pad .pad-press {
        grid-area: action;
        width: 76px;
        height: 76px;
    }

    .cabinet.big .pad.two .pad-left,
    .cabinet.big .pad.two .pad-right {
        width: 96px;
        height: 76px;
    }

    .cabinet.big .pad.two .pad-left {
        grid-area: left;
    }

    .cabinet.big .pad.two .pad-right {
        grid-area: action;
    }

    .cabinet.big .pad.digits {
        grid-template-columns: repeat(2, 58px);
        grid-template-rows: repeat(4, 46px);
        gap: 6px;
    }

    .cabinet.big .coin-door {
        grid-area: coins;
    }

    .cabinet.big .coin {
        gap: 10px;
        padding: 4px 10px;
    }

    .cabinet.big .slot {
        height: 20px;
    }

    .cabinet.big .credits {
        height: 24px;
    }

    .cabinet.big .credits span {
        font-size: 14px;
    }

    .cabinet.big .credits strong {
        font-size: 21px;
    }
}

.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    flex: none;
    border-radius: 50%;
    background: #ff3b5c;
    box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.7), 0 0 10px rgba(255, 59, 92, 0.9);
    animation: live-pulse 1.6s ease-out infinite;
}

@keyframes live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.7), 0 0 10px rgba(255, 59, 92, 0.9);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 59, 92, 0), 0 0 10px rgba(255, 59, 92, 0.9);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 92, 0), 0 0 10px rgba(255, 59, 92, 0.9);
    }
}

.live-games {
    width: min(100%, 1180px);
    margin: 22px auto 46px;
    padding: 16px 18px 18px;
    border-radius: 14px;
    background: rgba(7, 6, 15, 0.82);
    box-shadow: inset 0 0 0 2px #ff6b8a, 0 0 22px rgba(255, 79, 139, 0.25), inset 0 0 22px rgba(255, 79, 139, 0.08);
}

.live-games h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: #ffe4ec;
    font: 400 30px/1 var(--pixel);
    letter-spacing: 0.02em;
    text-shadow: 0 0 2px #ffffff, 0 0 9px #ff4f8b, 0 0 20px #ff4f8b;
}

.live-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.live-list .empty {
    grid-column: 1 / -1;
    color: var(--faint);
    font: 400 22px/1.2 var(--pixel);
}

.live-game {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    background: #0b0918;
    box-shadow: inset 0 0 0 2px var(--neon), 0 0 14px var(--neon-soft);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.live-game:hover,
a.live-game:focus-visible {
    box-shadow: inset 0 0 0 2px var(--neon), 0 0 24px var(--neon-soft), inset 0 0 18px var(--neon-soft);
}

.live-game img {
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--neon);
}

.live-who {
    display: flex;
    flex-direction: column;
    min-width: 0;
    grid-row: 1 / 3;
}

.live-who strong {
    overflow: hidden;
    font: 700 16px/1.2 var(--font);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.live-title {
    color: var(--neon);
    font: 700 13px/1.3 var(--font);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.live-score {
    color: #fef9c3;
    font: 400 24px/1 var(--pixel);
    text-align: right;
}

.live-eye {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    color: var(--muted);
    font: 400 18px/1 var(--pixel);
}

.live-eye svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
    padding: 14px 14px 16px;
    border-radius: 14px;
    background: #07060f;
    box-shadow: inset 0 0 0 2px #22d3ee, 0 0 18px rgba(34, 211, 238, 0.25), inset 0 0 20px rgba(34, 211, 238, 0.08);
}

.chat-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.chat-head h2 {
    grid-column: 2;
}

.chat-people {
    position: relative;
    grid-column: 3;
    justify-self: end;
}

.chat-eye {
    padding: 5px 8px;
    border: 0;
    border-radius: 8px;
    color: #a5f3fc;
    background: transparent;
    cursor: var(--cursor-hand);
    transition: color 0.15s ease, filter 0.15s ease;
}

.chat-eye:hover,
.chat-eye[aria-expanded="true"] {
    color: #ffffff;
    filter: drop-shadow(0 0 3px #22d3ee) drop-shadow(0 0 8px rgba(34, 211, 238, 0.7));
}

.people {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 5;
    min-width: 170px;
    max-width: 240px;
    max-height: 260px;
    margin: 0;
    padding: 8px 12px;
    overflow-y: auto;
    border-radius: 10px;
    list-style: none;
    color: #a5f3fc;
    background: #0d0b1f;
    box-shadow: inset 0 0 0 1px #22d3ee, 0 10px 26px rgba(0, 0, 0, 0.6), 0 0 14px rgba(34, 211, 238, 0.25);
    font: 700 15px/1.6 var(--font);
    text-align: left;
    overflow-wrap: anywhere;
}

.people[hidden] {
    display: none;
}

.people .player {
    color: #fde047;
}

.chat h2 {
    margin: 0;
    color: #e0fbff;
    font: 400 30px/1 var(--pixel);
    letter-spacing: 0.02em;
    text-align: center;
    text-shadow: 0 0 2px #ffffff, 0 0 9px var(--cyan), 0 0 20px var(--cyan);
}

.messages-scroll {
    display: flex;
    flex-direction: column-reverse;
    height: min(440px, 60vh);
    overflow-y: auto;
    overflow-anchor: none;
    border-radius: 10px;
    background: #0d0b1f;
    box-shadow: inset 0 0 0 1px #2a2552;
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 auto;
    padding: 8px 10px;
    list-style: none;
}

.messages li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 8px;
    font: 400 15px/1.35 var(--font);
    overflow-wrap: anywhere;
}

.messages .who {
    color: #a5f3fc;
    font-weight: 700;
}

.messages .when {
    color: var(--faint);
    font: 400 17px/1 var(--pixel);
    white-space: nowrap;
}

.messages .text {
    grid-column: 1 / -1;
}

.messages .announce {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    color: var(--faint);
    font: italic 400 13px/1.35 var(--font);
    text-align: center;
}

.messages .announce::before,
.messages .announce::after {
    content: '';
    flex: 1 1 12px;
    min-width: 12px;
    height: 1px;
}

.messages .announce::before {
    background: linear-gradient(90deg, transparent, rgba(167, 160, 214, 0.45));
}

.messages .announce::after {
    background: linear-gradient(90deg, rgba(167, 160, 214, 0.45), transparent);
}

.messages .announce .note {
    flex: 0 1 auto;
    min-width: 0;
}

.messages .announce .who {
    color: #c4b5fd;
    font-style: normal;
}

.crown {
    width: 16px;
    height: 12px;
    margin-right: 5px;
    vertical-align: -1px;
    overflow: visible;
    filter: drop-shadow(0 0 3px rgba(253, 224, 71, 0.55));
}

.crown path {
    fill: #fde047;
    stroke: #b45309;
    stroke-width: 1.1;
    stroke-linejoin: round;
}

.crown .band {
    fill: none;
    stroke: #b45309;
    stroke-width: 1.3;
}

.messages .player .who {
    color: #fde047;
}

.say {
    display: flex;
    gap: 8px;
}

.say input {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    color: var(--text);
    font: 400 15px/1 var(--font);
    background: #0d0b1f;
    box-shadow: inset 0 0 0 1px #3b3470;
    user-select: text;
}

.say input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--cyan), 0 0 12px rgba(34, 211, 238, 0.35);
}

.say input:disabled {
    opacity: 0.55;
}

.say button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    color: #052029;
    font: 700 15px/1 var(--font);
    background: radial-gradient(120% 130% at 50% 0%, #b6f6ff 0%, #22d3ee 45%, #0891b2 100%);
    box-shadow: 0 3px 0 #0e5f74;
    cursor: var(--cursor-hand);
}

.say button:disabled {
    opacity: 0.45;
    cursor: var(--cursor);
}

.ended {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 3, 10, 0.78);
    backdrop-filter: blur(3px);
}

.ended[hidden] {
    display: none;
}

.ended-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    width: min(100%, 460px);
    padding: 30px 26px 28px;
    border-radius: 16px;
    background: #07060f;
    box-shadow: inset 0 0 0 2px #ff6b8a, 0 0 26px rgba(255, 79, 139, 0.35), inset 0 0 24px rgba(255, 79, 139, 0.08);
    text-align: center;
}

.ended-box h2 {
    margin: 0;
    color: #ffe4ec;
    font: 700 28px/1.2 var(--font);
    text-shadow: 0 0 2px #ffffff, 0 0 9px #ff4f8b, 0 0 20px #ff4f8b;
}

.watching-bar {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 96px;
    color: var(--muted);
    font: 700 16px/1.1 var(--font);
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.watching-bar strong {
    overflow: hidden;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.live-word {
    color: #ff6b8a;
    font: 400 20px/1 var(--pixel);
    letter-spacing: 0.08em;
}

.cabinet.big.watching .pad button {
    opacity: 0.45;
    cursor: var(--cursor);
    filter: saturate(0.6);
    pointer-events: none;
}

.cabinet.big.watching .pad button.pressed {
    opacity: 1;
    filter: none;
}

.cabinet.big.watching .pad .pad-digit.pressed {
    color: #e0fbff;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.8);
    background: radial-gradient(120% 120% at 50% 0%, #4b437f, #2a2552);
    box-shadow: 0 2px 0 #0b0919, 0 0 18px rgba(34, 211, 238, 0.6);
}

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

    .live-dot {
        animation: none;
    }

    .cab-playing,
    .stat.bump strong,
    .stat.time.low strong,
    .stat.door.bump .door-icon svg,
    .neon-sign,
    .slot.hit,
    .tv.on,
    .tv.on::before,
    .count,
    .count.go,
    .overlay.going {
        animation: none;
    }

    .tv.on,
    .coin-chute {
        display: none;
    }
}
.doors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
}

.doors .door {
    --door: #c084fc;
    --door-soft: rgba(192, 132, 252, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(7, 6, 15, 0.85);
    box-shadow: inset 0 0 0 2px var(--door), 0 0 16px var(--door-soft), inset 0 0 14px var(--door-soft);
    font: 700 19px/1 var(--font);
    text-decoration: none;
    text-shadow: 0 0 8px var(--door);
    white-space: nowrap;
}

.doors .door.shop {
    --door: #fde047;
    --door-soft: rgba(253, 224, 71, 0.4);
}

.doors .door:hover {
    box-shadow: inset 0 0 0 2px var(--door), 0 0 28px var(--door), inset 0 0 18px var(--door-soft);
}

@media (min-width: 1200px) {
    .hero .player {
        grid-row: 1 / span 2;
    }

    .hero .neon-sign {
        align-self: end;
    }

    .hero .doors {
        grid-column: 2;
        grid-row: 2;
        align-self: start;
    }
}

.page.unbox-page {
    max-width: 1500px;
}

.unbox {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
}

.unbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bar-end {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.back.bar-shop {
    color: #cffafe;
    box-shadow: inset 0 0 0 2px var(--cyan), 0 0 14px rgba(34, 211, 238, 0.35);
}

.back.bar-shop:hover {
    color: #ffffff;
    box-shadow: inset 0 0 0 2px #a5f3fc, 0 0 22px rgba(34, 211, 238, 0.6);
}

.unbox-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    overflow-x: clip;
    text-align: center;
}

.unbox-sign,
.shop-sign {
    padding: 10px 26px 14px;
    font-size: clamp(34px, 6vw, 58px);
}

.scene {
    --prize: #c084fc;
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 380px);
    aspect-ratio: 1;
}

.rays {
    position: absolute;
    inset: -10%;
    border-radius: 50%;
    background: repeating-conic-gradient(var(--prize) 0deg 9deg, transparent 9deg 22deg);
    -webkit-mask: radial-gradient(circle at 50% 42%, #000 0 26%, transparent 66%);
    mask: radial-gradient(circle at 50% 42%, #000 0 26%, transparent 66%);
    opacity: 0;
    scale: 0.6;
    transition: opacity 0.6s ease 0.2s, scale 0.8s ease 0.2s;
    animation: rays-spin 14s linear infinite;
    pointer-events: none;
}

.scene.opened .rays {
    opacity: 0.45;
    scale: 1;
}

.scene.rare .rays {
    --prize: #fde047;
    opacity: 0.8;
}

.chest {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    animation: chest-float 3.4s ease-in-out infinite;
    transition: filter 0.4s ease;
}

.chest.still {
    width: 70%;
    animation: none;
}

.chest > svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chest-floor {
    fill: rgba(0, 0, 0, 0.45);
}

.inside-glow {
    fill: var(--prize);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.chest-lid {
    transform-origin: 52% 40%;
}

.chest-seam {
    fill: none;
    stroke: #fde68a;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    filter: drop-shadow(0 0 6px #fde047) drop-shadow(0 0 16px #f59e0b);
}

.chest-item {
    position: absolute;
    left: 52%;
    top: 43%;
    display: grid;
    place-items: center;
    width: 38%;
    aspect-ratio: 1;
    font-size: clamp(54px, 12vw, 96px);
    line-height: 1;
    opacity: 0;
    transform: translate(-50%, 10%) scale(0.55);
    filter: drop-shadow(0 0 14px var(--prize)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
}

.chest-item img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: contain;
}

.chest-item .emoji-art {
    width: 80%;
    height: 80%;
    border-radius: 0;
}

.chest-item .swatch {
    width: 82%;
    height: 82%;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9), 0 0 36px var(--prize);
}

.chest-beams {
    position: absolute;
    left: 52%;
    top: 1%;
    width: 50%;
    height: 42%;
    background: linear-gradient(to top, var(--prize), transparent 92%);
    clip-path: polygon(30% 100%, 70% 100%, 100% 0, 0 0);
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
    transform-origin: 50% 100%;
    filter: blur(3px);
    pointer-events: none;
}

.chest-flash {
    position: absolute;
    left: 52%;
    top: 43%;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0.85) 18%, transparent 62%);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
    pointer-events: none;
}

.chest-sparks span {
    --dx: 0px;
    --dy: -120px;
    position: absolute;
    left: 52%;
    top: 43%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    background: var(--prize);
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    opacity: 0;
    pointer-events: none;
}

.scene.rare .chest-sparks span {
    background: #fde047;
}

.chest-sparks span:nth-child(1) { --dx: -130px; --dy: -90px; }
.chest-sparks span:nth-child(2) { --dx: 130px; --dy: -100px; }
.chest-sparks span:nth-child(3) { --dx: -80px; --dy: -150px; }
.chest-sparks span:nth-child(4) { --dx: 90px; --dy: -155px; }
.chest-sparks span:nth-child(5) { --dx: -150px; --dy: -20px; }
.chest-sparks span:nth-child(6) { --dx: 155px; --dy: -30px; }
.chest-sparks span:nth-child(7) { --dx: -20px; --dy: -175px; }
.chest-sparks span:nth-child(8) { --dx: 30px; --dy: -170px; }
.chest-sparks span:nth-child(9) { --dx: -110px; --dy: 40px; }
.chest-sparks span:nth-child(10) { --dx: 115px; --dy: 35px; }
.chest-sparks span:nth-child(11) { --dx: -55px; --dy: -120px; }
.chest-sparks span:nth-child(12) { --dx: 60px; --dy: -125px; }

.scene.shaking .chest {
    animation: chest-shake var(--shake, 2400ms) linear both;
}

.scene.shaking .chest-lid {
    animation: lid-jitter 0.13s linear infinite;
}

.scene.shaking .chest-seam,
.scene.shaking .inside-glow {
    animation: seam-glow var(--shake, 2400ms) ease-in both;
}

.scene.opened .chest {
    animation: chest-pop 0.5s ease-out both, chest-float 3.4s ease-in-out 0.5s infinite;
}

.scene.opened .chest-lid {
    animation: lid-fly 0.8s cubic-bezier(0.2, 0.7, 0.4, 1) both;
}

.scene.opened .inside-glow {
    opacity: 0.85;
}

.scene.opened .chest-flash {
    animation: chest-flash 0.6s ease-out both;
}

.scene.opened .chest-beams {
    animation: beams-in 0.7s ease-out 0.1s both;
}

.scene.opened .chest-item {
    animation: item-rise 1.1s cubic-bezier(0.18, 0.9, 0.3, 1.25) 0.2s both, item-bob 2.6s ease-in-out 1.3s infinite;
}

.scene.opened .chest-sparks span {
    animation: spark-fly 1s ease-out 0.15s both;
}

.scene.opened .chest-sparks span:nth-child(even) {
    animation-delay: 0.3s;
}

.stamp {
    position: absolute;
    left: 50%;
    top: 46%;
    z-index: 3;
    padding: 10px 18px 12px;
    border-radius: 12px;
    color: #fecaca;
    background: rgba(24, 4, 12, 0.88);
    box-shadow: inset 0 0 0 3px #ef4444, 0 0 26px rgba(239, 68, 68, 0.75);
    font: 400 clamp(34px, 9vw, 54px)/1 var(--pixel);
    letter-spacing: 0.06em;
    text-shadow: 0 0 10px #ef4444;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-8deg) scale(1.8);
    pointer-events: none;
}

.scene.expired .stamp {
    animation: stamp-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both, stamp-shake 0.4s ease-in-out 0.45s 2;
}

.scene.expired .chest {
    filter: grayscale(0.85) brightness(0.5);
    animation: chest-sad 0.7s ease-out both;
}

.scene.skipped .chest {
    animation: chest-vanish 0.6s cubic-bezier(0.5, 0, 0.75, 0) forwards;
}

.scene.skipped .rays {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.puff {
    position: absolute;
    left: 51.3%;
    top: 46%;
    width: 0;
    height: 0;
    pointer-events: none;
    z-index: 2;
}

.puff::before {
    content: '';
    position: absolute;
    left: -60px;
    top: -60px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(233, 213, 255, 0.85), rgba(192, 132, 252, 0.35) 45%, transparent 70%);
    opacity: 0;
    transform: scale(0.2);
}

.puff span {
    --dx: 0px;
    --dy: -100px;
    --puff: #c084fc;
    position: absolute;
    left: -5px;
    top: -5px;
    width: 10px;
    height: 10px;
    background: var(--puff);
    box-shadow: 0 0 8px var(--puff);
    opacity: 0;
}

.puff span:nth-child(3n) {
    --puff: #fde047;
    width: 7px;
    height: 7px;
}

.puff span:nth-child(3n + 1) {
    --puff: #f0abfc;
}

.puff span:nth-child(4n) {
    width: 13px;
    height: 13px;
}

.puff span:nth-child(1) { --dx: -150px; --dy: -60px; }
.puff span:nth-child(2) { --dx: 140px; --dy: -80px; }
.puff span:nth-child(3) { --dx: -90px; --dy: -150px; }
.puff span:nth-child(4) { --dx: 100px; --dy: -140px; }
.puff span:nth-child(5) { --dx: -170px; --dy: 20px; }
.puff span:nth-child(6) { --dx: 165px; --dy: 10px; }
.puff span:nth-child(7) { --dx: -30px; --dy: -175px; }
.puff span:nth-child(8) { --dx: 40px; --dy: -170px; }
.puff span:nth-child(9) { --dx: -130px; --dy: 90px; }
.puff span:nth-child(10) { --dx: 125px; --dy: 95px; }
.puff span:nth-child(11) { --dx: -60px; --dy: 120px; }
.puff span:nth-child(12) { --dx: 70px; --dy: 125px; }
.puff span:nth-child(13) { --dx: -115px; --dy: -115px; }
.puff span:nth-child(14) { --dx: 120px; --dy: -110px; }
.puff span:nth-child(15) { --dx: -175px; --dy: -25px; }
.puff span:nth-child(16) { --dx: 178px; --dy: -40px; }
.puff span:nth-child(17) { --dx: 5px; --dy: 150px; }
.puff span:nth-child(18) { --dx: -5px; --dy: -120px; }

.scene.skipped .puff::before {
    animation: puff-cloud 0.8s ease-out 0.42s both;
}

.scene.skipped .puff span {
    animation: puff-fly 1s cubic-bezier(0.15, 0.7, 0.3, 1) 0.45s forwards;
}

.scene.skipped .puff span:nth-child(even) {
    animation-duration: 1.2s;
}

.skip-banner {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 4%;
    text-align: center;
    pointer-events: none;
    visibility: hidden;
}

.scene.skipped .skip-banner {
    visibility: visible;
}

.skip-title {
    margin: 0;
    color: #fdf4ff;
    font: 400 clamp(34px, 9vw, 54px)/1.12 var(--pixel);
    letter-spacing: 0.05em;
    text-shadow: 0 0 3px #ffffff, 0 0 12px #e879f9, 0 0 28px #c026d3;
    text-transform: uppercase;
    clip-path: inset(0 100% 0 0);
}

.scene.skipped .skip-title {
    animation: skip-type 0.6s steps(12, end) 0.55s forwards, skip-flicker 0.36s steps(2, end) 1.2s 2;
}

.skip-line {
    margin: 0;
    padding: 4px 12px;
    border-radius: 8px;
    color: #f3e8ff;
    background: rgba(7, 6, 15, 0.72);
    font: 700 16px/1.35 var(--font);
    opacity: 0;
    transform: translateY(8px);
}

.scene.skipped .skip-line {
    animation: skip-line 0.35s ease-out 1.25s forwards;
}

.scene.skipped .skip-line + .skip-line {
    animation-delay: 1.5s;
}

.scene.leaving .chest {
    animation: chest-leave 0.38s ease-in forwards;
}

.scene.expired.leaving .stamp {
    animation: stamp-out 0.3s ease-in forwards;
}

.scene.leaving .rays,
.scene.leaving .chest-beams,
.scene.leaving .chest-flash,
.scene.leaving .chest-sparks {
    visibility: hidden;
}

.scene.arriving .chest {
    animation: chest-arrive 0.6s cubic-bezier(0.2, 1.35, 0.4, 1) both;
}

.prize-label.leaving {
    animation: label-out 0.3s ease-in forwards;
}

.prize-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 74px;
    margin-top: -6px;
}

.prize-label:not([hidden]) {
    animation: label-in 0.5s ease-out 1s both;
}

.prize-title {
    margin: 0;
    color: #ffffff;
    font: 700 26px/1.15 var(--font);
    text-shadow: 0 0 10px var(--prize-glow, #c084fc);
    overflow-wrap: anywhere;
}

.prize-detail {
    margin: 0;
    color: #ddd6fe;
    font: 400 18px/1.25 var(--font);
    overflow-wrap: anywhere;
}

.prize-who {
    margin: 0;
    color: #fde047;
    font-size: 15px;
}

.turn {
    min-height: 1.3em;
    margin: 0;
    color: #ffffff;
    font: 700 22px/1.3 var(--font);
}

.turn-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 56px;
}

.open-box {
    min-width: 190px;
    font-size: 20px;
    animation: open-pulse 1.1s ease-in-out infinite;
}

.countdown {
    color: #e0fbff;
    font: 400 36px/1 var(--pixel);
    text-shadow: 0 0 8px var(--cyan);
}

.countdown.low {
    color: #fecaca;
    text-shadow: 0 0 8px #ef4444;
}

.mine {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(192, 132, 252, 0.28);
    text-align: center;
}

.mine-text {
    margin: 0;
    color: var(--muted);
}

.mine-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mine-led {
    gap: 8px;
    min-height: 46px;
    padding: 4px 12px;
}

.mine-led .led-label {
    font-size: 16px;
}

.mine-led strong {
    min-width: 2ch;
    font-size: 28px;
}

.mine-row .btn {
    min-height: 46px;
    padding: 0 18px;
}

.unbox-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.unbox-panel {
    padding: 14px 16px 16px;
    border-radius: 14px;
    background: #07060f;
    box-shadow: inset 0 0 0 2px #c084fc, 0 0 18px rgba(192, 132, 252, 0.25), inset 0 0 20px rgba(192, 132, 252, 0.08);
}

.unbox-panel h2 {
    margin: 0 0 10px;
    color: #f3e8ff;
    font: 400 32px/1 var(--pixel);
    text-align: center;
    text-shadow: 0 0 2px #ffffff, 0 0 9px #c084fc, 0 0 20px #c084fc;
}

.queue,
.recent {
    display: grid;
    gap: 8px;
    max-height: 300px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.queue li {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: baseline;
    font: 400 23px/1.1 var(--pixel);
}

.queue .place {
    color: var(--faint);
}

.queue .who {
    overflow: hidden;
    color: var(--text);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.queue .boxes {
    color: #e9d5ff;
    font-size: 18px;
    white-space: nowrap;
}

.queue li.me .who {
    color: #fef9c3;
    text-shadow: 0 0 6px var(--yellow);
}

.recent li {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.35;
}

.recent li strong {
    color: var(--text);
}

.recent li:not(.empty) {
    display: grid;
    grid-template-areas: 'who when' 'what what';
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 10px;
    row-gap: 2px;
}

.recent li:not(.empty) + li {
    padding-top: 8px;
    border-top: 1px solid rgba(192, 132, 252, 0.16);
}

.recent .who {
    grid-area: who;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.recent .when {
    grid-area: when;
    color: var(--faint);
    font: 400 16px/1 var(--pixel);
    white-space: nowrap;
}

.recent .what {
    grid-area: what;
}

.queue li.empty,
.recent li.empty {
    display: block;
    color: var(--faint);
    font: 400 16px/1.3 var(--font);
    text-align: center;
}

.unbox .chat {
    margin-top: 0;
}

@media (min-width: 1100px) {
    .unbox {
        grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) minmax(280px, 340px);
        align-items: start;
    }

    .unbox-bar {
        grid-column: 1 / -1;
    }

    .unbox-side {
        grid-column: 1;
        grid-row: 2;
    }

    .unbox-stage {
        grid-column: 2;
        grid-row: 2;
    }

    .unbox .chat {
        grid-column: 3;
        grid-row: 2;
    }
}

@media (max-width: 560px) {
    .unbox {
        gap: 16px;
    }

    .unbox-bar .back-text {
        display: none;
    }

    .unbox-bar .back {
        padding: 0 14px;
        font-size: 15px;
    }

    .scene {
        width: min(100%, 300px);
    }

    .turn {
        font-size: 19px;
    }
}

.page.shop-page {
    max-width: 1240px;
}

.shop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.shop .unbox-bar {
    align-self: stretch;
}

.wallet {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.led {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 8px 16px;
    border-radius: 10px;
    background: #040208;
    box-shadow: inset 0 0 0 1.5px rgba(251, 146, 60, 0.55), inset 0 3px 8px rgba(0, 0, 0, 0.7), 0 0 14px rgba(251, 146, 60, 0.25);
}

.led-label {
    color: rgba(254, 215, 170, 0.75);
    font: 400 18px/1 var(--pixel);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.led strong {
    min-width: 2.5ch;
    color: #fed7aa;
    font: 400 32px/1 var(--pixel);
    text-align: center;
    text-shadow: 0 0 6px rgba(251, 146, 60, 0.9), 0 0 14px rgba(251, 146, 60, 0.5);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 22px;
    width: 100%;
}

.booth {
    --neon: #c084fc;
    --neon-soft: rgba(192, 132, 252, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 16px 18px 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 32%), #0b0918;
    box-shadow: inset 0 0 0 2px var(--neon), 0 0 22px var(--neon-soft), inset 0 0 26px var(--neon-soft);
    text-align: center;
}

.booth-color {
    --neon: #ff4fa3;
    --neon-soft: rgba(255, 79, 163, 0.35);
}

.booth-emoji {
    --neon: #fde047;
    --neon-soft: rgba(253, 224, 71, 0.3);
}

.booth-item {
    --neon: #22d3ee;
    --neon-soft: rgba(34, 211, 238, 0.3);
    grid-column: 1 / -1;
}

.booth-sign {
    align-self: stretch;
    min-height: 58px;
}

.booth-sign h2 {
    margin: 0;
    color: #ffffff;
    font: 700 25px/1.1 var(--font);
    text-shadow: 0 0 2px #ffffff, 0 0 9px var(--neon), 0 0 20px var(--neon);
}

.booth-screen {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 260px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: radial-gradient(circle at 50% 40%, #1b1645, #05040b 75%);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08), inset 0 10px 24px rgba(0, 0, 0, 0.7), 0 0 0 3px #05040b;
}

.booth-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
    pointer-events: none;
}

.booth-screen .chest {
    width: 74%;
}

.paint {
    width: 44%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--paint-color, #ff4fa3);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 0 34px var(--paint-color, #ff4fa3);
}

.name-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 88%;
    padding: 8px 14px;
    border-radius: 10px;
    color: #ffffff;
    background: #120f28;
    box-shadow: inset 0 0 0 1px #3b3470, 0 0 18px rgba(253, 224, 71, 0.25);
    font: 700 20px/1.2 var(--font);
}

.tag-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tag-emoji {
    flex: none;
    font-size: 26px;
}

.item-screen {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 14px;
}

.item-preview {
    width: 62%;
    height: 100%;
    max-height: 130px;
    border-radius: 12px;
    object-fit: contain;
}

.item-blank {
    display: grid;
    place-items: center;
    width: 84px;
    height: 104px;
    border-radius: 12px;
    color: #a5f3fc;
    background: #120f28;
    box-shadow: inset 0 0 0 2px #22d3ee, 0 0 18px rgba(34, 211, 238, 0.35);
    font: 400 64px/1 var(--pixel);
    text-shadow: 0 0 10px var(--cyan);
}

.item-blank[hidden],
.item-preview[hidden] {
    display: none;
}

.item-name {
    max-width: 100%;
    overflow: hidden;
    color: #e0fbff;
    font: 700 17px/1.2 var(--font);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ticket {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 24px;
    border-radius: 8px;
    color: #fde68a;
    background: #2a1f05;
    box-shadow: inset 0 0 0 1px rgba(253, 224, 71, 0.55);
    -webkit-mask: radial-gradient(circle 8px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 8px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
    mask: radial-gradient(circle 8px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 8px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
}

.ticket strong {
    color: #fde047;
    font: 400 34px/1 var(--pixel);
    text-shadow: 0 0 8px var(--yellow);
}

.ticket span {
    font-size: 15px;
}

.ticket-coin {
    width: 28px;
    height: 28px;
}

.booth .about {
    max-width: 36ch;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.buy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.booth .buy {
    margin-top: auto;
}

.buy .btn {
    min-height: 48px;
    padding: 0 24px;
}

.buy-btn {
    min-width: 170px;
    font: 400 27px/1 var(--pixel);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.buy input[type="text"],
.buy input[type="number"],
.buy textarea {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    color: var(--text);
    background: #120f28;
    box-shadow: inset 0 0 0 1px #3b3470;
    font: 400 16px/1.3 var(--font);
}

.buy textarea {
    resize: vertical;
}

.buy input:focus,
.buy textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--neon);
}

.booth-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: center;
    gap: 26px;
    width: 100%;
}

.booth-show {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.booth-item .buy {
    flex-direction: column;
    align-items: stretch;
    margin-top: 0;
}

.booth-item label,
.booth-item .shop-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.booth-item .buy-btn {
    align-self: center;
}

.pick {
    position: relative;
    text-align: left;
}

.pick-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 6px 7px 6px 14px;
    border: 0;
    border-radius: 12px;
    color: var(--text);
    background: linear-gradient(180deg, #19143f, #100d27);
    box-shadow: inset 0 0 0 1px #3b3470;
    font: 400 18px/1.3 var(--font);
    text-align: left;
    cursor: var(--cursor-hand);
    transition: box-shadow 0.2s ease;
}

.pick-button:hover {
    box-shadow: inset 0 0 0 1px var(--neon), 0 0 14px var(--neon-soft);
}

.pick-button:focus-visible,
.pick.open .pick-button {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--neon), 0 0 18px var(--neon-soft);
}

.pick.picked .pick-button {
    animation: pick-flash 0.55s ease-out;
}

.pick-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.caret {
    display: grid;
    flex: none;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: var(--neon);
    background: rgba(34, 211, 238, 0.08);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.4);
    transition: transform 0.38s cubic-bezier(0.3, 1.6, 0.5, 1), color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.caret svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 3px var(--neon));
}

.pick-button:hover .caret {
    background: rgba(34, 211, 238, 0.16);
    box-shadow: inset 0 0 0 1px var(--neon), 0 0 10px var(--neon-soft);
}

.pick.open .caret {
    color: #04141a;
    background: var(--neon);
    box-shadow: 0 0 14px var(--neon);
    transform: rotate(180deg);
}

.pick.open .caret svg {
    filter: none;
}

.pick-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    z-index: 30;
    padding: 8px;
    border-radius: 14px;
    background: #0b0918;
    box-shadow: inset 0 0 0 2px var(--neon), 0 0 26px var(--neon-soft), 0 22px 44px rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.97);
    transform-origin: 50% 0;
    transition: opacity 0.16s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}

.pick.open .pick-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.18s ease, transform 0.3s cubic-bezier(0.2, 1.3, 0.4, 1), visibility 0s;
}

.pick-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 18px;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--neon);
    border-left: 2px solid var(--neon);
    border-radius: 3px 0 0;
    background: #0b0918;
    transform: rotate(45deg);
}

.buy input.pick-search {
    min-height: 40px;
    margin-bottom: 6px;
    padding-left: 38px;
    background: #120f28 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367e8f9' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 20 20'/%3E%3C/svg%3E") no-repeat 12px 50% / 17px 17px;
}

.pick-list {
    display: grid;
    gap: 2px;
    max-height: 248px;
    margin: 0;
    padding: 0 2px 0 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
}

.pick-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    color: var(--text);
    font: 400 17px/1.25 var(--font);
    cursor: var(--cursor-hand);
}

.pick-list li[hidden] {
    display: none;
}

.pick-list li span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pick-list li.self {
    font-weight: 700;
}

.pick-list li.active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.14);
}

.pick-list li[aria-selected="true"] {
    color: #a5f3fc;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.8);
}

.pick-list li[aria-selected="true"]::after {
    content: '';
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px var(--neon);
}

.pick.open .pick-list li {
    animation: pick-in 0.3s ease both;
}

.pick.open .pick-list li:nth-child(2) { animation-delay: 0.03s; }
.pick.open .pick-list li:nth-child(3) { animation-delay: 0.06s; }
.pick.open .pick-list li:nth-child(4) { animation-delay: 0.09s; }
.pick.open .pick-list li:nth-child(5) { animation-delay: 0.12s; }
.pick.open .pick-list li:nth-child(6) { animation-delay: 0.15s; }
.pick.open .pick-list li:nth-child(7) { animation-delay: 0.18s; }
.pick.open .pick-list li:nth-child(n + 8) { animation-delay: 0.21s; }

.pick-empty {
    margin: 10px 0 6px;
    color: var(--faint);
    font-size: 15px;
    text-align: center;
}

.booth-item .upload {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 6px 14px 6px 6px;
    border-radius: 12px;
    color: var(--faint);
    background: #120f28;
    box-shadow: inset 0 0 0 1px #3b3470;
    text-align: left;
    cursor: var(--cursor-hand);
    transition: box-shadow 0.2s ease;
}

.booth-item .upload:hover {
    box-shadow: inset 0 0 0 1px var(--neon), 0 0 14px var(--neon-soft);
}

.booth-item .upload:focus-within {
    box-shadow: inset 0 0 0 2px var(--neon), 0 0 18px var(--neon-soft);
}

.upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-btn {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 8px;
    border-radius: 9px;
    color: #04141a;
    background: linear-gradient(180deg, #a5f3fc, #22d3ee);
    box-shadow: 0 3px 0 #0e7490, 0 0 16px var(--neon-soft);
    font: 400 22px/1 var(--pixel);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.upload-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.upload-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--faint);
    font-size: 15px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.upload-name.chosen {
    color: var(--text);
}

.stepper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stepper .step {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: var(--cyan);
    background: radial-gradient(120% 120% at 50% 0%, #4b437f, #2a2552);
    box-shadow: 0 4px 0 #0b0919, inset 0 1px 0 rgba(255, 255, 255, 0.16);
    font: 700 22px/1 var(--font);
    cursor: var(--cursor-hand);
}

.buy .stepper input[type="number"] {
    width: 74px;
    font: 400 26px/1 var(--pixel);
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.color-pick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.color-pick input[type="color"] {
    flex: none;
    width: 48px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    cursor: var(--cursor-hand);
}

.buy .color-pick input[type="text"] {
    width: 130px;
    font: 400 24px/1 var(--pixel);
    text-align: center;
    text-transform: lowercase;
}

.buy input.emoji-input {
    width: 110px;
    font-size: 26px;
    text-align: center;
}

.toasts {
    position: fixed;
    top: 14px;
    left: 50%;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(460px, calc(100vw - 24px));
    transform: translateX(-50%);
    pointer-events: none;
}

.toast {
    --tone: var(--cyan);
    --tone-soft: rgba(34, 211, 238, 0.35);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    padding: 11px 18px 11px 11px;
    border-radius: 14px;
    color: var(--text);
    background: rgba(11, 9, 24, 0.97);
    box-shadow: inset 0 0 0 2px var(--tone), 0 0 24px var(--tone-soft), 0 16px 34px rgba(0, 0, 0, 0.65);
    cursor: var(--cursor-hand);
    pointer-events: auto;
    animation: toast-in 0.55s cubic-bezier(0.2, 1.35, 0.4, 1) both;
}

.toast.bump {
    animation: toast-bump 0.4s ease;
}

.toast.leaving {
    animation: toast-out 0.4s ease-in both;
}

.toast-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font: 700 18px/1 var(--font);
}

.toast.good .toast-icon {
    color: #03200e;
    background: var(--green);
    box-shadow: 0 0 12px rgba(61, 245, 140, 0.6);
}

.toast.good .toast-icon::before {
    content: '✓';
}

.toast.bad .toast-icon {
    color: #2a0606;
    background: #f87171;
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.6);
}

.toast.bad .toast-icon::before {
    content: '!';
}

.toast.wait .toast-icon {
    width: 26px;
    height: 26px;
    margin: 2px;
    border: 3px solid rgba(255, 255, 255, 0.14);
    border-top-color: var(--tone);
    animation: toast-spin 0.8s linear infinite;
}

.toast-text {
    margin: 0;
    font: 400 17px/1.35 var(--font);
    text-align: left;
}

.go-hall {
    color: #e9d5ff;
    font-size: 15px;
    text-decoration: none;
}

.go-hall:hover {
    color: #ffffff;
    text-shadow: 0 0 8px #c084fc;
}

@media (max-width: 1099px) {
    .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .shop-grid,
    .booth-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

.seg-tabs {
    display: none;
    gap: 6px;
    padding: 5px;
    border-radius: 14px;
    background: #07060f;
    box-shadow: inset 0 0 0 1.5px #3b3470, 0 0 16px rgba(0, 0, 0, 0.5);
}

.seg-tabs button {
    --tab-neon: #c084fc;
    --tab-fill: rgba(192, 132, 252, 0.2);
    min-width: 0;
    min-height: 44px;
    padding: 0 6px;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    font: 400 22px/1 var(--pixel);
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: var(--cursor-hand);
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.seg-tabs button[aria-selected="true"] {
    color: #ffffff;
    background: var(--tab-fill);
    box-shadow: inset 0 0 0 1.5px var(--tab-neon), 0 0 14px var(--tab-fill);
    text-shadow: 0 0 8px var(--tab-neon);
}

.seg-tabs button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 1px;
}

.hall-tabs [data-tab="chat"],
.shop-tabs .tab-item {
    --tab-neon: #22d3ee;
    --tab-fill: rgba(34, 211, 238, 0.18);
}

.shop-tabs .tab-color {
    --tab-neon: #ff4fa3;
    --tab-fill: rgba(255, 79, 163, 0.2);
}

.shop-tabs .tab-emoji {
    --tab-neon: #fde047;
    --tab-fill: rgba(253, 224, 71, 0.16);
}

@media (max-width: 1099px) {
    .hall-tabs {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 0.9fr);
    }

    .unbox .unbox-panel h2,
    .unbox .chat-head h2 {
        display: none;
    }

    .unbox[data-tab="queue"] #hall-recent,
    .unbox[data-tab="recent"] #hall-queue,
    .unbox[data-tab="chat"] .unbox-side,
    .unbox:not([data-tab="chat"]) .chat {
        display: none;
    }

    .unbox-side {
        gap: 0;
    }
}

@media (min-width: 721px) and (max-width: 1099px) {
    .unbox {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
        grid-template-rows: auto auto minmax(0, 1fr);
        column-gap: 26px;
        align-items: start;
    }

    .unbox-bar {
        grid-column: 1 / -1;
    }

    .unbox-stage {
        grid-column: 1;
        grid-row: 2 / span 2;
    }

    .hall-tabs {
        grid-column: 2;
        grid-row: 2;
    }

    .unbox-side,
    .unbox .chat {
        grid-column: 2;
        grid-row: 3;
    }

    .shop-grid {
        gap: 16px;
        align-items: start;
    }

    .booth {
        gap: 10px;
        padding: 12px 14px 16px;
    }

    .booth-item {
        grid-column: auto;
    }

    .booth-item .booth-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .booth-sign {
        min-height: 48px;
    }

    .booth-sign h2 {
        font-size: 21px;
    }

    .booth-screen {
        max-width: 210px;
    }

    .booth .about {
        font-size: 14px;
    }

    .ticket strong {
        font-size: 28px;
    }
}

@media (max-width: 720px) {
    .shop-tabs {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.85fr);
        align-self: stretch;
    }

    .shop .booth {
        display: none;
    }

    .shop[data-tab="cutii"] .booth-box,
    .shop[data-tab="culoare"] .booth-color,
    .shop[data-tab="emoji"] .booth-emoji,
    .shop[data-tab="item"] .booth-item {
        display: flex;
    }
}

@keyframes chest-float {
    50% {
        transform: translateY(-7px);
    }
}

@keyframes pick-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@keyframes toast-in {
    0% {
        opacity: 0;
        transform: translateY(-130%) scale(0.96);
    }
    60% {
        opacity: 1;
        transform: translateY(8%) scale(1);
    }
    100% {
        opacity: 1;
        transform: none;
    }
}

@keyframes toast-bump {
    40% {
        transform: scale(1.04);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(-70%) scale(0.96);
    }
}

@keyframes toast-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pick-flash {
    0% {
        box-shadow: inset 0 0 0 2px var(--neon), 0 0 0 0 rgba(34, 211, 238, 0.5), 0 0 18px var(--neon-soft);
    }
    45% {
        box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 5px rgba(34, 211, 238, 0.3), 0 0 30px var(--neon);
    }
    100% {
        box-shadow: inset 0 0 0 2px var(--neon), 0 0 0 10px rgba(34, 211, 238, 0), 0 0 18px var(--neon-soft);
    }
}

@keyframes chest-shake {
    0% { transform: rotate(0) scale(1); }
    4% { transform: rotate(-1deg) translateX(-1px); }
    8% { transform: rotate(1deg) translateX(1px); }
    12% { transform: rotate(-1.5deg) translateX(-2px); }
    16% { transform: rotate(1.5deg) translateX(2px); }
    20% { transform: rotate(-2deg) translateX(-2px); }
    24% { transform: rotate(2deg) translateX(2px); }
    28% { transform: rotate(-2.5deg) translateX(-3px); }
    32% { transform: rotate(2.5deg) translateX(3px); }
    36% { transform: rotate(-3deg) translateX(-3px) scale(1.01); }
    40% { transform: rotate(3deg) translateX(3px) scale(1.01); }
    44% { transform: rotate(-3.5deg) translateX(-4px) scale(1.02); }
    48% { transform: rotate(3.5deg) translateX(4px) scale(1.02); }
    52% { transform: rotate(-4deg) translateX(-4px) scale(1.03); }
    56% { transform: rotate(4deg) translateX(4px) scale(1.03); }
    60% { transform: rotate(-5deg) translateX(-5px) scale(1.04); }
    64% { transform: rotate(5deg) translateX(5px) scale(1.04); }
    68% { transform: rotate(-6deg) translateX(-6px) scale(1.05); }
    72% { transform: rotate(6deg) translateX(6px) scale(1.05); }
    76% { transform: rotate(-7deg) translateX(-6px) scale(1.06); }
    80% { transform: rotate(7deg) translateX(6px) scale(1.06); }
    84% { transform: rotate(-8deg) translateX(-7px) scale(1.07); }
    88% { transform: rotate(8deg) translateX(7px) scale(1.07); }
    93% { transform: rotate(0) scale(1.1, 0.88) translateY(8px); }
    100% { transform: rotate(0) scale(1.12, 0.86) translateY(10px); }
}

@keyframes lid-jitter {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px) rotate(-1.5deg);
    }
}

@keyframes seam-glow {
    0% {
        opacity: 0;
    }
    40% {
        opacity: 0.2;
    }
    100% {
        opacity: 1;
    }
}

@keyframes chest-pop {
    0% {
        transform: scale(1.12, 0.86) translateY(10px);
    }
    45% {
        transform: scale(0.94, 1.08) translateY(-6px);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

@keyframes lid-fly {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0);
    }
    35% {
        opacity: 1;
        transform: translate(-14px, -80px) rotate(-16deg);
    }
    100% {
        opacity: 0;
        transform: translate(-70px, -210px) rotate(-48deg);
    }
}

@keyframes chest-flash {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.4);
    }
    25% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.6);
    }
}

@keyframes beams-in {
    from {
        opacity: 0;
        transform: translateX(-50%) scaleY(0);
    }
    to {
        opacity: 0.6;
        transform: translateX(-50%) scaleY(1);
    }
}

@keyframes item-rise {
    0% {
        opacity: 0;
        transform: translate(-50%, 30%) scale(0.5);
    }
    15% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -100%) scale(1);
    }
}

@keyframes item-bob {
    0%,
    100% {
        opacity: 1;
        transform: translate(-50%, -100%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -108%) scale(1.03);
    }
}

@keyframes spark-fly {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.4) rotate(0);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(1.3) rotate(180deg);
    }
}

@keyframes stamp-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-8deg) scale(1.8);
    }
    60% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-8deg) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-8deg) scale(1);
    }
}

@keyframes stamp-shake {
    0%,
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-8deg) scale(1);
    }
    25% {
        opacity: 1;
        transform: translate(-53%, -50%) rotate(-10deg) scale(1);
    }
    75% {
        opacity: 1;
        transform: translate(-47%, -50%) rotate(-6deg) scale(1);
    }
}

@keyframes chest-leave {
    from {
        opacity: 1;
        transform: none;
    }
    to {
        opacity: 0;
        transform: translateY(16px) scale(0.86);
    }
}

@keyframes chest-arrive {
    0% {
        opacity: 0;
        transform: translateY(-46px) scale(0.55);
    }
    60% {
        opacity: 1;
        transform: translateY(5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: none;
    }
}

@keyframes stamp-out {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-8deg) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-8deg) scale(0.85);
    }
}

@keyframes label-out {
    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@keyframes chest-vanish {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: none;
    }
    30% {
        opacity: 1;
        transform: scale(1.07) rotate(-3deg);
        filter: brightness(1.2);
    }
    100% {
        opacity: 0;
        transform: scale(0.08) rotate(10deg);
        filter: brightness(2.6);
    }
}

@keyframes puff-cloud {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }
    25% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(2.6);
    }
}

@keyframes puff-fly {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    65% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(0.25) rotate(90deg);
    }
}

@keyframes skip-type {
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes skip-flicker {
    50% {
        opacity: 0.25;
    }
}

@keyframes skip-line {
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes chest-sad {
    0% {
        transform: translateY(0) rotate(0);
    }
    35% {
        transform: translateY(8px) rotate(-3deg);
    }
    70% {
        transform: translateY(6px) rotate(2deg);
    }
    100% {
        transform: translateY(8px) rotate(0);
    }
}

@keyframes label-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rays-spin {
    to {
        rotate: 360deg;
    }
}

@keyframes open-pulse {
    50% {
        box-shadow: 0 5px 0 #0e5f74, 0 0 38px rgba(34, 211, 238, 0.95);
    }
}

@media (prefers-reduced-motion: reduce) {
    .chest,
    .rays,
    .open-box,
    .scene.shaking .chest,
    .scene.shaking .chest-lid,
    .scene.shaking .chest-seam,
    .scene.opened .chest,
    .scene.opened .chest-lid,
    .scene.opened .chest-item,
    .scene.opened .chest-flash,
    .scene.opened .chest-beams,
    .scene.opened .chest-sparks span,
    .prize-label:not([hidden]) {
        animation: none;
    }

    .scene.opened .chest-lid {
        opacity: 0;
    }

    .scene.opened .chest-item {
        opacity: 1;
        transform: translate(-50%, -100%);
    }

    .scene.expired .stamp,
    .scene.expired .chest,
    .pick.open .pick-list li,
    .pick.picked .pick-button,
    .toast,
    .toast.bump,
    .toast.wait .toast-icon,
    .sound-toggle.blocked,
    .sound-toggle.blocked::after {
        animation: none;
    }

    .toast.leaving {
        animation: none;
        opacity: 0;
    }

    .pick-menu,
    .pick.open .pick-menu,
    .caret {
        transition: none;
    }

    .scene.expired .stamp {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-8deg);
    }

    .scene.leaving .chest,
    .scene.expired.leaving .stamp,
    .scene.arriving .chest,
    .prize-label.leaving,
    .scene.skipped .chest,
    .scene.skipped .puff::before,
    .scene.skipped .puff span,
    .scene.skipped .skip-title,
    .scene.skipped .skip-line {
        animation: none;
    }

    .scene.skipped .chest {
        opacity: 0;
    }

    .scene.skipped .skip-title {
        clip-path: none;
    }

    .scene.skipped .skip-line {
        opacity: 1;
        transform: none;
    }
}
