/* ========================================================================== */
/* v6：玻璃主题 / 登录协议 / 输入框内眼睛 / 用户组源站与兑换                   */
/* ========================================================================== */
html[data-theme="glass"] body {
  background-attachment: fixed;
}

html[data-theme="glass"] body::before {
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(120, 150, 255, 0.24), rgba(var(--bg-rgb), 0) 70%),
    radial-gradient(760px 480px at 92% 12%, rgba(120, 220, 230, 0.2), rgba(var(--bg-rgb), 0) 72%),
    linear-gradient(180deg, rgba(var(--bg-rgb), 0.5) 0%, rgba(var(--bg-rgb), 0.66) 60%, rgba(var(--bg-rgb), 0.78) 100%);
}

html[data-theme="glass"] .card,
html[data-theme="glass"] .auth-card {
  background: rgba(var(--surface-rgb), 0.48);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 26px 54px -30px rgba(31, 45, 80, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

html[data-theme="glass"] .topbar {
  background: rgba(var(--surface-rgb), 0.42);
  border-bottom-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

html[data-theme="glass"] .side-nav,
html[data-theme="glass"] .member-side .card {
  background: rgba(var(--surface-rgb), 0.4);
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}

html[data-theme="glass"] .auth-card {
  padding: 32px 28px;
}

html[data-mode="dark"][data-theme="glass"] .card,
html[data-mode="dark"][data-theme="glass"] .auth-card {
  background: rgba(var(--surface-rgb), 0.4);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 64px -28px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-mode="dark"][data-theme="glass"] .topbar,
html[data-mode="dark"][data-theme="glass"] .side-nav,
html[data-mode="dark"][data-theme="glass"] .member-side .card {
  background: rgba(var(--surface-rgb), 0.36);
  border-color: rgba(255, 255, 255, 0.12);
}

/* 输入框内眼睛图标 / 记住我 / 协议勾选 */
.input-wrap {
  position: relative;
  display: block;
}

.input-wrap .input {
  padding-right: 42px;
}

.input-icon-btn {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transform: translateY(-50%);
}

.input-icon-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 2px 0 14px;
  font-size: 13px;
  color: var(--text-soft);
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.check-line input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.legal-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
}

.legal-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.legal-link:hover {
  text-decoration: underline;
}

.legal-content {
  max-height: 52vh;
  overflow-y: auto;
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.7;
  word-break: break-word;
}

.legal-content h2,
.legal-content h3 {
  margin: 14px 0 8px;
  color: var(--text);
}

.legal-content p {
  margin: 0 0 10px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 10px;
  padding-left: 22px;
}

.legal-content mark {
  padding: 0 3px;
  border-radius: 3px;
  background: var(--gold-soft);
  color: var(--gold);
}

.legal-content img {
  display: block;
  max-width: 100%;
  margin: 12px 0;
  border-radius: 10px;
}

.legal-figure {
  display: block;
  max-width: 100%;
  margin: 12px 0;
  border-radius: 10px;
}

/* 用户组源站 chips / 徽章 / 到期 */
.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.6);
  color: var(--text-soft);
  font-size: 11.5px;
}

.source-chip i {
  color: var(--primary);
  font-size: 10px;
}

.group-badge {
  border-width: 1px;
  border-style: solid;
}

.badge-expiry {
  background: rgba(var(--line-rgb), 0.12);
  color: var(--muted);
}

.user-head-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 用户组 tab 内的兑换卡 */
.redeem-card .form-row {
  max-width: 520px;
}

html[data-theme="glass"] .purchase-bar,
html[data-theme="glass"] .group-card,
html[data-theme="glass"] .contact-card {
  background: rgba(var(--surface-rgb), 0.4);
  border-color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
}

html[data-mode="dark"][data-theme="glass"] .purchase-bar,
html[data-mode="dark"][data-theme="glass"] .group-card,
html[data-mode="dark"][data-theme="glass"] .contact-card {
  border-color: rgba(255, 255, 255, 0.12);
}

/* v6b：移动端弹窗 / 布局对齐（v12：不再全屏铺满，保留卡片样式与主题） */
@media (max-width: 640px) {
  .modal-mask {
    padding: 12px;
    align-items: center;
    overflow-y: auto;
  }

  .modal,
  .legal-modal {
    width: 100%;
    max-width: 520px;
    max-height: calc(100dvh - 24px);
    margin: auto;
    border-radius: var(--radius-lg);
  }

  .legal-content {
    max-height: 62dvh;
  }

  .topbar-inner {
    flex-wrap: wrap;
  }

  .member-layout {
    gap: 12px;
  }
}

