/* ============================================================
   SY-07 · 摄影作品集 —— 编辑式版式（美术馆白墙 × 杂志内页 × 苹果官网）
   v5：三层相框（照片 → 白边卡纸 → 磨砂玻璃），无光影
   ============================================================ */

/* 底色固定为白色：不再跟随系统深色，color-scheme 锁定 light */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --text: #1d1d1f;
  --text-dim: #6b6b70;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.16);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-line: rgba(0, 0, 0, 0.07);
  --mat: #ffffff;
  --mat-line: rgba(0, 0, 0, 0.06);
  --accent: #1d1d1f;
  --accent-text: #ffffff;
  /* 博物馆式内容宽：1440 视口下恰好 1296（左右 5%），390 下恰好 350 */
  --max: 1512px;
  --pad: clamp(20px, 5vw, 72px);
  /* 间距四档：xs 竖幅并排 / s 常规对象间距 / m 宽幅旁 / l 行后 */
  --gap-xs: 10px;
  --gap-s: 16px;
  --gap-m: 26px;
  --gap-l: 40px;
  /* 展厅之间（按题材分组）的留白 */
  --hall: clamp(56px, 5.6vw, 80px);
  /* 图与图注的距离（对齐 Met 的 8px） */
  --label-gap: 8px;
  /* 册内行与行之间的呼吸（含图注） */
  --plate-space-s: clamp(24px, 3.2vw, 44px);
  --plate-space-m: clamp(36px, 5vw, 72px);
  --plate-space-l: clamp(52px, 7vw, 96px);
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Helvetica", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

img { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: var(--text); color: var(--bg); }

/* ---------- 编辑式排印工具 ---------- */

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rule { border: none; border-top: 1px solid var(--line); }

/* ---------- 白墙陈列：去掉相框、卡纸与磨砂玻璃，照片直接贴在底色上 ---------- */

