/* =========================================================
   极速行驶 · 全站增强层 opt.css
   作用：长图裁切 / 导航不折行 / 二级菜单可点 / 图标收敛
         / 手机端三键底栏 / 表单替代卡片
   ========================================================= */

/* ---------- 1. 图片：超长图统一裁切 ---------- */
img {
  max-width: 100%;
  height: auto;
}

img[src*="pic.xiahunao.cn"],
img[src*="xiahunao"],
img.fit-16x9 {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
  background: var(--cream-3);
}

.shot img,
.ph img,
.hero-frame img,
.rail-card .ph img,
.mag-cover img,
.b-main .ph img,
.news-card .ph img,
.duo-photo img,
.contact-main .ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

/* 正文长截图限高 */
.detail-body img,
.article img,
.prose img {
  max-height: 780px;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

/* ---------- 2. 图标收敛 ---------- */
svg {
  max-width: 100%;
}

.cb-icon,
.call-fab .fab-ico svg,
.sec-more svg,
.hero-note svg,
.btn svg,
.linkline svg,
.nav-play svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.b-tile svg {
  width: 18px;
  height: 18px;
}

.icon-wall .iapp svg {
  width: 28px;
  height: 28px;
}

.share-panel .frame svg {
  width: 42px;
  height: 42px;
}

@media (max-width: 860px) {
  .icon-wall .iapp svg {
    width: 22px;
    height: 22px;
  }
  .share-panel .frame svg {
    width: 34px;
    height: 34px;
  }
}

/* ---------- 3. 导航不折行 ---------- */
.menu a,
.menu .sub a,
.drawer-panel a {
  white-space: nowrap;
}

@media (max-width: 1240px) {
  .menu {
    gap: 2px;
    font-size: 15px;
  }
}

/* ---------- 4. 二级菜单：斜着移下去也能点 ---------- */
.menu li.has-sub {
  position: relative;
}

.menu li.has-sub::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  top: 100%;
  height: 16px;
  background: transparent;
}

.menu .sub {
  z-index: 970;
}

.menu .sub li a {
  line-height: 1.45;
  padding: 10px 14px;
}

.menu li.has-sub:hover .sub,
.menu li.has-sub:focus-within .sub,
.menu li.has-sub.is-open .sub {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

/* ---------- 5. 顶部联系方式在窄屏也不丢 ---------- */
@media (max-width: 760px) {
  .cb-inner {
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cb-inner::-webkit-scrollbar {
    display: none;
  }
  .cb-item span {
    font-size: 11.5px;
  }
  .cb-item strong {
    font-size: 12px;
    white-space: nowrap;
  }
  .cb-try {
    display: none;
  }
}

/* ---------- 6. 手机端三键底栏 ---------- */
.mbar {
  display: none;
}

@media (max-width: 1100px) {
  body {
    padding-bottom: 66px;
  }
  .mbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 980;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--ink);
    box-shadow: 0 -12px 30px -22px rgba(29, 43, 39, 0.7);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 9px 4px 8px;
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
    border: 0;
    border-radius: 0;
    width: 100%;
  }
  .mbar__item:active {
    background: #2a3b35;
  }
  .mbar__item--call {
    background: var(--green);
    color: #fff;
  }
  .mbar__item b {
    font-weight: 800;
    font-size: 13px;
  }
  .mbar__item i {
    font-style: normal;
    font-size: 11px;
    opacity: 0.78;
  }
  .mbar__ico {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
  }
  .mbar__ico svg {
    width: 18px;
    height: 18px;
  }
  .call-fab {
    bottom: 84px;
  }
}

/* ---------- 7. 复制提示 ---------- */
.opt-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 12px);
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--green-deep);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  pointer-events: none;
}

.opt-toast.is-on {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- 8. 编辑校验块 ---------- */
.opt-credit {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 26px 34px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.9;
}

.opt-credit b {
  color: var(--ink);
}

.opt-credit a {
  color: var(--green-deep);
  font-weight: 700;
}

/* ---------- 9. 表单替代：联系卡 ---------- */
.opt-cta-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-s);
}

.opt-cta-card h3 {
  font-size: 21px;
  margin-bottom: 2px;
}

.opt-cta-card p {
  color: var(--ink-2);
  font-size: 14.5px;
  margin: 0 0 6px;
}

.opt-cta-card a,
.opt-cta-card button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--cream-2);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-align: left;
}

