/* Portal chooser — calm liquid glass (no neon / cyber) */
body.portal-mode::after,
html.portal-host body::after {
    opacity: 0.45;
    animation-duration: 28s;
}

#portal-home.portal-home {
    width: min(92vw, 420px);
    max-width: 420px;
    gap: 14px;
    padding: 28px 22px 24px !important;
    display: none;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
}

#portal-home.portal-home.active-view {
    display: flex !important;
}

.portal-brand {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-main);
    background: none !important;
    -webkit-text-fill-color: unset !important;
    animation: none !important;
    filter: none !important;
}

.portal-subtitle {
    margin: -4px 0 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.portal-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.portal-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 20px 22px;
    text-align: left;
    text-decoration: none;
    color: var(--text-main);
    cursor: pointer;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-top: 1px solid rgba(255, 255, 255, 0.38);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.16),
        inset 0 1px 1px rgba(255, 255, 255, 0.22);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.portal-card:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
    transform: translateY(-2px);
}

.portal-card:active {
    transform: scale(0.98);
}

.portal-card-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.portal-card-desc {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.portal-card-arrow {
    align-self: flex-end;
    margin-top: -4px;
    font-size: 18px;
    opacity: 0.55;
}

body:has(#portal-home.active-view) .system-controls {
    display: none !important;
}

/* Soften cyber-title shimmer on game lobby when still using class name */
body:not(.portal-mode) .cyber-title {
    filter: drop-shadow(0px 1px 2px rgba(255, 255, 255, 0.06));
}

body.no-glass #portal-home.portal-home,
body.no-glass .portal-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #1c1c1e !important;
}


/* Legacy-site one-click migrate */
.portal-migrate-btn {
    margin-top: 14px;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 14px;
    background: rgba(255, 204, 0, 0.12);
    color: #ffcc00;
    border: 1px solid rgba(255, 204, 0, 0.45);
    cursor: pointer;
}
.portal-migrate-btn:hover {
    background: rgba(255, 204, 0, 0.2);
}
.portal-migrate-btn--home {
    margin-top: 16px;
}
.portal-migrate-hint {
    margin: 6px 0 0;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}
#login-gate .portal-migrate-btn {
    margin-top: 12px;
}
