/* 字号阶梯：xs 12 / sm 14 / base 16 / md 18 / lg 24 / xl 32 / 2xl 46 */
:root {
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-md: 18px;
  --fs-lg: 24px;
  --fs-xl: 32px;
  --fs-2xl: 46px;

  --ink: #1f1a17;
  --ink-2: #4a433e;
  --muted: #8a817a;
  --line: #ebe5dd;
  --page: #f7f3ee;
  --card: #ffffff;
  --soft: #f3eee7;
  --brand: #ff2e4d;
  --brand-deep: #d91a3a;
  --brand-soft: #ffe9ec;
  --c: var(--brand);            /* 当前分类色，由 JS 逐个覆盖 */
  --topbar-h: 68px;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .04), 0 8px 28px rgba(60, 40, 20, .06);
  --shadow-up: 0 2px 4px rgba(60, 40, 20, .05), 0 16px 40px rgba(60, 40, 20, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-size: var(--fs-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--brand-soft); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1480px; margin: 0 auto; padding: 0 28px;
  height: 100%; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; width: 264px; flex: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #ff5a6e, var(--brand) 55%, var(--brand-deep));
  color: #fff; font-weight: 800; font-size: 19px;
  box-shadow: 0 6px 14px rgba(255, 46, 77, .32);
  transition: transform .35s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: .02em; }
.search {
  flex: 1; max-width: 600px; display: flex; align-items: center; gap: 10px;
  border: 1.5px solid transparent; border-radius: 14px; padding: 0 14px; height: 46px;
  background: var(--soft);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 5px var(--brand-soft); }
.search svg { width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; flex: none; }
.search input { flex: 1; border: 0; background: transparent; outline: 0; font: inherit; font-size: var(--fs-base); color: var(--ink); min-width: 0; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 4px 7px; background: #fff;
}
.search:focus-within kbd { display: none; }
.search button {
  border: 0; background: var(--line); color: var(--ink-2); width: 24px; height: 24px; border-radius: 50%;
  font-size: 16px; cursor: pointer; line-height: 1; display: grid; place-items: center;
}
.search button:hover { background: var(--brand); color: #fff; }
.topbar-meta { margin-left: auto; color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }
.topbar-meta b { color: var(--ink); font-weight: 700; }

/* ---------- 布局 ---------- */
.layout {
  max-width: 1480px; margin: 0 auto; padding: 28px 28px 100px;
  display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 36px;
}

/* ---------- 侧栏 ---------- */
.sidebar {
  position: sticky; top: calc(var(--topbar-h) + 28px);
  align-self: start; max-height: calc(100vh - var(--topbar-h) - 48px); overflow: auto;
  padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.sidebar-title {
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  letter-spacing: .18em; padding: 0 12px 10px;
}
#catNav > a, #catNav .cat-item > a {
  position: relative;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  font-size: 15px; font-weight: 500; color: var(--ink-2); line-height: 1.4;
  transition: background .18s, color .18s, transform .18s var(--ease);
}
#catNav .cat-item > a > span:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
#catNav .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none;
  transition: transform .25s var(--ease), box-shadow .25s;
}
#catNav .cat-item > a:hover { background: #fff; color: var(--ink); transform: translateX(2px); }
#catNav .cat-item > a:hover .dot { transform: scale(1.35); }
#catNav .cat-item > a.active,
#catNav .cat-item.open > a {
  background: color-mix(in srgb, var(--c) 11%, #fff); color: color-mix(in srgb, var(--c) 78%, #000); font-weight: 700;
}
#catNav .cat-item > a.active .dot,
#catNav .cat-item.open > a .dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
#catNav .n {
  font-size: var(--fs-xs); font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums;
  background: var(--soft); border-radius: 999px; padding: 1px 8px; flex: none;
}
#catNav .cat-item > a.active .n,
#catNav .cat-item.open > a .n { background: #fff; color: inherit; }
#catNav a.all {
  font-weight: 700; font-size: var(--fs-base); margin-bottom: 10px; padding: 12px 14px;
  background: #fff; color: var(--ink); box-shadow: var(--shadow);
}
#catNav a.all:hover { transform: translateY(-1px); }
#catNav a.all.active { background: var(--ink); color: #fff; }
#catNav a.all.active .n { background: rgba(255, 255, 255, .16); color: #fff; }

#catNav .sub { display: none; margin: 4px 0 10px 16px; padding-left: 10px; border-left: 2px solid color-mix(in srgb, var(--c) 28%, #fff); }
#catNav .cat-item.open .sub { display: block; animation: subIn .28s var(--ease); }
@keyframes subIn { from { opacity: 0; transform: translateY(-6px); } }
#catNav .sub a {
  display: block; padding: 5px 9px; font-size: 13px; line-height: 1.45; color: var(--muted); border-radius: 8px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; transition: background .15s, color .15s;
}
#catNav .sub a i { font-style: normal; font-size: 11px; margin-right: 7px; opacity: .7; font-variant-numeric: tabular-nums; }
#catNav .sub a:hover { color: var(--ink); background: #fff; }
#catNav .sub a.current { color: color-mix(in srgb, var(--c) 82%, #000); font-weight: 700; background: color-mix(in srgb, var(--c) 11%, #fff); }

