/* 门户壳：顶栏 + 抽屉 + 页脚（全站复用；主色与 cms-portal-top-nav 一致） */
:root{
  --blue:#007BEE;
  --orange:#FA630D;
  --scroll-thumb:rgba(0,123,238,.22);
  --scroll-thumb-hover:rgba(0,123,238,.40);
  --scroll-size:5px;
}
/* 全站滚动条：细轨、圆角、低对比；hover 轻染主色（Firefox + WebKit） */
/* 同步清掉移动端 tap 灰/蓝底（含 label/radio，不限 a/button） */
*{
  scrollbar-width:thin;
  scrollbar-color:var(--scroll-thumb) transparent;
  -webkit-tap-highlight-color:transparent;
}
*::-webkit-scrollbar{width:var(--scroll-size);height:var(--scroll-size)}
*::-webkit-scrollbar-track{background:transparent}
*::-webkit-scrollbar-thumb{
  background:var(--scroll-thumb);
  border-radius:999px;
  border:2px solid transparent;
  background-clip:padding-box;
}
*::-webkit-scrollbar-thumb:hover{
  background:var(--scroll-thumb-hover);
  border:2px solid transparent;
  background-clip:padding-box;
}
*::-webkit-scrollbar-corner{background:transparent}
/*
  链接重置：
  - 去下划线 / tap 高亮：所有 a
  - 去 UA 蓝字：只打「无 class」的 a:link（a:not([class]):link = 0,2,1，压过 UA）
  - 有 class 的 a 交给组件自己写 color（避免再盖掉 .hl-mbtn/.dp-btn/.float-consult 等）
  - 禁止 background-color:transparent（会盖掉有底色 CTA）
*/
a,a:link,a:visited,a:active,a:hover{
  text-decoration:none;
  -webkit-tap-highlight-color:transparent;
}
a:not([class]):link,
a:not([class]):visited,
a:not([class]):active,
a:not([class]):hover{
  color:inherit;
}
a,button{
  -webkit-tap-highlight-color:transparent;
}
a:focus{outline:none}
a:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
/* 短页吸底：内容不够高时页脚贴视口底，避免灰底托起 */
html{height:100%}
body{
  min-height:100%;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  /* PC 顶栏 fixed 占位（移动端 ≤700 另写 88*u） */
  padding-top:68px;
}
main{flex:1 0 auto;width:100%}
.wrap{width:100%;max-width:660px;margin:0 auto}

/* ---------- 号码吉凶宫格：PC 全称 / 移动端短称 ---------- */
.hao-lbl-m{display:none}
@media (max-width:700px){
  .hao-lbl-pc{display:none}
  .hao-lbl-m{display:inline}
}

