/* =========================================================
   PWA install prompt — UI contrôlée par le jeu.
   Affichée uniquement lorsque Chromium expose beforeinstallprompt.
   ========================================================= */
.pwaInstallPrompt {
    position: fixed;
    z-index: 25000;
    left: 50%;
    top: calc(max(12px, env(safe-area-inset-top)) + 14px);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: min(400px, calc(100vw - 24px));
    padding: 10px 10px 10px 12px;
    border: 1px solid rgba(116, 190, 222, .58);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(9, 39, 62, .98), rgba(4, 24, 40, .99));
    box-shadow: 0 10px 30px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .08);
    color: #eefaff;
    font-family: "Poppins", Arial, sans-serif;
}
.pwaInstallPrompt[hidden] { display: none !important; }
.pwaInstallPromptIcon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(116, 190, 222, .13);
    color: #8edcff;
    font-size: 17px;
}
.pwaInstallPromptCopy {
    min-width: 0;
    line-height: 1.15;
}
.pwaInstallPromptCopy strong {
    display: block;
    margin-bottom: 3px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}
.pwaInstallPromptCopy span {
    display: block;
    color: #b9cedd;
    font-size: 9px;
    font-weight: 600;
}
.pwaInstallPromptActions {
    display: flex;
    align-items: center;
    gap: 5px;
}
.pwaInstallPromptInstall,
.pwaInstallPromptClose {
    border: 0;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    touch-action: manipulation;
}
.pwaInstallPromptInstall {
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid rgba(255, 224, 154, .48);
    border-radius: 9px;
    background: linear-gradient(180deg, #b68535, #78531d);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .25px;
}
.pwaInstallPromptClose {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    font-size: 13px;
}
.pwaInstallPromptInstall:active,
.pwaInstallPromptClose:active { transform: scale(.94); }

@media (max-width: 520px) {
    .pwaInstallPrompt {
        width: min(360px, calc(100vw - 18px));
        top: calc(max(10px, env(safe-area-inset-top)) + 10px);
        gap: 8px;
        padding: 9px 9px 9px 11px;
    }
    .pwaInstallPromptCopy strong {
        font-size: 10px;
    }
    .pwaInstallPromptCopy span {
        font-size: 8.5px;
    }
    .pwaInstallPromptInstall {
        min-height: 30px;
        padding: 0 9px;
        font-size: 8.5px;
    }
    .pwaInstallPromptClose {
        width: 28px;
        height: 28px;
    }
}

@media (min-width: 521px) and (max-width: 1024px) and (pointer: coarse) {
    .pwaInstallPrompt {
        top: calc(max(12px, env(safe-area-inset-top)) + 14px);
    }
}


@media (min-width: 1025px) {
    .pwaInstallPrompt {
        top: 18px;
    }
}
