/* =========================================================
 * Safari 引导弹窗样式（应用内浏览器 → Safari）
 * 仅在 iOS 非原生 Safari 环境由 safari-redirect.js 控制显示
 * ========================================================= */
#iab-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
#iab-overlay.iab-show {
  display: flex;
}

/* 动画箭头：指向右上角「⋯」分享按钮 */
.iab-arrow {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 4px);
  right: 14px;
  z-index: 2147483001;
  font-size: 44px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  animation: iab-nudge 1.1s ease-in-out infinite;
}
@keyframes iab-nudge {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  50%      { transform: translate(9px, -9px) scale(1.15); opacity: 1; }
}

/* 弹窗卡片 */
.iab-card {
  position: relative;
  width: min(92vw, 400px);
  max-height: 86vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border-radius: 18px;
  padding: 30px 24px 22px;
  text-align: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
  animation: iab-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes iab-pop {
  from { transform: scale(0.85) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.iab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #38b6ff, #007aff);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.35);
}

.iab-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.3;
  color: #111;
}

.iab-desc {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #555;
}

/* 跳转尝试进度提示（点击 Open in Safari 后显示） */
.iab-tip {
  min-height: 16px;
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #8a94a6;
}

/* 三步手动指引 */
.iab-steps {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  text-align: left;
}
.iab-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 9px 11px;
  border: 1px solid #e6ecf3;
  border-radius: 10px;
  background: #f6f9fc;
  font-size: 0.92rem;
  line-height: 1.35;
  color: #222;
}
.iab-steps li:last-child {
  margin-bottom: 0;
}
.iab-num {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: #007aff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 按钮 */
.iab-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.iab-open {
  background: #007aff;
  color: #fff;
  margin-bottom: 10px;
}
.iab-open:active {
  background: #0062cc;
}
.iab-continue {
  background: #eef2f6;
  color: #333;
}
.iab-continue:active {
  background: #dde4ec;
}

body.iab-locked {
  overflow: hidden !important;
}

/* 超小屏适配 */
@media only screen and (max-width: 350px) {
  .iab-card {
    padding: 22px 16px 18px;
  }
  .iab-card h2 {
    font-size: 1.15rem;
  }
  .iab-arrow {
    font-size: 36px;
    right: 10px;
  }
}
