@charset "utf-8";
/* ============================================================
   极简工程图纸 · Paper Drafting
   ------------------------------------------------------------
   设计约束（不要引入）：
     · 圆角一律 0，阴影一律不用，渐变与辉光一律不用
     · 只有一种强调色（安全橙），且每屏最多出现两次
     · 等宽字只用在标签/编号/坐标这类"图纸注记"上，不当正文
     · 缩略图统一去色，hover 才显色
   素材：public/img/{paper,pointcloud,lineart}.webp
   ============================================================ */

/* ------------------------------------------------------------ 1. 设计变量 */
:root {
  /* 纸与墨 */
  --paper: #f1efe6;
  --paper-2: #e9e6da;
  --paper-3: #e0dccd;
  --ink: #16160f;
  --ink-2: #4c4c44;
  --ink-3: #6b6b62;
  --rule: #d3cfbe;
  --rule-2: #bdb8a3;

  /* 唯一强调色 */
  --accent: #c0431a;

  /* 字体 */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
    "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-serif: "Songti SC", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", serif;
  --font-mono: "Cascadia Mono", "SF Mono", "Consolas", "Menlo", ui-monospace, monospace;

  /* 尺度 */
  --wrap: 1180px;
  --nav-h: 62px;
  --gutter: 24px;
  --radius: 0;
}

/* ------------------------------------------------------------ 2. 基础重置 */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("../img/paper.webp");
  background-size: 512px 512px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 细网格：极淡，只作为图纸底纹 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(22, 22, 15, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 22, 15, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}

img { max-width: 100%; display: block; }
svg { display: block; }

a { color: inherit; text-decoration: none; }

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  border-radius: var(--radius);
}

::selection { background: rgba(192, 67, 26, 0.16); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--rule-2); border: 2px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------ 3. 排版 */
h1, h2, h3, h4, h5 {
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.022em;
  margin: 0;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.mono { font-family: var(--font-mono); font-size: 0.86em; letter-spacing: 0.02em; }

/* 图纸注记：小节上方的等宽小标签 */
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 14px;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.crumbs {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.crumbs a { border-bottom: 1px solid var(--rule-2); }
.crumbs a:hover { color: var(--accent); border-color: var(--accent); }

hr { border: none; border-top: 1px solid var(--rule); margin: 40px 0; }

/* ------------------------------------------------------------ 4. 布局 */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

.section { padding: 92px 0; position: relative; z-index: 1; }
.section.tight { padding-top: 0; }
.section + .section { border-top: 1px solid var(--rule); }

.section-head { margin-bottom: 44px; }
.section-title { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.section-sub { color: var(--ink-2); font-size: 15px; max-width: 62ch; }

.page-head {
  position: relative;
  padding: calc(var(--nav-h) + 74px) 0 46px;
  border-bottom: 1px solid var(--ink);
}
.page-head h1 {
  font-size: clamp(30px, 4.4vw, 48px);
  margin-bottom: 16px;
}
.page-head .lead { color: var(--ink-2); font-size: 16px; max-width: 60ch; }

/* ------------------------------------------------------------ 5. 页头导航 */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 80;
  background: rgba(241, 239, 230, 0.9);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--ink);
  background: rgba(241, 239, 230, 0.97);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  flex: none;
  transition: background 0.16s ease, color 0.16s ease;
}
.brand:hover .brand-mark { background: var(--ink); color: var(--paper); }
.brand-mark.lg { width: 46px; height: 46px; font-size: 15px; }

.brand-name { font-size: 14.5px; font-weight: 500; line-height: 1.25; letter-spacing: 0.01em; }
.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  padding: 7px 12px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: color 0.16s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  padding: 11px 9px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span { display: block; height: 1px; background: var(--ink); }

/* ------------------------------------------------------------ 6. 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:disabled,
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.btn:disabled:hover,
.btn[disabled]:hover { background: transparent; color: var(--ink); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn-ghost { border-color: var(--rule-2); color: var(--ink-2); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.btn-sm { padding: 8px 14px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }

/* 文字型链接：下划线可点 */
.tlink {
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 2px;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.tlink:hover { color: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------ 7. 表单 */
.input,
select.input,
textarea.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule-2);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.input:hover { border-color: var(--ink-3); }
.input:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}
textarea.input { resize: vertical; min-height: 96px; line-height: 1.7; }
select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 7px;
}
.field .req { color: var(--accent); }

