/* ============================================================
   SSLBot 社区论坛（独立页面，不依赖项目构建体系）
   样式移植自参考实现 sslbot-forum（App/Forum/Header/Footer 等 CSS 合并）
   ============================================================ */
:root {
  --ink: #0b3c49;
  --ink-deep: #072c36;
  --ink-soft: #3f6470;
  --amber: #ff9f1c;
  --amber-deep: #e88a00;
  --mint: #e8f5f1;
  --mint-line: #cfe6df;
  --white: #ffffff;
  --radius: 20px;
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
section[id] { scroll-margin-top: 80px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---- 按钮 / 徽章 / 卡片 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px;
  border-radius: 14px; border: 2px solid transparent;
  font-weight: 700; font-size: 16px;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.btn-amber { background: var(--amber); color: var(--ink-deep); box-shadow: 0 6px 18px rgba(255,159,28,.35); }
.btn-amber:hover { background: #ffad3a; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--mint); }

/* ---- 状态标签 ---- */
/* 2026-10-31 补充：sslbot 主题此前完全没有 .tag 定义，
   导致前台的「置顶」「全站置顶」「待审核」「精华」等标签渲染成裸文字。
   配色沿用本主题的 ink / amber / mint 体系。 */
.tag {
  display: inline-block; padding: 2px 9px; margin-right: 5px;
  border-radius: 999px; background: #eef2f4; color: var(--ink-soft);
  font-size: 12px; font-weight: 400; line-height: 1.6; vertical-align: middle;
  white-space: nowrap;
}
.tag-top     { background: #fff2d9; color: #8a5a00; }   /* 置顶 / 全站置顶 / 待审核 */
.tag-essence { background: var(--mint); color: var(--ink); }  /* 精华 */
.tag-ok      { background: var(--mint); color: #0f766e; }     /* 正常 / 通过 */
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; border-radius: 12px; }

.forum { background: linear-gradient(180deg, #e9f6f2 0%, #f2fbf8 45%, #e8f5f1 100%); min-height: 70vh; padding-bottom: 96px; }
.page-in { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page-in { animation: none; } html { scroll-behavior: auto; } }
.card { background: #fff; border-radius: var(--radius); border: 1px solid rgba(207,230,223,.7); box-shadow: 0 10px 34px rgba(11,60,73,.07); }
.card-title { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.3; }
.card-title::after { content: ''; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--amber); margin-top: 10px; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; flex: none; line-height: 1; }
.badge-pin { background: var(--amber); color: var(--ink-deep); }
.badge-ok { background: #d9f1e8; color: #0d6b52; }
.badge-ink { background: var(--ink); color: var(--mint); }
.link-more { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 6px 0; color: var(--amber-deep); font-weight: 700; font-size: 15px; }
.link-more:hover { text-decoration: underline; }
.sec-h { margin: 0 0 24px; font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.01em; }

/* ---- 页头 / 页脚 ---- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(232, 245, 241, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mint-line);
}
.hdr-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 22px; letter-spacing: -.02em; }
.logo b { color: var(--ink); }
.logo i { font-style: normal; color: var(--amber); }
/* 站点 Logo（官方 SVG，2335x505 横版） */
.logo-img { display: block; height: 30px; width: auto; }
@media (max-width: 900px) { .logo-img { height: 26px; } }
.hdr-nav { display: flex; gap: 6px; margin: 0 auto; }
.hdr-nav a { padding: 8px 14px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink); transition: background .15s; }
.hdr-nav a:hover { background: rgba(11,60,73,.08); }
.hdr-nav a.active, .hdr-sheet a.active { background: var(--ink); color: var(--mint); }
.hdr-burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); align-items: center; justify-content: center; }
.hdr-sheet { display: none; flex-direction: column; gap: 4px; padding: 12px var(--pad) 20px; background: var(--mint); border-bottom: 1px solid var(--mint-line); }
.hdr-sheet a:not(.btn) { padding: 14px 8px; font-weight: 600; border-bottom: 1px solid var(--mint-line); }
.hdr-sheet .btn { margin-top: 12px; }
@media (max-width: 900px) {
  .hdr-nav, .hdr-cta { display: none; }
  .hdr-burger { display: inline-flex; }
  .hdr-sheet { display: flex; }
}
.ftr { background: var(--ink); color: var(--mint); padding: 56px 0 28px; }
.ftr-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; }
.ftr-logo { display: inline-flex; background: var(--mint); padding: 10px 16px; border-radius: 14px; color: var(--ink); }
.ftr-logo .logo-img { height: 26px; }
.ftr-brand p { margin: 14px 0 0; font-weight: 700; }
.ftr-brand .sub { font-weight: 400; opacity: .7; font-size: 14px; margin-top: 4px; }
.ftr h4 { margin: 0 0 14px; font-size: 15px; }
.ftr nav a { display: block; padding: 5px 0; font-size: 14px; opacity: .72; transition: opacity .15s, color .15s; }
.ftr nav a:hover { opacity: 1; color: var(--amber); }
.ftr-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(232,245,241,.2); font-size: 13px; opacity: .65; }
@media (max-width: 760px) { .ftr-grid { grid-template-columns: repeat(3, 1fr); } .ftr-brand { grid-column: 1 / -1; } }
@media (max-width: 440px) { .ftr-grid { grid-template-columns: 1fr 1fr; } }

/* ---- 面包屑 / 头像 / 图标 ---- */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.crumb-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.crumb button { border: 0; background: none; padding: 2px 0; color: var(--ink-soft); }
.crumb button:hover { color: var(--ink); text-decoration: underline; }
.crumb i { font-style: normal; opacity: .5; }
.crumb [aria-current] { color: var(--ink); font-weight: 600; display: inline-block; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 800; line-height: 1; }
.rk-icon { flex: none; }

/* ---- 论坛首页 ---- */
.fh { padding: 56px 0 48px; }
.fh-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-top: 20px; }
.fh-title { margin: 0; font-size: clamp(48px, 6.4vw, 80px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.fh-title em { font-style: normal; color: var(--amber); }
.fh-text p { margin: 14px 0 0; color: var(--ink-soft); font-size: 16px; }
.fh-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.fh-search { display: flex; align-items: center; gap: 10px; width: 340px; height: 52px; padding: 0 20px; border-radius: 999px; background: #fff; color: var(--ink-soft); box-shadow: 0 6px 22px rgba(11,60,73,.07); border: 2px solid transparent; transition: border-color .15s; }
.fh-search:focus-within { border-color: var(--amber); }
.fh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); }
.fh-search input::placeholder { color: #7d9aa4; }
@media (max-width: 900px) {
  .fh { padding: 36px 0 32px; }
  .fh-row { flex-direction: column; align-items: stretch; gap: 24px; }
  .fh-actions { width: 100%; }
  .fh-search { flex: 1; width: auto; }
}
@media (max-width: 480px) {
  .fh-actions { flex-direction: column; align-items: stretch; }
  .fh-actions .btn { width: 100%; }
}
.fhome-sec { padding-bottom: 8px; }
.fhome-results { padding: 24px 28px; }
.fhome-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.fhome-results-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.fhome-results-head h2 span { margin-left: 12px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.fhome-results ul { list-style: none; }
.fhome-results li { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--mint-line); color: var(--amber-deep); }
.fhome-results li a { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 14px 0; display: flex; flex-direction: column; gap: 2px; }
.fhome-results li strong { font-size: 16px; color: var(--ink); }
.fhome-results li a:hover strong { color: var(--amber-deep); }
.fhome-results li span { font-size: 13px; color: var(--ink-soft); }
.fhome-empty { margin: 8px 0 0; color: var(--ink-soft); }
@media (max-width: 600px) { .fhome-results { padding: 20px; } }

.bgrid { padding-top: 40px; padding-bottom: 8px; }
.bgrid-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.bgrid-card { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 28px; transition: transform .18s ease, box-shadow .18s ease; }
.bgrid-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(11,60,73,.12); }
.bgrid-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #d8f2ea; color: var(--ink); }
.bgrid-card h3 { margin: 22px 0 0; font-size: 22px; font-weight: 800; }
.bgrid-card:hover h3 { color: var(--amber-deep); }
.bgrid-card p { margin: 10px 0 24px; color: var(--ink-soft); font-size: 15px; flex: 1; }
.bgrid-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--ink-soft); }
.bgrid-meta span:first-child { font-weight: 700; color: var(--ink); }
@media (max-width: 1000px) { .bgrid-list { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 600px) { .bgrid-list { grid-template-columns: 1fr; } .bgrid-card { padding: 22px; } .bgrid-card h3 { margin-top: 16px; } }

.ranks { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding-top: 72px; align-items: start; }
.rank { padding: 32px 32px 22px; }
.rank ol { list-style: none; margin: 24px 0 14px; }
.rank li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--mint-line); }
.rank li:first-child { border-top: 0; padding-top: 6px; }
.rank-n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #e6efee; color: var(--ink-soft); font-weight: 800; font-size: 15px; }
.rank-n.top { background: var(--amber); color: #fff; }
.rank li > div { min-width: 0; }
.rank li a { border: 0; background: none; padding: 0; text-align: left; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--ink); display: block; }
.rank li a:hover { color: var(--amber-deep); }
.rank li p { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 13px; color: var(--ink-soft); }
.rank li p span + span::before { content: '·'; margin: 0 8px; opacity: .6; }
@media (max-width: 1000px) { .ranks { grid-template-columns: 1fr; padding-top: 56px; } }
@media (max-width: 600px) { .rank { padding: 24px 20px 16px; } .card-title { font-size: 22px; } }

