/* ============================================================
   CssShift — "The Fountain Press" 墨泉印坊 / 浅色宽幅
   设计隐喻：渐变在老排版软件里叫 fountain fill（墨泉填充）。
   预览区 = 压印床（proof bed），色标轨道 = 墨尺，
   代码卡 = 印刷工单（work order），TOTAL 签名 = 朱砂印刷章。
   字体：Gloock（高对比衬线铭牌）+ Schibsted Grotesk（正文）
        + Azeret Mono（铅字等宽）。
   ============================================================ */

:root {
  --paper: #f6f3ec;
  --paper-2: #ede9dd;
  --card: #fdfbf6;
  --card-2: #f3efe3;

  --ink: #22303c;            /* 印坊墨蓝 */
  --ink-soft: #5a6875;
  --ink-faint: #97a1ac;

  --ver: #c9472c;            /* 朱砂（印刷章红） */
  --ver-deep: #a03622;
  --ver-soft: rgba(201, 71, 44, .08);
  --ver-line: rgba(201, 71, 44, .28);

  --brass: #a97e2f;          /* 黄铜 */
  --teal: #2e6e63;

  --line: #ddd6c6;
  --line-2: #c8c0ab;

  --radius: 14px;
  --radius-sm: 9px;
  --max-width: 1520px;
  --mono: "Azeret Mono", "JetBrains Mono", "SF Mono", Consolas, monospace;
  --sans: "Schibsted Grotesk", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  --display: "Gloock", Georgia, serif;

  --shadow-sm: 0 1px 2px rgba(34, 48, 60, .05), 0 4px 12px rgba(34, 48, 60, .05);
  --shadow-md: 0 2px 6px rgba(34, 48, 60, .06), 0 18px 44px rgba(34, 48, 60, .10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(1000px 420px at 92% -8%, rgba(201, 71, 44, .05), transparent 62%),
    radial-gradient(800px 380px at -6% 12%, rgba(46, 110, 99, .05), transparent 60%),
    repeating-linear-gradient(45deg, transparent 0 26px, rgba(34, 48, 60, .018) 26px 27px),
    var(--paper);
  min-height: 100vh;
}

::selection { background: var(--ver); color: #fff; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 28px; }

/* ============ 头部 ============ */
.site-head {
  background: rgba(246, 243, 236, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
}
.head-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 62px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-icon { width: 38px; height: 38px; display: block; }
.brand-text {
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand-text em {
  font-style: normal;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: .06em;
  margin-left: 6px;
}
.head-nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.head-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .02em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.head-nav a:hover { color: var(--ver); border-color: var(--ver); }

.menu-btn {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  background: var(--card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ============ Hero（极简） ============ */
.hero { padding: 30px 0 6px; }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 400;
  letter-spacing: -.005em;
  line-height: 1.15;
}
.hero h1 .accent {
  color: var(--ver);
  background: linear-gradient(100deg, var(--ver), var(--brass));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p { color: var(--ink-soft); font-size: 15px; margin-top: 6px; max-width: 640px; }
.hero-rule {
  height: 5px;
  margin-top: 18px;
  border-top: 2.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ver);
}

/* ============ 工具台 ============ */
.studio { padding: 26px 0 8px; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.type-switch {
  display: inline-flex;
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 11px;
  padding: 4px;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.type-switch button {
  appearance: none;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, color .15s;
}
.type-switch button svg { width: 15px; height: 15px; }
.type-switch button:hover { color: var(--ink); background: var(--card-2); }
.type-switch button.active { background: var(--ink); color: #f6f3ec; }
.toolbar-actions { margin-left: auto; display: flex; gap: 10px; }
.btn-ghost {
  appearance: none;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--line-2);
  border-radius: 10px;
  padding: 9px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.btn-ghost svg { width: 15px; height: 15px; }
.btn-ghost:hover { border-color: var(--ver); color: var(--ver); box-shadow: var(--shadow-sm); }

/* ---------- 主网格 ---------- */
.studio-grid {
  display: grid;
  grid-template-columns: 348px 1fr;
  gap: 20px;
  align-items: start;
}

/* ---------- 左：控制面板 ---------- */
.controls { display: flex; flex-direction: column; gap: 16px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 18px;
  box-shadow: var(--shadow-sm);
}
.panel-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--ver-deep);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title::after { content: ''; flex: 1; height: 1px; background: var(--ver-line); }

/* 类型可见性门控 */
[data-type="linear"] .only-radial,
[data-type="linear"] .only-conic { display: none; }
[data-type="radial"] .only-linear,
[data-type="radial"] .only-conic { display: none; }
[data-type="conic"] .only-linear,
[data-type="conic"] .only-radial { display: none; }
[data-type="radial"] .not-radial { display: none; }
[data-type="conic"] .not-conic { display: none; }
[data-type="linear"] .not-linear { display: none; }

/* ---------- 角度旋钮 ---------- */
.dial {
  --a: 135deg;
  width: 176px;
  height: 176px;
  margin: 4px auto 2px;
  border-radius: 50%;
  position: relative;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background: radial-gradient(circle, var(--card-2) 0 58%, var(--card) 58.5% 100%);
  border: 1.5px solid var(--line-2);
  box-shadow: inset 0 2px 8px rgba(34, 48, 60, .06);
}
.dial:active { cursor: grabbing; }
.dial-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(var(--ink-faint) 0 .9deg, transparent .9deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 61%, #000 61.5% 100%);
  mask: radial-gradient(circle, transparent 0 61%, #000 61.5% 100%);
  opacity: .55;
}
.dial-arrow-wrap { position: absolute; inset: 0; transform: rotate(var(--a)); pointer-events: none; }
.dial-arrow {
  position: absolute;
  left: 50%;
  top: 9%;
  width: 4px;
  height: 43%;
  margin-left: -2px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--ver), rgba(201, 71, 44, .3));
}
.dial-arrow::after {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  width: 15px;
  height: 15px;
  margin-left: -7.5px;
  border-radius: 50%;
  background: var(--ver);
  border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .32);
}
.dial-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--ink);
  pointer-events: none;
}
.dial-num {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, 62px);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 1px 8px;
  pointer-events: none;
}
.angle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.angle-row input {
  width: 76px;
  font-family: var(--mono);
  font-size: 14px;
  text-align: center;
  padding: 7px 6px;
  border: 1.5px solid var(--line-2);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
}
.angle-row input:focus { outline: 2px solid var(--ver-line); border-color: var(--ver); }
.angle-row .unit { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.angle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}
.angle-chips button {
  appearance: none;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  background: var(--card-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  min-width: 40px;
  transition: all .13s;
}
.angle-chips button:hover { border-color: var(--ver); color: var(--ver); }

/* ---------- 形状 / 中心 ---------- */
.seg {
  display: inline-flex;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  appearance: none;
  border: none;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 7px 16px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .13s;
}
.seg button.active { background: var(--ink); color: #f6f3ec; }
.seg-wrap { display: flex; justify-content: center; }

.center-inputs { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.center-inputs label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.center-inputs input {
  width: 64px;
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
  padding: 7px 4px;
  border: 1.5px solid var(--line-2);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
}
.center-inputs input:focus { outline: 2px solid var(--ver-line); border-color: var(--ver); }
.panel .hint {
  font-size: 12.5px;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 10px;
}

/* ---------- 预设 ---------- */
.preset-list { display: flex; flex-direction: column; gap: 7px; }
.preset-item {
  appearance: none;
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: border-color .14s, box-shadow .14s, transform .14s;
}
.preset-item:hover { border-color: var(--ver); box-shadow: var(--shadow-sm); transform: translateX(2px); }
.preset-thumb {
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(34, 48, 60, .18);
  display: block;
}
.preset-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.preset-type {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-faint);
}

/* ---------- 右：压印床 ---------- */
.bench { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.proof-frame {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.proof-frame::before {
  /* 左上角定位十字（套准 mark） */
  content: '';
  position: absolute;
  left: 7px;
  top: 7px;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(var(--ink-faint), var(--ink-faint)) center/13px 1px no-repeat,
    linear-gradient(var(--ink-faint), var(--ink-faint)) center/1px 13px no-repeat;
  opacity: .7;
}
.proof-label {
  position: absolute;
  right: 16px;
  top: -10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--card);
  background: var(--ink);
  border-radius: 5px;
  padding: 3px 10px;
  z-index: 2;
}
.preview {
  position: relative;
  min-height: 380px;
  border-radius: 10px;
  border: 1.5px solid var(--ink);
  background-color: #e6e2d4;
  overflow: hidden;
}
.center-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(0, 0, 0, .5), 0 2px 10px rgba(0, 0, 0, .35);
  cursor: grab;
  touch-action: none;
  z-index: 3;
}
.center-marker:active { cursor: grabbing; }
.center-marker::before,
.center-marker::after {
  content: '';
  position: absolute;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}
.center-marker::before { left: 50%; top: 2px; bottom: 2px; width: 1.5px; margin-left: -.75px; }
.center-marker::after { top: 50%; left: 2px; right: 2px; height: 1.5px; margin-top: -.75px; }

/* ---------- 墨尺（色标轨道） ---------- */
.track-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 10px; box-shadow: var(--shadow-sm); }
.grad-track {
  position: relative;
  height: 48px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--card-2);
  cursor: copy;
  touch-action: none;
}
.track-bar { position: absolute; inset: 4px; border-radius: 6px; }
.stop-handle {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 32px;
  margin: -16px 0 0 -11px;
  border-radius: 6px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .22);
  cursor: grab;
  touch-action: none;
  z-index: 2;
  transition: box-shadow .13s;
}
.stop-handle:hover { box-shadow: 0 3px 12px rgba(0, 0, 0, .45), 0 0 0 1px rgba(0, 0, 0, .25); }
.stop-handle:active { cursor: grabbing; }
.stop-handle.sel { outline: 2.5px solid var(--ver); outline-offset: 2px; z-index: 3; }
.track-hint {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 8px;
}

/* ---------- 色标编辑 ---------- */
.stops-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stops-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.stops-head .panel-title { margin-bottom: 0; flex: 1; }
.btn-add {
  appearance: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ver);
  background: var(--ver-soft);
  border: 1.5px dashed var(--ver-line);
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
  min-height: 40px;
  transition: all .14s;
}
.btn-add:hover { background: var(--ver); color: #fff; border-style: solid; }
.stops-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 9px;
}
.stop-row {
  display: grid;
  grid-template-columns: 18px 42px 66px 14px 36px;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color .14s, box-shadow .14s;
}
.stop-row:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.stop-row.sel { border-color: var(--ver); background: #fdf8f4; }
.stop-idx {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
}
.stop-swatch {
  position: relative;
  width: 42px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid rgba(34, 48, 60, .25);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}
.stop-swatch input {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  opacity: 0;
  cursor: pointer;
}
.stop-pos {
  width: 100%;
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
  padding: 6px 7px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink);
}
.stop-pos:focus { outline: 2px solid var(--ver-line); border-color: var(--ver); }
.stop-unit { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
.stop-del {
  appearance: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink-faint);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: all .13s;
}
.stop-del:hover { color: #fff; background: var(--ver); border-color: var(--ver); }

/* ---------- 代码工单 ---------- */
.code-card {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--card-2);
  flex-wrap: wrap;
}
.code-tabs { display: flex; gap: 4px; }
.code-tabs button {
  appearance: none;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--ink-soft);
  background: transparent;
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 7px 15px;
  cursor: pointer;
  transition: all .13s;
}
.code-tabs button:hover { color: var(--ink); }
.code-tabs button.active { color: var(--ink); border-color: var(--ink); background: var(--card); }
.code-meta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.fallback-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  min-height: 38px;
  transition: all .14s;
}
.fallback-chip:hover { border-color: var(--ver); color: var(--ink); }
.fallback-chip .fc-dot {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid rgba(34, 48, 60, .3);
  display: inline-block;
}
.fallback-chip.ok { border-color: var(--teal); color: var(--teal); }
.copy-btn {
  appearance: none;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--ver);
  border: none;
  border-radius: 9px;
  padding: 9px 22px;
  cursor: pointer;
  min-height: 42px;
  letter-spacing: .03em;
  transition: background .14s, transform .1s;
}
.copy-btn:hover { background: var(--ver-deep); }
.copy-btn:active { transform: scale(.97); }
.copy-btn.ok { background: var(--teal); }
.code-body {
  background: #1d2731;
  padding: 18px 20px;
  overflow-x: auto;
}
.code-body code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  color: #dfe6ec;
  white-space: pre;
  display: block;
}
.code-body .ln { display: inline; }
.code-body .ln.dim { color: #76848f; }
.code-body .ln.soft { color: #9fb0bc; }
.code-body .ln.main { color: #f4c477; font-weight: 600; }

/* ============ 文档区 ============ */
.doc { padding: 54px 0 10px; }
.doc-sec { margin-top: 44px; }
.doc h2 {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 400;
  margin-bottom: 6px;
}
.doc .lead { color: var(--ink-soft); font-size: 15px; max-width: 720px; margin-bottom: 22px; }
.doc-rule {
  height: 5px;
  width: 64px;
  margin: 10px 0 14px;
  border-top: 2.5px solid var(--ver);
  border-bottom: 1.5px solid var(--ver);
}

.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.type-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.type-card .demo {
  height: 84px;
  border-radius: 9px;
  border: 1px solid rgba(34, 48, 60, .2);
  margin-bottom: 14px;
}
.type-card h3 { font-family: var(--display); font-size: 19px; font-weight: 400; }
.type-card .syntax {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ver-deep);
  background: var(--ver-soft);
  border-radius: 6px;
  padding: 5px 9px;
  display: inline-block;
  margin: 8px 0 10px;
}
.type-card p { font-size: 13.5px; color: var(--ink-soft); }

.cheat-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}
.cheat-table th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ver-deep);
  text-align: left;
  padding: 11px 16px;
  background: var(--card-2);
  border-bottom: 1.5px solid var(--line-2);
}
.cheat-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cheat-table tr:last-child td { border-bottom: none; }
.cheat-table code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  background: var(--card-2);
  border-radius: 5px;
  padding: 2px 7px;
  white-space: nowrap;
}
.cheat-table td:last-child { color: var(--ink-soft); font-size: 13.5px; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
details.faq {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0;
  box-shadow: var(--shadow-sm);
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before {
  content: 'Q';
  font-family: var(--display);
  color: var(--ver);
  font-size: 17px;
  flex-shrink: 0;
}
details.faq summary::after {
  content: '+';
  margin-left: auto;
  font-family: var(--mono);
  color: var(--ink-faint);
  font-size: 18px;
  transition: transform .18s;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .faq-a {
  padding: 0 18px 16px 47px;
  color: var(--ink-soft);
  font-size: 14px;
}
details.faq .faq-a code {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--card-2);
  border-radius: 5px;
  padding: 1px 6px;
}

/* ============ 页脚 ============ */
.site-foot { margin-top: 70px; border-top: 1.5px solid var(--ink); background: var(--paper-2); }
.foot-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 34px 28px 30px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}
.foot-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.foot-brand img { width: 30px; height: 30px; }
.foot-brand span { font-family: var(--display); font-size: 18px; }
.site-foot p { font-size: 13px; color: var(--ink-soft); max-width: 380px; }
.foot-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ver-deep);
  margin-bottom: 12px;
}
.foot-col a {
  display: block;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 13.5px;
  padding: 4px 0;
  transition: color .14s;
}
.foot-col a:hover { color: var(--ver); }
.foot-base {
  border-top: 1px solid var(--line-2);
  padding: 14px 28px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  font-family: var(--mono);
}

