/* Welcome + room screens */

.welcome-screen,
.room-screen {
    position: absolute;
    inset: 0;
    z-index: 40;
    overflow: hidden;
}

/* ── Welcome (promo-style) ── */
.welcome-screen {
    background: #120608;
}

body.welcome-active .top-bar,
body.welcome-active .phase-strip {
    opacity: 0;
    pointer-events: none;
}

.welcome-scene {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: clamp(1rem, 3vh, 2rem) clamp(0.75rem, 3vw, 2rem) clamp(1.25rem, 4vh, 2.5rem);
}

.welcome-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 90% 70% at 50% 35%, #8b1a1a 0%, #4a0a0a 35%, #1a0508 70%, #080204 100%);
}

.welcome-bg-face {
    position: absolute;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%) scale(1.15);
    width: min(95vw, 680px);
    max-height: 72vh;
    object-fit: contain;
    opacity: 0.92;
    filter: saturate(1.15) contrast(1.08);
    pointer-events: none;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 42%, #000 25%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 42%, #000 25%, transparent 72%);
}

.welcome-bg-fire {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 120, 40, 0.35), transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(255, 60, 30, 0.28), transparent 40%),
        radial-gradient(circle at 50% 20%, rgba(255, 200, 80, 0.12), transparent 50%),
        linear-gradient(180deg, rgba(255, 80, 0, 0.08) 0%, transparent 35%, rgba(0, 0, 0, 0.55) 100%);
    mix-blend-mode: screen;
    pointer-events: none;
}

.welcome-bg-vignette {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 100% 80% at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.65) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 28%);
    pointer-events: none;
}

.welcome-cards {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: min(920px, 100%);
    height: clamp(200px, 38vh, 340px);
    margin-bottom: clamp(0.25rem, 1vh, 0.75rem);
    perspective: 900px;
}

.welcome-card {
    position: relative;
    margin: 0 -1.25rem;
    transform-origin: center bottom;
    transition: transform 0.35s ease, filter 0.35s ease;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.65));
}

.welcome-card img {
    display: block;
    width: clamp(100px, 16vw, 168px);
    height: auto;
    border-radius: 8px;
    border: 3px solid rgba(255, 255, 255, 0.15);
}

.welcome-card::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 10px;
    pointer-events: none;
    opacity: 0.85;
}

.welcome-card[data-color="green"]::after {
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.55), inset 0 0 0 2px rgba(34, 197, 94, 0.7);
}

.welcome-card[data-color="red"]::after {
    box-shadow: 0 0 26px rgba(239, 68, 68, 0.65), inset 0 0 0 2px rgba(239, 68, 68, 0.85);
}

.welcome-card[data-color="purple"]::after {
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.55), inset 0 0 0 2px rgba(168, 85, 247, 0.7);
}

.welcome-card[data-color="blue"]::after {
    box-shadow: 0 0 22px rgba(59, 130, 246, 0.55), inset 0 0 0 2px rgba(59, 130, 246, 0.7);
}

.wc-left-outer  { transform: rotate(-22deg) translateY(12px) scale(0.92); z-index: 1; }
.wc-left-inner  { transform: rotate(-10deg) translateY(4px) scale(0.98); z-index: 3; }
.wc-right-inner { transform: rotate(10deg) translateY(4px) scale(0.98); z-index: 3; }
.wc-right-outer { transform: rotate(22deg) translateY(12px) scale(0.92); z-index: 1; }

.welcome-card:hover {
    transform: rotate(0deg) translateY(-12px) scale(1.05) !important;
    z-index: 10 !important;
    filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.75));
}

.welcome-brand {
    position: relative;
    z-index: 3;
    text-align: center;
    margin-bottom: clamp(0.75rem, 2vh, 1.25rem);
}

.welcome-op-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    line-height: 1;
}

.welcome-op-main {
    font-family: 'Bangers', 'Noto Sans JP', cursive;
    font-size: clamp(2.4rem, 7vw, 4rem);
    letter-spacing: 0.06em;
    color: #fff;
    text-shadow:
        0 0 20px rgba(255, 100, 50, 0.5),
        3px 3px 0 #000,
        4px 4px 0 rgba(120, 0, 0, 0.8);
}

.welcome-op-sub {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(0.95rem, 2.5vw, 1.25rem);
    font-weight: 700;
    letter-spacing: 0.45em;
    color: #f8fafc;
    text-shadow: 2px 2px 0 #000;
    margin-left: 0.45em;
}

.welcome-tag {
    margin-top: 0.5rem;
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    color: rgba(254, 226, 226, 0.75);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.welcome-dock {
    position: relative;
    z-index: 4;
    width: min(420px, 94vw);
}

.welcome-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(8, 10, 16, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.welcome-form input {
    width: 100%;
    text-align: center;
    font-size: 1.05rem;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
    color: #f1f5f9;
}

.welcome-cta {
    font-family: 'Bangers', cursive;
    letter-spacing: 0.08em;
    font-size: 1.15rem !important;
    text-transform: uppercase;
    box-shadow: 0 4px 0 #9f1239, 0 8px 24px rgba(225, 29, 72, 0.35);
}

.btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1.05rem;
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .welcome-cards {
        margin-bottom: 0;
    }

    .welcome-card {
        margin: 0 -0.65rem;
    }

    .welcome-card img {
        width: clamp(72px, 22vw, 110px);
    }

    .wc-left-outer  { transform: rotate(-18deg) translateY(16px) scale(0.88); }
    .wc-right-outer { transform: rotate(18deg) translateY(16px) scale(0.88); }
    .wc-left-inner  { transform: rotate(-8deg) translateY(6px) scale(0.94); }
    .wc-right-inner { transform: rotate(8deg) translateY(6px) scale(0.94); }

    .welcome-bg-face {
        top: 32%;
        width: 110vw;
        opacity: 0.85;
    }
}

/* ── Room ── */
.room-screen {
    inset: 46px 0 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: auto;
    background:
        radial-gradient(ellipse at 70% 20%, rgba(225, 29, 72, 0.12), transparent 50%),
        #06080d;
}

.room-layout {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 1.5rem;
    width: min(720px, 96vw);
    align-items: stretch;
}

@media (max-width: 640px) {
    .room-layout {
        grid-template-columns: 1fr;
    }
    .room-brand {
        flex-direction: row !important;
        text-align: left;
    }
    .room-hero {
        width: 80px !important;
    }
}

.room-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 14px;
    border: 2px solid rgba(0, 0, 0, 0.85);
    background: linear-gradient(160deg, #1a2233 0%, #0f1419 100%);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}

.room-hero {
    width: 100%;
    max-width: 160px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.room-brand-text h2 {
    font-family: 'Bangers', cursive;
    font-size: 1.6rem;
    color: var(--gold);
    letter-spacing: 0.1em;
}

.room-brand-text p {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-align: center;
}

.room-card {
    padding: 1.35rem 1.5rem;
    background: linear-gradient(160deg, #1a2233 0%, #111827 100%);
    border-radius: 14px;
    border: 1px solid var(--panel-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.room-greeting {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    color: var(--text-dim);
}

.room-greeting strong {
    color: var(--text);
}

.deck-lock-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 0.85rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--panel-border);
}

.deck-preview {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.deck-preview img {
    width: 56px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.deck-preview strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.deck-preview span {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.room-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.room-list {
    padding-left: 1.25rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    max-height: 80px;
    overflow: hidden;
    margin-top: 0.75rem;
}
