/* 幕间漫游 · 3 号模块「影 诗」 */
:root {
  --bg-dark: #0e1013;
  --bg-elevated: #15181e;
  --bg-card: #191d24;
  --ink-light: #f4efe6;
  --ink-muted: #a69d8e;
  --ink-subtle: #787066;
  --amber: #d9a962;
  --amber-soft: rgba(217, 169, 98, 0.16);
  --line-dark: rgba(247, 242, 232, 0.12);

  /* Archival paper palette */
  --paper-bg: #f7f2e8;
  --paper-edge: #ede4d3;
  --paper-ink: #1f1b16;
  --paper-ink-secondary: #5a5043;
  --paper-ink-muted: #7a6f5f;
  --paper-accent: #8f6224;
  --paper-rule: rgba(68, 54, 38, 0.16);

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

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--ink-light);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: clip;
  padding-bottom: 104px; /* Leave room for the fixed return link. */
}

.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 68% 46% at 18% 0%, rgba(217, 169, 98, 0.1), transparent 68%),
    radial-gradient(ellipse 52% 42% at 86% 18%, rgba(164, 134, 96, 0.06), transparent 65%);
}

/* Header */
.exhibit-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line-dark);
  background: linear-gradient(180deg, rgba(20, 23, 29, 0.92), rgba(14, 16, 19, 0.86));
}

.header-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 36px 28px 0;
}

.header-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
}

.exhibit-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.15;
  color: #fbf7ef;
}

.header-motif {
  width: 104px;
  height: auto;
  opacity: 0.22;
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 18px rgba(217, 169, 98, 0.12));
}

/* Top Tabs */
.tab-bar {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-top: 4px;
}

.tab-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 13px 18px 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  position: relative;
  transition: color 0.2s ease;
  min-height: 46px;
}

.tab-btn::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.tab-btn:hover {
  color: var(--ink-light);
}

.tab-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -3px;
  border-radius: 6px;
}

.tab-btn.is-active {
  color: #fff9ef;
}

.tab-btn.is-active::after {
  transform: scaleX(1);
}

/* Main */
.exhibit-main {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 36px 28px 24px;
}

.tab-panel[hidden] {
  display: none !important;
}

/* =========================================================
   TAB 1: ARTICLES (ARCHIVAL PAPER READING EXPERIENCE)
   ========================================================= */
.articles-layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.article-rail {
  position: sticky;
  top: 24px;
}

.rail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px 12px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-dark);
}

