.container {
    width: 100%;
    min-height: 100dvh;
    position: relative;
}

.screen {
    display: none;
    width: 100%;
    min-height: 100dvh;
    flex-direction: column;
    background: var(--surface);
    padding-top: var(--safe-top);
}

.screen.active {
    display: flex;
    animation: screenIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen-welcome {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen-welcome .bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #ffffff;
}

.screen-welcome .bg picture,
.screen-welcome .bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.screen-welcome .bg img {
    object-fit: cover;
    object-position: center top;
    transform: scale(1.02);
    transform-origin: center top;
}

.screen-welcome .bg::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 24%,
        rgba(255, 255, 255, 0.92) 55%,
        #ffffff 80%
    );
}

.screen-welcome .spacer {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 36dvh;
}

.screen-welcome .welcome-content {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    padding: 0 28px;
    text-align: center;
}

.screen-welcome .welcome-content h1 {
    font-size: clamp(26px, 7vw, 30px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text);
    margin: 0 0 14px;
}

.screen-welcome .welcome-content .desc {
    font-size: 15px;
    line-height: 1.47;
    color: var(--body);
    max-width: 21.5em;
    margin: 0 auto;
}

.screen-welcome .welcome-content .desc a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.screen-welcome .welcome-footer {
    position: relative;
    z-index: 3;
    margin-top: auto;
    padding: 30px 20px calc(12px + var(--safe-bottom));
    text-align: center;
    background: #ffffff;
}

.screen-welcome .welcome-cta {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 420px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.screen-welcome .welcome-cta:active {
    background: var(--green-pressed);
}

.screen-welcome .legal {
    margin: 12px auto 0;
    max-width: 310px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
}

.screen-welcome .legal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.screen-inner,
.screen-auth {
    padding: 12px 24px calc(20px + var(--safe-bottom));
}

.inner-body,
.auth-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 28px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.inner-footer,
.auth-footer {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding-top: 8px;
}

.screen-auth .auth-footer {
    padding-bottom: 8px;
}

.auth-icon {
    margin-bottom: 22px;
    line-height: 0;
}

.auth-emoji {
    font-size: 78px;
    line-height: 1;
    margin: 8px 0 18px;
}

.auth-title {
    font-size: clamp(26px, 7vw, 30px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text);
    margin: 0 0 12px;
}

.auth-desc {
    font-size: 16px;
    line-height: 1.4;
    color: #000000;
    margin: 0 0 32px;
    max-width: 20.5em;
}

.auth-desc a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

.auth-desc b {
    font-weight: 700;
}

.step-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e8f4fd 0%, #f0f7ff 100%);
    border: 1px solid rgba(0, 122, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.08);
    margin-bottom: 24px;
}

.step-icon.success {
    background: linear-gradient(145deg, #e8f9ee 0%, #f0fdf4 100%);
    border-color: rgba(52, 199, 89, 0.12);
    box-shadow: 0 8px 24px rgba(52, 199, 89, 0.1);
}

.title {
    font-size: clamp(24px, 6.5vw, 28px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: var(--text);
    margin-bottom: 12px;
}

.desc {
    font-size: 15px;
    line-height: 1.47;
    color: var(--body);
    margin-bottom: 28px;
    max-width: 22em;
}

.desc a,
.email-highlight {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
}

#screen-wait {
    justify-content: center;
    align-items: center;
}

#screen-wait .inner-body {
    justify-content: center;
    padding-top: 0;
}

@media (max-height: 700px) {
    .screen-welcome .spacer {
        min-height: 28dvh;
    }
}
