.pwa-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999;
  padding: 16px;
  animation: pwa-fade .22s ease;
}
@keyframes pwa-fade { from { opacity: 0 } to { opacity: 1 } }

.pwa-modal {
  background: #fff;
  border-radius: 20px;
  max-width: 380px;
  width: 100%;
  padding: 28px 24px 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  position: relative;
  animation: pwa-rise .28s cubic-bezier(.2,.7,.4,1.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}
@keyframes pwa-rise { from { transform: translateY(20px) scale(.96); opacity: 0 } to { transform: none; opacity: 1 } }

.pwa-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: 0;
  font-size: 26px; line-height: 1;
  color: #94a3b8; cursor: pointer;
  padding: 4px 8px; border-radius: 8px;
}
.pwa-close:hover { background: #f1f5f9; color: #475569; }

.pwa-logo {
  width: 72px; height: 72px;
  object-fit: contain;
  margin: 0 auto 12px; display: block;
}

.pwa-title {
  font-size: 1.15rem; font-weight: 700;
  margin: 0 0 10px;
  color: #0f172a;
}

.pwa-lead {
  font-size: .95rem; color: #334155;
  margin: 0 0 12px; line-height: 1.45;
}

.pwa-steps {
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px 12px 32px;
  margin: 0 0 12px;
  font-size: .9rem; color: #334155;
  line-height: 1.6;
}
.pwa-steps li { margin-bottom: 6px; }
.pwa-steps li:last-child { margin-bottom: 0; }

.pwa-glyph {
  display: inline-block;
  background: #e2e8f0;
  border-radius: 6px;
  padding: 0 6px;
  font-size: .85rem;
}

.pwa-hint {
  font-size: .8rem; color: #64748b;
  margin: 0 0 16px; line-height: 1.4;
}

.pwa-actions {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 8px;
}

.pwa-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: filter .15s, transform .05s;
}
.pwa-btn:active { transform: translateY(1px); }
.pwa-btn-primary {
  background: #10b981; color: #fff;
}
.pwa-btn-primary:hover { filter: brightness(1.08); }
.pwa-btn-secondary {
  background: #f1f5f9; color: #334155;
}
.pwa-btn-secondary:hover { background: #e2e8f0; }

@media (prefers-color-scheme: dark) {
  .pwa-modal { background: #1e293b; }
  .pwa-title { color: #f1f5f9; }
  .pwa-lead, .pwa-steps { color: #cbd5e1; }
  .pwa-steps { background: #0f172a; border-color: #334155; }
  .pwa-hint { color: #94a3b8; }
  .pwa-btn-secondary { background: #334155; color: #e2e8f0; }
  .pwa-close { color: #64748b; }
  .pwa-close:hover { background: #334155; color: #cbd5e1; }
}

/* ---- Sidebar manual-install button ---- */
#pwa-install-item { display: block; }
#pwa-install-link { cursor: pointer; }
