/* 全站年轻化视觉层：在各业务页独立结构之上，统一去除复古字体与旧式表格感。 */
:is(
  .xhs-community-page,.dy-stage-page,.ks-trust-live-page,.bili-creator-channel,
  .sh-page,.mp-page,.wb-page,.zh-page,.pe-tiktok,.pe-youtube,.pe-instagram,
  .pe-facebook,.pe-x,.pe-linkedin,.nw-page,.pin-eco,.tw-eco,.dc-eco,.tg-eco,
  .sc-eco,.rd-eco,.resource-lab,.wire-room,.join-studio,.agent-board,
  .customer-command,.media-ops-console,.supplier-studio,.agent-channel-map,
  .m-client-command,.m-media-shift
) {
  font-family: var(--font) !important;
  text-rendering: optimizeLegibility;
}

:is(
  .xhs-community-page,.dy-stage-page,.ks-trust-live-page,.bili-creator-channel,
  .sh-page,.mp-page,.wb-page,.zh-page,.pe-tiktok,.pe-youtube,.pe-instagram,
  .pe-facebook,.pe-x,.pe-linkedin,.nw-page,.pin-eco,.tw-eco,.dc-eco,.tg-eco,
  .sc-eco,.rd-eco,.resource-lab,.wire-room,.join-studio,.agent-board,
  .customer-command,.media-ops-console,.supplier-studio,.agent-channel-map,
  .m-client-command,.m-media-shift
) :is(h1,h2,h3,h4,strong,b,button,input,select,textarea) {
  font-family: var(--font) !important;
}

:is(
  .xhs-community-page,.dy-stage-page,.ks-trust-live-page,.bili-creator-channel,
  .sh-page,.mp-page,.wb-page,.zh-page,.pe-tiktok,.pe-youtube,.pe-instagram,
  .pe-facebook,.pe-x,.pe-linkedin,.nw-page,.pin-eco,.tw-eco,.dc-eco,.tg-eco,
  .sc-eco,.rd-eco
) :is(h1,h2) {
  font-weight: 850 !important;
  letter-spacing: -.045em !important;
}

:is(
  .xhs-community-page,.dy-stage-page,.ks-trust-live-page,.bili-creator-channel,
  .sh-page,.mp-page,.wb-page,.zh-page,.pe-tiktok,.pe-youtube,.pe-instagram,
  .pe-facebook,.pe-x,.pe-linkedin,.nw-page,.pin-eco,.tw-eco,.dc-eco,.tg-eco,
  .sc-eco,.rd-eco
) a,
:is(
  .xhs-community-page,.dy-stage-page,.ks-trust-live-page,.bili-creator-channel,
  .sh-page,.mp-page,.wb-page,.zh-page,.pe-tiktok,.pe-youtube,.pe-instagram,
  .pe-facebook,.pe-x,.pe-linkedin,.nw-page,.pin-eco,.tw-eco,.dc-eco,.tg-eco,
  .sc-eco,.rd-eco
) button {
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

:is(
  .xhs-community-page,.dy-stage-page,.ks-trust-live-page,.bili-creator-channel,
  .sh-page,.mp-page,.wb-page,.zh-page,.pe-tiktok,.pe-youtube,.pe-instagram,
  .pe-facebook,.pe-x,.pe-linkedin,.nw-page,.pin-eco,.tw-eco,.dc-eco,.tg-eco,
  .sc-eco,.rd-eco
) :is(a,button):active {
  transform: scale(.98);
}

/* 微信公众号：从旧杂志改为年轻内容工作台。 */
#gongzhonghao-editorial-page {
  --mp-paper: #f4f8f6 !important;
  --mp-white: #fff !important;
  --mp-ink: #17231d !important;
  --mp-sub: #637169 !important;
  --mp-faint: #87928c !important;
  --mp-line: #dde6e0 !important;
  --mp-green: #07a85a !important;
  background: #f4f8f6 !important;
}

#gongzhonghao-editorial-page .mp-masthead {
  padding: 0 !important;
  border-bottom: 1px solid #e3ebe6 !important;
  background: rgba(255,255,255,.98) !important;
}

