/* 西木读书论坛 - 文学气质版 */
:root {
  --ink: #2a2520;
  --ink-soft: #6e645b;
  --paper: #f7f3ec;
  --paper-2: #efe8dc;
  --line: #d8cfbe;
  --accent: #8b2e1a;       /* 朱砂 */
  --accent-soft: #c9806b;
  --good: #2e7d32;
  --bad: #b3261e;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "FangSong", serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶栏 */
.topbar {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: nowrap;
}
.brand {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--ink);
  white-space: nowrap;
}
.nav { display: flex; gap: 12px; align-items: center; font-size: 13px; white-space: nowrap; }
.nav a { color: var(--ink-soft); }
.nav a:hover { color: var(--accent); }
.nav .who { color: var(--ink-soft); font-size: 13px; }
.nav .logout { font-size: 13px; }
.nav .admin-link { color: var(--accent); font-weight: 600; }

/* 主区 */
.main {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* 页脚 */
.footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 20px;
  margin-top: 60px;
}

/* 落地页 */
.landing {
  text-align: center;
  padding: 80px 20px 40px;
}
.big-title {
  font-size: 64px;
  letter-spacing: 12px;
  margin: 0 0 24px;
  color: var(--ink);
  font-weight: 700;
}
.tagline {
  font-size: 20px;
  color: var(--ink-soft);
  letter-spacing: 8px;
  margin: 0 0 56px;
}
.enter-btn {
  display: inline-block;
  padding: 16px 56px;
  background: var(--accent);
  color: var(--paper);
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-size: 18px;
  letter-spacing: 4px;
  transition: all .2s;
}
.enter-btn:hover {
  background: var(--paper);
  color: var(--accent);
  text-decoration: none;
}
.hint {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: 28px;
}

/* 登录卡片 */
.login-card {
  max-width: 420px;
  margin: 60px auto;
  background: #fff;
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.login-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: 2px;
}
.login-card .hint {
  margin-top: 0;
  font-size: 13px;
}

