/* 全站排版：共用字体栈、暖白底配色、顶栏/底栏与各页面板；每页最后加载，只覆盖视觉不改结构。
   活动主题（body.mode-*）自带配色，不受本文件影响。首页细节见 home-typography.css。 */
body:not([class*="mode-"]) {
  --ui-font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", -apple-system, sans-serif;
  --font-sans: var(--ui-font);
  --font-rounded: var(--ui-font);
  --ui-bg: #f6f4f1;
  --ui-surface: #ffffff;
  --ui-sunken: #f7f5f2;
  --ui-ink: #1c1917;
  --ui-body: #3f3a36;
  --ui-muted: #78716c;
  --ui-faint: #a8a29e;
  --ui-line: rgba(28, 25, 23, 0.08);
  --ui-line-strong: rgba(28, 25, 23, 0.14);
  --ui-accent: #d9467d;
  --ui-accent-soft: rgba(217, 70, 125, 0.08);
  background: var(--ui-bg) !important;
  color: var(--ui-ink);
  font-family: var(--ui-font);
  letter-spacing: 0 !important;
}

html[data-theme="dark"] body:not([class*="mode-"]) {
  --ui-bg: #0f1218;
  --ui-surface: #171b24;
  --ui-sunken: #1e2330;
  --ui-ink: #f1f5f9;
  --ui-body: #cbd5e1;
  --ui-muted: #94a3b8;
  --ui-faint: #718096;
  --ui-line: rgba(255, 255, 255, 0.08);
  --ui-line-strong: rgba(255, 255, 255, 0.16);
  --ui-accent: #f08fb5;
  --ui-accent-soft: rgba(240, 143, 181, 0.12);
}

body:not([class*="mode-"]) :is(button, input, textarea, select, .nav-link) {
  font-family: var(--ui-font) !important;
}

/* 背景光晕会让暖色底显脏，只保留纯净底色。 */
body:not([class*="mode-"]) :is(.page-glow, .glow-orb, .login-orb, .reg-orb) {
  display: none !important;
}

body:not([class*="mode-"]) .main-content {
  background: transparent !important;
}

/* 顶栏：实色品牌字、半透明暖白底。 */
body:not([class*="mode-"]) .navbar {
  background: color-mix(in srgb, var(--ui-bg) 86%, transparent) !important;
  border-bottom: 1px solid var(--ui-line) !important;
  box-shadow: none !important;
}

body:not([class*="mode-"]) .nav-logo,
body:not([class*="mode-"]) .nav-logo span {
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--ui-ink) !important;
  font-family: var(--ui-font) !important;
  font-size: 1.12rem !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}

body:not([class*="mode-"]) .nav-logo .home-icon {
  color: var(--ui-accent) !important;
}

body:not([class*="mode-"]) .nav-link {
  color: var(--ui-muted) !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

body:not([class*="mode-"]) .nav-link:hover,
body:not([class*="mode-"]) .nav-link.active {
  color: var(--ui-ink) !important;
}

body:not([class*="mode-"]) .btn-register {
  background: var(--ui-ink) !important;
  border-color: var(--ui-ink) !important;
  box-shadow: none !important;
  color: var(--ui-bg) !important;
}

body:not([class*="mode-"]) .btn-login {
  border-color: var(--ui-line-strong) !important;
  background: transparent !important;
  color: var(--ui-ink) !important;
}

body:not([class*="mode-"]) .footer {
  background: transparent !important;
  border-top: 1px solid var(--ui-line) !important;
  color: var(--ui-faint) !important;
}

/* 各页主面板：白底、细描边、无投影、统一圆角。 */
body:not([class*="mode-"]) :is(
  .radio-card, .radio-form-card, .hot-songs-section,
  .detail-card, .comment-section,
  .post-form-card,
  .profile-card, .profile-tabs-section,
  .edit-profile-card, .feedback-card, .agreement-card,
  .login-card, .register-card, .reset-card
) {
  border: 1px solid var(--ui-line) !important;
  border-radius: 16px !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

/* 面板顶部的彩色装饰线去掉。 */
body:not([class*="mode-"]) :is(.comment-section, .post-form-card)::before {
  display: none !important;
}

/* 个人中心：积分卡、统计格、签到按钮与标签栏去掉粉色渐变。 */
body.profile-page:not([class*="mode-"]) :is(#profileInfo .profile-points-info, .profile-stat, .profile-action-btn) {
  border: 1px solid var(--ui-line) !important;
  background: var(--ui-sunken) !important;
  box-shadow: none !important;
}

body.profile-page:not([class*="mode-"]) #profileInfo .profile-points-total strong {
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--ui-accent) !important;
}