/* ------------------------------------------------------------ 8. 标签 / 徽章 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--rule-2);
  background: transparent;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  white-space: nowrap;
}
.tag.small { font-size: 10px; padding: 1px 5px; }

.status-pill {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid var(--rule-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  white-space: nowrap;
}
.status-pill.ship { color: var(--ink); border-color: var(--ink); }

/* ------------------------------------------------------------ 9. 卡片 / 列表 */
.card {
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.42);
  padding: 28px;
  transition: border-color 0.18s ease;
}
.card:hover { border-color: var(--ink); }

/* 首页三入口：横向列表行，不是三张浮起的卡片 */
.entry-list { border-top: 1px solid var(--ink); }

.entry-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) minmax(0, 1.35fr) 76px;
  align-items: baseline;
  gap: 24px;
  padding: 30px 4px;
  border-bottom: 1px solid var(--rule);
  transition: background 0.18s ease, padding-left 0.18s ease;
}
.entry-row:hover { background: rgba(255, 255, 255, 0.55); padding-left: 14px; }
.entry-row .idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.entry-row h3 { font-size: 19px; }
.entry-row p { margin: 0; color: var(--ink-2); font-size: 14px; }
.entry-row .go {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
  transition: color 0.18s ease;
}
.entry-row:hover .go { color: var(--accent); }

/* 通用缩略图：去色，hover 显色 */
.thumb {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  border: 1px solid var(--rule);
}
.thumb img,
.thumb .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.92) contrast(1.06);
  transition: filter 0.28s ease;
}
.lib-card:hover .thumb img,
.feat-card:hover .thumb img,
.related-card:hover .thumb img { filter: none; }
.thumb .ph {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  background: repeating-linear-gradient(
    45deg,
    var(--paper-3),
    var(--paper-3) 7px,
    var(--paper-2) 7px,
    var(--paper-2) 14px
  );
}

.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 30px 26px;
}

.lib-card { display: block; }
.lib-card .thumb { aspect-ratio: 4 / 3; margin-bottom: 13px; }
.lib-card .body .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.lib-card h3 { font-size: 15.5px; }
.lib-card h3 a:hover { color: var(--accent); }
.lib-card .foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--rule);
  font-size: 11.5px;
}
.meta-line { color: var(--ink-3); font-family: var(--font-mono); font-size: 10.5px; }
.more {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  transition: color 0.16s ease;
}
.lib-card:hover .more,
.related-card:hover .more,
.feat-card:hover .more { color: var(--accent); }

.empty-state {
  border: 1px dashed var(--rule-2);
  background: rgba(255, 255, 255, 0.35);
  padding: 64px 28px;
  text-align: center;
}
.empty-figure { width: min(300px, 72%); margin: 0 auto 22px; opacity: 0.55; }
.empty-state h3 { font-size: 18px; margin-bottom: 10px; }
.empty-state p { color: var(--ink-2); font-size: 14px; max-width: 48ch; margin: 0 auto 20px; }

/* ------------------------------------------------------------ 10. 首页 Hero */
.hero { position: relative; padding: calc(var(--nav-h) + 84px) 0 76px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5.6vw, 62px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--ink-2); font-size: 16px; max-width: 46ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 右边的线稿图 */
.hero-figure { position: relative; }
.hero-figure img { width: 100%; height: auto; opacity: 0.82; }

/* 角标：十字定位线，纯 CSS 无图片 */
.crosshair { position: absolute; width: 15px; height: 15px; pointer-events: none; }
.crosshair::before,
.crosshair::after { content: ""; position: absolute; background: var(--ink); }
.crosshair::before { left: 0; right: 0; top: 50%; height: 1px; }
.crosshair::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.crosshair.tl { top: -8px; left: -8px; }
.crosshair.br { bottom: -8px; right: -8px; }

