/* 幕间漫游 · 08 号展厅「下场看什么」· Felix
 * 视觉语汇：暗房放映厅 (#0e1013) · 放映机暖琥珀光 (#d9a962) · 35mm 胶片齿孔细节
 */
:root {
  --bg: #0e1013;
  --surface: #14171d;
  --surface-elevated: #1a1e26;
  --border: rgba(255, 245, 224, 0.11);
  --border-amber: rgba(217, 169, 98, 0.34);

  --ink: #f2ece1;
  --ink-body: #dfd8ca;
  --ink-muted: #9f9788;
  --amber: #d9a962;
  --amber-bright: #ecc380;
  --amber-soft: rgba(217, 169, 98, 0.14);

  /* 字体族统一取自 /shared/shell.css：--font-display = Long Cang 龙藏，--font-body = 苹方黑体栈 */
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  overflow-x: clip;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* 35mm 胶片齿孔条装饰 */
.film-sprockets {
  position: absolute;
  left: 0;
  right: 0;
  height: 18px;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 12px,
    rgba(217, 169, 98, 0.14) 12px 24px,
    transparent 24px 40px
  );
  background-size: 40px 8px;
  background-repeat: repeat-x;
  background-position: center;
  border-bottom: 1px solid rgba(255, 245, 224, 0.06);
  pointer-events: none;
  z-index: 3;
}

.film-sprockets-top {
  top: 0;
}

.film-sprockets-bottom {
  bottom: 0;
  border-bottom: 0;
  border-top: 1px solid rgba(255, 245, 224, 0.06);
}

/* ===== 序幕 Hero ===== */
.hero {
  position: relative;
  padding: clamp(76px, 11vw, 132px) 24px clamp(68px, 9vw, 112px);
  overflow: hidden;
  background: linear-gradient(180deg, #0b0d10 0%, #111419 100%);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-projector-beam {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 58% 60% at 78% 36%, rgba(217, 169, 98, 0.16), transparent 68%),
    radial-gradient(ellipse 48% 55% at 14% 78%, rgba(168, 122, 62, 0.1), transparent 72%);
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(rgba(255, 247, 232, 0.5) 0.55px, transparent 0.55px);
  background-size: 6px 6px;
}

.hero-motif {
  position: absolute;
  right: max(3%, calc(50% - 540px));
  bottom: 14px;
  width: clamp(210px, 28vw, 370px);
  height: auto;
  opacity: 0.14;
  filter: drop-shadow(0 0 28px rgba(217, 169, 98, 0.24));
  user-select: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
}

.hero-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(38px, 6.8vw, 68px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.06em;
  color: #fbf6ed;
}

.hero-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 245, 224, 0.11);
}

.hero-byline {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}

.byline-author {
  font-family: var(--font-body);
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--amber-bright);
}

/* ===== 粘性分区快捷导航 ===== */
.section-tabs {
  position: sticky;
  top: 0;
  z-index: 9000;
  background: rgba(14, 16, 19, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 245, 224, 0.1);
}

.section-tabs-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sec-tab:hover {
  color: #fbf6ed;
  background: rgba(255, 246, 227, 0.06);
}

.sec-tab.is-active {
  color: #16130e;
  background: var(--amber);
  font-weight: 600;
}

.sec-tab.is-active .sec-tab-badge {
  background: rgba(20, 17, 12, 0.18);
  color: #16130e;
}

/* ===== 主体展区 ===== */
.cinema-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 76px) 22px 0;
}

.section-head {
  max-width: 760px;
  margin: 0 auto clamp(28px, 4vw, 44px);
}

.archive-head {
  max-width: 1180px;
}

.section-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #fbf6ed;
}

.loading-state {
  padding: 44px 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
}

/* ===== 01 团长手记 ===== */
.notes-section {
  scroll-margin-top: 72px;
}

.notes-body {
  max-width: 760px;
  margin: 0 auto;
}

.note-chapter {
  margin: 46px 0 20px;
  padding: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 500;
  line-height: 1.45;
  color: #f8e8cd;
  border-bottom: 1px solid rgba(217, 169, 98, 0.24);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.note-chapter:first-child {
  margin-top: 4px;
}

.note-chapter::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(217, 169, 98, 0.55);
  flex-shrink: 0;
  transform: translateY(-2px);
}

.note-p {
  margin: 0 0 1.35em;
  font-size: 16.5px;
  line-height: 1.96;
  color: var(--ink-body);
  text-align: justify;
  text-justify: inter-ideograph;
}

