* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow: hidden;
}

@view-transition {
    navigation: auto;
}

body {
    min-height: 100vh;
    overflow: hidden;
    color: #222;
    background: white;
    /* font-family: "Alegreya SC", serif; */
    font-family: "Playwrite AU TAS", cursive;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    background: white;
    opacity: 0;
    transition: opacity 0.32s ease;
}

body.is-auth-leaving::before {
    opacity: 0.72;
}

.auth-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 38%, rgba(180, 85, 60, 0.18), transparent 30%),
        rgba(255, 255, 255, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

body.is-auth-loading .auth-loading-overlay {
    opacity: 1;
    pointer-events: auto;
}

.auth-loading-overlay__card {
    display: grid;
    place-items: center;
    gap: 14px;
    color: #2C3E50;
    text-align: center;
}

.auth-loading-overlay__ring {
    width: 82px;
    height: 82px;
    border: 3px solid rgba(44, 62, 80, 0.12);
    border-top-color: #b4553c;
    border-radius: 50%;
    animation: authLoadingSpin 0.9s linear infinite;
}

.auth-loading-overlay__card strong {
    font-family: "Lilita One", sans-serif;
    font-size: 34px;
    letter-spacing: 2px;
}

.auth-loading-overlay__card span {
    color: #56666e;
    font-size: 14px;
    font-weight: 800;
}

@keyframes authLoadingSpin {
    to {
        transform: rotate(360deg);
    }
}

a {
    color: inherit;
    text-decoration: none;
}

.auth-page {
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(0, 0.95fr);
    overflow: hidden;
    animation: auth-page-enter 0.48s cubic-bezier(.2,.75,.24,1) both;
    will-change: opacity, transform;
}

body[data-auth-enter="login"] .auth-page {
    animation-name: auth-page-enter-from-left;
}

body.is-auth-leaving .auth-page {
    animation: auth-page-leave-to-left 0.32s ease both;
}

body[data-auth-leave="login"] .auth-page {
    animation-name: auth-page-leave-to-right;
}

@keyframes auth-page-enter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes auth-page-enter-from-left {
    from {
        opacity: 0;
        transform: translateX(-28px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes auth-page-leave-to-right {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(28px) scale(0.99);
    }
}

@keyframes auth-page-leave-to-left {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(-28px) scale(0.99);
    }
}

.auth-panel {
    height: 100vh;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* background: white; */
    background:
        linear-gradient(rgba(255,255,255,0.87), rgba(255,255,255,0.95)),
        url("../images/postcard2.jpg") center / cover;
    
}

.auth-card {
    width: 100%;
    max-width: 620px;
    margin: auto 0;
}

.brand-logo {
    display: inline-block;
    font-family: "Lilita One", sans-serif;
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #2C3E50;
}

.auth-card__logo {
    margin-bottom: 34px;
}

.auth-card__heading {
    margin-bottom: 24px;
}

.auth-card__eyebrow,
.auth-media__eyebrow {
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.auth-card__eyebrow {
    color: #60727f;
}

.auth-card h1 {
    margin-bottom: 10px;
    color: #2C3E50;
    font-size: 42px;
    line-height: 1;
}

.auth-card__heading p {
    color: #58656d;
    font-size: 17px;
    line-height: 1.6;
}

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

.auth-card.is-waiting-activation .auth-form,
.auth-card.is-waiting-activation .auth-divider,
.auth-card.is-waiting-activation .google-button {
    display: none;
}

.activation-panel {
    display: grid;
    gap: 18px;
    padding: 22px;
    border: 1px solid rgba(44, 62, 80, 0.14);
    border-radius: 6px;
    color: #2C3E50;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 34px rgba(44, 62, 80, 0.08);
}

.activation-panel[hidden] {
    display: none;
}

.activation-panel__icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: #2C3E50;
    font-size: 24px;
}

.activation-panel__eyebrow {
    margin-bottom: 8px;
    color: #60727f;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.activation-panel h2 {
    margin-bottom: 10px;
    color: #2C3E50;
    font-size: 30px;
    line-height: 1.15;
}

.activation-panel p {
    color: #53616a;
    font-size: 15px;
    line-height: 1.65;
}

.activation-panel__status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2C3E50;
    font-size: 14px;
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-field {
    display: grid;
    gap: 8px;
    color: #2C3E50;
    font-size: 14px;
    font-weight: 600;
}

.form-field input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d8dee2;
    border-radius: 4px;
    outline: none;
    color: #222;
    background: white;
    font: inherit;
}

.form-field input:focus {
    border-color: #2C3E50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.consent-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #53616a;
    font-size: 15px;
    line-height: 1.5;
}

.consent-option input {
    margin-top: 5px;
    width: 18px;
    height: 18px;
}

.auth-submit,
.google-button {
    width: 100%;
    min-height: 46px;
    border-radius: 4px;
    font-family: "Playwrite AU TAS", cursive;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.google-button img {
    width: 30px;
    height: 30px;
    border: none;
}

.auth-submit {
    border: 1px solid #2C3E50;
    color: white;
    background: #2C3E50;
}

.auth-submit:hover,
.google-button:hover {
    transform: translateY(-1px);
}

.auth-submit:hover {
    background: #1f2d3a;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: #7d8a92;
    font-size: 15px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e6e8;
}

.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #d8dee2;
    color: #2C3E50;
    background: white;
}

.google-button:hover {
    border-color: #2C3E50;
    background: #f4f7f8;
}

.auth-switch {
    margin-top: 24px;
    color: #58656d;
    text-align: center;
    font-size: 16px;
}

.auth-switch a {
    color: #2C3E50;
    font-weight: 800;
}

.auth-media {
    position: relative;
    height: 100vh;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: white;
}

.auth-media__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-media__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.7)),
        rgba(44, 62, 80, 0.22);
}

.auth-media__content {
    position: relative;
    z-index: 1;
    max-width: 620px;
    padding: 48px;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-media .brand-logo {
    color: white;
    margin-bottom: 34px;
}

.auth-media h2 {
    max-width: 580px;
    margin-bottom: 18px;
    font-size: clamp(36px, 4vw, 58px);
    line-height: 1;
}

.auth-media p {
    max-width: 540px;
    font-size: 19px;
    line-height: 1.7;
}

@media (max-width: 768px) {
    html,
    body {
        overflow: auto;
    }

    .auth-page {
        display: block;
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 18px;
        background:
            linear-gradient(rgba(255,255,255,0.87), rgba(255,255,255,0.95)),
            url("../images/postcard1.jpg") center / cover;
    }

    .auth-panel {
        height: auto;
        min-height: auto;
        padding: 0;
        overflow: visible;
        background: transparent;
    }

    .auth-card {
        max-width: none;
        padding: 26px 20px;
        border: 1px solid rgba(44, 62, 80, 0.12);
        background: rgba(255, 255, 255, 0.93);
        backdrop-filter: blur(8px);
    }

    .auth-card__logo {
        margin-bottom: 24px;
        font-size: 30px;
    }

    .auth-card h1 {
        font-size: 34px;
    }

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

    .auth-media {
        height: auto;
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        transition: none;
    }

    .auth-page,
    body.is-auth-leaving .auth-page {
        animation: none;
    }
}
