:root {
  --ink: #172220;
  --muted: #66736f;
  --paper: #f4f0e6;
  --surface: #fffdf7;
  --line: #dcd4c3;
  --river: #176b68;
  --river-dark: #0d4b49;
  --gold: #c78b39;
  --warning: #9a4b33;
  --shadow: 0 14px 35px rgba(37, 48, 44, .08);
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; line-height: 1.7; }
body { margin: 0; background: radial-gradient(circle at top right, rgba(199,139,57,.12), transparent 30rem), var(--paper); }
a { color: var(--river-dark); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: #a45f1f; }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(220,212,195,.9); background: rgba(255,253,247,.93); backdrop-filter: blur(12px); }
.header-inner, .site-main, .site-footer { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50% 50% 46% 54%; color: white; background: var(--river); font-family: "Songti SC", STSong, serif; font-weight: 700; box-shadow: inset 0 -4px 0 rgba(0,0,0,.1); }
.brand strong, .brand small { display: block; }
.brand strong { font-family: "Songti SC", STSong, serif; font-size: 1.22rem; letter-spacing: .08em; }
.brand small { color: var(--muted); font-size: .74rem; letter-spacing: .06em; }
.primary-nav { display: flex; gap: 20px; font-size: .92rem; }
.primary-nav a { text-decoration: none; }
.site-main { min-height: calc(100vh - 180px); padding: 42px 0 64px; }
.site-footer { padding: 24px 0 40px; color: var(--muted); font-size: .84rem; border-top: 1px solid var(--line); }
.hero { padding: 40px; border-radius: 22px; background: linear-gradient(145deg, #0d4b49, #176b68 65%, #2b7d72); color: white; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.hero::after { content: "天河"; position: absolute; right: 3%; bottom: -36%; color: rgba(255,255,255,.06); font: 900 12rem/1 "Songti SC", serif; }
.eyebrow { margin: 0 0 6px; color: #d9bd84; font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 760px; font: 700 clamp(2rem, 5vw, 4.4rem)/1.15 "Songti SC", STSong, serif; letter-spacing: .04em; }
.hero-title-line { display: inline-block; }
.hero p { max-width: 670px; margin: 18px 0 0; color: rgba(255,255,255,.8); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0 36px; }
.stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 8px 20px rgba(37,48,44,.04); }
.stat strong { display: block; color: var(--river-dark); font: 700 1.7rem/1.1 ui-monospace, SFMono-Regular, monospace; }
.stat span { color: var(--muted); font-size: .82rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 36px 0 14px; }
.section-heading h1, .section-heading h2 { margin: 0; font-family: "Songti SC", STSong, serif; }
.section-heading p { margin: 0; color: var(--muted); }
.category { margin: 0 0 28px; }
.category-title { display: flex; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--river); }
.category-title h2 { margin: 0; font: 700 1.35rem "Songti SC", STSong, serif; }
.forum-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 14px; }
.forum-card { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; min-height: 116px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 20px rgba(37,48,44,.04); text-decoration: none; color: inherit; }
.forum-card:hover { border-color: var(--gold); color: inherit; transform: translateY(-1px); }
.forum-logo, .forum-logo-placeholder { width: 54px; height: 54px; border-radius: 13px; object-fit: cover; background: #d8e1dc; }
.forum-logo-placeholder { display: grid; place-items: center; color: var(--river); font: 700 1.2rem "Songti SC", serif; }
.forum-card h3 { margin: 0 0 3px; color: var(--river-dark); }
.forum-card p { margin: 0; color: var(--muted); font-size: .86rem; }
.forum-count { color: var(--muted); font-size: .78rem; text-align: right; white-space: nowrap; }
.breadcrumb { margin: 0 0 18px; color: var(--muted); font-size: .84rem; }
.breadcrumb a { color: inherit; }
.archive-note { padding: 12px 16px; border-left: 4px solid var(--gold); background: #fff8e8; color: #654a2c; border-radius: 0 9px 9px 0; font-size: .87rem; }
.topic-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.topic-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 96px; gap: 18px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.topic-row:last-child { border-bottom: 0; }
.topic-main a { font-weight: 650; text-decoration: none; }
.topic-main p, .topic-meta { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.topic-number { color: var(--muted); font-size: .8rem; text-align: right; }
.badge { display: inline-block; margin-left: 5px; padding: 1px 7px; border-radius: 99px; background: #e7ece8; color: #40524c; font-size: .68rem; vertical-align: .12em; }
.badge-locked { background: #e5e5e5; color: #555; }
.badge-digest { background: #fff0cc; color: #855613; }
.badge-topped { background: #dcefed; color: #145b58; }
.badge-warning { background: #f6ddd6; color: var(--warning); }
.thread-title { margin: 0; font: 700 clamp(1.65rem, 4vw, 2.6rem)/1.25 "Songti SC", STSong, serif; }
.thread-subtitle { color: var(--muted); }
.post { display: grid; grid-template-columns: 154px minmax(0, 1fr); margin: 18px 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; box-shadow: 0 8px 20px rgba(37,48,44,.035); }
.post-author { padding: 20px; background: #f6f1e7; border-right: 1px solid var(--line); }
.post-author strong, .post-author span { display: block; }
.post-author strong { word-break: break-word; }
.post-author span { color: var(--muted); font-size: .76rem; }
.post-main { min-width: 0; }
.post-meta { display: flex; justify-content: space-between; gap: 10px; padding: 11px 18px; color: var(--muted); font-size: .78rem; border-bottom: 1px solid var(--line); }
.post-content { padding: 22px; overflow-wrap: anywhere; }
.post-content img { display: block; max-width: 100%; height: auto; margin: 12px auto; border-radius: 7px; }
.post-content blockquote, .phpwind-quote { margin: 12px 0; padding: 12px 16px; border-left: 3px solid var(--gold); background: #f8f3e8; color: #4e4a41; }
.post-content table { max-width: 100%; border-collapse: collapse; }
.post-content td, .post-content th { border: 1px solid var(--line); padding: 6px; }
.post-content pre { max-width: 100%; overflow: auto; padding: 12px; background: #202725; color: #f8f6ee; border-radius: 8px; }
.post-signature { margin: 0 22px 20px; padding: 12px 0 0; border-top: 1px dashed #c9bda9; color: #6b675e; font-size: .82rem; }
.post-signature::before { content: "签名档 · 2013 备份"; display: block; margin-bottom: 4px; color: #9a8a72; font-size: .68rem; letter-spacing: .12em; }
.post-signature img { max-width: min(100%, 560px); max-height: 180px; object-fit: contain; }
.post-content .align-right { text-align: right; }
.post-content .align-center { text-align: center; }
.post-content .align-left { text-align: left; }
.legacy-color { color: #665443; }
.legacy-size { font-size: 1.05em; }
.legacy-media, .external-image, .missing-media { display: inline-block; padding: 5px 9px; border-radius: 6px; background: #f3ede0; color: var(--muted); font-size: .85rem; }
.smiley { color: var(--gold); font-size: .84rem; }
.attachments { margin: 0 22px 22px; padding: 16px; border: 1px dashed #c9bda9; border-radius: 9px; background: #faf7ef; }
.attachments h4 { margin: 0 0 9px; font-size: .85rem; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-link { display: inline-flex; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: white; font-size: .8rem; }
.attachment-image { margin: 12px 0; }
.attachment-image img { max-width: min(100%, 820px); max-height: 760px; object-fit: contain; border-radius: 7px; }
.post-content img, .attachment-image img, [data-lightbox-preview] img { cursor: zoom-in; }
.missing-attachment { color: var(--warning); font-size: .82rem; }
.orphan-media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.orphan-media-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.orphan-media-card img { display: block; width: 100%; height: 210px; object-fit: contain; background: #f3eee3; border-radius: 7px; }
.orphan-media-card p { margin: 8px 0 0; overflow-wrap: anywhere; color: var(--muted); font-size: .78rem; }
.orphan-thread-group { margin: 22px 0 34px; }
.orphan-thread-heading { display: flex; justify-content: space-between; gap: 18px; align-items: end; padding-bottom: 8px; border-bottom: 2px solid var(--river); }
.orphan-thread-heading h2, .orphan-thread-heading p { margin: 0; }
.orphan-thread-heading p { color: var(--muted); font-size: .8rem; text-align: right; }
.media-lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 28px; background: rgba(9, 16, 15, .88); cursor: zoom-out; }
.media-lightbox[hidden] { display: none; }
.media-lightbox figure { max-width: min(1160px, 100%); max-height: 100%; margin: 0; text-align: center; }
.media-lightbox img { display: block; max-width: 100%; max-height: calc(100vh - 100px); margin: auto; object-fit: contain; cursor: default; box-shadow: 0 18px 60px rgba(0, 0, 0, .45); }
.media-lightbox figcaption { margin-top: 8px; color: rgba(255, 255, 255, .82); font-size: .82rem; }
.media-lightbox-close { position: fixed; top: 18px; right: 20px; z-index: 1; min-width: 44px; min-height: 44px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.45); background: rgba(13,75,73,.88); font-size: 1.4rem; line-height: 1; }
.lightbox-open { overflow: hidden; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 24px 0; }
.pagination a, .pagination strong, .pagination span { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); text-decoration: none; }
.pagination strong { color: white; background: var(--river); border-color: var(--river); }
.search-panel { padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; min-width: 0; padding: 13px 14px; border: 1px solid #b8b3a8; border-radius: 8px; font: inherit; }
button { padding: 11px 18px; border: 0; border-radius: 8px; color: white; background: var(--river); font: 650 inherit; cursor: pointer; }
.search-status { color: var(--muted); font-size: .84rem; }
.search-result { padding: 15px 0; border-bottom: 1px solid var(--line); }
.search-result h3, .search-result p { margin: 0; }
.search-result p { color: var(--muted); font-size: .84rem; }
.report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.report-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.report-card h3 { margin-top: 0; }
.report-card ul { margin-bottom: 0; }
.member-columns { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.compact-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.compact-list li { padding: 10px 13px; border-bottom: 1px solid var(--line); }
.compact-list li:last-child { border: 0; }
.compact-list small { display: block; color: var(--muted); }
@media (max-width: 760px) {
  .header-inner { min-height: 70px; }
  .brand small { display: none; }
  .primary-nav { gap: 10px; font-size: .8rem; }
  .hero { padding: 28px 22px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .forum-grid, .report-grid, .member-columns { grid-template-columns: 1fr; }
  .forum-card { grid-template-columns: 48px 1fr; }
  .forum-count { display: none; }
  .topic-row { grid-template-columns: 1fr; gap: 2px; }
  .topic-number { text-align: left; }
  .post { grid-template-columns: 1fr; }
  .post-author { border-right: 0; border-bottom: 1px solid var(--line); }
  .post-author strong, .post-author span { display: inline; margin-right: 8px; }
  .orphan-media-grid { grid-template-columns: 1fr; }
  .orphan-thread-heading { display: block; }
  .orphan-thread-heading p { margin-top: 4px; text-align: left; }
  .media-lightbox { padding: 16px; }
}
