/* =========================================================
   于昭清晏 / Y.Z.Q.Y — 极简纯黑作品集
   纯静态 · 无外部依赖 · 无 CDN
   ========================================================= */

:root {
  --bg: #000000;
  --fg: #f5f5f5;
  --muted: rgba(245, 245, 245, 0.52);
  --faint: rgba(245, 245, 245, 0.30);
  --line: rgba(245, 245, 245, 0.14);
  --line-soft: rgba(245, 245, 245, 0.08);

  --pad-x: clamp(20px, 5.4vw, 88px);
  --header-h: 76px;

  /* 页面底部留白与页脚上内边距抽成变量：收尾引文需精确抵消这两段留白 */
  --page-pad-b: clamp(72px, 11vw, 160px);
  --footer-pad-t: 34px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--fg);
  color: #000;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 18px;
  background: var(--fg);
  color: #000;
  font-size: 12px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------------- Header ---------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  padding: 0 var(--pad-x);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  transition: background 0.45s var(--ease), backdrop-filter 0.45s var(--ease);
}

body[data-page="home"] .site-header.is-scrolled::before {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.site-header.is-solid::before {
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-size: 13px;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.brand-zh {
  font-weight: 300;
}

.brand-sep {
  color: var(--faint);
}

.brand-en {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: var(--muted);
  text-transform: uppercase;
}

.site-nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.42em;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.35s var(--ease);
}

.nav-link .nav-sep {
  color: var(--faint);
}

.nav-link .nav-en {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--fg);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link.is-current {
  color: var(--fg);
}

.nav-link.is-current::after {
  transform: scaleX(1);
}

/* ---------------- Home / Hero ---------------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.hero-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 22%),
    linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.18) 32%, rgba(0, 0, 0, 0) 60%);
}

/* 名字与按钮同处左下角：名字贴按钮正上方，共用左侧对齐线 */
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: clamp(24px, 2.6vw, 32px);
  height: 100%;
  padding: 0 var(--pad-x) clamp(44px, 9vh, 104px);
}

.hero-name {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vw, 8px);
  font-weight: 300;
}

/* 名字刻意弱化：小字号、轻字重，让主视觉大图成为唯一主体 */
.hero-name-zh {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.44em;
  line-height: 1.5;
  color: rgba(245, 245, 245, 0.85);
}

.hero-name-en {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.36em;
  line-height: 1.5;
  color: rgba(245, 245, 245, 0.85);
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  padding: 14px 28px;
  border: 1px solid rgba(245, 245, 245, 0.6);
  background: rgba(0, 0, 0, 0.26);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--fg);
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.btn-sep {
  color: var(--faint);
  transition: color 0.4s var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background: var(--fg);
  border-color: var(--fg);
  color: #000;
}

.btn:hover .btn-sep,
.btn:focus-visible .btn-sep {
  color: rgba(0, 0, 0, 0.4);
}

/* ---------------- Inner pages ---------------- */

.page {
  padding: calc(var(--header-h) + clamp(56px, 9vw, 132px)) var(--pad-x) var(--page-pad-b);
}

.page-head {
  max-width: 1440px;
}

.page-title {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1.3;
}

.page-title .sep {
  color: var(--faint);
  font-weight: 300;
}

.page-title .en {
  font-size: 0.62em;
  letter-spacing: 0.26em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------------- Filters ---------------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(28px, 5vw, 72px);
  margin-top: clamp(40px, 6vw, 76px);
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line-soft);
}

.filter-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.filter-label {
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--faint);
  text-transform: uppercase;
}

.chip {
  position: relative;
  padding: 2px 0 6px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.35s var(--ease);
}

.chip .chip-sep {
  color: var(--faint);
  margin: 0 0.34em;
  font-size: 0.92em;
}

.chip .chip-en {
  font-size: 0.9em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}

.chip:hover,
.chip:focus-visible {
  color: var(--fg);
}

.chip.is-active {
  color: var(--fg);
}

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

/* ---------------- Works grid ---------------- */

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
  gap: clamp(34px, 4.6vw, 76px) clamp(24px, 3vw, 54px);
  margin-top: clamp(38px, 5vw, 72px);
}

.work {
  margin: 0;
  animation: work-in 0.7s var(--ease) both;
}

@keyframes work-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.work-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #070707;
  cursor: zoom-in;
}

.work-media img {
  width: 100%;
  height: auto;
  transition: opacity 0.5s var(--ease);
}

.work-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(245, 245, 245, 0.07);
  pointer-events: none;
}

.work-media:hover img,
.work-media:focus-visible img {
  opacity: 0.88;
}