body.profile-page:not([class*="mode-"]) .btn-checkin {
  border: 0 !important;
  background: var(--ui-ink) !important;
  box-shadow: none !important;
  color: var(--ui-surface) !important;
}

body.profile-page:not([class*="mode-"]) .btn-wechat-bind {
  background: #07c160 !important;
  box-shadow: none !important;
}

body.profile-page:not([class*="mode-"]) .profile-tabs {
  border-bottom: 1px solid var(--ui-line) !important;
  background: transparent !important;
}

body.profile-page:not([class*="mode-"]) .profile-stat-label {
  color: var(--ui-muted) !important;
}

body.edit-profile-page:not([class*="mode-"]) :is(.edit-profile-header, .edit-profile-footer) {
  background: transparent !important;
  border-color: var(--ui-line) !important;
}

/* 渐变标题字改为实色墨字。 */
body:not([class*="mode-"]) :is(
  .radio-title, .login-title, .register-title, .comment-title,
  .side-deco-title, .profile-stat-number, .error-illustration
) {
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--ui-ink) !important;
  letter-spacing: 0 !important;
}

body:not([class*="mode-"]) :is(.radio-title, .login-title, .register-title) {
  font-weight: 650 !important;
}

body:not([class*="mode-"]) :is(.radio-subtitle, .page-subtitle) {
  color: var(--ui-muted) !important;
  letter-spacing: 0 !important;
}

/* 主操作按钮：墨色实底，去掉渐变与发光。 */
body:not([class*="mode-"]) :is(
  .btn-publish, .btn-comment-submit, .login-btn, .register-btn,
  .btn-reset, .btn-home, .edit-post-page .btn-primary, .feedback-card .submit-btn,
  .edit-profile-save-btn
) {
  border-color: var(--ui-ink) !important;
  background: var(--ui-ink) !important;
  box-shadow: none !important;
  color: var(--ui-surface) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

body:not([class*="mode-"]) :is(.btn-publish, .btn-comment-submit, .login-btn, .register-btn, .btn-reset, .btn-home, .feedback-card .submit-btn, .edit-profile-save-btn):hover:not(:disabled) {
  opacity: 0.88;
  transform: none !important;
}

body:not([class*="mode-"]) :is(.btn-publish, .login-btn, .register-btn, .btn-reset):disabled {
  opacity: 0.45;
}

/* 次级按钮与返回链接：描边胶囊。 */
body:not([class*="mode-"]) :is(.back-link, .back-btn, .edit-profile-back-btn, .btn-preview, .btn-save-draft) {
  border: 1px solid var(--ui-line-strong) !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
  color: var(--ui-ink) !important;
}

/* 表单输入：细描边、聚焦时浅色光圈。 */
body:not([class*="mode-"]) :is(
  .radio-form-card, .post-form-card, .comment-section, .edit-profile-card,
  .feedback-card, .login-card, .register-card, .reset-card
) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), textarea, select) {
  border-color: var(--ui-line-strong) !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
  color: var(--ui-ink) !important;
}

body:not([class*="mode-"]) :is(
  .radio-form-card, .post-form-card, .comment-section, .edit-profile-card,
  .feedback-card, .login-card, .register-card, .reset-card
) :is(input, textarea, select):focus {
  border-color: var(--ui-ink) !important;
  box-shadow: 0 0 0 3px var(--ui-accent-soft) !important;
  outline: none;
}

body:not([class*="mode-"]) :is(input, textarea)::placeholder {
  color: var(--ui-faint);
}

