/* qiezi-go landing page styles
 *
 * 两套布局：PC（≥961px）+ H5（<961px），由 landing.js 在 detectDevice 后给
 * <main.landing> 加 data-layout="pc"/"h5" + data-os="ios"/"android"。
 * 热区位置全部精确测自 Figma node 637:260 的 absoluteBoundingBox（见
 * doc 落地页/landing板块实施方案.md §7）。
 *
 *  - PC 背景：3840×2160 (Figma node 637:26 @2x，原 1920×1080 设计稿)
 *  - H5 iOS：750×1270 (node 637:100 裁掉 iPhone 状态栏 88px + Safari 栏 266px)
 *  - H5 Android：750×1536 (node 637:159 仅裁状态栏 88px，无 Safari 栏)
 *
 * iOS / Android 两张 H5 背景图尺寸不同 → 热区百分比按各自图分别算，通过
 * .landing[data-os="ios|android"] 选择器切换。url 加 ?debug=1 可看红框对齐。
 */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; 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 { position: fixed; inset: 0; }
.landing[data-layout="pending"] { visibility: hidden; }

.pc-shell, .h5-shell { display: none; position: absolute; inset: 0; overflow: hidden; }
.landing[data-layout="pc"] .pc-shell { display: flex; align-items: center; justify-content: center; background: #000; }
.landing[data-layout="h5"] .h5-shell { display: flex; align-items: center; justify-content: center; background: #000; }

/* H5：按图宽高比(750×1400)框定、居中最大化填入视口——比例吻合的手机满屏无边，
   其它比例居中留极窄黑边(图本身深色，融入黑底几乎无感)。**不再 object-fit:fill 拉伸**
   (旧做法在非 0.536 比例屏上明显变形)；热区/按钮 % 相对 .h5-frame(=图片本身)，
   与屏幕比例无关、不漂移。 */
.h5-frame {
  position: relative;
  width: 100%; height: 100%;
  max-width: calc(100vh * 750 / 1400);
  max-height: calc(100vw * 1400 / 750);
  aspect-ratio: 750 / 1400;
}

/* PC：按图宽高比(1672×941)框定，最大化填入视口——16:9 窗口=满屏无黑边，
   其它比例=居中留极窄黑边；热区/二维码 % 相对 .pc-frame(=图片本身)，与窗口比例无关，
   彻底解决 object-fit:cover 裁剪导致热区漂移。 */
.pc-frame {
  position: relative;
  width: 100%; height: 100%;
  max-width: calc(100vh * 1672 / 941);
  max-height: calc(100vw * 941 / 1672);
  aspect-ratio: 1672 / 941;
}
.pc-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: fill;
  pointer-events: none;
  -webkit-user-drag: none;
}
.h5-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: fill;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* ========== 热区基础样式 ========== */
.hotspot {
  position: absolute;
  display: block;
  background: transparent;
  text-decoration: none;
  border: 0;
  outline: 0;
  cursor: pointer;
  z-index: 5;
}
.landing.debug-hotspots .hotspot { outline: 2px solid rgba(255,64,64,.6); background: rgba(255,64,64,.08); }

/* ========== PC 热区（黄豆新版 pc.jpg 1672×941；坐标首版估算，用 ?debug 微调） ========== */
/* 右上 3 个外链：广告合作 / 官方群组 / 渠道合作 */
.pc-biz     { top: 3.5%; left: 73.5%; width: 8.5%; height: 4.5%; }
.pc-group   { top: 3.5%; left: 83.0%; width: 8.5%; height: 4.5%; }
.pc-channel { top: 3.5%; left: 91.0%; width: 8.5%; height: 4.5%; }

/* 二维码（qrcode.min.js 渲染当前 URL，含渠道码；压在右下白方块上，坐标=图像分析实测白块） */
.pc-qr {
  position: absolute;
  top: 75.9%; left: 81.9%;
  width: 10.5%; aspect-ratio: 1/1;
  background: #fff;
  padding: 4px;
  z-index: 4;
}
.pc-qr canvas, .pc-qr img { width: 100% !important; height: 100% !important; display: block; }

/* ========== H5 热区（黄豆魔改新图 1400(1).jpg 750×1400，iOS/安卓同图；
   顶部 3 链接图标经图像分析实测 中心≈60%/77.7%/95.4%、header top 1~6%；热区取生成宽度确保可点） ========== */
.h5-biz         { top: 1.4%; left: 47.0%; width: 17.5%; height: 4.8%; }
.h5-group       { top: 1.4%; left: 64.5%; width: 16.5%; height: 4.8%; }
.h5-channel     { top: 1.4%; left: 81.0%; width: 18.5%; height: 4.8%; }
.h5-bottom-text { top: 96.3%; left: 4.0%; width: 92.0%; height: 3.2%; }

/* ========== H5 底部 2 按钮（叠在 frame 底部，随图等比定位，不再是固定栏） ========== */
.h5-dlbar {
  position: absolute; left: 3%; right: 3%; bottom: 5%;
  z-index: 20;
  display: flex;
  gap: 4%;
  justify-content: center; align-items: center;
}
.h5-dlbtn { flex: 1 1 0; max-width: 47%; line-height: 0; }
.h5-dlbtn img { width: 100%; height: auto; display: block; }

/* 安装教程圆形金徽章（右下浮动，光泽金 + 呼吸动效，仿参考站样式） */
.h5-guide-btn {
  position: absolute;
  right: 4%; bottom: 14%;
  z-index: 25;
  width: 74px; height: 74px;
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1px;
  text-decoration: none;
  color: #4a2e00;
  background: radial-gradient(circle at 50% 30%, #ffedb0 0%, #f6cc5a 45%, #d99a2b 100%);
  border: 2px solid #ffeeb8;
  box-shadow: 0 4px 12px rgba(0,0,0,.55), inset 0 2px 7px rgba(255,255,255,.7), inset 0 -4px 9px rgba(150,90,0,.45);
  animation: h5GuidePulse 2s ease-in-out infinite;
}
.h5-guide-ic { width: 22px; height: 22px; color: #5a3800; }
.h5-guide-tx { font-size: 12px; font-weight: 800; line-height: 1.1; text-shadow: 0 1px 0 rgba(255,255,255,.45); letter-spacing: .5px; }
@keyframes h5GuidePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .h5-guide-btn { animation: none; } }

/* H5 一屏显示，不滚动 */
body.landing-h5 { overflow: hidden; }

/* ========== B 版：长屏滚动 + 固定下载栏（Figma node 104-2） ========== */
body.b-version { overflow: auto; background: #000; }
.landing.landing-b { position: relative; inset: auto; display: block; width: 100%; max-width: 750px; margin: 0 auto; background: #000; --b-bar-h: clamp(112px, calc(16.15vw + 54px), 132px); }
.landing-b:not([data-layout="b-pc"]) .b-pc,
.landing-b[data-layout="b-pc"] .b-shell,
.landing-b[data-layout="b-pc"] .b-dlbar { display: none; }
.b-shell { position: relative; padding-bottom: calc(var(--b-bar-h) + env(safe-area-inset-bottom, 0px)); }
.b-top { position: relative; }
.b-top-video {
  position: absolute;
  left: 31.2%;
  top: 37.37%;
  width: 33.07%;
  height: 26.27%;
  clip-path: polygon(14% 5%, 18% 4%, 91% 9.1%, 95% 10.7%, 96% 13%, 88% 95.2%, 44% 96%, 8% 94%, 5.5% 92%, 4.8% 89%);
  pointer-events: none;
  opacity: 0;
}
.b-top-video.is-playing { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .b-top-video.is-playing { opacity: 0; }
}
.b-slice { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
/* 最新画板顶部图层：750×1180 首图内的坐标，独立导出，不烤进背景。 */
.b-logo { position: absolute; left: 4%; top: 2.711864%; font-size: clamp(9px, 2.4vw, 18px); }
.b-links { display: contents; }
.b-link { position: absolute; top: 1.779661%; width: 9.333333%; height: 6.943329%; text-decoration: none; }
.b-link-channel { left: 63.6%; }
.b-link-business { left: 75.304834%; }
.b-link-group { left: 87.009652%; width: 9.866667%; }
.b-link img { display: block; width: 100%; height: auto; }
.b-link::before { content: ""; position: absolute; inset: -2px; min-width: 44px; min-height: 44px; left: 50%; transform: translateX(-50%); }
.b-dlbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: 750px; margin: 0 auto; min-height: calc(var(--b-bar-h) + env(safe-area-inset-bottom, 0px)); padding: 12px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, rgba(0,0,0,.96) 65%, rgba(0,0,0,0)); text-align: center; }
.b-dlrow { display: flex; align-items: center; justify-content: center; gap: 14px; }
.b-dlbtn { display: block; width: 64%; max-width: 300px; line-height: 0; animation: bBtnPulse 1.8s ease-in-out infinite; }
.b-btn-art { position: relative; display: block; width: 100%; aspect-ratio: 428 / 108; overflow: hidden; }
.b-dlbtn img { position: absolute; display: block; width: 113.93%; height: 151.03%; left: -6.58%; top: -24.62%; }
/* 安卓「安装被拦截」处理入口：下载按钮下方一行字，点开报毒解决方案弹层；iOS 不需要、隐藏。
   安卓多出这一行，固定下载栏和页面底部留白同步加高(--b-bar-h)。 */
.b-guide { display: block; margin: 8px auto 0; padding: 4px 0; max-width: 92%; font-size: 12px; line-height: 18px; color: rgba(255,255,255,.72); text-decoration: none; }
.b-guide span { color: #ffd27a; text-decoration: underline; text-underline-offset: 2px; }
.landing.landing-b:not([data-os="ios"]) { --b-bar-h: clamp(140px, calc(16.15vw + 84px), 160px); }
.landing-b[data-os="ios"] .b-guide { display: none; }
.b-webbtn { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border: 1px solid #e6ba5d; border-radius: 24px; color: #ffe0a0; background: #21180b; font-size: 14px; text-decoration: none; }
/* 悬浮广告避开固定下载栏。 */
.landing-b[data-layout="b"] .ad-float { right: max(12px, calc((100vw - 750px) / 2 + 12px)); bottom: calc(var(--b-bar-h) + 94px + env(safe-area-inset-bottom, 0px)); }
.landing-b a:focus-visible { outline: 2px solid #ffe1a0; outline-offset: 3px; }
@keyframes bBtnPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .b-dlbtn { animation: none; } }

/* B 版桌面长页，按 1920px 画板定位首屏下载按钮。 */
.landing.landing-b[data-layout="b-pc"] { max-width: none; --b-pc-header-h: clamp(64px, 4.17vw, 80px); }
.b-pc-header { position: sticky; top: 0; z-index: 30; background: #090900; }
.b-pc-header-inner {
  display: flex;
  align-items: center;
  max-width: 1920px;
  min-height: var(--b-pc-header-h);
  padding-inline: clamp(28px, 6.25vw, 120px);
  margin-inline: auto;
  gap: clamp(16px, 2.08vw, 40px);
  white-space: nowrap;
}
.b-pc-logo { flex: none; font-size: clamp(10px, .73vw, 14px); }
.b-brand { display: inline-flex; align-items: center; gap: .6em; color: #fff; text-decoration: none; }
/* 品牌图标:独立方形 H 图标(brand-icon.webp,由 common/icon.png 生成),金色细边用 CSS 画。
   原来裁的是一整张带「黄豆短剧 hddj35.com」字样的 logo.webp,既糊又会下载带旧域名的图。 */
.b-brand-icon { display: block; flex: none; width: 3.4em; height: 3.4em; overflow: hidden; border: 1px solid rgba(214,168,62,.85); border-radius: 24%; box-sizing: border-box; background: #000; }
.b-brand .b-brand-icon img { display: block; width: 100%; max-width: none; height: 100%; }
.b-brand-copy { display: flex; flex-direction: column; gap: .3em; }
.b-brand-name { display: flex; justify-content: space-between; font-size: 1.9em; font-weight: 800; line-height: 1; }
.b-brand-domain { display: block; font-family: Arial, sans-serif; font-size: 1em; line-height: 1.2; white-space: nowrap; }
.b-pc-nav, .b-pc-links { display: flex; align-items: center; }
.b-pc-nav { gap: clamp(12px, 1.04vw, 20px); margin-left: clamp(0px, calc(3.75vw - 36px), 20px); }
.b-pc-nav a { color: #f8f7f7; font-size: clamp(15px, 1.04vw, 20px); text-decoration: none; }
.b-pc-nav a:hover, .b-pc-nav a[aria-current="location"] { color: #ffc30d; }
.b-pc-links { margin-left: auto; gap: clamp(10px, 1.56vw, 30px); }
.b-pc-links a { position: relative; display: block; width: 40px; height: 40px; }
.b-pc-channel-icon {
  position: absolute;
  top: 11.98px;
  left: 10px;
  mask: url('/static/assets/pc/b/channel-mask.svg') 0 -1.982px / 20px 20px no-repeat;
}
.b-pc-download, .b-pc-dialog-close, .b-pc-hero-download { cursor: pointer; font: inherit; }
.b-pc-download {
  min-height: 40px;
  min-width: clamp(120px, 7.71vw, 148px);
  border: 0;
  border-radius: 999px;
  background: #ffc30d;
  color: #090900;
  font-size: clamp(16px, 1.04vw, 20px);
}
.b-pc-content { max-width: 1920px; margin-inline: auto; }
.b-pc-section { scroll-margin-top: var(--b-pc-header-h); }
.b-pc-slice { display: block; width: 100%; height: auto; }
.b-pc-hero { position: relative; }
.b-pc-hero .b-pc-video { left: 18.21%; top: 23.45%; width: 16.14%; height: 35.31%; object-fit: fill; }
.b-pc-hero-download {
  position: absolute;
  left: 17.96875%;
  top: 80.0759%;
  width: 17.76042%;
  aspect-ratio: 341 / 86.047;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  isolation: isolate;
}
.b-pc-hero-download::before { content: ""; position: absolute; inset: 4.62% 2.9% 3.84%; border-radius: 999px; background: #000; z-index: -1; }
.b-pc-hero-download img { position: absolute; display: block; width: 113.93%; height: 151.03%; left: -6.58%; top: -24.62%; }
.b-pc button:focus-visible { outline: 2px solid #ffe1a0; outline-offset: 3px; }
.b-pc-dialog {
  position: fixed;
  margin: 0;
  z-index: 40;
  box-shadow: 0 8px 32px rgb(0 0 0 / 35%);
  padding: 26px 28px;
  border: 1px solid #8e7136;
  border-radius: 16px;
  background: #15110a;
  color: #fff;
  text-align: center;
}
.b-pc-dialog h2 { margin: 6px 18px 14px; font-size: 20px; }
.b-pc-dialog-close { position: absolute; top: 4px; right: 6px; width: 36px; height: 36px; border: 0; color: #fff; background: transparent; font-size: 24px; }
.b-pc-qr { padding: 14px; background: #fff; }
.b-pc-qr canvas, .b-pc-qr img { display: block; }

/* ========== 安卓「安装包报毒解决方案」弹层（深色金主题，与落地页统一） ========== */
.android-modal {
  position: fixed; inset: 0;
  background: #0d0a07;
  color: #e8d9a8;
  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: linear-gradient(180deg, #241a0c, #1a1308);
  border-bottom: 1px solid rgba(212,175,55,.35);
  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; filter: invert(1) sepia(1) saturate(2) hue-rotate(5deg) brightness(1.1); }
.android-modal-title { font-size: 16px; font-weight: 700; flex: 1; text-align: center; color: #f2d675; letter-spacing: 1px; }
.android-modal-spacer { width: 32px; }

.android-modal-list { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
/* 修：列表 display:flex 会盖过 hidden 属性的 display:none，点「查看」进详情态时列表隐不掉 */
.android-modal-list[hidden] { display: none; }
.android-modal-cell {
  display: block;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(212,175,55,.22);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
}
.android-modal-cell img { width: 100%; display: block; }

.android-modal-detail { padding: 14px; }
.android-modal-detail[hidden] { display: none; }
.android-modal-pic { background: rgba(255,255,255,.04); border: 1px solid rgba(212,175,55,.22); border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.android-modal-pic img { width: 100%; display: block; }

/* ========== 浮动广告位（右下） ========== */
.ad-float {
  position: fixed;
  right: 12px;
  bottom: 16px;
  width: min(80px, 22vw);
  aspect-ratio: 1/1;
  z-index: 50;
}
.ad-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.ad-slide.active { opacity: 1; }
.ad-slide img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0,0,0,.2);
}
.ad-close {
  position: absolute;
  top: -8px; right: -8px;
  width: 20px; height: 20px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
  z-index: 1;
}

@media (min-width: 961px) {
  .ad-float { width: 96px; right: 24px; bottom: 24px; }
}
