/* ============================================================
   PIKOPIKO 图纸菜单 —— «официант» официального сайта:
   美式复古工坊。奶油墙、番茄红、深绿、蜂蜜、木色。
   规则：0 圆角 · 硬阴影 · 实物层带旋转 · mono 标注层。
   tokens 与官网 src/styles/tokens.css 保持一致。
   ============================================================ */

/* ---------- 品牌字体（自托管，西里尔+拉丁子集） ---------- */
@font-face {
  font-family: "Lora Variable";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/lora-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Lora Variable";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/lora-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026;
}
@font-face {
  font-family: "Golos Text Variable";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/golos-text-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text Variable";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/golos-text-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2022, U+2026;
}

/* ---------- tokens（与官网一致） ---------- */
:root {
  --paper: #f6edda;
  --paper-deep: #efe3c6;
  --card: #fbf4e2;
  --ticket: #f8eccd;
  --ink: #2a2520;
  --ink-soft: #6f6557;
  --ink-faint: rgba(42, 37, 32, 0.2);
  --red: #d6482b;
  --red-deep: #a93a22;
  --green-deep: #2f4636;
  --green: #44604b;
  --honey: #dfa63c;
  --wood: #d9b889;
  --cream-text: rgba(246, 237, 218, 0.94);
  --cream-text-soft: rgba(246, 237, 218, 0.7);

  --font-display: "Lora Variable", Georgia, "Noto Serif SC", "Songti SC", serif;
  --font-body: "Golos Text Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono Variable", Consolas, "Microsoft YaHei", monospace;

  --shadow-card: 5px 6px 0 rgba(42, 37, 32, 0.12);
  --shadow-card-hover: 7px 8px 0 rgba(42, 37, 32, 0.16);
  --shadow-btn: 3px 3px 0 var(--ink);
  --border-card: 1.5px solid rgba(42, 37, 32, 0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 纸面颗粒：打破数字平面感（redesign-skill：flat = sterile） */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 999; pointer-events: none;
  opacity: 0.05;
  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='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { max-width: 720px; margin: 0 auto; padding: 0 18px 56px; }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 640; line-height: 1.1;
  letter-spacing: -0.01em; text-wrap: balance; }

::selection { background: var(--red); color: var(--paper); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- mono 标注层 ---------- */
.mono { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.04em;
  color: var(--ink-soft); }
.eyebrow { display: flex; align-items: center; gap: 0.65em; font-family: var(--font-mono);
  font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); }
.eyebrow::before { content: ""; width: 9px; height: 9px; background: var(--red); flex: none; }

/* ---------- 豆子（термомозаика：圆孔豆） ---------- */
.bead { width: 13px; height: 13px; border-radius: 50%; display: inline-block; flex: none;
  background: radial-gradient(circle at center,
    var(--paper) 0 2.6px, var(--bead-c, var(--honey)) 2.9px 100%); }
.bead-off { --bead-c: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-faint);
  background: radial-gradient(circle at center, transparent 0 2.6px, transparent 2.9px 100%); }
.beads { display: inline-flex; gap: 3px; align-items: center; }

/* ---------- 招牌（头部） ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 18px 11px;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-logo { display: block; width: clamp(116px, 18vw, 178px); height: auto; max-height: 54px;
  object-fit: contain; object-position: left center; }
.brand-name { font-family: var(--font-display); font-weight: 680; font-size: 21px;
  letter-spacing: 0.16em; }
.brand-pixel { display: grid; grid-template-columns: repeat(3, 8px); gap: 2.5px; }
.brand-pixel i { width: 8px; height: 8px; border-radius: 50%; display: block;
  background: radial-gradient(circle at center, var(--paper) 0 1.7px, var(--c) 2px 100%); }
.brand-pixel i:nth-child(1) { --c: var(--red); }
.brand-pixel i:nth-child(2) { --c: var(--honey); }
.brand-pixel i:nth-child(3) { --c: var(--green); }
.brand-pixel i:nth-child(4) { --c: var(--green); }
.brand-pixel i:nth-child(5) { --c: var(--red); }
.brand-pixel i:nth-child(6) { --c: var(--honey); }
.brand-pixel i:nth-child(7) { --c: var(--honey); }
.brand-pixel i:nth-child(8) { --c: var(--green); }
.brand-pixel i:nth-child(9) { --c: var(--red); }

.site-nav { display: flex; gap: 12px; align-items: center; font-size: 14px;
  white-space: nowrap; }
/* 触控目标 ≥44px：竖向 padding 撑起点按区，视觉基线不变 */
.site-nav a { color: var(--ink-soft); border-bottom: 2px solid transparent;
  padding: 13px 2px; }
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--red); }
.lang-switch { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  border: 1.5px solid var(--ink); padding: 11px 12px !important; background: var(--card);
  box-shadow: 2px 2px 0 var(--ink); line-height: 1; }
