/* ==========================================================================
   延嘉官网 · 移动端适配层  yj-mobile.css
   用途：手机端(≤767px)启用独立的流式移动版；平板/小笔记本(768–1359px)
        由 yj-mobile.js 做画布等比缩放兜底。PC 端(≥1360px)完全不受影响。
   约束：不修改原画布结构与内联样式，仅做显示切换与新增组件样式。
   ========================================================================== */

/* ---------- 1. 桌面端隐藏移动版，避免内容重复渲染 ---------- */
.ym { display: none; }

/* ---------- 2. 手机端：隐藏画布，启用移动版 ---------- */
@media (max-width: 767px) {
  body.ym-on { overflow-x: hidden; }
  body.ym-on #mainContentWrapper,
  body.ym-on #smv_AreaMainWrapper,
  body.ym-on .main-layout-wrapper,
  body.ym-on .footer,
  body.ym-on #all-icp-bottom,
  body.ym-on #yj-lang-switch,
  body.ym-on #scdMaintenanceIcon,
  body.ym-on .scd-maintenance-icon { display: none !important; }

  body.ym-on .ym { display: block; }
  body.ym-on { -webkit-text-size-adjust: 100%; }

  /* 客服浮层：PC 端固定在屏幕中线 76px 大圆，手机端移到底部并缩小，避免遮挡正文 */
  body.ym-on .yjw-btn {
    top: auto; bottom: calc(16px + env(safe-area-inset-bottom));
    transform: none; right: 12px;
    width: 54px; height: 54px; font-size: 12px; line-height: 1.25;
  }
  /* 返回顶部让位到左侧 */
  body.ym-on .ym-top { right: auto; left: 13px; }
}

/* ---------- 3. 移动版基础 ---------- */
.ym {
  --ym-navy: #0b1f3a;
  --ym-navy-2: #132c4d;
  --ym-red: #c0301b;
  --ym-ink: #1a2432;
  --ym-ink-2: #4a5568;
  --ym-muted: #7a8595;
  --ym-line: #e4e8ee;
  --ym-bg2: #f2f5f8;
  --ym-pad: 18px;
  font-family: "Source Han Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ym-ink);
  font-size: 15px;
  line-height: 1.75;
  background: #fff;
}
.ym *, .ym *::before, .ym *::after { box-sizing: border-box; }
.ym img { max-width: 100%; height: auto; display: block; }
.ym a { color: inherit; text-decoration: none; }
.ym-wrap { padding: 0 var(--ym-pad); }

/* ---------- 4. 顶部信息条 ---------- */
.ym-topbar {
  background: var(--ym-navy);
  color: #c8d4e4;
  font-size: 12px;
  padding: 7px var(--ym-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.ym-topbar span:first-child {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0;
}
.ym-topbar a { color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; flex: none; }

/* ---------- 5. 头部 ---------- */
.ym-hd {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.97);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--ym-line);
}
.ym-hd-in {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px; padding: 0 var(--ym-pad);
}
.ym-logo { display: flex; align-items: center; gap: 8px; }
.ym-logo img { height: 30px; width: auto; max-width: 130px; object-fit: contain; }
.ym-logo b {
  font-size: 18px; font-weight: 700; color: var(--ym-navy); letter-spacing: .5px; line-height: 1;
}
.ym-logo b small {
  display: block; font-size: 8.5px; letter-spacing: 1.8px;
  color: var(--ym-muted); font-weight: 400; margin-top: 3px;
}
.ym-burger {
  width: 42px; height: 42px; padding: 0; flex: none;
  border: 1px solid var(--ym-line); border-radius: 10px; background: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.ym-burger i { display: block; width: 17px; height: 2px; background: var(--ym-navy); position: relative; transition: .25s; }
.ym-burger i::before, .ym-burger i::after {
  content: ""; position: absolute; left: 0; width: 17px; height: 2px; background: var(--ym-navy); transition: .25s;
}
.ym-burger i::before { top: -6px; }
.ym-burger i::after  { top: 6px; }
.ym-burger[aria-expanded="true"] i { background: transparent; }
.ym-burger[aria-expanded="true"] i::before { top: 0; transform: rotate(45deg); }
.ym-burger[aria-expanded="true"] i::after  { top: 0; transform: rotate(-45deg); }

/* ---------- 6. 抽屉 ---------- */
.ym-drawer { position: fixed; inset: 0; z-index: 9999999; visibility: hidden; pointer-events: none; }
.ym-drawer.is-open { visibility: visible; pointer-events: auto; }
.ym-drawer-mask {
  position: absolute; inset: 0; background: rgba(11,31,58,.46);
  opacity: 0; transition: opacity .25s;
}
.ym-drawer.is-open .ym-drawer-mask { opacity: 1; }
.ym-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 80%; max-width: 320px;
  background: #fff; transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.ym-drawer.is-open .ym-drawer-panel { transform: none; }
.ym-drawer-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--ym-pad); border-bottom: 1px solid var(--ym-line);
  font-size: 15px; font-weight: 600; color: var(--ym-navy);
}
.ym-drawer-x {
  width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--ym-bg2);
  font-size: 20px; line-height: 1; color: var(--ym-ink-2); cursor: pointer;
}
.ym-drawer-nav { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 8px; flex: 1; }
.ym-drawer-nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--ym-pad); font-size: 15px;
  border-bottom: 1px solid #f4f6f9;
}
.ym-drawer-nav a.on { color: var(--ym-red); font-weight: 600; }
.ym-drawer-nav a small { font-size: 12px; color: var(--ym-muted); font-weight: 400; }
.ym-drawer-nav .ym-grp {
  padding: 12px var(--ym-pad) 6px; font-size: 11.5px; color: var(--ym-muted); letter-spacing: 1.4px;
}
.ym-drawer-cta {
  display: block; margin: 10px var(--ym-pad) 14px; text-align: center;
  background: var(--ym-red); color: #fff !important;
  padding: 13px; border-radius: 10px; font-weight: 600; font-size: 15px;
}

