/*
 * Classic UI consistency layer.
 * Keeps business templates intact while aligning shell width, typography,
 * overlays, media geometry and high-risk feature pages.
 */

:root {
  --ww-shell-max: 640px;
  --ww-brand: #2f7df6;
  --ww-brand-strong: #236be4;
  --ww-brand-fill: #2367c9;
  --ww-on-brand: #fff;
  --ww-brand-soft: #eef5ff;
  --ww-bg: #f4f6f9;
  --ww-surface: #fff;
  --ww-surface-soft: #f8fafc;
  --ww-text: #172033;
  --ww-text-2: #475467;
  --ww-text-3: #667085;
  --ww-text-muted: #667085;
  --ww-line: #e4e7ec;
  --ww-success: #22a06b;
  --ww-danger: #e34d59;
  --ww-vip: #a56b3f;
  --ww-vip-soft: #fff7ed;
  --ww-radius-card: 16px;
  --ww-radius-control: 12px;
  --ww-shadow-card: 0 4px 16px rgba(31, 52, 80, .06);
  --ww-shadow-float: 0 16px 42px rgba(22, 35, 56, .2);
  --ww-fs-page: 18px;
  --ww-fs-title: 16px;
  --ww-fs-body: 14px;
  --ww-fs-label: 13px;
  --ww-fs-meta: 12px;
}

html[data-ww-font-scale="0.9"] {
  --ww-fs-page: 17px;
  --ww-fs-title: 14px;
  --ww-fs-body: 13px;
  --ww-fs-label: 12px;
  --ww-fs-meta: 11px;
}

html[data-ww-font-scale="1.125"] {
  --ww-fs-page: 20px;
  --ww-fs-title: 18px;
  --ww-fs-body: 16px;
  --ww-fs-label: 14px;
  --ww-fs-meta: 13px;
}

html[data-ww-font-scale="1.25"] {
  --ww-fs-page: 22px;
  --ww-fs-title: 20px;
  --ww-fs-body: 18px;
  --ww-fs-label: 16px;
  --ww-fs-meta: 14px;
}

html[data-ww-font-scale] body {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body.uni-body,
body.uni-body uni-app {
  font-size: var(--ww-fs-body) !important;
  line-height: 1.5;
}

html[data-ww-resolved-theme="dark"] {
  color-scheme: dark;
  --ww-brand: #6ea8ff;
  --ww-brand-strong: #5597f8;
  --ww-brand-fill: #2d70ce;
  --ww-on-brand: #fff;
  --ww-brand-soft: #1d3150;
  --ww-bg: #0d1524;
  --ww-surface: #182236;
  --ww-surface-soft: #111b2e;
  --ww-text: #eef4fd;
  --ww-text-2: #d0d5dd;
  --ww-text-3: #aeb8c8;
  --ww-text-muted: #aeb8c8;
  --ww-line: #2a374d;
  --ww-vip: #e7b979;
  --ww-vip-soft: #3a2e22;
  --ww-shadow-card: none;
  --ww-shadow-float: 0 18px 46px rgba(0, 0, 0, .42);
}

/* One width contract for the SPA: full mobile viewport, 640px desktop shell. */
@media (min-width: 700px) and (hover: hover) and (pointer: fine) {
  body.uni-body #app,
  body.uni-body uni-app {
    width: min(100vw, var(--ww-shell-max)) !important;
    max-width: var(--ww-shell-max) !important;
    min-height: 100vh !important;
    margin-inline: auto !important;
    overflow-x: hidden !important;
    background: var(--ww-bg) !important;
    box-shadow: 0 0 34px rgba(31, 52, 80, .1) !important;
  }

  body.uni-body uni-page-wrapper,
  body.uni-body uni-page-body,
  body.uni-body .uni-page-wrapper,
  body.uni-body .uni-page-body {
    width: 100% !important;
    max-width: var(--ww-shell-max) !important;
    margin-inline: auto !important;
    overflow-x: hidden !important;
  }

  body.uni-body uni-page-head .uni-page-head,
  body.uni-body uni-page-head .uni-placeholder,
  body.uni-body uni-tabbar .uni-tabbar {
    left: 50% !important;
    right: auto !important;
    width: min(100vw, var(--ww-shell-max)) !important;
    max-width: var(--ww-shell-max) !important;
    transform: translateX(-50%) !important;
  }

  body.pages-in-login .login-bg,
  body.pages-in-reg .login-bg,
  body.pages-in-forget .login-bg {
    width: min(100%, 480px) !important;
    margin-inline: auto !important;
  }
}

/* Uni overlays: same readable scale and layer order on every current route. */
body.uni-body uni-modal,
body.uni-body uni-actionsheet,
body.uni-body .uni-picker-container {
  z-index: 20000 !important;
}

body.uni-body uni-toast {
  z-index: 20010 !important;
}

body.uni-body uni-modal .uni-mask,
body.uni-body uni-actionsheet .uni-mask,
body.uni-body .uni-picker-container .uni-mask {
  z-index: 20000 !important;
  background: rgba(16, 24, 40, .52) !important;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

body.uni-body uni-modal .uni-modal {
  z-index: 20001 !important;
  width: min(calc(100vw - 32px), 332px) !important;
  max-width: 332px !important;
  max-height: calc(100vh - 32px) !important;
  max-height: calc(100dvh - 32px) !important;
  overflow: hidden !important;
  border: 1px solid var(--ww-line) !important;
  border-radius: 16px !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  box-shadow: var(--ww-shadow-float) !important;
}

body.uni-body uni-modal .uni-modal__hd {
  padding: 20px 20px 6px !important;
  line-height: normal !important;
}

body.uni-body uni-modal .uni-modal__title {
  color: var(--ww-text) !important;
  font-size: var(--ww-fs-title) !important;
  font-weight: 650 !important;
  line-height: 24px !important;
}

body.uni-body uni-modal .uni-modal__bd {
  max-height: min(45vh, 320px) !important;
  max-height: min(45dvh, 320px) !important;
  min-height: 22px !important;
  padding: 8px 22px 18px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  color: var(--ww-text-2) !important;
  font-size: var(--ww-fs-body) !important;
  font-weight: 400 !important;
  line-height: 21px !important;
  white-space: pre-line !important;
}

body.uni-body uni-modal .uni-modal__ft {
  min-height: 58px !important;
  padding: 0 14px 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  border-top: 0 !important;
  line-height: normal !important;
}

body.uni-body uni-modal .uni-modal__ft::after,
body.uni-body uni-modal .uni-modal__btn::after {
  display: none !important;
}

body.uni-body uni-modal .uni-modal__btn {
  min-width: 0 !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-size: var(--ww-fs-body) !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

body.uni-body uni-modal .uni-modal__btn_default {
  background: var(--ww-surface-soft) !important;
  color: var(--ww-text-2) !important;
}

body.uni-body uni-modal .uni-modal__btn_primary {
  background: var(--ww-brand-fill) !important;
  color: var(--ww-on-brand) !important;
  box-shadow: none !important;
}

body.uni-body uni-actionsheet .uni-actionsheet,
body.uni-body .uni-picker-container .uni-picker {
  left: 50% !important;
  right: auto !important;
  z-index: 20001 !important;
  width: min(100vw, var(--ww-shell-max)) !important;
  max-width: var(--ww-shell-max) !important;
  max-height: min(72dvh, 560px) !important;
  overflow: auto !important;
  border-radius: 20px 20px 0 0 !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  box-shadow: var(--ww-shadow-float) !important;
}

body.uni-body uni-actionsheet .uni-actionsheet__title,
body.uni-body uni-actionsheet .uni-actionsheet__cell,
body.uni-body .uni-picker-container .uni-picker-action {
  color: var(--ww-text) !important;
  font-size: var(--ww-fs-body) !important;
}

body.uni-body uni-toast .uni-toast {
  width: auto !important;
  min-width: 112px !important;
  max-width: min(calc(100vw - 32px), 360px) !important;
  min-height: 44px !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  background: rgba(22, 27, 35, .92) !important;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .22) !important;
}

body.uni-body uni-toast .uni-toast__content {
  margin: 0 !important;
  color: #fff !important;
  font-size: var(--ww-fs-body) !important;
  font-weight: 500 !important;
  line-height: 20px !important;
  white-space: normal !important;
}

/* Chat: fix 40/42px media conflict and align incoming content by its top edge. */
body.pages-chat-message uni-page[data-page="pages/chat/message"] .content .msg-list .row .other[data-v-64b2e45d] {
  align-items: flex-start !important;
}

body.pages-chat-message .content .msg-list .row .other > .left,
body.pages-chat-message .content .msg-list .row .my > .right {
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  overflow: hidden !important;
  border-radius: 11px !important;
}

body.pages-chat-message .content .msg-list .row .other > .left {
  align-self: flex-start !important;
  margin-top: 0 !important;
  margin-right: 9px !important;
}

body.pages-chat-message .content .msg-list .row .my > .right {
  margin-left: 7px !important;
}

body.pages-chat-message .content .msg-list .row .other > .left uni-image,
body.pages-chat-message .content .msg-list .row .my > .right uni-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: var(--ww-surface) !important;
  box-shadow: 0 2px 7px rgba(31, 52, 80, .12) !important;
}

body.pages-chat-message .content .msg-list .row .other > .left uni-image > div,
body.pages-chat-message .content .msg-list .row .other > .left uni-image > img,
body.pages-chat-message .content .msg-list .row .my > .right uni-image > div,
body.pages-chat-message .content .msg-list .row .my > .right uni-image > img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border-radius: inherit !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  object-fit: cover !important;
}

