/* 天机 · 兰紫。共享颜色与基础控件；各业务页保持各自的数据与流程。 */
:root,
html[data-theme='light'],
html[data-theme='light'] body.tianji-orchid {
  --orchid: #7959bc;
  --orchid-deep: #6845ac;
  --orchid-wash: #f4effb;
  --rose: #bd6286;
  --canvas: #fbfafe;
  --canvas-soft: #f6f2fc;
  --paper: #ffffff;
  --paper-solid: #ffffff;
  --paper-strong: #ffffff;
  --paper-subtle: #f6f2fb;
  --paper-muted: #f2edf9;
  --bg: #fbfafe;
  --bg0: #fbfafe;
  --bg1: #f8f5fc;
  --bg2: #f2edf9;
  --ink: #2b263d;
  --ink-soft: #514a63;
  --dim: #736b83;
  --faint: #80768f;
  --gold: #7959bc;
  --gold-bright: #7959bc;
  --gold-deep: #6845ac;
  --gold-fill: #7959bc;
  --gold-wash: #f4effb;
  --jade: #438779;
  --jade-fill: #5ba493;
  --jade-wash: #eef8f4;
  --sky: #7485bd;
  --sky-end: #8575bc;
  --sky-wash: #f0f3fc;
  --seal: #bd6286;
  --seal-wash: #fbf0f6;
  --cinnabar: #bd6286;
  --cinnabar-wash: #fbf0f6;
  --blue: #7485bd;
  --blue-wash: #f0f3fc;
  --line: rgba(121, 89, 188, .14);
  --line-strong: rgba(121, 89, 188, .29);
  --card: #ffffff;
  --card-deep: #f7f3fc;
  --surface-panel: #ffffff;
  --surface-control: #fcfaff;
  --surface-muted: #f6f2fb;
  --surface-gold: #f4effb;
  --surface-jade: #eef8f4;
  --primary-start: #8860c4;
  --primary-end: #7952b8;
  --primary-text: #ffffff;
  --action-start: #8860c4;
  --action-end: #7952b8;
  --action-text: #ffffff;
  --danger: #ad4969;
  --danger-wash: #fff1f5;
  --success: #367c68;
  --success-wash: #eef8f2;
  --backdrop: rgba(43, 38, 61, .32);
  --shadow: 0 16px 48px rgba(62, 40, 103, .075);
  --shadow-card: 0 2px 12px rgba(62, 40, 103, .035);
  --shadow-float: 0 22px 62px rgba(62, 40, 103, .14);
  --focus-ring: 0 0 0 3px rgba(121, 89, 188, .2);
  color-scheme: light;
}

body.tianji-orchid {
  color: var(--ink);
  background-color: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.tianji-orchid ::selection { background: #e8dcf7; color: #392755; }
body.tianji-orchid :is(input, select, textarea) { accent-color: var(--orchid); }
body.tianji-orchid :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--orchid);
  outline-offset: 4px;
}
body.tianji-orchid :is(button, input, select, textarea) { font-family: var(--sans, system-ui, sans-serif); }
body.tianji-orchid :is(button, a, summary) { -webkit-tap-highlight-color: transparent; }
body.tianji-orchid :is(button, a)[aria-busy='true'] { cursor: progress; }
body.tianji-orchid .site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(253, 251, 255, .94);
  box-shadow: none;
  backdrop-filter: blur(18px);
}
body.tianji-orchid .site-brand-name,
body.tianji-orchid .site-brand .brand-name {
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: currentColor;
  filter: none;
}
body.tianji-orchid .personal-avatar {
  color: var(--orchid-deep);
  border: 1px solid rgba(121, 89, 188, .12);
  background: radial-gradient(circle at 30% 20%, #ffe9f6, transparent 60%), linear-gradient(155deg, #f0d9f1, #d9ceef);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}
body.tianji-orchid .personal-center-menu {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-float);
}
body.tianji-orchid .personal-center-item:hover { background: var(--orchid-wash); }
body.tianji-orchid .mobile-tab-bar {
  border-top-color: var(--line);
  background: rgba(253, 251, 255, .97);
}
body.tianji-orchid .mobile-tab:is([aria-current='page'], [aria-expanded='true']) { color: var(--orchid-deep); }
body.tianji-orchid .mobile-tab:is([aria-current='page'], [aria-expanded='true']) .mobile-tab-icon {
  color: var(--orchid);
  background: var(--orchid-wash);
}

/* 手机使用更明确的底色与选中态；表单、弹层仍保留不透明底板。 */
@media (max-width: 980px) {
  html[data-theme='light'] body.tianji-orchid {
    --orchid: #7550b5;
    --orchid-deep: #59358f;
    --orchid-wash: #eae0f7;
    --rose: #a34870;
    --jade: #267363;
    --jade-wash: #e3f2ec;
    --sky: #416da8;
    --sky-wash: #e7effa;
    --canvas: #f3eff8;
    --canvas-soft: #eae2f3;
    --paper-subtle: #eee7f6;
    --dim: #665c75;
    --faint: #70647e;
    --gold: #7550b5;
    --gold-deep: #59358f;
    --gold-fill: #7550b5;
    --gold-wash: #eae0f7;
    --line: #dfd3ec;
    --line-strong: #bda5d9;
    --primary-start: #8056bd;
    --primary-end: #63409e;
    --action-start: #8056bd;
    --action-end: #63409e;
    background: var(--canvas);
  }
  body.tianji-orchid .site-header {
    background: #f8f4fc;
    border-bottom-color: #dfd3ec;
  }
  body.tianji-orchid .site-brand-name,
  body.tianji-orchid .site-brand .brand-name { color: var(--orchid-deep); }
  body.tianji-orchid .mobile-tab-bar {
    background: #fff;
    border-top-color: #d8c7e9;
    box-shadow: 0 -4px 18px rgba(70, 42, 104, .07);
  }
  body.tianji-orchid .mobile-tab { color: #70647e; }
  body.tianji-orchid .mobile-tab:is([aria-current='page'], [aria-expanded='true']) { color: var(--orchid-deep); }
  body.tianji-orchid .mobile-tab:is([aria-current='page'], [aria-expanded='true']) .mobile-tab-icon {
    color: #fff;
    background: var(--orchid);
    border-color: var(--orchid);
    box-shadow: 0 3px 9px rgba(89, 53, 143, .2);
  }
}
body.tianji-orchid .mobile-task-strip a { border-color: var(--line); background: #f8f3fd; color: var(--orchid-deep); }
body.tianji-orchid :is(.account-dialog-surface, .history-drawer, .consent-surface, .profile-detail-surface) {
  border-color: var(--line);
  box-shadow: var(--shadow-float);
}
@media (min-width: 981px) {
  body.tianji-orchid .site-nav-bar { min-height: 82px; }
  body.tianji-orchid .site-nav-link {
    border-color: transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ink-soft);
    font-weight: 500;
  }
  body.tianji-orchid .site-nav-link:hover { color: var(--orchid); transform: none; }
  body.tianji-orchid .site-nav-link[aria-current='page'] { color: var(--orchid-deep); }
  body.tianji-orchid .site-nav-link[aria-current='page']::after {
    content: '';
    position: absolute;
    left: 23%;
    right: 23%;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: var(--orchid);
  }
  body.tianji-orchid .personal-center-toggle {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
  }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body.tianji-orchid :is(.primary-btn, .primary-button, .dialog-primary-btn, .home-primary):hover:not(:disabled) {
    transform: translateY(-1px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.tianji-orchid) { scroll-behavior: auto; }
  body.tianji-orchid *, body.tianji-orchid *::before, body.tianji-orchid *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
