/* Install UI follows Linime's existing dark surfaces and light actions. */
[data-pwa-install][hidden], [data-pwa-platform][hidden], .pwa-banner[hidden] { display: none !important; }
.navbar .pwa-nav-install {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto;
    min-height: 44px; padding: 0 12px; border: 1px solid rgba(131, 195, 255, .35); border-radius: 12px;
    background: rgba(131, 195, 255, .09); color: #c5e3ff; font: inherit; font-size: 13px; font-weight: 600;
    white-space: nowrap; cursor: pointer;
}
.navbar .pwa-nav-install:hover { background: rgba(131, 195, 255, .17); color: #fff; }
.navbar .pwa-nav-install:disabled { opacity: .6; cursor: wait; }
button.pwa-menu-install { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; }
.pwa-banner {
    position: fixed; z-index: 1200; right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom)); width: min(420px, calc(100% - 2rem));
    box-sizing: border-box; display: grid; grid-template-columns: 44px minmax(0, 1fr) 28px;
    gap: 12px; padding: 16px; border: 1px solid var(--linime-line, #303640);
    border-radius: var(--radius-lg, 12px); background: #10141c; color: #f5f7fa;
    box-shadow: 0 12px 36px #0007; font-family: Inter, system-ui, sans-serif;
}
.pwa-banner > img { width: 44px; height: 44px; border-radius: 10px; }
.pwa-copy { min-width: 0; }
.pwa-copy strong { display: block; font-size: 16px; line-height: 1.4; font-weight: 700; }
.pwa-copy p { margin: 4px 0 0; color: #bec7d6; font-size: 13px; line-height: 1.5; }
.pwa-actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.pwa-primary, .pwa-secondary, .pwa-close {
    box-sizing: border-box; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    min-height: 44px; border-radius: 8px; padding: 10px 14px; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center;
}
.pwa-primary { background: #f5f7fa; color: #090c12; border: 1px solid #f5f7fa; }
.pwa-secondary { background: transparent; color: #d1d8e4; border: 1px solid #424b5a; }
.pwa-close { min-height: 28px; width: 28px; padding: 0; border: 0; background: transparent; color: #c1cad9; font-size: 24px; }
.pwa-primary:hover { background: #dcecff; }
.pwa-secondary:hover, .pwa-close:hover { color: #fff; background: #232c39; }
.pwa-banner button:disabled { opacity: .6; cursor: wait; }
.pwa-banner button:focus-visible, .pwa-dialog button:focus-visible, .pwa-menu-install:focus-visible, .pwa-offline a:focus-visible { outline: 2px solid #83c3ff; outline-offset: 3px; }
.pwa-dialog { box-sizing: border-box; width: min(460px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; overflow-y: auto; overscroll-behavior: contain; padding: 24px; border: 1px solid #394351; border-radius: 12px; background: #10141c; color: #f5f7fa; font-family: Inter, system-ui, sans-serif; }
.pwa-dialog::backdrop { background: #000b; }
.pwa-dialog h2 { margin: 0 0 16px; font-size: 22px; }
.pwa-dialog p { color: #c5cede; font-size: 14px; line-height: 1.7; margin: 12px 0; }
.pwa-dialog strong { color: #fff; }
.pwa-dialog ol { padding-left: 22px; list-style: decimal; color: #c5cede; font-size: 14px; line-height: 1.7; }
.pwa-dialog li + li { margin-top: 10px; }
.pwa-dialog .pwa-secondary { margin-top: 12px; }
.pwa-dialog #pwa-help-status:empty { display: none; }
.pwa-update { grid-template-columns: minmax(0, 1fr); }
.pwa-update .pwa-actions { grid-column: 1; }
.pwa-offline { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #090c12; color: #f5f7fa; font-family: system-ui, sans-serif; }
.pwa-offline main { max-width: 440px; padding: 32px 24px; text-align: center; }
.pwa-offline p { color: #c5cede; line-height: 1.7; }
.pwa-offline h1 { font-size: clamp(24px, 6vw, 32px); }
.pwa-offline .pwa-eyebrow { color: #83c3ff; font-weight: 700; }
@media (max-width: 480px) {
    .navbar .pwa-nav-install { padding-inline: 8px; font-size: 12px; gap: 4px; }
    .pwa-nav-visible #navbar .linime-wordmark { display: none; }
    .pwa-nav-visible #navbar .linime-brand { gap: 0; }
    .pwa-dialog { padding: 20px; }
    .pwa-banner { gap: 10px; padding: 14px; grid-template-columns: 40px minmax(0, 1fr) 28px; }
    .pwa-banner > img { width: 40px; height: 40px; }
    .pwa-actions { grid-column: 1 / -1; }
    .pwa-update { grid-template-columns: minmax(0, 1fr); }
}
