/* ============================================================
   365Lab 图云 - 自行生成  |  Global Stylesheet
   Modern, responsive, SEO-friendly, light/dark aware
   © 2026 365Lab · 官方站点 https://ImageCloud.365Lab.top · 保留所有权利
   ============================================================ */

:root {
  --brand-1: #4f46e5;
  --brand-2: #7c3aed;
  --brand-text: #4f46e5;
  --ok-text: #166534;
  --brand-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --text: #1f2430;
  --text-soft: #5b6273;
  --text-faint: #656c7a;
  --border: #e6e9f2;
  --border-strong: #d3d8e6;
  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 1px 3px rgba(20, 24, 40, .06), 0 1px 2px rgba(20, 24, 40, .04);
  --shadow-md: 0 6px 20px rgba(31, 36, 64, .08);
  --shadow-lg: 0 18px 50px rgba(31, 36, 64, .14);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --maxw: 1200px;
  --header-h: 64px;
  /* Progressive-enhancement fallbacks. Each is declared *before* its color-mix() twin,
     so browsers without color-mix()/inset still render a legible, correctly sized UI. */
  --header-bg: rgba(255, 255, 255, .88);
  --overlay-bg: rgba(255, 255, 255, .74);
  --font: "Segoe UI", system-ui, -apple-system, "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0f1220;
  --surface: #181c2e;
  --surface-2: #1f2438;
  --text: #eef1f8;
  --text-soft: #b6bdd1;
  --text-faint: #7f879e;
  --brand-text: #9b94ff;
  --ok-text: #4ade80;
  --border: #2a3048;
  --border-strong: #3a425e;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .4);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55);
  --header-bg: rgba(24, 28, 46, .88);
  --overlay-bg: rgba(24, 28, 46, .74);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 2px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }
.container > .container { padding: 0; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand-grad); color: #fff; border: none; box-shadow: 0 8px 22px rgba(79, 70, 229, .35); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(79, 70, 229, .45); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 18px; line-height: 1;
  transition: background .2s, box-shadow .2s, border-color .2s;
}
.icon-btn:hover { box-shadow: var(--shadow-md); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn svg { width: 18px; height: 18px; display: block; }

/* CTA 面板：沉稳品牌色块，替代刺眼的整幅渐变横幅（去 AI 味） */
.cta {
  text-align: center;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--brand-1) 7%, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 42px 24px;
  box-shadow: var(--shadow-md);
}
.cta h2 { margin: 0 0 14px; }
.cta p { color: var(--text-soft); max-width: 560px; margin: 0 auto 22px; font-size: 15px; }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--header-bg); /* fallback: no color-mix */
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 14px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: .2px; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-grad); display: grid; place-items: center; color: #fff; font-size: 17px; box-shadow: 0 4px 12px rgba(79,70,229,.4); }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--text-faint); letter-spacing: .3px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-soft); transition: background .2s, color .2s; }
.nav-links a:hover { background: var(--surface-2); color: var(--text); }
.nav-links a.active { color: var(--brand-text); background: rgba(79, 70, 229, .12); background: color-mix(in srgb, var(--brand-1) 12%, transparent); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 6px; }
.lang-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch button { border: none; background: transparent; padding: 7px 12px; font-size: 13px; font-weight: 700; color: var(--text-soft); }
.lang-switch button.active { background: var(--brand-grad); color: #fff; }
.hamburger { display: none; }

/* ---------------- Hero ---------------- */
.hero { padding: 56px 0 30px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; top: -40%; right: 0; bottom: auto; left: 0; inset: -40% 0 auto 0; height: 520px; z-index: -1;
  background: radial-gradient(60% 60% at 50% 0%, rgba(79, 70, 229, .18), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, rgba(124, 58, 237, .2), transparent 70%);
  background: radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--brand-1) 18%, transparent), transparent 70%),
              radial-gradient(50% 50% at 80% 10%, color-mix(in srgb, var(--brand-2) 20%, transparent), transparent 70%);
  filter: blur(8px);
}
.hero h1 { font-size: clamp(28px, 5vw, 46px); line-height: 1.15; margin: 0 0 14px; letter-spacing: -.5px; }
.hero h1 .grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(15px, 2vw, 19px); color: var(--text-soft); max-width: 720px; margin: 0 auto 26px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 30px; color: var(--text-faint); font-size: 13px; }
.hero-stats b { display: block; font-size: 22px; color: var(--text); font-weight: 800; }

/* ---------------- Sections ---------------- */
.section { padding: 46px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.section-head h2 { font-size: clamp(22px, 3.4vw, 32px); margin: 0 0 10px; letter-spacing: -.3px; }
.section-head h1 { font-size: clamp(22px, 3.4vw, 32px); margin: 0 0 10px; letter-spacing: -.3px; }
.section-head p { color: var(--text-soft); margin: 0; }

.grid-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
/* R104: 场景卡一行两列变体（about「适合用在哪」，用户定稿）；窄屏回落单列 */
.grid-cards.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .grid-cards.grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .25s ease, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(79, 70, 229, .12); background: color-mix(in srgb, var(--brand-1) 12%, transparent); color: var(--brand-text); margin-bottom: 14px; }
.card .ico svg { width: 28px; height: 28px; }
.card h2, .card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--text-soft); font-size: 14px; }

.feature-list { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .tick { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; background: rgba(79, 70, 229, .12); background: color-mix(in srgb, var(--brand-1) 12%, transparent); color: var(--brand-text); display: grid; place-items: center; }
.feature .tick svg { width: 20px; height: 20px; }
.feature h4 { margin: 2px 0 4px; font-size: 15px; }
.feature p { margin: 0; font-size: 13px; color: var(--text-soft); }

/* ---------------- FAQ ---------------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; transition: border-color .2s; }
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--brand-text); transition: transform .2s; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 18px 18px; color: var(--text-soft); font-size: 14px; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0 26px; margin-top: 40px; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1.5fr repeat(3, 1fr); }
.footer-grid h5 { margin: 0 0 12px; font-size: 14px; }
.footer-grid a { display: block; color: var(--text-soft); font-size: 13px; padding: 4px 0; transition: color .2s; }
.footer-grid a:hover { color: var(--brand-text); }
.footer-about p { font-size: 13px; color: var(--text-soft); }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--text-faint); font-size: 12px; }

/* ---------------- Tool layout ---------------- */
.tool-wrap { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-controls { padding: 16px; max-height: calc(100vh - 100px); overflow: auto; position: sticky; top: 84px; }
.panel-stage { padding: 16px; min-width: 0; }

.tool-head { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; flex-wrap: wrap; }
.tool-head .badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(79, 70, 229, .12); background: color-mix(in srgb, var(--brand-1) 12%, transparent); color: var(--brand-text); }
.tool-head .badge svg { width: 16px; height: 16px; }
.tool-head h1 { font-size: 22px; margin: 0; }
.tool-head p { margin: 0; color: var(--text-soft); font-size: 14px; }

.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: var(--text); }
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

input[type="text"], input[type="number"], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); font-size: 14px; font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
/* Fallback first: this rule sets outline:none, so if the color-mix() box-shadow is dropped
   the control would have NO visible focus indicator (WCAG 2.4.7). */
input:focus, textarea:focus, select:focus { border-color: var(--brand-1); box-shadow: 0 0 0 3px rgba(79, 70, 229, .18); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-1) 18%, transparent); outline: none; }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%23656c7a' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

input[type="range"] { width: 100%; accent-color: var(--brand-1); }

input[type="color"] { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); cursor: pointer; }
input[type="file"] { font-size: 13px; }

/* ============================================================
   R47 控件改版：滑动条 / 颜色「文字 + 控件 + 数值 / 代码」同行，
   相关功能用分组框（field-group）归拢，便于直观理解。增量叠加，
   不改动既有 .field / .range-row / .row2 规则。
   ============================================================ */
.field-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 4px;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--surface-2) 55%, var(--surface));
}
.field-group > .fg-title {
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--text-faint); margin: 0 0 10px;
}
/* 文字 + 滑块 + 数字输入，单行 */
.ctl-row { display: flex; align-items: center; gap: 10px; }
.ctl-label { flex: 0 0 92px; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.35; }
.ctl-row .slider { flex: 1 1 auto; min-width: 80px; }
.ctl-row .num {
  flex: 0 0 66px; width: 66px; text-align: center;
  padding: 7px 4px; font-size: 13px; font-weight: 600;
}
/* 上下箭头仅聚焦输入框时显示：默认隐藏 spinner，聚焦恢复 */
input.num::-webkit-outer-spin-button,
input.num::-webkit-inner-spin-button { -webkit-appearance: none; opacity: 0; margin: 0; }
input.num:focus::-webkit-outer-spin-button,
input.num:focus::-webkit-inner-spin-button { -webkit-appearance: auto; opacity: 1; }
input.num { -moz-appearance: textfield; }
input.num:focus { -moz-appearance: number-input; }
/* 文字 + 色块 + 颜色代码，单行 */
.ctl-row .swatch { flex: 0 0 44px; width: 44px; height: 34px; padding: 2px; }
.ctl-row .hex {
  flex: 0 0 96px; width: 96px; text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; letter-spacing: .02em;
}
/* 窄屏：标签换到上方，控件占满整行 */
@media (max-width: 420px) {
  .ctl-row { flex-wrap: wrap; }
  .ctl-label { flex: 1 1 100%; }
  .ctl-row .slider { flex: 1 1 auto; min-width: 0; }
  .ctl-row .num, .ctl-row .hex { flex: 0 0 84px; width: 84px; }
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--text-soft); transition: all .15s; }
.chip:hover { border-color: var(--brand-1); color: var(--brand-text); }
.chip.active { background: var(--brand-grad); color: #fff; border-color: transparent; }
.chip:active { transform: translateY(1px); }

.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; flex-wrap: wrap; background: var(--surface-2); }
.seg button { border: none; background: transparent; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--text-soft); }
.seg button.active { background: var(--brand-grad); color: #fff; }
/* State tick for toggle buttons (e.g. icon-cloud "invert"). It lives in its own node
   so re-translating the button never wipes the on/off indicator. */
.tick { margin-left: 6px; }

/* Stage / canvas
   Round 16 (CLS): the preview box height is LOCKED. --stage-h drives both the
   stage min-height and the canvas max-height (minus padding 14px*2 + border
   1px*2 = 30px), so swapping placeholder -> canvas can never grow the box.
   Measured before this fix: +0.079 (grid) / +0.066 (crop) / +0.048 (pixel) CLS
   on upload, attributed to .site-footer + .stage-actions being pushed down. */
.stage { position: relative; background:
  linear-gradient(45deg, var(--surface-2) 25%, transparent 25%) 0 0/20px 20px,
  linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%) 0 10px/20px 20px,
  linear-gradient(45deg, transparent 75%, var(--surface-2) 75%) 10px -10px/20px 20px,
  linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%) -10px 0/20px 20px,
  var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center;
  --stage-h: clamp(320px, 66vh, 720px);
  min-height: 320px;
  min-height: var(--stage-h);
  padding: 14px;
}
.stage canvas { max-width: 100%; max-height: calc(var(--stage-h, 320px) - 30px); width: auto; height: auto; border-radius: 8px; box-shadow: var(--shadow-md); }
.stage .placeholder { color: var(--text-faint); text-align: center; font-size: 14px; padding: 30px; }
.stage-hint {
  position: absolute; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  padding: 7px 14px;
  font-size: 13px; font-weight: 500;
  color: #fff;
  background: rgba(15, 20, 32, 0.72);
  border-radius: 999px;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
  backdrop-filter: blur(2px);
}
[data-theme="dark"] .stage-hint { background: rgba(0, 0, 0, 0.65); }
.stage-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }

