/*
 * Страница /new/ — «Как начать играть».
 * Карточки — стекло из glass.css; здесь раскладка «змейкой», стрелки и макеты-подсказки.
 */
.onb {
    max-width: 1080px;
}

.onb-hero {
    text-align: center;
    margin: 2.5rem auto 2.5rem;
    max-width: 40rem;
}

.onb-hero h1 {
    margin-bottom: .75rem;
    text-wrap: balance;
}

.onb-lead {
    font-size: 1.15rem;
    opacity: .85;
    margin: 0;
}

/* --- Шаги «змейкой» -------------------------------------------------------- */
.onb-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.onb-step {
    width: 100%;
    scroll-margin-top: 1.5rem;
}

@media (min-width: 992px) {
    .onb-step {
        width: 62%;
    }

    /* Нечётные шаги — слева, чётные — справа. */
    .onb-step:nth-child(4n + 3) {
        align-self: flex-end;
    }
}

.onb-card .card-body {
    padding: 1.6rem 1.7rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.onb-card p {
    margin: 0;
    line-height: 1.6;
}

.onb-head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.onb-head h2 {
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    margin: 0;
    line-height: 1.3;
}

.onb-num {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: rgba(var(--tertiary-text), 1);
    color: rgba(var(--bs-body-bg-rgb), 1);
    font-family: "Unbounded", "Manrope", system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(var(--tertiary-text), .35);
}

/* Слово-ссылка в заголовке шага: сразу видно, что на него можно нажать. */
.onb-link, .onb-rich a {
    color: rgba(var(--tertiary-text), 1);
    text-decoration: underline;
    text-decoration-thickness: .12em;
    text-underline-offset: .2em;
}

.onb-link:hover, .onb-rich a:hover {
    filter: brightness(1.15);
}

.onb-cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.3rem;
    border-radius: 999px;
    font-weight: 600;
}

.onb-done {
    color: rgba(var(--tertiary-text), 1);
    font-weight: 600;
}

.onb-note {
    font-size: .92rem;
    opacity: .8;
}

.onb-card--finish {
    border-color: rgba(var(--tertiary-text), .55) !important;
}

/* --- Стрелки между шагами -------------------------------------------------- */
.onb-arrow {
    position: relative;
    color: rgba(var(--tertiary-text), 1);
    pointer-events: none;
}

.onb-arrow svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.onb-arrow__wide,
.onb-arrow__wide-head {
    display: none;
}

/* Телефон: прямая стрелка вниз по центру. */
.onb-arrow__narrow {
    display: block;
    width: 24px;
    height: 56px;
    margin: .6rem auto;
}

.onb-arrow__narrow path:first-child {
    stroke-dasharray: 2 8;
    animation: onb-flow 1.2s linear infinite;
}

@media (min-width: 992px) {
    .onb-arrow {
        height: 120px;
        margin: -.5rem 0;
    }

    .onb-arrow__narrow {
        display: none;
    }

    .onb-arrow__wide {
        display: block;
        position: absolute;
        inset: 0 12% 0 12%;
        width: 76%;
        height: 100%;
        overflow: visible;
    }

    .onb-arrow__wide path {
        stroke-dasharray: 2 10;
        vector-effect: non-scaling-stroke;
        animation: onb-flow 1.4s linear infinite;
    }

    /* Наконечник — на конце дуги. Дуга идёт от x=60 к x=340 из 400
       внутри полосы шириной 76% с отступом 12% слева. */
    .onb-arrow__wide-head {
        display: block;
        position: absolute;
        bottom: -6px;
        width: 26px;
        height: 26px;
    }

    /* Слева направо: от левой карточки к правой. */
    .onb-arrow--right .onb-arrow__wide-head {
        left: calc(12% + 76% * 340 / 400 - 13px);
    }

    /* Справа налево: та же дуга, отражённая. */
    .onb-arrow--left .onb-arrow__wide {
        transform: scaleX(-1);
    }

    .onb-arrow--left .onb-arrow__wide-head {
        left: calc(12% + 76% * 60 / 400 - 13px);
    }
}

@keyframes onb-flow {
    to { stroke-dashoffset: -24; }
}

@media (prefers-reduced-motion: reduce) {
    .onb-arrow svg path { animation: none; }
}

/* --- Макеты-подсказки (форма регистрации, окно лаунчера) ------------------- */
.onb-visual {
    padding: 1.1rem;
    border-radius: 1.25rem;
    background: rgba(0, 0, 0, .18);
    border: 1px dashed rgba(var(--tertiary-text), .45);
}

