/* TrickLab approved 2026-11-12: 35% balance, heavy type and soft shadow.
   Presentation only. Theme follows the surrounding surface, not the orange fill.
   Keep semantic danger/success actions, text links, fields and artwork separate. */
:root {
  --tl-orange-start: #f99328;
  --tl-orange-mid: #f67b18;
  --tl-orange-end: #e7650d;
  --tl-orange-gradient: linear-gradient(110deg, #f99328 0%, #f67b18 48%, #e7650d 100%);
  --tl-orange-shadow: 0 8px 18px rgba(231,101,13,.22), 0 3px 6px rgba(175,68,10,.09);
  --tl-orange-ink: #000;
  --action-highlight: var(--tl-orange-start);
  --action-mid: var(--tl-orange-mid);
  --action-shade: var(--tl-orange-end);
  --action-gradient: var(--tl-orange-gradient);
  --action-shadow: var(--tl-orange-shadow);
  --action-ink: var(--tl-orange-ink);
}
:root[data-orange-surface="light"], [data-orange-surface="light"],
:root[data-theme="light"], [data-theme="light"] { --tl-orange-ink: #fff; }
:root[data-theme="dark"], [data-theme="dark"],
[data-orange-surface="dark"] { --tl-orange-ink: #000; }
@media(prefers-color-scheme:dark) {
  :root[data-orange-page="reader-download"]:not([data-theme="light"]) { --tl-orange-ink:#000; }
}

/* Filled orange actions, including stateful controls and dynamically mounted dialogs.
   !important overrides the historical per-page paint rules without changing handlers. */
:root:root:root :is(
  .btn--primary, .button.primary,
  :is([data-orange-page="c"],[data-orange-page="card-access"]) :is(button,a).primary,
  .primary-button, .accent-button, .td-primary, .am-primary, .ar-primary,
  .cm-primary, .cm-new-course, .course-manager .cm-actions>button:last-child,
  .cm-course-actions [type="submit"], .sid-pay-primary, .sid-confirm-primary,
  .student-filter-actions .is-primary, .ops-button.is-primary, .acct-button.is-primary,
  .exam-btn.is-primary, .ar-btn.is-primary, .cch-create-submit,
  #login-form .login__submit, .session-discard-dialog button[value="discard"],
  .rc-share-buttons>[data-rollcall-share], .rc-share-actions a,
  #nav-auth:not(.is-user), .hero-booking__trigger, .trial-sheet__next,
  .cal-card__book, .slotc:not(.is-mine):not(.is-wait) .slotc__btn,
  .cal-venue-switch, .calspot__tip button, .wcal-chip__book,
  .view-toggle__btn.is-active, .filter__btn.is-active, .pass-tab.is-active,
  .auth-tab.is-active, .segbar__b.is-on, .ordbtn.is-on, .tsel__act,
  .store-tab.is-on, .stu2__f.is-on, .chip-ratio.is-on, .vc-chip.is-on,
  .qbar__edit.is-active, .qbar__add.is-active, .stu-pg__b.is-cur,
  .passcard__cta, .passshop, .ann-detail__cta, .ann-popup__done, .navdrawer__login,
  .voucher-claim:not(.is-done), .voucher-pages button[aria-pressed="true"] span,
  .cm-reader__booking .slot-row .btn, .venue-action--primary,
  .venue-native-tour__hire, #venues .cm-art__action,
  #success-modal.booking-receipt #modal-cal, #success-modal.booking-receipt #modal-done,
  .merch-feature__browse, .merch-detail__actions .merch-order,
  #notif-panel .notif-profile__cta, .feedback-action, .display-help button,
  .rc-btn--primary, .rc-key--go, .rc-tab.is-on,
  .btn--hd[data-hdb="pay"], .btn--hd[data-hdb="pend"],
  .date-button[aria-pressed="true"], .language-switch button[aria-pressed="true"],
  .email-verify-button.account-arrow, .booking-audience a[aria-current="page"],
  .device-switch button[aria-pressed="true"], .frame-recovery button,
  .ai-chat__send, .contact-fab__main, .video-modal__close,
  .tabbar__t--main .tabbar__ic, .tabbar--capsule .tabbar__t:last-child,
  .stu-fab>summary, .download, .tl-primary,
  :is([data-orange-page="training-payment"],[data-orange-page="training-calendar"]) .submit,
  [data-orange-page="reader-test"] button:not(.secondary):not(.venues button):not(#students button),
  [data-orange-page="battle-hk2026-wallet"] button
):not(.btn--danger):not(.btn--danger-ghost):not(.is-danger):not(.danger):not(.is-complete):not(.is-success):not([data-orange-page="payme"] .primary) {
  --on-accent: var(--tl-orange-ink);
  background: var(--tl-orange-gradient) !important;
  background-color: var(--tl-orange-mid) !important;
  color: var(--tl-orange-ink) !important;
  border-color: transparent !important;
  box-shadow: var(--tl-orange-shadow) !important;
  font-family: "Noto Sans TC", "PingFang TC", sans-serif !important;
  font-weight: 900 !important;
  text-shadow: none !important;
  filter: none;
}

/* Text action shape. Keep compact calendar/filter controls at their existing sizes. */
:root:root:root :is(.btn--primary, .button.primary,
  :is([data-orange-page="c"],[data-orange-page="card-access"]) :is(button,a).primary,
  .primary-button, .accent-button, .ops-button.is-primary, .acct-button.is-primary,
  #login-form .login__submit, .hero-booking__trigger, .trial-sheet__next,
  .venue-action--primary, .venue-native-tour__hire, #venues .cm-art__action,
  .td-primary, .download, .tl-primary, .ann-popup__done,
  :is([data-orange-page="training-payment"],[data-orange-page="training-calendar"]) .submit):not(.btn--sm):not(.btn--icon) {
  border-radius: 14px !important;
  font-size: 18px !important;
  line-height: 1.4 !important;
  min-height: 44px;
}
/* Icon-only controls retain their circular geometry. */
:root:root:root :is(.tabbar__t--main .tabbar__ic, .contact-fab__main,
  .video-modal__close, .stu-fab>summary) { border-radius:50% !important; }
@media(max-width:360px) {
  .sa-reference .sa-review-actions { grid-template-columns:1fr; }
}
/* Text/icon descendants sometimes carried a hardcoded white foreground. */
:root:root:root :is(.btn--primary,.button.primary,.primary-button,.hero-booking__trigger,
  .tabbar__t--main .tabbar__ic,.contact-fab__main,.venue-action--primary,
  #venues .cm-art__action,.download,.tl-primary) > :is(span,svg,i,strong) {
  color:inherit !important;
}
/* The hero's animated SVG belongs to the same button rather than an independent palette. */
.hero-booking__liquid stop:first-child { stop-color:var(--tl-orange-start); }
.hero-booking__liquid stop:last-child { stop-color:var(--tl-orange-end); }

/* Existing disabled opacity, focus rings and reduced-motion rules stay in control. */
:root:root:root :is(.btn--primary,.button.primary,.primary-button,.tl-primary,
  .ops-button.is-primary,.acct-button.is-primary):disabled {
  cursor:not-allowed;
}
