*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: #000; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #fff;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
img { user-select: none; }

.landing {
  min-height: 100vh;
  background: #000;
}
.landing[data-layout="pending"] { visibility: hidden; }
.landing[data-layout="pc"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster-shell {
  position: relative;
  background: #000;
  overflow: hidden;
}
.poster-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  -webkit-user-drag: none;
}
.poster-hot {
  position: absolute;
  display: block;
  z-index: 3;
  background: transparent;
  border: 0;
  outline: 0;
  text-decoration: none;
  cursor: pointer;
}
.landing.debug-hotspots .poster-hot {
  outline: 2px solid rgba(255, 32, 32, .7);
  background: rgba(255, 32, 32, .12);
}

.poster-pc {
  width: 100vw;
  height: 100vh;
  display: none;
}
.landing[data-layout="pc"] .poster-pc { display: block; }
.landing[data-layout="pc"] .poster-mobile { display: none; }

/* PC coordinates are based on landing-pc.jpg, 1920x1080. */
.pc-channel,
.pc-service  { display: none; }
.pc-business { left: 82.97%; top: 5.00%; width: 6.98%; height: 4.17%; }
.pc-group    { left: 90.83%; top: 5.00%; width: 6.56%; height: 4.17%; }
.pc-ios      { left: 15.26%; top: 71.30%; width: 10.42%; height: 5.75%; }
.pc-android  { left: 15.26%; top: 77.80%; width: 10.42%; height: 5.75%; }
.pc-risk     { left: 12.08%; top: 87.50%; width: 40.00%; height: 10.00%; }
.qr-overlay {
  position: absolute;
  background: #fff;
  overflow: hidden;
  z-index: 4;
  border-radius: 8%;
}
.pc-qr {
  left: 5.78%;
  top: 71.10%;
  width: 7.29%;
  aspect-ratio: 1 / 1;
  padding: .31%;
}
.qr-overlay canvas,
.qr-overlay img,
.qr-overlay table,
.qr-overlay svg {
  width: 100% !important;
  height: 100% !important;
}

.poster-mobile {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  display: none;
}
.landing[data-layout="h5"] {
  min-height: 100vh;
}
.landing[data-layout="h5"] .poster-mobile { display: block; }
.landing[data-layout="h5"] .poster-img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
body.landing-h5 {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Mobile coordinates are based on the complete 2x landing-mobile.jpg artwork, displayed at 390x844. */
.mobile-channel,
.mobile-service  { display: none; }
.mobile-business { left: 68.21%; top: 3.79%; width: 24.87%; height: 4.15%; }
.mobile-group    { left: 68.21%; top: 8.53%; width: 24.87%; height: 4.15%; }
.mobile-ios      { left: 9.74%; top: 92.65%; width: 37.44%; height: 4.30%; }
.mobile-android  { left: 52.56%; top: 92.65%; width: 37.44%; height: 4.30%; }
.mobile-risk     { left: 28.21%; top: 82.20%; width: 69.23%; height: 9.00%; }
.mobile-qr {
  left: 10.00%;
  top: 82.40%;
  width: 17.95%;
  aspect-ratio: 1 / 1;
  padding: 1.28%;
}

/* Both visible buttons remain actionable on every device. The handlers
   keep their existing platform-specific download behavior. */

.auto-download-fallback {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 14px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(20, 20, 20, .88);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .32);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  transform: translateX(-50%);
  white-space: nowrap;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.auto-download-fallback[hidden] { display: none; }
.auto-download-fallback button {
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: #08b857;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.auto-download-fallback button:active { opacity: .78; }

/* ========== 安卓「安装包报毒解决方案」弹层 ========== */
.android-modal {
  position: fixed; inset: 0;
  background: #f5f5f5;
  color: #222;
  z-index: 100;
  overflow-y: auto;
}
.android-modal[hidden] { display: none; }
.android-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky; top: 0; z-index: 2;
}
.android-modal-back {
  width: 32px; height: 32px;
  background: none; border: 0; padding: 0;
  cursor: pointer;
}
.android-modal-back img { width: 100%; height: 100%; object-fit: contain; }
.android-modal-title { font-size: 16px; font-weight: 600; flex: 1; text-align: center; }
.android-modal-spacer { width: 32px; }

.android-modal-list { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.android-modal-cell {
  display: block;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
}
.android-modal-cell img { width: 100%; display: block; }

.android-modal-detail { padding: 12px; }
.android-modal-detail[hidden] { display: none; }
.android-modal-pic { background: #fff; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.android-modal-pic img { width: 100%; display: block; }
