.pwa-bottom-nav,
.pwa-update-banner {
    display: none;
}

.pwa-update-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 10000;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #0d1020;
    color: #fff;
    box-shadow: 0 18px 44px rgba(16, 20, 36, 0.24);
    font-size: 0.95rem;
    font-weight: 700;
}

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

.pwa-update-banner button {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: #0d1020;
    font: inherit;
    font-weight: 800;
}

body.pwa-standalone header,
body.pwa-standalone footer {
    display: none;
}

body.pwa-standalone main {
    padding-bottom: 82px;
}

body.pwa-standalone .lk-container {
    display: block;
    margin: 0;
}

body.pwa-standalone .lk-nav-container {
    display: none;
}

body.pwa-standalone .lk-content-container {
    grid-column: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    padding: 12px;
}

body.pwa-standalone .pwa-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(221, 226, 236, 0.9);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.pwa-bottom-nav-link {
    min-height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #6e768c;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 800;
}

.pwa-bottom-nav-link.active {
    background: #0d1020;
    color: #fff;
}

body.dark-theme.pwa-standalone .pwa-bottom-nav {
    border-top-color: rgba(58, 79, 99, 0.9);
    background: rgba(20, 30, 44, 0.96);
}

body.dark-theme.pwa-standalone .pwa-bottom-nav-link {
    color: #b8c0cc;
}

body.dark-theme.pwa-standalone .pwa-bottom-nav-link.active {
    background: #4fc3d8;
    color: #0d1020;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
    header,
    footer {
        display: none;
    }

    main {
        padding-bottom: 82px;
    }

    .lk-container {
        display: block;
        margin: 0;
    }

    .lk-nav-container {
        display: none;
    }

    .lk-content-container {
        grid-column: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        padding: 12px;
    }

    .pwa-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9998;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(221, 226, 236, 0.9);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
    }
}
