:root {
  --ink: #141210;
  --paper: #FAF6EE;
  --muted: #B9B0A3;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --latin: "Fraunces", "Georgia", "Times New Roman", serif;
  --pad: clamp(16px, 4vw, 48px);
  --max: 1440px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid #F2C46B; outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--paper); color: var(--ink); padding: 10px 16px; }
.skip:focus { left: 8px; }
.noscript { padding: 40px; text-align: center; }

/* 顶栏 */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--pad);
  color: var(--paper);
  transition: background .4s, color .4s, padding .3s;
}
.topbar.solid { background: rgba(20,18,16,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-block: 12px; }
.brand { font-weight: 900; font-size: 22px; letter-spacing: .18em; }
.topnav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 15px; }
.topnav a { padding: 8px 2px; border-bottom: 2px solid transparent; transition: border-color .2s; }
.topnav a.on, .topnav a:hover { border-color: currentColor; }

/* 首页:色带 */
.bands {
  display: flex; height: min(66vh, 640px); min-height: 440px;
}
.band {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 84px 0 22px;
  background: var(--bg); color: var(--fg);
  transition: flex-grow .6s cubic-bezier(.2,.7,.2,1);
}
.band img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08); transition: opacity .6s, transform 1.2s;
}
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); opacity: 0; transition: opacity .6s; }
.band:hover, .band:focus-visible { flex-grow: 7; }
.band:hover img, .band:focus-visible img { opacity: 1; transform: scale(1); }
.band:hover::after, .band:focus-visible::after { opacity: 1; }
.band-no { position: relative; z-index: 1; font-family: var(--latin); font-size: 15px; }
.band-name {
  position: relative; z-index: 1; writing-mode: vertical-rl; font-weight: 700; font-size: clamp(14px, 1.3vw, 19px);
  letter-spacing: .2em; white-space: nowrap; max-height: 70%; overflow: hidden;
}
.band:hover .band-name, .band:focus-visible .band-name, .band:hover .band-no, .band:focus-visible .band-no { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); }

/* 首页:标题 */
.intro {
  max-width: var(--max); margin: 0 auto; padding: clamp(40px, 5vw, 72px) var(--pad) clamp(40px, 6vw, 80px);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 48px;
}
.intro h1 { margin: 0; font-size: clamp(64px, 11vw, 168px); font-weight: 900; line-height: .95; letter-spacing: .02em; }
.intro-side { max-width: 460px; }
.intro-side p { margin: 0 0 18px; font-family: var(--latin); font-style: italic; font-size: clamp(20px, 2vw, 26px); line-height: 1.5; color: #E7DED2; }
.stats { display: flex; gap: 28px; flex-wrap: wrap; font-size: 15px; color: var(--muted); }
.stats b { display: block; font-family: var(--latin); font-weight: 300; font-size: 44px; color: var(--paper); line-height: 1.1; }

/* 首页:章节 */
.chapter { background: var(--bg); color: var(--fg); overflow: hidden; }
.chapter-in {
  max-width: var(--max); margin: 0 auto; padding: clamp(56px, 7vw, 104px) var(--pad);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center;
}
.chapter.flip .chapter-in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.chapter.flip .ch-photo { order: 2; }
.ch-photo { position: relative; display: block; }
.ch-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: 0 30px 70px rgba(0,0,0,.32); transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.ch-photo:hover img { transform: scale(1.02); }
.ch-no { margin: 0; font-family: var(--latin); font-weight: 300; font-size: clamp(96px, 12vw, 176px); line-height: .85; }
.ch-title { margin: 14px 0 6px; font-size: clamp(40px, 5vw, 68px); font-weight: 900; line-height: 1.1; }
.ch-theme { margin: 0 0 18px; font-size: clamp(18px, 1.6vw, 22px); }
.ch-meta { margin: 0 0 28px; font-size: 15px; opacity: .85; }
.ch-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 28px; }
.ch-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.cta { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border: 2px solid currentColor; font-weight: 700; font-size: 16px; transition: background .25s, color .25s; }
.cta:hover { background: var(--fg); color: var(--bg); }

