:root {
    --auth-surface: rgba(255, 255, 255, 0.88);
    --auth-border: rgba(255, 255, 255, 0.55);
    --auth-ink: #0d1b2a;
    --auth-muted: #5f7088;
    --auth-brand: #1DA1F2;
    --auth-accent: #ff7b54;
    --auth-accent-alt: #17c3b2;
}

.auth-page {
    min-height: 100vh;
    padding: 28px 14px;
    position: relative;
    overflow-x: hidden;
    font-family: 'Space Grotesk', sans-serif;
    background: #f1f7ff;
}

.auth-bg-layer {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.auth-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(16, 65, 131, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 65, 131, 0.08) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.85), transparent 70%);
}

.auth-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(2px);
    opacity: 0.58;
    animation: blob-float 9s ease-in-out infinite;
}

.auth-blob-a {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle at 20% 20%, #58d0ff, #1DA1F2 50%, #1476b5);
    top: -190px;
    right: -140px;
}

.auth-blob-b {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle at 40% 30%, #ffd37b, #ff7b54 55%, #e05643);
    bottom: -150px;
    left: -110px;
    animation-delay: 1.4s;
}

.auth-shell {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
    align-items: start;
}

.auth-hero,
.auth-card {
    border-radius: 24px;
    border: 1px solid var(--auth-border);
    backdrop-filter: blur(14px);
    box-shadow: 0 26px 56px rgba(17, 39, 78, 0.16);
}

.auth-hero {
    background: linear-gradient(145deg, rgba(29, 161, 242, 0.2), rgba(23, 195, 178, 0.18));
    padding: 30px;
    color: #09284a;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 9999px;
    padding: 8px 16px;
    border: 1px solid rgba(12, 47, 92, 0.18);
    background: rgba(255, 255, 255, 0.56);
    margin-bottom: 16px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--auth-brand), var(--auth-accent-alt));
}

.auth-hero h1 {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 10px;
}

.auth-hero p {
    color: var(--auth-muted);
    font-size: 1rem;
}

.auth-card {
    background: var(--auth-surface);
    padding: 24px;
}

.auth-card-head h2 {
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.auth-card-head p {
    color: var(--auth-muted);
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.auth-mode-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border-radius: 14px;
    background: #ebf3ff;
    border: 1px solid #d6e5fd;
    padding: 5px;
    margin-bottom: 16px;
}

.auth-mode-switch button {
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    background: transparent;
    color: #5c6e87;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.auth-mode-switch button.active {
    background: #fff;
    color: #0d2f57;
    box-shadow: 0 6px 16px rgba(20, 71, 136, 0.16);
}

.auth-step {
    display: none;
    animation: step-in 0.26s ease;
}

.auth-step.active {
    display: block;
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-ink);
    font-weight: 700;
    font-size: 0.92rem;
}

.auth-input-wrap {
    position: relative;
    margin-bottom: 14px;
}

.auth-input-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6d83a2;
}

.auth-input-wrap input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #cadcf7;
    background: #fff;
    padding: 13px 14px 13px 42px;
    color: #132c4f;
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-wrap input:focus {
    outline: none;
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 4px rgba(29, 161, 242, 0.15);
}

.contact-input-wrap .fixed-dial-code {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    font-weight: 700;
    color: #4e6f95;
    pointer-events: none;
    display: none;
}

.contact-input-wrap.with-prefix .fixed-dial-code {
    display: inline-block;
}

.contact-input-wrap.with-prefix i {
    display: none;
}

.contact-input-wrap.with-prefix input {
    padding-left: 64px;
}

.auth-btn {
    width: 100%;
    border-radius: 14px;
    font-weight: 700;
    padding: 13px 14px;
    font-size: 0.95rem;
}

.auth-btn.ghost {
    border-radius: 14px;
    border-width: 1px;
}

.auth-inline-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.auth-inline-actions.two-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-btn {
    border: none;
    background: transparent;
    color: #2268b0;
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
}

.link-btn:hover {
    text-decoration: underline;
}

.otp-target {
    font-size: 0.86rem;
    color: var(--auth-muted);
    margin-bottom: 10px;
}

.auth-feedback {
    min-height: 22px;
    margin-top: 12px;
    border-radius: 10px;
    padding: 0;
    font-size: 0.88rem;
    color: var(--auth-muted);
}