.hero-caption {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* ------------------------------------------------------------ 11. 资源库页头 */
.hub-hero { padding: calc(var(--nav-h) + 70px) 0 46px; border-bottom: 1px solid var(--ink); }
.hub-hero h1 { font-size: clamp(30px, 4.4vw, 48px); margin-bottom: 14px; }
.hub-hero .lead { color: var(--ink-2); font-size: 16px; max-width: 58ch; }
.hero-types { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; }
.hero-types a {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule-2);
  font-size: 13px;
  color: var(--ink-2);
  transition: color 0.16s ease, border-color 0.16s ease;
}
.hero-types a b { font-weight: 500; color: var(--ink); }
.hero-types a:hover { color: var(--accent); border-color: var(--accent); }

/* 工具条 */
.lib-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--rule);
}
.type-tabs { display: flex; gap: 0; border: 1px solid var(--ink); }
.type-tab {
  padding: 8px 16px;
  border: none;
  border-right: 1px solid var(--ink);
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}
.type-tab:last-child { border-right: none; }
.type-tab:hover { background: var(--paper-2); color: var(--ink); }
.type-tab.active { background: var(--ink); color: var(--paper); }
.type-tab .n { margin-left: 7px; font-family: var(--font-mono); font-size: 10.5px; opacity: 0.7; }

.filter-secondary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 5px 11px;
  border: 1px solid var(--rule-2);
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.lib-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 250px;
  padding: 0 12px;
  border: 1px solid var(--rule-2);
  background: rgba(255, 255, 255, 0.5);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.lib-search:focus-within { border-color: var(--ink); background: #fff; }
.lib-search .si { color: var(--ink-3); font-family: var(--font-mono); font-size: 13px; }
.lib-search input { flex: 1; min-width: 0; padding: 9px 0; border: none; background: transparent; font-size: 13.5px; }
.lib-search input:focus { outline: none; }

.lib-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  white-space: nowrap;
}

/* 精选条 */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.feat-card { display: block; border: 1px solid var(--rule); padding: 12px; transition: border-color 0.18s ease; }
.feat-card:hover { border-color: var(--ink); }
.feat-card .thumb { aspect-ratio: 16 / 10; }
.feat-meta { padding: 14px 2px 2px; }
.feat-meta h3 { font-size: 16px; margin-bottom: 6px; }
.feat-meta .row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

.type-badge {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.status-badge {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--rule-2);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
}
.status-badge.ok { color: var(--ink); border-color: var(--ink-3); }
.status-badge.wait { color: var(--accent); border-color: var(--accent); }

/* 收录说明 */
.entry-note {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 24px;
  margin-top: 64px;
  padding: 26px 28px;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.4);
}
.entry-note .en-mark { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--accent); padding-top: 3px; }
.entry-note h3 { font-size: 15px; margin-bottom: 8px; }
.entry-note p { color: var(--ink-2); font-size: 13.5px; max-width: 76ch; }
.entry-note a { border-bottom: 1px solid var(--rule-2); }
.entry-note a:hover { color: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------ 12. 详情页 */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 1fr);
  gap: 44px;
  align-items: start;
}
.detail-stage { border: 1px solid var(--ink); background: #eceae0; }
.detail-card { border-top: 1px solid var(--ink); }
.detail-card h4 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 13px 0;
  margin-top: 26px;
  border-bottom: 1px solid var(--rule);
}
.detail-card h4:first-child { margin-top: 0; }
.detail-card h4 .n { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }

.dl-zone { display: grid; gap: 8px; }
.dl-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--rule-2);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.dl-btn:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.6); }
.dl-btn.empty { opacity: 0.6; pointer-events: none; }
.dl-btn .di {
  min-width: 58px;
  padding: 3px 0;
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--ink);
  flex: none;
}
.dl-btn .dn { display: block; font-size: 13.5px; }
.dl-btn .dd { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }

.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table th,
.spec-table td { padding: 9px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.spec-table th { font-weight: 400; color: var(--ink-3); width: 42%; }
.spec-table td { font-family: var(--font-mono); font-size: 12.5px; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px; }
.related-card .thumb { aspect-ratio: 4 / 3; margin-bottom: 11px; }
.related-card h4 { font-size: 14px; margin-bottom: 4px; }
.related-card .meta { color: var(--ink-3); font-family: var(--font-mono); font-size: 10.5px; }

/* ------------------------------------------------------------ 13. 3D 视口 */
.viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 400px;
  background: #eceae0;
  overflow: hidden;
}
.viewport canvas { display: block; }
.viewport.dragover { outline: 2px solid var(--accent); outline-offset: -10px; }

