/* =========================================================================
   钀借剼鐐?路 鏍峰紡琛?   涓€濂楄嚜宸卞啓鐨勮璁＄郴缁燂細鐧藉簳鍗＄墖 + 涓€涓摑涓昏壊 + 鏋佹祬鍒嗛殧绾匡紝
   鎵€鏈夊昂瀵歌蛋鍙橀噺锛岀獥鍙ｆ媺澶ф媺灏忛兘涓嶄細鎸ゃ€?   ========================================================================= */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f2f3f6;
  --surface-3: #eaecf1;
  --ink: #101318;
  --ink-2: #454b57;
  --muted: #717886;
  --faint: #9aa1ae;
  --line: #e8eaef;
  --line-2: #dcdfe6;

  --accent: #2f6bff;
  --accent-ink: #1d4ed8;
  --accent-soft: #eaf0ff;
  --ok: #17915b;
  --warn: #c9761b;
  --danger: #d64545;
  --star: #e0a300;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(17, 20, 28, 0.04), 0 1px 3px rgba(17, 20, 28, 0.04);
  --shadow-lift: 0 6px 20px rgba(17, 20, 28, 0.08), 0 1px 3px rgba(17, 20, 28, 0.05);
  --gut: clamp(16px, 2.4vw, 56px);
  --maxw: 1680px;
  --header-h: 64px;

  --sans: system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding-left: 1.25em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
button { font: inherit; }
::selection { background: var(--accent-soft); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; }
.dot { margin: 0 6px; color: var(--faint); }
.kicker { color: var(--accent-ink); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- 椤舵爮 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--gut);
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; letter-spacing: -0.01em; }
.brand-text em { font-style: normal; font-size: 11px; color: var(--faint); }

.mainnav { display: flex; align-items: center; gap: 2px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.navlink {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 13px; border-radius: 9px;
  border: 0; background: none; font-family: inherit; cursor: pointer;
  color: var(--ink-2); font-size: 14.5px; font-weight: 500; white-space: nowrap;
}
.navlink:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.navlink.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

.navmore { position: relative; }
.navmore-pop {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 60; min-width: 268px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(17, 20, 28, 0.16); display: none; flex-direction: column;
}
.navmore-pop.is-open { display: flex; }
.navmore-item { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 9px; color: var(--ink-2); }
.navmore-item:hover { background: var(--surface-2); text-decoration: none; }
.navmore-item .ic { margin-top: 3px; color: var(--muted); }
.navmore-item strong { display: block; font-size: 14px; color: var(--ink); }
.navmore-item em { font-style: normal; font-size: 12.5px; color: var(--muted); }

.topsearch { flex: 1 1 auto; width: auto; max-width: 360px; min-width: 170px; margin: 0; position: relative; display: flex; }
.topsearch input {
  width: 100%; height: 40px; padding: 0 42px 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface-2);
  color: var(--ink); font-size: 14px;
}
.topsearch input:focus { outline: 2px solid var(--accent-soft); outline-offset: -1px; border-color: var(--accent); background: var(--surface); }
.topsearch button {
  position: absolute; right: 4px; top: 4px; width: 32px; height: 32px;
  border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.topsearch button:hover { background: var(--surface-3); color: var(--ink); }

.topactions { flex: none; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topdl { height: 38px; }
.topguest { display: flex; align-items: center; gap: 8px; }

/* 澶村儚涓嬫媺 */
.usermenu { position: relative; }
.usermenu-btn {
  display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px 3px 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer;
}
.usermenu-btn:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.usermenu-caret { color: var(--muted); }
.usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 226px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(17, 20, 28, 0.16);
  display: none; flex-direction: column;
}
.usermenu-pop.is-open { display: flex; }
.usermenu-head { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.usermenu-head strong { display: block; font-size: 14.5px; }
.usermenu-head em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.usermenu-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: none; cursor: pointer; color: var(--ink-2); font-size: 13.5px; border-radius: 9px; }
.usermenu-item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.usermenu-item .dot-badge { position: static; margin-left: auto; }
.usermenu-out { color: var(--danger); }
.usermenu-line { height: 1px; background: var(--line); margin: 5px 6px; }

/* ---------------------------------------------------------------- 甯冨眬 */
.page {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 24px var(--gut) 72px;
}
.page-gap { margin-bottom: 18px; }
.shell { display: grid; grid-template-columns: minmax(0, 1fr) clamp(290px, 21vw, 340px); gap: 22px; align-items: start; }
.shell-side { position: sticky; top: calc(var(--header-h) + 18px); display: flex; flex-direction: column; gap: 14px; }
.layout-2col { display: grid; grid-template-columns: minmax(0, 1fr) clamp(290px, 21vw, 340px); gap: 22px; align-items: start; }
.layout-guide { display: grid; grid-template-columns: clamp(190px, 15vw, 240px) minmax(0, 1fr); gap: clamp(22px, 3vw, 48px); align-items: start; }
.col-main { min-width: 0; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

.crumbs { margin-bottom: 14px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; align-items: center; color: var(--muted); font-size: 13px; }
.crumbs li { display: inline-flex; align-items: center; color: var(--muted); }
.crumbs li.sep { color: var(--faint); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-ink); }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 16px; font-size: 13.5px; box-shadow: var(--shadow-lift); transition: top 0.16s ease; }
.skip:focus { top: 12px; }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.pagehead h1 { font-size: clamp(24px, 2.4vw, 32px); }
.pagesub { color: var(--muted); max-width: 76ch; margin-top: 8px; }
.pagehead .searchbox { width: min(360px, 100%); }

