/* ============================================================================
   Graffiti Art Generator — 视觉系统
   方向：粗糙混凝土纸感底 + 荧光喷漆点缀 + 贴纸硬阴影
        内容区明亮易读（AdSense 友好），工具画布走夜间墙面
   ========================================================================== */

/* ------------------------------------------------------------ 字体 */
@font-face {
  font-family: 'Bungee Display';
  src: url('../fonts/block.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
}

:root {
  /* 底色与墨色 */
  --paper:      #f2efe8;
  --paper-2:    #e8e3d8;
  --paper-3:    #dcd6c8;
  --ink:        #16151b;
  --ink-2:      #4e4a58;
  /* 次要文字要分两档：同一套灰在浅底上压深、在深底上提亮，才能两边都过 AA。
     实测（WCAG 2.1 对比度）：--ink-3 在 --paper 上 5.33、--paper-2 上 4.78、
     白卡上 6.12；--ink-3-dark 在 --panel(#1d1c28) 上 5.80、--panel-2(#2b2a38)
     上 4.85、--night(#121119) 上 6.46 —— 三档暗面全部过 4.5。 */
  --ink-3:      #655f72;
  --ink-3-dark: #9a95a8;
  --line:       #d2cbbc;
  --line-2:     #b9b1a0;

  /* 喷漆荧光 */
  --hot:        #ff2e6d;
  --voltage:    #6d4bff;
  --lime:       #b8ef00;
  --sky:        #00c2ff;
  --amber:      #ffb020;

  /* --------------------------------------------------------- 暗色区面层级
     分档依据是 CIE L*，不是 WCAG 对比度。WCAG 的 (L+.05)/(L+.05) 在暗部会被
     压扁：#191822 与 #121119 的 WCAG 比值只有 1.07，看着"差不多"，可 L* 差
     3.4 —— 面板肉眼就是糊在背景上。判定门槛用 ΔL*：<2 不可辨 · ≥4 可辨 ·
     ≥5 明确可辨（实测见 build/qa/token-audit.cjs）。

     收敛前暗色区散着 10 档灰（#0f0e15 / #191822 / #1c1b24 / #221f2c /
     #2b2935 / #2e2c3a / #37353f / #3c3a49 / #4a4757 / #a9a4b8），实现者每写
     一个控件都要重新猜该用哪一档；现在压到 5 档，且相邻档 ΔL* ≥ 4。 */
  --wall:       #0a0a0d;   /* L*  2.8  画布外墙 / #stage */
  --well:       #0f0e15;   /* L*  4.2  凹陷面：输入框、分段控件底 */
  --night:      #121119;   /* L*  5.4  工具区底 */
  --panel:      #1d1c28;   /* L* 10.9  面板面（原 #191822；相对 --night ΔL* 5.5） */
  --panel-2:    #2b2a38;   /* L* 17.7  二级面 + 全部描边
                              （并掉 #1c1b24 / #221f2c / #2b2935 / #2e2c3a /
                                #37353f / #3c3a49 / #4a4757） */

  /* 暗底文字三档（浅底那套墨色在暗底上完全不够，必须成对存在） */
  --ink-1-dark: #f2f0f7;   /* L* 95.0  主文字 */
  --ink-2-dark: #c3bfcf;   /* L* 77.3  次文字：字段标签、说明段 */
  /* --ink-3-dark 见上（三级文字：提示、面板标题、状态栏） */

  /* --------------------------------------------- 双上下文组件令牌
     .chip / .btn-ghost 这类组件浅底和暗面都会出现。给它们一个语义令牌，
     暗面在 .studio / footer.site 里整体覆写 —— 这样就不必为每个组件再补一条
     「上下文选择器」。.btn-ghost 当年漏掉 color 隐形，根源正是那种写法：
     覆写散在组件层，漏一条就有一个组合是坏的。 */
  --ctl-line:   var(--line-2);   /* 控件描边 */
  --ctl-tx:     var(--ink-2);    /* 控件默认文字 */
  --ctl-tx-strong: var(--ink);   /* 控件悬浮 / 强调文字 */
  --ctl-on-bg:  var(--ink);      /* 控件激活底色 */
  --ctl-on-tx:  #fff;            /* 控件激活文字 */

  /* 系统 */
  --radius:     4px;
  --radius-lg:  10px;
  --shadow-hard: 5px 5px 0 var(--ink);
  --shadow-soft: 0 10px 28px -14px rgba(22, 21, 27, .38);
  --wrap:       1180px;

  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
               Arial, 'Noto Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
  --font-display: 'Bungee Display', var(--font-body);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 纸张纤维底纹，避免大面积纯色显得廉价 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E"),
    radial-gradient(circle at 18% 12%, rgba(109, 75, 255, .05), transparent 42%),
    radial-gradient(circle at 86% 78%, rgba(255, 46, 109, .05), transparent 46%),
    repeating-linear-gradient(0deg, rgba(22, 21, 27, .014) 0 1px, transparent 1px 3px);
}

img, canvas, svg { max-width: 100%; display: block; }

a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { color: var(--hot); text-decoration-color: var(--hot); }

:focus-visible {
  outline: 3px solid var(--voltage);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }
/* 宽屏增强（UX 测试观察项②）：≥1600 视口把内容带放宽一档，减少两侧闲置。
   内容页正文有 .prose 的 70ch 上限兜底，可读性不受影响；1440 及以下完全不变。 */
@media (min-width: 1600px) { .wrap { max-width: 1280px; } }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(242, 239, 232, .93);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}
.topbar .wrap { display: flex; align-items: center; gap: 26px; height: 66px; }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-size: 19px; letter-spacing: .01em; text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; }

.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { font-size: 14.5px; font-weight: 600; text-decoration: none; color: var(--ink-2); letter-spacing: .01em; }
.nav a:hover { color: var(--hot); }

.nav-toggle { display: none; }

/* ------------------------------------------------------------ 通用排版 */
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-family: var(--font-display); font-size: clamp(34px, 5.6vw, 60px); font-weight: 400; }
h2 { font-size: clamp(25px, 3.2vw, 34px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 750; }
h4 { font-size: 16.5px; font-weight: 750; }
p { margin: 0 0 1.05em; }
strong { font-weight: 700; }

.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); display: flex; align-items: center; gap: 9px; margin: 0 0 14px;
}
.eyebrow::before { content: ''; width: 22px; height: 3px; background: var(--hot); flex: none; }

.lede { font-size: 18.5px; color: var(--ink-2); max-width: 62ch; }

/* ------------------------------------------------------ 首页区块头居中
   宽屏容器（wrap 最大 1280）配 62ch 的标题+导语靠左，会形成
   「标题贴左、右侧大片空白」的观感（用户两次圈出同一模式）。
   首页区块头整组居中后左右对称，与下方满宽的卡片/网格呼应。
   hero 是 h1 组成的左对齐首屏构图，:not(.hero) 排除；
   内容页（字母/风格/博客）容器窄、留白不明显，不受影响。 */
.home section:not(.hero) .eyebrow { justify-content: center; margin-left: auto; margin-right: auto; }
.home section:not(.hero) h2 { text-align: center; }
.home section:not(.hero) .lede { text-align: center; margin-left: auto; margin-right: auto; }
/* studio 头部是「标题+注释」双列 flex，整列居中而不是只在左列内居中 */
.home .studio-head { flex-direction: column; align-items: center; text-align: center; }
.home .studio-head .studio-note { margin-bottom: 0; }
/* A–Z 区导语在「文字+预览」双栏的文字列里，保持左对齐更协调 */
.home .alpha-head-text .lede { text-align: left; margin-left: 0; margin-right: 0; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose code, code {
  font-family: var(--font-mono); font-size: .88em; background: var(--paper-3);
  padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line);
}

