:root {
    --bg: #c8dedd;
    --text: #181826;
    --muted: #4f5058;
    --accent: #ff715e;
    --accent-deep: #ef5c49;
    --field-bg: rgba(255, 255, 255, 0.9);
    --field-border: rgba(24, 24, 38, 0.14);
}

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

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.28), transparent 38%),
        var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

.page-create {
    min-height: 100dvh;
}

.create-page {
    min-height: 100dvh;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 1.6rem 1.1rem 2rem;
    isolation: isolate;
}

.auth-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(28px);
    pointer-events: none;
    z-index: 0;
}

.auth-glow-a {
    width: min(44vw, 280px);
    height: min(44vw, 280px);
    top: 6%;
    left: -8%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 72%);
}

.auth-glow-b {
    width: min(48vw, 320px);
    height: min(48vw, 320px);
    right: -10%;
    bottom: 10%;
    background: radial-gradient(circle, rgba(255, 113, 94, 0.18), transparent 72%);
}

/* ── Layout ── */
.create-layout {
    width: min(100%, 1100px);
    max-width: 100%;
    margin: auto;
    min-height: calc(100dvh - 3.6rem);
    display: grid;
    align-items: center;
    gap: 1.4rem;
    position: relative;
    z-index: 1;
    min-width: 0;
}

/* ── Intro panel (desktop only) ── */
.create-intro {
    display: none !important; /* hidden on mobile */
    max-width: 100%;
    min-width: 0;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    box-shadow: 0 20px 36px rgba(24, 24, 38, 0.08);
    backdrop-filter: blur(8px);
    text-align: left;
    justify-items: start;
    align-content: center;
    gap: 0.65rem;
    padding: 2rem;
}

.create-logo {
    display: block;
    width: min(18vw, 220px);
    height: auto;
}

.create-kicker {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(24, 24, 38, 0.62);
}

.create-brand {
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    line-height: 1.03;
    font-weight: 800;
    max-width: 12ch;
}

.create-welcome {
    max-width: 32ch;
    font-size: clamp(0.92rem, 1.4vw, 1.05rem);
    line-height: 1.35;
    color: rgba(24, 24, 38, 0.78);
}

/* ── Auth form section ── */
.create-auth {
    max-width: 100%;
    min-width: 0;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    box-shadow: 0 20px 36px rgba(24, 24, 38, 0.08);
    backdrop-filter: blur(8px);
    padding: 1.6rem 1.4rem;
}

/* Logo that shows inside the auth section on mobile */
.create-auth-logo {
    display: block;
    width: min(52vw, 170px);
    height: auto;
    margin: 0 auto 1.5rem;
}

/* ── Step indicator ── */
.create-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 1.4rem;
}

.create-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.26rem;
    flex-shrink: 0;
}

.create-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(24, 24, 38, 0.18);
    background: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: rgba(24, 24, 38, 0.36);
}

.create-step.is-active .create-step-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 113, 94, 0.3);
}

.create-step.is-done .create-step-dot {
    background: #44b26b;
    border-color: #44b26b;
    color: #fff;
}

.create-step-label {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(24, 24, 38, 0.38);
}

.create-step.is-active .create-step-label {
    color: var(--accent);
    font-weight: 800;
}

.create-step-line {
    flex: 1;
    height: 2px;
    background: rgba(24, 24, 38, 0.12);
    border-radius: 1px;
    margin-top: 13px;
    min-width: 16px;
}

/* ── Title & subtitle ── */
.create-title {
    font-size: clamp(1.65rem, 6vw, 2rem);
    line-height: 1.05;
    font-weight: 800;
    text-align: center;
}

.create-subtitle {
    margin: 0.3rem auto 0;
    max-width: 34ch;
    font-size: clamp(0.88rem, 3.2vw, 0.98rem);
    color: rgba(24, 24, 38, 0.68);
    line-height: 1.35;
    text-align: center;
}

/* ── Form ── */
.create-form {
    margin-top: 1.2rem;
    text-align: left;
    display: grid;
    gap: 0;
}

/* ── Groups ── */
.create-group {
    display: grid;
    gap: 0.48rem;
    padding: 0.85rem 0;
}