/* ========================================================================== */
/* v8：顶栏图标 / 个人信息 / 徽章边框 / 移动端留白                              */
/* ========================================================================== */
.brand {
  min-width: 0;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0 !important;
  border-radius: 50%;
  color: var(--text-soft);
  font-size: 15px;
  text-decoration: none;
}

.icon-link:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.icon-link.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.notify-box {
  flex: 0 0 auto;
}

.topnav {
  flex-wrap: nowrap;
}

.profile-card {
  border-width: 1px;
  border-style: solid;
}

.profile-card .card-title .badge {
  flex: 0 0 auto;
}

.group-card-title {
  display: flex;
  align-items: center;
  margin: 0;
}

.group-card-title .badge {
  font-size: 14px;
  font-weight: 600;
}

.profile-value .badge {
  vertical-align: middle;
}

@media (max-width: 768px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .topbar-inner {
    min-height: 56px;
    gap: 8px;
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 15px;
  }

  .topnav {
    gap: 2px;
  }

  .icon-link {
    width: 32px;
    height: 32px;
  }

  .notify-btn {
    min-width: 32px;
    height: 32px;
  }

  .side-logout {
    display: none;
  }

  .main {
    padding: 16px 0 28px;
  }

  .member-layout {
    gap: 12px;
  }

  .member-main > .card {
    padding: 16px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .purchase-bar,
  .group-card,
  .contact-card,
  .profile-card {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 420px) {
  /* v21：放宽站点标题截断宽度，按屏幕宽度自适应 */
  .brand-text strong {
    max-width: min(56vw, 200px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}




/* v8: 顶部通知面板手机端不溢出 */
.notify-panel {
  max-width: calc(100vw - 24px);
}
:root {
  --na-overlay: linear-gradient(180deg, rgba(var(--bg-rgb), 0.18) 0%, rgba(var(--bg-rgb), 0.24) 55%, rgba(var(--bg-rgb), 0.32) 100%);
}

/* ========================================================================== */
/* v8.4：移动端卡片左右留白（不再贴边）                                        */
/* ========================================================================== */
@media (max-width: 768px) {
  .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar-inner {
    padding-left: 0;
    padding-right: 0;
  }

  .member-layout {
    gap: 14px;
  }

  .member-main > .card,
  .member-side .card,
  .auth-card,
  .card,
  .purchase-bar,
  .group-card,
  .contact-card,
  .profile-card {
    box-sizing: border-box;
    width: 100%;
  }

  .member-main > .card {
    padding: 18px;
  }

  /* 用户组 / 联系人群组网格在手机上单列，避免被挤压变形 */
  .group-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  /* 侧栏横向导航两侧留白，避免首尾项贴边 */
  .side-nav {
    padding: 8px 10px;
  }

  .side-nav a {
    padding: 8px 12px;
  }
}

/* 小屏进一步收敛边距，保证内容区至少 14px 留白 */
@media (max-width: 420px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .member-main > .card {
    padding: 16px 14px;
  }

  .group-grid,
  .contact-grid {
    gap: 10px;
  }
}

/* ========================================================================== */
/* v9：公告（顶部栏 / 弹窗）、消息多选、图片徽章、独占源站高亮                */
/* ========================================================================== */

/* --- 顶部栏下方公告 --- */
.topbar-notices {
  position: relative;
  z-index: 30;
  padding: 10px 0 2px;
}

.topbar-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  padding: 11px 14px;
  border: 1px solid rgba(var(--primary-rgb), 0.28);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  background: rgba(var(--surface-rgb), 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px -12px rgba(70, 40, 25, 0.5);
}

.topbar-notice-icon {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--primary);
  font-size: 14px;
}

.topbar-notice-body {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-notice-body strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13.5px;
  color: var(--text);
}

.topbar-notice-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.topbar-notice-close {
  flex: 0 0 auto;
  align-self: center;
  font-size: 12px;
  white-space: nowrap;
}

/* --- 弹窗公告 --- */
.notice-modal {
  width: min(92vw, 480px);
}

.notice-content {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 52vh;
  overflow-y: auto;
}

.notice-actions {
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notice-tip {
  color: var(--muted);
  font-size: 12px;
}

/* --- 消息多选 --- */
.msg-select-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(var(--surface-rgb), 0.6);
}

.msg-select-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.msg-item.msg-selected {
  border-color: rgba(var(--primary-rgb), 0.5);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.12);
}

.msg-check {
  display: inline-flex;
  align-items: center;
  margin-right: 2px;
  cursor: pointer;
}

.msg-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.msg-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.msg-del-btn {
  color: var(--muted);
}

.msg-del-btn:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}

/* --- 用户组图片徽章 ---
 * 同时兼容方形图标与长条形横版：
 * - 高度上限 20px（与文字徽章行高一致）
 * - 宽度上限 140px（4:1 以内长条图可完整等比展示）
 * - width/height:auto + object-fit:contain 保证任何比例都不拉伸变形
 */
.group-badge-img {
  display: block;
  width: auto;
  height: auto;
  max-height: 20px;
  max-width: 140px;
  min-height: 0;
  object-fit: contain;
  object-position: left center;
  border-radius: 3px;
  /* 防止未加载完成时撑高布局 */
  vertical-align: middle;
}

.badge.group-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

/* 图片徽章时去掉文字徽章的内边距，让图片更贴合 */
.badge.group-badge:has(.group-badge-img) {
  padding: 2px 4px;
  background: transparent;
}

/* --- 本组独有源站高亮 --- */
.source-chip.exclusive {
  border-color: rgba(var(--primary-rgb), 0.55);
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  font-weight: 600;
}

.source-chip.exclusive i {
  color: var(--primary);
}

/* 移动端公告条更紧凑 */
@media (max-width: 640px) {
  .topbar-notice {
    padding: 10px 12px;
  }

  .topbar-notice-close span {
    display: none;
  }

  .msg-select-actions {
    width: 100%;
    margin-left: 0;
  }

  .notice-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ========================================================================== */
/* v10：书源 / 订阅源页                                                       */
/* ========================================================================== */

/* 类型切换 */
.source-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.55);
}

