/* v39 全站最终覆盖层：统一内容宽度 + 轮播不越界 + 设备能力分层（规则见 开发手册.md） */
/* 与首页 hero-stack 同套节奏（见 home-polish.css）；子页 #body.pg 沿用，不改首页 #body */
:root{--edge:16px;--content-max:1216px;--sp-sec:10px;--sp-hd:10px;--sp-top:8px;--sp-bot:20px;--sub-hero-min-h:200px;--sub-hero-min-h-desk:260px;--sub-hero-radius:24px}
@media (min-width:768px){:root{--edge:24px;--sp-top:16px;--sp-bot:28px}}
/* 手机首页：正文与横幅同宽（hero-stack 用 margin:… var(--edge)） */
@media (max-width:767.98px){
 html:has(.hero-stack) #body:not(.pg){
  padding-left:var(--edge)!important;padding-right:var(--edge)!important;
  box-sizing:border-box!important;width:100%!important;
 }
}
@media (min-width:1024px){
 :root{--edge:160px;--pad:160px;--sp-top:20px;--sp-bot:32px}
}
/* 子页正文区：左右 --edge，上下 --sp-top/bot，与首页顶栏/页脚对齐 */
#body.pg{
  box-sizing:border-box!important;width:100%!important;min-width:0;max-width:none!important;
  margin:0!important;padding-left:var(--edge)!important;padding-right:var(--edge)!important;
  padding-top:var(--sp-top)!important;padding-bottom:var(--sp-bot)!important;
  gap:var(--sp-sec)!important;row-gap:var(--sp-sec)!important;
  display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important
}
#body.pg>*{min-width:0;grid-column:auto!important}
/* 【全站间距唯一来源】子页正文直接子元素之间只靠上面的 gap:var(--sp-sec)，禁止子元素自带上下外边距；页面禁止另写 #body 的 padding / 子元素间距，要改只改本文件令牌 */
#body.pg>*{margin-top:0!important;margin-bottom:0!important}
/* 只含视觉隐藏 h1.vh 的页头、空容器不占 flex 子项（否则 gap 会多算一次） */
#body.pg>header:has(>h1.vh:only-child){display:contents}
#body.pg>*:empty{display:none}
.is-desktop #body.pg>*:not(:has(>:not([data-mobile-only]))):has(>[data-mobile-only]){display:none}
.is-mobile #body.pg>*:not(:has(>:not([data-desktop-only]))):has(>[data-desktop-only]){display:none}
/* 插画卡（手机显示）与其它块同宽，左右边距只来自 --edge */
#body.pg>.jb-ill{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box}
@media (min-width:768px){
 .top{padding-left:var(--edge)!important;padding-right:var(--edge)!important;box-sizing:border-box!important}
 .sf{box-sizing:border-box!important;max-width:none!important;width:auto!important;margin-left:0!important;margin-right:0!important;align-self:stretch}
}
@media (min-width:1024px){
 .sf{width:auto!important;max-width:none!important}
}
/* v80/v122 全站电脑端（≥1024px）：左右边距只来自 :root --edge（160px）；顶栏/正文/页脚对齐。 */
@media (min-width:1024px){
 html{background:#F5F6F8!important}
 body::after{-webkit-mask-image:none!important;mask-image:none!important;opacity:.05}
 .top{padding-left:var(--edge)!important;padding-right:var(--edge)!important}
 .sf-in{max-width:none!important;padding-left:var(--edge)!important;padding-right:var(--edge)!important}
}
/* 轮播：始终在所属列内滚动 */
#body>*,.s-explore,.s-red{min-width:0}
.snap,.tp-car,.xp-car,.s-explore .snap,.s-explore .tp-car,#body .snap,#body .xp-car{overflow-x:auto!important;overflow-y:hidden;max-width:100%;min-width:0;margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important;scroll-snap-type:x mandatory!important;box-sizing:border-box}
/* 设备能力分层 */
.is-desktop [data-mobile-only],.is-mobile [data-desktop-only]{display:none!important}
.tel-txt{cursor:text;-webkit-user-select:text;user-select:text}
/* v49 分组列表行 hover/press（t188u）：Apple 式内缩圆角高亮，非硬边矩形 */
a.row,.pane a,.tq-row2{position:relative;isolation:isolate}
a.row:active,.pane a:active,.tq-row2:active{background:transparent!important;background-color:transparent!important;box-shadow:none!important}@media (hover:hover) and (pointer:fine){a.row:hover,.pane a:hover,.tq-row2:hover{background:transparent!important;background-color:transparent!important;box-shadow:none!important}}
a.row::after,.pane a::after,.tq-row2::after{content:"";position:absolute;top:3px;bottom:3px;left:-8px;right:-8px;z-index:-1;border-radius:12px;background:rgba(0,0,0,.04);opacity:0;transition:opacity .15s ease;pointer-events:none}
.tq-row2::after{left:6px;right:6px}
@media (hover:hover){a.row:hover::after,.pane a:hover::after,.tq-row2:hover::after{opacity:1}
 a.row:hover,.pane a:hover{border-bottom-color:transparent!important}
 a.row:has(+a.row:hover),.pane a:has(+a:hover){border-bottom-color:transparent!important}
 a.row:hover::before,a.row:hover+a.row::before{opacity:0}
 .tq-row2:hover,.tq-row2:hover+.tq-row2{border-top-color:transparent!important}}
a.row:active::after,.pane a:active::after,.tq-row2:active::after{opacity:1;background:rgba(0,0,0,.07)}
html[data-theme=dark] a.row::after,html[data-theme=dark] .pane a::after,html[data-theme=dark] .tq-row2::after{background:rgba(255,255,255,.06)}
html[data-theme=dark] a.row:active::after,html[data-theme=dark] .pane a:active::after,html[data-theme=dark] .tq-row2:active::after{background:rgba(255,255,255,.1)}
@media (prefers-reduced-motion:reduce){a.row::after,.pane a::after,.tq-row2::after{transition:none}}
/*dark:auto 由 theme.py 生成，勿手改*/
@media (min-width:1024px){html:where([data-theme=dark]){background-color:#0F141B!important}}
:where(html[data-theme=dark]) a.row::after,:where(html[data-theme=dark]) .pane a::after,:where(html[data-theme=dark]) .tq-row2::after{background-color:rgba(255,255,255,0.04)}
:where(html[data-theme=dark]) a.row:active::after,:where(html[data-theme=dark]) .pane a:active::after,:where(html[data-theme=dark]) .tq-row2:active::after{background-color:rgba(255,255,255,0.07)}
html:where([data-theme=dark])[data-theme=dark] a.row::after,html:where([data-theme=dark])[data-theme=dark] .pane a::after,html:where([data-theme=dark])[data-theme=dark] .tq-row2::after{background-color:rgba(24,32,42,0.06)}
html:where([data-theme=dark])[data-theme=dark] a.row:active::after,html:where([data-theme=dark])[data-theme=dark] .pane a:active::after,html:where([data-theme=dark])[data-theme=dark] .tq-row2:active::after{background-color:rgba(24,32,42,0.1)}
/*/dark:auto*/
