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

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #faf8f5;
  color: #2c2c2c;
  line-height: 1.7;
  font-size: 16px;
}

a { color: #7b3f00; text-decoration: none; }
a:hover { color: #c0392b; }

/* ── Header ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e8e0d8;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-logo {
  font-size: 20px;
  font-weight: 700;
  color: #7b3f00;
  white-space: nowrap;
}
.search-form {
  flex: 1;
  display: flex;
  max-width: 400px;
}
.search-input {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid #d4c9be;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  background: #faf8f5;
  outline: none;
}
.search-input:focus { border-color: #7b3f00; }
.search-btn {
  padding: 7px 16px;
  background: #7b3f00;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 14px;
}
.search-btn:hover { background: #c0392b; }

/* ── Layout ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ── Daily card ── */
.daily-card {
  background: linear-gradient(135deg, #7b3f00 0%, #c0392b 100%);
  color: #fff;
  border-radius: 12px;
  padding: 32px 36px;
  margin-bottom: 40px;
}
.daily-label {
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 2px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.daily-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.daily-meta {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 20px;
}
.daily-preview {
  font-size: 17px;
  line-height: 2;
  border-left: 3px solid rgba(255,255,255,0.5);
  padding-left: 16px;
  margin-bottom: 20px;
}
.daily-link {
  display: inline-block;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 13px;
}
.daily-link:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ── Section ── */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #7b3f00;
  border-left: 3px solid #7b3f00;
  padding-left: 10px;
  margin-bottom: 20px;
}

/* ── Poem grid ── */
.poem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.poem-card {
  background: #fff;
  border: 1px solid #e8e0d8;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.2s;
}
.poem-card:hover { box-shadow: 0 4px 16px rgba(123,63,0,0.1); }
.poem-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 6px;
  display: block;
}
.poem-card-meta {
  font-size: 13px;
  color: #888;
}

/* ── Hot searches ── */
.hot-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.hot-tag {
  background: #fff;
  border: 1px solid #e8e0d8;
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 13px;
  color: #5c3d2e;
}
.hot-tag:hover { background: #7b3f00; color: #fff; border-color: #7b3f00; }

/* ── Poem header ── */
.poem-header {
  text-align: center;
  margin-bottom: 40px;
}
.poem-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
}
.poem-toggle-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  margin-top: 4px;
}
.toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid #c8a882;
  background: #fff;
  color: #7b3f00;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.toggle-btn:hover { background: #f5ede4; }
.toggle-btn--active {
  background: #7b3f00;
  color: #fff;
  border-color: #7b3f00;
}
.poem-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}
.poem-author-line {
  font-size: 15px;
  color: #888;
}
.poem-author-link { color: #7b3f00; }
.dynasty-badge {
  display: inline-block;
  background: #f5ede4;
  color: #7b3f00;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 10px;
  margin-left: 8px;
}
.poem-body {
  background: #fff;
  border-radius: 10px;
  padding: 40px;
  margin-bottom: 24px;
  text-align: center;
}

/* ── Content sections (fanyi / shangxi) ── */
.content-section {
  background: #fff;
  border-radius: 10px;
  padding: 28px 40px;
  margin-bottom: 20px;
}
.content-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #7b3f00;
  letter-spacing: 2px;
  border-left: 3px solid #7b3f00;
  padding-left: 10px;
  margin-bottom: 16px;
}
.content-section-body {
  font-size: 15px;
  color: #444;
  line-height: 1.9;
}
.content-section-body p { margin-bottom: 10px; }

