.fm-ohapki-promo {
    --ohapki-blue: #0965ff;
    --ohapki-ink: #081b3a;
    position: relative;
    z-index: 1032;
    display: flex;
    min-height: 52px;
    padding: 0 max(52px, calc((100vw - 1540px) / 2));
    color: #fff;
    background: var(--ohapki-blue);
}

.fm-ohapki-promo[hidden],
.fm-ohapki-promo-dismissed .fm-ohapki-promo,
.fm-ohapki-dialog[hidden] {
    display: none !important;
}

.fm-ohapki-promo__message {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 0;
    padding: 8px 56px 8px 8px;
    color: inherit;
    text-align: left;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.fm-ohapki-promo__badge {
    flex: 0 0 auto;
    padding: 5px 9px 4px;
    color: var(--ohapki-ink);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .055em;
    text-transform: uppercase;
    border-radius: 999px;
    background: #a8ff1a;
}

.fm-ohapki-promo__copy {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    font-size: 14px;
    line-height: 1.3;
}

.fm-ohapki-promo__copy strong {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.fm-ohapki-promo__copy span {
    color: rgba(255, 255, 255, .82);
}

.fm-ohapki-promo__action {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding-bottom: 2px;
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    border-bottom: 1px solid rgba(255, 255, 255, .72);
}

.fm-ohapki-promo__close,
.fm-ohapki-dialog__close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.fm-ohapki-promo__close {
    position: absolute;
    top: 50%;
    right: max(10px, calc((100vw - 1540px) / 2));
    color: #fff;
    background: rgba(255, 255, 255, .13);
    transform: translateY(-50%);
}

.fm-ohapki-promo__close svg,
.fm-ohapki-dialog__close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.fm-ohapki-promo__message:focus-visible,
.fm-ohapki-promo__close:focus-visible,
.fm-ohapki-dialog a:focus-visible,
.fm-ohapki-dialog button:focus-visible {
    outline: 3px solid #a8ff1a;
    outline-offset: -3px;
}

.fm-ohapki-dialog {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: grid;
    place-items: center;
    padding: 24px;
}

.fm-ohapki-dialog__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(4, 16, 36, .66);
    cursor: default;
}

.fm-ohapki-dialog__panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(320px, .86fr) minmax(420px, 1.14fr);
    width: min(960px, 100%);
    height: min(720px, calc(100dvh - 48px));
    max-height: min(720px, calc(100dvh - 48px));
    overflow: hidden;
    color: var(--ohapki-ink, #081b3a);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(3, 19, 47, .28);
}

.fm-ohapki-dialog__close {
    position: absolute;
    z-index: 3;
    top: 18px;
    right: 18px;
    color: #0a1d3d;
    background: #eef3fa;
}

.fm-ohapki-dialog__visual {
    position: relative;
    display: flex;
    min-height: 0;
    overflow: hidden;
    padding: 42px 38px 34px;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: #0965ff;
}

.fm-ohapki-dialog__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 43%;
}

.fm-ohapki-dialog__visual-copy,
.fm-ohapki-dialog__visual-note {
    position: relative;
    z-index: 2;
}

.fm-ohapki-dialog__visual-copy {
    display: grid;
    gap: 7px;
    align-self: flex-start;
    max-width: 285px;
    padding: 13px 15px 15px;
    border-radius: 16px;
    background: rgba(5, 29, 71, .72);
    backdrop-filter: blur(7px);
}

.fm-ohapki-dialog__visual-copy span,
.fm-ohapki-dialog__eyebrow {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fm-ohapki-dialog__visual-copy strong {
    max-width: 260px;
    color: #fff;
    font-size: clamp(25px, 3vw, 37px);
    line-height: 1.03;
    letter-spacing: -.03em;
}

.fm-ohapki-dialog__visual-note {
    align-self: flex-start;
    padding: 7px 10px 6px;
    color: #081b3a;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    background: #a8ff1a;
}

.fm-ohapki-dialog__content {
    display: flex;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 48px 58px;
    flex-direction: column;
    justify-content: center;
    justify-content: safe center;
}

.fm-ohapki-dialog__eyebrow {
    margin-bottom: 12px;
    color: #0965ff;
}

.fm-ohapki-dialog__content h2 {
    max-width: 510px;
    margin: 0 0 18px;
    color: #081b3a;
    font-size: clamp(31px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.042em;
}

.fm-ohapki-dialog__content > p {
    max-width: 540px;
    margin: 0 0 26px;
    color: #45536a;
    font-size: 16px;
    line-height: 1.58;
}

.fm-ohapki-dialog__first-pick {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    margin: -7px 0 23px;
    padding: 12px 14px;
    border: 1px solid #dbe8ff;
    border-radius: 14px;
    background: #f4f8ff;
}

.fm-ohapki-dialog__first-pick > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #081b3a;
    font-size: 15px;
    border-radius: 50%;
    background: #a8ff1a;
}

.fm-ohapki-dialog__first-pick p {
    display: grid;
    gap: 1px;
    margin: 0;
    color: #58667c;
    font-size: 11px;
    line-height: 1.35;
}

.fm-ohapki-dialog__first-pick strong {
    color: #0b2349;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .025em;
}

.fm-ohapki-dialog__benefits {
    display: grid;
    gap: 0;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
    border-top: 1px solid #e5eaf1;
}

.fm-ohapki-dialog__benefits li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 50px;
    border-bottom: 1px solid #e5eaf1;
}

