/* 小品作品 —— 站点样式
   水墨宣纸风格，全部为本地资源，不依赖任何外部 CDN。
   配色与字号集中在 :root，想换风格改这里即可。 */

:root {
  --paper: #f6f1e6;
  --paper-2: #efe7d8;
  --ink: #231f1c;
  --ink-2: #4d453d;
  --ink-3: #7d736b;
  --red: #a3342c;
  --red-2: #8b2a23;
  --line: rgba(35, 31, 28, 0.14);
  --line-2: rgba(35, 31, 28, 0.24);
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "楷体", "Songti SC", "SimSun", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 12px 34px rgba(60, 46, 32, 0.1);
  --radius: 6px;
  --maxw: 1080px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 560px at 10% -12%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 62%),
    radial-gradient(880px 480px at 100% 0%, rgba(212, 194, 164, 0.34), rgba(212, 194, 164, 0) 58%),
    radial-gradient(760px 700px at 50% 118%, rgba(205, 186, 155, 0.3), rgba(205, 186, 155, 0) 60%);
  background-attachment: fixed;
}

a {
  color: inherit;
}

/* ---------- 顶部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 230, 0.88);
  backdrop-filter: blur(8px);
}

.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.brand-text strong {
  font-family: var(--kai);
  font-size: 20px;
  letter-spacing: 0.18em;
  font-weight: 600;
}

.brand-text em {
  font-style: normal;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.16em;
}

/* 朱红印章：尺寸固定，内里两字上下叠放，避免竖排文字在不同浏览器里错位 */
.seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  padding: 3px;
  border: 2px solid var(--red);
  border-radius: 4px;
  color: var(--red);
  font-family: var(--kai);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0;
  overflow: hidden;
  background: rgba(163, 52, 44, 0.04);
}

.seal > span {
  display: block;
}

.seal-lg {
  width: 62px;
  height: 62px;
  font-size: 22px;
  border-width: 3px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.site-nav a {
  position: relative;
  padding: 6px 12px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 15px;
  letter-spacing: 0.1em;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s ease;
}

.site-nav a:hover {
  color: var(--red);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav a[aria-current="page"] {
  color: var(--red);
}

/* ---------- 首页主视觉 ---------- */

.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 66px 24px 44px;
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 36px;
  align-items: end;
  overflow: hidden;
}

.hero::after {
  content: "詩";
  position: absolute;
  right: -6px;
  top: -26px;
  font-family: var(--kai);
  font-size: clamp(140px, 20vw, 240px);
  line-height: 1;
  color: rgba(35, 31, 28, 0.045);
  pointer-events: none;
  user-select: none;
}

.hero-title {
  position: relative;
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.25;
}

.hero-title .brush {
  display: block;
  width: 168px;
  height: 8px;
  margin-top: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(163, 52, 44, 0.9), rgba(163, 52, 44, 0.28) 62%, rgba(163, 52, 44, 0));
  transform: rotate(-0.6deg);
}

.hero-sub {
  margin: 22px 0 0;
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.34em;
}

.hero-lead {
  max-width: 33em;
  margin: 20px 0 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 2;
}

.hero-verse {
  justify-self: end;
  margin: 0;
  padding: 0 18px 0 0;
  border-right: 2px solid rgba(163, 52, 44, 0.35);
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--kai);
  font-size: 17px;
  letter-spacing: 0.22em;
  color: var(--ink-2);
  max-height: 260px;
}

/* ---------- 通用区块 ---------- */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 24px 60px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--kai);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.section-head .hint {
  color: var(--ink-3);
  font-size: 13.5px;
  letter-spacing: 0.04em;
}

.section-head .rule {
  flex: 1 1 120px;
  height: 1px;
  background: linear-gradient(90deg, var(--line), rgba(35, 31, 28, 0));
}

/* ---------- 板块入口 ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  position: relative;
  display: block;
  padding: 24px 22px 22px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.32));
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(163, 52, 44, 0.35);
  box-shadow: var(--shadow);
}

.card .cn {
  font-family: var(--kai);
  font-size: 21px;
  letter-spacing: 0.1em;
}

.card .cd {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.85;
}

.card .count {
  margin-top: 16px;
  color: var(--red);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.card .arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: var(--red);
  opacity: 0.45;
  transition: transform 0.26s ease, opacity 0.26s ease;
}

.card:hover .arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* ---------- 今日一首 ---------- */

.today {
  position: relative;
  padding: 34px 32px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.28));
}

.today .today-meta {
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.today .today-title {
  margin: 10px 0 0;
  font-family: var(--kai);
  font-size: 25px;
  letter-spacing: 0.1em;
}

.today .today-body {
  margin: 16px 0 0;
  font-family: var(--kai);
  font-size: 19px;
  line-height: 2.15;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.today .today-body p {
  margin: 0;
}

.today-actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 按钮 ---------- */

.btn {
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.1em;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(163, 52, 44, 0.45);
  background: transparent;
  color: var(--red);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: var(--red);
  color: #fdf8f0;
}

.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fdf8f0;
}

/* ---------- 内页标题 ---------- */

.page-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 50px 24px 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-head h1 {
  margin: 0;
  font-family: var(--kai);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: 0.16em;
}

.page-head .desc {
  margin: 10px 0 0;
  color: var(--ink-3);
  font-size: 14px;
  letter-spacing: 0.05em;
}

/* ---------- 筛选栏 ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  padding: 16px 0;
  margin-bottom: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filters .group {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.filters .glabel {
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.chip {
  font-family: inherit;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover {
  border-color: rgba(163, 52, 44, 0.4);
  color: var(--red);
}

.chip[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: #fdf8f0;
}

.select,
.search {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.select {
  min-width: 116px;
}

.search {
  min-width: 208px;
}

.search:focus,
.select:focus {
  outline: none;
  border-color: rgba(163, 52, 44, 0.5);
  background: #fffdf8;
}

.result-hint {
  margin: 0 0 16px;
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.06em;
}

/* ---------- 作品网格 ---------- */

.poem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 16px;
}