.ask { padding-top: 72px; }
.ask-box { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 48px 56px; border-radius: var(--radius); background: linear-gradient(110deg, #d5f2e8 0%, #eaf7ee 55%, #fdf3dc 100%); border: 1px solid rgba(207,230,223,.8); }
.ask-box h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
@media (max-width: 700px) { .ask-box { flex-direction: column; align-items: flex-start; padding: 32px 24px; } .ask-box .btn { width: 100%; } .ask { padding-top: 48px; } }

/* ---- 版块帖子列表页 ---- */
.bp { padding-top: 40px; }
.bp-head { display: flex; align-items: center; gap: 24px; margin: 28px 0 36px; }
.bp-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; background: #d8f2ea; color: var(--ink); }
.bp-head-text { flex: 1; min-width: 0; }
.bp-head h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.bp-head p { margin: 6px 0 12px; color: var(--ink-soft); }
.bp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bp-chips span { padding: 4px 12px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; }
.bp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.bp-main { padding: 12px 28px 24px; scroll-margin-top: 90px; }
.bp-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 0 16px; }
.bp-tabs { display: flex; gap: 6px; padding: 4px; background: #eef7f4; border-radius: 12px; }
.bp-tabs button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.bp-tabs button.on { background: var(--ink); color: var(--mint); }
.bp-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.bp-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.bp-check input { width: 18px; height: 18px; accent-color: var(--amber-deep); }
.bp-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; width: 190px; border-radius: 999px; background: #eef7f4; color: var(--ink-soft); border: 2px solid transparent; }
.bp-search:focus-within { border-color: var(--amber); background: #fff; }
.bp-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); }
.bp-th, .bp-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px 96px; gap: 16px; align-items: center; }
.bp-th { padding: 10px 0; border-bottom: 2px solid var(--mint-line); font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.bp-th span:nth-child(n+2) { text-align: center; }
.bp-list { list-style: none; }
.bp-row { padding: 18px 0; border-bottom: 1px solid var(--mint-line); }
.bp-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bp-badges { display: flex; gap: 6px; flex: none; }
.bp-badges:empty { display: none; }
.bp-title a { border: 0; background: none; padding: 0; text-align: left; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.bp-title a:hover { color: var(--amber-deep); }
.bp-author { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.bp-author span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-num { text-align: center; font-weight: 700; font-size: 15px; }
.bp-last { text-align: center; font-size: 13px; color: var(--ink-soft); }
.bp-empty { padding: 48px 0 32px; text-align: center; color: var(--ink-soft); }
.bp-pager { display: flex; align-items: center; gap: 8px; padding-top: 24px; }
.bp-pager button { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; border: 2px solid var(--mint-line); background: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.bp-pager button:hover:not(:disabled):not(.on) { border-color: var(--ink); }
.bp-pager button.on { background: var(--amber); border-color: var(--amber); color: var(--ink-deep); }
.bp-pager button:disabled { opacity: .4; cursor: not-allowed; }
.bp-pager-t { margin-left: auto; font-size: 13px; color: var(--ink-soft); }
.bp-side { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 92px; }
.bp-box { padding: 24px; }
.bp-box h2 { margin: 0 0 14px; font-size: 18px; font-weight: 800; }
.bp-box ul { list-style: none; }
.bp-box li a { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink); }
.bp-box li a:hover { background: #eef7f4; }
.bp-box li a.on { background: var(--ink); color: var(--mint); }
.bp-tips li { position: relative; padding: 5px 0 5px 16px; font-size: 14px; color: var(--ink-soft); list-style: none; }
.bp-tips li::before { content: ''; position: absolute; left: 0; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
@media (max-width: 1000px) {
  .bp-grid { grid-template-columns: 1fr; }
  .bp-side { position: static; flex-direction: row; }
  .bp-side > * { flex: 1; }
}
@media (max-width: 760px) {
  .bp { padding-top: 28px; }
  .bp-head { flex-wrap: wrap; gap: 16px; margin: 20px 0 24px; }
  .bp-icon { width: 60px; height: 60px; }
  .bp-head .btn { width: 100%; }
  .bp-main { padding: 8px 18px 20px; }
  .bp-th { display: none; }
  .bp-row { grid-template-columns: 1fr auto auto; grid-template-areas: 'title title title' 'r v last'; row-gap: 12px; column-gap: 14px; }
  .bp-title { grid-area: title; align-items: flex-start; flex-direction: column; gap: 6px; }
  .bp-num { display: none; }
  .bp-last { grid-area: last; text-align: right; }
  .bp-row .bp-num:nth-of-type(2) { display: inline; grid-area: r; text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
  .bp-row .bp-num:nth-of-type(3) { display: inline; grid-area: v; text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
  .bp-num::before { content: attr(data-label) ' '; font-weight: 500; }
  .bp-side { flex-direction: column; }
  .bp-tools { width: 100%; justify-content: space-between; }
  .bp-search { flex: 1; width: auto; }
  .bp-pager-t { display: none; }
}

/* ---- 帖子详情页 ---- */
.tp { padding-top: 40px; }
.tp-back { display: inline-flex; align-items: center; gap: 4px; margin: 16px 0 24px; border: 0; background: none; padding: 4px 0; font-weight: 700; font-size: 14px; color: var(--amber-deep); }
.tp-back:hover { text-decoration: underline; }
.tp-main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.tp-post { padding: 40px; }
.tp-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-post h1 { margin: 16px 0 20px; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
.tp-meta { display: flex; align-items: center; gap: 14px; padding: 16px 0 24px; border-bottom: 1px solid var(--mint-line); }
.tp-meta-t strong { font-size: 16px; margin-right: 8px; }
.tp-meta-t p { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.tp-role { display: inline-block; padding: 1px 9px; border-radius: 999px; background: #d8f2ea; font-size: 12px; font-weight: 700; }
.tp-body { padding: 24px 0 8px; font-size: 16px; line-height: 1.85; }
.tp-body p { margin: 0 0 16px; }
.tp-body ul { margin: 0 0 16px; padding-left: 22px; }
.tp-body li::marker { color: var(--amber); }
.tp-body pre { margin: 0 0 18px; padding: 18px 20px; border-radius: 14px; background: var(--ink); color: #d7f1e9; overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.tp-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.tp-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 20px; border-top: 1px solid var(--mint-line); }
.tp-actions button, .tp-r-act button { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--mint-line); background: #fff; border-radius: 12px; height: 40px; padding: 0 16px; font-size: 14px; font-weight: 700; transition: background .15s, border-color .15s; }
.tp-actions button:hover, .tp-r-act button:hover { border-color: var(--ink); }
.tp-actions button.on, .tp-r-act button.on { background: var(--amber); border-color: var(--amber); color: var(--ink-deep); }
.tp-replies { padding: 32px 40px 28px; }
.tp-rh { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tp-rh h2, .tp-form h2 { margin: 0; font-size: 22px; font-weight: 800; }
.tp-rh h2 span { margin-left: 6px; color: var(--amber-deep); }
.tp-sort { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #eef7f4; }
.tp-sort button { border: 0; background: none; border-radius: 9px; padding: 6px 14px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.tp-sort button.on { background: var(--ink); color: var(--mint); }
.tp-list { list-style: none; margin: 12px 0 0; }
.tp-r { display: flex; gap: 16px; padding: 22px 0; border-top: 1px solid var(--mint-line); }
.tp-r.best { background: linear-gradient(90deg, #eefaf4, transparent); margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: 14px; }
.tp-r-body { flex: 1; min-width: 0; }
.tp-r-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.tp-r-time { font-size: 13px; color: var(--ink-soft); }
.tp-r-floor { margin-left: auto; font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.tp-r-body p { margin: 0 0 8px; line-height: 1.75; overflow-wrap: anywhere; }
.tp-r-body .tp-r-to { display: inline-block; padding: 2px 10px; border-radius: 8px; background: #eef7f4; font-size: 13px; color: var(--ink-soft); }
.tp-r-act { display: flex; gap: 8px; margin-top: 6px; }
.tp-r-act button { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.tp-more { display: block; width: 100%; height: 48px; margin-top: 12px; border: 2px dashed var(--mint-line); border-radius: 14px; background: none; font-weight: 700; color: var(--ink-soft); }
.tp-more:hover { border-color: var(--amber); color: var(--ink); }
.tp-end, .tp-none { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--ink-soft); }
.tp-form { padding: 32px 40px; scroll-margin-top: 100px; }
.tp-to { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 4px 6px 4px 12px; border-radius: 999px; background: #eef7f4; font-size: 13px; font-weight: 600; }
.tp-to button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--ink); color: var(--mint); line-height: 1; }
.tp-form textarea { display: block; width: 100%; margin-top: 16px; padding: 16px 18px; border: 2px solid var(--mint-line); border-radius: 14px; background: #fbfefd; font: inherit; line-height: 1.7; color: var(--ink); resize: vertical; min-height: 130px; }
.tp-form textarea:focus { outline: 0; border-color: var(--amber); background: #fff; }
.tp-form-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 13px; color: var(--ink-soft); }
.tp-form .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.tp-box { padding: 24px; }
.tp-box h2 { margin: 0 0 16px; font-size: 18px; font-weight: 800; }
.tp-box ul { list-style: none; margin: 0 0 8px; }
.tp-box li + li { border-top: 1px solid var(--mint-line); }
.tp-box li a { display: block; width: 100%; padding: 12px 0; border: 0; background: none; text-align: left; font-size: 14px; font-weight: 700; line-height: 1.5; }
.tp-box li a:hover { color: var(--amber-deep); }
.tp-box li span { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.tp-toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 80; display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--mint); font-weight: 700; font-size: 14px; box-shadow: 0 10px 30px rgba(7,44,54,.3); animation: pageIn .25s ease both; }
@media (max-width: 640px) {
  .tp { padding-top: 28px; }
  .tp-post, .tp-replies, .tp-form { padding: 24px 20px; }
  .tp-r { gap: 12px; }
  .tp-r.best { margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
  .tp-actions button { flex: 1; justify-content: center; padding: 0 10px; }
  .tp-form .btn { height: 46px; padding: 0 22px; }
}

/* ---- 发布新帖弹窗 ---- */
.npm { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(7,44,54,.5); backdrop-filter: blur(3px); animation: npmFade .2s ease both; }
@keyframes npmFade { from { opacity: 0; } to { opacity: 1; } }
.npm-card { width: 100%; max-width: 560px; max-height: 100%; overflow-y: auto; padding: 32px; border-radius: var(--radius); background: #fff; box-shadow: 0 30px 80px rgba(7,44,54,.35); }
.npm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.npm-head h2 { margin: 0; font-size: 24px; font-weight: 800; }
.npm-head button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: #eef7f4; display: inline-flex; align-items: center; justify-content: center; }
.npm-f { display: block; margin-bottom: 16px; }
.npm-f > span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.npm-f input, .npm-f select, .npm-f textarea { width: 100%; padding: 12px 14px; border: 2px solid var(--mint-line); border-radius: 12px; background: #fbfefd; font: inherit; color: var(--ink); }
.npm-f textarea { resize: vertical; line-height: 1.7; }
.npm-f input:focus, .npm-f select:focus, .npm-f textarea:focus { outline: 0; border-color: var(--amber); background: #fff; }
.npm-err { margin: 0 0 12px; color: #c2410c; font-size: 14px; font-weight: 600; }
.npm-foot { display: flex; justify-content: flex-end; gap: 12px; }
.npm-foot .btn { height: 46px; }
@media (max-width: 480px) { .npm-card { padding: 24px 20px; } .npm-foot .btn { flex: 1; } }

/* ---- 附件 ---- */
.att-drop { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 2px dashed var(--mint-line); border-radius: 14px; background: #fbfefd; font-size: 13px; color: var(--ink-soft); transition: border-color .15s, background .15s; }
.att-drop.over { border-color: var(--amber); background: #fff8ea; }
.att-pick { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; font-size: 14px; font-weight: 700; color: var(--ink); }
.att-pick:hover { background: var(--ink); color: var(--mint); }
.att-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.att-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 12px; background: #eef7f4; font-size: 14px; color: var(--ink); }
.att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.att-size { flex: none; font-size: 12px; color: var(--ink-soft); }
.att-del { flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.att-del:hover { background: var(--ink); color: var(--mint); }
.att-view { margin: 14px 0 8px; }
.att-view h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.att-view .att-list { margin-top: 0; }

/* ============================================================
   程序补充样式：设计稿未覆盖的页面
   （搜索页 / 我的主题·回复·通知 / 发帖·编辑 / 举报 / 提示条 / Markdown / 分页）
   ============================================================ */

/* ---- 提示条 ---- */
.flash { margin: 0 auto 20px; padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 600; max-width: var(--maxw); }
.flash-success { background: #e6f6ef; color: #0d6b52; border: 1px solid #cfe6df; }
.flash-error { background: #fdece4; color: #a8420c; border: 1px solid #f6d3c2; }

/* ---- 通用内容页（搜索 / 我的 / 表单） ---- */
.sp { padding: 40px 0 0; }
.sp-page { padding: 32px 36px 36px; }
.sp-page h1, .sp-page h2 { margin: 0 0 18px; font-size: 24px; font-weight: 800; }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sp-list { list-style: none; }
.sp-list li { padding: 16px 0; border-bottom: 1px solid var(--mint-line); }
.sp-list li:last-child { border-bottom: 0; }
.sp-list strong { display: block; font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.sp-list a:hover strong { color: var(--amber-deep); }
.sp-meta { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-soft); }
.sp-meta span + span::before { content: '·'; margin: 0 8px; opacity: .6; }
.sp-empty { padding: 40px 0; text-align: center; color: var(--ink-soft); }
.sp-form { max-width: 720px; }
.sp-field { display: block; margin-bottom: 18px; }
.sp-field > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.sp-field input[type="text"], .sp-field select, .sp-field textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--mint-line); border-radius: 12px;
  background: #fbfefd; font: inherit; color: var(--ink); line-height: 1.7;
}
.sp-field input:focus, .sp-field select:focus, .sp-field textarea:focus { outline: 0; border-color: var(--amber); background: #fff; }
.sp-field input[type="file"] { padding: 10px; font-size: 13px; }
.sp-foot { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.sp-hint { font-size: 13px; color: var(--ink-soft); }

/* ---- Markdown 编辑器工具栏 ---- */
.md-editor { border: 2px solid var(--mint-line); border-radius: 14px; overflow: hidden; background: #fbfefd; }
.md-toolbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 10px; background: #eef7f4; border-bottom: 1px solid var(--mint-line); }
.md-toolbar button { min-width: 32px; height: 30px; padding: 0 9px; border: 0; border-radius: 9px; background: #fff; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.md-toolbar button:hover { background: var(--amber); color: var(--ink-deep); }
.md-hint { margin-left: auto; font-size: 12px; color: var(--ink-soft); }
.md-editor textarea { display: block; width: 100%; border: 0; padding: 16px 18px; font: inherit; line-height: 1.75; color: var(--ink); resize: vertical; background: transparent; }
.md-editor textarea:focus { outline: 0; }

/* ---- Markdown 正文（帖子 / 回复） ---- */
.md-body { font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.md-body p { margin: 0 0 16px; }
.md-body h1, .md-body h2, .md-body h3 { margin: 22px 0 12px; font-size: 20px; font-weight: 800; }
.md-body ul, .md-body ol { margin: 0 0 16px; padding-left: 22px; }
.md-body li::marker { color: var(--amber); }
.md-body blockquote { margin: 0 0 16px; padding: 12px 18px; border-left: 4px solid var(--amber); background: #eef7f4; border-radius: 0 12px 12px 0; color: var(--ink-soft); }
.md-body pre { margin: 0 0 18px; padding: 18px 20px; border-radius: 14px; background: var(--ink); color: #d7f1e9; overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.md-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.md-body p code, .md-body li code { background: #eef7f4; padding: 2px 6px; border-radius: 6px; font-size: 14px; }
.md-body img { max-width: 100%; height: auto; border-radius: 12px; }
.md-body a { color: var(--amber-deep); text-decoration: underline; }
.md-body table { border-collapse: collapse; margin: 0 0 16px; width: 100%; }
.md-body th, .md-body td { border: 1px solid var(--mint-line); padding: 8px 12px; }
.md-body mark { background: #ffe4a3; padding: 0 2px; }

/* ---- 通用分页（Pager 组件输出） ---- */
.pager { display: flex; align-items: center; gap: 8px; padding-top: 22px; }
.pager a { min-width: 40px; height: 40px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--mint-line); background: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.pager a:hover { border-color: var(--ink); text-decoration: none; }
.pager-info { margin-left: auto; font-size: 13px; color: var(--ink-soft); }

/* ---- 通知红点 ---- */
.dot { display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 2px; border-radius: 999px; background: var(--amber); color: var(--ink-deep); font-size: 11px; line-height: 16px; text-align: center; vertical-align: middle; }

/* ---- 附件可下载链接 ---- */
.att-item a { color: var(--ink); font-weight: 700; }
.att-item a:hover { color: var(--amber-deep); text-decoration: underline; }

/* ---- 面包屑链接 ---- */
.crumb a { color: var(--ink-soft); }
.crumb a:hover { color: var(--amber-deep); text-decoration: underline; }

/* ---- 分页：Pager 输出 <a>，套用 .bp-pager 外观 ---- */
.bp-pager:empty { display: none; }
.bp-pager .pager { display: contents; }
.bp-pager a { min-width: 40px; height: 40px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--mint-line); background: #fff; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.bp-pager a:hover { border-color: var(--ink); text-decoration: none; }
.bp-pager .pager-info { margin-left: auto; font-size: 13px; color: var(--ink-soft); }

/* ---- 帖子页：链接型操作按钮 ---- */
.tp-back-row { display: block; }
a.tp-back { text-decoration: none; }
.tp-act { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--mint-line); background: #fff; border-radius: 12px; height: 40px; padding: 0 16px; font-size: 14px; font-weight: 700; color: var(--ink); transition: background .15s, border-color .15s; }
.tp-act:hover { border-color: var(--ink); text-decoration: none; }
.tp-r-act .tp-act { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.tp-r-text { margin-top: 2px; }
.tp-r-text > :last-child { margin-bottom: 0; }
.tp-body > :last-child { margin-bottom: 0; }

/* ---- 通用内容页补充 ---- */
.sp-head h1 { margin: 0; }
.sp-list a { display: block; }
.sp-list a:hover { text-decoration: none; }
.sp-list .badge { vertical-align: 1px; }
.sp-page .fhome-results { padding: 0; border: 0; background: none; }
.sp-page .fhome-results li { gap: 10px; }
.sp-page .fhome-results li > svg { flex: none; color: var(--amber-deep); }

@media (max-width: 640px) {
  .sp-page { padding: 24px 20px 28px; }
  .sp { padding: 28px 0 0; }
  .tp-act { flex: 1; justify-content: center; padding: 0 10px; }
}

/* ---- 栏目单选列表（发帖页） ---- */
.cat-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-pick-item { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 2px solid var(--mint-line); border-radius: 12px; background: #fbfefd; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.cat-pick-item:hover { border-color: var(--ink-soft); }
.cat-pick-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.cat-pick-item input:checked + span { color: var(--ink-deep); }
.cat-pick-item:has(input:checked) { border-color: var(--amber); background: #fff8ea; }
.cat-pick-item:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---- 个人中心 ---- */
.uc-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
.uc-side { display: flex; flex-direction: column; gap: 24px; }
.uc-card { padding: 28px; }
.uc-card h1 { margin: 0; font-size: 24px; font-weight: 800; }
.uc-card h2 { margin: 0 0 18px; font-size: 18px; font-weight: 800; }
.uc-head { display: flex; align-items: center; gap: 16px; }
.uc-head-t { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.uc-head-t strong { font-size: 20px; font-weight: 800; }
.uc-head .sp-hint, .uc-head-t .sp-hint { font-size: 13px; }
.uc-stats { list-style: none; display: flex; gap: 12px; margin: 20px 0; padding: 0; }
.uc-stats li { flex: 1; padding: 14px; border-radius: 14px; background: #eef7f4; text-align: center; }
.uc-stats span { display: block; font-size: 12px; color: var(--ink-soft); }
.uc-stats b { display: block; margin-top: 2px; font-size: 22px; font-weight: 800; }
@media (max-width: 900px) {
  .uc-grid { grid-template-columns: 1fr; }
  .uc-card { padding: 22px 20px; }
}

/* ---- 全站置顶徽章 ---- */
.badge-global { background: linear-gradient(90deg, var(--amber), #ffc266); color: var(--ink-deep); }