/* 出现动画 */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; }
.reveal.d2 { transition-delay: .24s; }

/* 相册页 */
.album-head { background: var(--bg); color: var(--fg); }
.album-head-in {
  max-width: var(--max); margin: 0 auto; padding: 110px var(--pad) clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: end;
}
.back { display: inline-block; margin-bottom: 28px; font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.album-head h1 { margin: 12px 0 8px; font-size: clamp(48px, 7vw, 96px); font-weight: 900; line-height: 1.05; }
.album-head img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.album-body { background: color-mix(in srgb, var(--bg) 16%, #121110); }
.grid {
  max-width: var(--max); margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--pad);
  columns: 3 320px; column-gap: 14px;
}
.tile { display: block; width: 100%; padding: 0; margin: 0 0 14px; break-inside: avoid; position: relative; overflow: hidden; background: rgba(255,255,255,.04); }
.tile img { width: 100%; height: auto; transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .5s; opacity: 0; }
.tile img.ok { opacity: 1; }
.tile:hover img { transform: scale(1.03); }
.tile span { position: absolute; left: 10px; bottom: 8px; font-size: 12px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); opacity: 0; transition: opacity .3s; }
.tile:hover span, .tile:focus-visible span { opacity: 1; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pager a { background: var(--bg); color: var(--fg); padding: clamp(32px, 5vw, 64px) var(--pad); display: flex; flex-direction: column; gap: 6px; transition: filter .25s; }
.pager a:hover { filter: brightness(1.08); }
.pager a.next { text-align: right; align-items: flex-end; }
.pager small { font-size: 14px; opacity: .85; }
.pager strong { font-size: clamp(24px, 3vw, 40px); font-weight: 900; }

/* 页脚 */
.foot { max-width: var(--max); margin: 0 auto; padding: 64px var(--pad) 48px; color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chips a { background: var(--bg); color: var(--fg); padding: 8px 14px; font-size: 14px; font-weight: 700; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot-row a { border-bottom: 1px solid currentColor; }
.foot-row span { line-height: 2; }

/* 照片查看 */
.lb { position: fixed; inset: 0; z-index: 80; background: #0A0A0A; color: #F2EEE6; display: grid; grid-template-rows: 1fr auto; }
.lb[hidden] { display: none; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 24px 72px 8px; min-height: 0; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: opacity .3s; }
.lb-loading { position: absolute; margin: 0; font-size: 14px; color: #8E877C; }
.lb-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 88px; font-size: 44px; color: #F2EEE6; opacity: .7; }
.lb-btn:hover { opacity: 1; }
.lb-prev { left: 6px; } .lb-next { right: 6px; }
.lb-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid #222; }
.lb-info { margin: 0; font-size: 14px; color: #CFC8BC; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-act { padding: 10px 16px; border: 1px solid #4A463F; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.lb-act:hover { border-color: #F2EEE6; }
.lb-act[aria-disabled="true"] { opacity: .4; pointer-events: none; }

/* 手机 */
@media (max-width: 820px) {
  .bands { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); height: auto; min-height: 0; padding-top: 64px; }
  .band { aspect-ratio: 1 / 2.2; padding: 10px 0; }
  .band:hover, .band:focus-visible { flex-grow: 1; }
  .band-name { font-size: 13px; letter-spacing: .1em; }
  .chapter-in, .chapter.flip .chapter-in, .album-head-in { grid-template-columns: minmax(0, 1fr); }
  .chapter.flip .ch-photo { order: 0; }
  .album-head-in { padding-top: 88px; }
  .grid { columns: 2 150px; column-gap: 8px; }
  .tile { margin-bottom: 8px; }
  .lb-stage { padding: 12px 0 4px; }
  .lb-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