.rail-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--amber);
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-item {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(247, 242, 232, 0.08);
  background: rgba(25, 29, 36, 0.56);
  color: var(--ink-light);
  border-radius: 10px;
  padding: 13px 14px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.article-item:hover {
  background: rgba(34, 39, 49, 0.85);
  border-color: rgba(217, 169, 98, 0.3);
}

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

.article-item.is-active {
  background: rgba(247, 242, 232, 0.1);
  border-color: rgba(217, 169, 98, 0.62);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.article-item-main {
  min-width: 0;
}

.article-item-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.article-item-author {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-item-title {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #f9f4eb;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-item-motif {
  width: 34px;
  height: 34px;
  object-fit: contain;
  opacity: 0.22;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.article-item.is-active .article-item-motif,
.article-item:hover .article-item-motif {
  opacity: 0.58;
}

/* Warm Archival Paper Sheet */
.reading-stage {
  min-width: 0;
}

.letter-sheet {
  position: relative;
  overflow: hidden;
  background-color: var(--paper-bg);
  background-image:
    radial-gradient(circle at 14% 12%, rgba(255, 252, 245, 0.72), transparent 52%),
    radial-gradient(circle at 88% 88%, rgba(214, 193, 158, 0.26), transparent 58%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.45), rgba(242, 234, 219, 0.35));
  color: var(--paper-ink);
  border-radius: 6px;
  border: 1px solid rgba(235, 223, 200, 0.75);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 2px 10px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65),
    inset 0 0 60px rgba(173, 145, 102, 0.1);
  padding: 56px clamp(24px, 5vw, 72px) 60px;
  animation: sheetReveal 0.32s ease;
}

@keyframes sheetReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle Hand-drawn Motif Watermark on Paper */
.paper-watermark {
  position: absolute;
  top: 26px;
  right: 26px;
  width: clamp(138px, 21vw, 220px);
  max-height: 220px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  /* Pure white outline PNG/SVG inverted into warm sepia archival letterpress ink */
  filter: invert(1) sepia(0.38) brightness(0.44);
  opacity: 0.1;
  mix-blend-mode: multiply;
}

.paper-watermark--sprig {
  width: clamp(112px, 16vw, 170px);
  top: 20px;
  right: 24px;
  opacity: 0.11;
}

.paper-watermark--bottom {
  position: absolute;
  left: -18px;
  bottom: 44px;
  width: 150px;
  max-height: 150px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  filter: invert(1) sepia(0.38) brightness(0.44);
  opacity: 0.055;
  mix-blend-mode: multiply;
}

.sheet-inner {
  position: relative;
  z-index: 1;
  max-width: 68ch;
  margin: 0 auto;
}

.share-article-btn {
  appearance: none;
  border: 1px solid rgba(143, 98, 36, 0.34);
  background: rgba(143, 98, 36, 0.06);
  color: var(--paper-accent);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.share-article-btn:hover {
  background: rgba(143, 98, 36, 0.14);
  border-color: rgba(143, 98, 36, 0.6);
  color: #6b4613;
}

.share-article-btn:focus-visible {
  outline: 2px solid var(--paper-accent);
  outline-offset: 2px;
}

.sheet-header {
  margin-bottom: 34px;
}

.sheet-title {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.04em;
  color: #191510;
  padding-right: 48px;
}

.sheet-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-size: 14px;
  color: var(--paper-ink-secondary);
}

.sheet-author {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--paper-ink);
}

/* Article Body Typography */
.sheet-body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.88;
  color: var(--paper-ink);
  letter-spacing: 0.015em;
}

.sheet-body p {
  margin: 0 0 1.25em;
  text-align: left;
  white-space: pre-line;
  overflow-wrap: break-word;
}

.sheet-body p.is-subtitle {
  margin: 2.2em 0 1em;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #2b2116;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--paper-rule);
}

.sheet-body p.is-subtitle:first-child {
  margin-top: 0.4em;
}

.sheet-body p.is-section-heading {
  margin: 2em 0 0.85em;
  font-size: 18px;
  font-weight: 700;
  color: #2b2116;
  letter-spacing: 0.03em;
}

.sheet-body p.is-epigraph {
  margin: 0.8em 0 1.6em;
  padding: 12px 18px;
  border-left: 2px solid rgba(143, 98, 36, 0.42);
  background: rgba(143, 98, 36, 0.045);
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--paper-ink-secondary);
  font-style: italic;
}

.sheet-body p.is-signature {
  margin: 0.35em 0;
  text-align: right;
  color: var(--paper-ink-secondary);
}

/* Poetic short-line cadence for Xiaowen & Zige */
.sheet-body.is-poetic p {
  margin-bottom: 0.72em;
  line-height: 1.92;
}

.sheet-body.is-poetic p.is-stanza-break {
  margin-top: 1.45em;
}

/* Tables & inline images support (for future-proof 100% block preservation) */
.sheet-table-wrap {
  margin: 1.6em 0;
  overflow-x: auto;
  border: 1px solid var(--paper-rule);
  border-radius: 4px;
}

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
}

.sheet-table th,
.sheet-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--paper-rule);
  text-align: left;
  vertical-align: top;
}

.sheet-table th {
  background: rgba(143, 98, 36, 0.08);
  font-weight: 600;
}

.sheet-inline-figure {
  margin: 1.8em 0;
}

.sheet-inline-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  cursor: zoom-in;
}

