/* ============ 365Lab 曲线文字生成器 - 全站样式 (明暗双主题) ============ */
:root {
  --bg: #f5f6fa;
  --bg2: #ffffff;
  --bg3: #eef0f6;
  --text: #1c2230;
  --muted: #677086;
  --line: #e4e7ef;
  --primary: #7c3aed;
  --primary2: #f72585;
  --primary-grad: linear-gradient(120deg, #7c3aed, #f72585);
  --chip: #eef0f6;
  --chip-on: #ffffff;
  --hover: rgba(124, 58, 237, 0.08);
  --shadow: 0 2px 10px rgba(28, 34, 48, 0.06);
  --shadow-lg: 0 10px 32px rgba(28, 34, 48, 0.12);
  --ok: #10b981;
  --danger: #ef4444;
  --checker1: #ffffff;
  --checker2: #eceff5;
  --header-bg: rgba(255, 255, 255, 0.82);
  --radius: 14px;
  --radius-sm: 9px;
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
}
[data-theme="dark"] {
  --bg: #0e1016;
  --bg2: #171a23;
  --bg3: #1f2330;
  --text: #e8eaf0;
  --muted: #98a0b2;
  --line: #2a2f3d;
  --chip: #242938;
  --chip-on: #12141c;
  --hover: rgba(167, 139, 250, 0.12);
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);
  --checker1: #1a1d28;
  --checker2: #232736;
  --header-bg: rgba(14, 16, 22, 0.82);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  transition: background 0.25s, color 0.25s;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 头部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--primary-grad);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; flex-shrink: 0;
}
.logo small { color: var(--muted); font-weight: 500; font-size: 12px; }
.nav { display: flex; align-items: center; gap: 2px; margin-left: 12px; }
.nav a {
  padding: 7px 13px; border-radius: 9px; color: var(--muted);
  font-weight: 500; font-size: 14px; transition: all 0.15s;
}
.nav a:hover { color: var(--text); background: var(--chip); text-decoration: none; }
.nav a.active { color: var(--primary); background: var(--hover); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--muted); font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--text); font-size: 14px; font-weight: 600;
  transition: all 0.15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-primary { background: var(--primary-grad); color: #fff; border: none; }
.btn-primary:hover { color: #fff; opacity: 0.92; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

/* ---------- 首页 Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 56px; text-align: center; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 20% 10%, rgba(124, 58, 237, 0.12), transparent 60%),
    radial-gradient(600px 300px at 80% 20%, rgba(247, 37, 133, 0.12), transparent 60%);
}
.hero .container { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--hover); color: var(--primary);
  font-size: 13px; font-weight: 600;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px); line-height: 1.18; margin: 20px auto 14px;
  letter-spacing: 0.5px; max-width: 760px;
}
.hero h1 .grad { background: var(--primary-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { color: var(--muted); font-size: clamp(15px, 2vw, 18px); max-width: 680px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-demo { margin-top: 44px; }
.demo-card {
  display: inline-block; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 20px; padding: 18px; box-shadow: var(--shadow-lg);
  max-width: 100%;
}
.demo-card canvas { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.demo-label {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px; color: var(--muted); font-size: 13px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.stats {
  display: flex; justify-content: center; gap: 0; flex-wrap: wrap;
  margin: 40px auto 0; max-width: 760px;
}
.stat { flex: 1; min-width: 140px; padding: 14px 8px; }
.stat b { display: block; font-size: 28px; background: var(--primary-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- 通用区块 ---------- */
.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 8px; }
.section-head p { color: var(--muted); max-width: 640px; margin: 0 auto; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: transform 0.18s, box-shadow 0.18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 14px;
  background: var(--hover); display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; }

/* 步骤 */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step {
  position: relative; background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px 22px;
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -16px; left: 22px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-grad); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}
.step h3 { margin: 8px 0 6px; font-size: 17px; }
.step p { color: var(--muted); font-size: 14px; }

/* 画廊 */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.gallery-item { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; transition: transform 0.18s; }
.gallery-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.gallery-item canvas { width: 100%; height: 130px; border-radius: 9px; display: block; background: var(--checker2); }
.gallery-item p { text-align: center; margin-top: 10px; font-weight: 600; font-size: 14px; }