section { padding: 76px 0; position: relative; }
section.tight { padding: 52px 0; }
/* 锚点跳转时给吸附顶栏留出空间 */
[id] { scroll-margin-top: 84px; }
.rule { border: 0; border-top: 2px solid var(--ink); opacity: .1; margin: 0; }

/* ------------------------------------------------------------ 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 15px; font-weight: 700;
  padding: 12px 20px; border: 2px solid var(--ink); border-radius: var(--radius);
  background: #fff; color: var(--ink); cursor: pointer; text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { box-shadow: 1px 1px 0 var(--ink); transform: translate(2px, 2px); color: var(--ink); }
.btn:active { box-shadow: 0 0 0 var(--ink); transform: translate(3px, 3px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: 3px 3px 0 var(--ink); transform: none; }
.btn-primary { background: var(--hot); color: #fff; }
.btn-primary:hover { color: #fff; background: #ff4a80; }
.btn-lime { background: var(--lime); }
/* 幽灵按钮 —— 显式声明 color，这是 P0-02 的修复点。
   原来只覆写了 background / border / shadow，color 沿用 .btn 的 var(--ink)：
   在浅底上正确，但一进暗色容器文字就与底色同色（#16151b on #1d1c28 ≈ 1.06，
   彻底隐形）。它之所以一直没被发现，只是因为有 .studio-actions .btn-ghost
   这个上下文选择器在工具区把它救回来了 —— 换个容器（弹窗、抽屉）立刻坏掉。
   inherit 跟随所在容器的文字色，任何容器都成立。
   注：钉死一个固定"中性色"在这里是做不到的 —— 同一个色号不可能既比纸底
   (#f2efe8) 暗 4.5 倍、又比暗面(#1d1c28)亮 4.5 倍。实测 --ink-2 是 7.48/1.96、
   --ink-3-dark 是 2.53/5.80，两边各有一条不合格（build/qa/token-audit.cjs）。 */
.btn-ghost { box-shadow: none; background: transparent; border-color: var(--ctl-line); color: inherit; }
.btn-ghost:hover {
  box-shadow: none; transform: none;
  background: rgba(22,21,27,.04);                                 /* 兜底：不支持 color-mix 时用固定淡墨 */
  background: color-mix(in srgb, currentColor 8%, transparent);   /* 跟随容器文字色，深浅底都成立 */
}
.btn-sm { padding: 8px 13px; font-size: 13.5px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------ Hero */
.hero { padding: 48px 0 40px; }
.hero-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 54px; align-items: center; }
.hero h1 { margin-bottom: 14px; position: relative; z-index: 1; }
.hero h1 .spray { position: relative; display: inline-block; }
.hero h1 .spray::after {
  content: ''; position: absolute; left: -2.5%; right: -2.5%; bottom: .16em; height: .27em;
  background: var(--lime); z-index: -1; transform: rotate(-1deg); border-radius: 2px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.hero-art {
  border: 2px solid var(--ink); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-hard); background: var(--night);
}
.hero-art canvas { width: 100%; height: auto; }

.trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.trust-item svg { flex: none; }

/* 顶栏能力药丸：把「免费 + 数量」钉在导航里，滚到任何位置都在。
   竞品普遍把免费额度藏在页脚或弹窗里。 */
.nav-pill {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .04em;
  border: 2px solid var(--ink); border-radius: 999px; padding: 3px 10px;
  background: var(--lime); color: var(--ink); white-space: nowrap;
}

/* 能力条：把这四条优势写成界面元素而不是营销文案 */
.caprow {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  list-style: none; margin: 26px 0 0; padding: 0; overflow: hidden;
  border: 2px solid var(--ink); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-hard);
}
.caprow li { padding: 14px 18px; border-right: 1px solid var(--line); min-width: 0; }
.caprow li:last-child { border-right: 0; }
.caprow b { display: block; font-size: 15px; }
.caprow span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-top: 3px; overflow-wrap: anywhere; }

/* 首屏风格横条 —— 风格是这类工具的第一决策 */
.hero-styles { margin-top: 24px; }
.hero-styles-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.hero-styles-h h2 { margin: 0; font-size: 19px; font-weight: 750; }
.hero-styles-h .hs-sub { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.hero-styles-h .hs-all { margin-left: auto; font-size: 14px; font-weight: 750; color: var(--hot); text-decoration: none; }
.hero-styles-h .hs-all:hover { text-decoration: underline; }
.hstrip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; }
.htile {
  position: relative; border: 2px solid var(--ink); border-radius: var(--radius); background: #fff;
  overflow: hidden; cursor: pointer; padding: 0; text-align: left;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .1s ease, box-shadow .1s ease;
}
.htile:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.htile[aria-pressed="true"] { background: var(--lime); }
.htile .th {
  display: block; aspect-ratio: 300 / 152; background: var(--night);
  border-bottom: 1px solid var(--panel-2);
}
.htile .th canvas { display: block; width: 100%; height: 100%; }
.htile .meta { display: block; padding: 9px 11px 11px; }
.htile .nm { display: block; font-weight: 750; font-size: 14px; color: var(--ink); }
.htile .sub { display: block; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.htile[aria-pressed="true"] .sub { color: var(--ink-2); }
.htile .chk {
  position: absolute; right: 9px; bottom: 9px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); color: var(--lime); display: none; place-items: center; font-size: 12px; font-weight: 700;
}
.htile[aria-pressed="true"] .chk { display: grid; }
/* 深色字压在热粉上（5.3:1）。白字在热粉上只有 3.5，不合格。 */
.htile .pop {
  position: absolute; top: 0; right: 0; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; background: var(--hot); color: var(--ink);
  padding: 3px 7px; border-bottom-left-radius: 6px;
}

/* ------------------------------------------------------------ 工具区 */
.studio {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 255, 255, .045), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E"),
    var(--night);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  color: var(--ink-1-dark);
  /* 暗面整体覆写双上下文令牌：工具区子树里的任何组件（包括后面新增的
     风格抽屉与导出弹层）都自动拿到正确的一档，不必逐个补上下文选择器。 */
  --ctl-line:  var(--panel-2);
  --ctl-tx:    var(--ink-2-dark);
  --ctl-tx-strong: var(--ink-1-dark);
  --ctl-on-bg: var(--lime);
  --ctl-on-tx: var(--ink);
}
.studio h2 { color: var(--ink-1-dark); }
.studio .eyebrow { color: var(--ink-3-dark); }
.studio .eyebrow::before { background: var(--lime); }

.studio-head { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; }
.studio-head h2 { margin: 0; }
.studio-note {
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6;
  color: var(--ink-2-dark); margin: 0 0 7px; max-width: 60ch;
}

/* ---------------------------------------------------------- 四段式步骤条
   它是导航兼进度：点击跳到对应区域，aria-current="step" 跟随真实操作 / 滚动位置。
   未到的步骤用暗灰，已完成的打勾（柠檬绿实心），当前步白环 + 24% 光晕。 */