.content { min-width: 0; }

/* ---------- 首屏概览 ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--card); border-radius: 28px; padding: 44px 44px 40px; box-shadow: var(--shadow);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; filter: blur(50px);
}
.hero::before { width: 420px; height: 420px; right: -120px; top: -200px; background: rgba(255, 46, 77, .20); animation: drift 14s ease-in-out infinite alternate; }
.hero::after { width: 300px; height: 300px; right: 220px; top: -190px; background: rgba(255, 170, 60, .20); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-50px, 36px) scale(1.12); } }
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em;
}
.hero h1 { margin: 0; font-size: var(--fs-2xl); line-height: 1.15; font-weight: 800; letter-spacing: .01em; }
.hero-sub { margin: 14px 0 0; max-width: 640px; color: var(--ink-2); font-size: var(--fs-md); line-height: 1.7; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.stat {
  min-width: 150px; padding: 16px 22px 14px; border-radius: 18px;
  background: var(--page); border: 1px solid var(--line);
}
.stat b { display: block; font-size: 42px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat:first-child b { color: var(--brand); }
.stat span { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; letter-spacing: .08em; }
.hero-label {
  margin: 36px 0 14px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); letter-spacing: .18em;
  display: flex; align-items: center; gap: 14px;
}
.hero-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cat-card {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px 14px; border-radius: 16px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 16%, #fff);
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, color .25s;
}
.cat-card .no { font-size: var(--fs-xs); font-weight: 800; color: var(--c); letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.cat-card .name { font-size: 17px; font-weight: 700; line-height: 1.35; }
.cat-card .cnt { font-size: var(--fs-sm); color: var(--muted); margin-top: auto; }
.cat-card .cnt b { font-size: 22px; font-weight: 800; color: var(--c); margin-right: 3px; font-variant-numeric: tabular-nums; }
.cat-card .go {
  position: absolute; right: 16px; bottom: 14px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--c); font-weight: 700;
  opacity: 0; transform: translateX(-8px); transition: opacity .25s, transform .25s var(--ease);
}
.cat-card:hover { transform: translateY(-4px); background: var(--c); color: #fff; box-shadow: 0 14px 30px color-mix(in srgb, var(--c) 34%, transparent); }
.cat-card:hover .no, .cat-card:hover .cnt, .cat-card:hover .cnt b { color: #fff; }
.cat-card:hover .go { opacity: 1; transform: none; }

.status {
  margin: 0 0 4px; padding: 14px 20px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow);
  font-size: var(--fs-md); font-weight: 600;
}
.status b { color: var(--brand); font-size: var(--fs-lg); margin: 0 4px; }
.empty { color: var(--muted); padding: 80px 0; text-align: center; font-size: var(--fs-md); }

/* ---------- 分类段 ---------- */
.cat { margin-top: 56px; scroll-margin-top: calc(var(--topbar-h) + 20px); }
.status + #sections .cat:first-child, .hero[hidden] ~ #sections .cat:first-child { margin-top: 20px; }
.cat-head { display: flex; align-items: center; gap: 18px; }
.cat-head .no {
  font-size: 54px; line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  color: var(--c);
}
.cat-head h2 { margin: 0; font-size: var(--fs-xl); line-height: 1.25; font-weight: 800; }
.cat-head .count {
  font-size: var(--fs-sm); font-weight: 700; padding: 4px 14px; border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 80%, #000);
}
.cat-head::after { content: ""; flex: 1; height: 3px; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 45%, transparent), transparent); }

.cat-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0 6px; }
.cat-list a {
  font-size: var(--fs-sm); padding: 5px 13px 5px 6px; border-radius: 999px;
  background: var(--card); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  transition: border-color .18s, color .18s, transform .18s var(--ease), box-shadow .18s;
}
.cat-list a i {
  display: inline-block; min-width: 24px; text-align: center; font-style: normal; font-size: 11px; font-weight: 700;
  margin-right: 7px; padding: 0 6px; border-radius: 999px; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 80%, #000);
}
.cat-list a:hover { border-color: var(--c); color: var(--ink); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(60, 40, 20, .08); }