/* 场景 */
.scene { display: flex; gap: 16px; align-items: flex-start; }
.scene .ico { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: var(--hover); display: flex; align-items: center; justify-content: center; font-size: 21px; }
.scene h3 { font-size: 16px; margin-bottom: 4px; }
.scene p { color: var(--muted); font-size: 14px; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.faq-item summary {
  padding: 15px 18px; cursor: pointer; font-weight: 600; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--muted); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .ans { padding: 0 18px 16px; color: var(--muted); font-size: 14.5px; }

/* SEO 长文 */
.seo-box {
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px; max-width: 900px; margin: 0 auto;
}
.seo-box h2 { font-size: 22px; margin-bottom: 12px; }
.seo-box h3 { font-size: 17px; margin: 18px 0 8px; }
.seo-box p { color: var(--muted); margin-bottom: 12px; }

/* CTA 条 */
.cta-band {
  margin: 0 20px; border-radius: 22px; padding: 44px 24px; text-align: center;
  background: var(--primary-grad); color: #fff;
}
.cta-band h2 { font-size: clamp(22px, 3.4vw, 32px); margin-bottom: 10px; }
.cta-band p { opacity: 0.92; margin-bottom: 22px; }
.cta-band .btn { background: #fff; color: var(--primary); border: none; }
.cta-band .btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }

/* 页脚 */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--bg2); }
.footer-inner { padding: 36px 20px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; max-width: 1180px; margin: 0 auto; }
.footer-inner h4 { font-size: 15px; margin-bottom: 12px; }
.footer-inner p { color: var(--muted); font-size: 13.5px; }
.footer-inner a { display: block; color: var(--muted); font-size: 14px; padding: 3px 0; }
.footer-inner a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--line); padding: 14px 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* 回到顶部 */
.back-top {
  position: fixed; right: 22px; bottom: 26px; z-index: 50;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--bg2); border: 1px solid var(--line); color: var(--muted);
  font-size: 18px; box-shadow: var(--shadow-lg);
  display: none; align-items: center; justify-content: center;
}
.back-top.show { display: flex; }
.back-top:hover { color: var(--primary); border-color: var(--primary); }

/* ============ 工具页 ============ */
.tool-page .site-header { position: static; }
.tool-wrap { display: grid; grid-template-columns: 356px 1fr; min-height: calc(100vh - 60px); }
.tool-sidebar { border-right: 1px solid var(--line); background: var(--bg2); padding: 16px; overflow-y: auto; max-height: calc(100vh - 60px); position: sticky; top: 0; }
.tool-stage { padding: 18px; display: flex; flex-direction: column; }

/* Tab 栏 */
.tool-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tool-tab {
  flex: 1; min-width: 64px; padding: 9px 6px; text-align: center;
  border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--muted); font-size: 13.5px; font-weight: 600; transition: all 0.15s;
}
.tool-tab:hover { color: var(--primary); border-color: var(--primary); }
.tool-tab.active { background: var(--primary-grad); color: #fff; border-color: transparent; }

.panel { display: none; }
.panel.active { display: block; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.panel-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--muted); }

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field .row2 { display: flex; gap: 10px; }
.field .row2 > div { flex: 1; }

.text-input, .select-input, .num-input {
  width: 100%; padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font-size: 14px; outline: none; transition: border 0.15s;
}
.text-input:focus, .select-input:focus, .num-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--hover); }
textarea.text-input { resize: vertical; min-height: 64px; line-height: 1.5; }

/* 滑块 */
.range-wrap { display: flex; align-items: center; gap: 10px; }
.range-wrap input[type="range"] { flex: 1; accent-color: var(--primary); }
.range-wrap .val { width: 52px; text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--muted); }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); position: relative; transition: all 0.2s; flex-shrink: 0; }
.switch .track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: all 0.2s;
}
.switch input:checked + .track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .track::after { left: 18px; }

/* 颜色选择 */
.color-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.color-pick { position: relative; width: 38px; height: 34px; border-radius: 9px; border: 1px solid var(--line); overflow: hidden; flex-shrink: 0; }
.color-pick input { position: absolute; inset: -6px; width: 50px; height: 50px; border: none; cursor: pointer; background: none; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line);
  cursor: pointer; transition: transform 0.12s;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--hover); }

/* 路径选择网格 */
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.path-card {
  border: 1.5px solid var(--line); border-radius: 11px; padding: 8px 4px;
  text-align: center; cursor: pointer; background: var(--bg); transition: all 0.15s;
}
.path-card canvas { width: 100%; height: 56px; display: block; }
.path-card span { font-size: 12px; color: var(--muted); display: block; margin-top: 4px; }
.path-card:hover { border-color: var(--primary); }
.path-card.active { border-color: var(--primary); background: var(--hover); }
.path-card.active span { color: var(--primary); font-weight: 600; }

/* 分段选择 */
.seg { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button {
  flex: 1; padding: 8px 4px; border: none; background: var(--bg);
  color: var(--muted); font-size: 13px; font-weight: 600; border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: none; }
.seg button.active { background: var(--primary-grad); color: #fff; }

/* 字体网格 */
.font-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 300px; overflow-y: auto; }
.font-card {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--bg); cursor: pointer; transition: all 0.15s; text-align: left;
}
.font-card:hover { border-color: var(--primary); }
.font-card.active { border-color: var(--primary); background: var(--hover); }
.font-card .f-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.font-card .f-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.font-card .f-load { font-size: 11px; color: var(--primary); }

