:root {
  --ink: #1f2421;
  --bg: #faf8f3;
  --muted: #7a736a;
  --accent: #5a4a3a;          /* 陶土棕：主色 */
  --tint: #f3ede3;            /* 浅陶土底色 */
  --rule: #e3dccd;

  /* 多彩标签色——适时点缀 */
  --c-blue:   #4a5a8a;        /* 学术蓝：高中学段 */
  --c-orange: #c97b50;        /* 暖橙：PPT / 实验 */
  --c-green:  #5a7a6a;        /* 墨绿：奖项 */
  --c-purple: #8a6aaa;        /* 紫：指导教师 */
  --c-rose:   #b56a6a;        /* 玫红：课题队长 / 启蒙 */
  --c-gray:   #8a7e72;        /* 浅褐灰：小学 */
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
}
.wrap { max-width: 880px; margin: 0 auto; padding: 56px 32px 96px; }
header { border-bottom: 1px solid var(--rule); padding-bottom: 28px; margin-bottom: 40px; }
.eyebrow { font-size: 12px; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase; margin: 0 0 6px; }

/* h1 衬线字体——学院派文学气质 */
h1 {
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "STSong", "Songti SC", "SimSun", "Songti TC", Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
  line-height: 1.2;
  color: var(--ink);
}
.tagline {
  color: var(--accent);
  font-size: 14px;
  margin: 8px 0 0;
  font-style: italic;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

section { margin-bottom: 40px; }

/* h2 章节标题：字大一点 */
h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
h2 .emo {
  font-size: 17px;
  filter: grayscale(0.2);
}

/* h4：work 内次级小标题（用于"完整音频"等） */
.work h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 22px 0 8px;
  padding: 0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* p.narrative：创作背景类段落（字小一点） */
.work p.narrative {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
  opacity: 0.85;
}

.work { padding: 22px 0; border-bottom: 1px dashed var(--rule); }
.work:last-child { border-bottom: none; }
.work h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  font-family: "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  color: var(--ink);
}
.work h3 .num {
  color: var(--accent);
  margin-right: 8px;
  letter-spacing: 0.05em;
  opacity: 0.9;
  font-family: inherit;
}
.work .meta { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.work p { margin: 10px 0; }

.work a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(90, 74, 58, 0.35);
  transition: border-color .2s, color .2s;
}
.work a:hover { border-bottom-color: var(--accent); color: #3a2e22; }

/* quote */
.quote {
  font-style: italic;
  padding: 18px 22px;
  background: var(--tint);
  border-left: 3px solid var(--accent);
  margin: 18px 0;
  color: #2a2118;
  font-family: "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  line-height: 2;
  letter-spacing: 0.04em;
}

audio, img { display: block; max-width: 100%; margin: 14px 0; }
img.rounded { border-radius: 6px; border: 1px solid var(--rule); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 8px; }
.grid > img { margin: 0; }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.back {
  display: inline-block;
  margin-top: 32px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  font-size: 13px;
}
.back:hover { color: var(--accent); }

/* ---- 左上角固定返回按钮：圆形 + 半透明 + 仅箭头 ---- */
.back-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
  color: var(--accent);
  border: 1px solid rgba(90, 74, 58, 0.20);
  border-radius: 50%;
  text-decoration: none;
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: background .2s, transform .15s, border-color .2s;
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.78);
  border-color: var(--accent);
  transform: translateX(-2px);
}
.back-btn:active { transform: translateX(0); }
.back-btn svg {
  display: block;
  width: 16px;
  height: 16px;
}

footer { color: var(--muted); font-size: 13px; padding-top: 24px; margin-top: 40px; border-top: 1px solid var(--rule); }

/* ---- tag 标签：多彩实心 ---- */
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--c-blue);
  color: white;
  margin-right: 6px;
  letter-spacing: 0.04em;
  font-weight: 500;
  line-height: 1.5;
}
.tag.t-prize        { background: var(--c-green); }   /* 校级奖项 */
.tag.t-ppt          { background: var(--c-orange); }  /* PPT */
.tag.t-lead         { background: var(--c-rose); }    /* 课题队长 */
.tag.t-teacher      { background: var(--c-purple); }  /* 指导教师 */
.tag.t-grad         { background: var(--c-blue); }    /* 高一/高二 */
.tag.t-elementary   { background: var(--c-gray); }    /* 小学 */
.tag.t-young-doc    { background: var(--c-rose); }    /* 小博士论文 */
.tag.t-online       { background: var(--c-blue); }     /* 已上线 */
.tag.t-feedback     { background: var(--c-rose); }    /* 好评 / 收益 */
.tag.t-feed         { background: var(--c-green); }    /* 新生指南 */
.tag.t-personal     { background: var(--c-gray); }     /* 个人项目 */
.tag.t-collab       { background: var(--c-purple); }   /* 真实合作 */
.tag.t-video        { background: var(--c-orange); }   /* 视频 / 抖音 */

