/* ============================================
   舞曲工具公共样式（编排页 + 调速简易版共用）
   ============================================ */

:root {
  --primary: #d62828;
  --primary-dark: #a61e1e;
  --primary-light: #fef2f2;
  --accent: #f77f00;
  --accent-light: #fff7e6;
  --dark: #1d3557;
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #1f2937;
  --text-light: #525866;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --success: #059669;
  --success-light: #ecfdf5;
  --warning: #d97706;
  --radius: 14px; /* 18b：统一编排页观感（原 common 10px） */
  --radius-sm: 8px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

/* 键盘焦点可见 */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { max-width: 900px; margin: 0 auto; padding: 24px 16px calc(96px + env(safe-area-inset-bottom)); }

/* ===== Header 通用（首页等无 .topbar 包裹的场景：居中四行 logo/标题/副标题/徽章）
   注：调速/编排页由下方 .topbar header 以更高特异性覆盖为一行的顶栏布局 */
header { position: relative; text-align: center; padding: 28px 0 18px; }
header .logo { font-size: 48px; }
header h1 { font-size: 30px; color: var(--dark); margin-top: 8px; letter-spacing: 1px; }
header .subtitle { color: var(--text-light); font-size: 17px; margin-top: 6px; }
header .badge {
  display: inline-block; margin-top: 12px; padding: 5px 16px;
  background: var(--primary-light); color: var(--primary);
  border: 1px solid #fecaca; border-radius: 99px; font-size: 14px;
}

/* ===== 顶栏（压缩 header + 步骤条合并吸顶，始终显示在浏览器顶部） ===== */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topbar header {
  position: relative; text-align: center; padding: 4px 12px 6px;
}
/* 图标：单独一排居中 */
.topbar header .logo { font-size: 40px; line-height: 1; }
/* 第二排：标题（徽章移到标题正下方） 居中，home/usage 绝对定位左右（与内容同宽对齐） */
.topbar header .tb-row {
  position: relative; display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-top: 2px;
}
/* 18m：标题 + 徽章纵向排布——徽章在标题正下方居中（不再挤在标题右侧） */
.topbar header .tb-title {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
}
.topbar header h1 { font-size: 26px; color: var(--dark); margin: 0; letter-spacing: 1px; white-space: nowrap; }
/* 副标题压缩掉（引导交给步骤条与使用说明） */
.topbar header .subtitle { display: none; }
.topbar header .badge {
  display: inline-block; margin: 0; padding: 2px 12px;
  background: var(--primary-light); color: var(--primary);
  border: 1px solid #fecaca; border-radius: 99px; font-size: 13px; white-space: nowrap;
}
/* ← 回到首页：纯文字链接，tb-row 左侧；热区 ≥44px */
.topbar header .home-link {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 8px;
  background: none; border: none; border-radius: 0;
  color: var(--text-light); font-size: 16px; font-weight: 600;
  text-decoration: none; transition: color .12s;
}
.topbar header .home-link:hover { color: var(--primary); }
/* 📖 使用说明：白底 1px 描边次级按钮，tb-row 右侧；热区 ≥44px */
.topbar header .usage-link {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 14px;
  background: #fff; border: 1px solid var(--border-strong, #cbd5e1); border-radius: 10px;
  color: var(--text); font-size: 16px; font-weight: 600;
  cursor: pointer; transition: border-color .12s, color .12s, background .12s;
}
.topbar header .usage-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
/* 顶栏内步骤条：去掉自身 sticky（由 .topbar 吸顶），压缩下边距 */
.topbar .wizard-steps { position: static; margin-bottom: 8px; padding: 8px 10px; }

/* ===== 步骤指示器（18b：统一采用编排页 .wizard-steps 画法，吸顶/等宽/序号随状态变色） ===== */
.wizard-steps {
  display: flex; gap: 8px; margin-bottom: 20px;
  position: sticky; top: env(safe-area-inset-top); z-index: 30;
  background: var(--bg); padding: 14px 4px; border-radius: 12px;
}
.wstep {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 8px; border-radius: 10px; background: #fff; border: 1px solid var(--border);
  font-size: 16px; color: var(--text-light); font-weight: 600; text-align: center; flex-wrap: wrap;
}
.wstep.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
/* 完成态文字色加深为 #047857（原 --success #059669 on #fff 仅 3.77:1，不达标已修；与序号圆点一致） */
.wstep.done { border-color: #bbf7d0; color: #047857; }
/* 序号圆点：未开始 深灰底白字（#6b7280≈4.6:1，原 #e5e7eb 白字仅 1.24:1 已修） */
.wstep-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: #6b7280; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
}
.wstep.active .wstep-num { background: var(--primary); }
/* 完成态 加深底 #047857，白字≈5.1:1（原 --success #059669 仅 3.77:1 已修） */
.wstep.done .wstep-num { background: #047857; }


/* ===== Step screen ===== */
.step-screen { display: none; }
.step-screen.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.step-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px;
  border: 1px solid #f0f0f0;
}
.step-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 20px; font-weight: 700; color: var(--dark); margin-bottom: 14px;
}
.step-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; flex-shrink: 0;
}
.step-hint { color: var(--text-light); font-size: 16px; margin-bottom: 18px; }

