/* =========================================================
   Smile Scan AI - Premium Meta-style Patient Flow UI
   Clean blue system, no gold legacy styles
   ========================================================= */

@property --ssai-a {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.ssai-wrap {
    --ssai-bg: #f7faff;
    --ssai-card: #ffffff;
    --ssai-card-soft: #f8fbff;
    --ssai-text: #111827;
    --ssai-muted: #667085;
    --ssai-border: rgba(37, 99, 235, 0.14);
    --ssai-soft-border: rgba(15, 23, 42, 0.08);

    --ssai-brand: #2563eb;
    --ssai-brand-2: #38bdf8;
    --ssai-brand-3: #60a5fa;
    --ssai-brand-dark: #1d4ed8;
    --ssai-brand-gradient: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
    --ssai-brand-soft-gradient:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.12), transparent 36%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);

    --ssai-shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
    --ssai-soft-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    --ssai-blue-shadow: 0 18px 45px rgba(37, 99, 235, 0.14);

    --ssai-radius-lg: 28px;
    --ssai-radius-md: 18px;
    --ssai-radius-sm: 12px;

    max-width: 980px;
    margin: 0 auto;
    padding: 32px 16px;
    color: var(--ssai-text);
    font-family: Manrope, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ssai-wrap,
.ssai-wrap *,
.ssai-wrap *::before,
.ssai-wrap *::after {
    box-sizing: border-box;
}

/* =========================================================
   Logo intro
   ========================================================= */

.ssai-process-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 22px;
    animation: ssaiFadeUp 700ms ease both;
}

.ssai-process-logo img {
    max-width: 210px;
    width: 54vw;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.08));
}

@keyframes ssaiFadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Cards / hero
   ========================================================= */

.ssai-card {
    max-width: 100%;
    background: var(--ssai-card);
    border: 1px solid var(--ssai-soft-border);
    border-radius: var(--ssai-radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--ssai-shadow);
}

.ssai-hero-card {
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: var(--ssai-radius-lg);
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        conic-gradient(
            from var(--ssai-a),
            rgba(56, 189, 248, 0) 0deg,
            rgba(56, 189, 248, 0) 8deg,
            rgba(125, 211, 252, 0.95) 18deg,
            rgba(219, 234, 254, 1) 28deg,
            rgba(96, 165, 250, 0.95) 38deg,
            rgba(37, 99, 235, 0) 70deg,
            rgba(37, 99, 235, 0) 360deg
        ) border-box;
    animation: ssaiHeroBorderSpin 3.6s linear infinite;
    box-shadow: var(--ssai-blue-shadow), var(--ssai-shadow);
}

.ssai-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(139, 92, 246, 0.06), transparent 30%),
        radial-gradient(circle at 82% 82%, rgba(96, 165, 250, 0.06), transparent 34%);
    pointer-events: none;
}

.ssai-hero-card > * {
    position: relative;
    z-index: 1;
}

@keyframes ssaiHeroBorderSpin {
    to {
        --ssai-a: 360deg;
    }
}

.ssai-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(37, 99, 235, 0.10);
    color: #2563eb;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    margin: 0 0 12px;
    backdrop-filter: blur(10px);
}

.ssai-card h1,
.ssai-card h2 {
    margin-top: 0;
    color: var(--ssai-text);
}

.ssai-card h1 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    margin-bottom: 16px;
}

.ssai-card h2 {
    font-size: 24px;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.ssai-subtitle {
    font-size: 18px;
    max-width: 650px;
    color: var(--ssai-muted);
    opacity: 0.95;
}

.ssai-muted {
    color: var(--ssai-muted);
}

.ssai-disclaimer {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.10);
    color: var(--ssai-muted);
    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   Step behaviour / progress
   ========================================================= */

.ssai-step {
    display: none;
}

.ssai-step.ssai-step-active,
.ssai-step-active {
    display: block;
}

.ssai-progress-wrap {
    margin: 24px 0;
    padding: 14px 16px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--ssai-soft-shadow);
    backdrop-filter: blur(14px);
}

.ssai-progress-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px 10px;
    font-weight: 900;
    color: var(--ssai-text);
}

.ssai-progress-label,
.ssai-progress-percent {
    font-size: 0.82rem;
    font-weight: 900;
    color: var(--ssai-text);
}

.ssai-progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(37, 99, 235, 0.10);
}

.ssai-progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: var(--ssai-brand-gradient);
    transition: width 260ms ease;
}

/* =========================================================
   Forms
   ========================================================= */

.ssai-grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    max-width: 100%;
}