/* ---------- 7. 首屏 ---------- */
.ym-hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(155deg, #0b1f3a 0%, #122c4e 55%, #0d2440 100%);
  padding: 32px 0 30px;
}
.ym-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(circle at 70% 8%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 70% 8%, #000, transparent 72%);
}
.ym-hero::after {
  content: ""; position: absolute; right: -80px; top: -70px; width: 260px; height: 260px;
  border-radius: 50%; background: radial-gradient(circle, rgba(192,48,27,.4), transparent 62%);
}
.ym-hero-in { position: relative; z-index: 2; }
.ym-kicker {
  display: inline-block; font-size: 11.5px; letter-spacing: .4px; color: #9db4d0;
  border: 1px solid rgba(157,180,208,.34); border-radius: 100px;
  padding: 5px 11px; margin-bottom: 15px; line-height: 1.6;
}
.ym-hero h1 {
  margin: 0 0 12px; font-size: 26px; line-height: 1.4; font-weight: 800; letter-spacing: .2px;
}
.ym-hero h1 em { font-style: normal; color: #ff6a4d; }
.ym-hero p { margin: 0 0 6px; font-size: 14px; color: #b9c9dd; line-height: 1.8; }

/* ---------- 8. 按钮 ---------- */
.ym-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.ym-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 13px 18px; border-radius: 11px;
  font-size: 15.5px; font-weight: 600; border: 1px solid transparent;
}
.ym-btn-p { background: var(--ym-red); color: #fff !important; box-shadow: 0 8px 20px -8px rgba(192,48,27,.75); }
.ym-btn-g { background: rgba(255,255,255,.06); color: #fff !important; border-color: rgba(255,255,255,.3); }
.ym-btn-o { background: #fff; color: var(--ym-navy) !important; border-color: var(--ym-line); }

/* ---------- 9. 数据格 ---------- */
.ym-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  margin-top: 26px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px; overflow: hidden;
}
.ym-stats > div { background: rgba(11,31,58,.55); padding: 14px 10px; text-align: center; }
.ym-stats b { display: block; font-size: 23px; font-weight: 800; color: #fff; line-height: 1.2; letter-spacing: -.5px; }
.ym-stats b i { font-style: normal; color: var(--ym-red); font-size: 15px; vertical-align: 2px; }
.ym-stats span { font-size: 12px; color: #a9bcd2; }

/* ---------- 10. 通用区块 ---------- */
.ym-sec { padding: 34px 0; }
.ym-sec-gray { background: var(--ym-bg2); }
.ym-eyebrow { font-size: 11px; letter-spacing: 2.2px; color: var(--ym-red); font-weight: 600; margin-bottom: 7px; }
.ym-h2 {
  font-size: 21px; line-height: 1.45; margin: 0 0 9px;
  color: var(--ym-navy); font-weight: 800; letter-spacing: .2px;
}
.ym-lead { font-size: 14px; color: var(--ym-ink-2); margin: 0 0 18px; }
.ym-sec p { font-size: 14px; color: var(--ym-ink-2); margin: 0 0 12px; }
.ym-sec p strong, .ym-sec strong { color: var(--ym-navy); }

/* ---------- 11. 卡片 ---------- */
.ym-cards { display: grid; gap: 12px; }
.ym-card {
  background: #fff; border: 1px solid var(--ym-line); border-radius: 13px;
  padding: 18px; display: block;
}
.ym-card .no { font-size: 11.5px; color: var(--ym-red); font-weight: 700; letter-spacing: 1px; }
.ym-card h3 { font-size: 16.5px; margin: 7px 0 7px; color: var(--ym-navy); line-height: 1.45; }
.ym-card p { margin: 0; font-size: 13.5px; color: var(--ym-ink-2); line-height: 1.72; }
.ym-card ul { margin: 10px 0 0; padding-left: 15px; font-size: 13px; color: var(--ym-muted); line-height: 1.9; }
.ym-card .go { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--ym-red); font-weight: 600; }

/* ---------- 12. 深色 CTA ---------- */
.ym-cta {
  position: relative; overflow: hidden; background: var(--ym-navy); color: #fff;
  border-radius: 15px; padding: 22px 18px;
}
.ym-cta::after {
  content: ""; position: absolute; right: -50px; bottom: -60px; width: 170px; height: 170px;
  border-radius: 50%; background: radial-gradient(circle, rgba(192,48,27,.45), transparent 65%);
}
.ym-cta .tag {
  display: inline-block; background: rgba(192,48,27,.92); font-size: 11.5px;
  padding: 3px 9px; border-radius: 6px; margin-bottom: 10px;
}
.ym-cta h3 { margin: 0 0 7px; font-size: 18px; line-height: 1.5; position: relative; z-index: 2; }
.ym-cta p { margin: 0 0 14px; color: #b3c4d8; font-size: 13.5px; position: relative; z-index: 2; }
.ym-cta .ym-btn { position: relative; z-index: 2; }

/* ---------- 13. 标签 ---------- */
.ym-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.ym-badges span {
  font-size: 12px; background: #fff; border: 1px solid var(--ym-line);
  color: var(--ym-ink-2); padding: 4px 10px; border-radius: 100px;
}

/* ---------- 14. 列表（新闻/目录） ---------- */
.ym-list { border-top: 1px solid var(--ym-line); }
.ym-list a, .ym-list .item {
  display: block; padding: 13px 0; border-bottom: 1px solid var(--ym-line);
}
.ym-list .t { font-size: 14.5px; color: var(--ym-ink); line-height: 1.6; }
.ym-list .d { font-size: 12px; color: var(--ym-muted); margin-top: 4px; }

/* ---------- 15. 页脚 ---------- */
.ym-ft { background: #08182c; color: #8ea3bc; padding: 26px 0 22px; font-size: 12.5px; }
.ym-ft .brand { color: #fff; font-weight: 700; font-size: 15.5px; margin-bottom: 7px; }
.ym-ft a { color: #b9cbe0; }
.ym-ft .row {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.09);
}

/* ---------- 16. 返回顶部 ---------- */
.ym-top {
  position: fixed; right: 13px; bottom: calc(16px + env(safe-area-inset-bottom));
  width: 42px; height: 42px; border-radius: 50%; background: #fff;
  border: 1px solid var(--ym-line); display: grid; place-items: center;
  box-shadow: 0 8px 22px -10px rgba(11,31,58,.5); font-size: 15px; color: var(--ym-navy);
  z-index: 80; opacity: 0; visibility: hidden; transition: .25s;
}
.ym-top.show { opacity: 1; visibility: visible; }

/* ---------- 17. 平板兜底提示（768–1359 由 JS 缩放，此处仅隐藏移动版） ---------- */
@media (min-width: 768px) {
  .ym { display: none !important; }

  /* 个别第三方嵌入块（一布 frame）宽于画布且不随缩放变化，
     在画布层裁切，避免整页出现横向滚动条。裁掉的是画布外的溢出部分。
     默认裁切；仅当脚本检测到浏览器不支持 zoom 时，才会给 html 加 .ym-no-zoom 撤销裁切。
     原因：不支持 zoom 时画布仍是 1360px 宽，再裁切会把右侧内容（含页脚）切掉，
     表现为"变形、错位"；那种情况下宁可保留横向滚动。 */
  html:not(.ym-no-zoom) .smvWrapper,
  html:not(.ym-no-zoom) #smv_Main { overflow-x: clip; }
}

/* ---------- 17b. 页脚通栏修正（仅平板缩放区间 768–1359，桌面 1360+ 保持原样） ---------- */
/* 页脚底带原样式：width:100vw + left:50% + translateX(-50%)。
   在 zoom 缩放时，vw 与缩放后的布局视口不一致，底带会窄于页面并整体右移，
   表现为右侧露白条、页脚"漂移"。这段把它改为贴合画布容器，不再依赖 vw。
   上限必须卡在 1359：桌面端原本就是靠 100vw 做全屏通栏的。 */
@media (min-width: 768px) and (max-width: 1359px) {
  #yj-footer {
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    transform: none !important;
  }
  /* 内层随容器自适应，并留出左右呼吸边距，避免文字/二维码贴边 */
  #yj-footer .yjfi {
    width: auto !important;
    box-sizing: border-box;
    padding-left: 26px;
    padding-right: 26px;
  }
}

/* ---------- 18. 深色模式弱化（保持品牌浅色，不做自动反色） ---------- */
@media (prefers-reduced-motion: reduce) {
  .ym *, .ym *::before, .ym *::after { transition: none !important; animation: none !important; }
}