/* ===== 底部固定导航 ===== */
.wizard-nav {
  position: sticky; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 6px 24px rgba(0,0,0,.10);
}
.wizard-nav button { flex: 1; }
#btnPrev, .btn-prev {
  flex: 0 0 140px; padding: 14px; border-radius: 12px; border: 2px solid var(--border);
  background: #fff; color: var(--dark); font-size: 16px; font-weight: 600; cursor: pointer; transition: all .15s;
}
#btnPrev:hover:not(:disabled), .btn-prev:hover:not(:disabled) { border-color: var(--dark); }
#btnPrev:disabled, .btn-prev:disabled { opacity: .4; cursor: not-allowed; }
.btn-main, .btn-next {
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border: none; border-radius: 12px;
  font-size: 18px; font-weight: 700; cursor: pointer; transition: opacity .15s, transform .1s; box-shadow: 0 4px 14px rgba(214,40,40,.35);
}
.btn-main:hover:not(:disabled), .btn-next:hover:not(:disabled) { opacity: .92; }
.btn-main:disabled, .btn-next:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

/* ===== 浏览器兼容：全屏拦截 ===== */
.browser-block {
  position: fixed; inset: 0; z-index: 99999;
  display: none; align-items: center; justify-content: center;
  background: #ffffff; padding: 24px; box-sizing: border-box;
}
.browser-block.show { display: flex; }
.browser-block .bb-card {
  max-width: 540px; text-align: center;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
  padding: 40px 34px; box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.browser-block .bb-ico { font-size: 58px; line-height: 1; }
.browser-block h1 { font-size: 22px; color: #111827; margin: 18px 0 12px; line-height: 1.5; }
.browser-block p { font-size: 16px; color: #374151; line-height: 1.85; margin: 10px 0; }
.browser-block .bb-sub { font-size: 14.5px; color: #6b7280; margin-top: 18px; }
.browser-block .bb-howto {
  font-size: 15px; color: #1f2937; line-height: 1.95; text-align: left;
  background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 12px;
  padding: 16px 18px; margin-top: 16px;
}
.browser-block .bb-howto b { color: #0369a1; }
.browser-block .bb-edge-ico { display: inline-block; width: 19px; height: 19px; vertical-align: -3px; margin: 0 1px; }
.browser-block .bb-copy-btn {
  display: inline-block; margin-top: 12px;
  background: #0284c7; color: #fff; border: none;
  font-size: 15px; font-weight: 600; line-height: 1;
  padding: 11px 18px; border-radius: 10px; cursor: pointer;
}
.browser-block .bb-copy-btn:active { transform: translateY(1px); }
/* 拦截页「回到首页」：白底红边按钮，与顶栏链接区分、更显眼（编排/调速两页共用） */
.browser-block .bb-howto .home-link {
  display: block; margin-top: 16px; padding: 12px 0;
  text-align: center; text-decoration: none;
  background: #fff; color: #c0392b; font-weight: 700; font-size: 16px;
  border: 2px solid #c0392b; border-radius: 12px;
}
.browser-block .bb-howto .home-link:hover { background: #fff3ea; }

/* ===== 浏览器兼容：顶部横幅 ===== */
.browser-banner {
  display: none; position: sticky; top: 0; z-index: 50;
  padding: 14px 18px; background: var(--accent-light);
  border-bottom: 2px solid var(--accent); color: #92400e;
  font-size: 15px; font-weight: 600; text-align: center;
}
.browser-banner.visible { display: block; }

/* ===== Footer（18b：对比度 #b0b5bd≈1.86:1 → #6b7280≈4.6:1 达标） ===== */
footer { text-align: center; color: #6b7280; font-size: 14px; margin-top: 30px; line-height: 1.8; }

/* ===== 意见反馈悬浮按钮（18b：统一右下，观感取编排页渐变+动画） ===== */
.feedback-fab {
  position: fixed; bottom: 84px; right: 16px; z-index: 40;
  display: inline-flex; align-items: center; gap: 6px;
  height: 46px; padding: 0 16px 0 14px;
  border: none; border-radius: 23px;
  background: linear-gradient(135deg, #ff7a59, #d62828);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .5px;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(214,40,40,.40);
  animation: fabPulse 2.4s ease-in-out infinite;
  transition: transform .12s;
}
.feedback-fab:hover { transform: translateY(-2px); }
.feedback-fab:active { transform: scale(.95); }
.feedback-fab .fab-ico { font-size: 18px; line-height: 1; }
@keyframes fabPulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(214,40,40,.40); }
  50%      { box-shadow: 0 8px 26px rgba(214,40,40,.62); }
}

/* ===== 浮动滚屏按钮（18c：自 site.css 复制入 common，供调速页共用；site.css 保留供完整版） ===== */
.scroll-fab {
  position: fixed; right: 16px; top: 50%; transform: translateY(-50%);
  z-index: 39; display: none; flex-direction: column; gap: 12px;
}
.scroll-fab.show { display: flex; }
.scroll-fab button {
  min-width: 98px; height: 50px; padding: 0 16px; border: none; border-radius: 25px; cursor: pointer;
  background: #d62828; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.28);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 16px; font-weight: 600; white-space: nowrap;
  transition: transform .1s, opacity .15s;
}
.scroll-fab button svg { flex: 0 0 auto; }
.scroll-fab button:hover { transform: scale(1.07); }
.scroll-fab button:active { transform: scale(.92); }
.scroll-fab button:disabled { opacity: .3; cursor: default; pointer-events: none; }
/* 极矮视口：scroll-fab 可能与右下 feedback-fab 竖直重叠，隐藏滚动按钮（内容有限，可用原生滚动） */
@media (max-height: 480px) {
  .scroll-fab { display: none !important; }
}

/* ===== 弹窗 ===== */
.modal-mask {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45); align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 16px; padding: 32px 36px;
  max-width: 420px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.modal h3 { font-size: 21px; margin-bottom: 8px; color: var(--dark); }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; font-size: 18px; cursor: pointer;
  color: var(--text-light); padding: 4px 8px; border-radius: 6px;
}
.modal-close:hover { background: #f3f4f6; color: var(--text); }
.modal-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
.usage-modal { position: relative; max-width: 520px; }
.usage-steps { display: flex; flex-direction: column; gap: 14px; }
.usage-step { display: flex; gap: 12px; align-items: flex-start; }
.usage-num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.usage-text { font-size: 15px; line-height: 1.6; color: var(--text); padding-top: 4px; }
.usage-tip {
  margin-top: 16px; padding: 12px 16px; background: var(--primary-light);
  border-radius: 10px; font-size: 14px; color: var(--primary); line-height: 1.6;
}

/* ===== 响应式（仅桌面窄窗口适配；不支持手机/平板） ===== */
@media (max-width: 1100px) {
  .container { padding: 22px 14px calc(96px + env(safe-area-inset-bottom)); }
  .step-card { padding: 24px 22px; }
}

/* 尊重「减少动态效果」系统设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   【编排页专用】18a 自 pages/arranger/arranger.html 内联迁入
   以下仅编排页使用；简易版（simple）同名字段用自身内联覆盖，
   不在此生效。仅搬家不产生共享。
   ============================================================ */

/* 统一点击按压反馈（编排页独有类部分；.btn-main:active 见共享区） */
.btn-icon:active, .btn-add-type:active, .type-chip:active,
.mode-option:active { transform: translateY(1px); }

/* ===== Dance Order ===== */
.order-item {
  display:flex; align-items:center; gap: 14px;
  padding: 12px 16px; border:1px solid var(--border);
  border-radius: 10px; margin-bottom: 10px; background:#fff;
}
.order-num {
  width: 30px; height:30px; border-radius:50%;
  background: var(--dark); color:#fff; font-weight:700;
  display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0;
}
.order-type { flex:1; font-size: 18px; font-weight: 600; }
.order-count { color: var(--text-light); font-size: 14px; }
.order-controls { display:flex; gap:6px; }
.btn-add-type {
  width:100%; padding: 12px; border:2px dashed #d1d5db; border-radius: 10px;
  background:none; color: var(--text-light); font-size:15px; cursor:pointer; transition: all .15s;
}
.btn-add-type:hover { border-color: var(--primary); color: var(--primary); }

/* type picker for adding（18b：热区提到 ≥44px） */
.type-pick-row { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.type-chip {
  min-height: 44px; padding: 8px 18px; border-radius: 99px; border:1.5px solid var(--border);
  background:#fff; cursor:pointer; font-size:14px; transition: all .15s;
  display:inline-flex; align-items:center;
}
.type-chip:hover { border-color: var(--primary); color: var(--primary); }

.btn-icon {
  width: 44px; height: 44px; border:1.5px solid var(--border);
  background:#fff; border-radius: 8px; cursor:pointer; font-size:16px;
  display:inline-flex; align-items:center; justify-content:center;
  transition: all .15s; color: var(--text);
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon:disabled { opacity:.35; cursor:not-allowed; }
.btn-icon.danger:hover { border-color:#dc2626; color:#dc2626; background:#fef2f2; }

.link-btn {
  background:none; border:none; color: var(--primary); cursor:pointer;
  font-size:14px; text-decoration:underline; padding:4px;
}
/* 18b：对比度 #b0b5bd≈1.86:1 → #6b7280≈4.6:1 达标 */
.empty-hint { text-align:center; color:#6b7280; padding: 24px 0; font-size:15px; }

/* ===== 添加舞曲分步进度 ===== */
.addtype-progress { margin-bottom:18px; }
.atp-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.atp-count { font-size:15px; font-weight:700; color:var(--dark); }
.atp-dots { display:flex; gap:8px; flex-wrap:wrap; }
.atp-dot {
  width:28px; height:28px; border-radius:50%; background:#eef2f7; color:var(--text-light);
  display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700;
}
.atp-dot.active { background:var(--primary); color:#fff; }
.atp-dot.done { background:#bbf7d0; color:var(--success); border:1px solid #86efac; }
.atp-cur { margin-top:10px; font-size:15.5px; color:var(--text-light); }
.atp-cur b { color:var(--primary); font-size:16px; }

/* ===== Per-type song sections ===== */
.type-summary {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:14px; color: var(--text-light); font-size: 14px; flex-wrap:wrap; gap:8px;
}
.type-section { border:1px solid var(--border); border-radius:12px; padding:16px 18px; margin-bottom:14px; background:#fff; }
.type-section-head { display:flex; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.type-badge { background:var(--primary); color:#fff; padding:5px 18px; border-radius:99px; font-weight:700; font-size:16px; }
.type-count { color:var(--text-light); font-size:14px; }
.dropzone {
  border:2px dashed #d1d5db; border-radius:10px; padding:16px 12px; text-align:center;
  cursor:pointer; background:#fafafa; transition:all .15s; font-size:16px; color:var(--text-light);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--primary-light); }
.dropzone.flash { border-color:#dc2626; background:#fef2f2; box-shadow:0 0 0 3px rgba(220,38,38,.18); }
.dropzone .dz-icon { font-size:22px; display:block; margin-bottom:4px; }
.song-list { margin-top:12px; }
.song-item {
  display:flex; align-items:center; gap:10px; padding:9px 12px;
  border:1px solid var(--border); border-radius:9px; margin-bottom:8px; flex-wrap:wrap;
}
.song-item.playing { border-color: var(--primary); background: var(--primary-light); }
.song-name { flex:1; min-width:150px; font-weight:600; word-break:break-all; }
.song-meta { color:var(--text-light); font-size:14px; }
.song-ops { display:flex; gap:6px; }
/* 18b：对比度 #b0b5bd≈1.86:1 → #6b7280≈4.6:1 达标 */
.song-empty { color:#6b7280; font-size:14px; text-align:center; padding:6px; }

/* ===== Mode ===== */
.mode-options { display:flex; gap: 16px; flex-wrap: wrap; }
.mode-option {
  flex:1; min-width: 260px; border: 2px solid var(--border);
  border-radius: 12px; padding: 18px 18px; cursor:pointer; transition: all .15s; background:#fff;
}
.mode-option:hover { border-color:#c8ccd4; box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.mode-option.active { border-color: var(--primary); background: var(--primary-light); }
.mode-option h3 { font-size:17px; margin-bottom:6px; color:var(--dark); }
.mode-option .desc { font-size:15.5px; color: var(--text-light); }
.mode-option .example {
  margin-top:10px; font-size:14px; color:var(--primary);
  background:#fff; border:1px solid #fecaca; border-radius:8px; padding:8px 10px; word-break: break-all;
}

/* ===== Preview ===== */
.preview-summary {
  display:flex; justify-content:space-between; align-items:center;
  padding: 12px 16px; background:#f0fdf4; border:1px solid #bbf7d0;
  border-radius: 10px; margin-bottom: 14px; font-size: 15px; color: #166534; flex-wrap: wrap; gap: 8px;
}
.preview-list { max-height: 420px; overflow-y:auto; border:1px solid var(--border); border-radius: 10px; }
.preview-item {
  display:flex; align-items:center; gap: 10px;
  padding: 10px 14px; border-bottom:1px solid #f3f4f6; font-size:15px;
}
.preview-item:last-child { border-bottom: none; }
.preview-item:nth-child(odd) { background:#fafafa; }
.preview-num { font-family: Consolas, monospace; font-weight:700; color: var(--primary); flex-shrink:0; width: 42px; }
.type-tag {
  flex-shrink:0; padding: 2px 10px; border-radius: 99px; font-size: 14px;
  background:#eef2ff; color:#4338ca; border:1px solid #e0e7ff;
}
.type-tag.none { background:#fff7ed; color:#c2410c; border-color:#fed7aa; }
.preview-name { flex:1; word-break: break-all; }
.preview-dur { color: var(--text-light); font-size: 14px; flex-shrink:0; }
.round-divider {
  text-align:center; font-size:12px; color:#9ca3af;
  padding: 4px 0; border-bottom:1px dashed #e5e7eb; background:#fff; letter-spacing:2px;
}

/* ===== Compat tip ===== */
.compat-tip {
  background:#eef2ff; border:1px solid #c7d2fe; border-radius:10px;
  padding:12px 16px; margin-bottom:16px; font-size:16px; color:#3730a3; line-height:1.8;
}
.compat-tip b { color:#312e81; }
.concept-hint {
  background:#fff7ed; border:1px solid #fed7aa; border-radius:10px;
  padding:10px 14px; margin-bottom:16px; font-size:15px; color:#9a3412; line-height:1.7;
}
.mode-tip { flex:0 0 100%; margin-top:0; font-size:15.5px; color:#15803d; line-height:1.7; }

/* ===== Modal 专属（编排页 confirm / progress / feedback） ===== */
.modal .big-icon { font-size: 52px; margin-bottom: 10px; }
.modal p { color: var(--text-light); font-size: 15px; word-break: break-all; }
.progress-bar { height: 12px; background:#e5e7eb; border-radius: 99px; overflow:hidden; margin: 18px 0 10px; }
.progress-bar .fill { height:100%; width:0%; background: linear-gradient(90deg,#d62828,#f77f00); border-radius: 99px; transition: width .25s; }
.modal .btn-main { margin-top: 18px; min-width: 140px; flex:none; width: 100%; }
.modal .btn-ghost { margin-top: 10px; min-width: 140px; flex:none; width: 100%; background:#fff; color: var(--text-light); border:1px solid #d1d5db; box-shadow:none; }
.modal .btn-ghost:hover { border-color: var(--dark); }
.modal-actions .btn-main, .modal-actions .btn-ghost { margin-top:0; width:auto; flex:1; min-width:120px; }

/* ===== 步骤切换后关键操作元素高亮脉冲 ===== */
@keyframes focusPulse {
  0%   { box-shadow: 0 0 0 0 rgba(214,40,40,.45); outline: 0 solid rgba(214,40,40,0); }
  20%  { box-shadow: 0 0 0 7px rgba(214,40,40,.30); outline: 3px solid var(--primary); }
  100% { box-shadow: 0 0 0 0 rgba(214,40,40,0); outline: 0 solid rgba(214,40,40,0); }
}
.focus-pulse {
  position: relative;
  border-radius: inherit;
  outline-offset: 3px;
  animation: focusPulse 1.7s ease-out 1;
}

/* ===== 意见反馈弹窗表单（编排页） ===== */
.feedback-modal { text-align: left; }
.feedback-modal h3 { text-align: center; margin-bottom: 6px; }
.feedback-modal > p { text-align: left; margin: 0 0 12px; }
.fb-rating { text-align: center; font-size: 30px; margin: 4px 0 14px; user-select: none; }
.fb-rating span { color: #d1d5db; cursor: pointer; padding: 0 3px; transition: color .1s; }
.fb-rating span.on { color: #f7b500; }
.fb-input {
  width: 100%; box-sizing: border-box; margin-top: 10px;
  padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px;
  font-size: 15px; font-family: inherit; color: var(--dark); background: #fff;
}
.fb-input:focus { outline: none; border-color: var(--primary); }
.fb-err { color: var(--primary); font-size: 14px; min-height: 18px; margin: 8px 0 0; text-align: left; }
.fb-hint { display: none; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.6; margin: 0 0 12px; text-align: left; }

/* ===== Toast ===== */
.toast {
  position: fixed; top: calc(24px + env(safe-area-inset-top)); left:50%; transform: translateX(-50%) translateY(-80px);
  background: var(--dark); color:#fff; padding: 12px 26px; border-radius: 10px; font-size: 15px;
  z-index: 200; transition: transform .3s ease; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: #b91c1c; }
.toast.ok { background: var(--success); }

/* ===== 保存态主按钮 ===== */
/* 保存态：向导「保存到U盘」按钮变绿，表示保存/确认成功语义（与反馈弹窗提交无关） */
#btnNext.save { background: linear-gradient(135deg, #059669, #047857); box-shadow: 0 4px 14px rgba(5,150,105,.35); }

/* ===== Help / Footer 辅助卡 ===== */
.help-card {
  background:#fffbeb; border:1px solid #fde68a; border-radius: var(--radius);
  padding: 22px 26px; margin-top: 22px;
}
.help-card h3 { font-size:17px; color:#92400e; margin-bottom:10px; }
.help-card ol { padding-left: 22px; color:#78350f; font-size:15.5px; }
.help-card li { margin-bottom: 6px; }

/* ===== 浏览器兼容提示横幅（不支持直存 U 盘时显示） ===== */
.browser-note {
  display:flex; gap:10px; align-items:flex-start;
  background:#eff6ff; border:1px solid #bfdbfe; border-radius:12px;
  padding:14px 16px; margin-bottom:16px; font-size:15.5px; color:#1e40af; line-height:1.7;
}
.browser-note .bn-ico { font-size:20px; flex-shrink:0; line-height:1.4; }
.browser-note b { color:#1e3a8a; }

/* 桌面端平滑滚动（仅编排页） */
html { scroll-behavior: smooth; }

/* 减少动态效果：编排页 FAB/焦点脉冲一并关闭 */
@media (prefers-reduced-motion: reduce) {
  .feedback-fab, .focus-pulse { animation: none !important; }
}
