/* ==========================================================================
   螳螂的旅行 · 雪落天山 —— 策展型个人作品集
   黑白灰 + 单一低饱和蓝；无衬线两字重；发丝线 / 编号 / 不等宽编排
   动效仅 transform + opacity，0.4-0.8s
   ========================================================================== */

:root {
  --bg: #0b1122;
  --paper: #161b2e;
  --ink: #f2f1ed;
  --ink2: #adb5c6;
  --ink3: #76809a;
  --line: #212944;
  --line-dark: #333c5e;
  --accent: #8fb3d9;
  --glass: rgba(255,255,255,.05);
  --glass-line: rgba(255,255,255,.10);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --pad: clamp(20px, 5.5vw, 96px);
  --r: 16px;
  --r-sm: 10px;
  --ease: cubic-bezier(.25, .8, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: #090d1c; }
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* 氛围光：用 fixed 图层承载（iOS 上比 background-attachment:fixed 稳定、且不掉帧） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1300px 820px at 82% -12%, rgba(89,130,193,.40), transparent 62%),
    radial-gradient(1100px 760px at -5% 40%, rgba(128,105,205,.28), transparent 58%),
    radial-gradient(1000px 800px at 102% 78%, rgba(64,150,180,.22), transparent 56%),
    linear-gradient(180deg, #0d1428 0%, #0c1124 48%, #090d1c 100%);
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
em { font-style: normal; color: var(--accent); }
i { font-style: normal; }

/* 通用小字标注 */
.mono { font-family: var(--mono); letter-spacing: .14em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   导航
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad);
  border-bottom: 1px solid transparent;
  transition: background .45s var(--ease), border-color .45s var(--ease);
}
.nav.scrolled {
  background: rgba(12,17,38,.8);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}
.brand { font-size: 13px; font-weight: 600; letter-spacing: .12em; }
.brand span { color: var(--accent); margin: 0 5px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 13px; color: var(--ink2); transition: color .3s; }
.nav-links a:hover { color: var(--ink); }
.nav-links a i { font-family: var(--mono); font-size: 10px; color: var(--ink3); margin-left: 5px; vertical-align: super; }
/* --------------------------------------------------------------------------
   背景音乐：悬浮唱片按钮
   -------------------------------------------------------------------------- */
.music-fab {
  position: fixed; right: clamp(16px, 2.6vw, 34px); bottom: calc(22px + env(safe-area-inset-bottom));
  width: 62px; height: 62px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; z-index: 65; color: var(--accent);
  background:
    radial-gradient(120% 120% at 30% 16%, rgba(255,255,255,.22), rgba(150,180,225,.10) 46%, rgba(255,255,255,.03) 74%),
    rgba(13,19,38,.55);
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.36), inset 0 -12px 26px rgba(8,12,28,.5), 0 16px 44px rgba(4,8,22,.55);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .35s var(--ease), color .4s var(--ease);
}
.music-fab:hover { transform: translateY(-2px) scale(1.04); }
.music-fab:active { transform: scale(.95); }

/* 外圈：播放时旋转的弧形光（唱片感） */
.music-fab .mf-ring {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg,
    rgba(143,179,217,0) 0 56%, rgba(143,179,217,.75) 74%,
    rgba(226,240,255,.98) 86%, rgba(143,179,217,0) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 1.5px));
  opacity: 0; transition: opacity .6s var(--ease);
}
.music-fab.on .mf-ring { opacity: 1; animation: mfSpin 3.4s linear infinite; }
@keyframes mfSpin { to { transform: rotate(360deg); } }

