.profile-onboarding-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: opacity .2s ease;
}

.profile-onboarding-modal.hidden {
    display: none !important;
}

.profile-onboarding-modal .hidden {
    display: none !important;
}

.profile-onboarding-modal.flex {
    display: flex !important;
}

.profile-onboarding-modal.opacity-0 {
    opacity: 0;
}

body.profile-onboarding-open {
    overflow: hidden;
}

.profile-onboarding-shell {
    width: min(1180px, calc(100vw - 36px));
    height: min(820px, calc(100dvh - 36px));
    min-height: 560px;
    overflow: hidden;
    border-radius: 34px;
    background: #fff;
    box-shadow: 0 36px 120px rgba(15, 23, 42, .28);
}

#profile-onboarding-form {
    position: relative;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas:
        "side main"
        "side footer";
}

.profile-onboarding-side {
    grid-area: side;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    background: #111827;
    color: #fff;
}

.profile-onboarding-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-onboarding-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #f97316;
    color: #fff;
    box-shadow: 0 14px 34px rgba(249, 115, 22, .35);
}

.profile-onboarding-mark svg {
    width: 24px;
    height: 24px;
}

.profile-onboarding-brand p {
    margin: 0 0 3px;
    color: #fb923c;
    font-size: 9px;
    font-weight: 1000;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.profile-onboarding-brand strong {
    display: block;
    color: #fff;
    font-size: 20px;
    font-weight: 1000;
    line-height: 1.05;
}

.profile-onboarding-progress {
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .08);
}

.profile-onboarding-progress__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #cbd5e1;
    font-size: 9px;
    font-weight: 1000;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.profile-onboarding-progress__head strong {
    color: #fff;
}

.profile-onboarding-progress__bar {
    height: 8px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.profile-onboarding-progress__bar span {
    display: block;
    width: 12%;
    height: 100%;
    border-radius: inherit;
    background: #f97316;
    transition: width .24s ease;
}

.profile-onboarding-progress p {
    margin: 10px 0 0;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
}

.profile-onboarding-steps {
    min-height: 0;
    overflow-y: auto;
    display: grid;
    gap: 8px;
    padding-right: 2px;
}

.profile-onboarding-steps button {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 16px;
    color: #94a3b8;
    text-align: left;
    transition: background .18s ease, color .18s ease;
}

.profile-onboarding-steps button span {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 1000;
}

.profile-onboarding-steps button strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 900;
}

.profile-onboarding-steps button.is-active,
.profile-onboarding-steps button:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.profile-onboarding-steps button.is-active span,
.profile-onboarding-steps button.is-complete span {
    background: #f97316;
    color: #fff;
}

.profile-onboarding-main {
    grid-area: main;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    padding: 28px 30px 22px;
    background: #fffaf5;
}

.profile-onboarding-step {
    display: none;
}

.profile-onboarding-step.is-active {
    display: block;
}

.profile-onboarding-step-head {
    margin-bottom: 20px;
}