.create-group + .create-group {
    border-top: 1px solid rgba(24, 24, 38, 0.1);
}

.create-group-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(24, 24, 38, 0.46);
    margin-bottom: 0.1rem;
}

.create-form label {
    display: block;
    font-size: clamp(0.92rem, 3.6vw, 1rem);
    line-height: 1.1;
    font-weight: 700;
    color: rgba(24, 24, 38, 0.88);
}

/* ── Fields ── */
.field-wrap {
    width: 100%;
    border-radius: 18px;
    border: 1.5px solid var(--field-border);
    background: var(--field-bg);
    padding: 0 0.9rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.field-wrap:focus-within:not(.captcha-widget-wrap) {
    border-color: rgba(255, 113, 94, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 113, 94, 0.11);
    transform: translateY(-1px);
}

.field-wrap.is-invalid {
    border-color: rgba(212, 38, 38, 0.5);
    box-shadow: 0 0 0 4px rgba(212, 58, 58, 0.08);
}

.create-form input {
    width: 100%;
    border: 0;
    background: transparent;
    color: #1f222b;
    padding: 0.9rem 0;
    font-size: clamp(0.9rem, 3vw, 1rem);
    outline: none;
    font-family: inherit;
}

.create-form input::placeholder {
    color: rgba(31, 34, 43, 0.38);
}

.password-wrap {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.password-wrap input {
    flex: 1;
}

.password-toggle {
    border: 0;
    background: transparent;
    color: var(--accent-deep);
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    min-height: 44px;
    padding: 0 0.2rem;
    font-family: inherit;
}

/* ── Inline errors ── */
.create-inline-error,
.password-match-error,
.password-rules-error,
.password-length-error {
    color: #d53a3a;
    font-size: clamp(0.74rem, 2.6vw, 0.86rem);
    font-weight: 700;
    display: none;
    line-height: 1.25;
}

.create-inline-error.show,
.password-match-error.show,
.password-rules-error.show,
.password-length-error.show {
    display: block;
}

/* ── CAPTCHA ── */
.captcha-copy {
    color: #5f6269;
    font-size: clamp(0.78rem, 2.6vw, 0.9rem);
    line-height: 1.35;
}

.create-group[hidden],
.captcha-widget-wrap[hidden],
.captcha-fallback[hidden],
.captcha-widget-loading[hidden] {
    display: none !important;
}

.captcha-widget-wrap {
    width: 100%;
    max-width: 340px;
    border-radius: 16px;
    border: 1px solid rgba(24, 24, 38, 0.12);
    background: rgba(255, 255, 255, 0.62);
    padding: 0.7rem;
    overflow: visible;
    margin: 0 auto;
}

.captcha-widget-wrap:focus-within {
    border-color: rgba(24, 24, 38, 0.12);
    box-shadow: none;
    transform: none;
}

.captcha-fallback {
    display: grid;
    gap: 0.48rem;
}

.captcha-fallback-copy {
    color: #5f6269;
    font-size: clamp(0.78rem, 2.6vw, 0.9rem);
    line-height: 1.35;
}

.captcha-widget-shell {
    min-height: auto;
    display: grid;
    place-items: center;
    justify-items: center;
    gap: 0.4rem;
    width: 100%;
    overflow: visible;
}

.captcha-widget-loading {
    font-size: clamp(0.78rem, 2.6vw, 0.9rem);
    color: #5f6269;
    text-align: center;
}

.captcha-widget-loading.is-error {
    color: #c94242;
    font-weight: 700;
}

#create-captcha-host {
    width: 100%;
    max-width: 304px;
    min-width: 0;
    min-height: 78px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.captcha-widget-wrap .g-recaptcha {
    width: auto;
    max-width: none;
    margin: 0 auto;
}

.captcha-widget-wrap .g-recaptcha > div {
    margin: 0 auto;
}

.captcha-widget-wrap iframe {
    display: block;
    pointer-events: auto;
}

@media (max-width: 380px) {
    .captcha-widget-wrap {
        padding: 0.5rem;
        /* Let the native 304px widget scroll if a tiny screen can't fit it.
           Never scale it — transform: scale() misaligns the clickable hit-area
           from the visible checkbox, which is what made it "not clickable". */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #create-captcha-host {
        max-width: none;
        min-height: 72px;
        justify-content: flex-start;
    }
}

.captcha-widget-wrap.is-ready .captcha-widget-loading {
    display: none;
}

/* ── Password checklist ── */
.password-checklist {
    display: grid;
    gap: 0.22rem;
    padding: 0.15rem 0;
}

.password-check {
    font-size: 0.78rem;
    color: rgba(24, 24, 38, 0.48);
    position: relative;
    padding-left: 1.4rem;
    line-height: 1.3;
    transition: color 0.18s ease;
}

.password-check::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.5px solid rgba(24, 24, 38, 0.18);
    background: transparent;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.password-check.is-met {
    color: #2a6344;
}

.password-check.is-met::before {
    background: #44b26b;
    border-color: #44b26b;
}

.password-check.is-met::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-62%) rotate(45deg);
    width: 3px;
    height: 6px;
    border-right: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
}

