.onboarding-body {
    min-height: 100vh;
    padding: 22px;
    overflow-x: hidden;
}

.onboarding-header {
    width: min(1180px, 100%);
    margin: 0 auto;
    min-height: 76px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.onboarding-shell {
    width: min(1180px, 100%);
    min-height: calc(100vh - 126px);
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.onboarding-rail {
    padding: 18px;
    display: grid;
    grid-template-rows: 1fr auto;
}

.onboarding-rail ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    align-content: start;
}

.onboarding-rail li {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 10px;
    color: var(--muted);
    font-weight: 780;
    font-size: 0.92rem;
}

.onboarding-rail li span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--muted);
    background: rgba(121, 55, 255, 0.08);
    font-size: 0.78rem;
}

.onboarding-rail li.is-active {
    color: var(--purple);
    background: rgba(121, 55, 255, 0.1);
}

.onboarding-rail li.is-active span {
    color: #fff;
    background: var(--purple);
}

.rail-help {
    color: var(--muted);
    font-weight: 760;
}

.onboarding-stage {
    width: min(480px, 100%);
    justify-self: center;
    align-self: center;
    padding: 22px;
    min-height: 680px;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
}

.step-meter {
    display: grid;
    gap: 10px;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 780;
    margin-bottom: 18px;
}

.step-meter div {
    height: 5px;
    border-radius: 999px;
    background: rgba(121, 55, 255, 0.12);
    overflow: hidden;
}

.step-meter i {
    display: block;
    height: 100%;
    width: 9.09%;
    border-radius: inherit;
    background: var(--rainbow);
    transition: width 260ms ease;
}

.onboarding-form {
    display: grid;
    grid-template-rows: 1fr auto auto;
    min-height: 590px;
}

