@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,400..700,0..1,-25..200&display=swap');

/* ==========================================================
   Asylonia Passport Gate - Firebase Auth
   ========================================================== */

html.asylonia-auth-lock,
body.asylonia-auth-pending,
body.asylonia-auth-gate-open {
    min-height: 100%;
    overflow: hidden;
}

body.asylonia-auth-pending .site-shell,
body.asylonia-auth-gate-open .site-shell {
    visibility: hidden;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
}

body.asylonia-auth-ready .site-shell {
    visibility: visible;
    height: auto;
    overflow: visible;
    pointer-events: auto;
}

.asylonia-passport-gate {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 28px;
    color: #fff5e4;
    background: #070503;
    overflow: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

body.asylonia-auth-ready .asylonia-passport-gate {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.passport-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.02) contrast(1.04) brightness(0.72);
    transform: scale(1.02);
}

.passport-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 68% 18%, rgba(255, 216, 132, 0.18), transparent 34%),
        radial-gradient(circle at 18% 78%, rgba(214, 174, 92, 0.14), transparent 38%),
        linear-gradient(90deg, rgba(5, 4, 3, 0.86) 0%, rgba(8, 6, 4, 0.66) 46%, rgba(5, 4, 3, 0.86) 100%);
}

.passport-glow {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(18px);
    opacity: 0.6;
}

.passport-glow-one {
    width: 520px;
    height: 520px;
    left: -180px;
    top: -90px;
    background: radial-gradient(circle, rgba(255, 216, 132, 0.22), transparent 68%);
}

.passport-glow-two {
    width: 620px;
    height: 620px;
    right: -230px;
    bottom: -190px;
    background: radial-gradient(circle, rgba(214, 174, 92, 0.18), transparent 70%);
}

.passport-shell {
    position: relative;
    z-index: 2;
    width: min(100%, 1120px);
    display: grid;
    justify-items: start;
}

.passport-card {
    width: min(100%, 520px);
    padding: clamp(24px, 4vw, 38px);
    border-radius: 32px;
    border: 1px solid rgba(230, 187, 92, 0.32);
    background:
        radial-gradient(circle at 86% 0%, rgba(255, 216, 132, 0.14), transparent 42%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.088), rgba(255, 255, 255, 0.034)),
        rgba(13, 9, 5, 0.72);
    box-shadow:
        0 36px 100px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(255, 216, 132, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.passport-brand-lockup {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 18px;
    align-items: center;
}

.passport-brand-lockup img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    border-radius: 999px;
    filter: drop-shadow(0 0 18px rgba(255, 216, 132, 0.36));
}

.passport-eyebrow {
    margin: 0 0 8px;
    color: #d8a84e;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.passport-card h1 {
    margin: 0;
    color: #fff7e8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.passport-intro {
    margin: 22px 0 0;
    color: rgba(255, 246, 230, 0.72);
    line-height: 1.7;
}

.passport-actions {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.passport-btn {
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border-radius: 18px;
    font-weight: 950;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.passport-btn:hover {
    transform: translateY(-1px);
}

.passport-btn span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 950;
}

.passport-btn-gold {
    border: 0;
    color: #1b1005;
    background: linear-gradient(180deg, #ffe3a0 0%, #d5a13f 54%, #a66d19 100%);
    box-shadow: 0 0 28px rgba(255, 216, 132, 0.18);
}

.passport-btn-gold span {
    background: rgba(27, 16, 5, 0.12);
}

.passport-btn-dark {
    border: 1px solid rgba(255, 216, 132, 0.28);
    color: #fff6e6;
    background: rgba(255, 255, 255, 0.044);
}

.passport-btn-dark span {
    color: #ffd884;
    background: rgba(255, 216, 132, 0.10);
}

.passport-btn-light {
    border: 1px solid rgba(255, 216, 132, 0.24);
    color: #f1cd7a;
    background: rgba(255, 255, 255, 0.025);
}

.passport-email-form {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 216, 132, 0.14);
}

.passport-email-form[hidden] {
    display: none !important;
}

.passport-form-grid {
    display: grid;
    gap: 12px;
}

.passport-form-grid label span {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 246, 230, 0.58);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.passport-form-grid input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 216, 132, 0.20);
    outline: 0;
    color: #fff6e6;
    background: rgba(0, 0, 0, 0.22);
}

.passport-form-grid input:focus {
    border-color: rgba(255, 216, 132, 0.66);
    box-shadow: 0 0 24px rgba(255, 216, 132, 0.10);
}

.passport-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.passport-form-actions .passport-btn {
    min-height: 46px;
    border-radius: 999px;
}

.passport-link-btn {
    min-height: 46px;
    border: 0;
    background: transparent;
    color: rgba(255, 246, 230, 0.58);
    font-weight: 850;
    cursor: pointer;
}

.passport-note,
.passport-noscript {
    margin: 18px 0 0;
    color: rgba(255, 246, 230, 0.56);
    font-size: 0.9rem;
    line-height: 1.6;
}

