﻿/* Onboarding reference modal: five compact slides over the home screen. */
.onb-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(22px, env(safe-area-inset-top, 0px)) 0 max(18px, env(safe-area-inset-bottom, 0px));
    background: rgba(0, 0, 0, 0.76);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.onb-overlay.is-visible {
    display: flex;
}

.onb-sheet {
    position: relative;
    width: min(342px, calc(100vw - 72px));
    height: min(616px, calc(100svh - 68px));
    min-height: 560px;
    max-height: 616px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(119, 58, 43, 0.43);
    border-radius: 17px;
    background:
        radial-gradient(circle at 50% 0%, rgba(108, 36, 29, 0.16), transparent 34%),
        radial-gradient(circle at 50% 100%, rgba(125, 24, 30, 0.12), transparent 35%),
        linear-gradient(180deg, rgba(19, 18, 18, 0.98), rgba(9, 9, 9, 0.985));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 28px 70px rgba(0, 0, 0, 0.62),
        0 0 0 1px rgba(0, 0, 0, 0.48);
    transform: translateY(10px) scale(0.985);
    opacity: 0;
    transition: transform 0.34s cubic-bezier(0.2, 0.72, 0.2, 1), opacity 0.24s ease;
}

.onb-overlay.is-visible .onb-sheet {
    transform: none;
    opacity: 1;
}

.onb-sheet::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.028), transparent),
        radial-gradient(circle at 50% 15%, rgba(166, 42, 34, 0.07), transparent 38%);
    opacity: 0.9;
}

.onb-close {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 20;
    width: 33px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.052);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.onb-close svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: rgba(246, 240, 234, 0.62);
    stroke-width: 2.1;
}

.onb-slides-wrapper {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    touch-action: pan-y;
}

.onb-slides {
    display: flex;
    height: 100%;
    transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

.onb-slides.no-transition {
    transition: none;
}

.onb-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 26px;
    color: #f6f0ea;
    scrollbar-width: none;
}

.onb-slide::-webkit-scrollbar {
    display: none;
}

.onb-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.onb-title {
    margin: 0;
    color: rgba(246, 240, 234, 0.98);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 31px;
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.onb-title--xl {
    font-size: 43px;
    line-height: 0.92;
    text-align: center;
    letter-spacing: -0.04em;
}

.onb-body {
    margin: 9px 0 0;
    color: rgba(246, 240, 234, 0.67);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.38;
    letter-spacing: -0.01em;
}

.onb-body + .onb-body {
    margin-top: 7px;
}

.onb-fade {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.onb-slide.is-active .onb-fade {
    opacity: 1;
    transform: none;
}

.onb-slide.is-active .onb-fade:nth-child(1) { transition-delay: 0.05s; }
.onb-slide.is-active .onb-fade:nth-child(2) { transition-delay: 0.10s; }
.onb-slide.is-active .onb-fade:nth-child(3) { transition-delay: 0.15s; }
.onb-slide.is-active .onb-fade:nth-child(4) { transition-delay: 0.20s; }
.onb-slide.is-active .onb-fade:nth-child(5) { transition-delay: 0.25s; }

.onb-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 0;
}

.onb-visual--gem {
    padding-top: 23px;
    padding-bottom: 9px;
}

.onb-img--gem {
    width: 136px;
    height: 98px;
    object-fit: contain;
    filter: drop-shadow(0 0 24px rgba(196, 29, 30, 0.5));
    animation: onb-gem-float 4.2s ease-in-out infinite;
}

@keyframes onb-gem-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.onb-slide:first-child .onb-body {
    max-width: 274px;
    margin: 10px auto 0;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.34;
}

.onb-feature-list {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 12px 0 0;
    padding: 0 10px 0 16px;
    list-style: none;
}

.onb-feature-list li {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    color: rgba(246, 240, 234, 0.72);
    font-size: 12.4px;
    font-weight: 600;
    line-height: 1.22;
}

.onb-feature-list li em {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    border: 1px solid rgba(163, 54, 41, 0.28);
    background:
        radial-gradient(circle at 50% 50%, rgba(182, 39, 30, 0.24), transparent 56%),
        rgba(54, 23, 20, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-style: normal;
}

.onb-feature-list li em img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.onb-slide:nth-child(2) {
    padding-top: 45px;
}

.onb-slide:nth-child(2) .onb-content {
    flex: 0 0 auto;
    padding: 0;
}

.onb-slide:nth-child(2) .onb-body {
    max-width: 276px;
    font-size: 12.6px;
    line-height: 1.24;
}

.onb-visual--mockup {
    flex: 1 1 auto;
    align-items: flex-start;
    padding-top: 12px;
}

.onb-img--mockup {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 154px;
    height: auto;
    object-fit: contain;
    border-radius: 17px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
}

.onb-slide:nth-child(3),
.onb-slide:nth-child(4),
.onb-slide:nth-child(5) {
    padding-top: 35px;
}

.onb-slide:nth-child(3) .onb-body {
    max-width: 268px;
}

.onb-visual--mountain {
    width: calc(100% + 28px);
    margin: 8px -14px 0;
    justify-content: center;
}

.onb-img--mountain {
    width: 190px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.38));
}