/* ---------- 案例卡 ---------- */
.case {
  position: relative; margin-top: 22px; padding: 34px 36px 26px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--topbar-h) + 20px);
}
.case::before {
  content: ""; position: absolute; left: 0; top: 36px; width: 5px; height: 44px; border-radius: 0 5px 5px 0; background: var(--c);
}
.anim .case { opacity: 0; transform: translateY(18px); }
.anim .case.in { opacity: 1; transform: none; transition: opacity .55s var(--ease), transform .55s var(--ease); }

.case-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.case-head .no {
  font-size: var(--fs-sm); font-weight: 800; letter-spacing: .06em; white-space: nowrap; font-variant-numeric: tabular-nums;
  padding: 3px 12px; border-radius: 999px; color: #fff; background: var(--c);
}
.case-head h3 { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 800; overflow-wrap: anywhere; }

.accounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.acc {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px;
  background: var(--soft); font-size: var(--fs-sm); font-weight: 600; color: var(--ink);
}
.acc .av {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--c) 18%, #fff); color: color-mix(in srgb, var(--c) 82%, #000);
  font-size: 13px; font-weight: 800;
}
.acc.none { color: var(--muted); font-weight: 500; padding-left: 14px; }

.case-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 444px; gap: 40px; align-items: start;
  margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line);
}
.case-body.no-shots { grid-template-columns: minmax(0, 1fr); }

.fields { margin: 0; }
.fields .row { padding: 0 0 22px; }
.fields .row:last-child { padding-bottom: 0; }
.fields dt {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  font-size: 15px; font-weight: 800; letter-spacing: .06em; color: color-mix(in srgb, var(--c) 80%, #000);
}
.fields dt::before {
  content: attr(data-i); width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center; font-size: 12px; letter-spacing: 0;
  background: color-mix(in srgb, var(--c) 13%, #fff);
}
.fields dd { margin: 0; padding-left: 32px; font-size: 16.5px; line-height: 1.85; color: var(--ink-2); }

.shots { position: sticky; top: calc(var(--topbar-h) + 20px); padding: 12px; border-radius: 16px; background: var(--soft); }
.imgs { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; border-radius: 10px; scrollbar-width: thin; }
.imgs.few { justify-content: center; }
.imgs a {
  flex: 0 0 auto; display: block; max-width: 100%; border-radius: 10px; overflow: hidden; background: #fff;
  scroll-snap-align: start; cursor: zoom-in; box-shadow: 0 1px 3px rgba(60, 40, 20, .12);
  transition: transform .25s var(--ease), box-shadow .25s;
}
.imgs a:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(60, 40, 20, .2); }
.imgs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shots-cap { display: flex; justify-content: space-between; margin-top: 10px; padding: 0 2px; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; letter-spacing: .04em; }

/* 关键数据 */
.kd {
  margin-top: 26px; padding: 20px 22px 22px; border-radius: 16px;
  background: color-mix(in srgb, var(--c) 6%, #fff); border: 1px solid color-mix(in srgb, var(--c) 15%, #fff);
}
.kd h4 {
  margin: 0 0 14px; display: flex; align-items: center; gap: 10px;
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .18em; color: color-mix(in srgb, var(--c) 80%, #000);
}
.kd h4::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 22%, transparent); }
.kd ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.kd li {
  padding: 7px 14px; border-radius: 10px; background: #fff; font-size: 15px; line-height: 1.55; color: var(--ink-2);
  border: 1px solid color-mix(in srgb, var(--c) 14%, #fff);
}
.kd li b { font-size: 17px; font-weight: 800; color: color-mix(in srgb, var(--c) 86%, #000); font-variant-numeric: tabular-nums; margin: 0 1px; }

.case-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: var(--fs-sm); font-weight: 600; }
.case-nav a { color: var(--muted); padding: 6px 12px; border-radius: 10px; transition: background .15s, color .15s; }
.case-nav a:hover { color: var(--ink); background: var(--soft); }

/* ---------- 其他 ---------- */
.to-top {
  position: fixed; right: 28px; bottom: 32px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 20px;
  box-shadow: var(--shadow-up);
  opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease), background .2s; z-index: 15;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand); }

/* ---------- 右下角加群浮窗 ---------- */
.promo { position: fixed; right: 28px; bottom: 28px; z-index: 18; }
.promo-card {
  position: relative; width: 300px; padding: 24px 24px 20px; border-radius: 22px; text-align: center;
  background: var(--card); box-shadow: var(--shadow-up), 0 0 0 1px var(--line);
  transform-origin: 100% 100%; animation: promoIn .5s var(--ease);
}
.promo-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, #ff7a59, var(--brand), var(--brand-deep));
  clip-path: inset(0 round 22px 22px 0 0);
}
@keyframes promoIn { from { opacity: 0; transform: translateY(24px) scale(.92); } }
.promo-min {
  position: absolute; right: 12px; top: 16px; width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--soft); color: var(--ink-2); font-size: 18px; line-height: 1; display: grid; place-items: center;
  transition: background .2s, color .2s;
}
.promo-min:hover { background: var(--ink); color: #fff; }
.promo-eyebrow {
  display: inline-block; margin: 4px 0 10px; padding: 3px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .14em;
}
.promo-card h2 { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 800; }
.promo-sub { margin: 8px 0 14px; font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-2); }
.promo-qr { display: block; width: 200px; height: auto; margin: 0 auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.promo-tip { margin: 10px 0 0; font-size: var(--fs-xs); font-weight: 600; color: var(--muted); letter-spacing: .12em; }
.promo-pill {
  display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #ff5a6e, var(--brand) 55%, var(--brand-deep)); color: #fff;
  font-size: 15px; font-weight: 700; box-shadow: 0 10px 24px rgba(255, 46, 77, .36);
  animation: promoIn .35s var(--ease); transition: transform .2s var(--ease);
}
.promo-pill:hover { transform: translateY(-2px) scale(1.03); }
.promo-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 100% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } }
.to-top { bottom: 92px; }
@media (max-width: 900px) {
  .promo { right: 14px; bottom: 14px; }
  .promo-card { width: min(280px, calc(100vw - 28px)); padding: 20px 18px 16px; }
  .promo-qr { width: 170px; }
  .to-top { right: 14px; bottom: 74px; }
}

