/* ===================================
   小知识模块 CSS（从 style.css + 备份恢复合并）
=================================== */

/* ===================================
   小知识文学入口卡片（亮色系）
=================================== */
/* ===================================
   小知识文学入口卡片（亮色系）
=================================== */
.knowledge-portal {
  position: relative;
  margin-top: 20px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  min-height: 100px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.knowledge-portal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99,102,241,0.04), rgba(246,211,101,0.06));
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.knowledge-portal:hover::before {
  opacity: 1;
}
.knowledge-portal:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.12);
}

/* 背景装饰层 */
.kp-bg-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.kp-ink-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 120% at 95% 50%, rgba(246, 211, 101, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 100% at 5% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
}
.kp-mist {
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.5;
}
.kp-mist-1 {
  width: 200px; height: 60px;
  background: rgba(246, 211, 101, 0.1);
  top: -10px; right: 20%;
  animation: kpMistDrift1 12s ease-in-out infinite;
}
.kp-mist-2 {
  width: 160px; height: 50px;
  background: rgba(253, 160, 133, 0.08);
  bottom: -8px; left: 15%;
  animation: kpMistDrift2 15s ease-in-out infinite;
}
@keyframes kpMistDrift1 {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(-20px); opacity: 0.7; }
}
@keyframes kpMistDrift2 {
  0%, 100% { transform: translateX(0); opacity: 0.4; }
  50% { transform: translateX(16px); opacity: 0.6; }
}

/* 内容层 */
.kp-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  gap: 16px;
}

.kp-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.kp-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f6d365, #fda085);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(246, 211, 101, 0.3);
}
.knowledge-portal:hover .kp-icon-wrap {
  transform: scale(1.08);
}

.kp-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kp-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: 0.06em;
}
.kp-sub {
  font-size: 0.72rem;
  color: #8b8fa3;
  letter-spacing: 0.1em;
}

.kp-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.kp-quote {
  font-size: 0.85rem;
  color: rgba(180, 130, 50, 0.65);
  letter-spacing: 0.15em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
  max-width: 320px;
  transition: color 0.3s;
}
.knowledge-portal:hover .kp-quote {
  color: rgba(180, 130, 50, 0.9);
}