.poem-card {
  position: relative;
  overflow: hidden;
  padding: 20px 20px 18px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.32));
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.poem-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--red), rgba(163, 52, 44, 0));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.poem-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.poem-card:hover::before,
.poem-card:focus-visible::before {
  opacity: 1;
}

.poem-card h3 {
  margin: 0;
  font-family: var(--kai);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.poem-card .meta {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.poem-card .excerpt {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.95;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty {
  padding: 48px 0;
  text-align: center;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* ---------- 卷轴详情 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[data-open="true"] {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 22, 16, 0.44);
}

.modal-panel {
  position: relative;
  width: min(700px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  padding: 52px 46px 42px;
  border: 1px solid rgba(163, 52, 44, 0.28);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 26px 64px rgba(40, 30, 20, 0.32);
}

.modal-panel::before,
.modal-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, rgba(163, 52, 44, 0), rgba(163, 52, 44, 0.35), rgba(163, 52, 44, 0));
}

.modal-panel::before {
  top: 0;
}

.modal-panel::after {
  bottom: 0;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.modal-close:hover {
  color: var(--red);
  background: rgba(163, 52, 44, 0.08);
}

.poem-title {
  margin: 0;
  text-align: center;
  font-family: var(--kai);
  font-size: clamp(24px, 3.2vw, 30px);
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.poem-meta {
  margin: 12px 0 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
  letter-spacing: 0.12em;
}

.poem-meta::after {
  content: "";
  display: block;
  width: 46px;
  height: 1px;
  margin: 18px auto 0;
  background: rgba(163, 52, 44, 0.4);
}

.poem-body {
  margin: 26px auto 0;
  max-width: 30em;
  font-family: var(--kai);
  font-size: 19px;
  line-height: 2.3;
  letter-spacing: 0.1em;
}

.poem-body p {
  margin: 0 0 10px;
}

.poem-body p:last-child {
  margin-bottom: 0;
}

.poem-note {
  margin: 30px auto 0;
  max-width: 32em;
  padding: 16px 18px;
  border-left: 3px solid rgba(163, 52, 44, 0.45);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 4px 4px 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.95;
}

.poem-note .note-label {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-family: var(--kai);
  font-size: 13px;
  letter-spacing: 0.22em;
}

/* ---------- 个人诗词（敬请期待） ---------- */

.coming {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px 90px;
}

.coming-frame {
  position: relative;
  padding: 82px 28px 88px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.2));
}

.coming-frame h2 {
  margin: 0 0 20px;
  font-family: var(--kai);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--ink-2);
}

.coming-frame p {
  margin: 0 auto;
  max-width: 30em;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 2.1;
  letter-spacing: 0.08em;
}

.coming-frame .seal {
  margin: 30px auto 0;
}

.coming-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
  margin: 34px auto 0;
}

.coming-lines i {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, rgba(35, 31, 28, 0), rgba(35, 31, 28, 0.16), rgba(35, 31, 28, 0));
}

/* ---------- 页脚 ---------- */

.site-footer {
  margin-top: 30px;
  padding: 26px 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
}

.site-footer a {
  color: var(--ink-3);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--red);
}

.beian {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

/* ---------- 404 ---------- */

.not-found {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 90px 24px 110px;
  text-align: center;
}

.not-found h1 {
  margin: 0 0 16px;
  font-family: var(--kai);
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: 0.24em;
  font-weight: 600;
}

.not-found p {
  margin: 0 0 26px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* ---------- 自适应 ---------- */

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 48px;
  }

  .hero-verse {
    justify-self: start;
    writing-mode: horizontal-tb;
    border-right: none;
    border-left: 2px solid rgba(163, 52, 44, 0.35);
    padding: 0 0 0 14px;
    max-height: none;
    font-size: 16px;
    letter-spacing: 0.14em;
  }

  .hero::after {
    display: none;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .page-head {
    padding-top: 38px;
    align-items: flex-start;
    flex-direction: column-reverse;
  }

  .seal-lg {
    width: 52px;
    height: 52px;
    font-size: 18px;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    padding: 42px 22px 32px;
    max-height: 90vh;
  }

  .search {
    min-width: 160px;
  }
}

@media (max-width: 560px) {
  .site-header .inner {
    padding: 10px 16px;
    gap: 10px;
  }

  .site-nav a {
    padding: 5px 8px;
    font-size: 14px;
    letter-spacing: 0.04em;
  }

  .section,
  .hero,
  .page-head,
  .coming,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .today {
    padding: 26px 20px 24px;
  }

  .poem-grid {
    grid-template-columns: 1fr;
  }

  .poem-body {
    font-size: 18px;
    letter-spacing: 0.06em;
  }
}

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