/* =====================================================================
   showcase.css — 素材总览页
   ---------------------------------------------------------------------
   纯白底、1px 细线、单一强调色（青铜绿 #3d6b57）。
   排版原则：标题敢大、元信息敢小，中间层全部压掉；留白只给分区之间。

   字号梯度：
     H1        30~54px / 300
     stats 数字 36px    / 200
     引文       20~30px / 300
     H2        22px     / 400
     组标题     11.5px   / 600
     卡片名     11px     / 600
     元信息     8.5px    / mono

   本文件只有样式，没有可改的事实。
   尺寸口径（画布高 = 内容身高 × k）与素材契约在 docs/ASSETS.md；
   网格与分区内容由 showcase.js 生成，不在这里写死。
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
  color: #141414;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Source Han Sans SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 选中文字：默认的浏览器蓝与这套白底 + 青铜绿不搭。
   用页面唯一的强调色做实底（白字 6.11:1），不引入新色相。 */
::selection { background: #3d6b57; color: #ffffff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #e4e4e4; }
::-webkit-scrollbar-thumb:hover { background: #d0d0d0; }
::-webkit-scrollbar-track { background: #fff; }

/* ============================================================ 顶栏 */

.hd {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #ececec;
}

.hd-in {
  max-width: 1720px;
  margin: 0 auto;
  padding: 16px 26px 0;
}

.hd-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.brand h1 {
  margin: 0;
  font-size: clamp(30px, 3.8vw, 54px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.brand .en {
  margin: 7px 0 0;
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #a8a8a8;
}

.stats {
  display: flex;
  gap: 32px;
  padding-bottom: 3px;
}

.stat b {
  display: block;
  font-size: clamp(26px, 2.4vw, 38px);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #a8a8a8;
  white-space: nowrap;
}

/* ------------------------------------------------------------ tab 条 */

.tabs {
  display: flex;
  gap: 28px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 1.5px solid transparent;
  padding: 10px 0 9px;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #a8a8a8;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  gap: 7px;
  align-items: baseline;
  transition: color .18s ease, border-color .18s ease;
}

.tab i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #d2d2d2;
  font-variant-numeric: tabular-nums;
  transition: color .18s ease;
}

.tab:hover { color: #555; }

.tab[aria-selected="true"] { color: #141414; border-bottom-color: #3d6b57; }
.tab[aria-selected="true"] i { color: #3d6b57; }

/* ============================================================ 按语 */

.intro {
  max-width: 1720px;
  margin: 0 auto;
  padding: 24px 26px 22px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: start;
  border-bottom: 1px solid #f2f2f2;
}

.intro blockquote {
  margin: 0;
  padding-left: 16px;
  border-left: 2px solid #3d6b57;
  font-size: clamp(19px, 2.1vw, 29px);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.42;
  color: #161616;
}

.intro blockquote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #b4b4b4;
}

.gloss p {
  margin: 0 0 6px;
  font-size: 11.5px;
  line-height: 1.72;
  color: #6f6f6f;
  max-width: 64ch;
}

.gloss p:last-child { margin-bottom: 0; }

.gloss b { color: #141414; font-weight: 600; }

.gloss em {
  font-style: normal;
  color: #3d6b57;
  font-weight: 600;
}

/* ============================================================ 内容区 */

.sec {
  max-width: 1720px;
  margin: 0 auto;
  padding: 24px 26px 60px;
}

.sec-hd {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 5px;
}

.sec-hd .no {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #d4d4d4;
  font-variant-numeric: tabular-nums;
}

.sec-hd h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.sec-hd .en {
  font-size: 9px;
  letter-spacing: 0.26em;
  color: #c4c4c4;
  text-transform: uppercase;
}

.sec-sub {
  margin: 0 0 16px;
  font-size: 11px;
  color: #a0a0a0;
}

.g-hd {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 24px 0 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f2f2f2;
}

.g-hd:first-child { margin-top: 0; }

.g-hd h3 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.g-hd span {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #c4c4c4;
  text-transform: uppercase;
}

.g-hd em {
  font-style: normal;
  margin-left: auto;
  font-size: 9px;
  color: #c4c4c4;
  font-variant-numeric: tabular-nums;
}

.foot {
  margin: 16px 0 0;
  font-size: 9.5px;
  line-height: 1.7;
  color: #c0c0c0;
}

.foot b { color: #949494; font-weight: 600; }

/* ============================================================ 网格与卡片 */

.grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr));
}

/* 宽幅物料（展陈图）占满整行，别被格子压成邮票 */
.cell.wide-cell { grid-column: 1 / -1; }
.cell.wide-cell .box { height: auto; padding: 4px 0; }
.cell.wide-cell img {
  max-height: var(--bh, 420px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.cell {
  border: 1px solid #ededed;
  background: #fff;
  padding: 7px 7px 6px;
  transition: border-color .18s ease;
  cursor: zoom-in;
  min-width: 0;
}

.cell:hover { border-color: #c6c6c6; }

.cell .box {
  height: var(--bh, 148px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cell .na {
  font-size: 18px;
  font-weight: 200;
  color: #dcdcdc;
}

.cell canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.cell img {
  display: block;
  max-width: 100%;
  max-height: var(--bh, 148px);
  width: auto;
  height: auto;
}

.cell .nm {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell .mt {
  font-size: 8.5px;
  line-height: 1.45;
  color: #b2b2b2;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell .kz {
  font-size: 8.5px;
  line-height: 1.45;
  color: #c2c2c2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------ 武器长表 */

.wt-wrap { overflow-x: auto; padding-bottom: 2px; }

/* ⚠️ 列数必须由 JS 写进 `--wcols`，不能在 CSS 里写死。
   写死 `repeat(8, …)` 时，一旦状态列变少（2026-10-25 删掉「出招序列 / 出招单帧」
   后剩 6 列），每行只有 7 个元素却排在 9 列的网格里 —— 行与行之间整体错位 2 格，
   表头在第一列、数据从第三列开始往下淌，看起来像整张表没渲染出来。 */
.wt {
  display: grid;
  grid-template-columns: 172px repeat(var(--wcols, 8), minmax(0, 1fr));
  gap: 6px;
  min-width: calc(172px + var(--wcols, 8) * 128px);
}

.wt .hh {
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: #c4c4c4;
  text-transform: uppercase;
  padding: 0 0 4px 2px;
}

.wt .wn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 2px solid #ededed;
  padding: 2px 4px 2px 11px;
  min-width: 0;
}

.wt .wn b {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.wt .wn i {
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.14em;
  color: #bdbdbd;
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wt .cell { --bh: 132px; padding: 5px 5px 4px; }
.wt .cell .nm { display: none; }
.wt .cell .mt { font-size: 7.5px; }
.wt .cell .kz { font-size: 7.5px; }

/* ------------------------------------------------------------ 全集墙 */

.wall { margin: 0 0 2px; }

.wall-row {
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
}

.wall figure {
  margin: 0;
  border: 1px solid #f5f5f5;
  background: #fff;
}

.wall img {
  display: block;
  width: 100%;
  height: auto;
}

/* ============================================================ 放大层 */

.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #fff;
  display: none;
  flex-direction: column;
}

.lb.on { display: flex; }

.lb-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 26px;
  border-bottom: 1px solid #f0f0f0;
}

.lb-hd .lb-t {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lb-hd .lb-m {
  margin-top: 3px;
  font-size: 9px;
  color: #b2b2b2;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.lb-hd .lb-x {
  appearance: none;
  background: none;
  border: 1px solid #e4e4e4;
  padding: 7px 14px;
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: #909090;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .18s ease, color .18s ease;
}

.lb-hd .lb-x:hover { border-color: #bdbdbd; color: #141414; }

.lb-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lb-body canvas, .lb-body img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

/* ============================================================ 窄屏兜底 */

@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)) !important; }
  .wt {
    grid-template-columns: 150px repeat(var(--wcols, 8), minmax(0, 1fr));
    min-width: calc(150px + var(--wcols, 8) * 118px);
  }
}

@media (max-width: 980px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 18px 18px;
  }
  .hd-in { padding: 14px 18px 0; }
  .sec { padding: 20px 18px 48px; }
  .stats { gap: 20px; }
}
