/* Shared running-UI typography. Loaded last by H5, platform/merchant admin and login.
 * Roles change --ui-text-size; child emphasis inherits the same role.
 * Do not apply prose fonts to icon glyphs, canvas drawing or seat markers.
 *
 * 2026-10-24 富文本画布不变式（AAS core 修复）：
 * 用户/管理员编写的富文本内容必须按作者样式渲染，UI 排版令牌不得覆盖它。
 * 因此下面所有 :where(...) 选择器都追加了
 *   :not(.rich-html, .rich-html *, .kind-editor-html__editable, .kind-editor-html__editable *)
 * 标记类 .rich-html 表示“这段 HTML 是作者内容”：
 *   - 后台编辑器画布 = .kind-editor-html__editable（manage.html 也会同步加 .rich-html）
 *   - 展示端 = #detail-text / #info / #policy-body / #info-detail-body / .member-tool-rich-value
 * 新增富文本容器时必须同时加 .rich-html，否则字号/字体/行高会被这里压回 12px。
 * 不要用“再叠一层 !important”反制——只能在这里排除。
 */
body:is(#consumer-app,#manage-app,#merchant-app,#login-app) {
  --ui-font: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --ui-title-size: 14px;
  --ui-body-size: 12px;
  --ui-caption-size: 12px;
  --ui-text-size: var(--ui-body-size);
  font-family: var(--ui-font);
  font-size: var(--ui-body-size);
}
body:is(#consumer-app,#manage-app,#merchant-app,#login-app) :where(h1,h2,h3,h4,h5,h6,p,div,span,strong,b,em,small,a,button,label,input,textarea,select,option,li,td,th,output,dt,dd,legend):not(:where(.mui-ext-icon,.mui-icon,.fa,.glyphicon,[class^="fa-"],.icon-btn,.close,.legacy-modal-close,.cinema-seat,.cinema-seat *)):not(.rich-html, .rich-html *, .kind-editor-html__editable, .kind-editor-html__editable *),
body#consumer-app :is(#explore,#categories-page,#campaigns-page,#orders,#member,#member-tool,#cards,#posters,#activity-detail,#activity-verify-page,#order-detail-page,#ticket-page,#order-form,#member-login-dialog,#member-profile-dialog,#follow-reward-dialog,#policy-dialog,#aftersale-dialog,#card-dialog) :where(h1,h2,h3,h4,h5,h6,p,div,span,strong,b,em,small,a,button,label,input,textarea,select,option,li,td,th,output,dt,dd,legend):not(:where(.mui-ext-icon,.mui-icon,.fa,.glyphicon,[class^="fa-"],.icon-btn,.close,.legacy-modal-close,.cinema-seat,.cinema-seat *)):not(.rich-html, .rich-html *, .kind-editor-html__editable, .kind-editor-html__editable *),
body#consumer-app #orders #order-list :where(h1,h2,h3,h4,h5,h6,p,div,span,strong,b,em,small,a,button,label,input,textarea,select,option,li,td,th,output,dt,dd,legend):not(:where(.mui-ext-icon,.mui-icon,.fa,.glyphicon,[class^="fa-"],.icon-btn,.close,.legacy-modal-close,.cinema-seat,.cinema-seat *)):not(.rich-html, .rich-html *, .kind-editor-html__editable, .kind-editor-html__editable *),
body#manage-app :is(#dashboard,#plugins,#activities,#orders,#seats,#cards,#finance,#posters,#permissions,#marketing,#settings,#categories,#members,#stores,#merchants,#editor,#member-dialog,#store-map-dialog,#store-qrcode-dialog) :where(h1,h2,h3,h4,h5,h6,p,div,span,strong,b,em,small,a,button,label,input,textarea,select,option,li,td,th,output,dt,dd,legend):not(:where(.mui-ext-icon,.mui-icon,.fa,.glyphicon,[class^="fa-"],.icon-btn,.close,.legacy-modal-close,.cinema-seat,.cinema-seat *)):not(.rich-html, .rich-html *, .kind-editor-html__editable, .kind-editor-html__editable *),
body#manage-app #editor #editor-form :where(h1,h2,h3,h4,h5,h6,p,div,span,strong,b,em,small,a,button,label,input,textarea,select,option,li,td,th,output,dt,dd,legend):not(:where(.mui-ext-icon,.mui-icon,.fa,.glyphicon,[class^="fa-"],.icon-btn,.close,.legacy-modal-close,.cinema-seat,.cinema-seat *)):not(.rich-html, .rich-html *, .kind-editor-html__editable, .kind-editor-html__editable *),
body#manage-app #settings #settings-form :where(h1,h2,h3,h4,h5,h6,p,div,span,strong,b,em,small,a,button,label,input,textarea,select,option,li,td,th,output,dt,dd,legend):not(:where(.mui-ext-icon,.mui-icon,.fa,.glyphicon,[class^="fa-"],.icon-btn,.close,.legacy-modal-close,.cinema-seat,.cinema-seat *)):not(.rich-html, .rich-html *, .kind-editor-html__editable, .kind-editor-html__editable *),
body#merchant-app :is(#dashboard,#activities,#orders,#stores,#finance,#access,#settings,#activity-modal,#store-modal,#saler-modal,#role-modal,#operator-modal) :where(h1,h2,h3,h4,h5,h6,p,div,span,strong,b,em,small,a,button,label,input,textarea,select,option,li,td,th,output,dt,dd,legend):not(:where(.mui-ext-icon,.mui-icon,.fa,.glyphicon,[class^="fa-"],.icon-btn,.close,.legacy-modal-close,.cinema-seat,.cinema-seat *)):not(.rich-html, .rich-html *, .kind-editor-html__editable, .kind-editor-html__editable *) {
  font-family: var(--ui-font) !important;
  font-size: var(--ui-text-size) !important;
  line-height: 1.5 !important;
}
body:is(#consumer-app,#manage-app,#merchant-app,#login-app) :is(h1,h2,h3,h4,h5,h6,[role="heading"],.title,.panel-title,.activity-title,.ticket-title,.activity-verify-title,.field-section-title,.member-feature-title,.payment-provider-title,.poster-designer-section-title,.member-tool-hero strong,.order-detail-summary-text strong,.order-sheet-head>strong,.campaign-entry-head>strong,.member-login-brand>strong,.M_detail .mod_tab,.legacy-modal-title,.merchant-logo,.runtime-header .logo,.member-identity>strong) {
  --ui-text-size: var(--ui-title-size);
}
body:is(#consumer-app,#manage-app,#merchant-app,#login-app) :is(small,.meta,.hint,.help-block,.text-muted,.field-help,.member-panel-head p,.member-tool-hero p,.member-tool-card>p,.member-tool-empty p,.member-profile-edit,.member-site-footer p,#member-profile-note,#member-tool-desc,.order-time,.preview-payment-note,.aftersale-note,.order-detail-aftersale-note,.member-settings-note,.settings-panel-note,.member-feature-desc,.payment-method-desc,.payment-field-help,.merchant-payment-help,.activity-owner-help,.activity-location-help,.image-uploader-help,.notice-field-help,.store-qrcode-hint,.activity-qrcode-hint,[class$="-caption"],[class$="-hint"],[class$="-help"],[class$="-note"],[class$="-desc"],.member-login-consent,.auth-consent,.terms,.member-site-footer,.order-detail-summary-text>span) {
  --ui-text-size: var(--ui-caption-size);
}
/* Prices, countdowns and numeric instruments are not prose headings. */
#consumer-app #detail-price { --ui-text-size: 24px; line-height: 1.1 !important; }
#consumer-app :is(#detail-original-price,#detail-countdown) { --ui-text-size: 14px; line-height: 1.25 !important; }
/* 详情标题 h5#detail-activity-title.mui-ellipsis-2：按产品要求固定 18px（标题角色默认 14px）。 */
body#consumer-app #activity-detail .pricebar>.mui-card .mui-card-content h5#detail-activity-title.mui-ellipsis-2 {
  --ui-text-size: 18px;
  font-size: 18px !important;
}
#consumer-app :is(.activity-current-price,.activity .price) { --ui-text-size: 17px; }
#consumer-app :is(#activities .activity .activity-current-price,#category-page-activities .activity .activity-current-price,#campaign-list .activity .activity-current-price) {
  --ui-text-size: 14px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
}
#consumer-app .activity-original-price { --ui-text-size: 14px; }
#consumer-app :is(.detail-marketing,.detail-promo-chip) { --ui-text-size: 18px; }
#consumer-app :is(.detail-promo-summary,.campaign-card-promos,.campaign-entry-actions,.campaign-tabs) { --ui-text-size: 12px; }
#consumer-app .tabbar { --ui-text-size: 12px; }
#consumer-app #member .member-icon,#consumer-app #member .member-icon::before,
#consumer-app #member-tool .member-icon,#consumer-app #member-tool .member-icon::before {
  font-family: Muiext !important;
  font-size: 20px !important;
  font-weight: normal !important;
  line-height: 1 !important;
}
#consumer-app #member .member-icon::before,
#consumer-app #member-tool .member-icon::before {
  background: none !important;
  color: #20bdff !important;
  -webkit-text-fill-color: currentColor !important;
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  #consumer-app #member .member-icon::before,
  #consumer-app #member-tool .member-icon::before {
    background: none !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: #20bdff !important;
    -webkit-text-fill-color: #20bdff !important;
  }
}
/* Metadata has an icon prefix, but its Chinese copy still uses the prose font. */
#consumer-app .meta.mui-ext-icon { font-family: var(--ui-font) !important; font-size: 12px !important; }
#consumer-app .meta.mui-ext-icon::before { font-family: Muiext !important; }
/* Keep the price trio on the same bottom edge, including a wrapped countdown. */
#consumer-app #activity-detail .detail-price-values { --ui-text-size: 14px; }
#consumer-app #activity-detail :is(#detail-price,#detail-original-price,#detail-countdown) { margin-bottom: 0 !important; }
/* Labels may wrap at small widths instead of being clipped after the font change. */
#consumer-app #member .service-entry { min-height: 80px; }
#consumer-app #member .service-entry>span:not(.member-icon) { min-width: 0; overflow-wrap: anywhere; }