body.pages-chat-message .content uni-image:has(img[src*="wangwangshangliao-logo"]) > div {
  background-size: 74% auto !important;
}

body.pages-chat-message .content uni-image img[src*="wangwangshangliao-logo"] {
  object-fit: contain !important;
}

body.pages-chat-message .content .msg-list .row .other > .left uni-image[data-v-64b2e45d],
body.pages-chat-message .content .msg-list .row .my > .right uni-image[data-v-64b2e45d] {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  box-sizing: border-box !important;
}

body.pages-chat-message .content .msg-list .row .other > .left uni-image[data-v-64b2e45d] > div,
body.pages-chat-message .content .msg-list .row .other > .left uni-image[data-v-64b2e45d] > img,
body.pages-chat-message .content .msg-list .row .my > .right uni-image[data-v-64b2e45d] > div,
body.pages-chat-message .content .msg-list .row .my > .right uni-image[data-v-64b2e45d] > img {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

body.pages-chat-message .content .msg-list .read-state {
  margin-left: 4px !important;
  font-size: 10px !important;
  line-height: 14px !important;
}

/* Transfer feature: explicit px values prevent desktop upx expansion. */
body.pages-chat-message .feature-page {
  width: 100% !important;
  max-width: var(--ww-shell-max) !important;
  margin-inline: auto !important;
  background: var(--ww-bg) !important;
  color: var(--ww-text) !important;
}

body.pages-chat-message .feature-head {
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  border-bottom: 1px solid var(--ww-line) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
}

body.pages-chat-message .feature-back {
  width: 44px !important;
  height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 22px !important;
  font-size: 30px !important;
  line-height: 44px !important;
}

body.pages-chat-message .feature-head-title {
  font-size: var(--ww-fs-page) !important;
  font-weight: 650 !important;
  line-height: 26px !important;
}

body.pages-chat-message .feature-scroll.transfer-scroll {
  padding: 16px !important;
  box-sizing: border-box !important;
  background: var(--ww-bg) !important;
}

body.pages-chat-message .transfer-scroll .feature-profile,
body.pages-chat-message .transfer-scroll .transfer-card {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 12px !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--ww-line) !important;
  border-radius: var(--ww-radius-card) !important;
  background: var(--ww-surface) !important;
  box-shadow: var(--ww-shadow-card) !important;
}

