/* 风月楼 — 浅色，朱红与墨黑，参考源站版式 */

:root {
  --red: #a2231d;
  --red-deep: #7d1712;
  --red-soft: #f7e7e7;
  --red-line: #e3c9c8;
  --ink: #262222;
  --ink-soft: #4a4444;
  --muted: #726a6a;
  --line: #ddd5d3;
  --line-soft: #efe8e6;
  --bg: #fdfbf9;
  --panel: #faf4f2;
  --cream: #fdf9f3;
  --notice: #fdf6e3;
  --notice-line: #e8dcb8;
  --accent: #a2231d;
  --accent-2: #b8862f;
  --accent-ink: #ffffff;
  --radius: 2px;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-sans: -apple-system, "Segoe UI", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --cta-fill: #7d1712;
  --cta-edge: #5c0f0b;
  --cta-elevation: 0 10px 26px rgba(90, 20, 16, 0.26);
  --cta-rail: rgba(255, 255, 255, 0.16);
  --cta-sheen: rgba(255, 255, 255, 0.08);
  --wrap: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: 150px;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.8 var(--font-sans);
}

a {
  color: var(--red-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: normal;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--red-deep);
  color: #fff;
}

.skip:focus {
  top: 12px;
}

/* 顶栏 */
.bar {
  background: #f3ecea;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 30px;
  color: #5a5250;
}

.bar-in {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.bar a {
  color: #5a5250;
}

.bar i {
  color: #bfb3b0;
  margin: 0 6px;
  font-style: normal;
}

/* 站头 */
.hd {
  background: linear-gradient(180deg, #fffdfb 0, #fdf6f4 100%);
  border-bottom: 1px solid var(--red-line);
}

.hd-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1;
}

.logo-txt {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red-deep);
}

.hd-tag {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* 主导航 */
.nav {
  background: var(--red);
  border-bottom: 1px solid var(--red-deep);
}

.nav-in {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nav a {
  flex: 0 0 auto;
  padding: 9px 19px;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.1em;
  line-height: 1.6;
}

.nav a:hover {
  background: var(--red-deep);
  text-decoration: none;
}

.nav a.on {
  background: var(--red-deep);
}

/* 搜索条 */
.scbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.sc-in {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.search {
  display: flex;
  flex: 1 1 auto;
  max-width: 440px;
}

.search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border: 1px solid #d9ccc9;
  border-right: 0;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

.search button {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 18px;
  border: 1px solid var(--red-deep);
  background: var(--red);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.search button:hover {
  background: var(--red-deep);
}

.hot {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
}

.hot span {
  color: #5a5250;
  font-weight: 600;
}

/* 面包屑 */
.crumb {
  padding: 12px 0 8px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 3px 7px;
}

.crumb .gt {
  color: #c0b3b0;
}

/* 两栏 */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  gap: 16px;
  align-items: start;
  padding-bottom: 10px;
}

.mn,
.sd {
  min-width: 0;
}

/* 首屏 */
.hero {
  padding: 22px 0 18px;
  border-bottom: 3px double var(--red-line);
  margin-bottom: 14px;
}

.hero-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--red);
}

.hero h1 {
  font-size: 30px;
  line-height: 1.4;
  color: #3a1512;
  margin-bottom: 10px;
}

.lede {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 13px;
  color: var(--muted);
}

.stats strong {
  color: var(--red);
  font-family: var(--font-serif);
  font-size: 19px;
  margin-right: 2px;
}

/* 提醒 */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
  padding: 9px 12px;
  background: var(--notice);
  border: 1px solid var(--notice-line);
  font-size: 14px;
  color: #6b5a2a;
}

.notice strong {
  flex: 0 0 auto;
  color: var(--red-deep);
}

/* 面板 */
.pane {
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.pane-h,
.box-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 4px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.pane-h h2,
.box-h h2 {
  font-size: 18px;
  color: var(--red-deep);
}

.pane-h a,
.pane-h span {
  font-size: 13px;
  color: var(--muted);
}

.pane-b {
  padding: 12px;
}

.intro-p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* 版块表 */
table.board,
table.topics {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

table.board td,
table.topics td {
  padding: 9px;
  border-top: 1px dashed var(--line-soft);
  vertical-align: top;
}

table.board tr:first-child td,
table.topics tr:first-child td {
  border-top: 0;
}

td.ic {
  width: 42px;
}

td.ic span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  color: var(--red-deep);
  font-family: var(--font-serif);
  font-size: 15px;
}

td.nm > a {
  font-size: 15px;
  font-weight: 700;
  color: var(--red-deep);
}

td.nm p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

td.ct {
  width: 44px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

td.last {
  width: 220px;
  font-size: 13px;
  line-height: 1.55;
}

td.last a {
  color: #6b5a56;
}

td.tt > a {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
  color: #3a1512;
}

td.tt p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

td.tc {
  width: 98px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* 全部词表 */
.allgrid {
  columns: 2;
  column-gap: 20px;
  padding: 10px 12px 14px;
}

.allgrid li {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
  line-height: 1.55;
}

.allgrid li span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

/* 侧栏 */
.box {
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 12px;
}

.box-h {
  min-height: 36px;
}

.box-h h2 {
  font-size: 16px;
}

.box-b {
  padding: 10px 12px;
}

.box-b p {
  font-size: 14px;
  line-height: 1.8;
  color: #4a4444;
}

.hotlist {
  counter-reset: h;
  padding: 4px 12px 10px;
}

.hotlist li {
  counter-increment: h;
  border-bottom: 1px dashed var(--line-soft);
}

.hotlist li:last-child {
  border-bottom: 0;
}

.hotlist a {
  display: block;
  position: relative;
  padding: 8px 0 8px 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #3a1512;
}

.hotlist a::before {
  content: counter(h);
  position: absolute;
  left: 0;
  top: 9px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 11px;
  color: #fff;
  background: var(--red);
}

.slist {
  padding: 4px 12px 10px;
}

.slist li {
  border-bottom: 1px dashed var(--line-soft);
}

.slist li:last-child {
  border-bottom: 0;
}

.slist a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 0;
  font-size: 14px;
  color: #5a5250;
}

.slist a.cur {
  color: var(--red-deep);
  font-weight: 700;
}

.slist a span:last-child {
  color: var(--muted);
  font-size: 12px;
}

/* 文章 */
.thread {
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 14px;
}

.th-h {
  padding: 16px 18px 13px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.th-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--red);
}

.th-h h1 {
  font-size: 27px;
  line-height: 1.45;
  color: #3a1512;
}

.th-b {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
}

.pls {
  padding: 16px 12px;
  background: var(--cream);
  border-right: 1px solid var(--line-soft);
  text-align: center;
}

.ava {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 9px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 28px;
}

.pls-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--red-deep);
}