.onb-stats-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 24px;
    margin-top: -6px;
    padding: 0 8px 0 8px;
}

.onb-stat-card {
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.onb-stat-label {
    display: block;
    color: rgba(198, 79, 48, 0.76);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.onb-stat-value {
    display: block;
    margin-top: 6px;
    color: rgba(246, 240, 234, 0.82);
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.04em;
}

.onb-stat-card:last-child {
    text-align: right;
}

.onb-slide:nth-child(4) .onb-body {
    max-width: 260px;
}

.onb-layers-grid {
    display: grid;
    grid-template-columns: 151px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    flex: 0 0 auto;
    min-height: 0;
    margin-top: 5px;
}

.onb-img--layers {
    grid-column: 1;
    grid-row: 1;
    width: 151px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 22px rgba(137, 20, 18, 0.2));
}

.onb-layer-names {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.onb-layer-names li {
    position: relative;
    min-height: 35px;
    display: flex;
    align-items: center;
    color: rgba(246, 240, 234, 0.61);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.onb-layer-names li::before {
    content: "";
    position: absolute;
    left: -34px;
    top: 50%;
    width: 24px;
    height: 1px;
    background: rgba(246, 240, 234, 0.14);
}

.onb-layer-names li:first-child {
    color: rgba(246, 240, 234, 0.78);
}

.onb-slide:nth-child(5) .onb-body {
    max-width: 224px;
}

.onb-modes-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.onb-mode-row {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 10px;
    min-height: 0;
    box-sizing: border-box;
    padding: 8px 11px 8px 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;
    background:
        radial-gradient(circle at 16% 50%, rgba(147, 38, 30, 0.17), transparent 30%),
        rgba(255, 255, 255, 0.024);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.onb-mode-icon {
    width: 54px;
    height: 45px;
    object-fit: contain;
    border-radius: 9px;
}

.onb-mode-row__body {
    min-width: 0;
}

.onb-mode-row__name {
    color: rgba(246, 240, 234, 0.88);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;
}

.onb-mode-row__desc {
    margin-top: 4px;
    color: rgba(246, 240, 234, 0.59);
    font-size: 10.8px;
    font-weight: 600;
    line-height: 1.16;
}

.onb-mode-row__arr {
    color: rgba(246, 240, 234, 0.44);
    font-size: 20px;
    line-height: 1;
}

.onb-sheet.is-final {
    border-color: rgba(147, 40, 42, 0.56);
    border-radius: 22px;
    background: #050505;
}

.onb-sheet.is-final::before {
    background:
        radial-gradient(circle at 50% 10%, rgba(142, 33, 36, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 24%);
    opacity: 1;
}

.onb-sheet.is-final .onb-close {
    top: 13px;
    right: 13px;
    width: 41px;
    height: 41px;
    border-color: rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.065);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 20px rgba(0, 0, 0, 0.28);
}

.onb-sheet.is-final .onb-close svg {
    width: 17px;
    height: 17px;
    stroke: rgba(246, 240, 234, 0.88);
}

.onb-slide--ai-question {
    padding: 34px 28px 0;
    overflow: hidden;
    color: #f7f1ed;
}

.onb-ai-final {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.onb-ai-copy {
    text-align: center;
}

.onb-ai-title {
    margin: 0;
    color: rgba(246, 240, 234, 0.98);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 35px;
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -0.045em;
}

.onb-ai-title span {
    display: inline-block;
    color: #ff3048;
}

.onb-ai-subtitle {
    max-width: 330px;
    margin: 13px auto 0;
    color: rgba(246, 240, 234, 0.72);
    font-size: 14.8px;
    font-weight: 600;
    line-height: 1.32;
    letter-spacing: -0.01em;
}

.onb-ai-orbit {
    width: calc(100% + 44px);
    flex: 0 0 auto;
    margin: 13px -22px 0;
    overflow: hidden;
    background: #000;
}

.onb-ai-orbit img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 190px;
    object-fit: contain;
    filter: none;
}

.onb-ai-examples {
    margin-top: 8px;
    padding: 12px 13px 13px;
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 14px;
    background:
        radial-gradient(circle at 50% 105%, rgba(255, 255, 255, 0.045), transparent 54%),
        rgba(255, 255, 255, 0.022);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 10px 28px rgba(0, 0, 0, 0.18);
}

.onb-ai-examples__label {
    color: #ff3048;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.onb-ai-chip-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 7px 8px;
    margin-top: 11px;
}

.onb-ai-chip-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 999px;
    color: rgba(246, 240, 234, 0.9);
    background: rgba(0, 0, 0, 0.16);
    font-size: 10.2px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.onb-ai-chip-row span:nth-child(3),
.onb-ai-chip-row span:nth-child(5) {
    grid-column: 1 / -1;
    justify-self: center;
}

.onb-ai-chip-row span::before {
    content: "";
    width: 4px;
    height: 4px;
    margin-right: 8px;
    border-radius: 50%;
    background: #ff3048;
    box-shadow: 0 0 8px rgba(255, 48, 72, 0.55);
}

.onb-footer {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    padding: 0 19px 19px;
}

.onb-footer.is-final {
    display: flex;
    flex-direction: column;
    padding: 12px 28px 16px;
}

.onb-footer.is-final .onb-btn--start {
    order: 1;
    min-height: 52px;
    border-radius: 14px;
    font-size: 16px;
    letter-spacing: 0.035em;
}

.onb-footer.is-final .onb-no-show {
    order: 2;
}

.onb-footer.is-final .onb-dots {
    order: 3;
    margin: 12px 0 0;
}

.onb-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 18px;
}

.onb-dot {
    width: 7px;
    height: 7px;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(246, 240, 234, 0.23);
    cursor: pointer;
}

.onb-dot.is-active {
    background: #ff3d36;
    box-shadow: 0 0 9px rgba(255, 61, 54, 0.48);
}

.onb-btn {
    position: relative;
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-sizing: border-box;
    padding: 0 52px;
    overflow: hidden;
    border: 1px solid rgba(255, 122, 116, 0.25);
    border-radius: 10px;
    color: rgba(246, 240, 234, 0.95);
    background:
        linear-gradient(180deg, rgba(244, 58, 63, 0.98) 0%, rgba(194, 32, 39, 0.98) 52%, rgba(159, 24, 31, 0.98) 100%),
        radial-gradient(circle at 50% 0%, rgba(255, 199, 168, 0.18), transparent 42%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -10px 20px rgba(82, 5, 9, 0.22),
        0 12px 24px rgba(132, 17, 23, 0.34),
        0 2px 8px rgba(230, 56, 61, 0.16);
    font-size: 14.5px;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-align: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.onb-btn::before {
    content: "";
    position: absolute;
    inset: 1px 1px auto;
    height: 45%;
    border-radius: 9px 9px 14px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent);
    pointer-events: none;
}

.onb-btn:active {
    transform: translateY(1px) scale(0.985);
    filter: brightness(0.95);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -8px 18px rgba(82, 5, 9, 0.26),
        0 7px 16px rgba(132, 17, 23, 0.25);
}

.onb-btn__arr {
    position: absolute;
    right: 31px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(246, 240, 234, 0.78);
    font-size: 19px;
    font-weight: 600;
    line-height: 1;
}

.onb-no-show {
    width: max-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 11px auto 0;
    color: rgba(246, 240, 234, 0.42);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.onb-no-show__box {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1.5px solid rgba(246, 240, 234, 0.25);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
}

.onb-no-show__box svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: rgba(246, 240, 234, 0.95);
    stroke-width: 2.2;
    opacity: 0;
    transform: scale(0.65);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.onb-no-show.is-checked .onb-no-show__box {
    border-color: rgba(215, 48, 52, 0.68);
    background: rgba(160, 29, 32, 0.24);
}

.onb-no-show.is-checked .onb-no-show__box svg {
    opacity: 1;
    transform: none;
}

.onb-no-show__label {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.profile-onboarding-help-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(246, 240, 234, 0.78);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

@media (max-height: 700px) {
    .onb-sheet {
        height: calc(100svh - 36px);
        min-height: 0;
    }

    .onb-visual--gem {
        padding-top: 28px;
        padding-bottom: 12px;
    }

    .onb-img--gem {
        width: 148px;
        height: 108px;
    }

    .onb-feature-list {
        gap: 11px;
        margin-top: 20px;
    }

    .onb-slide:nth-child(2),
    .onb-slide:nth-child(3),
    .onb-slide:nth-child(4),
    .onb-slide:nth-child(5) {
        padding-top: 31px;
    }

    .onb-img--mockup {
        width: 252px;
    }

    .onb-img--mountain {
        width: 278px;
    }

    .onb-layers-grid {
        margin-top: 12px;
        grid-template-columns: 130px minmax(0, 1fr);
    }

    .onb-img--layers {
        width: 130px;
    }

    .onb-layer-names li {
        min-height: 30px;
        font-size: 11px;
    }

    .onb-modes-col {
        gap: 8px;
        margin-top: 14px;
    }

    .onb-mode-row {
        min-height: 67px;
        grid-template-columns: 60px minmax(0, 1fr) 14px;
    }

    .onb-mode-icon {
        width: 60px;
        height: 50px;
    }

    .onb-mode-row__desc {
        font-size: 11px;
        line-height: 1.2;
    }

    .onb-dots {
        margin-bottom: 12px;
    }

    .onb-footer {
        padding-bottom: 13px;
    }

    .onb-slide--ai-question {
        padding-top: 32px;
    }

    .onb-ai-title {
        font-size: 28px;
    }

    .onb-ai-subtitle {
        margin-top: 9px;
        font-size: 12.4px;
        line-height: 1.28;
    }

    .onb-ai-orbit {
        margin-top: 8px;
    }

    .onb-ai-examples {
        margin-top: 7px;
        padding: 9px 9px 10px;
    }

    .onb-ai-chip-row {
        gap: 6px;
        margin-top: 8px;
    }

    .onb-ai-chip-row span {
        min-height: 22px;
        padding: 0 9px;
        font-size: 9.8px;
    }

    .onb-footer.is-final {
        padding-bottom: 12px;
    }

    .onb-footer.is-final .onb-btn--start {
        min-height: 43px;
    }
}

@media (max-width: 370px) {
    .onb-sheet {
        width: calc(100vw - 36px);
    }

    .onb-slide {
        padding-left: 21px;
        padding-right: 21px;
    }

    .onb-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .onb-title--xl {
        font-size: 39px;
    }

    .onb-title {
        font-size: 29px;
    }

    .onb-body {
        font-size: 13px;
    }

    .onb-feature-list {
        padding-left: 6px;
        padding-right: 4px;
    }

    .onb-slide--ai-question {
        padding-left: 17px;
        padding-right: 17px;
    }

    .onb-ai-title {
        font-size: 28px;
    }

    .onb-ai-orbit {
        width: calc(100% + 28px);
        margin-left: -14px;
        margin-right: -14px;
    }

    .onb-ai-chip-row span {
        padding: 0 9px;
        font-size: 9.8px;
    }

    .onb-footer.is-final {
        padding-left: 17px;
        padding-right: 17px;
    }

    .onb-footer.is-final .onb-btn--start {
        font-size: 13.2px;
        letter-spacing: 0.02em;
    }
}