.work-media:focus-visible {
  outline: 1px solid var(--faint);
  outline-offset: 4px;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  margin-top: 16px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.work-title {
  color: var(--fg);
}

.work-title .sep,
.work-tags .sep,
.lb-title .sep {
  color: var(--faint);
  margin: 0 0.4em;
}

/* 作品名英文（通行拼音）：与中文同一行，字号略小、字距放宽、字色降一档形成层次 */
.work-title .title-en,
.lb-title .title-en {
  font-size: 0.86em;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* ---------------- Series ending card（系列收尾页：纯黑、无图、无边框、无 hover、不可点击） ---------------- */

/* 卡片外框与作品卡同宽；内部 4:3 占位盒与作品主图等比例，网格行高与相邻作品对齐 */
.work-ending {
  /* 无 cursor、无 tabindex、无点击态：收尾页不可交互、不进入灯箱 */
  cursor: default;
}

.work-ending-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0 clamp(20px, 5%, 48px);
  background: #000;
}

.work-ending-zh,
.work-ending-en {
  margin: 0;
  max-width: 100%;
  font-weight: 300;
  text-align: center;
  color: rgba(245, 245, 245, 0.75);
}

.work-ending-zh {
  font-size: 13.5px;
  line-height: 2;
  letter-spacing: 0.18em;
  /* 补偿末字后多出的一格字距，使中文视觉上真正居中 */
  text-indent: 0.18em;
}

.work-ending-en {
  /* 英文控制在 2 行内，避免挤压成三行以上 */
  max-width: 30em;
  font-size: 11.5px;
  line-height: 2.1;
  letter-spacing: 0.08em;
}

/* 占位 figcaption：与作品卡标题行等高，保证整卡总高与相邻作品一致（内容为空、不可见） */
.work-ending-meta {
  height: 1.9em;
  visibility: hidden;
}

/* ---------------- Series ending note（《域》收尾引文：脱离网格，置于整套域作品最底部） ---------------- */

/* 不属于网格轨道：无 4:3 占位盒、无隐形 figcaption、无 hover、不进灯箱；
   文字样式与网格内收尾卡完全一致，直接复用 .work-ending-zh / .work-ending-en */
.series-ending {
  /* 与最后一张作品之间留大片空白 */
  margin-top: clamp(180px, 16vw, 224px);
  /* 与页脚署名之间留小段空隙：抵消 .page 底部留白与页脚上内边距后只剩一小段 */
  margin-bottom: calc(clamp(48px, 4vw, 64px) - var(--page-pad-b) - var(--footer-pad-t));
  padding: 0 clamp(20px, 5%, 48px);
  text-align: center;
  animation: series-ending-in 0.9s var(--ease) both;
}

/* hidden 优先：起卦初始态、抽取态、切到其他系列时彻底不占位 */
.series-ending[hidden] {
  display: none;
}

/* 中英两段各自作为块级元素水平居中：英文带 max-width，须 margin auto 才不会贴左；
   每一行（含英文自动换行后的各行）都由 text-align:center 居中 */
.series-ending .work-ending-zh,
.series-ending .work-ending-en {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

@keyframes series-ending-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.works-empty {
  margin: clamp(52px, 8vw, 96px) 0 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------------- Series title ---------------- */

/* 系列主标题：导航/筛选栏下方、系列介绍上方，横跨整行，无底色无装饰线 */
.series-head {
  grid-column: 1 / -1;
  margin: 0;
}

.series-title {
  margin: 0;
  font-size: clamp(40px, 3.4vw, 52px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--fg);
}

.series-title .series-sep {
  margin: 0 0.32em;
  color: var(--faint);
  font-weight: 300;
}

.series-title .series-en {
  font-size: 0.46em;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--muted);
}

/* ---------------- Artwork statement ---------------- */

/* 系列介绍区块：横跨整行，固定排在所有作品图片上方 */
.works-intro {
  grid-column: 1 / -1;
  max-width: 64ch;
}

.works-intro .work-statement {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.work-statement {
  max-width: 64ch;
  margin-top: clamp(26px, 3vw, 40px);
  padding-top: clamp(22px, 2.6vw, 32px);
  border-top: 1px solid var(--line-soft);
}

.statement-head {
  margin: 0 0 clamp(20px, 2.4vw, 28px);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--faint);
}

.statement-body p {
  margin: 0 0 1.7em;
  font-size: clamp(13px, 1.15vw, 14.5px);
  line-height: 2.1;
  letter-spacing: 0.05em;
  color: rgba(245, 245, 245, 0.74);
  white-space: pre-line;
}

.statement-body p:last-child {
  margin-bottom: 0;
}

.statement-en p {
  line-height: 1.95;
  letter-spacing: 0.015em;
  color: rgba(245, 245, 245, 0.52);
}

.statement-rule {
  height: 1px;
  margin: clamp(26px, 3vw, 38px) 0;
  background: var(--line-soft);
}

.works-empty .sep {
  color: var(--faint);
  margin: 0 0.5em;
}

/* ---------------- Copy (About / Contact) ---------------- */

.copy {
  max-width: 720px;
  margin-top: clamp(44px, 7vw, 88px);
}

.copy-block p {
  margin: 0 0 1.9em;
  font-size: clamp(14px, 1.35vw, 16px);
  line-height: 2.05;
  letter-spacing: 0.05em;
  color: rgba(245, 245, 245, 0.84);
}

.copy-block p:last-child {
  margin-bottom: 0;
}

.copy-en p {
  line-height: 1.95;
  letter-spacing: 0.02em;
  color: rgba(245, 245, 245, 0.66);
}

.copy-rule {
  height: 1px;
  margin: clamp(40px, 6vw, 72px) 0;
  background: var(--line-soft);
}

.contact-lede {
  color: rgba(245, 245, 245, 0.84);
}

.contact-list {
  margin: clamp(30px, 4vw, 48px) 0 0;
}

.contact-row {
  display: flex;
  align-items: baseline;
  gap: clamp(20px, 4vw, 56px);
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
}

.contact-row:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.contact-row dt {
  min-width: 84px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--faint);
  text-transform: uppercase;
}

.contact-row dd {
  margin: 0;
  font-size: clamp(14px, 1.4vw, 16px);
  letter-spacing: 0.08em;
  color: var(--fg);
}

.contact-row dd a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease);
}

