/* ============================================================
   CSYVII — 项目详情页
   在 style.css 之后加载
   ============================================================ */

/* ---------- 项目头 ---------- */

.project-head {
  padding-top: 72px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 44px;
  transition: color 0.35s var(--ease);
}

.back-link::before { content: "←"; font-family: "Cormorant Garamond", serif; font-size: 15px; }
.back-link:hover { color: var(--clay); }

.project-title {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0 24px;
  align-items: end;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--rule);
}

.project-title .work-index { font-size: 54px; }

.project-title h1 {
  font-family: "Noto Serif SC", serif;
  font-weight: 400;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.24;
  letter-spacing: 0.02em;
}

.project-title .en {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  letter-spacing: 0.16em;
}

.project-lede {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0 72px;
  padding: 44px 0 0;
}

.project-lede p {
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink-2);
  max-width: 30em;
}

.spec {
  border-top: 1px solid var(--rule);
}

.spec > div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.spec dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.spec dd {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ---------- 播放器 ---------- */

.watch {
  padding-top: 72px;
}

.player {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  overflow: hidden;
  cursor: pointer;
  border: 0;
  padding: 0;
}

.player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: opacity 0.5s var(--ease), transform 1.2s var(--ease);
}

.player:hover img { opacity: 1; transform: scale(1.015); }

.player .tri {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 78px;
  height: 78px;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(3px);
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.45s var(--ease), transform 0.45s var(--ease);
}

.player .tri::after {
  content: "";
  margin-left: 6px;
  border-left: 15px solid var(--ink);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}

.player:hover .tri { background: var(--paper); transform: scale(1.04); }

.player-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.player video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

/* ---------- 章节标题 ---------- */

.block { padding-top: 96px; }

.block-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 48px;
}

.block-head .num {
  font-family: "Cormorant Garamond", serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--clay);
}

.block-head h2 {
  font-family: "Noto Sans SC", sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--ink-2);
  text-transform: uppercase;
}

.block-head .aside {
  margin-left: auto;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* ---------- 制作过程模块 ---------- */

.mod {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 0 56px;
  padding: 48px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.mod:last-child { border-bottom: 0; padding-bottom: 0; }

.mod-head .mod-no {
  font-family: "Cormorant Garamond", serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--clay);
  display: block;
  margin-bottom: 10px;
}

.mod-head h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: 24px;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 8px;
}

.mod-head .mod-zh {
  font-family: "Noto Serif SC", serif;
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.06em;
}

.mod-body > p {
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
  max-width: 34em;
  margin-bottom: 26px;
}

.mod-body > p:last-child { margin-bottom: 0; }

/* 图占满整行的变体 */
.mod--stack { display: block; }

.mod--stack .mod-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 16px;
  margin-bottom: 26px;
}

.mod--stack .mod-head .mod-no { margin-bottom: 0; }

.mod--stack .mod-head h3 { margin-bottom: 0; font-size: 27px; }

.mod--stack .mod-head .mod-zh { align-self: center; }

/* ---------- 版本表 ---------- */

.ver {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ver th {
  text-align: left;
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
  padding: 0 12px 9px 0;
  border-bottom: 1px solid var(--rule);
}

.ver td {
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-2);
  vertical-align: baseline;
}

.ver tr:last-child td { border-bottom: 0; }

.ver .v-name {
  font-family: "Cormorant Garamond", "Noto Sans SC", serif;
  font-size: 14px;
  color: var(--ink);
}

.ver .v-time,
.ver .v-len {
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  font-size: 12.5px;
  white-space: nowrap;
}

.ver .v-len { color: var(--ink-2); }

.ver .v-note { color: var(--ink-2); }

.ver tr.is-break td {
  border-top: 1px solid var(--clay);
  padding-top: 15px;
}

.ver tr.is-break td:first-child::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--clay);
  margin-right: 8px;
  vertical-align: middle;
}

.ver .delta {
  font-size: 11.5px;
  color: var(--clay);
  letter-spacing: 0.04em;
}

/* ---------- 对照图组 ---------- */

.compare {
  display: grid;
  gap: 22px;
}

.compare--2 { grid-template-columns: repeat(2, 1fr); }
.compare--3 { grid-template-columns: repeat(3, 1fr); }

/* 三列时右对齐的说明会撞到下一格的编号，改成紧凑左对齐 */
.compare.compare--capleft figcaption {
  justify-content: flex-start;
  gap: 10px;
}

.compare figure { margin: 0; }

.compare .frame { background: var(--paper-deep); }

.compare figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 9px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.compare figcaption b {
  font-weight: 400;
  color: var(--ink-2);
}

