/* forum/public/style.css */
:root {
  --bg: #18191c;
  --bg-soft: #212226;
  --card: #212226;
  --card-2: #26272b;
  --line: rgba(255, 255, 255, .08);
  --text: #e5e7ea;
  --muted: #9499a0;
  --brand: #a06bff;
  --brand-2: #22d3ee;
  --ok: #2ac3a2;
  --err: #ff6699;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .35);
  --shadow-lift: 0 6px 20px rgba(0, 0, 0, .45);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f8;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --card-2: #f1f2f3;
    --line: #e3e5e7;
    --text: #18191c;
    --muted: #9499a0;
    --brand: #8b5cf6;
    --brand-2: #06b6d4;
    --ok: #2ac3a2;
    --err: #ff6699;
    --shadow: 0 1px 3px rgba(0, 0, 0, .06);
    --shadow-lift: 0 8px 24px rgba(0, 0, 0, .10);
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: radial-gradient(900px 420px at 50% -8%, rgba(160, 107, 255, .13), transparent 70%), var(--bg);
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); text-decoration: underline; }

/* ---------- 顶栏 ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--text); letter-spacing: .3px; }
.brand:hover { text-decoration: none; color: var(--text); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #a855f7); box-shadow: 0 0 12px rgba(79,156,249,.8); }

.search { display: flex; flex: 1; max-width: 420px; gap: 6px; }
.search input {
  flex: 1; min-width: 0; padding: 7px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font-size: 14px;
}
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,156,249,.16); }
.search button {
  padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--card-2); color: var(--text); cursor: pointer; font-size: 14px;
}
.search button:hover { border-color: var(--brand); color: var(--brand); }

.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 14px;
  background: none; border: 0; cursor: pointer; font-family: inherit;
}
.nav-link:hover { color: var(--text); background: var(--card-2); text-decoration: none; }
.nav-link.primary { color: #fff; background: var(--brand); }
.nav-link.primary:hover { background: var(--brand-2); color: #fff; }
.nav-link.ghost { border: 1px solid transparent; }
.nav-link.ghost:hover { border-color: var(--line); }
.nav-link.me { color: var(--text); }
.inline { display: inline; margin: 0; }

/* ---------- 主体 ---------- */
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 26px 20px 60px; flex: 1; }

.hero { padding: 26px 0 8px; }
.hero h1 { font-size: 30px; margin: 0 0 6px; letter-spacing: -.4px; }
.hero p { color: var(--muted); margin: 0 0 16px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; margin-top: 22px; }
@media (max-width: 860px) { .cols { grid-template-columns: minmax(0, 1fr); } }

.sec { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 26px 0 10px; font-weight: 600; }

/* ---------- 版块卡 ---------- */
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.board {
  display: block; padding: 14px 16px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  transition: border-color .15s, transform .15s;
}
.board:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
.board-name { font-weight: 650; font-size: 15.5px; }
.board-desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.board-meta { color: var(--muted); font-size: 12px; margin-top: 8px; }

