/* finesse · register=brand · A=neutral-ink+restrained-green · B=Archivo-700/NotoSansSC-300 · C=12col-4up-uniform · D=CSS-reveal-only · E=swiss-typographic-plate
 * SOUL=6 SPECTACLE=3 DENSITY=6
 * ==========================================================================
   阿尔法摄影 · 瑞士国际主义风格版
   International Typographic Style · 暗调 · 杂志级排版

   五轴坐标
   A=中性灰阶(界面无色) + 极克制绿  B=Archivo/Helvetica + 思源黑体  C=12栏严格网格
   D=CSS 动效(极简)  E=瑞士排版 / 印刷网格
   SOUL=6 SPECTACLE=3 DENSITY=6

   原则：界面是无彩色的，照片是页面上唯一的颜色来源。
        层级靠字号、字重、位置，不靠颜色。
        一切对齐到 12 栏网格。
   ========================================================================== */

/* ---------- 1. 色板：中性灰阶，界面无色 ---------- */
:root {
  --bg:      #0F0F0F;   /* 中性近黑，不带暖 */
  --surface: #171717;   /* 次级面 */
  --ink:     #EDEDED;   /* 主文字 16.37:1 */
  --muted:   #9A9A9A;   /* 次级 6.81:1 */
  --dim:     #7D7D7D;   /* 三级 4.61:1 —— 小字下限，不再低于 AA */
  /* 唯一颜色：只在交互反馈上出现，一像素级 */
  --accent:  #6BA37C;   /* 6.53:1 */
  --line:      rgba(255,255,255,.14);
  --line-soft: rgba(255,255,255,.08);

  /* 字体：拉丁走 grotesque，中文回退思源黑体 */
  --font-display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, 'Noto Sans SC', sans-serif;
  --font-sans:    'Helvetica Neue', Helvetica, Arial, 'Noto Sans SC', sans-serif;
  --font-cjk:     'Noto Sans SC', 'PingFang SC', sans-serif;

  /* 网格 */
  --cols: 12;
  --gutter: clamp(1rem, 1.6vw, 1.75rem);
  --pad-x: clamp(1.25rem, 3.5vw, 4rem);
  --nav-h: 56px;

  --ease: cubic-bezier(.2, 0, .38, 1);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--ink); color: var(--bg); }

/* 颗粒：压住大面积纯黑的塑料感。0.028 是能察觉到的下限 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 3. 网格容器 ---------- */
.shell { position: relative; }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 0 var(--gutter);
  padding-inline: var(--pad-x);
  max-width: 1600px;
  margin: 0 auto;
}

/* 栏格定位工具 */
.c1  { grid-column: 1 / 2; }
.c2  { grid-column: 2 / 3; }
.c3  { grid-column: 3 / 4; }
.c4  { grid-column: 4 / 5; }
.c5  { grid-column: 5 / 6; }
.c6  { grid-column: 6 / 7; }
.c7  { grid-column: 7 / 8; }
.c8  { grid-column: 8 / 9; }
.c12 { grid-column: 1 / -1; }

/* ---------- 4. 排版：瑞士风格的核心 ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  min-width: 0;
  text-wrap: balance;
}

/* 超大标题：跨栏、紧字距、重字重 */
.t-display {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.5vw, 6.5rem);
  font-weight: 700;
  line-height: .96;
  letter-spacing: -.035em;
}

.t-hero {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
}

.t-section {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.022em;
}