/* 中心音浪 */
.music-fab .mf-bars { display: flex; align-items: center; gap: 3px; height: 20px; }
.music-fab .mf-bars i {
  width: 3px; height: 5px; border-radius: 2px; background: currentColor;
  opacity: .8; transition: height .5s var(--ease), opacity .4s var(--ease);
}
.music-fab .mf-bars i:nth-child(1), .music-fab .mf-bars i:nth-child(5) { height: 8px; }
.music-fab .mf-bars i:nth-child(2), .music-fab .mf-bars i:nth-child(4) { height: 13px; }
.music-fab .mf-bars i:nth-child(3) { height: 18px; }
.music-fab.on .mf-bars i { opacity: 1; animation: mfBar 1.02s ease-in-out infinite; }
.music-fab.on .mf-bars i:nth-child(2) { animation-delay: .14s; }
.music-fab.on .mf-bars i:nth-child(3) { animation-delay: .28s; }
.music-fab.on .mf-bars i:nth-child(4) { animation-delay: .42s; }
.music-fab.on .mf-bars i:nth-child(5) { animation-delay: .56s; }
@keyframes mfBar { 0%,100% { height: 5px; } 50% { height: 19px; } }

/* 还没出声：呼吸光环，提示可点 */
.music-fab.attn { animation: mfPulse 2.8s ease-in-out infinite; }
@keyframes mfPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.36), inset 0 -12px 26px rgba(8,12,28,.5), 0 16px 44px rgba(4,8,22,.55), 0 0 0 0 rgba(143,179,217,.42); }
  62% { box-shadow: inset 0 1px 0 rgba(255,255,255,.36), inset 0 -12px 26px rgba(8,12,28,.5), 0 16px 44px rgba(4,8,22,.55), 0 0 0 15px rgba(143,179,217,0); }
}

/* 桌面端悬浮文字标签 */
.music-fab::after {
  content: attr(data-label);
  position: absolute; right: calc(100% + 14px); top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 7px 12px; border-radius: 8px; white-space: nowrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--ink);
  background: rgba(12,18,38,.72); border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.music-fab:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (hover: none) { .music-fab::after { display: none; } }

@keyframes eq { 0%,100% { height: 4px; } 50% { height: 11px; } }