/* ---------- 面包屑（PC 透出灰底；移动端白底；直角箭头；全站复用） ---------- */
.crumb{
  display:block;margin:0;padding:14px 0;
  font-size:14px;line-height:1.5;color:#999;
  background:transparent;border:0;letter-spacing:0;
}
.crumb-label{color:#999}
.crumb-sep{
  display:inline-block;margin:0 5px;padding:0;
  font-size:12px;line-height:1;vertical-align:middle;
}
.crumb-sep::before{
  content:"";display:inline-block;
  width:6px;height:6px;box-sizing:border-box;
  border-top:1px solid #999;border-right:1px solid #999;
  transform:rotate(45deg);vertical-align:2px;
}
.crumb a,
.crumb a:link,
.crumb a:visited{color:#999;line-height:inherit;text-decoration:none}
.crumb a:hover{color:#777}
.crumb a[aria-current="page"]{color:#666;font-weight:400}
@media (max-width:700px){
  /* 灰底分隔带：顶栏→路径→正文；左缘与 Logo 齐（--logo-x）；字阶见 CMS-PORTAL-MOBILE-TYPE */
  .crumb{
    padding:calc(10 * var(--portal-u,1)) var(--logo-x, calc(20 * var(--portal-u,1)));margin:0;
    font-size:max(11px,calc(24 * var(--portal-u,1)));
    background:#EEEDED;
  }
  .crumb[aria-hidden="true"]{display:none}
}

/* ---------- 顶部导航（右侧快捷链 16px；汉堡三线随 --nav-fs 同比） ---------- */
.site-header{
  --h-scale:1;
  --nav-gap:22px;
  --nav-fs:16px;
  --header-h:68px;
  /* 快捷链行高基准；汉堡图略小一档（--nav-burger） */
  --nav-icon-size:28px;
  --nav-burger:24px;
  /* PC 也吸顶：抽屉打开后随视口留在顶部，不随正文滚走 */
  position:fixed;top:0;left:0;right:0;width:100%;max-width:none;
  z-index:1000;background:var(--blue);
  height:calc(var(--header-h) * var(--h-scale));
  flex-shrink:0;overflow:visible;
}
.header-inner{
  position:relative;height:calc(var(--header-h) * var(--h-scale));
  display:flex;align-items:center;justify-content:flex-end;
  padding:0;
  box-sizing:border-box;
}
.logo{
  position:absolute;
  left:0;
  top:50%;
  bottom:auto;
  transform:translateY(-50%);
  line-height:0;
}
/* m.k366.com：width:1.25rem; height:0.67rem（750 设计=125×67；375 屏≈63×34）。
   本站 logo 画布更宽（307×96），不能照抄双锁否则变形/顶破 68 顶栏；锁同款宽，高按比例。 */
.logo img{
  width:calc(125px * var(--h-scale));
  height:auto;
}
.logo .logo-text{
  display:inline-block;color:#fff;font-size:calc(16px * var(--h-scale));
  font-weight:700;line-height:calc(40px * var(--h-scale));letter-spacing:1px;
}
.nav{
  display:flex;align-items:stretch;
  /* 与汉堡同高居中 → 文字底与三线底齐；选中线另用 ::after 贴蓝底 */
  align-self:center;
  height:calc(var(--nav-icon-size) * var(--h-scale));
  gap:var(--nav-gap);
  color:#fff;font-size:var(--nav-fs);
  margin-top:0;margin-right:0;
  padding-bottom:0;
  /* DOM 为华易序 logo→icon_dao→hlmenu；PC flex 要链在左、汉堡在右 */
  order:1;
}
.nav .nav-quick{
  position:relative;
  display:inline-flex;align-items:flex-end;
  color:#fff;letter-spacing:0;transition:opacity .2s;
  font-size:var(--nav-fs);font-weight:400;line-height:1;
  white-space:nowrap;
  box-sizing:border-box;
  height:100%;
  /* 汉字墨迹比行盒多下溢约 2px；略垫底让视觉底与三线齐 */
  padding:0 0 2px;
  border-bottom:0;
  box-shadow:none;
}
.nav .nav-quick:hover{opacity:.82}
.nav .nav-quick.is-active,
.nav .nav-quick[aria-current="page"]{
  opacity:1;
  font-weight:400;
}
/* 选中线独立贴顶栏底，不占文字行高、不跟字一起抬 */
.nav .nav-quick.is-active::after,
.nav .nav-quick[aria-current="page"]::after{
  content:"";
  position:absolute;
  left:0;right:0;
  /* 行盒在顶栏垂直居中时，距蓝底 =(header - icon)/2 */
  bottom:calc((var(--nav-icon-size) - var(--header-h)) * var(--h-scale) / 2);
  height:1.5px;
  background:var(--orange,#FA630D);
  pointer-events:none;
}
/* 汉堡 = 华易 .icon_dao > i（icon_daohang.png）；无上下 pad，与 .nav 同高 */
.menu-btn{
  flex:none;cursor:pointer;-webkit-appearance:none;appearance:none;
  position:relative;z-index:2;top:0;
  /* 与 .nav gap / 「老黄历」左侧间距同一尺 --nav-gap（勿再用 8px） */
  margin-left:var(--nav-gap);
  padding:0 calc(4px * var(--h-scale));
  background:none;border:0;
  /* 汉堡图小于热区后贴底，与 .nav-quick 文字底齐（勿再垂直居中） */
  display:inline-flex;align-items:flex-end;justify-content:center;align-self:center;
  height:calc(var(--nav-icon-size) * var(--h-scale));
  line-height:0;
  order:2;
}
.menu-btn i{
  display:block;
  /* 三线图略小于行高基准，热区仍用 .menu-btn 的 --nav-icon-size */
  width:calc(var(--nav-burger, 24px) * var(--h-scale));
  height:calc(var(--nav-burger, 24px) * var(--h-scale));
  background-image:url("/cms-theme/_shared/img/icon_daohang.png");
  background-size:100% 100%;
  background-repeat:no-repeat;
  background-position:center;
  background-color:transparent;
  pointer-events:none;
}

/* 抽屉：白底黑字，底边品牌蓝描边；PC 仍 660 居中，移动端再拉满 */
.nav-drawer{
  display:block;position:absolute;left:50%;top:100%;z-index:60;
  width:100%;max-width:660px;
  box-sizing:border-box;overflow:hidden;
  background:#fff;
  border:none;
  border-left:1px solid var(--blue,#007BEE);
  border-right:1px solid var(--blue,#007BEE);
  border-bottom:1px solid var(--blue,#007BEE);
  --drawer-radius:6px;
  border-radius:0 0 var(--drawer-radius) var(--drawer-radius);
  box-shadow:0 10px 0 rgba(16,24,40,0);
  visibility:hidden;pointer-events:none;
  transform:translateX(-50%);
  /* clip-path 必须带 round，否则会裁成直角盖住 border-radius */
  clip-path:inset(0 0 100% 0 round 0 0 var(--drawer-radius) var(--drawer-radius));
  transition:clip-path .28s cubic-bezier(.22,.61,.36,1),box-shadow .28s ease,visibility .28s;
}
.nav-drawer[hidden]{display:none !important}
.site-header.is-open .nav-drawer{
  visibility:visible;pointer-events:auto;
  clip-path:inset(0 round 0 0 var(--drawer-radius) var(--drawer-radius));
  box-shadow:0 14px 32px rgba(16,24,40,.12);
}
.nav-drawer-inner{
  width:100%;margin:0;padding:0;gap:0;
  display:flex;flex-direction:column;align-items:stretch;
  max-height:min(70vh,520px);overflow-x:hidden;overflow-y:auto;
  -webkit-overflow-scrolling:touch;overscroll-behavior:contain;
}
/* 盖过各站 a:link{color:inherit}，未选中也必须黑字 */
.nav-drawer a,
.nav-drawer a:link,
.nav-drawer a:visited,
.nav-drawer a:hover,
.nav-drawer a:active,
.nav-drawer .nav-drawer-parent{
  color:#111;
}
.nav-drawer-inner>a,
.nav-drawer-parent{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  align-self:stretch;width:100%;max-width:none;box-sizing:border-box;
  padding:10px 16px;margin:0;
  border:0;border-radius:0;
  border-bottom:1px solid #E8E8E8;
  background:transparent;color:#111;font:inherit;
  font-size:15px;font-weight:500;line-height:1.4;letter-spacing:.04em;
  text-align:left;text-decoration:none;cursor:pointer;
  transition:background .15s,color .15s;
  box-shadow:none;
}
.nav-drawer-inner>a:hover,
.nav-drawer-parent:hover{color:#111;background:#F5F5F5;box-shadow:none}
.nav-drawer-inner>a:active,
.nav-drawer-parent:active{color:#111;background:#EEEDED;box-shadow:none}
.nav-drawer-inner>a.is-active,
.nav-drawer-inner>a[aria-current="page"],
.nav-drawer-sub a.is-active,
.nav-drawer-sub a[aria-current="page"]{
  color:#111;font-weight:600;
  background:#F0F5FB;
  border-left:3px solid var(--blue,#007BEE);
  padding-left:13px;
  box-shadow:none;border-radius:0;
}
/* PC：选中不要左侧竖条 */
@media (min-width:701px){
  .nav-drawer-inner>a.is-active,
  .nav-drawer-inner>a[aria-current="page"],
  .nav-drawer-sub a.is-active,
  .nav-drawer-sub a[aria-current="page"],
  .nav-drawer-sub a:hover{
    border-left:0;
    padding-left:16px;
    box-shadow:none;
  }
  .nav-drawer-sub a.is-active,
  .nav-drawer-sub a[aria-current="page"],
  .nav-drawer-sub a:hover{padding-left:28px}
}
.nav-drawer-item{display:flex;flex-direction:column;gap:0;margin:0;padding:0;width:100%}
.nav-drawer-item.has-children>.nav-drawer-parent{border-bottom:1px solid #E8E8E8}
.nav-caret{
  display:inline-block;width:7px;height:7px;flex:none;margin-left:auto;
  border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;
  transform:translateY(-1px) rotate(45deg);opacity:.75;transition:transform .2s,opacity .2s;
  border-color:rgba(17,17,17,.55);
}
.nav-drawer-item.is-expanded .nav-caret{transform:translateY(1px) rotate(225deg);opacity:1}
.nav-drawer-sub{display:none;flex-direction:column;gap:0;padding:0;margin:0;background:transparent;width:100%}
.nav-drawer-item.is-expanded .nav-drawer-sub{display:flex}
.nav-drawer-sub a{
  display:block;width:100%;box-sizing:border-box;
  padding:9px 16px 9px 28px;margin:0;border:0;border-radius:0;
  border-bottom:1px solid #EEEEEE;
  color:#111;font-size:14px;font-weight:400;line-height:1.4;
  letter-spacing:.04em;text-decoration:none;box-shadow:none;
  transition:background .15s,color .15s;
}
.nav-drawer-sub a:hover{
  color:#111;background:#F5F5F5;
  border-left:3px solid var(--blue,#007BEE);padding-left:25px;box-shadow:none;
}
.nav-drawer-sub a.is-active,
.nav-drawer-sub a[aria-current="page"]{padding-left:25px}
@media (prefers-reduced-motion:reduce){
  .nav-drawer{transition:none}
}

/* ---------- 页脚 ---------- */
.site-footer{
  flex-shrink:0;
  background:var(--blue);margin-top:17.5px;padding:5px 12px 6px;color:#fff;text-align:center;
}
.site-footer .f-links{font-size:14px;line-height:32px;letter-spacing:1px}
.site-footer .f-links a{margin:0 7px}
.site-footer .f-links a:hover{text-decoration:underline}
.site-footer p{font-size:14px;line-height:22.5px;word-break:break-word}
.site-footer .f-small{font-size:14px;line-height:27.5px}
.site-footer .f-line3{font-size:14px;line-height:22.5px}

@media (max-width:700px){
  /* --portal-u：全站移动端字阶/间距（设计宽 750）；顶栏几何与 www 华易 750 尺同源，见 CMS-PORTAL-MOBILE-TYPE */
  body{
    --portal-dw:750;
    --portal-u:calc(100vw / var(--portal-dw));
    --edge:calc(30 * var(--portal-u));
    /* 顶栏 Logo / 面包屑共用左缘（勿与内容 gutter --edge 混用） */
    --logo-x:calc(20 * var(--portal-u));
    padding-top:calc(88 * var(--portal-u)); /* fixed 顶栏占位 */
  }
  .wrap{width:100%;margin:0;max-width:none}
  /*
   * 顶栏：华易 fixed 几何（原仅 www home body[data-page=index]，现全站）。
   * .head 高 0.88rem；logo 高 0.56rem；icon_dao pad 0.25/0.3/0.2；链 right 1rem 字 0.32rem
   */
  .site-header{
    --h-scale:1;
    /* 快捷链间距 = 末链到汉堡图标间距 */
    --nav-gap:calc(30 * var(--portal-u));
    --nav-icon:calc(48 * var(--portal-u));
    --nav-fs:calc(32 * var(--portal-u));
    --header-h:calc(88 * var(--portal-u));
    --nav-icon-size:calc(48 * var(--portal-u));
    --nav-burger:calc(44 * var(--portal-u));
    position:fixed;
    top:0;left:0;right:0;
    width:100%;
    max-width:none;
    height:calc(88 * var(--portal-u));
    z-index:1000;
    overflow:visible;
  }
  .header-inner{
    position:relative;
    display:block;
    height:calc(88 * var(--portal-u));
    width:100%;max-width:none;margin:0;
    padding:0;
    box-sizing:border-box;
    overflow:visible;
  }
  .logo{
    float:none;
    position:absolute;
    left:var(--logo-x);
    top:50%;
    bottom:auto;
    transform:translateY(-50%);
    order:0;
    width:auto;
    height:calc(48 * var(--portal-u));
    padding:0;
    line-height:0;
  }
  .logo img{
    display:block;
    width:auto;
    height:calc(48 * var(--portal-u));
    max-width:calc(180 * var(--portal-u));
    padding:0;
    box-sizing:border-box;
    object-fit:contain;
    object-position:left center;
  }
  .logo .logo-text{
    display:flex;align-items:center;
    height:calc(48 * var(--portal-u));
    padding:0;
    font-size:calc(30 * var(--portal-u));
    font-weight:700;
    line-height:1;
    color:#fff;
  }
  .menu-btn{
    position:absolute;
    right:0;
    left:auto;
    margin:0;
    z-index:3;
    order:0;
    box-sizing:content-box;
    width:auto;
    /* 热区与顶栏垂直居中；图贴热区底与快捷链字底齐 */
    top:50%;
    transform:translateY(-50%);
    padding:0 var(--logo-x, calc(20 * var(--portal-u)));
    display:flex;align-items:flex-end;justify-content:center;
    line-height:0;
    background:none;
    border:0;
    height:var(--nav-icon-size, calc(48 * var(--portal-u)));
  }
  .menu-btn i{
    display:block;
    width:var(--nav-burger, calc(44 * var(--portal-u)));
    height:var(--nav-burger, calc(44 * var(--portal-u)));
    margin:0;
    padding:0;
    background-color:transparent;
    background-image:url("/cms-theme/_shared/img/icon_daohang.png");
    background-size:100% 100%;
    background-repeat:no-repeat;
    background-position:center;
  }
  .nav{
    position:absolute;
    /* 右缘 = Logo 右缘尺 + 图标宽 + 与链间距同值的 --nav-gap */
    right:calc(var(--logo-x, calc(20 * var(--portal-u))) + var(--nav-icon, calc(48 * var(--portal-u))) + var(--nav-gap));
    top:50%;
    transform:translateY(-50%);
    height:var(--nav-icon-size, calc(48 * var(--portal-u)));
    margin:0;padding:0;
    display:block;
    gap:0;
    order:0;
  }
  .nav .nav-quick{
    position:relative;
    float:left;
    margin-right:var(--nav-gap);
    font-size:calc(32 * var(--portal-u));
    line-height:1;
    font-weight:400;
    display:inline-flex;
    align-items:flex-end;
    box-sizing:border-box;
    height:100%;
    padding:0 0 2px;
    border-bottom:0;
    box-shadow:none;
    color:#fff;
  }
  .nav .nav-quick.is-active::after,
  .nav .nav-quick[aria-current="page"]::after{
    content:"";
    position:absolute;
    left:0;right:0;
    bottom:calc((var(--nav-icon-size, calc(48 * var(--portal-u))) - (88 * var(--portal-u))) / 2);
    height:1.5px;
    background:var(--orange,#FA630D);
    pointer-events:none;
  }
  .nav .nav-quick:last-child{margin-right:0}
  /* 移动抽屉：全宽直角；白底黑字 + 底边蓝描边 */
  .nav-drawer{
    left:0;right:0;width:auto;max-width:none;
    border:none;
    border-left:0;
    border-right:0;
    border-bottom:1px solid var(--blue,#007BEE);
    --drawer-radius:0;
    border-radius:0;
    background:#fff;
    transform:none;
    clip-path:inset(0 0 100% 0);
  }
  .site-header.is-open .nav-drawer{
    clip-path:inset(0);
    box-shadow:0 calc(24 * var(--portal-u)) calc(48 * var(--portal-u)) rgba(16,24,40,.12);
  }
  .nav-drawer-inner{
    max-height:min(70vh,calc(100dvh - var(--header-h, calc(88 * var(--portal-u)))));
    padding:0;margin:0;gap:0;
  }
  .nav-drawer-inner>a,
  .nav-drawer-parent{
    display:flex;align-self:stretch;
    width:100%;max-width:none;box-sizing:border-box;
    padding:calc(20 * var(--portal-u)) calc(32 * var(--portal-u));
    margin:0;
    border:0;border-radius:0;
    border-bottom:1px solid #E8E8E8;
    background:transparent;
    color:#111;
    font-size:max(14px,calc(30 * var(--portal-u)));
    font-weight:500;letter-spacing:.04em;
    line-height:1.4;
    box-shadow:none;
  }
  .nav-drawer-inner>a:hover,
  .nav-drawer-parent:hover{
    color:#111;background:#F5F5F5;
    box-shadow:none;
  }
  .nav-drawer-inner>a:active,
  .nav-drawer-parent:active{background:#EEEDED;box-shadow:none}
  .nav-drawer-inner>a.is-active,
  .nav-drawer-inner>a[aria-current="page"],
  .nav-drawer-sub a.is-active,
  .nav-drawer-sub a[aria-current="page"]{
    color:#111;
    font-weight:600;
    background:#F0F5FB;
    border-left:0;
    padding-left:calc(32 * var(--portal-u));
    box-shadow:none;
    border-radius:0;
  }
  .nav-drawer-item{gap:0;margin:0;padding:0;width:100%}
  .nav-drawer-sub{
    padding:0;margin:0;gap:0;background:transparent;width:100%;
  }
  .nav-drawer-sub a{
    display:block;width:100%;box-sizing:border-box;
    padding:calc(18 * var(--portal-u)) calc(32 * var(--portal-u)) calc(18 * var(--portal-u)) calc(56 * var(--portal-u));
    margin:0;border-radius:0;
    border:0;border-bottom:1px solid #EEEEEE;
    color:#111;
    font-size:max(13px,calc(28 * var(--portal-u)));
    font-weight:400;letter-spacing:.04em;
    line-height:1.4;
    box-shadow:none;
  }
  .nav-drawer-sub a:hover{
    color:#111;background:#F5F5F5;
    border-left:0;
    padding-left:calc(56 * var(--portal-u));
    box-shadow:none;
  }
  .nav-drawer-sub a.is-active,
  .nav-drawer-sub a[aria-current="page"]{
    padding-left:calc(56 * var(--portal-u));
  }
  .nav-caret{opacity:.75;border-color:rgba(17,17,17,.55)}
  .nav-drawer-item.is-expanded .nav-caret{opacity:1}
  /*
   * 页脚：字阶随 750 尺；底内边距紧凑。
   * 顶灰间隔 = 分区条「每日运势」同高（88*u），给回到顶部按钮停靠。
   */
  .site-footer{
    margin-top:calc(88 * var(--portal-u));
    padding:calc(10 * var(--portal-u)) var(--edge) calc(6 * var(--portal-u));
  }
  .site-footer .f-links,
  .site-footer p,
  .site-footer .f-small,
  .site-footer .f-line3{
    font-size:max(12px,calc(28 * var(--portal-u)));
    line-height:1.45;
  }
}

/* ≤420：禁止回退旧 --h-scale；再断言华易 fixed 几何 */
@media (max-width:420px){
  body{padding-top:calc(88 * var(--portal-u))}
  .site-header{
    --h-scale:1;
    --nav-gap:calc(30 * var(--portal-u));
    --nav-icon:calc(48 * var(--portal-u));
    --nav-fs:calc(32 * var(--portal-u));
    --header-h:calc(88 * var(--portal-u));
    --nav-icon-size:calc(48 * var(--portal-u));
    --nav-burger:calc(44 * var(--portal-u));
    position:fixed;top:0;left:0;right:0;
    height:calc(88 * var(--portal-u));
  }
  .header-inner{height:calc(88 * var(--portal-u));padding:0;display:block}
  .nav{
    right:calc(var(--logo-x, calc(20 * var(--portal-u))) + var(--nav-icon, calc(48 * var(--portal-u))) + var(--nav-gap));
    top:50%;
    transform:translateY(-50%);
    height:var(--nav-icon-size, calc(48 * var(--portal-u)));
  }
  .menu-btn{
    position:absolute;top:50%;right:0;transform:translateY(-50%);
    width:auto;height:var(--nav-icon-size, calc(48 * var(--portal-u)));
    /* 与 ≤700 / Logo 左缘同尺，禁止再写回 30*u */
    padding:0 var(--logo-x, calc(20 * var(--portal-u)));
  }
}

/* === back-to-top (was separate mid-body link; same rules) === */
/* _shared: 回到顶部（命理网蓝底，挂 portal_footer） */
.back-to-top[hidden]{display:none!important}
.back-to-top{
  --btt-size:44px;
  --btt-gap:14px;
  /* 与门户 .page / .wrap 内容柱对齐 */
  --btt-content:min(660px, calc(100vw - 32px));
  position:fixed;
  right:max(
    max(14px, env(safe-area-inset-right, 0px)),
    calc((100vw - var(--btt-content)) / 2 - var(--btt-size) - var(--btt-gap))
  );
  bottom:max(20px, env(safe-area-inset-bottom, 0px));
  z-index:65;
  width:var(--btt-size);
  height:var(--btt-size);
  padding:0;
  margin:0;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.22);
  background:linear-gradient(160deg,#1A8FFF,#007BEE);
  box-shadow:0 10px 22px rgba(0,90,180,.28);
  color:#fff;
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(8px);
  transition:opacity .22s ease, transform .22s ease, visibility .22s, box-shadow .2s, bottom .2s ease, right .2s ease;
  -webkit-tap-highlight-color:transparent;
}
.back-to-top.is-show{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
}
.back-to-top:hover{
  box-shadow:0 12px 26px rgba(0,90,180,.36);
  filter:brightness(1.04);
}
.back-to-top:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(0,123,238,.35), 0 12px 26px rgba(0,90,180,.36);
}
.back-to-top:active{opacity:.88;transform:translateY(1px);filter:none}
.back-to-top svg{
  width:20px;
  height:20px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
/* 支付弹层打开时隐藏，避免挡操作 */
html.pay-modal-open .back-to-top{display:none!important}
/*
  有悬浮条时的初始贴底高度（JS back-to-top.js 会动态覆盖，并在靠近页脚时与内容卡底边对齐抬高停靠）。
  悬浮重测条只在移动端叠高（见 ≤700 块）；PC 回到顶部在内容柱右侧，与居中的重测条不重叠，保持默认贴底。
*/
body:has(.top-query.is-docked) .back-to-top,
html.has-docked-query .back-to-top{
  bottom:max(86px, calc(72px + env(safe-area-inset-bottom, 0px)));
}
.back-to-top.is-docked{
  box-shadow:0 6px 16px rgba(0,90,180,.22);
}
@media (max-width:700px){
  .back-to-top{
    --btt-size:40px;
    width:var(--btt-size);
    height:var(--btt-size);
    right:max(12px, env(safe-area-inset-right, 0px));
    border-radius:10px;
  }
  .back-to-top svg{width:18px;height:18px}
  body:has(.float-consult) .back-to-top,
  html.has-float-consult .back-to-top{
    bottom:max(86px, calc(72px + env(safe-area-inset-bottom, 0px)));
  }
}
@media (prefers-reduced-motion:reduce){
  .back-to-top{transition:none}
}