.inline-photo-trigger {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.sheet-inline-figure figcaption {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--paper-ink-muted);
  text-align: center;
}

/* Article Photo Gallery */
.sheet-gallery {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-rule);
}

.gallery-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.gallery-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--paper-ink);
  letter-spacing: 0.06em;
}

.gallery-tip {
  font-size: 12px;
  color: var(--paper-ink-muted);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.photo-card {
  margin: 0;
  background: #fffdf8;
  padding: 8px 8px 10px;
  border: 1px solid rgba(68, 54, 38, 0.14);
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(45, 34, 20, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(45, 34, 20, 0.12);
}

.photo-trigger {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  display: block;
  cursor: zoom-in;
  text-align: left;
}

.photo-trigger:focus-visible {
  outline: 2px solid var(--paper-accent);
  outline-offset: 2px;
}

.photo-thumb-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: #e7decb;
}

.photo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.photo-card:hover .photo-thumb {
  transform: scale(1.03);
}

.photo-caption {
  margin-top: 8px;
  padding: 0 2px;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--paper-ink-secondary);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.photo-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper-ink-muted);
  flex-shrink: 0;
}

/* Sheet Footer Navigation */
.sheet-footer {
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--paper-rule);
}

.sheet-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pager-btn {
  appearance: none;
  border: 1px solid rgba(68, 54, 38, 0.16);
  background: rgba(255, 253, 248, 0.6);
  color: var(--paper-ink);
  border-radius: 6px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pager-btn--next {
  text-align: right;
}

.pager-btn:hover {
  background: #fffdf8;
  border-color: rgba(143, 98, 36, 0.45);
}

.pager-btn:focus-visible {
  outline: 2px solid var(--paper-accent);
  outline-offset: 2px;
}

.pager-dir {
  display: block;
  font-size: 11px;
  color: var(--paper-ink-muted);
  margin-bottom: 3px;
}

.pager-title {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--paper-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   TAB 2: SHORT VIDEOS (DARKROOM GALLERY GRID)
   ========================================================= */
.platform-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-pill {
  appearance: none;
  border: 1px solid rgba(247, 242, 232, 0.14);
  background: rgba(25, 29, 36, 0.7);
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 12.5px;
  cursor: pointer;
  min-height: 36px;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  color: var(--ink-light);
  border-color: rgba(217, 169, 98, 0.38);
}

.filter-pill.is-active {
  background: var(--amber-soft);
  border-color: rgba(217, 169, 98, 0.65);
  color: #fce2b6;
}

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

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.video-card {
  background: linear-gradient(180deg, rgba(27, 31, 39, 0.92), rgba(20, 23, 29, 0.96));
  border: 1px solid rgba(247, 242, 232, 0.1);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: border-color 0.22s ease, transform 0.22s ease;
}

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

.video-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.platform-badge--bili {
  background: rgba(251, 114, 153, 0.14);
  border: 1px solid rgba(251, 114, 153, 0.34);
  color: #ffadc4;
}

.platform-badge--douyin {
  background: rgba(110, 231, 245, 0.12);
  border: 1px solid rgba(110, 231, 245, 0.3);
  color: #a6f2fb;
}

.platform-badge--wechat {
  background: rgba(94, 212, 134, 0.14);
  border: 1px solid rgba(94, 212, 134, 0.32);
  color: #a9efc0;
}

.video-info {
  min-height: 70px;
}

.video-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  color: #fbf7ef;
  overflow-wrap: anywhere;
}

.video-author {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.video-author strong {
  color: var(--amber);
  font-weight: 500;
}

/* QR Stage */
.video-qr-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px 14px;
  border-radius: 10px;
  background: rgba(11, 13, 16, 0.62);
  border: 1px solid rgba(247, 242, 232, 0.07);
}

.qr-frame {
  appearance: none;
  border: 0;
  padding: 10px;
  background: #ffffff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.34);
  transition: transform 0.2s ease;
}

.qr-frame:hover {
  transform: scale(1.025);
}

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

.qr-frame svg {
  display: block;
  width: 148px;
  height: 148px;
}

.qr-frame--photo {
  padding: 6px;
}

.qr-frame--photo img {
  display: block;
  width: 156px;
  height: 156px;
  object-fit: contain;
  border-radius: 4px;
}

.qr-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
  text-align: center;
}