/* 尺寸 chips */
.size-group { margin-bottom: 12px; }
.size-group h5 { font-size: 12px; color: var(--muted); margin-bottom: 7px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); font-size: 12.5px; cursor: pointer; transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary-grad); color: #fff; border-color: transparent; }

/* 渐变预设 */
.grad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.grad-swatch { height: 40px; border-radius: 9px; border: 2px solid var(--line); cursor: pointer; transition: transform 0.12s; }
.grad-swatch:hover { transform: scale(1.08); }
.grad-swatch.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--hover); }

/* 图案 */
.pattern-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.pattern-item { border: 1.5px solid var(--line); border-radius: 9px; text-align: center; padding: 5px; cursor: pointer; background: var(--bg); }
.pattern-item canvas { width: 100%; height: 42px; border-radius: 6px; display: block; }
.pattern-item span { font-size: 11px; color: var(--muted); display: block; margin-top: 3px; }
.pattern-item.active { border-color: var(--primary); background: var(--hover); }

/* 导出 */
.export-btns { display: flex; flex-direction: column; gap: 9px; }
.export-btns .btn { width: 100%; }
.exp-row { display: flex; gap: 8px; }
.exp-row .btn { flex: 1; }

/* 模板 */
.tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; max-height: 560px; overflow-y: auto; padding: 2px; }
.tpl-card { border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--bg); transition: all 0.15s; }
.tpl-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.tpl-card canvas { width: 100%; display: block; aspect-ratio: 4/3; background: var(--checker2); }
.tpl-card .tpl-name { padding: 8px 10px; font-size: 13px; font-weight: 600; }

/* 舞台 */
.stage-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.stage-canvas-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: var(--bg3); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; min-height: 420px; overflow: auto;
}
.stage-canvas {
  max-width: 100%; max-height: calc(100vh - 260px);
  border-radius: 10px; box-shadow: var(--shadow-lg);
  background: repeating-conic-gradient(var(--checker1) 0 25%, var(--checker2) 0 50%) 0 0 / 22px 22px;
  touch-action: none; cursor: crosshair;
}
.stage-canvas.drawing { cursor: crosshair; }
.stage-hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }
.stage-size-info { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 10px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 11px 22px; border-radius: 12px;
  font-size: 14px; opacity: 0; transition: all 0.25s; z-index: 99; box-shadow: var(--shadow-lg);
  pointer-events: none; max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 教程页 ============ */
.guide-hero { text-align: center; padding: 50px 0 10px; }
.guide-hero h1 { font-size: clamp(26px, 4vw, 40px); }
.guide-hero p { color: var(--muted); max-width: 700px; margin: 12px auto 0; }
.guide-steps { max-width: 860px; margin: 30px auto 0; }
.guide-step { display: flex; gap: 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 14px; }
.guide-step .num { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.guide-step h2 { font-size: 18px; margin-bottom: 6px; }
.guide-step p { color: var(--muted); font-size: 14.5px; }
.tips-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 860px; margin: 0 auto; }
.tip-card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.tip-card h3 { font-size: 15.5px; margin-bottom: 6px; }
.tip-card p { color: var(--muted); font-size: 14px; }
.license-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--bg2); border-radius: var(--radius); overflow: hidden; }
.license-table th, .license-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.license-table th { background: var(--bg3); color: var(--muted); font-size: 13px; }
.license-table tr:last-child td { border-bottom: none; }

/* ============ 404 ============ */
.notfound { text-align: center; padding: 110px 20px; }
.notfound .code { font-size: 92px; font-weight: 900; background: var(--primary-grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.notfound h1 { font-size: 26px; margin: 12px 0 10px; }
.notfound p { color: var(--muted); margin-bottom: 26px; }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tool-wrap { display: flex; flex-direction: column; }
  .tool-sidebar { position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--line); order: 2; }
  .tool-stage { order: 1; }
  .stage-canvas-wrap { min-height: 340px; }
}
@media (max-width: 720px) {
  .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .nav { display: none; }
  .tool-tab { min-width: 0; }
  .tpl-grid { grid-template-columns: 1fr; }
  .stage-canvas-wrap { padding: 12px; }
  .stat b { font-size: 22px; }
  .hero { padding: 42px 0 36px; }
  .section { padding: 40px 0; }
}
@media (max-width: 420px) {
  .grid-4 { grid-template-columns: 1fr; }
  .path-grid { grid-template-columns: repeat(3, 1fr); }
  .font-grid { grid-template-columns: 1fr; }
  .grad-grid, .pattern-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 打印/降级 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