/* ---------- 列表行 ---------- */
.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); color: var(--text);
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--card-2); text-decoration: none; }
.row-main { min-width: 0; flex: 1; }
.row-title { font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.row-num { text-align: center; min-width: 52px; color: var(--muted); font-size: 11px; }
.row-num b { display: block; font-size: 14px; color: var(--text); font-weight: 600; }

.badge {
  display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); vertical-align: middle; font-weight: 500;
}
.badge.pin { color: #f0b429; border-color: #f0b42955; background: #f0b42914; }
.badge.lock { color: #b58bff; border-color: #b58bff55; background: #b58bff14; }
.badge.admin { color: var(--brand); border-color: #4f9cf955; background: #4f9cf914; }
.badge.owner { color: #f0b429; border-color: #f0b42966; background: #f0b42918; font-weight: 600; }
.badge.formal { color: #7ee2a8; border-color: #7ee2a855; background: #7ee2a814; }

.quiz { display: flex; flex-direction: column; gap: 14px; }
.quiz fieldset.q {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: var(--card); margin: 0;
}
.quiz fieldset.q.ok { border-color: #2ea04366; }
.quiz fieldset.q.bad { border-color: #f8514966; }
.quiz legend { padding: 0 6px; font-weight: 600; font-size: 14.5px; }
.quiz .opt { display: flex; gap: 9px; align-items: flex-start; padding: 6px 0; cursor: pointer; font-size: 14px; }
.quiz .opt input { width: auto; margin: 3px 0 0; flex: 0 0 auto; }
.quiz .opt span { line-height: 1.5; }

.small { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.self-area { display: grid; gap: 12px; margin-top: 14px; }

/* 头像编辑 */
.avatar-editor { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar-pick {
  position: relative; border: 0; padding: 0; background: none; cursor: pointer;
  border-radius: 50%; overflow: hidden; line-height: 0;
}
.avatar-pick:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
img.avatar.pick { width: 96px; height: 96px; border-radius: 50%; }
.avatar-pick-mask {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 12px; color: #fff; background: rgba(6, 10, 16, .58);
  opacity: 0; transition: opacity .15s;
}
.avatar-pick:hover .avatar-pick-mask, .avatar-pick:focus-visible .avatar-pick-mask { opacity: 1; }
.avatar-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn.small { padding: 6px 13px; font-size: 13px; border-radius: 9px; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }

/* 裁剪弹窗 */
.crop-modal {
  position: fixed; inset: 0; z-index: 60; padding: 16px;
  background: rgba(6, 8, 12, .84);
  display: flex; align-items: center; justify-content: center;
}
.crop-modal[hidden] { display: none; }
.crop-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; width: min(92vw, 440px); box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.crop-viewport {
  width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: #0c0f14; margin: 0 auto 14px; touch-action: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.crop-viewport canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.crop-viewport canvas:active { cursor: grabbing; }
.crop-tools { display: grid; gap: 12px; }
.crop-zoom { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crop-zoom input[type=range] { flex: 1; accent-color: var(--brand); }
.crop-zoom-btn {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  font-size: 17px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.crop-zoom-btn:hover { border-color: var(--brand); color: var(--brand); }
.crop-status { min-height: 17px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.crop-status.err { color: #ff8b82; }
.crop-status.ok { color: #7ee2a8; }
.crop-actions { display: flex; justify-content: flex-end; gap: 8px; }
body.crop-open { overflow: hidden; }
img.avatar { object-fit: cover; border: 0; }
.profile .avatar.xl { border-radius: 22px; }
.move-form select {
  padding: 3px 6px; font-size: 12px; border-radius: 7px;
  background: var(--card-2); color: var(--text); border: 1px solid var(--line);
  max-width: 130px;
}

.empty { padding: 28px 16px; text-align: center; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- 侧栏 ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.panel h3 { margin: 0 0 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.stats { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; text-align: center; }
.stats li { flex: 1; }
.stats b { display: block; font-size: 18px; }
.stats span { font-size: 11.5px; color: var(--muted); }
.members { display: flex; flex-wrap: wrap; gap: 8px; }
.member { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 13px; padding: 3px 8px 3px 3px; border-radius: 999px; background: var(--card-2); }
.member:hover { text-decoration: none; outline: 1px solid var(--brand); }

/* ---------- 头像 ---------- */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; font-size: 13px; font-weight: 700;
  flex: 0 0 auto; user-select: none;
}
.avatar.lg { width: 38px; height: 38px; font-size: 17px; }
.avatar.xl { width: 68px; height: 68px; font-size: 28px; border-radius: 20px; }

/* ---------- 面包屑 / 标题区 ---------- */
.crumbs { display: flex; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 10px; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.page-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-hd h1 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.muted { color: var(--muted); font-size: 13.5px; }

/* ---------- 主题页 ---------- */
.topic-hd { margin-bottom: 18px; }
.topic-hd h1 { font-size: 26px; margin: 0 0 8px; line-height: 1.35; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.topic-meta { color: var(--muted); font-size: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.topic-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.sep { opacity: .5; }

.thread { display: flex; flex-direction: column; gap: 12px; }
.post {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; overflow: hidden;
}
.post.op { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow); }
.post-hd { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card-2); }
.post-who { min-width: 0; flex: 1; }
.who { font-weight: 650; color: var(--text); }
.who:hover { color: var(--brand); text-decoration: none; }
.meta { color: var(--muted); font-size: 12.5px; }
.edited { margin-left: 6px; color: var(--muted); font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }
.post-tools { display: flex; gap: 6px; align-items: center; }
.mini {
  font-size: 12px; padding: 3px 9px; border-radius: 7px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  font-family: inherit; line-height: 1.5;
}
.mini:hover { color: var(--text); border-color: var(--brand); text-decoration: none; }
.mini.danger:hover { color: var(--err); border-color: var(--err); }

/* ---------- Markdown ---------- */
.md { padding: 14px 18px 18px; overflow-wrap: break-word; word-break: break-word; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 10px; }
.md h1, .md h2, .md h3, .md h4 { margin: 18px 0 8px; line-height: 1.35; }
.md h1 { font-size: 21px; } .md h2 { font-size: 18px; } .md h3 { font-size: 16px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 22px; }
.md li { margin: 2px 0; }
.md blockquote {
  margin: 0 0 10px; padding: 6px 14px; border-left: 3px solid var(--line);
  color: var(--muted); background: var(--card-2);
}
.md code {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 4px; font-size: .92em; font-family: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, monospace;
}
.md pre.code {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; overflow-x: auto; margin: 0 0 12px;
}
.md pre.code code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.55; }
.md img { max-width: 100%; border-radius: 8px; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.form.slim { max-width: 620px; padding: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
input, textarea, select {
  width: 100%; padding: 9px 12px; border-radius: 9px; font-size: 14.5px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
  font-family: inherit;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,156,249,.15); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 12.5px; }
.board-chip { font-size: 14px; padding: 8px 0; color: var(--muted); }
.board-chip b { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 550;
  border: 1px solid var(--line); background: var(--card-2); color: var(--text);
  font-family: inherit; text-decoration: none;
}
.btn:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.wide { width: 100%; }

.reply { margin-top: 22px; }
.reply h3 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin: 0 0 10px; }

/* ---------- 提示 ---------- */
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.flash.ok { color: #7ee2a8; border-color: #2ea04366; background: #2ea0431a; }
.flash.err { color: #ffb4ae; border-color: #f8514966; background: #f851491a; }
@media (prefers-color-scheme: light) {
  .flash.ok { color: #0f6b32; } .flash.err { color: #a0130c; }
}

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pg { padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 13px; }
.pg:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }
.pg.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pg.off { opacity: .45; }

/* ---------- 登录注册 ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 30px 0; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-card .muted { margin: 0 0 18px; }
.auth-card .form { background: none; border: 0; padding: 0; }
.auth-alt { text-align: center; color: var(--muted); font-size: 13.5px; margin: 16px 0 0; }

/* ---------- 个人页 ---------- */
.profile { display: flex; align-items: center; gap: 18px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); flex-wrap: wrap; }
.profile-main { flex: 1; min-width: 200px; }
.profile-main h1 { margin: 0 0 4px; font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.uname { font-size: 14px; color: var(--muted); font-weight: 400; }
.profile-stats { display: flex; gap: 22px; text-align: center; }
.profile-stats b { display: block; font-size: 20px; }
.profile-stats span { font-size: 12px; color: var(--muted); }

/* ---------- 表格 ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table td .avatar { vertical-align: middle; margin-right: 4px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }

.locked { margin-top: 18px; padding: 16px; border-radius: 10px; border: 1px dashed var(--line); color: var(--muted); text-align: center; background: var(--card); }

/* ---------- 错误页 ---------- */
.errpage { text-align: center; padding: 60px 20px; }
.err-code { font-size: 64px; font-weight: 800; letter-spacing: -.04em; color: var(--brand); opacity: .85; }
.errpage p { color: var(--muted); margin: 6px 0 20px; }

/* ---------- 滑块验证码 ---------- */
.brand-logo { width: 30px; height: 30px; border-radius: 50%; display: block; flex: 0 0 auto; }

.captcha-field { margin-top: 2px; }

.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.code-btn { white-space: nowrap; padding: 0 14px; font-size: 13.5px; }
.code-btn:disabled { opacity: .6; cursor: default; }
.code-hint { margin-top: 2px; }
.code-hint.ok { color: #7ee2a8; font-weight: 600; }
.captcha { display: flex; flex-direction: column; gap: 8px; }

.captcha-stage {
  position: relative;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card-2);
  line-height: 0;
}
.captcha-bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.captcha-piece {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, .55));
}
.captcha-refresh {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(0, 0, 0, .38);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0;
}
.captcha-refresh:hover { background: rgba(0, 0, 0, .6); }

.captcha-track { cursor: grab; }
.captcha-track.dragging { cursor: grabbing; border-color: var(--brand); }
.captcha-track.dragging .captcha-handle { box-shadow: 0 0 0 3px rgba(79, 156, 249, .3); }
.captcha-track {
  position: relative;
  height: 44px;
  border-radius: 10px;
  background: var(--card-2);
  border: 1px solid var(--line);
  overflow: hidden;
  touch-action: none;
}
.captcha-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(79, 156, 249, .22), rgba(79, 156, 249, .48));
}
.captcha-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 46px;
  height: 42px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  cursor: grab;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  border: 1px solid rgba(255, 255, 255, .35);
  user-select: none;
  touch-action: none;
  will-change: transform;
}
.captcha-handle:active { cursor: grabbing; }
.captcha-handle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.captcha-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12.5px;
  pointer-events: none;
  transition: opacity .2s;
}
.captcha-status { min-height: 16px; font-size: 12.5px; color: var(--muted); }
.captcha-status.ok { color: #7ee2a8; }

/* ---------- 页脚 ---------- */
.foot {
  border-top: 1px solid var(--line); color: var(--muted);
  font-size: 12.5px; padding: 18px 20px; text-align: center;
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}

/* ===================== 质感增强 ===================== */
html { scroll-behavior: smooth; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 34%, transparent);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* 顶栏：半透明 + 毛玻璃 */
.site-header {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

/* 品牌图标微动效 */
.brand span { letter-spacing: -.01em; }
.brand-logo { transition: transform .32s cubic-bezier(.34, 1.56, .64, 1); }
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.08); }

/* 按钮 */
.btn {
  border-radius: 6px;
  transition: background .18s, color .18s, border-color .18s, transform .12s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 28%, transparent);
}
.btn.primary:hover {
  background: #b98aff;
  border-color: #b98aff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 42%, transparent);
}
.btn.ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

/* 输入控件聚焦光晕 */
input, textarea, select { transition: border-color .18s, box-shadow .18s, background .18s; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

/* 徽章药丸化 */
.badge { border-radius: 999px; padding: 1px 8px; font-size: 11.5px; line-height: 1.7; }
.badge.admin {
  color: var(--brand-2);
  border-color: color-mix(in srgb, var(--brand-2) 40%, transparent);
  background: color-mix(in srgb, var(--brand-2) 14%, transparent);
}
.badge.owner {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
}
.badge.formal {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
  background: color-mix(in srgb, var(--ok) 14%, transparent);
}

/* 卡片悬浮 */
.card, .panel, .row, .member {
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}
.row:hover, .member:hover {
  background: color-mix(in srgb, var(--brand) 6%, var(--card));
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

/* 主题行左侧高亮条 */
.list .row { position: relative; }
.list .row::before {
  content: "";
  position: absolute;
  left: 0; top: 12%; bottom: 12%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand);
  opacity: 0;
  transform: scaleY(.35);
  transition: opacity .18s, transform .22s;
}
.list .row:hover::before { opacity: 1; transform: scaleY(1); }

/* 标题 */
h1 { letter-spacing: -.015em; }
h2.sec { position: relative; padding-left: 11px; letter-spacing: -.01em; }
h2.sec::before {
  content: "";
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 15px; border-radius: 2px;
  background: var(--brand);
}

a { transition: color .15s; }

/* 头像光环 */
.profile .avatar.xl { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }

/* 提示条 */
.flash.ok { border-left: 3px solid var(--ok); }
.flash.err { border-left: 3px solid var(--err); }

/* 表格 */
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }

/* ===================== 导航交互 ===================== */
.nav { align-items: center; }

.nav-link {
  position: relative;
  transition: color .2s ease, letter-spacing .2s ease, background .2s ease, transform .15s ease;
}

/* 悬停：下划线从中间展开 */
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translateX(-50%);
  transition: width .3s cubic-bezier(.34, 1.25, .64, 1), opacity .2s;
  opacity: .85;
}

.nav-link:hover::after { width: 55%; }

/* 悬停文字轻微变化 */
.nav-link:hover {
  color: var(--brand);
  letter-spacing: .015em;
}

/* 当前页：常驻高亮 */
.nav-link.active {
  color: var(--brand);
  font-weight: 600;
}
.nav-link.active::after {
  width: 55%;
  background: var(--brand);
  opacity: 1;
}

/* 发帖按钮：实心，不要下划线 */
.nav-link.primary::after { display: none; }
.nav-link.primary:hover {
  background: #b98aff;
  color: #fff;
  letter-spacing: 0;
  transform: translateY(-1px);
}
.nav-link.primary.active {
  background: #8a4fe0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.nav-link.primary.active:hover { background: #8a4fe0; }

/* 头像链接与退出按钮不画下划线 */
.nav-link.me::after,
.nav-link.ghost::after { display: none; }
.nav-link.me:hover { color: var(--text); }
.nav-link.me:hover .avatar { box-shadow: 0 0 0 2px var(--brand); }
.nav-link.ghost:hover { color: var(--err); }

/* ===================== 编辑器工具栏 ===================== */
.editor-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  font-size: 13px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s, transform .12s;
}
.tool-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  transform: translateY(-1px);
}
.tool-btn:active { transform: translateY(0); }
.tool-hint { font-size: 12px; color: var(--muted); }

.emoji-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 2px;
  margin-top: 8px;
  padding: 10px;
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.emoji-panel[hidden] { display: none; }
.emoji-btn {
  border: 0;
  background: transparent;
  font-size: 19px;
  line-height: 1;
  padding: 5px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .14s, transform .14s;
}
.emoji-btn:hover {
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  transform: scale(1.18);
}

/* 正文里的图片 */
.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 8px 0;
  display: block;
  border: 1px solid var(--line);
}

/* 附件缩略图 */
.attachments { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.attachments:empty { display: none; }
.attach-item { position: relative; width: 86px; height: 86px; }
.attach-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 9px; border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.attach-del {
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px; border-radius: 50%; padding: 0;
  border: 2px solid var(--bg);
  background: var(--err); color: #fff;
  font-size: 13px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.attach-del:hover { transform: scale(1.12); }

/* ===================== 移动端顶栏 ===================== */
@media (max-width: 700px) {
  .top-inner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    align-items: center;
  }

  /* 第一行：logo + 导航 */
  .brand { order: 1; font-size: 16px; }
  .brand-logo { width: 26px; height: 26px; }

  .nav {
    order: 2;
    margin-left: auto;
    flex-wrap: nowrap;
    gap: 2px;
  }
  .nav-link {
    padding: 6px 8px;
    font-size: 13.5px;
    white-space: nowrap;
  }
  /* 移动端只显示头像，不显示昵称，省空间 */
  .nav-link.me > span:not(.avatar) { display: none; }
  .nav-link.me .avatar { width: 26px; height: 26px; }

  /* 第二行：搜索框整行 */
  .search {
    order: 3;
    flex: 0 0 100%;
    max-width: none;
    gap: 8px;
  }
  .search input {
    font-size: 16px;   /* 防止 iOS 聚焦时自动放大页面 */
    padding: 10px 13px;
    min-height: 42px;
  }
  .search button {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 42px;
    flex: 0 0 auto;
  }
}

/* 更窄的屏幕（<=380）进一步压缩 */
@media (max-width: 380px) {
  .top-inner { padding: 8px 12px; }
  .nav-link { padding: 5px 6px; font-size: 13px; }
  .brand span { display: none; }  /* 只留 logo */
}

/* 移动端正文排版优化 */
@media (max-width: 700px) {
  .wrap { padding: 16px 14px 40px; }
  h1 { font-size: 24px; }
  .post-body, .prose { font-size: 15px; line-height: 1.75; }
  .editor-tools { gap: 6px; }
  .tool-btn { padding: 7px 11px; font-size: 13.5px; }
  .emoji-panel { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
  .emoji-btn { font-size: 22px; padding: 6px; }
  .attach-item { width: 76px; height: 76px; }
}

/* ===================== 首页赛博人物志 ===================== */
.figures-strip { margin: 20px 0 24px; }
.figures-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.figures-more { font-size: 13px; color: var(--muted); white-space: nowrap; }
.figures-more:hover { color: var(--brand); }
.figure-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 10px; }
.figure-card {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.figure-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: var(--shadow-lift);
  text-decoration: none;
}
.figure-badge {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--brand) 18%, transparent);
  color: var(--brand); font-weight: 700; font-size: 17px;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
.figure-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.figure-name { font-weight: 600; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.figure-meta { font-size: 12px; color: var(--muted); }
.figure-badge-img { padding: 0; overflow: hidden; background: var(--card-2); }
.figure-badge-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===================== 赛博人物志独立页 ===================== */
.figures-intro { max-width: 640px; margin: 0 0 18px; line-height: 1.7; }
.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.figure-tile {
  display: flex; gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card);
  transition: transform .16s ease, border-color .2s, box-shadow .2s;
}
.figure-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  box-shadow: var(--shadow-lift);
  text-decoration: none;
}
.figure-badge-lg { width: 54px; height: 54px; font-size: 22px; }
.figure-tile-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.figure-tile-name {
  font-weight: 600; font-size: 15px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.figure-tile-meta { font-size: 12.5px; color: var(--muted); }

/* 导航里的「人物志」在窄屏隐藏，避免挤压 */
@media (max-width: 700px) {
  .nav-figures { display: none; }
}

/* ===================== 色彩层次 ===================== */

/* Hero 区域加双色光晕 */
.hero { position: relative; }
.hero::before {
  content: "";
  position: absolute;
  inset: -30px 0 0;
  background:
    radial-gradient(520px 200px at 15% 0%, rgba(160, 107, 255, .22), transparent 68%),
    radial-gradient(440px 180px at 78% 25%, rgba(34, 211, 238, .14), transparent 70%),
    radial-gradient(360px 160px at 45% 90%, rgba(244, 114, 182, .10), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

/* 标题竖条改渐变 */
h2.sec::before {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
}

/* 主按钮渐变 */
.btn.primary {
  background: linear-gradient(135deg, #a06bff 0%, #8b5cf6 45%, #22d3ee 140%);
  border-color: transparent;
}
.btn.primary:hover {
  background: linear-gradient(135deg, #b98aff 0%, #a06bff 45%, #38dcf0 140%);
}

/* 版块卡片：每个一个主色调 */
.boards .board { position: relative; overflow: hidden; }
.boards .board::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--tint, var(--brand));
  opacity: .85;
}
.boards .board:nth-child(4n+1) { --tint: #a06bff; }
.boards .board:nth-child(4n+2) { --tint: #22d3ee; }
.boards .board:nth-child(4n+3) { --tint: #fbbf24; }
.boards .board:nth-child(4n+4) { --tint: #f472b6; }

.boards .board:hover {
  border-color: color-mix(in srgb, var(--tint) 45%, var(--line));
  box-shadow: 0 8px 26px color-mix(in srgb, var(--tint) 18%, transparent);
}
.boards .board:hover .board-name { color: var(--tint); }
.board-name { transition: color .2s ease; }

/* 统计数字渐变 */
.stats li b {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 徽章继续多彩 */
.badge.formal { color: #2ac3a2; }
.badge.owner {
  background: linear-gradient(135deg, rgba(160,107,255,.22), rgba(34,211,238,.16));
}

/* 头像环渐变 */
.nav-link.me .avatar { box-shadow: 0 0 0 2px transparent; }
.nav-link.me:hover .avatar {
  box-shadow: 0 0 0 2px var(--brand), 0 0 12px rgba(160, 107, 255, .5);
}

/* 分割线渐变 */
.crumbs { border-bottom: 1px solid transparent; }
.page-hd { position: relative; }
.page-hd::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 64px; height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), transparent);
  border-radius: 2px;
}

/* ===================== 加载动画 ===================== */

#boot {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(600px 300px at 50% 35%, rgba(160,107,255,.10), transparent 70%), var(--bg);
  transition: opacity .32s ease, visibility .32s ease;
}
#boot.done { opacity: 0; visibility: hidden; }

.boot-ring {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--brand) 18%, transparent);
  border-top-color: var(--brand);
  border-right-color: var(--brand-2);
  animation: boot-spin .85s cubic-bezier(.45, .05, .55, .95) infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }

.boot-text {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .04em;
  animation: boot-pulse 1.6s ease-in-out infinite;
}
@keyframes boot-pulse { 0%,100% { opacity: .45 } 50% { opacity: 1 } }

/* 内容淡入 */
body > .top, body > .wrap { animation: fade-up .4s ease both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* 图片加载淡入 */
img { opacity: 1; transition: opacity .3s ease; }
img[loading="lazy"] { opacity: 0; }
img.loaded { opacity: 1; }

/* 按钮提交中 */
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: boot-spin .7s linear infinite;
}

/* ===================== 移动端布局防溢出 ===================== */
.col-main, .col-side { min-width: 0; }
.panel { min-width: 0; }
.stats { min-width: 0; }
.stats li { min-width: 0; }

@media (max-width: 700px) {
  /* 侧栏在移动端跟主栏同宽，卡片不再被内容撑开 */
  .col-side { width: 100%; }
  .panel { width: 100%; }
  .boards { grid-template-columns: 1fr; }
  .figure-cards { grid-template-columns: 1fr; }
  .figure-grid { grid-template-columns: 1fr; }
  /* 长文本和图片不撑破容器 */
  .post-body img, .prose img { max-width: 100%; height: auto; }
  .list .row { min-width: 0; }
  .topic-row .title, .row .title { overflow-wrap: anywhere; }
}

/* 移动端终极兜底：禁止横向滚动 */
html, body { overflow-x: hidden; }

/* ===================== Hero 改版：粉紫配色 ===================== */
.hero::before {
  content: "";
  position: absolute;
  inset: -30px 0 0;
  background:
    radial-gradient(560px 220px at 12% 0%, rgba(244, 114, 182, .24), transparent 68%),
    radial-gradient(520px 200px at 62% 12%, rgba(232, 121, 249, .18), transparent 70%),
    radial-gradient(460px 200px at 92% 78%, rgba(124, 58, 237, .20), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  background: linear-gradient(118deg, #ffffff 8%, #fbcfe8 42%, #f0abfc 68%, #d8b4fe 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.015em;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 2px; }
.hero-tags span {
  font-size: 12.5px;
  padding: 5px 13px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(244,114,182,.14), rgba(168,85,247,.12));
  border: 1px solid rgba(244, 114, 182, .30);
  color: #f9c9e0;
  letter-spacing: .02em;
}
.hero-tags span:nth-child(2) {
  background: linear-gradient(135deg, rgba(232,121,249,.14), rgba(124,58,237,.12));
  border-color: rgba(232, 121, 249, .30);
  color: #f0c9fb;
}
.hero-tags span:nth-child(3) {
  background: linear-gradient(135deg, rgba(167,139,250,.16), rgba(34,211,238,.10));
  border-color: rgba(167, 139, 250, .32);
  color: #dcc9ff;
}

/* 主按钮也跟着换粉紫 */
.btn.primary {
  background: linear-gradient(135deg, #f472b6 0%, #c084fc 52%, #8b5cf6 130%);
  border-color: transparent;
}
.btn.primary:hover {
  background: linear-gradient(135deg, #fb8fc4 0%, #cf9bff 52%, #9d71ff 130%);
}

/* 标题竖条改粉紫 */
h2.sec::before {
  background: linear-gradient(180deg, #f472b6 0%, #a855f7 100%);
}

@media (max-width: 700px) {
  .hero-tags { margin: 12px 0 0; gap: 6px; }
  .hero-tags span { font-size: 12px; padding: 4px 11px; }
}

/* ===================== Hero 居中 ===================== */
.hero { text-align: center; }
.hero h1 { margin-left: auto; margin-right: auto; }
.hero-tags { justify-content: center; }
.hero-actions { justify-content: center; }

/* ===================== 只让标题居中 ===================== */
.hero { text-align: left; }
.hero h1 { text-align: center; margin-left: 0; margin-right: 0; }
.hero-tags { justify-content: flex-start; }
.hero-actions { justify-content: flex-start; }

/* 两个标签时的配色（顺序：粉 → 品红紫）*/
.hero-tags span:nth-child(1) {
  background: linear-gradient(135deg, rgba(244,114,182,.14), rgba(168,85,247,.12));
  border-color: rgba(244, 114, 182, .30);
  color: #f9c9e0;
}
.hero-tags span:nth-child(2) {
  background: linear-gradient(135deg, rgba(167,139,250,.16), rgba(232,121,249,.12));
  border-color: rgba(167, 139, 250, .32);
  color: #e2ccff;
}

/* ===================== 移动端 Hero 比例修正 ===================== */
@media (max-width: 700px) {
  /* 标签与按钮之间留出呼吸空间 */
  .hero-tags { margin: 10px 0 16px; gap: 6px; }
  .hero-actions { margin: 0; }

  /* 标题缩小，避免占满整行 */
  .hero h1 { font-size: 26px; line-height: 1.15; }

  /* Hero 整体收紧 */
  .hero { padding-bottom: 2px; }

  /* 模块间距统一 */
  .figures-strip { margin: 16px 0 18px; }
  .sec { margin: 20px 0 8px; }
}

/* 桌面端标签与按钮之间也补一点间距 */
.hero-tags { margin-bottom: 12px; }
.hero-actions { margin-top: 0; }

/* ===================== 标题改纯色 + 移动端简化 ===================== */
.hero h1 {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #ffffff;
  color: #ffffff;
  letter-spacing: -.01em;
}

@media (max-width: 700px) {
  /* 移动端：隐藏标签、收紧间距，标题区不再拥挤 */
  .hero-tags { display: none; }

  .hero {
    padding: 6px 0 0;
  }
  .hero h1 {
    font-size: 24px;
    line-height: 1.2;
    margin: 0 0 14px;
  }
  .hero-actions {
    margin: 0;
    gap: 8px;
  }
  .hero-actions .btn {
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 9px;
  }
}

/* ===================== 等级徽章 LV1-LV6 ===================== */
.lv {
  display: inline-block;
  margin-left: 6px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
  padding: 1px 6px;
  border-radius: 5px;
  letter-spacing: .02em;
  vertical-align: middle;
  white-space: nowrap;
}
.lv1 { background: #3f3f46; color: #a1a1aa; }
.lv2 { background: #134e4a; color: #5eead4; }
.lv3 { background: #1e3a5f; color: #7dd3fc; }
.lv4 { background: #3b2f63; color: #c4b5fd; }
.lv5 { background: #5b2d3a; color: #fda4af; }
.lv6 {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #f472b6 100%);
  color: #fff;
  box-shadow: 0 0 10px rgba(168, 85, 247, .45);
}

/* 移动端徽章略小 */
@media (max-width: 700px) {
  .lv { font-size: 10px; padding: 0 5px; margin-left: 5px; }
}

/* ===================== 等级进度 ===================== */
/* 导航栏：名字 + LV + 细进度条 */
.me-name { margin-right: 0; }
.nav-link.me .lv { margin-left: 6px; }
.me-progress {
  display: inline-block;
  width: 32px; height: 3px;
  margin-left: 6px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
  vertical-align: middle;
}
.me-progress i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #f472b6, #a855f7);
  transition: width .3s ease;
}

/* 个人主页：等级卡片 */
.lv-card {
  margin: 10px 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(244,114,182,.08), rgba(168,85,247,.08));
  border: 1px solid rgba(168, 85, 247, .22);
  max-width: 360px;
}
.lv-card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.lv-lg { font-size: 12px; padding: 2px 9px; margin-left: 0; border-radius: 6px; }
.lv-count { font-size: 12.5px; color: var(--muted); }
.lv-bar {
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .10);
  overflow: hidden;
}
.lv-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #f472b6 0%, #a855f7 60%, #22d3ee 100%);
  transition: width .4s ease;
}
.lv-foot {
  display: flex; justify-content: space-between;
  margin-top: 7px;
  font-size: 12px; color: var(--muted);
}
.lv-foot b { color: var(--text); font-weight: 600; }
.lv-pct { color: var(--brand); font-weight: 600; }
.lv-note { margin-top: 6px; font-size: 11.5px; color: var(--muted); opacity: .8; }

/* 移动端：导航只留头像 + LV，隐藏名字和进度条 */
@media (max-width: 700px) {
  .nav-link.me .me-name { display: none; }
  .nav-link.me .me-progress { display: none; }
  .nav-link.me .lv { margin-left: 4px; }
  .lv-card { max-width: none; }
}

/* ===================== 站点背景水印 ===================== */
body { position: relative; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url('/static/watermark.png');
  background-repeat: repeat;
  background-position: center;
  background-size: 200px auto;
  opacity: .045;
}

/* 内容层压在水印之上 */
.wrap { position: relative; z-index: 1; }
.top { z-index: 20; }
#boot { z-index: 200; }

/* 亮色模式下稍微再淡一点 */
@media (prefers-color-scheme: light) {
  body::after { opacity: .06; }
}

@media (max-width: 700px) {
  body::after { background-size: 150px auto; opacity: .04; }
}

/* ===================== 水印平铺修正（大小统一 / 网格对齐）===================== */
body::after {
  background-size: 200px 200px;
  background-position: 0 0;
  background-repeat: repeat;
}

@media (max-width: 700px) {
  body::after { background-size: 150px 150px; }
}

/* 水印：圆占 72%，平铺 240px → 圆 173px，间距 67px，网格均匀 */
body::after {
  background-size: 240px 240px;
  background-position: 0 0;
  background-repeat: repeat;
  opacity: .05;
}
@media (max-width: 700px) {
  body::after { background-size: 180px 180px; opacity: .045; }
}