.source-tab {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.source-tab:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.source-tab.active {
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 600;
  box-shadow: 0 6px 16px -10px rgba(var(--primary-rgb), 0.9);
}

.source-tab-ver {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.35);
  font-size: 11px;
  font-weight: 500;
}

.source-tab.active .source-tab-ver {
  background: rgba(255, 255, 255, 0.25);
}

/* 顶部信息卡 */
.source-hero {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(var(--surface-rgb), 0.6);
}

.source-hero-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.source-hero-title {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.source-badge {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  color: var(--primary-ink);
  font-size: 18px;
}

.source-hero-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.source-hero-ver {
  color: var(--muted);
  font-size: 12.5px;
}

.source-hero-ver strong {
  color: var(--primary);
  font-size: 14px;
}

.source-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 更新提示语 */
.source-msg {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.source-msg-muted {
  background: rgba(var(--line-rgb), 0.1);
  color: var(--muted);
}

/* 导入链接 */
.source-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(var(--surface-rgb), 0.5);
}

.source-link-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.9;
}

.source-link-text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  word-break: break-all;
  user-select: all;
}

.source-badge-force {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

/* 本次更新 / 历史更新 */
.source-update-card {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  background: rgba(var(--surface-rgb), 0.6);
}

.source-update-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

.source-update-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.source-update-date {
  color: var(--muted);
  font-size: 12px;
}

.source-update-list {
  margin: 0;
  padding-left: 19px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.85;
  word-break: break-word;
}

.source-update-list li {
  margin: 2px 0;
}

.source-update-list li.muted {
  color: var(--muted);
  list-style: none;
  margin-left: -6px;
}

/* 历史更新折叠 */
.source-history {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(var(--surface-rgb), 0.5);
}

.source-history-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.source-history-toggle:hover {
  background: var(--primary-soft);
}

.source-history-body {
  padding: 0 16px 12px;
}

.source-history-item {
  padding: 10px 0;
  border-top: 1px dashed var(--border);
}

.source-history-item:first-child {
  border-top: 0;
}

.source-history-date {
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
}

.source-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* 移动端 */
@media (max-width: 640px) {
  .source-hero-main {
    flex-direction: column;
    align-items: stretch;
  }

  .source-actions {
    width: 100%;
  }

  .source-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .source-link {
    flex-direction: column;
    gap: 3px;
  }
}

/* ========================================================================== */
/* v12：昵称行内组徽章 / 弹窗主题适配 / 公告样式                               */
/* ========================================================================== */

/* 昵称 + 组徽章同一行 */
.user-hero-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.user-hero-name-row .user-hero-name {
  flex: 0 1 auto;
}

.user-hero-name-row .badge.group-badge {
  flex: 0 0 auto;
  padding: 1px 8px;
  font-size: 11.5px;
  line-height: 1.6;
}

/* 图片徽章在行内的小尺寸 */
.user-hero-name-row .group-badge-img {
  max-height: 16px;
  max-width: 72px;
}

/* 弹窗：显式主题背景，避免纯白 */
.modal,
.legal-modal,
.notice-modal {
  background: var(--surface);
  color: var(--text);
}

html[data-theme="glass"] .modal,
html[data-theme="glass"] .legal-modal,
html[data-theme="glass"] .notice-modal {
  background: rgba(var(--surface-rgb), 0.92);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}

html[data-mode="dark"][data-theme="glass"] .modal,
html[data-mode="dark"][data-theme="glass"] .legal-modal,
html[data-mode="dark"][data-theme="glass"] .notice-modal {
  background: rgba(var(--surface-rgb), 0.94);
  border-color: rgba(255, 255, 255, 0.14);
}

.modal-body {
  min-height: 0;
  overflow-y: auto;
}

/* 弹窗公告重设计 */
.notice-modal {
  width: min(92vw, 460px);
  padding: 0;
  overflow: hidden;
}

.notice-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 20px 20px 0;
}

