body {
  min-width: 1200px;
  /*
   * 背景 = 顶部一张原比例的首屏插画 + 下方接续的渐变色。
   *
   * 以前是 `background-size: cover` 铺满整个 body：body 很高，cover 按高度放大，
   * 插画被放大裁切，内容区反而压到人物身上。现在把插画单独放在 .ui-hero 里
   * （宽度铺满、高度按原图比例 = 580/1920），下面的渐变从插画结束处的颜色
   * #1e77b0 接到页脚底色 #125b85，接缝不可见。
   */
  background-color: #125b85;
  background-image: linear-gradient(180deg, #1e77b0 0%, #125b85 100%);
  background-repeat: no-repeat;
  background-size: 100% 560px;
  background-position: 0 max(30.21vw, 300px);
}

.ui-content {
  position: relative;
  padding-top: 1px;
}

.ui-header {
  /* 导航浮在背景图的天空区（绝对定位，不占文档流），
     否则它会把横幅整体往下推，内容区就和插画地平线错位 */
  position: absolute;
  top: 30px;
  left: 99px;
  right: 99px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ui-logo img {
  width: 310px;
  /* 与手机版同一原因：img 带 height="105" 属性，窄屏把宽度收到 180px 时
     高度仍是 105px，徽标被横向压扁（180×105 vs 原图 310×105）。 */
  height: auto;
}

.ui-nav > a {
  display: inline-block;
  vertical-align: middle;
  width: 142px;
  height: 40px;
  font-size: 18px;
  color: #ffffff;
  line-height: 40px;
  text-align: center;
  border-radius: 10px;
  background: #287277;
  border: 1px solid #23d2a7;
  box-shadow: 0px 0px 10px 0px #929fff;
}

.ui-nav > a + a {
  /* 原先是写在「隐私政策」上的行内 style="margin:0 60px"：
     行内样式在窄屏盖不住，导致 390px 下三颗按钮被挤成 2+1 两行。 */
  margin-left: 60px;
}

.ui-nav > a:hover {
  border: 1px solid #fff;
  box-shadow: 0px 0px 10px 0px #fff;
}

.ui-profile {
  width: 1200px;
  margin: 0 auto;
  /* 让下载面板与插画下沿留出一道呼吸间隙，避免两块硬贴在一起 */
  padding-top: 28px;
}

.ui-hero {
  /* pc/images/bg.png 原图 1920x1080，插画（沙滩/金色横条）到第 580 行结束，
     再往下就是纯渐变底。这里按原比例铺满宽度，只露出插画那一段：
     高度 = 100vw * 580 / 1920 ≈ 30.21vw。 */
  width: 100%;
  height: 30.21vw;
  min-height: 300px;
  /* 兜底：老浏览器用 PNG（原图 1920x1080，这里只露出上面 580px） */
  background: url(../images/bg.png) center top / 100% auto no-repeat;
  /* 支持 image-set 的浏览器（Chrome 113+/Safari 17+/Edge）优先取 WebP：
     bg.webp 已裁成 1920x580 并按 q82 压缩，1242KB → 101KB。不支持时这条被忽略，
     自动沿用上面的 PNG，不会白屏。 */
  background-image: image-set(
    url(../images/bg.webp) type("image/webp"),
    url(../images/bg.png) type("image/png")
  );
}

.ui-game {
  display: flex;
  height: 240px;
  align-items: center;
  justify-content: space-between;
  border-radius: 18px;
  /* 与下方 .ui-info-card / .ui-faq 的 27px 内边距对齐：
     原来 44px 是为英文首字下沉（.ui-textFirst）留的缩进，下沉字母已移除，
     保留 44 会让简介段落比卡片标题右移 18px，视觉上「排版错位」。 */
  padding-left: 27px;
  border: 1px solid #57ffa6;
  background-color: #1b6058;
  box-shadow: 0px 0px 10px 0px #929fff;
}

.ui-textBox {
  font-size: 24px;
  color: #ffffff;
  flex: 1;
}

.ui-text-red {
  color: #ff5039;
}

.ui-text-blue {
  color: #57d2ff;
}

.ui-text-purple {
  color: #ff73f3;
}

.ui-text-yellow {
  color: #ffd83a;
}

.ui-download {
  display: flex;
  flex: 0 0 480px;
  align-items: center;
  justify-content: space-between;
}

.ui-border {
  width: 1px;
  height: 183px;
  background: url(../images/line.png) no-repeat;
}

.ui-qrcode {
  width: 114px;
  position: relative;
  text-align: center;
  flex-shrink: 0;
  margin-left: 40px;
}

.ui-qrcode-box {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 120px;
  font-size: 0;
  border-radius: 6px;
  margin: 0 auto 6px;
  background: #fff;
}

.ui-qrcode-box > img {
  display: block;
  max-width: 100px;
}

.ui-qrcode > p {
  font-size: 12px;
  color: #ffffff;
}

.ui-btnbox {
  margin-right: 40px;
}

.ui-btnbox > a {
  display: block;
  width: 231px;
  height: 61px;
  margin-left: 34px;
  background-color: #2ed556;
  background-image: linear-gradient(180deg, #4ef472 0%, #1db83d 100%);
  border-radius: 30.5px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3), inset 0 2px 3px rgba(255, 255, 255, 0.5);
  color: #0a4d22;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  line-height: 57px;
  text-decoration: none;
  border: 2px solid #7eff9a;
  box-sizing: border-box;
}

.ui-tips {
  flex: 0 0 150px;
  text-align: center;
  margin: 0 34px;
}

.ui-tips > p {
  width: 150px;
  font-size: 16px;
  color: #a093ff;
  margin-top: 8px;
  line-height: 1.2;
}

.ui-tips > p > span {
  color: #fff;
}

.ui-footer-icon {
  font-size: 0;
  text-align: center;
  margin: 20px 0 14px;
}

.ui-footer-icon > img {
  margin: 0 12.5px;
}

.ui-footer > p {
  font-size: 16px;
  color: #40baa9;
  text-align: center;
}

/* 兜底：弹窗一律默认隐藏，只有 openModal() 里显式 display:block 才出现。
   曾经出现过「一进页面就弹免责声明且关不掉」，根因是某个弹窗类漏了隐藏规则，
   于是它带着 position:fixed 直接铺在页面上。 */
.ui-modal,
.ui-policy-modal {
  display: none;
}

.ui-modal {
  position: fixed;
  width: 1218px;
  height: 818px;
  left: 50%;
  top: 50%;
  z-index: 100;
  border-radius: 18px;
  border: 1px solid #57ffa6;
  transform: translate(-50%, -50%);
  background: rgba(25 83 76/ 90%);
}

.ui-about {
  display: none;
}

.ui-modal-top {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 125px;
  border-radius: 18px 18px 0 0;
  background: url(../images/bg-modal-line.png) no-repeat;
  background-position: center bottom;
}

.ui-modal-title {
  font-weight: 900;
  font-size: 42px;
  color: #4deee8;
}

.ui-btn-close {
  position: absolute;
  top: -6px;
  right: 30px;
  width: 74px;
  height: 77px;
  cursor: pointer;
  background: url(../images/btn-close.png) no-repeat;
}

.ui-modal-imgBox {
  text-align: center;
  margin-top: 20px;
}

.ui-about-content {
  padding: 30px 110px 0;
  font-size: 24px;
  color: #7dfffa;
  line-height: 1.7;
}

.ui-policy {
  display: none;
}

/* 用户协议 / 免责声明：与其它弹窗一样默认隐藏，由页脚入口打开
   （漏了这条会让两个弹窗一进页面就叠在屏幕中间） */
.ui-terms,
.ui-disclaimer {
  display: none;
}

.ui-policy-content {
  padding: 0px 110px;
}

.ui-policy-content > div {
  margin-bottom: 24px;
}

.ui-content-title {
  font-size: 20px;
  font-weight: bold;
  color: #57d2ff;
  margin-bottom: 24px;
}

.ui-content-title.yellow {
  color: #ffd83a;
}

.ui-content-text {
  font-size: 20px;
  color: #cfd9f5;
  margin-bottom: 24px;
}

.ui-contact {
  display: none;
}

.ui-contact-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 36px;
}

.ui-contact-content > div {
  margin-bottom: 64px;
}

.ui-modal-bg-email {
  width: 427px;
  height: 48px;
  background: url(../images/bg-modal-email.png) no-repeat;
}

.ui-modal-bg-whatsapp {
  width: 427px;
  height: 48px;
  background: url(../images/bg-modal-whatsapp.png) no-repeat;
}

.ui-modal-contact-text {
  font-size: 24px;
  color: #cfd9f5;
  text-align: center;
  margin-bottom: 10px;
}

.ui-input-profile {
  text-align: center;
  margin-bottom: 20px;
}

.ui-contact-content > div > a {
  display: block;
  width: 140px;
  height: 59px;
  margin: 0 auto;
  background: url(../images/btn-copy.png) no-repeat;
}

.ui-input-profile > span {
  font-size: 34px;
  color: #3dd5e5;
}

.ui-modal-contact-line {
  width: 1152px;
  height: 2px;
  margin: 0 auto;
  background: url(../images/bg-modal-contact-line.png) no-repeat;
}

.ui-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  background: rgba(0, 0, 0, 0.6);
}