body[data-bs-theme=light] .onb-visual {
    background: rgba(0, 0, 0, .03);
}

.onb-mock {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    max-width: 22rem;
}

.onb-mock__field {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .25rem;
    position: relative;
}

.onb-mock__label {
    font-size: .8rem;
    opacity: .75;
}

.onb-mock__input {
    display: flex;
    align-items: center;
    min-height: 2.3rem;
    padding: .35rem .8rem;
    border-radius: .8rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

body[data-bs-theme=light] .onb-mock__input {
    background: #fff;
    border-color: rgba(0, 0, 0, .12);
}

.onb-caret {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 2px;
    background: currentColor;
    animation: onb-blink 1s steps(1) infinite;
}

@keyframes onb-blink {
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .onb-caret { animation: none; }
}

/* Подсказка у поля: на широком экране — справа от поля, на телефоне — под ним. */
.onb-hint {
    display: inline-flex;
    align-items: center;
    gap: .15rem;
    width: fit-content;
    padding: .15rem .55rem;
    border-radius: 999px;
    background: rgba(var(--tertiary-text), .16);
    color: rgba(var(--tertiary-text), 1);
    font-size: .78rem;
    font-weight: 600;
}

.onb-hint i {
    display: none;
}

@media (min-width: 576px) {
    .onb-mock {
        max-width: none;
    }

    .onb-mock__field {
        grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
        column-gap: .6rem;
        align-items: end;
    }

    .onb-mock__label {
        grid-column: 1 / -1;
    }

    .onb-hint {
        align-self: center;
        border-radius: .8rem;
        line-height: 1.25;
    }

    .onb-hint i {
        display: inline;
    }
}

.onb-mock__check {
    font-size: .88rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.onb-mock__check i {
    color: rgba(var(--tertiary-text), 1);
}

.onb-mock__button {
    align-self: flex-start;
    padding: .45rem 1.3rem;
    border-radius: 999px;
    background: rgba(var(--bs-white-rgb), 1);
    color: rgba(var(--bs-body-bg-rgb), 1);
    font-weight: 600;
    font-size: .9rem;
}

.onb-mock--window {
    padding: 0 0 1rem;
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .15);
}

body[data-bs-theme=light] .onb-mock--window {
    background: rgba(0, 0, 0, .04);
    border-color: rgba(0, 0, 0, .1);
}

.onb-mock--window > :not(.onb-mock__titlebar) {
    margin-inline: 1rem;
}

.onb-mock__titlebar {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .8rem;
    background: rgba(255, 255, 255, .06);
    font-size: .8rem;
    opacity: .9;
}

.onb-mock__titlebar i {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
}

.onb-mock__titlebar span {
    margin-left: .4rem;
}

/* --- Плитки систем в шаге 2 ------------------------------------------------ */
.onb-os {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
}

.onb-os__tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: 1rem .5rem .85rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .16);
    color: inherit;
    text-align: center;
    transition: transform .15s ease, border-color .15s ease;
}

body[data-bs-theme=light] .onb-os__tile {
    background: #fff;
    border-color: rgba(0, 0, 0, .1);
}

.onb-os__tile i {
    font-size: 1.9rem;
}

.onb-os__tile:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--tertiary-text), .7);
}

.onb-os__tile.is-yours {
    border-color: rgba(var(--tertiary-text), 1);
    box-shadow: 0 0 0 1px rgba(var(--tertiary-text), 1), 0 10px 26px rgba(var(--tertiary-text), .22);
}

.onb-os__tile.is-yours i {
    color: rgba(var(--tertiary-text), 1);
}

.onb-os__yours {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(var(--tertiary-text), 1);
}

.onb-os__tile:focus-visible,
.onb-link:focus-visible, .onb-rich a:focus-visible {
    outline: 2px solid rgba(var(--tertiary-text), 1);
    outline-offset: 3px;
}

/* ------------------------------------------------------------------------
 * «Знакомство с сайтом» (/guide/) — та же «змейка», пункты списком,
 * карточки выезжают при прокрутке (static/guide.js).
 * ------------------------------------------------------------------------ */
.guide-points {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding-left: 1.2rem;
    margin-bottom: 1.25rem;
    list-style: disc;
}
.guide-step__icon {
    color: rgba(var(--tertiary-text), 1);
    margin-right: .25rem;
}
.guide-step {
    transition: opacity .6s ease, transform .6s ease;
}
.guide-step--hidden {
    opacity: 0;
    transform: translateY(2.5rem);
}
