/* The native dialog puts the invitation above the carousel and floating artwork. */
html.invite-spotlight-open { overflow: hidden; }
.invite-spotlight {
    width: min(440px, calc(100% - 40px));
    max-width: none;
    max-height: calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    margin: auto;
    padding: 0;
    border: 1px solid #f4cf787a;
    border-radius: 22px;
    color: var(--text);
    background: #150c23;
    box-shadow: 0 0 0 7px #ffd25f06, 0 0 100px #a566ef35, 0 28px 90px #0009;
    overflow: auto;
    text-align: center;
    overscroll-behavior: contain;
}
.invite-spotlight[open] { animation: invitation-arrive .55s cubic-bezier(.16, 1, .3, 1) both; }
.invite-spotlight::backdrop {
    background: #07040fc9;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: invitation-backdrop .3s ease-out both;
}
.invite-spotlight-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 38px 32px 22px;
    background: radial-gradient(ellipse at 50% 0, #9b5aea2e, transparent 65%), linear-gradient(150deg, #20132f, #100918);
}
.invite-spotlight-card::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 380px;
    height: 380px;
    left: 50%;
    top: -238px;
    transform: translateX(-50%);
    border: 1px solid #ffd25f2b;
    border-radius: 50%;
    box-shadow: 0 0 0 28px #ffd25f05, 0 0 0 56px #ffd25f03;
    pointer-events: none;
}
.invite-spotlight-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #c6b6d4;
    font-size: 20px;
}
.invite-spotlight-close:hover { background: #ffffff0d; color: var(--gold); }
.invite-spotlight-logo {
    display: block;
    width: min(260px, 100%);
    height: auto;
    margin: -22px auto -14px;
    filter: drop-shadow(0 4px 18px #ffd25f24);
}
.invite-spotlight-eyebrow { margin: 0 0 5px; color: #b5a0c6; font-size: 12px; letter-spacing: .12em; }
.invite-spotlight h2 { margin: 0; color: #f7eddf; font-size: clamp(18px, 4.8vw, 22px); font-weight: 500; letter-spacing: .02em; }
.invite-spotlight-code {
    display: block;
    margin: 22px 0 17px;
    color: #ffdb79;
    font: 700 clamp(26px, 8vw, 42px)/1.25 Consolas, monospace;
    letter-spacing: .035em;
    overflow-wrap: anywhere;
    text-shadow: 0 0 28px #ffcb504a;
    user-select: all;
}
.invite-spotlight-code.is-long { font-size: clamp(20px, 5vw, 28px); letter-spacing: .02em; }
#invite-spotlight-description { margin: 0 0 25px; color: #bbaaC7; font-size: 12px; line-height: 1.8; }
.invite-spotlight-enter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 12px 18px;
    border: 1px solid #ffe6a2;
    border-radius: 8px;
    color: #2d1a00;
    background: linear-gradient(110deg, #ffe295, #ffd25f);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 5px 24px #ffd25f1a;
    transition: background .2s, box-shadow .2s;
}
.invite-spotlight-enter .ui-icon { font-size: 18px; }
.invite-spotlight-enter:hover { background: #ffe4a1; box-shadow: 0 5px 30px #ffd25f30; }
.invite-spotlight-hint { min-height: 44px; margin-top: 8px; padding: 8px 0; border: 0; color: #aa96bd; background: none; font-size: 11px; }
.invite-spotlight :is(button, a):focus-visible { outline: 2px solid #ffdc86; outline-offset: 4px; }
.invite-spotlight.is-leaving { animation: invitation-leave .18s ease-in both; }
.invite-spotlight.is-leaving::backdrop { animation: invitation-backdrop .18s ease-in reverse both; }
@keyframes invitation-arrive { from { opacity: 0; transform: translateY(20px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes invitation-leave { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes invitation-backdrop { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 480px) {
    .invite-spotlight { width: calc(100% - 36px); border-radius: 18px; }
    .invite-spotlight-card { padding: 30px 24px 15px; }
}
@media (max-height: 580px) {
    .invite-spotlight-card { padding-top: 22px; padding-bottom: 10px; }
    .invite-spotlight-logo { width: min(200px, 100%); }
    .invite-spotlight-code { margin-block: 12px; }
    #invite-spotlight-description { margin-bottom: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .invite-spotlight[open], .invite-spotlight::backdrop { animation: none; }
}
@media print { .invite-spotlight { display: none; } }