#gongzhonghao-editorial-page .mp-masthead-line {
  display: flex !important;
  min-height: 64px !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
}

#gongzhonghao-editorial-page .mp-masthead-side {
  display: none !important;
}

#gongzhonghao-editorial-page .mp-brandmark {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 !important;
  border: 0 !important;
}

#gongzhonghao-editorial-page .mp-brandmark::before {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px 4px 12px 4px;
  color: #fff;
  background: var(--mp-green);
  content: "文";
  font-weight: 850;
}

#gongzhonghao-editorial-page .mp-brandmark b {
  font-size: 17px !important;
}

#gongzhonghao-editorial-page .mp-brandmark small {
  padding: 4px 8px;
  border-radius: 12px;
  color: #087d48 !important;
  background: #e7f7ef;
  font-size: 9px !important;
}

#gongzhonghao-editorial-page .mp-cover {
  padding: 36px 0 54px !important;
  background:
    radial-gradient(circle at 82% 16%, rgba(7,168,90,.11), transparent 27%),
    #f1faf5 !important;
}

#gongzhonghao-editorial-page .mp-cover-grid {
  grid-template-columns: minmax(0,1fr) 330px !important;
  gap: 45px !important;
}

#gongzhonghao-editorial-page .mp-cover h1 {
  max-width: 760px !important;
  font-size: clamp(42px,5.5vw,68px) !important;
  line-height: 1.05 !important;
}

#gongzhonghao-editorial-page .mp-deck {
  margin-top: 18px !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
}

#gongzhonghao-editorial-page .mp-byline {
  margin-top: 22px !important;
  padding-top: 15px !important;
}

#gongzhonghao-editorial-page .mp-button {
  min-height: 44px !important;
  border-radius: 22px 6px 22px 6px !important;
}

#gongzhonghao-editorial-page .mp-cover-aside {
  padding: 22px !important;
  border: 1px solid #d9e7df !important;
  border-top: 4px solid var(--mp-green) !important;
  border-radius: 30px 8px 30px 8px;
  background: #fff;
  box-shadow: 12px 14px 0 rgba(24,92,58,.06);
}

#gongzhonghao-editorial-page .mp-aside-title,
#gongzhonghao-editorial-page .mp-stat-list li {
  border-color: #e5ece8 !important;
}

#gongzhonghao-editorial-page .mp-stat-list b {
  color: #0b7f49;
  font-size: 26px !important;
}

#gongzhonghao-editorial-page .mp-note {
  padding: 14px 15px !important;
  border: 0 !important;
  border-radius: 16px 5px;
  background: #edf7f1 !important;
}

#gongzhonghao-editorial-page .mp-reading-room {
  padding: 58px 0 !important;
  background: #fff;
}

#gongzhonghao-editorial-page .mp-reading-grid {
  grid-template-columns: minmax(0,1fr) 320px !important;
  gap: 28px !important;
}

#gongzhonghao-editorial-page .mp-article {
  padding: 38px 42px 44px !important;
  border: 1px solid #e0e7e3 !important;
  border-radius: 36px 10px 36px 10px;
  box-shadow: 0 18px 45px rgba(26,54,39,.07) !important;
}

#gongzhonghao-editorial-page .mp-article::before {
  top: 16px !important;
  right: 20px !important;
  color: #69a886 !important;
}

#gongzhonghao-editorial-page .mp-article h2 {
  margin-top: 12px !important;
  font-size: clamp(30px,3.6vw,44px) !important;
  line-height: 1.18 !important;
}

#gongzhonghao-editorial-page .mp-dropcap {
  margin-top: 24px !important;
  font-size: 15px !important;
  line-height: 1.9 !important;
  text-align: left !important;
}

#gongzhonghao-editorial-page .mp-dropcap::first-letter {
  float: none !important;
  margin: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

#gongzhonghao-editorial-page .mp-pullquote {
  margin: 30px 0 !important;
  padding: 22px 24px !important;
  border: 0 !important;
  border-left: 4px solid var(--mp-green) !important;
  border-radius: 20px 6px;
  background: #eff8f3;
  font-size: 21px !important;
  text-align: left !important;
}