.lang-switch:hover { border-bottom-color: var(--ink) !important; background: var(--ticket); }
.lang-switch:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }

@media (max-width: 430px) {
  .site-header { padding: 12px 12px 10px; }
  .brand { gap: 8px; }
  .brand-logo { width: 104px; max-height: 44px; }
  .brand-name { font-size: 18px; letter-spacing: 0.1em; }
  .site-nav { gap: 10px; font-size: 13px; }
  .lang-switch { padding: 11px 8px !important; }
}

/* 像素锯齿带：红「咬进」奶油（官网同款 mask 方案，14px 方波） */
.teeth { height: 14px; background: var(--red);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 28px);
  mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 28px); }

/* ---- 跑马灯红带（官网 Ideas 同源：拼你所想） ---- */
.ideas { margin: 40px calc(50% - 50vw) 34px; }
.ideas-teeth { height: 14px; background: var(--red);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 28px);
  mask-image: repeating-linear-gradient(90deg, #000 0 14px, transparent 14px 28px); }
.ideas-teeth-b { -webkit-mask-position: 14px 0; mask-position: 14px 0; }
.ideas-band { background: var(--red); overflow: hidden; padding-block: 0.7rem; }
.ideas-track { display: flex; align-items: center; width: max-content;
  animation: pk-slide 38s linear infinite; }
.ideas-copy { display: flex; align-items: center; }
.ideas-word { display: flex; align-items: center; white-space: nowrap;
  font-family: var(--font-display); font-weight: 640; letter-spacing: -0.01em;
  font-size: clamp(1.35rem, 1rem + 1.6vw, 2rem); color: var(--paper); }
/* 像素方块分隔 */
.ideas-word::after { content: ""; width: 10px; height: 10px;
  background: rgba(246, 237, 218, 0.55); margin-inline: 1.4rem; flex: none; }
@keyframes pk-slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ideas-track { animation: none; }
}

/* ---------- 首页 hero（左对齐，招牌下的第一句话） ---------- */
.hero { padding: 42px 0 20px; }
.hero-eyebrow { margin-bottom: 20px; }

/* ---- 词标：优雅交给 Lora（与官网词标同源） ---- */
.hero-mark { font-size: clamp(2.9rem, 13vw, 4.5rem); margin: 0 0 16px;
  letter-spacing: 0.02em; line-height: 1; }
.hero-mark .accent { color: var(--red); }

/* ---- 豆轨：18 颗真实 MARD 色号豆，指尖划过涌浪（升快降慢=尾迹） ----
   豆的实感 = 圆孔 + 高光 + 阴影三档色差 */
.rail { display: grid; grid-template-columns: repeat(18, 1fr); gap: 5px;
  width: min(100%, 440px); margin: 0 0 24px; touch-action: pan-y;
  -webkit-tap-highlight-color: transparent; }
.rail-bead { aspect-ratio: 1; border-radius: 50%; display: block; cursor: pointer;
  background:
    radial-gradient(circle at center, var(--paper) 0 24%, transparent 26%),
    radial-gradient(circle at 30% 27%, rgba(255, 255, 255, 0.5) 0 16%, transparent 42%),
    radial-gradient(circle at 70% 76%, rgba(42, 37, 32, 0.3) 0 30%, transparent 68%),
    var(--bc);
  will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  .rail-bead { animation: pk-pop 0.4s var(--d, 0s) cubic-bezier(0.3, 1.6, 0.45, 1) backwards; }
}
@keyframes pk-pop {
  from { transform: scale(0); }
  70%  { transform: scale(1.22); }
  to   { transform: scale(1); }
}
.hero-intro { color: var(--ink-soft); max-width: 30rem; margin: 0 0 24px;
  font-size: 1.06rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- 印章按钮（与官网 .btn 同源：штамп） ---------- */
.btn {
  display: inline-block; padding: 0.85em 1.7em;
  font-family: var(--font-body); font-weight: 550; font-size: 1rem;
  letter-spacing: 0.01em;
  border: 1.5px solid var(--ink); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-btn); cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { background: var(--ticket); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--red); color: var(--paper); }