.frame,
.frame-mat {
  display: block;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.frame-mat img { width: 100%; height: auto; object-fit: contain; border-radius: 0; }

/* ---------- 导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
  height: 52px;
  display: flex;
  align-items: center;
  gap: 28px;
}

/* 品牌锁定组合：铭牌式，logo + 字标 + 极小副题，整体压在 52px 导航内 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
}

.brand img { width: 26px; height: 26px; flex: none; }

.brand-words {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
  min-width: 0;
}

.brand-words b {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.brand-words span {
  margin-top: 3px;
  font-size: 9.5px;
  letter-spacing: 0.01em;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 620px) {
  .brand { gap: 8px; }
  .brand img { width: 22px; height: 22px; }
  .brand-words span { display: none; }
}

.nav-links { display: flex; gap: 24px; }

.nav-links a {
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-auth { display: flex; align-items: center; gap: 10px; }
.nav-auth .username { font-size: 12px; color: var(--text-dim); }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  color: var(--text);
  transition: opacity 0.2s, transform 0.15s var(--ease);
}

.btn:hover { opacity: 0.65; }
.btn:active { transform: scale(0.97); }

.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.sm { padding: 5px 13px; font-size: 11.5px; }

/* ---------- 首页：博物馆式陈列（导言 → 首件 → 按题材分厅的墙面栅格） ---------- */

/* 墙面容器：内容宽 1512，左右 5%（1440 下 1296、390 下 350，与 Met 一致） */
.home-museum {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 96px;
}

/* 墙面说明牌 */
.hm-intro { padding: clamp(44px, 6vw, 80px) 0 clamp(26px, 3.4vw, 40px); }
.hm-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hm-intro h1 {
  margin-top: 14px;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.16;
}
.hm-lede { margin-top: 14px; font-size: 14px; line-height: 1.75; color: var(--text-dim); max-width: 44ch; }
.hm-meta { margin-top: 18px; font-size: 11px; letter-spacing: 0.08em; color: var(--text-dim); }

/* 首件：单独陈列，右侧说明牌 + 详情入口 */
.hm-spot {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  column-gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding: clamp(30px, 4vw, 48px) 0 clamp(52px, 6.6vw, 84px);
  border-top: 1px solid var(--line);
}
.hm-spot img { width: 100%; height: auto; display: block; background: var(--bg-soft); }
.hm-spot-label { padding-top: 4px; }
.hm-spot-label h2 {
  margin-top: 10px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.26;
}
.hm-spot-label .hm-lede { margin-top: 8px; font-size: 13px; }
.hm-detail {
  display: inline-block;
  margin-top: 16px;
  padding-bottom: 2px;
  font-size: 12px;
  border-bottom: 1px solid var(--line-strong);
}
.hm-detail:hover { opacity: 0.6; }

/* 展厅：厅名 + 数量 + 查看全部 + 细线，厅间 56–80px */
.hm-hall + .hm-hall { margin-top: var(--hall); }
.hm-hall-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hm-hall-head h2 { font-size: clamp(20px, 2.2vw, 24px); font-weight: 600; letter-spacing: -0.01em; }
.hm-count { font-size: 11px; letter-spacing: 0.12em; color: var(--text-dim); }
.hm-all { margin-left: auto; font-size: 12px; color: var(--text-dim); }
.hm-all:hover { color: var(--text); }
.hm-rule { margin-top: 14px; border-top: 1px solid var(--line); }

/* 墙面栅格：列数随视口（4/3/2/1），列宽 = 画幅比例 → 同行等高、不裁切 */
.hm-wall { margin-top: clamp(20px, 2.4vw, 28px); }
.hm-row { display: grid; column-gap: var(--gx, var(--gap-s)); align-items: start; }
.hm-row + .hm-row { margin-top: var(--gy, var(--gap-m)); }
.hm-obj { display: block; min-width: 0; }
.hm-obj img { width: 100%; height: auto; display: block; background: var(--bg-soft); }
.hm-label { padding-top: var(--label-gap); }
.hm-label h3 { font-size: 13px; font-weight: 500; line-height: 1.45; }
.hm-label p { margin-top: 3px; font-size: 11px; line-height: 1.5; letter-spacing: 0.04em; color: var(--text-dim); }

/* 入场只做淡入，保持墙面安静 */
.home-museum .reveal { transform: none; }

/* ---------- 作品：面包屑 / 大类页 / 作品集目录 ---------- */

.crumbs {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  padding: 24px 0 0;
}
.crumbs a { color: var(--text-dim); }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.crumbs .sep { margin: 0 7px; opacity: 0.45; }

.genre-page-head { padding: 40px 0 26px; }
.genre-page-head h1 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.genre-page-head p { margin-top: 10px; font-size: 14px; line-height: 1.75; color: var(--text-dim); max-width: 44ch; }
.genre-page-head .rule { margin-top: 24px; }

.catalog { padding-bottom: 40px; }
.catalog-genre { padding-bottom: 16px; }

.genre-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 40px 0 4px;
  border-top: 1px solid var(--line);
}
.genre-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.genre-head p { font-size: 11.5px; color: var(--text-dim); letter-spacing: 0.04em; }
.genre-head .go { font-size: 11.5px; }
.genre-head .go a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }
.genre-head .go a:hover { color: var(--text); }

