.staging-ribbon {
    position: fixed;
    inset: 0 0 auto;
    z-index: 2000;
    min-height: 28px;
    padding: 5px 12px;
    background: #8a3b00;
    color: #fff;
    text-align: center;
    font: 700 12px/18px system-ui, sans-serif;
    letter-spacing: .08em;
}
.staging-ribbon + .pwa-status { top: 36px; }
body:has(.staging-ribbon) .app-wrapper { padding-top: 28px; }
.pwa-status {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 1990;
    padding: 7px 11px;
    border-radius: 999px;
    background: #146c43;
    color: #fff;
    font: 700 12px/1.2 system-ui, sans-serif;
    box-shadow: 0 4px 16px rgba(15, 41, 66, .25);
}
.pwa-status.is-offline { background: #842029; }
.pwa-update {
    position: fixed;
    inset: auto 12px 56px auto;
    z-index: 1990;
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: calc(100vw - 24px);
    padding: 10px 12px;
    border-radius: 8px;
    background: #0f2942;
    color: #fff;
    box-shadow: 0 6px 22px rgba(15, 41, 66, .3);
    font: 600 14px/1.3 system-ui, sans-serif;
}
.pwa-update[hidden] { display: none; }
.pwa-update button,
.offline-card button {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: #39bde8;
    color: #09233b;
    font-weight: 800;
}
.offline-page {
    display: grid;
    min-height: 100vh;
    margin: 0;
    place-items: center;
    padding: 24px;
    background: #eef5f8;
    color: #182b3c;
    font-family: system-ui, sans-serif;
}
.offline-card {
    width: min(100%, 460px);
    padding: 32px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 41, 66, .15);
    text-align: center;
}
.offline-card img { border-radius: 20px; }
.offline-card h1 { margin: 8px 0 12px; }
.offline-card p { line-height: 1.55; }
.offline-kicker { color: #8a3b00; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
@media (max-width: 575.98px) {
    .pwa-status { right: 8px; bottom: 8px; max-width: calc(100vw - 16px); }
    .pwa-update { right: 8px; bottom: 52px; }
}
@media (display-mode: standalone) {
    html, body {
        height: auto;
        min-height: 100%;
        overflow-y: auto !important;
        overscroll-behavior-y: auto;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
    .app-wrapper { min-height: 100dvh; overflow: visible; }
}