body.pages-chat-message .transfer-scroll .feature-profile {
  min-height: 132px !important;
}

body.pages-chat-message .transfer-scroll .feature-profile > uni-image {
  width: 56px !important;
  height: 56px !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}

body.pages-chat-message .transfer-scroll .feature-profile-main {
  font-size: var(--ww-fs-body) !important;
  line-height: 22px !important;
}

body.pages-chat-message .transfer-scroll .feature-profile-name {
  font-size: var(--ww-fs-title) !important;
  font-weight: 650 !important;
  line-height: 24px !important;
}

body.pages-chat-message .transfer-scroll .feature-profile-id {
  color: var(--ww-text-3) !important;
  font-size: var(--ww-fs-meta) !important;
  line-height: 18px !important;
}

body.pages-chat-message .transfer-scroll .transfer-label {
  color: var(--ww-text) !important;
  font-size: var(--ww-fs-body) !important;
  font-weight: 600 !important;
  line-height: 20px !important;
}

body.pages-chat-message .transfer-scroll .amount-row {
  width: 100% !important;
  height: 58px !important;
  min-width: 0 !important;
  align-items: center !important;
  font-size: 32px !important;
  line-height: 40px !important;
}

body.pages-chat-message .transfer-scroll .currency {
  font-size: 30px !important;
  line-height: 40px !important;
}

body.pages-chat-message .transfer-scroll .amount-row uni-input,
body.pages-chat-message .transfer-scroll .amount-row .uni-input-wrapper,
body.pages-chat-message .transfer-scroll .amount-row .uni-input-input,
body.pages-chat-message .transfer-scroll .amount-row .uni-input-placeholder {
  min-width: 0 !important;
  height: 44px !important;
  font-size: 32px !important;
  line-height: 44px !important;
}

body.pages-chat-message .transfer-scroll .transfer-note,
body.pages-chat-message .transfer-scroll .transfer-note .uni-input-wrapper,
body.pages-chat-message .transfer-scroll .transfer-note .uni-input-input,
body.pages-chat-message .transfer-scroll .transfer-note .uni-input-placeholder {
  height: 46px !important;
  color: var(--ww-text-2) !important;
  font-size: var(--ww-fs-body) !important;
  line-height: 46px !important;
}

body.pages-chat-message .transfer-scroll .transfer-submit {
  width: 100% !important;
  height: 48px !important;
  margin: 12px 0 0 !important;
  border-radius: var(--ww-radius-control) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 48px !important;
  box-shadow: none !important;
}

body.pages-chat-message .transfer-scroll .risk-note {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 12px 0 0 !important;
  padding: 16px 20px 18px !important;
  box-sizing: border-box !important;
  border-radius: 12px !important;
  background: var(--ww-surface-soft) !important;
  color: var(--ww-text-3) !important;
  font-size: 13px !important;
  line-height: 22px !important;
}

body.pages-chat-message .transfer-scroll .risk-note > uni-view {
  height: auto !important;
  min-height: 0 !important;
  color: var(--ww-text-3) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 22px !important;
}

body.pages-chat-message .transfer-scroll .risk-note > .risk-title {
  margin-bottom: 4px !important;
  color: var(--ww-text-2) !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 22px !important;
}

/* Moments: constrain the desktop page, preserve image ratio, normalize text/tools. */
body.pages-push-circle #moments,
body.pages-push-circle_details #moments,
body.pages-push-circle_chat_details #moments {
  width: 100% !important;
  max-width: var(--ww-shell-max) !important;
  margin-inline: auto !important;
  padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box !important;
  background: var(--ww-bg) !important;
  color: var(--ww-text) !important;
}

body.pages-push-circle #moments .home-pic {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 2 / 1 !important;
  overflow: hidden !important;
}

body.pages-push-circle #moments .home-pic > uni-view:first-child,
body.pages-push-circle #moments .home-pic .my-avatar {
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  border-radius: 0 !important;
}

body.pages-push-circle #moments .my-avatar > div:first-child,
body.pages-push-circle #moments .home-pic uni-image > div:first-child,
body.pages-push-circle #moments .gallery_img > div:first-child,
body.pages-push-circle_details #moments .gallery_img > div:first-child,
body.pages-push-circle_chat_details #moments .gallery_img > div:first-child {
  width: 100% !important;
  height: 100% !important;
  background-position: center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

body.pages-push-circle #moments .my-avatar > img,
body.pages-push-circle #moments .home-pic uni-image > img,
body.pages-push-circle #moments .gallery_img > img,
body.pages-push-circle_details #moments .gallery_img > img,
body.pages-push-circle_chat_details #moments .gallery_img > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

body.pages-push-circle #moments .moments__post,
body.pages-push-circle_details #moments .moments__post,
body.pages-push-circle_chat_details #moments .moments__post {
  margin: 10px 12px !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  border: 1px solid var(--ww-line) !important;
  border-radius: 14px !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  box-shadow: var(--ww-shadow-card) !important;
}

body.pages-push-circle #moments .post_header,
body.pages-push-circle_details #moments .post_header,
body.pages-push-circle_chat_details #moments .post_header {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  overflow: hidden !important;
  border-radius: 12px !important;
}

body.pages-push-circle #moments .post-username,
body.pages-push-circle_details #moments .post-username,
body.pages-push-circle_chat_details #moments .post-username {
  color: var(--ww-text) !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 22px !important;
}

body.pages-push-circle #moments .paragraph,
body.pages-push-circle_details #moments .paragraph,
body.pages-push-circle_chat_details #moments .paragraph {
  color: var(--ww-text-2) !important;
  font-size: var(--ww-fs-body) !important;
  line-height: 22px !important;
}