.qr-hint--wechat {
  color: #a9efc0;
}

/* Video Actions */
.video-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v-btn {
  appearance: none;
  width: 100%;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.v-btn--primary {
  background: var(--amber);
  color: #16130e;
  border: 1px solid var(--amber);
}

.v-btn--primary:hover {
  background: #e5ba78;
  border-color: #e5ba78;
}

.v-btn--secondary {
  background: rgba(247, 242, 232, 0.06);
  color: var(--ink-light);
  border: 1px solid rgba(247, 242, 232, 0.16);
}

.v-btn--secondary:hover {
  background: rgba(247, 242, 232, 0.13);
  border-color: rgba(217, 169, 98, 0.45);
}

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

/* =========================================================
   LIGHTBOX & TOAST
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 12, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  max-width: min(960px, 94vw);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

.lightbox-media img {
  display: block;
  max-width: min(840px, 84vw);
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  background: #14161a;
}

.lightbox-media .lb-qr-box {
  background: #ffffff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}

.lightbox-media .lb-qr-box svg {
  display: block;
  width: min(260px, 68vw);
  height: min(260px, 68vw);
}

.lightbox-media .lb-qr-box img {
  display: block;
  width: min(280px, 72vw);
  height: auto;
  max-height: 68vh;
  background: #ffffff;
  box-shadow: none;
}

.lightbox-caption {
  margin-top: 14px;
  font-size: 13.5px;
  color: #e7dfd1;
  text-align: center;
  max-width: 60ch;
}

.lightbox-close {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(18, 20, 24, 0.8);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(217, 169, 98, 0.3);
}

.lightbox-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(18, 20, 24, 0.72);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav[hidden] {
  display: none !important;
}

.lightbox-nav:hover {
  background: rgba(217, 169, 98, 0.28);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(74px, calc(env(safe-area-inset-bottom) + 64px));
  transform: translateX(-50%);
  z-index: 9900;
  background: rgba(22, 25, 31, 0.96);
  color: #fff8eb;
  border: 1px solid rgba(217, 169, 98, 0.45);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  max-width: calc(100vw - 32px);
  text-align: center;
}

.loading-state,
.error-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--paper-ink-muted);
  font-family: var(--font-body);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1020px) {
  .articles-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .article-rail {
    position: static;
  }

  .article-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .article-item {
    flex: 0 0 232px;
    scroll-snap-align: start;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .header-inner {
    padding: 24px 16px 0;
  }

  .header-title-row {
    padding-bottom: 16px;
  }

  .header-motif {
    width: 68px;
    opacity: 0.18;
  }

  .tab-bar {
    gap: 2px;
  }

  .tab-btn {
    padding: 12px 10px 13px;
    font-size: 14px;
    gap: 6px;
  }

  .exhibit-main {
    padding: 22px 14px 20px;
  }

  .letter-sheet {
    padding: 28px 18px 34px;
    border-radius: 4px;
  }

  .paper-watermark {
    top: 14px;
    right: 12px;
    width: 112px;
    opacity: 0.085;
  }

  .sheet-title {
    padding-right: 18px;
    font-size: 22px;
  }

  .sheet-body {
    font-size: 16px;
    line-height: 1.85;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .sheet-pager {
    grid-template-columns: 1fr;
  }

  .pager-btn--next {
    text-align: left;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lightbox-frame {
    gap: 6px;
  }

  .lightbox-nav {
    position: fixed;
    bottom: 24px;
    width: 44px;
    height: 44px;
  }

  .lightbox-prev {
    left: calc(50% - 58px);
  }

  .lightbox-next {
    right: calc(50% - 58px);
  }
}

@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;
  }
}