/* ── Poem paragraphs (orig / fanyi / zhuyi) ── */
.para-orig {
  font-size: 20px;
  line-height: 2.4;
  color: #2c2c2c;
  text-align: center;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.para-orig p { margin: 0; }
.para-divider {
  border-top: 1px dashed #e8e0d8;
  margin: 20px 0;
}

/* 译文：默认隐藏，poem-body.show-fanyi 时显示 */
.para-fanyi {
  display: none;
  font-size: 15px;
  line-height: 1.9;
  color: #8B6914;
  text-align: center;
  margin-bottom: 6px;
}
.poem-body.show-fanyi .para-fanyi { display: block; }

/* 注释：默认隐藏，poem-body.show-zhuyi 时显示 */
.para-zhuyi-block { display: none; }
.poem-body.show-zhuyi .para-zhuyi-block { display: block; }

.para-zhuyi-wrap {
  margin-top: 20px;
  padding: 16px 20px;
  background: #faf8f5;
  border-radius: 8px;
  text-align: left;
}
.para-zhuyi-title {
  font-size: 12px;
  color: #aaa;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.para-zhuyi {
  font-size: 13px;
  line-height: 1.9;
  color: #999;
  margin-bottom: 2px;
}

/* 赏析：默认隐藏 */
.para-shangxi-block { display: none; }

/* ── 注音视图 ── */
#poem-pinyin-view { display: none; }
.poem-pinyin {
  font-size: 20px;
  line-height: 3.2;
  text-align: center;
  letter-spacing: 2px;
  color: #2c2c2c;
}
.poem-pinyin ruby { display: inline-ruby; }
.poem-pinyin rt {
  font-size: 12px;
  color: #999;
  letter-spacing: 0;
}

/* ── Locked section ── */
.locked-section {
  background: #fff;
  border-radius: 10px;
  padding: 32px 40px;
  margin-bottom: 24px;
  text-align: center;
  border: 1px dashed #e8e0d8;
}
.locked-section h3 { font-size: 15px; color: #7b3f00; margin-bottom: 12px; }
.locked-mask {
  font-size: 15px;
  color: #ccc;
  line-height: 2;
  margin-bottom: 16px;
  filter: blur(3px);
  user-select: none;
}
.lock-tip { font-size: 13px; color: #aaa; }

/* ── Poet card ── */
.poet-intro {
  background: #fff;
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 32px;
}
.poet-name {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}
.poet-bio {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  margin-top: 12px;
}

/* ── Search results ── */
.result-list { margin-bottom: 32px; }
.result-item {
  background: #fff;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  border: 1px solid #e8e0d8;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.result-item:hover { box-shadow: 0 2px 8px rgba(123,63,0,0.08); }
.result-title { font-size: 16px; font-weight: 600; color: #2c2c2c; }
.result-meta { font-size: 13px; color: #aaa; margin-top: 2px; }
.result-arrow { color: #ccc; font-size: 18px; }
.no-result { text-align: center; padding: 60px 0; color: #aaa; font-size: 15px; }

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  padding-bottom: 8px;
}
.page-btn {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 40px;
  font-size: 15px;
  border: 1px solid #e0d5cc;
  color: #5c3d2e;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.page-btn:hover { background: #f5ede4; color: #7b3f00; }
.page-btn--active {
  background: #7b3f00;
  color: #fff;
  border-color: #7b3f00;
}
.page-btn--active:hover { background: #c0392b; border-color: #c0392b; color: #fff; }
.page-btn--disabled {
  color: #ccc;
  border-color: #eee;
  background: #fafafa;
  cursor: default;
}
.page-num {
  font-size: 15px;
  color: #aaa;
  min-width: 24px;
  text-align: center;
}

/* ── Quote detail ── */
.quote-detail-card {
  background: #fff;
  border-radius: 10px;
  padding: 36px 40px;
  margin-bottom: 24px;
}
.quote-text {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.8;
  margin-bottom: 16px;
}
.quote-source {
  font-size: 14px;
  color: #888;
  margin-bottom: 28px;
}
.quote-source-link { color: #7b3f00; }
.quote-source-link:hover { color: #c0392b; }
.quote-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 15px;
  color: #444;
  line-height: 1.85;
}
.quote-tag {
  flex-shrink: 0;
  font-size: 11px;
  color: #999;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 2px 6px;
  margin-top: 3px;
  background: #fafafa;
}
.quote-list-item {
  display: block;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}
.quote-list-item:hover { box-shadow: 0 2px 8px rgba(123,63,0,0.08); }

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: #bbb;
  border-top: 1px solid #e8e0d8;
  margin-top: 40px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .daily-card { padding: 24px 20px; }
  .poem-body { padding: 24px 16px; }
  .poem-content { font-size: 17px; }
  .poem-title { font-size: 22px; }
  .poem-grid { grid-template-columns: 1fr 1fr; }
  .header-inner { gap: 12px; }
}