/* ── Password hint ── */
.password-hint {
    font-size: 0.78rem;
    color: rgba(24, 24, 38, 0.5);
}

/* Hide the redundant flow hint at the bottom of the form */
.create-form > .password-hint {
    display: none;
}

/* ── Password strength ── */
.password-strength {
    display: grid;
    gap: 0.28rem;
}

.password-strength__bar {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(24, 24, 38, 0.1);
    overflow: hidden;
}

.password-strength__fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: #d05353;
    transition: width 0.25s ease, background 0.25s ease;
}

.password-strength__label {
    font-size: 0.76rem;
    color: #5a5d65;
    font-weight: 700;
}

/* ── Submit button ── */
.create-submit {
    margin-top: 0.75rem;
    width: 100%;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff;
    padding: 1rem 1rem;
    font-size: clamp(1rem, 4vw, 1.1rem);
    font-weight: 800;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(255, 113, 94, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    will-change: transform;
}

.create-submit:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(255, 113, 94, 0.34);
}

@media (hover: hover) and (pointer: fine) {
    .create-submit:hover {
        transform: translateY(-1px);
        box-shadow: 0 18px 30px rgba(255, 113, 94, 0.34);
    }
}

.create-submit.is-submitting {
    opacity: 0.88;
    pointer-events: none;
}

.create-submit-icon {
    display: none;
}

.create-submit.is-submitting::before {
    content: "";
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    animation: createSpin 0.72s linear infinite;
    flex-shrink: 0;
}

.password-toggle:focus-visible,
.create-submit:focus-visible,
.login-link:focus-visible {
    outline: 2.5px solid #ff715e;
    outline-offset: 3px;
}

/* ── Footer ── */
.login-text {
    margin-top: 0.9rem;
    color: rgba(24, 24, 38, 0.7);
    font-size: clamp(0.78rem, 2.6vw, 0.92rem);
    line-height: 1.45;
    text-align: center;
}

.login-link {
    color: var(--accent-deep);
    font-weight: 700;
    text-decoration: none;
}