.t-sub {
  font-family: var(--font-cjk);
  font-size: clamp(1.0625rem, 1.6vw, 1.375rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -.005em;
}

/* 正文：克制、行宽受控 */
.t-body {
  font-family: var(--font-cjk);
  font-size: .9375rem;
  line-height: 1.85;
  color: var(--muted);
  max-width: 34em;
}

/* 项目详情长文（页内唯一 pre-line 段落）：放开限宽，双栏排版撑满版心 */
p.t-body[style*="pre-line"] {
  max-width: none;
  columns: 2;
  column-gap: 4rem;
}

/* 标签：瑞士风格的小号大写 + 宽字距 */
.t-label {
  font-family: var(--font-sans);
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
}

/* 图注：编号 + 说明，系统化 */
.t-caption {
  font-family: var(--font-cjk);
  font-size: .75rem;
  line-height: 1.6;
  color: var(--muted);
}

.t-num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* ---------- 5. 规则线：瑞士风格的骨架 ---------- */
.rule { height: 1px; background: var(--line); border: 0; }
.rule-soft { height: 1px; background: var(--line-soft); border: 0; }

/* ---------- 6. 顶部：信息条 + 导航（一行，细线分隔） ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--bg);
  display: flex;
  align-items: center;
}

/* 布局走 .grid-12，这里只管对齐与间距；不能再写 display:flex，否则覆盖 grid-12 */
.topbar-inner {
  align-items: baseline;
  width: 100%;
}

.topbar-id {
  grid-column: 1 / 5;
  font-family: var(--font-display);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.topbar-meta {
  grid-column: 5 / 8;
  font-family: var(--font-sans);
  font-size: .625rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.topbar-nav { grid-column: 8 / -1; }

.topbar-nav ul { justify-content: flex-end; }

.topbar nav ul {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  list-style: none;
}

.topbar nav a {
  font-family: var(--font-sans);
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--muted);
  position: relative;
  padding-bottom: 2px;
  transition: color .25s var(--ease);
  white-space: nowrap;
}

.topbar nav a:hover,
.topbar nav a[aria-current='page'] { color: var(--ink); }

/* 下划线从左展开：唯一的动效母题 */
.topbar nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}

.topbar nav a:hover::after,
.topbar nav a[aria-current='page']::after { transform: scaleX(1); }

/* ---------- 7. 栏目头：三种开法，不重复 ---------- */
.section-head {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

/* 小标签开法：清单类栏目用，让列表自己说话 */
.section-head.minor { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }

/* 行内开法：标题左、操作右（当前仅精选作品用） */
.section-head--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- 7.1 宣言板块：上线条夹住，文字垂直居中 ---------- */
/* 线画在内层 band 上，不能画在 .grid-12 容器上——容器带 padding-inline，线会冲到页边 */
/* 只有上边框：下一个栏目的 section-head 自带 border-top，再画下边框会出现双线 */
.manifesto-band {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 4.5vw, 4rem);
  display: flex;
  align-items: center;
}

/* ---------- 8. 作品网格：行容器 + flex，支持行内宽度重分配 ---------- */
/* 结构：#worksGrid > .works-row(每行4个) > .work-item
   放大镜效果必须让悬停卡变宽、同行卡变窄。flex 只在同一行内分配宽度，
   所以每 4 张包一个 .works-row，悬停重排只发生在本行，别的行不受影响。 */
/* 两种结构都要成立：
   ① 首页 —— .works-grid > .works-row(每行4个，由 JS 生成)，配合悬浮放大做逐行重排
   ② 详情页「同类作品」—— .works-grid > .work-item(静态 HTML，没有行包裹)
   所以 grid 自身必须能换行，卡片靠 25% 的 basis 自然排成 4 列。 */
.works-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 4vw, 3.25rem) var(--gutter);
  position: relative; /* 定位：让子元素 offsetTop 相对本网格，JS 命中检测要用 */
  transition: opacity .4s var(--ease); /* 精选轮播整格淡入淡出 */
}

.works-row {
  flex: 1 1 100%; /* 整行独占一行，行间距离由 .works-grid 的 row-gap 控制 */
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter);
  position: relative; /* 定位：让卡片的 offsetLeft/Top 相对本行 */
}

/* 精选超过 12 件时由 JS 切轮播：每页仍是原网格版式，整格淡入淡出换页。
   末页不满 12 件时 JS 会给网格留满页高度，版式不跳。 */
.works-grid.works-fading { opacity: 0; }