/* ---------------------------------------------------------------- 鎺т欢 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background 0.14s, box-shadow 0.14s, transform 0.06s;
}
.btn:hover { background: #23272f; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn-lg { min-height: 46px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-ink); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b93a3a; }
.inline { display: inline; }

input[type='text'], input[type='email'], input[type='password'], input[type='search'], input[type='url'], input[type='number'], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 13px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); outline-offset: -1px; border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--faint); }

.field { display: block; margin-bottom: 14px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-panel { display: block; }
.formfoot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.searchbox { display: flex; gap: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bar-chips { margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-sm { padding: 3px 10px; font-size: 12.5px; background: var(--surface-2); border-color: transparent; }
.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; }
.pill.is-ok { background: #e6f6ee; color: var(--ok); }
.pill.is-bad { background: #fdecec; color: var(--danger); }
.pill.is-new { background: var(--accent-soft); color: var(--accent-ink); }
.rel-pill { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; background: var(--surface-2); color: var(--ink-2); }
.rel-friend { background: #e6f6ee; color: var(--ok); }
.tag-mod { background: var(--accent-soft); color: var(--accent-ink); padding: 1px 7px; border-radius: 5px; font-size: 11.5px; }
.tag-trust { background: var(--surface-2); color: var(--muted); padding: 1px 7px; border-radius: 5px; font-size: 11.5px; }

.avatar { display: inline-flex; flex: none; width: var(--av-size, 40px); height: var(--av-size, 40px); border-radius: 50%; overflow: hidden; background: var(--surface-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uchip { display: inline-flex; align-items: center; gap: 8px; }
.uchip-sub { color: var(--muted); font-size: 12.5px; }
.ulink { font-weight: 600; color: var(--ink); }

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 18px;
}
.panel-tight { padding: 16px 18px; }
.panel-title { font-size: 16px; margin-bottom: 14px; }
.sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.sechead h2 { font-size: 17px; }
.secsub { color: var(--muted); font-size: 13px; }
.more { color: var(--accent-ink); font-size: 13.5px; font-weight: 500; }

.sidecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.sidecard h3 { font-size: 14px; margin-bottom: 12px; }
.sidecard-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.sidecard-list a { color: var(--ink-2); font-size: 13.5px; }
.sidecard-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.sidecard-kv:last-child { border-bottom: 0; }
.sidecard-kv span { color: var(--muted); }
.sidecard-kv strong { font-weight: 600; text-align: right; }
.sideauthor { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sideauthor strong { display: block; font-size: 14.5px; }
.sideauthor em { font-style: normal; color: var(--muted); font-size: 12.5px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 11px 14px; color: var(--muted); font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.tab-count { background: var(--surface-2); border-radius: 999px; padding: 0 7px; font-size: 12px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; }
.pages { display: flex; gap: 4px; }
.page-num, .page-prev, .page-next { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-2); font-size: 13.5px; }
.page-num:hover, .page-prev:hover, .page-next:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
.page-num.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); }
.errorpage { text-align: center; padding: 60px 20px; }
.errorcode { font-size: 44px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; background: #e6f6ee; color: #116b45; border: 1px solid #cbeadb; }
.flash-err { background: #fdecec; color: #a53434; border-color: #f6d5d5; }
.flash-ok { background: #e6f6ee; color: #116b45; }
.notice { background: var(--accent-soft); border: 1px solid #d5e2ff; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; }
.notice strong { display: block; margin-bottom: 4px; color: var(--accent-ink); }
.hint { color: var(--muted); font-size: 13px; }
.signin-hint { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 18px; text-align: center; }

/* ---------------------------------------------------------------- 棣栭〉 */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(18px, 2.5vw, 40px) 0 28px; }
.hero-text h1 { font-size: clamp(30px, 3.4vw, 48px); letter-spacing: -0.02em; }
.hero-lead { color: var(--ink-2); font-size: 16px; max-width: 52ch; margin: 14px 0 20px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: clamp(22px, 3vw, 52px); margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat strong { font-size: 24px; font-weight: 700; }
.stab { display: flex; flex-direction: column; gap: 2px; }
.stab strong { font-size: 22px; }
.statlist { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-art img { width: 100%; border-radius: var(--radius-lg); display: block; }

/* ---------------------------------------------------------------- 璁哄潧 */
.boardgrid, .boardgrid-wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.boardcard { display: flex; gap: 12px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.boardcard:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); text-decoration: none; }
.boardcard-icon { width: 40px; height: 40px; border-radius: 11px; background: color-mix(in srgb, var(--tag, var(--accent)) 12%, var(--surface)); color: var(--tag, var(--accent)); display: flex; align-items: center; justify-content: center; flex: none; }
.boardcard-text { min-width: 0; }
.boardcard-text strong { display: block; font-size: 15px; }
.boardcard-text em { font-style: normal; color: var(--muted); font-size: 12.5px; display: block; margin: 2px 0 4px; }
.boardcard-count { color: var(--faint); font-size: 12.5px; }
.board-tag { display: inline-flex; padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--tag, var(--accent)) 12%, var(--surface)); color: var(--tag, var(--accent)); font-size: 12px; }

