

/* ---------- Base Typography ---------- */
/* 中文衬线 / 英文 serif */
/* 中文优先系统字体，Noto Serif SC 作为 fallback，英文 fallback Georgia/serif */
/* 中文无衬线 / 英文 sans-serif */
/* 中文优先系统字体（苹方/微软雅黑），Noto Sans SC fallback，英文现代 sans-serif，最后 system-ui */
/* 等宽字体 / code */
/* 可选强调字体（标题、LOGO 等） */

:root {
   
  --serif: "STSong", "Songti SC", "Noto Serif SC", "Georgia", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Inter", "Helvetica Neue", system-ui, sans-serif;

  --mono: "SFMono-Regular", "Menlo", "Consolas", "Courier New", monospace;
  --display: "Fira Sans", "Helvetica Neue", system-ui, sans-serif;

  --text-main: #222;
  --text-subtle: #555;

  --bg: #efeae5;
  --bg-soft: #efeae5;

  --accent-bg: #c8b8a679;

  --link-button-bg:#ffffff;
  --link-button-text:#5A4A3C;
  --link-button-hover:#cacaa2;

  --footnote-ref:#222;
  --footnote-fef-hover:#cacaa2;

  --nav-text:#b40707;

  --quote-background:#f7f7f7;


  --max-width: 900px;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--sans);
  color: var(--text-main);
  line-height: 1.75;
}


/* ---------- Navigation ---------- */

.top-nav {
 /* margin: 0 auto;
  max-width: var(--max-width); 导航条与main等宽 貌似也不是很好*/
  padding: 1.2rem 1.6rem;
  background: var(--bg-soft);
  border-bottom: 1px solid #ddd;
  
}

.top-nav a {
  text-decoration: none;
  font-size: 1rem;
  color: var(--nav-text);
  font-weight: 600;
  font-family: var(--sans);
}


/* ---------- Main Layout ---------- */

.episode {
  max-width: var(--max-width);
  margin: auto;
  padding: 2rem 1.2rem 4rem;
}

/* ---- 标题区容器 ---- */
.title-block {
  position: relative;
  margin-bottom: 2rem; /* 保留你原本 h5 下方的空间 */
}

/* ---- 日期 pill ---- */
.ep-date {
  position: absolute;
  right: 0;          /* 靠右对齐 */
  top: 0;            /* 与 h1 顶端对齐 */
  transform: translateY(-10%); /* 微调，让 pill 与中文标题更自然对齐 */

  font-size: 0.75rem;
  color: #666;
  border: 1px solid #ddd;
  padding: 0.18em 0.6em;
  border-radius: 999px;
  white-space: nowrap;
  background: white; /* 推荐，避免重叠到文字时透明 */
}

/* 防止 pill挡住行距过高的 h1 */
h1 {
  padding-right: 4.5rem; /* 给 pill 留空间，不挤到标题 */
}

/* ---- 手机端：pill 移到英文标题下面 ---- */
@media (max-width: 600px) {
  .ep-date {
    position: static;
    transform: none;
    margin-top: 0.1rem;
    display: inline-block;
  }

  .title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  h1 {
    padding-right: 0; /* 移动端不需要留空 */
  }
}


/* ---------- Headings ---------- */

h1 {
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02rem;
}

h2 {
  font-family: var(--serif);
  font-size: 2rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.05rem; 
}

h3 {
  font-size: 1rem;            /* ← 与正文一致 */
  font-weight: 600;
  background: var(--accent-bg); /* ← 你要求的显色背景 */
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.03rem;   /* 字间距只用于标题 而非正文 chatGPT这个笨蛋 */
}

h4 {
  font-size: 1rem;            
  font-weight: 600;

  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  display: block;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05rem;   
}

h5 {
  font-size: 1.2rem;            
  font-weight: 600;

  border-radius: 4px;
  display: block;
  margin-top: 0.1rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02rem;   
}

/*----引用----*/
blockquote {
  background: var(--quote-background);     /* 柔和背景色 */
  padding: 0.8em 1.2em;    /* 内距让内容更呼吸 */
  border-left: 4px solid #d0d0d0; /* 左侧竖线，增强引用感 */
  margin: 1em 0;           /* 与上下正文保持距离 */
  font-size: 0.9em;        /* 比正文略小一点 */
  line-height: 1.6;        /* 更好的可读性 */
 /* border-radius: 6px;       可选：柔和圆角 */
}