.btn-primary:hover { background: var(--red-deep); }
/* 主转化按钮走大字号（红底奶油字按手册只能走大字号 3:1） */
.btn-wide { width: 100%; max-width: 420px; text-align: center;
  font-size: 1.1875rem; font-weight: 700; }

/* ---------- 首页区块 ---------- */
.home-section { margin: 38px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 2px solid var(--ink); padding-bottom: 7px; margin-bottom: 18px; }
.section-head h2 { font-size: 1.45rem; margin: 0; }
.section-more { font-family: var(--font-mono); color: var(--red-deep); font-weight: 700;
  font-size: 15px; }
.card-row { display: grid; grid-auto-flow: column; grid-auto-columns: 190px; gap: 16px;
  overflow-x: auto; padding: 6px 4px 16px; scroll-snap-type: x proximity; }
.card-row .work-card { scroll-snap-align: start; }
.home-cta { text-align: center; margin: 44px 0 8px; }

/* ---------- 样卡（作品卡：钉在墙上的实物） ---------- */
.work-card {
  background: var(--card); border: var(--border-card); box-shadow: var(--shadow-card);
  display: block; position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
/* 实物层轻微旋转：交替 ±0.4–1° */
.card-grid .work-card:nth-child(4n+1), .card-row .work-card:nth-child(3n+1) { transform: rotate(-0.6deg); }
.card-grid .work-card:nth-child(4n+2), .card-row .work-card:nth-child(3n+2) { transform: rotate(0.5deg); }
.card-grid .work-card:nth-child(4n+3) { transform: rotate(0.9deg); }
.card-grid .work-card:nth-child(4n+4), .card-row .work-card:nth-child(3n) { transform: rotate(-0.35deg); }
.work-card:hover { transform: rotate(0deg) translate(-1px, -2px);
  box-shadow: var(--shadow-card-hover); }
/* 图钉 */
.work-card::before { content: ""; position: absolute; top: -5px; left: 50%;
  margin-left: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e8e2d2, #8f8878 70%);
  box-shadow: 0 1px 2px rgba(42,37,32,0.4); z-index: 1; }

/* mono 12px = 品牌可读下限（tokens --size-mono-sm），不得再小 */
.card-code { display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-soft); padding: 7px 10px 5px; }
.card-img { aspect-ratio: 1; background: #fff; border-top: 1px solid var(--ink-faint);
  border-bottom: 1px solid var(--ink-faint); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-empty { width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; color: var(--ink-faint); font-size: 40px; }
.card-body { padding: 9px 10px 11px; }
.card-name { margin: 0 0 6px; font-size: 15.5px; line-height: 1.25;
  font-family: var(--font-display); font-weight: 640; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }
.card-meta .beads .bead { width: 10px; height: 10px; }
.card-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }

/* 贴纸标签（12px 下限同上） */
.tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--green-deep);
  border: 1px solid var(--green-deep); background: var(--paper);
  padding: 2px 8px; white-space: nowrap; }
.card-tags .tag:nth-child(2) { transform: rotate(-1.2deg); }
.detail-tags .tag { font-size: 11px; padding: 3px 9px; }
.detail-tags .tag:nth-child(2n) { transform: rotate(0.8deg); }

/* ---------- 列表页 ---------- */
.page-head { padding: 32px 0 8px; }
.page-head h1 { font-size: 2.1rem; margin: 0 0 6px; }
.library-notice { display: grid; gap: 4px; margin: 4px 0 18px; padding: 12px 14px;
  background: var(--ticket); border-left: 4px solid var(--honey);
  box-shadow: 2px 2px 0 rgba(42,37,32,0.12); color: var(--ink-soft);
  font-size: 12.5px; line-height: 1.55; }
.library-notice b { color: var(--ink); font-size: 13px; }
.filters { margin: 14px 0 24px; }
.search-input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--ink);
  background: var(--card); font: inherit; font-size: 15px; color: var(--ink);
  margin-bottom: 10px; box-shadow: 2px 2px 0 rgba(42,37,32,0.25); }
.search-input::placeholder { color: var(--ink-soft); }
.category-menu { display: grid; gap: 8px; margin: 0 0 10px; }
.category-menu-row { display: flex; align-items: center; gap: 7px; overflow-x: auto;
  padding: 2px 2px 7px; scrollbar-width: thin; }