#gongzhonghao-editorial-page .mp-feature-section {
  margin-top: 22px !important;
  padding: 16px 18px;
  border-radius: 20px 6px;
  background: #f7faf8;
}

#gongzhonghao-editorial-page .mp-desk-block {
  padding: 20px !important;
  border: 1px solid #e0e8e3 !important;
  border-top: 3px solid var(--mp-green) !important;
  border-radius: 26px 7px 26px 7px;
  background: #fff;
}

#gongzhonghao-editorial-page .mp-desk-block + .mp-desk-block {
  margin-top: 14px !important;
}

#gongzhonghao-editorial-page .mp-account-row {
  border-color: #e8eeea !important;
}

#gongzhonghao-editorial-page .mp-account-avatar {
  border-radius: 50% !important;
}

#gongzhonghao-editorial-page .mp-calendar td {
  border-color: #e5ebe7 !important;
  border-radius: 4px;
}

#gongzhonghao-editorial-page .mp-metrics {
  padding: 58px 0 !important;
  background: #102b20 !important;
}

#gongzhonghao-editorial-page .mp-metrics-head {
  margin-bottom: 26px !important;
}

#gongzhonghao-editorial-page .mp-metrics-head h2 {
  font-size: clamp(31px,4.2vw,48px) !important;
}

#gongzhonghao-editorial-page .mp-metric-tabs {
  overflow: hidden;
  border: 1px solid #315343 !important;
  border-radius: 24px 7px 24px 7px;
}

#gongzhonghao-editorial-page .mp-metric-tabs button[aria-selected="true"] {
  background: #1c4734 !important;
}

#gongzhonghao-editorial-page .mp-metric-panel {
  gap: 30px !important;
  padding-top: 28px !important;
}

#gongzhonghao-editorial-page .mp-notes {
  padding: 52px 0 !important;
  background: #f5f8f6;
}

#gongzhonghao-editorial-page .mp-notes h2 {
  font-size: 31px !important;
}

#gongzhonghao-editorial-page .mp-footnote {
  margin-bottom: 7px;
  border: 1px solid #dfe7e2 !important;
  border-radius: 18px 6px;
  background: #fff;
}

#gongzhonghao-editorial-page .mp-footnote > span {
  padding-left: 14px;
}

#gongzhonghao-editorial-page .mp-footnote details {
  padding-right: 16px !important;
}

#gongzhonghao-editorial-page .mp-colophon {
  padding: 48px 0 !important;
  background: #08a85b !important;
}

/* 国内内容平台分别保留自身文化，但统一采用当代字体与触控尺度。 */
.xhs-community-page {
  --xhs-cream: #fff8f6 !important;
  --xhs-paper: #fff !important;
  --xhs-line: #eadfe0 !important;
}
.xhs-community-page :is(.xhs-search-paper,.xhs-ledger,.xhs-note,.xhs-manifesto) {
  border-radius: 28px 8px 28px 8px !important;
  box-shadow: 0 14px 34px rgba(70,42,45,.07) !important;
}
.xhs-community-page .xhs-note:nth-child(even) {
  border-radius: 8px 28px 8px 28px !important;
}
.xhs-community-page .xhs-head-note {
  border-radius: 22px 7px;
  transform: rotate(.5deg) !important;
}

.ks-trust-live-page :is(.ks-live-stage,.ks-trust-board,.ks-card,.ks-panel),
.bili-creator-channel :is(.bili-player,.bili-card,.bili-panel) {
  border-radius: 26px 8px 26px 8px !important;
}

.sh-page :is(.sh-social-canvas,.sh-feed,.sh-private-path,.sh-touch-grid > *) {
  border-radius: 28px 8px 28px 8px !important;
}

.wb-page :is(.wb-radar,.wb-feed,.wb-trends,.wb-signal) {
  border-radius: 26px 8px 26px 8px !important;
}

