/* ===================================================================
   枫叶社区 · 全站设计系统
   ------------------------------------------------------------------
   1. 设计 token（深色为默认，[data-theme="light"] 覆盖为浅色）
   2. 基础排版 / 图标
   3. 布局（顶栏、容器、两栏）
   4. 组件（面板、按钮、表单、标签、提示、分页…）
   5. 业务（首页 hero、主题列表、板块卡、楼层、表格）
   6. 窄屏适配
   页面专属样式仍写在各模板的 <style> 里，但只允许补充，不重新定义基座。
   =================================================================== */

/* ========== 1. tokens ========== */
:root {
  color-scheme: dark;

  --bg: #0a0d13;
  --bg-2: #0d1117;
  --surface: #11161f;
  --surface-2: #161d27;
  --surface-3: #1c2531;
  --surface-hover: #1a222d;

  --line: #212a36;
  --line-2: #2c3745;

  --text: #e7edf5;
  --text-2: #a2b0c2;
  --text-3: #6b7889;

  --brand: #4d8dff;
  --brand-2: #7c5cff;
  --brand-ink: #cfe1ff;
  --brand-soft: rgba(77, 141, 255, .13);
  --brand-line: rgba(77, 141, 255, .34);

  --cyan: #2ad4c8;
  --gold: #f0b45e;
  --ok: #34d399;
  --warn: #f0b45e;
  --danger: #f87171;
  --danger-ink: #ffb4b4;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 16px 36px -24px rgba(0, 0, 0, .85);

  --grad-brand: linear-gradient(135deg, #4d8dff, #7c5cff);
  --grad-hero: radial-gradient(900px 300px at 12% -40%, rgba(77, 141, 255, .18), transparent 70%),
               radial-gradient(600px 260px at 92% -30%, rgba(124, 92, 255, .14), transparent 72%);
}

[data-theme="light"] {
  color-scheme: light;

  --bg: #f4f6fa;
  --bg-2: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --surface-hover: #f2f6fc;

  --line: #e2e7ef;
  --line-2: #d2dae6;

  --text: #16202e;
  --text-2: #57677e;
  --text-3: #8a97a9;

  --brand: #2f6bff;
  --brand-2: #6d4bff;
  --brand-ink: #1a4ed8;
  --brand-soft: rgba(47, 107, 255, .09);
  --brand-line: rgba(47, 107, 255, .26);

  --cyan: #0ea5a4;
  --gold: #b7791f;
  --ok: #0f9d63;
  --warn: #b7791f;
  --danger: #d92d2d;
  --danger-ink: #b42318;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 14px 30px -22px rgba(16, 24, 40, .28);

  /* 浅色主题下主按钮沿用深版渐变：白字对比不足，按下述更深的品牌色重新定义 */
  --grad-brand: linear-gradient(135deg, #2f6bff, #6d4bff);

  --grad-hero: radial-gradient(900px 300px at 10% -50%, rgba(47, 107, 255, .10), transparent 70%),
               radial-gradient(600px 260px at 92% -30%, rgba(109, 75, 255, .08), transparent 72%);
}

/* ========== 2. 基础 ========== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  background-image: var(--grad-hero);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC",
               "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color .2s ease, color .2s ease;
}

a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-2); }
[data-theme="light"] a:hover { color: var(--brand); text-decoration: underline; }
/* 作者名等「本来就该是正文色」的链接：悬停才亮成品牌色 */
.a-plain { color: inherit; }
.a-plain:hover { color: var(--brand); }
[data-theme="light"] .a-plain:hover { color: var(--brand); text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: .1px; color: var(--text); }
h1 { font-size: 24px; line-height: 1.4; letter-spacing: -.2px; }
h2 { font-size: 16.5px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
img { max-width: 100%; }

::selection { background: rgba(77, 141, 255, .3); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3d4a5c; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 图标：一律用 sprite 引用，禁止再用 emoji 当图标 */
.ic {
  width: 1em; height: 1em; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -.14em;
}
.ic-lg { width: 18px; height: 18px; }

/* ========== 通用小工具 ========== */
.mute { color: var(--text-3); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; color: var(--text-2); }
.sp { flex: 1 1 auto; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.nowrap { white-space: nowrap; }

/* ========== 3. 布局 ========== */
.wrap { max-width: 1200px; margin: 0 auto; padding: 22px 20px 56px; }
.wrap-narrow { max-width: 860px; }
.wrap-sm { max-width: 720px; }

.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 20px; align-items: start; }
.layout-rail { grid-template-columns: minmax(0, 1fr) 296px; }
.layout-rail > .rail, .layout > .rail { position: sticky; top: 80px; }

@media (max-width: 980px) {
  .layout, .layout-rail { grid-template-columns: minmax(0, 1fr); }
  .layout > .rail, .layout-rail > .rail { position: static; }
  .layout > .side-nav { order: 2; }
}

/* ========== 顶栏 ========== */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10, 13, 19, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
[data-theme="light"] .topbar { background: rgba(255, 255, 255, .84); }

.topbar-in {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 62px; display: flex; align-items: center; gap: 18px;
}

.brand { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  background: var(--grad-brand);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -.5px;
  box-shadow: 0 4px 14px -6px rgba(77, 141, 255, .9);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt b { color: var(--text); font-size: 15.5px; font-weight: 800; letter-spacing: .3px; }
.brand-txt small { color: var(--text-3); font-size: 10.5px; letter-spacing: 2.4px; font-weight: 600; margin-top: 2px; }
.brand:hover .brand-txt b { color: var(--brand-ink); }

.menu { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { height: 0; }
.menu a {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 9px;
  color: var(--text-2); font-size: 14px; white-space: nowrap;
  transition: .15s;
}
.menu a .ic { font-size: 16px; opacity: .8; }
.menu a:hover { color: var(--text); background: var(--surface-2); }
.menu a.on { color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }
.menu a.on .ic { opacity: 1; }

.top-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.top-search { position: relative; display: flex; align-items: center; }
.top-search .ic { position: absolute; left: 10px; font-size: 15px; color: var(--text-3); pointer-events: none; }
.top-search input {
  width: 178px; height: 34px; padding: 0 10px 0 32px;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: 99px; font-size: 13px; color: var(--text);
  transition: .18s;
}
.top-search input::placeholder { color: var(--text-3); }
.top-search input:focus {
  width: 220px; background: var(--surface); border-color: var(--brand-line);
  box-shadow: 0 0 0 3px var(--brand-soft); outline: none;
}

.pts {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 11px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2); white-space: nowrap;
}
.pts .ic { font-size: 14px; color: var(--gold); }
.pts b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }

.icon-btn {
  width: 34px; height: 34px; padding: 0; border-radius: 9px;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid transparent; color: var(--text-2);
  cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.icon-btn .ic { font-size: 17px; }

/* 用户下拉 */
.umenu { position: relative; }
.umenu > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 4px; border-radius: 99px;
  border: 1px solid transparent; transition: .15s;
}
.umenu > summary::-webkit-details-marker { display: none; }
.umenu > summary:hover, .umenu[open] > summary { background: var(--surface-2); border-color: var(--line); }
.umenu .uname { font-size: 13.5px; color: var(--text-2); max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.umenu > summary .ic { font-size: 15px; color: var(--text-3); }
.umenu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 250px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .7);
  padding: 8px; z-index: 80;
}
.umenu-pop .who { padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.umenu-pop .who b { display: block; font-size: 14.5px; }
.umenu-pop .who span { font-size: 12.5px; color: var(--text-3); }
.umenu-pop a, .umenu-pop button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border-radius: var(--radius-xs);
  background: none; border: none; color: var(--text-2); font-size: 13.5px;
  text-align: left; cursor: pointer;
}
.umenu-pop a:hover, .umenu-pop button:hover { background: var(--surface-2); color: var(--text); }
.umenu-pop .ic { font-size: 16px; }
.umenu-pop .sep { height: 1px; background: var(--line); margin: 6px 4px; }

.avatar {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: var(--grad-brand);
  user-select: none;
}
/* 拼音/首字母头像：浅色主题下改用淡底深字，避免大片深色块 */
[data-theme="light"] .t-av,
[data-theme="light"] .fav {
  background: linear-gradient(135deg, #dce7f8, #c6d6ee);
  color: #2b4a75;
}

/* ---- 窄屏导航：汉堡按钮 + 抽屉（顶栏放不下四个入口时启用） ---- */
.nav-toggle { display: none; flex: 0 0 auto; }
.nav-drawer {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%; z-index: 70;
  padding: 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 26px 44px -30px rgba(0, 0, 0, .7);
}
.nav-drawer.open { display: block; }
.nd-search { position: relative; display: flex; align-items: center; margin-bottom: 10px; }
.nd-search .ic { position: absolute; left: 11px; font-size: 15px; color: var(--text-3); }
.nd-search input {
  width: 100%; height: 40px; padding: 0 12px 0 34px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
}
.nd-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nd-links a {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
}
.nd-links a .ic { font-size: 16px; opacity: .85; }
.nd-links a.on {
  background: var(--brand-soft); border-color: var(--brand-line);
  color: var(--brand-ink); font-weight: 600;
}
@media (min-width: 641px) { .nav-drawer { display: none !important; } }

/* ========== 4. 组件 ========== */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .025);
}
[data-theme="light"] .panel { box-shadow: var(--shadow), inset 0 1px 0 #fff; }
.panel + .panel { margin-top: 16px; }
.panel-bd { padding: 18px 20px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-hd {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.panel-hd h2 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.panel-hd .ic { color: var(--brand); font-size: 17px; }
.panel-hd .sub { font-size: 12.5px; color: var(--text-3); }
.panel-ft { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

/* 兼容旧类名 */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card.flush { padding: 0; overflow: hidden; }

.sec { margin-top: 24px; }
.sec:first-child { margin-top: 0; }
.sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sec-h h2 { display: flex; align-items: center; gap: 8px; }
.sec-h h2 .ic { color: var(--brand); font-size: 18px; }
.sec-h .sub { font-size: 12.5px; color: var(--text-3); }
.sec-h .sp { flex: 1 1 auto; }

/* 区块标题左侧品牌色竖条：统一首页/各页标题的视觉锚点 */
.panel-hd h2, .sec-h h2 { position: relative; padding-left: 11px; }
.panel-hd h2::before, .sec-h h2::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 3px; height: 15px; border-radius: 2px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

/* ---- 按钮 ---- */
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px; font-family: inherit; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .06s, box-shadow .15s;
}
.btn .ic, button .ic { font-size: 15px; }
.btn:hover, button:hover { background: var(--surface-hover); border-color: #3b4a5d; color: var(--text); }
[data-theme="light"] .btn:hover, [data-theme="light"] button:hover { border-color: var(--line-2); background: var(--surface-3); }
.btn:active, button:active { transform: translateY(.5px); }

.btn.primary, button.primary {
  background: var(--grad-brand); border-color: transparent; color: #fff; font-weight: 600;
  box-shadow: 0 6px 18px -10px rgba(77, 141, 255, .95),
              inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn.primary:hover, button.primary:hover { filter: brightness(1.07); color: #fff; border-color: transparent; }
/* 浅色主题：悬停改为加深（不再提亮），避免白字在亮蓝底上发飘看不清 */
[data-theme="light"] .btn.primary:hover,
[data-theme="light"] button.primary:hover {
  filter: none;
  background: linear-gradient(135deg, #245ae0, #5b3ce6);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(47, 107, 255, .75);
}

.btn.soft, button.soft { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }
.btn.soft:hover, button.soft:hover { background: rgba(77, 141, 255, .2); color: var(--brand-ink); }

.btn.ghost, button.ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn.ghost:hover, button.ghost:hover { background: var(--surface-2); color: var(--text); }

.btn.danger, button.danger { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); color: var(--danger-ink); }
.btn.danger:hover, button.danger:hover { background: rgba(248, 113, 113, .17); color: var(--danger-ink); }

.btn.sm, button.sm, button.mini, .btn.mini { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn.lg, button.lg { height: 42px; padding: 0 20px; font-size: 14.5px; }
.btn.block { width: 100%; }
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* ---- 表单 ---- */
input, select, textarea {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 14px; font-family: inherit;
  outline: none; max-width: 100%;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input, select { height: 38px; }
textarea { line-height: 1.75; resize: vertical; width: 100%; min-height: 96px; }
input:hover, select:hover, textarea:hover { border-color: #3a4757; }
[data-theme="light"] input:hover, [data-theme="light"] select:hover, [data-theme="light"] textarea:hover { border-color: var(--line-2); }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7889' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
label { font-size: 13px; color: var(--text-2); }
.field { margin-bottom: 16px; }
.field > label, .field-label {
  display: block; margin-bottom: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.field .hint { margin-top: 6px; font-size: 12px; color: var(--text-3); }
.field input, .field select, .field textarea { width: 100%; }

/* ---- 标签 / 徽章 ---- */
.tag, .badge {
  display: inline-flex; align-items: center; gap: 3px;
  flex: 0 0 auto; white-space: nowrap;
  padding: 0 6px; border-radius: 5px;
  font-size: 11px; font-weight: 700; line-height: 18px;
  letter-spacing: .2px; vertical-align: 1px;
  border: 1px solid transparent;
}
.tag .ic, .badge .ic { font-size: 11px; }
.tag.top, .badge.top { background: rgba(248, 113, 113, .14); color: #ff9b9b; border-color: rgba(248, 113, 113, .3); }
.tag.ess, .badge.ess { background: rgba(240, 180, 94, .14); color: var(--gold); border-color: rgba(240, 180, 94, .3); }
.tag.lock, .badge.lock { background: rgba(124, 92, 255, .15); color: #c4b4ff; border-color: rgba(124, 92, 255, .32); }
.tag.board, .badge.board { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-line); }
.tag.ok, .badge.ok { background: rgba(52, 211, 153, .13); color: #6ee7b7; border-color: rgba(52, 211, 153, .3); }
.tag.off, .badge.off { background: var(--surface-3); color: var(--text-3); border-color: var(--line); }
.tag.pending, .badge.pending { background: rgba(240, 180, 94, .13); color: var(--gold); border-color: rgba(240, 180, 94, .3); }
[data-theme="light"] .tag.top { color: #c81e1e; }
[data-theme="light"] .tag.ess { color: #96610f; }
[data-theme="light"] .tag.lock { color: #5b3fd6; }
[data-theme="light"] .tag.ok { color: #067647; }

.lv {
  display: inline-flex; align-items: center; gap: 3px;
  height: 19px; padding: 0 7px; border-radius: 99px;
  background: rgba(240, 180, 94, .13); border: 1px solid rgba(240, 180, 94, .28);
  color: var(--gold); font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---- 提示 ---- */
.notice {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm);
  padding: 11px 14px; margin: 14px 0;
  font-size: 13.5px; color: var(--brand-ink);
}
.notice .ic { font-size: 16px; margin-top: 2px; }
.notice.warn {
  background: rgba(240, 180, 94, .1); border-color: rgba(240, 180, 94, .28); color: var(--gold);
}
.notice.err { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .28); color: var(--danger-ink); }

.empty, .empty-box {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 34px 20px; text-align: center;
  color: var(--text-3); font-size: 13.5px;
}
.empty-box { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty .ic { font-size: 26px; opacity: .5; }

/* ---- 分页 ---- */
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px;
  border-radius: var(--radius-xs); border: 1px solid var(--line);
  background: var(--surface); font-size: 13px; color: var(--text-2);
}
.pager a:hover { border-color: var(--brand-line); color: var(--brand-ink); background: var(--brand-soft); }
.pager span.cur { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); font-weight: 700; }

/* ========== 5. 业务组件 ========== */

/* ---- 首页 hero ---- */
.hero {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-hero); pointer-events: none;
}
/* 右上角柔和光斑，让 hero 有光源与层级，避免大面积纯色块 */
.hero::after {
  content: ""; position: absolute; right: -70px; top: -110px;
  width: 300px; height: 300px; pointer-events: none;
  background: radial-gradient(circle, rgba(77, 141, 255, .16), transparent 68%);
}
[data-theme="light"] .hero::after {
  background: radial-gradient(circle, rgba(47, 107, 255, .1), transparent 68%);
}
.hero-in { position: relative; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero .avatar { width: 52px; height: 52px; flex: 0 0 52px; font-size: 21px; }
.hero-id { flex: 1 1 300px; min-width: 240px; }
.hero-id .hi { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hero-id .hi b { font-size: 19px; letter-spacing: -.2px; }
.hero-id .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.hero-id .meta .mi { display: inline-flex; align-items: baseline; gap: 5px; }
.hero-id .meta .mi + .mi::before { content: "·"; margin-right: 4px; color: var(--line-2); }
.hero-id .meta .k { color: var(--text-3); }
.hero-id .meta b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }
/* 窄屏：四项战绩改 2×2，避免最后一个换行时行首留一个孤零零的分隔点 */
@media (max-width: 640px) {
  .hero-id .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
  .hero-id .meta .mi + .mi::before { content: none; }
}
.hero-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.xp {
  position: relative; height: 6px; border-radius: 99px;
  background: var(--surface-3); overflow: hidden; margin-top: 11px; max-width: 420px;
}
.xp > i { display: block; height: 100%; border-radius: 99px; background: var(--grad-brand); box-shadow: 0 0 12px rgba(77, 141, 255, .55); transition: width .4s ease; }

/* 钱包/统计小格 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 13px;
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color .15s, background .15s, transform .15s;
}
.stat:hover { border-color: var(--brand-line); background: var(--surface-3); transform: translateY(-1px); }
.stat .k { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat .k .ic {
  width: 18px; height: 18px; font-size: 12px; flex: 0 0 18px;
  border-radius: 6px; display: inline-grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.stat .v { font-size: 21px; font-weight: 800; letter-spacing: -.4px; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .v.gold { color: var(--gold); }
.stat .v.green { color: var(--ok); }
.stat .v.blue { color: var(--brand-ink); }
/* 旧名兼容 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.xpbar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.xpbar > i { display: block; height: 100%; border-radius: 99px; background: var(--grad-brand); transition: width .4s; }

/* ---- 主题列表（论坛行） ---- */
.topic-list { display: flex; flex-direction: column; }
.topic {
  position: relative; display: flex; align-items: center; gap: 13px;
  padding: 13px 20px; border-bottom: 1px solid var(--line);
  transition: background .13s;
}
.topic:last-child { border-bottom: none; }
.topic::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  opacity: 0; transition: opacity .15s;
}
.topic:hover { background: var(--surface-2); }
.topic:hover::before { opacity: 1; }
.topic:hover .t-title { color: var(--brand); }

.t-av {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #3d5a8a, #2b3b55);
  user-select: none;
}
.t-main { flex: 1 1 auto; min-width: 0; }
.t-title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.t-title {
  font-size: 14.5px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
}
.t-meta {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-top: 4px; font-size: 12px; color: var(--text-3);
}
.t-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-2); flex: 0 0 3px; }
.t-meta b { color: var(--text-2); font-weight: 600; }

.t-stats { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.t-stat {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums;
}
.t-stat .ic { font-size: 13px; opacity: .8; }
.t-stat b { color: var(--text-2); font-weight: 700; }

.t-like {
  width: 54px; flex: 0 0 54px; height: 30px; padding: 0;
  border-radius: var(--radius-xs); border: 1px solid var(--line);
  background: transparent; color: var(--text-3); font-size: 12.5px;
}
.t-like:hover { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }
.t-like.on { color: var(--danger); border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .08); }

@media (max-width: 760px) {
  .topic { padding: 12px 14px; gap: 10px; }
  .t-av { display: none; }
  .t-stats { gap: 10px; }
  .t-stat.hide-sm, .t-like { display: none; }
}

/* ---- 板块一览：单列行式（经典论坛版块列表） ---- */
.bd-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.bd-row {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-top: 1px solid var(--line);
  transition: background .13s;
}
.bd-row:first-child { border-top: none; }
.bd-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  opacity: 0; transition: opacity .15s;
}
.bd-row:hover { background: var(--surface-2); }
.bd-row:hover::before { opacity: 1; }
.bd-row:hover .bd-ico { background: var(--brand); color: #fff; }
.bd-row .bd-ico { transition: background .15s, color .15s; }
.bd-ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink);
}
.bd-ico .ic { font-size: 18px; }
.bd-info { display: flex; align-items: center; gap: 9px; flex: 0 0 30%; min-width: 0; }
.bd-name {
  font-size: 14.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bd-name:hover { color: var(--brand); }
.bd-cnt {
  flex: 0 0 auto; font-size: 11.5px; color: var(--text-3);
  background: var(--surface-3); border-radius: 99px; padding: 1px 8px;
  font-variant-numeric: tabular-nums;
}
.bd-last { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.bd-last .tl {
  font-size: 13px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bd-last .tl:hover { color: var(--brand); }
.bd-last .meta { font-size: 11.5px; color: var(--text-3); }
.bd-arrow { flex: 0 0 auto; color: var(--text-3); }
.bd-row:hover .bd-arrow { color: var(--brand); }
@media (max-width: 640px) {
  .bd-row { padding: 12px 14px; gap: 11px; }
  .bd-ico { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; }
  .bd-info { flex: 0 0 auto; }
  .bd-info .bd-cnt { display: none; }
  .bd-last .meta { display: none; }
  .bd-arrow { display: none; }
}

/* ---- 首页快捷入口（信息区 / 字幕库 / 高级区） ---- */
.qnav { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px 12px; }
.qnav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color .15s, background .15s, transform .15s;
}
.qnav a:hover {
  border-color: var(--brand-line); background: var(--brand-soft);
  transform: translateX(2px);
}
.qnav-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  transition: background .15s, color .15s;
}
.qnav-ico .ic { font-size: 17px; }
.qnav a:hover .qnav-ico { background: var(--brand); color: #fff; }
.qnav-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.qnav-main b { font-size: 14px; font-weight: 700; color: var(--text); }
.qnav-main small { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qnav-arrow { font-size: 14px; color: var(--text-3); flex: 0 0 auto; transition: color .15s; }
.qnav a:hover .qnav-arrow { color: var(--brand); }

/* 窄屏三格快捷入口：默认隐藏，宽屏由侧栏承担 */
.qnav-mobile { display: none; }
@media (max-width: 980px) {
  .qnav-panel { display: none; }
  .qnav-mobile {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 8px; margin-bottom: 14px;
  }
  .qnav-mobile a {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 13px 8px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--line);
    color: var(--text); font-size: 13px; font-weight: 600;
  }
  .qnav-mobile a .qnav-ico { width: 32px; height: 32px; flex-basis: 32px; }
  .qnav-mobile a.on { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand-ink); }
}

/* ---- 侧栏 ---- */
.side-nav { display: flex; flex-direction: column; gap: 16px; }
.side-nav .panel { padding: 10px; }
.s-h {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px 8px 12px; font-size: 11.5px; font-weight: 700;
  color: var(--text-3); letter-spacing: .8px; text-transform: uppercase;
}
/* 侧栏小组标题左侧短整条，与区块标题形成同一套语言 */
.s-h::before {
  content: ""; position: absolute; left: 2px; top: 50%;
  width: 2px; height: 11px; border-radius: 2px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  opacity: .85;
}
.s-i {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 10px; border-radius: var(--radius-xs);
  color: var(--text-2); font-size: 13.5px;
  transition: .13s;
}
.s-i:hover { background: var(--surface-2); color: var(--text); }
.s-i.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.s-i.on .cnt { background: rgba(77, 141, 255, .18); color: var(--brand-ink); }
.s-i .cnt {
  font-size: 11px; color: var(--text-3); background: var(--surface-3);
  border-radius: 99px; padding: 1px 7px; font-variant-numeric: tabular-nums;
}
/* 侧栏「最新回复」：标题最多两行，悬停时整行高亮 */
.rv-list { display: flex; flex-direction: column; padding: 0 8px 10px; }
.rv {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 8px; border-radius: var(--radius-xs); transition: background .13s;
}
.rv:hover { background: var(--surface-2); }
.rv .t-av { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 7px; font-size: 11px; margin-top: 1px; }
.rv-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.rv-main b {
  font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rv:hover .rv-main b { color: var(--brand); }
.rv-meta { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 旧名兼容 */
.side { position: sticky; top: 80px; }
.side .card { padding: 10px; }
.side .s-h { padding: 6px 10px 8px 12px; }

/* ---- 帖子正文 / 楼层 ---- */
.post-hd { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.post-hd h1 { font-size: 23px; line-height: 1.42; word-break: break-word; }
.post-hd h1 .tag { vertical-align: 4px; margin-right: 4px; }
.post-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px; font-size: 12.5px; color: var(--text-3);
}
.post-meta .who { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .who b { color: var(--text-2); font-weight: 600; }
.post-meta .avatar { width: 24px; height: 24px; flex: 0 0 24px; font-size: 11px; }
.post-meta .sep { width: 1px; height: 12px; background: var(--line-2); }
.post-body {
  padding: 20px 24px 22px;
  font-size: 15px; line-height: 1.9;
  color: var(--text); white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
.post-ft {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 24px; border-top: 1px solid var(--line); background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.post-ft .sp { flex: 1 1 auto; }

.floor {
  display: grid; grid-template-columns: 148px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}
.floor:last-child { border-bottom: none; }
.floor-user {
  padding: 18px 14px; text-align: center;
  background: var(--surface-2); border-right: 1px solid var(--line);
}
.floor-user .avatar { width: 44px; height: 44px; flex: 0 0 44px; font-size: 17px; margin: 0 auto 8px; }
.floor-user .nm { font-size: 13px; font-weight: 700; color: var(--text); word-break: break-all; }
.floor-user .lv { margin-top: 6px; }
.floor-user .lou { margin-top: 7px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.floor-body { padding: 16px 20px 14px; min-width: 0; }
.floor-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); margin-bottom: 8px; }
.floor-hd .badge-op { background: var(--brand-soft); color: var(--brand-ink); border-radius: 4px; padding: 0 5px; font-size: 11px; font-weight: 700; }
.floor-content {
  font-size: 14.5px; line-height: 1.85; color: var(--text);
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
.floor-ft { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.floor-ft button, .floor-ft .btn { height: 28px; padding: 0 9px; font-size: 12px; border-radius: 7px; background: transparent; border-color: var(--line); color: var(--text-3); }
.floor-ft button:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.floor-ft button.on { color: var(--danger); border-color: rgba(248, 113, 113, .3); }

@media (max-width: 640px) {
  .floor { grid-template-columns: minmax(0, 1fr); }
  .floor-user {
    display: flex; align-items: center; gap: 10px; text-align: left;
    padding: 12px 14px 0; background: none; border-right: none;
  }
  .floor-user .avatar { width: 30px; height: 30px; flex: 0 0 30px; font-size: 12px; margin: 0; }
  .floor-user .lou { margin: 0 0 0 auto; }
  .floor-body { padding: 10px 14px 14px; }
  .post-hd, .post-body, .post-ft { padding-left: 16px; padding-right: 16px; }
}

/* 旧楼层类名兼容（advanced/其它页面若引用） */
.floor-item { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.floor-item:last-child { border-bottom: none; }
.fav {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, #3d5a8a, #2b3b55); user-select: none;
}
.fmain { flex: 1 1 auto; min-width: 0; }
.fhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); margin-bottom: 5px; }
.fhead .nm { color: var(--text); font-weight: 600; font-size: 13px; }
.fbody { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.8; color: var(--text); }
.fact { display: flex; gap: 8px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.fact button { height: 28px; padding: 0 10px; font-size: 12px; }

/* 回复框 */
.reply-box { padding: 16px 20px 18px; }
.reply-box textarea { min-height: 118px; }

/* 权限/门槛设置块（发帖、编辑共用） */
.gate-box {
  margin: 14px 0; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* ---- 表格（高级区记录、后台共用） ---- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--text-3);
  letter-spacing: .6px; text-transform: uppercase;
  padding: 11px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.ptitle { font-size: 14px; font-weight: 500; color: var(--text); }
.ptitle:hover { color: var(--brand); }
.pmeta { font-size: 12px; color: var(--text-3); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- 面包屑 ---- */
.crumbs { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--brand); }
.crumbs .ic { font-size: 13px; opacity: .7; }

/* ---- 登录 / 注册 ---- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card {
  width: 100%; max-width: 396px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 30px 28px 26px;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .9);
}
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 6px; }
.auth-card h1 { font-size: 20px; text-align: center; margin-top: 12px; }
.auth-card .sub { text-align: center; color: var(--text-3); font-size: 13px; margin: 6px 0 22px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .btn, .auth-card button { width: 100%; height: 42px; }
.auth-alt { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-3); }

/* ---- 页脚 ---- */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 30px; color: var(--text-3); font-size: 12.5px; }
.foot .wrap { display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; padding-top: 0; padding-bottom: 0; }
.foot .foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--text-3); }
.foot a:hover { color: var(--text-2); }

/* ---- 移动端顶栏 ---- */
@media (max-width: 900px) {
  .top-search { display: none; }
  .topbar-in { gap: 12px; padding: 0 14px; }
  .wrap { padding: 18px 14px 44px; }
}
@media (max-width: 640px) {
  .menu { display: none; }
  .nav-toggle { display: inline-grid; width: 34px; height: 34px; }
  .umenu .uname { display: none; }
  .brand-txt small { display: none; }
  .hero { padding: 18px; }
  .post-hd h1 { font-size: 20px; }
}

/* ---- 站内通知与余额明细 ---- */
.n-bell { position: relative; }
.n-dot {
  position: absolute; top: 1px; right: 1px;
  min-width: 15px; height: 15px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; line-height: 1;
  color: #fff; background: var(--danger); border-radius: 999px;
  box-shadow: 0 0 0 2px var(--bg);
}
.u-note {
  margin-left: auto;
  min-width: 17px; height: 17px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700;
  color: #fff; background: var(--danger); border-radius: 999px;
}

.tabs { display: flex; gap: 6px; margin-top: 16px; }
.tabs a {
  padding: 7px 16px; font-size: 13px; font-weight: 600;
  color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--radius-xs);
}
.tabs a:hover { color: var(--text); border-color: #3b4a5d; }
.tabs a.on { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand-line); }

.tag.minus {
  background: rgba(248, 113, 113, .12); color: var(--danger-ink);
  border-color: rgba(248, 113, 113, .28);
}

.nlist { list-style: none; margin: 0; padding: 0; }
.nitem {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.nitem:last-child { border-bottom: none; }
.nitem:hover { background: var(--surface-2); }
.nitem.unread { background: rgba(77, 141, 255, .045); }
.nico {
  flex: none; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--brand-ink);
  background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.nitem.unread .nico {
  color: var(--gold); background: rgba(240, 180, 94, .12);
  border-color: rgba(240, 180, 94, .3);
}
.nbd { flex: 1 1 auto; min-width: 0; }
.nt { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.nt b { font-weight: 700; }
.ndot {
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
  padding: 1px 6px; border-radius: 999px;
  color: var(--gold); background: rgba(240, 180, 94, .14);
  border: 1px solid rgba(240, 180, 94, .3);
}
.nb { margin-top: 3px; font-size: 12.8px; color: var(--text-2); line-height: 1.6; word-break: break-word; }
.nm { margin-top: 5px; font-size: 11.5px; color: var(--text-3); }
.ngo { flex: none; color: var(--text-3); margin-top: 8px; font-size: 15px; }

/* 帖子/回帖上的公开奖励标记：逐条列出谁发了多少 */
.rw-tag {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  max-width: 100%; padding: 1px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 19px;
  color: var(--gold); background: rgba(240, 180, 94, .1);
  border: 1px solid rgba(240, 180, 94, .28);
}
.rw-tag .ic { flex: 0 0 auto; font-size: 11px; }
.rw-tag .rw-sum { padding-right: 8px; border-right: 1px solid rgba(240, 180, 94, .32); }
.rw-tag .rw-who { color: var(--text-3); font-weight: 500; white-space: nowrap; }
.rw-tag .rw-who b { color: var(--gold); font-weight: 700; }
.rw-tag .rw-more { color: var(--text-3); font-weight: 500; }
.rw-tag > .rw-who + .rw-who::before { content: "·"; margin-right: 6px; color: rgba(240, 180, 94, .55); }

/* 发帖页的附件录入行 */
.att-rows { display: flex; flex-direction: column; gap: 10px; }
.att-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.att-row input[type=file] { flex: 1 1 240px; min-width: 0; font-size: 12.5px; }
.att-price { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.att-price input { width: 88px; }

/* 详情页附件区：文件名很长，靠省略号撑住，不要把整行推歪 */
.att-list {
  margin: 16px 0 4px; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
}
.att-hd {
  display: flex; align-items: center; gap: 7px; padding: 9px 14px;
  background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--text-2);
}
.att-hd .ic { font-size: 13px; }
.att-tip { font-weight: 500; font-size: 11.5px; color: var(--text-3); }
.att-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-top: 1px solid var(--line);
}
.att-main { flex: 1 1 auto; min-width: 0; }
.att-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.att-meta { margin-top: 3px; font-size: 11.5px; color: var(--text-3); }
.att-act { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.att-cost { font-size: 12px; font-weight: 700; color: var(--gold); white-space: nowrap; }
@media (max-width: 560px) {
  .att-item { align-items: flex-start; }
  .att-act { flex-direction: column; align-items: flex-end; gap: 5px; }
}

/* 我的附件页：文件名和帖子标题都长，靠省略号锁住列宽 */
.att-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.post-link { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-green { color: var(--ok); font-weight: 600; }
.att-gold { color: var(--gold); font-weight: 700; }
/* 窄屏下宽表别压成一列一两个字，交给外层的 overflow-x 横向滚动 */
@media (max-width: 760px) { .tbl-wide { min-width: 620px; } }

/* ===== 首页「最新字幕」展示位（管理员策展卡片网格） ===== */
.showcase-band { margin-bottom: 4px; }
.showcase-grid {
  display: grid; gap: 14px; padding: 4px 16px 18px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.sc-card {
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); overflow: hidden; transition: .14s;
}
.sc-card:hover { border-color: var(--brand-line); background: var(--surface-2); transform: translateY(-2px); }
.sc-cover {
  display: block; width: 100%; background: var(--surface-2);
  flex: 0 0 auto; -webkit-flex: 0 0 auto;
}
/* 有封面：按原图比例完整显示，不裁切（竖版高图也能全部露出） */
img.sc-cover { height: auto; }
/* 无封面占位：保留方块比例 */
.sc-cover.ph {
  aspect-ratio: 16 / 9; min-height: 96px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 0 10px; font-weight: 700; color: #fff; background: var(--grad-brand);
}
.sc-name {
  padding: 0 10px 12px; font-size: 13px; font-weight: 600; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 640px) {
  .showcase-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 4px 12px 14px; }
}