.category-menu-row::-webkit-scrollbar { height: 5px; }
.category-menu-row::-webkit-scrollbar-thumb { background: rgba(42,37,32,.24); border-radius: 999px; }
.category-menu-sub { border-top: 1px solid var(--ink-faint); padding-top: 8px; }
.category-menu-label { flex: none; min-width: 46px; font-family: var(--font-mono);
  font-size: 11.5px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; }
.cat-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; min-height: 35px;
  padding: 7px 11px; border: 1.5px solid var(--ink); background: var(--card);
  color: var(--ink); font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  box-shadow: 2px 2px 0 rgba(42,37,32,0.18); white-space: nowrap; }
.cat-chip small { color: var(--ink-soft); font-size: 10px; }
.cat-chip.active { background: var(--green); color: #fff; border-color: var(--ink);
  box-shadow: 2px 2px 0 rgba(42,37,32,0.32); }
.cat-chip.active small { color: rgba(255,255,255,.78); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-row select { padding: 8px 10px; border: 1.5px solid var(--ink);
  background: var(--card); color: var(--ink); font-family: var(--font-mono);
  font-size: 12.5px; max-width: 46vw; }
.filter-reset { font-family: var(--font-mono); color: var(--red-deep); font-size: 13px;
  font-weight: 700; border-bottom: 1.5px solid currentColor; }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 14px;
  padding-top: 6px; }
