/* =========================================================
   写真页 · 实况相册
   ========================================================= */

/* ── 变量 ───────────────────────────────────────────── */
:root {
  color-scheme: light dark;
  --paper: #edeae3;
  --paper-2: #f6f4ee;
  --paper-3: #e2ded4;
  --ink: #171917;
  --ink-soft: #3d423e;
  --muted: #6a706a;
  --faint: #9aa099;
  --line: rgba(23, 25, 23, .14);
  --line-2: rgba(23, 25, 23, .07);
  --accent: #ab4a26;
  --viewer: #0a0b0a;
  --viewer-ink: #f4f2ec;
  --shadow: 0 26px 64px rgba(28, 32, 29, .13);
  --masthead-bg: rgba(237, 234, 227, .84);
  --serif: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
  --sans: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .68, .28, 1);
  --gut: clamp(18px, 3.4vw, 44px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121311;
    --paper-2: #191b19;
    --paper-3: #212421;
    --ink: #f0eee7;
    --ink-soft: #cdcec7;
    --muted: #9a9f98;
    --faint: #6d726b;
    --line: rgba(240, 238, 231, .16);
    --line-2: rgba(240, 238, 231, .08);
    --accent: #e2805a;
    --shadow: 0 28px 70px rgba(0, 0, 0, .5);
    --masthead-bg: rgba(18, 19, 17, .8);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; scrollbar-width: none; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--paper-2); }

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

/* ── 胶片颗粒 + 顶部进度 ────────────────────────────── */
.grain {
  position: fixed; inset: -50%;
  z-index: 90; pointer-events: none;
  opacity: .28; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  animation: grain-shift 5s steps(6) infinite;
}
@media (prefers-color-scheme: dark) { .grain { mix-blend-mode: screen; opacity: .14; } }
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* 无 JS 时的提示条（正常情况下 noscript 内容不参与渲染） */
.nojs {
  padding: 12px clamp(18px,3.4vw,44px);
  background: var(--accent); color: #fff;
  font-size: 13px; text-align: center;
}
.nojs p { margin: 0; }

.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 95; background: var(--line-2); }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 90ms linear; }

/* ── 页眉 ───────────────────────────────────────────── */
.masthead {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gut);
  padding-top: calc(14px + env(safe-area-inset-top));
  background: var(--masthead-bg);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
.brand-cn { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: .14em; }
.brand-en { font-size: 9px; letter-spacing: .3em; color: var(--faint); }
.masthead-nav { display: flex; align-items: center; gap: 14px; }
.masthead-count { font-size: 11px; letter-spacing: .18em; color: var(--faint); font-variant-numeric: tabular-nums; }


.ghost-btn {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink);
  font-size: 12px; letter-spacing: .1em; text-decoration: none; cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.ghost-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ghost-btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ghost-btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* 次要入口：与主入口同形同边框，仅降低存在感，hover 也不做实心填充 */
.ghost-btn--quiet { color: var(--faint); }
.ghost-btn--quiet:hover {
  background: transparent; border-color: var(--accent); color: var(--accent);
}

/* ── 开篇 ───────────────────────────────────────────── */
.opening {
  position: relative;
  padding: clamp(64px, 13vh, 168px) var(--gut) clamp(48px, 8vh, 104px);
  border-bottom: 1px solid var(--line);
}
.opening-kicker {
  margin: 0 0 clamp(20px, 3vh, 34px);
  font-size: 10px; letter-spacing: .42em; text-transform: uppercase; color: var(--faint);
}
.opening-title {
  margin: 0;
  max-width: 15em;
  font-family: var(--serif);
  font-size: clamp(46px, 11.5vw, 148px);
  font-weight: 500; line-height: 1.02; letter-spacing: -.04em;
}
.opening-title span { display: block; }
.opening-title span:last-child { padding-left: .62em; }   /* 悬挂缩进，制造错位 */
.opening-meta {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: clamp(20px, 5vw, 64px);
  margin-top: clamp(34px, 6vh, 66px);
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
}
.opening-body { margin: 0; max-width: 30em; color: var(--ink-soft); font-size: clamp(14px, 1.5vw, 16px); line-height: 1.95; }
.opening-hint {
  display: flex; align-items: center; gap: 11px; margin: 0;
  font-size: 12px; letter-spacing: .08em; color: var(--muted);
}
.opening-side {
  position: absolute; right: var(--gut); top: clamp(64px, 13vh, 168px);
  margin: 0; writing-mode: vertical-rl;
  font-family: var(--serif); font-size: 12px; letter-spacing: .5em; color: var(--faint);
}
@media (max-width: 860px) { .opening-side { display: none; } }