/* 背景音乐轻提示（自动播放被浏览器拦下时出现，悬在音乐按钮上方） */
.bgm-hint {
  position: fixed; right: clamp(16px, 2.6vw, 34px); bottom: calc(98px + env(safe-area-inset-bottom));
  z-index: 58;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 17px 9px 13px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink);
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(150,180,225,.07) 58%, rgba(255,255,255,.04));
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255,255,255,.17);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 12px 34px rgba(5,9,24,.45);
  animation: bgmIn .55s var(--ease) both;
  -webkit-tap-highlight-color: transparent;
}
.bgm-hint:active { filter: brightness(1.25); }
.bgm-hint::after {
  content: ""; position: absolute; right: 24px; top: 100%;
  border: 7px solid transparent; border-top-color: rgba(255,255,255,.22);
}
@keyframes bgmIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.bgm-hint .bgm-ic { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.bgm-hint .bgm-ic i { width: 2px; height: 4px; background: var(--accent); animation: eq 1.05s ease-in-out infinite; }
.bgm-hint .bgm-ic i:nth-child(2) { animation-delay: .18s; }
.bgm-hint .bgm-ic i:nth-child(3) { animation-delay: .36s; }

/* --------------------------------------------------------------------------
   首屏
   -------------------------------------------------------------------------- */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: #0b0d0e; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); animation: heroIn 1.2s var(--ease) forwards; will-change: transform; }
@keyframes heroIn { from { opacity: 0; } to { opacity: 1; } }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(9,13,28,.38) 0%, rgba(9,13,28,0) 30%, rgba(9,13,28,.38) 66%, rgba(8,11,24,.78) 100%);
}
.hero-side {
  position: absolute; left: calc(var(--pad) * .55); top: 50%; transform: translateY(-50%);
  writing-mode: vertical-rl; font-family: var(--mono); font-size: 10px; letter-spacing: .34em;
  color: rgba(255,255,255,.62); z-index: 2;
}
.hero-copy { position: absolute; left: var(--pad); right: var(--pad); bottom: 25vh; z-index: 2; color: #fff; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .3em; color: rgba(255,255,255,.86); margin: 0 0 20px; text-shadow: 0 2px 12px rgba(10,12,14,.45); }
.hero-copy h1 {
  font-size: clamp(54px, 9.5vw, 148px); font-weight: 600;
  line-height: .98; letter-spacing: -.045em; margin: 0;
  text-shadow: 0 6px 40px rgba(10,12,14,.4);
}
.hero-copy .sub { margin: 22px 0 0; font-size: clamp(14px, 1.4vw, 18px); color: rgba(255,255,255,.88); text-shadow: 0 2px 12px rgba(10,12,14,.5); }

.hero-foot {
  position: absolute; left: var(--pad); right: var(--pad); bottom: 0; z-index: 2;
  color: #fff; border-top: 1px solid rgba(255,255,255,.28); padding-bottom: 10px;
}
/* 锚点跳转避开固定导航 */
#works, #about { scroll-margin-top: 64px; }
.hero-facts { display: grid; grid-template-columns: repeat(4, 1fr); }
.hero-facts .hf { padding: 18px 20px 18px 0; border-right: 1px solid rgba(255,255,255,.16); }
.hero-facts .hf:last-child { border-right: 0; }
.hero-facts .hf:not(:first-child) { padding-left: 22px; }
.hero-facts .hf b { display: block; font-size: clamp(20px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.hero-facts .hf span { display: block; margin-top: 5px; font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: rgba(255,255,255,.66); }
.hero-scroll {
  position: absolute; right: 0; bottom: 100%; margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: rgba(255,255,255,.8);
  transition: color .3s;
}
.hero-scroll:hover { color: #fff; }
.hero-scroll span { display: inline-block; font-size: 15px; animation: bob 1.9s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* --------------------------------------------------------------------------
   章节头（左编号 / 右标题）
   -------------------------------------------------------------------------- */
.section-head {
  display: grid; grid-template-columns: 3fr 9fr; gap: clamp(20px, 4vw, 64px);
  padding-bottom: clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.sh-left { display: flex; align-items: baseline; gap: 18px; padding-top: 12px; }
.sec-no { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .1em; }
.sec-en { font-family: var(--mono); font-size: 10px; letter-spacing: .26em; color: var(--ink3); }
.sh-right h2 { font-size: clamp(36px, 5.4vw, 76px); font-weight: 600; letter-spacing: -.04em; line-height: 1.06; margin: 0; }
.sh-right .lead { margin: 20px 0 0; max-width: 46ch; font-size: 15px; color: var(--ink2); }

/* --------------------------------------------------------------------------
   作品区
   -------------------------------------------------------------------------- */
.works { padding: clamp(80px, 12vh, 140px) var(--pad) clamp(70px, 10vh, 120px); max-width: 1520px; margin: 0 auto; }

/* 文字索引式筛选（去胶囊） */
.filters { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; margin: 30px 0 clamp(36px, 5vw, 60px); border-bottom: 1px solid var(--line); }
.filters .fl-label { font-family: var(--mono); font-size: 10px; letter-spacing: .24em; color: var(--ink3); margin-right: 26px; padding-bottom: 14px; }
.filters button {
  position: relative; padding: 0 20px 14px; font-size: 13.5px; color: var(--ink3);
  transition: color .3s;
}
.filters button:first-of-type { padding-left: 0; }
.filters button i { font-family: var(--mono); font-size: 10px; margin-left: 6px; vertical-align: super; opacity: .7; }
.filters button:hover { color: var(--ink); }
.filters button.on { color: var(--ink); }
.filters button::after {
  content: ""; position: absolute; left: 20px; right: 20px; bottom: -1px; height: 2px;
  background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.filters button:first-of-type::after { left: 0; }
.filters button.on::after { transform: scaleX(1); }

/* 12 栅格不等宽编排 */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(28px, 3.6vw, 60px) clamp(16px, 2vw, 28px); align-items: start; }
.card { grid-column: span 4; display: block; cursor: pointer; }
.card[data-span="5"] { grid-column: span 5; }
.card[data-span="6"] { grid-column: span 6; }
.card[data-span="7"] { grid-column: span 7; }
.card[data-span="8"] { grid-column: span 8; }

.card-media { position: relative; overflow: hidden; background: var(--paper); aspect-ratio: 3 / 2; border-radius: var(--r); border: 1px solid rgba(255,255,255,.08); transition: box-shadow .45s var(--ease), border-color .45s var(--ease); }
.card:hover .card-media { box-shadow: 0 30px 70px rgba(0,0,0,.55); border-color: rgba(255,255,255,.16); }
/* 光泽扫过（hover 一道斜光划过照片） */
.card-media::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, transparent 24%, rgba(170,200,255,.34) 44%, rgba(255,255,255,.12) 52%, transparent 70%);
  transform: translateX(-150%) skewX(-6deg); transition: transform 1.05s cubic-bezier(.2,.65,.25,1);
}
.card.reveal.in .card-media::before { transform: translateX(150%) skewX(-6deg); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card-media img { transform: scale(1.035); }
.card-view {
  position: absolute; right: 10px; bottom: 10px; padding: 9px 15px; z-index: 3;
  background: rgba(255,255,255,.17); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.34); color: #fff; font-family: var(--mono); font-size: 10px; letter-spacing: .2em; border-radius: 999px;
  opacity: 0; transform: translateY(10px); transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.card:hover .card-view { opacity: 1; transform: none; }

.card-meta {
  margin-top: 12px; padding: 13px 18px 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.11), rgba(150,180,225,.06) 55%, rgba(255,255,255,.03));
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255,255,255,.15); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 32px rgba(5,9,24,.4);
  transition: border-color .45s var(--ease), filter .45s var(--ease);
}
.card:hover .card-meta { border-color: rgba(190,212,244,.35); filter: brightness(1.28); }
.card-meta .r1 { display: flex; align-items: baseline; gap: 12px; }
.card-meta .no { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--accent); }
.card-meta .t { font-size: clamp(19px, 1.8vw, 26px); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; }
.card-meta .ar { margin-left: auto; font-size: 15px; color: var(--ink3); transition: transform .45s var(--ease), color .3s; }
.card:hover .card-meta .ar { transform: translate(3px, -3px); color: var(--ink); }
.card-meta .r2 { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; }
.card-meta .loc { font-size: 12.5px; color: var(--ink2); }
.card-meta .cnt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--ink3); white-space: nowrap; }