.srail { display: flex; align-items: center; flex-wrap: wrap; margin: 0 0 20px; padding: 0; list-style: none; gap: 0; }
.sstep { display: flex; align-items: center; }
.sstep a {
  display: flex; align-items: center; gap: 9px; text-decoration: none;
  padding: 6px 4px; border-radius: var(--radius);
}
.sstep i {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; font-style: normal;
  background: var(--panel-2); color: var(--ink-3-dark); flex: none;
}
.sstep b { font-size: 13.5px; font-weight: 650; color: var(--ink-3-dark); letter-spacing: .02em; }
.sstep a:hover b { color: var(--ink-1-dark); }
.sstep.done i { background: var(--lime); color: var(--ink); }
.sstep.done b { color: var(--ink-2-dark); }
.sstep[aria-current="step"] i { background: var(--lime); color: var(--ink); box-shadow: 0 0 0 3px rgba(184,239,0,.25), 0 0 0 1px #fff; }
.sstep[aria-current="step"] b { color: var(--ink-1-dark); }
/* 连接线纯装饰，用伪元素而不是额外元素 */
.sstep::after { content: ''; width: 26px; height: 2px; background: var(--panel-2); margin: 0 14px; flex: none; }
.sstep:last-child::after { display: none; }

/* ---------------------------------------------------------- 三栏工作台
   桌面：风格常驻栏 236px | 画布 | 参数 320px。
   这条布局就是「风格优先」原则本身 —— 风格选择与画布同屏，滚动距离归零。
   （改造前风格网格在画布下方第 4 顺位：桌面要滚 1536px、手机 2216px。） */
.bench { display: grid; grid-template-columns: 236px minmax(0, 1fr) 320px; gap: 18px; align-items: start; }

/* 桌面端：滚动参数面板时，左栏风格 + 中间画布保持常驻，
   避免展开参数后画布被顶出视口、出现 UI-02 工作台那块大片空白。 */
@media (min-width: 1001px) {
  .rail,
  .bench-canvas {
    position: sticky;
    top: 86px;                /* topbar 66px + 20px 呼吸间隙 */
    align-self: start;
  }
}

/* ---------------------------------------------------------- 风格常驻栏 */
.rail {
  background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius-lg);
  overflow: hidden;
}
/* 左栏内容（搜索+过滤+15 套风格）可能高于视口，桌面端改内部滚动，
   避免底部风格永远顶在视口外选不到。
   ⚠️ 此规则必须放在上方 .rail 基础规则之后：overflow:hidden 的简写
   会把 overflow-y 重置回 hidden，写在前面会被同优先级的后规则吃掉
   （2026-09-19 BUG-F02：15 套风格被裁、滚轮失效即此因）。 */
@media (min-width: 1001px) {
  .rail {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--panel-2) transparent;
  }
  .rail::-webkit-scrollbar { width: 8px; }
  .rail::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 4px; }
  .rail::-webkit-scrollbar-track { background: transparent; }
}
.rail-h {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--panel-2);
}
.rail-h h3 {
  margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3-dark); font-weight: 600;
}
.rail-h .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3-dark); }
.rail-x {
  display: none; margin-left: auto; width: 28px; height: 28px; flex: none;
  align-items: center; justify-content: center; padding: 0;
  background: transparent; border: 1px solid var(--ctl-line); border-radius: var(--radius);
  color: var(--ctl-tx); cursor: pointer;
}
/* 移动端才出现的「展开全部 15 套」入口（桌面端 15 套本来就全在栏里） */
.rail-all {
  display: none; margin-left: auto; flex: none; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .06em; text-transform: uppercase; font-weight: 700;
  background: transparent; border: 1px solid var(--ctl-line); border-radius: 999px;
  color: var(--ctl-on-bg); padding: 4px 10px; cursor: pointer; min-height: 26px;
}
.rail-b { padding: 12px; }
.rail-search {
  display: flex; align-items: center; gap: 8px; padding: 0 10px; margin-bottom: 10px;
  border: 1px solid var(--panel-2); border-radius: var(--radius); background: var(--well);
  color: var(--ink-3-dark);
}
.rail-search svg { flex: none; }
/* 搜索框同样是文本录入控件 —— 字号必须 ≥16px，否则 iOS 聚焦时会放大整页 */
.rail-search input[type="text"] {
  border: 0; background: transparent; padding: 10px 0; min-height: 42px; font-size: 16px;
}
.rail-search input[type="text"]:focus { outline: 0; }
.rail-search:focus-within { outline: 2px solid var(--lime); outline-offset: 1px; }
.rail-empty { font-size: 13px; color: var(--ink-3-dark); margin: 10px 2px 0; }
.rail-empty[hidden] { display: none; }

/* 族过滤芯片（.chip 走 --ctl-* 双上下文令牌，暗面自动拿到正确的一档） */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }


.canvas-shell {
  border: 2px solid var(--wall); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--wall); box-shadow: 0 22px 60px -30px rgba(0,0,0,.9);
}
.canvas-bar {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  /* 画布窗口栏。原来用 --night-2(#1c1b24)，与 --panel(#1d1c28) 的 ΔL* 只有 1.4
     —— 同一个色换了两个名字。并入 --panel-2 后与画布墙（L* 2.8）差 14.9，
     边界不再需要靠 1px 描边"画"出来，所以顺手删掉了那条 border-bottom。 */
  background: var(--panel-2);
}
.canvas-bar .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.canvas-bar .dot.r { background: #ff5f57; } .canvas-bar .dot.y { background: #febc2e; } .canvas-bar .dot.g { background: #28c840; }
.canvas-bar .label { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3-dark); margin-left: 4px; letter-spacing: .04em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.canvas-bar .size-chip { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3-dark); white-space: nowrap; flex: none; }
#stage { width: 100%; height: auto; display: block; background: var(--wall); }

.spinner {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10,10,13,.72); color: var(--lime); font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: .12em; text-transform: uppercase;
}
.spinner[hidden] { display: none; }
.canvas-wrap { position: relative; }
/* 透明背景棋盘格：所见即导出的透明 PNG（贴纸场景） */
.canvas-shell.is-checker .canvas-wrap {
  background: repeating-conic-gradient(#26252e 0 25%, #1d1c28 0 50%) 0 0 / 22px 22px;
}

.studio-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.studio-actions .btn { box-shadow: 3px 3px 0 #000; border-color: #000; }
.studio-actions .btn:hover { box-shadow: 1px 1px 0 #000; }
/* 这里原有两条 .studio-actions .btn-ghost 覆写（color/border/hover）。
   P0-02 之后不再需要：color 走 .btn-ghost 基类的 inherit，描边走 --ctl-line
   令牌（.studio 已把它覆写成 --panel-2），hover 走 color-mix。删掉是对的 ——
   正是这类散落的上下文选择器让"按钮换个容器就隐形"这种组合缺陷活了下来。 */

/* 控制面板 */
.panel { background: var(--panel); border: 1px solid var(--panel-2); border-radius: var(--radius-lg); }
.panel + .panel { margin-top: 14px; }
.panel-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 15px; border-bottom: 1px solid var(--panel-2);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3-dark);
}
.panel-head .ph-t { min-width: 0; }
/* 单项重置。改造前只有刷新整页才能回到默认值 —— 这是 Nielsen #3「用户控制与自由」的缺口。 */
.panel-head .ph-reset {
  margin-left: auto; flex: none; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em;
  text-transform: lowercase; background: transparent; border: 1px solid var(--ctl-line); border-radius: var(--radius);
  color: var(--ctl-tx); padding: 4px 8px; cursor: pointer; min-height: 26px;
}
.panel-head .ph-reset:hover { color: var(--ctl-tx-strong); border-color: var(--ctl-tx-strong); }
.panel-head .ph-lic { margin-left: auto; flex: none; font-size: 10.5px; letter-spacing: .04em; text-transform: none; color: var(--ink-3-dark); }
/* 折叠按钮只在移动端出现：桌面端三栏同屏，收起任何一组都会让参数栏失去可比性 */
.panel-head .ph-fold {
  display: none; flex: none; width: 28px; height: 28px; padding: 0;
  align-items: center; justify-content: center; background: transparent;
  border: 1px solid var(--ctl-line); border-radius: var(--radius); color: var(--ctl-tx); cursor: pointer;
}
.panel-head .ph-fold span { display: block; line-height: 1; transition: transform .15s ease; }
.panel[data-collapsed] .panel-head .ph-fold span { transform: rotate(-90deg); }
.panel[data-collapsed] .panel-head { border-bottom: 0; }
.panel[data-collapsed] .panel-body { display: none; }
.panel-body { padding: 15px; }
.panel-body + .panel-body { border-top: 1px solid var(--panel-2); }
.btn-pair { display: flex; gap: 9px; margin-top: 9px; }
.btn-pair .btn { flex: 1 1 0; min-width: 0; }
.note { font-size: 12px; line-height: 1.55; color: var(--ink-3-dark); margin: 10px 0 0; }

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-2-dark); margin-bottom: 6px; letter-spacing: .02em; }
.field .hint { font-size: 11.5px; color: var(--ink-3-dark); font-weight: 500; }
/* 缺字形提示：默认与 .hint 同色，出现"画不出来的字符"时转为警示色 */
.field .hint-warn { color: var(--amber); }