/* ---------- 下载说明 / 客服 / 适龄提示 / FAQ ---------- */
.ui-info {
  display: flex;
  gap: 20px;
  margin-top: 24px;
}

.ui-info-card {
  flex: 1;
  padding: 22px 26px;
  border-radius: 14px;
  border: 1px solid rgba(87, 255, 166, 0.45);
  background: rgba(27, 96, 88, 0.72);
}

.ui-info-card > h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #4deee8;
}

.ui-info-card dl,
.ui-faq dl {
  margin: 0;
}

.ui-info-card dt {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #ffd83a;
}

.ui-info-card dt:first-child {
  margin-top: 0;
}

.ui-info-card dd {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: #d6f5f1;
}

.ui-info-card p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.6;
  color: #d6f5f1;
}

.ui-info-card p.ui-info-strong {
  font-size: 16px;
  font-weight: 700;
  color: #4deee8;
  word-break: break-all;
}

.ui-faq {
  margin-top: 20px;
  padding: 22px 26px;
  border-radius: 14px;
  border: 1px solid rgba(87, 255, 166, 0.45);
  background: rgba(27, 96, 88, 0.72);
}

.ui-faq > h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #4deee8;
}

.ui-faq dt {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #ffd83a;
}

.ui-faq dt:first-child {
  margin-top: 0;
}