body.pages-push-circle #moments .timestamp,
body.pages-push-circle_details #moments .timestamp,
body.pages-push-circle_chat_details #moments .timestamp {
  color: var(--ww-text-3) !important;
  font-size: var(--ww-fs-meta) !important;
  line-height: 18px !important;
}

body.pages-push-circle #moments .toolbar,
body.pages-push-circle_details #moments .toolbar,
body.pages-push-circle_chat_details #moments .toolbar {
  min-height: 40px !important;
}

body.pages-push-circle #moments .toolbar .like,
body.pages-push-circle #moments .toolbar .comment,
body.pages-push-circle_details #moments .toolbar .like,
body.pages-push-circle_details #moments .toolbar .comment,
body.pages-push-circle_chat_details #moments .toolbar .like,
body.pages-push-circle_chat_details #moments .toolbar .comment {
  width: 44px !important;
  height: 40px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.pages-push-circle #moments .toolbar .like,
body.pages-push-circle_details #moments .toolbar .like,
body.pages-push-circle_chat_details #moments .toolbar .like {
  right: 44px !important;
}

body.pages-push-circle #moments .toolbar .comment,
body.pages-push-circle_details #moments .toolbar .comment,
body.pages-push-circle_chat_details #moments .toolbar .comment {
  right: 0 !important;
}

body.pages-push-circle #moments .toolbar uni-image,
body.pages-push-circle_details #moments .toolbar uni-image,
body.pages-push-circle_chat_details #moments .toolbar uni-image {
  width: 40px !important;
  height: 40px !important;
  padding: 10px !important;
  box-sizing: border-box !important;
  object-fit: contain !important;
}

body.pages-push-circle #moments .liked,
body.pages-push-circle_details #moments .liked,
body.pages-push-circle_chat_details #moments .liked {
  width: 16px !important;
  height: 16px !important;
  margin-right: 5px !important;
}

body.pages-push-circle #moments .foot .footer,
body.pages-push-circle_details #moments .foot .footer,
body.pages-push-circle_chat_details #moments .foot .footer {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 7px 10px !important;
  box-sizing: border-box !important;
  border-top: 1px solid var(--ww-line) !important;
  background: var(--ww-surface) !important;
}

body.pages-push-circle #moments .foot,
body.pages-push-circle_details #moments .foot,
body.pages-push-circle_chat_details #moments .foot {
  left: 50% !important;
  right: auto !important;
  width: min(100vw, var(--ww-shell-max)) !important;
  max-width: var(--ww-shell-max) !important;
  transform: translateX(-50%) !important;
}

body.pages-push-circle #moments .foot .footer-center,
body.pages-push-circle_details #moments .foot .footer-center,
body.pages-push-circle_chat_details #moments .foot .footer-center {
  min-width: 0 !important;
  height: 44px !important;
  padding-left: 0 !important;
}

body.pages-push-circle #moments .foot .footer-right,
body.pages-push-circle_details #moments .foot .footer-right,
body.pages-push-circle_chat_details #moments .foot .footer-right {
  width: 76px !important;
  height: 44px !important;
  flex: 0 0 76px !important;
}

body.pages-push-circle #moments .foot .input-text,
body.pages-push-circle_details #moments .foot .input-text,
body.pages-push-circle_chat_details #moments .foot .input-text {
  max-height: 44px !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  background: var(--ww-surface-soft) !important;
  color: var(--ww-text) !important;
  font-size: 14px !important;
  line-height: 20px !important;
}

body.pages-push-circle #moments .foot .send-comment,
body.pages-push-circle_details #moments .foot .send-comment,
body.pages-push-circle_chat_details #moments .foot .send-comment {
  width: 68px !important;
  height: 44px !important;
  line-height: 44px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}

/* Settings: reduce decorative weight and keep panels/dialogs on the same scale. */
body.pages-set-index .settings-shell,
body.pages-set-index .settings-panel-shell {
  width: 100% !important;
  max-width: var(--ww-shell-max) !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  background: var(--ww-bg) !important;
}

body.pages-set-index .settings-page {
  background: var(--ww-bg) !important;
  color: var(--ww-text) !important;
}

body.pages-set-index .settings-hero,
body.pages-set-index .settings-panel-head,
body.pages-set-index .settings-card,
body.pages-set-index .preference-panel-card,
body.pages-set-index .preference-options-card {
  border-color: var(--ww-line) !important;
  border-radius: 14px !important;
  background: var(--ww-surface) !important;
  box-shadow: var(--ww-shadow-card) !important;
}

body.pages-set-index .settings-row,
body.pages-set-index .preference-setting-row,
body.pages-set-index .preference-option {
  min-height: 64px !important;
  padding: 10px 14px !important;
  box-sizing: border-box !important;
}

body.pages-set-index .settings-row-icon,
body.pages-set-index .preference-option-preview {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  line-height: 38px !important;
}

/* Keep the classic theme visually consistent instead of assigning a different
   decorative colour treatment to every settings row. */
body.pages-set-index .settings-row-icon {
  background: var(--ww-brand-soft) !important;
  color: var(--ww-brand) !important;
  box-shadow: none !important;
}

body.pages-set-index .account-action {
  height: 48px !important;
  min-height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  border-radius: 10px !important;
  font-size: var(--ww-fs-body) !important;
  font-weight: 600 !important;
  line-height: 20px !important;
}

body.pages-set-index .settings-brand-name,
body.pages-set-index .settings-panel-title {
  color: var(--ww-text) !important;
  font-size: var(--ww-fs-page) !important;
  line-height: 26px !important;
}

body.pages-set-index .settings-row-title,
body.pages-set-index .preference-setting-title,
body.pages-set-index .preference-option-title {
  color: var(--ww-text) !important;
  font-size: var(--ww-fs-title) !important;
  line-height: 24px !important;
}