.threadlist { list-style: none; margin: 0; padding: 0; }
.trow { display: flex; gap: 12px; align-items: center; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow-body { min-width: 0; flex: 1; }
.trow-title { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; color: var(--ink); }
.trow-title:hover { color: var(--accent-ink); }
.trow-sub { color: var(--muted); font-size: 12.8px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trow-meta { color: var(--faint); font-size: 12px; }
.trow-stats { display: flex; gap: 18px; flex: none; text-align: center; }
.trow-stats span { display: flex; flex-direction: column; color: var(--faint); font-size: 11px; }
.trow-stats strong { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.trow-av { flex: none; }
.pin { background: var(--accent-soft); color: var(--accent-ink); font-size: 11.5px; padding: 1px 7px; border-radius: 5px; }

.thread { max-width: min(1180px, 100%); }
.thread-head { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.thread-head h1 { font-size: clamp(23px, 2.4vw, 31px); margin: 8px 0 12px; }
.thread-board a { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tag, var(--accent)) 12%, var(--surface)); color: var(--tag, var(--accent)); font-size: 12.5px; }
.thread-meta { display: flex; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; gap: 2px; }
.postlist { display: flex; flex-direction: column; gap: 14px; }
.post { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.post-op { border-color: var(--line-2); box-shadow: var(--shadow); }
.post-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.post-main { min-width: 0; }
.post-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.post-head strong { font-size: 14.5px; }
.post-badge { background: var(--accent-soft); color: var(--accent-ink); font-size: 11.5px; padding: 1px 7px; border-radius: 5px; }
.post-floor { color: var(--faint); font-size: 12px; }
.post-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.post-anchor { color: var(--faint); }
.replywrap { max-width: min(1180px, 100%); }
.replybox { }
.quote-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12.5px; padding: 0; }
.quote-btn:hover { color: var(--accent-ink); }
.likebtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12.5px; padding: 0; }
.likebtn:hover { color: var(--accent-ink); }
.likebtn.is-on { color: var(--danger); }
.fav-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12.5px; padding: 0; }
.fav-btn.is-on { color: var(--star); }

.rich { line-height: 1.85; color: var(--ink-2); word-break: break-word; }
.rich p { margin: 0 0 12px; }
.rich strong { color: var(--ink); }
.rich code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px; font-family: var(--mono); font-size: 13px; }
.rich pre { background: #14161c; color: #e6e8ee; padding: 14px 16px; border-radius: 10px; overflow: auto; }
.rich blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; color: var(--ink-2); }
.rich ul, .rich ol { padding-left: 1.3em; margin: 0 0 12px; }
.rich a { text-decoration: underline; text-underline-offset: 2px; }
.rich img { border-radius: 10px; height: auto; }
.prose { max-width: min(900px, 100%); }

/* ---------------------------------------------------------------- 璧勬簮 */
.resgrid, .resgrid-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(266px, 1fr)); gap: 14px; }
.rescard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.rescard:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); }
.rescard-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.rescat { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--tag, var(--accent)) 12%, var(--surface)); color: var(--tag, var(--accent)); }
.reskind { color: var(--faint); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.rescard h3 { font-size: 15.5px; margin-bottom: 6px; }
.rescard-desc { color: var(--muted); font-size: 13.5px; margin-bottom: 10px; flex: 1; }
.rescard-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.rescard-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.rescard-dl { color: var(--muted); }
.resdetail { max-width: 100%; }
.resdetail-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.resdetail-head h1 { font-size: clamp(23px, 2.4vw, 31px); margin: 8px 0 10px; }
.resdetail-body { margin-bottom: 18px; }
.resdetail-action { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.resdetail-action p { margin: 0; }

.filterbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* ---------------------------------------------------------------- 鎵炬惌瀛?*/
.modetabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 20px; }
.modetab { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.modetab:hover { border-color: var(--line-2); box-shadow: var(--shadow); text-decoration: none; }
.modetab strong { font-size: 15px; }
.modetab em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.modetab.is-on { border-color: var(--accent); background: var(--accent-soft); }
.modetab.is-on strong { color: var(--accent-ink); }
.findbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.usergrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.usercard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.usercard:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); }
.usercard-top { display: block; position: relative; }
.usercard-banner { width: 100%; height: 116px; object-fit: cover; display: block; }
.usercard-avatar { position: absolute; left: 14px; bottom: -22px; border: 3px solid var(--surface); border-radius: 50%; }
.usercard-body { padding: 30px 16px 12px; flex: 1; }
.usercard-name { font-size: 16px; }
.usercard-id, .usercard-vrc { color: var(--muted); font-size: 12.5px; }
.usercard-bio { color: var(--ink-2); font-size: 13.5px; margin: 8px 0; }
.usercard-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.usercard-meta { color: var(--faint); font-size: 12px; }
.usercard-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.peoplelist { list-style: none; margin: 0; padding: 0; }
.peoplelist-wide { }
.peoplelist-time { color: var(--faint); font-size: 12px; }

