/* Shared application theme. Light mode deliberately keeps the original palette. */
.theme-toggle { flex: 0 0 auto; position: relative; }
.theme-toggle svg { width: 22px; height: 22px; pointer-events: none; }
.theme-toggle .theme-toggle-sun { display: none; }
.theme-toggle .theme-toggle-moon { display: block; }
html[data-theme="dark"] .theme-toggle .theme-toggle-sun { display: block; }
html[data-theme="dark"] .theme-toggle .theme-toggle-moon { display: none; }
.theme-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 420px) {
  .site-header .header-actions { gap: 4px; }
  .site-header .header-actions :is(.mobile-header-promo, .growth-entry-mobile) { padding-inline: 6px; font-size: 9px; }
  .site-header .header-actions :is(.mobile-header-promo, .growth-entry-mobile) img { width: 17px; height: 17px; }
}
@media (max-width: 359px) {
  .site-header .brand small { display: none; }
  .site-header .brand { gap: 5px; }
  .site-header .brand strong { font-size: 12px; }
  .site-header .header-actions :is(.mobile-header-promo, .growth-entry-mobile) span { display: none; }
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101722;
  --surface: #182230;
  --surface-2: #202d3d;
  --surface-3: #29384b;
  --text: #e7edf6;
  --muted: #a9b6c8;
  --line: rgba(166, 187, 213, .2);
  --line-strong: rgba(166, 187, 213, .36);
  --accent: #50d2bf;
  --accent-strong: #75e6d1;
  --accent-soft: rgba(80, 210, 191, .13);
  --amber: #f1c275;
  --amber-soft: rgba(241, 194, 117, .13);
  --red: #ff91a0;
  --red-soft: rgba(255, 118, 143, .13);
  --blue: #91c8ff;
  --blue-soft: rgba(112, 177, 250, .14);
  --purple: #d5b6ff;
  --purple-soft: rgba(190, 139, 249, .14);
  --shadow: 0 20px 55px rgba(0, 0, 0, .28);
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, .18);
  --header: rgba(20, 29, 42, .96);
  --ink: var(--text);
  --navy: #244058;
  --brand: var(--accent-strong);
  --accent-deep: var(--accent-strong);
  --teal: var(--accent-strong);
  --cyan2: var(--accent);
  background: var(--bg);
}

html[data-theme="dark"] body {
  background-color: var(--bg);
  color: var(--text);
  /* Some page styles redeclare legacy aliases on body. */
  --ink: var(--text);
  --brand: var(--accent-strong);
  --accent-deep: var(--accent-strong);
  --teal: var(--accent-strong);
  --cyan2: var(--accent);
}
html[data-theme="dark"] ::selection { background: #356b72; color: #fff; }
html[data-theme="dark"] :focus-visible { outline-color: var(--accent); }
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select { color-scheme: dark; accent-color: var(--accent); }
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="file"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color: var(--surface-2);
  color: var(--text);
  border-color: var(--line-strong);
  caret-color: var(--accent);
}
html[data-theme="dark"] :is(input, textarea)::placeholder { color: #9aa9bd; opacity: 1; }
html[data-theme="dark"] :is(input, textarea, select):disabled {
  background-color: #1d2735;
  color: #8998ad;
  border-color: var(--line);
}
html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset;
  caret-color: var(--accent);
}
html[data-theme="dark"] option { background: var(--surface); color: var(--text); }

