.ya-ad-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.45;
    user-select: none;
    pointer-events: none;
    margin-bottom: 5px;
}

.ya-ad-label::before,
.ya-ad-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, rgba(139, 148, 158, 0.15));
}


.ya-ad-inline {
    margin: 20px 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: opacity, transform;
}

.ya-ad-inline:not(.ad-visible) {
    margin: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
}

.ya-ad-inline:not(.ad-visible) .ya-ad-inline__wrap {
    min-height: 0;
}

.ya-ad-inline.ad-visible {
    opacity: 1;
    transform: translateY(0);
    max-height: none;
    overflow: visible;
    pointer-events: auto;
}

.ya-ad-inline__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.45;
    user-select: none;
    pointer-events: none;
    margin-bottom: 5px;
    width: 100%;
}

.ya-ad-inline__label::before,
.ya-ad-inline__label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, rgba(139, 148, 158, 0.15));
}

.ya-ad-inline__wrap {
    min-height: 100px;
    border-radius: 12px;
    overflow: hidden;
    contain: layout;
    outline: 1px solid var(--border, rgba(139, 148, 158, 0.1));
}

@media (max-width: 600px) {
    .ya-ad-inline.ad-visible {
        margin: 24px 0;
    }

    .ya-ad-inline__wrap {
        min-height: 80px;
        border-radius: 8px;
    }
}


.ya-ad-strip {
    max-width: 940px;
    margin: 28px auto 0;
    padding: 0 20px 20px;
    text-align: center;
}

.ya-ad-strip__frame {
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
}

.ya-ad-strip:not(:has(.ya-ad-strip__frame div[id^="yandex_rtb"] *)) {
    display: none;
}

.ya-ad-strip__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.4;
    user-select: none;
    margin-bottom: 6px;
    width: 100%;
}

.ya-ad-strip__label::before,
.ya-ad-strip__label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, rgba(139, 148, 158, 0.15));
}

.ya-ad-strip__frame>div[id^="yandex_rtb"] {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    border-radius: 10px;
}


.ya-ad-float {
    display: none;
    position: fixed;
    top: 130px;
    z-index: 50;
    width: 160px;
    pointer-events: auto;
    opacity: 0;
    animation: adFloatIn 0.5s ease 0.8s forwards;
}

.ya-ad-float:not(:has(.ya-ad-float__inner *)) {
    visibility: hidden;
    pointer-events: none;
}

.ya-ad-float__label {
    font-size: 9px;
    font-weight: 500;
    color: var(--muted, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    opacity: 0.35;
    user-select: none;
    pointer-events: none;
    text-align: center;
    display: block;
    margin-bottom: 6px;
}

.ya-ad-float__inner {
    border-radius: 10px;
    overflow: hidden;
    outline: 1px solid var(--border, rgba(139, 148, 158, 0.1));
    min-height: 0;
}

@keyframes adFloatIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1500px) {
    .ya-ad-float {
        display: block;
    }

    .ya-ad-float--left {
        right: calc(50% + 510px);
    }

    .ya-ad-float--right {
        left: calc(50% + 510px);
    }
}

@media (min-width: 1640px) {
    .ya-ad-float--left {
        right: calc(50% + 560px);
    }

    .ya-ad-float--right {
        left: calc(50% + 560px);
    }
}

@media (min-width: 1760px) {
    .ya-ad-float--left {
        right: calc(50% + 600px);
    }

    .ya-ad-float--right {
        left: calc(50% + 600px);
    }
}

.ya-ad-sticky-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    pointer-events: none;
    display: flex;
    visibility: hidden;
    justify-content: center;
    padding: 0 12px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.ya-ad-sticky-wrap.ya-ad-sticky-wrap--visible {
    visibility: visible;
}

.ya-ad-sticky__frame {
    width: 100%;
    max-width: 728px;
    pointer-events: auto;
    background: var(--bg, #0f1117);
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--border, rgba(139, 148, 158, 0.12));
    border-bottom: none;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

[data-theme="light"] .ya-ad-sticky__frame {
    background: var(--bg, #f8fafc);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.ya-ad-sticky__label {
    display: block;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    color: var(--muted, #8b949e);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    opacity: 0.45;
    user-select: none;
    pointer-events: none;
    padding: 4px 8px 2px;
    margin: 0;
    background: inherit;
}

#ya_sticky_content,
.ya-sticky-banner {
    max-height: 15vh !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    pointer-events: auto;
}

#ya_sticky_content iframe,
#ya_sticky_content>div,
.ya-sticky-banner iframe {
    max-height: 15vh !important;
}

@media (max-width: 600px) {
    body:has(.ya-ad-sticky-wrap--visible) {
        padding-bottom: max(96px, 15vh);
    }

    .ya-ad-strip {
        margin: 32px auto 28px;
        padding: 0 16px 24px;
    }

    .container:has(+ .ya-ad-strip),
    .container:last-of-type {
        margin-bottom: 4px;
    }
}

/* Калькулятор: микро-полировка кнопок (главная) */
.grid .btn {
    border-radius: 11px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 8px rgba(46, 160, 67, 0.2);
}

@media (hover: hover) {
    .grid .btn:hover {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 6px 18px rgba(46, 160, 67, 0.32);
    }

    .grid .m-clear-btn:hover {
        box-shadow: 0 2px 10px rgba(218, 54, 51, 0.14);
        transform: translateY(-1px);
    }
}

.grid .m-clear-btn {
    border-radius: 7px;
    transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.grid .btn.ghost {
    box-shadow: none;
    border-radius: 11px;
}

.grid .btn.ghost:hover {
    box-shadow: 0 2px 12px rgba(218, 54, 51, 0.1);
}