* {
    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: "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;
}

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

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

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

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

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

@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-right {
    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-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.18), rgba(0, 0, 0, 0.68)),
        rgba(44, 62, 80, 0.2);
}

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

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

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

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

.auth-media h1 {
    max-width: 620px;
    margin-bottom: 18px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1;
}

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

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

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

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

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

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

.auth-card h2 {
    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: 18px;
}

.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);
}

.form-options {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #53616a;
    font-size: 15px;
}

.remember-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.form-options 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;
}

.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: 24px 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 img {
    width: 30px;
    height: 30px;
    border: none;
}

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

.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);
    }
}

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

@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.86), rgba(255,255,255,0.94)),
            url("../images/postcard0.jpg") center / cover;
    }

    .auth-media {
        height: auto;
        min-height: auto;
        display: block;
        color: #2C3E50;
        overflow: visible;
    }

    .auth-media__video,
    .auth-media__overlay,
    .auth-media__eyebrow,
    .auth-media h1,
    .auth-media p {
        display: none;
    }

    .auth-media__content {
        padding: 8px 0 18px;
    }

    .auth-media .brand-logo {
        color: #2C3E50;
        margin-bottom: 0;
        font-size: 30px;
    }

    .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.92);
        backdrop-filter: blur(8px);
    }

    .auth-card__logo {
        display: none;
    }

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

    .form-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

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

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