/* Navigation, popovers, shared cards and forms use the same surfaces. */
html[data-theme="dark"] :is(.site-header, .mobile-nav) { background: var(--header); }
html[data-theme="dark"] :is(
  .category-panel, .category-drawer, .member-menu-panel, .desktop-notification-popover,
  .product-card, .product-purchase-card, .product-description, .purchase-panel,
  .query-panel, .query-result, .account-panel, .auth-panel, .member-panel,
  .member-sidebar, .content-panel, .task-card, .task-record, .store-product-card,
  .store-dashboard-stats article, .agent-store-product, .modal-panel, .modal-card,
  .member-order-modal-card, .registration-captcha-dialog, .copy-value-dialog,
  .store-coupon-dialog, .ticket-image-viewer-panel, .legal-documents-panel,
  .legal-documents-footer, .ticket-image-viewer-panel > footer
) { background-color: var(--surface); color: var(--text); border-color: var(--line); }
html[data-theme="dark"] :is(.search-field, .query-input-shell, .member-home-invite > div) {
  background: var(--surface);
  border-color: var(--line);
}
html[data-theme="dark"] :is(.search-field input, .query-input-shell input, .query-input-shell > textarea) {
  background: transparent !important;
}
/* The order reference is a one-line textarea inside a single focusable surface. */
html[data-theme="dark"] .query-input-shell > textarea {
  color: var(--text);
  border: 0;
  caret-color: var(--accent);
}
html[data-theme="dark"] .query-input-shell > textarea::placeholder { color: var(--muted); }
html[data-theme="dark"] .query-input-shell > textarea:disabled { color: #8998ad; }
html[data-theme="dark"] .query-input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
html[data-theme="dark"] :is(.query-input-shell, .query-security-note, .query-cache-summary) > img,
html[data-theme="dark"] .query-input-shell [data-query-paste] > img { display: none; }
html[data-theme="dark"] :is(.query-input-shell, .query-security-note, .query-cache-summary)::before,
html[data-theme="dark"] .query-input-shell [data-query-paste]::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
  color: var(--muted);
  pointer-events: none;
  -webkit-mask: url('/assets/svg-v2-20260917/query-search.svg') center / contain no-repeat;
  mask: url('/assets/svg-v2-20260917/query-search.svg') center / contain no-repeat;
}
html[data-theme="dark"] .query-input-shell [data-query-paste]::before {
  width: 21px;
  height: 21px;
  -webkit-mask-image: url('/assets/svg-v2-20260917/query-paste.svg');
  mask-image: url('/assets/svg-v2-20260917/query-paste.svg');
}
html[data-theme="dark"] .query-input-shell [data-query-paste]:is(:hover, :focus-visible)::before { color: var(--accent-strong); }
html[data-theme="dark"] :is(.query-security-note, .query-cache-summary)::before {
  -webkit-mask-image: url('/assets/svg-v2-20260917/security-support.svg');
  mask-image: url('/assets/svg-v2-20260917/security-support.svg');
}
html[data-theme="dark"] .query-security-note::before { width: 18px; height: 18px; flex: 0 0 18px; }
html[data-theme="dark"] .query-cache-summary::before { width: 26px; height: 26px; }
html[data-theme="dark"] .site-header .mobile-account-entry.is-authenticated .mobile-account-menu-icon { display: none; }
html[data-theme="dark"] .site-header .mobile-account-entry.is-authenticated::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background: var(--muted);
  -webkit-mask: url('/assets/svg-v2-20260917/member-menu.svg') center / contain no-repeat;
  mask: url('/assets/svg-v2-20260917/member-menu.svg') center / contain no-repeat;
}
html[data-theme="dark"] .site-header .mobile-account-entry.is-authenticated:is(:hover, :focus-visible, [aria-expanded="true"])::before { background: var(--accent-strong); }
html[data-theme="dark"] :is(.icon-button, .account-entry, .secondary-button, .share-store-button) {
  background-color: var(--surface);
  border-color: var(--line-strong);
}
html[data-theme="dark"] :is(.icon-button, .account-entry):hover {
  background-color: var(--surface-2);
  color: var(--accent-strong);
}
html[data-theme="dark"] :is(.modal-backdrop, .member-menu-backdrop, .category-drawer-backdrop, .growth-modal) {
  background: rgba(2, 7, 15, .76);
}
html[data-theme="dark"] :is(dialog, .copy-value-dialog, .registration-captcha-dialog)::backdrop {
  background: rgba(2, 7, 15, .76);
}
html[data-theme="dark"] :is(.site-footer, .mobile-nav, .modal-panel footer, .member-order-modal-card > footer) {
  border-color: var(--line);
}
html[data-theme="dark"] .site-footer { background-color: var(--surface); }
html[data-theme="dark"] :is(.prose, .rich-prose, .legal-documents-content) { color: var(--text); }
html[data-theme="dark"] :is(.prose, .rich-prose, .legal-documents-content) a { color: var(--blue); }
html[data-theme="dark"] :is(.prose, .rich-prose) :is(blockquote, pre, code) {
  background-color: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}