.footnote-ref {
  text-decoration: none;      
  color: var(--footnote-ref);          
  font-weight: 500;           /* 可选：让脚注数字更稳一点 */
}

.footnote-ref:hover {
  color: var(--footnote-ref-hover);                
  text-decoration: none; 
}

.footnotes {
    
      font-size: 0.9em;
    }


/* - Paragraph-*/
/* 中文段落 */
p::first-letter {
  font-size: 1.3rem;}

p{
  margin:0%;
  padding-left: 0.5rem;
}

p.cn {
  font-size: 1rem;               
  line-height: 1.7;              /* 中文行高 */           
  margin-bottom: 0.5rem;          /* 段落间距 */
  color: #333;
  
}

/* 英文段落 */
p.en {
  font-size: 0.95rem;
  line-height: 1.5;              /* 英文行高略小 */
  margin-bottom: 0.5rem;
  color: #333;
  font-style: oblique;
  
}

/* 段落内中英文混排 未用样式 字间距未必需要调整*/
span.cn {
  line-height: 1.7;
  letter-spacing: 0;
}

span.en {
  font-size: 0.95rem;
  line-height: 1.5;
  letter-spacing: 0;
  font-style: oblique;
}

blockquote.en {
  font-style: oblique;
}


/* ---------- Blocks ---------- */

.block {
  margin-bottom: 0.5rem;
}


/* ---------- Media ---------- */

.kv {
  width: 100%;
  border-radius: 8px;
  margin: 1rem 0 1.5rem;
}

.kv-detail {
  filter: brightness(1.1) contrast(1) saturate(30%);
  width: 100%;
  border-radius: 8px;
  margin: 1rem 0 1.5rem;
}


audio {
  width: 100%;
  max-width: var(--max-width);
  margin-bottom: 2rem;
  display: block;   /* 避免奇怪的 inline-gap */
}



/* ---------- Lists ---------- */


.timestamps,
.credits {
  list-style: none; /* 去掉默认圆点 */
  padding-left: 0.5rem;
  margin: 0%;
}

.timestamps li,
.credits li {
  padding: 0.1rem 0;
}


/* ---------- Timestamps ---------- */

  .timestamps button {
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px 6px;
    margin-right: 6px;
    font-family: var(--mono);
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .timestamps button:hover {
    background: #e0e0e0;
  }


/* ---------- Transcript Link ---------- */

.transcript-wrapper {
  display: flex;
  justify-content: flex-end;  /* 将按钮推到右边 */
  margin-top: 2rem;
}

.transcript-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;

  /* 这是重点：按钮色彩 */
  background-color: var(--link-button-bg); /* 强调按钮行为 */
  color: var(--link-button-text);
  border: 1px solid var(--link-button-bg);
}

.transcript-pill:hover,
.transcript-pill:focus {
  background-color: var(--link-button-hover);
  border-color: var(--link-button-hover);
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  padding-top: 0,5rem;
  padding-bottom:3rem;
  color: #777;
  font-size: 0.8rem;
  border-top: 1px solid #ddd;
}


/*让移动端在点击链接时不再显示蓝色/高亮效果*/
a {
  -webkit-tap-highlight-color: transparent;
}


details {
  margin-top: 0.6rem;
  margin-bottom: 1rem;
  
  padding: 0.3rem 0.5rem;
 
}

summary{
  letter-spacing: 0.05rem;
  padding: 0.3rem 0.6rem;
  opacity: 0.95;
  background: var(--accent-bg);
  display: inline-block;
  border-radius: 3px;

}

details > summary {
  list-style: none;
  cursor: pointer;
}

details > summary::-webkit-details-marker {
  display: none;
}

details > summary::marker {
  content: "";
}

details[open] > summary {
  opacity: 1;
  color: var(--text-main);
}

summary {
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

details > summary:hover {
  background: rgba(200, 184, 166, 0.55); /* 比 --accent-bg 稍实 */
  opacity: 1;
}


/* --prints images--*/
.print-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.image-frame {
  position: relative;
  width: 70%;
  max-width: 420px;   /* 关键：别太大 */
}

.image-frame img {
  width: 100%;
  display: none;
}

.image-frame img.active {
  display: block;
}

/* 左右箭头 */
.print-gallery .nav {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
}

.print-gallery .nav:hover {
  opacity: 0.6;
}
