/* ============================================================
   闪转 FlashConvert · 设计系统 v1.0
   现代化在线工具站原型共享样式
   ============================================================ */

:root {
  /* 品牌色 */
  --primary: #4d6bfe;
  --primary-hover: #3b5beb;
  --primary-soft: #eef1ff;
  --gradient: linear-gradient(135deg, #4d6bfe 0%, #7c4dff 100%);

  /* 中性色 */
  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e9edf5;
  --border-strong: #d8dfeb;
  --text: #1d2433;
  --text-2: #4b5563;
  --text-3: #8a94a6;

  /* 功能色 */
  --success: #22c55e;
  --success-soft: #e9f9ef;
  --warning: #f59e0b;
  --warning-soft: #fef6e7;
  --danger: #ef4444;
  --danger-soft: #fdecec;

  /* VIP */
  --vip-gold: #f7b733;
  --vip-dark: #171d33;
  --vip-gradient: linear-gradient(135deg, #2b3355 0%, #171d33 100%);

  /* 分类色 */
  --cat-video: #6366f1;   --cat-video-bg: #eef0ff;
  --cat-audio: #f97316;   --cat-audio-bg: #fff3e8;
  --cat-image: #10b981;   --cat-image-bg: #e8f8f0;
  --cat-ai: #a855f7;      --cat-ai-bg: #f5edff;
  --cat-doc: #0ea5e9;     --cat-doc-bg: #e9f6fe;
  --cat-util: #14b8a6;    --cat-util-bg: #e6f7f5;
  --cat-record: #ef4444;  --cat-record-bg: #feecec;

  /* 布局 */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 2px 8px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .10);
  --header-h: 64px;
  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.flex-1 { flex: 1; min-width: 0; }

/* ---------- SVG 图标系统 ---------- */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.glyph { width: 20px; height: 20px; flex-shrink: 0; vertical-align: -4px; }
.btn .glyph { width: 15px; height: 15px; }
.badge .glyph { width: 12px; height: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; padding: 10px 22px;
  transition: all .18s ease; white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid rgba(77, 107, 254, .35); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(77, 107, 254, .35); }
.btn-gradient { background: var(--gradient); color: #fff; }
.btn-gradient:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(108, 88, 255, .4); }
.btn-outline { background: var(--card); color: var(--text); border: 1.5px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: var(--primary-soft); color: var(--primary); }
.btn-ghost:hover { background: #e0e6ff; }
.btn-gold { background: linear-gradient(135deg, #ffd97a, #f7b733); color: #5b3a00; }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(247, 183, 51, .45); }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- 徽章 / 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
}
.badge-free { background: var(--success-soft); color: #15803d; }
.badge-vip { background: linear-gradient(135deg, #fff3d6, #ffe6a8); color: #8a5b00; }
.badge-hot { background: var(--danger-soft); color: #dc2626; }
.badge-new { background: var(--primary-soft); color: var(--primary); }
.badge-ai { background: var(--cat-ai-bg); color: #7e22ce; }
.badge-local { background: #f1f5f9; color: #475569; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 99px; font-size: 13px; font-weight: 500;
  background: var(--card); border: 1px solid var(--border); color: var(--text-2);
  transition: all .15s;
}
.chip .glyph { width: 15px; height: 15px; }
.chip:hover, .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; --chip-ico: #fff; }

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); height: var(--header-h);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--primary);
  display: grid; place-items: center; color: #fff;
}
.logo-mark .glyph { width: 21px; height: 21px; }
.logo small { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav a {
  padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--text-2);
  transition: all .15s;
}
.nav a:hover { background: var(--primary-soft); color: var(--primary); }
.nav a.active { color: var(--primary); font-weight: 700; }
.nav a.nav-vip { color: #b47b00; font-weight: 700; }
.nav a.nav-vip:hover { background: var(--warning-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--gradient); position: relative; overflow: hidden;
  padding: 52px 0 60px; color: #fff; text-align: center;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .10);
}
.hero::before { width: 420px; height: 420px; top: -180px; right: -100px; }
.hero::after { width: 300px; height: 300px; bottom: -160px; left: -80px; }
.hero > .container { position: relative; z-index: 1; }
.hero h1 { font-size: 34px; font-weight: 800; letter-spacing: 1px; }
.hero p { margin-top: 12px; font-size: 16px; opacity: .92; }
.hero-stats { display: flex; justify-content: center; gap: 34px; margin-top: 26px; font-size: 13px; opacity: .95; }
.hero-stats b { font-size: 20px; margin-right: 3px; }

.search-wrap { position: relative; max-width: 560px; margin: 28px auto 0; text-align: left; }
.search-box {
  display: flex; background: #fff;
  border-radius: 14px; padding: 6px; box-shadow: 0 12px 32px rgba(23, 29, 51, .18);
}
.search-box input {
  flex: 1; border: none; outline: none; padding: 10px 16px; font-size: 15px; background: transparent; color: var(--text);
}
.search-box .btn { border-radius: 10px; }
.search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); overflow-y: auto; max-height: 384px;
}
.sr-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--primary-soft); }
.sr-text { flex: 1; min-width: 0; }
.sr-text b { display: block; font-size: 14px; color: var(--text); }
.sr-text small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-go { color: var(--text-3); flex-shrink: 0; }
.sr-empty { padding: 20px 16px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ---------- 使用排行 ---------- */
.rank-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 36px; }
.rank-item {
  display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px; padding: 13px 16px;
  box-shadow: var(--shadow-sm); transition: all .18s;
}
.rank-item:hover { transform: translateX(4px); border-color: #dfe4ff; box-shadow: var(--shadow); }
.rank-num {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 14px; font-weight: 800; background: #f1f4f9; color: var(--text-3); flex-shrink: 0;
}
.rank-num.rank-1 { background: linear-gradient(135deg, #ffe9a8, #f7b733); color: #7a4c00; }
.rank-num.rank-2 { background: linear-gradient(135deg, #eef2f7, #c3ccd9); color: #4a5568; }
.rank-num.rank-3 { background: linear-gradient(135deg, #ffe0c2, #e8955c); color: #7c3d0f; }
.ri-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ri-desc { font-size: 12.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ri-usage { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; flex-shrink: 0; }
.ri-trend { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; flex-shrink: 0; min-width: 38px; justify-content: flex-end; }
.ri-trend .glyph { width: 14px; height: 14px; }
.ri-trend.up { color: var(--success); }
.ri-trend.down { color: var(--danger); }
.ri-trend.flat { color: var(--text-3); }
.ri-arrow { color: var(--text-3); font-size: 18px; flex-shrink: 0; }

/* ---------- 区块 ---------- */
.section { padding: 44px 0 8px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section-title { font-size: 21px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.section-sub { color: var(--text-3); font-size: 13px; }
.section-more { margin-left: auto; font-size: 13px; color: var(--primary); font-weight: 500; }

/* ---------- 分类标签栏 ---------- */
.cat-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

/* ---------- 工具卡片网格 ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-bottom: 36px;
}
.tool-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm); transition: all .2s ease; position: relative;
}
.tool-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #dfe4ff;
}
.tool-card-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tool-icon {
  position: relative; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; flex-shrink: 0;
}
.tool-icon .glyph { width: 24px; height: 24px; color: #fff; }
.tool-icon-lg { width: 54px; height: 54px; border-radius: 16px; }
.tool-icon-lg .glyph { width: 28px; height: 28px; }
.tool-icon-sm { width: 32px; height: 32px; border-radius: 9px; }
.tool-icon-sm .glyph { width: 17px; height: 17px; }
.tool-icon-xs { width: 24px; height: 24px; border-radius: 7px; }
.tool-icon-xs .glyph { width: 13px; height: 13px; }
.icon-video { background: #5b6cff; }
.icon-audio { background: #f97316; }
.icon-image { background: #10b981; }
.icon-ai    { background: #a855f7; }
.icon-doc   { background: #0ea5e9; }
.icon-util  { background: #14b8a6; }
.icon-record{ background: #f43f5e; }
.tool-card h3 { font-size: 15px; font-weight: 700; line-height: 1.3; }
.tool-card .desc {
  font-size: 13px; color: var(--text-3); line-height: 1.55; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tool-card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 18px 0 0; font-size: 13px; color: var(--text-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- 工具页布局 ---------- */
.tool-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; padding: 20px 0 48px; align-items: start; }
/* 编辑器：未选文件时保持与其他工具页一致的两栏；载入文档后由引擎加
   tool-layout-collapsed 收起侧边栏、工作台占满全宽（删除文件后移除该类恢复两栏） */
.tool-layout-editor.tool-layout-collapsed { grid-template-columns: 1fr; }
.tool-layout-editor.tool-layout-collapsed .sidebar { display: none; }
/* 编辑器全屏模式：只留工作台本体，页面框架全部隐藏 */
body.ped-fs .header, body.ped-fs .breadcrumb, body.ped-fs .tool-head,
body.ped-fs .section, body.ped-fs .footer, body.ped-fs .mobile-cta { display: none !important; }
body.ped-fs .container { max-width: none; padding: 0 10px; }
body.ped-fs .tool-layout { padding: 10px 0 12px; }
body.ped-fs .workspace { padding: 12px; gap: 12px; }
body.ped-fs .ped-stage { max-height: calc(100vh - 190px); }
.tool-head { margin: 14px 0 20px; }
.tool-head h1 { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tool-head .desc { margin-top: 8px; color: var(--text-2); font-size: 14px; max-width: 760px; }
.tool-head-badges { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.workspace {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 26px; display: flex; flex-direction: column; gap: 22px;
}

/* 上传拖拽区 */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  padding: 46px 24px; text-align: center; background: #fafbfe;
  transition: all .18s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone .dz-icon {
  width: 62px; height: 62px; margin: 0 auto; border-radius: 50%;
  background: var(--primary-soft); display: grid; place-items: center;
}
.dropzone .dz-icon .glyph { width: 29px; height: 29px; color: var(--primary); }
.dropzone h4 { margin-top: 12px; font-size: 16px; }
.dropzone p { margin-top: 6px; font-size: 13px; color: var(--text-3); }
.dropzone .btn { margin-top: 16px; }
/* 选完文件后收纳进虚线框内：隐藏引导文案，仅保留文件列表 */
.dropzone.has-files { padding: 14px 16px; text-align: left; }
.dropzone.has-files .dz-prompt { display: none; }
.tf-list { display: flex; flex-direction: column; gap: 8px; }
.tf-hint { font-size: 12px; color: var(--text-3); text-align: center; margin-top: 10px; }

/* 已选文件条 */
.file-chip {
  display: flex; align-items: center; gap: 12px; background: var(--primary-soft);
  border-radius: var(--radius-sm); padding: 12px 16px;
}
.file-chip .fc-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.file-chip .fc-icon .glyph { width: 17px; height: 17px; color: #fff; }
/* 文件类型徽标（app.js fileBadge）：Word 蓝底 W、PDF 红底 PDF…，文字徽标用缩小加粗字 */
.file-chip .fc-icon[class*="fb-"] { font-size: 11px; font-weight: 800; color: #fff; letter-spacing: -.3px; }
.fc-icon.fb-word { background: #2b579a; }
.fc-icon.fb-pdf { background: #d93025; }
.fc-icon.fb-excel { background: #1d6f42; }
.fc-icon.fb-ppt { background: #d24726; }
.fc-icon.fb-image { background: #10b981; }
.fc-icon.fb-video { background: #5b6cff; }
.fc-icon.fb-audio { background: #f97316; }
.fc-icon.fb-text { background: #64748b; }
.file-chip .fc-name { font-size: 14px; font-weight: 600; }
.file-chip .fc-size { font-size: 12px; color: var(--text-3); }
.file-chip .fc-remove { margin-left: auto; background: none; border: none; color: var(--text-3); font-size: 16px; cursor: pointer; padding: 2px 6px; }
.file-chip .fc-remove:hover { color: var(--danger, #dc2626); }

/* 选项区 */
.options-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.option-row { display: flex; flex-direction: column; gap: 10px; }
.option-label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 8px 16px; border-radius: 99px; font-size: 13px; font-weight: 500;
  border: 1.5px solid var(--border); background: var(--card); color: var(--text-2); transition: all .15s;
}
.pill:hover { border-color: var(--primary); color: var(--primary); }
.pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
/* 动作行单选（fields kind=actions）：一行一个动作，图标 + 名称在左、说明文字靠右，行间细分隔线；
   选中态用左侧色条 + 浅底（不用 pill 的实心填充，避免整行大面积高亮）。
   行元素仍是 .pill，点击选中与取值走同一套逻辑（见 app.js 的 pill-group 单选） */
.action-list { flex-direction: column; flex-wrap: nowrap; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--card); overflow: hidden; }
.action-list .pill {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px;
  border: 0; border-radius: 0; background: transparent; color: var(--text); font-weight: 600; text-align: left;
}
.action-list .pill + .pill { border-top: 1px solid var(--border); }
.action-list .pill:hover { background: var(--primary-soft); color: var(--primary); }
.action-list .pill:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.action-list .pill.active { background: var(--primary-soft); color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.action-list .ai-icon { display: grid; place-items: center; flex-shrink: 0; color: currentColor; }
.action-list .ai-icon .glyph { width: 19px; height: 19px; }
.action-list .ai-label { flex-shrink: 0; }
.action-list .ai-hint { margin-left: auto; padding-left: 12px; font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.action-list .pill:hover .ai-hint, .action-list .pill.active .ai-hint { color: var(--primary); }
/* 危险操作按钮（编辑器删除页面等） */
.btn-danger { background: var(--danger, #dc2626); border-color: var(--danger, #dc2626); color: #fff; }
.btn-danger:hover { filter: brightness(.94); color: #fff; }
/* PDF 编辑器工作台（pdfEditorSetup 构建）：工具栏 / 选项面板 / 页面预览舞台 */
.ped-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ped-sep { flex: 1; }
.ped-zoom { font-size: 12.5px; font-weight: 700; color: var(--text-2); min-width: 42px; text-align: center; }
.ped-panel { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.ped-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ped-label { font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 58px; flex-shrink: 0; }
.ped-hint { font-size: 12.5px; color: #b47b00; background: #fffaf0; border: 1px solid #f0c36d; border-radius: 8px; padding: 6px 10px; line-height: 1.6; }
/* 放置状态条：印章/签名进入"点击页面放置"后显示，可连续放置，点完成结束 */
.ped-placing { display: flex; align-items: center; gap: 10px; background: #eef6ee; border: 1px solid #bfe3c4; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; color: #1d7a3e; }
.ped-placing span { flex: 1; }
.ped-stage { border: 1px solid var(--border); border-radius: var(--radius); background: #f4f6fb; padding: 14px; max-height: 760px; overflow: auto; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.ped-pagebox { position: relative; margin: 0; }
.ped-page { display: block; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .13); border-radius: 4px; cursor: crosshair; max-width: 100%; height: auto; }
body.ped-fs .ped-page { margin: 0 auto; }
.ped-pageno { position: absolute; left: 8px; top: 8px; font-size: 11px; color: #fff; background: rgba(30, 40, 60, .62); border-radius: 99px; padding: 2px 9px; pointer-events: none; }
/* 调整顺序模式：角标变拖拽把手（桌面鼠标/触屏均可按住拖动） */
.ped-stage.ped-arrange .ped-pageno { pointer-events: auto; cursor: grab; touch-action: none; user-select: none; padding: 3px 11px; }
.ped-stage.ped-arrange .ped-pageno:hover { background: var(--primary); }
.ped-stage.ped-arrange .ped-pageno::after { content: ' ⠿'; opacity: .85; }
/* 拖拽中的悬浮卡片（GPU transform 跟随）+ 网格里的虚线占位块 */
.ped-pagebox.ped-dragging { border-radius: 6px; box-shadow: 0 12px 26px rgba(20, 30, 60, .3); opacity: .97; will-change: transform; }
.ped-float-ph { border: 1.5px dashed var(--primary); border-radius: 6px; background: var(--primary-soft, #eef1ff); opacity: .55; }

/* 缩略图网格视图（页面管理，参考主流 PDF 页面管理器）：网格排列 + 每页勾选 + 页码在下方 */
.ped-stage.ped-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 14px; justify-items: center; align-items: start; justify-content: center; }
.ped-stage.ped-grid .ped-pagebox { width: 100%; display: flex; flex-direction: column; align-items: center; }
.ped-stage.ped-grid canvas.ped-page { border: 1px solid #c9d3e4; border-radius: 4px; box-shadow: none; cursor: grab; }
.ped-stage.ped-arrange.ped-grid canvas.ped-page { touch-action: none; }
.ped-stage.ped-grid .ped-pagebox.ped-selected canvas.ped-page { border-color: #205aef; box-shadow: 0 0 0 1px #205aef; }
.ped-stage.ped-grid .ped-pageno { display: none; }
.ped-check { position: absolute; left: 7px; top: 7px; z-index: 2; display: grid; place-items: center; width: 26px; height: 26px; cursor: pointer; background: rgba(255, 255, 255, .9); border-radius: 6px; }
.ped-check input { width: 18px; height: 18px; margin: 0; accent-color: #005cf8; cursor: pointer; }
.ped-panel .input { border-color: var(--border-strong, #cbd5e1); }
.ped-tilenum { margin-top: 7px; font-size: 12px; color: var(--text); line-height: 1; }
/* 懒渲染占位：未渲染页用虚线白块按页面比例占位，滚动到附近再画 */
.ped-ph { width: 100%; background: #fff; border: 1px dashed var(--border-strong, #cbd5e1); border-radius: 4px; box-sizing: border-box; }
.ped-selall { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ped-selall input { width: 16px; height: 16px; margin: 0; accent-color: #005cf8; cursor: pointer; }
.ped-tip { font-size: 13px; color: var(--text-3); padding: 26px 0; text-align: center; }
/* 导出结果区：转格式/提取内容/密码等"产出新文件"的操作把结果（含内嵌预览）放这里 */
.ped-results { display: flex; flex-direction: column; gap: 10px; }
.ped-results[hidden] { display: none; }
.ped-results-title { font-size: 13px; font-weight: 700; color: var(--text-2); }
.ped-thumb { max-height: 46px; max-width: 200px; vertical-align: middle; }
.ped-padwrap { flex: 1; min-width: 0; }
.ped-pad { max-width: 100%; touch-action: none; cursor: crosshair; border-radius: 8px; display: block; }
.ped-slider { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; }
.ped-slider input[type="range"] { flex: 1; accent-color: var(--primary); }
/* 窄屏（手机）下动作行：压缩内边距与说明字号并允许说明换行，避免把动作名挤窄 */
@media (max-width: 480px) {
  .action-list .pill { gap: 8px; padding: 12px 12px; }
  .action-list .ai-label { white-space: nowrap; }
  .action-list .ai-hint { padding-left: 8px; font-size: 11px; line-height: 1.35; text-align: right; }
}
.select, .input, .textarea {
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px;
  background: var(--card); color: var(--text); outline: none; transition: border-color .15s; width: 100%;
}
.select:focus, .input:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(77, 107, 254, .12); }
.textarea { resize: vertical; min-height: 96px; }
.input-row { display: flex; gap: 10px; align-items: center; }
.input-row .input { flex: 1; }
.slider-row { display: flex; align-items: center; gap: 14px; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--primary); }
.slider-val { font-size: 13px; font-weight: 700; color: var(--primary); min-width: 52px; text-align: right; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch-row .sr-desc { font-size: 12px; color: var(--text-3); }
/* 数值输入：右侧带单位 */
.num-row { display: flex; align-items: center; gap: 8px; }
.num-row .input { flex: 1; }
.num-unit { font-size: 13px; color: var(--text-3); flex-shrink: 0; min-width: 28px; }
/* 可折叠高级选项：默认收起，保持基础流程简洁 */
.opt-group {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); overflow: hidden;
}
.opt-group-head {
  cursor: pointer; list-style: none; padding: 12px 14px; font-size: 13px; font-weight: 600;
  color: var(--text-2); display: flex; align-items: center; gap: 8px; user-select: none;
}
.opt-group-head::-webkit-details-marker { display: none; }
.opt-group-head::before {
  content: ""; width: 0; height: 0; flex-shrink: 0;
  border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
  transition: transform .15s;
}
.opt-group[open] > .opt-group-head::before { transform: rotate(90deg); }
.opt-group-head:hover { color: var(--primary); }
.opt-group-hint { font-size: 12px; font-weight: 400; color: var(--text-3); }
.opt-group-body {
  display: flex; flex-direction: column; gap: 16px;
  padding: 4px 14px 16px; border-top: 1px dashed var(--border);
}
/* 多选 pill：选中态用描边区分，与单选填充态区分开 */
.pill-group[data-multi] .pill.active { background: var(--primary-soft, #eef1ff); color: var(--primary); border-color: var(--primary); }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; cursor: pointer; z-index: 2; margin: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 99px; background: #d5dbe7; transition: all .2s;
}
.switch .track::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px; transition: all .2s; box-shadow: var(--shadow-sm);
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { left: 23px; }

/* 操作栏 */
.action-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.action-hint { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 5px; }

/* 进度 */
.progress-wrap { display: flex; flex-direction: column; gap: 8px; }
.progress-info { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.progress { height: 10px; background: #edf0f7; border-radius: 99px; overflow: hidden; }
.progress .bar { height: 100%; border-radius: 99px; background: var(--gradient); transition: width .3s; }
.progress .bar.indeterminate { width: 38%; animation: indeterminate 1.2s ease-in-out infinite; }
/* 两端各留 18% 重叠：任何一帧都能看到色块，不会出现"整条空轨道"的错觉 */
@keyframes indeterminate {
  0% { margin-left: -20%; } 100% { margin-left: 82%; }
}
.processing-meta { display: flex; gap: 18px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }

/* 结果卡 */
.result-card {
  border: 1.5px solid #bce8cb; background: var(--success-soft); border-radius: var(--radius);
  padding: 18px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.result-card .rc-icon {
  width: 36px; height: 36px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.result-card .rc-icon .glyph { width: 20px; height: 20px; color: var(--success); }
.result-card .rc-name { font-weight: 700; font-size: 15px; }
.result-card .rc-meta { font-size: 12px; color: #3f8f5b; }
.result-card .rc-actions { margin-left: auto; display: flex; gap: 8px; }

.alert { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.alert > .glyph { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.alert-error > .glyph { color: #dc2626; }
.alert-info > .glyph { color: var(--primary); }
.alert-warn > .glyph { color: #d97706; }
.alert-error { background: var(--danger-soft); color: #b91c1c; border: 1px solid #f6c6c6; }
.alert-info { background: var(--primary-soft); color: #3b5bdb; border: 1px solid #d7dfff; }
.alert-warn { background: var(--warning-soft); color: #92600a; border: 1px solid #f3ddb0; }

/* 状态演示（原型多状态展示） */
.state-demo { border-top: 1px dashed var(--border-strong); padding-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.state-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.state-tab {
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: #f1f4f9; border: none; color: var(--text-2);
}
.state-tab.active { background: var(--text); color: #fff; }
.state-panel { display: none; flex-direction: column; gap: 16px; background: #fafbfe; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; }
.state-panel.show { display: flex; }
.state-label { font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: 1px; }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 50%, #eef1f6 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 相机取景 / 录制 */
.viewfinder {
  position: relative; background: #10131c; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; display: grid; place-items: center; color: #9aa3b8;
}
.viewfinder .vf-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 33.3% 33.3%; }
.viewfinder .vf-face { display: grid; place-items: center; }
.viewfinder .vf-face .glyph { width: 86px; height: 86px; color: #9aa3b8; opacity: .85; }
.viewfinder .vf-tag { position: absolute; top: 12px; left: 12px; background: rgba(239, 68, 68, .92); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; display: flex; gap: 6px; align-items: center; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.record-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.rec-btn {
  width: 58px; height: 58px; border-radius: 50%; border: 4px solid var(--danger);
  background: #fff; display: grid; place-items: center;
}
.rec-btn .core { width: 34px; height: 34px; border-radius: 50%; background: var(--danger); transition: all .2s; }
.rec-btn.recording .core { border-radius: 8px; width: 26px; height: 26px; }
.rec-timer { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1px; }

/* 预览画布区（AI 图像类） */
.canvas-preview {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background-image: linear-gradient(45deg, #e9edf5 25%, transparent 25%, transparent 75%, #e9edf5 75%), linear-gradient(45deg, #e9edf5 25%, #f7f9fc 25%, #f7f9fc 75%, #e9edf5 75%);
  background-size: 22px 22px; background-position: 0 0, 11px 11px;
  min-height: 260px; display: grid; place-items: center; border: 1px solid var(--border);
}
.canvas-preview .ph { display: grid; place-items: center; }
.canvas-preview .ph .glyph { width: 92px; height: 92px; color: #b3bdd0; filter: drop-shadow(0 8px 16px rgba(16, 24, 40, .10)); }
.canvas-preview .cp-tag { position: absolute; bottom: 12px; right: 12px; background: rgba(23, 29, 51, .8); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 7px; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(16,24,40,.15); }
.compare-handle::after { content: "⇔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; background: #fff; border-radius: 50%; display: grid; place-items: center; font-size: 14px; box-shadow: var(--shadow); }

/* 输出区（生成器 / 查询类） */
.output-box {
  border: 1px solid var(--border); border-radius: var(--radius); background: #fafbfe;
  padding: 24px; display: grid; place-items: center; gap: 14px; text-align: center; min-height: 220px;
}
.output-box .qr-demo {
  width: 168px; height: 168px; background:
    repeating-conic-gradient(#1d2433 0% 25%, #fff 0% 50%) 0 0 / 24px 24px;
  border: 10px solid #fff; box-shadow: var(--shadow); border-radius: 6px;
}
.code-block {
  background: #0f1420; color: #a8e6b4; font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 13px; border-radius: var(--radius-sm); padding: 18px; overflow-x: auto;
  text-align: left; width: 100%; line-height: 1.7; white-space: pre;
}
.kv-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
.kv-table th, .kv-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.kv-table th { color: var(--text-3); font-weight: 600; width: 38%; background: #fafbfe; }
.kv-table tr:last-child th, .kv-table tr:last-child td { border-bottom: none; }

/* ---------- 侧边栏 ---------- */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 16px); }
.side-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.side-card h4 { font-size: 14px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.vip-promo {
  background: var(--vip-gradient); color: #fff; border: none; position: relative; overflow: hidden;
}
.vip-promo::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(247, 183, 51, .14); right: -50px; top: -50px; }
.vip-promo h4 { color: #ffd97a; }
.vip-promo p { font-size: 13px; opacity: .85; margin-bottom: 14px; }
.vip-promo ul { list-style: none; font-size: 13px; display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.vip-promo li::before { content: "✦ "; color: #ffd97a; }
.related-list { display: flex; flex-direction: column; }
.related-list a {
  display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 9px;
  font-size: 13px; color: var(--text-2); transition: background .15s;
}
.related-list a:hover { background: var(--primary-soft); color: var(--primary); }
.related-list .tool-icon { width: 32px; height: 32px; border-radius: 9px; }
.related-list .tool-icon .glyph { width: 16px; height: 16px; }
.lg-ico {
  width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft);
  display: grid; place-items: center; flex-shrink: 0;
}
.lg-ico .glyph { width: 18px; height: 18px; color: var(--primary); }

/* ---------- 步骤说明 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 6px 0 2px; }
.step {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow-sm);
}
.step-num {
  width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft); color: var(--primary);
  font-weight: 800; display: grid; place-items: center; flex-shrink: 0; font-size: 14px;
}
.step h5 { font-size: 14px; }
.step p { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; padding-bottom: 40px; }
.faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 0; overflow: hidden; box-shadow: var(--shadow-sm);
}
.faq summary {
  padding: 15px 18px; font-size: 14px; font-weight: 600; cursor: pointer; 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: 18px; color: var(--text-3); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { color: var(--primary); }
.faq .faq-body { padding: 0 18px 15px; font-size: 13px; color: var(--text-2); line-height: 1.75; }

/* ---------- VIP 横幅 ---------- */
.vip-banner {
  background: var(--vip-gradient); border-radius: var(--radius); color: #fff;
  padding: 26px 30px; display: flex; align-items: center; gap: 22px; margin: 6px 0 36px;
  position: relative; overflow: hidden;
}
.vip-banner::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(247, 183, 51, .12); }
.vip-banner h3 { font-size: 19px; display: flex; gap: 8px; align-items: center; }
.vip-banner p { font-size: 13px; opacity: .85; margin-top: 5px; }
.vip-banner .btn { margin-left: auto; position: relative; z-index: 1; flex-shrink: 0; }

/* ---------- 定价卡 ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.price-card {
  background: var(--card); border: 2px solid var(--border); border-radius: 18px; padding: 26px;
  text-align: center; position: relative; transition: all .2s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-card.popular { border-color: var(--vip-gold); box-shadow: 0 10px 30px rgba(247, 183, 51, .18); }
.price-card .pop-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #ffd97a, #f7b733); color: #5b3a00;
  font-size: 12px; font-weight: 800; padding: 4px 14px; border-radius: 99px;
}
.price-card h3 { font-size: 16px; }
.price-card .price { margin: 14px 0 2px; }
.price-card .price b { font-size: 38px; }
.price-card .price span { color: var(--text-3); font-size: 13px; }
.price-card .origin { font-size: 13px; color: var(--text-3); text-decoration: line-through; }
.price-card ul { list-style: none; margin: 18px 0 22px; font-size: 13px; color: var(--text-2); display: flex; flex-direction: column; gap: 9px; text-align: left; }
.price-card li::before { content: "✓ "; color: var(--success); font-weight: 700; }

/* 7 天体验卡横条 */
.trial-card {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  background: #fff9ec; border: 2px solid #f6d488; border-radius: 18px;
  padding: 20px 26px; margin-bottom: 30px;
}
.trial-info { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 250px; }
.trial-tag {
  background: #f7b733; color: #5b3a00; font-size: 12px; font-weight: 800;
  padding: 5px 13px; border-radius: 99px; flex-shrink: 0;
}
.trial-info b { font-size: 16px; }
.trial-info p { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.trial-price { color: #b47b00; white-space: nowrap; }
.trial-price b { font-size: 34px; }
.trial-price span { font-size: 13px; color: var(--text-3); }
.trial-card .btn { flex-shrink: 0; }

/* ---------- 表单页（登录） ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 40px 20px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--card); border-radius: 20px;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 38px 34px;
}
.auth-card h1 { font-size: 22px; text-align: center; }
.auth-card .sub { text-align: center; font-size: 13px; color: var(--text-3); margin: 8px 0 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-wechat { background: #07c160; color: #fff; }
.btn-wechat:hover { background: #06ad56; }
.code-btn { flex-shrink: 0; }
.auth-foot { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 20px; line-height: 1.7; }
.auth-foot a { color: var(--primary); }

/* ---------- 会员中心 ---------- */
.profile-card {
  background: var(--vip-gradient); border-radius: 20px; color: #fff; padding: 28px;
  display: flex; align-items: center; gap: 20px; position: relative; overflow: hidden;
}
.profile-card::after { content: ""; position: absolute; right: -70px; bottom: -80px; width: 240px; height: 240px; border-radius: 50%; background: rgba(247, 183, 51, .1); }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--gradient); display: grid; place-items: center; font-size: 30px; border: 3px solid rgba(255, 255, 255, .35); }
.profile-info h2 { font-size: 20px; display: flex; gap: 10px; align-items: center; }
.profile-info p { font-size: 13px; opacity: .8; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-card b { font-size: 24px; display: block; }
.stat-card span { font-size: 12px; color: var(--text-3); }
.list-group { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.list-group a, .list-group .lg-item {
  display: flex; align-items: center; gap: 12px; padding: 15px 20px; font-size: 14px;
  border-bottom: 1px solid var(--border); transition: background .15s;
}
.list-group a:last-child, .list-group .lg-item:last-child { border-bottom: none; }
.list-group a:hover { background: #fafbfe; }
.list-group .arrow { margin-left: auto; color: var(--text-3); }
.order-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.order-table th { text-align: left; padding: 12px 14px; background: #fafbfe; color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--border); }
.order-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); }
.status-paid { color: var(--success); font-weight: 700; }

/* ---------- 帮助页 ---------- */
.help-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 28px 0 48px; align-items: start; }
.help-nav { position: sticky; top: calc(var(--header-h) + 16px); }
.help-nav a { display: block; padding: 10px 14px; border-radius: 9px; font-size: 14px; color: var(--text-2); margin-bottom: 2px; }
.help-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.help-nav a:hover { background: #f4f6fa; }
.prose { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 34px; box-shadow: var(--shadow-sm); }
.prose h1 { font-size: 22px; margin-bottom: 8px; }
.prose h2 { font-size: 17px; margin: 26px 0 10px; }
.prose p { font-size: 14px; color: var(--text-2); margin-bottom: 12px; line-height: 1.85; }
.prose ul { padding-left: 22px; font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.prose li { margin-bottom: 6px; line-height: 1.75; }
.prose .muted { color: var(--text-3); font-size: 13px; }

/* ---------- 页脚 ---------- */
.footer { background: #fff; border-top: 1px solid var(--border); margin-top: 24px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 44px 0 30px; }
.footer h5 { font-size: 14px; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--text-3); }
.footer-links a:hover { color: var(--primary); }
.footer-brand p { font-size: 13px; color: var(--text-3); margin-top: 12px; max-width: 300px; line-height: 1.7; }
.footer-bottom { border-top: 1px solid var(--border); padding: 16px 0; font-size: 12px; color: var(--text-3); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- 原型导航页 ---------- */
.proto-hero { background: var(--vip-gradient); color: #fff; padding: 36px 0; }
.proto-group { margin: 26px 0; }
.proto-group h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.proto-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.proto-links a {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; display: flex; align-items: center; gap: 8px; transition: all .15s;
}
.proto-links a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.proto-links code { margin-left: auto; font-size: 11px; color: var(--text-3); }
.proto-links .glyph { width: 16px; height: 16px; }
.mobile-cta .glyph { width: 13px; height: 13px; color: var(--success); }

/* ---------- 移动端固定底栏 ---------- */
.mobile-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  gap: 10px; align-items: center;
}
.mobile-cta .mc-hint { font-size: 12px; color: var(--text-3); line-height: 1.4; }

/* ---------- 移动端底部导航 ---------- */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 4px 0 2px; font-size: 11px; font-weight: 600; color: var(--text-3);
  border-radius: 10px; transition: color .15s;
}
.bottom-nav a .glyph { width: 22px; height: 22px; }
.bottom-nav a:active { background: var(--primary-soft); }
.bottom-nav a.active { color: var(--primary); }
.bottom-nav a.bn-vip { color: #b47b00; }
.bottom-nav a.bn-vip.active { color: #b47b00; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .tool-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar .side-card { flex: 1 1 280px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .help-layout { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .help-nav { position: static; display: flex; gap: 6px; overflow-x: auto; }
  .help-nav a { flex-shrink: 0; }
}

@media (max-width: 768px) {
  :root { --header-h: 56px; }
  html { scroll-behavior: smooth; }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .container { padding: 0 14px; }
  [id] { scroll-margin-top: calc(var(--header-h) + 10px); }

  /* 头部：导航移到「底部导航」，顶栏只保留品牌 */
  .nav { display: none; }
  .header-actions .btn { display: none; }
  .header-inner { gap: 10px; }
  .logo { font-size: 18px; }
  .logo-mark { width: 31px; height: 31px; border-radius: 9px; }

  /* 底部导航 */
  .bottom-nav { display: flex; }
  .mobile-cta { bottom: calc(60px + env(safe-area-inset-bottom)); }

  /* 按钮 / 表单：触控目标与防缩放 */
  .btn { min-height: 42px; }
  .btn-sm { min-height: 36px; }
  .input, .select, .textarea { font-size: 16px; padding: 11px 14px; }
  .pill { padding: 9px 14px; }
  .slider-row input[type="range"] { height: 30px; }
  .search-box input { font-size: 16px; padding: 10px 12px; }

  /* 首页 */
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero { padding: 34px 0 40px; }
  .hero h1 { font-size: 23px; line-height: 1.4; }
  .hero h1 .glyph { width: 21px; height: 21px; }
  .hero p { font-size: 14px; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
    margin: 22px auto 0; max-width: 400px; }
  .hero-stats span { background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px; padding: 10px 8px; }
  .hero-stats b { font-size: 18px; }
  .search-wrap { margin-top: 22px; }
  .cat-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; margin: 0 -14px 18px;
    padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tabs .chip { flex-shrink: 0; }
  .section { padding: 32px 0 4px; }
  .section-title { font-size: 18px; }

  /* 工具页 */
  .breadcrumb { padding-top: 14px; font-size: 12px; flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
  .breadcrumb b { overflow: hidden; text-overflow: ellipsis; }
  .tool-head { margin: 12px 0 16px; }
  .tool-head h1 { font-size: 21px; gap: 10px; }
  .tool-head .desc { font-size: 13px; }
  .workspace { padding: 16px; gap: 18px; }
  .dropzone { padding: 30px 14px; }
  .dropzone h4 { font-size: 15px; }
  .dropzone p { font-size: 12px; }
  .action-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .action-bar .btn-lg { width: 100%; padding: 14px 20px; }
  .action-hint { justify-content: center; text-align: center; }
  .state-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .state-tabs::-webkit-scrollbar { display: none; }
  .state-tab { flex-shrink: 0; padding: 9px 14px; }
  .state-panel { padding: 14px; }
  .result-card .rc-actions { margin-left: 0; width: 100%; }
  .result-card .rc-actions .btn { flex: 1; }
  .processing-meta { gap: 12px; }
  .output-box { padding: 18px 14px; min-height: 180px; }
  .table-scroll { overflow-x: auto; }
  .table-scroll .kv-table { min-width: 430px; }
  .table-scroll .kv-table th { width: auto; min-width: 100px; white-space: nowrap; }
  .canvas-preview { min-height: 200px; }
  .record-controls { flex-wrap: wrap; gap: 12px; }
  .rec-timer { font-size: 19px; }
  .tool-layout { padding-bottom: 92px; }
  .mobile-cta { display: flex; }
  .sidebar { flex-direction: column; }
  .sidebar .side-card { width: 100%; flex: none; }
  .related-list a { padding: 11px 6px; font-size: 14px; }
  .faq summary { font-size: 13.5px; padding: 14px 15px; }
  .steps { grid-template-columns: 1fr; }

  /* VIP / 账户页 */
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .trial-card { flex-direction: column; align-items: stretch; text-align: center; gap: 16px; padding: 22px 18px; }
  .trial-info { flex-direction: column; gap: 10px; }
  .trial-card .btn { width: 100%; }
  .vip-banner { flex-direction: column; align-items: stretch; gap: 14px; padding: 22px; }
  .vip-banner .btn { margin-left: 0; width: 100%; }
  .auth-card { padding: 30px 22px; }
  .input-row { flex-wrap: wrap; }
  .profile-card { flex-direction: column; text-align: center; padding: 24px 18px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  table.order-table { display: block; overflow-x: auto; white-space: nowrap; }

  /* 页脚 / 其他 */
  .footer-inner { grid-template-columns: 1fr; gap: 22px; padding: 30px 0 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }
  .proto-links { grid-template-columns: repeat(2, 1fr); }
  .proto-hero { padding: 26px 0; }
  .help-layout { padding: 20px 0 40px; }
}

@media (max-width: 480px) {
  /* 工具卡片：单列列表式，信息密度与触控更友好 */
  .card-grid { grid-template-columns: 1fr; gap: 10px; }
  .tool-card { flex-direction: row; align-items: center; padding: 13px 14px; gap: 12px; }
  .tool-card-top { flex: 1; min-width: 0; }
  .tool-card h3 { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tool-card .desc { display: none; }
  .tool-card-meta { margin-left: auto; flex-direction: column; align-items: flex-end; gap: 5px; }
  .tc-usage { display: none; }
  .tool-card::after { content: "›"; color: #c3cad8; font-size: 19px; font-weight: 700; }
  .tool-icon { width: 42px; height: 42px; border-radius: 12px; }
  .tool-icon .glyph { width: 22px; height: 22px; }

  .hero h1 { font-size: 21px; }
  .logo small { display: none; }

  /* 排行榜窄屏精简 */
  .rank-item { padding: 11px 12px; gap: 10px; }
  .ri-desc { display: none; }
  .ri-usage { font-size: 12px; }
  .ri-trend { min-width: 30px; font-size: 11px; }
  .ri-trend .glyph { width: 12px; height: 12px; }
  .section-title { font-size: 17px; }
  .price-card { padding: 22px 18px; }
  .auth-card { padding: 26px 18px; }
  .tool-head h1 { font-size: 19px; }
  .proto-links { grid-template-columns: 1fr; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 19px; }
  .workspace { padding: 13px; }
  .state-tab { padding: 8px 11px; font-size: 12px; }
}

/* ============================================================
   补充（正式站新增组件，沿用设计令牌）
============================================================ */
[hidden] { display: none !important; }
.alert-success {
  background: var(--success-soft);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, .3);
}
.check-item {
  display: flex;
  justify-content: space-between;
  padding: 9px 4px;
  font-size: 14px;
  border-bottom: 1px dashed var(--border);
}
.check-item span:first-child { color: var(--text-2); }
.check-item:last-child { border-bottom: none; }
.price-card .pop-tag { white-space: nowrap; }

@media (max-width: 480px) {
  .section-head { flex-wrap: wrap; row-gap: 4px; }
  .section-title { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
  .section-sub { flex-basis: 100%; order: 3; }
  .section-more { margin-left: auto; font-size: 12px; white-space: nowrap; }
}