.cmp-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 38px 0 14px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.cmp-label b {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.compare-note {
  margin-top: 30px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-3);
  padding-left: 14px;
  border-left: 1px solid var(--rule);
  max-width: 34em;
}

/* ---------- 剧照 ---------- */

.stills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stills figure { margin: 0; }
.stills .frame img { aspect-ratio: 16 / 9; }

.stills figcaption {
  padding-top: 9px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* ---------- 上下页 ---------- */

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 80px 0 0;
}

.pager a {
  display: block;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  transition: border-color 0.4s var(--ease);
}

.pager a:hover { border-top-color: var(--clay); }

.pager .dir {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.pager .nm {
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  color: var(--ink);
}

.pager a:hover .nm { color: var(--clay); }

.pager .next { text-align: right; }

/* ---------- 剧集列表（南海页） ---------- */

.ep-grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.ep-row {
  display: grid;
  grid-template-columns: 74px 170px 1fr 90px;
  gap: 24px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.ep-row .no {
  font-family: "Cormorant Garamond", serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.ep-row.on .no { color: var(--clay); }

.ep-row .nm {
  font-family: "Noto Serif SC", serif;
  font-size: 17px;
  color: var(--ink-2);
}

.ep-row.on .nm { color: var(--ink); }

.ep-row .sub { font-size: 13px; color: var(--ink-3); }

.ep-row .len {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-align: right;
}

.ep-row.on .len { color: var(--clay); }

/* ---------- 剪辑作品页 ---------- */

.edit-block {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0 56px;
  padding: 52px 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: start;
}

.edit-block:last-of-type { border-bottom: 0; padding-bottom: 0; }

.edit-side .no {
  font-family: "Cormorant Garamond", serif;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--clay);
  display: block;
  margin-bottom: 12px;
}

.edit-side h2 {
  font-family: "Noto Serif SC", serif;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.edit-side .tagline {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-bottom: 18px;
}

.edit-side .blurb {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 24em;
}

.edit-media { width: 100%; }

.edit-media .player { width: 100%; }

.edit-media.r43  .player { max-width: 700px; aspect-ratio: 4 / 3; }
.edit-media.r169 .player { max-width: 760px; aspect-ratio: 16 / 9; }
.edit-media.r34  .player { max-width: 480px; aspect-ratio: 3 / 4; }
.edit-media.r916 .player { max-width: 340px; aspect-ratio: 9 / 16; }

.edit-media.r43  .cap,
.edit-media.r43  .hold-plate { max-width: 700px; }
.edit-media.r169 .cap,
.edit-media.r169 .hold-plate { max-width: 760px; }
.edit-media.r34  .cap { max-width: 480px; }
.edit-media.r916 .cap { max-width: 340px; }

.edit-media figcaption,
.edit-media .cap {
  padding-top: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.hold-plate {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-deep);
  border: 1px solid var(--rule-soft);
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.16em;
  aspect-ratio: 15 / 8;
  max-width: 760px;
  overflow: hidden;
}

.hold-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 图自带比例时，让框跟着图走 */
.hold-plate--nat { aspect-ratio: auto; display: block; }
.hold-plate--nat img { height: auto; }

.edit-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-3);
  max-width: 34em;
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .project-title { grid-template-columns: 64px 1fr; }
  .project-lede { grid-template-columns: 1fr; gap: 34px; }
  .mod { grid-template-columns: 1fr; gap: 22px; }
  .compare--3 { grid-template-columns: repeat(2, 1fr); }
  .still-grid, .stills { grid-template-columns: repeat(2, 1fr); }
  .edit-block { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 720px) {
  .project-head { padding-top: 44px; }
  .back-link { margin-bottom: 28px; }
  .project-title { grid-template-columns: 1fr; gap: 12px; }
  .project-title .work-index { font-size: 34px; }
  .project-title h1 { font-size: 27px; }
  .watch { padding-top: 44px; }
  .player .tri { width: 56px; height: 56px; }
  .player .tri::after { border-left-width: 11px; border-top-width: 7px; border-bottom-width: 7px; }
  .block { padding-top: 64px; }
  .block-head { margin-bottom: 32px; }
  .mod { padding: 34px 0; }
  .compare--2, .compare--3, .stills { grid-template-columns: 1fr; }
  .ver th:nth-child(2), .ver td:nth-child(2) { display: none; }
  .ep-row { grid-template-columns: 54px 1fr auto; gap: 14px; }
  .ep-row .sub { display: none; }
  .pager { grid-template-columns: 1fr; gap: 20px; padding-top: 56px; }
  .pager .next { text-align: left; }
}
