.lobby-arrival-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    color: #fff7e8 !important;
    font-family: 'Nunito', sans-serif !important;
    background:
        radial-gradient(ellipse at 18% 12%, rgba(212, 146, 10, .2), transparent 42%),
        radial-gradient(ellipse at 88% 34%, rgba(194, 90, 26, .18), transparent 46%),
        radial-gradient(ellipse at 50% 110%, rgba(185, 133, 77, .16), transparent 52%),
        linear-gradient(145deg, #140d08 0%, #1f1409 52%, #140d08 100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
    isolation: isolate;
}

#lobby-arrival-overlay,
#lobby-arrival-overlay * {
    font-family: 'Nunito', sans-serif !important;
}

.lobby-arrival-overlay::before,
.lobby-arrival-overlay::after {
    position: absolute;
    z-index: -1;
    content: "";
    pointer-events: none;
}

.lobby-arrival-overlay::before {
    inset: -30%;
    opacity: .2;
    background-image:
        radial-gradient(circle, rgba(255, 220, 133, .9) 0 1px, transparent 1.6px),
        radial-gradient(circle, rgba(255, 255, 255, .65) 0 1px, transparent 1.6px);
    background-size: 71px 71px, 113px 113px;
    background-position: 0 0, 37px 23px;
    animation: lobbyArrivalDust 24s linear infinite;
    animation-delay: var(--arrival-phase, 0s);
}

.lobby-arrival-overlay::after {
    inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 26%, rgba(0, 0, 0, .35) 100%),
        linear-gradient(rgba(255, 220, 170, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 220, 170, .035) 1px, transparent 1px);
    background-size: auto, 44px 44px, 44px 44px;
}

