.pwa-install {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: #0f2d52;
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 45, 82, 0.28);
    font: 600 13px/1.2 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    cursor: pointer;
}

.pwa-install[hidden],
.pwa-toast[hidden] {
    display: none;
}

.pwa-install:hover {
    background: #1a4a7a;
}

.pwa-install:focus-visible,
.pwa-toast__close:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

.pwa-install__icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 18px;
    line-height: 1;
}

.pwa-toast {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 76px));
    z-index: 1001;
    width: min(360px, calc(100vw - 32px));
    padding: 16px 44px 16px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #fff;
    color: #1a2332;
    box-shadow: 0 12px 36px rgba(15, 45, 82, 0.22);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pwa-toast__title {
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 700;
}

.pwa-toast__text {
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.pwa-toast__close {
    position: absolute;
    top: 7px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 520px) {
    .pwa-install {
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    .pwa-toast {
        right: 12px;
        bottom: max(70px, calc(env(safe-area-inset-bottom) + 70px));
        width: calc(100vw - 24px);
    }
}

@media (display-mode: standalone) {
    body {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