/* ============ 移动端（7.8 规范） ============ */
@media (max-width: 1080px) {
  .studio-grid { grid-template-columns: 312px 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .preview { min-height: 300px; }
}

@media (max-width: 900px) {
  .studio-grid { grid-template-columns: 1fr; }
  .controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .foot-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .wrap, .head-inner { padding-left: 16px; padding-right: 16px; }
  .head-inner { flex-wrap: wrap; min-height: 0; padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
  .brand-text { font-size: 18px; }
  .brand-text em { display: none; }

  /* 汉堡菜单（仅工具页有 .menu-btn） */
  .menu-btn { display: flex; }
  .head-inner:has(.menu-btn) .head-nav {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 8px;
    margin-top: 4px;
  }
  .head-inner:has(.menu-btn) .head-nav.open { display: flex; }
  .head-inner:has(.menu-btn) .head-nav a {
    padding: 11px 12px;
    border-bottom: none;
    border-radius: 8px;
    font-size: 14.5px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .head-inner:has(.menu-btn) .head-nav a:hover { background: var(--ver-soft); }
  /* 无按钮页（合规页/文章页）→ 可见压缩导航 */
  .head-inner:not(:has(.menu-btn)) .head-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-left: 0;
    width: 100%;
    order: 3;
  }
  .head-inner:not(:has(.menu-btn)) .head-nav a { font-size: 12.5px; }

  .hero { padding-top: 20px; }
  .hero p { font-size: 14px; }
  .studio { padding-top: 18px; }

  .toolbar { gap: 10px; }
  .type-switch { width: 100%; justify-content: space-between; }
  .type-switch button { flex: 1; justify-content: center; padding: 10px 8px; font-size: 13px; }
  .toolbar-actions { margin-left: 0; width: 100%; }
  .toolbar-actions .btn-ghost { flex: 1; justify-content: center; }

  .controls { display: flex; flex-direction: column; gap: 12px; }
  .preview { min-height: 240px; }
  .proof-frame { padding: 12px; }
  .stops-list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stop-row { grid-template-columns: 16px 38px 1fr 12px 34px; gap: 7px; padding: 7px 8px; }
  .code-head { padding: 10px 12px; gap: 10px; }
  .code-tabs { width: 100%; }
  .code-tabs button { flex: 1; text-align: center; padding: 9px 8px; }
  .code-meta { margin-left: 0; width: 100%; justify-content: space-between; }
  .code-body { padding: 14px 12px; }
  .code-body code { font-size: 11.5px; }
  .foot-inner { grid-template-columns: 1fr; gap: 22px; }
  .doc { padding-top: 36px; }
  .doc h2 { font-size: 23px; }
  .cheat-table { display: block; overflow-x: auto; }
}

@media (hover: none) {
  /* 触屏无 hover：关键控件常显 */
  .stop-handle { box-shadow: 0 2px 8px rgba(0, 0, 0, .38), 0 0 0 1.5px rgba(0, 0, 0, .3); }
  .preset-item:hover { transform: none; }
}

@media (max-width: 400px) {
  .stops-list { grid-template-columns: 1fr; }
  .type-switch button { font-size: 12px; gap: 5px; }
  .type-switch button svg { display: none; }
  .dial { width: 156px; height: 156px; }
  .copy-btn { width: 100%; }
}