html[data-theme="dark"] :is(th, td) { border-color: var(--line); }
html[data-theme="dark"] :is(.table-wrap, .table-wrapper, .member-table, .purchase-history-table) thead {
  background-color: var(--surface-2);
  color: var(--muted);
}

/* Keep brand art and payment codes intact. Their small white pads aid recognition. */
html[data-theme="dark"] .brand-mark { background-color: #edf2f7; box-shadow: 0 5px 18px rgba(0, 0, 0, .2); }
html[data-theme="dark"] .product-icon img { background-color: #edf2f7; }
html[data-theme="dark"] :is(.payment-qr-code, .douyin-qr-image) { background-color: #fff; }
html[data-theme="dark"] .payment-qr-code { border-color: #fff; }
html[data-theme="dark"] .payment-qr-code > [data-payment-qr-logo] { background: #fff; }
html[data-theme="dark"] .product-icon { background: var(--surface-3); }
html[data-theme="dark"] .product-subtitle-tone-2 { background: var(--blue-soft) !important; color: var(--blue) !important; }
html[data-theme="dark"] .product-subtitle-tone-3 { background: var(--amber-soft) !important; color: var(--amber) !important; }
html[data-theme="dark"] .purchase-tags .share-pill { background: var(--blue-soft); color: var(--blue); }
html[data-theme="dark"] .product-card::before { background: rgba(80, 210, 191, .09); }
html[data-theme="dark"] :is(.product-card:hover, .category-item.active, .category-item:hover) { border-color: rgba(80, 210, 191, .38); }
html[data-theme="dark"] .primary-button { background: linear-gradient(135deg, #50d2bf, #8ce4d6); color: #082a29; }
html[data-theme="dark"] .primary-button:disabled { background: var(--surface-3); color: var(--muted); box-shadow: none; }
html[data-theme="dark"] .product-order-form input[name="contact"],
html[data-theme="dark"] .session-form input,
html[data-theme="dark"] .session-form textarea { background: var(--surface-2) !important; color: var(--text) !important; }
html[data-theme="dark"] body[data-page="product"] .product-order-form input.guest-email-contact-input::placeholder { color: var(--muted); }
html[data-theme="dark"] :is(.captcha-row button, .registration-captcha-row button, .checkout-captcha-row > button) {
  background: var(--surface-2);
  border-color: var(--line-strong);
}
html[data-theme="dark"] .checkout-captcha { background: var(--surface-2); border-color: var(--line); }
html[data-theme="dark"] .payment-loading-overlay { background: rgba(2, 7, 15, .75); }

/* Shared information, warning and error states retain distinct meaning. */
html[data-theme="dark"] :is(
  .address-order-summary, .address-registration-card, .address-preview-mode .address-registration-card,
  .invoice-request-fixed, .invoice-merge-list, .region-upgrade-pair > span,
  .account-tools-password-warning .account-tools-password-flow,
  .member-order-delivery-actions > footer button,
  .member-order-actions .secondary, .after-sale-reason-field > small,
  .after-sale-preview > p, .after-sale-preview article,
  .after-sale-upload > header label span, .withdrawal-account-list > article,
  .withdrawal-account-summary, .withdrawal-account-picker > label, .withdrawal-qr-upload > div
) { background: var(--surface-2); color: var(--text); border-color: var(--line); }
html[data-theme="dark"] :is(
  .invoice-merge-order, #order-invoice-request-form > footer, .guest-ticket-order-grid label,
  .ticket-order-picker-open, .ticket-order-picker-selected.has-selection, .ticket-order-picker-option,
  .coupon-reward-inline-notice, .query-access-required, .member-secondary-button,
  .record-pagination button, .record-pagination select, .record-pagination input,
  .withdrawal-account-list > article button
) {
  background: var(--surface);
  border-color: var(--line);
}
html[data-theme="dark"] .ticket-order-picker-selected:not(.has-selection) {
  background: var(--surface-2);
  border-color: var(--line-strong);
}
html[data-theme="dark"] .ticket-order-picker-selected > p { color: var(--muted); font-size: 12px; line-height: 1.6; }
html[data-theme="dark"] .ticket-order-picker-selected.has-selection { border-color: var(--accent); }
html[data-theme="dark"] :is(.ticket-order-picker-open, .ticket-order-picker-option):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
html[data-theme="dark"] :is(.ticket-attachments > label > span, .ticket-image-button > span) > img { display: none; }
html[data-theme="dark"] :is(.ticket-attachments > label > span, .ticket-image-button > span) { color: var(--text); }
html[data-theme="dark"] :is(.ticket-attachments > label > span, .ticket-image-button > span)::before {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background: currentColor;
  -webkit-mask: url('/assets/svg-v2-20260917/image-upload-icon.svg') center / contain no-repeat;
  mask: url('/assets/svg-v2-20260917/image-upload-icon.svg') center / contain no-repeat;
}
html[data-theme="dark"] :is(
  .address-registration-result, .address-registration-result.preview, .invoice-payment-choice:has(input:checked),
  .invoice-merge-order.primary, .invoice-merge-select-all, .invoice-request-notice.is-issued,
  .address-registration-result.success, .address-registration-complete,
  .best-price-note, .order-saving, .member-coupon-rules span, .store-product-manager form button,
  .region-upgrade-help .region-upgrade-guide, .store-composite-variants, .status-available,
  .task-tags span.task-limit-ok, .growth-modal-card .growth-benefit-highlight,
  .store-coupon-nav-entry, .store-coupon-mobile-entry, .store-coupon-dialog button,
  .store-navigation-retry, .guest-ticket-order-state.is-matched, .ticket-order-picker-option:hover,
  .ticket-order-picker-option.selected, .order-product-snapshot, .order-product-snapshot-badges i,
  .withdrawal-account-picker > label:has(input:checked), .withdrawal-account-count
) { background: var(--accent-soft); border-color: rgba(80, 210, 191, .32); color: var(--accent-strong); }
html[data-theme="dark"] :is(
  .payment-risk-tip, .submission-limit-note, .invoice-request-notice, .invoice-minimum-status,
  .product-login-required, .account-tools-result.is-warning, .account-tools-refresh-login-note,
  .store-dashboard-notice, .store-api-secret-output, .store-api-balance-rule,
  .query-agent-order-note, .after-sale-previous-note, .redemption-challenge-panel,
  .newcomer-checkout-hint, .checkout-coupon-selector, .order-product-snapshot-warning
) { background: var(--amber-soft); border-color: rgba(241, 194, 117, .32); color: var(--amber); }
html[data-theme="dark"] :is(
  .payment-risk-tip b, .submission-limit-note b, .invoice-request-notice b,
  .invoice-minimum-status b, .product-login-required span,
  .account-tools-result.is-warning > header h2, .account-tools-refresh-login-note b,
  .store-dashboard-notice span, .store-api-secret-output > b, .store-api-balance-rule b,
  .store-api-balance-rule span, .query-agent-order-note b, .after-sale-previous-note b,
  .after-sale-previous-note p, .store-profile-price-note, .member-agent-order-actions small,
  .checkout-success-heading > em, .mobile-payment-handoff-panel .mobile-payment-handoff-notice
) { color: var(--amber); }
html[data-theme="dark"] .checkout-success-heading > em { background: var(--amber-soft); }
html[data-theme="dark"] :is(.account-tools-result.is-warning > header > span, .store-dashboard-notice b) {
  background: rgba(241, 194, 117, .2);
  color: var(--amber);
}
html[data-theme="dark"] :is(
  .address-registration-result.error, .task-tags span.task-limit-reached,
  .account-tools-password-warning, .invoice-loading-state.is-error,
  .store-api-key-list article > button, .has-region-mismatch #plus-status-icon,
  .guest-ticket-order-state.is-error, .order-product-snapshot-warning.is-invalid,
  .member-agent-checkout .member-agent-purchase-warning
) { background: var(--red-soft); color: var(--red); border-color: rgba(255, 145, 160, .32); }
html[data-theme="dark"] :is(.account-tools-password-warning strong, .member-refund-amount, .member-refund-status, .query-refund-line) { color: var(--red); }
html[data-theme="dark"] .account-tools-security code { background: var(--surface-3); color: var(--red); }
html[data-theme="dark"] :is(.task-action button:disabled, .member-push-card button:disabled, #register-form input[name="referral_code"]:disabled) {
  background: var(--surface-3); color: #97a7ba; border-color: var(--line); box-shadow: none;
}
html[data-theme="dark"] .status-answered { background: var(--blue-soft); color: var(--blue); }
html[data-theme="dark"] .member-table .credit { color: #81ddaa; }
html[data-theme="dark"] .member-bonus-list :is(span, button) { background: var(--purple-soft); border-color: rgba(213, 182, 255, .25); color: var(--purple); }
html[data-theme="dark"] .customer-service-status.is-online { color: #81ddaa; }
html[data-theme="dark"] .customer-service-status.is-away { color: var(--amber); }
html[data-theme="dark"] .customer-service-status.is-offline { color: var(--muted); }

/* Warm promotions are subdued, rather than left as bright white/yellow panels. */
html[data-theme="dark"] .site-ticker {
  background: linear-gradient(90deg, #173736, #332c23, #173736);
  border-color: rgba(80, 210, 191, .22);
  color: #d1e6de;
}
html[data-theme="dark"] .site-ticker-label { background: #4a3a20; color: var(--amber); }
html[data-theme="dark"] .site-ticker-close { background: rgba(0, 0, 0, .13); border-color: var(--line); color: var(--muted); }
html[data-theme="dark"] .site-ticker-close:hover { background: var(--surface-3); color: var(--text); }
html[data-theme="dark"] :is(.desktop-nav .desktop-store-entry, .member-sidebar .member-store-nav) {
  background: linear-gradient(135deg, #3a3020, #272a2c);
  border-color: rgba(241, 194, 117, .26);
  color: var(--amber);
}
html[data-theme="dark"] :is(.desktop-nav .desktop-store-entry:hover, .desktop-nav .desktop-store-entry.active) { background: #453824; color: #ffdda4; }
html[data-theme="dark"] .member-sidebar .member-store-nav i { background: rgba(241, 194, 117, .16); }
html[data-theme="dark"] .growth-modal-card { background: linear-gradient(145deg, #1c2b39, #183630); color: var(--text); }
html[data-theme="dark"] :is(.growth-modal-card > span, .growth-modal-card .growth-benefit-highlight) { color: var(--accent-strong); }
html[data-theme="dark"] :is(.growth-modal-card p, .growth-modal-card .growth-benefit-tip, .growth-modal-close) { color: var(--muted); }
html[data-theme="dark"] .growth-primary { background: var(--accent); color: #092d29; }
html[data-theme="dark"] .growth-benefit-coupon { background: linear-gradient(135deg, #3d3120, #352935); border-color: rgba(241, 194, 117, .3); }
html[data-theme="dark"] .growth-benefit-coupon :is(small, em) { color: var(--amber); }
html[data-theme="dark"] .growth-benefit-coupon b { color: var(--text); }
html[data-theme="dark"] .douyin-login-button { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
html[data-theme="dark"] .douyin-login-button small { color: var(--muted); }
html[data-theme="dark"] .pending-payment-launcher { background: linear-gradient(145deg, #3c3120, var(--surface)); color: var(--amber); border-color: rgba(241, 194, 117, .35); }
html[data-theme="dark"] .pending-payment-close { color: var(--amber); border-color: rgba(241, 194, 117, .32); }
html[data-theme="dark"] .comment-commission-entry { background: linear-gradient(110deg, #1a3934, var(--surface)); border-color: rgba(80, 210, 191, .3); }
html[data-theme="dark"] .product-agent-promo { background: linear-gradient(120deg, #302b22, #302627 55%, #1b322e); border-color: rgba(241, 194, 117, .3); }
html[data-theme="dark"] .member-agent-checkout .member-agent-combination-tip { background: linear-gradient(135deg, #1b3632, #1d2d40); border-color: rgba(80, 210, 191, .3); color: var(--muted); }
html[data-theme="dark"] .qq-group-modal-icon { background: var(--surface-2); }
html[data-theme="dark"] .invoice-request-amount { background: linear-gradient(135deg, #193932, #1b302f); border-color: rgba(80, 210, 191, .3); }
html[data-theme="dark"] .invoice-request-amount > div:last-child { border-color: var(--line); }
html[data-theme="dark"] .invoice-minimum-status.eligible { background: var(--accent-soft); border-color: rgba(80, 210, 191, .3); color: var(--accent-strong); }
html[data-theme="dark"] .checkout-coupon-picker em { color: var(--amber); }
html[data-theme="dark"] .coupon-reward-panel { background: radial-gradient(circle at 50% -10%, rgba(181, 133, 40, .15), transparent 42%), var(--surface); }
html[data-theme="dark"] .coupon-reward-icon { background: linear-gradient(145deg, #554023, #4a3039); color: var(--amber); }
html[data-theme="dark"] .coupon-reward-kicker { color: var(--amber); }
html[data-theme="dark"] .coupon-reward-tickets article { background: linear-gradient(135deg, #3a3020, var(--surface)); }
html[data-theme="dark"] .coupon-reward-tickets :is(span, em) { color: var(--amber); }
html[data-theme="dark"] .member-coupon { background: var(--surface); border-color: rgba(241, 194, 117, .32); }
html[data-theme="dark"] .member-coupon > div:first-child { background: linear-gradient(145deg, #4a3921, #463039); }
html[data-theme="dark"] .member-coupon > div:first-child :is(small, strong) { color: var(--amber); }
html[data-theme="dark"] .member-coupon > div:last-child > b { color: var(--accent-strong); }
html[data-theme="dark"] .member-coupon > div:last-child > span { color: var(--text); }
html[data-theme="dark"] .member-coupon > div:last-child > small { color: var(--muted); }
html[data-theme="dark"] .member-push-card { background: linear-gradient(120deg, #17352f, var(--surface)); border-color: rgba(80, 210, 191, .3); }
html[data-theme="dark"] .member-push-card span { color: var(--muted); }

/* Explicit text corrections for legacy hard-coded daytime component colours. */
html[data-theme="dark"] :is(
  .address-order-summary b, .address-registration-card > header span,
  .address-guest-contact span, .address-registration-card label > span,
  .region-upgrade-pair b, .region-upgrade-guide h3, .store-dashboard-stats b,
  .legal-documents-header h2, .legal-documents-content h2
) { color: var(--text); }
html[data-theme="dark"] :is(
  .address-order-summary span, .address-guest-contact em, .address-guest-contact small,
  .address-registration-card label em, .region-upgrade-guide p,
  .store-dashboard-stats span, .store-product-manager header p,
  .store-product-manager form div small, .store-product-manager label span,
  .after-sale-upload > header small, .after-sale-auto-refund-loading small,
  .store-coupon-dialog p, .store-coupon-dialog small, .legal-documents-message
) { color: var(--muted); }
html[data-theme="dark"] :is(.address-registration-card > header code, .address-registration-result.preview b, .store-coupon-dialog strong) { color: var(--accent-strong); }
html[data-theme="dark"] .address-registration-card > header code { background: var(--accent-soft); }
html[data-theme="dark"] .store-product-costs span:last-child b { color: var(--amber); }
html[data-theme="dark"] :is(.store-product-manager > div > form, .store-order-list th, .store-order-list td) { border-color: var(--line); }
html[data-theme="dark"] .member-agent-order-row { background: linear-gradient(90deg, rgba(241, 194, 117, .08), transparent); }
html[data-theme="dark"] body[data-page="account"] .purchase-history-table tr.member-agent-order-row { background: linear-gradient(145deg, #2d2c26, var(--surface)); }
html[data-theme="dark"] .member-order-delivery-actions > footer a { background: #31556b; color: #fff; }
html[data-theme="dark"] :is(.agent-plan-starter) { --agent-color: #e1a776; }
html[data-theme="dark"] :is(.agent-plan-growth, .public-agent-plan.agent-plan-growth) { --agent-color: #87b9e4; }
html[data-theme="dark"] :is(.agent-plan-partner, .public-agent-plan.agent-plan-partner) { --agent-color: #edc575; }
html[data-theme="dark"] .public-agent-plan { --agent-color: #e1a776; }
html[data-theme="dark"] :is(.member-agent-plan, .public-agent-plan) > button { color: #17202e; }
html[data-theme="dark"] .member-agent-plan.disabled > button { background: var(--surface-3); color: var(--muted); }
html[data-theme="dark"] .member-ticket-status-all { --ticket-status-color: #75e6d1; --ticket-status-bg: rgba(80, 210, 191, .13); }
html[data-theme="dark"] .member-ticket-status-open { --ticket-status-color: #f1c275; --ticket-status-bg: rgba(241, 194, 117, .13); }
html[data-theme="dark"] .member-ticket-status-answered { --ticket-status-color: #91c8ff; --ticket-status-bg: rgba(112, 177, 250, .14); }
html[data-theme="dark"] .member-ticket-status-resolved { --ticket-status-color: #81ddaa; --ticket-status-bg: rgba(90, 199, 142, .13); }
html[data-theme="dark"] .member-ticket-status-closed { --ticket-status-color: #a9b6c8; --ticket-status-bg: var(--surface-2); }

/* Legal/reference content and shared attachment viewers. */
html[data-theme="dark"] .legal-documents-panel { border-color: var(--line-strong); box-shadow: var(--shadow); }
html[data-theme="dark"] :is(.legal-documents-x, .legal-documents-footer) { background: var(--surface); border-color: var(--line); color: var(--muted); }
html[data-theme="dark"] :is(.legal-documents-tabs, .legal-documents-toc) { border-color: var(--line); }
html[data-theme="dark"] .legal-documents-toc { background: var(--surface-2); }
html[data-theme="dark"] .legal-documents-metadata { color: var(--muted); border-color: var(--line); }
html[data-theme="dark"] .legal-documents-brand { color: var(--muted); }
html[data-theme="dark"] .legal-documents-x { border-color: var(--blue); }
html[data-theme="dark"] .legal-documents-toc-toggle [data-legal-toc-state] { color: var(--blue); }
html[data-theme="dark"] :is(.legal-documents-tabs > button, .legal-documents-toc > p, .legal-documents-toc nav > span, .legal-documents-toc button) { color: var(--muted); }
html[data-theme="dark"] .legal-documents-tabs > button[aria-selected="true"] { color: var(--blue); border-color: var(--blue); }
html[data-theme="dark"] :is(.legal-documents-toc button.active, .legal-documents-toc button:hover, .legal-documents-message button) { color: var(--blue); background: var(--blue-soft); border-color: var(--line); }
html[data-theme="dark"] .legal-documents-content li::marker { color: var(--muted); }
html[data-theme="dark"] .legal-documents-content hr { background: var(--line); }
html[data-theme="dark"] .legal-documents-content blockquote { background: var(--surface-2); border-color: var(--blue); }
html[data-theme="dark"] :is(.legal-documents-table th, .legal-documents-table td) { border-color: var(--line-strong); }
html[data-theme="dark"] :is(.legal-documents-table thead th, .legal-documents-table tbody td:first-child, .legal-documents-table tbody th:first-child) { background: var(--surface-2); color: var(--text); }
html[data-theme="dark"] .legal-documents-footer button { background: var(--accent); color: #092d29; }
html[data-theme="dark"] .ticket-image-viewer-panel { border-color: var(--line); }
html[data-theme="dark"] .ticket-image-viewer-stage { background: #080e17; }
html[data-theme="dark"] .sms-code-status-refresh { background: var(--surface-2); }
html[data-theme="dark"] body[data-page="product"] .philippines-upgrade-product:not(.order-created) > .product-hero-cover { background: linear-gradient(135deg, var(--surface), var(--accent-soft)) !important; }
html[data-theme="dark"] body[data-page="benefit-pass"] .detail-main > .back-link,
html[data-theme="dark"] body[data-page="product"] .detail-main > .back-link,
html[data-theme="dark"] body[data-page="lottery"] .lottery-main > .back-link { background: var(--header); }

@media (max-width: 760px) {
  .theme-toggle svg { width: 20px; height: 20px; }
  html[data-theme="dark"] .mobile-nav { box-shadow: 0 -8px 28px rgba(0, 0, 0, .18); }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle { transition: none; }
}
@media print {
  .theme-toggle { display: none !important; }
  html[data-theme="dark"] { color-scheme: light; }
}

/* Quiet, legible promotion actions at night; monochrome UI icons follow text. */
html[data-theme="dark"] .site-header :is(.desktop-recharge-offer, .mobile-header-promo) {
  background: #202b3a;
  border: 1px solid #45536a;
  color: #e8c991;
  box-shadow: none;
}
html[data-theme="dark"] .site-header :is(.growth-entry, .growth-entry-desktop) {
  background: #202b3a;
  border: 1px solid #45536a;
  color: #9ee2d3;
  box-shadow: none;
}
html[data-theme="dark"] .site-header :is(.desktop-recharge-offer, .mobile-header-promo):hover { background: #2a3749; color: #ffe0ad; }
html[data-theme="dark"] .site-header :is(.growth-entry, .growth-entry-desktop):hover { background: #2a3749; color: #bff9e9; }
html[data-theme="dark"] .site-header :is(.desktop-recharge-offer, .mobile-header-promo, .growth-entry) img { display: none; }
html[data-theme="dark"] .site-header :is(.desktop-recharge-offer, .mobile-header-promo, .growth-entry)::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background: currentColor;
  -webkit-mask: url('/assets/svg-v2-20260917/recharge-offer.svg') center / contain no-repeat;
  mask: url('/assets/svg-v2-20260917/recharge-offer.svg') center / contain no-repeat;
}
html[data-theme="dark"] .site-header .growth-entry::before {
  -webkit-mask-image: url('/assets/svg-v2-20260917/member-coupons.svg');
  mask-image: url('/assets/svg-v2-20260917/member-coupons.svg');
}
@media (max-width: 760px) {
  html[data-theme="dark"] .site-header :is(.mobile-header-promo, .growth-entry)::before { width: 17px; height: 17px; flex-basis: 17px; }
  html[data-theme="dark"] .site-header .growth-entry-mobile { background: #202b3a; border-color: #45536a; color: #e8c991; }
  html[data-theme="dark"] .site-header .growth-entry-mobile:hover { background: #2a3749; color: #ffe0ad; }
}
html[data-theme="dark"] :is(.desktop-nav, .mobile-nav) [data-nav-key="tasks"] img { display: none; }
html[data-theme="dark"] :is(.desktop-nav, .mobile-nav) [data-nav-key="tasks"]::before {
  content: "";
  width: 20px; height: 20px; flex: 0 0 20px;
  background: currentColor;
  -webkit-mask: url('/assets/svg-v2-20260917/earn-commission.svg') center / contain no-repeat;
  mask: url('/assets/svg-v2-20260917/earn-commission.svg') center / contain no-repeat;
}
html[data-theme="dark"] .mobile-nav [data-nav-key="tasks"]::before { width: 22px; height: 22px; flex-basis: 22px; }
html[data-theme="dark"] :is(.mobile-announcement-entry, .desktop-nav [data-announcement-entry]) img { display: none; }
html[data-theme="dark"] :is(.mobile-announcement-entry, .desktop-nav [data-announcement-entry])::before {
  content: "";
  width: 20px; height: 20px; flex: 0 0 20px;
  background: currentColor;
  -webkit-mask: url('/assets/svg-v2-20260917/announcement.svg') center / contain no-repeat;
  mask: url('/assets/svg-v2-20260917/announcement.svg') center / contain no-repeat;
}
html[data-theme="dark"] .ych-edge-guard-notice { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow); }
html[data-theme="dark"] .ych-edge-guard-notice p { color: var(--muted); }
html[data-theme="dark"] .ych-edge-guard-actions button { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }
html[data-theme="dark"] .ych-edge-guard-actions button:first-child { background: #23473f; color: var(--accent-strong); border-color: #437268; }