.ssai-grid-2 > *,
.ssai-grid-2 p {
    min-width: 0;
    max-width: 100%;
    margin: 0;
}

.ssai-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ssai-step[data-step="1"] {
    padding: 30px;
}

.ssai-step[data-step="1"] h2 {
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.ssai-form label,
.ssai-grid-2 label,
.ssai-step label:not(.ssai-checkbox):not(.ssai-upload-label) {
    display: block;
    margin-bottom: 8px;
    font-size: 0.86rem;
    font-weight: 900;
    color: #26313d;
}

.ssai-form input[type="text"],
.ssai-form input[type="email"],
.ssai-form input[type="tel"],
.ssai-form input[type="url"],
.ssai-form input[type="file"],
.ssai-form select,
.ssai-step input[type="text"],
.ssai-step input[type="email"],
.ssai-step input[type="tel"],
.ssai-step select,
.ssai-step textarea {
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(31, 41, 51, 0.14);
    background: #fbfdff;
    color: var(--ssai-text);
    font: inherit;
    font-weight: 650;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, transform 180ms ease;
}

.ssai-step input[type="text"]:focus,
.ssai-step input[type="email"]:focus,
.ssai-step input[type="tel"]:focus,
.ssai-step select:focus,
.ssai-step textarea:focus {
    border-color: var(--ssai-brand);
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.15),
        0 8px 24px rgba(15, 23, 42, 0.06);
}

.ssai-step select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #6b7280 50%),
        linear-gradient(135deg, #6b7280 50%, transparent 50%);
    background-position:
        calc(100% - 22px) 22px,
        calc(100% - 16px) 22px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

.ssai-checkbox {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    margin: 14px 0;
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, 0.10);
    background: #f8fbff;
    color: var(--ssai-text);
    font-size: 0.92rem;
    font-weight: 500 !important;
    line-height: 1.45;
    cursor: pointer;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ssai-checkbox:hover {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.36);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.ssai-checkbox input {
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--ssai-brand);
    flex: 0 0 auto;
}

/* =========================================================
   Buttons
   ========================================================= */

.ssai-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    text-decoration: none;
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 900;
    letter-spacing: -0.01em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.ssai-btn:hover {
    transform: translateY(-1px);
}

.ssai-btn-primary,
.ssai-submit-btn.ssai-btn-primary {
    border: 0;
    background: var(--ssai-brand-gradient);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.ssai-btn-primary:hover,
.ssai-submit-btn.ssai-btn-primary:hover {
    filter: brightness(1.04);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

.ssai-btn-secondary {
    background: #ffffff;
    color: var(--ssai-text);
    border: 1px solid rgba(31, 41, 51, 0.12);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ssai-btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none;
}

.ssai-submit-btn {
    margin-top: 18px;
    width: 100%;
    font-size: 16px;
}

.ssai-cta-row,
.ssai-photo-actions,
.ssai-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ssai-cta-row {
    margin-top: 18px;
}

.ssai-photo-actions {
    margin-top: 14px;
}

.ssai-nav-row {
    justify-content: space-between;
    margin-top: 22px;
}

.ssai-nav-row .ssai-btn {
    min-width: 140px;
}

.ssai-start-camera-btn {
    display: none !important;
}

/* =========================================================
   Alerts / status
   ========================================================= */

.ssai-alert {
    margin: 16px 0;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff3f3;
    border: 1px solid #f1b8b8;
    color: #8a1f1f;
    font-weight: 800;
}

.ssai-success-card {
    border-color: rgba(34, 197, 94, 0.22);
    background: #fbfffc;
}

.ssai-upload-label {
    position: relative;
    overflow: hidden;
}

.ssai-upload-status {
    margin-top: 12px;
    min-height: 22px;
    text-align: center;
    font-weight: 900;
    color: var(--ssai-muted);
}

.ssai-upload-status-info {
    color: #475467;
}

.ssai-upload-status-success {
    color: #1f8d4e;
}

.ssai-upload-status-error {
    color: #b42318;
}

/* =========================================================
   Fixed camera/photo steps
   Applies to steps 2-7 only
   ========================================================= */

.ssai-step[data-step="2"].ssai-step-active,
.ssai-step[data-step="3"].ssai-step-active,
.ssai-step[data-step="4"].ssai-step-active,
.ssai-step[data-step="5"].ssai-step-active,
.ssai-step[data-step="6"].ssai-step-active,
.ssai-step[data-step="7"].ssai-step-active {
    min-height: calc(100vh - 120px);
    padding: 18px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    overflow: hidden;
}

.ssai-step[data-step="2"] > p,
.ssai-step[data-step="3"] > p,
.ssai-step[data-step="4"] > p,
.ssai-step[data-step="5"] > p,
.ssai-step[data-step="6"] > p,
.ssai-step[data-step="7"] > p {
    margin: 0;
}

.ssai-step[data-step="2"] h2,
.ssai-step[data-step="3"] h2,
.ssai-step[data-step="4"] h2,
.ssai-step[data-step="5"] h2,
.ssai-step[data-step="6"] h2,
.ssai-step[data-step="7"] h2 {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.9rem);
    letter-spacing: -0.035em;
}

.ssai-step[data-step="2"] > p:not(.ssai-muted),
.ssai-step[data-step="3"] > p:not(.ssai-muted),
.ssai-step[data-step="4"] > p:not(.ssai-muted),
.ssai-step[data-step="5"] > p:not(.ssai-muted),
.ssai-step[data-step="6"] > p:not(.ssai-muted),
.ssai-step[data-step="7"] > p:not(.ssai-muted) {
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--ssai-muted);
}

