html,
body.preportal-page {
    min-height: 100%;
}

body.preportal-page {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: white;
}



#avatarBackground {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.avatar-tile {
    position: absolute;
    object-fit: cover;
    opacity: 0.20;
    filter: grayscale(0.15);
    mix-blend-mode: screen;
    animation-name: avatarScrollUp;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes avatarScrollUp {
    from { transform: translateY(0); }
    to { transform: translateY(-200vh); }
}

.preportal-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.preportal-card {
    width: min(460px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 26px 28px 24px;
    text-align: center;
    background: rgba(0, 0, 0, 0.90);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    box-shadow: 2px 2px 32px 8px rgba(1, 1, 1, 0.80);
}

.preportal-card.wide {
    width: min(520px, calc(100vw - 32px));
}

.preportal-logo-wrap {
    margin: 0 auto 18px;
    width: min(100%, 430px);
}

.preportal-logo {
    display: block;
    width: 100%;
    max-height: 105px;
    object-fit: contain;
}

.preportal-heading {
    margin: 5px 0 8px;
    font-size: 23px;
    font-weight: 700;
    color: var(--offwhite, #f5f5f5);
}

.preportal-subheading {
    margin: 0 auto 20px;
    max-width: 430px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--offwhite, #f2f2f2);
    opacity: .86;
}

.preportal-form {
    margin-top: 8px;
}

.preportal-field {
    margin: 0 auto 14px;
    text-align: left;
}

.preportal-label {
    display: block;
    margin: 0 0 5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--offwhite, #f2f2f2);
}

.preportal-input {
    display: block;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    background-color: var(--backgroundblue);
    border: 1px solid var(--darkgray);
    font-size: 14px;
    padding: 7px 8px;
    color: white;
    outline: none;
}

.preportal-input:focus,
.verify-email-input:focus {
    border-color: var(--lightblue, #60b1e9);
    box-shadow: 0 0 0 1px rgba(96,177,233,.25);
}

.verify-email-input {
    flex: 1;
    display: inline-block;
    width: 80%;
    min-width: 80%;
    max-width: 80%;
    overflow: hidden;
    box-sizing: border-box;
    background-color: var(--backgroundblue);
    border: 1px solid var(--darkgray);
    font-size: 14px;
    padding: 2px;
    color: white;
    outline: none;
}

.preportal-error,
.verify-error,
.verify-status.error {
    color: rgb(250, 86, 68);
}

.verify-message,
.verify-status.pending {
    color: #ffd75a;
}

.verify-status.success {
    color: #64dc79;
}

.verify-message,
.verify-error,
.verify-status {
    margin: 12px 0;
    min-height: 20px;
    font-size: 13px;
    font-weight: 700;
}

.preportal-invalid {
    display: block;
    margin-top: 4px;
    color: rgb(250, 86, 68);
    font-size: 12px;
    line-height: 1.25;
}

.preportal-primary-action {
    margin-top: 8px;
}

.preportal-small-link {
    margin-top: 12px;
    font-size: 12px;
}

.verify-manual-link {
    display: inline-block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--lightblue, #60b1e9);
    text-decoration: underline;
    cursor: pointer;
}

/* Polling must never visually dim/flicker this link. */
.verify-manual-link[aria-busy="true"] {
    color: var(--lightblue, #60b1e9);
    opacity: 1;
}

.preportal-note {
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.4;
    opacity: .72;
}

.preportal-disclaimer {
    margin-top: 18px;
    font-size: 10px;
    line-height: 1.35;
    color: rgb(250, 86, 68);
    opacity: .55;
}

@media (max-width: 520px) {
    .preportal-shell {
        align-items: flex-start;
        padding-top: 24px;
    }

    .preportal-card,
    .preportal-card.wide {
        padding: 22px 18px;
    }

    .verify-email-input {
        width: 92%;
        min-width: 92%;
        max-width: 92%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .avatar-tile {
        animation: none !important;
    }
}