/* 表单控件 —— font-size 必须 ≥16px：
   iOS Safari 对字号 <16px 的表单控件会在聚焦时自动放大整个页面，
   用户输完还得手动缩回去。这条在移动端影响 100% 的输入型用户，
   是所有 P0 里唯一一个"不修就没法用"的。 */
input[type="text"], select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 16px; padding: 10px 12px;
  border: 1px solid var(--panel-2); border-radius: var(--radius); background: var(--well); color: var(--ink-1-dark);
}
input[type="text"]:focus, select:focus { outline: 2px solid var(--lime); outline-offset: 1px; border-color: transparent; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239a95a8' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 11px; padding-right: 34px;
}

/* 滑块 —— 两个无障碍约束一起满足：
   ① 命中盒撑到 24px（WCAG 2.2 SC 2.5.8），但 4px 的视觉轨道挪到 ::-*-track 上、
      元素自身背景设为透明，视觉上仍然是那条细线；原来元素盒就是 4px，等于把
      整条轨道当命中区，手机上根本点不准。
   ② 这里绝不能写 outline:none。它的特异性 (0,1,1) 高于全局 :focus-visible (0,1,0)，
      会让 12 个滑块永久失去焦点指示（WCAG 2.4.7），纯键盘用户完全迷失。 */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%;
  height: 24px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; background: var(--panel-2); border-radius: 2px;
}
input[type="range"]::-moz-range-track {
  height: 4px; background: var(--panel-2); border-radius: 2px; border: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--lime); border: 2px solid var(--well); cursor: pointer;
  box-shadow: 0 0 0 1px var(--lime);
  margin-top: -9px;                        /* (4 − 22) / 2：让圆点在 4px 轨道上垂直居中 */
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--lime); border: 2px solid var(--well); cursor: pointer;
}
input[type="range"]:focus-visible { outline: 3px solid var(--voltage); outline-offset: 3px; border-radius: 999px; }
@media (pointer: coarse) {
  input[type="range"] { height: 30px; }
  input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -11px; }
  input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; }
}
.range-row { display: flex; align-items: center; gap: 11px; }
.range-row output { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3-dark); min-width: 34px; text-align: right; }

/* 颜色选择
   色板是 roving tabindex 的：整组只占 1 个 Tab 停靠点，组内用方向键移动
   （见 app.js bindSwatchGroup）。原来 2 组各 16 个色块 = 32 个停靠点，
   键盘用户要按 32 次 Tab 才能越过颜色区。 */
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.swatch {
  aspect-ratio: 1; border-radius: 3px; border: 2px solid var(--panel-2); cursor: pointer; padding: 0;
  transition: transform .1s ease, border-color .1s ease;
}
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--lime); }
.swatch:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.color-row { display: flex; align-items: center; gap: 10px; }
.color-row .swatches { flex: 1 1 auto; min-width: 0; }
input[type="color"] {
  -webkit-appearance: none; appearance: none; width: 40px; height: 34px; padding: 0;
  border: 2px solid var(--panel-2); border-radius: var(--radius); background: var(--well); cursor: pointer; flex: none;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 2px; }

/* 分段控件 */
.seg { display: flex; border: 1px solid var(--panel-2); border-radius: var(--radius); overflow: hidden; }
.seg button {
  flex: 1; padding: 8px 4px; font-size: 12.5px; font-weight: 650; font-family: var(--font-body);
  background: var(--well); color: var(--ink-3-dark); border: 0; cursor: pointer;
  border-right: 1px solid var(--panel-2);
}
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.seg button:hover:not([aria-pressed="true"]) { background: var(--panel-2); color: var(--ink-1-dark); }

/* 风格列表。桌面端在常驻左栏里是「缩略图 + 名称」的紧凑行，
   一屏能把 15 套全看完；移动端变成横向滑动的迷你卡（见文件末尾响应式段）。
   缩略图仍然是真实字形渲染（构建期精简过的 thumb 字形集），不是占位图 ——
   这一点是竞品普遍做不到的，也是方案里明确要保留的优点。 */
/* 列模板必须钉死 minmax(0,1fr)：隐式 auto 列会按 max-content 定宽，
   nowrap 的风格名/许可行把 210px 的栏撑到 ~257px，Popular 徽章被 overflow-x 裁掉 */
.style-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.style-tile {
  position: relative;
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 6px 7px; border: 1px solid transparent; border-radius: var(--radius);
  background: transparent; color: var(--ink-2-dark); cursor: pointer;
  transition: background .1s ease, border-color .1s ease;
}
.style-tile:hover { border-color: var(--panel-2); background: rgba(255,255,255,.03); }
/* 选中态用柠檬绿实心底 + 深色文字。亮绿上放浅灰的 .sub 只有 3.4，
   必须换成深色 —— 这正是既有测试 BUG-08 断言的那一条。 */
