/* 首页与用户中心的共同视觉；不参与账号、菜单权限和数据请求。 */
html[data-page-data][data-portal-theme="light"] {
  --surface-0: #fcfcfe;
  --surface-1: #f8f8fa;
  --surface-2: #ffffff;
  --surface-3: #f5f5f7;
  --surface-4: #efeff2;
  --surface-card: #ffffff;
  --surface-raised: #ffffff;
  --text-1: #03080a;
  --text-2: rgb(3 8 10 / 85%);
  --text-3: rgb(3 8 10 / 78%);
  --text-4: rgb(3 8 10 / 69%);
  --text-5: rgb(3 8 10 / 48%);
  --line: rgb(3 8 10 / 7.8%);
  --line-soft: rgb(3 8 10 / 6%);
  --line-faint: rgb(3 8 10 / 4%);
  --line-strong: rgb(3 8 10 / 16%);
  --border-input: var(--line);
  --border-input-hover: rgb(3 8 10 / 23%);
  --accent: #7624f4;
  --accent-strong: #6819dd;
  --accent-soft: rgb(118 36 244 / 3.1%);
  --accent-soft-2: rgb(118 36 244 / 7.8%);
  --accent-soft-3: rgb(118 36 244 / 16%);
  --tint-1: #fafafa;
  --tint-2: #f5f5f6;
  --tint-3: #eeeef1;
  --shadow-card: none;
  --shadow-section: none;
  --shadow-hover: 0 2px 8px rgb(3 8 10 / 3%);
  --shadow-modal: 0 20px 70px rgb(24 24 27 / 12%);
  --backdrop: rgb(24 24 27 / 30%);
}

html[data-page-data][data-portal-theme="dark"] {
  color-scheme: dark;
  --surface-0: #03080a;
  --surface-1: #060b0d;
  --surface-2: #080d0f;
  --surface-3: #0d1214;
  --surface-4: #151a1c;
  --surface-card: #080d0f;
  --surface-raised: #0d1214;
  --text-1: #fcfcfe;
  --text-2: rgb(252 252 254 / 90%);
  --text-3: rgb(252 252 254 / 78%);
  --text-4: rgb(252 252 254 / 62.7%);
  --text-5: rgb(252 252 254 / 45%);
  --line: rgb(252 252 254 / 7.8%);
  --line-soft: rgb(252 252 254 / 5.5%);
  --line-faint: rgb(252 252 254 / 4%);
  --line-strong: rgb(252 252 254 / 16%);
  --border-input: var(--line);
  --border-input-hover: rgb(252 252 254 / 23%);
  --accent: #c8ff00;
  --accent-strong: #d6ff47;
  --accent-soft: rgb(200 255 0 / 3.1%);
  --accent-soft-2: rgb(200 255 0 / 7.8%);
  --accent-soft-3: rgb(200 255 0 / 16%);
  --primary-fill: #c8ff00;
  --primary-fill-hover: #c8ff00e0;
  --primary-ink: #03080a;
  --tint-1: #0d1214;
  --tint-2: #151a1c;
  --tint-3: #1c2123;
  --shadow-card: none;
  --shadow-section: none;
  --shadow-hover: 0 3px 12px rgb(0 0 0 / 10%);
}

html[data-page-data] {
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --portal-header-height: 56px;
  --primary-fill: #7624f4;
  --primary-fill-hover: #6819dd;
  --primary-ink: #ffffff;
  /* 仅使用设备已有字体，不加载或分发网页字体。 */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-padding-top: 84px;
}
html[data-page-data] body { background: var(--surface-0); font-variant-numeric: tabular-nums; }