/* base dropzone uploaded preview */
.drop-preview {
  max-height: 120px; max-width: 100%;
  border-radius: var(--radius-xs);
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
  box-shadow: var(--shadow-sm);
}
.drop-done {
  font-size: 12px;
  color: var(--text-soft);
}
.drop-done::before {
  content: "✓ ";
  color: var(--ok);
  font-weight: 700;
}
.stage-meta { font-size: 12px; color: var(--text-faint); margin-left: auto; }

.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--text-soft); transition: all .2s; cursor: pointer; background: var(--surface-2); }
.dropzone.drag { border-color: var(--brand-1); background: rgba(79, 70, 229, .08); background: color-mix(in srgb, var(--brand-1) 8%, transparent); color: var(--brand-text); }
.dropzone:hover { border-color: var(--brand-1); background: rgba(79, 70, 229, .05); background: color-mix(in srgb, var(--brand-1) 5%, transparent); }
.dropzone small { display: block; color: var(--text-faint); margin-top: 6px; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); position: relative; }
.thumb-wrap { position: relative; }
.thumb-wrap .rm { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--danger); color: #fff; border: none; font-size: 12px; line-height: 1; display: grid; place-items: center; }

/* Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow: auto; }
.tabs button { border: none; background: transparent; padding: 10px 14px; font-size: 14px; font-weight: 700; color: var(--text-faint); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--brand-text); border-bottom-color: var(--brand-text); }
.tabs button:hover { color: var(--brand-text); }
.tabs button:active { color: var(--brand-text); }

/* Spinner + Toast */
/* The border shorthand must have a fallback: if color-mix() is unsupported the whole
   declaration is dropped, leaving no border at all (an invisible spinner). */
.spinner { width: 22px; height: 22px; border: 3px solid rgba(79, 70, 229, .3); border: 3px solid color-mix(in srgb, var(--brand-1) 30%, transparent); border-top-color: var(--brand-1); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Fallbacks first: without them an old browser gets an unpositioned, fully transparent
   overlay, i.e. the progress text sits unreadable on top of the busy canvas. */
.overlay-loading { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; background: var(--overlay-bg); background: color-mix(in srgb, var(--surface) 70%, transparent); display: grid; place-items: center; gap: 10px; color: var(--text-soft); font-size: 13px; border-radius: var(--radius); }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: #1f2430; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .25s; z-index: 200; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: #15803d; }
.toast.err { background: #dc2626; }

/* Breadcrumb */
.crumbs { font-size: 13px; color: var(--text-faint); padding: 14px 0 0; }
.crumbs a:hover { color: var(--brand-text); }
/* R21: WCAG 2.5.8 touch targets — inline elements: vertical padding expands the
   hit area (border box) WITHOUT affecting the line box => zero visual/CLS change.
   .crumbs a  17px -> 25px;  about .card p a  19px -> 25px  (>= 24px) */
.crumbs a { padding: 4px 0; }
.card p a { padding: 3px 0; }

/* Responsive */
@media (max-width: 920px) {
  .tool-wrap { grid-template-columns: 1fr; }
  .panel-controls { position: static; max-height: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  /* No-JS fallback: keep the links in the flow (stacked, visible) so the menu stays
     reachable when the toggle script never runs. The drawer below is JS-gated. */
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav-links { position: fixed; top: var(--header-h); right: 0; bottom: auto; left: 0; inset: var(--header-h) 0 auto 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px; box-shadow: var(--shadow-md); transform: translateY(-120%); transition: transform .25s ease; margin-left: 0; }
  .js .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px; }
  .js .hamburger { display: inline-flex; margin-left: auto; }
  .nav-actions { margin-left: 0; }
  .hero { padding: 38px 0 18px; }
}

/* ============================================================
   2026-09-03 美化轮：暗色深查 + 全局质感
   维度：滚动条 / 选区 / 背景深度 / 占位态 / 微交互
   增量叠加，不改动既有规则的选择器与特异性；
   无全局 transition 列表；无 translateY 入场动画（避免溢出闪烁）。
   ============================================================ */

/* 选区高亮（品牌色，light/dark 自适应） */
::selection { background: rgba(79, 70, 229, .28); background: color-mix(in srgb, var(--brand-1) 28%, transparent); color: var(--text); }

/* 自定义滚动条：控件面板(overflow:auto)与全站更精致，暗色更友好 */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* 背景深度：顶部双辉光，light/dark 自适应（fixed 不随内容滚动） */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 480px at 10% -12%, rgba(79, 70, 229, .07), transparent 60%),
    radial-gradient(820px 460px at 95% -8%, rgba(124, 58, 237, .06), transparent 60%);
  background-image:
    radial-gradient(900px 480px at 10% -12%, color-mix(in srgb, var(--brand-1) 7%, transparent), transparent 60%),
    radial-gradient(820px 460px at 95% -8%, color-mix(in srgb, var(--brand-2) 6%, transparent), transparent 60%);
  background-attachment: fixed;
}
[data-theme="dark"] body {
  background-image:
    radial-gradient(900px 520px at 12% -10%, rgba(79, 70, 229, .13), transparent 62%),
    radial-gradient(820px 480px at 92% -4%, rgba(124, 58, 237, .11), transparent 62%);
  background-image:
    radial-gradient(900px 520px at 12% -10%, color-mix(in srgb, var(--brand-1) 13%, transparent), transparent 62%),
    radial-gradient(820px 480px at 92% -4%, color-mix(in srgb, var(--brand-2) 11%, transparent), transparent 62%);
}

/* 工具页画布空态占位增强 */
.stage .placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 14px; }
.stage .placeholder::before { content: "\1F5BC"; font-size: 42px; opacity: .45; line-height: 1; }

/* 卡片图标微交互（scale 不引起容器溢出滚动条） */
.card .ico { transition: transform .2s ease, background .2s ease; }
.card:hover .ico { transform: scale(1.08); }

/* chips / 分段控件 悬浮柔和品牌底色 */
.chip:hover { background: var(--surface-2); background: color-mix(in srgb, var(--brand-1) 9%, var(--surface-2)); }
.seg button:not(.active):hover { background: rgba(79, 70, 229, .09); background: color-mix(in srgb, var(--brand-1) 9%, transparent); color: var(--brand-text); }
.seg button:active { transform: translateY(1px); }