.kp-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(246, 211, 101, 0.12);
  border: 1px solid rgba(246, 211, 101, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(210, 160, 60, 0.6);
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.knowledge-portal:hover .kp-arrow {
  background: rgba(246, 211, 101, 0.2);
  color: #d4a020;
  transform: translateX(3px);
}

/* 移动端适配 */
@media (max-width: 680px) {
  .knowledge-portal { min-height: 80px; }
  .kp-content {
    padding: 16px 18px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .kp-right {
    width: 100%;
    justify-content: space-between;
  }
  .kp-quote {
    max-width: none;
    flex: 1;
    font-size: 0.78rem;
  }
  .kp-icon-wrap {
    width: 42px; height: 42px;
  }
  .kp-title { font-size: 0.95rem; }
}


/* ===== 小知识页面 v2 ===== */



/* -- Hero 推荐区 -- */

.kn-hero {

  position: relative;

  min-height: 280px;

  display: flex;

  align-items: flex-end;

  padding: 40px 32px 36px;

  overflow: hidden;

  border-radius: 24px;

}



.kn-hero-bg {

  position: absolute;

  inset: 0;

  background: linear-gradient(160deg, #1a1510 0%, #2c241a 40%, #3d2e1a 100%);

  z-index: 0;

}

.kn-hero-bg::before {

  content: '';

  position: absolute;

  inset: 0;

  background:

    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(201,168,105,0.18) 0%, transparent 70%),

    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(180,140,80,0.1) 0%, transparent 60%);

  pointer-events: none;

}

.kn-hero-bg::after {

  content: '';

  position: absolute;

  bottom: 0; left: 0; right: 0;

  height: 1px;

  background: linear-gradient(90deg, transparent, rgba(201,168,105,0.35) 30%, rgba(201,168,105,0.35) 70%, transparent);

}

.kn-hero-content {

  position: relative;

  z-index: 1;

  max-width: 600px;

}

.kn-hero-badge {

  display: inline-block;

  padding: 4px 14px;

  border-radius: 20px;

  font-size: 0.75rem;

  font-weight: 600;

  letter-spacing: 1.5px;

  color: #1a1510;

  background: linear-gradient(135deg, #c9a869, #e0c88a);

  margin-bottom: 16px;

}

.kn-hero-title {

  font-family: 'STZhongsong', 'FZShuTi', 'STKaiti', 'KaiTi', serif;

  font-size: 2.4rem;

  font-weight: 700;

  color: #f5efe6;

  letter-spacing: 8px;

  margin: 0 0 8px;

  line-height: 1.3;

}

.kn-hero-meta {

  font-size: 0.95rem;

  color: rgba(201,168,105,0.8);

  letter-spacing: 2px;

  margin: 0 0 16px;

}

.kn-hero-quote {

  font-family: 'STKaiti', 'KaiTi', serif;

  font-size: 1.05rem;

  color: rgba(245,239,230,0.65);

  line-height: 1.8;

  margin: 0 0 24px;

  letter-spacing: 1.5px;

  max-width: 420px;

}

.kn-hero-btn {

  display: inline-flex;

  align-items: center;

  gap: 8px;

  padding: 10px 24px;

  border: 1.5px solid rgba(201,168,105,0.5);

  border-radius: 24px;

  background: rgba(201,168,105,0.12);

  color: #e0c88a;

  font-size: 0.9rem;

  font-weight: 500;

  letter-spacing: 1px;

  cursor: pointer;

  transition: all 200ms cubic-bezier(0.16,1,0.3,1);

  backdrop-filter: blur(8px);

}

.kn-hero-btn:hover {

  background: rgba(201,168,105,0.22);

  border-color: rgba(201,168,105,0.7);

  transform: translateY(-2px);

  box-shadow: 0 8px 24px rgba(0,0,0,0.3);

}



/* -- 分类标签栏 -- */

.kn-filter-bar {

  display: flex;

  gap: 8px;

  padding: 20px 24px 8px;

  overflow-x: auto;

  scrollbar-width: none;

}

.kn-filter-bar::-webkit-scrollbar { display: none; }

.kn-filter-tag {

  flex-shrink: 0;

  padding: 8px 20px;

  border-radius: 20px;

  border: 1.5px solid var(--border, #e2ddd5);

  background: transparent;

  color: var(--text-mid, #8a8078);

  font-size: 0.85rem;

  font-weight: 500;

  cursor: pointer;

  transition: all 180ms cubic-bezier(0.16,1,0.3,1);

  white-space: nowrap;

}

.kn-filter-tag:hover { border-color: #c9a869; color: #8b6f47; }

.kn-filter-tag.active {

  background: linear-gradient(135deg, #c9a869, #b8944e);

  border-color: transparent;

  color: #fff;

  box-shadow: 0 2px 12px rgba(185,144,72,0.3);

}



/* -- 知识卡片网格 -- */

.kn-grid {

  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));

  gap: 20px;

  padding: 16px 24px 32px;

  max-width: 1280px;

  margin: 0 auto;

}

.kn-card {

  position: relative;

  background: var(--card-bg, #fffdf8);

  border: 1px solid var(--border, #ebe6de);

  border-radius: 16px;

  padding: 24px;

  cursor: pointer;

  transition: all 200ms cubic-bezier(0.16,1,0.3,1);

  overflow: hidden;

}

.kn-card::before {

  content: '';

  position: absolute;

  top: 0; left: 0; right: 0;

  height: 3px;

  background: linear-gradient(90deg, #c9a869, #d4b87a);

  opacity: 0;

  transition: opacity 200ms;

}

.kn-card:hover {

  transform: translateY(-4px);

  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(185,144,72,0.12);

  border-color: rgba(201,168,105,0.35);

}

.kn-card:hover::before { opacity: 1; }

.kn-card-cat {

  display: inline-block;

  padding: 3px 10px;

  border-radius: 12px;

  font-size: 0.72rem;

  font-weight: 600;

  letter-spacing: 0.5px;

  margin-bottom: 12px;

}

.kn-card-cat[data-cat="poetry"]  { background: rgba(201,168,105,0.15); color: #8b6f47; }

.kn-card-cat[data-cat="prose"]   { background: rgba(107,142,128,0.15); color: #5a7d6f; }

.kn-card-cat[data-cat="history"] { background: rgba(156,120,100,0.15); color: #7d5f4c; }

.kn-card-cat[data-cat="science"] { background: rgba(100,130,170,0.15); color: #4a6a8a; }

.kn-card-title {

  font-family: 'STZhongsong', 'STKaiti', 'KaiTi', serif;

  font-size: 1.25rem;

  font-weight: 600;

  color: var(--text-main, #2c241a);

  letter-spacing: 3px;

  margin: 0 0 8px;

  line-height: 1.4;

}

.kn-card-author {

  font-size: 0.85rem;

  color: var(--text-mid, #8a8078);

  margin: 0 0 16px;

  letter-spacing: 1px;

}

.kn-card-excerpt {

  font-family: 'STKaiti', 'KaiTi', serif;

  font-size: 0.9rem;

  color: var(--text-mid, #7a7068);

  line-height: 1.8;

  letter-spacing: 1px;

  display: -webkit-box;

  -webkit-line-clamp: 2;

  -webkit-box-orient: vertical;

  overflow: hidden;

}

.kn-card-footer {

  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-top: 16px;

  padding-top: 12px;

  border-top: 1px solid var(--border, #ebe6de);

}

.kn-card-read {

  font-size: 0.8rem;

  color: #c9a869;

  font-weight: 500;

  display: flex;

  align-items: center;

  gap: 4px;

}

.kn-card-tag {

  font-size: 0.72rem;

  color: var(--text-light, #aaa49c);

  letter-spacing: 0.5px;

}



/* -- 空状态 -- */

.kn-empty { text-align: center; padding: 80px 24px; }

.kn-empty-icon { margin-bottom: 16px; opacity: 0.4; }

.kn-empty-title { font-size: 1.1rem; font-weight: 600; color: var(--text-mid, #8a8078); margin-bottom: 8px; }

.kn-empty-sub { font-size: 0.88rem; color: var(--text-light, #b0a89e); }



/* -- 详情弹窗 -- */

.kn-detail-overlay { z-index: 1100; }

.kn-detail-modal {

  position: relative;

  width: 92%;

  max-width: 720px;

  max-height: 88vh;

  background: var(--card-bg, #fffdf8);

  border-radius: 20px;

  overflow: hidden;

  display: flex;

  flex-direction: column;

  box-shadow: 0 24px 80px rgba(0,0,0,0.2);

  animation: knDetailIn 350ms cubic-bezier(0.16,1,0.3,1);

}

@keyframes knDetailIn {

  from { opacity: 0; transform: translateY(24px) scale(0.97); }

  to   { opacity: 1; transform: translateY(0) scale(1); }

}

.kn-detail-close {

  position: absolute;

  top: 16px; right: 16px;

  z-index: 20;

  width: 36px; height: 36px;

  border-radius: 50%;

  border: none;

  background: rgba(255,255,255,0.15);

  backdrop-filter: blur(8px);

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  transition: all 180ms;

  color: rgba(255,255,255,0.8);

}

.kn-detail-close:hover { background: rgba(255,255,255,0.25); transform: scale(1.08); }

.kn-detail-scroll {

  flex: 1;

  overflow-y: auto;

  overscroll-behavior: contain;

}

.kn-detail-header {

  padding: 48px 40px 32px;

  background: linear-gradient(160deg, #1a1510 0%, #2c241a 40%, #3d2e1a 100%);

  color: #f5efe6;

  position: relative;

}

.kn-detail-header::after {

  content: '';

  position: absolute;

  bottom: 0; left: 0; right: 0;

  height: 1px;

  background: linear-gradient(90deg, transparent, rgba(201,168,105,0.3) 30%, rgba(201,168,105,0.3) 70%, transparent);

}

.kn-detail-cat-badge {

  display: inline-block;

  padding: 4px 14px;

  border-radius: 16px;

  font-size: 0.72rem;

  font-weight: 600;

  letter-spacing: 1px;

  background: rgba(201,168,105,0.2);

  color: #e0c88a;

  margin-bottom: 16px;

}

.kn-detail-title {

  font-family: 'STZhongsong', 'FZShuTi', 'STKaiti', 'KaiTi', serif;

  font-size: 2rem;

  font-weight: 700;

  letter-spacing: 8px;

  margin: 0 0 8px;

  line-height: 1.3;

}

.kn-detail-author {

  font-size: 0.95rem;

  color: rgba(201,168,105,0.8);

  letter-spacing: 2px;

  margin: 0;

}

.kn-detail-illustration { width: 100%; position: relative; overflow: hidden; max-height: 360px; }

.kn-detail-illustration img { width: 100%; height: auto; max-height: 360px; object-fit: cover; display: block; }

.kn-detail-illustration-caption {

  position: absolute;

  bottom: 0; left: 0; right: 0;

  padding: 24px 20px 12px;

  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);

  font-family: 'STKaiti', 'KaiTi', serif;

  font-size: 0.85rem;

  color: rgba(255,255,255,0.8);

  text-align: center;

  letter-spacing: 2px;

}

.kn-detail-poem {

  padding: 40px;

  text-align: center;

  font-family: 'STZhongsong', 'FZShuTi', 'STKaiti', 'KaiTi', serif;

}

.kn-detail-poem-content {

  max-width: 560px;

  margin: 0 auto;

  display: flex;

  flex-direction: column;

  gap: 8px;

}

.kn-detail-poem .poem-sentence {

  margin: 0 auto;

  line-height: 2.4;

  text-align: center;

  display: block;

  width: fit-content;

  max-width: 100%;

  font-size: 1.2rem;

  color: #3d3228;

  letter-spacing: 4px;

  transition: color 200ms;

}

.kn-detail-poem .poem-sentence:hover { color: #8b6f47; }

.kn-detail-poem .poem-sentence-inner { display: inline; word-break: keep-all; overflow-wrap: normal; }

.kn-detail-poem .poem-segment { display: inline; white-space: nowrap; }



/* 散文/文章模式 */

.kn-detail-poem.prose-mode {

  text-align: left;

  padding: 28px 36px;

}

.kn-detail-poem.prose-mode .kn-detail-poem-content {

  max-width: 680px;

  gap: 0;

}

.kn-detail-poem.prose-mode .prose-paragraph {

  text-indent: 2em;

  line-height: 2;

  font-size: 1.05rem;

  color: #3d3228;

  letter-spacing: 1px;

  margin: 0 0 12px;

}



/* 详情操作 */

.kn-detail-actions {

  display: flex;

  gap: 12px;

  padding: 0 40px;

  justify-content: center;

}

.kn-detail-action-btn {

  padding: 10px 28px;

  border-radius: 24px;

  border: 1.5px solid var(--border, #e2ddd5);

  background: transparent;

  color: var(--text-mid, #8a8078);

  font-size: 0.88rem;

  font-weight: 500;

  cursor: pointer;

  transition: all 180ms;

  display: flex;

  align-items: center;

  gap: 6px;

}

.kn-detail-action-btn:hover { border-color: #c9a869; color: #8b6f47; background: rgba(201,168,105,0.06); }

.kn-detail-action-btn.active { background: rgba(201,168,105,0.12); border-color: #c9a869; color: #8b6f47; }



/* 释义区域 */

.kn-detail-explanation {

  padding: 0 40px 40px;

  display: none;

  animation: knFadeIn 350ms cubic-bezier(0.16,1,0.3,1);

}

.kn-detail-explanation.show { display: block; }

@keyframes knFadeIn {

  from { opacity: 0; transform: translateY(-12px); }

  to   { opacity: 1; transform: translateY(0); }

}

.kn-detail-explanation .kn-section-title {

  font-size: 1.05rem;

  font-weight: 600;

  color: #8b6f47;

  margin: 32px 0 16px;

  display: flex;

  align-items: center;

  gap: 8px;

  letter-spacing: 1px;

}

.kn-detail-explanation .kn-section-title:first-child { margin-top: 8px; }

.kn-detail-explanation p {

  font-size: 0.95rem;

  color: var(--text-mid, #6a6058);

  line-height: 1.9;

  text-indent: 2em;

  text-align: justify;

  margin: 0 0 16px;

}

.kn-verse-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

.kn-verse-item {

  padding: 16px 20px;

  background: rgba(201,168,105,0.05);

  border-radius: 12px;

  border-left: 3px solid #c9a869;

  transition: all 180ms;

}

.kn-verse-item:hover { background: rgba(201,168,105,0.1); transform: translateX(4px); }

.kn-verse-original {

  font-family: 'STKaiti', 'KaiTi', serif;

  font-size: 1.05rem;

  color: #8b6f47;

  letter-spacing: 2px;

  line-height: 2.2;

  margin-bottom: 8px;

  font-weight: 500;

}

.kn-verse-translation {

  font-size: 0.88rem;

  color: var(--text-mid, #7a7068);

  line-height: 1.7;

  padding-left: 16px;

  border-left: 2px solid rgba(201,168,105,0.2);

}



/* -- 响应式 -- */

@media (max-width: 680px) {

  .kn-hero { min-height: 240px; padding: 32px 20px 28px; border-radius: 20px; }

  .kn-hero-title { font-size: 1.8rem; letter-spacing: 5px; }

  .kn-hero-quote { font-size: 0.92rem; max-width: 100%; }

  .kn-filter-bar { padding: 16px 16px 8px; }

  .kn-grid { grid-template-columns: 1fr; padding: 12px 16px 24px; gap: 16px; }

  .kn-card { padding: 20px; }

  .kn-detail-modal { width: 100%; max-height: 95vh; border-radius: 16px 16px 0 0; }

  .kn-detail-header { padding: 40px 24px 24px; }

  .kn-detail-title { font-size: 1.6rem; letter-spacing: 5px; }

  .kn-detail-poem { padding: 28px 20px; }

  .kn-detail-poem .poem-sentence { font-size: 1rem; letter-spacing: 1.5px; }

  .kn-detail-poem.prose-mode { padding: 20px 18px; }

  .kn-detail-poem.prose-mode .prose-paragraph { font-size: 0.95rem; line-height: 1.9; margin-bottom: 10px; }

  .kn-detail-actions { padding: 0 20px; flex-wrap: wrap; }

  .kn-detail-explanation { padding: 0 20px 28px; }

  .kn-detail-illustration { max-height: 240px; }

  .kn-detail-illustration img { max-height: 240px; }

}

/* ===================================

   诗人浏览模块

=================================== */



/* ---- 二级标签栏 ---- */

.kn-sub-filter-bar {

  display: flex;

  align-items: center;

  gap: 4px;

  padding: 0 24px;

  margin: -2px 0 16px;

  border-bottom: 1px solid rgba(99,102,241,.08);

}

.kn-sub-tag {

  padding: 4px 12px 6px;

  border-radius: 0;

  border: none;

  border-bottom: 2px solid transparent;

  background: transparent;

  color: #94a3b8;

  font-size: .8rem;

  font-weight: 500;

  cursor: pointer;

  transition: all .25s cubic-bezier(.16,1,.3,1);

  letter-spacing: .3px;

}

.kn-sub-tag:hover {

  border-bottom-color: rgba(99,102,241,.4);

  color: #6366f1;

  background: transparent;

}

.kn-sub-tag.active {

  background: transparent;

  color: #6366f1;

  border-bottom-color: #6366f1;

  box-shadow: none;

  font-weight: 600;

}



/* ---- 诗人卡片网格 ---- */

.kn-poets-grid {

  display: grid;

  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));

  gap: 20px;

  padding: 0 24px 32px;

  max-width: 1280px;

  margin: 0 auto;

}

.kn-poet-card {

  position: relative;

  background: #fff;

  border-radius: 16px;

  padding: 28px 20px 22px;

  text-align: center;

  cursor: pointer;

  border: 1px solid rgba(99,102,241,.08);

  box-shadow: 0 1px 3px rgba(0,0,0,.04);

  transition: all .3s cubic-bezier(.16,1,.3,1);

  overflow: hidden;

}

.kn-poet-card::before {

  content: '';

  position: absolute;

  top: 0; left: 0; right: 0;

  height: 4px;

  background: linear-gradient(90deg,#6366f1,#a5b4fc);

  opacity: 0;

  transition: opacity .3s cubic-bezier(.16,1,.3,1);

}

.kn-poet-card:hover {

  transform: translateY(-4px);

  box-shadow: 0 8px 28px rgba(99,102,241,.12);

  border-color: rgba(99,102,241,.18);

}

.kn-poet-card:hover::before {

  opacity: 1;

}



/* ---- 诗人头像 ---- */

.kn-poet-avatar {

  width: 88px;

  height: 88px;

  margin: 0 auto 14px;

  border-radius: 50%;

  overflow: hidden;

  position: relative;

  box-shadow: 0 2px 12px rgba(99,102,241,.12);

}

.kn-poet-avatar::after {

  content: '';

  position: absolute;

  inset: -3px;

  border-radius: 50%;

  border: 2px solid transparent;

  background: conic-gradient(from 0deg, #6366f1, #a5b4fc, #c7d2fe, #6366f1) border-box;

  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);

  mask-composite: exclude;

  -webkit-mask-composite: xor;

  opacity: 0;

  transition: opacity .35s cubic-bezier(.16,1,.3,1);

}

.kn-poet-card:hover .kn-poet-avatar::after {

  opacity: 1;

}

.kn-poet-avatar img {

  width: 100%;

  height: 100%;

  object-fit: cover;

  display: block;

}



/* ---- 诗人卡片信息 ---- */

.kn-poet-name {

  font-size: 1.1rem;

  font-weight: 700;

  color: #1e293b;

  letter-spacing: 2px;

  margin-bottom: 4px;

}

.kn-poet-meta {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 6px;

  margin-bottom: 8px;

}

.kn-poet-dynasty {

  font-size: .78rem;

  color: #6366f1;

  font-weight: 500;

  background: rgba(99,102,241,.06);

  padding: 2px 10px;

  border-radius: 10px;

}

.kn-poet-epithet {

  font-size: .78rem;

  color: #94a3b8;

  font-weight: 500;

}

.kn-poet-signature {

  font-size: .8rem;

  color: #94a3b8;

  line-height: 1.5;

  margin-top: 6px;

  font-style: italic;

  display: -webkit-box;

  -webkit-line-clamp: 2;

  -webkit-box-orient: vertical;

  overflow: hidden;

}

.kn-poet-works-count {

  margin-top: 10px;

  font-size: .75rem;

  color: #a5b4fc;

  font-weight: 500;

}

.kn-poet-works-count {

  cursor: pointer;

  transition: all .25s cubic-bezier(.16,1,.3,1);

  border-radius: 8px;

  padding: 4px 10px;

  margin-left: -10px;

  margin-right: -10px;

}

.kn-poet-works-count:hover {

  background: rgba(99,102,241,.06);

  color: #6366f1;

}

.kn-poet-avatar {

  cursor: pointer;

}

.kn-poet-avatar:hover {

  box-shadow: 0 4px 16px rgba(99,102,241,.22);

}



/* ---- 诗人作品筛选返回栏 ---- */

.kn-poet-filter-header {

  grid-column: 1 / -1;

  display: flex;

  align-items: center;

  gap: 12px;

  padding: 4px 0 12px;

}

.kn-poet-back-btn {

  display: inline-flex;

  align-items: center;

  gap: 4px;

  padding: 6px 14px;

  border-radius: 10px;

  border: 1.5px solid rgba(99,102,241,.15);

  background: transparent;

  color: #6366f1;

  font-size: .85rem;

  font-weight: 500;

  cursor: pointer;

  transition: all .25s cubic-bezier(.16,1,.3,1);

}

.kn-poet-back-btn:hover {

  background: rgba(99,102,241,.06);

  border-color: rgba(99,102,241,.3);

}

.kn-poet-filter-label {

  font-size: .9rem;

  color: #475569;

  font-weight: 600;

  letter-spacing: .5px;

}





/* ---- 诗人详情弹窗 ---- */

.poet-detail-modal {

  max-width: 640px;

}

.poet-detail-modal .kn-detail-close {

  background: rgba(0,0,0,0.06);

  color: #64748b;

  border: 1px solid rgba(0,0,0,0.08);

  backdrop-filter: blur(8px);

}

.poet-detail-modal .kn-detail-close:hover {

  background: rgba(0,0,0,0.12);

  color: #334155;

  transform: scale(1.08);

}

.poet-detail-header {

  text-align: center;

  padding: 48px 32px 28px;

  background: linear-gradient(180deg, rgba(99,102,241,.06) 0%, transparent 100%);

  position: relative;

}

.poet-detail-portrait {

  width: 120px;

  height: 120px;

  border-radius: 50%;

  overflow: hidden;

  margin: 0 auto 18px;

  box-shadow: 0 4px 20px rgba(99,102,241,.18);

  border: 3px solid #fff;

}

.poet-detail-portrait img {

  width: 100%;

  height: 100%;

  object-fit: cover;

  display: block;

}

.poet-detail-name {

  font-size: 1.8rem;

  font-weight: 800;

  color: #1e293b;

  letter-spacing: 4px;

  margin-bottom: 4px;

}

.poet-detail-courtesy {

  font-size: .9rem;

  color: #94a3b8;

  margin-bottom: 12px;

}

.poet-detail-tags {

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  flex-wrap: wrap;

}

.poet-detail-tag {

  font-size: .78rem;

  padding: 3px 12px;

  border-radius: 10px;

  background: rgba(99,102,241,.06);

  color: #6366f1;

  font-weight: 500;

}

.poet-detail-tag.dynasty {

  background: rgba(99,102,241,.10);

}

.poet-detail-tag.years {

  background: rgba(148,163,184,.08);

  color: #64748b;

}



/* ---- 诗人详情正文 ---- */

.poet-detail-body {

  padding: 24px 32px 32px;

}

.poet-detail-section {

  margin-bottom: 24px;

}

.poet-detail-section:last-child {

  margin-bottom: 0;

}

.poet-detail-section-title {

  font-size: .9rem;

  font-weight: 700;

  color: #6366f1;

  margin-bottom: 10px;

  padding-left: 12px;

  border-left: 3px solid #6366f1;

  letter-spacing: 1px;

}

.poet-detail-text {

  font-size: .92rem;

  color: #475569;

  line-height: 1.85;

  text-align: justify;

}



/* ---- 诗人代表作品列表 ---- */

.poet-works-grid {

  display: flex;

  flex-wrap: wrap;

  gap: 10px;

}

.poet-work-item {

  padding: 8px 16px;

  background: rgba(99,102,241,.04);

  border: 1px solid rgba(99,102,241,.1);

  border-radius: 10px;

  font-size: .85rem;

  color: #475569;

  cursor: pointer;

  transition: all .25s cubic-bezier(.16,1,.3,1);

}

.poet-work-item:hover {

  background: rgba(99,102,241,.1);

  border-color: rgba(99,102,241,.25);

  color: #6366f1;

}



/* ---- 诗人模块响应式 ---- */

@media (max-width: 900px) {

  .kn-poets-grid {

    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));

    gap: 16px;

    padding: 0 16px 28px;

  }

  .kn-poet-avatar {

    width: 76px;

    height: 76px;

  }

}

@media (max-width: 680px) {

  .kn-sub-filter-bar {

    padding: 0 16px;

  }

  .kn-poets-grid {

    grid-template-columns: repeat(2, 1fr);

    gap: 12px;

    padding: 0 12px 24px;

  }

  .kn-poet-card {

    padding: 22px 14px 18px;

    border-radius: 12px;

  }

  .kn-poet-avatar {

    width: 64px;

    height: 64px;

  }

  .kn-poet-name {

    font-size: 1rem;

  }

  .poet-detail-header {

    padding: 36px 20px 22px;

  }

  .poet-detail-portrait {

    width: 96px;

    height: 96px;

  }

  .poet-detail-name {

    font-size: 1.5rem;

    letter-spacing: 3px;

  }

  .poet-detail-body {

    padding: 20px 20px 28px;

  }

}



/* prefers-reduced-motion for poet module */

@media (prefers-reduced-motion: reduce) {

  .kn-poet-card,

  .kn-poet-card::before,

  .kn-poet-avatar::after,

  .kn-sub-tag,

  .poet-work-item {

    transition-duration: 0.01ms !important;

  }

  .kn-poet-card:hover {

    transform: none;

  }

}







/* ===================================

   无障碍：减弱动画偏好

=================================== */

@media (prefers-reduced-motion: reduce) {

  *,

  *::before,

  *::after {

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

    scroll-behavior: auto !important;

  }

  .home-banner canvas {

    display: none;

  }

  .geo-circle,

  .geo-line,

  .geo-square {

    animation: none !important;

    opacity: 0.3;

  }

}

/* ---- Poet portrait full-screen viewer ---- */

.poet-portrait-viewer {

  position: fixed;

  inset: 0;

  z-index: 2000;

  display: flex;

  align-items: center;

  justify-content: center;

  flex-direction: column;

  gap: 16px;

  opacity: 0;

  pointer-events: none;

  transition: opacity .3s cubic-bezier(.16,1,.3,1);

}

.poet-portrait-viewer.open {

  opacity: 1;

  pointer-events: auto;

}

.poet-portrait-viewer-backdrop {

  position: absolute;

  inset: 0;

  background: rgba(0,0,0,.75);

  backdrop-filter: blur(12px);

  -webkit-backdrop-filter: blur(12px);

}

.poet-portrait-viewer-body {

  position: relative;

  z-index: 1;

  display: flex;

  flex-direction: column;

  align-items: center;

  gap: 14px;

  transform: scale(.9);

  transition: transform .3s cubic-bezier(.16,1,.3,1);

}

.poet-portrait-viewer.open .poet-portrait-viewer-body {

  transform: scale(1);

}

.poet-portrait-viewer-img {

  width: 280px;

  height: 280px;

  border-radius: 50%;

  object-fit: cover;

  box-shadow: 0 8px 40px rgba(0,0,0,.4);

  border: 4px solid rgba(255,255,255,.25);

}

.poet-portrait-viewer-name {

  color: #fff;

  font-size: 1.2rem;

  font-weight: 600;

  letter-spacing: 1px;

  text-shadow: 0 2px 8px rgba(0,0,0,.4);

}

@media (max-width: 680px) {

  .poet-portrait-viewer-img {

    width: 220px;

    height: 220px;

  }

}

/* ---- pinyin ruby annotation ---- */

.kn-verse-original ruby {

  ruby-align: center;

}

.kn-verse-original rt {

  font-family: -apple-system, 'Segoe UI', sans-serif;

  font-size: 0.55em;

  font-weight: 400;

  color: #b08d57;

  letter-spacing: 0;

  opacity: 0.85;

  line-height: 1;

  padding: 0 1px;

}

.kn-verse-original rp {

  display: none;

}



/* ===================================

   朝代时间轴模块

=================================== */



/* ---- 时间轴头部 ---- */

.tl-header {

  padding: 48px 40px 36px;

  background: linear-gradient(160deg, #0f1419 0%, #1a2332 40%, #1e2d3d 100%);

  color: #e8e2d8;

  text-align: center;

  position: relative;

  overflow: hidden;

}

.tl-header::before {

  content: '';

  position: absolute;

  top: -40%; left: -20%;

  width: 140%; height: 140%;

  background: radial-gradient(ellipse at 30% 50%, rgba(201,168,105,0.06) 0%, transparent 60%),

              radial-gradient(ellipse at 70% 50%, rgba(65,105,225,0.04) 0%, transparent 60%);

  pointer-events: none;

}

.tl-header-badge {

  display: inline-block;

  padding: 4px 16px;

  border-radius: 16px;

  font-size: 0.72rem;

  font-weight: 600;

  letter-spacing: 2px;

  background: rgba(201,168,105,0.15);

  color: #c9a869;

  margin-bottom: 16px;

  position: relative;

}

.tl-header-title {

  font-family: 'STZhongsong', 'FZShuTi', 'STKaiti', 'KaiTi', serif;

  font-size: 2.2rem;

  font-weight: 700;

  letter-spacing: 10px;

  margin: 0 0 12px;

  line-height: 1.3;

  position: relative;

}

.tl-header-desc {

  font-size: 0.92rem;

  color: rgba(201,168,105,0.7);

  letter-spacing: 1px;

  line-height: 1.8;

  max-width: 520px;

  margin: 0 auto;

  position: relative;

}



/* ---- 时间轴容器 ---- */

.tl-container {

  position: relative;

  padding: 40px 20px 60px;

  max-width: 800px;

  margin: 0 auto;

}

.tl-line {

  position: absolute;

  left: 50%;

  top: 0;

  bottom: 0;

  width: 2px;

  background: linear-gradient(to bottom, transparent, rgba(201,168,105,0.25) 5%, rgba(201,168,105,0.25) 95%, transparent);

  transform: translateX(-50%);

}



/* ---- 时间轴条目 ---- */

.tl-item {

  position: relative;

  display: flex;

  align-items: flex-start;

  margin-bottom: 16px;

  min-height: 80px;

}

.tl-node {

  position: absolute;

  left: 50%;

  top: 24px;

  width: 14px;

  height: 14px;

  border-radius: 50%;

  transform: translateX(-50%);

  z-index: 2;

  box-shadow: 0 0 0 4px rgba(255,253,248,0.9), 0 0 12px rgba(201,168,105,0.3);

  transition: transform 200ms cubic-bezier(0.16,1,0.3,1), box-shadow 200ms;

}

.tl-item:hover .tl-node {

  transform: translateX(-50%) scale(1.3);

  box-shadow: 0 0 0 6px rgba(255,253,248,0.9), 0 0 20px rgba(201,168,105,0.5);

}



/* 左右布局 */

.tl-left .tl-card { margin-right: calc(50% + 28px); margin-left: 0; }

.tl-right .tl-card { margin-left: calc(50% + 28px); margin-right: 0; }



/* ---- 时间轴卡片 ---- */

.tl-card {

  background: var(--card-bg, #fffdf8);

  border-radius: 16px;

  padding: 24px;

  cursor: pointer;

  transition: all 250ms cubic-bezier(0.16,1,0.3,1);

  box-shadow: 0 2px 12px rgba(0,0,0,0.04);

  border: 1px solid rgba(201,168,105,0.1);

  position: relative;

  overflow: hidden;

}

.tl-card::before {

  content: '';

  position: absolute;

  top: 0; left: 0;

  width: 4px;

  height: 100%;

  background: var(--dynasty-color, #c9a869);

  opacity: 0.6;

  transition: opacity 200ms, width 200ms;

}

.tl-card:hover {

  transform: translateY(-4px);

  box-shadow: 0 12px 40px rgba(0,0,0,0.08);

  border-color: rgba(201,168,105,0.25);

}

.tl-card:hover::before {

  opacity: 1;

  width: 5px;

}

.tl-card-era {

  font-size: 0.75rem;

  font-weight: 600;

  color: var(--dynasty-color, #8b6f47);

  letter-spacing: 1px;

  margin-bottom: 6px;

  font-variant-numeric: tabular-nums;

}

.tl-card-name {

  font-family: 'STZhongsong', 'FZShuTi', 'STKaiti', 'KaiTi', serif;

  font-size: 1.8rem;

  font-weight: 700;

  color: #2d2520;

  letter-spacing: 6px;

  margin-bottom: 4px;

  line-height: 1.2;

}

.tl-card-capital {

  font-size: 0.78rem;

  color: var(--text-light, #a09890);

  margin-bottom: 10px;

  letter-spacing: 0.5px;

}

.tl-card-summary {

  font-size: 0.88rem;

  color: var(--text-mid, #6a6058);

  line-height: 1.75;

  margin: 0 0 12px;

  display: -webkit-box;

  -webkit-line-clamp: 3;

  -webkit-box-orient: vertical;

  overflow: hidden;

}

.tl-card-milestones {

  display: flex;

  flex-wrap: wrap;

  gap: 6px;

  margin-bottom: 12px;

}

.tl-milestone-tag {

  display: inline-block;

  padding: 3px 10px;

  border-radius: 10px;

  font-size: 0.7rem;

  background: rgba(201,168,105,0.08);

  color: #8b6f47;

  letter-spacing: 0.5px;

}

.tl-card-action {

  display: flex;

  align-items: center;

  gap: 4px;

  font-size: 0.8rem;

  color: var(--dynasty-color, #8b6f47);

  font-weight: 500;

  opacity: 0.7;

  transition: opacity 200ms;

}

.tl-card:hover .tl-card-action { opacity: 1; }



/* ---- 朝代详情弹窗覆盖层 ---- */

.dynasty-modal-overlay {

  position: fixed;

  inset: 0;

  z-index: 1100;

  background: rgba(15,20,25,0.6);

  backdrop-filter: blur(6px);

  opacity: 0;

  transition: opacity 300ms cubic-bezier(0.16,1,0.3,1);

  display: flex;

  align-items: flex-start;

  justify-content: center;

}

.dynasty-modal-overlay.open { opacity: 1; }

.dynasty-modal-overlay.closing { opacity: 0; }

.dynasty-modal-scroll {

  width: 100%;

  max-width: 760px;

  max-height: 100vh;

  overflow-y: auto;

  -webkit-overflow-scrolling: touch;

  padding: 48px 16px;

}

.tl-detail-card {

  margin: 0 auto;

  max-width: 720px;

  padding: 0 0 40px;

  position: relative;

  background: var(--card-bg, #fffdf8);

  border-radius: 20px;

  box-shadow: 0 24px 80px rgba(0,0,0,0.18);

  transform: translateY(24px);

  opacity: 0;

  animation: tlDetailIn 400ms cubic-bezier(0.16,1,0.3,1) forwards;

  overflow: hidden;

}

.dynasty-modal-overlay.closing .tl-detail-card {

  animation: tlDetailOut 250ms cubic-bezier(0.16,1,0.3,1) forwards;

}

@keyframes tlDetailIn {

  from { opacity: 0; transform: translateY(24px); }

  to   { opacity: 1; transform: translateY(0); }

}

@keyframes tlDetailOut {

  from { opacity: 1; transform: translateY(0); }

  to   { opacity: 0; transform: translateY(16px); }

}

.tl-detail-close {

  position: absolute;

  top: 16px;

  right: 16px;

  width: 36px; height: 36px;

  border-radius: 50%;

  border: 1px solid rgba(0,0,0,0.08);

  background: rgba(255,255,255,0.85);

  backdrop-filter: blur(8px);

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  transition: all 180ms;

  color: #3d3228;

  z-index: 5;

}

.tl-detail-close:hover { background: rgba(0,0,0,0.06); transform: scale(1.08); }



/* 详情头部 */

.tl-detail-header {

  display: flex;

  align-items: center;

  gap: 24px;

  padding: 32px 32px 28px;

  border-radius: 0;

  margin-bottom: 0;

  position: relative;

}

.tl-detail-dynasty-char {

  font-family: 'STZhongsong', 'FZShuTi', 'STKaiti', 'KaiTi', serif;

  font-size: 4rem;

  font-weight: 700;

  line-height: 1;

  opacity: 0.25;

  min-width: 80px;

  text-align: center;

  letter-spacing: 4px;

}

.tl-detail-meta { flex: 1; }

.tl-detail-title {

  font-family: 'STZhongsong', 'FZShuTi', 'STKaiti', 'KaiTi', serif;

  font-size: 1.5rem;

  font-weight: 700;

  color: #2d2520;

  margin: 0 0 6px;

  letter-spacing: 4px;

}

.tl-detail-period {

  font-size: 0.88rem;

  color: var(--dynasty-color, #8b6f47);

  font-weight: 600;

  margin-bottom: 8px;

  font-variant-numeric: tabular-nums;

}

.tl-detail-extra {

  display: flex;

  gap: 16px;

  font-size: 0.8rem;

  color: var(--text-light, #a09890);

}

.tl-detail-summary {

  font-size: 0.92rem;

  color: var(--text-mid, #6a6058);

  line-height: 1.85;

  margin: 0 0 28px;

  padding: 20px 28px 0;

}



/* 详情分区 */

.tl-detail-section {

  margin-bottom: 28px;

  padding: 0 20px;

}

.tl-detail-section-title {

  display: flex;

  align-items: center;

  gap: 8px;

  font-size: 1rem;

  font-weight: 600;

  color: #3d3228;

  margin-bottom: 16px;

  letter-spacing: 1px;

  padding: 0 8px;

}

.tl-emperor-hint {

  font-size: 0.72rem;

  font-weight: 400;

  color: var(--text-light, #a09890);

  letter-spacing: 0;

}



/* 里程碑列表 */

.tl-detail-milestones {

  padding: 0 8px;

}

.tl-detail-milestone {

  display: flex;

  align-items: flex-start;

  gap: 12px;

  padding: 10px 0;

  border-bottom: 1px solid rgba(201,168,105,0.08);

}

.tl-detail-milestone:last-child { border-bottom: none; }

.tl-detail-milestone-year {

  flex-shrink: 0;

  width: 80px;

  font-size: 0.78rem;

  font-weight: 600;

  color: var(--dynasty-color, #8b6f47);

  font-variant-numeric: tabular-nums;

  text-align: right;

  padding-top: 1px;

}

.tl-detail-milestone-dot {

  flex-shrink: 0;

  width: 8px;

  height: 8px;

  border-radius: 50%;

  margin-top: 5px;

  opacity: 0.6;

}

.tl-detail-milestone-text {

  font-size: 0.88rem;

  color: var(--text-mid, #6a6058);

  line-height: 1.6;

}



/* ---- 帝王世系表 ---- */

.tl-emperor-list {

  display: flex;

  flex-direction: column;

  gap: 8px;

  padding: 0 8px;

}

.tl-emperor-row {

  display: flex;

  align-items: center;

  gap: 16px;

  padding: 14px 16px;

  border-radius: 12px;

  background: rgba(201,168,105,0.03);

  border: 1px solid rgba(201,168,105,0.06);

  transition: all 200ms cubic-bezier(0.16,1,0.3,1);

  animation: tlEmpIn 300ms cubic-bezier(0.16,1,0.3,1) backwards;

  animation-delay: calc(var(--emp-idx) * 30ms);

}

@keyframes tlEmpIn {

  from { opacity: 0; transform: translateX(-12px); }

  to   { opacity: 1; transform: translateX(0); }

}

.tl-emperor-clickable { cursor: pointer; }

.tl-emperor-row:hover {

  background: rgba(201,168,105,0.08);

  border-color: rgba(201,168,105,0.15);

  transform: translateX(4px);

}

.tl-emperor-thumb {

  width: 36px;

  height: 36px;

  border-radius: 50%;

  object-fit: cover;

  flex-shrink: 0;

  border: 2px solid rgba(201,168,105,0.15);

}

.tl-emperor-order {

  flex-shrink: 0;

  width: 28px;

  height: 28px;

  border-radius: 50%;

  background: var(--dynasty-color, #c9a869);

  color: white;

  font-size: 0.72rem;

  font-weight: 700;

  display: flex;

  align-items: center;

  justify-content: center;

  opacity: 0.8;

}

.tl-emperor-info {

  flex: 1;

  min-width: 0;

}

.tl-emperor-name {

  font-family: 'STKaiti', 'KaiTi', serif;

  font-size: 0.95rem;

  font-weight: 600;

  color: #3d3228;

  letter-spacing: 1px;

  margin-bottom: 2px;

  display: flex;

  align-items: center;

  flex-wrap: wrap;

  gap: 6px;

}

.tl-emperor-era {

  display: inline-block;

  font-family: -apple-system, 'Segoe UI', sans-serif;

  font-size: 0.65rem;

  font-weight: 500;

  letter-spacing: 0.5px;

  color: var(--dynasty-color, #8b6f47);

  background: color-mix(in srgb, var(--dynasty-color, #8b6f47) 10%, transparent);

  border: 1px solid color-mix(in srgb, var(--dynasty-color, #8b6f47) 25%, transparent);

  padding: 1px 6px;

  border-radius: 3px;

  line-height: 1.4;

  white-space: nowrap;

  max-width: 160px;

  overflow: hidden;

  text-overflow: ellipsis;

}

.tl-notable-role {

  display: inline-block;

  font-size: 0.65rem;

  font-weight: 500;

  padding: 1px 6px;

  border-radius: 3px;

  border: 1px solid;

  line-height: 1.4;

  white-space: nowrap;

  background: color-mix(in srgb, var(--dynasty-color, #8b6f47) 8%, transparent);

}

.tl-emperor-reign {

  font-size: 0.72rem;

  color: var(--dynasty-color, #8b6f47);

  font-variant-numeric: tabular-nums;

}

.tl-emperor-note {

  font-size: 0.78rem;

  color: var(--text-light, #a09890);

  line-height: 1.5;

  max-width: 200px;

  text-align: right;

  flex: 1;

}

.tl-emperor-arrow {

  flex-shrink: 0;

  color: var(--text-light, #a09890);

  opacity: 0.4;

  transition: opacity 180ms, transform 180ms;

}

.tl-emperor-row:hover .tl-emperor-arrow {

  opacity: 0.8;

  transform: translateX(2px);

}



/* ---- 帝王详情弹窗 ---- */

.emperor-modal-overlay {

  position: fixed;

  inset: 0;

  z-index: 1200;

  background: rgba(15,20,25,0.55);

  backdrop-filter: blur(4px);

  display: flex;

  align-items: center;

  justify-content: center;

  opacity: 0;

  transition: opacity 300ms cubic-bezier(0.16,1,0.3,1);

}

.emperor-modal-overlay.open { opacity: 1; }

.emperor-modal-overlay.closing { opacity: 0; }

.emperor-modal-content {

  width: 92%;

  max-width: 520px;

  max-height: 85vh;

  overflow-y: auto;

  background: var(--card-bg, #fffdf8);

  border-radius: 20px;

  box-shadow: 0 24px 80px rgba(0,0,0,0.2);

  position: relative;

  transform: scale(0.92) translateY(20px);

  opacity: 0;

  animation: empModalIn 350ms cubic-bezier(0.16,1,0.3,1) forwards;

}

.emperor-modal-overlay.closing .emperor-modal-content {

  animation: empModalOut 250ms cubic-bezier(0.16,1,0.3,1) forwards;

}

@keyframes empModalIn {

  from { opacity: 0; transform: scale(0.92) translateY(20px); }

  to   { opacity: 1; transform: scale(1) translateY(0); }

}

@keyframes empModalOut {

  from { opacity: 1; transform: scale(1) translateY(0); }

  to   { opacity: 0; transform: scale(0.95) translateY(10px); }

}

.emp-modal-close {

  position: absolute;

  top: 12px; right: 12px;

  width: 32px; height: 32px;

  border-radius: 50%;

  border: 1px solid rgba(0,0,0,0.08);

  background: rgba(255,255,255,0.85);

  backdrop-filter: blur(8px);

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  transition: all 180ms;

  color: #3d3228;

  z-index: 5;

}

.emp-modal-close:hover { background: rgba(0,0,0,0.06); transform: scale(1.08); }

.emp-modal-header {

  display: flex;

  align-items: center;

  gap: 20px;

  padding: 28px 24px 20px;

  border-radius: 20px 20px 0 0;

}

.emp-modal-portrait {

  flex-shrink: 0;

  width: 88px;

  height: 88px;

  border-radius: 50%;

  overflow: hidden;

  border: 3px solid rgba(201,168,105,0.2);

  box-shadow: 0 4px 16px rgba(0,0,0,0.08);

}

.emp-modal-portrait img {

  width: 100%;

  height: 100%;

  object-fit: cover;

  cursor: pointer;

  transition: transform 300ms;

}

.emp-modal-portrait img:hover { transform: scale(1.08); }

.emp-modal-portrait-placeholder {

  width: 100%;

  height: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  font-family: 'STZhongsong', 'FZShuTi', 'STKaiti', 'KaiTi', serif;

  font-size: 2.2rem;

  font-weight: 700;

  opacity: 0.4;

}

.emp-modal-meta { flex: 1; min-width: 0; }

.emp-modal-name {

  font-family: 'STKaiti', 'KaiTi', serif;

  font-size: 1.3rem;

  font-weight: 700;

  color: #2d2520;

  margin: 0 0 4px;

  letter-spacing: 2px;

}

.emp-modal-reign {

  font-size: 0.82rem;

  color: var(--dynasty-color, #8b6f47);

  font-weight: 600;

  margin-bottom: 6px;

  font-variant-numeric: tabular-nums;

}

.emp-modal-era {

  font-size: 0.78rem;

  color: var(--text-mid, #6a6058);

  margin-bottom: 8px;

}

.emp-modal-era-label {

  display: inline-block;

  padding: 1px 6px;

  border-radius: 3px;

  font-size: 0.65rem;

  font-weight: 600;

  background: color-mix(in srgb, var(--dynasty-color, #8b6f47) 10%, transparent);

  color: var(--dynasty-color, #8b6f47);

  margin-right: 6px;

}

.emp-modal-dynasty-tag {

  display: inline-block;

  font-size: 0.68rem;

  font-weight: 500;

  padding: 2px 10px;

  border: 1px solid;

  border-radius: 12px;

}

.emp-modal-body { padding: 0 24px 28px; }

.emp-modal-section { margin-bottom: 20px; }

.emp-modal-section:last-child { margin-bottom: 0; }

.emp-modal-section-title {

  font-size: 0.9rem;

  font-weight: 600;

  color: #3d3228;

  margin-bottom: 10px;

  letter-spacing: 1px;

  padding-left: 10px;

  border-left: 3px solid var(--dynasty-color, #c9a869);

}

.emp-modal-section-text {

  font-size: 0.88rem;

  color: var(--text-mid, #6a6058);

  line-height: 1.85;

  margin: 0;

  text-align: justify;

}



/* ---- 帝王大图查看器 ---- */

.emp-image-viewer {

  position: fixed;

  inset: 0;

  z-index: 1300;

  display: flex;

  align-items: center;

  justify-content: center;

  flex-direction: column;

  opacity: 0;

  transition: opacity 300ms;

}

.emp-image-viewer.open { opacity: 1; }

.emp-image-viewer-bg {

  position: absolute;

  inset: 0;

  background: rgba(0,0,0,0.85);

  cursor: pointer;

}

.emp-image-viewer img {

  position: relative;

  max-width: 90vw;

  max-height: 80vh;

  object-fit: contain;

  border-radius: 12px;

  box-shadow: 0 16px 60px rgba(0,0,0,0.4);

  transform: scale(0.9);

  animation: empImgIn 300ms cubic-bezier(0.16,1,0.3,1) forwards;

}

@keyframes empImgIn {

  from { transform: scale(0.9); opacity: 0; }

  to   { transform: scale(1); opacity: 1; }

}

.emp-image-viewer-caption {

  position: relative;

  color: rgba(255,255,255,0.8);

  font-size: 0.88rem;

  margin-top: 12px;

  letter-spacing: 2px;

}



/* ---- 响应式 ---- */

@media (max-width: 680px) {

  .tl-header { padding: 36px 20px 28px; }

  .tl-header-title { font-size: 1.6rem; letter-spacing: 6px; }

  .tl-header-desc { font-size: 0.85rem; }



  .tl-container { padding: 24px 12px 40px; }

  .tl-line { left: 20px; }

  .tl-node { left: 20px; top: 20px; width: 10px; height: 10px; }



  .tl-left .tl-card,

  .tl-right .tl-card {

    margin-left: 48px;

    margin-right: 0;

  }

  .tl-card { padding: 18px; }

  .tl-card-name { font-size: 1.4rem; letter-spacing: 4px; }

  .tl-card-summary { font-size: 0.82rem; -webkit-line-clamp: 2; }



  .dynasty-modal-scroll { padding: 24px 8px; }

  .tl-detail-card { padding: 0 0 28px; border-radius: 16px; }

  .tl-detail-header { flex-direction: column; gap: 12px; padding: 20px; text-align: center; }

  .tl-detail-dynasty-char { font-size: 2.5rem; min-width: auto; }

  .tl-detail-extra { justify-content: center; flex-wrap: wrap; }



  .tl-emperor-row { flex-wrap: wrap; gap: 8px; padding: 12px; }

  .tl-emperor-note { max-width: 100%; text-align: left; font-size: 0.75rem; }



  .tl-detail-milestone { gap: 8px; }

  .tl-detail-milestone-year { width: 60px; font-size: 0.72rem; }



  .emp-modal-header { flex-direction: column; text-align: center; padding: 24px 20px 16px; }

  .emp-modal-portrait { width: 72px; height: 72px; }

  .emp-modal-body { padding: 0 16px 24px; }

  .emperor-modal-content { width: 95%; max-height: 90vh; border-radius: 16px; }

}

@media (prefers-reduced-motion: reduce) {

  .tl-card, .tl-node, .tl-emperor-row, .tl-detail-card, .emperor-modal-content { animation: none !important; transition-duration: 0ms !important; }

  .dynasty-modal-overlay, .emperor-modal-overlay, .emp-image-viewer { transition-duration: 0ms !important; }

}





