/* 论坛的纸色、朱红与书卷排版。 */
body:has(.forum-page) { min-width: 0; }
.forum-page { min-height: 100vh; background: #f6f3ec; color: #302c27; }
.forum-page a { text-decoration: none; }
.forum-icon { width: 19px; height: 19px; flex: 0 0 auto; vertical-align: middle; }
.forum-page .btn, .forum-mask .btn { min-height: 39px; justify-content: center; }
.forum-topbar { padding: 0 max(24px, calc((100vw - 1180px) / 2)); height: 72px; gap: 20px; }
.forum-topbar .brand { color: inherit; }
.forum-topbar .brand .seal { width: 38px; height: 38px; border-radius: 9px; font-size: 22px; }
.forum-current-user { font-size: 13px; color: #776c60; }
.forum-wrap { max-width: 1236px; padding: 0 28px; margin: 0 auto; }
.forum-hero { display: flex; align-items: center; justify-content: space-between; min-height: 320px; padding: 42px 24px 40px; gap: 32px; }
.forum-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 2px; color: #956850; }
.forum-hero h2 { font-family: var(--serif); font-size: clamp(26px, 3vw, 40px); font-weight: 500; letter-spacing: 3px; margin: 16px 0; }
.forum-hero p { color: #7a7065; font-size: 14px; line-height: 1.95; margin: 0 0 22px; }
.forum-hero .btn { padding: 11px 18px; gap: 18px; }
.forum-hero-art { width: 285px; height: 242px; flex-shrink: 0; position: relative; margin-right: 36px; }
.forum-art-disc { position: absolute; width: 227px; height: 227px; border-radius: 50%; background: #eae3d5; top: 5px; left: 30px; }
.forum-art-book { position: absolute; width: 132px; height: 178px; border-radius: 3px 8px 8px 3px; border: 1px solid #9a8871; box-shadow: 5px 9px 18px #493c2720; }
.forum-art-book-back { background: #a3aa96; left: 46px; top: 27px; transform: rotate(-15deg); border-color: #8b947e; }
.forum-art-book-front { background: #e6d6b8; left: 109px; top: 40px; transform: rotate(9deg); border-left: 9px solid #a24736; display: flex; justify-content: center; align-items: center; gap: 15px; box-shadow: 3px 3px 0 #f8f0de, 5px 5px 0 #b3a68e, 12px 15px 22px #493c2725; }
.forum-art-book-front span { writing-mode: vertical-rl; letter-spacing: 8px; font-size: 26px; font-family: var(--serif); }
.forum-art-book-front small { writing-mode: vertical-rl; font-size: 9px; letter-spacing: 3px; color: #7f6a50; }
.forum-art-seal { position: absolute; right: 9px; bottom: 6px; width: 33px; height: 46px; border: 1px solid #a35440; color: #a35440; padding: 3px; text-align: center; font-family: var(--serif); font-size: 15px; line-height: 18px; border-radius: 3px; transform: rotate(-6deg); }
.forum-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 32px; align-items: start; }
.forum-tabs { display: flex; gap: 25px; border-bottom: 1px solid #ddd5c7; margin-bottom: 23px; }
.forum-tabs > button { background: none; border: 0; border-bottom: 3px solid transparent; display: inline-flex; align-items: center; gap: 9px; color: #7f766c; padding: 15px 3px; font-size: 15px; font-weight: 600; margin-bottom: -1px; }
.forum-tabs > button[aria-selected="true"] { color: #923f30; border-bottom-color: #923f30; }
.forum-tabs button span { border-radius: 20px; padding: 2px 7px; background: #ebe6dc; color: #85796a; font-size: 11px; font-weight: 400; }
.forum-section-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 17px; }
.forum-section-line h3 { margin: 0; font-size: 17px; font-family: var(--serif); letter-spacing: 1px; }
.forum-section-line h4 { margin: 0; font-size: 13px; }
.forum-meta { font-size: 12px; color: #81766a; line-height: 1.8; margin: 0; }
.forum-work-list, .forum-community-list { display: grid; gap: 18px; }
.forum-empty { min-height: 315px; padding: 40px 24px; text-align: center; border: 1px solid #e2dacc; border-radius: 14px; background: #fffcf6; }
.forum-empty-icon { display: inline-flex; width: 66px; height: 66px; border-radius: 50%; justify-content: center; align-items: center; background: #f1ebe0; color: #927a5c; }
.forum-empty-icon svg { width: 31px; height: 31px; }
.forum-empty h3 { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: 1px; margin: 18px 0 11px; }
.forum-empty p { color: #84786b; font-size: 13px; line-height: 1.95; margin: 0 0 20px; }
.forum-sidebar { padding-top: 5px; display: grid; gap: 18px; }
.forum-side-note, .forum-side-invite { border: 1px solid #e2dacc; border-radius: 13px; background: #fdfaf3; padding: 26px 23px; }
.forum-sidebar h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; margin: 12px 0 22px; }
.forum-sidebar ol { list-style: none; padding: 0; margin: 0 0 23px; counter-reset: step; }
.forum-sidebar li { counter-increment: step; position: relative; padding: 0 0 23px 32px; }
.forum-sidebar li:last-child { padding-bottom: 0; }
.forum-sidebar li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; font-family: Georgia, serif; font-size: 17px; color: #b79d7f; }
.forum-sidebar li b { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.forum-sidebar li span, .forum-side-invite p { font-size: 12px; color: #867a6c; line-height: 1.85; }
.forum-sidebar a { display: inline-flex; gap: 15px; align-items: center; font-size: 12px; color: #914330; }
.forum-side-invite { background: #edeedf; border-color: #dce0cd; }
.forum-side-invite .forum-eyebrow { color: #747b5c; }
.forum-side-invite h3 { margin-bottom: 12px; }
.forum-side-invite p { margin: 0 0 18px; }
.forum-side-invite .btn { background: transparent; border-color: #b8bfa3; font-size: 12px; }
.forum-footer { padding: 38px 0 30px; text-align: center; color: #a09382; letter-spacing: 3px; font-size: 11px; }
.forum-work { border: 1px solid #e2dacc; border-radius: 13px; background: #fffcf6; display: flex; padding: 23px; gap: 24px; }
.forum-search { display:flex; gap:8px; margin:0 0 18px; align-items:center; }
.forum-search input { flex:1; min-width:0; padding:10px 13px; border:1px solid #ded3c0; border-radius:8px; background:#fffefb; }
.forum-tags { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.forum-tag { border:1px solid #d8c7ad; background:#f7efe2; color:#8b6248; border-radius:999px; padding:3px 9px; font-size:11px; cursor:pointer; }
.forum-tag-active { background:#9a3b2e; border-color:#9a3b2e; color:#fff; }
.reader-page { min-height:100vh; background:#f5f0e7; color:#40372f; }
.reader-topbar { height:72px; padding:0 6vw; display:flex; align-items:center; gap:22px; border-bottom:1px solid #e1d5c3; background:#fffcf6; }
.reader-topbar .brand { display:flex; align-items:center; gap:10px; color:inherit; text-decoration:none; }
.reader-topbar .brand h1 { margin:0; font:500 18px var(--serif); }.reader-topbar .sub { font-size:11px; color:#9b8b78; }.reader-top-title { flex:1; text-align:center; font:500 18px var(--serif); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reader-layout { max-width:1180px; margin:0 auto; display:grid; grid-template-columns:240px minmax(0,760px); gap:48px; padding:42px 24px 80px; }
.reader-toc { position:sticky; top:24px; align-self:start; max-height:calc(100vh - 48px); overflow:auto; padding:22px 16px; background:#eee6d7; border:1px solid #ded1bc; border-radius:12px; }.reader-toc h3 { margin:0 0 14px 8px; font:500 18px var(--serif); }.reader-toc-item { display:block; width:100%; padding:10px 9px; border:0; border-left:2px solid transparent; background:transparent; text-align:left; color:#756655; cursor:pointer; font-size:13px; }.reader-toc-item.active { color:#963f2e; border-left-color:#963f2e; background:#f8f1e5; }
.reader-main { min-width:0; }.reader-meta { display:flex; justify-content:space-between; color:#9a8975; font-size:12px; margin-bottom:20px; }.reader-content { min-height:600px; padding:58px 72px; background:#fffdf8; border:1px solid #e4d9c8; box-shadow:0 8px 30px #6c4c2510; }.reader-content h2 { margin:0 0 42px; text-align:center; font:500 30px/1.4 var(--serif); color:#3d3329; }.reader-content h3 { margin:30px 0 12px; font:500 20px var(--serif); }.reader-content p { margin:0 0 22px; font:16px/2.15 var(--serif); white-space:normal; color:#51473d; }.reader-nav { display:flex; justify-content:center; gap:12px; padding-top:25px; }.reader-empty { color:#a29483; text-align:center; }
@media (max-width:800px) { .reader-topbar { padding:0 16px; }.reader-top-title { display:none; }.reader-layout { grid-template-columns:1fr; padding:20px 14px 50px; }.reader-toc { position:static; max-height:220px; }.reader-content { padding:38px 22px; }.reader-content h2 { font-size:25px; margin-bottom:30px; }.reader-content p { font-size:15px; } }
.forum-book-art { position: relative; width: 118px; min-height: 165px; align-self: start; padding: 32px 17px 19px 20px; flex-shrink: 0; background: #e8dfca; border-left: 6px solid #9c5140; border-radius: 2px 6px 6px 2px; box-shadow: 3px 3px 0 #cfc4ae; display: flex; flex-direction: column; justify-content: space-between; }
.forum-work:nth-child(3n + 2) .forum-book-art { background: #d9dfd1; border-left-color: #6d7c60; }
.forum-work:nth-child(3n + 3) .forum-book-art { background: #e0d9cd; border-left-color: #806e60; }
.forum-rank { position: absolute; top: 9px; left: 12px; color: #8d775c; font-size: 12px; font-family: Georgia, serif; }
.forum-book-title { font-family: var(--serif); font-size: 18px; line-height: 1.65; overflow-wrap: anywhere; }
.forum-book-author { font-size: 10px; color: #807462; margin-top: 18px; overflow-wrap: anywhere; }
.forum-work-body { min-width: 0; flex: 1; }
.forum-work-body h3 { font-size: 20px; font-family: var(--serif); font-weight: 500; line-height: 1.5; margin: 10px 0 6px; overflow-wrap: anywhere; }
.forum-badge { display: inline-flex; border-radius: 4px; padding: 3px 7px; font-size: 10px; color: #79694f; background: #f1ebdf; }
.forum-notice { font-size: 12px; line-height: 1.8; color: #81766a; overflow-wrap: anywhere; white-space: pre-wrap; margin: 12px 0; }
.forum-work-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: #8b8072; margin: 12px 0 18px; }
.forum-work-stats b { color: #99523b; font-weight: 500; }
.forum-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.forum-community { padding: 25px; border: 1px solid #e2dacc; border-radius: 13px; background: #fffcf6; }
.forum-community-heading { display: flex; gap: 12px; align-items: center; }
.forum-community-heading > div { flex: 1; min-width: 0; }
.forum-community-heading h3 { font-family: var(--serif); font-size: 22px; font-weight: 500; margin: 0 0 4px; overflow-wrap: anywhere; }
.forum-community-mark { width: 46px; height: 46px; background: #ebdfca; color: #947352; display: grid; place-items: center; border-radius: 11px; font-family: var(--serif); font-size: 25px; flex-shrink: 0; }
.forum-community-description { font-size: 13px; color: #817568; line-height: 1.9; margin: 19px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.forum-leaders { display: flex; flex-wrap: wrap; gap: 18px; color: #938675; font-size: 11px; padding-bottom: 18px; }
.forum-leaders b { color: #665a4b; font-weight: 500; margin-left: 5px; }
.forum-election-area { border-top: 1px solid #e9e1d4; padding: 16px 0; }
.forum-election-area > summary { cursor: pointer; font-size: 13px; color: #796447; }
.forum-election-area > summary span { font-size: 11px; color: #9b8c79; margin-left: 12px; }
.forum-election-area > .forum-actions { margin-top: 18px; }
.forum-election { padding-top: 20px; }
.forum-candidate { display: flex; align-items: center; gap: 16px; font-size: 12px; padding: 9px 0; }
.forum-candidate > span { flex: 1; }
.forum-candidate b { font-weight: 400; color: #948474; }
.forum-candidate .btn { min-height: 30px; padding: 5px 12px; font-size: 12px; }
.forum-posts { border-top: 1px solid #e9e1d4; padding-top: 17px; }
.forum-posts h4 { margin: 0 0 13px; font-size: 13px; font-weight: 500; }
.forum-post { padding: 13px 0; border-bottom: 1px solid #eee7db; }
.forum-post:last-child { border-bottom: none; padding-bottom: 0; }
.forum-post summary { cursor: pointer; line-height: 1.8; overflow-wrap: anywhere; }
.forum-post summary span { font-size: 14px; }
.forum-post summary small { font-size: 11px; color: #988a7a; margin-left: 10px; }
.forum-post p { font-size: 13px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; color: #706252; }
.forum-page :focus-visible, .forum-mask :focus-visible { outline: 2px solid #aa6851; outline-offset: 3px; }

/* 站内编辑表单，窄屏也保持完整操作区。 */
.forum-mask { background: #30271e66; backdrop-filter: blur(5px); padding: 16px; }
.forum-dialog { width: 570px; max-width: 100%; max-height: calc(100dvh - 32px); border-radius: 18px; border: 1px solid #e4d8c6; background: #fffcf6; box-shadow: 0 22px 85px #30231838; }
.forum-dialog-wide { width: 680px; }
.forum-dialog-head { position: relative; padding: 29px 32px 22px; border-bottom: 1px solid #eee6d8; background: linear-gradient(110deg, #f6f0e4, #fffcf6); }
.forum-dialog-head h2 { margin: 11px 0 9px; font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: 1px; padding-right: 25px; }
.forum-dialog-head p { margin: 0; font-size: 12px; color: #8a7b68; line-height: 1.8; }
.forum-close { position: absolute; right: 19px; top: 19px; border: 0; background: #eee7db; color: #8d7e6b; width: 31px; height: 31px; border-radius: 50%; font-size: 23px; line-height: 1; }
.forum-close:hover { background: #e6d9c6; color: #933d2c; }
.forum-fields { padding: 24px 32px; }
.forum-field + .forum-field { margin-top: 23px; }
.forum-field > label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; margin-bottom: 10px; color: #4b4032; }
.forum-field > label span { font-size: 10px; font-weight: 400; color: #9b8d7a; }
.forum-field input, .forum-field textarea { display: block; width: 100%; padding: 12px 14px; border: 1px solid #ded3c0; background: #fffefb; border-radius: 8px; font-size: 14px; color: #3b3229; line-height: 1.8; transition: border-color .15s, box-shadow .15s; }
.forum-field textarea { min-height: 110px; resize: vertical; }
.forum-field textarea.forum-post-editor { min-height: 220px; }
.forum-field input::placeholder, .forum-field textarea::placeholder { color: #b0a391; font-size: 13px; }
.forum-field input:focus, .forum-field textarea:focus { outline: none; border-color: #aa6d51; box-shadow: 0 0 0 3px #b7815012; }
.forum-field-hint { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: #9b8d7a; margin-top: 8px; line-height: 1.6; }
.forum-field-hint output { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.forum-form-tip { display: flex; gap: 10px; margin-top: 22px; padding: 12px; background: #f1eee4; border-radius: 7px; color: #8c7c61; font-size: 11px; line-height: 1.8; }
.forum-form-foot { padding: 17px 32px; border-top: 1px solid #eee6d8; display: flex; align-items: center; gap: 10px; background: #faf6ed; }
.forum-submit-note { margin-right: auto; color: #a29480; font-size: 11px; }
.forum-form-error { font-size: 12px; color: #a33828; line-height: 1.8; padding: 11px 13px; background: #f9eae3; border-radius: 7px; margin: 16px 0 0; }
.forum-licenses { border: 0; padding: 0; margin: 0 0 25px; min-width: 0; }
.forum-licenses legend { padding: 0; font-size: 13px; font-weight: 600; margin-bottom: 11px; }
.forum-license { display: flex; align-items: center; gap: 13px; border: 1px solid #e3d9c8; border-radius: 9px; padding: 13px 15px; cursor: pointer; margin-bottom: 9px; background: #fffefb; }
.forum-license:has(input:checked) { background: #f8eee2; border-color: #ad7355; box-shadow: 0 0 0 1px #ad735512; }
.forum-license input, .forum-consent input { accent-color: #9a3b2e; width: 16px; height: 16px; flex-shrink: 0; }
.forum-license strong { display: block; font-size: 13px; font-weight: 500; color: #5c4935; }
.forum-license small { display: block; font-size: 11px; color: #9a8770; margin-top: 6px; line-height: 1.7; }
.forum-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.8; color: #8b7b66; margin-top: 19px; cursor: pointer; }
.forum-consent input { margin-top: 3px; }
@media (max-width: 900px) {
  .forum-content-layout { grid-template-columns: minmax(0, 1fr); }
  .forum-sidebar { grid-template-columns: 1fr 1fr; }
  .forum-hero { padding-left: 0; padding-right: 0; }
  .forum-hero-art { margin-right: 0; transform: scale(.85); width: 250px; }
}
@media (max-width: 600px) {
  .forum-topbar { padding: 0 16px; gap: 10px; height: 65px; }
  .forum-topbar .brand h1 { font-size: 16px; }
  .forum-topbar .brand .sub, .forum-current-user { display: none; }
  .forum-wrap { padding: 0 16px; }
  .forum-hero { min-height: 260px; padding: 30px 5px; }
  .forum-hero-art { display: none; }
  .forum-hero h2 { font-size: 27px; letter-spacing: 1px; }
  .forum-tabs { gap: 23px; }
  .forum-section-line { flex-wrap: wrap; }
  .forum-sidebar { grid-template-columns: 1fr; }
  .forum-work { gap: 16px; padding: 16px; }
  .forum-book-art { width: 75px; min-height: 130px; padding: 28px 9px 12px; }
  .forum-book-title { font-size: 15px; }
  .forum-work-body h3 { font-size: 18px; }
  .forum-work-stats { gap: 9px; }
  .forum-actions { gap: 7px; }
  .forum-actions .btn { font-size: 12px; padding: 7px 10px; }
  .forum-community { padding: 18px; }
  .forum-community-heading { flex-wrap: wrap; }
  .forum-community-heading h3 { font-size: 20px; }
  .forum-dialog-head { padding: 24px 20px 19px; }
  .forum-dialog-head h2 { font-size: 23px; }
  .forum-fields { padding: 22px 20px; }
  .forum-form-foot { padding: 16px 20px; justify-content: flex-end; }
  .forum-submit-note { display: none; }
  .forum-field-hint { font-size: 10px; }
}