.moments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.moment-card {
  padding: 20px 22px;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(26, 30, 38, 0.92), rgba(20, 23, 29, 0.94));
  border: 1px solid var(--border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.moment-text {
  margin: 0;
  font-size: 15.8px;
  line-height: 1.9;
  color: #e5ded0;
  text-align: justify;
  text-justify: inter-ideograph;
}

.moment-letter {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-left: 2.5px solid var(--amber);
  border-radius: 0 8px 8px 0;
  background: rgba(217, 169, 98, 0.06);
}

.moment-letter p {
  margin: 0 0 0.85em;
  font-size: 14.8px;
  line-height: 1.85;
  color: #ddd3c0;
}

.moment-letter p:last-child {
  margin-bottom: 0;
}

/* 胶片分隔带 */
.reel-divider {
  position: relative;
  margin: clamp(56px, 8vw, 96px) auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.reel-divider::before,
.reel-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 169, 98, 0.32), transparent);
}

/* ===== 02 放映现场档案 ===== */
.archive-section {
  scroll-margin-top: 72px;
}

.filter-bar-wrap {
  margin-bottom: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-bar-wrap::-webkit-scrollbar {
  display: none;
}

.filter-bar {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 2px 2px 6px;
}

@media (min-width: 900px) {
  .filter-bar {
    flex-wrap: wrap;
  }
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 245, 224, 0.16);
  background: rgba(255, 245, 224, 0.04);
  color: #d6cec0;
  font-size: 13.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-pill:hover {
  border-color: rgba(217, 169, 98, 0.5);
  color: #fff;
}

.filter-pill.is-active {
  background: var(--amber);
  border-color: var(--amber);
  color: #16130e;
  font-weight: 600;
}

/* 原比例瀑布流（不裁切任何海报/横幅/竖图） */
.archive-masonry {
  column-count: 3;
  column-gap: 18px;
}

.photo-card {
  break-inside: avoid;
  margin: 0 0 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.24s ease, transform 0.24s ease;
}

.photo-card:hover {
  border-color: rgba(217, 169, 98, 0.48);
  transform: translateY(-2px);
}

.photo-card-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #0a0c0f;
  cursor: zoom-in;
}

.photo-card-btn img {
  display: block;
  width: 100%;
  height: auto;
}

.photo-card-meta {
  padding: 12px 14px 14px;
}

.photo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.photo-sec-tag {
  font-size: 11px;
  color: var(--amber);
  background: var(--amber-soft);
  padding: 2px 8px;
  border-radius: 4px;
  max-width: 78%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-event {
  margin: 0;
  font-size: 13.8px;
  line-height: 1.55;
  color: #eee7da;
}

.photo-caption-note {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.photo-caption-note.is-code {
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: 0.72;
  word-break: break-all;
}

/* 展厅尾注 */
.exhibit-footer {
  text-align: center;
  padding: 56px 20px 96px;
  color: var(--ink-muted);
}

.footer-rule {
  width: 48px;
  height: 1px;
  margin: 0 auto 18px;
  background: rgba(217, 169, 98, 0.42);
}

.footer-top-link {
  display: inline-block;
  font-size: 12.5px;
  color: var(--amber);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(217, 169, 98, 0.28);
}

.footer-top-link:hover {
  background: rgba(217, 169, 98, 0.12);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 13, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
}

.lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 6px 10px;
}

.lightbox-section-tag {
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 246, 227, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #f6efe2;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.lightbox-viewport {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.lightbox-figure {
  margin: 0;
  max-width: min(92vw, 1180px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 168px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  text-align: center;
  max-width: 720px;
}

.lb-event {
  font-size: 14px;
  color: #f2eadc;
  line-height: 1.5;
}

.lb-detail {
  margin-top: 3px;
  font-size: 12px;
  color: var(--ink-muted);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 246, 227, 0.22);
  background: rgba(15, 17, 21, 0.72);
  color: #f7efe2;
  font-size: 26px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}

.lightbox-prev {
  left: 6px;
}

.lightbox-next {
  right: 6px;
}

.lightbox-nav:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ===== 响应式适配 ===== */
@media (max-width: 1020px) {
  .archive-masonry {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 64px 18px 58px;
  }

  .hero-motif {
    width: 185px;
    right: -20px;
    bottom: 18px;
    opacity: 0.1;
  }

  .section-tabs-inner {
    padding: 8px 14px;
    gap: 8px;
  }

  .sec-tab {
    flex: 1;
    justify-content: center;
    padding: 6px 10px;
    font-size: 13px;
  }

  .cinema-main {
    padding: 36px 16px 0;
  }

  .note-p {
    font-size: 15.8px;
    line-height: 1.9;
  }

  .moment-card {
    padding: 16px 16px;
  }

  .archive-masonry {
    column-count: 1;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 瞬间内嵌媒体（图片 / 视频） ===== */
.moment-media {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.moment-media figure {
  margin: 0;
  min-width: 0;
  background: rgba(10, 12, 16, 0.5);
  border-radius: 10px;
  overflow: hidden;
}

.moment-media img,
.moment-media video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px 10px 0 0;
}

.moment-video {
  grid-column: 1 / -1;
}

.moment-video video {
  aspect-ratio: 16 / 9;
  background: #05060a;
}

.moment-media figcaption {
  padding: 8px 12px 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-muted, #a39e93);
}