.profile-onboarding-step-head p {
    margin: 0 0 6px;
    color: #f97316;
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.profile-onboarding-step-head h3 {
    margin: 0;
    color: #111827;
    font-size: 28px;
    font-weight: 1000;
    line-height: 1.04;
}

.profile-onboarding-step-head span {
    display: block;
    max-width: 720px;
    margin-top: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.profile-onboarding-cover {
    position: relative;
    height: 190px;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid #fed7aa;
    background: linear-gradient(135deg, #fff7ed 0%, #e0f2fe 100%);
    cursor: pointer;
}

.profile-onboarding-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-onboarding-cover__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 20px;
    color: #fff;
    text-align: center;
    background: linear-gradient(180deg, rgba(15,23,42,.08), rgba(15,23,42,.62));
}

.profile-onboarding-cover__overlay svg {
    width: 30px;
    height: 30px;
}

.profile-onboarding-cover__overlay strong {
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-onboarding-cover__overlay span {
    max-width: 360px;
    font-size: 12px;
    font-weight: 700;
    opacity: .86;
}

.profile-onboarding-grid {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.profile-onboarding-avatar-block {
    padding: 18px;
    border-radius: 26px;
    background: #fff;
    border: 1px solid #f1f5f9;
}

.profile-onboarding-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    display: block;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 999px;
    background: #f1f5f9;
    border: 4px solid #fff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
}

.profile-onboarding-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-onboarding-avatar span {
    position: absolute;
    inset: auto 10px 10px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
    color: #fff;
    font-size: 9px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-onboarding-avatar-block p {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
}

.profile-onboarding-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.profile-onboarding-fields label:last-child {
    grid-column: 1 / -1;
}

.profile-onboarding-fields span {
    display: block;
    margin: 0 0 7px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-onboarding-fields input,
.profile-onboarding-fields textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    padding: 13px 14px;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.profile-onboarding-fields textarea {
    min-height: 116px;
    resize: none;
}

.profile-onboarding-fields input:focus,
.profile-onboarding-fields textarea:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .12);
}

.profile-onboarding-question-list {
    display: grid;
    gap: 16px;
}

.profile-onboarding-question {
    margin: 0;
    padding: 18px;
    border-radius: 26px;
    background: #fff;
    border: 1px solid #f1f5f9;
    box-sizing: border-box;
}

.profile-onboarding-question__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}

.profile-onboarding-question__head span {
    min-width: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 1000;
    line-height: 1.2;
}

.profile-onboarding-question__head small {
    flex: 0 0 auto;
    color: #f97316;
    font-size: 9px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-onboarding-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.profile-onboarding-tag {
    display: inline-flex;
}

.profile-onboarding-tag input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-onboarding-tag span {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.profile-onboarding-tag input:checked + span {
    background: #fff7ed;
    border-color: #fb923c;
    color: #ea580c;
    box-shadow: 0 10px 22px rgba(249, 115, 22, .12);
}

.profile-onboarding-tag:hover span {
    transform: translateY(-1px);
}

.profile-onboarding-footer {
    grid-area: footer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}

.profile-onboarding-footer > div {
    display: flex;
    gap: 10px;
}

.profile-onboarding-primary,
.profile-onboarding-secondary,
.profile-onboarding-ghost {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 0 18px;
    font-size: 10px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.profile-onboarding-primary {
    background: #f97316;
    color: #fff;
    box-shadow: 0 14px 30px rgba(249, 115, 22, .25);
}

.profile-onboarding-primary:hover {
    background: #ea580c;
}

.profile-onboarding-secondary {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.profile-onboarding-ghost {
    background: transparent;
    color: #94a3b8;
}

.profile-onboarding-secondary:disabled,
.profile-onboarding-primary:disabled,
.profile-onboarding-ghost:disabled {
    opacity: .45;
    pointer-events: none;
}

.profile-onboarding-skip-warning {
    position: absolute;
    left: 50%;
    bottom: 82px;
    z-index: 5;
    width: min(560px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-radius: 22px;
    background: #111827;
    color: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .28);
}

.profile-onboarding-skip-warning.hidden {
    display: none !important;
}

.profile-onboarding-skip-warning strong {
    display: block;
    font-size: 14px;
    font-weight: 1000;
}

.profile-onboarding-skip-warning p {
    margin: 5px 0 0;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.profile-onboarding-skip-warning > div:last-child {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.profile-onboarding-skip-warning button {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 13px;
    font-size: 9px;
    font-weight: 1000;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.profile-onboarding-skip-warning button:first-child {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.profile-onboarding-skip-warning button:last-child {
    background: #fff;
    color: #111827;
}

.profile-onboarding-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 950;
    transform: translate(-50%, -14px);
    opacity: 0;
    max-width: min(420px, calc(100vw - 28px));
    padding: 12px 16px;
    border-radius: 16px;
    background: #111827;
    color: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .2);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    transition: opacity .2s ease, transform .2s ease;
}

.profile-onboarding-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.profile-onboarding-toast.is-error {
    background: #dc2626;
}

@media (max-width: 767px) {
    .profile-onboarding-modal {
        align-items: stretch;
        justify-content: flex-start;
        padding: 0;
        padding-top: env(safe-area-inset-top, 0px);
    }

    .profile-onboarding-shell {
        width: 100vw;
        height: calc(100dvh - env(safe-area-inset-top, 0px));
        border-radius: 24px 24px 0 0;
    }

    #profile-onboarding-form {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "side"
            "main"
            "footer";
    }

    .profile-onboarding-side {
        grid-row: auto;
        gap: 12px;
        padding: 14px;
    }

    .profile-onboarding-brand strong {
        font-size: 17px;
    }

    .profile-onboarding-progress {
        padding: 12px;
        border-radius: 18px;
    }

    .profile-onboarding-steps {
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 7px;
        padding-bottom: 2px;
    }

    .profile-onboarding-steps button {
        flex: 0 0 auto;
        min-height: 38px;
        max-width: 190px;
        padding: 6px 8px;
        border-radius: 13px;
    }

    .profile-onboarding-steps button span {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        border-radius: 9px;
    }

    .profile-onboarding-steps button strong {
        font-size: 10px;
    }

    .profile-onboarding-main {
        padding: 18px 14px 14px;
    }

    .profile-onboarding-step-head h3 {
        font-size: 22px;
    }

    .profile-onboarding-step-head span {
        font-size: 12px;
    }

    .profile-onboarding-cover {
        height: 150px;
        border-radius: 22px;
    }

    .profile-onboarding-grid,
    .profile-onboarding-fields {
        grid-template-columns: 1fr;
    }

    .profile-onboarding-avatar-block {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px;
    }

    .profile-onboarding-avatar {
        width: 86px;
        height: 86px;
        margin: 0;
        flex: 0 0 86px;
    }

    .profile-onboarding-avatar-block p {
        margin: 0;
        text-align: left;
    }

    .profile-onboarding-question {
        padding: 14px;
        border-radius: 20px;
    }

    .profile-onboarding-question__head {
        display: grid;
        gap: 5px;
    }

    .profile-onboarding-question__head small {
        justify-self: start;
    }

    .profile-onboarding-tag span {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 11px;
    }

    .profile-onboarding-footer {
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .profile-onboarding-primary,
    .profile-onboarding-secondary,
    .profile-onboarding-ghost {
        min-height: 40px;
        padding: 0 12px;
        border-radius: 13px;
        font-size: 9px;
    }

    .profile-onboarding-skip-warning {
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        display: block;
    }

    .profile-onboarding-skip-warning > div:last-child {
        margin-top: 12px;
    }
}