.login-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pavilla-auth-social {
    margin-top: 0.9rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

.create-credit {
    margin-top: auto;
    padding-top: 1.2rem;
    text-align: center;
    color: rgba(255, 113, 94, 0.9);
    font-size: clamp(0.74rem, 2.4vw, 0.86rem);
    padding-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

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

@media (prefers-reduced-motion: reduce) {
    .field-wrap,
    .create-submit,
    .password-check,
    .password-check::before,
    .password-strength__fill {
        transition: none;
    }

    .create-submit.is-submitting::before {
        animation: none;
    }
}

/* ── Desktop: two-column layout ── */
@media (min-width: 980px) {
    .create-layout {
        grid-template-columns: 0.95fr 1.05fr;
        gap: 1.3rem;
    }

    /* Show intro panel on desktop */
    .create-intro {
        display: grid !important;
        height: 100%;
    }

    /* Auth card — expand padding and fill column height on desktop */
    .create-auth {
        padding: 2rem;
        height: 100%;
    }

    /* Hide mobile logo on desktop */
    .create-auth-logo {
        display: none;
    }

    .create-steps {
        justify-content: flex-start;
    }

    .create-title,
    .create-subtitle {
        text-align: left;
    }

    .create-subtitle {
        margin-left: 0;
    }

    .login-text {
        text-align: left;
    }

    .pavilla-auth-social.is-centered {
        justify-content: flex-start;
    }
}

/* ── Tablet backdrop blur restore ── */
@media (max-width: 820px) {
    .auth-glow {
        filter: blur(16px);
        opacity: 0.36;
    }
}

@media (max-width: 520px) {
    .create-page {
        padding-inline: 1rem;
    }
}

/* ── Touch optimizations ── */
.create-submit,
.create-back,
.create-step,
.login-link,
.login-toggle,
.create-social-btn { touch-action: manipulation; }

/* Modern compact refresh */
:root {
    --bg: #98e0c6;
}

body {
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.24), transparent 34%),
        var(--bg);
}

.create-page {
    padding: 1rem 0.85rem 2rem;
}

.create-layout {
    width: 100%;
    max-width: 390px;
    min-height: auto;
    gap: 0.95rem;
    margin: 0 auto;
    align-items: start;
}

.create-intro,
.create-auth {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 18px 30px rgba(20, 33, 38, 0.08);
}

.create-auth {
    padding: 1.05rem 0.95rem;
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.create-auth-logo {
    width: min(42vw, 156px);
    margin-bottom: 0.95rem;
}

.create-steps {
    margin-bottom: 0.9rem;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.create-step-dot {
    width: 25px;
    height: 25px;
    font-size: 0.72rem;
}

.create-step {
    min-width: 0;
}

.create-step-label {
    max-width: 58px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.create-step-line {
    min-width: 10px;
}

.password-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.password-wrap input {
    min-width: 0;
}

.password-toggle {
    flex: 0 0 auto;
    min-width: 46px;
    padding-inline: 0.5rem;
}

.create-title {
    font-size: clamp(1.45rem, 5.8vw, 1.9rem);
}

.create-subtitle,
.password-hint,
.login-text {
    font-size: 0.84rem;
    line-height: 1.38;
}

.create-form {
    margin-top: 0.85rem;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.create-group {
    gap: 0.4rem;
    padding: 0.65rem 0;
}

.field-wrap,
.password-wrap {
    min-height: 45px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.82);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.create-form input {
    max-width: 100%;
}

.create-submit,
.password-toggle,
.login-link {
    border-radius: 999px;
}

.password-checklist {
    grid-template-columns: 1fr 1fr;
    gap: 0.38rem;
}

.password-check {
    min-height: 30px;
    display: flex;
    align-items: center;
    padding: 0.42rem 0.55rem 0.42rem 1.55rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.68rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.password-check::before {
    left: 0.48rem;
    width: 12px;
    height: 12px;
}

.password-check.is-met::after {
    left: 0.68rem;
}

@media (max-width: 360px) {
    .password-checklist {
        grid-template-columns: 1fr;
    }

    .password-check {
        min-height: 28px;
    }
}

@media (min-width: 980px) {
    .create-layout {
        max-width: 920px;
        grid-template-columns: minmax(250px, 0.72fr) minmax(380px, 1fr);
    }

    .create-intro {
        padding: 1.45rem;
    }

    .create-auth {
        padding: 1.45rem;
    }
}

/* ── Google sign-up ──────────────────────────────────────────── */
.google-auth-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin: 0.2rem 0 0;
}
.google-btn-host {
    display: flex;
    justify-content: center;
    width: 100%;
    min-height: 44px;
}
.google-btn-host iframe { margin: 0 auto !important; }
.google-auth-status {
    font-size: 0.78rem;
    color: #6a7a82;
    text-align: center;
    margin: 0;
    line-height: 1.35;
}
.google-auth-status:empty { display: none; }
.google-auth-status.is-error { color: #c94242; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.85rem 0 0.95rem;
    color: #8a98a0;
    font-size: 0.76rem;
    font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(24, 24, 38, 0.1);
}