.contact-row dd a:hover {
  border-color: var(--faint);
}

/* ---------------- Footer ---------------- */

.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: var(--footer-pad-t) var(--pad-x) 42px;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--faint);
  text-transform: uppercase;
}

/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 7vh, 84px) clamp(16px, 5vw, 88px);
  background: rgba(0, 0, 0, 0.97);
  opacity: 0;
  transition: opacity 0.34s var(--ease);
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  opacity: 1;
}

.lb-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4vw, 64px);
  width: 100%;
  height: 100%;
  min-height: 0;
}

.lb-figure {
  position: relative;
  margin: 0;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
}

.lb-figure img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  animation: lb-in 0.42s var(--ease) both;
}

@keyframes lb-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.lb-info {
  flex: 0 0 clamp(280px, 24vw, 380px);
  align-self: stretch;
  max-height: 100%;
  overflow-y: auto;
  padding: clamp(4px, 2vh, 22px) 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 245, 245, 0.16) transparent;
}

.lb-info::-webkit-scrollbar {
  width: 3px;
}

.lb-info::-webkit-scrollbar-thumb {
  background: rgba(245, 245, 245, 0.16);
}

.lb-title {
  margin: 0;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--fg);
}

.lb-caption {
  margin: 10px 0 0;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.lb-info .work-statement {
  margin-top: clamp(22px, 2.6vw, 30px);
  border-top-color: rgba(245, 245, 245, 0.1);
}

.lb-info .statement-body p {
  font-size: 12.5px;
  line-height: 2.1;
}

.lb-info .statement-en p {
  font-size: 12px;
  line-height: 1.9;
}

.lb-close {
  position: absolute;
  top: clamp(14px, 3vh, 30px);
  right: var(--pad-x);
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  padding: 10px 4px;
  transition: color 0.3s var(--ease);
}

.lb-close:hover,
.lb-close:focus-visible {
  color: var(--fg);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--faint);
  padding: 22px 16px;
  transition: color 0.3s var(--ease);
}

.lb-nav:hover,
.lb-nav:focus-visible {
  color: var(--fg);
}

.lb-prev {
  left: clamp(2px, 1.4vw, 26px);
}

.lb-next {
  right: clamp(2px, 1.4vw, 26px);
}

.lb-nav[hidden] {
  display: none;
}