.onboard-step {
    display: none;
    align-content: start;
    justify-items: stretch;
    gap: 16px;
    animation-duration: 280ms;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.onboard-step.is-active {
    display: grid;
}

.onboard-step.slide-next {
    animation-name: stepNext;
}

.onboard-step.slide-back {
    animation-name: stepBack;
}

@keyframes stepNext {
    from { opacity: 0; transform: translateX(32px) scale(0.98); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes stepBack {
    from { opacity: 0; transform: translateX(-32px) scale(0.98); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.onboard-step h1,
.onboard-step h2 {
    margin: 0;
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2rem);
    line-height: 1.15;
}

.onboard-step p {
    margin: 0;
    text-align: center;
    color: var(--muted);
    line-height: 1.55;
}

.step-logo {
    width: 164px;
    margin: 20px auto 0;
    filter: drop-shadow(0 24px 38px rgba(121, 55, 255, 0.22));
}

.provider-stack {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.provider-stack button,
.choice-stack label,
.security-options label {
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.48);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

[data-theme="dark"] .provider-stack button,
[data-theme="dark"] .choice-stack label,
[data-theme="dark"] .security-options label {
    background: rgba(255, 255, 255, 0.06);
}

.email-start-panel {
    display: grid;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(121, 55, 255, 0.08);
}

.step-login {
    margin-top: 6px;
    font-size: 0.9rem;
}

.step-login a {
    color: var(--purple);
    font-weight: 800;
}

.icon-field {
    margin-top: 34px;
}

.date-wheel {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1.6fr 1.2fr;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.38);
}

[data-theme="dark"] .date-wheel {
    background: rgba(255, 255, 255, 0.04);
}

.date-wheel select {
    min-height: 180px;
    border: 0;
    border-right: 1px solid var(--line);
    color: var(--text);
    background: transparent;
    text-align: center;
    padding: 0 8px;
    outline: 0;
}

.date-wheel select:last-child {
    border-right: 0;
}

.mini-map {
    position: relative;
    min-height: 210px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(30deg, transparent 0 46%, rgba(255, 255, 255, 0.45) 47% 49%, transparent 50%),
        linear-gradient(120deg, transparent 0 38%, rgba(121, 55, 255, 0.18) 39% 41%, transparent 42%),
        linear-gradient(90deg, rgba(18, 138, 243, 0.12), rgba(62, 213, 121, 0.1), rgba(255, 123, 72, 0.1));
}

[data-theme="dark"] .mini-map {
    background:
        linear-gradient(30deg, transparent 0 46%, rgba(255, 255, 255, 0.12) 47% 49%, transparent 50%),
        linear-gradient(120deg, transparent 0 38%, rgba(121, 55, 255, 0.28) 39% 41%, transparent 42%),
        linear-gradient(90deg, rgba(18, 138, 243, 0.12), rgba(62, 213, 121, 0.08), rgba(255, 123, 72, 0.1));
}

.mini-map span {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--purple);
    box-shadow: 0 0 0 22px rgba(121, 55, 255, 0.18), 0 0 0 54px rgba(121, 55, 255, 0.1);
}

.choice-stack {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.choice-stack input,
.purpose input,
.security-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-stack label {
    justify-content: flex-start;
    padding: 0 18px;
}

.choice-stack input:checked + span,
.security-options input:checked + span {
    color: var(--purple);
}

.choice-stack label:has(input:checked),
.security-options label:has(input:checked) {
    border-color: rgba(121, 55, 255, 0.5);
    background: rgba(121, 55, 255, 0.1);
}

.purpose-grid {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.purpose {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-weight: 840;
}

.purpose.dating { color: #fb3d87; background: rgba(251, 61, 135, 0.09); }
.purpose.friends { color: #f18922; background: rgba(255, 154, 50, 0.1); }
.purpose.community { color: #7937ff; background: rgba(121, 55, 255, 0.1); }
.purpose.events { color: #128af3; background: rgba(18, 138, 243, 0.1); }
.purpose.networking { color: #22a95c; background: rgba(34, 184, 95, 0.1); }
.purpose.travel { color: #109ccf; background: rgba(16, 156, 207, 0.1); }

.purpose:has(input:checked) {
    border-color: currentColor;
    box-shadow: inset 0 0 0 1px currentColor;
}

.upload-zone {
    min-height: 220px;
    display: grid;
    place-content: center;
    gap: 8px;
    text-align: center;
    border: 1px dashed rgba(121, 55, 255, 0.45);
    border-radius: 22px;
    background: rgba(121, 55, 255, 0.05);
    color: var(--muted);
}

.upload-zone input {
    display: none;
}

.upload-zone strong {
    color: var(--text);
    font-size: 1.05rem;
}

.upload-zone.is-drag {
    border-color: var(--purple);
    background: rgba(121, 55, 255, 0.14);
}

.photo-preview {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.photo-preview img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
}

.photo-count {
    justify-self: center;
    color: var(--muted);
    font-weight: 800;
}

.switch-stack {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.switch-stack label {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.4);
    font-weight: 760;
}

[data-theme="dark"] .switch-stack label {
    background: rgba(255, 255, 255, 0.05);
}

.switch-stack input {
    width: 44px;
    height: 24px;
    appearance: none;
    border-radius: 999px;
    background: #aeb7c5;
    position: relative;
    transition: background 180ms ease;
}

.switch-stack input::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform 180ms ease;
}

.switch-stack input:checked {
    background: var(--rainbow);
}

.switch-stack input:checked::after {
    transform: translateX(20px);
}

.safe-note {
    margin-top: 12px;
    border-radius: 16px;
    padding: 14px;
    color: var(--purple);
    background: rgba(121, 55, 255, 0.1);
    text-align: center;
    font-weight: 760;
}

.safe-orb {
    width: 156px;
    height: 156px;
    margin: 16px auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(121, 55, 255, 0.28);
    background: var(--rainbow-soft);
}

.safe-orb span {
    width: 48px;
    height: 58px;
    border-radius: 14px;
    background: var(--rainbow);
    position: relative;
    box-shadow: 0 14px 30px rgba(121, 55, 255, 0.26);
}

.safe-orb span::before {
    content: "";
    position: absolute;
    width: 34px;
    height: 34px;
    border: 8px solid #a347ff;
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    left: 7px;
    top: -24px;
}

.security-options {
    display: grid;
    gap: 10px;
}

.security-options label {
    justify-content: flex-start;
    padding: 0 16px;
}

.pin-field {
    margin-top: 2px;
}

.onboarding-actions {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.back-button {
    height: 54px;
    border-radius: 16px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.45);
    font-weight: 800;
}

[data-theme="dark"] .back-button {
    background: rgba(255, 255, 255, 0.06);
}

.back-button:disabled {
    opacity: 0.45;
    cursor: default;
}
