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

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

.poster-shell {
  position: relative;
  background: var(--landing-poster-bg);
  overflow: hidden;
}
.poster-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  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: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  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-group    { left: 65.16%; top: 4.07%; width: 10.16%; height: 6.67%; }
.pc-business { left: 76.41%; top: 4.07%; width: 9.95%; height: 6.67%; }
.pc-channel  { left: 87.66%; top: 4.07%; width: 9.95%; height: 6.67%; }
.qr-overlay {
  position: absolute;
  background: #fff;
  overflow: hidden;
  z-index: 4;
}
.pc-qr {
  left: 5.94%;
  top: 71.11%;
  width: 7.03%;
  aspect-ratio: 1 / 1;
}
.pc-ios      { left: 15.26%; top: 70.93%; width: 10.63%; height: 6.30%; }
.pc-android  { left: 15.26%; top: 77.87%; width: 10.63%; height: 6.30%; }
.qr-overlay canvas,
.qr-overlay img,
.qr-overlay table,
.qr-overlay svg {
  width: 100% !important;
  height: 100% !important;
}

.poster-mobile {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  display: none;
  transform: translateY(-1px);
}
.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;
  background: var(--landing-poster-bg);
}

/* Mobile coordinates are based on landing-mobile.jpg, 1080x1920. */
.mobile-group    { left: 39.26%; top: 4.69%; width: 17.59%; height: 3.54%; }
.mobile-business { left: 58.61%; top: 4.69%; width: 17.31%; height: 3.54%; }
.mobile-channel  { left: 77.59%; top: 4.69%; width: 17.59%; height: 3.54%; }
.mobile-ios      { left: 9.07%; top: 88.18%; width: 37.22%; height: 5.68%; }
.mobile-android  { left: 53.89%; top: 88.18%; width: 37.22%; height: 5.68%; }

.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; }