.hud-label {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: rgba(241, 239, 230, 0.86);
  border: 1px solid var(--rule-2);
  padding: 4px 9px;
}
.hud-label b { color: var(--ink); font-weight: 500; }
.hud-label span { color: var(--ink-3); }

.vtoolbar { position: absolute; top: 12px; right: 14px; z-index: 3; display: flex; gap: 6px; }
.vtoolbar button {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  white-space: nowrap;
  border: 1px solid var(--rule-2);
  background: rgba(241, 239, 230, 0.86);
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.vtoolbar button:hover { border-color: var(--ink); color: var(--ink); }
.vtoolbar button.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.load-tip {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
  background: rgba(236, 234, 224, 0.96);
  text-align: center;
  padding: 28px;
}
.load-tip.show { display: grid; }
.load-tip .big { font-family: var(--font-mono); font-size: 26px; letter-spacing: 0.06em; color: var(--ink); margin-bottom: 12px; }
.load-tip h3 { font-size: 15px; margin-bottom: 8px; }
.load-tip p { color: var(--ink-2); font-size: 13.5px; max-width: 42ch; margin: 0 auto 18px; }

.vtools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 1px solid var(--ink);
}
.vtools .group { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.vtools .glabel {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 3px;
}
.vtools .sep { width: 1px; height: 18px; background: var(--rule); }
.seg {
  padding: 6px 12px;
  border: 1px solid var(--rule-2);
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.seg:hover { border-color: var(--ink); color: var(--ink); }
.seg.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.tex-hero { border: 1px solid var(--ink); background: var(--paper-3); }
.tex-hero img { width: 100%; height: auto; }
.tex-swap { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

.cell-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.cell { border: 1px solid var(--rule); padding: 8px 10px; }
.cell .k { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }
.cell .v { display: block; font-family: var(--font-mono); font-size: 13px; }
.file-chip { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--rule-2); font-size: 12.5px; }
.file-chip .mi { font-size: 12px; color: var(--ink-3); }
.file-chip .mt { display: block; }
.file-chip .ms { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }

/* ------------------------------------------------------------ 14. 文章 / 留白页 */
.article { max-width: 760px; }
.a-head { padding-bottom: 24px; border-bottom: 1px solid var(--ink); margin-bottom: 32px; }
.a-head h1 { font-size: clamp(26px, 3.6vw, 38px); margin: 6px 0 14px; }
.a-meta { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.a-body { font-size: 16px; line-height: 1.85; color: var(--ink-2); }
.a-body h2 { font-size: 21px; color: var(--ink); margin: 40px 0 12px; }
.a-body h3 { font-size: 17px; color: var(--ink); margin: 30px 0 10px; }
.a-body p { margin: 0 0 18px; }
.a-body ul, .a-body ol { margin: 0 0 18px; padding-left: 22px; }
.a-body li { margin-bottom: 7px; }
.a-body a { color: var(--ink); border-bottom: 1px solid var(--accent); }
.a-body a:hover { color: var(--accent); }
.a-body strong { color: var(--ink); font-weight: 500; }
.a-body blockquote { margin: 24px 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--accent); color: var(--ink-2); }
.a-body pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
}
.a-body pre code { background: none; border: none; padding: 0; color: var(--ink); }
.a-body img { border: 1px solid var(--rule); margin: 22px 0; }
.a-body table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; }
.a-body th, .a-body td { border: 1px solid var(--rule); padding: 9px 12px; text-align: left; }
.a-body th { background: rgba(255, 255, 255, 0.5); font-weight: 500; }
.a-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--rule); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 34px; }
.post-card { border-top: 1px solid var(--ink); padding-top: 16px; }
.post-card:hover h3 a { color: var(--accent); }
.post-card .date { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-3); margin-bottom: 8px; }
.post-card h3 { font-size: 18px; margin-bottom: 9px; }
.post-card .excerpt { color: var(--ink-2); font-size: 14px; }
.post-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.post-card .foot { border-top: 1px solid var(--rule); padding-top: 9px; font-size: 12px; }
.post-card .read a { border-bottom: 1px solid var(--rule-2); }
.post-card .read a:hover { color: var(--accent); border-color: var(--accent); }

