/* 登录、个人中心及其账户子页共享 Claude 风格，保留各页业务结构。 */
html[data-theme="light"] {
  --bg:#faf8f5; --bg-soft:#fffdf9; --surface:#fffdf9; --surface-muted:#f2ece4;
  --glass:#f2ece4; --glass-2:#f5e6dc; --glass-bd:#e5ded4;
  --ink:#292724; --ink-soft:#665e56; --ink-dim:#776e65;
  --c1:#d97757; --c2:#c4653a; --c3:#a64e32;
  --grad:#b45b3f; --grad-soft:#f5e6dc;
  --account-action:#b45b3f; --account-hover:#96472f; --account-tint:#f5e6dc;
}

html[data-theme="dark"] {
  --bg:#252320; --bg-soft:#2e2b27; --surface:#2e2b27; --surface-muted:#38322c;
  --glass:#38322c; --glass-2:#47332a; --glass-bd:#51483f;
  --ink:#f2ede5; --ink-soft:#c3b8ab; --ink-dim:#b0a293;
  --c1:#d97757; --c2:#e39b7d; --c3:#e5a68b;
  --grad:#b45b3f; --grad-soft:#47332a;
  --account-action:#b45b3f; --account-hover:#c4653a; --account-tint:#47332a;
}

html,
body { background:var(--bg); color:var(--ink); }
.aurora { display:none; }
html[data-theme="light"] ::selection { background:#171717; color:#fff; }
html[data-theme="dark"] ::selection { background:#d8d8d8; color:#111; }
::-webkit-scrollbar-thumb { background:color-mix(in srgb,var(--ink-dim) 34%,transparent); }

:where(.btn,.btn-main,.code-btn,.tab,.filter,.pill,.home-btn,.balance-pill,.theme-switch button,.set-nav-item,.link-card) {
  transition:background .16s var(--ease),border-color .16s var(--ease),color .16s var(--ease),transform .16s var(--ease),box-shadow .16s var(--ease);
}
:where(a,button,input,textarea,select,[role="button"],[role="tab"],[tabindex]):focus-visible {
  outline:2px solid var(--ink);
  outline-offset:2px;
  box-shadow:0 0 0 4px color-mix(in srgb,var(--ink) 10%,transparent);
}

/* 顶栏与全站账户入口 */
.topbar {
  border-bottom-color:var(--glass-bd);
  background:color-mix(in srgb,var(--bg) 96%,transparent);
  box-shadow:0 1px 0 color-mix(in srgb,var(--ink) 3%,transparent);
}
.logo .mark,
.avatar {
  border:1px solid color-mix(in srgb,var(--ink) 16%,var(--glass-bd));
  background:var(--ink);
  color:var(--bg);
  box-shadow:none;
}
html[data-theme="dark"] .logo .mark,
html[data-theme="dark"] .avatar {
  border-color:#3b3b3b;
  background:#262626;
  color:#f4f4f4;
}
.home-btn,
.balance-pill {
  border-color:var(--glass-bd);
  background:var(--surface);
  color:var(--ink-soft);
  box-shadow:none;
}
.home-btn:hover,
.balance-pill:hover {
  border-color:color-mix(in srgb,var(--ink) 34%,var(--glass-bd));
  background:var(--surface-muted);
  color:var(--ink);
  box-shadow:0 6px 16px rgba(0,0,0,.06);
}
.home-btn:active,
.balance-pill:active { transform:scale(.98); box-shadow:none; }
.balance-pill .bp-icon { background:var(--surface-muted); color:var(--ink); }
.balance-pill .bp-value { background:none; color:var(--ink); -webkit-text-fill-color:var(--ink); }
.balance-pill .bp-action { border-left-color:var(--glass-bd); color:var(--ink); }
.acct-menu {
  border-color:var(--glass-bd);
  background:var(--bg-soft);
  box-shadow:0 18px 50px rgba(0,0,0,.16);
}
html[data-theme="dark"] .acct-menu { box-shadow:0 20px 58px rgba(0,0,0,.65); }
.acct-head,
.acct-div { border-color:var(--glass-bd); background:transparent; }
.acct-menu :is(a,button):hover,
.acct-menu :is(a,button).current { background:var(--surface-muted); color:var(--ink); }
.acct-menu :is(a,button).current::after { color:var(--ink-soft); }

/* 主次按钮：暗色模式使用炭灰，不出现纯白按钮面。 */
.btn { border-radius:8px; }
.btn-primary,
.btn-main {
  border:1px solid #111;
  background:#111;
  color:#fff;
  box-shadow:0 5px 14px rgba(0,0,0,.13);
}
.btn-primary:hover,
.btn-main:hover {
  border-color:#292929;
  background:#292929;
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(0,0,0,.16);
}
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .btn-main {
  border-color:#424242;
  background:#262626;
  color:#f4f4f4;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055);
}
html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-main:hover {
  border-color:#565656;
  background:#323232;
  color:#fff;
  box-shadow:0 8px 20px rgba(0,0,0,.36),inset 0 1px 0 rgba(255,255,255,.07);
}
.btn-primary:active,
.btn-main:active { transform:scale(.985); box-shadow:none; }
.btn-primary:disabled,
.btn-main:disabled { border-color:var(--glass-bd); background:var(--surface-muted); color:var(--ink-dim); box-shadow:none; cursor:not-allowed; }
.btn-ghost,
.code-btn {
  border-color:var(--glass-bd);
  background:var(--surface);
  color:var(--ink-soft);
  box-shadow:none;
}
.btn-ghost:hover,
.code-btn:hover:not(:disabled) {
  border-color:color-mix(in srgb,var(--ink) 36%,var(--glass-bd));
  background:var(--surface-muted);
  color:var(--ink);
  transform:translateY(-1px);
}
.btn-ghost:active,
.code-btn:active { transform:scale(.985); }

/* 登录 / 注册 */
.brand-side { background:#fafafa; }
.form-side { border-left:1px solid var(--glass-bd); background:#fff; box-shadow:none; }
html[data-theme="dark"] .brand-side { background:#070707; }
html[data-theme="dark"] .form-side { border-left-color:#202020; background:#0b0b0b; }
.brand-mid h1 .grad {
  background:none;
  color:var(--ink);
  -webkit-text-fill-color:currentColor;
  animation:none;
}
.bf .ck {
  border:1px solid var(--glass-bd);
  background:var(--ink);
  color:var(--bg);
  box-shadow:none;
}
html[data-theme="dark"] .bf .ck { border-color:#3b3b3b; background:#262626; color:#f4f4f4; }
.rating-chip,
.tabs,
.auth-note { border-color:var(--glass-bd); background:var(--surface-muted); }
.rating-chip .stars { color:var(--ink-soft); }
.tab { color:var(--ink-soft); }
.tab:hover { color:var(--ink); }
.tab.active { background:#111; color:#fff; box-shadow:none; }
html[data-theme="dark"] .tab.active { background:#292929; color:#f4f4f4; box-shadow:inset 0 1px 0 rgba(255,255,255,.055); }
.input {
  border-color:var(--glass-bd);
  background:var(--surface);
  color:var(--ink);
  box-shadow:none;
}
.input:focus {
  border-color:var(--ink);
  background:var(--surface);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--ink) 8%,transparent);
}
.pwd-toggle:hover { background:var(--surface-muted); color:var(--ink); }
.switch-mode:hover,
.agree a:hover { color:var(--ink); }
.agree input { accent-color:var(--ink); }
.theme-switch { border-color:var(--glass-bd); background:var(--surface-muted); box-shadow:none; }
.theme-switch button { color:var(--ink-dim); }
.theme-switch button:hover { color:var(--ink); }
.theme-switch button.active { background:#111; color:#fff; box-shadow:none; }
html[data-theme="light"] .theme-switch button.active { background:#111; color:#fff; box-shadow:none; }
html[data-theme="dark"] .theme-switch button.active { background:#292929; color:#f4f4f4; box-shadow:inset 0 1px 0 rgba(255,255,255,.055); }
.theme-switch button:focus-visible { outline-color:var(--ink); box-shadow:0 0 0 4px color-mix(in srgb,var(--ink) 9%,transparent); }
.toast { border-color:var(--glass-bd); background:var(--bg-soft); color:var(--ink); }

html[data-theme="light"] .brand-side { background:#fff; }
html[data-theme="light"] .form-side { border-left-color:#e5e5e5; background:#fff; box-shadow:none; }
html[data-theme="light"] .tabs,
html[data-theme="light"] .rating-chip,
html[data-theme="light"] .auth-note { border-color:#e2e2e2; background:#f5f5f5; }
html[data-theme="light"] .input,
html[data-theme="light"] .input:focus { background:#fff; }

/* 个人中心 */
.account {
  border-color:var(--glass-bd);
  background:var(--surface);
  box-shadow:none;
}
.ava-big {
  border:1px solid var(--glass-bd);
  background:var(--surface-muted);
  color:var(--ink);
  box-shadow:none;
}
html[data-theme="dark"] .ava-big { border-color:#303030; background:#191919; color:#f4f4f4; }
.vip,
html[data-theme="dark"] .vip { border-color:var(--glass-bd); background:var(--surface-muted); color:var(--ink-soft); }
.stat,
.work {
  border-color:var(--glass-bd);
  background:var(--surface);
  box-shadow:none;
}
.stat .sv.grad { background:none; color:var(--ink); }
.filter { border-color:var(--glass-bd); background:var(--surface); color:var(--ink-soft); }
.filter:hover { border-color:color-mix(in srgb,var(--ink) 34%,var(--glass-bd)); background:var(--surface-muted); color:var(--ink); }
.filter.active { border-color:#111; background:#111; color:#fff; }
html[data-theme="dark"] .filter.active { border-color:#424242; background:#262626; color:#f4f4f4; }
.works-empty,
html[data-theme="dark"] .works-empty { border-color:var(--glass-bd); background:var(--surface); }
.works-empty .we-ic,
html[data-theme="dark"] .works-empty .we-ic { border:1px solid var(--glass-bd); background:var(--surface-muted); color:var(--ink); }
.we-chip,
html[data-theme="dark"] .we-chip { border-color:var(--glass-bd); background:var(--surface-muted); color:var(--ink-soft); }
.to-top { border-color:var(--glass-bd); background:var(--surface); color:var(--ink); }
.to-top:hover { border-color:color-mix(in srgb,var(--ink) 34%,var(--glass-bd)); background:var(--surface-muted); }
.lb-card { border-color:var(--glass-bd); background:var(--bg-soft); }

/* 账户设置 */
.set-nav,
.card,
.link-card,
.confirm-box {
  border-color:var(--glass-bd);
  background:var(--surface);
  box-shadow:none;
}
.set-nav-item:hover,
.link-card:hover { border-color:color-mix(in srgb,var(--ink) 30%,var(--glass-bd)); background:var(--surface-muted); color:var(--ink); }
.set-nav-item.active {
  border:1px solid #111;
  background:#111;
  color:#fff;
  box-shadow:none;
}
html[data-theme="dark"] .set-nav-item.active {
  border-color:#424242;
  background:#262626;
  color:#f4f4f4;
}
.pill { border-color:var(--glass-bd); background:var(--surface); color:var(--ink-soft); }
.pill:hover { border-color:color-mix(in srgb,var(--ink) 34%,var(--glass-bd)); background:var(--surface-muted); color:var(--ink); }
.pill.active { border-color:#111; background:#111; color:#fff; box-shadow:none; }
html[data-theme="dark"] .pill.active { border-color:#424242; background:#262626; color:#f4f4f4; }
.set-row { border-bottom-color:var(--glass-bd); }
.tag-ok,
.tag-no { background:var(--surface-muted); color:var(--ink-soft); }
.toggle { background:var(--glass-2); }
.toggle.on { background:#242424; }
.toggle::after { background:#d8d8d8; }
html[data-theme="light"] .toggle.on { background:#111; }
.ver-badge { border-color:var(--glass-bd); background:var(--surface-muted); color:var(--ink-soft); }
.modal-bg { background:rgba(0,0,0,.72); }

@media (max-width:880px) {
  .form-side { border-left:0; background:var(--bg); }
}
@media (max-width:780px) {
  .set-nav { scrollbar-width:none; }
  .set-nav::-webkit-scrollbar { display:none; }
}
@media (hover:none) {
  :where(button,.btn,.tab,.filter,.pill,.home-btn,.balance-pill,.set-nav-item):active { transform:scale(.985); }
}
@media (prefers-reduced-motion:reduce) {
  :where(button,.btn,.tab,.filter,.pill,.home-btn,.balance-pill,.set-nav-item,.link-card) { transition-duration:.01ms !important; }
}

/* 颜色、排版与卡片统一覆盖旧页面中的黑白固定值。 */
html[data-theme] body { font-family:system-ui,-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
html[data-theme] ::selection { background:var(--account-tint); color:var(--ink); }
html[data-theme] .logo .mark { background:var(--account-action); border-color:var(--account-action); color:#fff; border-radius:10px; }
html[data-theme] :is(.avatar,.ava-big) { background:var(--account-tint); border-color:var(--glass-bd); color:var(--c3); }
html[data-theme] :is(.btn,.btn-main,.code-btn,.filter,.pill,.tab) { border-radius:12px; box-shadow:none; }
html[data-theme] :is(.btn-primary,.btn-main) { background:var(--account-action); border-color:var(--account-action); color:#fff; }
html[data-theme] :is(.btn-primary,.btn-main):hover { background:var(--account-hover); border-color:var(--account-hover); color:#fff; box-shadow:none; transform:none; }
html[data-theme] :is(.btn-primary,.btn-main):disabled { background:var(--surface-muted); border-color:var(--glass-bd); color:var(--ink-dim); }
html[data-theme] :is(.tab,.filter,.pill,.set-nav-item).active,
html[data-theme] .theme-switch button.active { background:var(--account-tint); border-color:var(--c3); color:var(--c3); box-shadow:none; }
html[data-theme] .theme-switch { background:var(--surface-muted); border-radius:12px; }
html[data-theme] .theme-switch button { border-radius:8px; }
html[data-theme] :is(.account,.stat,.card,.link-card,.work,.works-empty,.confirm-box,.lb-card) { border-radius:16px; border-color:var(--glass-bd); background:var(--surface); box-shadow:none; }
html[data-theme] :is(.page-head h1,.form-title h2,.brand-mid h1) { font-family:Georgia,"Noto Serif SC","Songti SC",SimSun,serif; font-weight:500; letter-spacing:.01em; line-height:1.35; }
html[data-theme] .page-head h1 { font-size:32px; }
html[data-theme] .form-title h2 { font-size:28px; }
html[data-theme] .ftitle { font-family:Georgia,"Noto Serif SC","Songti SC",SimSun,serif; font-size:28px; font-weight:500; line-height:1.4; }
html[data-theme] .brand-mid h1 { font-size:clamp(36px,4vw,56px); }
html[data-theme] .brand-mid h1 .grad { color:var(--ink); }
html[data-theme] :is(.stat .sv,.acc-name) { font-weight:500; }
html[data-theme] .stat .sv { font-family:Georgia,"Noto Serif SC","Songti SC",SimSun,serif; }
html[data-theme] .brand-side { background:var(--surface-muted); }
html[data-theme] .form-side { background:var(--bg); border-left-color:var(--glass-bd); }
html[data-theme] :is(.tabs,.rating-chip,.auth-note) { background:var(--surface-muted); border-color:var(--glass-bd); border-radius:12px; }
html[data-theme] .bf .ck { background:var(--account-tint); border-color:var(--glass-bd); color:var(--c3); }
html[data-theme] .input { background:var(--surface); border-color:var(--glass-bd); border-radius:12px; }
html[data-theme] .input:focus { background:var(--surface); border-color:var(--c3); box-shadow:0 0 0 3px var(--account-tint); }
html[data-theme] .agree input { accent-color:var(--account-action); }
html[data-theme] .acct-menu { border-radius:16px; box-shadow:0 4px 24px rgba(193,165,140,.14); }
html[data-theme] .acct-menu :is(a,button).current { background:var(--account-tint); color:var(--c3); }
html[data-theme] .acct-menu :is(a,button).current::after { color:var(--c3); }
/* 页内旧规则给所有 span 固定20px；动态成员入口文字应占剩余宽度。 */
html[data-theme] .acct-menu > a > [data-nav-team-label] { flex:1; min-width:0; width:auto; text-align:left; white-space:nowrap; }
html[data-theme] .acct-menu > a.current::after { flex:none; white-space:nowrap; }
html[data-theme] .invite-strip { border-color:var(--glass-bd); background:var(--account-tint); }
html[data-theme] .invite-strip .is-go { color:var(--c3); }
html[data-theme] .toggle.on { background:var(--account-action); }
html[data-theme] .toggle::after { background:var(--surface); }
html[data-theme] :where(a,button,input,textarea,select,[role="button"],[tabindex]):focus-visible { outline-color:var(--c3); box-shadow:0 0 0 4px var(--account-tint); }
html[data-theme] .modal-bg { background:rgba(41,39,36,.58); }
@media(max-width:880px) { html[data-theme] .form-side { border-left:0; } }
@media(max-width:640px) { html[data-theme] .page-head h1 { font-size:26px; } }