.style-tile[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.style-tile[aria-pressed="true"] .name { color: var(--ink); }
.style-tile[aria-pressed="true"] .sub { color: var(--ink-2); }
.style-tile canvas { width: 52px; height: auto; flex: none; border-radius: 3px; background: var(--night); }
.style-tile .meta { min-width: 0; flex: 1 1 auto; }
.style-tile .name { font-weight: 700; font-size: 13.5px; display: block; color: var(--ink-1-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.style-tile .sub { font-size: 11px; color: var(--ink-3-dark); font-family: var(--font-mono); display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Popular 徽标：深色字压在热粉上（5.3:1），白字在热粉上只有 3.5 —— 不合格 */
.style-tile .pop {
  flex: none; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  font-weight: 700; background: var(--hot); color: var(--ink); border-radius: 999px; padding: 2px 6px;
}

/* 画布预设 / 族过滤芯片。
   这两个芯片组只出现在工具区（暗面），但 .chip 本身是要两边通用的，
   所以走 --ctl-* 双上下文令牌而不是直接写死颜色。
   ⚠️ 这里修掉一个既有缺陷：原来 color 取 var(--ink-2)=#4e4a58，
   在 #1d1c28 面板上对比度只有 1.96（要求 4.5）——「16:9 wide / 1:1 square /
   9:16 story」这几个格式芯片和族筛选芯片的未选态基本读不出来。
   既有测试套件的对比度抽样里没有 .chip，所以一直没被发现。 */
.preset-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono); font-size: 11.5px; padding: 5px 10px; border: 1.5px solid var(--ctl-line);
  border-radius: 999px; background: transparent; cursor: pointer; color: var(--ctl-tx); font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--ctl-on-bg); color: var(--ctl-on-tx); border-color: var(--ctl-on-bg); }
.chip:hover:not([aria-pressed="true"]) { border-color: var(--ctl-tx-strong); color: var(--ctl-tx-strong); }

/* ---------------------------------------------------------- 导出配置弹层
   它是 B 类意图（要矢量、要商用、要透明背景）的转化点：把「能导出什么」
   说清楚，比多摆三个按钮有用。面板放在主内容区之外，所以吃到的是浅色令牌，
   与设计稿 UI-05 的白色面板一致。 */
.veil { position: fixed; inset: 0; background: rgba(10,10,13,.72); z-index: 70; }
.veil[hidden] { display: none; }
.xmodal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 71;
  width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto;
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-lg);
  box-shadow: 8px 8px 0 var(--ink);
}
.xmodal[hidden] { display: none; }
.xmodal-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 2px solid var(--ink); background: var(--paper-2); }
.xmodal-h b { font-size: 16.5px; }
.xmodal-x {
  margin-left: auto; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; flex: none;
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--radius); color: var(--ink-2); cursor: pointer;
}
.xmodal-x:hover { color: var(--ink); border-color: var(--ink); }
.xmodal-b { padding: 18px; }
.xmodal-f { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; }
.xmodal-f .btn { flex: 1 1 auto; }
.xopt-list { display: grid; gap: 9px; }
.xopt {
  display: flex; gap: 11px; align-items: flex-start; cursor: pointer; position: relative;
  border: 2px solid var(--line-2); border-radius: var(--radius); padding: 12px 13px; background: #fff;
}
.xopt:hover { border-color: var(--ink-3); }
.xopt[data-on] { border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
/* 用 appearance:none 自绘单选圆点，而不是「1px + opacity:0」那套隐写法 ——
   后者会让焦点环落在一个看不见的 1px 盒子上，键盘用户等于没有指示。 */
.xopt input {
  appearance: none; -webkit-appearance: none; flex: none; position: static; margin: 3px 0 0;
  width: 18px; height: 18px; border: 2px solid var(--line-2); border-radius: 50%;
  background: #fff; cursor: pointer; padding: 0;
}
.xopt input:checked { border-color: var(--ink); background: var(--ink); }
.xopt input:checked::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: #fff; }
.xopt input:focus-visible { border-radius: 50%; }
.xopt-tx b { display: block; font-size: 14.5px; }
.xopt-tx span { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.xmodal-sizes { margin-top: 14px; }
.xest { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); margin: 12px 0 0; text-align: right; }

/* 导出结果提示条（Nielsen #1：操作后要有明确反馈） */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; max-width: calc(100vw - 32px);
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius);
  box-shadow: 3px 3px 0 var(--ink); font-size: 14px; font-weight: 650; color: var(--ink);
}
.toast[hidden] { display: none; }
.toast .ti {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 12px; font-weight: 700; background: var(--lime); color: var(--ink);
}

/* 风格抽屉遮罩（移动端）。桌面端 .rail 是常驻左栏，抽屉不会出现，遮罩保持 hidden。 */
.veil-rail { position: fixed; inset: 0; background: rgba(10,10,13,.6); z-index: 61; }
.veil-rail[hidden] { display: none; }

/* 移动端底部常驻操作条。桌面端不出现（桌面已有画布操作条 + 参数栏底部的导出面板）。 */
.mobar { display: none; }

/* ------------------------------------------------------------ 卡片 / 网格 */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }

.card {
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-hard);
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card .num-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--hot);
  font-weight: 700; display: block; margin-bottom: 9px;
}

/* 风格详解 */
.style-doc { border: 2px solid var(--ink); border-radius: var(--radius-lg); overflow: hidden; background: #fff; box-shadow: var(--shadow-hard); }
.style-doc-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 2px solid var(--ink); background: var(--paper-2); }
.style-doc-head h3 { margin: 0; font-size: 18px; }
.style-doc-head .tag { font-family: var(--font-mono); font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: #fff; margin-left: auto; }
.style-doc-body { padding: 20px; }
.style-doc-body .try { margin-top: 14px; }
/* 家族卡右侧示例画布：窄幅叠在正文下，≥900px 双栏 */
.style-doc-text { min-width: 0; max-width: 70ch; }
.style-doc-demo { margin-top: 14px; }
.style-doc-demo canvas, .alpha-head-demo canvas {
  width: 100%; height: auto; display: block;
  border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--night); box-shadow: var(--shadow-hard);
}
/* A–Z 区块头部：文字 + 字母预览画布 */
.alpha-head-text { min-width: 0; max-width: 70ch; }
.alpha-head-demo { margin-top: 14px; }
@media (min-width: 900px) {
  .alpha-head {
    display: grid; grid-template-columns: minmax(0, 70ch) minmax(300px, 460px);
    justify-content: space-between;
    gap: 24px; align-items: center;
  }
  .alpha-head-demo { margin-top: 0; }
}
@media (min-width: 900px) {
  .style-doc-body.has-demo {
    display: grid; grid-template-columns: minmax(0, 70ch) minmax(300px, 480px);
    justify-content: space-between;
    gap: 24px; align-items: center;
    max-width: none; /* 抵消 .prose 的 70ch 上限，否则双栏整体偏左、右侧再空一截 */
  }
  .style-doc-body.has-demo .style-doc-demo { margin-top: 0; }
}
.term { border-left: 3px solid var(--voltage); padding-left: 13px; margin: 14px 0; }

/* 字母表 */
.alphabet { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; margin-top: 22px; }
.alphabet a {
  display: grid; place-items: center; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: var(--radius);
  background: #fff; font-family: var(--font-display); font-size: 20px; text-decoration: none;
  transition: background .12s ease, transform .1s ease;
}
.alphabet a:hover { background: var(--lime); transform: translate(-1px, -1px); color: var(--ink); }

/* 步骤 */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step { display: flex; gap: 15px; align-items: flex-start; }
.step::before {
  counter-increment: step; content: counter(step);
  flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--lime);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 14px; font-weight: 700;
}
/* 四个步骤项是上面那个 h2 的直接子项，所以用 h3 —— 原来是 h4，会把大纲
   从 h2 直接跳到 h4（屏幕阅读器按标题跳转时层级读错）。这里只调视觉字号。 */
.step h3.step-head { margin: 4px 0 3px; font-size: 16.5px; font-weight: 750; }
.step p { margin: 0; color: var(--ink-2); }

/* FAQ */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  cursor: pointer; padding: 19px 40px 19px 0; font-weight: 700; font-size: 17px; position: relative; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 21px; color: var(--hot); font-weight: 700;
}
.faq details[open] summary::after { content: '−'; }
.faq .answer { padding: 0 40px 20px 0; color: var(--ink-2); max-width: 74ch; }
.faq .answer p:last-child { margin-bottom: 0; }

/* 授权说明 */
.license-note {
  display: flex; gap: 13px; align-items: flex-start; padding: 17px 19px; border: 2px dashed var(--line-2);
  border-radius: var(--radius-lg); background: var(--paper-2); font-size: 14.5px; color: var(--ink-2);
}
.license-note strong { color: var(--ink); }

/* ------------------------------------------------------------ 页脚 */
footer.site {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
    var(--night);
  color: var(--ink-2-dark); border-top: 2px solid var(--ink);
  padding: 56px 0 34px; font-size: 14.5px;
  /* 页脚也是暗面，一并覆写双上下文令牌（原 #a9a4b8 / #d6d2e0 / #4a4757
     三档各自独立，属于同一片暗区里的重复灰色） */
  --ctl-line: var(--panel-2); --ctl-tx: var(--ink-2-dark); --ctl-tx-strong: var(--ink-1-dark);
  --ctl-on-bg: var(--lime); --ctl-on-tx: var(--ink);
}
footer.site a { color: var(--ink-1-dark); text-decoration-color: var(--panel-2); }
footer.site a:hover { color: var(--lime); text-decoration-color: var(--lime); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 34px; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--ink-1-dark); font-family: var(--font-display); font-size: 17px; margin-bottom: 12px; }
/* 页脚三列的列标题不是文档大纲的一部分，用带样式的普通元素即可：
   用 h4 会让每页大纲都从 h2 跳到 h4。 */