.ui-faq dd {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: #d6f5f1;
}

/* 法务弹窗内容较长，内容区独立滚动 */
.ui-modal-content {
  height: 693px;
  overflow-y: auto;
}

.ui-footer-links {
  font-size: 15px;
  color: #a093ff;
  text-align: center;
  margin-bottom: 6px;
}

.ui-footer-links a {
  color: #a093ff;
  text-decoration: none;
  margin: 0 10px;
}

.ui-footer-links a:hover {
  color: #4deee8;
  text-decoration: underline;
}

/* 适龄标识：用样式画 18+，不再依赖图片（原 tips.png 里带 CADPA 标识，
   属他人注册的适龄提示标志，未经授权不应使用；且图片内文字无法本地化） */
.ui-age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 14px;
  background: #7c5cff;
  color: #ffffff;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
}


/* 版本号（由接口下发，拿不到就留空） */
.ui-ver {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 400;
  color: #4deee8;
}

/* ---------- 窄屏兜底（<1200px） ----------
 * PC 页是固定 1200px 版式，手机上直接打开（分享链接/搜索落地/外部导航）时
 * body 的 min-width 会让文档横向溢出 810px，只能看到左上角一块（2026-11-27 实测）。
 * 规范路径是首页按 UA 分流到 /Mobile/，但 PC 页不能假设用户一定从首页进来。
 * 这里只做「收缩到视口 + 允许换行 + 弹窗不超宽」，不重排桌面版式；
 * 桌面段（>=1200px）一条规则都不生效。
 */
