html { background: #f5f7fb; }
body { min-height: 100dvh; }
.portal-header { padding-top: env(safe-area-inset-top); }
.portal-main,
.school-shell { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.pwa-install-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #cfd7e2;
    border-radius: 11px;
    background: #fff;
    color: #14264a;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}
.pwa-install-button[hidden] { display: none !important; }
.pwa-install-button:disabled { opacity: .55; cursor: wait; }
.pwa-install-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 18px 14px max(18px, env(safe-area-inset-bottom));
    background: rgba(13, 24, 45, .58);
    backdrop-filter: blur(6px);
}
.pwa-install-modal.show { display: flex; }
.pwa-install-dialog {
    position: relative;
    width: min(460px, 100%);
    padding: 26px 22px 24px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(13, 24, 45, .25);
    color: #20314b;
}
.pwa-install-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: #f1f4f8;
    color: #14264a;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.pwa-install-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: #14264a;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}
.pwa-install-kicker {
    margin: 16px 0 4px;
    color: #d6537c;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .07em;
}
.pwa-install-dialog h2 { margin: 0 42px 12px 0; color: #14264a; font-size: 1.35rem; }
.pwa-install-dialog ol { margin: 0; padding-left: 22px; color: #52627b; font-weight: 700; line-height: 1.65; }
.portal-app-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
@media (max-width: 620px) {
    .portal-app-actions { width: 100%; justify-content: stretch; }
    .portal-app-actions > button { flex: 1 1 150px; }
    .pwa-install-modal { align-items: flex-end; }
}