.foot-head { color: var(--ink-1-dark); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-mono); margin: 0 0 13px; font-weight: 600; }
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
/* 页脚链接是独立目标，不是嵌在句子里的行内链接 —— 必须满足 WCAG 2.2 SC 2.5.8
   的 24×24。行内元素的盒子高度只有约 1.4em（14.5px 字体 → 实测 20px），
   所以补一点纵向内边距把它撑到 26px；display:inline-block 才能吃到内边距。
   （判定依据见 build/qa/test-a11y-ui.cjs 的 U15 与它的 inline 例外实现。） */
.foot-col ul a { display: inline-block; padding: 3px 0; min-height: 24px; }
.foot-bottom { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--panel-2); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3-dark); }

/* 广告位（过审后再启用，此处仅留结构注释） */
.ad-slot { display: none; }

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1000px) {
  /* 平板：风格栏与画布并排，参数区横跨整行排成两列。
     网格列必须是 minmax(0, 1fr)。裸 1fr 等于 minmax(auto, 1fr)，列的 min-content
     会被内容顶开：画布栏里「风格 · 尺寸」+「隐私标识」两段 nowrap 文本
     最小需要 414px，于是 390px 手机上整列被撑到 418px，主画布右侧 48px
     被 body 的 overflow-x:hidden 直接裁掉（实测 docW 441 vs 视口 390）。 */
  .bench { grid-template-columns: 220px minmax(0, 1fr); }
  .bench-side {
    grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px; align-items: start;
  }
  .bench-side > .panel { margin-top: 0; }
  .hero-top { grid-template-columns: 1fr; gap: 34px; }
  .caprow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .caprow li:nth-child(even) { border-right: 0; }
  .caprow li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .hstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  section { padding: 54px 0; }
  .hero { padding: 40px 0 32px; }
  .nav { display: none; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; border: 2px solid var(--ink); background: #fff;
    border-radius: var(--radius); padding: 7px 10px; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
  }
  .nav.open {
    display: grid; position: absolute; top: 66px; left: 0; right: 0; background: var(--paper);
    border-bottom: 2px solid var(--ink); padding: 16px 22px; gap: 14px;
  }
  .grid-2, .foot-grid { grid-template-columns: 1fr; }
  /* 能力条与首屏风格横条在手机上改为横向滑动，避免把工作室推到更下面 */
  .hstrip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; }
  .htile { flex: 0 0 auto; width: 132px; }

  /* ---------------- 工具区：单列 + 输入框下方风格横条 ---------------- */
  .bench { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* 把右栏「展开」进 .bench，于是 DOM 顺序被重排成
     文字输入 → 风格横条 → 画布 → 其余参数 → 导出。
     用 display:contents 而不是复制 DOM：重复 id 会被无障碍审计直接判失败，
     重复控件还会让同一个 state 有两份互不同步的视图。 */
  .bench-side { display: contents; }
  .bench-side > .panel { margin-top: 0; }
  #panelText { order: 1; }
  .rail { order: 2; }
  .bench-canvas { order: 3; }
  #panelPaint { order: 4; }
  #panelDepth { order: 5; }
  #panelSurface { order: 6; }
  #panelCanvas { order: 7; }
  #panelExport { order: 8; }

  /* 步骤条在 390px 里折叠成纯数字：4 个圆点只占约 190px，
     省下的宽度让「输入框 + 风格横条」能挤进同一个首屏。 */
  .srail { margin-bottom: 14px; flex-wrap: nowrap; }
  .sstep b { display: none; }
  .sstep[aria-current="step"] b { display: inline; font-size: 12.5px; white-space: nowrap; }
  .sstep::after { width: 12px; margin: 0 7px; }
  .sstep a { padding: 6px 2px; }

  /* 风格栏 → 横向滑动的迷你卡条 */
  .rail-search { display: none; }
  .rail-all { display: inline-flex; }
  .filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .style-grid {
    display: flex; gap: 9px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    padding: 2px 2px 8px; margin: -2px -2px -4px;
  }
  .style-tile {
    flex: 0 0 auto; width: 94px; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0; border: 2px solid var(--ctl-line); border-radius: var(--radius);
    overflow: hidden; background: var(--panel-2); scroll-snap-align: start;
  }
  .style-tile canvas { width: 100%; border-radius: 0; }
  .style-tile .meta { padding: 5px 6px 6px; }
  .style-tile .name { font-size: 11.5px; }
  .style-tile .sub { display: none; }
  .style-tile .pop { position: absolute; top: 0; right: 0; border-radius: 0 0 0 5px; padding: 2px 5px; }

  /* 风格抽屉：同一个 #styleGrid，切到 3 列网格铺满底部 */
  .rail[data-open] {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 62;
    max-height: 82vh; display: flex; flex-direction: column;
    border-radius: 14px 14px 0 0; border: 0; border-top: 2px solid var(--lime);
  }
  .rail[data-open] .rail-all { display: none; }
  .rail[data-open] .rail-x { display: inline-flex; }
  .rail[data-open] .rail-b { overflow-y: auto; }
  .rail[data-open] .style-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px;
    overflow: visible; padding: 0; margin: 0;
  }
  .rail[data-open] .style-tile { width: auto; }

  /* 画布下方的操作条在手机上由底部常驻操作条取代，避免两排同样的按钮 */
  .studio-actions { display: none; }

  /* 底部常驻操作条：导出永远在拇指可达区内 */
  .studio { padding-bottom: 96px; }
  .mobar {
    display: flex; gap: 9px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    padding: 11px 16px 16px; background: rgba(18,17,25,.97);
    border-top: 1px solid var(--panel-2); backdrop-filter: blur(8px);
  }
  .mobar[hidden] { display: none; }
  .mobar .btn { box-shadow: 3px 3px 0 #000; border-color: #000; }
  .mobar .btn-lime { flex: 1 1 auto; }
  .mobar .mobar-ic { flex: none; width: 48px; padding: 0; justify-content: center; }

  /* 提示条必须让开底部操作条，否则会被盖住 */
  .toast { bottom: 88px; }
  .xmodal-f { flex-wrap: wrap; }

  .canvas-bar .label { display: none; }
  .canvas-bar .size-chip { margin-left: auto; }
  .alphabet { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .swatches { grid-template-columns: repeat(8, 1fr); }
  .card { box-shadow: 3px 3px 0 var(--ink); }
  .btn { padding: 11px 16px; }
}

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

@media print {
  .topbar, .studio, footer.site, .ad-slot { display: none; }
}

/* ============================================================================
   内容页（字母页 / 风格页 / 博客 / 合规页）
   ----------------------------------------------------------------------------
   全部复用上面的设计令牌（--paper / --ink / --shadow-hard …），没有引入新的
   颜色或字体。后面统一改视觉风格时，改令牌即可，这一节基本不用动。
   ========================================================================== */

/* ---------------------------------------------------------- 面包屑 */
.crumbs { padding-top: 18px; font-size: 13px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li { color: var(--ink-3); font-family: var(--font-mono); letter-spacing: .02em; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--hot); }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }

/* ---------------------------------------------------------- 页头 */
.page-head { padding: 34px 0 30px; border-bottom: 2px solid var(--ink); }
.page-head h1 { font-size: clamp(30px, 4.4vw, 46px); max-width: 22ch; }
.page-head .lede { margin-bottom: 0; }
.post-meta-line {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3);
  letter-spacing: .04em; margin: 16px 0 0;
}

/* ---------------------------------------------------------- 字母页头图 */
.letter-hero { display: flex; gap: 20px; align-items: center; margin-top: 26px; }
.letter-badge {
  flex: none; width: 92px; height: 92px; display: grid; place-items: center;
  background: var(--night); color: var(--lime); border: 2px solid var(--ink);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-hard);
  font-family: var(--font-display); font-size: 48px; line-height: 1;
}

/* ---------------------------------------------------------- 示例画布 */
.demo-row { display: grid; gap: 18px; }
.demo-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.demo-card { margin: 0; }
.demo-box {
  background: var(--night); border: 2px solid var(--ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard); overflow: hidden; padding: 4px;
}
.demo-box canvas { width: 100%; height: auto; display: block; }
.demo-wrap {
  border: 2px solid var(--ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard); overflow: hidden; background: var(--night);
  padding: 4px; margin: 24px 0;
}
.demo-wrap canvas { width: 100%; height: auto; display: block; }
.demo-card figcaption {
  display: flex; flex-direction: column; gap: 1px; margin-top: 11px;
  font-size: 14px;
}
.demo-card figcaption span { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }

/* ---------------------------------------------------------- 正文 + 侧栏 */
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 40px; align-items: start; }
.prose-lg { font-size: 17.5px; max-width: none; }
.prose-lg h2:first-child { margin-top: 0; }
.prose-lg h2 { font-size: clamp(21px, 2.4vw, 26px); }

.side { display: grid; gap: 18px; position: sticky; top: 84px; }
.side-card {
  background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: 17px 18px; box-shadow: 4px 4px 0 var(--ink);
}
.side-card .num-tag { margin-bottom: 11px; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.side-list a { display: block; text-decoration: none; padding: 2px 0; }
.side-list a:hover b { color: var(--hot); }
.side-list b { display: block; font-size: 15px; }
.side-list span { display: block; font-size: 12.5px; color: var(--ink-3); font-family: var(--font-mono); }
.side-list.toc b { font-size: 14px; font-weight: 600; }

table.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
table.kv th { text-align: left; font-weight: 600; color: var(--ink-3); padding: 4px 10px 4px 0; font-size: 12.5px; white-space: nowrap; vertical-align: top; }
table.kv td { padding: 4px 0; }

/* 难度计 */
.diff { display: inline-flex; gap: 3px; vertical-align: middle; }
.diff i { width: 8px; height: 14px; background: var(--line); border: 1px solid var(--line-2); border-radius: 2px; }
.diff i.on { background: var(--hot); border-color: var(--ink); }

/* ---------------------------------------------------------- 表格 */
.table-wrap { overflow-x: auto; margin: 22px 0; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 480px; }
.table-wrap th, .table-wrap td { border: 1px solid var(--line-2); padding: 10px 13px; text-align: left; vertical-align: top; }
.table-wrap thead th { background: var(--paper-2); font-weight: 750; font-size: 13.5px; letter-spacing: .02em; }
.table-wrap tbody tr:nth-child(even) { background: rgba(255,255,255,.55); }

.letter-index { border-collapse: collapse; width: 100%; margin-top: 22px; font-size: 15px; }
.letter-index th, .letter-index td { border-bottom: 1px solid var(--line-2); padding: 10px 12px; text-align: left; }
.letter-index thead th { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); border-bottom: 2px solid var(--ink); }
.letter-link {
  display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--ink);
  border-radius: var(--radius); background: #fff; font-family: var(--font-display); font-size: 17px;
  text-decoration: none;
}
.letter-link:hover { background: var(--lime); }

/* ---------------------------------------------------------- 词表 */
dl.terms { margin: 20px 0; }
dl.terms dt { font-weight: 750; margin-top: 14px; }
dl.terms dd { margin: 3px 0 0; color: var(--ink-2); }

/* ---------------------------------------------------------- 步骤（宽版） */
.steps-wide .step { gap: 16px; }
.steps-wide .step h3.step-head { margin-top: 2px; }

/* ---------------------------------------------------------- 枢纽卡片 */
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.hub-card {
  display: block; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-hard); text-decoration: none;
  transition: transform .1s ease, box-shadow .1s ease;
}
.hub-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); color: var(--ink); }
.hub-card h3, .hub-card h2 { margin: 8px 0 8px; }
.hub-card p { color: var(--ink-2); font-size: 15px; margin-bottom: 12px; }
.hub-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--hot); font-weight: 700; }
.hub-more { font-weight: 700; font-size: 14px; }

/* ---------------------------------------------------------- 风格深链接索引 */
/* 风格枢纽页用它列出生成器里全部 15 套风格。原有的 5 张家族卡片只覆盖到
   部分风格，marker / spray / tag / vinyl 在内容层完全没有入口。 */
.style-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 10px; margin-top: 18px; }
.style-key {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  border: 2px solid var(--ink); border-radius: var(--radius); background: #fff;
  padding: 9px 12px; text-decoration: none; font-weight: 700; font-size: 14.5px;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .1s ease, box-shadow .1s ease, background .12s ease;
}
.style-key:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); background: var(--lime); color: var(--ink); }
.style-key span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); font-weight: 500; }
.style-key:hover span { color: var(--ink-2); }

/* ---------------------------------------------------------- 博客列表 */
.post-list { display: grid; gap: 18px; }
.post-card {
  display: block; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-hard); text-decoration: none;
  transition: transform .1s ease, box-shadow .1s ease;
}
.post-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); color: var(--ink); }
.post-card h3, .post-card h2 { margin: 6px 0 8px; font-size: 21px; }
.post-card p { color: var(--ink-2); font-size: 15.5px; margin-bottom: 10px; max-width: 76ch; }
.post-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.post-tags { display: flex; gap: 6px; }
.tag { border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 8px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------------------------------------------------------- 相关阅读 */
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line-2); }
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.related-card {
  display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 2px solid var(--ink);
  border-radius: var(--radius); padding: 15px 17px; box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1.4;
}
.related-card:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
.related-card .arrow { color: var(--hot); flex: none; }

/* ---------------------------------------------------------- 字母表（小号） */
.alphabet-sm { grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); margin-top: 14px; }
.alphabet-sm a { font-size: 16px; }

/* ---------------------------------------------------------- 页内 FAQ */
.faq-inline { margin-top: 12px; }
.faq-inline .answer { max-width: none; }

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 1000px) {
  /* 必须是 minmax(0,1fr)：裸 1fr 等于 minmax(auto,1fr)，页内表格的
     min-width:480px 会把整列撑破，导致博客正文在窄屏横向溢出。 */
  .doc-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .side-card:only-child { grid-column: 1 / -1; }
  .demo-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-grid, .related { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .page-head { padding: 26px 0 22px; }
  .letter-hero { flex-direction: column; align-items: flex-start; gap: 14px; }
  .letter-badge { width: 68px; height: 68px; font-size: 34px; }
  .demo-row-3 { grid-template-columns: minmax(0, 1fr); }
  .side { grid-template-columns: minmax(0, 1fr); }
  .card, .side-card, .hub-card, .post-card, .related-card { box-shadow: 3px 3px 0 var(--ink); }
}

/* Contact form (mailto composer, no backend) */
.contact-form { max-width: 560px; margin: 22px 0 8px; padding: 20px; border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-hard); }
.contact-form label { display: block; font-weight: 700; font-size: 14.5px; margin: 12px 0 5px; }
.contact-form label:first-of-type { margin-top: 0; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 8px; font: inherit; font-size: 16px; background: var(--paper); color: var(--ink); }
.contact-form textarea { resize: vertical; }
.contact-form .btn { margin-top: 14px; }
.contact-note { font-size: 13.5px; color: var(--ink-3); margin: 10px 0 0; }


