/* iOS「添加到主屏幕」引导条：仅由 /assets/pwa.js 在 iOS Safari 下插入。 */
.pwa-install-tip {
  position: fixed;
  z-index: 15000;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: min(420px, calc(100vw - 24px));
  transform: translateX(-50%);
  box-sizing: border-box;
  padding: 16px 18px 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  background: #20252e;
  color: #f2f4f8;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
  font-size: 13px;
  line-height: 1.6;
  animation: pwa-tip-in 0.24s ease-out both;
}

.pwa-install-tip.is-closing {
  animation: pwa-tip-out 0.2s ease-in both;
}

.pwa-install-tip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pwa-install-tip-head strong {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: #f2f4f8;
}

.pwa-install-tip-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: #2b3340;
  color: #ed985e;
}

.pwa-install-tip-icon svg {
  width: 16px;
  height: 16px;
}

.pwa-install-tip-close {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #b0bccd;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pwa-install-tip p {
  margin: 0 0 8px;
  color: #b0bccd;
}

.pwa-install-tip ol {
  margin: 0 0 14px;
  padding-left: 18px;
  color: #d1d8e3;
}

.pwa-install-tip ol li + li {
  margin-top: 2px;
}

.pwa-install-tip-ok {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: #ed985e;
  color: #24170e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* 手机上让出底部导航栏的高度。 */
@media (max-width: 900px) {
  .pwa-install-tip {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

@keyframes pwa-tip-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes pwa-tip-out {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-tip,
  .pwa-install-tip.is-closing {
    animation: none;
  }
}