@media (max-width: 1199px) {
  body {
    min-width: 0;
  }

  .ui-header {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .ui-logo img {
    width: 180px;
  }

  /* 桌面版保底 300px 是为了兜住 1200px 以上宽度；窄屏 390px 时
     30.21vw 只有 118px，被 min-height 撑到 300px，而背景图按「100% auto」
     只画到 118px，于是插画下面露出 180px 空渐变。窄屏取消保底，按比例收。 */
  .ui-hero {
    height: 30.21vw;
    min-height: 0;
  }

  /* 三颗导航按钮并排一行、等分宽度（390px 实测：每颗 113px，合计 358px） */
  .ui-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
  }

  .ui-nav > a {
    flex: 1 1 0;
    /* 平板档（768–1199）等比拉伸会变成三根长条，加个上限后居中更自然 */
    max-width: 220px;
    width: auto;
    min-width: 0;
    margin-left: 0;
    padding: 0 4px;
    box-sizing: border-box;
  }

  /* 必须单独覆盖：`.ui-nav > a + a`（0,1,2）比 `.ui-nav > a`（0,1,1）特异度更高，
     只写上面那条的话第 2、3 颗仍带 60px 左边距，390px 下每颗只剩 72px。 */
  .ui-nav > a + a {
    margin-left: 0;
  }

  .ui-profile {
    width: auto;
    max-width: 100%;
    padding: 16px 16px 0;
    box-sizing: border-box;
  }

  .ui-game {
    height: auto;
    flex-wrap: wrap;
  }

  .ui-download {
    flex: 1 1 100%;
    min-width: 0;
    flex-wrap: wrap;
    /* 二维码 + 按钮作为一组居中：左对齐时卡片右侧会空出一大块（768 档最明显） */
    justify-content: center;
    gap: 14px;
  }

  /* 桌面版 .ui-btnbox 有 margin-right:40px、按钮 a 有 margin-left:34px，
     加上按钮固定 231px，min-content 就是 305px —— 360px 屏上整块被撑到
     366px（横向溢出 6px）。窄屏把这些固定偏移清零。 */
  .ui-btnbox {
    margin-right: 0;
  }

  .ui-btnbox > a {
    margin-left: 0;
  }

  /* 18+ 提示原来固定 flex:0 0 150px + 左右 34px 外边距：390px 屏上被挤成
     150px 宽的窄条、文字折 3 行且贴左，右侧留下大片空白。改成整行 flex。 */
  .ui-tips {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 0;
    text-align: left;
  }

  .ui-tips > .ui-age-badge {
    flex: 0 0 auto;
  }

  .ui-tips > p {
    width: auto;
    margin-top: 0;
    line-height: 1.5;
  }

  /* 竖分隔线在换行后没有意义，隐藏；二维码取消左侧 40px 内缩 */
  .ui-border {
    display: none;
  }

  .ui-qrcode {
    margin-left: 0;
  }

  .ui-info {
    flex-direction: column;
  }

  /* 左右与 .ui-info-card 的 27px 内边距对齐：原来窄屏收成 16px，
     导致「常见问题」标题比上方三张卡的标题左移 10px。 */
  .ui-faq {
    padding: 18px 26px;
  }

  /* 弹窗固定 1218×818，窄屏必然超出视口 */
  .ui-modal {
    width: calc(100vw - 24px);
    max-width: 560px;
    height: auto;
    max-height: 86vh;
    overflow-y: auto;
  }

  .ui-modal-contact-line,
  .ui-modal-bg-email,
  .ui-modal-bg-whatsapp {
    width: 100%;
    max-width: 427px;
    background-size: 100% 100%;
  }

  .ui-footer {
    padding: 16px;
    flex-wrap: wrap;
    gap: 8px 14px;
  }
}

/* 手机档：下载按钮满宽，避免 231px 定宽在窄屏右侧留一截空白 */
@media (max-width: 600px) {
  .ui-btnbox {
    flex: 1 1 100%;
  }

  .ui-btnbox > a {
    width: 100%;
  }

  .ui-game {
    height: auto;
    padding: 20px 27px;
    align-items: flex-start;
  }

  .ui-download {
    justify-content: center;
  }


  /* 页脚三张品牌图：inline 高度各 80px，横向相加超过 358px 容器，
     最右那张被裁掉。窄屏改为 flex 居中 + 限高 + 允许换行。 */
  .ui-footer-icon {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
  }

  .ui-footer-icon > * {
    flex: 0 0 auto;
  }

  .ui-footer-icon img {
    max-height: 44px !important;
    width: auto;
  }

  /* 页脚法务文案：居中对齐时中文折 4 行、两头都参差，改为左对齐 */
  .ui-footer > p {
    text-align: left;
    padding: 0 16px;
    line-height: 1.6;
  }
}