.auth-feedback.is-error,
.auth-feedback.is-success {
    padding: 10px 12px;
}

.auth-feedback.is-error {
    background: rgba(255, 123, 84, 0.16);
    color: #8f2c0f;
}

.auth-feedback.is-success {
    background: rgba(23, 195, 178, 0.16);
    color: #0c635b;
}

.auth-footer {
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--auth-muted);
}

.auth-footer a {
    color: #145ca7;
    font-weight: 700;
}

.auth-page-signup .auth-bg-layer {
    opacity: 0.7;
}

.auth-page-signup .auth-blob {
    opacity: 0.34;
    filter: blur(10px);
}

.auth-single-shell {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 56px);
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-single-card {
    width: min(100%, 460px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 26px 22px 20px;
    gap: 16px;
}

.auth-single-head {
    text-align: center;
    margin-bottom: 2px;
}

.auth-app-name {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
    color: #0b2f58;
}

.auth-single-head h1 {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    font-weight: 700;
    color: #153d6b;
}

.auth-single-body {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-simple-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 8px;
}

.auth-page-signup .auth-single-card {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 24px 22px 18px;
    gap: 12px;
}

.auth-page-signup .auth-simple-footer {
    margin-top: 12px;
    padding-top: 0;
}

.auth-story-card {
    background: linear-gradient(180deg, #f8fcff 0%, #f2f8ff 100%);
    color: #0f335d;
    border: 1px solid rgba(128, 168, 209, 0.35);
    box-shadow: 0 14px 36px rgba(23, 58, 98, 0.14);
}

.auth-story-card .auth-footer,
.auth-story-card .auth-footer a {
    color: #5a779b;
}

.auth-story-card .auth-footer a {
    font-weight: 700;
    color: #114f93;
}

.story-top {
    text-align: left;
}

.story-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.story-progress .progress-step {
    height: 7px;
    border-radius: 999px;
    background: #d4e2f1;
    border: none;
    padding: 0;
}

.story-progress .progress-step.active,
.story-progress .progress-step.completed {
    background: linear-gradient(90deg, #1da1f2, #4ab9ff);
    box-shadow: none;
}

.story-step-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #54779f;
    font-weight: 700;
}

.story-body {
    margin-top: 4px;
}

.story-subcopy {
    margin-top: -4px;
    margin-bottom: 14px;
    color: #587899;
    font-size: 0.97rem;
    line-height: 1.45;
}

.story-form .auth-label {
    color: #4f7095;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.story-headline {
    margin-bottom: 16px;
    font-size: clamp(1.8rem, 6vw, 2.45rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
}

.story-headline-lite {
    display: block;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-style: italic;
    color: #173d69;
    margin-bottom: 6px;
}

.story-headline-chip {
    display: inline-block;
    background: #ffdcb8;
    color: #123660;
    border-radius: 9999px;
    padding: 6px 14px 7px;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
}

.story-input-wrap {
    margin-bottom: 16px;
}

.dob-wheel {
    position: relative;
    border-radius: 16px;
    border: 1px solid #c6d9ee;
    background: linear-gradient(180deg, #f5faff 0%, #eef5fe 100%);
    padding: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.dob-wheel::before,
.dob-wheel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 56px;
    pointer-events: none;
    z-index: 1;
}

.dob-wheel::before {
    top: 0;
    background: linear-gradient(180deg, rgba(238, 245, 254, 0.95) 0%, rgba(238, 245, 254, 0) 100%);
}

.dob-wheel::after {
    bottom: 0;
    background: linear-gradient(180deg, rgba(238, 245, 254, 0) 0%, rgba(238, 245, 254, 0.95) 100%);
}

.dob-wheel-grid {
    display: grid;
    grid-template-columns: 1fr 0.8fr 1fr;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.dob-wheel-col .auth-label {
    margin-bottom: 6px;
}

.dob-wheel-col {
    display: flex;
    flex-direction: column;
}

.dob-wheel-list {
    height: 200px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: y mandatory;
    padding: 0;
    margin: 0;
    text-align: center;
}

.dob-wheel-list::-webkit-scrollbar {
    display: none;
}

.dob-wheel-item {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.05;
}

.dob-wheel-spacer {
    flex: 0 0 auto;
}

.dob-wheel-item {
    font-size: 1.28rem;
    font-weight: 700;
    color: #7390b3;
    opacity: 0.58;
    transition: color 0.16s ease, opacity 0.16s ease, transform 0.16s ease, font-size 0.16s ease;
    scroll-snap-align: center;
    user-select: none;
}

.dob-wheel-item.active {
    color: #133b67;
    opacity: 1;
    font-size: 1.62rem;
    font-weight: 800;
    transform: scale(1.01);
}

.dob-age-hint {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5c7898;
    margin-bottom: 4px;
    transition: color 0.18s ease;
}

.dob-age-hint.flash {
    animation: dob-age-flash 0.58s ease 2;
}

@keyframes dob-age-flash {
    0%,
    100% {
        color: #5c7898;
    }
    50% {
        color: #c03d2b;
    }
}

.auth-story-card .story-input-wrap i {
    color: #6486b1;
}

.auth-story-card .story-input-wrap input {
    background: #ffffff;
    color: #14355a;
    border: 1px solid #bdd2ea;
}

.auth-story-card .story-input-wrap input::placeholder {
    color: #879ebc;
}

.story-next-btn {
    margin-top: 2px;
}

.auth-story-card .auth-btn {
    background: linear-gradient(145deg, #1da1f2, #3bb6ff);
    border: none;
    box-shadow: 0 8px 18px rgba(40, 122, 190, 0.22);
}

.auth-story-card .auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.01);
}

.auth-story-card .auth-btn.ghost {
    background: transparent;
    color: #2d5f94;
    border: 1px solid rgba(110, 146, 187, 0.45);
    box-shadow: none;
}

.story-split-actions .auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.story-mode-switch {
    background: #edf4fc;
    border-color: #ccdff2;
}

.story-mode-switch button {
    color: #5f7ea4;
}

.story-mode-switch button.active {
    background: #ffffff;
    color: #174978;
    box-shadow: 0 2px 8px rgba(54, 106, 161, 0.12);
}

.auth-story-card .otp-target,
.auth-story-card .link-btn {
    color: #3e6998;
}

.auth-story-card .auth-feedback {
    color: #2e577f;
}

.signup-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}

.progress-step {
    border-radius: 12px;
    border: 1px solid #d5e2f6;
    background: #f5f9ff;
    padding: 8px 6px;
    text-align: center;
    color: #70839e;
}

.progress-step span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 9999px;
    background: #d4e4fb;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.progress-step small {
    display: block;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.progress-step.active {
    border-color: #7dbff1;
    background: linear-gradient(145deg, #e8f6ff, #e7fff7);
    color: #124171;
}

.progress-step.active span {
    background: linear-gradient(145deg, var(--auth-brand), var(--auth-accent-alt));
    color: #fff;
}

.auth-entry-splash {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1DA1F2, #17c3b2, #ff7b54);
}

.auth-entry-splash.fade-out {
    opacity: 0;
    transition: opacity 0.24s ease;
}

.auth-entry-logo {
    text-align: center;
    color: #fff;
    animation: splash-pop 0.5s ease;
}

.auth-entry-logo i {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: inline-grid;
    place-items: center;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    margin-bottom: 10px;
}

.auth-entry-logo p {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.22rem;
}

.reveal-up {
    opacity: 0;
    transform: translateY(18px);
    animation: reveal-up 0.52s ease forwards;
}

.reveal-up.delay-1 {
    animation-delay: 0.08s;
}

@media (min-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr 1.1fr;
        gap: 26px;
        padding-top: 4vh;
    }

    .auth-hero {
        min-height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-card {
        padding: 28px;
    }

    .auth-single-shell {
        max-width: 640px;
        min-height: calc(100vh - 80px);
    }

    .auth-single-card {
        min-height: 0;
        padding: 30px 28px 22px;
    }

    .auth-page-signup .auth-single-card {
        max-height: calc(100vh - 56px);
        padding: 26px 24px 20px;
    }

    .story-headline {
        margin-bottom: 18px;
    }
}

@keyframes blob-float {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-12px) scale(1.03);
    }
}

@keyframes step-in {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes reveal-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes splash-pop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