.ssai-photo-panel {
    min-height: 0;
    margin-top: 18px;
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 12px;
}

.ssai-camera-shell {
    position: relative;
    width: 100%;
    min-height: 0;
    height: min(58vh, 620px);
    aspect-ratio: 4 / 3;
    border-radius: 28px;
    overflow: hidden;
    background: #111827;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
}

.ssai-camera-preview,
.ssai-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #111827;
}

.ssai-camera-preview {
    display: block;
    transform: scaleX(-1);
}

.ssai-photo-preview {
    transform: none;
}

.ssai-camera-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, transparent 34%, rgba(0, 0, 0, 0.22) 100%);
}

.ssai-mouth-guide {
    width: min(58vw, 420px);
    height: min(24vw, 155px);
    max-width: 78%;
    max-height: 34%;
    border: 3px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    box-shadow:
        0 0 0 999px rgba(0, 0, 0, 0.08),
        0 0 28px rgba(255, 255, 255, 0.22);
}

/* =========================================================
   Result / final screen
   ========================================================= */

.ssai-step[data-step="8"],
.ssai-step[data-step="9"] {
    padding: 30px;
}

.ssai-result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.ssai-result-card {
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.10), transparent 34%),
        #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.ssai-result-label {
    margin: 0 0 6px;
    color: var(--ssai-muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ssai-result-card h3 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.ssai-result-summary {
    margin-top: 24px;
    padding: 28px;
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.055), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.94));
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.ssai-result-summary h3 {
    margin: 0 0 14px;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.ssai-result-summary p {
    margin: 0 0 16px;
    line-height: 1.72;
    font-size: 1rem;
}

.ssai-result-summary p:last-child {
    margin-bottom: 0;
}

.ssai-result-preview-wrap {
    margin: 28px 0 0;
    padding: 18px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,251,255,0.94));
    border: 1px solid rgba(37, 99, 235, 0.10);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.ssai-result-preview-wrap h3 {
    margin: 0 0 8px;
}

.ssai-preview-image {
    display: block;
    width: 100%;
    max-width: 680px;
    height: auto;
    border-radius: 22px;
    margin: 16px auto 0;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

#ssai_preview_status_text {
    max-width: 680px;
    margin: 12px auto 0;
    text-align: center;
}

.ssai-result-caveat {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(31, 41, 51, 0.08);
    font-size: 14px;
    color: var(--ssai-muted);
}

@media (max-width: 720px) {
    .ssai-result-summary {
        padding: 20px;
        border-radius: 20px;
    }

    .ssai-result-preview-wrap {
        padding: 14px;
        border-radius: 18px;
    }

    .ssai-preview-image {
        border-radius: 18px;
    }
}

/* Final completed result sparkle border - smooth perimeter scan */
.ssai-result-summary.ssai-result-summary-complete {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.055), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.94));
    box-shadow:
        0 18px 52px rgba(37, 99, 235, 0.14),
        0 18px 48px rgba(15, 23, 42, 0.08);
}



@keyframes ssaiPerimeterSweep {
    from {
        background-position: 240% 0;
    }

    to {
        background-position: -240% 0;
    }
}

/* Make final result screen feel like separate premium sections, not cards inside a card */
.ssai-step[data-step="9"].ssai-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.ssai-step[data-step="9"] > h2,
.ssai-step[data-step="9"] > p,
.ssai-step[data-step="9"] .ssai-loading-box {
    margin-left: 0;
    margin-right: 0;
}

/* =========================================================
   Loading
   ========================================================= */

.ssai-loading-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 16px;
    background: #f8fbff;
}