/* 轮播页码圆点：JS 在超过 12 件时生成 */
.works-dots {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  grid-column: 1 / -1;
}
.works-dots button {
  width: 6px; height: 6px;
  border: 0; padding: 0;
  border-radius: 50%;
  background: var(--dim);
  opacity: .3;
  cursor: pointer;
  transition: opacity .25s var(--ease);
}
.works-dots button:hover { opacity: .7; }
.works-dots button[aria-current="true"] { opacity: 1; }

.work-item {
  /* basis 25% 减掉 3 个栏距 = 一行正好 4 个。
     grow 必须是 0：设成 1 时作品列表最后一行不足 4 个（42 个 = 10 行 4 个 + 2 个）
     会被拉伸成双倍宽；详情页「同类作品」也只有 3 个，同样会被撑开。 */
  flex: 0 1 calc(25% - var(--gutter) * 3 / 4);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: transform .55s var(--ease), opacity .45s var(--ease);
}

.work-figure {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
}

.work-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* 悬浮放大：悬停的卡放大到行宽约 60%、浮到最前，其余压暗退成背景。
   transform 不参与布局，行结构不变；暗色阴影只在悬停瞬间出现，表达"漂上来"。
   注意：放大后的卡会盖住邻居的 :hover 区域，所以焦点不用 :hover 判断，
   由 JS 按未缩放的几何位置（offsetLeft/Top）算出并打 .is-focus 类。
   选择器带 #worksGrid 前缀：①只作用于首页精选作品 ②权重高于 .reveal.in 的
   transform:none（进场动画终态），否则会被它压掉。 */
@media (hover: hover) and (pointer: fine) {
  /* 焦点之外全部退后：缩小 + 压暗。范围是整块网格不只本行，
     因为放大的卡会盖住中间，只压暗本行会让其余行显得突兀。 */
  #worksGrid:has(.is-focus) .work-item:not(.is-focus) { transform: scale(.9); opacity: .45; }
  /* 位移量 --tx/--ty 与放大倍数 --s 都由 JS 算好写进内联变量：
     位移把卡片挪到网格正中，倍数让放大后约占网格宽 60%
     （写死 2.5 在窄屏上会放大到超过视口宽度被裁掉） */
  #worksGrid .work-item.is-focus {
    transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(var(--s, 2.5));
    transform-origin: center center;
    opacity: 1;
    z-index: 3;
  }
  /* 图和图注各自带一层暗底，盖住房在后面的卡；卡片本体保持透明 */
  #worksGrid .work-item.is-focus .work-figure,
  #worksGrid .work-item.is-focus .work-caption {
    background: var(--bg);
  }
}

.work-caption {
  padding-top: .75rem;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 .5rem;
  align-items: baseline;
}

.work-caption .no {
  font-family: var(--font-display);
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--dim);
  letter-spacing: .04em;
}

.work-caption .body { display: flex; flex-direction: column; gap: .3rem; }

.work-caption .name {
  font-family: var(--font-cjk);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.4;
  transition: color .25s var(--ease);
}

.work-item:hover .work-caption .name { color: var(--accent); }

.work-caption .meta {
  font-family: var(--font-sans);
  font-size: .6875rem;
  letter-spacing: .04em;
  color: var(--dim);
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: baseline;
}

/* 分隔符：让地点·年份·分类读成一组，不是糊成一团 */
.work-caption .meta > span:not(:first-child)::before {
  content: '·';
  margin-right: .45rem;
  color: var(--muted);
}

/* 图注第三层：事务所，更淡一档 */
.work-caption .firm {
  font-family: var(--font-cjk);
  font-size: .6875rem;
  line-height: 1.5;
  color: var(--dim);
  margin-top: .15rem;
}

