.pwa-install-top {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    background: linear-gradient(90deg, #1E4B70 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.18);
    padding: calc(8px + env(safe-area-inset-top, 0)) 10px 8px;
}

.pwa-install-top.is-visible {
    display: block;
    pointer-events: auto;
}

html.has-pwa-install-top body {
    padding-top: 52px;
}

html.has-pwa-install-top body.pwa-mobile-shell {
    padding-top: 52px;
}

/* Welcome page: shell fills leftover space under the fixed install strip */
html.has-pwa-install-top body.app-welcome-page {
    padding-top: 52px;
}

.pwa-install-top__inner {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-top__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.pwa-install-top__copy {
    flex: 1;
    min-width: 0;
}

.pwa-install-top__title {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
}

.pwa-install-top__hint {
    display: block;
    font-size: 0.62rem;
    opacity: 0.85;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-top__hint-btn {
    display: inline;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.pwa-install-top__actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
}

.pwa-install-top__btn {
    flex-shrink: 0;
    border: none;
    border-radius: 999px;
    padding: 7px 11px;
    background: #fff;
    color: #1E4B70;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.pwa-install-top__btn:disabled {
    opacity: 0.6;
}

.pwa-install-top__btn--ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.pwa-install-top__close {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* Install guide video overlay */
.pwa-install-video-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 13000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(7, 31, 51, 0.92);
}

.pwa-install-video-overlay.is-open {
    display: flex;
}

.pwa-install-video-overlay__panel {
    position: relative;
    width: min(420px, 100%);
    background: #000;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.pwa-install-video-overlay__panel video {
    display: block;
    width: 100%;
    max-height: min(78vh, 900px);
    background: #000;
}

.pwa-install-video-overlay__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 2;
    width: 2.4rem;
    height: 2.4rem;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #071f33;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.pwa-install-video-overlay__caption {
    margin: 0;
    padding: 0.75rem 1rem;
    background: #071f33;
    color: #f8fafc;
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: center;
}

.pwa-install-video-overlay__switch {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.65rem 1rem 0.85rem;
    border: none;
    background: #163a56;
    color: #fbbf24;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 420px) {
    .pwa-install-top__hint {
        display: none;
    }

    .pwa-install-top__btn--ghost {
        padding: 7px 9px;
        font-size: 0.64rem;
    }
}
