/* ===== PWA 安装引导 / 离线提示 / 版本更新 ===== */
.pwa-tip {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(66px + env(safe-area-inset-bottom));
  max-width: 496px;
  margin: 0 auto;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .16);
  font-size: 13px;
  color: #333;
  animation: pwa-up .25s ease;
}

.pwa-tip[hidden] {
  display: none !important;
}

@keyframes pwa-up {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.pwa-tip-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: none;
  display: block;
}

.pwa-tip-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
}

.pwa-tip-body strong {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-tip-body span {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-tip-btn {
  flex: none;
  height: 32px;
  padding: 0 16px;
  border: none;
  border-radius: 16px;
  background: #fd4d4d;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pwa-tip-btn:disabled {
  opacity: .6;
}

.pwa-tip-close {
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  color: #bbb;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pwa-hint .pwa-tip-body strong::before {
  content: "📲 ";
  color: #fd4d4d;
}

.pwa-offline {
  background: #333;
  color: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}

.pwa-offline .pwa-tip-body strong,
.pwa-offline .pwa-tip-body span {
  color: #fff;
}

.pwa-offline .pwa-tip-body span {
  opacity: .7;
}

.pwa-update .pwa-tip-body strong::before {
  content: "⟳ ";
  color: #fd4d4d;
}