/* 留白引导块：像图纸角上的批注条 */
.fill-in {
  border: 1px dashed var(--rule-2);
  border-left: 2px solid var(--accent);
  background: rgba(255, 255, 255, 0.42);
  padding: 24px 26px;
}
.fill-in .fi-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.fill-in p { color: var(--ink-2); font-size: 14px; }
.fill-in code { font-family: var(--font-mono); font-size: 12.5px; padding: 1px 5px; border: 1px solid var(--rule); background: rgba(255, 255, 255, 0.6); }
.fill-in a { border-bottom: 1px solid var(--rule-2); }
.fill-in a:hover { color: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------ 15. 时间线 / 工具 / 游戏（页面留空，保留类名备用） */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--rule-2); }
.tl-item { position: relative; padding-bottom: 28px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 9px;
  width: 7px;
  height: 7px;
  background: var(--paper);
  border: 1px solid var(--accent);
}
.tl-item .year { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.tl-item h4 { font-size: 16px; margin: 4px 0 6px; }
.tl-item p { color: var(--ink-2); font-size: 14px; }
.tl-item .tags { display: flex; gap: 6px; flex-wrap: wrap; }

.tool-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); border-top: 1px solid var(--ink); }
.tool-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}
.tool-item .ti { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-3); border: 1px solid var(--rule-2); padding: 2px 7px; flex: none; }
.tool-item .tn { font-size: 14.5px; }
.tool-item .td { font-size: 12.5px; color: var(--ink-3); }

.game-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 34px; align-items: start; }
.game-card .shot { border: 1px solid var(--ink); background: var(--paper-3); overflow: hidden; }
/* 必须显式给 height:auto —— 全局只有 `img{max-width:100%}`，
   配着 <img width height> 属性会让高度保持属性值，图被纵向拉长。 */
.game-card .shot img { width: 100%; height: auto; display: block; }
.game-card .shot .ph { display: grid; place-items: center; min-height: 260px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--ink-3); }
.game-card .title-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.game-card .sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); margin: 6px 0 14px; }
.game-card p { color: var(--ink-2); font-size: 14.5px; }
.game-card .feats { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 7px; }
.game-card .feats li { font-size: 13.5px; color: var(--ink-2); padding-left: 16px; position: relative; }
.game-card .feats li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 1px; background: var(--accent); }
.game-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.skill-row { margin-bottom: 18px; }
.skill-row .sk-name { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 7px; }
.skill-fill { height: 1px; background: var(--rule); position: relative; }
.skill-fill i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }

.stat-cell .num { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }

/* ------------------------------------------------------------ 16. 页脚 */
.site-footer { border-top: 1px solid var(--ink); padding: 56px 0 34px; margin-top: 40px; position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer-brand p { color: var(--ink-3); font-size: 13px; max-width: 40ch; margin-top: 12px; }
.site-footer h5 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
  font-weight: 400;
}
.footer-grid > div > a { display: block; padding: 4px 0; font-size: 13.5px; color: var(--ink-2); transition: color 0.16s ease; }
.footer-grid > div > a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

/* ------------------------------------------------------------ 17. 入场动画 */
/* 注意：main.js 给显现元素加的类名是 .visible，不是 .in */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.06s; }
.d2 { transition-delay: 0.12s; }
.d3 { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ------------------------------------------------------------ 18. 响应式 */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-figure { max-width: 460px; }
  .detail-grid { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .section { padding: 68px 0; }
  .entry-row { grid-template-columns: 48px minmax(0, 1fr) 60px; gap: 14px; }
  .entry-row p { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tool-item { border-right: none; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 18px;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav-links a::after { display: none; }
  .lib-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px 18px; }
  .entry-note { grid-template-columns: 1fr; gap: 12px; }
  .lib-toolbar { gap: 12px; }
  .lib-search { min-width: 100%; }
  .lib-count { margin-left: 0; }
  .game-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .entry-row { grid-template-columns: 40px minmax(0, 1fr); }
  .entry-row .go { display: none; }
  .lib-grid { grid-template-columns: 1fr 1fr; }
  .hero-caption { flex-direction: column; gap: 4px; }
}