body:not([class*="mode-"]) .comment-input-wrapper {
  border: 1px solid var(--ui-line-strong) !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

/* 选中态：标签页用浅玫瑰底，排序为下划线。 */
body:not([class*="mode-"]) .profile-tab.active {
  background: var(--ui-accent-soft) !important;
  box-shadow: none !important;
  color: color-mix(in srgb, var(--ui-accent) 80%, var(--ui-ink) 20%) !important;
  border-color: color-mix(in srgb, var(--ui-accent) 20%, transparent) !important;
}

body:not([class*="mode-"]):not(.home-page) .sort-btn {
  position: relative;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ui-faint) !important;
}

body:not([class*="mode-"]):not(.home-page) .sort-btn.active {
  color: var(--ui-ink) !important;
  font-weight: 700 !important;
}

body:not([class*="mode-"]):not(.home-page) .sort-btn.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--ui-accent);
  transform: translateX(-50%);
}

body:not([class*="mode-"]) .comment-count {
  background: var(--ui-sunken) !important;
  color: var(--ui-muted) !important;
}

body:not([class*="mode-"]) .radio-notice-bar {
  border: 1px solid var(--ui-line) !important;
  background: var(--ui-accent-soft) !important;
  box-shadow: none !important;
  color: var(--ui-ink) !important;
}

/* 点歌页状态框与留言气泡跟随明暗主题（原深色下为白底）。 */
body.radio-page:not([class*="mode-"]) .radio-state {
  border-color: var(--ui-line-strong) !important;
  background: var(--ui-sunken) !important;
  color: var(--ui-muted) !important;
}

body.radio-page:not([class*="mode-"]) .radio-state-retry {
  border: 1px solid var(--ui-line-strong) !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
  color: var(--ui-ink) !important;
}

body.radio-page:not([class*="mode-"]) :is(.song-msg-bubble, .my-song-msg, .hot-song-message) {
  background: var(--ui-sunken) !important;
  box-shadow: none !important;
  color: var(--ui-body) !important;
}

/* 帖子详情正文层级与首页一致。 */
body.post-detail-page:not([class*="mode-"]) .detail-card :is(.post-title, .detail-title, h1) {
  color: var(--ui-ink) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}

body.post-detail-page:not([class*="mode-"]) .detail-card :is(.post-content, .detail-content) {
  color: var(--ui-body) !important;
  font-size: 16px !important;
  line-height: 1.9 !important;
  letter-spacing: 0 !important;
}

/* 登录/注册侧栏：墨色底白字，替代粉紫渐变。 */
body:not([class*="mode-"]) .auth-side {
  background: var(--ui-ink) !important;
  box-shadow: none !important;
  color: var(--ui-bg) !important;
}

body:not([class*="mode-"]) .auth-side :is(h2, p, span, div) {
  color: inherit !important;
}

body:not([class*="mode-"]) .auth-side-icon {
  background: rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body:not([class*="mode-"]) .auth-side {
  border: 1px solid var(--ui-line);
  background: var(--ui-sunken) !important;
  color: var(--ui-ink) !important;
}

/* 404：body 与内层同名 .error-page，body 不再作为横向 flex，页脚回到下方。 */
body.error-page:not([class*="mode-"]) {
  display: block !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.error-page:not([class*="mode-"]) .error-page {
  width: 100%;
  background: transparent !important;
}

body.error-page:not([class*="mode-"]) .error-decorations {
  display: none !important;
}

body.error-page:not([class*="mode-"]) .error-content {
  border: 1px solid var(--ui-line) !important;
  border-radius: 20px !important;
  background: var(--ui-surface) !important;
  box-shadow: none !important;
}

body.error-page:not([class*="mode-"]) .error-404-number {
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  color: var(--ui-ink) !important;
}

body.error-page:not([class*="mode-"]) .error-subtitle {
  color: var(--ui-muted) !important;
}

@media (max-width: 768px) {
  body:not([class*="mode-"]) .bottom-tab-bar {
    background: color-mix(in srgb, var(--ui-surface) 92%, transparent) !important;
    border-top: 1px solid var(--ui-line) !important;
    box-shadow: none !important;
  }

  body.post-detail-page:not([class*="mode-"]) .detail-card :is(.post-title, .detail-title, h1) {
    font-size: 19px !important;
  }

  body.post-detail-page:not([class*="mode-"]) .detail-card :is(.post-content, .detail-content) {
    font-size: 15.5px !important;
    line-height: 1.85 !important;
  }
}
