.pwa-install,
.pwa-ios,
.pwa-push {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--bottom-nav-h, 62px) + env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 950;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(188, 19, 254, 0.35);
    background: rgba(18, 4, 34, 0.96);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.pwa-install.is-visible,
.pwa-ios.is-visible,
.pwa-push.is-visible {
    display: flex;
}

.pwa-install__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
}

.pwa-install__body,
.pwa-ios__body,
.pwa-push__body {
    flex: 1;
    min-width: 0;
}

.pwa-install__title,
.pwa-ios__title,
.pwa-push__title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.pwa-install__text,
.pwa-ios__text,
.pwa-push__text {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.72);
}

.pwa-install__actions,
.pwa-ios__actions,
.pwa-push__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.pwa-install__btn {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.pwa-install__btn--primary {
    color: #fff;
    background: linear-gradient(135deg, #bc13fe, #7a0cb5);
}

.pwa-install__btn--ghost {
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.06);
}

.pwa-update {
    position: fixed;
    top: calc(var(--topbar-h, 58px) + env(safe-area-inset-top, 0px) + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 960;
    display: none;
    align-items: center;
    gap: 10px;
    max-width: min(420px, calc(100vw - 24px));
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(188, 19, 254, 0.35);
    background: rgba(18, 4, 34, 0.96);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.pwa-update.is-visible {
    display: flex;
}

.pwa-update__text {
    margin: 0;
    flex: 1;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
}

.pwa-update__btn {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #bc13fe, #7a0cb5);
}

.pwa-stale {
    position: fixed;
    top: calc(var(--topbar-h, 58px) + env(safe-area-inset-top, 0px) + 10px);
    left: 12px;
    right: 12px;
    z-index: 940;
    display: none;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 193, 7, 0.35);
    background: rgba(40, 24, 8, 0.94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.pwa-stale.is-visible {
    display: block;
}

.pwa-stale__text {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #ffe082;
    text-align: center;
}

@media (min-width: 1200px) {
    .pwa-install,
    .pwa-ios,
    .pwa-push {
        left: auto;
        right: 18px;
        bottom: 18px;
        max-width: 360px;
    }
}

@media (display-mode: standalone) {
    .pwa-install,
    .pwa-ios {
        display: none !important;
    }

    .topbar {
        padding-top: env(safe-area-inset-top, 0px);
    }

    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

.is-pwa-standalone .topbar {
    padding-top: env(safe-area-inset-top, 0px);
}

.is-pwa-standalone .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.is-pwa-standalone .site-ads-footer-wrap,
.is-pwa-standalone .site-ads-inpage-top,
.is-pwa-standalone .site-ads-mobile-lead,
.is-pwa-standalone .site-ads-sidebar-wrap {
    display: none !important;
}