/* 按住提示环 */
.press-ring {
  position: relative; flex: 0 0 auto; width: 20px; height: 20px;
  border: 1px solid currentColor; border-radius: 50%;
}
.press-ring::after {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(.5); opacity: .45; }
}

/* ── 封面 ───────────────────────────────────────────── */
.cover { padding: clamp(20px, 3.4vw, 48px) var(--gut) clamp(30px, 5vw, 70px); }
.shot--cover { grid-template-columns: 1fr; gap: 16px; }
.shot--cover .shot-media { aspect-ratio: 16 / 9; }
.shot--cover .shot-media img, .shot--cover .shot-media video { object-position: 50% 58%; }
.cover-cap {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding-bottom: 4px; border-bottom: 1px solid var(--line-2);
}
.cover-cap .cap-num { font-size: 11px; letter-spacing: .2em; color: var(--accent); }
.cover-cap .cap-title { font-family: var(--serif); font-size: clamp(18px, 2.4vw, 26px); font-weight: 500; }
.cover-cap .cap-place { margin-left: auto; font-size: 11px; letter-spacing: .16em; color: var(--faint); }

/* ── 写真集网格 ─────────────────────────────────────── */
.sheet { padding: clamp(30px, 5vw, 72px) var(--gut) clamp(56px, 9vw, 130px); }
.sheet-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 54px);
  padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.sheet-head h2 {
  margin: 0; font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 40px); font-weight: 500; letter-spacing: .02em;
}
.sheet-note { margin: 0; font-size: 11px; letter-spacing: .18em; color: var(--faint); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 40px) clamp(12px, 1.8vw, 24px);
  align-items: start;
}

/* 不对称编排：图 7 / 图 5 / 图 4 …，文字块穿插 */
.gnote--lead   { grid-column: 3 / span 5; }
.gnote--index  { grid-column: 9 / span 4; align-self: center; }
.gnote--field  { grid-column: 2 / span 4; }

.shot { margin: 0; cursor: pointer; }
/* 卡片只需垂直滚动：横向手势留给自己处理，
   同时避免浏览器因方向判定接管而不派发 pointermove */
.shot { touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.grid > .shot:nth-of-type(1) { grid-column: 1 / span 7; }
.grid > .shot:nth-of-type(2) { grid-column: 8 / span 5; }
.grid > .shot:nth-of-type(3) { grid-column: 1 / span 4; }
.grid > .shot:nth-of-type(4) { grid-column: 5 / span 4; }
.grid > .shot:nth-of-type(5) { grid-column: 9 / span 4; }
.grid > .shot:nth-of-type(6) { grid-column: 1 / span 5; }
.grid > .shot:nth-of-type(7) { grid-column: 6 / span 7; }
.grid > .shot:nth-of-type(8) { grid-column: 6 / span 7; }
.grid > .shot:nth-of-type(9) { grid-column: 1 / span 12; }

.shot-media {
  position: relative; overflow: hidden;
  background: var(--paper-3);
  aspect-ratio: 4 / 3;
  border-radius: 2px;
  box-shadow: var(--shadow);
}
.shot--cover .shot-media { border-radius: 3px; }
/* 每张按原图比例就近取框，避免过度裁切 */
.grid > .shot:nth-of-type(4) .shot-media,
.grid > .shot:nth-of-type(5) .shot-media { aspect-ratio: 4 / 5; }   /* 竖图 */
.grid > .shot:nth-of-type(7) .shot-media { aspect-ratio: 3 / 2; }
.grid > .shot:nth-of-type(8) .shot-media { aspect-ratio: 3 / 2; }
.grid > .shot:nth-of-type(9) .shot-media { aspect-ratio: 16 / 9; }  /* 收尾通栏 */

.shot-media img,
.shot-media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none;
}
.shot-media img { transition: transform 900ms var(--ease), filter 400ms ease; }
.shot-media video { opacity: 0; transition: opacity 120ms linear; }
.shot.is-live .shot-media video { opacity: 1; }
.shot.is-live .shot-media img { filter: brightness(.82) saturate(1.05); }
.shot:hover .shot-media img { transform: scale(1.022); }
.shot:active .shot-media { transform: scale(.988); }
.shot { transition: transform 180ms var(--ease); }
.shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.shot:focus-visible .shot-media { outline: none; }

