* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --ink: #1c1b19;
  --ink-2: #4a463f;
  --ink-3: #857e73;
  --paper: #faf7f1;
  --paper-2: #f2ece1;
  --line: #e2d9c9;
  --seal: #a8382c;
  --seal-soft: #c95a4c;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink-2); text-decoration: none; }
a:hover { color: var(--seal); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header */
.hdr {
  display: flex; align-items: center; gap: 24px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 9px; }
.logo-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--seal); color: #fff; border-radius: 4px;
  font-size: 19px; font-weight: 700;
}
.logo-text { font-size: 20px; letter-spacing: 3px; color: var(--ink); font-weight: 600; }
.nav { display: flex; gap: 20px; flex: 1; flex-wrap: wrap; min-width: 0; }
.nav a { font-size: 15.5px; color: var(--ink-2); padding: 2px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a.on, .nav a:hover { color: var(--seal); border-bottom-color: var(--seal); }
.search { display: flex; border: 1px solid var(--line); background: #fff; border-radius: 3px; overflow: hidden; }
.search input { border: 0; outline: 0; padding: 7px 11px; width: 168px; font-family: inherit; font-size: 14px; background: #fff; }
.search button { border: 0; background: var(--seal); color: #fff; padding: 0 14px; cursor: pointer; font-family: inherit; font-size: 14px; }

/* hero */
.hero { padding: 44px 0 30px; text-align: center; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: 33px; letter-spacing: 4px; font-weight: 600; margin-bottom: 14px; }
.hero p { color: var(--ink-3); font-size: 15px; letter-spacing: 1px; }
.hero-stats { display: flex; justify-content: center; gap: 46px; margin-top: 24px; }
.hero-stats b { display: block; font-size: 24px; color: var(--seal); font-weight: 600; }
.hero-stats span { font-size: 13px; color: var(--ink-3); }

/* sections */
.sec { padding: 34px 0 10px; }
.sec-hd { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.sec-hd h2 { font-size: 20px; letter-spacing: 2px; font-weight: 600; }
.sec-hd h2::before { content: ""; display: inline-block; width: 4px; height: 17px; background: var(--seal); margin-right: 9px; vertical-align: -2px; }
.sec-hd a { font-size: 13.5px; color: var(--ink-3); margin-left: auto; }

/* card grids */
.grid { display: grid; gap: 14px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  padding: 16px 17px; transition: .18s;
}
.card:hover { border-color: var(--seal-soft); box-shadow: 0 2px 12px rgba(168,56,44,.08); }
.card h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 6px; letter-spacing: .5px; }
.card .meta { font-size: 13px; color: var(--ink-3); }
.card .ex { font-size: 14px; color: var(--ink-2); margin-top: 8px; line-height: 1.7; }

/* poem list */
.plist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pitem { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 15px 17px; }
.pitem h3 { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.pitem .by { font-size: 13px; color: var(--ink-3); }
.pitem .t { font-size: 14px; color: var(--ink-2); margin-top: 8px; font-style: normal; }

/* poem detail */
.crumbs { font-size: 13.5px; color: var(--ink-3); padding: 18px 0 0; }
.crumbs a { color: var(--ink-3); }
.crumbs span { margin: 0 6px; }
.poem { background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 40px 46px; margin: 22px 0; }
.poem h1 { font-size: 29px; text-align: center; letter-spacing: 3px; font-weight: 600; margin-bottom: 10px; }
.poem .byline { text-align: center; color: var(--ink-3); font-size: 14.5px; margin-bottom: 28px; }
.poem .body { font-size: 19px; line-height: 2.5; text-align: center; letter-spacing: 1.5px; color: var(--ink); }
.poem .body p { margin: 0; }
.poem article { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.poem article h2 { font-size: 17px; margin-bottom: 12px; letter-spacing: 1.5px; color: var(--seal); font-weight: 600; }
.poem article h2::after { content: ""; display: block; width: 28px; height: 2px; background: var(--seal); margin-top: 7px; opacity: .5; }
.poem article p { font-size: 15.5px; line-height: 2; color: var(--ink-2); margin-bottom: 13px; text-indent: 2em; }
.poem article ul { padding-left: 22px; }
.poem article li { font-size: 15px; line-height: 1.95; color: var(--ink-2); margin-bottom: 7px; }
.poem article li a { color: var(--seal); }
.poem-nav {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 30px; padding-top: 20px;
  border-top: 1px solid var(--line); font-size: 14px;
}
.poem-nav a { color: var(--seal); }

/* quote */
.ql { display: grid; gap: 12px; }
.qi { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--seal); border-radius: 3px; padding: 16px 20px; }
.qi .txt { font-size: 17px; letter-spacing: .8px; margin-bottom: 7px; }
.qi .src { font-size: 13px; color: var(--ink-3); }

/* pagination */
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 34px 0 10px; font-size: 14.5px; }
.pager a { border: 1px solid var(--line); background: #fff; padding: 6px 17px; border-radius: 3px; }
.pager a:hover { border-color: var(--seal); color: var(--seal); }

/* footer */
.ftr { border-top: 1px solid var(--line); margin-top: 46px; padding: 28px 0 40px; text-align: center; }
.ftr-links { font-size: 14px; color: var(--ink-3); margin-bottom: 12px; }
.ftr-links a { color: var(--ink-2); margin: 0 4px; }
.ftr-copy, .ftr-icp { font-size: 12.5px; color: var(--ink-3); line-height: 1.9; }

.empty { text-align: center; padding: 60px 0; color: var(--ink-3); }
.tag { display: inline-block; font-size: 12.5px; background: var(--paper-2); color: var(--ink-2); padding: 2px 9px; border-radius: 2px; margin: 0 6px 6px 0; }

@media (max-width: 760px) {
  .hdr { gap: 10px; padding: 14px 0 10px; }
  /* 关键修复：flex:1 的默认 flex-basis 是 0%，窄屏会把每个导航项压成一列单字，
     必须改成 flex-basis:100% 让它独占一行横向排列 */
  .nav {
    order: 3;
    width: 100%;
    flex: 1 0 100%;
    gap: 16px;
    flex-wrap: wrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .nav a { font-size: 15px; white-space: nowrap; flex: 0 0 auto; }
  .search { margin-left: auto; order: 2; }
  .search input { width: 120px; }
  .hdr-user { order: 4; width: 100%; font-size: 13px; }
  .logo-text { font-size: 18px; letter-spacing: 2px; }
  .hero { padding: 30px 0 22px; }
  .hero h1 { font-size: 23px; letter-spacing: 2px; }
  .hero p { font-size: 14px; }
  .hero-stats { gap: 22px; }
  .hero-stats b { font-size: 21px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .plist { grid-template-columns: 1fr; }
  .poem { padding: 24px 18px; }
  .poem h1 { font-size: 22px; letter-spacing: 2px; }
  .poem .body { font-size: 17px; line-height: 2.2; letter-spacing: .5px; }
  .sec { padding: 26px 0 8px; }
  .sec-hd h2 { font-size: 18px; }
}

@media (max-width: 420px) {
  .wrap { padding: 0 14px; }
  .nav { gap: 12px; }
  .nav a { font-size: 14px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .search input { width: 96px; }
}

/* 公告条 */
.notice {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 0; padding: 9px 14px;
  background: #fdf6e3; border: 1px solid #ecd9a8; border-radius: 4px;
  font-size: 14px; color: var(--ink-2);
}
.notice-tag {
  flex: 0 0 auto; font-size: 12px; padding: 1px 7px;
  background: var(--seal); color: #fff; border-radius: 2px; letter-spacing: 1px;
}
.notice-txt { flex: 1; line-height: 1.6; }
.notice-txt a { color: var(--seal); text-decoration: underline; }
.hdr-user { font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.hdr-user:hover { color: var(--seal); }