.zh-page {
  background: #f4f7fb !important;
}
.zh-page :is(.zh-answer,.zh-side-panel,.zh-related-item) {
  border-radius: 24px 7px 24px 7px !important;
  box-shadow: 0 12px 30px rgba(25,63,105,.06);
}

/* 海外平台：保留各自内容形态，提升按钮、面板和移动交互。 */
.pe-tiktok :is(.tt-script-card,.tt-version-preview,.tt-creator-grid article),
.pe-youtube :is(.yt-window,.yt-retention-board,.yt-channel-home,.yt-creator-list article),
.pe-instagram :is(.ig-board,.ig-workflow,.ig-contact-card),
.pe-facebook :is(.fb-feed-window,.fb-group-board,.fb-feature-grid article,.fb-resource-table),
.pe-x :is(.x-feed,.x-trends,.x-creator-list article),
.pe-linkedin :is(.li-graph-card,.li-content-board,.li-feature-grid article,.li-expert-grid article) {
  border-radius: 26px 8px 26px 8px !important;
}

.pe-facebook {
  background: #f4f7fc !important;
}
.pe-facebook .fb-features {
  background: #eef5ff !important;
}

.pe-linkedin {
  background: #f3f6f8 !important;
}

.pin-eco :is(.pin-card,.pin-board,.pin-panel),
.tw-eco :is(.tw-player,.tw-chat,.tw-card),
.dc-eco :is(.dc-workspace,.dc-card,.dc-feature-stack article),
.tg-eco :is(.tg-channel,.tg-card,.tg-resource-list article),
.sc-eco :is(.sc-phone,.sc-card,.sc-feature-grid article),
.rd-eco :is(.rd-post,.rd-card,.rd-resource-table) {
  border-radius: 26px 8px 26px 8px !important;
}

/* 公共业务页：现代营销工作台，不再使用旧纸张与直角表格。 */
.resource-lab,.wire-room,.join-studio {
  font-family: var(--font) !important;
}
.resource-lab :is(h1,h2,h3),.wire-room :is(h1,h2,h3),.join-studio :is(h1,h2,h3) {
  font-family: var(--font) !important;
  font-weight: 820 !important;
  letter-spacing: -.035em !important;
}

/* 四类角色与深层工作页统一触控尺度，但保留角色颜色。 */
body.portal-pc.ym-experience :is(.card,.stat-card,.filter-bar,.res-panel,.wb-panel,.wb-kpi) {
  border-radius: 16px 6px 16px 6px !important;
}
body.portal-pc.ym-experience :is(.input,select,textarea,.btn) {
  border-radius: 13px 5px !important;
}
body.ym-area-customer { --ym-accent: #1677d2; }
body.ym-area-media { --ym-accent: #0a8c79; }
body.ym-area-supplier { --ym-accent: #f06b2f; }
body.ym-area-agent { --ym-accent: #6756c8; }

body.mobile-app.ym-experience :is(.card,.stat-card,.customer-order-card,table.m-card-table tr,.res-panel) {
  border-radius: 18px 6px 18px 6px !important;
}
body.mobile-app.ym-experience :is(.btn,.input,select,textarea) {
  border-radius: 14px 5px !important;
}

/* 未登录资源库：各平台保持独立结果结构，同时统一现代字体与触控层级。 */
:is(
  .rre-xhs,.rre-dy,.rre-ks,.rre-bili,#rr-shipinhao-results,#rr-gongzhonghao-results,
  #rr-weibo-results,#rr-zhihu-results,.rr-tt,.rr-yt,.rr-ig,.rr-fb,.rr-x,.rr-li,
  .rr-pin,.rr-twr,.rr-dcr,.rr-tgr,.rr-scr,.rr-rdr
) {
  font-family: var(--font) !important;
  text-rendering: optimizeLegibility;
}

:is(
  .rre-xhs,.rre-dy,.rre-ks,.rre-bili,#rr-shipinhao-results,#rr-gongzhonghao-results,
  #rr-weibo-results,#rr-zhihu-results,.rr-tt,.rr-yt,.rr-ig,.rr-fb,.rr-x,.rr-li,
  .rr-pin,.rr-twr,.rr-dcr,.rr-tgr,.rr-scr,.rr-rdr
) :is(h1,h2,h3,h4,b,strong,small,p,span,a,button,dt,dd) {
  font-family: var(--font) !important;
}

#rr-gongzhonghao-results {
  --mp-paper: #f4f8f6 !important;
  --mp-line: #dde7e1 !important;
}
#rr-gongzhonghao-results .mprr-masthead {
  overflow: hidden;
  border: 1px solid var(--mp-line) !important;
  border-top: 4px solid var(--mp-green) !important;
  border-radius: 24px 7px 24px 7px;
}
#rr-gongzhonghao-results .mprr-side {
  display: none;
}
#rr-gongzhonghao-results .mprr-brand {
  grid-column: 1 / -1;
  justify-content: center;
  border: 0 !important;
}
#rr-gongzhonghao-results .mprr-account {
  overflow: hidden;
  border-radius: 26px 8px 26px 8px;
  box-shadow: 0 12px 30px rgba(26,75,48,.06) !important;
}
#rr-gongzhonghao-results .mprr-avatar {
  border-radius: 50% !important;
}
#rr-gongzhonghao-results :is(.mprr-topics,.mprr-rate-card) {
  border-radius: 18px 6px;
}
#rr-gongzhonghao-results .mprr-prices {
  overflow: hidden;
  border-radius: 14px 5px;
}