body.pages-set-index .settings-account-summary,
body.pages-set-index .settings-panel-subtitle,
body.pages-set-index .settings-row-subtitle,
body.pages-set-index .preference-setting-desc,
body.pages-set-index .preference-option-desc,
body.pages-set-index .preference-panel-note {
  color: var(--ww-text-3) !important;
  font-size: var(--ww-fs-meta) !important;
  line-height: 18px !important;
}

body.pages-set-index .settings-dialog-layer {
  z-index: 20002 !important;
  padding: 16px !important;
}

body.pages-set-index .settings-dialog-mask {
  background: rgba(16, 24, 40, .52) !important;
}

body.pages-set-index .settings-dialog-card {
  width: min(calc(100vw - 32px), 360px) !important;
  max-height: calc(100vh - 32px) !important;
  max-height: calc(100dvh - 32px) !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  overflow: auto !important;
  border: 1px solid var(--ww-line) !important;
  border-radius: 16px !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  box-shadow: var(--ww-shadow-float) !important;
}

body.pages-set-index .settings-dialog-title {
  font-size: var(--ww-fs-title) !important;
  line-height: 24px !important;
}

body.pages-set-index .settings-dialog-content {
  color: var(--ww-text-2) !important;
  font-size: var(--ww-fs-body) !important;
  line-height: 21px !important;
}

body.pages-set-index .settings-dialog-button {
  min-height: 46px !important;
  border-radius: 10px !important;
  font-size: var(--ww-fs-body) !important;
}

/* Correct the real member-banner class names used by pages/my/index. */
body.pages-my-index .member-title {
  font-size: var(--ww-fs-page) !important;
  font-weight: 700 !important;
  line-height: 26px !important;
}

body.pages-my-index .member-subtitle,
body.pages-my-index .member-action {
  font-size: var(--ww-fs-label) !important;
  line-height: 20px !important;
}