.ssai-loading-orb {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--ssai-brand-gradient);
    animation: ssaiPulse 1.4s ease-in-out infinite;
    flex: 0 0 auto;
}

.ssai-loading-box p {
    margin: 0;
    font-weight: 800;
    color: var(--ssai-text);
}

@keyframes ssaiPulse {
    0% {
        transform: scale(0.85);
        opacity: 0.45;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }

    100% {
        transform: scale(0.85);
        opacity: 0.45;
    }
}

/* =========================================================
   Full screen capture flash
   ========================================================= */

.ssai-global-flash {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 2147483647;
}

.ssai-global-flash.ssai-global-flash-active {
    animation: ssaiGlobalFlash 520ms ease-out;
}

@keyframes ssaiGlobalFlash {
    0% {
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    55% {
        opacity: 0.72;
    }

    100% {
        opacity: 0;
    }
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 760px) {
    .ssai-wrap {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ssai-card {
        padding: 22px;
        border-radius: 22px;
    }

    .ssai-card h1 {
        font-size: 38px;
    }

    .ssai-process-logo img {
        max-width: 170px;
    }

    .ssai-grid-2,
    .ssai-photo-grid,
    .ssai-result-grid {
        grid-template-columns: 1fr;
    }

    .ssai-step[data-step="1"] {
        padding: 22px;
    }

    .ssai-step[data-step="2"].ssai-step-active,
    .ssai-step[data-step="3"].ssai-step-active,
    .ssai-step[data-step="4"].ssai-step-active,
    .ssai-step[data-step="5"].ssai-step-active,
    .ssai-step[data-step="6"].ssai-step-active,
    .ssai-step[data-step="7"].ssai-step-active {
        min-height: calc(100svh - 92px);
        padding: 14px;
        border-radius: 22px;
        gap: 10px;
    }

    .ssai-camera-shell {
        height: 54svh;
        border-radius: 22px;
    }

    .ssai-nav-row {
        flex-direction: column;
    }

    .ssai-nav-row .ssai-btn,
    .ssai-photo-actions .ssai-btn {
        width: 100%;
    }

    .ssai-photo-actions,
    .ssai-nav-row {
        gap: 8px;
    }

    .ssai-btn {
        min-height: 44px;
        padding: 11px 16px;
        font-size: 0.92rem;
    }
}

@media (max-height: 740px) {
    .ssai-camera-shell {
        height: 48svh;
    }

    .ssai-step[data-step="2"] h2,
    .ssai-step[data-step="3"] h2,
    .ssai-step[data-step="4"] h2,
    .ssai-step[data-step="5"] h2,
    .ssai-step[data-step="6"] h2,
    .ssai-step[data-step="7"] h2 {
        font-size: 1.18rem;
    }

    .ssai-btn {
        min-height: 42px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* =========================================================
   Smile Scan AI - Premium ambient background
   Static, lightweight Meta / Apple style glow
   ========================================================= */

body:has(.ssai-wrap) {
    background:
        radial-gradient(circle at 18% 22%, rgba(139, 92, 246, 0.035), transparent 28%),
        radial-gradient(circle at 86% 58%, rgba(96, 165, 250, 0.035), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #fcfdff 48%, #f8fbff 100%);
    overflow-x: hidden;
}

.ssai-wrap {
    position: relative;
    isolation: isolate;
}

/* Keep the background premium but do not animate during camera/photo steps */
.ssai-wrap::before,
.ssai-wrap::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: -1;
    border-radius: 999px;
    transform: translateZ(0);
    will-change: auto;
}

.ssai-wrap::before {
    width: 460px;
    height: 460px;
    left: -220px;
    top: 180px;
    background: radial-gradient(
        circle,
        rgba(56, 189, 248, 0.12) 0%,
        rgba(37, 99, 235, 0.07) 42%,
        transparent 72%
    );
}

.ssai-wrap::after {
    width: 520px;
    height: 520px;
    right: -260px;
    top: 620px;
    background: radial-gradient(
        circle,
        rgba(124, 58, 237, 0.07) 0%,
        rgba(96, 165, 250, 0.055) 46%,
        transparent 76%
    );
}

@media (max-width: 760px) {
    .ssai-wrap::before {
        width: 320px;
        height: 320px;
        left: -180px;
        top: 160px;
        opacity: 0.7;
    }

    .ssai-wrap::after {
        width: 360px;
        height: 360px;
        right: -220px;
        top: 520px;
        opacity: 0.65;
    }
}

.ssai-hero-card h1,
.ssai-step h2,
.ssai-result-summary h3 {
    font-family: Sora, Manrope, Inter, system-ui, sans-serif;
}