#rr-weibo-results :is(article,.wbrr-card,.wbrr-feed-item),
#rr-zhihu-results :is(article,.zhrr-card,.zhrr-answer),
#rr-shipinhao-results :is(article,.shrr-card,.shrr-item) {
  border-radius: 24px 7px 24px 7px !important;
}

:is(.rr-tt,.rr-yt,.rr-ig,.rr-fb,.rr-x,.rr-li,.rr-pin,.rr-twr,.rr-dcr,.rr-tgr,.rr-scr,.rr-rdr) :is(article,section) {
  scroll-margin-top: 80px;
}

@media (max-width: 960px) {
  #gongzhonghao-editorial-page .mp-cover-grid,
  #gongzhonghao-editorial-page .mp-reading-grid {
    grid-template-columns: 1fr !important;
  }
  #gongzhonghao-editorial-page .mp-cover-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  #gongzhonghao-editorial-page .mp-editor-desk {
    position: static !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

@media (max-width: 680px) {
  #gongzhonghao-editorial-page .mp-cover {
    padding: 22px 0 35px !important;
  }
  #gongzhonghao-editorial-page .mp-cover h1 {
    font-size: 38px !important;
  }
  #gongzhonghao-editorial-page .mp-cover-aside,
  #gongzhonghao-editorial-page .mp-editor-desk {
    grid-template-columns: 1fr;
  }
  #gongzhonghao-editorial-page .mp-cover-aside,
  #gongzhonghao-editorial-page .mp-article,
  #gongzhonghao-editorial-page .mp-desk-block {
    border-radius: 24px 7px 24px 7px;
  }
  #gongzhonghao-editorial-page .mp-article {
    padding: 30px 20px 34px !important;
  }
  #gongzhonghao-editorial-page .mp-article h2 {
    padding-right: 50px;
    font-size: 31px !important;
  }
  #gongzhonghao-editorial-page .mp-reading-room {
    padding: 38px 0 !important;
  }
  #gongzhonghao-editorial-page .mp-metrics {
    padding: 42px 0 !important;
  }
  #gongzhonghao-editorial-page .mp-metrics-head h2 {
    font-size: 34px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(
    .xhs-community-page,.dy-stage-page,.ks-trust-live-page,.bili-creator-channel,
    .sh-page,.mp-page,.wb-page,.zh-page,.pe-tiktok,.pe-youtube,.pe-instagram,
    .pe-facebook,.pe-x,.pe-linkedin,.nw-page,.pin-eco,.tw-eco,.dc-eco,.tg-eco,
    .sc-eco,.rd-eco,.resource-lab,.wire-room,.join-studio
  ) * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
