[data-screen][hidden],
.funnel-screen[hidden] {
    display: none !important;
}

.funnel-screen {
    min-height: 100svh;
    background: #f2f2f7;
    color: #1c1c1e;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ios-upload-screen,
.ios-auth-screen {
    position: relative;
    overflow-x: hidden;
}

.ios-dots {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(#d1d1d6 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.58;
}

.upload-flow-shell,
.auth-flow-shell {
    position: relative;
    z-index: 1;
    width: min(100%, 900px);
    margin: 0 auto;
}

.upload-flow-shell {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 48px 16px 44px;
}

.auth-flow-shell {
    display: flex;
    min-height: 100svh;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
    padding: 34px 20px;
}

.upload-flow-header {
    display: grid;
    gap: 26px;
    justify-items: center;
    text-align: center;
}

.upload-flow-header .ios-back-link {
    justify-self: start;
}

.upload-flow-header h1 {
    margin: 0;
    color: #1c1c1e;
    font-size: clamp(32px, 5vw, 42px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.upload-flow-header h1 span {
    color: #007aff;
}

.upload-flow-header p {
    max-width: 660px;
    margin: 14px auto 0;
    color: #8e8e93;
    font-size: 17px;
    line-height: 1.62;
    font-weight: 500;
}

.ios-back-link {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 8px;
    min-height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8e8e93;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ios-back-link:hover {
    color: #007aff;
}

.ios-back-link svg {
    transition: transform 0.2s ease;
}

.ios-back-link:hover svg {
    transform: translateX(-4px);
}

.upload-flow-form {
    display: grid;
    gap: 32px;
}

.upload-card,
.photo-guide-card {
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04), 0 4px 10px rgba(0, 0, 0, 0.02);
}

.upload-card {
    padding: clamp(24px, 4vw, 40px);
}

.ios-drop-zone {
    position: relative;
    display: flex;
    min-height: 310px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 42px 24px;
    border: 2px dashed rgba(0, 122, 255, 0.3);
    border-radius: 24px;
    background: #f8fafc;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.ios-drop-zone:hover,
.ios-drop-zone.is-dragover {
    border-color: rgba(0, 122, 255, 0.56);
    background: rgba(229, 241, 255, 0.55);
    transform: translateY(-1px);
}

.ios-drop-zone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.drop-icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: 999px;
    background: #fff;
    color: #007aff;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.12);
    transition: transform 0.25s ease;
}

.ios-drop-zone:hover .drop-icon,
.ios-drop-zone.is-dragover .drop-icon {
    transform: scale(1.05);
}

.drop-title {
    color: #1c1c1e;
    font-size: 20px;
    font-weight: 800;
}

.drop-or {
    margin-top: 8px;
    color: #8e8e93;
    font-size: 15px;
}

.drop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 18px;
    padding: 0 24px;
    border: 1px solid #e5e5ea;
    border-radius: 999px;
    background: #fff;
    color: #1c1c1e;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.04);
}

.upload-rules {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.upload-rules span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 14px;
    border: 1px solid rgba(229, 229, 234, 0.65);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #8e8e93;
    font-size: 13px;
    font-weight: 650;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
}

.upload-preview-block {
    margin-top: 32px;
}

.upload-preview-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.upload-preview-heading h2 {
    margin: 0;
    color: #1c1c1e;
    font-size: 16px;
    font-weight: 750;
}

.upload-preview-heading span {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: 0 10px;
    border-radius: 8px;
    background: #f2f2f7;
    color: #8e8e93;
    font-size: 13px;
    font-weight: 650;
}

.upload-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.preview-item,
.preview-slot {
    width: 104px;
    height: 104px;
    border-radius: 20px;
}

.preview-item {
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e5ea;
    background: #f2f2f7;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    overflow: hidden;
    padding: 4px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #1c1c1e;
    font-size: 10px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #1c1c1e;
    cursor: pointer;
    opacity: 0;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.preview-item:hover .preview-remove,
.preview-remove:focus-visible {
    opacity: 1;
}

.preview-remove:hover {
    background: #ff3b30;
    color: #fff;
}

.preview-slot {
    display: grid;
    place-items: center;
    border: 2px dashed #e5e5ea;
    background: rgba(242, 242, 247, 0.56);
    color: rgba(142, 142, 147, 0.44);
}

.photo-guide-card {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 40px);
}

.photo-guide-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(32px, 6vw, 80px);
}

.photo-guide-grid::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(229, 229, 234, 0.68);
    content: "";
}

.photo-guide-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.photo-guide-title span {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.photo-guide-title h3 {
    margin: 0;
    color: #1c1c1e;
    font-size: 22px;
    font-weight: 800;
}

.photo-guide-column.is-good .photo-guide-title span {
    background: #ebf9ee;
    color: #34c759;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.15);
}

.photo-guide-column.is-bad .photo-guide-title span {
    background: #ffebee;
    color: #ff3b30;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.15);
}

.photo-guide-column ul {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.photo-guide-column li {
    position: relative;
    min-height: 22px;
    padding-left: 34px;
    color: #1c1c1e;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 650;
}

.photo-guide-column li::before {
    position: absolute;
    top: 1px;
    left: 0;
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
}

.photo-guide-column.is-good li::before {
    content: "✓";
    background: #ebf9ee;
    color: #34c759;
}

.photo-guide-column.is-bad li::before {
    content: "×";
    background: #ffebee;
    color: #ff3b30;
}

.upload-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    margin: 8px 0 12px;
}

.ios-consent {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 640px;
    color: #8e8e93;
    font-size: 14px;
    line-height: 1.42;
    font-weight: 500;
    cursor: pointer;
}

.ios-consent.compact {
    max-width: none;
    font-size: 13px;
}

.ios-consent input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.checkbox-visual {
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    border: 2px solid #e5e5ea;
    border-radius: 7px;
    background: #fff;
    color: #fff;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.checkbox-visual svg {
    opacity: 0;
    transform: scale(0.55);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ios-consent input:checked + .checkbox-visual {
    border-color: #007aff;
    background: #007aff;
}

.ios-consent input:checked + .checkbox-visual svg {
    opacity: 1;
    transform: scale(1);
}

.ios-consent a {
    color: #007aff;
    font-weight: 800;
}

.ios-primary-button {
    display: inline-flex;
    min-height: 60px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 24px;
    background: #007aff;
    color: #fff;
    padding: 0 48px;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 122, 255, 0.39);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ios-primary-button.full {
    width: 100%;
    min-height: 56px;
    border-radius: 16px;
    font-size: 17px;
}

.ios-primary-button:hover {
    background: #0062cc;
    box-shadow: none;
    transform: translateY(1px);
}

.ios-primary-button[disabled] {
    cursor: not-allowed;
    opacity: 0.52;
    background: #b8c0cc;
    box-shadow: none;
    transform: none;
}

.ios-primary-button.is-loading[disabled] {
    cursor: wait;
    opacity: 0.72;
    background: #007aff;
    transform: none;
}

.privacy-note {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid rgba(229, 229, 234, 0.5);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    color: #8e8e93;
    font-size: 13px;
    font-weight: 650;
    backdrop-filter: blur(10px);
}

.privacy-note svg {
    color: #34c759;
}

.auth-topline {
    width: 100%;
    margin-bottom: 24px;
}

.auth-card {
    width: 100%;
    overflow: hidden;
    border-radius: 32px;
    background: #fff;
    padding: clamp(28px, 6vw, 40px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
}

.processing-note {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding: 16px;
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 20px;
    background: #f8f9fa;
}

.processing-stack {
    display: flex;
    flex: 0 0 auto;
    margin-left: 2px;
}

.processing-stack div {
    position: relative;
    width: 42px;
    height: 50px;
    overflow: hidden;
    border: 2px solid #fff;
    border-radius: 10px;
    background: #e5e7eb;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

.processing-stack div + div {
    margin-left: -12px;
}

.processing-stack div:nth-child(1) {
    z-index: 1;
}

.processing-stack div:nth-child(2) {
    z-index: 2;
}

.processing-stack div:nth-child(3) {
    z-index: 3;
}

.processing-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.processing-stack div:nth-child(1) img,
.processing-stack div:nth-child(2) img {
    filter: blur(2px);
    opacity: 0.8;
}

.scan-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -20%;
    z-index: 4;
    width: 4px;
    background: rgba(0, 122, 255, 0.82);
    box-shadow: 0 0 8px rgba(0, 122, 255, 0.8);
    animation: scan-horizontal 2s ease-in-out infinite;
}

.processing-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.processing-status span {
    position: relative;
    display: inline-flex;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #007aff;
}

.processing-status span::before {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    content: "";
    animation: ping 1.3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.processing-status strong {
    color: #007aff;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.processing-note p {
    margin: 4px 0 0;
    color: #1c1c1e;
    font-size: 14px;
    line-height: 1.34;
    font-weight: 650;
}

.auth-heading {
    margin-bottom: 30px;
    text-align: center;
}

.auth-heading h1 {
    margin: 0;
    color: #1c1c1e;
    font-size: clamp(28px, 8vw, 32px);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.auth-heading p {
    margin: 12px 0 0;
    color: #8e8e93;
    font-size: 16px;
    font-weight: 600;
}

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

.ios-field-label {
    color: #8e8e93;
    font-size: 14px;
    font-weight: 750;
}

.phone-field-shell {
    display: flex;
    min-height: 56px;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.phone-field-shell:focus-within,
.code-input:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.country-prefix {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border-right: 1px solid rgba(229, 231, 235, 0.86);
    background: #f8f9fa;
    color: #1c1c1e;
    font-size: 16px;
    font-weight: 650;
}

.country-prefix svg:first-child {
    width: 22px;
    height: 15px;
    flex: 0 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.country-prefix svg:last-child {
    color: #8e8e93;
}

.phone-field-shell input,
.code-input {
    width: 100%;
    border: 0;
    background: transparent;
    color: #1c1c1e;
    font: inherit;
    outline: none;
}

.phone-field-shell input {
    min-width: 0;
    padding: 0 16px;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
}

.phone-field-shell input::placeholder,
.code-input::placeholder {
    color: #d1d5db;
}

.code-input {
    min-height: 64px;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 16px;
    background: #fff;
    font-size: clamp(28px, 9vw, 36px);
    font-weight: 850;
    letter-spacing: 0.16em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.auth-helper {
    margin: -4px 0 0;
    color: #8e8e93;
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
}

.dev-code {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #e5f1ff;
    color: #005bc0;
    font-size: 14px;
    font-weight: 850;
    text-align: center;
}

.form-error {
    min-height: 20px;
    margin: 0;
    color: #ff3b30;
    font-size: 14px;
    font-weight: 750;
    text-align: center;
}

.funnel-container {
    width: min(100%, 680px);
    margin: 0 auto;
    padding: 34px 20px;
}

.funnel-layout {
    display: grid;
    min-height: calc(100svh - 68px);
    place-items: center;
}

.funnel-panel {
    width: 100%;
    border-radius: 32px;
    background: #fff;
    padding: clamp(28px, 6vw, 40px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
}

.waitlist-badge {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 13px;
    border-radius: 999px;
    background: #ebf9ee;
    color: #167a35;
    font-size: 13px;
    font-weight: 850;
}

.funnel-panel h1 {
    margin: 18px 0 0;
    color: #1c1c1e;
    font-size: clamp(30px, 7vw, 42px);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.funnel-lead {
    margin: 18px 0 0;
    color: #8e8e93;
    font-size: 17px;
    line-height: 1.65;
    font-weight: 600;
}

.final-panel {
    text-align: left;
}

.final-panel .ios-primary-button,
.final-panel .btn {
    margin-top: 28px;
}

@keyframes scan-horizontal {
    0% {
        left: -20%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: -20%;
    }
}

@keyframes ping {
    75%,
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

.legal-page {
    min-height: 100svh;
    padding: 48px 20px;
    background: #f4f6f9;
    color: #1c1c1e;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.legal-content {
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(20, 28, 45, 0.06);
}

.legal-content h1 {
    margin: 0 0 18px;
    font-size: 34px;
    line-height: 1.1;
}

.legal-content h2 {
    margin: 28px 0 10px;
    font-size: 20px;
}

.legal-content p,
.legal-content li {
    color: #4b5563;
    font-size: 16px;
    line-height: 1.65;
}

.legal-content a {
    color: #007aff;
    font-weight: 800;
}

@media (max-width: 860px) {
    .upload-flow-shell {
        gap: 24px;
        padding-top: 32px;
    }

    .photo-guide-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .photo-guide-grid::before {
        display: none;
    }
}

@media (max-width: 640px) {
    .upload-flow-shell,
    .auth-flow-shell {
        padding-right: 14px;
        padding-left: 14px;
    }

    .upload-card,
    .photo-guide-card,
    .auth-card,
    .funnel-panel {
        border-radius: 26px;
    }

    .upload-card,
    .photo-guide-card {
        padding: 20px;
    }

    .ios-drop-zone {
        min-height: 276px;
        padding: 34px 18px;
    }

    .upload-rules {
        gap: 8px;
    }

    .upload-rules span {
        min-height: 30px;
        padding: 0 11px;
        font-size: 12px;
    }

    .upload-preview-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .preview-item,
    .preview-slot {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: 18px;
    }

    .preview-remove {
        opacity: 1;
    }

    .ios-primary-button {
        width: 100%;
        padding: 0 22px;
    }

    .privacy-note {
        align-items: flex-start;
        border-radius: 18px;
        padding: 10px 14px;
        line-height: 1.35;
    }

    .processing-note {
        align-items: flex-start;
    }

    .processing-stack div {
        width: 38px;
        height: 46px;
    }

    .country-prefix {
        padding: 0 12px;
    }

    .phone-field-shell input {
        padding: 0 12px;
        font-size: 17px;
    }
}

@media (max-width: 430px) {
    .upload-flow-header {
        text-align: center;
    }

    .upload-flow-header p {
        margin-right: auto;
        margin-left: auto;
    }

    .auth-card {
        padding: 24px 18px;
    }

    .processing-note {
        gap: 12px;
        padding: 13px;
    }

    .upload-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-guide-title h3 {
        font-size: 20px;
    }

    .photo-guide-column li {
        font-size: 15px;
    }

    .legal-content {
        padding: 26px 20px;
        border-radius: 20px;
    }
}