.pls-role {
  margin: 1px 0 5px;
  font-size: 12px;
  color: var(--muted);
}

.pls-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.plc {
  padding: 18px 22px 16px;
  min-width: 0;
}

table.fields {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 14px;
}

table.fields th,
table.fields td {
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

table.fields th {
  width: 96px;
  background: var(--cream);
  color: #6b4a45;
  font-weight: 600;
}

.post p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 2;
  color: #2e2a2a;
}

.back {
  margin: 2px 0 16px;
  font-size: 14px;
}

/* 标签页 */
.use-list {
  padding: 8px 14px 12px;
}

.use {
  padding: 11px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.use:last-child {
  border-bottom: 0;
}

.use h3 {
  font-size: 17px;
  color: var(--red-deep);
  margin-bottom: 2px;
}

.use p {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: #4a4444;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 11px;
  border: 1px solid var(--red-line);
  background: #fffdfc;
  color: var(--red-deep);
  font-size: 14px;
}

.chip span {
  color: var(--muted);
  font-size: 12px;
}

.tagnotes {
  padding: 0 14px 12px;
}

.tagnotes p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.75;
  color: #4a4444;
}

.tagnotes strong {
  color: var(--red-deep);
}

.linklist {
  padding: 6px 14px 12px;
}

.linklist li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.linklist li:last-child {
  border-bottom: 0;
}

.linklist a {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: #3a1512;
}

.linklist span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* 筛选 */
.filter {
  padding: 10px 12px;
  border-bottom: 1px dashed var(--line);
}

.filter form {
  display: flex;
  max-width: 520px;
}

.filter input {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d9ccc9;
  border-right: 0;
  font-size: 15px;
}

.filter button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--red-deep);
  background: var(--red);
  color: #fff;
  cursor: pointer;
}

.empty {
  margin: 0;
  padding: 12px;
  font-size: 14px;
  color: var(--muted);
}

/* 文档 */
.doc {
  padding: 20px;
}

.doc h1 {
  font-size: 26px;
  color: #3a1512;
  margin-bottom: 10px;
}

.doc p {
  font-size: 16px;
  line-height: 1.9;
  color: #3f3a3a;
}

/* 页脚 */
.ft {
  margin-top: 8px;
  background: var(--panel);
  border-top: 1px solid var(--red-line);
}

.ft-in {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 2fr;
  gap: 22px;
  padding-top: 20px;
  padding-bottom: 16px;
}

.ft-brand a {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--red-deep);
}

.ft-brand p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: #5a5250;
}

.ft-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ft-nav h2 {
  font-size: 14px;
  color: #5a3a36;
  margin-bottom: 4px;
}

.ft-nav li {
  margin-bottom: 3px;
}

.ft-nav a {
  font-size: 13px;
  color: #5a5250;
}

.ft-copy {
  padding-top: 10px;
  padding-bottom: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.ft-copy p {
  margin: 0;
}

/* 响应式 */
@media (max-width: 920px) {
  .cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .sd {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }

  .ft-in {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  body {
    padding-bottom: 132px;
  }

  .bar-in {
    flex-wrap: wrap;
  }

  .hd-in {
    flex-wrap: wrap;
    gap: 8px;
  }

  .logo-txt {
    font-size: 21px;
  }

  .hd-tag {
    font-size: 12px;
  }

  .sc-in {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }

  .search {
    max-width: none;
  }

  .hero {
    padding: 16px 0 14px;
  }

  .hero h1 {
    font-size: 23px;
  }

  td.last {
    display: none;
  }

  td.ic {
    width: 36px;
  }

  td.ct {
    width: 34px;
  }

  .allgrid {
    columns: 1;
  }

  .sd {
    grid-template-columns: minmax(0, 1fr);
  }

  .th-b {
    grid-template-columns: minmax(0, 1fr);
  }

  .pls {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 10px 12px;
  }

  .ava {
    width: 42px;
    height: 42px;
    margin: 0;
    font-size: 20px;
  }

  .pls-role {
    margin: 0;
  }

  .pls-note {
    display: none;
  }

  .plc {
    padding: 14px 12px;
  }

  .th-h {
    padding: 13px 12px 11px;
  }

  .th-h h1 {
    font-size: 21px;
  }

  .post p {
    font-size: 16px;
    line-height: 1.95;
  }

  table.topics td.tc {
    display: none;
  }

  .ft-nav {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

/* 底部固定条留白 */
body {
  padding-bottom: 150px !important;
}

@media (max-width: 680px) {
  body {
    padding-bottom: 132px !important;
  }
}
