/* ============================================================
   《致十八岁的你》 全站样式
   设计基调：宣纸米白 · 墨色文字 · 雅金点缀 · 衬线书卷气
   原则：朴实、克制、留白，照片与文字是主角
   ============================================================ */

:root {
  --paper:    #f7f2e9;   /* 宣纸底 */
  --paper-2:  #efe7d8;   /* 略深一档，用于卡片/信封 */
  --ink:      #2f2a23;   /* 墨色正文 */
  --ink-soft: #6b6355;   /* 次级文字 */
  --gold:     #a98a5c;   /* 雅金点缀 */
  --gold-soft:#cbb48a;   /* 浅金 */
  --seal:     #a23b3b;   /* 火漆红 */
  --line:     rgba(47, 42, 35, .14);
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: Georgia, "Songti SC", "STSong", "SimSun", serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- 滚动淡入 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.revealed { opacity: 1; transform: none; }

/* ============================================================
   序章
   ============================================================ */
.intro {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  background:
    radial-gradient(1100px 560px at 50% -8%, rgba(201, 180, 138, .4), transparent 62%),
    var(--paper);
}

.intro-small {
  font-size: .95rem;
  letter-spacing: .35em;
  color: var(--ink-soft);
  margin-bottom: 28px;
  padding-left: .35em; /* 抵消 letter-spacing 造成的右偏 */
}

.intro-title {
  font-size: clamp(2.6rem, 9vw, 4.6rem);
  font-weight: 600;
  letter-spacing: .18em;
  padding-left: .18em;
  margin-bottom: 20px;
  color: var(--ink);
}

.intro-years {
  font-size: clamp(1.1rem, 3.4vw, 1.5rem);
  letter-spacing: .3em;
  padding-left: .3em;
  color: var(--gold);
  margin-bottom: 16px;
}

.intro-tagline {
  font-size: clamp(.95rem, 2.6vw, 1.15rem);
  color: var(--ink-soft);
  letter-spacing: .12em;
  margin-bottom: 44px;
}

.start-btn {
  font-size: 1.05rem;
  letter-spacing: .1em;
  color: #fff;
  background: var(--ink);
  padding: 14px 34px;
  border-radius: 999px;
  transition: transform .2s ease, background .2s ease;
}
/* 按钮图标：单独放大，更醒目 */
.start-icon {
  font-size: 1.35rem;
  margin-right: 8px;
  vertical-align: -2px;
}
.start-btn:hover { transform: translateY(-2px); background: #3d362b; }
.start-btn.started { background: #6b6355; pointer-events: none; }

/* 独立放映入口：描边次级按钮 */
.cinema-btn {
  margin-top: 16px;
  font-size: .95rem;
  letter-spacing: .12em;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  padding: 11px 26px;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.cinema-btn:hover { background: var(--gold); color: #fff; }

.scroll-hint {
  position: absolute;
  bottom: 30px;
  font-size: .8rem;
  letter-spacing: .3em;
  color: var(--ink-soft);
  animation: float 2.4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ============================================================
   章节
   ============================================================ */
.chapter {
  max-width: 880px;
  margin: 0 auto;
  padding: 96px 24px;
}

.chapter-head { text-align: center; margin-bottom: 48px; }

.chapter-no {
  display: block;
  font-size: 3rem;
  line-height: 1;
  color: var(--gold-soft);
  letter-spacing: .2em;
  margin-bottom: 14px;
}

.chapter-head h2 {
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  font-weight: 600;
  letter-spacing: .22em;
  padding-left: .22em;
  margin-bottom: 10px;
}

.chapter-years {
  font-size: .95rem;
  letter-spacing: .3em;
  padding-left: .3em;
  color: var(--gold);
  margin-bottom: 18px;
}

.chapter-desc {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 30em;
  margin: 0 auto;
}

/* ---------- 照片区：瀑布流，保留照片原始比例，列数随屏幕自适应 ---------- */
.chapter-photos {
  columns: 1;              /* 手机：单列大图 */
  column-gap: 18px;
}
@media (min-width: 720px)  { .chapter-photos { columns: 2; } }
@media (min-width: 1000px) { .chapter-photos { columns: 3; } }
@media (min-width: 1400px) { .chapter-photos { columns: 4; } }

.photo {
  position: relative;
  break-inside: avoid;      /* 一张照片不被分到两列 */
  margin-bottom: 18px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 2px 14px rgba(47, 42, 35, .08);
  transition: transform .3s ease, box-shadow .3s ease;
  min-height: 180px;        /* 照片未放入时的占位高度 */
}

/* 照片尚未放入时，容器显示占位文字 */
.photo::after {
  content: attr(data-label) " · 待放入照片";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .88rem;
  letter-spacing: .2em;
  color: var(--ink-soft);
  background: linear-gradient(150deg, var(--paper-2), var(--paper));
}

.photo img {
  width: 100%;
  height: auto;             /* 保留照片原始比例，不裁剪 */
  display: block;
}
.photo img.loaded { animation: photoIn .8s ease; }
/* 照片加载成功后隐藏占位文字，露出真实照片 */
.photo:has(img.loaded)::after { display: none; }
@keyframes photoIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

.photo:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(47, 42, 35, .16); }

/* ---------- 视频列表 ---------- */
.video-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 760px) {
  .video-list { grid-template-columns: 1fr 1fr 1fr; }
}

.video-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--paper-2);
  box-shadow: 0 2px 14px rgba(47, 42, 35, .08);
  transition: transform .3s ease;
}
.video-card:hover { transform: translateY(-4px); }

/* 视频未放入时的占位 */
.video-card::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .88rem;
  letter-spacing: .2em;
  color: var(--ink-soft);
  background: linear-gradient(150deg, var(--paper-2), var(--paper));
}

.video-card img,
.video-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
/* 有封面/首帧时隐藏占位文字 */
.video-card:has(img)::after,
.video-card:has(video)::after { display: none; }

/* 播放三角（置于占位之上，提示可点） */
.video-card .play-mark {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  background: rgba(47, 42, 35, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.video-card .play-mark::before {
  content: "";
  margin-left: 4px;
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}
.video-card:hover .play-mark { background: rgba(47, 42, 35, .8); }

/* ---------- 视频弹窗 ---------- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 18, 14, .86);
  padding: 24px;
}
.video-modal.show { display: flex; }

.video-modal video {
  max-width: 100%;
  max-height: 84vh;
  border-radius: 8px;
  background: #000;
}
.video-modal .modal-close {
  position: absolute;
  top: 18px;
  right: 22px;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

/* ============================================================
   桥段与页脚
   ============================================================ */
.bridge {
  max-width: 880px;
  margin: 0 auto;
  padding: 120px 24px 40px;
  text-align: center;
}
.bridge p {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  letter-spacing: .2em;
  color: var(--ink);
  margin-bottom: 10px;
}
.bridge p:first-child { color: var(--gold); font-size: clamp(1rem, 3vw, 1.2rem); }

.btn-letter {
  display: inline-block;
  margin-top: 44px;
  padding: 16px 40px;
  border-radius: 999px;
  background: var(--seal);
  color: #fff;
  text-decoration: none;
  letter-spacing: .12em;
  box-shadow: 0 8px 24px rgba(162, 59, 59, .3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-letter:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(162, 59, 59, .38); }

.footer {
  text-align: center;
  padding: 60px 24px 44px;
  font-size: .8rem;
  letter-spacing: .18em;
  color: var(--ink-soft);
}

/* ============================================================
   音乐开关（首页）
   ============================================================ */
.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(47, 42, 35, .18);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.music-toggle:hover { background: var(--ink); color: #fff; }
.music-toggle.playing { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   信封页
   ============================================================ */
.letter-body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* 翻开后：内容从顶部对齐，提示语淡出，信封塌缩让位，信纸在下方展开 */
.letter-body.opened { align-items: flex-start; }
.letter-body.opened .letter-prompt,
.letter-body.opened .letter-hint { opacity: 0; transition: opacity .4s ease; }
.letter-body.opened .envelope {
  height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: height .6s ease .45s, margin .6s ease .45s, opacity .5s ease .35s;
}

.letter-page {
  width: 100%;
  max-width: 780px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.letter-prompt {
  font-size: 1rem;
  letter-spacing: .3em;
  color: var(--ink-soft);
  margin-bottom: 40px;
}

.letter-hint {
  margin-top: 26px;
  font-size: .88rem;
  letter-spacing: .25em;
  color: var(--ink-soft);
}

.btn-back {
  margin-top: 34px;
  color: var(--ink-soft);
  text-decoration: none;
  letter-spacing: .1em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}
.btn-back:hover { color: var(--ink); }

/* ---------- 信封 ---------- */
.envelope {
  position: relative;
  width: min(92vw, 380px);
  height: 250px;
  cursor: pointer;
  perspective: 1200px;
}

.envelope-back {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(160deg, #efe0c4, #e4d1ae);
  box-shadow: 0 16px 40px rgba(47, 42, 35, .22);
}

/* 信封盖（顶部，翻开露出信） */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 55%;
  z-index: 3;
  background: linear-gradient(180deg, #e9d8b8, #dfc9a0);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top;
  transition: transform .7s ease;
}

.envelope.open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

/* 翻开后信封主体淡出让位，信纸成为主角 */
.envelope-front,
.envelope-back {
  transition: opacity .5s ease .3s;
}
.envelope.open .envelope-front,
.envelope.open .envelope-back {
  opacity: 0;
  pointer-events: none;
}

/* 信封正面（封口主体） */
.envelope-front {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 8px;
  background:
    linear-gradient(115deg, transparent 0 44%, rgba(47,42,35,.04) 44% 50%, transparent 50% 100%),
    linear-gradient(245deg, transparent 0 44%, rgba(47,42,35,.04) 44% 50%, transparent 50% 100%),
    linear-gradient(160deg, #f1e3c8, #e8d5b4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 34px;
}

.envelope-to {
  font-size: .95rem;
  letter-spacing: .35em;
  padding-left: .35em;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.envelope-seal {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #c05a4e, var(--seal) 62%);
  color: #f3d9c4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  box-shadow: 0 3px 10px rgba(162, 59, 59, .45);
}

/* 信纸：翻开后从信封里升起 */
/* 信纸：信封翻开后在下方展开（A4 纸，占文档流，可滚动阅读） */
.envelope-content {
  width: min(92vw, 560px);
  margin: 0 auto;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .7s ease .25s, max-height 1s ease;
}
.envelope.open + .envelope-content {
  opacity: 1;
  max-height: 20000px;
}

/* A4 信纸：纸张质感（米白底 + 细腻纸纹 + 光影） */
.letter-paper {
  background-color: #fdf9f0;
  background-image:
    /* 纸面光影：左上柔光、右下略深 */
    radial-gradient(120% 80% at 15% 10%, rgba(140, 115, 80, .05), transparent 55%),
    radial-gradient(130% 90% at 92% 92%, rgba(140, 115, 80, .07), transparent 50%),
    /* 细腻竖纹，模拟纸纤维 */
    repeating-linear-gradient(90deg, rgba(140, 115, 80, .03) 0 1px, transparent 1px 4px),
    /* 细颗粒噪点，增强纸张质感（透明度低，不影响阅读） */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  border-radius: 3px;
  padding: 46px 42px 60px;
  text-align: left;
  box-shadow:
    /* 内阴影：纸张四周的厚度与卷曲感 */
    inset 0 0 46px rgba(140, 115, 80, .07),
    inset 0 0 2px rgba(140, 115, 80, .12),
    0 16px 44px rgba(47, 42, 35, .22);
}
.letter-paper p { margin-bottom: 14px; font-size: 1rem; }
.letter-paper .letter-salutation { font-size: 1.05rem; }
.letter-paper .letter-title { text-align: center; font-size: 1.1rem; color: var(--gold); letter-spacing: .05em; margin: 6px 0 22px; }
/* 小标题：金色竖线 + 加粗，作为结构重点 */
.letter-paper .letter-sub {
  font-weight: 700;
  color: var(--ink);
  margin-top: 26px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
  letter-spacing: .06em;
}
/* 结尾总结块：全信核心，居中 + 金色分隔线 */
.letter-paper .letter-summary {
  margin: 30px 0 10px;
  padding: 24px 26px 18px;
  border-top: 2px solid var(--gold-soft);
  border-bottom: 2px solid var(--gold-soft);
  text-align: center;
}
.letter-summary .summary-lead { color: var(--ink-soft); letter-spacing: .15em; margin-bottom: 16px; }
.letter-summary .summary-key {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: .16em;
  padding-left: .16em;
  color: var(--ink);
  margin-bottom: 10px;
}
.letter-summary .summary-outro {
  margin-top: 20px;
  font-weight: 600;
  color: var(--seal);
  letter-spacing: 0;
}
.letter-paper .letter-sign {
  margin-top: 26px;
  text-align: right;
  font-size: 1.02rem;
  color: var(--ink);
}
.letter-paper .letter-date {
  text-align: right;
  font-size: .85rem;
  color: var(--ink-soft);
  letter-spacing: .1em;
  margin-top: 6px;
}

/* ============================================================
   手机小屏适配
   ============================================================ */
@media (max-width: 480px) {
  .chapter { padding: 72px 18px; }
  .bridge { padding: 96px 18px 32px; }
  .envelope { height: 220px; }
  /* 手机信封更矮，降低翻盖尖角，避免遮住正面的收信人文字；桌面端保持原比例。 */
  .envelope-flap { height: 42%; }
}

/* ============================================================
   电影放映模式
   ============================================================ */
.intro-browse { margin-top: 18px; }
.intro-browse a {
  color: var(--ink-soft);
  font-size: .85rem;
  letter-spacing: .12em;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.intro-browse a:hover { color: var(--ink); }

.cinema {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0d0b09;
  display: none;
  align-items: center;
  justify-content: center;
}
.cinema.show { display: flex; }

.cinema-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.cinema-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  animation: cinemaIn .9s ease;
}

/* 多张合并一屏的拼贴布局 */
.cinema-grid {
  display: grid;
  gap: 6px;
  width: min(94vw, 1000px);
  height: min(88vh, 740px);
  animation: cinemaIn 1s ease;
}
.cinema-tile {
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cinema-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 四图采用横竖主图搭配，避免任何照片落入过窄的长条区域。 */
.cinema-grid.cinema-t1 {
  grid-template-columns: 1.1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas: "a b b" "a c d";
}
.cinema-grid.cinema-t2 {
  grid-template-columns: 1fr 1fr 1.1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas: "a a b" "c d b";
}

/* 最后一屏不足 4 张 */
.cinema-grid.s1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.cinema-grid.s2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.cinema-grid.s3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; grid-template-areas: "a a" "b c"; }
@keyframes cinemaIn {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: none; }
}

.cinema-chapter { text-align: center; color: #e8dcc5; padding: 0 24px; animation: cinemaIn 1s ease; }
.cinema-chapter .no { display: block; font-size: 3.2rem; color: var(--gold); letter-spacing: .2em; margin-bottom: 18px; }
.cinema-chapter h3 { font-size: clamp(1.8rem, 6vw, 3rem); font-weight: 600; letter-spacing: .22em; padding-left: .22em; margin-bottom: 12px; }
.cinema-chapter p { color: var(--gold-soft); letter-spacing: .3em; padding-left: .3em; }

.cinema-letter { text-align: center; color: #e8dcc5; padding: 0 24px; animation: cinemaIn 1s ease; }
.cinema-letter p { font-size: 1.15rem; letter-spacing: .25em; padding-left: .25em; margin-bottom: 30px; }

.cinema-exit {
  position: absolute;
  top: 14px;
  right: 20px;
  z-index: 3;
  color: rgba(255, 255, 255, .75);
  font-size: 1.7rem;
  line-height: 1;
}
.cinema-exit:hover { color: #fff; }

/* 左右箭头导航（右下角并排，与底部进度同排） */
.cinema-prev,
.cinema-next {
  position: absolute;
  bottom: 18px;
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: rgba(255, 255, 255, .8);
  font-size: 1.3rem;
  line-height: 1;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.cinema-prev { right: 82px; }
.cinema-next { right: 22px; }
.cinema-prev:hover,
.cinema-next:hover { color: #fff; background: rgba(255, 255, 255, .18); border-color: #fff; }

.cinema-progress {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .5);
  font-size: .78rem;
  letter-spacing: .2em;
  z-index: 3;
}

/* 放映收尾压轴 */
.cinema-finale {
  text-align: center;
  color: #e8dcc5;
  animation: cinemaIn 1s ease;
}
.cinema-finale img {
  max-width: min(84vw, 640px);
  max-height: 74vh;
  object-fit: contain;
  border: 3px solid var(--gold);
  border-radius: 4px;
}
.cinema-finale p {
  margin-top: 18px;
  letter-spacing: .35em;
  padding-left: .35em;
  color: var(--gold-soft);
}

/* ============================================================
   网站收尾压轴大图
   ============================================================ */
.finale {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  text-align: center;
}
.finale-frame {
  position: relative;
  display: inline-block;
  border: 3px solid var(--gold);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(47, 42, 35, .22);
}
.finale-frame img {
  max-width: min(88vw, 560px);
  height: auto;
  display: block;
  border-radius: 2px;
}
.finale-cap {
  margin-top: 22px;
  font-size: 1rem;
  letter-spacing: .35em;
  padding-left: .35em;
  color: var(--gold);
}

/* ============================================================
   照片大图浏览（lightbox）
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 8, 6, .95);
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.show { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 20px;
  z-index: 2;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .25);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, .2); }
.lightbox-cap {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, .6);
  font-size: .85rem;
  letter-spacing: .15em;
  z-index: 2;
}

/* ============================================================
   信封弹层（同页看信，音乐不中断）
   ============================================================ */
.letter-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--paper);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px 80px;
}
.letter-modal.show { display: flex; }
.letter-modal-close {
  position: fixed;
  top: 14px;
  right: 20px;
  z-index: 2;
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
}
.letter-modal-close:hover { color: var(--seal); }

/* 信封翻开后：提示语淡出、信封塌缩让位，信纸成为主角 */
.letter-modal.opened .letter-prompt,
.letter-modal.opened .letter-hint { opacity: 0; transition: opacity .4s ease; }
.letter-modal.opened .envelope {
  height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: height .6s ease .45s, margin .6s ease .45s, opacity .5s ease .35s;
}

/* 手机放映模式：限制拼贴网格的最小尺寸，避免图片固有尺寸撑宽页面导致缩放和横向晃动。 */
@media (max-width: 480px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .cinema {
    width: 100vw;
    max-width: 100vw;
    overflow: hidden;
  }

  .cinema-grid {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-width: 0;
  }

  .cinema-tile {
    min-width: 0;
    min-height: 0;
  }

  .cinema-progress {
    max-width: 100%;
    padding: 0 84px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
}