/* 加载骨架 */
.shot-media::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(100deg, var(--paper-3) 34%, var(--paper-2) 50%, var(--paper-3) 66%);
  background-size: 220% 100%;
  animation: sweep 1.5s linear infinite;
  transition: opacity 300ms ease;
}
.shot-media.ready::before { opacity: 0; animation: none; }
.shot-media img { opacity: 0; transition: opacity 500ms ease, transform 900ms var(--ease); }
.shot-media.ready img { opacity: 1; }
@keyframes sweep { to { background-position: -220% 0; } }

/* LIVE 状态标：静止时极轻，按住时才完全显形 */
.shot-live {
  position: absolute; z-index: 3; left: 12px; top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 26px; padding: 0 11px; border-radius: 999px;
  background: rgba(12, 14, 13, .34);
  color: rgba(255, 255, 255, .78);
  font-size: 10px; letter-spacing: .2em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: .5; transition: opacity 200ms ease, background 200ms ease, color 200ms ease;
  pointer-events: none;
}
.shot.is-live .shot-live { opacity: 1; background: rgba(12, 14, 13, .62); color: #fff; }
.live-dots { position: relative; width: 9px; height: 9px; flex: 0 0 auto; }
.live-dots::before, .live-dots::after {
  content: ""; position: absolute; border-radius: 50%;
}
.live-dots::before { inset: 0; border: 1px solid currentColor; opacity: .85; }
.live-dots::after { inset: 3px; background: currentColor; }
.shot.is-live .live-dots::before, .viewer-frame.is-live .live-dots::before { animation: ring 1.4s var(--ease) infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: .85; } 100% { transform: scale(2.3); opacity: 0; } }

/* 图注 */
.cap {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 14px;
  margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line-2);
}
.cap-num { font-size: 11px; font-weight: 500; letter-spacing: .16em; color: var(--accent); font-variant-numeric: tabular-nums; }
.cap-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cap-title { font-family: var(--serif); font-size: 15px; font-weight: 500; letter-spacing: .01em; }
.cap-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.cap-place { font-size: 10.5px; letter-spacing: .14em; color: var(--faint); white-space: nowrap; }

/* ── 文字块 ─────────────────────────────────────────── */
.gnote { align-self: center; color: var(--ink-soft); }
.gnote-kicker {
  margin: 0 0 14px;
  font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--faint);
}
.gnote-kicker::after { content: ""; display: block; width: 34px; height: 1px; margin-top: 12px; background: var(--accent); }
.gnote-vertical {
  margin: 0 0 18px; writing-mode: vertical-rl;
  font-family: var(--serif); font-size: 13px; letter-spacing: .38em; color: var(--ink);
}
.gnote-head {
  margin: 0 0 18px; font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; line-height: 1.35; letter-spacing: -.01em;
  color: var(--ink);
}
.gnote-label {
  margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--faint);
}
.gnote-body { margin: 0; font-size: 13.5px; line-height: 2; color: var(--muted); }
.gnote-rows { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 20px 0 0; font-size: 12.5px; }
.gnote-rows dt { color: var(--faint); letter-spacing: .1em; }
.gnote-rows dd { margin: 0; color: var(--ink); }
.gnote-quote {
  margin: 22px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line-2);
  font-family: var(--serif); font-size: 14px; line-height: 2; color: var(--ink);
}
.gnote-hint { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; font-size: 11.5px; letter-spacing: .06em; color: var(--faint); }

/* ── 页脚 ───────────────────────────────────────────── */
.colophon {
  padding: clamp(56px, 9vw, 120px) var(--gut) calc(clamp(64px, 10vh, 130px) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); text-align: center;
}
.colophon-line {
  margin: 0 0 14px; font-family: var(--serif);
  font-size: clamp(19px, 2.6vw, 28px); font-weight: 500; letter-spacing: .06em;
}
.colophon-sub { margin: 0 0 30px; font-size: 13px; color: var(--muted); }

/* ── 查看器 ─────────────────────────────────────────── */
.viewer {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--viewer);
  color: var(--viewer-ink);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}
.viewer.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 240ms ease; }
body.viewer-open { overflow: hidden; }