@media (min-width: 560px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
/* 空状态：一张空票据 */
.no-results { text-align: center; color: var(--ink-soft); margin: 40px auto;
  max-width: 340px; padding: 26px 20px; font-family: var(--font-mono);
  font-size: 13px; background: var(--ticket); border: 2px dashed rgba(42,37,32,0.4);
  transform: rotate(-0.8deg); }

/* ---------- 详情页（档案卡） ---------- */
.detail { padding-top: 22px; }
.back-link { font-family: var(--font-mono); color: var(--ink-soft); font-size: 13px; }
.back-link:hover { color: var(--red-deep); }
.detail-cover { margin: 16px 0 18px; background: var(--card); border: var(--border-card);
  box-shadow: var(--shadow-card); padding: 10px; transform: rotate(-0.4deg); }
.detail-cover img { width: 100%; display: block; border: 1px solid var(--ink-faint);
  background: #fff; }
.detail-code { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.detail-name { font-size: 1.9rem; margin: 0 0 12px; }
.detail-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft);
  border-top: 1px solid var(--ink-faint); border-bottom: 1px solid var(--ink-faint);
  padding: 9px 2px; }
.detail-tags { margin-top: 12px; }

.want-box { margin: 24px 0 10px; text-align: center; }
.want-done { display: inline-block; font-family: var(--font-mono); font-size: 14px;
  color: var(--green-deep); font-weight: 700; margin: 14px 0 0;
  background: var(--ticket); border: 2px dashed var(--green-deep);
  padding: 12px 16px; transform: rotate(-1.2deg); }
.want-done[hidden] { display: none; }
/* 盖章瞬间：从上方压下、过冲落位 */
@media (prefers-reduced-motion: no-preference) {
  .want-done { animation: pk-stamp 0.38s cubic-bezier(0.2, 1.3, 0.4, 1) backwards; }
}
@keyframes pk-stamp {
  from { transform: scale(1.7) rotate(-7deg); opacity: 0; }
  60%  { transform: scale(0.96) rotate(-0.6deg); opacity: 1; }
  to   { transform: scale(1) rotate(-1.2deg); }
}

.detail-section { margin-top: 30px; }
.detail-section h2 { font-size: 1.15rem; border-bottom: 2px solid var(--ink);
  padding-bottom: 6px; margin: 0 0 14px; }
.prose { white-space: pre-line; margin: 0; color: var(--ink); max-width: 62ch; }
.pattern-notice { margin: -4px 0 12px; color: var(--ink-soft); font-size: 12.5px;
  line-height: 1.55; max-width: 68ch; }
.color-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.color-chip { display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1px solid rgba(42,37,32,0.45);
  padding: 5px 11px 5px 7px; font-family: var(--font-mono); font-size: 13px;
  font-weight: 600; box-shadow: 2px 2px 0 rgba(42,37,32,0.14); }
.color-chip i { width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at center, var(--card) 0 4px, var(--chip-c, #ccc) 4.4px 100%);
  box-shadow: inset 0 0 0 1px rgba(42,37,32,0.18); }
.detail-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.detail-gallery img { width: 100%; display: block; border: var(--border-card);
  box-shadow: var(--shadow-card); background: #fff; }
.detail-pattern { background: var(--card); border: var(--border-card);
  box-shadow: var(--shadow-card); padding: 10px; }
.detail-pattern img { width: 100%; display: block; background: #fff;
  border: 1px solid var(--ink-faint); }

/* ---------- 怎么玩（票据步骤） ---------- */
.how-steps { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 16px; }
.how-step { display: flex; gap: 15px; background: var(--ticket);
  border: var(--border-card); box-shadow: var(--shadow-card);
  padding: 16px 16px 16px 14px; position: relative; }
.how-step:nth-child(odd) { transform: rotate(-0.4deg); }
.how-step:nth-child(even) { transform: rotate(0.4deg); }
/* 票据打孔 */
.how-step::before, .how-step::after { content: ""; position: absolute; width: 12px;
  height: 12px; border-radius: 50%; background: var(--paper);
  border: 1px solid rgba(42,37,32,0.3); left: -7px; }
.how-step::before { top: 14px; }
.how-step::after { bottom: 14px; }
.step-num { flex: none; font-family: var(--font-mono); font-weight: 700; font-size: 15px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper); }
.how-step h3 { margin: 3px 0 4px; font-size: 1.02rem; }
.how-step p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.pricing-note { background: var(--card); border: 2px solid var(--ink);
  box-shadow: var(--shadow-card); padding: 18px 20px; margin: 28px 0;
  position: relative; }
.pricing-note::before { content: "№ 0001"; position: absolute; top: 10px; right: 14px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--ink-faint); }
.pricing-note h2 { margin: 0 0 8px; font-size: 1.1rem; }
.pricing-note p { margin: 0; color: var(--ink-soft); max-width: 56ch; }

/* ---------- 页脚（深绿橱窗墙） ---------- */
.site-footer { margin-top: 26px; text-align: center; padding: 30px 18px 38px;
  background: var(--green-deep); color: var(--cream-text-soft);
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; }
.footer-pixels { display: flex; justify-content: center; gap: 5px; margin-bottom: 14px; }
.footer-pixels i { width: 9px; height: 9px; border-radius: 50%; display: inline-block;
  background: radial-gradient(circle at center, var(--green-deep) 0 1.9px, var(--c) 2.2px 100%); }
.footer-pixels i:nth-child(1) { --c: var(--red); }
.footer-pixels i:nth-child(2) { --c: var(--honey); }
.footer-pixels i:nth-child(3) { --c: var(--cream-text); }
.footer-pixels i:nth-child(4) { --c: var(--honey); }
.footer-pixels i:nth-child(5) { --c: var(--red); }
.site-footer p { margin: 0; }
.footer-legal { margin-top: 8px !important; font-size: 11px;
  color: rgba(246, 237, 218, 0.45); letter-spacing: 0.03em; }

/* ---------- 进场：被拼出来（stagger） ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: pk-rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) backwards; }
  .card-grid .work-card, .card-row .work-card { animation: pk-rise 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) backwards; }
  .card-grid .work-card:nth-child(1), .card-row .work-card:nth-child(1) { animation-delay: 0.03s; }
  .card-grid .work-card:nth-child(2), .card-row .work-card:nth-child(2) { animation-delay: 0.08s; }
  .card-grid .work-card:nth-child(3), .card-row .work-card:nth-child(3) { animation-delay: 0.13s; }
  .card-grid .work-card:nth-child(4), .card-row .work-card:nth-child(4) { animation-delay: 0.18s; }
  .card-grid .work-card:nth-child(5), .card-row .work-card:nth-child(5) { animation-delay: 0.23s; }
  .card-grid .work-card:nth-child(6), .card-row .work-card:nth-child(6) { animation-delay: 0.28s; }
  .card-grid .work-card:nth-child(n+7), .card-row .work-card:nth-child(n+7) { animation-delay: 0.33s; }
  .how-step:nth-child(1) { animation: pk-rise 0.5s 0.05s backwards; }
  .how-step:nth-child(2) { animation: pk-rise 0.5s 0.12s backwards; }
  .how-step:nth-child(3) { animation: pk-rise 0.5s 0.19s backwards; }
  .how-step:nth-child(4) { animation: pk-rise 0.5s 0.26s backwards; }
  .how-step:nth-child(5) { animation: pk-rise 0.5s 0.33s backwards; }
}
@keyframes pk-rise {
  from { opacity: 0; transform: translateY(9px); }
}

/* ---------- Mobile library cleanup ---------- */
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin: -6px 0 12px; color: var(--ink-soft); font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.04em; }
.public-pagination { display: flex; align-items: center; justify-content: center; gap: 7px;
  flex-wrap: wrap; margin: 24px 0 8px; }