.shelf-item { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 26px 0; }
.shelf-img .frame-mat { padding: 0; }
.shelf-img img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.7s var(--ease);
}
.shelf-item:hover .shelf-img img { transform: scale(1.01); }
.shelf-text h3 { margin-top: 6px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.shelf-text p:not(.eyebrow) {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 34ch;
}

@media (min-width: 860px) {
  .shelf-item {
    grid-template-columns: repeat(12, 1fr);
    column-gap: clamp(18px, 2.4vw, 34px);
    align-items: start;
    padding: 44px 0;
  }
  .shelf-img { grid-column: 1 / span 6; }
  .shelf-text { grid-column: 8 / span 4; padding-top: 6px; }
  .shelf-item:nth-of-type(even) .shelf-img { grid-column: 7 / span 6; }
  .shelf-item:nth-of-type(even) .shelf-text { grid-column: 1 / span 4; }
}

/* ---------- 系列页：刊头 + 大小错落网格 ---------- */

.page { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.series-head { padding: 40px 0 26px; }
.series-head .eyebrow { margin-bottom: 10px; }
.series-head h1, .series-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.series-head p { margin-top: 10px; font-size: 14px; line-height: 1.75; color: var(--text-dim); max-width: 44ch; }
.series-head .rule { margin-top: 24px; }

.series-block { padding-bottom: var(--hall); }
.series-block:last-child { padding-bottom: 64px; }

.plates-grid { padding-top: 32px; }

/* 册内每一行按画幅比例分列：列数随视口（4/3/2/1），列宽 = 画幅比例 → 同行等高；
   行内缝隙取 xs/s/m 档，行间距离取 plate-space 档，不裁切、不留空列 */
.plates-row {
  display: grid;
  column-gap: var(--row-gap-x, var(--gap-s));
  row-gap: var(--row-gap-x, var(--gap-s));
  align-items: start;
}
.plates-row + .plates-row { margin-top: var(--row-gap-y, var(--plate-space-m)); }

.plate { min-width: 0; }
.plate-img { display: block; width: 100%; padding: 0; text-align: left; cursor: zoom-in; }
.plate-img .frame,
.plate-img .frame-mat { padding: 0; }
.plate-img .frame-mat img { aspect-ratio: auto; height: auto; object-fit: contain; cursor: zoom-in; }

.plate-cap { padding: var(--label-gap) 0 0; }
.plate-cap h4 { font-size: 13px; font-weight: 500; letter-spacing: 0; line-height: 1.45; }
.plate-cap h4 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.plate-cap p { margin-top: 3px; font-size: 11px; line-height: 1.5; letter-spacing: 0.04em; color: var(--text-dim); }
.plate-cap .plate-date { font-size: 11px; color: var(--text-dim); letter-spacing: 0.04em; }

.plate-nav { padding-top: 56px; font-size: 12px; color: var(--text-dim); }
.plate-nav a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 作品三层：紧凑版（只作用于 /works.html，首页与作品页不受影响） ---------- */
body.works-page {
  --gap-xs: 5px;
  --gap-s: 8px;
  --gap-m: 12px;
  --gap-l: 18px;
  --plate-space-s: 14px;
  --plate-space-m: 20px;
  --plate-space-l: 28px;
}
body.works-page .crumbs { padding: 10px 0 0; }
body.works-page .genre-page-head,
body.works-page .series-head { padding: 16px 0 12px; }
body.works-page .series-head .eyebrow { margin-bottom: 4px; }
body.works-page .genre-page-head h1,
body.works-page .series-head h1,
body.works-page .series-head h2 { font-size: clamp(20px, 2.2vw, 26px); }
body.works-page .genre-page-head p,
body.works-page .series-head p { margin-top: 4px; font-size: 12px; line-height: 1.6; }
body.works-page .genre-page-head .rule,
body.works-page .series-head .rule { margin-top: 10px; }
body.works-page .plates-grid { padding-top: 12px; }
body.works-page .plate-cap { padding-top: 8px; }
body.works-page .plate-cap h4 { font-size: 13px; line-height: 1.35; }
body.works-page .plate-cap .plate-date { display: none; }
body.works-page .plate-cap p {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.works-page .catalog { padding-bottom: 24px; }
body.works-page .catalog-genre { padding-bottom: 10px; }
body.works-page .genre-head { padding: 20px 0 2px; gap: 2px 10px; }
body.works-page .genre-head h2 { font-size: 17px; }
body.works-page .genre-head p,
body.works-page .genre-head .go { font-size: 11px; }
body.works-page .shelf-item { gap: 10px; padding: 16px 0; }
body.works-page .shelf-text h3 { margin-top: 2px; font-size: 15px; }
body.works-page .shelf-text p:not(.eyebrow) { margin-top: 3px; font-size: 11.5px; line-height: 1.55; }
@media (min-width: 860px) {
  body.works-page .shelf-item { padding: 18px 0; column-gap: clamp(14px, 1.6vw, 24px); }
}

/* ---------- 作品页：编辑式跨页 ---------- */

.spread { padding-top: 48px; }
.spread .frame-mat img { aspect-ratio: auto; }

.spread-cap { max-width: 62ch; margin: 36px auto 0; }
.spread-cap .eyebrow { margin-bottom: 10px; }
.spread-cap h1 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.spread-desc { margin-top: 14px; font-size: 15.5px; line-height: 1.85; color: var(--text); }
.spread-cap .rule { margin: 28px 0 20px; }

.mark { display: flex; align-items: baseline; gap: 12px; font-size: 12.5px; }
.mark-btn { color: var(--text-dim); padding: 2px 0; transition: color 0.2s; }
.mark-btn:hover { color: var(--text); }
.mark-btn.on { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.mark-sep { color: var(--line-strong); }
.mark-state { font-size: 11px; color: var(--text-dim); }

.back-line { max-width: 62ch; margin: 20px auto 0; font-size: 12px; color: var(--text-dim); }
.back-line a { text-decoration: underline; text-underline-offset: 3px; }
.back-line .sep { margin: 0 8px; opacity: 0.5; }

/* ---------- 留言 ---------- */

.comments { max-width: 62ch; margin: var(--hall) auto 0; }
.comments h2 { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); padding-bottom: 14px; border-bottom: 1px solid var(--line); }

.comment-form { padding: 20px 0 8px; }
.comment-form textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 12px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
}
.comment-form textarea:focus { border-color: var(--line-strong); }
.comment-form .btn { margin-top: 10px; }

.comment-list { padding: 12px 0 96px; }
.comment-item { padding: 16px 2px; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: none; }
.comment-head { display: flex; justify-content: space-between; align-items: baseline; }
.comment-user { font-size: 12.5px; font-weight: 600; }
.comment-time { font-size: 11px; color: var(--text-dim); }
.comment-content { margin-top: 6px; font-size: 13px; line-height: 1.75; }
.comment-item.is-hidden { opacity: .55; }
.comment-hidden-tip { margin-top: 6px; font-size: 11px; color: var(--text-dim); letter-spacing: .02em; }

.empty-tip { color: var(--text-dim); font-size: 12.5px; padding: 36px 0; }
.empty-tip.quiet { padding: 22px 0; opacity: 0.75; }
.empty-tip a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 关于 ---------- */

.about-wrap { max-width: 66ch; margin: 0 auto; padding: clamp(48px, 6vw, 80px) var(--pad) 96px; }
.about-id { display: flex; align-items: center; gap: 22px; margin-bottom: 40px; }
.about-id img { width: 88px; height: 88px; border-radius: 22px; border: 1px solid var(--line); }
.about-id .eyebrow { margin-bottom: 8px; }
.about-id h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.about-id p { margin-top: 6px; font-size: 12.5px; color: var(--text-dim); }

.about-text h2 { font-size: 17px; font-weight: 700; margin: 36px 0 12px; }
.about-text p { font-size: 15.5px; line-height: 1.9; margin-bottom: 14px; }
.about-text .dim { color: var(--text-dim); font-size: 12px; }

.about-stats { display: flex; gap: 0; margin: 36px 0 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-stat { flex: 1; padding: 20px 0; text-align: center; }
.about-stat + .about-stat { border-left: 1px solid var(--line); }
.about-stat b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.about-stat span { font-size: 11px; color: var(--text-dim); }

.duty { list-style: none; margin: 8px 0 0; }
.duty li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.duty li:last-child { border-bottom: none; }
.duty li b { flex: 0 0 64px; font-weight: 600; }
.duty li span { color: var(--text-dim); }

/* ---------- 我的 ---------- */

.me-wrap { max-width: 760px; margin: 0 auto; padding: clamp(44px, 5.6vw, 72px) var(--pad) 96px; }
.me-wrap > .eyebrow { margin-bottom: 10px; }
.me-wrap > h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.me-account { display: flex; align-items: flex-end; gap: 14px; margin: 28px 0 0; padding-bottom: 28px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.me-account .field { flex: 1; min-width: 200px; }
.me-account label { display: block; font-size: 11px; color: var(--text-dim); margin-bottom: 6px; letter-spacing: 0.06em; }
.me-account input {
  width: 100%;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
}
.me-account input:focus { border-color: var(--line-strong); }
.me-email { font-size: 12px; color: var(--text-dim); margin-top: 10px; }

.me-section { margin-top: 44px; }
.me-section h2 { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); padding-bottom: 14px; border-bottom: 1px solid var(--line); }

.me-likes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 22px; }
.me-like { display: block; }
.me-like .frame,
.me-like .frame-mat { padding: 0; border-radius: 0; }
.me-like .frame-mat img { aspect-ratio: auto; }
.me-like p { padding: 8px 2px 0; font-size: 12px; font-weight: 500; }
.me-like .plate-date { font-size: 10.5px; color: var(--text-dim); font-weight: 400; }

.me-comments { padding-top: 8px; }
.me-comment { padding: 14px 2px; border-bottom: 1px solid var(--line); }
.me-comment:last-child { border-bottom: none; }
.me-comment .mc-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 11.5px; color: var(--text-dim); }
.me-comment .mc-head a { font-weight: 600; color: var(--text); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.me-comment p { margin-top: 5px; font-size: 13px; line-height: 1.7; }

/* ---------- 登录弹窗 ---------- */

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 20px;
}
.modal-mask.show { display: flex; }

.modal {
  width: 100%;
  max-width: 340px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 26px 24px;
  position: relative;
}

.modal h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.modal-sub { margin-top: 5px; font-size: 12px; color: var(--text-dim); }

.modal input {
  width: 100%;
  margin-top: 12px;
  padding: 10px 13px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
}
.modal input:focus { border-color: var(--line-strong); }

.modal .btn.primary { width: 100%; margin-top: 16px; padding: 10px 0; font-size: 13px; }

.modal .err { min-height: 18px; margin-top: 8px; font-size: 11.5px; color: #d70015; }

.switch-line { margin-top: 14px; font-size: 12px; color: var(--text-dim); text-align: center; }
.switch-line a { text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.close-x {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 20px;
  color: var(--text-dim);
  line-height: 1;
  padding: 4px;
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(16px);
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  font-size: 12.5px;
  padding: 9px 18px;
  border-radius: 980px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}
.lightbox.show { display: flex; }
.lightbox img { max-width: 94vw; max-height: 92vh; object-fit: contain; }

/* ---------- 作品集全屏看图（深色、极简提示、首尾不循环） ---------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: #0b0b0c;
  display: flex;
  align-items: center;
  justify-content: center;
  overscroll-behavior: contain;
}
.viewer[hidden] { display: none; }

.viewer-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 7vw;
}
.viewer-stage img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
}

.viewer-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7vw;
  min-width: 44px;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, opacity 0.2s;
}
.viewer-nav.prev { left: 0; }
.viewer-nav.next { right: 0; }
.viewer-nav:hover:not(:disabled) { color: rgba(255, 255, 255, 0.95); }
.viewer-nav:disabled { opacity: 0.18; cursor: default; }

.viewer-close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 36px;
  height: 36px;
  font-size: 22px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.72);
  z-index: 2;
}
.viewer-close:hover { color: #fff; }

.viewer-count {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.viewer-detail {
  position: absolute;
  bottom: 16px;
  right: 20px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
}
.viewer-detail:hover { color: rgba(255, 255, 255, 0.9); }

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.foot-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 32px 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-dim);
}
.foot-logo { width: 16px; height: 16px; }
.foot-in .right { margin-left: auto; }

/* ---------- 入场动效 ---------- */

.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

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

@media (max-width: 899px) {
  .nav { padding: 0 20px; gap: 16px; }
  .nav-links { gap: 16px; }
  .masthead { padding: 18px 20px 10px; }
  .genre-block { padding: 6px 20px 28px; }
  .covers { grid-template-columns: 1fr; gap: 44px; }
  /* 移动端：列数由 layout.js 决定（≤2 列），间距档位整体收一档，避免跳位 */
  :root {
    --gap-xs: 6px;
    --gap-s: 10px;
    --gap-m: 16px;
    --gap-l: 24px;
    --hall: 48px;
  }
  .home-museum { padding: 0 20px 64px; }
  .hm-spot { grid-template-columns: 1fr; row-gap: 14px; padding-bottom: 52px; }
  .hm-spot-label { padding-top: 0; }
  .hm-intro h1 { font-size: 27px; }
  .page { padding: 0 20px; }
  .plates-grid { padding-top: 28px; }
  .series-head { padding: 44px 0 26px; }
  .spread { padding-top: 32px; }
  .about-wrap, .me-wrap { padding-left: 20px; padding-right: 20px; }
  .me-likes { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .foot-in { padding: 22px 20px 30px; flex-wrap: wrap; }
}