.viewer-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
}
.viewer-bar--top { padding-top: calc(14px + env(safe-area-inset-top)); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.viewer-bar--bottom { padding-bottom: calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, .07); gap: 10px; }
.viewer-bar--bottom .play-btn { margin-left: auto; }
.viewer-title { flex: 1; font-family: var(--serif); font-size: 14px; font-weight: 500; letter-spacing: .08em; }
.viewer-counter { font-size: 11px; letter-spacing: .2em; color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.viewer-cap {
  flex: 1; text-align: center; font-size: 11.5px; letter-spacing: .04em;
  color: rgba(255, 255, 255, .42); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 720px) { .viewer-cap { display: none; } }

.icon-btn {
  display: inline-grid; place-items: center; gap: 8px;
  width: 44px; min-height: 44px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
  background: rgba(255, 255, 255, .07); color: inherit;
  cursor: pointer; transition: background 160ms ease, border-color 160ms ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn--wide {
  width: auto; padding: 0 16px; grid-auto-flow: column; place-items: center;
  font-size: 12px; letter-spacing: .12em;
}
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* 按住播放：与"保存"并排，是查看器里唯一会触发起播的控件 */
.play-btn { transition: background 140ms ease, border-color 140ms ease, color 140ms ease; }
.play-btn svg { fill: currentColor; stroke: none; }
.play-btn.holding {
  background: #f4f1e9; border-color: #f4f1e9; color: #16181a;
}
.play-btn.holding svg { fill: currentColor; }

.viewer-stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; }

/* 模糊底衬：当前封面填充留白，避免大片死黑且不干扰主体 */
.viewer-stage::before {
  content: "";
  position: absolute; inset: -6%;
  background: var(--frame-img, none) center / cover no-repeat;
  filter: blur(46px) brightness(.38) saturate(1.15);
  transform: scale(1.08);
  opacity: 0; transition: opacity 420ms ease;
  pointer-events: none;
}
.viewer.has-frame::before { opacity: 1; }

.viewer-frame {
  position: absolute; inset: 0;
  display: grid; place-items: center; overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
/* 关键：按原生像素 1:1 显示，绝不放大。
   960x720 拉到 2680 宽就是插值模糊，宁可留白。 */
.viewer-frame img,
.viewer-frame video {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: auto; height: auto;
  object-fit: contain;
  background: transparent;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: opacity 110ms linear;
}
/* 封面 jpg 有 4 倍像素，可放到自身原生尺寸 */
.viewer-frame img {
  max-width: min(100%, var(--iw, 100%));
  max-height: min(100%, var(--ih, 100%));
}
/* 视频严格 1:1，绝不放大 —— 这是清晰度的关键 */
.viewer-frame video {
  max-width: min(100%, var(--vw, 100%));
  max-height: min(100%, var(--vh, 100%));
}
.viewer-frame video { opacity: 0; }
.viewer-frame.is-live video { opacity: 1; }
.viewer-frame { cursor: grab; }          /* 提示可拖动切换 */
.viewer-frame.dragging { transition: none; cursor: grabbing; }
.viewer-frame:focus-visible { outline: none; }
.viewer-frame:focus-visible::after {
  content: ""; position: absolute; inset: 8px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 3px; pointer-events: none;
}

.viewer-badge {
  position: absolute; z-index: 3; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 0 18px; border-radius: 999px;
  background: rgba(20, 20, 20, .6); color: rgba(255, 255, 255, .72);
  font-size: 12.5px; letter-spacing: .06em;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background 160ms ease, color 160ms ease, transform 200ms var(--ease);
  pointer-events: none;
}
.viewer-badge em { font-style: normal; }
.viewer-frame.is-live .viewer-badge { background: rgba(244, 242, 236, .93); color: #16181a; }
.viewer-frame.is-live .viewer-badge { transform: translateX(-50%) translateY(-4px); }
/* 上滑蓄力：提示条 */
.viewer-frame.arming .viewer-badge { background: rgba(244, 242, 236, .93); color: #16181a; }
.viewer-frame.arming .viewer-badge em::after { content: " · 松手保存"; }

.nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; }
.nav--prev { left: max(12px, env(safe-area-inset-left)); }
.nav--next { right: max(12px, env(safe-area-inset-right)); }
@media (max-width: 820px) { .nav { display: none; } }

.toast {
  position: absolute; z-index: 8; left: 50%; bottom: 96px; transform: translate(-50%, 10px);
  padding: 9px 17px; border-radius: 999px;
  background: rgba(244, 242, 236, .95); color: #16181a;
  font-size: 12.5px; letter-spacing: .04em; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 260ms var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 保存面板 */
.sheet-modal {
  position: absolute; inset: 0; z-index: 10;
  display: grid; align-items: end;
  padding: 18px max(18px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 180ms ease, visibility 0s linear 180ms;
}
.sheet-modal.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 180ms ease; }
.sheet-modal-panel {
  width: min(440px, 100%); margin: 0 auto;
  padding: 24px 22px 18px;
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px;
  background: #191c1a; color: var(--viewer-ink);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5);
  transform: translateY(14px); transition: transform 280ms var(--ease);
}
.sheet-modal.open .sheet-modal-panel { transform: none; }
.sheet-modal-panel h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 17px; font-weight: 500; }
.sheet-modal-panel p { margin: 0 0 20px; font-size: 12.5px; line-height: 1.7; color: rgba(255, 255, 255, .58); }
.sheet-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mbtn {
  min-height: 48px; padding: 0 14px;
  border: 0; border-radius: 13px;
  background: rgba(255, 255, 255, .09); color: #fff;
  font-size: 13.5px; letter-spacing: .04em; cursor: pointer;
  transition: background 160ms ease;
}
.mbtn:hover { background: rgba(255, 255, 255, .16); }
.mbtn--primary { background: #f4f1e9; color: #151715; }
.mbtn--primary:hover { background: #fff; }
.mbtn--ghost { width: 100%; margin-top: 8px; background: transparent; color: rgba(255, 255, 255, .5); }
.mbtn--ghost:hover { background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .8); }

/* ── 响应式 ─────────────────────────────────────────── */
@media (max-width: 1080px) {
  .gnote--lead  { grid-column: 1 / span 6; }
  .gnote--index { grid-column: 8 / span 5; }
  .gnote--field { grid-column: 1 / span 5; }
  .grid > .shot:nth-of-type(1) { grid-column: 1 / span 8; }
  .grid > .shot:nth-of-type(2) { grid-column: 1 / span 6; }
  .grid > .shot:nth-of-type(3) { grid-column: 7 / span 6; }
  .grid > .shot:nth-of-type(4) { grid-column: 1 / span 5; }
  .grid > .shot:nth-of-type(5) { grid-column: 6 / span 5; }
  .grid > .shot:nth-of-type(6) { grid-column: 1 / span 6; }
  .grid > .shot:nth-of-type(7) { grid-column: 1 / span 12; }
  .grid > .shot:nth-of-type(8) { grid-column: 1 / span 7; }
  .grid > .shot:nth-of-type(9) { grid-column: 1 / span 12; }
}

@media (max-width: 720px) {
  .opening { padding-top: clamp(48px, 9vh, 88px); }
  .opening-title { font-size: clamp(40px, 14vw, 68px); }
  .opening-meta { flex-direction: column; align-items: flex-start; gap: 22px; }
  .cover { padding-left: 0; padding-right: 0; }
  .cover-cap { padding: 0 var(--gut); flex-direction: column; gap: 7px; align-items: flex-start; }
  .cover-cap .cap-place { margin-left: 0; }
  .shot--cover .shot-media { aspect-ratio: 4 / 5; border-radius: 0; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .grid > .shot, .gnote--lead, .gnote--index, .gnote--field { grid-column: 1 / -1 !important; }
  .grid > .shot .shot-media,
  .grid > .shot:nth-of-type(4) .shot-media,
  .grid > .shot:nth-of-type(5) .shot-media,
  .grid > .shot:nth-of-type(7) .shot-media,
  .grid > .shot:nth-of-type(8) .shot-media { aspect-ratio: 4 / 3; }
  /* 竖图在窄屏保持竖构图，避免拦腰裁断 */
  .grid > .shot--portrait .shot-media { aspect-ratio: 3 / 4; }
  .gnote--index .gnote-vertical { writing-mode: horizontal-tb; letter-spacing: .3em; }
  .cap { grid-template-columns: auto 1fr; row-gap: 6px; }
  .cap-place { grid-column: 2; }
  .viewer-badge { bottom: 18px; }
  .grain { opacity: .2; }
}

@media (max-width: 400px) {
  .brand-en, .masthead-count { display: none; }
  .opening-title { font-size: 40px; }
}

/* ── 无障碍 / 降级 ──────────────────────────────────── */
/* 桌面端闲置时淡出控件，鼠标一动即恢复 */
@media (hover: hover) and (pointer: fine) {
  .viewer-bar, .nav, .viewer-badge { transition: opacity 320ms ease; }
  .viewer.idle .viewer-bar,
  .viewer.idle .nav,
  .viewer.idle .viewer-badge { opacity: 0; pointer-events: none; }
}

@media (hover: none) { .shot:hover .shot-media img { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { animation: none; }
  .shot:hover .shot-media img { transform: none; }
  /* 静止呈现：实况一律不自动播放 */
  .shot-media video { display: none; }
}