.passport-note.is-error {
    color: #ffbc9f;
}

.passport-note.is-success {
    color: #ffe09f;
}

.asylonia-auth-chip {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(210, 176, 109, 0.28);
    background: rgba(255, 255, 255, 0.04);
    color: #0a2846;
    font-weight: 850;
    font-size: 0.82rem;
}

.asylonia-auth-chip button {
    border: 0;
    background: transparent;
    color: #9a6619;
    font-weight: 950;
    cursor: pointer;
}

body.page-ai-creation-hall-music .asylonia-auth-chip {
    color: #f8edda;
}

@media (max-width: 760px) {
    .asylonia-passport-gate {
        padding: 18px;
        place-items: end center;
    }

    .passport-shell {
        justify-items: stretch;
    }

    .passport-card {
        border-radius: 26px;
    }

    .passport-brand-lockup {
        grid-template-columns: 58px 1fr;
        gap: 14px;
    }

    .passport-brand-lockup img {
        width: 58px;
        height: 58px;
    }

    .passport-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   Passport Gate Compact Scroll Patch
   - compact 3-way passport buttons
   - internal card scroll for small mobile / Mnemosyne WebView
   ========================================================== */
.passport-card {
    max-height: min(760px, calc(100svh - 56px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 216, 132, 0.72) rgba(255, 216, 132, 0.10);
}

.passport-card::-webkit-scrollbar {
    width: 9px;
}

.passport-card::-webkit-scrollbar-track {
    background: rgba(255, 216, 132, 0.08);
    border-radius: 999px;
}

.passport-card::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffe3a0, #b87a20);
    border-radius: 999px;
    border: 2px solid rgba(13, 9, 5, 0.78);
    background-clip: padding-box;
}

.passport-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #fff0bd, #d5a13f);
}

.passport-brand-lockup {
    grid-template-columns: 64px 1fr;
    gap: 16px;
}

.passport-brand-lockup img {
    width: 64px;
    height: 64px;
}

.passport-card h1 {
    font-size: clamp(2.15rem, 4.2vw, 3.05rem);
    line-height: 0.98;
}

.passport-intro {
    margin-top: 18px;
    line-height: 1.45;
}

.passport-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.passport-btn {
    min-height: 44px;
    gap: 7px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.88rem;
    line-height: 1;
    white-space: nowrap;
}

.passport-btn span {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.passport-btn .material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: normal;
    font-style: normal;
    font-size: 1.16rem;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 1, 'wght' 650, 'GRAD' 0, 'opsz' 24;
}

.passport-google-mark {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.98rem;
}

.passport-email-form {
    margin-top: 16px;
    padding-top: 16px;
}

.passport-note,
.passport-noscript {
    margin-top: 14px;
}

@media (max-width: 760px) {
    .asylonia-passport-gate {
        padding: 14px;
        place-items: center;
    }

    .passport-card {
        max-height: calc(100svh - 28px);
        padding: 22px;
        border-radius: 26px;
    }

    .passport-brand-lockup {
        grid-template-columns: 54px 1fr;
        gap: 13px;
    }

    .passport-brand-lockup img {
        width: 54px;
        height: 54px;
    }

    .passport-card h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .passport-intro {
        font-size: 0.98rem;
    }

    .passport-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .passport-btn {
        min-height: 42px;
        padding: 0 8px;
        border-radius: 999px;
        font-size: 0.82rem;
        gap: 6px;
    }

    .passport-btn span {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }

    .passport-btn .material-symbols-outlined {
        font-size: 1.05rem;
    }

    .passport-form-actions {
        display: flex;
        flex-wrap: wrap;
    }

    .passport-form-actions .passport-btn {
        min-height: 42px;
        flex: 1 1 auto;
    }

    .passport-link-btn {
        min-height: 42px;
        padding: 0 8px;
    }
}

@media (max-width: 390px) {
    .passport-card {
        padding: 20px 18px;
    }

    .passport-btn {
        font-size: 0.76rem;
        padding: 0 6px;
    }

    .passport-btn span {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }
}


/* ==========================================================
   Cloudflare Turnstile / City Gate Check
   ========================================================== */
.passport-human-gate {
    margin-top: 16px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 216, 132, 0.18);
    background:
        radial-gradient(circle at 88% 10%, rgba(255, 216, 132, 0.10), transparent 42%),
        rgba(0, 0, 0, 0.18);
}

.passport-human-gate[hidden] {
    display: none !important;
}

.passport-human-title {
    margin: 0;
    color: #ffe0a0;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.passport-human-text {
    margin: 6px 0 12px;
    color: rgba(255, 246, 230, 0.62);
    font-size: 0.88rem;
    line-height: 1.45;
}

.passport-turnstile-box {
    min-height: 65px;
    display: grid;
    align-items: center;
    justify-items: start;
    overflow: hidden;
}

@media (max-width: 390px) {
    .passport-human-gate {
        padding: 12px;
    }

    .passport-turnstile-box {
        transform: scale(0.92);
        transform-origin: left center;
    }
}