/* Standalone pages share the same shell, palette and font tokens. */
body.ww-wallet-page,
body.ww-member-page,
body.ww-number-page,
body.ww-auto-page,
body.ww-scan-page,
body.ww-notice-system,
body.ww-notice-enterprise {
  margin: 0 !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  background: #eaf0f7 !important;
  color: var(--ww-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body.ww-wallet-page > .app,
body.ww-member-page > .app,
body.ww-auto-page > .app,
body.ww-number-page > .phone,
body.ww-notice-system > .page,
body.ww-notice-enterprise > main,
body.ww-notice-enterprise > .page {
  width: 100% !important;
  max-width: var(--ww-shell-max) !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
  background: var(--ww-bg) !important;
  color: var(--ww-text) !important;
}

@media (min-width: 700px) and (hover: hover) and (pointer: fine) {
  body.ww-wallet-page > .app,
  body.ww-member-page > .app,
  body.ww-auto-page > .app,
  body.ww-number-page > .phone,
  body.ww-notice-system > .page,
  body.ww-notice-enterprise > main,
  body.ww-notice-enterprise > .page {
    box-shadow: 0 0 34px rgba(31, 52, 80, .1) !important;
  }
}

body.ww-scan-page > #scanner {
  width: 100% !important;
  max-width: var(--ww-shell-max) !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
}

body.ww-notice-system > .head,
body.ww-notice-enterprise > .head {
  width: 100% !important;
  max-width: var(--ww-shell-max) !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
}

body.ww-notice-system > .page,
body.ww-notice-enterprise > main {
  min-height: calc(100vh - 54px) !important;
  min-height: calc(100dvh - 54px) !important;
}

/* Wallet standalone page. */
body.ww-wallet-page .hero {
  height: auto !important;
  min-height: 0 !important;
  padding-bottom: 16px !important;
  background: linear-gradient(135deg, #2f7df6, #357eea) !important;
}

body.ww-wallet-page .nav,
body.ww-wallet-page .sub-head .nav {
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
}

body.ww-wallet-page .sub-head {
  height: auto !important;
  min-height: 52px !important;
  box-sizing: border-box !important;
}

body.ww-wallet-page .back {
  width: 44px !important;
  height: 44px !important;
}

body.ww-wallet-page .title {
  font-size: var(--ww-fs-page) !important;
  font-weight: 650 !important;
  line-height: 26px !important;
}

body.ww-wallet-page .balance-card {
  width: auto !important;
  height: auto !important;
  min-height: 190px !important;
  margin: 4px 16px 0 !important;
  padding: 20px !important;
  border-radius: var(--ww-radius-card) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  box-shadow: var(--ww-shadow-card) !important;
}

body.ww-wallet-page .balance-label {
  font-size: var(--ww-fs-body) !important;
  line-height: 20px !important;
}

body.ww-wallet-page .balance {
  margin-top: 16px !important;
  font-size: 32px !important;
  line-height: 40px !important;
  letter-spacing: .12em !important;
}

body.ww-wallet-page .actions {
  height: auto !important;
  margin-top: 22px !important;
  gap: 12px !important;
}

body.ww-wallet-page .actions .action,
body.ww-wallet-page .submit {
  min-height: 48px !important;
  height: 48px !important;
  border-radius: var(--ww-radius-control) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 22px !important;
}

body.ww-wallet-page .content,
body.ww-wallet-page .sub-content {
  padding: 16px !important;
  box-sizing: border-box !important;
  background: var(--ww-bg) !important;
}

body.ww-wallet-page .card {
  border: 1px solid var(--ww-line) !important;
  border-radius: var(--ww-radius-card) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  box-shadow: var(--ww-shadow-card) !important;
}

body.ww-wallet-page .row {
  min-height: 58px !important;
  height: auto !important;
  padding: 10px 16px !important;
  box-sizing: border-box !important;
  border-color: var(--ww-line) !important;
  font-size: var(--ww-fs-body) !important;
  line-height: 22px !important;
}

body.ww-wallet-page .row-title {
  min-width: 0 !important;
  color: var(--ww-text) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 22px !important;
}

body.ww-wallet-page .row-note,
body.ww-wallet-page .summary-label,
body.ww-wallet-page .bill-time,
body.ww-wallet-page .account-meta {
  color: var(--ww-text-3) !important;
  font-size: var(--ww-fs-meta) !important;
  line-height: 18px !important;
}

body.ww-wallet-page .badge {
  font-size: var(--ww-fs-meta) !important;
  line-height: 18px !important;
}

body.ww-wallet-page .arrow {
  color: var(--ww-text-3) !important;
  font-size: 20px !important;
  line-height: 22px !important;
}

body.ww-wallet-page .field label,
body.ww-wallet-page .pin-label,
body.ww-wallet-page .section-title,
body.ww-wallet-page .bill-title,
body.ww-wallet-page .account-type {
  color: var(--ww-text-2) !important;
  font-size: var(--ww-fs-body) !important;
  line-height: 20px !important;
}

body.ww-wallet-page input:not(.pin),
body.ww-wallet-page select,
body.ww-wallet-page textarea {
  min-height: 46px !important;
  border-color: var(--ww-line) !important;
  border-radius: 10px !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  font-size: 14px !important;
}

body.ww-wallet-page .pin {
  height: 54px !important;
  box-sizing: border-box !important;
  border-color: var(--ww-line) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  font-size: 26px !important;
  line-height: 52px !important;
}

/* Member-center standalone page. */
body.ww-member-page > .app {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  overflow-x: hidden !important;
}

body.ww-member-page .hero {
  height: auto !important;
  min-height: 238px !important;
  padding: 16px 16px 22px !important;
  border-radius: 0 0 36px 12px / 0 0 20px 8px !important;
  background: linear-gradient(135deg, #167bd3 0%, #397fe0 58%, #748ce6 100%) !important;
}

body.ww-member-page .nav {
  height: 52px !important;
  min-height: 52px !important;
}

body.ww-member-page .back {
  width: 44px !important;
  height: 44px !important;
}

body.ww-member-page .title {
  font-size: var(--ww-fs-page) !important;
  line-height: 26px !important;
}

body.ww-member-page .user-card {
  min-height: 88px !important;
  height: auto !important;
  margin-top: 8px !important;
  padding: 14px 16px !important;
  border-radius: var(--ww-radius-card) !important;
}

body.ww-member-page .avatar {
  width: 56px !important;
  height: 56px !important;
  flex: 0 0 56px !important;
  object-fit: cover !important;
}

body.ww-member-page .user-name {
  font-size: var(--ww-fs-title) !important;
  line-height: 24px !important;
}

body.ww-member-page .user-id,
body.ww-member-page .user-desc {
  font-size: var(--ww-fs-meta) !important;
  line-height: 18px !important;
}

body.ww-member-page .body {
  padding: 16px !important;
}

body.ww-member-page .benefits {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px 8px !important;
}

body.ww-member-page .benefit {
  min-width: 0 !important;
  min-height: 72px !important;
}

body.ww-member-page .benefit-icon {
  width: 46px !important;
  height: 46px !important;
  font-size: 22px !important;
  line-height: 46px !important;
}

body.ww-member-page .benefit-name {
  min-height: 36px !important;
  display: -webkit-box !important;
  overflow: hidden !important;
  color: var(--ww-vip) !important;
  font-size: var(--ww-fs-label) !important;
  line-height: 18px !important;
  text-align: center !important;
  white-space: normal !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
}

body.ww-member-page .vip-panel {
  height: auto !important;
  margin-top: 16px !important;
  padding: 16px !important;
  border: 1px solid var(--ww-line) !important;
  border-radius: var(--ww-radius-card) !important;
  background: var(--ww-surface) !important;
  box-shadow: var(--ww-shadow-card) !important;
}

body.ww-member-page .plans {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.ww-member-page .plan {
  min-width: 0 !important;
  min-height: 158px !important;
  height: auto !important;
  padding: 14px 12px 12px !important;
  border-color: var(--ww-line) !important;
  border-radius: 14px !important;
  background: var(--ww-surface-soft) !important;
  box-shadow: none !important;
}

body.ww-member-page .plan.selected {
  border-color: var(--ww-vip) !important;
  background: var(--ww-vip-soft) !important;
}

body.ww-member-page .lines {
  height: auto !important;
  color: var(--ww-text-2) !important;
  font-size: var(--ww-fs-label) !important;
  line-height: 19px !important;
}

body.ww-member-page .plan-name {
  color: var(--ww-vip) !important;
  font-size: var(--ww-fs-title) !important;
  line-height: 22px !important;
}

body.ww-member-page .price {
  min-height: 38px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  justify-content: center !important;
  color: var(--ww-vip) !important;
  font-size: var(--ww-fs-label) !important;
  line-height: 19px !important;
  white-space: normal !important;
}

body.ww-member-page .history {
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: var(--ww-fs-meta) !important;
}

body.ww-member-page .purchase-wrap {
  left: 50% !important;
  right: auto !important;
  width: min(100vw, var(--ww-shell-max)) !important;
  max-width: var(--ww-shell-max) !important;
  min-height: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  box-sizing: border-box !important;
  background: var(--ww-surface) !important;
  transform: translateX(-50%) !important;
}

body.ww-member-page .purchase {
  width: 100% !important;
  height: 48px !important;
  border-radius: var(--ww-radius-control) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 48px !important;
}

body.ww-member-page .overlay,
body.ww-member-page .dialog-layer {
  background: rgba(16, 24, 40, .52) !important;
}

body.ww-member-page .sheet,
body.ww-member-page .records-sheet {
  width: min(100vw, var(--ww-shell-max)) !important;
  max-width: var(--ww-shell-max) !important;
  max-height: min(72dvh, 560px) !important;
  min-height: 0 !important;
  overflow: auto !important;
  border-radius: 20px 20px 0 0 !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
}

body.ww-member-page .dialog {
  width: min(calc(100vw - 32px), 360px) !important;
  max-width: 360px !important;
  max-height: calc(100vh - 32px) !important;
  max-height: calc(100dvh - 32px) !important;
  overflow: auto !important;
  border-radius: 16px !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
}

body.ww-member-page .dialog-title,
body.ww-member-page .sheet-title,
body.ww-member-page .panel-title {
  font-size: var(--ww-fs-title) !important;
  line-height: 24px !important;
}

body.ww-member-page .confirm,
body.ww-member-page .recharge,
body.ww-member-page .dialog-actions button {
  min-height: 48px !important;
  border-radius: 10px !important;
  font-size: var(--ww-fs-body) !important;
}

@media (max-width: 359px) {
  body.ww-member-page .hero,
  body.ww-member-page .body,
  body.ww-wallet-page .content,
  body.ww-wallet-page .sub-content {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.ww-member-page .plans {
    grid-template-columns: 1fr !important;
  }
}

/* Other active standalone tools: shared shell and restrained classic controls. */
body.ww-number-page .title,
body.ww-auto-page :where(.top-title, .editor-title, .master-title),
body.ww-notice-system :where(.head, .overview-title, .state-title),
body.ww-notice-enterprise :where(.intro, .section-title, .contact-title) {
  color: var(--ww-text) !important;
  font-size: var(--ww-fs-page) !important;
  line-height: 26px !important;
}

body.ww-number-page :where(.muted, .tip, .pill),
body.ww-auto-page :where(.brand-sub, .master-sub, .counter, .notice),
body.ww-notice-system :where(.meta, .time, .state-text),
body.ww-notice-enterprise :where(.eyebrow, .summary, .service-desc, .contact-text, .footnote) {
  color: var(--ww-text-3) !important;
  font-size: var(--ww-fs-meta) !important;
  line-height: 18px !important;
}

body.ww-number-page :where(.item, .record, .sheet),
body.ww-auto-page :where(.editor, .master, .rule),
body.ww-scan-page :where(.permission, .result),
body.ww-notice-system :where(.overview, .item, .state),
body.ww-notice-enterprise :where(.service-panel, .contact-box) {
  border-color: var(--ww-line) !important;
  border-radius: var(--ww-radius-card) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  box-shadow: var(--ww-shadow-card) !important;
}

body.ww-number-page :where(.buy, .cancel, .record, .sort, .pill, #searchBtn),
body.ww-auto-page :where(.btn, .save, .cancel, .add),
body.ww-scan-page :where(.result-btn, .retry) {
  min-height: 44px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  line-height: 20px !important;
}

body.ww-number-page .pill.active {
  border-color: var(--ww-brand-fill) !important;
  background: var(--ww-brand-fill) !important;
  color: var(--ww-on-brand) !important;
}

body.ww-number-page :where(input, textarea, select),
body.ww-auto-page :where(input, textarea, select) {
  min-height: 44px !important;
  border-color: var(--ww-line) !important;
  border-radius: 10px !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
  font-size: 14px !important;
}

body.ww-number-page .big {
  color: var(--ww-text) !important;
  font-size: 30px !important;
  line-height: 38px !important;
}

body.ww-number-page .price {
  color: var(--ww-brand-strong) !important;
  font-size: var(--ww-fs-body) !important;
  line-height: 21px !important;
}

body.ww-scan-page :where(.title, .status-title, .action-text) {
  color: #fff !important;
}

body.ww-scan-page .title {
  font-size: var(--ww-fs-page) !important;
  line-height: 26px !important;
}

body.ww-scan-page .status-title {
  font-size: var(--ww-fs-title) !important;
  line-height: 24px !important;
}

body.ww-scan-page :where(.status-copy, .action-text) {
  color: rgba(255, 255, 255, .8) !important;
  font-size: var(--ww-fs-meta) !important;
  line-height: 18px !important;
}

body.ww-scan-page .result :where(.result-label, .result-value) {
  color: var(--ww-text) !important;
}

body.ww-scan-page .result-label {
  font-size: var(--ww-fs-label) !important;
  line-height: 20px !important;
}

body.ww-scan-page .result-value {
  font-size: var(--ww-fs-body) !important;
  line-height: 22px !important;
}

/* Dark surfaces for all added components; media is never inverted. */
html[data-ww-resolved-theme="dark"] body.uni-body,
html[data-ww-resolved-theme="dark"] body.uni-body uni-app,
html[data-ww-resolved-theme="dark"] body.uni-body uni-page,
html[data-ww-resolved-theme="dark"] body.uni-body uni-page-body,
html[data-ww-resolved-theme="dark"] body.uni-body .feature-page,
html[data-ww-resolved-theme="dark"] body.ww-wallet-page,
html[data-ww-resolved-theme="dark"] body.ww-member-page,
html[data-ww-resolved-theme="dark"] body.ww-number-page,
html[data-ww-resolved-theme="dark"] body.ww-auto-page,
html[data-ww-resolved-theme="dark"] body.ww-scan-page,
html[data-ww-resolved-theme="dark"] body.ww-notice-system,
html[data-ww-resolved-theme="dark"] body.ww-notice-enterprise {
  background: var(--ww-bg) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .content,
html[data-ww-resolved-theme="dark"] body.pages-chat-message .content .msg-list,
html[data-ww-resolved-theme="dark"] body.pages-chat-message .chat-input-modern,
html[data-ww-resolved-theme="dark"] body.pages-chat-message .chat-input-modern .textbox .box {
  border-color: var(--ww-line) !important;
  background: var(--ww-bg) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .chat-input-modern,
html[data-ww-resolved-theme="dark"] body.pages-chat-message .chat-input-modern .textbox .box {
  background: var(--ww-surface) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .input-box.chat-input-modern[data-v-64b2e45d],
html[data-ww-resolved-theme="dark"] body.pages-chat-message .input-box.chat-input-modern[data-v-64b2e45d] .textbox,
html[data-ww-resolved-theme="dark"] body.pages-chat-message .input-box.chat-input-modern[data-v-64b2e45d] .text-mode,
html[data-ww-resolved-theme="dark"] body.pages-chat-message .input-box.chat-input-modern[data-v-64b2e45d] .box {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .input-box.chat-input-modern[data-v-64b2e45d] textarea.uni-textarea-textarea,
html[data-ww-resolved-theme="dark"] body.pages-chat-message .input-box.chat-input-modern[data-v-64b2e45d] .uni-textarea-placeholder {
  background: transparent !important;
  color: var(--ww-text-2) !important;
  -webkit-text-fill-color: var(--ww-text-2) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .msg-list .other[data-v-64b2e45d] .bubble[data-v-64b2e45d]:not(.red-envelope):not(.rp-chat-card) {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .msg-list .my[data-v-64b2e45d] .bubble[data-v-64b2e45d]:not(.red-envelope):not(.rp-chat-card) {
  background: var(--ww-brand-fill) !important;
  color: var(--ww-on-brand) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .pay-mask .pay-panel {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .pay-mask :where(.pay-title, .pay-amount, .pay-dot, .pay-key) {
  border-color: var(--ww-line) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .pay-mask :where(.pay-dots, .pay-keys, .pay-key-blank) {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface-soft) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message .pay-mask .pay-key {
  background: var(--ww-surface) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-notice-system > .head,
html[data-ww-resolved-theme="dark"] body.ww-notice-enterprise > .head {
  border-color: var(--ww-line) !important;
  background: rgba(24, 34, 54, .96) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-number-page > .phone,
html[data-ww-resolved-theme="dark"] body.ww-number-page :where(header, .banner, .tabs, .search, .content, .item, .order, .sheet, .pill),
html[data-ww-resolved-theme="dark"] body.ww-auto-page :where(.topbar, .content, .editor, .master, .rule, .empty, .notice, .blocked),
html[data-ww-resolved-theme="dark"] body.ww-wallet-page :where(.content, .sub-content, .card, .summary-box),
html[data-ww-resolved-theme="dark"] body.ww-member-page :where(.body, .vip-panel, .plan, .sheet, .dialog) {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-number-page :where(.digits, .digit),
html[data-ww-resolved-theme="dark"] body.ww-scan-page :where(.result, .result-value) {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface-soft) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-number-page :where(input, textarea, select),
html[data-ww-resolved-theme="dark"] body.ww-auto-page :where(input, textarea, select),
html[data-ww-resolved-theme="dark"] body.ww-wallet-page :where(input, textarea, select) {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface-soft) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-wallet-page .actions .action:not(.primary) {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface-soft) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-member-page .history {
  border-color: var(--ww-vip) !important;
  background: var(--ww-surface-soft) !important;
  color: var(--ww-vip) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-member-page .dialog-actions button {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface-soft) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-member-page .dialog-actions button:last-child {
  border-color: var(--ww-brand-fill) !important;
  background: var(--ww-brand-fill) !important;
  color: var(--ww-on-brand) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-number-page .round,
html[data-ww-resolved-theme="dark"] body.ww-auto-page .back {
  border-color: var(--ww-line) !important;
  background: rgba(255, 255, 255, .08) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-notice-system > .head .back,
html[data-ww-resolved-theme="dark"] body.ww-notice-enterprise > .head .back {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.ww-member-page .plan.selected {
  border-color: var(--ww-vip) !important;
  background: var(--ww-vip-soft) !important;
}

html[data-ww-resolved-theme="dark"] img,
html[data-ww-resolved-theme="dark"] uni-image {
  forced-color-adjust: none;
}

/* Keep legacy chat bubbles and their tails on the same dark surface. */
html[data-ww-resolved-theme="dark"] body.pages-chat-message uni-page[data-page="pages/chat/message"] .content .msg-list .row .other .right .bubble[data-v-64b2e45d]:not(.red-envelope):not(.rp-chat-card) {
  border-color: var(--ww-line) !important;
  background: var(--ww-surface) !important;
  color: var(--ww-text) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message uni-page[data-page="pages/chat/message"] .content .msg-list .row .other .right .bubble[data-v-64b2e45d]:not(.img):not(.voice):not(.red-envelope):not(.rp-chat-card)::after {
  background: var(--ww-surface) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message uni-page[data-page="pages/chat/message"] .content .msg-list .row .my .left .bubble[data-v-64b2e45d]:not(.red-envelope):not(.rp-chat-card) {
  border-color: transparent !important;
  background: var(--ww-brand-fill) !important;
  color: var(--ww-on-brand) !important;
}

html[data-ww-resolved-theme="dark"] body.pages-chat-message uni-page[data-page="pages/chat/message"] .content .msg-list .row .my .left .bubble[data-v-64b2e45d]:not(.img):not(.voice):not(.red-envelope):not(.rp-chat-card)::after {
  background: var(--ww-brand-fill) !important;
}

@media (max-width: 359px) {
  body.pages-chat-message .content .msg-list .row .my .left .bubble.red-envelope.rp-chat-card,
  body.pages-chat-message .content .msg-list .row .other .right .bubble.red-envelope.rp-chat-card {
    width: calc(100vw - 92px) !important;
    max-width: 240px !important;
    padding: 11px !important;
  }

  body.pages-chat-message .rp-chat-card .rp-card-icon {
    flex-basis: 44px !important;
    width: 44px !important;
    height: 44px !important;
    margin-right: 8px !important;
  }

  body.pages-chat-message .rp-chat-card .rp-card-blessing {
    max-width: 92px !important;
    font-size: 14px !important;
  }

  body.pages-chat-message .rp-chat-card .rp-card-open {
    min-width: 36px !important;
    margin-left: 5px !important;
    padding: 0 8px !important;
  }
}