.findcards { max-width: 1000px; margin: 0 auto; }
.fcard { perspective: 1800px; }
.fcard-inner { position: relative; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transition: transform 0.26s ease, opacity 0.26s ease; }
.fcard-inner.is-flip-next { transform: rotateY(-90deg); opacity: 0; }
.fcard-inner.is-flip-prev { transform: rotateY(90deg); opacity: 0; }
.fcard-inner.is-in-next { transform: rotateY(90deg); opacity: 0; }
.fcard-inner.is-in-prev { transform: rotateY(-90deg); opacity: 0; }
.fcard-inner.is-flipped { transform: rotateY(180deg); }
.fcard-face { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lift); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fcard-back { position: absolute; inset: 0; transform: rotateY(180deg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 28px; overflow: auto; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fcard-media { position: relative; background: var(--surface-2); }
.fcard-media img { width: 100%; height: 100%; min-height: 350px; object-fit: cover; display: block; }
.fcard-idx { position: absolute; left: 12px; top: 12px; background: rgba(16, 19, 24, 0.62); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.fcard-info { padding: 28px; display: flex; flex-direction: column; }
.fcard-info h2 { font-size: clamp(22px, 2.2vw, 30px); }
.fcard-user { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
.fcard-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fcard-bio { color: var(--ink-2); flex: 1; }
.fcard-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.fcard-back h2 { font-size: 22px; margin-bottom: 12px; }
.fcard-facts { margin-bottom: 14px; }
.fcard-biobig { color: var(--ink-2); line-height: 1.85; }
.fcard-nav { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
.fcard-nav .btn { min-width: 140px; }
.fcard-tools { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 12px; }
.fcard-end { text-align: center; font-size: 19px; color: var(--muted); padding: 40px 0; }
.flip-x { transform: scaleX(-1); }

/* ---------------------------------------------------------------- 绉佽亰 / 绀惧尯 */
.chatpage { display: grid; grid-template-columns: clamp(240px, 21vw, 300px) minmax(0, 1fr); gap: 18px; align-items: start; }
.chat-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-side-head { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.convrow { display: flex; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
.convrow:hover { background: var(--surface-2); text-decoration: none; }
.convrow.has-unread { background: var(--accent-soft); }
.conv-text { min-width: 0; flex: 1; }
.conv-text strong { font-size: 14px; display: block; }
.conv-text em { font-style: normal; color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.chat-room { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 60vh; }
.chat-room-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-who { display: flex; align-items: center; gap: 10px; }
.chat-back { color: var(--muted); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { color: var(--faint); text-align: center; margin: auto; }
.msg { display: flex; gap: 10px; max-width: 74%; }
.msg.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-main { min-width: 0; }
.msg-body { display: block; padding: 9px 13px; border-radius: 12px; background: var(--surface-2); color: var(--ink); }
.msg.is-mine .msg-body { background: var(--accent); color: #fff; }
.msg-main time { display: block; color: var(--faint); font-size: 11.5px; margin-top: 4px; }
.msg.is-mine .msg-main time { text-align: right; }
.msg-avatar { align-self: flex-end; }
.msg-sticker { max-width: 120px; }
.chat-bar { display: flex; gap: 10px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-bar textarea { min-height: 44px; max-height: 140px; }
.sticker-btn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; min-height: 44px; padding: 0 14px; cursor: pointer; }
.stickerpanel { border-top: 1px solid var(--line); padding: 12px 16px; }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; max-height: 240px; overflow: auto; }
.sticker-cell { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 4px; cursor: pointer; }
.sticker-cell:hover { border-color: var(--accent); }
.sticker-text { border: 1px solid transparent; border-radius: 10px; background: none; padding: 4px; font-size: 22px; cursor: pointer; }
.sticker-fav { }
.sticker-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.sticker-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.sticker-upload { }
.quickchat { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.quickchat-item { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.quickchat-item:hover { border-color: var(--accent); color: var(--accent-ink); }

.commgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.commcard { display: flex; gap: 12px; align-items: flex-start; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.commcard:hover { border-color: var(--line-2); box-shadow: var(--shadow-lift); text-decoration: none; }
.commavatar { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; }
.commavatar-lg { width: 62px; height: 62px; border-radius: 16px; font-size: 27px; }
.commcard-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.commcard-text strong { font-size: 15px; display: flex; align-items: center; gap: 7px; }
.commcard-text em { font-style: normal; color: var(--muted); font-size: 13px; }
.commmeta { color: var(--faint); font-size: 12px; }
.commtag { font-size: 11px; color: var(--ok); background: #e6f6ee; border-radius: 4px; padding: 0 6px; }
.commhead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: start; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.commhead h1 { font-size: 26px; }
.commhead-meta { color: var(--muted); font-size: 13px; margin: 6px 0 8px; }
.commhead-intro { color: var(--ink-2); max-width: 62ch; }
.commhead-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.commmembers { display: flex; flex-wrap: wrap; gap: 8px; }
.comm-log { max-height: 46vh; }

/* ---------------------------------------------------------------- 涓汉 */
.profilehead { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; }
.profilehead-main { flex: 1; min-width: 0; }
.profilehead h1 { font-size: 26px; }
.profilehead-handle { color: var(--muted); font-size: 13.5px; }
.profilehead-bio { color: var(--ink-2); margin: 10px 0; max-width: 70ch; }
.profilehead-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.profilehead-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-panel { }
.tagpick { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0 8px; }
.tagpick-item { display: inline-flex; }
.tagpick-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.tagpick-item span { display: inline-block; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink-2); cursor: pointer; background: var(--surface); }
.tagpick-item input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.uploadrow { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.uploadbox { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); cursor: pointer; background: var(--surface); }
.uploadbox span { font-size: 13.5px; color: var(--ink-2); }
.uploadbox img { border-radius: 8px; object-fit: cover; }
.uploadbox-wide { flex: 1 1 260px; }
.codefield { display: flex; gap: 8px; }
.codefield input { flex: 1 1 auto; }

/* ---------------------------------------------------------------- 鏁欑▼ / 鎸囧崡 */
.guidehead { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.guidehead h1 { font-size: clamp(26px, 2.8vw, 36px); }
.guidelead { color: var(--ink-2); max-width: 80ch; margin: 12px 0; }
.guidemeta { color: var(--muted); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.guidebody { max-width: 100%; }
.toc a, .guidelist a { display: flex; gap: 9px; padding: 6px 8px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; }
.toc a:hover, .guidelist a:hover { background: var(--surface-2); text-decoration: none; }
.gchapter { margin-bottom: 40px; scroll-margin-top: 90px; }
.gchapter h2 { font-size: clamp(21px, 2.2vw, 27px); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.glead { color: var(--ink-2); margin-bottom: 16px; }
.gstep { margin-bottom: 22px; }
.gstep h3 { font-size: 16.5px; margin-bottom: 7px; }
.gstep .rich { max-width: 88ch; }
.guidefig { margin: 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.guidefig img { width: 100%; max-height: 620px; object-fit: contain; border-radius: 8px; display: block; }
.figref, .figref figcaption { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.toc { position: sticky; top: calc(var(--header-h) + 18px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.toc-title { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.toc ol, .guidelist, .glossary ol, .faqlist, .step-list, .plainlist, .notiflist, .friendlist, .peoplelist, .threadlist, .sticker-tabs { list-style: none; margin: 0; padding: 0; }
.toc ol { display: flex; flex-direction: column; gap: 2px; }
.guidelist { display: flex; flex-direction: column; gap: 2px; }
.guidelist a { display: flex; gap: 9px; padding: 6px 8px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; }
.guidelist a:hover { background: var(--surface-2); text-decoration: none; }
.guidelist a.is-current { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.tocnum { color: var(--faint); font-variant-numeric: tabular-nums; }
.toc-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.guideend { margin-top: 24px; padding: 20px; background: var(--accent-soft); border-radius: var(--radius); }
.refblock { margin-top: 18px; padding: 14px 16px; background: var(--surface-2); border-radius: var(--radius); }
.refblock-title { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.refgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.refitem { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.refitem img { width: 100%; height: 120px; object-fit: cover; display: block; }
.refsrc { display: block; padding: 7px 9px; font-size: 12px; color: var(--muted); }
.videobox { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.videobox-title { font-size: 13px; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.videoitem { padding: 10px 0; border-bottom: 1px solid var(--line); }
.videoitem:last-child { border-bottom: 0; }
.videoline { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.videotitle { font-weight: 600; }
.videolink { font-size: 12.5px; margin-left: auto; }
.biliwrap { position: relative; width: 100%; max-width: 760px; aspect-ratio: 16 / 9; margin-top: 10px; background: #000; border-radius: 10px; overflow: hidden; }
.bili { width: 100%; height: 100%; border: 0; }
.glossary { margin-top: 28px; }
.step { }
.stab { }
.outlink { }
.linkcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.linkcard-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.linkgroup { margin-bottom: 28px; }
.linkgroup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.linkgroup-head h2 { font-size: 19px; }
.linkdecl { color: var(--muted); font-size: 13.5px; }
.linkwarn { background: #fff6e8; border: 1px solid #f2dfc0; color: #8a5a17; border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; font-size: 13.5px; }
.linkcode { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; }
.faqlist { display: flex; flex-direction: column; gap: 10px; }
.faqitem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.faqitem summary { cursor: pointer; font-weight: 600; }
.srcnote { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--faint); font-size: 12.5px; }

/* ---------------------------------------------------------------- 涓嬭浇 / 璁よ瘉 / 寮曞 */
.dlgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 20px; }
.dlcard { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.dlcard-top { display: flex; gap: 12px; align-items: flex-start; }
.dlicon { font-size: 26px; line-height: 1; }
.dlcard h2 { font-size: 18px; }
.tiplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; color: var(--ink-2); font-size: 13.5px; flex: 1; }
.tiplist li { position: relative; padding-left: 16px; }
.tiplist li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.authwrap { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--header-h) - 60px); padding: 30px 0; }
.authwrap-wide { align-items: flex-start; }
.authcard { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px 32px; box-shadow: var(--shadow-lift); }
.auth-title { font-size: 25px; margin-bottom: 8px; }
.auth-sub { color: var(--muted); margin-bottom: 20px; }
.authform { }
.auth-alt { margin-top: 16px; text-align: center; font-size: 13.5px; }
.auth-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; }
body.page-auth {
  background-image: linear-gradient(rgba(12, 14, 20, 0.28), rgba(12, 14, 20, 0.5)), url('/img/login-bg.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
body.page-auth .topbar { background: color-mix(in srgb, var(--surface) 82%, transparent); }
body.page-auth .authcard { border-color: rgba(255, 255, 255, 0.5); }
.auth-alt { color: var(--muted); }

.welcome { max-width: 920px; margin: 0 auto; }
.welcome-head { text-align: center; margin-bottom: 24px; }
.welcome-kicker { color: var(--accent-ink); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.welcome h1 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.welcome .pagesub { max-width: 62ch; margin: 0 auto; }
.wstep { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.wstep-dot { width: 28px; height: 4px; border-radius: 2px; background: var(--surface-3); }
.wstep-dot.is-on { background: var(--accent); }
.wcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; }
.wcard h2 { font-size: 17px; margin-bottom: 4px; }
.welcome-foot { display: flex; gap: 12px; justify-content: center; margin: 22px 0 40px; }
.themepick { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.themepick-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.themepick-item input { position: absolute; opacity: 0; }
.themepick-swatch { width: 80px; height: 52px; border-radius: 10px; border: 2px solid var(--line); display: block; }
.themepick-item input:checked + .themepick-swatch { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.themepick-item em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.theme-swatch-default { background: linear-gradient(135deg, #ffffff, #eef0f4); }
.theme-swatch-glass { background: linear-gradient(135deg, #cfd8ff, #ffd9c2 60%, #f6f2ff); }
.theme-swatch-warm { background: linear-gradient(135deg, #fbf1e2, #f4dcc2); }
.theme-swatch-dark { background: linear-gradient(135deg, #23252d, #14151a); }
.theme-swatch-compact { background: repeating-linear-gradient(180deg, #f2f3f6 0 6px, #e6e8ee 6px 12px); }

/* ---------------------------------------------------------------- 鏉傞」 */
.meta { color: var(--muted); font-size: 13px; }
.rules { padding-left: 1.2em; }
.step-list, .plainlist { list-style: none; padding: 0; }
.maillog { width: 100%; border-collapse: collapse; font-size: 13px; }
.maillog td { padding: 7px 9px; border-bottom: 1px solid var(--line); }
.mail-status.is-ok { color: var(--ok); }
.mail-status.is-bad { color: var(--danger); }
.mail-to, .mail-subj { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-err { color: var(--danger); font-size: 12px; }
.friendlist { list-style: none; margin: 0; padding: 0; }
.friendlist-actions { display: flex; gap: 6px; }
.leavepage { max-width: 560px; margin: 40px auto; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; }
.leavetitle { font-size: 22px; margin-bottom: 8px; }
.leaveurl { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; background: var(--surface-2); border-radius: 8px; padding: 10px; margin: 14px 0; }
.notiflist { list-style: none; margin: 0; padding: 0; }
.notif-time { color: var(--faint); font-size: 12px; }
.notif-text { }
.anchor { scroll-margin-top: 90px; }
.adminote { color: var(--muted); font-size: 13px; }
.tab-badge { position: absolute; top: 4px; right: 14px; background: var(--danger); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.dot-badge { background: var(--danger); color: #fff; font-size: 10.5px; min-width: 17px; height: 17px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.dot-badge-top { position: absolute; top: -1px; right: -1px; }
.skip { }

/* ---------------------------------------------------------------- 椤佃剼 */
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; padding-bottom: 76px; }
.footer-inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 26px var(--gut) 0; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 20px 30px; align-items: start; }
.footer-brand { font-size: 15px; font-weight: 650; margin-bottom: 5px; }
.footer-h { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 9px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.footer-col ul li a { color: var(--ink-2); font-size: 13.5px; }
.footer-col ul li a:hover { color: var(--accent-ink); }
.footer-col p { color: var(--muted); font-size: 13px; }
.footer-line { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding: 16px var(--gut) 0; margin-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12.5px; }

/* ---------------------------------------------------------------- 鎵嬫満搴曟爮 */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    transition: transform 0.22s ease;
  }
  .tabbar.is-hidden { transform: translateY(120%); }
  .tabbar a { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; color: var(--muted); font-size: 10.5px; }
  .tabbar a.is-active { color: var(--accent); }
  .footer { padding-bottom: 84px; }
}

@media (max-width: 1180px) {
  .topsearch { max-width: 260px; }
  .topdl span { display: none; }
}
@media (max-width: 1080px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 9px; padding-bottom: 9px; row-gap: 8px; }
  .mainnav { order: 5; flex: 1 1 auto; }
  .navmore { order: 5; }
  .topsearch { order: 6; flex: 1 1 240px; width: auto; }
  .topactions { order: 4; }
}
@media (max-width: 1024px) {
  .shell, .layout-2col, .chatpage { grid-template-columns: minmax(0, 1fr); }
  .shell-side { position: static; }
  .layout-guide { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; margin-bottom: 20px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; }
}
/* 兜底：任何页面都不该出现横向滚动条 */
html, body { overflow-x: hidden; }
.page, .panel, .shell, .layout-2col, .col-main, .topbar-inner, .footer-inner { min-width: 0; }
.topsearch input, .topsearch { min-width: 0; }
.adm-tablewrap, .rescard, .post, .trow { min-width: 0; }
@media (max-width: 760px) {
  :root { --gut: 15px; }
  .page { padding-top: 16px; padding-bottom: 90px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .fcard-face { grid-template-columns: minmax(0, 1fr); }
  .fcard-media img { min-height: 230px; height: 230px; }
  .fcard-nav .btn { min-width: 0; flex: 1; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .post-side { flex-direction: row; }
  .msg { max-width: 88%; }
  .pagehead { align-items: flex-start; }
  .pagehead .searchbox { width: 100%; }
}
@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
  .trow-stats { display: none; }
}

/* ---------------------------------------------------------------- 绠＄悊鍚庡彴 */
.admin-body { background: var(--bg); }
.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-brand { font-size: 18px; font-weight: 650; margin-bottom: 18px; display: flex; align-items: baseline; gap: 6px; }
.admin-brand span { font-size: 11px; letter-spacing: 0.12em; color: var(--faint); font-weight: 500; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.adm-nav { padding: 9px 12px; border-radius: 9px; color: var(--ink-2); font-size: 14px; }
.adm-nav:hover { background: var(--surface-2); text-decoration: none; }
.adm-nav.is-on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.admin-side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.admin-side-foot a { color: var(--muted); font-size: 13px; }
.adm-logout { border: 0; background: none; color: var(--danger); font-size: 13px; cursor: pointer; padding: 0; text-align: left; }
.admin-main { padding: 24px clamp(16px, 3vw, 34px) 60px; min-width: 0; }
.admin-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.admin-top h1 { font-size: 25px; }
.admin-who { color: var(--muted); font-size: 13px; }
.adm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.adm-card span { color: var(--muted); font-size: 12.5px; }
.adm-card strong { font-size: 22px; font-weight: 700; }
.adm-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.adm-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.adm-panel h2 { font-size: 16px; margin-bottom: 12px; }
.adm-tablewrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-actions form { display: inline; }
.adm-btn { border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.adm-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.adm-btn-danger { color: var(--danger); border-color: #f2cccc; }
.adm-tag { font-size: 11px; border-radius: 5px; padding: 1px 7px; background: var(--surface-2); color: var(--muted); }
.adm-tag-ok { background: #e6f6ee; color: var(--ok); }
.adm-tag-bad { background: #fdecec; color: var(--danger); }
.adm-filter { display: flex; gap: 8px; margin-bottom: 14px; }
.adm-filter input { max-width: 330px; }
.adm-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.adm-form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.adm-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); }
.adm-check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.adm-inline-form { display: flex; gap: 8px; align-items: center; }
.adm-err { max-width: 380px; font-size: 12px; color: var(--muted); word-break: break-all; }
.adm-warnbox { margin-top: 14px; border: 1px solid #f2cccc; background: #fdf6f6; border-radius: var(--radius); padding: 13px 16px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
@media (max-width: 900px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .adm-2col, .adm-form-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- 娴眰 */
.toasts { position: fixed; top: calc(var(--header-h) + 12px); right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; min-width: 210px; max-width: min(370px, 84vw); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow-lift); padding: 11px 15px; font-size: 13.5px; line-height: 1.6; display: flex; gap: 9px; align-items: flex-start; animation: toast-in 0.18s ease-out; }
.toast.is-out { animation: toast-out 0.22s ease-in forwards; }
.toast-ok { border-left-color: var(--ok); }
.toast-ok .toast-icon { color: var(--ok); }
.toast-err { border-left-color: var(--danger); }
.toast-err .toast-icon { color: var(--danger); }
.toast-warn { border-left-color: var(--warn); }
.toast-warn .toast-icon { color: var(--warn); }
.toast-info .toast-icon { color: var(--accent); }
.toast-icon { flex: none; font-weight: 700; }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

.modal-mask { position: fixed; inset: 0; z-index: 95; background: rgba(16, 19, 24, 0.44); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(16, 19, 24, 0.3); padding: 24px 26px 20px; }
.modal h3 { font-size: 20px; margin-bottom: 6px; word-break: break-all; }
.modal-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 10px; }
.modal-url { font-family: var(--mono); font-size: 11.5px; color: var(--faint); word-break: break-all; background: var(--surface-2); border-radius: 8px; padding: 9px 11px; margin: 10px 0; max-height: 76px; overflow: auto; }
.modal-warn { color: #8a5a17; background: #fff6e8; border: 1px solid #f2dfc0; border-radius: 10px; padding: 10px 13px; font-size: 13px; margin-bottom: 10px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.modal-foot form { display: inline; }

.onboard-modal { width: min(520px, 100%); }
.onboard-points { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; color: var(--ink-2); font-size: 13.5px; }
.onboard-points span { display: flex; align-items: center; gap: 8px; }
.onboard-points .ic { color: var(--accent); }

@media (max-width: 760px) {
  .toasts { top: auto; bottom: 78px; left: 12px; right: 12px; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
}

/* 瀵屾枃鏈伐鍏锋潯 */
.dlcode { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 10px; }
.dlcode span { color: var(--muted); font-size: 13px; }
.dlcode code { font-family: var(--mono); font-size: 17px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent-ink); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 1px 10px; }
.dlcode-copy { margin-left: auto; border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; font-size: 12.5px; padding: 4px 11px; cursor: pointer; color: var(--ink-2); }
.dlcode-copy:hover { border-color: var(--accent); color: var(--accent-ink); }

.mdbar { display: flex; flex-wrap: wrap; gap: 3px; padding: 6px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--surface-2); }
.mdbar button { border: 0; background: none; cursor: pointer; color: var(--ink-2); padding: 5px 7px; border-radius: 6px; display: inline-flex; align-items: center; }
.mdbar button:hover { background: var(--surface); color: var(--accent-ink); }
.mdbar + textarea { border-radius: 0 0 10px 10px !important; }
.mdhint { color: var(--faint); font-size: 12px; margin-top: 6px; }

/* 鐢ㄦ埛涓婚 */
body.theme-glass { background-image: radial-gradient(1200px 600px at 10% -10%, rgba(90, 130, 255, 0.14), transparent), radial-gradient(900px 520px at 100% 0%, rgba(255, 168, 120, 0.12), transparent); }
body.theme-glass .panel, body.theme-glass .sidecard, body.theme-glass .rescard, body.theme-glass .usercard, body.theme-glass .commcard, body.theme-glass .post, body.theme-glass .chat-room, body.theme-glass .authcard {
  background: color-mix(in srgb, var(--surface) 74%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  border-color: color-mix(in srgb, var(--line) 65%, transparent);
}
body.theme-glass .topbar { background: color-mix(in srgb, var(--surface) 72%, transparent); }
body.theme-warm { --bg: #fbf7f0; --surface-2: #f6efe4; --accent: #d2743a; --accent-ink: #b25c26; --accent-soft: #fbeadb; --line: #efe4d5; --line-2: #e6d7c3; }
body.theme-dark { --bg: #101216; --surface: #171a20; --surface-2: #1e222a; --surface-3: #262b34; --ink: #eceef2; --ink-2: #c4c8d2; --muted: #9298a4; --faint: #6f7580; --line: #24282f; --line-2: #2f343d; --accent: #5b8cff; --accent-ink: #8aabff; --accent-soft: #1c2540; }
body.theme-dark .btn { background: #f0f2f6; color: #14161a; }
body.theme-dark .btn:hover { background: #fff; }
body.theme-dark .btn-ghost { background: transparent; color: var(--ink-2); }
body.theme-dark .panel, body.theme-dark .sidecard, body.theme-dark .rescard, body.theme-dark .usercard, body.theme-dark .post { box-shadow: none; }
body.theme-compact { font-size: 14.5px; }
body.theme-compact .panel { padding: 16px 18px; }
body.theme-compact .page { padding-top: 16px; }

/* 鎵撳嵃 */
@media print {
  .topbar, .footer, .aside, .toc, .replywrap, .hero-cta, .tabbar, .toasts { display: none; }
  .page { padding: 0; max-width: none; }
}