.notice-modal-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  color: var(--primary-ink);
  font-size: 16px;
}

.notice-modal-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding-top: 3px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.notice-modal-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.notice-modal-close:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.notice-modal-body {
  max-height: 52vh;
  overflow-y: auto;
  padding: 14px 20px 4px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.78;
  white-space: pre-wrap;
  word-break: break-word;
}

.notice-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border-soft);
  background: rgba(var(--line-rgb), 0.04);
}

.notice-modal-foot .check-line {
  font-size: 12.5px;
  color: var(--muted);
}

.notice-modal-foot .btn {
  flex: 0 0 auto;
}

/* 顶部栏公告优化 */
.topbar-notice {
  border-radius: var(--radius);
}

.topbar-notice-close {
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  font-weight: 600;
}

.topbar-notice-close:hover {
  background: rgba(var(--primary-rgb), 0.18);
}

@media (max-width: 640px) {
  .notice-modal {
    width: 100%;
    max-width: 480px;
  }

  .notice-modal-body {
    max-height: 46vh;
  }

  .notice-modal-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .notice-modal-foot .btn {
    width: 100%;
  }

  .user-hero-name-row .badge.group-badge {
    font-size: 11px;
  }
}


/* ===== v41 概览：消息通知 / 我的反馈 ===== */
.feedback-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}
.feedback-tab {
  border: 1px solid var(--border, rgba(120, 100, 90, .18));
  background: transparent;
  color: var(--muted, #857a70);
  border-radius: 999px;
  padding: 6px 13px;
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.feedback-tab.active {
  border-color: var(--primary, #c01e25);
  background: rgba(192, 30, 37, .08);
  color: var(--primary, #c01e25);
  font-weight: 600;
}
.feedback-list { display: flex; flex-direction: column; gap: 10px; }
.feedback-item {
  border: 1px solid var(--border, rgba(120, 100, 90, .16));
  border-radius: 12px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, .28);
}
.feedback-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-item-head strong { font-size: 13.5px; }
.feedback-status { font-size: 11.5px; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.feedback-status-0 { color: #b26a00; background: rgba(245, 158, 11, .12); }
.feedback-status-1 { color: #16855b; background: rgba(16, 185, 129, .12); }
.feedback-status-2 { color: var(--muted, #857a70); background: rgba(120, 100, 90, .10); }
.feedback-meta { margin: 6px 0 0; font-size: 12.5px; line-height: 1.55; }
.feedback-meta.muted { color: var(--muted, #857a70); }
.feedback-time { margin: 6px 0 0; color: var(--muted, #857a70); font-size: 11.5px; }
.feedback-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; color: var(--muted, #857a70); font-size: 12.5px; }
.side-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-nav .nav-unread { font-size: 10px; min-width: 18px; text-align: center; padding: 1px 5px; }