.grid-end { display: flex; justify-content: space-between; margin-top: clamp(50px, 7vw, 90px); padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: var(--ink3); }

/* --------------------------------------------------------------------------
   关于 / 收尾
   -------------------------------------------------------------------------- */
.about { background: var(--paper); padding: clamp(80px, 12vh, 140px) var(--pad) clamp(40px, 6vh, 70px); }
.about > * { max-width: 1520px; margin-left: auto; margin-right: auto; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 48px); padding: clamp(40px, 6vw, 72px) 0 clamp(50px, 8vw, 100px); }
.stat { border-top: 1px solid var(--line-dark); padding-top: 18px; }
.stat b { display: block; font-size: clamp(46px, 6.4vw, 100px); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.stat i { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--ink2); }

.colophon { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: clamp(20px, 3vw, 48px); padding-top: 26px; border-top: 1px solid var(--line); }
.co-item b { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.co-item span { font-size: 11.5px; color: var(--ink2); line-height: 1.6; }
.to-top { align-self: start; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--ink2); transition: color .3s; white-space: nowrap; }
.to-top:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   详情页（左标题 / 右信息表）
   -------------------------------------------------------------------------- */
.detail {
  position: fixed; inset: 0; z-index: 60; background: linear-gradient(180deg, #0d1428 0%, #0b1024 55%, #090d1c 100%);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(100%); transition: transform .55s var(--ease);
}
.detail.open { transform: none; }
.detail-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px var(--pad); background: rgba(12,17,38,.88);
  -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.detail-back, .detail-x { font-size: 13px; color: var(--ink2); transition: color .3s; }
.detail-back:hover, .detail-x:hover { color: var(--ink); }
.detail-title { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--ink3); text-transform: uppercase; }