.site-header { height: var(--portal-header-height); background: var(--surface-0); border-bottom-color: var(--line); backdrop-filter: none; }
.header-inner { width: 100%; max-width: none; height: 100%; min-height: 55px; padding: 0 24px; gap: 28px; }
.brand { gap: 9px; font-size: 20px; font-weight: 600; letter-spacing: -.6px; }
.brand img { width: 27px; height: 27px; border-radius: 6px; }
.site-header nav { min-height: 55px; gap: 26px; }
.site-header nav a { color: var(--text-4); font-size: 14px; font-weight: 400; transition: color .16s ease; }
.site-header nav a:hover, .site-header nav a.active { color: var(--text-1); }
.site-header nav a.active::after { height: 2px; background: var(--text-1); }
.language-switcher, .style-switcher { height: 32px; }
.language-switcher select, .style-switcher select { font-size: 12px; border-radius: 6px; }
.account-area { min-width: auto; }
.account-button { min-height: 32px; padding: 0 12px; color: var(--text-1); border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); font-size: 14px; font-weight: 500; box-shadow: none; transition: background .15s ease, border-color .15s ease; }
.account-button:hover { filter: none; background: var(--surface-3); border-color: var(--border-input-hover); }
.account-button[hidden] { display: none; }
.account-center-link { align-items: flex-start; padding-left: 16px; border-left: 1px solid var(--line); gap: 2px; }
.account-center-title { font-size: 14px; font-weight: 500; }
.account-center-email { max-width: 160px; font-size: 12px; }

.btn, .login-submit { min-height: 32px; border: 1px solid transparent; border-radius: 6px; background: var(--primary-fill); color: var(--primary-ink); font-size: 14px; font-weight: 500; line-height: 20px; box-shadow: none; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.btn { padding: 5px 12px; }
.btn:hover, .login-submit:hover { filter: none; background: var(--primary-fill-hover); }
.btn.ghost { color: var(--text-2); background: var(--surface-2); border-color: var(--border-input); }
.btn.ghost:hover { color: var(--text-1); background: var(--surface-3); border-color: var(--border-input-hover); }
.btn.sm { min-height: 28px; font-size: 12px; padding: 3px 9px; }
.btn.danger { background: var(--status-dead); color: #fff; }
.btn:disabled, .login-submit:disabled { opacity: .45; cursor: not-allowed; }
.btn[hidden] { display: none; }
.login-submit { min-height: 40px; }
.login-card, .modal-card { border-color: var(--line); border-radius: 12px; box-shadow: var(--shadow-modal); }
.login-card { padding: 28px; }
.login-card h2 { font-size: 22px; font-weight: 600; letter-spacing: -.5px; }
.login-card .eyebrow { color: var(--text-4); font-size: 10px; letter-spacing: .12em; }
.login-card input, .modal-form input { border-radius: 7px; background: var(--surface-2); }
.login-card input:focus, .modal-form input:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft-2); }
.modal-backdrop { backdrop-filter: blur(3px); }
.muted, .login-hint { color: var(--text-4); font-size: 14px; line-height: 1.625; }
footer { max-width: 1120px; min-height: 96px; border-color: var(--line); color: var(--text-4); font-size: 12px; }
.footer-brand { font-size: 16px; font-weight: 600; letter-spacing: -.3px; }

@media (max-width: 900px) {
  .header-inner { padding-inline: 24px; gap: 20px; }
  .site-header nav { gap: 20px; }
}
@media (max-width: 620px) {
  .header-inner { min-height: 55px; padding-inline: 16px; gap: 12px; flex-wrap: nowrap; }
  .brand { font-size: 18px; }
  .brand img { width: 25px; height: 25px; }
  .site-header nav { min-height: 55px; gap: 14px; }
  .site-header nav a { font-size: 12px; }
  .language-switcher { width: 64px; min-width: 64px; }
  .style-switcher { width: 58px; min-width: 58px; }
  .language-switcher select, .style-switcher select { min-height: 44px; font-size: 11px; }
  .account-center-link { padding-left: 10px; }
  .account-center-title { font-size: 12px; }
  .account-center-email { display: none; }
  .account-button { min-height: 36px; padding-inline: 12px; font-size: 12px; }
  .btn { min-height: 40px; }
  footer { width: calc(100% - 32px); gap: 12px; }
}
@media (max-width: 420px) {
  .header-inner { gap: 8px; }
  .brand span { display: none; }
  .site-header nav { gap: 12px; }
  .language-switcher { min-width: 59px; width: 59px; }
  .style-switcher { min-width: 55px; width: 55px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-page-data] { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