/* ---- doc-link：浅赭石按钮带图标 ---- */
.doc-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--tint);
  color: var(--accent);
  border: 1px solid rgba(90, 74, 58, 0.22);
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: background .2s, border-color .2s, transform .15s;
  margin-top: 8px;
}
.doc-link:hover {
  background: rgba(90, 74, 58, 0.10);
  border-color: var(--accent);
  color: #3a2e22;
}
.doc-link:active { transform: translateY(1px); }
.doc-link .ico { font-size: 15px; line-height: 1; }

/* ---- 截图缩略图网格（手机竖图 ≤ 200px 宽） ---- */
.shot-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0 8px;
}
.shot-card {
  margin: 0;
  padding: 8px 8px 10px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.shot-card img {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 4px;
}
.shot-card figcaption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* ---- PDF 嵌入（页面内可滚动） ---- */
.pdf-embed {
  margin: 16px 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: white;
  overflow: hidden;
}
.pdf-embed > summary {
  padding: 11px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
  user-select: none;
  font-weight: 500;
  background: var(--tint);
  list-style: none;
  transition: background .2s;
}
.pdf-embed > summary::-webkit-details-marker { display: none; }
.pdf-embed > summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 4px;
  transition: transform .2s;
}
.pdf-embed[open] > summary::before { transform: rotate(90deg); }
.pdf-embed > summary:hover { background: rgba(90, 74, 58, 0.10); }
.pdf-embed[open] > summary {
  background: white;
  border-bottom: 1px solid var(--rule);
}
.pdf-embed iframe {
  display: block;
  width: 100%;
  height: 880px;
  border: none;
  background: #f5f3ee;
}

/* ---- Carousel ---- */
.carousel {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 24px auto;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  user-select: none;
}
.carousel-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
}
.carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .45s ease;
}
.carousel-img.active { opacity: 1; }
.carousel button.prev,
.carousel button.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: white;
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  transition: background .2s, transform .15s;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.carousel button.prev:hover,
.carousel button.next:hover { background: rgba(0,0,0,0.7); }
.carousel button.prev:active,
.carousel button.next:active { transform: translateY(-50%) scale(0.94); }
.carousel button.prev { left: 10px; }
.carousel button.next { right: 10px; }
.carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 5;
}
.carousel-indicators .dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background .2s, width .25s;
  border: none;
  padding: 0;
}
.carousel-indicators .dot.active {
  background: white;
  width: 22px;
}

/* ---- Lyrics ---- */
.lyrics {
  font-size: 17px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: #2a2e2a;
  padding: 12px 4px;
}
.lyrics-block {
  padding: 28px 24px;
  margin: 0 0 28px;
  background: linear-gradient(180deg, var(--tint), rgba(243,237,227,0.4));
  border-radius: 6px;
  border-left: 2px solid var(--accent);
}
.lyrics-block h3 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---- section 顶部 intro（浅赭石底色块） ---- */
.section-intro {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink);
  opacity: 0.78;
  margin: 0 0 22px;
  padding: 14px 18px;
  background: var(--tint);
  border-radius: 5px;
  border-left: 2px solid var(--accent);
}

/* ---- 微信小程序码 / 视频截图 并排展示 ---- */
.mp-pair {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 16px 0 4px;
}
.mp-embed {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 18px 0 8px;
  padding: 14px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 8px;
  max-width: 180px;
}
.mp-embed img {
  width: 150px;
  height: 150px;
  margin: 0;
  display: block;
  border-radius: 4px;
}
.mp-embed .caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ---- 响应式：手机/平板适配（≥老师用手机看） ---- */
@media (max-width: 700px) {
  .wrap { padding: 36px 20px 64px; }
  h1 { font-size: 28px; }
  .tagline { font-size: 13px; }
  .work p { font-size: 15px; }
  .work h3 { font-size: 16px; }
  .work .meta { font-size: 12px; }
  .carousel { max-width: 100%; }
  .pdf-embed iframe { height: 580px; }
  .pdf-embed > summary { font-size: 12px; padding: 10px 14px; }
  audio { width: 100%; }
  .lyrics-block { padding: 20px 16px; }
  .lyrics-block p { font-size: 15px; line-height: 1.9; }
  .doc-link { font-size: 12px; padding: 8px 14px; }
  .back-btn { top: 10px; left: 10px; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .mp-embed { max-width: 100%; padding: 10px; }
  .mp-embed img { width: 130px; height: 130px; }
  .shot-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
  .shot-card img { max-width: 160px; }
  .section-intro { font-size: 13px; padding: 12px 14px; }
}
@media (max-width: 380px) {
  .wrap { padding: 28px 14px 48px; }
  h1 { font-size: 24px; }
  .tag { font-size: 11px; padding: 2px 7px; }
}