.lobby-arrival-overlay.is-visible {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.lobby-arrival-overlay.is-exiting {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lobby-arrival-overlay.is-exiting.lobby-arrival-fast-exit {
    transition-duration: .12s;
}

html.lobby-arrival-active,
html.lobby-arrival-active body {
    overflow: hidden !important;
}

.lobby-arrival-content {
    width: min(100%, 430px);
    text-align: center;
    transform: translateY(12px) scale(.98);
    animation: lobbyArrivalContentIn .65s cubic-bezier(.2, .8, .2, 1) forwards;
    animation-delay: var(--arrival-phase, 0s);
}

.lobby-arrival-stage {
    position: relative;
    width: 210px;
    height: 210px;
    margin: 0 auto 22px;
    perspective: 700px;
}

.lobby-arrival-ring {
    position: absolute;
    inset: 20px;
    border: 1px solid rgba(255, 207, 92, .42);
    border-radius: 50%;
    box-shadow: 0 0 22px rgba(255, 184, 62, .1), inset 0 0 22px rgba(255, 184, 62, .06);
}

.lobby-arrival-ring-one {
    transform: rotateX(68deg) rotateZ(-20deg);
    animation: lobbyArrivalOrbit 5.5s linear infinite;
    animation-delay: var(--arrival-phase, 0s);
}

.lobby-arrival-ring-two {
    inset: 31px 10px;
    border-color: rgba(110, 212, 173, .3);
    transform: rotateX(68deg) rotateZ(38deg);
    animation: lobbyArrivalOrbitReverse 7s linear infinite;
    animation-delay: var(--arrival-phase, 0s);
}

.lobby-arrival-coin-wrap {
    position: absolute;
    inset: 34px;
    display: grid;
    place-items: center;
    animation: lobbyArrivalFloat 2.7s ease-in-out infinite;
    animation-delay: var(--arrival-phase, 0s);
}

.lobby-arrival-coin-glow {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: rgba(255, 181, 50, .22);
    filter: blur(18px);
    animation: lobbyArrivalGlow 2.7s ease-in-out infinite;
    animation-delay: var(--arrival-phase, 0s);
}

.lobby-arrival-coin {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 217, 120, .88);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 6px rgba(44, 27, 9, .72), 0 0 36px rgba(255, 183, 54, .5), 0 13px 25px rgba(0, 0, 0, .55);
    animation: lobbyArrivalCoinTurn 5.2s ease-in-out infinite;
    animation-delay: var(--arrival-phase, 0s);
    backface-visibility: hidden;
}

.lobby-arrival-card {
    position: absolute;
    z-index: -1;
    top: 64px;
    display: flex;
    width: 47px;
    height: 69px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    border: 2px solid rgba(255, 224, 145, .86);
    border-radius: 8px;
    color: #fff5d9;
    background: linear-gradient(145deg, #438d70, #1e5a49);
    box-shadow: 0 7px 20px rgba(0, 0, 0, .42), inset 0 0 0 2px rgba(255, 255, 255, .11);
}

.lobby-arrival-card span { font-size: 23px; line-height: 1; color: #ffe18a; }
.lobby-arrival-card small { font-size: 8px; font-weight: 900; letter-spacing: .09em; }
.lobby-arrival-card-left {
    left: 17px;
    transform: rotate(-19deg);
    animation: lobbyArrivalCardLeft 2.9s ease-in-out infinite;
    animation-delay: var(--arrival-phase, 0s);
}
.lobby-arrival-card-right {
    right: 17px;
    background: linear-gradient(145deg, #a7673d, #6e3c26);
    transform: rotate(19deg);
    animation: lobbyArrivalCardRight 2.9s ease-in-out infinite .2s;
    animation-delay: calc(var(--arrival-phase, 0s) + .2s);
}

.lobby-arrival-spark {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ffe7a0;
    box-shadow: 0 0 13px 3px rgba(255, 215, 119, .5);
    animation: lobbyArrivalSpark 2.4s ease-in-out infinite;
    animation-delay: var(--arrival-phase, 0s);
}
.lobby-arrival-spark-one { top: 35px; left: 55px; }
.lobby-arrival-spark-two { top: 58px; right: 42px; animation-delay: calc(var(--arrival-phase, 0s) + .7s); }
.lobby-arrival-spark-three { bottom: 37px; left: 45px; animation-delay: calc(var(--arrival-phase, 0s) + 1.3s); }

.lobby-arrival-brand {
    margin-bottom: 7px;
    color: #e3b96d !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .25em !important;
}
.lobby-arrival-brand span { color: #fff0c1 !important; }
.lobby-arrival-content h1 {
    margin: 0 !important;
    color: #fff8e9 !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: clamp(27px, 7vw, 36px) !important;
    font-weight: 900 !important;
    letter-spacing: -.02em !important;
    line-height: 1.2 !important;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .35) !important;
}
.lobby-arrival-subtitle {
    margin: 8px 0 20px !important;
    color: rgba(245, 228, 191, .84) !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}
.lobby-arrival-progress {
    position: relative;
    width: min(230px, 74vw);
    height: 5px;
    overflow: hidden;
    margin: 0 auto;
    border-radius: 10px;
    background: rgba(255, 255, 255, .13);
}
.lobby-arrival-progress span {
    position: absolute;
    inset: 0 auto 0 -42%;
    width: 42%;
    border-radius: inherit;
    background: linear-gradient(90deg, #bd7c31, #ffe49a, #f2b54b);
    box-shadow: 0 0 13px rgba(255, 213, 126, .55);
    animation: lobbyArrivalProgress 1.45s ease-in-out infinite;
    animation-delay: var(--arrival-phase, 0s);
}
@keyframes lobbyArrivalContentIn { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes lobbyArrivalDust { to { transform: translate3d(4%, -3%, 0); } }
@keyframes lobbyArrivalOrbit { to { transform: rotateX(68deg) rotateZ(340deg); } }
@keyframes lobbyArrivalOrbitReverse { to { transform: rotateX(68deg) rotateZ(-322deg); } }
@keyframes lobbyArrivalFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes lobbyArrivalGlow { 0%, 100% { opacity: .55; transform: scale(.88); } 50% { opacity: 1; transform: scale(1.12); } }
@keyframes lobbyArrivalCoinTurn { 0%, 16%, 100% { transform: rotateY(0) rotateZ(-3deg); } 50% { transform: rotateY(180deg) rotateZ(3deg); } 84% { transform: rotateY(360deg) rotateZ(-3deg); } }
@keyframes lobbyArrivalCardLeft { 0%, 100% { transform: translateY(4px) rotate(-19deg); } 50% { transform: translateY(-5px) rotate(-13deg); } }
@keyframes lobbyArrivalCardRight { 0%, 100% { transform: translateY(-2px) rotate(19deg); } 50% { transform: translateY(6px) rotate(13deg); } }
@keyframes lobbyArrivalSpark { 0%, 100% { opacity: .3; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.45); } }
@keyframes lobbyArrivalProgress { 0% { transform: translateX(0); } 100% { transform: translateX(340%); } }
@media (max-width: 480px) {
    .lobby-arrival-stage { width: 176px; height: 176px; margin-bottom: 19px; }
    .lobby-arrival-ring { inset: 16px; }
    .lobby-arrival-ring-two { inset: 25px 7px; }
    .lobby-arrival-coin-wrap { inset: 29px; }
    .lobby-arrival-card { top: 54px; width: 41px; height: 60px; }
    .lobby-arrival-card-left { left: 12px; }
    .lobby-arrival-card-right { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .lobby-arrival-overlay *,
    .lobby-arrival-overlay::before {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
    .lobby-arrival-overlay { transition-duration: .15s; }
}