.detail-body { max-width: 1520px; margin: 0 auto; padding: 0 var(--pad) 90px; }
.detail-hero { margin-top: 8px; overflow: hidden; background: var(--paper); border-radius: var(--r); }
.detail-hero img { width: 100%; max-height: 62vh; object-fit: cover; }

.detail-head { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); padding: clamp(32px, 4.5vw, 60px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.detail-head .dh-no { font-family: var(--mono); font-size: 11px; letter-spacing: .22em; color: var(--accent); margin: 0 0 14px; }
.detail-head h3 { font-size: clamp(34px, 5vw, 72px); font-weight: 600; letter-spacing: -.04em; line-height: 1.05; margin: 0; }
.detail-head .dh-sub { margin: 14px 0 0; font-size: 14px; color: var(--ink2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag { padding: 6px 14px; border: 1px solid var(--line-dark); border-radius: 999px; font-size: 11.5px; color: var(--ink2); }

.dl { margin: 0; }
.dl .row { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.dl .row:first-child { border-top: 1px solid var(--line); }
.dl dt { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--ink3); text-transform: uppercase; }
.dl dd { margin: 0; font-size: 13.5px; color: var(--ink); }

/* 更多照片（折叠懒加载） */
.more-head { display: flex; align-items: baseline; justify-content: space-between; margin: clamp(36px, 5vw, 60px) 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.more-head h4 { font-size: 15px; font-weight: 600; margin: 0; }
.more-head .n { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; color: var(--ink3); }
/* 照片拼贴墙：12列不规则网格，6个一循环 */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.gallery .g { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--paper); cursor: pointer; border-radius: 18px; border: 1px solid rgba(255,255,255,.07); }
.gallery .g img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery .g:hover img { transform: scale(1.04); }
/* 6个一循环，所有卡片都不规则 */
.gallery .g:nth-child(6n+1) { grid-column: span 7; }
.gallery .g:nth-child(6n+2) { grid-column: span 5; }
.gallery .g:nth-child(6n+3) { grid-column: span 4; }
.gallery .g:nth-child(6n+4) { grid-column: span 8; }
.gallery .g:nth-child(6n+5) { grid-column: span 4; }
.gallery .g:nth-child(6n+6) { grid-column: span 4; }
.more-btn { display: block; margin: 26px auto 0; padding: 12px 32px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; font-size: 13px; color: var(--ink); transition: background .3s, color .3s, border-color .3s; }
.more-btn:hover { background: #fff; color: #0e0f11; border-color: #fff; }

/* 视频拼贴墙：12列不规则网格，6个一循环 */
.videos { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.videos .v { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #000; cursor: pointer; border-radius: 18px; border: 1px solid rgba(255,255,255,.07); }
.videos .v img, .videos .v video { width: 100%; height: 100%; object-fit: cover; }
.videos .v .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.videos .v .play::after { content: ""; width: 46px; height: 46px; border-radius: 50%; background: rgba(0,0,0,.5); }
.videos .v .play::before { content: ""; position: absolute; width: 0; height: 0; border-left: 12px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; transform: translateX(2px); }
.videos .v .dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; font-family: var(--mono); font-size: 10px; color: #fff; background: rgba(0,0,0,.6); border-radius: 999px; }
/* 6个一循环，所有视频都不规则 */
.videos .v:nth-child(6n+1) { grid-column: span 8; }
.videos .v:nth-child(6n+2) { grid-column: span 4; }
.videos .v:nth-child(6n+3) { grid-column: span 5; }
.videos .v:nth-child(6n+4) { grid-column: span 7; }
.videos .v:nth-child(6n+5) { grid-column: span 4; }
.videos .v:nth-child(6n+6) { grid-column: span 4; }
.detail-empty { padding: 30px 0; color: var(--ink3); font-size: 14px; }

/* --------------------------------------------------------------------------
   灯箱
   -------------------------------------------------------------------------- */
.lb { position: fixed; inset: 0; z-index: 70; background: rgba(7,10,22,.97); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.lb.show { opacity: 1; pointer-events: auto; }
.lb-stage { display: flex; align-items: center; justify-content: center; max-width: 90vw; max-height: 82vh; }
.lb-img, .lb-video { max-width: 90vw; max-height: 82vh; border-radius: 14px; }
.lb-video { width: min(88vw, 1100px); }
.lb-x, .lb-prev, .lb-next { position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; background: rgba(255,255,255,.1); transition: background .3s; }
.lb-x:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.22); }
.lb-x { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 14px var(--pad); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: rgba(255,255,255,.72); }

/* --------------------------------------------------------------------------
   滚动揭示
   -------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
  .card[data-span="7"], .card[data-span="8"] { grid-column: span 6; }
  .card[data-span="5"] { grid-column: span 3; }
  .card[data-span="6"] { grid-column: span 6; }
  .card { grid-column: span 3; }
  /* 平板：照片/视频拼贴改为 6 列，3个一循环错落 */
  .gallery, .videos { grid-template-columns: repeat(6, 1fr); gap: 10px; }
  .gallery .g:nth-child(3n+1), .videos .v:nth-child(3n+1) { grid-column: span 6; }
  .gallery .g:nth-child(3n+2), .videos .v:nth-child(3n+2) { grid-column: span 4; }
  .gallery .g:nth-child(3n+3), .videos .v:nth-child(3n+3) { grid-column: span 2; }
  .detail-head { grid-template-columns: 1fr; }
  .colophon { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .hero-side { display: none; }
  .hero-copy { bottom: 27vh; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .hero-facts .hf:nth-child(2) { border-right: 0; }
  .hero-facts .hf:nth-child(3), .hero-facts .hf:nth-child(4) { border-top: 1px solid rgba(255,255,255,.16); }
  .hero-facts .hf:nth-child(3) { padding-left: 0; }
  .hero-scroll { display: none; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .sh-left { padding-top: 0; }
  .filters .fl-label { width: 100%; margin-right: 0; padding-bottom: 10px; }
  .filters button { padding: 0 14px 12px; }
  .filters button:first-of-type { padding-left: 0; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .card, .card[data-span="5"], .card[data-span="6"], .card[data-span="7"], .card[data-span="8"] { grid-column: span 1; }
  .card-view { display: none; }
  /* 手机：照片/视频拼贴，大中小三种尺寸错乱排布 */
  .gallery, .videos { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .gallery .g, .videos .v { border-radius: 12px; grid-column: span 2; }
  /* 12个一循环：大中小混合，有的2个一行，有的3个一行 */
  .gallery .g:nth-child(12n+1), .videos .v:nth-child(12n+1) { grid-column: span 3; }
  .gallery .g:nth-child(12n+2), .videos .v:nth-child(12n+2) { grid-column: span 1; }
  .gallery .g:nth-child(12n+3), .videos .v:nth-child(12n+3) { grid-column: span 2; }
  .gallery .g:nth-child(12n+4), .videos .v:nth-child(12n+4) { grid-column: span 2; }
  .gallery .g:nth-child(12n+5), .videos .v:nth-child(12n+5) { grid-column: span 1; }
  .gallery .g:nth-child(12n+6), .videos .v:nth-child(12n+6) { grid-column: span 3; }
  .gallery .g:nth-child(12n+7), .videos .v:nth-child(12n+7) { grid-column: span 2; }
  .gallery .g:nth-child(12n+8), .videos .v:nth-child(12n+8) { grid-column: span 1; }
  .gallery .g:nth-child(12n+9), .videos .v:nth-child(12n+9) { grid-column: span 1; }
  .gallery .g:nth-child(12n+10), .videos .v:nth-child(12n+10) { grid-column: span 2; }
  .gallery .g:nth-child(12n+11), .videos .v:nth-child(12n+11) { grid-column: span 2; }
  .gallery .g:nth-child(12n+12), .videos .v:nth-child(12n+12) { grid-column: span 2; }
  .videos .v .play::after { width: 20px; height: 20px; background: rgba(0,0,0,.38); }
  .videos .v .play::before { border-left-width: 7px; border-top-width: 4px; border-bottom-width: 4px; transform: translateX(1px); }
  .videos .v .dur { right: 6px; bottom: 6px; padding: 1px 6px; font-size: 9px; background: rgba(0,0,0,.45); }
  .stats { grid-template-columns: 1fr; }
  .stats { gap: 22px; }
  .colophon { grid-template-columns: 1fr; gap: 20px; }
  .to-top { justify-self: start; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; }
  .nav-links a i { display: none; }
  .detail-head h3 { font-size: 32px; }
  .dl .row { grid-template-columns: 76px 1fr; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}

/* --------------------------------------------------------------------------
   移动端 / 触屏加固
   -------------------------------------------------------------------------- */
/* 低版本 iOS 没有 svh */
.hero { height: 100vh; height: 100svh; }
/* 刘海与底部指示条 */
.nav { padding-top: calc(16px + env(safe-area-inset-top)); }
.lb-bar { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }

@media (hover: none) {
  /* 触屏无 hover：用 :active 给出按压反馈 */
  .card:active .card-media { transform: scale(.985); }
  .card-meta:active { filter: brightness(1.2); }
  .card-media { transition: transform .3s var(--ease); }
  .filters button:active { color: var(--ink); }
  .nav-links a:active, .nav-music:active { color: var(--ink); }
  .lb-close:active, .lb-prev:active, .lb-next:active, .detail-x:active { opacity: .6; }
  /* 触屏上图片不做 hover 放大，避免点按后卡在放大态 */
  .card:hover .card-media img { transform: none; }
  .gallery .g:hover img { transform: none; }
  .card:hover .card-meta { filter: none; }
}

@media (max-width: 680px) {
  /* 手机上首屏文字更紧凑，避免压住画面主体 */
  .hero-copy { bottom: 22vh; }
  .hero-copy h1 { font-size: clamp(38px, 12vw, 58px) !important; line-height: 1.12; }
  /* 音乐按钮：仍保持足够的点击热区 */
  .music-fab { width: 56px; height: 56px; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .music-fab .mf-bars { height: 18px; gap: 3px; }
  /* 手机上药丸会压住首屏数字，只留右下角按钮（呼吸提示足够） */
  .bgm-hint { display: none !important; }
  .hero-facts { gap: 14px 12px; }
  /* 详情页头图别占满整屏，留出下一段的可滚动暗示 */
  .detail-hero img { max-height: 46vh; }
  .lb-img, .lb-video { max-width: 94vw; max-height: 74vh; border-radius: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .card-media img, .gallery .g img, .hero-img, .card-view, .card-meta .ar { transition: none; transform: none; animation: none; }
  .music-fab, .music-fab .mf-ring, .music-fab .mf-bars i { animation: none !important; }
  .hero-img { opacity: 1; }
  .card-view { opacity: 1; }
}

/* --------------------------------------------------------------------------
   交互增强：进度条 / 揭幕 / FLIP / tilt
   -------------------------------------------------------------------------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 60; transform: scaleX(0); transform-origin: left; }

/* 卡片图片：纸色遮罩揭幕 */
.card-media::after {
  content: ""; position: absolute; inset: 0; background: var(--paper);
  transform: scaleY(1); transform-origin: bottom; transition: transform 1s var(--ease); z-index: 1;
}
.card.reveal.in .card-media::after { transform: scaleY(0); }

/* FLIP 飞行克隆 */
.flip-clone {
  position: fixed; z-index: 90; object-fit: cover; pointer-events: none; margin: 0;
  transition: transform .62s var(--ease); will-change: transform;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}

/* 磁性按钮 */
.magnetic { transition: transform .25s var(--ease); will-change: transform; }

@media (prefers-reduced-motion: reduce) { .card-media::after, .card-media::before { display: none; } }

/* img/video 的 display:block 会盖掉 UA 的 [hidden]{display:none} —— 强制兜底 */
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   关于区：深色收尾（与首屏呼应，形成 深—浅—深 的页面节奏）
   -------------------------------------------------------------------------- */
.about { background: linear-gradient(180deg, rgba(20,26,52,.35) 0%, rgba(30,38,72,.30) 55%, rgba(45,58,105,.32) 100%), radial-gradient(900px 500px at 50% 115%, rgba(89,130,193,.24), transparent 65%); border-top: 1px solid var(--line); color: #fff; }
.about .sec-en { color: #7c8288; }
.about .sec-no { color: #8fb3d9; }
.about .sh-right .lead { color: #9aa0a6; }
.about .sh-right h2 em { color: #8fb3d9; }
.about .section-head { border-bottom-color: rgba(255,255,255,.14); }
.about .stat { border-top-color: rgba(255,255,255,.16); }
.about .stat i { color: #9aa0a6; }
.about .colophon { border-top-color: rgba(255,255,255,.14); }
.about .co-item span { color: #9aa0a6; }
.about .to-top { color: #9aa0a6; }
.about .to-top:hover { color: #fff; }

/* --------------------------------------------------------------------------
   点赞 + 留言板
   -------------------------------------------------------------------------- */
.engage {
  margin: 48px 0 24px;
  padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,.10);
}

.like-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--ink);
  font: 500 15px/1 var(--sans);
  cursor: pointer;
  transition: all .3s var(--ease);
  backdrop-filter: blur(8px);
}
.like-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.28);
  transform: translateY(-1px);
}
.like-btn.liked {
  background: rgba(255, 90, 120, .15);
  border-color: rgba(255, 90, 120, .4);
}
.like-heart {
  font-size: 18px;
  color: #ff5a78;
  transition: transform .3s var(--ease);
}
.like-btn.liked .like-heart {
  transform: scale(1.2);
}
.like-count {
  margin: 0;
  font: 400 13px/1.4 var(--mono);
  color: var(--ink2);
  letter-spacing: .04em;
}

.msg-box {
  max-width: 560px;
  margin: 0 auto;
}
.msg-title {
  margin: 0 0 20px;
  font: 500 18px/1.3 var(--sans);
  color: var(--ink);
  text-align: center;
  letter-spacing: .02em;
}
.msg-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.msg-form input,
.msg-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.04);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  outline: none;
  transition: border-color .25s var(--ease);
  resize: vertical;
}
.msg-form input::placeholder,
.msg-form textarea::placeholder {
  color: var(--ink3);
}
.msg-form input:focus,
.msg-form textarea:focus {
  border-color: var(--accent);
}
.msg-form button {
  align-self: flex-end;
  padding: 10px 28px;
  border: none;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #0b1122;
  font: 600 14px/1 var(--sans);
  cursor: pointer;
  transition: opacity .2s var(--ease);
}
.msg-form button:hover { opacity: .85; }
.msg-form button:disabled { opacity: .5; cursor: not-allowed; }

.msg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.msg-item {
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.03);
}
.msg-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.msg-item-name {
  font: 600 13px/1.4 var(--sans);
  color: var(--accent);
}
.msg-item-time {
  font: 400 11px/1.4 var(--mono);
  color: var(--ink3);
}
.msg-item-text {
  margin: 0;
  font: 400 14px/1.6 var(--sans);
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-empty {
  text-align: center;
  font: 400 13px/1.6 var(--sans);
  color: var(--ink3);
  padding: 24px 0;
}