/* 表单通用 */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.form label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px; color: var(--ink-soft);
}
.form input[type=text], .form input[type=tel], .form input[type=password],
.form input:not([type]), .form textarea, .form input[type=file] {
  font: inherit;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
}
.form textarea { font-family: inherit; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.form button[type=submit] {
  font: inherit;
  padding: 12px;
  background: var(--accent);
  color: var(--paper);
  border: 1px solid var(--accent);
  border-radius: 2px;
  cursor: pointer;
  font-size: 16px;
  letter-spacing: 2px;
}
.form button[type=submit]:hover { background: var(--ink); border-color: var(--ink); }
.form-actions { display: flex; gap: 12px; align-items: center; }
.text-btn {
  background: none; border: none; color: var(--accent);
  font: inherit; cursor: pointer; padding: 4px 0;
}
.text-btn:hover { text-decoration: underline; }
.resend { margin-top: 16px; text-align: center; }
.dev-banner {
  background: #fffbe6;
  border: 1px dashed #b08800;
  padding: 12px;
  border-radius: 2px;
  font-size: 14px;
  color: #5c4400;
}
.dev-banner code {
  font-size: 18px;
  letter-spacing: 4px;
  color: var(--accent);
  background: #fff;
  padding: 2px 8px;
  border-radius: 2px;
  margin-left: 6px;
}
.dev-tip { font-size: 12px; color: #8a6a00; margin-top: 4px; }

.err {
  background: #fde7e7;
  border: 1px solid #f3b3b0;
  color: var(--bad);
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 14px;
  margin-top: 12px;
}
.ok {
  background: #e8f3e9;
  border: 1px solid #a4d2a7;
  color: var(--good);
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 14px;
  margin: 12px 0;
}

/* 论坛列表 */
.forum-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.forum-head h2 { margin: 0; letter-spacing: 4px; }
.primary-btn {
  background: var(--accent);
  color: var(--paper);
  padding: 8px 20px;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-size: 14px;
}
.primary-btn:hover { background: var(--ink); border-color: var(--ink); text-decoration: none; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.post-item.announcement {
  background: linear-gradient(to right, #fff8e1, transparent 80%);
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  margin-left: -12px;
}
.post-title { font-size: 18px; }
.post-meta {
  font-size: 13px; color: var(--ink-soft); margin-top: 4px;
}
.post-meta .dot { margin: 0 6px; }
.badge {
  display: inline-block;
  background: var(--accent);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 2px;
  padding: 1px 6px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.empty { color: var(--ink-soft); padding: 40px 0; text-align: center; }

/* 帖子详情 */
.post-detail {
  background: #fff;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.post-detail header { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 24px; }
.post-h1 { margin: 8px 0; font-size: 28px; }
.post-image-wrap { margin: 20px 0; text-align: center; }
.post-image-wrap img { max-width: 100%; border-radius: 2px; }
.post-body {
  font-size: 16px; line-height: 2; white-space: pre-wrap;
  word-break: break-word;
}
.post-actions {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.danger-btn {
  background: var(--bad); color: #fff;
  border: 1px solid var(--bad);
  padding: 6px 14px;
  border-radius: 2px;
  cursor: pointer;
  font: inherit;
}
.report-box { margin-left: auto; }
.report-box summary { cursor: pointer; color: var(--ink-soft); }
.report-box form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; min-width: 280px; }
.report-box textarea { min-height: 60px; }

/* 管理 */
.admin-page h2 { letter-spacing: 4px; }
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}
@media (max-width: 720px) {
  .admin-grid { grid-template-columns: 1fr; }
  .big-title { font-size: 42px; letter-spacing: 6px; }
  .tagline { font-size: 16px; letter-spacing: 4px; }
  .post-detail { padding: 20px; }
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
}
.card h3 { margin: 0 0 12px; font-size: 18px; letter-spacing: 2px; }
.report-list { list-style: none; padding: 0; margin: 0; }
.report-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.report-item:last-child { border-bottom: none; }
.report-meta { font-size: 14px; }
.report-reason { font-size: 13px; color: var(--ink-soft); margin: 4px 0; }
.post-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.post-table th, .post-table td {
  text-align: left; padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}
.post-table th { color: var(--ink-soft); font-weight: normal; }

/* 管理员通道 */
.admin-entry { margin-top: 24px; border-top: 2px dashed var(--line); padding-top: 24px; }
.admin-entry h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: 2px; color: var(--accent); }
.admin-entry .hint { margin: 0 0 8px; font-size: 13px; }
.admin-btn {
  font: inherit;
  padding: 12px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  font-size: 16px;
  letter-spacing: 2px;
}
.admin-btn:hover { background: var(--accent); border-color: var(--accent); }

/* 点赞 */
.like-form { display: inline; }
.like-btn {
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 2px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  transition: all .15s;
}
.like-btn:hover { border-color: var(--accent); color: var(--accent); }
.like-btn.liked { color: var(--accent); border-color: var(--accent); background: #fff; }
.like-btn .like-count { margin-left: 2px; font-size: 13px; }
.like-count-mini { color: var(--accent); font-size: 13px; }
.self-hint { color: var(--ink-soft); font-size: 13px; font-style: italic; }

/* Toast */
.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  padding: 8px 20px; border-radius: 2px; font-size: 14px;
  z-index: 20;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

/* 评论 */
.comments {
  margin-top: 40px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px 32px;
}
.comments-title {
  margin: 0 0 16px;
  font-size: 18px;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.comments-count { color: var(--ink-soft); font-weight: normal; font-size: 14px; }
.comment-form {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 24px;
}
.comment-form textarea {
  font: inherit;
  padding: 10px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  resize: vertical;
}
.comment-form button[type=submit] {
  font: inherit;
  padding: 8px 18px;
  background: var(--accent);
  color: var(--paper);
  border: 1px solid var(--accent);
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 2px;
  align-self: flex-start;
}
.comment-form button[type=submit]:hover { background: var(--ink); border-color: var(--ink); }
.comment-form-actions { display: flex; gap: 12px; align-items: center; }
.hint-inline { color: var(--ink-soft); font-size: 13px; }
.comment-login-hint { color: var(--ink-soft); font-size: 14px; margin: 0 0 24px; }

.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.comment-item:last-child { border-bottom: none; }
.comment-head {
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0;
}
.comment-head .nick { color: var(--ink); font-weight: 500; }
.comment-head .admin-nick { color: var(--accent); }
.comment-head .time { margin-left: 6px; }
.comment-admin-del { margin-left: auto; }
.danger-text { color: var(--bad) !important; }
.danger-text:hover { text-decoration: underline; }
.comment-body {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}
.comment-count { color: var(--ink-soft); }

/* ============== 注册 / 登录 / 找回密码 ============== */
.auth-page { max-width: 480px; margin: 30px auto; padding: 0 16px; }
.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px 28px 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.auth-card h2 { margin-top: 0; }
.auth-card label { display: block; margin: 12px 0; }
.auth-card label input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  margin-top: 4px;
}
.auth-card .send-form {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}
.auth-card .send-row { margin-top: 10px; }
.auth-card .send-row button {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.auth-card .send-row button:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-card .form-actions { margin-top: 16px; }
.auth-card .form button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
.dev-code {
  background: #fff8e1;
  border-left: 3px solid #f57c00;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 14px;
}
.dev-code strong { color: #f57c00; font-size: 17px; }
.alt-link {
  text-align: center;
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.toast.ok { background: #e8f5e9; color: var(--good); padding: 10px 14px; border-radius: 4px; margin-bottom: 12px; }

/* 登录页 */
.login-card {
  max-width: 480px;
  margin: 30px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.login-card .form button[type="submit"] {
  width: 100%;
  margin-top: 8px;
}
.login-card .admin-entry { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 20px; }
.login-card .admin-btn { background: var(--ink) !important; }
.login-card .resend { margin-top: 10px; }

/* ============== 个人中心 ============== */
.me-page { max-width: 960px; margin: 30px auto; padding: 0 16px; }
.me-page h2 { margin-bottom: 20px; }
.me-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.me-feed {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.me-line {
  display: flex; justify-content: space-between;
  margin: 6px 0;
  font-size: 14px;
}
.me-line .muted { color: var(--ink-soft); }
.me-page .card label { display: block; margin: 10px 0; }
.me-page .card label input {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px; font-size: 14px;
  margin-top: 4px;
  font-family: inherit;
}
.me-page .card form button {
  background: var(--accent); color: #fff;
  border: none; padding: 9px 18px;
  border-radius: 4px; cursor: pointer; font-family: inherit;
}
.me-page .stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
  margin-top: 10px;
}
.me-page .stat {
  display: flex; flex-direction: column;
  padding: 10px 4px;
  background: var(--paper-2);
  border-radius: 6px;
}
.me-page .stat-n { font-size: 26px; font-weight: 600; color: var(--accent); line-height: 1; }
.me-page .stat-l { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.my-list { list-style: none; padding: 0; margin: 8px 0 0; }
.my-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.my-list li:last-child { border-bottom: none; }
.my-list .heart { color: var(--accent); }
.muted { color: var(--ink-soft); }
.small { font-size: 12px; }

/* ============== 注册:手机号去重 ============== */
.phone-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: 14px;
}
.phone-confirm .phone-confirm-value {
  font-weight: 600;
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  letter-spacing: 1px;
}
.phone-confirm-warn {
  margin-left: auto;
  color: #b88a00;
  font-size: 12px;
}

/* ============== 管理员登录入口(登录页底部小链接) ============== */
.admin-mini-link {
  text-align: center;
  margin: 24px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
  opacity: 0.7;
  transition: opacity 0.15s;
}
.admin-mini-link a {
  color: var(--ink-soft);
  border-bottom: 1px dotted var(--ink-soft);
  padding-bottom: 1px;
}
.admin-mini-link:hover { opacity: 1; }
.admin-mini-link a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

/* ============== 管理员独立登录页 ============== */
.admin-login-card {
  border-top: 3px solid var(--ink);
  max-width: 460px;
}
.admin-login-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-login-card h2::before {
  content: "▍";
  color: var(--ink);
}
.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.captcha-q {
  display: inline-block;
  padding: 8px 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 600;
  user-select: none;
}
.captcha-input {
  width: 100px !important;
  text-align: center;
  font-size: 18px;
  letter-spacing: 2px;
  font-family: ui-monospace, "Cascadia Mono", Menlo, monospace;
}
.captcha-refresh {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}
.captcha-refresh:hover { color: var(--accent); }

/* ============== 评论嵌套回复 ============== */
.comment-children {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  border-left: 2px solid var(--line);
  padding-left: 16px;
}
.comment-reply {
  padding: 12px 0 12px 12px;
  margin: 0;
  border-bottom: 1px dashed var(--line);
  position: relative;
}
.comment-reply:last-child { border-bottom: none; }
.comment-reply .comment-body {
  font-size: 14px;
  line-height: 1.7;
}
.reply-toggle {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
}
.reply-toggle:hover {
  color: var(--accent);
  background: var(--paper-2);
}
.reply-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding: 10px;
  background: var(--paper-2);
  border-radius: 4px;
  border: 1px solid var(--line);
}
.reply-form textarea {
  font: inherit;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 14px;
  resize: vertical;
  min-height: 50px;
}
.reply-form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.reply-form button[type="submit"] {
  font: inherit;
  padding: 6px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
}
.reply-cancel {
  font-size: 13px;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
}
.reply-cancel:hover { color: var(--bad); }

/* ============== 个人中心美化 ============== */
.me-page { max-width: 960px; margin: 0 auto 60px; padding: 0 16px; }

/* 顶部极简:只显示昵称 + 等级 */
.me-level-only {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.me-nick-label {
  font-size: 13px;
  letter-spacing: 2px;
}
.me-nick {
  margin: 0;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--ink);
}
.me-level-chip {
  font-size: 13px;
  padding: 2px 12px;
  letter-spacing: 1px;
}

.me-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 720px) {
  .me-edit-grid { grid-template-columns: 1fr; }
}

.me-card {
  transition: box-shadow 0.2s;
}
.me-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.me-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.me-card-head h3 { margin: 0; font-size: 16px; letter-spacing: 2px; }
.me-card-link {
  font-size: 12px;
  color: var(--accent);
}
.me-form label { display: block; margin: 10px 0; }
.me-form label input {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  margin-top: 4px;
  background: var(--paper);
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.15s;
}
.me-form label input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}
.me-form button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  transition: background 0.15s;
}
.me-form button[type="submit"]:hover { background: var(--ink); }

.my-list { list-style: none; padding: 0; margin: 0; }
.my-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.my-list li:last-child { border-bottom: none; }
.my-list-title {
  color: var(--ink);
  font-weight: 500;
  display: block;
  margin-bottom: 2px;
}
.my-list-title:hover { color: var(--accent); }
.my-list-snippet {
  display: block;
  margin-top: 2px;
  line-height: 1.5;
}
.my-list .heart {
  color: var(--accent);
  font-size: 14px;
}

/* ============== 栏目导航 ============== */
.category-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.category-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 5px 20px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
/* 栏目导航 - 每个分类都有彩色边框 + 点击高亮 */
.cat-chip {
  display: inline-block;
  padding: 3px 11px;
  font-size: 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.cat-chip:hover {
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
}

/* 每个分类的默认样式:浅色边框 + 浅背景(肉眼一眼能区分) */
.cat-chip.cat-free {
  color: #5e8b7e;
  border-color: rgba(94, 139, 126, 0.5);
  background: rgba(94, 139, 126, 0.08);
}
.cat-chip.cat-free:hover { background: rgba(94, 139, 126, 0.18); border-color: #5e8b7e; }

.cat-chip.cat-book_review {
  color: #8b2e1a;
  border-color: rgba(139, 46, 26, 0.5);
  background: rgba(139, 46, 26, 0.08);
}
.cat-chip.cat-book_review:hover { background: rgba(139, 46, 26, 0.18); border-color: #8b2e1a; }

.cat-chip.cat-used_books {
  color: #a67c52;
  border-color: rgba(166, 124, 82, 0.5);
  background: rgba(166, 124, 82, 0.08);
}
.cat-chip.cat-used_books:hover { background: rgba(166, 124, 82, 0.18); border-color: #a67c52; }

.cat-chip.cat-friends {
  color: #6a4c93;
  border-color: rgba(106, 76, 147, 0.5);
  background: rgba(106, 76, 147, 0.08);
}
.cat-chip.cat-friends:hover { background: rgba(106, 76, 147, 0.18); border-color: #6a4c93; }

/* 选中态:实色填充 + 加粗边框 + 外发光 + 阴影 */
.cat-chip.active {
  color: #fff;
  border-width: 2px;
  padding: 2px 10px;  /* 补回 1px 边框,避免尺寸跳动 */
}
.cat-chip.cat-free.active {
  background: #5e8b7e;
  border-color: #5e8b7e;
  box-shadow: 0 0 0 3px rgba(94, 139, 126, 0.25), 0 2px 6px rgba(94, 139, 126, 0.3);
}
.cat-chip.cat-book_review.active {
  background: #8b2e1a;
  border-color: #8b2e1a;
  box-shadow: 0 0 0 3px rgba(139, 46, 26, 0.25), 0 2px 6px rgba(139, 46, 26, 0.3);
}
.cat-chip.cat-used_books.active {
  background: #a67c52;
  border-color: #a67c52;
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.25), 0 2px 6px rgba(166, 124, 82, 0.3);
}
.cat-chip.cat-friends.active {
  background: #6a4c93;
  border-color: #6a4c93;
  box-shadow: 0 0 0 3px rgba(106, 76, 147, 0.25), 0 2px 6px rgba(106, 76, 147, 0.3);
}


/* 栏目标签 (论坛列表 / 帖子详情里使用) */
.cat-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #fff;
  background: #888;
  margin-right: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
.cat-tag.cat-free        { background: #5e8b7e; }
.cat-tag.cat-book_review { background: #8b2e1a; }
.cat-tag.cat-used_books  { background: #a67c52; }
.cat-tag.cat-friends     { background: #6a4c93; }

/* ============== 等级 ============== */
.level-badge {
  display: inline-block;
  padding: 1px 8px;
  font-size: 11px;
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  letter-spacing: 1px;
  vertical-align: middle;
  white-space: nowrap;
}
.level-badge.level-0 { background: var(--paper-2); color: var(--ink-soft); border-color: var(--line); }
.level-badge.level-1 { background: #f0e8d8; color: #8b6f47; border-color: #d8c8a8; }
.level-badge.level-2 { background: #e8f0e8; color: #4a6a4a; border-color: #b8d0b8; }
.level-badge.level-3 { background: #d8e8f0; color: #3a6a8b; border-color: #a8c8d8; }
.level-badge.level-4 { background: #f0e0d8; color: #8b4a3a; border-color: #d8b8a8; }
.level-badge.level-5 { background: #f0d8e8; color: #8b3a6a; border-color: #d8a8c8; }
.level-badge.level-6 { background: #e8e0f0; color: #5a3a8b; border-color: #c0a8d8; }

.level-progress {
  margin-top: 12px;
  max-width: 320px;
}
.level-progress-bar {
  height: 6px;
  background: var(--paper-2);
  border-radius: 3px;
  overflow: hidden;
}
.level-progress-fill {
  height: 100%;
  background: linear-gradient(to right, var(--accent-soft), var(--accent));
  border-radius: 3px;
  transition: width 0.3s;
}
.level-progress-text {
  margin-top: 4px;
  font-size: 12px;
}

/* ============== 收藏 ============== */
.bm-btn {
  background: var(--paper);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 2px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  transition: all 0.15s;
}
.bm-btn:hover { border-color: #c89a2a; color: #c89a2a; }
.bm-btn.bookmarked {
  background: #fff8e1;
  color: #c89a2a;
  border-color: #c89a2a;
}
.bm-btn .bm-count { margin-left: 2px; font-size: 13px; }
.bm-mark {
  color: #c89a2a;
  font-size: 12px;
  font-weight: 500;
}

/* ============== 草稿横幅 + 状态 ============== */
.draft-banner {
  background: #fff8e1;
  border-left: 3px solid #c89a2a;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
  border-radius: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.draft-banner button.text-btn { color: var(--bad); }
.draft-status-ok { color: #2e7d32 !important; }
.draft-status-err { color: var(--bad) !important; }

/* 发帖页 select */
.auth-card select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  margin-top: 4px;
}

/* ============== 落地页 hero(简约) ============== */
.landing {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.landing-inner {
  text-align: center;
  max-width: 640px;
}
.landing-seal {
  width: 140px;
  height: 140px;
  margin: 0 auto 32px;
  display: block;
}
.landing-seal svg {
  width: 100%;
  height: 100%;
  display: block;
}
.landing-title {
  margin: 0 0 16px;
  font-size: 48px;
  font-weight: 600;
  letter-spacing: 8px;
  color: var(--ink);
}
.landing-divider {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 16px;
  border-radius: 1px;
}
.landing-tagline {
  margin: 0 0 48px;
  font-size: 18px;
  color: var(--ink-soft);
  letter-spacing: 6px;
}
.landing-btn {
  display: inline-block;
  padding: 14px 56px;
  background: var(--accent);
  color: #faf6ed;
  border: 1px solid var(--accent);
  border-radius: 2px;
  font-size: 17px;
  letter-spacing: 4px;
  transition: all 0.2s;
}
.landing-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #faf6ed;
  text-decoration: none;
}
.landing-foot {
  margin-top: 36px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 1px;
}
.landing-foot a { color: var(--ink-soft); }
.landing-foot a:hover { color: var(--accent); }
.landing-foot .dot { margin: 0 8px; color: var(--line); }

@media (max-width: 480px) {
  .landing-title { font-size: 36px; letter-spacing: 4px; }
  .landing-tagline { font-size: 16px; letter-spacing: 4px; }
  .landing-seal { width: 110px; height: 110px; }
}

/* ============== 发新帖 拉平样式 ============== */
.flat-page .auth-card {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--line);
  padding: 28px 28px 24px;
}
.flat-page .auth-card h2 { font-weight: 600; letter-spacing: 1px; }
.flat-page .form input[type=text],
.flat-page .form input[type=tel],
.flat-page .form input[type=password],
.flat-page .form input:not([type]),
.flat-page .form input[type=file],
.flat-page .form textarea,
.flat-page .form select {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid #c8c8c8;
  background: #fff;
  padding: 11px 12px;
}
.flat-page .form textarea {
  border-radius: 0;
  min-height: 220px;
  line-height: 1.7;
}
.flat-page .form input:focus,
.flat-page .form textarea:focus,
.flat-page .form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.flat-page .form label {
  border-left: 2px solid transparent;
  padding-left: 8px;
  transition: border-color .15s;
}
.flat-page .form label:focus-within {
  border-left-color: var(--accent);
}
.flat-page .form label > .hint-inline {
  font-weight: normal;
  font-size: 12px;
  color: var(--ink-soft);
  margin-left: 4px;
}
.flat-page .form button[type=submit] {
  border-radius: 0;
  box-shadow: none;
  letter-spacing: 4px;
  padding: 12px 28px;
}
.flat-page .form-actions { margin-top: 4px; }

/* ============== 帖子副标题 ============== */
.post-subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: normal;
  letter-spacing: 0.5px;
  border-left: 2px solid var(--line);
  padding-left: 8px;
}