/* ---------- 9. 数据条：严格分栏，数字主导 ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: var(--gutter);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.fact { grid-column: span 3; display: flex; flex-direction: column; gap: .35rem; }

.fact .n {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.fact .l {
  font-family: var(--font-cjk);
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .02em;
}

/* ---------- 10. 按钮：无圆角、细边框、无填充色（瑞士） ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .5rem 1.15rem;
  font-family: var(--font-sans);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: 0;
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease), background .25s var(--ease);
  white-space: nowrap;
}

.btn:hover { border-color: var(--ink); }

.btn-solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* ---------- 11. 客户清单：四栏，角色当标签不撑开 ---------- */
.ledger {
  columns: 4;
  column-gap: clamp(1.5rem, 3vw, 2.5rem);
  column-rule: 1px solid var(--line-soft);
}

.ledger li {
  list-style: none;
  break-inside: avoid;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: .5rem;
  align-items: baseline;
  padding-block: .6rem;
  border-bottom: 1px solid var(--line-soft);
  font-size: .875rem;
  color: var(--muted);
}

.ledger li .role {
  font-family: var(--font-sans);
  font-size: .625rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

/* ---------- 12. 联系：信息栏，严格对齐 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) var(--gutter);
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.contact-cell { grid-column: span 3; }
.contact-cell .k {
  font-family: var(--font-sans);
  font-size: .625rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: .5rem;
}
.contact-cell .v {
  font-family: var(--font-cjk);
  font-size: .9375rem;
  line-height: 1.7;
}
.contact-cell .v a { border-bottom: 1px solid var(--line); transition: border-color .25s var(--ease), color .25s var(--ease); }
.contact-cell .v a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* 微信格：二维码 + 号码并排；纯白底是扫码识别的功能要求，沿用分享浮层的做法 */
.contact-cell-qr .v { display: flex; align-items: flex-start; gap: .9rem; }
.wechat-qr { flex: none; width: 120px; height: auto; background: #fff; padding: .35rem; display: block; }
.contact-cell-qr .v span { font-family: var(--font-sans); font-size: .875rem; letter-spacing: .04em; }
.contact-cell-qr .v .hint { font-family: var(--font-cjk); letter-spacing: .02em; }
.hint { display: block; font-family: var(--font-cjk); font-size: .75rem; color: var(--dim); line-height: 1.6; }

/* ---------- 13. 页脚：底部信息条 ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 1.25rem;
  margin-top: clamp(3rem, 6vw, 6rem);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: .625rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

.foot a:hover { color: var(--ink); }

/* ---------- 14. 进场：克制，不喧哗 ---------- */
.reveal { opacity: 1; transform: none; }

html.motion-ok .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

html.motion-ok .reveal.in { opacity: 1; transform: none; }

/* ---------- 15. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html.motion-ok .reveal { opacity: 1; transform: none; }
}

/* ---------- 16. 响应式：栏格降级 ---------- */
@media (max-width: 1100px) {
  .work-item { flex-basis: calc(50% - var(--gutter) / 2); flex-grow: 0; }

  .fact { grid-column: span 6; }
  .contact-cell { grid-column: span 6; }
  .ledger { columns: 2; }
}

@media (max-width: 700px) {
  :root { --nav-h: 52px; --cols: 6; }

  .topbar-meta { display: none; }
  /* 导航独占右侧整块，5 个链接均分，每个都够手指点 */
  /* 选择器带 .topbar 前缀是为了压过上面的 `.topbar nav ul` */
  .topbar-id { grid-column: 1 / 3; }
  .topbar .topbar-nav { grid-column: 3 / -1; }
  .topbar .topbar-nav ul { gap: 0; }
  .topbar .topbar-nav li { flex: 1; }
  .topbar .topbar-nav a { font-size: .6875rem; letter-spacing: .04em; justify-content: center; width: 100%; }

  .work-item { flex-basis: 100%; flex-grow: 0; }
  .fact { grid-column: span 3; }
  .contact-cell { grid-column: span 6; }
  .ledger { columns: 1; column-rule: none; }
  p.t-body[style*="pre-line"] { columns: 1; }

  .facts, .contact-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- 17. 触屏：可点元素补足 44px 底线 ---------- */
@media (hover: none), (pointer: coarse) {
  .topbar nav a,
  .topbar-id {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  /* 下划线跟着文字走，不是跟着 44px 的盒子走 */
  .topbar nav a::after { bottom: calc(50% - .8em); }

  .btn { min-height: 44px; }

  /* 联系方式是手机上的主行动点，撑到 44px */
  .contact-cell .v a { display: inline-flex; align-items: center; min-height: 44px; }

  /* 导航在任何触屏上都铺开：5 个链接均分所在栏，46px+ 宽 */
  .topbar .topbar-nav ul { gap: 0; }
  .topbar .topbar-nav li { flex: 1; }
  .topbar .topbar-nav a { justify-content: center; width: 100%; }

  .foot a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ---------- 18. 图片浏览模式：直角、灰阶、无圆角 ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  background: var(--bg);
  padding: clamp(1rem, 3vw, 2.5rem);
}
.lb.open { display: grid; }

.lb-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.lb-count {
  font-family: var(--font-sans);
  font-size: .6875rem;
  letter-spacing: .18em;
  color: var(--dim);
}

.lb-stage {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 0;
  max-height: 100%;
  margin: 0;
}
.lb-stage img {
  max-width: 100%;
  max-height: calc(100dvh - 12rem);
  object-fit: contain;
  background: var(--surface);
}
.lb-cap { text-align: center; max-width: 40em; }

.lb-btn {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.lb-btn:hover { border-color: var(--ink); }

.lb-close { grid-column: -2 / -1; grid-row: 1; justify-self: end; }
.lb-nav {
  grid-row: 2;
  align-self: center;
  font-size: 1.75rem;
  padding-inline: .1em;
}
.lb-prev { grid-column: 1; justify-self: start; }
.lb-next { grid-column: 3; justify-self: end; }
.lb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 可点图片给出手势提示：悬停提亮，不做位移或放大 */
.plate img, .g-fig img { cursor: zoom-in; }

@media (max-width: 700px) {
  .lb { grid-template-columns: auto minmax(0, 1fr) auto; padding: .75rem; }
  .lb-stage img { max-height: calc(100dvh - 11rem); }
  .lb-nav { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lb-btn { transition: none; }
}

/* ---------- 19. 极窄屏（≤400px）：导航独占第二行，保证 44px 触控 ---------- */
/* 320px 时站名+导航同行只剩 181px，5 个链接分不到 44px。改为上下两行。 */
@media (max-width: 400px) {
  :root { --nav-h: 88px; }

  .topbar { height: auto; align-items: stretch; }
  .topbar-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 0;
    padding-block: .25rem;
    width: 100%;
  }
  .topbar-id { grid-column: 1; grid-row: 1; min-height: 44px; display: flex; align-items: center; }
  .topbar-meta { display: none; }
  .topbar .topbar-nav { grid-column: 1; grid-row: 2; }
  .topbar .topbar-nav ul { gap: 0; }
  .topbar .topbar-nav li { flex: 1 1 0; min-width: 0; }
  .topbar .topbar-nav a {
    width: 100%;
    min-height: 44px;
    font-size: .625rem;
    letter-spacing: 0;
    justify-content: center;
  }
  /* 下划线贴着文字，不贴着 44px 的盒子 */
  .topbar .topbar-nav a::after { bottom: calc(50% - .7em); }
}

/* ---------- 20. 建筑视频卡：16:9 缩略图 + 播放角标 ---------- */
.work-item.is-film .work-figure { aspect-ratio: 16 / 9; }

/* 播放三角：右下角小方框，与视频列表页同一母题 */
.work-item.is-film .film-play {
  position: absolute;
  right: .875rem;
  bottom: .875rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(15, 15, 15, .55);
  transition: border-color .25s var(--ease);
}
.work-item.is-film .film-play::before {
  content: '';
  width: .5rem;
  height: .625rem;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  margin-left: 2px;
}
.work-item.is-film:hover .film-play { border-color: var(--ink); }