.lightbox { border: 0; padding: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: #121010; color: #fff; }
.lightbox[open] { animation: lbIn .22s ease-out; }
@keyframes lbIn { from { opacity: 0; } }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox-bar { height: 52px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 18px; background: #1c1918; font-size: var(--fs-sm); font-weight: 600; }
.lightbox-actions { display: flex; align-items: center; gap: 18px; font-weight: 400; }
.lightbox-hint { color: #8a817a; font-size: var(--fs-xs); }
.lightbox-actions a { color: #cfc8c1; text-decoration: underline; text-underline-offset: 3px; }
.lightbox-actions button { border: 0; background: transparent; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; }
.lightbox-canvas { height: calc(100vh - 52px); overflow: auto; padding: 20px; display: flex; cursor: zoom-out; }
.lightbox-canvas img { display: block; margin: auto; max-width: 100%; max-height: 100%; border-radius: 8px; cursor: zoom-in; animation: imgIn .25s var(--ease); }
.lightbox-canvas img.zoom { max-width: none; max-height: none; cursor: zoom-out; }
@keyframes imgIn { from { opacity: 0; transform: scale(.97); } }
.lightbox-arrow {
  position: fixed; top: 50%; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 28px; line-height: 1; display: grid; place-items: center;
  transition: background .2s, transform .2s var(--ease);
}
.lightbox-arrow:hover { background: var(--brand); transform: scale(1.08); }
.lightbox-arrow.prev { left: 20px; }
.lightbox-arrow.next { right: 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 1240px) {
  .case-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .shots { position: static; order: -1; }
  .imgs.few { justify-content: flex-start; }
  .topbar-meta { display: none; }
}
@media (max-width: 900px) {
  :root { --topbar-h: 60px; --fs-2xl: 32px; --fs-xl: 24px; }
  .topbar-inner { padding: 0 16px; gap: 12px; }
  .brand { width: auto; }
  .brand-name { display: none; }
  .search kbd, .lightbox-hint { display: none; }
  .layout { display: block; padding: 0 16px 70px; overflow-x: clip; }
  .sidebar {
    position: sticky; top: var(--topbar-h); z-index: 10; max-height: none; overflow: hidden;
    margin: 0 -16px 16px; padding: 10px 16px; background: rgba(247, 243, 238, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
  }
  .sidebar-title { display: none; }
  #catNav { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  #catNav > a, #catNav .cat-item > a { flex: 0 0 auto; background: #fff; border-radius: 999px; padding: 6px 14px; font-size: var(--fs-sm); white-space: nowrap; }
  #catNav a.all { margin-bottom: 0; padding: 6px 14px; font-size: var(--fs-sm); box-shadow: none; }
  #catNav .sub { display: none !important; }
  #catNav .cat-item { flex: 0 0 auto; }
  .hero { padding: 28px 22px; border-radius: 22px; }
  .hero-sub { font-size: var(--fs-base); }
  .stat { min-width: 0; flex: 1 1 40%; padding: 12px 16px; }
  .stat b { font-size: 32px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-card .name { font-size: 15px; }
  .cat-head { gap: 12px; }
  .cat-head .no { font-size: 38px; }
  .cat-head::after { display: none; }
  .case { padding: 24px 20px 18px; border-radius: 16px; }
  .case::before { top: 26px; height: 36px; }
  .case-head h3 { font-size: 21px; }
  .fields dd { padding-left: 0; font-size: 16px; }
  .case-nav { font-size: 13px; }
  .case-nav a { padding: 6px 4px; }
}
