/* ============================================================
 * FISHMQ 手摇相册定制系统 · 网页版 v2.0
 * css/pages.css —— 各页面样式 + 双端自适应
 * 宽屏（≥900px）走左右分栏；窄屏自动切换为单列堆叠
 * ============================================================ */

/* ============ home 首页（1:1 对齐小程序 pages/home/home.wxss） ============ */
/* 品牌衬线专字栈 + 同款墨色变量（仅作用于这两个入口页，不动全局组件） */
.page-home,
.page-index {
  --brand-serif: "Didot", "Bodoni 72", "Playfair Display", "Cormorant Garamond", "Source Han Serif SC", "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --ink: #3a2e22;
  --ink-soft: #9a8a76;
}
.page-home {
  align-items: center;
  justify-content: center;
  /* 米色基底 + 极轻竖向过渡，与小程序同色系无缝衔接 */
  background: linear-gradient(180deg, #f9f5f0 0%, #f4eee5 100%);
  padding: 40px 24px;
  text-align: center;
}
/* Logo：精致圆角方形 + 奶茶渐变底 + 柔散投影 + FISHMQ 字样（对标小程序品牌 logo 质感） */
.home-logo {
  width: 96px; height: 96px;
  border-radius: 24px;
  background: linear-gradient(135deg, #d8a05f 0%, #b87c46 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--brand-serif);
  font-size: 30px; font-weight: 700; letter-spacing: 1px;
  margin: 0 auto 22px;
  box-shadow: 0 12px 28px rgba(176,124,80,0.30), inset 0 1px 0 rgba(255,255,255,0.32);
}
/* 主标题：品牌衬线、纤细、深咖墨、舒展字距（对标小程序 .brand-name） */
.home-title {
  font-family: var(--brand-serif);
  font-size: 26px; font-weight: 300;
  color: var(--ink);
  letter-spacing: 8px;
  /* 补偿末字右侧字距留白，视觉真正居中 */
  padding-left: 8px;
}
/* 副标题：同一品牌字栈，层级弱于主标题（对标小程序 .brand-slogan） */
.home-sub {
  font-family: var(--brand-serif);
  color: var(--ink-soft);
  font-size: 13px; font-weight: 300;
  margin-top: 12px;
  letter-spacing: 2px;
  line-height: 1.5;
}
.home-actions {
  width: 100%; max-width: 320px;
  margin-top: 48px;
  display: flex; flex-direction: column; gap: 16px;
}

/* ============ index 欢迎页（1:1 对齐小程序 pages/index/index.wxss） ============ */
.page-index {
  background: linear-gradient(180deg, #f9f5f0 0%, #f4eee5 100%);
}
/* 顶部导航 / 底部操作栏透出页面渐变，避免色块接缝 */
.page-index .fmq-navbar,
.page-index .fmq-footer {
  background: transparent;
}
.page-index .fmq-body { padding: 24px 20px 8px; }
.welcome-hero { text-align: center; padding: 12px 0 24px; }
.welcome-hero h1 {
  font-family: var(--brand-serif);
  font-size: 24px; font-weight: 800;
  color: var(--ink);
  letter-spacing: 2px;
  margin: 0 0 12px;
}
.welcome-hero p {
  color: #a89880; font-size: 13px;
  line-height: 1.8; margin: 0;
  letter-spacing: 0.3px;
}
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* 功能介绍页始终保持 2×2 网格（与小程序一致，不被移动端单列规则影响） */
.page-index .feature-grid { grid-template-columns: repeat(2, 1fr); }
/* 卡片：软渐变底 + 极细品牌描边（对标小程序 .feature-item） */
.feature-card {
  background: linear-gradient(150deg, #faf7f3 0%, #f5f0eb 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(212,168,128,0.14);
  padding: 18px 14px;
  box-shadow: 0 2px 10px rgba(74,55,40,0.05);
}
.feature-card__icon { font-size: 26px; margin-bottom: 10px; }
.feature-card__title { font-size: 15px; font-weight: 600; color: #7a6b5c; margin-bottom: 6px; }
.feature-card__desc { font-size: 12px; color: #9a8a76; line-height: 1.6; }

/* ── 入口页按钮：仅作用这两个入口页，不改全局 .fmq-btn ── */
/* 启动首页：胶囊形 + 品牌衬线 + 小程序同款渐变（对标 .entry-btn / .entry-primary / .entry-secondary） */
.page-home .fmq-btn {
  border-radius: 999px;
  font-family: var(--brand-serif);
  font-weight: 400;
  letter-spacing: 6px;
  min-height: 46px;
  padding-left: calc(0.5em + 6px); /* 补偿字距右侧留白，文字视觉居中 */
}
.page-home .fmq-btn--primary {
  background: linear-gradient(135deg, #d8a05f 0%, #b87c46 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(176,124,80,0.40), inset 0 1px 0 rgba(255,255,255,0.32);
}
.page-home .fmq-btn--outline {
  background: linear-gradient(135deg, #f6ecdd 0%, #efe0cb 100%);
  color: #9c6b32;
  border: 1.5px solid rgba(212,163,115,0.9);
  box-shadow: 0 8px 20px rgba(191,137,96,0.18);
}
/* 功能介绍页吸底「开始制作 →」：圆角 12px + 小程序同款渐变（对标 .btn-start） */
.page-index .fmq-footer .fmq-btn {
  border-radius: 12px;
  font-family: var(--brand-serif);
  font-weight: 700;
  letter-spacing: 4px;
  padding-left: calc(0.5em + 4px);
}
.page-index .fmq-footer .fmq-btn--primary {
  background: linear-gradient(135deg, #d4a373 0%, #bf8960 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(197,151,107,0.30);
}

/* ============ step1 图片导入与编辑（1:1 对齐 pages/step1/step1.wxss） ============
 * rpx→px 按 1rpx = 0.5px 折算，并为桌面端做了可读性放大（字号、圆角、间距）。
 * 结构顺序与小程序一致：模式切换 → 统计栏 → 双栏工作区 → 底部按钮。
 */

/* — 模式切换：分段式控件 — */
.mode-switcher {
  flex: none;
  display: flex;
  gap: 0;
  margin: 0 14px 12px;
  background: #ffffff;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.mode-btn {
  flex: 1;
  min-height: 36px;
  padding: 9px 0;
  border: none;
  outline: none;
  background: transparent;
  color: #a89880;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s, box-shadow 0.2s;
}
.mode-btn.active {
  background: linear-gradient(135deg, #d4a373 0%, #bf8960 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(197, 151, 107, 0.25);
}
.mode-btn:not(.active):hover { background: #f5f0eb; }
.mode-btn:not(.active):active { background: #ece5dc; }

/* 阶段十八 3.3：单页独立模式切换控件（复用 .mode-switcher/.mode-btn，仅缩小内边距/字号） */
.mode-switcher--card {
  margin: 2px 11px 10px;
  padding: 3px;
  box-shadow: none;
  border: 1px solid var(--line, #ece5dc);
}
.mode-switcher--card .mode-btn {
  min-height: 28px;
  padding: 5px 0;
  font-size: 12px;
  border-radius: 7px;
}

/* — 统计栏 — */
.stats-bar {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 14px 12px;
  padding: 10px 14px;
  background: #ffffff;
  border-radius: 11px;
  font-size: 13px;
  color: #7a6b5c;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 2px 8px rgba(0, 0, 0, 0.03);
}
.stats-text { font-weight: 600; letter-spacing: 0.3px; }
.stats-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.btn-clear,
.btn-batch {
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  min-height: 30px;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-clear {
  background: linear-gradient(135deg, #f5f0eb 0%, #e8e2d8 100%);
  color: #8a7a68;
  border: 1px solid rgba(212, 168, 128, 0.2);
}
.btn-clear:active { transform: scale(0.96); background: linear-gradient(135deg, #e8e2d8 0%, #ddd6cc 100%); }
.btn-batch {
  background: linear-gradient(135deg, #ffffff 0%, #faf7f3 100%);
  color: #a9764f;
  border: 1px solid rgba(212, 168, 128, 0.35);
}
.btn-batch:active { transform: scale(0.96); }
.btn-clear[disabled],
.btn-batch[disabled] { opacity: 0.5; pointer-events: none; }

/* — 双栏工作区 — */
.workspace {
  flex: 1;
  display: flex;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 0 14px;
  position: relative;
}
/* 两列中间分隔虚线（对齐小程序 .workspace::before） */
.workspace::before {
  content: '';
  position: absolute;
  left: 50%; top: 24px; bottom: 12px;
  border-left: 1px dashed #d4c8b8;
  transform: translateX(-50%);
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
}
.column {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}
.column::-webkit-scrollbar { width: 6px; }
.column::-webkit-scrollbar-thumb { background: #ded5c9; border-radius: 3px; }
.column-header {
  font-size: 12px;
  color: #7a6b5c;
  font-weight: 600;
  text-align: center;
  padding: 4px 0 10px;
}
.scroll-spacer { height: 16px; flex: none; }

/* — 左列：画布卡片（单列纵向） — */
.canvas-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.canvas-card {
  background: #ffffff;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.canvas-card:active { transform: scale(0.995); }
.canvas-card.is-flash { box-shadow: 0 0 0 3px rgba(200, 86, 60, 0.35); }

/* — 阶段十九：整页拖拽排序视觉 — */
.canvas-card { touch-action: none; cursor: grab; }
.canvas-card:active { cursor: grabbing; }
.canvas-card.is-dragging { opacity: 0.35; transform: none; }
.page-drag-enabled { user-select: none; touch-action: pan-y; }
.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 9999;
  opacity: 0.9; pointer-events: none; border-radius: 11px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}
.page-drag-indicator {
  height: 0; border-top: 3px solid #c8563c; border-radius: 3px;
  margin: -6px 2px 4px; box-shadow: 0 0 8px rgba(200, 86, 60, 0.6);
}
.canvas-card img, .check-card img {
  -webkit-user-drag: none; user-drag: none;
}
.card-header {
  background: linear-gradient(150deg, #faf7f3 0%, #f5f0eb 100%);
  padding: 8px 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ede7df;
}
.card-index { font-weight: 700; font-size: 13px; color: #5c4a3a; }
.card-status {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.card-status.complete { background: #e8f0e5; color: #5a7a52; }
.card-status.empty { background: #fdf3e8; color: #b8845a; }
.card-body { padding: 6px; }

/* — 图片插槽：三种模式共用 — */
.slot-container { aspect-ratio: 10.4 / 8.7; }
.slot-container.single { display: block; }
.slot-container.dual-horizontal { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.slot-container.dual-vertical { display: flex; flex-direction: column; gap: 4px; }
.slot-wrapper { width: 100%; height: 100%; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.slot-container.dual-vertical .slot-wrapper { flex: 1; aspect-ratio: 10.4 / 4.35; }

.image-slot {
  position: relative;
  width: 100%; height: 100%;
  background: #faf7f3;
  border: 1.5px dashed #d4c8b8;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.image-slot:hover { border-color: #c5b495; }
.image-slot.has-image { border-style: solid; border-color: #c5b495; background: #ffffff; }
.slot-img-wrap { position: relative; width: 100%; height: 100%; }
.slot-preview { width: 100%; height: 100%; display: block; object-fit: cover; }

/* 删除按钮：槽位右上角（对齐小程序 .slot-delete） */
.slot-delete {
  position: absolute;
  top: -4px; right: -4px;
  width: 22px; height: 22px;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  color: #ffffff;
  font-size: 15px;
  line-height: 20px;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  transition: background 0.15s, transform 0.15s;
}
.slot-delete:hover { background: rgba(200, 86, 60, 0.9); transform: scale(1.08); }

.upload-hint { text-align: center; color: #c5bfb8; font-size: 12px; padding: 6px; line-height: 1.6; }
.upload-hint .icon { font-size: 22px; margin-bottom: 2px; opacity: 0.45; }

/* — 安全检测标记 — */
.image-slot.abnormal { border: 2px solid #e34d4d; box-shadow: 0 0 0 2px rgba(227, 77, 77, 0.22); }
.abnormal-badge {
  position: absolute; top: 0; right: 0;
  background: #e34d4d; color: #fff;
  font-size: 11px; line-height: 1; font-weight: 700;
  padding: 4px 7px; border-bottom-left-radius: 6px;
  z-index: 5;
}
.slot-checking {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 12px;
  z-index: 4;
}
.slot-checking .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; margin-right: 6px;
  animation: sec-dot-pulse 0.9s infinite ease-in-out;
}
@keyframes sec-dot-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* — 右列：实时核对（与 step3 核对卡片同构） — */
.right-column .check-list { display: flex; flex-direction: column; gap: 10px; }
/* 阶段二十六/二十八：左列编辑卡片含「#N/32 + 状态」header + 单页模式切换 + 图片内容，
   右列核对卡片仅含「第N页」单行 header + 图片内容，结构上（图片内容上移约 52px 桌面 / 44px 移动端，
   实测）右列图片比左列图片上移。修复=把等效下压量加在右列「每张卡片的 .card-body」顶部
   （而非外层 .check-list），这样：① 两列卡片顶部边线严格平齐（CARD=0）② 列标题栏平齐（HDR=0）
   ③ 图片内容仍严格平齐（SLOT_VS_INNER=0）④ 滚动同步天然保留（padding 随卡片一起滚）。
   若加在 .check-list 会把整列首张卡片下压，导致卡片顶部错位（阶段二十六的偏差，阶段二十八纠正）。 */
.page-step1 .right-column .check-card .card-body { padding-top: 52px; }
.right-column .check-card {
  width: 100%;
  background: #ffffff;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 14px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}
.right-column .check-card .card-body {
  position: relative;
  width: 100%;
  padding: 6px;
  background: #ffffff;
}
.right-column .card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 10.4 / 8.7;
  background: #faf7f3;
  overflow: hidden;
  border-radius: 4px;
}
.right-column .img-single { width: 100%; height: 100%; display: block; object-fit: cover; }
.right-column .img-half { position: absolute; object-fit: cover; }
.right-column .img-half.left,
.right-column .empty-half.left { top: 0; left: 0; width: 50%; height: 100%; }
.right-column .img-half.right,
.right-column .empty-half.right { top: 0; left: 50%; width: 50%; height: 100%; }
.right-column .img-half.top,
.right-column .empty-half.top { top: 0; left: 0; width: 100%; height: 50%; }
.right-column .img-half.bottom,
.right-column .empty-half.bottom { top: 50%; left: 0; width: 100%; height: 50%; }
.right-column .empty-block {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #faf7f3; color: #d4c8b8; font-size: 13px;
}
.right-column .empty-half {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  background: #faf7f3; color: #d4c8b8; font-size: 12px;
}
/* 中间白线（折痕）覆盖在图片上方 */
.right-column .fold-line {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 2px;
  background: #ffffff;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.05);
  z-index: 2;
}
.right-column .page-label {
  position: absolute;
  top: calc(50% + 0.78%);
  left: 0.65%;
  background: rgba(245, 240, 235, 0.95);
  color: #3a2e24;
  font-size: clamp(10px, 1.5vw, 15px);
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  z-index: 3;
  border: 1px solid rgba(90, 70, 50, 0.1);
  text-align: center;
  line-height: 1.2;
}

/* — 底部操作栏 — */
.action-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px calc(14px + var(--safe-b));
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.btn-back {
  flex: none;
  min-width: 84px;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid rgba(212, 168, 128, 0.35);
  border-radius: 12px;
  background: #ffffff;
  color: #8a7a68;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.btn-back:active { transform: scale(0.96); background: #f5f0eb; }
.btn-primary {
  flex: 1;
  min-height: 48px;
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #d4a373 0%, #bf8960 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(197, 151, 107, 0.28);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn-primary:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(197, 151, 107, 0.18); }
.btn-primary[disabled] {
  background: #ded5cb;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.85;
}

/* — 违规提示气泡 — */
.sec-tip {
  display: none;
  position: absolute;
  left: 5%; right: 5%;
  bottom: 90px;
  background: rgba(40, 30, 25, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 16px;
  border-radius: 10px;
  z-index: 40;
  white-space: pre-wrap;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.sec-tip.show { display: block; }

/* — 窄屏视图切换（编辑 / 核对） — */
.view-tabs { display: none; }

/* ============ cropper 裁剪页 ============ */
.page-cropper { background: var(--crop-bg); }
.page-cropper .fmq-navbar { background: var(--crop-bg); border-bottom: none; color: #fff; }
.page-cropper .fmq-navbar__back { color: #fff; }
.page-cropper .fmq-navbar__title { color: #fff; }
.cropper-area {
  flex: 1; position: relative; overflow: hidden;
  background: #0f0c08;
  touch-action: none;
  cursor: grab;
  /* 裁剪框强调色：亮金（对齐小程序品牌金 #d4a373 并提亮，保证深浅背景都清晰） */
  --crop-accent: #f7d3a0;
  --crop-accent-dim: rgba(247, 211, 160, 0.38);
}
.cropper-area:active { cursor: grabbing; }
.cropper-area canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.crop-mask { position: absolute; background: rgba(10, 8, 5, .72); pointer-events: none; }
.crop-mask--top { top: 0; left: 0; right: 0; }
.crop-mask--bottom { bottom: 0; left: 0; right: 0; }
.crop-mask--left { left: 0; }
.crop-mask--right { right: 0; }
.crop-frame {
  position: absolute; pointer-events: none;
  border: 2px solid var(--crop-accent);
  /* 轮廓强化：内暗描边（隔离浅色图）+ 外白描边（隔离深色图）+ 投影（立体感） */
  box-shadow:
    inset 0 0 0 1px rgba(20, 12, 6, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.75),
    0 2px 10px rgba(0, 0, 0, 0.35);
}
.crop-frame::before, .crop-frame::after {
  content: ''; position: absolute; background: var(--crop-accent-dim);
}
.crop-frame::before { left: 33.33%; right: 33.33%; top: 0; bottom: 0; width: 1px; }
.crop-frame::after { top: 33.33%; bottom: 33.33%; left: 0; right: 0; height: 1px; }
.crop-frame--dual::before { left: 0; right: 0; top: 50%; height: 1px; width: auto; bottom: auto; }
.crop-frame--dual::after { display: none; }
/* 四角控制点：L 形角标，纯视觉强化（pointer-events:none，不参与拖拽，交互逻辑不变） */
.crop-corner {
  position: absolute;
  width: 26px; height: 26px;
  pointer-events: none;
  /* 多层 drop-shadow 作用于 L 形：内暗描边 + 外白描边 + 投影，深浅背景均清晰 */
  filter:
    drop-shadow(0 0 1px rgba(0, 0, 0, 0.8))
    drop-shadow(0 0 2px rgba(255, 255, 255, 0.85))
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.crop-corner--tl { top: -3px; left: -3px; border-top: 5px solid var(--crop-accent); border-left: 5px solid var(--crop-accent); border-top-left-radius: 5px; }
.crop-corner--tr { top: -3px; right: -3px; border-top: 5px solid var(--crop-accent); border-right: 5px solid var(--crop-accent); border-top-right-radius: 5px; }
.crop-corner--bl { bottom: -3px; left: -3px; border-bottom: 5px solid var(--crop-accent); border-left: 5px solid var(--crop-accent); border-bottom-left-radius: 5px; }
.crop-corner--br { bottom: -3px; right: -3px; border-bottom: 5px solid var(--crop-accent); border-right: 5px solid var(--crop-accent); border-bottom-right-radius: 5px; }
.crop-split {
  position: absolute; left: 0; right: 0; height: 2px;
  background: var(--crop-accent); pointer-events: none;
  opacity: 0.9;
}
.cropper-tip {
  position: absolute; left: 0; right: 0; top: 10px;
  text-align: center; color: rgba(255,255,255,.72);
  font-size: 12px; pointer-events: none;
}
.cropper-bar {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 12px calc(16px + var(--safe-r)) calc(12px + var(--safe-b)) calc(16px + var(--safe-l));
  background: #16120d;
  border-top: 1px solid rgba(255,255,255,.08);
}
.cropper-bar .fmq-btn { flex: 1; }
.cropper-zoom { display: flex; align-items: center; gap: 8px; flex: none; }
.cropper-zoom button {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06); color: #fff;
  font-size: 18px; cursor: pointer; line-height: 1;
}
.cropper-zoom input[type="range"] { width: 110px; }

/* 通用多行输入（激光雕刻页 .engrave-textarea 共用，勿删） */
.fmq-textarea {
  width: 100%; min-height: 110px; resize: vertical;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; font-size: 15px; line-height: 1.6;
  background: #fff; color: var(--text); outline: none;
}
.fmq-textarea:focus { border-color: var(--primary-from); }

/* ============ step2 首页寄语（1:1 对齐 pages/step2.wxss） ============ */
.step2-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* — 编辑面板 — */
.edit-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 4px 20px rgba(0, 0, 0, 0.04);
}
.panel-header { display: flex; flex-direction: column; }
.panel-title {
  font-size: 21px;
  font-weight: 700;
  color: #3a2e24;
  margin-bottom: 6px;
}
.panel-description {
  font-size: 14px;
  color: #a89880;
  line-height: 1.8;
}
.textarea-wrapper { display: flex; flex-direction: column; gap: 8px; }
.textarea-label {
  font-size: 15px;
  font-weight: 600;
  color: #5c4a3a;
}
.greeting-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 140px;
  padding: 14px 16px;
  border: 1.5px solid #e8e2d8;
  border-radius: 12px;
  font-size: 16px;
  line-height: 1.8;
  font-family: inherit;
  background: #fdfbf9;
  color: #3a2e24;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.greeting-textarea:focus {
  border-color: #d4a373;
  box-shadow: 0 0 0 4px rgba(212, 163, 115, 0.08);
}
.char-count {
  font-size: 14px;
  color: #a89880;
  text-align: right;
}
.char-count.warning { color: #d4846b; font-weight: 600; }
.safety-notice {
  padding: 12px 16px;
  background: #fef9f1;
  border-left: 4px solid #d4a373;
  border-radius: 8px;
  font-size: 13px;
  color: #9a7b5a;
  line-height: 1.6;
}

/* — 预览面板 — */
.preview-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 4px 20px rgba(0, 0, 0, 0.04);
}
.preview-title {
  font-size: 17px;
  font-weight: 700;
  color: #3a2e24;
}
.preview-scroll-container {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 10.4 / 8.7;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #ede7df;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 10px 32px rgba(0, 0, 0, 0.1);
  cursor: default;
  touch-action: pan-y;
}
.preview-paper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  will-change: transform;
}
.preview-canvas { display: block; width: 100%; height: 100%; }
.preview-hint {
  font-size: 12px;
  color: #b8a898;
  text-align: center;
}

/* ============ step3 提交订单（1:1 对齐 pages/step3.wxss） ============ */
.page-step3 .check-header {
  flex: none;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #ffffff;
  border-bottom: 1px solid #ede7df;
}
.page-step3 .check-title { font-size: 15px; font-weight: 700; color: #3a2e24; }
.page-step3 .check-stats {
  font-size: 12px; color: #7a6b5c;
  background: #f5f0eb; padding: 5px 13px; border-radius: 15px;
}

.page-step3 .check-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.page-step3 .check-list {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0 0; gap: 16px;
}
.page-step3 .scroll-spacer { height: 30px; flex-shrink: 0; }

.page-step3 .check-card {
  width: 92%; max-width: 420px;
  background: #ffffff; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02), 0 3px 14px rgba(0, 0, 0, 0.04);
  overflow: hidden; transition: all 0.18s ease;
}
.page-step3 .check-card:active {
  transform: scale(0.988);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 5px 18px rgba(212, 163, 115, 0.14);
}
.page-step3 .card-body {
  position: relative; width: 100%; padding: 3.4%;
  box-sizing: border-box; background: #ffffff;
}
.page-step3 .card-inner {
  position: relative; width: 100%; aspect-ratio: 10.4 / 8.7;
  background: #faf7f3; overflow: hidden; border-radius: 3px;
}
.page-step3 .img-single { width: 100%; height: 100%; display: block; object-fit: cover; }
.page-step3 .img-half { position: absolute; object-fit: cover; }
.page-step3 .img-half.left,
.page-step3 .empty-half.left { top: 0; left: 0; width: 50%; height: 100%; }
.page-step3 .img-half.right,
.page-step3 .empty-half.right { top: 0; left: 50%; width: 50%; height: 100%; }
.page-step3 .img-half.top,
.page-step3 .empty-half.top { top: 0; left: 0; width: 100%; height: 50%; }
.page-step3 .img-half.bottom,
.page-step3 .empty-half.bottom { top: 50%; left: 0; width: 100%; height: 50%; }
.page-step3 .empty-block {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #faf7f3; color: #d4c8b8; font-size: 13px;
}
.page-step3 .empty-half {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  background: #faf7f3; color: #d4c8b8; font-size: 12px;
}
/* 中间白线（折痕）覆盖在图片上方 */
.page-step3 .fold-line {
  position: absolute; top: 50%; left: 0; right: 0; height: 2px;
  background: #ffffff; box-shadow: 0 0 3px rgba(0, 0, 0, 0.05); z-index: 2;
}
.page-step3 .page-label {
  position: absolute; top: calc(50% + 0.78%); left: 0.65%;
  background: rgba(245, 240, 235, 0.95); color: #3a2e24;
  font-size: clamp(10px, 1.5vw, 15px); font-weight: 700;
  padding: 2px 5px; border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); z-index: 3;
  border: 1px solid rgba(90, 70, 50, 0.1);
  text-align: center; line-height: 1;
}
/* 第 1 页寄语（底部白边区域内） */
.page-step3 .greeting-text {
  position: absolute; bottom: 0; left: 3.4%; right: 3.4%; height: 3.4%;
  display: flex; align-items: center; justify-content: flex-start;
  font-size: clamp(9px, 1.2vw, 15px); color: #5c4a3a; line-height: 1.2;
  text-align: left; overflow: hidden; white-space: nowrap;
}

/* — 底部操作栏 — */
.page-step3 .bottom-bar {
  flex: none; display: flex; justify-content: center; align-items: center; gap: 8px;
  padding: 12px 16px; background: #ffffff;
  border-top: 1px solid #ede7df; flex-wrap: nowrap;
}
.page-step3 .btn-sm {
  flex: 1 1 0; min-width: 0; max-width: 260px;
  border: none; border-radius: 10px; padding: 12px 8px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap; line-height: 1.3; text-align: center; letter-spacing: 1px;
  transition: all 0.12s ease; cursor: pointer;
}
.page-step3 .btn-sm:active { transform: scale(0.95); }
.page-step3 .btn-gray { background: #ede7df; color: #5c4a3a; }
.page-step3 .btn-submit {
  background: linear-gradient(135deg, #b8845a 0%, #a07245 100%);
  color: #ffffff; box-shadow: 0 2px 8px rgba(184, 132, 90, 0.32);
}

/* — 弹窗遮罩（body 级，step3 专用） — */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(20, 15, 10, 0.45); z-index: 3000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  box-sizing: border-box;
}

/* — 提交确认弹窗 — */
.submit-modal {
  width: 100%; max-width: 380px;
  background: #ffffff; border-radius: 14px;
  padding: 24px 18px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.submit-modal-title {
  font-size: 17px; font-weight: 700; color: #3a2e24;
  text-align: center; margin-bottom: 19px;
}
.submit-form-group { margin-bottom: 16px; }
.submit-form-label { font-size: 13px; color: #5c4a3a; font-weight: 600; margin-bottom: 7px; }
.submit-form-input {
  width: 100%; min-height: 42px;
  background: #f5f0eb; border-radius: 8px;
  padding: 0 12px; box-sizing: border-box;
  font-size: 14px; color: #3a2e24;
  border: 1.5px solid transparent; outline: none;
}
.submit-form-input:focus { border-color: #d4a373; }
.submit-form-input::placeholder { color: #b8a898; }
.submit-checkbox-row { display: flex; align-items: center; margin-bottom: 21px; cursor: pointer; }
.submit-checkbox {
  width: 18px; height: 18px;
  border: 1.5px solid #c5bfb8; border-radius: 4px;
  margin-right: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: #ffffff; transition: all 0.15s ease;
}
.submit-checkbox.checked { background: #b8845a; border-color: #b8845a; }
.submit-checkbox-check { color: #ffffff; font-size: 12px; font-weight: 700; line-height: 1; }
.submit-checkbox-text { font-size: 13px; color: #5c4a3a; line-height: 1.4; }
.submit-modal-actions { display: flex; gap: 10px; }
.submit-btn {
  flex: 1; min-height: 42px; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s ease; cursor: pointer;
}
.submit-btn:active { transform: scale(0.97); }
.submit-btn-cancel { background: #f5f0eb; color: #5c4a3a; }
.submit-btn-confirm {
  background: linear-gradient(135deg, #b8845a 0%, #a07245 100%);
  color: #ffffff; box-shadow: 0 3px 10px rgba(184, 132, 90, 0.3);
}
.submit-btn-confirm.disabled { opacity: 0.45; pointer-events: none; box-shadow: none; }

/* — 进度弹窗 — */
.progress-box {
  width: 100%; max-width: 340px;
  background: #ffffff; border-radius: 14px;
  padding: 28px 20px 22px;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.progress-icon { font-size: 36px; margin-bottom: 8px; }
.progress-title { font-size: 15px; font-weight: 700; color: #3a2e24; margin-bottom: 4px; }
.progress-percent { font-size: 28px; font-weight: 800; color: #b8845a; margin: 9px 0 12px; line-height: 1; }
.progress-bar-wrap {
  width: 100%; height: 6px; background: #f3eeea;
  border-radius: 3px; overflow: hidden;
}
.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, #d4a373, #a07245);
  border-radius: 3px; transition: width 0.3s ease;
}
.progress-msg { font-size: 12px; color: #8a7a68; margin-top: 12px; text-align: center; }
.progress-counter {
  font-size: 11px; color: #c5bfb8; margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.progress-soothe {
  margin-top: 15px; padding-top: 13px;
  border-top: 1px dashed #ece4da;
  width: 100%; text-align: center;
}
.progress-soothe-line { font-size: 12px; color: #a89880; line-height: 1.75; }

/* ============ result 结果页 ============ */
.page-result .fmq-body { padding: 28px 20px; }
.result-card { background: #fff; border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: var(--shadow); }
.result-icon { width: 62px; height: 62px; border-radius: 50%; background: #e7efe5; color: var(--success); font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.result-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.result-desc { font-size: 13px; color: var(--text-sub); line-height: 1.7; }
.result-meta { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--text-sub); text-align: left; line-height: 1.9; }
.result-meta span { float: right; color: var(--text); font-weight: 600; }
.result-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }

/* 结果页：订单信息行 / 文件说明 / 底部提示 */
.result-meta__row { display: flex; align-items: baseline; gap: 12px; overflow: hidden; }
.result-meta .result-meta__row span { float: none; }
.result-meta__label { flex: none; color: var(--text-sub); font-weight: 400; }
.result-meta__value { flex: 1; text-align: right; color: var(--text); font-weight: 600; word-break: break-all; }
.result-files { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); text-align: left; }
.result-files__title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.result-files__list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-sub); line-height: 1.85; }
.result-files__list li { margin-bottom: 2px; }
.result-tip {
  margin-top: 16px; padding: 10px 12px;
  background: #fff7e9; color: #8a6a34; border: 1px solid #f0dfb8;
  border-radius: var(--radius-sm); font-size: 12px; line-height: 1.7; text-align: left;
}

/* 下载相册压缩包（主按钮，位于文件说明下方、分享链接上方） */
.result-download { margin-top: 18px; }
.result-download .fmq-btn { font-size: 15px; font-weight: 600; letter-spacing: 1px; }

/* 分享链接区（结果页交付区，风格与 result-files 一致） */
.result-share {
  margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); text-align: left;
}
.result-share__label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px;
}
.result-share__badge {
  font-size: 11px; font-weight: 600; color: #6f8a68;
  background: #eaf1e8; border: 1px solid #d7e4d3; border-radius: 20px; padding: 2px 9px;
}
.result-share__badge--loading { color: #a9764f; background: #fbf1e5; border-color: #eed9ae; }
.result-share__badge--error { color: #b4503a; background: #fbeae6; border-color: #f0cdc3; }
.result-share__box {
  background: #fcf9f4; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.result-share__input {
  width: 100%; border: 0; background: transparent; outline: none;
  font-family: inherit; font-size: 12.5px; line-height: 1.6; color: var(--text); word-break: break-all;
}
.result-share__actions { margin-top: 10px; display: flex; gap: 10px; }
.result-share__actions .fmq-btn { flex: 1; text-decoration: none; text-align: center; }
.result-share__progress { display: flex; align-items: center; gap: 10px; }
.result-share__bar {
  flex: 1; height: 8px; background: #f0ebe4; border-radius: 20px; overflow: hidden;
}
.result-share__bar-inner {
  height: 100%; width: 0; border-radius: 20px;
  background: linear-gradient(90deg, var(--primary-from), var(--primary-to));
  transition: width .25s;
}
.result-share__pct { flex: none; font-size: 12px; color: var(--primary-strong); font-weight: 600; }
.result-share__tip { margin-top: 10px; font-size: 12px; color: var(--text-mute); line-height: 1.7; }
.result-share__perm { margin-top: 6px; font-size: 12px; color: #6f8a68; text-align: center; line-height: 1.7; }
.result-share__error {
  background: #fbeae6; border: 1px solid #f0cdc3; color: #b4503a;
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; line-height: 1.7; word-break: break-all;
}
.result-share__error-hint { margin-top: 4px; color: #a4653f; }

/* 分享配置弹窗（页面内填写对象存储参数） */
.share-cfg { max-width: 420px; max-height: 86vh; overflow-y: auto; text-align: left; }
.share-cfg__body { margin-top: 4px; }
.share-cfg__note {
  background: #fff7e9; border: 1px solid #f0dfb8; color: #8a6a34;
  border-radius: var(--radius-sm); padding: 8px 10px;
  font-size: 12px; line-height: 1.7; margin-bottom: 12px;
}
.share-cfg__field { display: block; margin-bottom: 10px; }
.share-cfg__label { font-size: 12px; color: var(--text-sub); margin-bottom: 4px; }
.share-cfg__input {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; font-size: 13px; font-family: inherit;
  background: #fff; color: var(--text); outline: none;
}
.share-cfg__input:focus { border-color: var(--primary-strong); }
/* 阶段十八 3.2：分享配置弹窗内的「全球加速」勾选行 */
.share-cfg__check { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.share-cfg__check input[type="checkbox"] { width: 16px; height: 16px; flex: none; accent-color: var(--primary-strong); cursor: pointer; }
.share-cfg__check .share-cfg__label { margin-bottom: 0; line-height: 1.4; cursor: pointer; }

/* 页面级空态 */
.page-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; }
.page-empty__icon { font-size: 44px; margin-bottom: 14px; }
.page-empty__title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.page-empty__desc { font-size: 13px; color: var(--text-sub); line-height: 1.7; }

/* ============================================================
 * 第 3 步：激光雕刻（1:1 移植 pages/laser/laser.wxss）
 * ============================================================ */
.laser-body { padding: 20px 20px 8px; }
.laser-panel { padding: 24px 20px; text-align: left; }

.panel-header { margin-bottom: 22px; }
.panel-title { display: block; font-size: 19px; font-weight: 700; color: #4a3f33; margin: 0 0 8px; }
.panel-description { display: block; font-size: 13px; color: var(--text-sub); line-height: 1.6; margin: 0; }

.choose-options { display: flex; gap: 14px; }
.choose-card {
  flex: 1; min-width: 0; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 14px; padding: 22px 12px;
  display: flex; flex-direction: column; align-items: center;
  background: #fcf9f4; transition: all .15s; font: inherit; color: inherit;
}
.choose-card:hover { border-color: var(--primary-from); }
.choose-card.selected {
  border-color: var(--primary-from); background: #fbf3e7;
  box-shadow: 0 4px 14px rgba(200, 169, 126, 0.25);
}
.choose-card-icon {
  font-size: 30px; margin-bottom: 10px;
  /* 修复：🚫 ✒️ 等 emoji 优先命中系统彩色 emoji 字体，避免显示为空心方框 */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
    "Segoe UI Symbol", var(--font);
}
.choose-card-title { font-size: 15px; font-weight: 600; color: #4a3f33; }
.choose-card-sub { font-size: 12px; color: var(--text-mute); margin-top: 4px; text-align: center; line-height: 1.5; }

/* 激光雕刻效果展示图（选择页） */
.effect-demo { margin-top: 22px; padding: 14px; background: #fdfbf7; border: 1px solid #ede7df; border-radius: 14px; }
.effect-demo-img { width: 100%; display: block; border-radius: 10px; background: #f5f0ea; cursor: zoom-in; }
/* 底部按钮组：对齐 laser.wxss .button-group(:not(.edit-mode))
   选择阶段只有一个「← 返回」→ 水平居中 + 固定宽（320rpx≈160px），不撑满全宽 */
.laser-footer:not(.edit-mode) { justify-content: center; }
.laser-footer:not(.edit-mode) .fmq-btn { flex: none; width: 160px; }

.effect-demo-note { margin-top: 10px; font-size: 12px; color: var(--text-mute); text-align: center; line-height: 1.5; }

/* 编辑区 */
.field-group { margin-bottom: 26px; }
.field-group:last-child { margin-bottom: 0; }
.field-label { display: block; font-size: 14px; font-weight: 600; color: #4a3f33; margin-bottom: 10px; }
.engrave-textarea { min-height: 84px; resize: vertical; }
.double-line-tip { margin-top: 8px; font-size: 12px; color: var(--primary); }

/* 常用雕刻符号（横向滚动） */
.symbol-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.symbol-list { display: flex; gap: 10px; padding: 2px; }
.symbol-item {
  flex: none; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 60px; padding: 10px 8px;
  background: #fcf9f4; border: 1.5px solid var(--line); border-radius: 12px;
  transition: all .15s;
}
.symbol-item:hover { background: #fbf3e7; border-color: var(--primary-from); }
.symbol-char {
  font-size: 24px; line-height: 1; color: #4a3f33; margin-bottom: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  /* 兜底：无 SVG 时也让 ★♥☽✦ 等符号优先命中系统符号/emoji 字体，避免空白框 */
  font-family: "Apple Symbols", "Segoe UI Symbol", "Segoe UI Emoji",
    "Apple Color Emoji", "Noto Color Emoji", var(--font);
}
/* 符号矢量图（与雕刻输出同源 path）：尺寸跟随 .symbol-char 字号 */
.symbol-svg { width: 1em; height: 1em; display: block; }
.symbol-name { font-size: 11px; color: var(--text-mute); white-space: nowrap; }

/* 字体九宫格 */
.font-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.font-item {
  position: relative; cursor: pointer; font: inherit;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 14px 8px;
  background: #fcf9f4; display: flex; align-items: center; justify-content: center;
  text-align: center; transition: all .15s; min-height: 52px;
}
.font-item:hover { border-color: var(--primary-from); }
.font-item.selected { border-color: var(--primary-from); background: #fbf3e7; }
.font-item-name { font-size: 13px; color: #4a3f33; line-height: 1.3; }
.font-item.selected .font-item-name { color: #8a6d3b; font-weight: 600; }
.font-item-check {
  position: absolute; top: -6px; right: -6px;
  width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; background: var(--primary-from); color: #fff; font-size: 11px;
}

/* 预览 */
.preview-box {
  position: relative; width: 100%; height: 132px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.preview-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; }
.preview-engrave {
  width: 100%; height: 100%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px; box-sizing: border-box; overflow: hidden;
}
.preview-lines { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.preview-line { color: #1a1a1a; line-height: 1.35; text-align: center; word-break: break-all; max-width: 100%; }
/* 预览内雕刻符号：内联 SVG 矢量（与 engrave.svg 同源 path），
   尺寸 = fontSize*advance、垂直位置由 JS 按导出同公式写入 vertical-align。
   不依赖任何系统 emoji/符号字体 → 6 个符号恒为矢量图形，无缺字方框。 */
.preview-symbol { display: inline-block; color: #1a1a1a; margin: 0 0.02em; overflow: visible; }
.preview-authoritative { width: 100%; height: 100%; object-fit: contain; }
.preview-placeholder { position: absolute; font-size: 13px; color: #c4b9a8; }
.preview-tip { margin-top: 8px; font-size: 12px; color: var(--text-mute); line-height: 1.6; }
.preview-tip.warning { color: #c0392b; }
.preview-tip.loading { color: #b7791f; }
.preview-tip.font-load-tip {
  color: #b7791f; background: #fdf6e9; border: 1px solid #eed9ae;
  border-radius: 8px; padding: 8px 10px; line-height: 1.5;
}

/* 雕刻样式（3 张横向等宽卡片） */
.style-row { display: flex; gap: 12px; }
.style-card {
  position: relative; flex: 1; min-width: 0; cursor: pointer; font: inherit;
  box-sizing: border-box; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fcf9f4; padding: 10px 8px 12px;
  display: flex; flex-direction: column; align-items: center; transition: all .15s;
}
.style-card:hover { border-color: var(--primary-from); }
.style-card.selected {
  border-color: var(--primary-from); background: #fbf3e7;
  box-shadow: 0 4px 14px rgba(200, 169, 126, 0.25);
}
.style-thumb {
  width: 100%; aspect-ratio: 4 / 3; height: auto;
  object-fit: contain;              /* 对齐小程序 mode="aspectFit"：等比完整显示、不裁切不变形 */
  border-radius: 8px; background: #f5f0ea; margin-bottom: 8px;
}
.style-name { font-size: 12px; color: #4a3f33; line-height: 1.4; text-align: center; }
.style-card.selected .style-name { color: #8a6d3b; font-weight: 600; }
.style-check {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 50%; background: var(--primary-from); color: #fff; font-size: 12px;
  box-shadow: 0 2px 8px rgba(200, 169, 126, 0.5);
}
.style-note { margin-top: 12px; font-size: 12px; color: var(--text-mute); line-height: 1.6; }

/* 图片放大预览遮罩 */
.preview-mask {
  position: fixed; inset: 0; z-index: 999; display: none;
  background: rgba(0, 0, 0, 0.82); align-items: center; justify-content: center;
}
.preview-mask.show { display: flex; }
.preview-mask-inner { width: 86%; display: flex; flex-direction: column; align-items: center; }
.preview-mask-img { width: 100%; max-height: 68vh; object-fit: contain; border-radius: 14px; background: #fff; }
.preview-mask-name { margin-top: 18px; font-size: 16px; color: #fff; font-weight: 600; }
.preview-mask-close { margin-top: 10px; font-size: 13px; color: rgba(255, 255, 255, 0.65); }

/* ============================================================
 * 教程（对标 pages/tutorial/{category,detail}）
 * ============================================================ */
.tutorial-header { padding: 20px 16px 4px; }
.tutorial-title { margin: 0 0 6px; font-size: 20px; font-weight: 700; color: #4a3f33; }
.tutorial-sub { margin: 0; font-size: 13px; color: var(--text-sub); }

.tutorial-card {
  display: flex; align-items: center; gap: 12px; text-align: left;
  width: 100%; font: inherit; color: inherit; cursor: pointer;
  background: #fff; border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.tutorial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tutorial-card__icon { flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: #f5f0ea; }
.tutorial-card__icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tutorial-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tutorial-card__title { font-size: 15px; font-weight: 600; color: #4a3f33; }
.tutorial-card__desc { font-size: 12.5px; color: var(--text-sub); line-height: 1.6; }
.tutorial-card__arrow { flex: none; font-size: 20px; color: var(--text-mute); }

.tutorial-tabs { display: flex; gap: 6px; padding: 12px 16px; background: var(--bg); }
.tutorial-tab {
  flex: 1; min-height: 38px; border: none; border-radius: 10px; cursor: pointer;
  background: var(--surface-soft); color: var(--text-sub); font-size: 14px; font-family: inherit;
}
.tutorial-tab.is-active { background: linear-gradient(135deg, var(--primary-from), var(--primary-to)); color: #fff; font-weight: 600; }

.tutorial-panel { padding: 16px; }
.tutorial-images { display: flex; flex-direction: column; gap: 14px; }
.tutorial-images.is-horizontal { flex-direction: row; flex-wrap: wrap; gap: 16px; }
.tutorial-images.is-horizontal .tutorial-section { flex: 1 1 320px; min-width: 0; }
.tutorial-section { display: flex; flex-direction: column; gap: 10px; }
.tutorial-section__title { margin: 0; font-size: 15px; font-weight: 600; color: #4a3f33; }
.tutorial-image {
  width: 100%; display: block; border-radius: 10px; background: #f5f0ea;
  cursor: zoom-in; box-shadow: var(--shadow);
}
.tutorial-videos { display: flex; flex-direction: column; gap: 18px; }
.tutorial-video { width: 100%; display: block; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; }
.tutorial-hint { margin-top: 12px; font-size: 12px; color: var(--text-mute); text-align: center; line-height: 1.6; }
.tutorial-empty {
  padding: 28px 16px; text-align: center; font-size: 13px; color: var(--text-mute);
  line-height: 1.7; background: #faf6ef; border: 1px dashed var(--line); border-radius: 10px;
}

/* 图片灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.88);
}
.lightbox.show { display: flex; }
.lightbox-img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 8px; background: #fff; }
.lightbox-close {
  position: absolute; top: 16px; right: 18px; width: 36px; height: 36px;
  border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.16);
  color: #fff; font-size: 16px; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 64px; border: none; border-radius: 8px;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 26px; cursor: pointer;
}
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-cap { position: absolute; bottom: 22px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }

/* ============================================================
 * 双端自适应
 * 宽屏 ≥900px：左右分栏（桌面优先）
 * 窄屏 <900px：单列堆叠 + 编辑/预览切换
 * ============================================================ */
@container app (max-width: 899px) {
  /* step1：单列 + 编辑/核对切换（对齐小程序窄屏单列体验） */
  .view-tabs {
    display: flex; gap: 0; background: #ffffff;
    padding: 3px; border-radius: 10px; margin: 0 14px 10px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.04);
  }
  .view-tabs button {
    flex: 1; border: none; background: transparent;
    padding: 8px 12px; border-radius: 8px;
    font-size: 13px; color: var(--text-sub); cursor: pointer; min-height: 34px;
    transition: background .18s, color .18s;
  }
  .view-tabs button.active {
    background: linear-gradient(135deg, #d4a373 0%, #bf8960 100%);
    color: #fff; font-weight: 600;
  }
  .workspace[data-view="edit"] .right-column { display: none; }
  .workspace[data-view="check"] .left-column { display: none; }
  .workspace::before { display: none; }
  .stats-bar { flex-wrap: wrap; }
  /* step2：窄屏收紧留白，预览自适应铺满 */
  .step2-body { padding: 12px 12px 16px; gap: 12px; }
  .edit-panel { padding: 18px 14px 16px; gap: 14px; }
  .panel-title { font-size: 19px; }
  .panel-description { font-size: 13px; }
  .greeting-textarea { min-height: 120px; font-size: 15px; }
  .preview-panel { padding: 16px 12px; }

  /* 雕刻页：窄屏收紧留白，字体九宫格保持 3 列（与小程序一致） */
  .laser-body { padding: 14px 12px 8px; }
  .laser-panel { padding: 18px 14px; }
  .choose-options { gap: 10px; }
  .choose-card { padding: 16px 8px; }
  .choose-card-sub { font-size: 11px; }
  .tutorial-images.is-horizontal { flex-direction: column; }

  /* 启动首页：窄屏收紧，主标题缩小字距保证「FISHMQ礼品定制馆」单行呈现 */
  .page-home { padding: 28px 20px; }
  .page-home .home-logo { width: 80px; height: 80px; font-size: 24px; margin-bottom: 18px; }
  .page-home .home-title { font-size: 21px; letter-spacing: 4px; padding-left: 4px; }
  .page-home .home-sub { font-size: 12px; letter-spacing: 1.5px; }
  .page-home .home-actions { max-width: 300px; margin-top: 40px; gap: 14px; }
  .page-home .fmq-btn { min-height: 44px; letter-spacing: 4px; padding-left: calc(0.5em + 4px); }
  /* 功能介绍页：窄屏 hero 字号微调，避免流程文案换行拥挤 */
  .welcome-hero { padding: 8px 0 20px; }
  .welcome-hero h1 { font-size: 21px; }
  .welcome-hero p { font-size: 12px; }
}

/* 小屏收紧 */
@container app (max-width: 420px) {
  .font-grid { gap: 8px; }
  .font-item { padding: 12px 4px; min-height: 46px; }
  .font-item-name { font-size: 12px; }
  .style-row { gap: 8px; }
  .style-thumb { aspect-ratio: 4 / 3; height: auto; }
  .style-name { font-size: 11px; }
  .page-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .preview-list { grid-template-columns: repeat(2, 1fr); }
  .page-step3 .check-card { width: 96%; }
  .page-step3 .check-list { gap: 12px; }
  .page-step3 .check-header { padding: 10px 12px; }
  .page-step3 .check-title { font-size: 14px; }
  .page-step3 .check-stats { font-size: 11px; padding: 4px 10px; }
  .page-step3 .bottom-bar { gap: 6px; padding: 10px 12px; }
  .page-step3 .btn-sm { max-width: none; font-size: 12px; padding: 11px 6px; }
  .submit-modal { padding: 20px 14px 14px; }
  .progress-box { padding: 22px 16px 18px; }
  .step-item__label { font-size: 11px; }
  .step-nav { margin: 10px 10px 8px; padding: 12px 6px; }
  .stats-bar { font-size: 12px; padding: 9px 10px; }
  .btn-clear, .btn-batch { padding: 6px 10px; font-size: 12px; }
  .mode-btn { font-size: 12px; padding: 8px 0; }
  .upload-hint { font-size: 11px; }
  .upload-hint .icon { font-size: 18px; }
  .action-bar { gap: 8px; padding: 10px 10px calc(12px + var(--safe-b)); }
  .btn-back { min-width: 68px; padding: 11px 12px; font-size: 13px; }
  .btn-primary { font-size: 14px; letter-spacing: 0.5px; padding: 12px 10px; }
}

/* 阶段二十九：原「桌面大屏 ≥1200px 限宽 1240/900px」块已退役。
 * 现在 PC 端整体由 #app 容器查询统一按手机端（≤899px）渲染，并限宽 420px 居中，
 * 不再有宽屏拉伸 / 双栏拓展布局，故无需此宽屏专属块。 */

/* ============================================================
 * 阶段二十 · 移动端 step1 与小程序 1:1 严格对齐
 * 仅在 ≤899px（移动端）生效；全部以 .page-step1 作用域隔离，
 * 不影响 PC 端（≥900px 维持放大可读性）及其他步骤。
 * 尺寸严格按小程序 1rpx = 0.5px 折算（撤销桌面放大）。
 * 布局：还原小程序真机两栏并排（编辑 + 实时核对同屏），
 *       去掉网页专属「编辑/核对」切换 tab。
 * ============================================================ */
@container app (max-width: 899px) {
  /* —— 布局：两栏并排，去掉 tab，显示中缝虚线 —— */
  .page-step1 .view-tabs { display: none; }
  .page-step1 .workspace[data-view="edit"] .right-column,
  .page-step1 .workspace[data-view="check"] .left-column { display: block; }
  .page-step1 .workspace::before { display: block; top: 20px; bottom: 10px; border-left-width: 1px; }
  .page-step1 .workspace { gap: 7px; padding: 0 8px; }
  .page-step1 .column-header { font-size: 11px; padding: 5px 0 8px; }
  .page-step1 .scroll-spacer { height: 12px; }

  /* —— 顶部步骤导航（对齐小程序 .step-nav） —— */
  .page-step1 .step-nav { margin: 14px 8px 10px; padding: 14px 8px; border-radius: 16px;
    box-shadow: 0 0.5px 0 rgba(0,0,0,0.03), 0 2px 8px rgba(0,0,0,0.04); }
  .page-step1 .step-item { font-size: 10px; }
  .page-step1 .step-item__dot { width: 23px; height: 23px; font-size: 11px; margin-bottom: 3px; }
  .page-step1 .step-item__label { font-size: 10px; }
  .page-step1 .step-item__line { top: 11px; }
  .page-step1 .step-item.is-current .step-item__dot { box-shadow: 0 2px 7px rgba(197,151,107,0.35); }

  /* —— 模式切换（分段控件，对齐小程序 .mode-switcher / .mode-btn） —— */
  .page-step1 .mode-switcher { margin: 0 8px 8px; padding: 3px; border-radius: 12px; }
  .page-step1 .mode-btn { padding: 9px 0; border-radius: 10px; font-size: 11px; }
  .page-step1 .mode-btn.active { box-shadow: 0 2px 7px rgba(197,151,107,0.25); }

  /* —— 单页独立模式切换 chips（对齐小程序 .card-mode-switch / .mode-chip） —— */
  .page-step1 .mode-switcher--card { margin: 2px 8px 8px; padding: 2px; background: transparent; border: none; box-shadow: none; }
  .page-step1 .mode-switcher--card .mode-btn { min-height: 0; padding: 3px 6px; font-size: 9px; border-radius: 8px;
    background: #f0ebe4; color: #8a7a68; font-weight: 500; }
  .page-step1 .mode-switcher--card .mode-btn.active { background: #d4a373; color: #fff; font-weight: 600; }

  /* —— 统计栏（对齐小程序 .stats-bar） —— */
  .page-step1 .stats-bar { flex-wrap: nowrap; margin: 0 8px 8px; padding: 9px 11px; border-radius: 11px; font-size: 11px; }
  .page-step1 .btn-clear, .page-step1 .btn-batch { font-size: 11px; padding: 6px 10px; border-radius: 8px; min-height: 26px; }

  /* —— 左列卡片（对齐小程序 .canvas-card / .card-header / .card-status） —— */
  .page-step1 .canvas-list { gap: 7px; }
  .page-step1 .canvas-card { border-radius: 11px; box-shadow: 0 0.5px 1px rgba(0,0,0,0.02), 0 2px 8px rgba(0,0,0,0.04); }
  .page-step1 .canvas-card:active { transform: scale(0.98); }
  .page-step1 .card-header { padding: 7px 9px; height: 32px; background: linear-gradient(150deg,#faf7f3 0%,#f5f0eb 100%); border-bottom: 1px solid #ede7df; }
  .page-step1 .card-index { font-size: 11px; }
  .page-step1 .card-status { font-size: 9px; padding: 2px 7px; border-radius: 10px; }
  .page-step1 .card-body { padding: 5px; }

  /* —— 图片插槽（对齐小程序 .image-slot / .slot-delete / .upload-hint） —— */
  .page-step1 .image-slot { border-width: 1px; border-radius: 7px; }
  .page-step1 .slot-delete { line-height: 22px; }
  .page-step1 .upload-hint { font-size: 9px; padding: 5px; }
  .page-step1 .upload-hint .icon { font-size: 20px; }
  .page-step1 .abnormal-badge { font-size: 9px; padding: 3px 6px; }
  .page-step1 .slot-checking { font-size: 10px; }
  .page-step1 .slot-checking .dot { width: 6px; height: 6px; margin-right: 5px; }

  /* —— 右列实时核对（对齐小程序 .check-card / .card-inner / .page-label） —— */
  .page-step1 .right-column .check-list { gap: 7px; }
  .page-step1 .right-column .check-card { border-radius: 11px; box-shadow: 0 0.5px 1px rgba(0,0,0,0.02), 0 2px 10px rgba(0,0,0,0.04); }
  .page-step1 .right-column .check-card .card-body { padding: 44px 5px 5px; }
  .page-step1 .right-column .card-inner { border-radius: 3px; }
  .page-step1 .right-column .page-label { font-size: 1.8vw; padding: 2px 5px; border-radius: 4px; }
  .page-step1 .right-column .empty-block { font-size: 11px; }
  .page-step1 .right-column .empty-half { font-size: 10px; }

  /* —— 底部操作栏（对齐小程序：仅「下一步」，无底部返回；按钮 400rpx 居中） —— */
  .page-step1 .action-bar { justify-content: center; margin: 8px 0 0; padding: 0 8px calc(12px + var(--safe-b)); border-top: none; background: transparent; }
  .page-step1 .btn-back { display: none; }
  .page-step1 .btn-primary.step2-btn { flex: none; width: 200px; margin: 0 auto; font-size: 13px; padding: 13px 16px; border-radius: 12px;
    box-shadow: 0 3px 11px rgba(197,151,107,0.28); }
  .page-step1 .btn-primary[disabled] { background: #ded5cb; }

  /* —— 违规提示气泡（对齐小程序 .sec-tip：fixed / bottom 140rpx / 26rpx） —— */
  .page-step1 .sec-tip { position: fixed; left: 5%; right: 5%; bottom: 70px; font-size: 13px; padding: 12px 14px; border-radius: 8px; }

  /* —— 整页拖拽排序视觉（对齐小程序 .drop-line / .drag-ghost） —— */
  .page-step1 .drag-ghost { border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
  .page-step1 .page-drag-indicator { height: 0; border-top: 4px solid #d4a373; border-radius: 4px; margin: -3px 2px 3px; box-shadow: 0 0 6px rgba(212,163,115,0.8); }
  /* 拖拽中原卡片保持半透明占位、不缩放（置于 :active 之后，等特异性生效） */
  .page-step1 .canvas-card.is-dragging { transform: none; opacity: 0.35; }
}
