/* Next-Forum — 现代社区界面 */
:root {
  --primary: #4d698e;
  --link-color: var(--primary);
  --primary-dark: color-mix(in srgb, var(--primary) 80%, #000);
  --primary-light: color-mix(in srgb, var(--primary) 12%, #fff);
  --body-bg: #fff;
  --page-bg: #fff;
  --card-bg: #fff;
  --control-bg: #e8ecf3;
  --control-color: #667c99;
  --text: #111;
  --text-muted: #667c99;
  --text-light: #8393a8;
  --border: #e3e8ef;
  --header-bg: #fff;
  --hover-bg: #f2f5f9;
  --shadow: 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg: 0 6px 24px rgba(0,0,0,.14);
  --danger: #d83e3e;
  --success: #2f9e44;
  --warning: #e8a317;
  --radius: 4px;
  --radius-lg: 8px;
  --reward-bg: #fff7e6;
  --reward-text: #8a5a00;
  --reward-solved-bg:#e8f5e9;
  --reward-solved-text:#2e7d32;
  --hide-bg:#fffbea;
  --hide-text:#8a6d00;
  --header-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
    --primary-light: color-mix(in srgb, var(--primary) 25%, #1a1f27);
    --body-bg: #14181e;
    --page-bg: #14181e;
    --card-bg: #1b2028;
    --control-bg: #262d38;
    --control-color: #a7b4c6;
    --text: #e5e9ef;
    --text-muted: #9aa8bb;
    --text-light: #7e8ca0;
    --border: #2a313c;
    --header-bg: #1b2028;
    --hover-bg: #232a34;
    --shadow: 0 2px 6px rgba(0,0,0,.4);
    --shadow-lg: 0 6px 24px rgba(0,0,0,.6);
    --link-color:#a8c7f0; --reward-bg:#3a2f17; --reward-text:#f5d391; --reward-solved-bg:#17362a; --reward-solved-text:#a8e2bf; --hide-bg:#2e2814; --hide-text:#e8d38a;
    color-scheme: dark;

}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --primary-light: color-mix(in srgb, var(--primary) 25%, #1a1f27);
    --body-bg: #14181e;
    --page-bg: #14181e;
    --card-bg: #1b2028;
    --control-bg: #262d38;
    --control-color: #a7b4c6;
    --text: #e5e9ef;
    --text-muted: #9aa8bb;
    --text-light: #7e8ca0;
    --border: #2a313c;
    --header-bg: #1b2028;
    --hover-bg: #232a34;
    --shadow: 0 2px 6px rgba(0,0,0,.4);
    --shadow-lg: 0 6px 24px rgba(0,0,0,.6);
    --link-color:#a8c7f0; --reward-bg:#3a2f17; --reward-text:#f5d391; --reward-solved-bg:#17362a; --reward-solved-text:#a8e2bf; --hide-bg:#2e2814; --hide-text:#e8d38a;
    color-scheme: dark;

  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.6; color: var(--text); background: var(--body-bg); padding-top: var(--header-h); }
a { color: var(--link-color); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 12px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
code { background: var(--control-bg); padding: 1px 5px; border-radius: 3px; font-size: 12.5px; word-break: break-all; }
pre { white-space: pre-wrap; word-break: break-word; }
img { max-width: 100%; }
.muted { color: var(--text-muted); }
.inline { display: inline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 820px; }
[hidden] { display: none !important; }

/* ---------- 按钮与表单 ---------- */
.Button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 13px; font-size: 13px; font-weight: 600; line-height: 20px;
  border: 0; border-radius: var(--radius); background: var(--control-bg); color: var(--control-color); cursor: pointer; white-space: nowrap; font-family: inherit; text-decoration: none !important; transition: background .15s, color .15s; }
.Button:hover { background: color-mix(in srgb, var(--control-bg) 85%, #000); }
.Button:disabled, .Button.is-disabled { opacity: .55; cursor: not-allowed; }
.Button--primary { background: var(--primary); color: #fff; }
.Button--primary:hover { background: var(--primary-dark); color: #fff; }
.Button--danger { background: var(--danger); color: #fff; }
.Button--danger:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
.Button--text, .Button--link { background: transparent; color: var(--text-muted); padding: 4px 8px; font-weight: 500; }
.Button--text:hover, .Button--link:hover { background: var(--hover-bg); color: var(--text); }
.Button--danger-text { color: var(--danger); }
.Button--block { display: flex; width: 100%; }
.Button--lg { padding: 11px 26px; font-size: 15px; }
.Button--hero { background: rgba(255,255,255,.18); color: #fff; }
.Button--hero:hover { background: rgba(255,255,255,.3); }
.Button--icon { background: transparent; border: 0; font-size: 18px; cursor: pointer; padding: 6px 8px; border-radius: 50%; position: relative; color: var(--text-muted); text-decoration: none !important; }
.Button--icon:hover { background: var(--hover-bg); }
.Button.is-active { background: var(--primary); color: #fff; }
.FormControl { display: block; width: 100%; padding: 8px 12px; font-size: 14px; line-height: 1.5; font-family: inherit; color: var(--text); background: var(--control-bg);
  border: 2px solid transparent; border-radius: var(--radius); transition: border-color .15s, background .15s; }
.FormControl:focus { outline: 0; background: var(--card-bg); border-color: var(--primary); }
textarea.FormControl { resize: vertical; min-height: 60px; }
select.FormControl { padding-right: 28px; }
.FormControl--sm { width: 86px; display: inline-block; padding: 5px 8px; }
.FormControl--title { font-size: 18px; font-weight: 600; }
.FormControl--color { height: 40px; padding: 2px; width: 70px; }
.Form-group { margin-bottom: 14px; }
.Form-group > label, .Form-group label:first-child:not(.Form-check) { display: block; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); font-size: 13px; }
.Form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.Form-row > .Form-group { flex: 1 1 160px; }
.Form-row > .FormControl { flex: 1 1 140px; width: auto; }
.Form-row > .FormControl--sm { flex: 0 0 86px; }
.Form-grow { flex: 2 1 240px !important; }
.Form-stack > * + * { margin-top: 10px; }
.Form-check { display: flex !important; align-items: center; gap: 6px; font-weight: normal !important; color: var(--text) !important; margin: 8px 0; cursor: pointer; }
.Form-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0; }
.Form-checks label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.Form-help { color: var(--text-light); font-size: 12px; margin-top: 4px; }
.Form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.req { color: var(--danger); font-style: normal; }

/* ---------- 顶栏 ---------- */
.App-header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); background: var(--header-bg); box-shadow: 0 2px 6px rgba(0,0,0,.08); z-index: 100; }
.App-header-inner { display: flex; align-items: center; height: 100%; gap: 14px; }
.Header-title { font-size: 18px; font-weight: 700; color: var(--text); white-space: nowrap; text-decoration: none !important; }
.Header-menu { display: none; }
.Header-links { display: flex; gap: 2px; }
.Header-links a { color: var(--text-muted); padding: 6px 10px; border-radius: var(--radius); font-weight: 600; font-size: 13px; text-decoration: none; }
.Header-links a:hover, .Header-links a.active { background: var(--hover-bg); color: var(--text); }
.Header-search { position: relative; flex: 1; max-width: 260px; margin-left: auto; }
.Header-search input { width: 100%; padding: 6px 12px 6px 32px; border-radius: 16px; border: 2px solid transparent; background: var(--control-bg); color: var(--text); font-size: 13px; font-family: inherit; }
.Header-search input:focus { outline: 0; border-color: var(--primary); background: var(--card-bg); }
.Header-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: .6; }
.Header-controls { display: flex; align-items: center; gap: 6px; }
.Header-user { display: flex; align-items: center; gap: 6px; background: transparent; border: 0; cursor: pointer; padding: 4px 8px; border-radius: 18px; color: var(--text-muted); font-weight: 600; font-family: inherit; font-size: 13px; }
.Header-user:hover { background: var(--hover-bg); }
.Badge-count { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.Badge-count--inline { position: static; display: inline-block; }

/* ---------- 下拉菜单 ---------- */
.Dropdown { position: relative; display: inline-block; }
.Dropdown-menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; min-width: 180px; background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px 0; z-index: 200; border: 1px solid var(--border); }
.Dropdown.is-open > .Dropdown-menu { display: block; }
.Dropdown-menu--right { left: auto; right: 0; }
.Dropdown-menu > a, .Dropdown-menu > form > button { display: block; width: 100%; padding: 8px 16px; color: var(--text); text-align: left; background: none; border: 0; font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.Dropdown-menu > a:hover, .Dropdown-menu > form > button:hover { background: var(--hover-bg); }
.Dropdown-sep { height: 1px; background: var(--border); margin: 6px 0; }
.NotificationList { width: 340px; max-height: 420px; overflow: auto; padding: 0; }
.NotificationList-header { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.NotificationItem { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.NotificationItem:hover { background: var(--hover-bg); }
.NotificationItem.unread { background: var(--primary-light); }
.NotificationItem-msg { display: block; font-size: 13px; }
.NotificationItem-time { color: var(--text-light); font-size: 12px; }
.NotificationList-empty { padding: 30px; text-align: center; color: var(--text-muted); }

/* ---------- 头像 ---------- */
.Avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; object-fit: cover; flex-shrink: 0; vertical-align: middle; background: var(--control-bg); user-select: none; }
.Avatar--sm { width: 24px; height: 24px; font-size: 12px; }
.Avatar--md { width: 36px; height: 36px; font-size: 16px; }
.Avatar--lg { width: 64px; height: 64px; font-size: 28px; }
.Avatar--xl { width: 96px; height: 96px; font-size: 42px; }
.OnlineDot { position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; border-radius: 50%; background: #2ecc71; border: 2px solid var(--card-bg); }
.OnlineDot--lg { width: 18px; height: 18px; right: 4px; bottom: 4px; }
.OnlineTag { color: #2ecc71; font-size: 12px; }

/* ---------- Hero ---------- */
.Hero { background: var(--primary); color: #fff; padding: 30px 0; margin-bottom: 22px; text-align: center; }
.Hero a { color: #fff; }
.Hero-title { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.Hero-subtitle { opacity: .85; font-size: 14px; max-width: 700px; margin: 0 auto; }
.Hero-crumbs { font-size: 13px; opacity: .85; margin-bottom: 6px; }
.Hero-meta { margin-top: 10px; font-size: 13px; opacity: .92; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.Hero--tag { text-align: left; }
.Hero--tag .Hero-subtitle { margin: 0; }
.Hero--tag .Hero-meta { justify-content: flex-start; }
.Hero--discussion { background: var(--card-bg); color: var(--text); border-bottom: 1px solid var(--border); }
.Hero--discussion a { color: var(--primary); }
.DiscussionHero-title { font-size: 22px; }
.DiscussionHero-tags { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.Hero--discussion .Hero-meta { color: var(--text-muted); }

/* ---------- 抽屉（移动端侧栏） ---------- */
.App-drawer { display: none; }

/* ---------- 布局 ---------- */
.App-content { min-height: calc(100vh - var(--header-h) - 120px); padding-bottom: 30px; }
.IndexPage { display: flex; gap: 30px; align-items: flex-start; }
.IndexPage-nav { width: 190px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 16px); }
.IndexPage-results { flex: 1; min-width: 0; }
.IndexPage-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.IndexPage-toolbar-right { display: flex; gap: 8px; }
.PageHeading { font-size: 20px; margin: 4px 0 14px; }
.PageHeading-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0 12px; }
.PageHeading-row h2 { margin: 0; }

/* ---------- 侧栏导航 ---------- */
.SideNav-new { margin-bottom: 16px; }
.SideNav-list { list-style: none; margin: 0; padding: 0; }
.SideNav-list a { display: flex; align-items: center; gap: 8px; padding: 6px 4px; color: var(--text-muted); font-weight: 600; font-size: 13.5px; border-radius: var(--radius); text-decoration: none; }
.SideNav-list a:hover { color: var(--primary); }
.SideNav-list a.active { color: var(--primary); }
.SideNav-icon { width: 20px; text-align: center; }
.SideNav-sep { height: 1px; background: var(--border); margin: 10px 0; }
.SideNav-group { font-size: 11.5px; color: var(--text-light); font-weight: 700; padding: 10px 4px 2px; text-transform: uppercase; letter-spacing: .5px; }
.SideNav-sub { list-style: none; padding-left: 16px; margin: 0; }
.SideNav-sub a { font-weight: 500; font-size: 13px; }
.TagIcon { display: inline-block; width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.TagIcon--sm { width: 10px; height: 10px; border-radius: 3px; }

/* ---------- 卡片 ---------- */
.Card { background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 16px; overflow: hidden; }
.Card-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--card-bg) 92%, var(--control-bg)); }
.Card-header a { margin-left: auto; font-weight: 500; font-size: 13px; }
.Card-header small { font-weight: 400; color: var(--text-muted); }
.Card-body { padding: 16px; }
.Card > .Card-body + .Card-body { border-top: 1px solid var(--border); }

/* ---------- 公告与统计条 ---------- */
.AnnounceBar { display: flex; align-items: center; gap: 12px; background: var(--primary-light); border-radius: var(--radius-lg); padding: 10px 14px; margin-bottom: 14px; overflow: hidden; }
.AnnounceBar-label { font-weight: 700; color: var(--primary); white-space: nowrap; }
.AnnounceBar-list { display: flex; gap: 22px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.AnnounceBar-list small { color: var(--text-muted); }
.StatsBar { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; margin-bottom: 14px; color: var(--text-muted); font-size: 13px; border-bottom: 1px solid var(--border); }
.StatsBar em { font-style: normal; color: var(--danger); font-weight: 700; }

/* ---------- 版块列表 ---------- */
.ForumGroup-header { padding: 12px 16px; font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: baseline; }
.ForumGroup-header a { color: var(--text); }
.ForumGroup-desc { font-weight: 400; font-size: 12.5px; color: var(--text-muted); }
.ForumRow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.ForumRow:last-child { border-bottom: 0; }
.ForumRow:hover { background: var(--hover-bg); }
.ForumRow--empty { color: var(--text-muted); justify-content: center; }
.ForumRow-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; color: #fff; }
.ForumRow-icon img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; }
.Hero-icon-img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; vertical-align: middle; margin-right: 6px; }
.ForumIconPreview { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: block; margin-top: 6px; }
.ForumRow-main { flex: 1; min-width: 0; }
.ForumRow-name { font-size: 15px; margin: 0 0 2px; }
.ForumRow-name a { color: var(--text); }
.ForumRow-today { color: var(--danger); font-size: 12px; font-weight: 500; }
.ForumRow-desc, .ForumRow-mods, .ForumRow-subs { font-size: 12.5px; color: var(--text-muted); }
.ForumRow-subs a { margin-right: 10px; }
.ForumRow-mods a { color: var(--text-muted); }
.ForumRow-stats { display: flex; gap: 16px; text-align: center; flex-shrink: 0; }
.ForumRow-stats strong { display: block; font-size: 15px; }
.ForumRow-stats span { font-size: 11.5px; color: var(--text-muted); }
.ForumRow-last { width: 190px; flex-shrink: 0; font-size: 12.5px; }
.ForumRow-lastTitle { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ForumRow-lastMeta { color: var(--text-muted); }
.ForumRules summary { padding: 12px 16px; cursor: pointer; font-weight: 700; }
.ForumRules .Post-body { padding: 0 16px 14px; }

.IndexColumns, .AdminColumns, .CheckinColumns, .RankingColumns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.RankingColumns { grid-template-columns: 2fr 1fr; }
.IndexColumns .Card, .AdminColumns > *, .CheckinColumns .Card { margin-bottom: 16px; }
.MiniList { list-style: none; margin: 0; padding: 6px 0; }
.MiniList li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 16px; font-size: 13px; }
.MiniList li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.MiniList li span { color: var(--text-light); white-space: nowrap; font-size: 12px; }
.OnlineList { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 14px 16px; font-size: 13px; }
.GroupLegend { display: flex; gap: 14px; padding: 0 16px 12px; font-size: 12px; color: var(--text-muted); }
.GroupLegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.FriendLinks { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 14px 16px; }

/* ---------- 讨论列表 ---------- */
.DiscussionList-wrap { padding: 4px 0; }
.DiscussionList { list-style: none; margin: 0; padding: 0; }
.DiscussionListItem { display: flex; align-items: center; gap: 14px; padding: 12px 16px; position: relative; border-bottom: 1px solid var(--border); }
.DiscussionListItem:last-child { border-bottom: 0; }
.DiscussionListItem:hover { background: var(--hover-bg); }
.DiscussionListItem.is-sticky { background: color-mix(in srgb, var(--primary-light) 55%, transparent); }
.DiscussionListItem-check { flex-shrink: 0; }
.DiscussionListItem-author { flex-shrink: 0; }
.DiscussionListItem-main { flex: 1; min-width: 0; }
.DiscussionListItem-title { font-size: 15px; font-weight: 600; margin: 0 0 3px; line-height: 1.4; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.DiscussionListItem-title > a { color: var(--text); word-break: break-word; }
.DiscussionListItem-info { font-size: 12.5px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.DiscussionListItem-info a { color: var(--text-muted); }
.DiscussionListItem-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; min-width: 70px; font-size: 12.5px; color: var(--text-muted); }
.DiscussionListItem-count { font-weight: 600; color: var(--text); }
.DiscussionList-empty { padding: 50px 20px; text-align: center; color: var(--text-muted); }
.TagLabel { display: inline-block; padding: 1px 7px; border-radius: 3px; color: #fff !important; font-size: 11.5px; font-weight: 600; line-height: 1.6; text-decoration: none !important; }
.TagChip { display: inline-block; padding: 2px 9px; border-radius: 12px; background: var(--control-bg); color: var(--control-color) !important; font-size: 12px; text-decoration: none !important; }
.TagChip--lg { font-size: 14px; padding: 5px 12px; margin: 4px; }
.TagCloud { padding: 16px; }
.ThreadType { color: var(--primary); font-weight: 600; }
.Badge { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 11px; font-weight: 700; line-height: 18px; color: #fff; background: var(--text-muted); white-space: nowrap; }
.Badge--sticky { background: #d35400; }
.Badge--digest { background: #c0392b; }
.Badge--poll { background: #16a085; }
.Badge--reward { background: #f39c12; }
.Badge--price { background: #8e44ad; }
.Badge--closed { background: #7f8c8d; }
.Badge--pending { background: #e67e22; }
.Badge--perm { background: #2c3e50; }
.GroupBadge { display: inline-block; padding: 0 8px; border-radius: 10px; font-size: 11.5px; font-weight: 600; color: #fff; background: var(--text-light); line-height: 20px; vertical-align: middle; }

/* ---------- 标签页 ---------- */
.Tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.Tabs a, .Tabs label { padding: 6px 12px; border-radius: var(--radius); color: var(--text-muted); font-weight: 600; font-size: 13px; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.Tabs a:hover, .Tabs label:hover { background: var(--hover-bg); }
.Tabs a.active { background: var(--primary-light); color: var(--primary); }
.Tabs--special label:has(input:checked) { background: var(--primary-light); color: var(--primary); }
.TypeTabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.TypeTabs a { padding: 3px 11px; border-radius: 14px; background: var(--control-bg); color: var(--control-color); font-size: 12.5px; text-decoration: none; }
.TypeTabs a.active { background: var(--primary); color: #fff; }

/* ---------- 分页 ---------- */
.Pagination { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; margin: 16px 0; }
.Pagination-item { min-width: 32px; padding: 5px 10px; text-align: center; border-radius: var(--radius); background: var(--control-bg); color: var(--control-color); font-weight: 600; font-size: 13px; text-decoration: none !important; }
.Pagination-item:hover { background: var(--primary-light); color: var(--primary); }
.Pagination-item.is-current { background: var(--primary); color: #fff; }
.Pagination-ellipsis { padding: 0 4px; color: var(--text-muted); }
.Pagination-total { margin-left: 8px; color: var(--text-muted); font-size: 12px; }

/* ---------- 讨论页 ---------- */
.DiscussionPage { display: flex; gap: 30px; align-items: flex-start; }
.DiscussionPage-stream { flex: 1; min-width: 0; }
.DiscussionPage-nav { width: 200px; flex-shrink: 0; }
.DiscussionPage-sticky { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 8px; }
.DiscussionPage-links { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; font-size: 13px; }
.DiscussionPage-links a, .DiscussionPage-links .Button { padding: 4px 6px; justify-content: flex-start; }
.RecommendBox { display: flex; gap: 6px; }
.RecommendBox form { flex: 1; }
.RecommendBox .Button { width: 100%; }
.PostStream { display: flex; flex-direction: column; }
.Post { display: flex; gap: 0; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: 14px; box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 12px); }
.Post:target { box-shadow: 0 0 0 2px var(--primary); }
.Post--pending { border-left: 4px solid var(--warning); }
.Post--banned { opacity: .75; }
.Post--best { border: 2px solid #f39c12; }
.Post-user { width: 170px; flex-shrink: 0; padding: 18px 12px; text-align: center; border-right: 1px solid var(--border); background: color-mix(in srgb, var(--card-bg) 94%, var(--control-bg)); border-radius: var(--radius-lg) 0 0 var(--radius-lg); font-size: 12.5px; }
.Post-avatar { position: relative; display: inline-block; }
.Post-username { font-weight: 700; font-size: 14px; margin: 6px 0 2px; word-break: break-all; }
.Post-username a { color: var(--text); }
.Post-customTitle { color: var(--text-muted); font-size: 12px; margin-bottom: 4px; }
.Post-stars { color: #f1c40f; letter-spacing: 1px; margin: 4px 0; font-size: 12px; }
.Post-stats { display: flex; justify-content: center; gap: 0; margin: 8px 0 4px; }
.Post-stats div { flex: 1; border-right: 1px solid var(--border); }
.Post-stats div:last-child { border-right: 0; }
.Post-stats dt { color: var(--text-light); font-size: 11px; }
.Post-stats dd { margin: 0; font-weight: 700; }
.Post-exts { color: var(--text-muted); font-size: 11.5px; }
.Post-medals { margin-top: 6px; font-size: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.Post-userActions { margin-top: 8px; }
.Post-main { flex: 1; min-width: 0; padding: 14px 20px; display: flex; flex-direction: column; }
.Post-header { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--text-muted); padding-bottom: 10px; border-bottom: 1px dashed var(--border); margin-bottom: 12px; }
.Post-floor { background: var(--primary); color: #fff; font-weight: 700; padding: 0 8px; border-radius: 10px; font-size: 12px; }
.Post-onlyAuthor { color: var(--text-muted); }
.Post-ip { color: var(--text-light); font-size: 11.5px; }
.Post-permalink { margin-left: auto; color: var(--text-light); }
.Post-edited { color: var(--text-light); font-size: 12px; font-style: italic; margin-bottom: 8px; }
.Post-body { font-size: 15px; line-height: 1.75; word-wrap: break-word; overflow-wrap: anywhere; flex: 1; }
.Post-body img { max-width: 100%; height: auto; }
.Post-hidden { padding: 14px; background: var(--control-bg); color: var(--text-muted); border-radius: var(--radius); }
.Post-attachments { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.Post-attachments-title { font-weight: 700; font-size: 12.5px; color: var(--text-muted); }
.Attach { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; background: var(--control-bg); border-radius: var(--radius); color: var(--text); text-decoration: none !important; max-width: 100%; }
.Attach:hover { background: var(--primary-light); }
.Attach-name { font-weight: 600; word-break: break-all; }
.Attach-meta { color: var(--text-muted); font-size: 12px; }
.Attach-price { color: #8e44ad; font-weight: 700; font-size: 12px; }
.Attach--locked { color: var(--text-muted); }
.Attach-image img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; }
.Post-ratings { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 8px; }
.Post-ratings-title { font-weight: 700; font-size: 12.5px; margin-bottom: 4px; }
.RateTable { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.RateTable td { padding: 3px 8px 3px 0; }
.RateTable .pos { color: var(--success); font-weight: 700; }
.RateTable .neg { color: var(--danger); font-weight: 700; }
.Post-signature { margin-top: 16px; padding-top: 8px; border-top: 1px dashed var(--border); color: var(--text-muted); font-size: 12.5px; max-height: 120px; overflow: hidden; }
.Post-signature img { max-height: 100px; }
.Post-actions { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 12px; justify-content: flex-end; align-items: center; }
.Popover { position: relative; display: inline-block; }
.Popover > summary { list-style: none; }
.Popover > summary::-webkit-details-marker { display: none; }
.Popover-body { position: absolute; right: 0; bottom: calc(100% + 6px); width: 260px; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 12px; z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.Popover-link { font-size: 12.5px; }
.Paywall { margin-top: 16px; padding: 20px; text-align: center; background: var(--primary-light); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.Paywall-icon { font-size: 32px; }
.RewardBox { padding: 12px 16px; background: var(--reward-bg); color: var(--reward-text); border-color: #f5d391; }
.RewardBox.is-solved { background: var(--reward-solved-bg); color: var(--reward-solved-text); border-color: #a8e2bf; }
.Poll { padding: 16px; }
.Poll-head { font-weight: 700; margin-bottom: 10px; }
.Poll-option { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.Poll-option > input { grid-row: span 2; }
.Poll-bar { grid-column: 2; height: 8px; background: var(--control-bg); border-radius: 4px; overflow: hidden; }
.Poll-bar span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.Poll-num { grid-column: 2; font-size: 12px; color: var(--text-muted); }
.Poll .Button { margin-top: 12px; }

/* ---------- BBCode 内容 ---------- */
.bb-quote { margin: 10px 0; padding: 10px 14px; border-left: 4px solid var(--primary); background: var(--control-bg); border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; color: var(--text-muted); }
.bb-quote-author { font-weight: 700; color: var(--text); margin-bottom: 4px; font-size: 13px; }
.bb-code { margin: 10px 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.bb-code-head { padding: 3px 10px; background: var(--control-bg); font-size: 12px; color: var(--text-muted); }
.bb-code pre { margin: 0; padding: 10px 12px; overflow-x: auto; font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.5; white-space: pre; background: color-mix(in srgb, var(--card-bg) 90%, var(--control-bg)); }
.bb-img { max-width: 100%; height: auto; border-radius: var(--radius); vertical-align: middle; }
.bb-list { padding-left: 24px; margin: 6px 0; }
.bb-hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.bb-indent { padding-left: 2em; }
.bb-table-wrap { overflow-x: auto; margin: 10px 0; }
.bb-table { border-collapse: collapse; min-width: 50%; }
.bb-table td { border: 1px solid var(--border); padding: 6px 10px; }
.bb-hide { margin: 10px 0; padding: 12px 14px; border: 1px dashed #e0a800; background: var(--hide-bg); border-radius: var(--radius); color: var(--hide-text); font-size: 14px; }
.bb-hide.is-visible { color: var(--text); background: var(--hide-bg); }
.bb-hide-title { font-weight: 700; color: #b8860b; font-size: 12.5px; margin-bottom: 6px; }
.bb-free { margin: 10px 0; padding: 10px 14px; border: 1px dashed var(--success); border-radius: var(--radius); }
.bb-spoiler { margin: 10px 0; padding: 8px 12px; background: var(--control-bg); border-radius: var(--radius); }
.bb-spoiler summary { cursor: pointer; color: var(--text-muted); font-size: 13px; }
.bb-attach-missing { color: var(--text-light); font-size: 12px; }
.mention { font-weight: 600; background: var(--primary-light); padding: 0 4px; border-radius: 3px; }

/* ---------- 回复框 / 编辑器 ---------- */
.Composer { padding: 16px; }
.Composer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.Composer-replyTo { color: var(--text-muted); font-size: 13px; }
.Composer-foot, .ComposePage-foot { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 10px; }
.Composer-disabled { color: var(--text-muted); text-align: center; padding: 10px; }
.ComposePage { padding: 20px 24px; margin-top: 10px; }
.ComposePage-title { margin-bottom: 18px; }
.Compose-advanced { margin: 14px 0; padding: 10px 14px; background: var(--control-bg); border-radius: var(--radius); }
.Compose-advanced summary { cursor: pointer; font-weight: 600; color: var(--text-muted); }
.Compose-advanced[open] summary { margin-bottom: 12px; }
.SpecialBox { padding: 12px 14px; margin-bottom: 14px; border: 1px dashed var(--border); border-radius: var(--radius); }
.Editor { border: 2px solid var(--control-bg); border-radius: var(--radius); background: var(--card-bg); }
.Editor:focus-within { border-color: var(--primary); }
.Editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 4px 6px; background: var(--control-bg); border-bottom: 1px solid var(--border); }
.Editor-toolbar > button, .Editor-toolbar .Dropdown > button, .Editor-upload { background: transparent; border: 0; min-width: 30px; height: 28px; padding: 0 6px; border-radius: var(--radius); cursor: pointer; color: var(--control-color); font-size: 13px; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; }
.Editor-toolbar > button:hover, .Editor-toolbar .Dropdown > button:hover, .Editor-upload:hover { background: var(--card-bg); color: var(--text); }
.Editor-color { font-weight: 800; }
.Editor-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.Editor-upload { font-weight: 600; }
.Editor-preview-btn { margin-left: auto; }
.Editor-text { border: 0 !important; border-radius: 0; background: var(--card-bg) !important; min-height: 140px; }
.Editor-preview { padding: 12px; min-height: 140px; border-top: 1px solid var(--border); }
.Editor-emoji { width: 260px; display: none; flex-wrap: wrap; gap: 2px; padding: 8px; }
.Dropdown.is-open > .Editor-emoji { display: flex; }
.Editor-emoji button { width: 30px; height: 30px; border: 0; background: none; font-size: 18px; cursor: pointer; border-radius: var(--radius); }
.Editor-emoji button:hover { background: var(--hover-bg); }
.Editor-attachments { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px; }
.Editor-attachments:not(:empty) { padding: 8px; border-top: 1px solid var(--border); }
.AttachChip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; background: var(--control-bg); border-radius: 12px; font-size: 12px; }
.AttachChip button { border: 0; background: none; cursor: pointer; color: var(--primary); font-size: 12px; padding: 0; }
.AttachChip.is-error { color: var(--danger); }
.Editor-hint { font-size: 11.5px; color: var(--text-light); padding: 4px 10px; border-top: 1px solid var(--border); }
.AttachManage { display: flex; flex-direction: column; gap: 6px; }

/* ---------- 管理面板 ---------- */
.ModPanel { padding: 12px 14px; font-size: 13px; }
.ModPanel-head { font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; }
.ModPanel-all { font-weight: 400; }
.ModPanel-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.ModPanel-row .FormControl { width: auto; flex: 1 1 120px; padding: 5px 8px; }
.ModPanel-inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.DiscussionPage-nav .ModPanel-row { flex-direction: column; align-items: stretch; }
.DiscussionPage-nav .ModPanel-row .FormControl { flex: none; width: 100%; }

/* ---------- 提示 ---------- */
.Alert-wrap { position: fixed; top: calc(var(--header-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 300; max-width: 92vw; }
.Alert { padding: 10px 40px 10px 16px; border-radius: var(--radius-lg); background: var(--text); color: var(--body-bg); box-shadow: var(--shadow-lg); position: relative; font-weight: 600; animation: slideDown .25s ease; }
.Alert--success { background: var(--success); color: #fff; }
.Alert--error { background: var(--danger); color: #fff; margin-bottom: 12px; }
.Alert-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; opacity: .8; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 认证页 ---------- */
.AuthPage { display: flex; justify-content: center; padding-top: 40px; }
.AuthCard { width: 400px; max-width: 100%; padding: 28px 30px; }
.AuthCard--wide { width: 520px; }
.AuthCard h2 { text-align: center; margin-bottom: 20px; }
.AuthCard-foot { text-align: center; margin-top: 16px; color: var(--text-muted); font-size: 13px; }
.Captcha { display: flex; gap: 8px; align-items: center; }
.Captcha img { border-radius: var(--radius); cursor: pointer; flex-shrink: 0; }
.PwMeter { height: 4px; background: var(--control-bg); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.PwMeter span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.MessageCard { text-align: center; padding: 40px 30px; margin-top: 30px; }
.MessageCard-icon { font-size: 44px; }
.MessageCard-actions { display: flex; justify-content: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

/* ---------- 用户空间 ---------- */
.UserHero { text-align: left; padding: 28px 0; }
.UserHero-inner { display: flex; gap: 22px; align-items: center; }
.UserHero-avatar { position: relative; flex-shrink: 0; }
.UserHero-avatar .Avatar { border: 4px solid rgba(255,255,255,.4); }
.UserHero-name { font-size: 26px; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.UserHero-title { opacity: .9; }
.UserHero-meta { opacity: .85; font-size: 13px; margin-top: 4px; }
.UserHero-online { color: #9effc0; }
.UserHero-bio { margin-top: 8px; opacity: .95; }
.UserHero-medals { margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.UserHero-medals span { background: rgba(255,255,255,.18); padding: 2px 8px; border-radius: 12px; }
.UserHero-actions { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.UserPage { display: flex; gap: 24px; align-items: flex-start; }
.UserPage-side { width: 260px; flex-shrink: 0; }
.UserPage-main { flex: 1; min-width: 0; }
.InfoList { margin: 0; padding: 8px 16px; }
.InfoList > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.InfoList > div:last-child { border-bottom: 0; }
.InfoList dt { color: var(--text-muted); }
.InfoList dd { margin: 0; font-weight: 600; text-align: right; }
.InfoList--wide > div { justify-content: flex-start; }
.InfoList--wide dt { width: 100px; }
.InfoList--wide dd { text-align: left; font-weight: 500; }
.ReplyList { list-style: none; margin: 0; padding: 0; }
.ReplyList li { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.ReplyList-title { font-weight: 600; }
.ReplyList-excerpt { color: var(--text-muted); font-size: 13px; margin: 2px 0; }

/* ---------- 设置页 ---------- */
.SettingsPage { display: flex; gap: 24px; align-items: flex-start; margin-top: 20px; }
.SettingsPage-nav { width: 200px; flex-shrink: 0; padding: 8px; display: flex; flex-direction: column; }
.SettingsPage-nav a { padding: 8px 12px; border-radius: var(--radius); color: var(--text-muted); font-weight: 600; text-decoration: none; }
.SettingsPage-nav a:hover { background: var(--hover-bg); }
.SettingsPage-nav a.active { background: var(--primary-light); color: var(--primary); }
.SettingsPage-main { flex: 1; min-width: 0; }
.AvatarEdit { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.CreditBoxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.CreditBoxes div { background: var(--control-bg); border-radius: var(--radius-lg); padding: 14px; text-align: center; }
.CreditBoxes strong { display: block; font-size: 22px; color: var(--primary); }
.CreditBoxes span { color: var(--text-muted); font-size: 12px; }

/* ---------- 表格 ---------- */
.Table-wrap { overflow-x: auto; }
.Table { width: 100%; border-collapse: collapse; font-size: 13px; }
.Table th { text-align: left; padding: 9px 12px; color: var(--text-muted); font-weight: 600; border-bottom: 2px solid var(--border); white-space: nowrap; }
.Table td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.Table tr:hover td { background: var(--hover-bg); }
.Table tr.is-current td { background: var(--primary-light); font-weight: 700; }
.Table tr.is-group td { background: color-mix(in srgb, var(--card-bg) 90%, var(--control-bg)); }
.PermTable td, .PermTable th { text-align: center; }
.PermTable td:first-child, .PermTable th:first-child { text-align: left; }
.RankUser { display: flex; align-items: center; gap: 6px; }
.RankNo { font-weight: 800; color: var(--text-muted); }
.RankNo--1 { color: #e6a700; } .RankNo--2 { color: #9aa5b1; } .RankNo--3 { color: #c0773a; }
.RankList { margin: 0; padding: 8px 16px 8px 36px; }
.RankList li { padding: 5px 0; font-size: 13px; }
.RankList li span { float: right; color: var(--text-muted); }

/* ---------- 各类列表 ---------- */
.NotifyRow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.NotifyRow:hover { background: var(--hover-bg); }
.NotifyRow.unread { background: var(--primary-light); }
.NotifyRow-type { width: 30px; height: 30px; border-radius: 50%; background: var(--control-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; color: var(--primary); }
.NotifyRow-msg { flex: 1; }
.NotifyRow-actions { margin-left: auto; display: flex; gap: 6px; }
.FriendRow { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.FriendRow-main { flex: 1; min-width: 0; }
.ConvRow { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.ConvRow:hover { background: var(--hover-bg); }
.ConvRow.unread { background: var(--primary-light); }
.ConvRow-users { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ConvRow-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ConvRow-meta { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.PMThread { padding: 16px; display: flex; flex-direction: column; gap: 14px; max-height: 65vh; overflow-y: auto; }
.PMMessage { display: flex; gap: 10px; align-items: flex-start; }
.PMMessage.is-mine { flex-direction: row-reverse; }
.PMMessage-bubble { max-width: 75%; background: var(--control-bg); padding: 8px 12px; border-radius: 12px; }
.PMMessage.is-mine .PMMessage-bubble { background: var(--primary-light); }
.PMMessage-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }
.PMMessage .Post-body { font-size: 14px; }
.SearchForm { display: flex; gap: 8px; flex-wrap: wrap; }
.SearchForm input { flex: 3 1 220px; width: auto; }
.SearchForm select { flex: 1 1 120px; width: auto; }
.SearchResults { list-style: none; margin: 0; padding: 0; }
.SearchResults li { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.SearchResults-title { font-weight: 600; font-size: 15px; }
.SearchResults-excerpt { color: var(--text-muted); font-size: 13px; margin: 3px 0; }
.FavForums { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.AnnouncementPage { padding: 24px; }
.AnnouncementPage h1 { font-size: 22px; }
.AnnouncementPage .Post-body { margin-top: 16px; }

/* ---------- 签到 / 勋章 ---------- */
.CheckinPage { margin-top: 20px; }
.CheckinBox { text-align: center; }
.CheckinBox form { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 560px; margin: 0 auto; }
.CheckinBox-done { font-size: 16px; padding: 14px; background: var(--primary-light); border-radius: var(--radius-lg); }
.MoodPicker { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.MoodPicker input { display: none; }
.MoodPicker span { display: inline-block; padding: 6px 12px; border-radius: 16px; background: var(--control-bg); cursor: pointer; }
.MoodPicker input:checked + span { background: var(--primary); color: #fff; }
.CheckinList { list-style: none; margin: 0; padding: 0; max-height: 500px; overflow: auto; }
.CheckinList li { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--border); font-size: 13px; flex-wrap: wrap; }
.CheckinList-rank { color: var(--text-light); width: 32px; }
.CheckinList-msg { flex: 1; color: var(--text-muted); }
.MedalGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.Medal { padding: 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; }
.Medal-icon { font-size: 40px; }

/* ---------- 管理中心 ---------- */
.AdminPage { display: flex; gap: 24px; align-items: flex-start; margin-top: 20px; }
.AdminNav { width: 210px; flex-shrink: 0; padding: 8px; display: flex; flex-direction: column; position: sticky; top: calc(var(--header-h) + 16px); }
.AdminNav-title { font-weight: 800; padding: 8px 12px; font-size: 15px; }
.AdminNav-group { font-size: 11px; color: var(--text-light); font-weight: 700; padding: 10px 12px 2px; }
.AdminNav a { padding: 7px 12px; border-radius: var(--radius); color: var(--text-muted); font-weight: 600; font-size: 13px; text-decoration: none; }
.AdminNav a:hover { background: var(--hover-bg); }
.AdminNav a.active { background: var(--primary-light); color: var(--primary); }
.AdminMain { flex: 1; min-width: 0; }
.AdminMain > h2 { margin: 4px 0 14px; }
.StatGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.StatCard { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); }
.StatCard strong { display: block; font-size: 26px; color: var(--primary); }
.StatCard span { color: var(--text-muted); font-size: 12.5px; }
.TodoList { display: flex; flex-wrap: wrap; gap: 10px; }
.TodoList a { padding: 8px 14px; background: var(--control-bg); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.TodoList strong { color: var(--danger); margin-left: 4px; }
.CheckList { list-style: none; margin: 0; }
.CheckList li { padding: 4px 0; font-size: 13px; }
.PermGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; }
.PermGrid-item { padding: 4px 0; }
.PermGrid-item label { margin: 0 !important; }
.QueueItem { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.QueueItem-content { background: var(--control-bg); padding: 8px 10px; border-radius: var(--radius); font-size: 12.5px; max-height: 160px; overflow: auto; margin: 6px 0 0; font-family: inherit; }
.ToolGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ToolGrid .Card { margin: 0; }
.MedalAward { margin-top: 6px; }
.SettingRow { padding-bottom: 6px; border-bottom: 1px solid var(--border); }

/* ---------- 页脚 ---------- */
.App-footer { border-top: 1px solid var(--border); padding: 22px 0; text-align: center; color: var(--text-muted); font-size: 12.5px; }
.App-footer-links { margin-bottom: 6px; }
.App-footer-links a { color: var(--text-muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .Header-links { display: none; }
  .Header-menu { display: inline-flex; }
  .IndexPage-nav { display: none; }
  .App-drawer { position: fixed; top: var(--header-h); left: 0; bottom: 0; width: 260px; background: var(--card-bg); box-shadow: var(--shadow-lg); padding: 16px; overflow-y: auto; z-index: 150; transform: translateX(-105%); transition: transform .2s; display: block; }
  .App-drawer.is-open { transform: none; }
  .DiscussionPage { flex-direction: column; }
  .DiscussionPage-nav { width: 100%; }
  .DiscussionPage-sticky { position: static; flex-direction: row; flex-wrap: wrap; }
  .DiscussionPage-sticky > * { flex: 1 1 140px; }
  .DiscussionPage-links { flex-direction: row; flex-wrap: wrap; }
  .ForumRow-last { display: none; }
  .UserPage, .SettingsPage, .AdminPage { flex-direction: column; }
  .UserPage-side, .SettingsPage-nav, .AdminNav { width: 100%; position: static; }
  .SettingsPage-nav, .AdminNav { flex-direction: row; flex-wrap: wrap; }
  .AdminNav-group { display: none; }
  .IndexColumns, .AdminColumns, .CheckinColumns, .RankingColumns { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .Header-search { max-width: none; }
  .Header-username { display: none; }
  .Header-title { font-size: 16px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .Hero { padding: 20px 0; }
  .Hero-title { font-size: 20px; }
  .Post { flex-direction: column; }
  .Post-user { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; text-align: left; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 12px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .Post-user .Avatar--lg { width: 40px; height: 40px; font-size: 18px; }
  .Post-user .Post-username { margin: 0; }
  .Post-stats, .Post-exts, .Post-stars, .Post-customTitle { display: none; }
  .Post-medals { margin: 0; }
  .Post-main { padding: 12px 14px; }
  .DiscussionListItem { padding: 10px 12px; gap: 10px; }
  .DiscussionListItem-stats { min-width: 0; }
  .DiscussionListItem-views { display: none; }
  .ForumRow-stats { display: none; }
  .ForumRow-icon { width: 36px; height: 36px; font-size: 18px; }
  .ConvRow { grid-template-columns: 1fr; gap: 2px; }
  .CreditBoxes { grid-template-columns: repeat(2, 1fr); }
  .UserHero-inner { flex-direction: column; text-align: center; }
  .UserHero-name, .UserHero-actions, .UserHero-medals { justify-content: center; }
  .Table { font-size: 12px; }
  .Card > .Table, .Card > form > .Table { display: block; overflow-x: auto; }
  .Popover-body { right: auto; left: 50%; transform: translateX(-50%); }
  .NotificationList { width: 92vw; }
  .ComposePage { padding: 16px; }
}

/* ================= v1.1 新增 ================= */
/* 编辑器（分组工具栏） */
.Editor { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card-bg); overflow: visible; transition: border-color .15s, box-shadow .15s; }
.Editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.Editor.is-dragover { border-color: var(--primary); border-style: dashed; background: var(--primary-light); }
.Editor-toolbar { gap: 4px; padding: 6px 8px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: color-mix(in srgb, var(--card-bg) 85%, var(--control-bg)); }
.Editor-group { display: inline-flex; align-items: center; gap: 1px; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--border); }
.Editor-group:last-of-type { border-right: 0; }
.Editor-group > button, .Editor-group .Dropdown > button, .Editor-btn { background: transparent; border: 0; min-width: 30px; height: 30px; padding: 0 7px; border-radius: var(--radius); cursor: pointer; color: var(--control-color); font-size: 13px; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 2px; white-space: nowrap; }
.Editor-group > button:hover, .Editor-group .Dropdown > button:hover, .Editor-btn:hover { background: var(--control-bg); color: var(--text); }
.Editor-btn { font-weight: 600; color: var(--primary); }
.Editor-colorIcon { font-weight: 800; border-bottom: 3px solid #e74c3c; line-height: 1; }
.Editor-palette { display: none; grid-template-columns: repeat(6, 24px); gap: 6px; padding: 10px; min-width: 0; }
.Dropdown.is-open > .Editor-palette { display: grid; }
.Editor-palette button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--card-bg); box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0; }
.Editor-menu { min-width: 150px; }
.Editor-menu > button { display: block; width: 100%; padding: 7px 14px; text-align: left; background: none; border: 0; font: inherit; color: var(--text); cursor: pointer; }
.Editor-menu > button:hover { background: var(--hover-bg); }
.Editor-text { display: block; width: 100%; border: 0; outline: 0; padding: 14px 16px; font: 15px/1.7 var(--font); color: var(--text); background: var(--card-bg); resize: vertical; min-height: 160px; }
.Editor-preview { padding: 14px 16px; }
.Editor-hint b { color: var(--primary); }
.AttachChip button { margin-left: 4px; }

/* 发帖页：主栏 + 侧栏 */
.ComposePage { margin-top: 20px; }
.ComposeLayout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.ComposeMain { padding: 22px 24px; margin: 0; overflow: visible; }
.ComposeMain-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.ComposeMain-head h2 { margin: 0; font-size: 20px; }
.ComposeMain-where { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ComposeField { display: flex; align-items: center; gap: 8px; flex: 1 1 200px; }
.ComposeField > span { color: var(--text-muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.ComposeField--stack { flex-direction: column; align-items: stretch; gap: 4px; margin-bottom: 10px; }
.ComposeField--stack > span { white-space: normal; font-weight: 500; }
.ComposeTitle { display: block; width: 100%; border: 0; border-bottom: 2px solid var(--border); padding: 10px 2px; margin-bottom: 14px; font: 600 22px/1.4 var(--font); color: var(--text); background: transparent; outline: 0; }
.ComposeTitle:focus { border-bottom-color: var(--primary); }
.ComposeExisting { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 4px; }
.ComposeExisting-title { font-weight: 600; font-size: 13px; }
.ComposeMain-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ComposeSide { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--header-h) + 16px); }
.ComposeSide-card { padding: 14px 16px; margin: 0; overflow: visible; }
.ComposeSide-card h4 { margin: 0 0 10px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.ComposeSide-box { margin-top: 12px; }
.ComposeSide-tip { font-size: 12px; margin-bottom: 6px; }
.ComposeSide-help ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-muted); }
.ComposeSide-help li { margin: 3px 0; }
.Segmented { display: flex; background: var(--control-bg); border-radius: var(--radius-lg); padding: 3px; gap: 3px; }
.Segmented label { flex: 1; cursor: pointer; }
.Segmented input { display: none; }
.Segmented span { display: block; text-align: center; padding: 6px 4px; border-radius: var(--radius); font-size: 13px; font-weight: 600; color: var(--control-color); }
.Segmented input:checked + span { background: var(--card-bg); color: var(--primary); box-shadow: var(--shadow); }

/* 常用理由 / 评分快捷值 */
.ReasonChips, .ScoreChips { display: flex; flex-wrap: wrap; gap: 4px; }
.ReasonChips button, .ScoreChips button { border: 1px solid var(--border); background: var(--card-bg); color: var(--text-muted); border-radius: 12px; padding: 2px 9px; font: 12px var(--font); cursor: pointer; }
.ReasonChips button:hover, .ScoreChips button:hover { border-color: var(--primary); color: var(--primary); }
.ScoreChips button { color: var(--success); font-weight: 700; }
.ScoreChips button.neg { color: var(--danger); }
.ScoreChips button.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ModPanel .ReasonChips { margin-top: 4px; }
.Popover-body { width: 300px; }
.Popover-title { font-weight: 700; font-size: 13px; }
.RateForm .Form-row > .FormControl { flex: 1 1 80px; }

/* 评分汇总 */
.RateBox { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.RateBox-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding: 7px 12px; background: color-mix(in srgb, var(--card-bg) 88%, var(--control-bg)); font-size: 13px; }
.RateBox-head em { font-style: normal; font-weight: 700; }
.RateBox-head .pos { color: var(--success); } .RateBox-head .neg { color: var(--danger); }
.RateBox-toggle { margin-left: auto; }
.RateBox .RateTable { margin: 0; }
.RateBox .RateTable td { padding: 6px 12px; border-top: 1px solid var(--border); }
.RateQuota { font-size: 12.5px; color: var(--text-muted); text-align: center; }

/* 图章 */
.Post-main { position: relative; }
.Stamp { position: absolute; top: 46px; right: 22px; width: 92px; height: 92px; border: 4px double; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transform: rotate(-18deg); opacity: .78; pointer-events: none; z-index: 1; font-weight: 900; font-size: 20px; letter-spacing: 2px; background: color-mix(in srgb, var(--card-bg) 70%, transparent); }
.Stamp span { border-top: 2px solid; border-bottom: 2px solid; padding: 2px 4px; white-space: nowrap; }
.Stamp--long { font-size: 14px; letter-spacing: 0; }
.Stamp--static { position: static; display: inline-flex; margin: 8px 14px 14px 0; }
.StampPreview { display: flex; flex-wrap: wrap; }
.StampBadge { display: inline-block; border: 1.5px solid; border-radius: 3px; padding: 0 5px; font-size: 11.5px; font-weight: 800; line-height: 17px; transform: rotate(-4deg); }

/* 管理员提示 / 主题操作记录 / 置顶回复 */
.AdminNote { margin-bottom: 12px; padding: 10px 14px; border-left: 4px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--card-bg)); border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.AdminNote-title { font-weight: 700; color: var(--danger); font-size: 13px; margin-bottom: 2px; white-space: normal; }
.AdminNote-title span { font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.ModRecords { margin-bottom: 14px; padding: 8px 14px; border: 1px dashed color-mix(in srgb, var(--warning) 60%, var(--border)); background: color-mix(in srgb, var(--warning) 8%, var(--card-bg)); border-radius: var(--radius-lg); font-size: 13px; color: var(--text-muted); }
.ModRecords strong { color: var(--text); }
.StickyReplies { margin: 0 0 14px; padding: 10px 10px 0; border: 2px solid color-mix(in srgb, #d35400 40%, var(--border)); border-radius: var(--radius-lg); background: color-mix(in srgb, #d35400 4%, var(--card-bg)); }
.StickyReplies-head { font-weight: 700; color: #d35400; margin: 0 4px 8px; }
.Post--pinned { box-shadow: none; margin-bottom: 10px; }

@media (max-width: 900px) {
  .ComposeLayout { grid-template-columns: 1fr; }
  .ComposeSide { position: static; }
  .Stamp { width: 70px; height: 70px; font-size: 15px; top: 40px; right: 10px; }
}
@media (max-width: 640px) {
  .ComposeMain { padding: 16px; }
  .ComposeTitle { font-size: 18px; }
  .Editor-group { border-right: 0; padding-right: 0; }
}
.FormTip { position: fixed; top: calc(var(--header-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 400; max-width: 92vw; box-shadow: var(--shadow-lg); }
/* 弹出框改为居中对话框，避免被顶栏遮挡或超出屏幕 */
details.Popover[open] > summary::before { content: ""; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 490; cursor: default; }
details.Popover[open] > .Popover-body { position: fixed; left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: min(360px, 92vw); max-height: 86vh; overflow-y: auto; z-index: 500; padding: 18px; gap: 10px; animation: popIn .15s ease; }
.Popover-title { font-size: 15px; padding-right: 24px; }
.Popover-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--text-muted); cursor: pointer; }
@keyframes popIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.ScopeTree { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.ScopeTree-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.ScopeTree label { display: flex; align-items: center; gap: 6px; padding: 3px 0; cursor: pointer; }
.ScopeTree-root { font-weight: 700; border-bottom: 1px dashed var(--border); padding-bottom: 6px !important; margin-bottom: 4px; }
.ScopeTree-sub { padding-left: 18px !important; font-size: 13px; }
.ForumGroup-mods { font-weight: 400; font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* Thread reading layout, retaining the site's colors and mobile layout. */
.ThreadToolbar { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:18px auto; font-size:12px; color:var(--text-muted); }
.ThreadToolbar-pages { margin-left:auto; }
.ThreadToolbar .Pagination { margin:0; }
.Hero--discussion { padding:20px 0; text-align:left; border-bottom:1px solid var(--border); }
.Hero--discussion .Hero-title { font-size:24px; line-height:1.5; }
.Hero--discussion .Hero-crumbs { margin-bottom:12px; font-size:12px; }
.DiscussionPage { gap:18px; }
.PostStream { border:1px solid var(--border); background:var(--card-bg); border-radius:4px; overflow:hidden; }
.PostStream > .Post { margin:0; border:0; border-radius:0; box-shadow:none; border-bottom:8px solid var(--control-bg); }
.PostStream > .Post:last-child { border-bottom:0; }
.Post-user { width:180px; padding:22px 15px; border-radius:0; background:var(--hover-bg); }
.Post-user .Avatar--lg { width:100px; height:100px; border-radius:6px; }
.Post-profile { margin:14px 0 8px; border-top:1px dashed var(--border); padding-top:8px; text-align:left; font-size:12px; color:var(--text-muted); }
.Post-profile span { display:flex; justify-content:space-between; gap:8px; padding:3px 0; }
.Post-profile b { font-weight:400; color:var(--text); }
.Post-main { padding:14px 22px; min-height:300px; }
.Post-header { border-bottom-style:solid; padding-bottom:12px; }
.Post-floor { border-radius:3px; }
.Post-actions { border-top:1px solid var(--border); padding-top:10px; }
.Post-body { padding:8px 0 20px; line-height:1.9; }
.HomeFeed .Card-header small { margin-left:12px; font-weight:400; color:var(--text-muted); }
.EmptyState { padding:42px 24px; color:var(--text-muted); text-align:center; line-height:1.8; }
@media(max-width:640px){ .Post-user { width:100%; padding:12px; } .Post-user .Avatar--lg { width:42px; height:42px; } .Post-profile { display:none; } .Post-main { min-height:180px; padding:12px 14px; } .ThreadToolbar-pages { width:100%; margin-left:0; } .Hero--discussion .Hero-title { font-size:20px; } }

.ThemeControl select { max-width:125px; font-size:12px; min-height:32px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.PacketBanner { padding:18px 22px; display:flex; flex-wrap:wrap; gap:8px 20px; border-left:4px solid #d55945; }
.PacketBanner strong { color:var(--primary); }
.PacketBanner small { width:100%; color:var(--text-muted); }
.Post-exts span { display:inline-block; margin:2px 4px; }
.Table { min-width:max-content; }
.Card:has(> .Table), .Card:has(> form > .Table) { overflow-x:auto; }
.Form-row { flex-wrap:wrap; }
@media(max-width:640px){ .ThemeControl select { width:64px; max-width:64px; padding:4px; } .Header-search { flex:1; min-width:60px; } }

@media(max-width:480px){ .App-header-inner { gap:7px; } .Header-search { display:none; } .Header-controls { margin-left:auto; gap:4px; } .Header-controls > .Button { padding:7px 9px; } }

.PermissionSection { border:1px solid var(--border); border-radius:6px; padding:18px; margin:18px 0; }
.PermissionSection h4 { padding-bottom:10px; border-bottom:1px solid var(--border); }
.ProfileManagement { max-width:900px; padding-top:24px; }
.ProfileManagement > .Card { margin:18px 0; }
/* Font Awesome icon alignment */
.NotifyRow-type > .fas { font-size: 13px; line-height: 1; }
.AdminNav a > .fas, .SettingsPage-nav a > .fas { width: 16px; text-align: center; }
.SideNav-icon > .fas { line-height: 1; }
.ForumRow-icon > .fas { line-height: 1; }
.MessageCard-icon > .fas { line-height: 1; }
.Editor-btn > .fas, .Editor button > .fas { line-height: 1; }