/* ========================================================
   新增内容板块：样例集 / 使用场景 / 工具矩阵 / 最新指南
   （2026-09-26 补齐开发前方案的首页四板块）
   ======================================================== */
.make-grid, .uc-grid, .tool-grid, .guide-grid { display: grid; gap: 20px; }
.make-item, .uc-item, .tool-card, .guide-card {
  background: var(--paper);
  border: 2px solid var(--paper-3);
  border-radius: 12px;
  box-shadow: 4px 4px 0 rgba(22,21,27,.08);
  padding: 0 0 16px;
  min-width: 0;
}
.make-art {
  background: var(--night);
  border-radius: 10px 10px 0 0;
  border-bottom: 2px solid var(--paper-3);
  line-height: 0;
}
.make-art canvas { width: 100%; height: auto; border-radius: 10px 10px 0 0; }
.make-item h3, .uc-item h3 { font-size: 17px; margin: 14px 16px 6px; }
.make-item h3 a, .uc-item h3 a { color: var(--ink); text-decoration: none; }
.make-item h3 a:hover, .uc-item h3 a:hover { color: var(--hot); }
.make-item p, .uc-item p { font-size: 14px; color: var(--ink-2); margin: 0 16px; }
.uc-item { padding: 18px 16px 16px; }
.tool-card, .guide-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 16px 16px; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tool-card:hover, .guide-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: 6px 6px 0 rgba(22,21,27,.14);
  border-color: var(--lime);
}
.tool-card h3, .guide-card h3 { font-size: 16.5px; color: var(--ink); margin: 0; }
.tool-card p, .guide-card p { font-size: 13.5px; color: var(--ink-2); margin: 0; flex: 1 1 auto; }
.tool-go, .guide-go { font-weight: 700; font-size: 13px; color: var(--hot); }
.tool-card .tag {
  display: inline-block; vertical-align: 2px; margin-left: 6px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #16151b; background: var(--lime); border-radius: 4px; padding: 1px 6px;
}
@media (min-width: 720px) {
  .make-grid, .uc-grid, .guide-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 1001px) {
  .make-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .uc-grid, .guide-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .tool-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .tool-card, .guide-card { transition: none; }
  .tool-card:hover, .guide-card:hover { transform: none; }
}

/* 触控目标：新增板块的行内链接命中盒 ≥24×24（WCAG 2.2 / U15），
   用负 margin 抵消 padding，视觉行高不变 */
.make-item h3 a, .uc-item p a, .guide-card p, .tool-card p {
  display: inline-block;
  padding: 3px 0;
  margin: -3px 0;
}

/* 触控目标：新增板块的行内链接命中盒 ≥24×24（WCAG 2.2 / U15），
   用负 margin 抵消 padding，视觉行高不变 */
.make-item h3 a, .uc-item p a, .guide-card p, .tool-card p {
  display: inline-block;
  padding: 3px 0;
  margin: -3px 0;
}


/* == audit-fixes 2026-09-26: 样例卡场景相框 == */
.make-art { position: relative; overflow: hidden; }
.sc-stream { box-shadow: inset 0 0 0 1px rgba(0,194,255,.22); }
.sc-stream::before, .sc-stream::after { content: ''; position: absolute; width: 26px; height: 26px; border: 3px solid var(--sky); z-index: 1; }
.sc-stream::before { top: 9px; left: 9px; border-right: none; border-bottom: none; }
.sc-stream::after { bottom: 9px; right: 9px; border-left: none; border-top: none; }
.sc-sticker { background: var(--paper-2); }
.sc-sticker canvas { border: 6px solid #fff; border-radius: 14px; box-shadow: 0 6px 18px rgba(22,21,27,.35); transform: rotate(-1.6deg); margin: 12px 14px; width: calc(100% - 28px); }
.sc-poster { background: #e9e4d9; }
.sc-poster canvas { border: 10px solid #fff; box-shadow: 0 4px 14px rgba(22,21,27,.28); margin: 14px 20px 4px; width: calc(100% - 40px); }
.sc-poster::after { content: 'SHOW · THIS · SATURDAY'; position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 10px; letter-spacing: .3em; font-weight: 800; color: var(--ink-3); }
.sc-sketch { background: linear-gradient(90deg, transparent 20px, rgba(255,46,109,.30) 20px 21.5px, transparent 21.5px), repeating-linear-gradient(0deg, transparent 0 15px, rgba(22,21,27,.055) 15px 16px), repeating-linear-gradient(90deg, transparent 0 15px, rgba(22,21,27,.055) 15px 16px), #f7f5ee; }
.sc-sketch canvas { margin: 12px 16px; width: calc(100% - 32px); border: 1px solid rgba(22,21,27,.14); box-shadow: 0 3px 10px rgba(22,21,27,.16); }
.sc-blueprint { background: repeating-linear-gradient(0deg, transparent 0 17px, rgba(0,194,255,.13) 17px 18px), repeating-linear-gradient(90deg, transparent 0 17px, rgba(0,194,255,.13) 17px 18px), #101623; }
.sc-blueprint canvas { margin: 12px 14px; width: calc(100% - 28px); box-shadow: 0 0 0 1px rgba(0,194,255,.45); }
.sc-blueprint::before, .sc-blueprint::after { content: ''; position: absolute; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--sky); z-index: 1; }
.sc-blueprint::before { top: 7px; left: 7px; }
.sc-blueprint::after { bottom: 7px; right: 7px; }
.sc-deck { background: radial-gradient(120% 90% at 50% 0%, #26242e, #131119 70%); }
.sc-deck canvas { margin: 12px 10px 28px; width: calc(100% - 20px); border-radius: 46% 46% 46% 46% / 24% 24% 24% 24%; box-shadow: 0 10px 22px rgba(0,0,0,.5); }
.sc-deck::before, .sc-deck::after { content: ''; position: absolute; bottom: 8px; width: 12px; height: 12px; border-radius: 50%; background: #44414e; border: 2px solid #575364; }
.sc-deck::before { left: 22%; }
.sc-deck::after { right: 22%; }
.sc-haunt { background: radial-gradient(90% 70% at 50% 30%, #241a2b, #100d14 75%); }
.sc-haunt canvas { margin: 12px 14px; width: calc(100% - 28px); box-shadow: 0 0 34px rgba(109,75,255,.35); }
.sc-tape { background: var(--paper-2); }
.sc-tape canvas { margin: 14px 16px; width: calc(100% - 32px); box-shadow: 0 3px 12px rgba(22,21,27,.22); }
.sc-tape::before, .sc-tape::after { content: ''; position: absolute; top: -6px; width: 74px; height: 22px; background: rgba(232,227,216,.85); box-shadow: 0 2px 6px rgba(22,21,27,.18); z-index: 1; }
.sc-tape::before { left: 14px; transform: rotate(-5deg); }
.sc-tape::after { right: 14px; transform: rotate(4deg); }
.sc-wall { background: repeating-linear-gradient(0deg, transparent 0 20px, rgba(255,255,255,.09) 20px 22px), repeating-linear-gradient(90deg, transparent 0 40px, rgba(255,255,255,.07) 40px 42px), #3b3742; }
.sc-wall canvas { margin: 14px 16px 12px; width: calc(100% - 32px); box-shadow: 0 8px 18px rgba(0,0,0,.45); }
@media (prefers-reduced-motion: reduce) { .sc-sticker canvas { transform: none; } }