.opt-cta-card .is-solid {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.opt-cta-card a small,
.opt-cta-card button small {
  font-weight: 500;
  font-size: 12.5px;
  color: inherit;
  opacity: 0.75;
}


/* ---------- 10. 新增栏目页：统一文章版式 ---------- */
.opt-article-hero{padding:54px 0 26px;border-bottom:1px solid rgba(0,0,0,.08)}
.opt-article-hero .opt-crumb-x{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:13px;opacity:.72;margin-bottom:16px}
.opt-article-hero .opt-crumb-x a{text-decoration:none}
.opt-article-hero .opt-kicker{display:inline-block;font-size:12px;letter-spacing:.18em;text-transform:uppercase;font-weight:700;margin-bottom:10px;opacity:.8}
.opt-article-hero h1{font-size:clamp(26px,3.2vw,40px);line-height:1.3;margin:0 0 12px}
.opt-article-hero .opt-lead{font-size:15.5px;line-height:1.85;max-width:760px;opacity:.82;margin:0}
.opt-article-hero .opt-meta{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px;font-size:12.5px;opacity:.7}
.opt-article-hero .opt-meta span{padding:4px 10px;border:1px solid currentColor;border-radius:999px}
.opt-article-body{max-width:820px;padding:34px 0 10px}
.opt-article-body h2{font-size:clamp(19px,2.1vw,25px);line-height:1.4;margin:34px 0 12px}
.opt-article-body h3{font-size:17px;margin:22px 0 8px}
.opt-article-body p{margin:0 0 14px;line-height:1.9}
.opt-article-body ul,.opt-article-body ol{margin:0 0 16px;padding-left:1.3em;line-height:1.9}
.opt-article-body li{margin-bottom:6px}
.opt-article-body a{font-weight:600;text-decoration:underline;text-underline-offset:3px}
.opt-article-body table{width:100%;border-collapse:collapse;margin:10px 0 18px;font-size:14px}
.opt-article-body th,.opt-article-body td{border:1px solid rgba(0,0,0,.14);padding:9px 10px;text-align:left;vertical-align:top}
.opt-article-body th{font-weight:700;background:rgba(0,0,0,.04)}
.opt-note{margin:18px 0;padding:14px 16px;border-left:4px solid currentColor;background:rgba(0,0,0,.035);font-size:14px;line-height:1.85}
.opt-rel{margin:26px 0 40px;padding-top:22px;border-top:1px dashed rgba(0,0,0,.18)}
.opt-rel h2{font-size:18px;margin:0 0 12px}
.opt-rel ul{list-style:none;padding:0;display:grid;gap:8px}
.opt-rel li a{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border:1px solid rgba(0,0,0,.14);border-radius:10px;text-decoration:none;font-size:14px;font-weight:600}
@media(max-width:760px){.opt-article-hero{padding:34px 0 18px}.opt-article-body{padding:24px 0 6px}}

.opt-article-body{margin-inline:auto}

/* 新增栏目页：避开悬浮导航 */
[data-opt="article"] .opt-article-hero{padding-top:118px}
@media(max-width:768px){[data-opt="article"] .opt-article-hero{padding-top:104px}}

/* 窄屏也保留邮箱 */
@media(max-width:768px){.cb-item.mail{display:inline-flex !important}.cb-item strong{font-size:12px}}

/* ---------- 悬浮导航不再压住首屏内容 ---------- */
.dp-hero{padding-top:152px}
.feel-hero,.secrets-hero,.dl-hero,.map-hero,.terms-hero,.season-hero,.start-hero{padding-top:140px}
.nav.is-stuck{background:rgba(255,255,251,.985);backdrop-filter:saturate(1.1) blur(8px)}
@media(max-width:768px){
  .dp-hero{padding-top:132px}
  .feel-hero,.secrets-hero,.dl-hero,.map-hero,.terms-hero,.season-hero,.start-hero{padding-top:124px}
}

/* 所有内页首屏统一让开悬浮导航（导航底边 126 / 移动 110） */
.about-hero,.play-hero,.keys-hero,.rules-hero,.levels-hero,.duo-hero,.routes-hero,.moves-hero,.teams-hero,.rank-hero,.faq-hero,.guide-head,.more-hero,.share-hero,.news-head,.contact-hero,.dl-hero,.score-hero,.train-hero,.submit-hero,.update-hero{padding-top:148px}
@media(max-width:768px){
  .about-hero,.play-hero,.keys-hero,.rules-hero,.levels-hero,.duo-hero,.routes-hero,.moves-hero,.teams-hero,.rank-hero,.faq-hero,.guide-head,.more-hero,.share-hero,.news-head,.contact-hero,.dl-hero,.score-hero,.train-hero,.submit-hero,.update-hero{padding-top:124px}
}

@media(max-width:768px){
  .call-fab{display:none !important}
}