/* Numeric tokens never split inside a currency amount; the price row stays on ONE line.
   2026-10-23 产品要求：单价区与倒计时区不得错行。2026-10-08 的 flex-wrap:wrap 方案
   在 360px 机型上会把整块“倒计时 + 预约人数”挤到第二行，已回退为 nowrap。
   为避免倒计时被压窄拆字，字号改为按视口收缩（app.html 六重叠 id 层里用 clamp），
   两侧容器都不再声明 min-width:min-content，而是由字号保证内容宽度放得下。 */
body#consumer-app #activity-detail .detail-price-line {
  gap: 4px 8px !important;
  flex-wrap: nowrap !important;
  align-items: flex-end !important;
}
body#consumer-app #activity-detail .detail-price-values { flex: 0 1 auto !important; max-width: 100%; min-width: 0 !important; }
body#consumer-app #activity-detail .detail-price-side {
  flex: 0 1 auto !important;
  margin-left: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
body#consumer-app #activity-detail #detail-price {
  min-width: 0; flex: 0 1 auto; white-space: nowrap;
  overflow-wrap: normal; word-break: normal; line-height: 1.1 !important;
}
body#consumer-app #activity-detail #detail-original-price {
  min-width: 0; flex: 0 1 auto; white-space: nowrap !important;
  overflow-wrap: normal; word-break: normal; line-height: 1.25 !important;
}
body#consumer-app #activity-detail #detail-countdown {
  flex: 0 0 auto !important; min-width: 0 !important; max-width: 100%;
  white-space: nowrap !important;
  overflow-wrap: normal !important; word-break: keep-all !important; line-height: 1.25 !important;
}
body#consumer-app #activity-detail #detail-registration-count {
  flex: 0 0 auto !important; min-width: 0 !important; max-width: 100%;
  white-space: nowrap !important;
}
body#consumer-app :is(.mui-action-back,.legacy-page-back) {
  border: 0 !important; box-shadow: none !important; background: transparent !important;
}

/* Member function labels share the theme; monetary/status warnings and marketing copy stay untouched. */
body#consumer-app #member .member-panel-head h3,
body#consumer-app #member .member-panel-head button {
  background: var(--member-feature-gradient) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  color: transparent !important; -webkit-text-fill-color: transparent !important;
}
