/* ============================================================
   芍绮诗友会 · peontty.cn 中文站
   禅意宋氏美学 —— 全站宋体、纸墨色调、适老化基准
   ============================================================ */

@font-face {
  font-family: 'Peontty Song';
  src: url('../fonts/peontty-song-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Peontty Song';
  src: url('../fonts/peontty-song-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #3a2a2e;          /* 墨色 */
  --primary: #8c4a5e;      /* 芍绛 */
  --primary-deep: #6d3647; /* 深芍 */
  --paper: #fdfaf7;        /* 宣纸 */
  --mist: #f7eef1;         /* 雾粉 */
  --line: #e6d5db;         /* 绢线 */
  --gold: #a98a5b;         /* 泥金（点缀） */
  --text: #40383a;
  --muted: #8f7f84;
  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 2px 14px rgba(90, 45, 60, .07);
}

html { font-size: 18px; }
html.bigfont { font-size: 22px; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Peontty Song', 'Songti SC', 'STSong', 'SimSun', serif;
  font-weight: 400;
  color: var(--text);
  background: var(--paper);
  line-height: 1.95;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); text-decoration: underline; text-underline-offset: 4px; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-weight: 700; color: var(--ink); line-height: 1.5; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; margin: 2.2em 0 .8em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .6em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.2rem; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253, 250, 247, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .55rem;
  font-size: 1.3rem; font-weight: 700; color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .flower { color: var(--primary); font-size: 1.35rem; }
.brand small { font-size: .68rem; font-weight: 400; color: var(--muted); letter-spacing: .18em; }

nav.mainnav { display: flex; gap: .2rem; flex-wrap: wrap; }
nav.mainnav a {
  display: block; padding: .5rem .85rem; border-radius: 10px;
  color: var(--text); font-size: 1.02rem;
}
nav.mainnav a:hover { background: var(--mist); text-decoration: none; color: var(--primary-deep); }
nav.mainnav a.active { color: var(--primary-deep); font-weight: 700; position: relative; }
nav.mainnav a.active::after {
  content: ''; position: absolute; left: .85rem; right: .85rem; bottom: .28rem;
  height: 2px; background: var(--primary); border-radius: 2px;
}

.nav-toggle {
  display: none; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: .45rem .8rem; font-size: 1.2rem;
  font-family: inherit; color: var(--ink); cursor: pointer;
}

.fontswitch {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: .32rem .9rem; font-family: inherit; font-size: .92rem;
  color: var(--primary-deep); cursor: pointer; white-space: nowrap;
}
.fontswitch:hover { background: var(--mist); }

/* ---------- 首页 ---------- */
.hero {
  background:
    radial-gradient(ellipse 90% 70% at 70% 0%, #f9ecef 0%, transparent 60%),
    var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 4.2rem 0 3.6rem;
  text-align: center;
}
.hero .kicker { color: var(--gold); font-size: .95rem; letter-spacing: .4em; margin-bottom: 1rem; }
.hero .verse {
  font-size: 1.75rem; color: var(--ink); line-height: 2.1;
  max-width: 34em; margin: 0 auto .6rem;
}
.hero .verse-src { color: var(--muted); font-size: .95rem; margin-bottom: 1.8rem; }
.hero .verse-src::before { content: '—— '; }
.btn {
  display: inline-block; padding: .78rem 2.1rem; border-radius: 999px;
  font-size: 1.05rem; font-family: inherit; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff !important; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-deep); text-decoration: none; }
.btn-ghost { border: 1px solid var(--primary); color: var(--primary-deep) !important; background: transparent; }
.btn-ghost:hover { background: var(--mist); text-decoration: none; }

.section { padding: 3rem 0; }
.section-title {
  text-align: center; font-size: 1.5rem; margin-bottom: .3rem;
}
.section-title::before, .section-title::after { content: ' ❀ '; color: var(--gold); font-size: 1rem; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 2.2rem; font-size: .95rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.4rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .5rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 22px rgba(90,45,60,.12); text-decoration: none; }
.card .glyph { font-size: 1.7rem; color: var(--primary); }
.card h3 { margin: 0; font-size: 1.18rem; }
.card p { color: var(--muted); font-size: .95rem; line-height: 1.8; }
.card .more { margin-top: auto; color: var(--primary); font-size: .92rem; letter-spacing: .1em; }

/* 本周诗讯条 */
.news-strip {
  background: var(--mist); border-radius: var(--radius);
  padding: 1.6rem 1.8rem; display: flex; gap: 1.4rem; align-items: center;
  flex-wrap: wrap; justify-content: space-between;
}
.news-strip .tag {
  background: var(--primary); color: #fff; border-radius: 8px;
  padding: .15rem .7rem; font-size: .85rem; letter-spacing: .15em;
}
.news-strip .headline { font-size: 1.12rem; color: var(--ink); font-weight: 700; }

/* ---------- 入群引导条（全站） ---------- */
.joinbar {
  background: linear-gradient(135deg, #8c4a5e 0%, #6d3647 100%);
  color: #fff; padding: 2.2rem 0; text-align: center;
}
.joinbar .verse { font-size: 1.25rem; margin-bottom: .4rem; }
.joinbar .small { font-size: .92rem; opacity: .85; margin-bottom: 1.4rem; }
.joinbar .btn { background: #fff; color: var(--primary-deep) !important; font-weight: 700; }
.joinbar .btn:hover { background: var(--mist); text-decoration: none; }

/* ---------- 页脚 ---------- */
footer.site {
  background: var(--ink); color: #cbb9bf; padding: 2.4rem 0 2rem;
  font-size: .88rem; text-align: center; line-height: 2.1;
}
footer.site a { color: #e8ccd5; }
footer.site .icp { margin-top: .4rem; }
footer.site .slogan { color: #9b8a90; font-size: .82rem; letter-spacing: .25em; }

/* ---------- 通用内容元素 ---------- */
.crumb { color: var(--muted); font-size: .9rem; padding: 1.2rem 0 0; }
.crumb a { color: var(--muted); }

.lead { font-size: 1.08rem; color: var(--ink); }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 2rem; box-shadow: var(--shadow); margin-bottom: 1.6rem;
}
.panel h2:first-child, .panel h3:first-child { margin-top: 0; }

.empty {
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #fffdf9, #fbf5f2);
  padding: 2.6rem 2rem; text-align: center; color: var(--muted);
}
.empty .glyph { font-size: 2rem; margin-bottom: .6rem; }
.empty .title { font-size: 1.15rem; color: var(--ink); font-weight: 700; margin-bottom: .3rem; }
.empty .hint { font-size: .92rem; }

.list-clean { list-style: none; }
.list-clean li { padding: .55rem 0; border-bottom: 1px solid #f0e6e9; }
.list-clean li:last-child { border-bottom: 0; }

table.dtable { width: 100%; border-collapse: collapse; background: #fff; }
table.dtable th, table.dtable td {
  border: 1px solid var(--line); padding: .7rem .9rem; text-align: left;
  font-size: .98rem; vertical-align: top;
}
table.dtable th { background: var(--mist); color: var(--ink); font-weight: 700; }

.poem-body {
  font-size: 1.18rem; line-height: 2.3; color: var(--ink);
  text-align: center; margin: 1.4rem 0;
}

.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.2rem; }
.qr-cell {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1rem; text-align: center; box-shadow: var(--shadow);
}
.qr-cell .qr-img {
  width: 150px; height: 150px; margin: 0 auto .7rem; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--mist); color: var(--muted); font-size: .82rem;
  overflow: hidden; border: 1px dashed var(--line);
}
.qr-cell .qr-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.qr-cell .name { font-weight: 700; color: var(--ink); font-size: 1rem; }
.qr-cell .sub { font-size: .85rem; color: var(--muted); }

/* 诗讯周刊 */
.journal {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 3rem 3rem 2.6rem; max-width: 860px; margin: 0 auto;
}
.journal .masthead { text-align: center; border-bottom: 3px double var(--primary); padding-bottom: 1.2rem; margin-bottom: 1.8rem; }
.journal .masthead .paper-title { font-size: 2.1rem; color: var(--ink); letter-spacing: .12em; }
.journal .masthead .meta { color: var(--muted); font-size: .92rem; margin-top: .5rem; }
.journal h2 { font-size: 1.3rem; color: var(--primary-deep); border-left: 4px solid var(--primary); padding-left: .7rem; margin: 2em 0 1em; }
.journal h3 { font-size: 1.08rem; margin: 1.4em 0 .5em; }
.journal p { margin-bottom: .9rem; }
.toc-line { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--line); padding: .4rem 0; }

/* 响应式 */
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  nav.mainnav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: .6rem 1rem 1rem;
  }
  nav.mainnav.open { display: flex; }
  nav.mainnav a { padding: .8rem 1rem; }
  .hero .verse { font-size: 1.35rem; }
  .journal { padding: 2rem 1.3rem; }
  .topbar .wrap { flex-wrap: nowrap; }
  .brand small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