.page-btn { min-width: 36px; height: 36px; display: inline-flex; align-items: center;
  justify-content: center; padding: 0 10px; border: 1.5px solid var(--ink);
  background: var(--card); box-shadow: 2px 2px 0 rgba(42,37,32,0.25);
  font-family: var(--font-mono); font-size: 13px; line-height: 1; }
.page-current { background: var(--red); color: var(--paper); }
.page-disabled { opacity: 0.38; box-shadow: none; }
.page-gap { color: var(--ink-soft); font-family: var(--font-mono); padding: 0 2px; }

@media (max-width: 560px) {
  main { width: 100%; max-width: none; padding: 0 10px 42px; }
  .site-header {
    position: static; display: grid; grid-template-columns: 1fr; gap: 8px;
    padding: 10px 12px 9px;
  }
  .brand { min-width: 0; }
  .brand-logo { width: 128px; max-height: 46px; }
  .site-nav { width: 100%; min-width: 0; display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 6px; font-size: 13px; white-space: normal; align-items: stretch; }
  .site-nav a { min-width: 0; text-align: center; padding: 8px 4px;
    line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
  .lang-switch { padding: 8px 7px !important; font-size: 11px; letter-spacing: 0.03em;
    max-width: 92px; white-space: nowrap; }
  .teeth { height: 9px; }
  .page-head { padding: 16px 0 4px; }
  .page-head h1 { font-size: 1.55rem; margin: 0; }
  .library-notice { margin: 4px 0 12px; padding: 9px 10px; font-size: 11.5px;
    line-height: 1.45; }
  .filters { margin: 10px 0 14px; }
  .search-input { height: 43px; padding: 9px 11px; margin-bottom: 8px;
    font-size: 14px; box-shadow: 1px 1px 0 rgba(42,37,32,0.25); }
  .category-menu { gap: 5px; margin-bottom: 8px; }
  .category-menu-row { gap: 6px; padding-bottom: 6px; }
  .category-menu-label { min-width: 34px; font-size: 10.5px; }
  .cat-chip { min-height: 34px; padding: 7px 9px; font-size: 11px;
    box-shadow: 1px 1px 0 rgba(42,37,32,0.22); }
  .filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px; align-items: stretch; }
  .filter-row select { width: 100%; max-width: none; min-width: 0; height: 40px;
    padding: 7px 6px; font-size: 11.5px; }
  .filter-reset { grid-column: 1 / -1; width: max-content; margin-top: 2px; }
  .results-bar { margin: 0 0 9px; font-size: 11.5px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px;
    padding: 0 2px; }
  .card-grid .work-card { transform: none !important; box-shadow: 2px 3px 0 rgba(42,37,32,0.12); }
  .card-grid .work-card:hover { transform: none !important; }
  .card-grid .work-card::before { display: none; }
  .card-code { padding: 5px 6px 4px; font-size: 10px; letter-spacing: 0.03em; gap: 4px; }
  .card-code span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .card-img { aspect-ratio: 1; }
  .card-grid .card-img img { object-fit: contain; background: #fff; }
  .card-body { padding: 7px 7px 8px; }
  .card-name { min-height: 32px; margin-bottom: 5px; font-size: 13px; line-height: 1.22;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; }
  .card-meta { gap: 5px; font-size: 10.5px; line-height: 1.2; }
  .card-meta .beads .bead { width: 8px; height: 8px; }
  .card-tags { display: none; }
  .public-pagination { position: sticky; bottom: 8px; z-index: 6; gap: 5px;
    margin: 18px auto 0; padding: 6px 7px; width: max-content; max-width: calc(100vw - 20px);
    background: rgba(246,237,218,0.92); border: 1px solid rgba(42,37,32,0.18);
    backdrop-filter: blur(7px); }
  .page-btn { min-width: 32px; height: 32px; padding: 0 8px; font-size: 12px;
    box-shadow: 1px 1px 0 rgba(42,37,32,0.22); }
}