.fm-ohapki-dialog__benefits span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: #0965ff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 50%;
    background: #eaf2ff;
}

.fm-ohapki-dialog__benefits strong {
    color: #142542;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.fm-ohapki-dialog__actions {
    display: grid;
    gap: 12px;
    margin-top: 0;
}

.fm-ohapki-dialog__primary {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-height: 66px;
    padding: 11px 18px;
    color: #fff;
    text-decoration: none;
    border-radius: 18px;
    background: #0965ff;
}

.fm-ohapki-dialog__primary:hover {
    color: #fff;
    background: #0057e8;
}

.fm-ohapki-dialog__primary svg {
    width: 25px;
    fill: currentColor;
}

.fm-ohapki-dialog__primary > span:nth-child(2) {
    display: grid;
    gap: 2px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

.fm-ohapki-dialog__primary small {
    color: rgba(255, 255, 255, .76);
    font-size: 11px;
    font-weight: 500;
}

.fm-ohapki-dialog__secondary {
    justify-self: center;
    color: #53627a;
    font-size: 13px;
    font-weight: 700;
    text-underline-offset: 3px;
}

.fm-ohapki-dialog__secondary:hover {
    color: #0965ff;
}

body.fm-ohapki-dialog-open {
    overflow: hidden;
}

@media (min-width: 768px) and (max-height: 800px) {
    .fm-ohapki-dialog__content {
        padding-block: 32px;
    }

    .fm-ohapki-dialog__eyebrow {
        margin-bottom: 9px;
    }

    .fm-ohapki-dialog__content h2 {
        margin-bottom: 14px;
        font-size: clamp(31px, 3.5vw, 42px);
    }

    .fm-ohapki-dialog__content > p {
        margin-bottom: 20px;
        font-size: 15px;
        line-height: 1.48;
    }

    .fm-ohapki-dialog__first-pick {
        margin-bottom: 17px;
        padding-block: 9px;
    }

    .fm-ohapki-dialog__benefits {
        margin-bottom: 22px;
    }

    .fm-ohapki-dialog__benefits li {
        min-height: 44px;
    }
}

@media (max-width: 767.98px) {
    .fm-ohapki-promo {
        min-height: 58px;
        padding: 0 48px 0 10px;
    }

    .fm-ohapki-promo__message {
        justify-content: flex-start;
        gap: 9px;
        padding: 7px 0;
    }

    .fm-ohapki-promo__badge {
        padding: 5px 7px 4px;
        font-size: 9px;
    }

    .fm-ohapki-promo__copy {
        display: grid;
        gap: 1px;
        line-height: 1.16;
    }

    .fm-ohapki-promo__copy strong {
        font-size: 12px;
    }

    .fm-ohapki-promo__copy span {
        overflow: hidden;
        max-width: 270px;
        font-size: 10px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .fm-ohapki-promo__action {
        display: none;
    }

    .fm-ohapki-promo__close {
        right: 5px;
        width: 38px;
        height: 38px;
    }

    .fm-ohapki-dialog {
        align-items: end;
        padding: 0;
    }

    .fm-ohapki-dialog__panel {
        display: block;
        width: 100%;
        height: auto;
        max-height: min(92dvh, 780px);
        overflow: auto;
        border-radius: 26px 26px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .fm-ohapki-dialog__close {
        position: sticky;
        z-index: 5;
        top: 12px;
        float: right;
        margin: 12px 12px -52px 0;
        color: #fff;
        background: rgba(5, 25, 60, .28);
    }

    .fm-ohapki-dialog__visual {
        min-height: 248px;
        padding: 24px 24px 20px;
    }

    .fm-ohapki-dialog__photo {
        object-position: center 37%;
    }

    .fm-ohapki-dialog__visual-copy {
        max-width: 205px;
        padding: 10px 12px 12px;
        border-radius: 13px;
    }

    .fm-ohapki-dialog__visual-copy strong {
        max-width: 210px;
        font-size: 27px;
    }

    .fm-ohapki-dialog__content {
        overflow: visible;
        padding: 28px 22px 24px;
        justify-content: flex-start;
    }

    .fm-ohapki-dialog__content h2 {
        margin-bottom: 13px;
        font-size: clamp(29px, 9vw, 38px);
    }

    .fm-ohapki-dialog__content > p {
        margin-bottom: 20px;
        font-size: 14px;
        line-height: 1.5;
    }

    .fm-ohapki-dialog__first-pick {
        order: 2;
        margin-bottom: 18px;
    }

    .fm-ohapki-dialog__benefits {
        order: 3;
    }

    .fm-ohapki-dialog__benefits {
        margin-bottom: 22px;
    }

    .fm-ohapki-dialog__primary {
        min-height: 62px;
        border-radius: 16px;
    }

    .fm-ohapki-dialog__actions {
        position: static;
        order: 1;
        margin: 0 0 20px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .fm-ohapki-dialog__secondary {
        display: none;
    }
}

@media (max-width: 374.98px) {
    .fm-ohapki-promo__copy span {
        max-width: 210px;
    }

    .fm-ohapki-dialog__visual {
        min-height: 210px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .fm-ohapki-dialog:not([hidden]) .fm-ohapki-dialog__panel {
        animation: fm-ohapki-enter .28s ease-out both;
    }

    @keyframes fm-ohapki-enter {
        from { opacity: 0; transform: translateY(14px) scale(.985); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
}