body.is-locked {
  overflow: hidden;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 860px) {
  :root {
    --header-h: 66px;
  }

  body {
    font-size: 14.5px;
  }

  /* 手机端名字：16px，英文按比例缩小保持主副关系 */
  .hero-name-zh {
    font-size: 16px;
    letter-spacing: 0.36em;
    line-height: 1.45;
  }

  .hero-name-en {
    font-size: 10px;
    letter-spacing: 0.3em;
  }

  .hero-inner {
    gap: 24px;
  }

  .brand-en {
    display: none;
  }

  .brand-sep {
    display: none;
  }

  .site-nav {
    gap: 20px;
  }

  .nav-link {
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .nav-link .nav-en {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* 手机端系列主标题：28px，仍明显大于介绍正文 */
  .series-title {
    font-size: 28px;
  }

  .series-title .series-en {
    font-size: 0.44em;
    letter-spacing: 0.26em;
  }

  .contact-row {
    flex-direction: column;
    gap: 8px;
  }

  .contact-row dt {
    min-width: 0;
  }

  .works-empty {
    font-size: 12.5px;
  }

  /* 手机端收尾页：字号再降一档，仍居中、仍是纯黑底 */
  .work-ending-media {
    gap: 10px;
    padding: 0 20px;
  }

  .work-ending-zh {
    font-size: 12px;
    line-height: 1.95;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
  }

  .work-ending-en {
    max-width: 26em;
    font-size: 10px;
    line-height: 2;
    letter-spacing: 0.06em;
  }

  /* 手机端收尾引文：字号沿用卡片版（中文 12px / 英文 10px），留白按手机比例收窄 */
  .series-ending {
    margin-top: clamp(100px, 26vw, 140px);
    margin-bottom: calc(clamp(32px, 8vw, 40px) - var(--page-pad-b) - var(--footer-pad-t));
    padding: 0 20px;
  }

  .lb-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    overflow-y: auto;
    padding-bottom: 14px;
    scrollbar-width: none;
  }

  .lb-inner::-webkit-scrollbar {
    width: 0;
  }

  .lb-figure {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
  }

  .lb-figure img {
    max-height: 44svh;
  }

  .lb-info {
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .lb-info .work-statement {
    max-width: none;
  }

  .lb-nav {
    font-size: 17px;
    padding: 16px 10px;
  }
}

@media (max-width: 420px) {
  .nav-link .nav-en {
    display: none;
  }

  .nav-link .nav-sep {
    display: none;
  }

  .hero-inner {
    gap: 24px;
    padding-bottom: clamp(36px, 8vh, 72px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   联系页 · 全屏背景底图（仅 contact 页生效）
   图层顺序：黑底 → 背景图 → 28% 黑色蒙版 → 正文文字 → 固定导航
   ========================================================= */

[data-page="contact"] .contact-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* 正文与页脚抬到背景层之上（仅调整层叠，不改变任何排版与位置） */
[data-page="contact"] .page,
[data-page="contact"] .site-footer {
  position: relative;
  z-index: 1;
}

[data-page="contact"] .contact-bg__img {
  position: absolute;
  inset: 0;
  background-image: url("../assets/contact-bg.6454db10.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

[data-page="contact"] .contact-bg__veil {
  position: absolute;
  inset: 0;
  background-color: #000;
  opacity: 0.28;
}

/* iOS / Safari 固定背景回退：避免 fixed 背景随滚动错位 */
@supports (-webkit-touch-callout: none) {
  [data-page="contact"] .contact-bg {
    position: fixed;
    height: 100vh;
    height: 100lvh;
  }
}

/* =========================================================
   数字起卦式导览（仅《域 / DOMAIN》启用）
   初始态：太极微光呼吸符号 + 双语提示，作品网格虚化收起
   抽取态：单件作品居中淡入上浮；展开态：回到原有完整网格
   ========================================================= */

/* 起卦接管画面时的网格：虚化收起，不参与交互与读屏 */
.works-grid.is-casting {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

/* 仅在取消虚化时做平滑过渡，避免收起时产生多余动画 */
.works-grid:not(.is-casting) {
  transition: opacity 0.9s var(--ease);
}

.casting {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(360px, 60svh, 660px);
  margin-top: clamp(20px, 3vw, 44px);
  transition: opacity 0.5s var(--ease);
}

.casting[hidden] {
  display: none;
}

.casting.is-dismissed {
  opacity: 0;
  pointer-events: none;
}

/* ---------------- 抽取展示层 ---------------- */

.casting-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 56px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
  pointer-events: none;
}

.casting-stage.is-shown {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.casting-card {
  width: min(560px, 76vw);
  margin: 0;
}

.casting-media {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: #070707;
  cursor: pointer;
}

.casting-media img {
  width: 100%;
  height: auto;
  max-height: min(58svh, calc(var(--cast-h, 640px) - 110px));
  object-fit: contain;
  transition: opacity 0.5s var(--ease);
}

.casting-media:hover img,
.casting-media:focus-visible img {
  opacity: 0.9;
}

.casting-media:focus-visible {
  outline: 1px solid var(--faint);
  outline-offset: 4px;
}

.casting-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  margin-top: 16px;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.casting-title {
  color: var(--fg);
}

.casting-title .sep {
  color: var(--faint);
  margin: 0 0.4em;
}

.casting-title .title-en {
  font-size: 0.86em;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.casting-caption {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.casting-meta-right {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}

/* 单张展示态的极淡「再抽」提示：仅作可点击性的低噪提示 */
.casting-again {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(245, 245, 245, 0.24);
}

.casting-again .sep {
  margin: 0 0.4em;
  color: rgba(245, 245, 245, 0.14);
}

.casting-again .en {
  letter-spacing: 0.12em;
}

/* ---------------- 太极微光符号 + 双语提示 ---------------- */

.casting-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vw, 30px);
  width: max-content;
  max-width: min(88vw, 620px);
  padding: 16px;
  transform: translate(-50%, -50%);
  transition: opacity 0.85s var(--ease), visibility 0.85s var(--ease);
}

.casting-seal.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.casting-taiji {
  display: block;
  width: clamp(84px, 11vw, 116px);
  color: rgba(245, 245, 245, 0.92);
  filter: drop-shadow(0 0 16px rgba(245, 245, 245, 0.1));
  animation: casting-breath 7.4s ease-in-out infinite;
  will-change: opacity, transform;
}

.casting-taiji svg {
  display: block;
  width: 100%;
  height: auto;
}

/* 缓慢柔和的呼吸：亮度低调，不做闪烁或炫光 */
@keyframes casting-breath {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.968);
  }
  50% {
    opacity: 0.84;
    transform: scale(1.026);
  }
}

.casting-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.75;
  text-align: center;
}

.casting-hint-zh {
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.9;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  color: var(--fg);
}

.casting-hint-en {
  max-width: 26em;
  font-size: 10.5px;
  font-weight: 300;
  line-height: 2;
  letter-spacing: 0.1em;
  color: var(--fg);
}

/* ---------------- 展开全部 / View All ---------------- */

.casting-viewall {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: flex;
  align-items: baseline;
  gap: 0.42em;
  padding: 8px 4px 10px;
  transform: translateX(-50%);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: rgba(245, 245, 245, 0.42);
  transition: color 0.35s var(--ease);
}

.casting-viewall:hover,
.casting-viewall:focus-visible {
  color: rgba(245, 245, 245, 0.74);
}

.casting-viewall .sep {
  color: rgba(245, 245, 245, 0.16);
}

.casting-viewall .en {
  font-size: 0.92em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .casting {
    min-height: clamp(320px, 58svh, 560px);
    margin-top: 12px;
    /* 地址栏收起后可视高度变大，额外 24px 底部余量保证「上滑」仍有足够的
       可滚动距离（≥48px 下行阈值），不影响起卦区自身高度与「展开全部」位置 */
    margin-bottom: 24px;
  }

  .casting-stage {
    padding-bottom: 36px;
  }

  .casting-card {
    width: min(88vw, 460px);
  }

  /* 触摸设备：去掉双击缩放与点按延迟，并消除点按时的灰色高亮块 */
  .casting,
  .casting-media,
  .casting-seal,
  .casting-viewall {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .casting-media img {
    max-height: min(52svh, calc(var(--cast-h, 560px) - 110px));
  }

  .casting-meta {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .casting-caption {
    font-size: 10.5px;
  }

  .casting-taiji {
    width: 86px;
  }

  .casting-seal {
    gap: 20px;
    /* 手指点按热区：整块符号 + 双语提示均可触发抽卦 */
    padding: 18px;
  }

  .casting-hint-zh {
    font-size: 11.5px;
    letter-spacing: 0.16em;
    text-indent: 0.16em;
  }

  .casting-hint-en {
    max-width: 21em;
    font-size: 9.5px;
    line-height: 2;
    letter-spacing: 0.06em;
  }

  .casting-viewall {
    /* 触摸目标抬到 44px 以上（原 39px 偏小），文字位置保持不变 */
    min-height: 44px;
    padding: 11px 12px 12px;
    font-size: 11px;
  }
}

/* 矮视口（如手机横屏 / 地址栏未收起时的紧凑可视区）：
   压缩起卦符号与提示间距，让「展开全部」仍留在首屏内 */
@media (max-width: 860px) and (max-height: 580px) {
  .casting-taiji {
    width: 68px;
  }

  .casting-seal {
    gap: 14px;
    padding: 14px;
  }

  .casting-hint-zh {
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .casting-hint-en {
    font-size: 9px;
    line-height: 1.85;
  }

  .casting-viewall {
    min-height: 44px;
    padding: 10px 12px 11px;
  }
}


/* =========================================================
   窥视透镜（仅《数字熵增 / Digital Entropy》启用）
   状态 A 引导页 → 状态 B 单图透镜 → 状态 C 完整网格
   孔径 = 图片显示宽度 18%；轮廓 1px rgba(245,245,245,0.5)，
   环径 = 孔径 × 0.92，无外发光 / 无投影
   ========================================================= */

/* 窥视接管画面时的网格：与起卦同样收起，不参与交互与读屏 */
.works-grid.is-peek {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

/* 沉浸态：收起站点页头与页面标题，让画面成为唯一主体（离开窥视即恢复） */
body.is-peek-mode .site-header {
  opacity: 0;
  pointer-events: none;
}

body.is-peek-mode .page-head,
body.is-peek-mode .series-ending {
  display: none;
}

.site-header {
  transition: opacity 0.5s var(--ease);
}

.peek {
  position: relative;
  /* 抵消 .page 的左右内边距，让舞台通栏铺满视口（不用 100vw，避免滚动条造成的横向溢出） */
  margin-left: calc(-1 * var(--pad-x));
  margin-right: calc(-1 * var(--pad-x));
  margin-top: clamp(16px, 2.4vw, 36px);
}

.peek[hidden] {
  display: none;
}

.peek-stage {
  position: relative;
  display: block;
  width: 100%;
  height: 100vh;
  height: 100svh;
  /* 高度下限保底：微信 X5 等内嵌内核会把 svh / 视口高度算得异常偏小，
     导致舞台塌陷、画面被压扁、View all 上移顶到标题上 */
  min-height: 480px;
  min-height: max(480px, 100svh);
  background: #000;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

/* --- 右上角：主题句 + 双语按钮（同一水平线）+ 下方弱提示 --- */

.peek-top {
  position: absolute;
  /* 整组整体下沉，靠近中央透镜符号，但仍与顶边留出呼吸空间 */
  top: clamp(26px, 3.2vw, 46px);
  right: var(--pad-x);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  pointer-events: none;
}

/* 主题行：中文 ｜ 英文 与按钮并排在同一水平线，整行靠右 */
.peek-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.peek-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 0.42em;
  padding: 8px 15px 9px;
  border: 1px solid rgba(245, 245, 245, 0.34);
  background: transparent;
  color: rgba(245, 245, 245, 0.9);
  font-family: inherit;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.16em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.peek-toggle:hover,
.peek-toggle:focus-visible {
  color: var(--fg);
  border-color: rgba(245, 245, 245, 0.6);
}

.peek-toggle:focus-visible {
  outline: 1px solid rgba(245, 245, 245, 0.6);
  outline-offset: 2px;
}

.peek-toggle .sep {
  color: rgba(245, 245, 245, 0.34);
}

.peek-toggle .en {
  font-size: 0.92em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.peek-note {
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.055em;
  line-height: 1.5;
  color: rgba(245, 245, 245, 0.88);
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.peek-note-sep {
  margin: 0 0.5em;
  color: rgba(245, 245, 245, 0.32);
}

/* 弱提示：字号更小、亮度更低，仅作辅助说明 */
.peek-hint {
  margin: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  font-size: 10.5px;
  font-weight: 300;
  letter-spacing: 0.11em;
  line-height: 1.4;
  color: rgba(245, 245, 245, 0.32);
  text-align: right;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}

.peek-top.is-lensing .peek-hint {
  opacity: 1;
  visibility: visible;
}

.peek-hint-sep {
  margin: 0 0.45em;
  color: rgba(245, 245, 245, 0.22);
}

/* --- 状态 A：中央圆形透镜示意符号 --- */

.peek-intro {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.peek-stage[data-state="intro"] .peek-intro {
  display: flex;
}

.peek-mark {
  display: block;
  /* 96 × 96 命中区（≥44px），圆环视觉线仍为 1px，观感与比重不变 */
  width: 96px;
  height: 96px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(245, 245, 245, 0.42);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
      rgba(245, 245, 245, 0.10) 0%,
      rgba(245, 245, 245, 0.045) 42%,
      rgba(245, 245, 245, 0.012) 68%,
      rgba(0, 0, 0, 0) 88%);
  /* 外层 .peek-intro 整体 pointer-events:none，此处单独放开，只让圆环可点 */
  pointer-events: auto;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
  font: inherit;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.peek-mark:hover {
  border-color: rgba(245, 245, 245, 0.62);
  box-shadow: 0 0 0 1px rgba(245, 245, 245, 0.10),
    0 0 28px rgba(245, 245, 245, 0.08) inset;
}

.peek-mark:focus-visible {
  outline: 1px solid rgba(245, 245, 245, 0.55);
  outline-offset: 6px;
}

/* --- 状态 B：单图 --- */

.peek-single {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  /* 上下留白等宽：图片垂直居中，右上按钮与注解小字收进上方黑边内，不压画面 */
  padding: 0;
}

.peek-stage[data-state="single"] .peek-single {
  display: flex;
}

.peek-frame {
  position: relative;
  /* 桌面目标：画面整体等比缩小 20%（宽与最大高同乘 0.80），
     使画面顶边退到右上角文字区块下方，留出 14px 以上呼吸间隙，
     主题句/按钮/弱提示不再压在图片右上角；两侧同时收窄，
     右侧文字保持原右侧对齐不被画面挤压。底部 View all 也因此获得更多留白。
     aspect-ratio 4/3 保证缩放后仍不变形，object-fit 保持 cover。
     移动端尺寸由 @media(max-width:860px) 单独定义，不参与此缩放 */
  width: calc(min(75vw, calc((var(--peek-stage-h, 100svh) - 90px) * 4 / 3)) * 0.80);
  aspect-ratio: 4 / 3;
  max-height: calc((var(--peek-stage-h, 100svh) - 90px) * 0.80);
  background: #050505;
  overflow: hidden;
  isolation: isolate;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: default;
}

/* 彩色失真幻象底层 */
.peek-color {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  z-index: 1;
  filter: saturate(0.92) contrast(1.08) brightness(0.94);
  pointer-events: none;
  -webkit-user-drag: none;
}

/* 极淡 RGB 错位：两层 1.5px 位移的 screen 叠加，只留一层几乎不可见的色散 */
.peek-frame::before,
.peek-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image: var(--peek-src, none);
  background-size: cover;
  background-position: 50% 50%;
  mix-blend-mode: screen;
  opacity: 0.055;
  pointer-events: none;
}

.peek-frame::before {
  transform: translate3d(-1.5px, 0, 0);
  filter: hue-rotate(-22deg);
}

.peek-frame::after {
  transform: translate3d(1.5px, 0, 0);
  filter: hue-rotate(22deg);
}

.peek-noise {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.05;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 140px 140px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 孔内：灰度底图（原样偏暗版，不加亮不加对比） */
.peek-lens {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--peek-d, 0px);
  height: var(--peek-d, 0px);
  z-index: 4;
  transform: translate3d(var(--lx, 0px), var(--ly, 0px), 0) translateZ(0);
  /* 圆孔硬裁剪三重兜底：微信 X5 / 内嵌 WebView 上 mask-image 可能整条解析失败，
     一旦失效孔外的灰度底图会整幅显示，出现彩色与黑白两图并存。
     border-radius + overflow 与 clip-path 不依赖 mask，任一生效都能锁死「只在圆孔内露底图」 */
  border-radius: 50%;
  overflow: hidden;
  -webkit-clip-path: circle(50% at 50% 50%);
  clip-path: circle(50% at 50% 50%);
  /* 软边遮罩四重写法，按兼容性从低到高排列，后者能解析就覆盖前者：
     ① PNG 圆图蒙版（老 WebKit / X5 对 url 蒙版支持最稳）
     ② -webkit- 老式径向渐变语法
     ③ -webkit- 标准径向渐变
     ④ 标准 mask-image
     任何一条解析失败，前一条仍生效；全部失效时由上面的圆形裁剪兜底 */
  -webkit-mask-image: url("../assets/lens-mask.31649ccd.png");
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: 50% 50%;
  mask-image: url("../assets/lens-mask.31649ccd.png");
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  mask-position: 50% 50%;
  -webkit-mask-image: -webkit-radial-gradient(50% 50%, circle closest-side,
      #000 0%, #000 82%, rgba(0, 0, 0, 0.86) 90%, rgba(0, 0, 0, 0.42) 96%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: radial-gradient(circle closest-side at 50% 50%,
      #000 0%, #000 82%, rgba(0, 0, 0, 0.86) 90%, rgba(0, 0, 0, 0.42) 96%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(circle closest-side at 50% 50%,
      #000 0%, #000 82%, rgba(0, 0, 0, 0.86) 90%, rgba(0, 0, 0, 0.42) 96%, rgba(0, 0, 0, 0) 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
}

.peek-single.is-lens-on .peek-lens {
  opacity: 1;
  visibility: visible;
}

/* 未开透镜时彻底不渲染灰度层：即使内核对 visibility / opacity 切换处理异常，
   也绝不允许彩色表层与黑白底图同时出现 */
.peek-single:not(.is-lens-on) .peek-lens {
  display: none;
}

.peek-gray {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: var(--peek-w, 0px);
  height: var(--peek-h, 0px);
  /* 置顶的全局 img{max-width:100%} 会把灰度层压成孔径宽，必须显式放开 */
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: 50% 50%;
  transform: translate3d(var(--gx, 0px), var(--gy, 0px), 0);
  filter: grayscale(1);
  pointer-events: none;
  -webkit-user-drag: none;
}

/* 轮廓：细圆环，不加外发光 / 投影 */
.peek-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--peek-rd, 0px);
  height: var(--peek-rd, 0px);
  z-index: 5;
  border: 1px solid rgba(245, 245, 245, 0.5);
  border-radius: 50%;
  transform: translate3d(var(--rx, 0px), var(--ry, 0px), 0) translateZ(0);
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
  pointer-events: none;
  will-change: transform;
}

.peek-single.is-lens-on .peek-ring {
  opacity: 1;
  visibility: visible;
}

/* 拖拽热区：透明圆形，覆盖孔与孔外一小圈 */
.peek-hotspot {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--peek-hot, 0px);
  height: var(--peek-hot, 0px);
  z-index: 6;
  border-radius: 50%;
  background: transparent;
  transform: translate3d(var(--hx, 0px), var(--hy, 0px), 0);
  touch-action: none;
  pointer-events: none;
  cursor: default;
  will-change: transform;
}

.peek-single.is-lens-on .peek-hotspot {
  pointer-events: auto;
  cursor: grab;
}

.peek-single.is-lens-on .peek-hotspot.is-dragging {
  cursor: grabbing;
}

/* 左右箭头：淡色细线、无实心底、垂直居中 */
.peek-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(245, 245, 245, 0.35);
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.35s var(--ease), opacity 0.35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.peek-arrow svg {
  display: block;
  width: 22px;
  height: 22px;
}

.peek-arrow:hover,
.peek-arrow:focus-visible {
  color: rgba(245, 245, 245, 0.75);
}

.peek-arrow:focus-visible {
  outline: 1px solid rgba(245, 245, 245, 0.5);
  outline-offset: 2px;
}

.peek-arrow:disabled {
  color: rgba(245, 245, 245, 0.16);
  opacity: 0.55;
  cursor: default;
}

.peek-prev {
  left: clamp(4px, 1.4vw, 28px);
}

.peek-next {
  right: clamp(4px, 1.4vw, 28px);
}

/* 常驻「展开全部 / View all」 */
.peek-viewall {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 2.8vh, 32px);
  z-index: 3;
  display: none;
  align-items: baseline;
  gap: 0.42em;
  padding: 8px 10px 10px;
  border: 0;
  background: none;
  transform: translateX(-50%);
  color: rgba(245, 245, 245, 0.42);
  font-family: inherit;
  font-weight: 300;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.peek-stage[data-state="single"] .peek-viewall {
  display: inline-flex;
}

.peek-viewall:hover,
.peek-viewall:focus-visible {
  color: rgba(245, 245, 245, 0.74);
}

.peek-viewall .sep {
  color: rgba(245, 245, 245, 0.16);
}

.peek-viewall .en {
  font-size: 0.92em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --- 移动端 --- */

@media (max-width: 860px) {
  .peek {
    margin-top: 10px;
  }

  .peek-stage {
    /* 手机端更高的下限：微信 X5 视口高度算错时舞台也不会被压成一条线 */
    min-height: 560px;
    min-height: max(560px, 100svh);
  }

  .peek-top {
    /* 手机端：不再紧贴屏幕顶边——下移到刘海/状态栏之下，
       同时向中央画面靠拢，收掉顶部到图片之间的大片黑色留白。
       下移量随视口高度增长（9svh），并设上限，保证不压到画面；
       有安全区时按 safe-area-inset-top + 12px 兜底。 */
    top: max(clamp(20px, 9svh, 76px), calc(env(safe-area-inset-top, 0px) + 12px));
    right: var(--pad-x);
    align-items: flex-end;
    gap: 9px;
  }

  /* 手机端：主题行纵向拆开，自上而下 主题句 → 主题英文 → 按钮 */
  .peek-line {
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
  }

  .peek-toggle {
    min-height: 40px;
    padding: 9px 13px 10px;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: rgba(245, 245, 245, 0.88);
    border-color: rgba(245, 245, 245, 0.32);
  }

  .peek-note {
    flex-direction: column;
    align-items: flex-end;
    max-width: 78vw;
    font-size: 12.5px;
    letter-spacing: 0.03em;
    line-height: 1.65;
    text-align: right;
    white-space: normal;
  }

  /* 窄屏移除竖线，中英各占一行 */
  .peek-note-sep {
    display: none;
  }

  .peek-hint {
    flex-direction: column;
    align-items: flex-end;
    font-size: 10.5px;
    letter-spacing: 0.05em;
    line-height: 1.6;
    color: rgba(245, 245, 245, 0.36);
    white-space: normal;
  }

  .peek-hint-sep {
    display: none;
  }

  .peek-frame {
    /* 舞台已通栏，100% ≡ 视口宽；两侧各留 12px，合计 24px，横向更舒展；
       等比由 aspect-ratio 4/3 保证，图片 object-fit: cover 不拉伸变形 */
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    max-height: 62vh;
  }

  /* 移动端箭头：加大按钮与图标，并加低饱和半透明深色圆形衬底托住箭头，
     保证在任意彩色画面上都看得清；桌面端箭头规则不受影响 */
  .peek-arrow {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(10, 10, 12, 0.42);
    border: 1px solid rgba(245, 245, 245, 0.12);
    color: rgba(245, 245, 245, 0.72);
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(2px) saturate(0.85);
    backdrop-filter: blur(2px) saturate(0.85);
  }

  .peek-arrow svg {
    width: 30px;
    height: 30px;
  }

  .peek-arrow:active {
    background: rgba(10, 10, 12, 0.56);
    color: rgba(245, 245, 245, 0.9);
  }

  .peek-arrow:disabled {
    background: rgba(10, 10, 12, 0.22);
    border-color: rgba(245, 245, 245, 0.08);
    color: rgba(245, 245, 245, 0.34);
    opacity: 0.5;
    box-shadow: none;
  }

  .peek-prev {
    left: 0;
  }

  .peek-next {
    right: 0;
  }

  .peek-viewall {
    min-height: 44px;
    padding: 11px 12px 12px;
    font-size: 11px;
  }
}

/* 手机端矮视口（如 iPhone SE 375x667、窄横屏 860x700）：纵向空间不够，
   若仍按 9svh 下移文字会与画面贴死，因此把文字回到顶部小区间，
   同时把画面最大高从 62vh 收到 50vh，让「文字 — 留白 — 画面」三者仍有呼吸。 */
@media (max-width: 860px) and (max-height: 700px) {
  .peek-top {
    top: max(20px, calc(env(safe-area-inset-top, 0px) + 10px));
  }

  .peek-frame {
    max-height: 50vh;
  }
}