/* 暗色下略微提升 faint 文本对比，改善小字可读性 */
[data-theme="dark"] { --text-faint: #8b93a8; }

/* 暗色主题一致性修复（2026-09-04 键盘/暗色轮） */
/* 1) 默认信息 toast 原背景 #1f2430 在暗色页 #0f1220 上对比度≈1.19，几乎不可见；
      提亮并加边框使其在暗色下清晰浮起（亮色页保持原深底，仍清晰）。 */
[data-theme="dark"] .toast { background: #262d52; border: 1px solid #8b95d8; }
/* 2) 键盘焦点环在暗色页上品牌紫约 2.9:1（略低于非文本对比 3:1），
      暗色下改用更亮的靛色，对比提升至 >3:1。 */
[data-theme="dark"] :focus-visible { outline-color: #9b94ff; }

/* ============================================================
   2026-09-03 可访问性轮：skip-link + 动效偏好降级
   ============================================================ */

/* 跳转到主内容：视觉隐藏，键盘聚焦时显现 */
.skip-link {
  position: fixed; left: 12px; top: -60px;
  background: var(--brand-1); color: #fff;
  padding: 9px 16px; border-radius: 8px; z-index: 1100;
  text-decoration: none; font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; outline: 2px solid var(--text); outline-offset: 2px; }

/* 尊重用户的「减少动态效果」系统偏好：关闭非必要动画/过渡 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   2026-09-04 性能轮（Web Vitals / CLS）：预览区高度锁定
   桌面 stage 高度 = clamp(320px, 66vh, 720px)；窄屏视口高度占比过高会
   挤掉控件面板，故在 920px 断点下收敛为 clamp(240px, 44vh, 400px)。
   canvas 上限随之联动（同一变量 -30px 预留 padding+border），
   保证「占位符 → 画布」切换时 stage 高度不变、页脚不被下推。
   ============================================================ */
@media (max-width: 920px) {
  .stage { --stage-h: clamp(240px, 44vh, 400px); }
}

/* 双语等高预留：英文文案比中文长，.hero p.lead 在桌面占 3 行（91px）而中文
   占 2 行（61px），I18N.apply() 替换时会把整页下推 30px（实测 CLS 0.0976）。
   按「较长语言的行数」预留高度后，中英文 hero 高度完全一致，切换零位移。
   单位用 em，随 clamp() 字号自适应；中文下多出的留白落在 lead 下方，居中布局无感。 */
.hero p.lead { line-height: 1.5; min-height: 4.5em; }
/* 手机端（≤560px）英文 h1 换行成 2 行（64px）而中文 1 行（32px），同样预留 */
@media (max-width: 560px) {
  .hero h1 { min-height: 2.3em; }
  .footer-grid { grid-template-columns: 1fr; }
  /* English tab labels run ~60% longer than the Chinese ones: at 360px three
     nowrap tabs overflow the panel and the last one scrolls out of reach. Let them
     wrap instead of forcing a horizontal scroll. */
  .tabs { flex-wrap: wrap; }
  .tabs button { flex: 1 1 auto; }
}

/* 滚动条槽位常驻：页面高度在「视口临界点」上下浮动时（如 iconcloud），
   滚动条的出现/消失会让可视宽度骤减 ~15px，使 header 内元素与控件换行重排，
   产生一整页位移（实测残留 CLS 0.0052）。常驻槽位后宽度恒定，重排消失。
   渐进增强：不支持的浏览器忽略该声明，行为与原先一致。 */
html { scrollbar-gutter: stable; }

/* ============================================================
   R26 (2026-09-20): 返回顶部 FAB + 打印输出优化
   ============================================================ */

/* 返回顶部浮动按钮（全局，长页导航增强；屏幕控件，打印隐藏） */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 150;
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: var(--brand-grad); color: #fff; font-size: 20px; line-height: 1;
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { box-shadow: 0 14px 34px rgba(79, 70, 229, .5); }
.to-top:active { transform: translateY(1px); }
.to-top:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 3px; }

/* 打印专用注脚：屏幕隐藏，仅打印显示 */
.print-only { display: none; }

/* 打印输出优化：强制浅色高对比、剥离装饰与交互控件、保留正文与画布、
   外部链接补印 URL、避免孤行断段；修复 CTA 白字印白纸缺陷。 */
@media print {
  :root {
    --bg: #fff; --surface: #fff; --surface-2: #f4f5f8;
    --text: #111; --text-soft: #333; --text-faint: #555;
    --border: #ccc; --border-strong: #bbb;
    --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
  }
  html, body { background: #fff !important; color: #111 !important; }
  *, *::before, *::after { box-shadow: none !important; text-shadow: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* 隐藏非正文 chrome 与交互控件 */
  .site-header { position: static !important; background: #fff !important; border-bottom: 1px solid #ccc !important; }
  .nav-links, .nav-actions, .hamburger, .lang-switch, .icon-btn,
  .crumbs, .hero-cta, .hero-stats, .toast, .overlay-loading,
  .dropzone, .tabs, .stage-actions, .skip-link, .to-top,
  .footer-grid a, .hero::before { display: none !important; }

  /* CTA 区块：沉稳品牌色块，打印改浅底深字 + 描边，避免按钮留白；隐藏内部按钮 */
  .cta { background: #fff !important; color: #111 !important; border: 1px solid #ccc !important; box-shadow: none !important; }
  .cta h2 { color: #111 !important; }
  .cta .btn { display: none !important; }

  /* 页脚简化为版权行 */
  .site-footer { background: #fff !important; border-top: 1px solid #ccc !important; }
  .footer-grid { display: block !important; }
  .footer-bottom { border-top: 1px solid #ccc !important; }

  /* 工具页：隐藏交互控件面板（纸上无用），仅保留结果画布；画布区不再预留视口高度 */
  .panel-controls { display: none !important; }
  .tool-wrap { grid-template-columns: 1fr !important; }
  .panel, .stage { box-shadow: none !important; }
  .stage { background: #fff !important; border: 1px solid #ccc !important; min-height: 0 !important; padding: 8px; }
  .stage canvas { box-shadow: none !important; max-height: none !important; }

  /* 卡片/列表：双列、避免段落内断裂 */
  .grid-cards, .feature-list { grid-template-columns: 1fr 1fr !important; }
  .card, .feature, .faq details { break-inside: avoid; border: 1px solid #ccc !important; }

  /* 链接：正文可点；外部链接补印 URL */
  a { color: #111 !important; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 10px; color: #555; word-break: break-all; }

  /* 排版：避免孤行/孤字 */
  h1, h2, h3, h4, p, blockquote, pre, img, figure, table, ul, ol, dl, details { orphans: 3; widows: 3; }

  /* 打印专用页脚注 */
  .print-only { display: block !important; margin-top: 18px; padding-top: 8px; border-top: 1px solid #ccc; font-size: 11px; color: #555; }
}

/* ============================================================
   R27 无障碍深化：WCAG 2.1 AA 对比度合规（增量叠加，不改既有规则）
   - --text-faint 浅色由 #8a91a3(≈3.0:1) → #656c7a(≥4.75:1)：修复提示、
     面包屑、页脚、占位、参数说明等小字对比度不足（AA 需 4.5:1）。
   - 新增 --brand-text：深色主题下品牌色作为文字/指示器改用更亮紫罗兰
     #9b94ff（原 #4f46e5 在深色底上仅 ≈2.7:1）；浅色取值等同 --brand-1，视觉零变化。
   - 新增 --ok-text（浅 #166534 / 深 #4ade80）供勾选项使用。
   - 品牌渐变为双色 indigo→violet（已去除青色尾端），其上白色文字在最亮处
     ≈5.5:1，叠加柔和文字阴影进一步保证可读性；打印时由 print 块 text-shadow:none 剥离。
   ============================================================ */
::placeholder { color: var(--text-soft); opacity: 1; }
::-webkit-input-placeholder { color: var(--text-soft); opacity: 1; }
.btn-primary, .brand .logo, .chip.active, .seg button.active, .lang-switch button.active {
  text-shadow: 0 1px 2px rgba(15, 18, 32, .38);
}

/* ============================================================
   R35 视觉打磨 / 暗色完整性 — 增量叠加层（append-only）
   不修改任何既有规则；仅新增令牌与后置覆盖。
   ============================================================ */

/* ---- 新增令牌 ---- */
:root {
  --lh-display: 1.22;   /* h1 / h2 大标题 */
  --lh-heading: 1.40;   /* h3 / h4 / h5   */
  --pad-card: 18px;
  --radius-md: 12px;
  --radius-xs: 8px;
  --glow-brand: 0 8px 22px rgba(79, 70, 229, .35);
  --glow-brand-lg: 0 12px 30px rgba(79, 70, 229, .45);
  --glow-brand-sm: 0 4px 12px rgba(79, 70, 229, .40);
  /* 棋盘格专用：不动 --surface-2，避免波及全站 */
  --chk-a: #ffffff;
  --chk-b: #e8ebf2;
  color-scheme: light dark;
}
[data-theme="dark"] {
  --ok: #22c55e;
  --danger: #f2555c;          /* 白字对比由 3.76 → 4.6:1 */
  --chk-a: #1b2033;
  --chk-b: #2a3250;
  color-scheme: dark;          /* 原生 select 弹层 / range / color / number spinner 暗色化 */
}

/* #1 标题行高与层级递进（32px 大标题原继承 1.6，严重松散） */
h1, h2 { line-height: var(--lh-display); }
h3, h4, h5 { line-height: var(--lh-heading); }
.card h2 { font-size: 20px; }
.card h3 { font-size: 17px; }

/* #2 ★ 加载遮罩内容被 grid 拉散到对角
   grid 默认 align-content:normal ≡ stretch，会把 auto 行等分拉伸填满容器，
   于是 spinner 停在 25% 高度、进度文字停在 75% 高度，gap 完全失效。 */
.overlay-loading {
  align-content: center;
  grid-auto-rows: min-content;
}

/* #3 ★ 暗色输入框焦点指示（原 1.14~2.44:1，暗色下几乎看不出焦点）
   --brand-text 暗色 = #9b94ff，对输入框底 --surface-2 达 5.90:1。 */
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
  border-color: var(--brand-text);
  box-shadow: 0 0 0 3px rgba(155, 148, 255, .45);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-text) 45%, transparent);
}
[data-theme="dark"] .to-top:focus-visible { outline-color: var(--brand-text); }

/* #4 ★ 暗色 toast 找回语义色
   原 [data-theme="dark"] .toast 与 .toast.ok 同特异性且更靠后，把成功/失败
   一律抹成深藏青。必须在那条之后、特异性 ≥ (0,2,0)。 */
[data-theme="dark"] .toast.ok { background: var(--ok); border-color: transparent; }
[data-theme="dark"] .toast.err { background: var(--danger); border-color: transparent; }

/* #5 select 下拉箭头：原 #656c7a 在暗色下仅 2.91:1（data-URI 不支持 var，整条替换） */
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%23b6bdd1' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
}

/* #6 ★ 舞台棋盘格改专用令牌：原两主题均仅 ~1.10:1，透明区完全不可辨 */
.stage {
  background:
    linear-gradient(45deg, var(--chk-b) 25%, transparent 25%) 0 0/20px 20px,
    linear-gradient(-45deg, var(--chk-b) 25%, transparent 25%) 0 10px/20px 20px,
    linear-gradient(45deg, transparent 75%, var(--chk-b) 75%) 10px -10px/20px 20px,
    linear-gradient(-45deg, transparent 75%, var(--chk-b) 75%) -10px 0/20px 20px,
    var(--chk-a);
}

/* #7 ★ 英文态 tab 在桌面端溢出 340px 控件面板（iconcloud 第三个 tab 完全不可达）
   依赖 head 内联脚本写入的 <html class="lang-en"> */
html.lang-en .panel-controls .tabs { flex-wrap: wrap; overflow: visible; }
html.lang-en .panel-controls .tabs button { padding: 10px 11px; flex: 0 1 auto; }

/* #8 主题切换「同频」过渡：原先只有 body 的 bg/color 渐变，卡片/面板瞬时跳变，
   观感上就是「背景还在渐变、白色卡片已经翻黑」的分层闪烁。 */
[data-theme] .card,
[data-theme] .panel,
[data-theme] .stage,
[data-theme] .site-header,
[data-theme] .site-footer,
[data-theme] .thumbs,
[data-theme] .overlay-loading {
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
@media (prefers-reduced-motion: reduce) {
  [data-theme] .card, [data-theme] .panel, [data-theme] .stage,
  [data-theme] .site-header, [data-theme] .site-footer,
  [data-theme] .thumbs, [data-theme] .overlay-loading { transition-duration: .001ms; }
}

/* #9 toast 解 50vw 上限：fixed + left:50% 会把 shrink-to-fit 锁死在 50vw，
   360px 手机上最宽仅 180px，长提示挤成窄高条。 */
.toast { width: max-content; max-width: min(92vw, 480px); }

/* #10 同族控件组间距对齐 */
.tabs { gap: 8px; }
.faq summary { padding: var(--pad-card); }
.faq .answer { padding: 0 var(--pad-card) var(--pad-card); }

/* #11 圆角/阴影取值令牌化 */
.toast { border-radius: var(--radius-md); }
.card .ico { border-radius: var(--radius); }
.feature .tick { border-radius: var(--radius-sm); }
.nav-links a, .brand .logo, .thumb, input[type="color"], .stage canvas, .skip-link {
  border-radius: var(--radius-xs);
}
.btn-primary { box-shadow: var(--glow-brand); }
.btn-primary:hover { box-shadow: var(--glow-brand-lg); }
.brand .logo { box-shadow: var(--glow-brand-sm); }

/* #12 透明 PNG 缩略图原本直接透出面板底色，看不出透明区 */
.thumb { background: var(--surface-2); }

/* #13 长串防御（超长文件名/报错文案撑破容器） */
.stage-meta, .hint, .field > label, .dropzone, .card p, .feature p { overflow-wrap: anywhere; }

/* #14 label 内 .hint 是 <span> 时保持行内，margin-top 被忽略且黏在标签文字后 */
.field > label > .hint { display: block; margin-top: 4px; font-weight: 400; }

/* #15 面板内动态文本预留行高，消除上传/生成时的布局跳动 */
.field > .hint:empty { min-height: 1.35em; }
.thumbs:empty { display: none; }

/* #16 R35 功能增强配套样式 */
/* 画布过期徽标（mosaic 改参数未重新生成时提示，避免导出旧位图） */
.stale-badge {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 999px;
  padding: 3px 10px;
}
[data-theme="dark"] .stale-badge {
  color: #fde68a;
  background: rgba(245, 158, 11, .16);
  border-color: #f59e0b;
}
.is-stale .stale-badge { display: inline-flex; }
.is-stale #ms-gen, .is-stale #ms-gen2 { animation: stale-pulse 1.6s ease-in-out infinite; }
@keyframes stale-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .5); }
  50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .is-stale #ms-gen, .is-stale #ms-gen2 { animation: none; }
}
@media print { .stale-badge { display: none !important; } }

/* ============================================================
   R36 (2026-10-17) — 触控达标 / 安全区 / 焦点韧性
   维度：WCAG 2.5.8 目标尺寸 · 移动端往返 · 强制颜色模式
   纯增量叠加：不改写既有规则的选择器与取值。
   ============================================================ */

/* #1 删除缩略图的 × 只有 18x18px —— 低于 WCAG 2.5.8 的 24px 底线，
      且是破坏性操作（直接 splice，无撤销）。放大到 24px 视觉，
      再用透明伪元素把命中区撑到 44px；视觉权重基本不变。 */
.thumb-wrap .rm { width: 24px; height: 24px; top: -8px; right: -8px; }
.thumb-wrap .rm::after {
  content: ""; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
}
/* 命中区变大后需要更多间隙，否则相邻缩略图的删除热区会互相压住 */
.thumbs { gap: 14px; }

/* #2 图标按钮 40px < 44px，且作为 flex item 在 320px 窄屏会被压到 min-content
      （emoji 宽度 ~20px）。固定不收缩。 */
.icon-btn { flex: 0 0 auto; }

/* #3 粗指针设备（手机/平板）统一放大命中区；桌面视觉完全不变。 */
@media (pointer: coarse) {
  .chip, .seg button, .lang-switch button, .btn-sm { padding-block: 12px; }
  .icon-btn { width: 44px; height: 44px; }
  input[type="color"] { width: 64px; height: 44px; padding: 3px; }
  .footer-grid a { padding: 8px 0; }
  .crumbs a { padding: 8px 2px; margin: 0 -2px; }
  .chips { gap: 10px; }
}

/* #4 滑块：UA 默认可拖带只有 ~20px 高。撑到 44px 命中带（轨道仍由 UA 垂直
      居中绘制，视觉不变），并声明 touch-action 让纵向划动归还给页面滚动。 */
input[type="range"] { height: 44px; touch-action: pan-y; }

/* #5 刘海屏 / Home Indicator 安全区。当前 viewport 未开 viewport-fit=cover，
      所以是防御性预留；一旦开启即生效，避免回到顶部按钮被横条压住。 */
.to-top { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: calc(18px + env(safe-area-inset-right, 0px)); }
.toast { bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
.site-header { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }

/* #6 toast 与回到顶部按钮在窄屏几何重叠（toast z-index 200 > 150，
      导出成功的提示正好盖住按钮）。窄屏把 toast 抬到按钮之上。 */
@media (max-width: 920px) {
  .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* #7/R88 移动端：动作条与下载入口随画布顶部吸附滚动，始终点得到。 */
@media (max-width: 920px) {
  .tool-wrap .stage-top {
    position: sticky; top: calc(var(--header-h) + 6px); z-index: 90;
    background: var(--surface);
    padding: 8px 0;
  }
}

/* #8 分段控件：999px 圆角 + overflow:hidden + flex-wrap 三者叠加，
      一旦窄屏/英文态换行成两行就会把两排按钮塞进一个胶囊里严重裁切。 */
@media (max-width: 560px) {
  .seg { border-radius: var(--radius-sm); width: 100%; }
  .seg button { flex: 1 1 auto; padding: 12px 10px; }
}

/* #9 关闭态的汉堡抽屉只是 translateY(-120%)，链接仍在无障碍树与 Tab 序列中，
      键盘/读屏会跳进一个看不见的菜单。用 visibility 真正摘除。 */
@media (max-width: 920px) {
  .js .nav-links { visibility: hidden; transition: transform .25s ease, visibility .25s ease; }
  .js .nav-links.open { visibility: visible; }
}

/* #10 去掉移动端点按的系统高亮（在品牌渐变按钮上尤其突兀），
       改用轻微缩放作为触控反馈（1px 位移在指尖遮挡下几乎不可见）。 */
.btn, .btn-sm, .chip, .seg button, .icon-btn, .to-top, .tabs button,
.nav-links a, .thumb-wrap .rm, .dropzone {
  -webkit-tap-highlight-color: transparent;
}
@media (pointer: coarse) {
  .btn:active, .btn-sm:active, .chip:active, .seg button:active, .tabs button:active { transform: scale(.97); }
}

/* #11 withBusy 不再使用 disabled（那会把焦点丢回 body 且 aria-busy 不会被播报），
       改为 aria-disabled + .is-busy。这里补上等效的视觉与指针屏蔽。 */
.is-busy { pointer-events: none; cursor: progress; }
.btn.is-busy, .btn-sm.is-busy { filter: saturate(.55); }
.dropzone.is-busy { opacity: .7; }

/* #12 Windows 高对比度会剥离 box-shadow，而输入控件的焦点指示正是靠
       box-shadow 兜底（outline:none）—— 此时焦点环归零，违反 WCAG 2.4.7。 */
@media (forced-colors: active) {
  input:focus, textarea:focus, select:focus,
  .btn:focus, .btn-sm:focus, .chip:focus, .seg button:focus,
  .icon-btn:focus, .dropzone:focus, .to-top:focus, .tabs button:focus {
    outline: 2px solid CanvasText; outline-offset: 2px;
  }
  .is-busy { filter: none; opacity: 1; }
  .stale-badge { border: 1px solid CanvasText; }
}

/* ============================================================
   R39 (2026-10-17) — 首页视觉调整：工具卡片标题右置 + 特性卡片三列
   纯增量叠加：不修改既有规则，仅覆盖/追加。
   ============================================================ */

/* #1 工具卡片：图标与标题横向并排，描述与按钮保持纵向 */
.card { display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.card .ico { margin-bottom: 0; }
.card h2, .card h3 { margin: 0; }
.card p { margin: 0 0 6px; }

/* #2 特性卡片：强制 3 列，并增加卡片式包裹 */
.feature-list { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature .tick {
  flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--brand-grad); color: #fff;
  font-size: 18px; box-shadow: var(--glow-brand-sm);
}
.feature h3 { margin: 2px 0 6px; font-size: 16px; }
.feature p { font-size: 14px; line-height: 1.55; }

@media (max-width: 920px) {
  .feature-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .feature-list { grid-template-columns: 1fr; }
  .feature { padding: 18px; }
}

/* ============================================================
   R49 (2026-10-17) — 首页美化优化（增量叠加，不改既有规则）
   维度：Hero 视觉层次 / 工具卡片信息密度 / 三步引导 / FAQ 交互细节 / CTA 装饰
   策略：全部使用既有设计令牌（--brand-* / --surface / --border …），
         亮暗双主题自动适配；动画统一受 prefers-reduced-motion 保护。
   ============================================================ */

/* #1 Hero 徽章：品牌色 pill + 呼吸圆点（替代裸标题，建立视觉入口） */
.hero { padding: 68px 0 38px; }
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  color: var(--brand-text);
  background: rgba(79, 70, 229, .10);
  background: color-mix(in srgb, var(--brand-1) 10%, transparent);
  border: 1px solid rgba(79, 70, 229, .22);
  border: 1px solid color-mix(in srgb, var(--brand-1) 22%, transparent);
  border-radius: 999px; padding: 6px 14px; margin: 0 0 18px;
}
.hero-eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-grad); box-shadow: var(--glow-brand-sm);
  animation: eyebrow-pulse 2.4s ease-in-out infinite;
}
@keyframes eyebrow-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* #2 Hero 装饰贴图：漂浮的品牌色小方块（呼应「照片马赛克」主题），纯装饰 aria-hidden */
.hero-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-deco .tile {
  --rot: 0deg;
  position: absolute; border-radius: 12px;
  background: rgba(79, 70, 229, .14);
  background: color-mix(in srgb, var(--brand-1) 14%, transparent);
  border: 1px solid rgba(79, 70, 229, .20);
  border: 1px solid color-mix(in srgb, var(--brand-1) 20%, transparent);
  animation: tile-float 7s ease-in-out infinite;
}
.hero-deco .t1 { --rot: -8deg; width: 64px; height: 64px; top: 15%; left: 6%; }
.hero-deco .t2 { --rot: 10deg; width: 40px; height: 40px; top: 63%; left: 11%; animation-delay: -1.4s; }
.hero-deco .t3 { --rot: 6deg; width: 52px; height: 52px; top: 21%; right: 7%; animation-delay: -2.8s; }
.hero-deco .t4 { --rot: -12deg; width: 34px; height: 34px; top: 71%; right: 12%; animation-delay: -4.2s; }
.hero-deco .t5 { --rot: 14deg; width: 26px; height: 26px; top: 45%; left: 3%; animation-delay: -5.6s; }
.hero-deco .t6 { --rot: -4deg; width: 30px; height: 30px; top: 8%; right: 23%; animation-delay: -3.5s; }
@keyframes tile-float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--rot, 0deg)); }
}

/* #3 Hero 数据条：图标 + 双行文字装进卡片 pill，替代松散的三列纯文本 */
.hero-stats { gap: 12px; margin-top: 34px; }
.hero-stats .stat {
  display: flex; align-items: center; gap: 11px; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 18px;
  box-shadow: var(--shadow-sm);
}
.hero-stats .stat svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--brand-text); }
.hero-stats .stat b { display: block; font-size: 15px; line-height: 1.3; color: var(--text); font-weight: 800; }
.hero-stats .stat span { display: block; font-size: 12px; line-height: 1.35; color: var(--text-faint); }

/* #4 工具卡片：标签 chips 提升信息密度（R51：移除「立即使用 →」链接，整卡点击进工具） */
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.card .tag {
  font-size: 12px; font-weight: 600; color: var(--text-soft);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px;
}
#tools .card { padding: 26px; }
#tools .card .ico { width: 56px; height: 56px; }

/* #6 三步引导：编号圆徽 + 卡片，桌面端步骤间虚线连接 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px 22px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .25s ease, border-color .2s;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.step .num {
  position: absolute; top: -16px; left: 22px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-grad); color: #fff; font-size: 15px; font-weight: 800;
  display: grid; place-items: center; box-shadow: var(--glow-brand-sm);
}
.step h3 { margin: 8px 0 6px; font-size: 16px; }
.step p { margin: 0; font-size: 14px; color: var(--text-soft); }
@media (min-width: 921px) {
  .steps .step:not(:last-child)::after {
    content: ""; position: absolute; top: 42px; right: -10px; width: 4px; height: 4px;
    border-radius: 50%; background: var(--border-strong);
    box-shadow: 7px 0 0 var(--border-strong), 14px 0 0 var(--border-strong);
  }
}

/* #7 FAQ：加减号收进品牌色圆徽，展开时答案淡入 */
.faq summary::after {
  content: "+"; font-size: 17px; font-weight: 800; line-height: 1;
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  background: rgba(79, 70, 229, .10);
  background: color-mix(in srgb, var(--brand-1) 10%, transparent);
  color: var(--brand-text);
  transition: background .25s ease, transform .25s ease;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary::after { background: var(--brand-grad); color: #fff; }
.faq .answer { animation: faq-in .25s ease; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* #8 CTA 装饰：右下角三枚描边圆环，克制不抢内容 */
.cta { position: relative; overflow: hidden; }
.cta-deco span {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(79, 70, 229, .16);
  border: 1px solid color-mix(in srgb, var(--brand-1) 16%, transparent);
}
.cta-deco .d1 { width: 130px; height: 130px; right: -34px; bottom: -46px; }
.cta-deco .d2 { width: 84px; height: 84px; right: 42px; bottom: 22px; }
.cta-deco .d3 { width: 46px; height: 46px; right: 18px; top: 20px; }

/* #9 页脚顶际：品牌渐变细线收边 */
.site-footer { position: relative; }
/* #10 响应式：Hero 加高仅桌面；≤920px 撤除装饰贴图；三步引导竖排 */
@media (max-width: 560px) {
  .hero { padding: 44px 0 26px; }
  .hero-stats { margin-top: 26px; }
  .hero-stats .stat { padding: 9px 14px; }
}
@media (max-width: 920px) {
  .hero-deco { display: none; }
}
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .step { padding-top: 22px; }
  .step .num { position: static; display: inline-grid; margin-bottom: 10px; }
}

/* #11 动效敏感 / 打印：剥离纯装饰，保留全部文字内容 */
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow::before, .hero-deco .tile, .faq .answer { animation: none; }
}
@media print {
  .hero-deco, .cta-deco, .hero-eyebrow::before { display: none !important; }
  .section-head h2::after { display: none !important; }
}

/* ============================================================
   R50 (2026-10-17) — 工具页视觉打磨（增量叠加，不改既有规则）
   维度：tool-head 标题带 / dropzone 图标化 / 舞台占位 SVG 化
        （清除全站最后一块 emoji \1F5BC）/ 操作按钮图标化 / tabs 激活态
   策略：沿用 R49 设计令牌体系，亮暗双主题自动适配；
         pure-decoration 受 prefers-reduced-motion 与 print 保护。
   ============================================================ */

/* #1 tool-head 标题带：卡片式淡底 + 渐变图标徽章 + 右上装饰圆环 */
.tool-head {
  position: relative; overflow: hidden;
  background: var(--surface);
  background-image: linear-gradient(135deg,
    color-mix(in srgb, var(--brand-1) 7%, transparent), transparent 62%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 18px 0 20px;
  box-shadow: var(--shadow-sm);
}
.tool-head > * { position: relative; z-index: 1; }
.tool-head::before, .tool-head::after {
  content: ""; position: absolute; pointer-events: none;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--brand-1) 16%, transparent);
}
.tool-head::before { width: 150px; height: 150px; right: -40px; top: -58px; }
.tool-head::after { width: 88px; height: 88px; right: 58px; bottom: -44px; }
/* 徽章：小 pill → 46px 渐变图标章（与首页 feature .tick 同语言） */
.tool-head .badge {
  display: grid; place-items: center;
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 14px; padding: 0;
  font-size: 0; gap: 0;
  background: var(--brand-grad); color: #fff;
  box-shadow: var(--glow-brand-sm);
}
.tool-head .badge svg { width: 24px; height: 24px; }
.tool-head h1 { font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -.01em; line-height: 1.25; }
.tool-head p { margin-top: 4px; max-width: 780px; line-height: 1.6; }

/* #2 dropzone 图标化：上传图标置顶，hover/拖入时品牌色高亮 */
.dropzone { display: flex; flex-direction: column; align-items: center; }
.dz-ico {
  order: -1; width: 30px; height: 30px;
  margin-bottom: 8px;
  color: var(--text-faint); opacity: .75;
  transition: color .2s, opacity .2s, transform .2s;
}
.dropzone:hover .dz-ico,
.dropzone.drag .dz-ico { color: var(--brand-text); opacity: 1; transform: translateY(-2px); }

/* #3 舞台占位符：🖼 emoji (\1F5BC) → SVG 图形（R44 全站 SVG 化的最后一块拼图） */
.stage .placeholder::before {
  content: ""; width: 48px; height: 48px; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2.5'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.4' fill='%2394a3b8' stroke='none'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* #4 按钮图标化：生成/换一版/重置/下载 统一「图标 + 文字」居中排布 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ico { width: 16px; height: 16px; flex: 0 0 auto; }

/* #5 tabs 激活态：底部指示线之外补一层淡品牌底，选中更明确 */
.tabs button.active {
  background: color-mix(in srgb, var(--brand-1) 8%, transparent);
  border-radius: 10px 10px 0 0;
}

/* #6 响应式：窄屏撤除装饰圆环、收紧标题带与图标 */
@media (max-width: 560px) {
  .tool-head { padding: 18px; margin: 14px 0 16px; }
  .tool-head::before, .tool-head::after { display: none; }
  .dz-ico { width: 26px; height: 26px; margin-bottom: 6px; }
}

/* #7 动效敏感 / 打印：剥离纯装饰 */
@media (prefers-reduced-motion: reduce) {
  .dz-ico { transition: none; }
}
@media print {
  .tool-head::before, .tool-head::after { display: none !important; }
}

/* ── R55: 自定义模板 / 导出格式 / 水印 增量叠加层 ── */
/* 模板保存行：默认收起，点「＋ 保存」展开；输入框弹性占宽，按钮不缩 */
.tpl-save-row { display: none; align-items: center; gap: 8px; margin-top: 8px; }
.tpl-save-row.open { display: flex; }
.tpl-save-row input { flex: 1; min-width: 0; }

/* 「＋ 保存当前样式」chip：虚线框表示“创建新条目”，与实线模板 chip 区分 */
.chip-save { border-style: dashed; color: var(--brand-text); background: transparent; }
.chip-save:hover { background: color-mix(in srgb, var(--brand-1) 9%, transparent); }

/* 模板 chip 内嵌删除小钮（事件 stopPropagation，不会触发套用） */
.chip-del {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 6px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .18);
  color: #fff; font-size: 12px; line-height: 1; cursor: pointer;
}
.chip-del:hover { background: rgba(0, 0, 0, .38); }
.chip.active .chip-del { background: rgba(255, 255, 255, .28); }
.chip.active .chip-del:hover { background: rgba(255, 255, 255, .5); }

/* mosaic 的「删除此模板」独立 chip：选中用户模板时才显示 */
.chip-del-only { border-style: dashed; color: #c0392b; }
.chip-del-only:hover { border-color: #c0392b; background: color-mix(in srgb, #c0392b 9%, transparent); }

/* ── R56: 照片/贴图微调（变焦/镜像/滤镜强度）+ 缩略图拖拽排序 增量叠加层 ── */
/* 缩略图整体可拖：抓取光标暗示“可移动”，拖拽中的副本半透明区分层级 */
.thumb-wrap { cursor: grab; }
.thumb-wrap.dragging { opacity: .45; }
.thumb-wrap .rm { cursor: pointer; }
/* 缩略图区的提示文字独占一行（.thumbs 是 flex-wrap 容器） */
.thumbs .hint { flex-basis: 100%; }

/* ── R58: 内容页（常见问题/使用教程/关于/服务条款/隐私政策）增量叠加层 ── */
/* 关于页正文列：与 .faq 同宽，卡片纵向流 */
.prose-page { max-width: 820px; margin: 0 auto; }

/* R102: 对比表（compare.html 马赛克 vs 拼图）——语义化 table，利于 SEO；增量叠加不改既有卡片样式 */
.cmp-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.cmp-table caption { text-align: left; color: var(--text-faint); font-size: 13px; padding-bottom: 8px; }
.cmp-table th, .cmp-table td { padding: 11px 14px; border: 1px solid var(--border); text-align: left; vertical-align: top; line-height: 1.55; }
.cmp-table thead th { background: color-mix(in srgb, var(--brand-1) 10%, var(--surface)); color: var(--text); font-weight: 700; }
.cmp-table tbody th { width: 30%; color: var(--text); font-weight: 600; background: color-mix(in srgb, var(--brand-1) 4%, var(--surface)); }
.cmp-table tbody td { color: var(--text-body); }
/* R108: compare 对比表在 ≤480px（尤其英文）最小内容宽度会超出容器导致横向溢出。
   改 table-layout:fixed 锁定宽度并允许单元格断词换行；语义化 <table> 不变，SEO 不受影响。 */
.cmp-table { table-layout: fixed; }
.cmp-table thead th:first-child { width: 32%; }
.cmp-table th, .cmp-table td { word-break: break-word; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .cmp-table { font-size: 12.5px; }
  .cmp-table th, .cmp-table td { padding: 9px 9px; }
}
[data-theme="dark"] .cmp-table th, [data-theme="dark"] .cmp-table td { border-color: color-mix(in srgb, #fff 12%, transparent); }
[data-theme="dark"] .cmp-table thead th { background: color-mix(in srgb, var(--brand-1) 22%, #0f1220); }
[data-theme="dark"] .cmp-table tbody th { background: color-mix(in srgb, var(--brand-1) 12%, #0f1220); }
/* 反馈卡：品牌色淡底 + 品牌描边，从普通卡片中脱颖而出 */
.card-feedback {
  border-color: color-mix(in srgb, var(--brand-1) 35%, var(--border));
  background: color-mix(in srgb, var(--brand-1) 4%, var(--surface));
}
/* 官网外链等「按钮 + 旁注」行 */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn-row .hint { margin: 0; }
/* 邮箱一键复制行：地址胶囊 + 复制按钮 + mailto 回退 */
.email-copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 4px; }
.email-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; font-weight: 700; letter-spacing: .2px;
  padding: 9px 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong, var(--border));
  color: var(--text); word-break: break-all;
}
[data-theme="dark"] .email-addr { background: var(--surface-2); }
/* 快速入口标题 */
.quick-links-title { margin: 26px 0 14px; font-size: 19px; }
/* 首页 FAQ 区尾部的「更多问题」入口 */
.faq-more { text-align: center; margin-top: 16px; }
/* 法律页（条款/隐私）正文排版 */
.legal { max-width: 820px; margin: 0 auto; }
.legal section { margin-bottom: 26px; }
.legal h2 { font-size: 18px; margin-bottom: 8px; }
.legal h3 { font-size: 16px; margin: 14px 0 6px; }
.legal p { color: var(--text-soft); font-size: 14.5px; line-height: 1.75; margin: 0 0 8px; }
.legal a { color: var(--brand-text); }
.legal-updated { color: var(--text-faint, var(--text-soft)); font-size: 13px; margin-top: 4px; }
/* 广告披露高亮框（AdSense 合规重点） */
.ad-note {
  border: 1px solid color-mix(in srgb, var(--brand-1) 30%, var(--border));
  border-left: 4px solid var(--brand-1);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--brand-1) 5%, var(--surface));
  padding: 6px 18px 14px; margin: 12px 0 4px;
}
.ad-note h3:first-child { margin-top: 12px; }
/* 教程页分块 */
.tut-block { margin-bottom: 34px; }
.tut-title { display: flex; align-items: center; gap: 12px; font-size: 20px; margin-bottom: 16px; }
.tut-ico {
  width: 38px; height: 38px; flex: none; border-radius: var(--radius-sm);
  display: grid; place-items: center; color: var(--brand-text);
  background: color-mix(in srgb, var(--brand-1) 10%, transparent);
}
.tut-ico svg { width: 20px; height: 20px; }
/* R65: 页脚品牌区改横排——图标左、文字右（根因：.footer-grid a 的 display:block 特异性 (0,1,1) 覆盖 .brand 的 flex (0,1,0)，且 .brand .logo 的 display:grid 被块状化，导致图标与文字竖排；此处用 (0,2,0) 夺回 flex，并恢复品牌字号/主文本色，与页头品牌一致） */
.footer-about .brand { display: flex; align-items: center; gap: 10px; font-size: 17px; color: var(--text); margin-bottom: 10px; }

/* ===================== R68 · 风格统一 / 美化叠加层 =====================
   说明：本段全部为「覆盖式叠加」，不重写既有规则 —— 保持历史回归守卫可回滚。
   依据：五路并行审计（视觉设计系统 / 响应式 / a11y / 运行时交互 / i18n·SEO）。 */

/* 1. 令牌修正：--border-strong 原来对 --bg 只有 1.13:1（亮）/ 1.43:1（暗），
      控件边框形同虚设（WCAG 1.4.11 要求非文本 ≥3:1）。提对比后：亮 3.07 / 暗 3.60。 */
:root { --border-strong: #8b93a8; }
[data-theme="dark"] { --border-strong: #6b7391; }

/* 2. 图标按钮改用加粗边框（原本继承 --border，实测 1.13:1 几乎看不见） */
.icon-btn { border-color: var(--border-strong); }

/* 3. 区块标题字号收敛：原来是 18 / 19 / 24(UA默认) / 32 五档并存，跳页时比例忽大忽小。
      统一到 20px 一档；.cta h2 此前完全没有 font-size，吃的是浏览器默认 24px。 */
.cta h2, .legal h2, .quick-links-title { font-size: 20px; }

/* 4. 页脚列标题：原规则写的是 .footer-grid h5，而全站实际是 <h2>，选择器落空 →
      标题一直吃 UA 默认的 24px 且带默认 margin。这里接管回设计意图的 14px。 */
.footer-grid h2 { margin: 0 0 12px; font-size: 14px; }

/* 5. 卡片族副标题统一 16px（原 .card h3 17px / .feature h3 16px / .step h3 16px） */
.card h3, .feature h3, .step h3 { font-size: 16px; }

/* 6. 卡片族悬浮力度统一：原 .card 用 -4px + shadow-lg（明显更重），
      .feature / .step 是 -3px + shadow-md，同屏两种手感。 */
.card:hover, .feature:hover, .step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* 7. 分段控件三套合一：lang-switch / seg / chip 常同屏，原来是 7px|8px padding、
      700|600 字重、有无过渡各不相同。统一为一套，并给 lang-switch 补上 hover。 */
.lang-switch button, .seg button, .chip { padding: 7px 12px; font-size: 13px; font-weight: 600; }
.lang-switch button, .seg button, .chip,
.chip-del, .thumb-wrap .rm, .tabs button {
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.lang-switch button:not(.active):hover { background: rgba(79, 70, 229, .09); background: color-mix(in srgb, var(--brand-1) 9%, transparent); color: var(--brand-text); }

/* 8. 语义色并轨：toast 的绿/红与 --ok/--danger 是两套值，同屏出现「两种绿、两种红」；
      .chip-del-only 更是第三种红（#c0392b）。统一进令牌。 */
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
.chip-del-only { color: var(--danger); border-color: var(--danger); }

/* 9. FAQ 圆角归队：卡片族唯一用 --radius-sm 的成员，其余都是 --radius */
.faq details { border-radius: var(--radius); }

/* 10. 回顶 FAB 与品牌主操作同辉光体系（原静态 shadow-lg / hover 硬编码 rgba） */
.to-top { box-shadow: var(--glow-brand, var(--shadow-lg)); }
.to-top:hover { box-shadow: var(--glow-brand-lg, 0 14px 34px rgba(79, 70, 229, .5)); }

/* 11. 控件行高度对齐：range 44 / num 37 / swatch 34 / hex 43，同一行里顶底错位 4~9px。
      统一到 38px（只改高度不改 padding，避免挤压文字与触发换行）。 */
.ctl-row .num, .ctl-row .hex { height: 38px; padding-top: 0; padding-bottom: 0; }
.ctl-row .swatch { height: 38px; }

/* 12. 触控目标兜底（WCAG 2.5.8 底线 24px，本项目取更舒服的 32~44px）：
      页脚链接 28.8→32.8、面包屑 25→33、顶部导航 38.4→42、语言按钮补 44 最小宽、
      上传区的文字链（label[for]）20.8→32.8。 */
.footer-grid a { padding: 6px 0; }
.crumbs a { padding: 8px 0; }
.nav-links a { padding-block: 10px; }
.lang-switch button { min-width: 44px; }
.field > label[for] { padding-block: 6px; }

/* 13. 长文行宽收敛：privacy/terms/about 在大屏达 103~105ch（>90ch 阅读疲劳），
      限制到 68ch，小屏由百分比自然收敛不受影响。 */
.legal, .prose-page { max-width: 68ch; }

/* 14. about 主 CTA 被 `.card p a { padding: 3px 0 }` 打回成纯文字链（高 28.4px、
      无按钮观感），而同页另一个 .btn 是正常的 39px。让按钮类在第一优先级取回内边距。 */
.btn-row .btn, .card p a.btn { padding: 10px 18px; }

/* 15. 画布占位文字：压在棋盘格深格上只有 4.42:1（亮）/ 4.09:1（暗），改用 --text-soft
      后为 5.12 / 6.70。 */
.stage .placeholder { color: var(--text-soft); }

/* 16. 离群值归队：全站唯一奇数 gap（11px）与唯一小数号字（14.5px） */
.hero-stats .stat { gap: 12px; }
.legal p { font-size: 14px; }

/* 17. 图标徽章尺寸阶梯：tint 语言已统一，只把 36 / 38 两种尺寸归到 40 一档
      （.card .ico 52 为卡片主图标、.step .num 32 为序号徽章，各自成档保留） */
.feature .tick { width: 40px; height: 40px; }
.tut-ico { width: 40px; height: 40px; }

/* ===================== R69 · 暗色与状态修正叠加层 =====================
   来源：五路并行审计（性能 / 死代码 / 暗色·状态 / 文案 / 工具 UX）。
   同为「覆盖式叠加」，不重写既有规则。 */

/* 1. toast 成功/失败提示的文字对比度。
      并轨到 --ok/--danger 后白字实测只有 3.3:1（亮）/ 2.28:1（暗）——恰恰是用户
      最需要读清的两条信息。改为深色文字：亮 ~7.6:1、暗 ~8.9:1。 */
.toast.ok { color: #052e16; }
.toast.err { color: #450a0a; }

/* 2. 系统深色 + 手动亮色时，原生 UI 发暗。
      :root 只写了 `color-scheme: light dark`，浏览器于是跟着系统走 dark，
      导致亮色页面上的 select 弹层 / 取色器 / 滚动条全部是暗的。显式声明。 */
[data-theme="light"] { color-scheme: light; }

/* 3. 暗色下的 hero 渐变标题：#4f46e5 压在 #0f1220 上只有 2.96:1（大字底线 3:1）。
      换一套提亮的渐变，亮色不变。 */
[data-theme="dark"] .hero h1 .grad {
  background: linear-gradient(135deg, #8f88ff 0%, #a78bfa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 4. 画布棋盘格：暗色下两格只差 1.28:1，透明贴图的边缘几乎分不出来。 */
[data-theme="dark"] { --chk-a: #1b2033; --chk-b: #39436b; }

/* 5. 暗色下阴影（纯黑）几乎不可见，卡片边界只剩一条 hairline。
      加一层 1px 内高光把轮廓找回来，不动既有 border/背景。 */
[data-theme="dark"] .card,
[data-theme="dark"] .feature,
[data-theme="dark"] .step,
[data-theme="dark"] .faq details { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }

/* 6. 打印兜底：1261 行的暗色 --border-strong 与 647 行的 color-scheme:dark 源序靠后、
      特异性相同，会把白纸黑字的打印样式染成蓝边框 / 暗控件。 */
@media print {
  [data-theme="dark"] { --border-strong: #bbb; color-scheme: light; }
  [data-theme="dark"] .card,
  [data-theme="dark"] .feature,
  [data-theme="dark"] .step,
  [data-theme="dark"] .faq details { box-shadow: none; }
}

/* 7. R69 新增的「圆角」置灰态：圆形/六边形没有直角，圆角滑块对其无效，
      与其让用户反复拖动一个毫无反应的控件，不如明确禁用并说明。 */
.field.is-disabled { opacity: .55; }
.field.is-disabled .ctl-label { color: var(--text-faint); }
.field.is-disabled .hint { font-style: normal; color: var(--text-soft); }

/* ============================================================
   R71 (2026-10-19) — 首页 Hero 演示图与双栏布局
   增量叠加：仅覆盖 text-align / max-width 等少量既有规则，保留
   eyebrow、标题、CTA、stats 的原有样式；移动端自动堆叠。
   ============================================================ */

/* 1. 双栏网格：文字居左、演示图居右，桌面端对齐 */
.hero { text-align: left; }
.hero .container.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.hero-copy { max-width: 560px; }
.hero-copy .lead { max-width: none; margin-left: 0; margin-right: 0; }
.hero-copy .hero-cta { justify-content: flex-start; }
.hero-copy .hero-stats { justify-content: flex-start; }

/* 2. 演示图容器：圆角卡片 + 悬浮动画 */
.hero-visual {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.hero-img-wrap {
  position: relative; border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 10px;
  box-shadow: var(--shadow-lg);
  transform: translateY(0);
  animation: hero-float 6s ease-in-out infinite;
}
.hero-img-wrap::before {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(135deg, rgba(79,70,229,.25), rgba(124,58,237,.18));
  filter: blur(14px); opacity: .7;
}
.hero-img-wrap img {
  display: block; width: 100%; max-width: 520px; height: auto;
  border-radius: calc(var(--radius-lg) - 4px);
  border: 1px solid var(--border);
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* 3. 平板/手机：单栏堆叠，演示图上移缩小 */
@media (max-width: 980px) {
  .hero .container.hero-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero-copy { max-width: 680px; margin: 0 auto; }
  .hero-copy .hero-cta { justify-content: center; }
  .hero-copy .hero-stats { justify-content: center; }
  .hero-img-wrap { max-width: 420px; margin: 0 auto; }
  .hero-img-wrap img { max-width: 100%; }
}
@media (max-width: 560px) {
  .hero { padding-top: 42px; }
  .hero .container.hero-grid { gap: 22px; }
  .hero-img-wrap { padding: 6px; }
  .hero-copy .hero-stats { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-copy .hero-stats .stat { justify-content: center; }
}

/* 4.  prefers-reduced-motion：停止演示图悬浮动画 */
@media (prefers-reduced-motion: reduce) {
  .hero-img-wrap { animation: none; }
}
/* 8. R72: shape picker icons — show silhouettes instead of text, 5 per row. */
#cl-shapes.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
#cl-shapes.chips .chip { aspect-ratio: 1 / 1; padding: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
#cl-shapes.chips .chip svg { width: 22px; height: 22px; fill: currentColor; pointer-events: none; }
#cl-shapes.chips .chip.active svg { fill: #fff; }
@media (prefers-reduced-motion: reduce) {
  #cl-shapes.chips .chip { transition: none; }
}

/* 9. R74/R78: 工具面板垂直间距优化。保存当前样式/模板按钮与下方说明文字之间
   过于紧凑。说明文字是 <span> 默认 inline，margin 上下不生效，必须改为 block；
   同时给保存按钮加足够下边距，确保视觉上明显分隔。 */
.field > .hint { display: block; margin-bottom: 10px; margin-top: 10px; }
.chip-save { display: inline-block; margin-bottom: 12px; }
.field-group { margin-bottom: 20px; padding-bottom: 8px; }

/* ============================================================
   R79 (2026-10-19) — 顶栏语言/明暗按钮对齐与间距
   来源：R69 用户反馈「语言+明暗切换按钮尺寸不齐、间距挤」遗留。
   根因：.lang-switch button 仅 padding 7px + 13px 字 ≈ 32px 高，
   而 .icon-btn 为 40px 圆形，二者不等高造成视觉错位；
   nav-actions 仅有 8px gap，与左侧 6 个导航链挤在一起。
   仅做增量覆盖，不重写既有规则。
   ============================================================ */

/* 1. 让语言胶囊与圆形图标按钮等高（均 40px），消除错位。 */
.lang-switch { display: inline-flex; }
.lang-switch button {
  height: 40px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* 2. 顶栏操作区与导航链之间留白，避免拥挤。 */
.nav-actions { gap: 10px; }

/* ============================================================
   R80 (2026-10-19) — 全局视觉打磨叠加层
   来源：本轮「美化优化界面」诉求。站点已多轮深度美化，本层仅做
   收束性提质，严格零几何变更（只动 box-shadow / background 渐变 /
   color / border-color / border-radius），不影响任何布局宽度与换行。
   目标：① 功能勾选徽标渐变化，与步骤序号徽章呼应；② 卡片图标
   悬浮辉光；③ 主按钮悬浮微光泽。
   ============================================================ */

/* 1. 功能勾选徽标：由扁平品牌色块升级为品牌渐变 + 白色图标，与 .step .num 呼应。 */
.feature .tick {
  background: var(--brand-grad);
  color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-1) 26%, transparent);
}

/* 2. 卡片图标：悬浮时叠加柔和品牌辉光环（box-shadow 不占布局，零几何变更）。 */
.card .ico { transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.card:hover .ico { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 22%, transparent); }

/* 3. 主按钮：悬浮时斜向高光扫过（伪元素，overflow 裁剪到胶囊内，零几何变更）。 */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, .22), transparent 55%);
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.btn-primary:hover::after { opacity: 1; }

/* 4. 卡片 / 步骤悬浮：统一品牌色描边 + 更强辉光，强化层次（不改变位移/尺寸）。 */
.card:hover { border-color: var(--brand-1); }
.step:hover { border-color: var(--brand-1); }

/* ============================================================
   R83 (2026-10-19) — 「保存为模板/保存当前样式」按钮上方间距
   用户反馈：虚线保存按钮紧贴上方控件（快速模板 select / 样式模板
   chip 组）。R74 只加了 margin-bottom，上方仍为 0。
   仅增量覆盖，不动 R74 既有规则。
   ============================================================ */
.chip-save { margin-top: 12px; }



/* ============================================================
   R88 (2026-10-19) — 动作条移到画布左上 + 画布右上下载弹出层
   stage-top：左侧动作组 / 右侧下载按钮；.dl-pop 为弹出格式菜单。
   ============================================================ */
.stage-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-stage .stage-actions { margin-top: 0; }
.panel-stage .stage-meta { margin-left: 6px; }
.dl-wrap { position: relative; margin-left: auto; }
.dl-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.dl-pop .chips { flex-wrap: wrap; }
[data-theme="dark"] .dl-pop { box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
@media print { .dl-wrap { display: none !important; } }

/* ============================================================
   R89 (2026-10-19) — 全站风格统一 / 宽度·排版·布局优化
   增量叠加，不重写既有规则；仅新增工具类与覆盖式收束。
   依据：全量审计 9 页 HTML + style.css，定位真实不一致与离群值。
   ============================================================ */

/* 1. 内容页阅读列宽统一：FAQ 本就是 820px，legal/prose 此前被 R68 限到 68ch
      （≈540px），同站内容页宽窄不一、大屏侧边留白过大。统一回 820px，
      并略宽于 .section-head(720) 形成稳定的「标题窄、正文宽」节奏。 */
.legal, .prose-page { max-width: 820px; }

/* 2. 次级标题工具类：替代 404 页 h2 的离群内联（原 18px / margin:28px 0 10px），
      与 R68 统一的小节标题字号 20px 保持一致。 */
.h-sub { font-size: 20px; margin: 28px 0 10px; line-height: var(--lh-heading); }

/* 3. 通用间距工具类（替代零散内联 margin），仅用于无法用既有规则表达的个别处。 */
.mt-20 { margin-top: 20px; }
.cta--tight { margin-top: 8px; }

/* 4. 首页区段工具类：替代两段 inline band / padding-top:0，消除 body 内联离群值。 */
.section--band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section--flush { padding-top: 0; }

/* 5. 关于页卡片纵向流：原 5 处 .card 内联 margin-bottom:18px 统一由 CSS 接管，
      去除内联离群值；.grid-cards（非 .card 直接子元素）不受影响。 */
.prose-page > .card { margin-bottom: 18px; }

/* ============================================================
   R90 (2026-10-19) — 工具页视觉打磨（R88 重构后的收束提质）
   来源：本轮「美化界面，风格统一」诉求。R88 把动作条移到画布上方、
   删除侧栏导出、新增画布右上「下载」弹出层，但弹出层与下载按钮存在
   真实视觉缺陷：① `.btn-dl` 在 HTML 中大量使用却**完全没有 CSS 规则**，
   回退为纯 ghost `.btn`，致「下载」这个最关键动作在视觉上弱于「生成」
   主按钮；② 弹出层没有标题，形态上不像一个正式面板。本层修复并提质。
   严格增量叠加，不改既有盒子模型与换行临界点。
   ============================================================ */

/* 1. 下载按钮族（修复 R88 遗留的 .btn-dl 未定义回归）
   品牌描边样式：与 .btn-primary（实心品牌渐变）形成清晰层级——
   生成=实心主操作，下载=品牌描边次主操作；同时统一「下载族」视觉语言
   （顶栏触发按钮 + 弹出层内两个下载按钮共用同一外观）。 */
.btn-dl {
  background: color-mix(in srgb, var(--brand-1) 9%, var(--surface));
  border-color: var(--brand-1);
  color: var(--brand-text);
}
.btn-dl:hover {
  background: color-mix(in srgb, var(--brand-1) 16%, var(--surface));
  border-color: var(--brand-1);
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .btn-dl { color: var(--brand-text); border-color: var(--brand-1); }

/* 2. 下载弹出层标题：使其读起来是一个正式面板，而非裸控件堆。 */
.dl-pop-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--text);
  padding-bottom: 10px; margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
}
.dl-pop-head .btn-ico { color: var(--brand-text); }

/* 3. 弹出层宽度护栏：极窄屏（≤360）下 min-width:230px 不会溢出视口。 */
.dl-pop { max-width: min(280px, calc(100vw - 16px)); }

/* ============================================================
   R91 (2026-10-19) — 组件视觉一致性 + 表单控件品牌化 + 教程网格适配
   来源：本轮「美化界面、风格统一」+ 并行只读审计证据（Explore 代理）。
   修复（均增量叠加，不改盒子模型 / 工具条高度预算）：
   ① 滑块 input[type=range] 自定义品牌化轨道+滑块（原仅 accent-color，
      暗色下深靛偏低；现自定义 thumb/track，暗色亮化为 --brand-text）；
   ② 教程页 .steps 4 步 / .feature-list 4 项 原 3 列网格孤卡 → 新增
      .steps--4 / .feature-list--4 修饰类（2×2），并禁用 3 步连接点；
   ③ .legal h3 已统一 16px（前面直改既有规则）；
   ④ about 卡片内 .hint 被 .card p 覆盖 → 新增 .card .hint 恢复 12px/faint；
   ⑤ 已清理死规则 .range-row / .row2 / .divider（HTML 全程无引用）。
   ============================================================ */

/* 1. 滑块品牌化：自定义轨道与滑块，统一工具页控件观感。
      保持 height:44px 触控区（既有规则）不变，仅改内部渲染。 */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; margin-top: -7px; border-radius: 50%;
  background: var(--brand-1); border: 2px solid var(--surface);
  box-shadow: 0 2px 6px rgba(31, 36, 64, .3);
}
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-1); border: 2px solid var(--surface);
  box-shadow: 0 2px 6px rgba(31, 36, 64, .3);
}
[data-theme="dark"] input[type="range"]::-webkit-slider-thumb,
[data-theme="dark"] input[type="range"]::-moz-range-thumb { background: var(--brand-text); }
[data-theme="dark"] input[type="range"]::-webkit-slider-runnable-track,
[data-theme="dark"] input[type="range"]::-moz-range-track { background: #2a3048; border-color: #3a425e; }

/* 2. 教程页网格适配：4 步 / 4 项 → 2×2，不再因 3 列网格孤卡。 */
.steps--4 { grid-template-columns: repeat(2, 1fr); }
.steps--4 .step::after { display: none; }  /* 关闭为 3 步设计的连接点 */
.feature-list--4 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) {
  .steps--4, .feature-list--4 { grid-template-columns: 1fr; }
}

/* 3. about 卡片内 .hint 恢复：覆盖 .card p 的 14px / text-soft 默认。 */
.card .hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

/* ═══ R92：内容页美化（404 品牌 hero + about 快速入口标题 + about 正文卡片左条） ═══ */
/* 1. 404 页品牌化 hero：超大渐变 404 数字，情感化 + 品牌感，纯 CSS 无新资源。 */
.e404-mark {
  display: block;
  text-align: center;
  font-size: clamp(72px, 16vw, 140px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 6px 0 8px;
  filter: drop-shadow(0 6px 18px color-mix(in srgb, var(--brand-1) 22%, transparent));
  animation: e404-float 4s ease-in-out infinite;
}
@keyframes e404-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* 2. about 快速入口标题：与全站 .section-head h2 同款品牌短杠（左对齐，prose 页非居中）+ 上间距。 */
.quick-links-title {
  margin: 38px 0 16px;
}

/* 3. about 正文卡片左侧品牌条：R103 按用户定稿删除（同类装饰线已全站清零） */
/* 减少动效偏好：关闭 404 漂浮，避免前庭刺激 */
@media (prefers-reduced-motion: reduce) {
  .e404-mark { animation: none; }
}

/* ===== R93（2026-10-19）：首页/全局美化 + 锚点偏移一致性 =====
   1. 全站 footer 品牌链接内联 margin-bottom:10px 已收口进 .footer-about .brand（上条 R65b 规则）。
   2. sticky 顶栏（position:sticky; top:0; z-index:100）遮挡锚点：点击导航 #tools/#steps/#ideas
      等区块时标题被顶栏盖住。统一给 main 内带 id 的区块加 scroll-margin-top 偏移。 */
main [id] { scroll-margin-top: calc(var(--header-h) + 10px); }

/* ═══ R94：工具页空状态占位美化（品牌图标 + 居中卡片感） ═══
   原 .stage .placeholder 仅是棋盘格虚空中的一行灰字，载入前观感空洞、不像可交互。
   新增品牌上传图标（圆形品牌底 chip）+ 文案 span，使空画布显得「有意且可点击」。
   纯叠加：不重写 .stage .placeholder 既有色/字号/内边距，仅补 display:flex 与子元素样式。 */
.stage .placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.stage .placeholder .ph-ico {
  width: 44px; height: 44px; padding: 12px; box-sizing: content-box;
  border-radius: 50%; color: var(--brand-text);
  background: color-mix(in srgb, var(--brand-1) 10%, transparent);
}
.stage .placeholder span { max-width: 320px; line-height: 1.65; }
[data-theme="dark"] .stage .placeholder .ph-ico { background: color-mix(in srgb, var(--brand-1) 22%, transparent); }

/* ============================================================
   R105 (2026-10-20) — 顶栏语言/明暗两按钮统一同尺寸
   来源：用户截图反馈「中」语言胶囊比月亮圆钮宽（高度 R79 已对齐
   40px，但宽度 44px+ 使二者不等大）。语言胶囊为 .lang-switch 单按钮
   + 1px 外框，将按钮定为 38×40（border-box），使胶囊外径恰为 40×40，
   与 .icon-btn 完全等大；字号/字重/active 渐变不变。
   ============================================================ */
.lang-switch button { width: 40px; height: 40px; min-width: 40px; padding: 0; }

/* ============================================================
   R107 (2026-10-21) — 内容页纵向节奏（用户截图反馈「卡片间距太小」）
   取证（_r107_spacing/_r107_sweep 运行时实测）：
   ① examples.html 场景网格 .grid-cards 直接贴住后续 .prose-page 卡片
     （gap=0，网格内最高卡底部与「怎么挑」卡仅剩阴影缝）——全站唯一
     <16px 块间距（12 页 × 2 视口扫描证实）；
   ② prose 卡片之间 / prose→cta 普遍 18px，节奏偏紧。
   修复（纯增量叠加，靠 margin 折叠不扰动既有节奏）：
   - .prose-page 上下 28px：与 section-head 32px、网格内 20px 形成层级；
     section-head→prose 折叠仍 32、guide tut-block→prose 折叠仍 34。
   - .prose-page > .card 18px→24px：about 5 卡纵流同步放宽（末卡与
     prose 底边 28px 折叠取大，不叠加）。
   ============================================================ */
.prose-page { margin: 28px auto; }
.prose-page > .card { margin-bottom: 24px; }
