/* ============ 幕境引擎 · 分镜师 —— 暖纸编辑风（参照 fenjing.ajxiao.com）============ */
:root {
  --bg: #f4efe6;
  --bg2: #ece5d7;
  --panel: #faf6ee;
  --panel2: #f0e9da;
  --field: #fcfaf4;
  --line: #e3dccc;
  --line2: #d2c6b0;
  --ink: #1b1714;
  --text: #1b1714;
  --muted: #6b6358;
  --subtle: #9a9082;
  --red: #c4422a;
  --red-deep: #9c3120;
  --red-soft: rgba(196, 66, 42, 0.10);
  --amber: #9c7a3a;   /* 暖赭：时间码/警告 */
  --green: #5c7d4a;   /* 橄榄：完成/通过 */
  --blue: #5b6b78;    /* 钢蓝：句柄 */
  --font-display: 'Fraunces', 'Songti SC', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --font-zh: 'Hanken Grotesk', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --radius: 12px;
  --shadow: 0 14px 38px rgba(70, 52, 32, 0.12);
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(120, 100, 70, 0.06) 1px, transparent 0) 0 0 / 22px 22px,
    radial-gradient(1100px 520px at 82% -12%, rgba(196, 66, 42, 0.06), transparent 60%),
    radial-gradient(900px 480px at 0% 108%, rgba(150, 120, 70, 0.05), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-zh);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 纸张颗粒（极淡，正片叠底） */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  box-shadow: inset 0 0 180px 30px rgba(150, 120, 80, 0.07);
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 239, 230, 0.82);
  backdrop-filter: blur(12px);
}
.wordmark { display: flex; align-items: center; gap: 11px; }
.aperture {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--red);
  position: relative; flex: 0 0 auto;
}
.aperture::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--red); }
.wordmark .mark {
  font-family: var(--font-display); font-weight: 900; font-size: 23px; color: var(--ink);
  letter-spacing: 0.01em;
}
.wordmark .agent-tag {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.14em; color: var(--muted);
  border: 1px solid var(--line2); border-radius: 6px; padding: 3px 8px;
}

.rec {
  display: flex; align-items: center; gap: 8px; margin-left: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--subtle);
}
.rec-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 0 rgba(196, 66, 42, 0.5); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(196, 66, 42, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(196, 66, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(196, 66, 42, 0); }
}

.fast-toggle { margin-left: auto; display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.fast-toggle input { display: none; }
.fast-track {
  width: 40px; height: 22px; border-radius: 999px; background: var(--panel2);
  border: 1px solid var(--line2); position: relative; transition: 0.22s;
}
.fast-knob {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--subtle); transition: 0.22s;
}
.fast-toggle input:checked + .fast-track { background: var(--red-soft); border-color: var(--red); }
.fast-toggle input:checked + .fast-track .fast-knob { left: 20px; background: var(--red); }
.fast-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }

/* ============ 舞台布局 ============ */
.stage {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 220px 1fr; gap: 30px;
  max-width: 1180px; margin: 0 auto; padding: 32px 26px 64px;
}

/* ============ 步骤导航 ============ */
.rail {
  position: sticky; top: 92px; align-self: start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px; box-shadow: var(--shadow);
}
.steps { list-style: none; margin: 0; padding: 0 4px; position: relative; }
.steps::before {
  content: ''; position: absolute; left: 21px; top: 16px; bottom: 16px; width: 2px;
  background: var(--line); z-index: 0;
}
.step {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: 9px; cursor: default; transition: 0.2s;
}
.step .idx {
  font-family: var(--font-mono); font-size: 12px; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 7px;
  background: var(--panel2); border: 1px solid var(--line2); color: var(--subtle); flex: 0 0 auto;
  transition: 0.2s;
}
.step .lbl { font-size: 14px; color: var(--muted); letter-spacing: 0.01em; }
.step .tick { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: transparent; transition: 0.2s; }
.step.is-done .idx { background: rgba(92, 125, 74, 0.14); border-color: var(--green); color: var(--green); }
.step.is-done .lbl { color: var(--ink); }
.step.is-done .tick { background: var(--green); }
.step.is-active { background: var(--red-soft); }
.step.is-active .idx { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 12px rgba(196, 66, 42, 0.3); }
.step.is-active .lbl { color: var(--ink); font-weight: 600; }
.step.is-active .tick { background: var(--red); }
.step.clickable { cursor: pointer; }
.step.clickable:hover { background: rgba(27, 23, 20, 0.04); }

.rail-foot {
  margin-top: 18px; padding: 14px 8px 4px; border-top: 1px dashed var(--line2);
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.8; color: var(--subtle); letter-spacing: 0.03em;
}

/* ============ 面板 ============ */
.panel-wrap { position: relative; min-height: 540px; }
.panel { display: none; }
.panel.is-active { display: block; animation: panelIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.panel-head { margin-bottom: 22px; }
.tc {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; color: var(--red);
  margin-bottom: 10px;
}
.title {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.01em; color: var(--ink);
}
.hint { color: var(--muted); font-size: 14.5px; max-width: 62ch; margin: 0; }
.hint code {
  font-family: var(--font-mono); font-size: 12px; color: var(--red);
  background: var(--red-soft); padding: 1px 6px; border-radius: 5px;
}

.panel-body {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}

/* 字段 */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; position: relative; }
.field:last-child { margin-bottom: 0; }
.field-label { font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.field-label em { font-style: normal; color: var(--subtle); font-family: var(--font-mono); font-size: 11px; margin-left: 6px; }
textarea, input[type='text'], input[type='password'], select {
  width: 100%; background: var(--field); border: 1px solid var(--line2); border-radius: 9px;
  color: var(--ink); font-family: var(--font-zh); font-size: 14px; padding: 12px 14px; transition: 0.16s;
  resize: vertical;
}
textarea { line-height: 1.7; min-height: 120px; }
textarea:focus, input:focus, select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
textarea::placeholder, input::placeholder { color: var(--subtle); }
select { cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) center, calc(100% - 13px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.counter { position: absolute; right: 4px; bottom: -20px; font-family: var(--font-mono); font-size: 11px; color: var(--subtle); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sample-field { justify-content: flex-end; }

/* 按钮 —— 主按钮深墨、次按钮描边（呼应参考站） */
.btn {
  font-family: var(--font-zh); font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  padding: 12px 22px; border-radius: 9px; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: 0.18s; white-space: nowrap;
}
.btn .arr { font-family: var(--font-mono); }
.btn.primary {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
  box-shadow: 0 6px 18px rgba(27, 23, 20, 0.18);
}
.btn.primary:hover { background: #2e2820; transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0); }
.btn.primary:disabled { background: var(--panel2); color: var(--subtle); border-color: var(--line2); box-shadow: none; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line2); }
.btn.ghost:hover { color: var(--ink); border-color: var(--muted); background: var(--panel2); }

.panel-foot { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.panel-foot .spacer { flex: 1; }
.foot-note { font-family: var(--font-mono); font-size: 11.5px; color: var(--subtle); letter-spacing: 0.03em; }

/* ============ 动态卡片：资产 / 位置 / 时间 ============ */
.group { margin-bottom: 22px; }
.group:last-child { margin-bottom: 0; }
.group-title {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px;
  font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.1em; color: var(--red); text-transform: uppercase;
}
.group-title .ct { color: var(--subtle); }
.group-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.row-card {
  display: grid; gap: 10px; background: var(--field); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 12px 12px 14px; margin-bottom: 10px;
  border-left: 2px solid var(--line2); transition: 0.16s; position: relative;
}
.row-card:hover { border-left-color: var(--red); }
.row-card .rc-head { display: flex; align-items: center; gap: 10px; }
.row-card .handle {
  font-family: var(--font-mono); font-size: 12px; color: var(--blue);
  background: rgba(91, 107, 120, 0.10); border: 1px solid rgba(91, 107, 120, 0.28);
  border-radius: 6px; padding: 3px 8px; white-space: nowrap;
}
.row-card input.name-in { font-weight: 600; flex: 1; padding: 7px 10px; }
.row-card textarea.desc-in { min-height: 0; padding: 8px 11px; font-size: 13px; }
.row-card .del {
  margin-left: auto; background: none; border: none; color: var(--subtle); cursor: pointer;
  font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 6px; transition: 0.15s;
}
.row-card .del:hover { color: var(--red); background: var(--red-soft); }
.add-row {
  width: 100%; background: none; border: 1px dashed var(--line2); color: var(--muted);
  border-radius: 9px; padding: 9px; cursor: pointer; font-size: 13px; transition: 0.15s; font-family: var(--font-zh);
}
.add-row:hover { border-color: var(--red); color: var(--ink); }

.mini-label { font-size: 11px; color: var(--subtle); font-family: var(--font-mono); }
.kv-list { display: flex; flex-direction: column; gap: 6px; }
.tag-need {
  font-family: var(--font-mono); font-size: 10.5px; padding: 2px 8px; border-radius: 999px; letter-spacing: 0.06em;
}
.tag-need.yes { color: var(--red); border: 1px solid rgba(196, 66, 42, 0.4); background: var(--red-soft); }
.tag-need.no { color: var(--subtle); border: 1px solid var(--line2); }
.ascii-map {
  font-family: var(--font-mono); font-size: 11px; white-space: pre; overflow-x: auto;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: var(--muted); margin-top: 6px;
}

/* 时间划分卡片 */
.seg-card {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start;
  background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px;
}
.seg-tc {
  font-family: var(--font-mono); font-size: 12px; color: var(--amber); text-align: center;
  border-right: 1px solid var(--line); padding-right: 12px; min-width: 92px;
}
.seg-tc .big { font-size: 15px; color: var(--ink); display: block; margin-bottom: 3px; }
.seg-body textarea { min-height: 0; }
.seg-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); border: 1px solid var(--line2); border-radius: 6px; padding: 2px 8px; }
.chip.reason { color: var(--subtle); }

/* 交付选择 */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice { cursor: pointer; }
.choice input { display: none; }
.choice-inner {
  height: 100%; background: var(--field); border: 1px solid var(--line2); border-radius: 11px; padding: 22px;
  transition: 0.18s;
}
.choice-ico { font-size: 30px; color: var(--subtle); margin-bottom: 12px; line-height: 1; }
.choice-title { font-weight: 700; font-size: 16px; margin-bottom: 8px; color: var(--ink); }
.choice-desc { font-size: 13px; color: var(--muted); line-height: 1.65; }
.choice.is-checked .choice-inner { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 3px var(--red-soft); }
.choice.is-checked .choice-ico { color: var(--red); }

/* ============ 生成步骤 ============ */
.gen-progress { margin-bottom: 18px; }
.gen-bar { height: 8px; background: var(--panel2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.gen-bar span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--red-deep), var(--red)); transition: width 0.4s ease; }
.gen-status { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 10px; letter-spacing: 0.02em; }
.gen-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.gen-actions .spacer { flex: 1; }
.qa-badge { font-family: var(--font-mono); font-size: 11.5px; padding: 5px 11px; border-radius: 999px; letter-spacing: 0.03em; }
.qa-badge.ok { color: var(--green); border: 1px solid rgba(92, 125, 74, 0.4); background: rgba(92, 125, 74, 0.1); }
.qa-badge.warn { color: var(--amber); border: 1px solid rgba(156, 122, 58, 0.4); background: rgba(156, 122, 58, 0.1); }

.result-wrap { margin-top: 4px; }
.preview-frame { width: 100%; height: 620px; border: 1px solid var(--line2); border-radius: var(--radius); background: #09090b; }

/* 逐条生成卡片（流式出现） */
.gen-card {
  background: var(--field); border: 1px solid var(--line); border-left: 2px solid var(--red);
  border-radius: 10px; padding: 16px; margin-bottom: 14px; animation: panelIn 0.4s ease;
}
.gen-card .gc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.gen-card .gc-n { font-family: var(--font-mono); color: var(--green); font-size: 13px; font-weight: 600; }
.gen-card .gc-tag { color: var(--muted); font-size: 13px; }
.gen-card .gc-time { font-family: var(--font-mono); font-size: 11px; color: var(--amber); border: 1px solid rgba(156, 122, 58, 0.3); border-radius: 999px; padding: 1px 8px; }
.gen-card .gc-count { font-family: var(--font-mono); font-size: 11px; color: var(--subtle); margin-left: auto; }
.gen-card .gc-body { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; color: var(--ink); max-height: 360px; overflow-y: auto; }
.gen-card .gc-copy { margin-top: 10px; }
.gen-card.pending { border-left-color: var(--line2); }
.gen-card.failed { border-left-color: var(--amber); }

/* ============ 遮罩 / loader ============ */
.overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(244, 239, 230, 0.85); backdrop-filter: blur(5px); }
.overlay.hidden { display: none; }
.loader { text-align: center; }
.film { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.film span { width: 13px; height: 20px; background: var(--red); border-radius: 3px; animation: filmrun 1s infinite ease-in-out; }
.film span:nth-child(2) { animation-delay: 0.12s; opacity: 0.78; }
.film span:nth-child(3) { animation-delay: 0.24s; opacity: 0.56; }
.film span:nth-child(4) { animation-delay: 0.36s; opacity: 0.34; }
@keyframes filmrun { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }
.loader-txt { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0.06em; }

/* ============ 提示条 ============ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(10px);
  z-index: 300; background: var(--panel); border: 1px solid var(--line2); color: var(--ink);
  padding: 12px 20px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow);
  opacity: 0; transition: 0.25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--red); color: var(--red-deep); }
.toast.hidden { display: none; }

/* ============ 访问口令 ============ */
.auth-overlay { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: rgba(244, 239, 230, 0.94); backdrop-filter: blur(8px); }
.auth-overlay.hidden { display: none; }
.auth-box { width: min(360px, 90vw); background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 30px; text-align: center; box-shadow: var(--shadow); }
.auth-mark { font-family: var(--font-display); font-weight: 900; letter-spacing: 0.01em; font-size: 20px; margin-bottom: 6px; color: var(--ink); }
.auth-mark span { color: var(--red); }
.auth-hint { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.auth-box input { margin-bottom: 14px; text-align: center; }
.auth-box .btn { width: 100%; justify-content: center; }
.auth-err { color: var(--red); font-size: 12.5px; margin-top: 10px; min-height: 16px; }
.auth-admin-link {
  display: inline-block; margin-top: 14px; background: none; border: none; cursor: pointer;
  color: var(--subtle); font-family: var(--font-zh); font-size: 12.5px; text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-admin-link:hover { color: var(--muted); }

/* ============ 顶栏：余额徽标 / 管理入口 ============ */
.balance-badge {
  margin-left: auto; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--muted); border: 1px solid var(--line2); border-radius: 7px; padding: 5px 10px;
  background: var(--panel);
}
.balance-badge.trial { color: var(--amber); border-color: var(--amber); }
.balance-badge.low { color: var(--red-deep); border-color: var(--red); background: var(--red-soft); }
.admin-entry {
  font-family: var(--font-zh); font-size: 12.5px; color: var(--muted); cursor: pointer;
  border: 1px solid var(--line2); border-radius: 7px; padding: 6px 11px; background: transparent;
}
.admin-entry:hover { color: var(--ink); border-color: var(--muted); background: var(--panel2); }
.balance-badge + .admin-entry { margin-left: 12px; }

/* ============ 管理员后台 ============ */
.admin-box {
  width: min(680px, 94vw); max-height: 88vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 14px;
  padding: 26px; box-shadow: var(--shadow);
}
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.admin-close {
  background: none; border: none; cursor: pointer; font-size: 26px; line-height: 1; color: var(--subtle);
}
.admin-close:hover { color: var(--red); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; margin-bottom: 20px; }
.admin-stats .stat {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 12px 8px; text-align: center;
}
.stat-n { display: block; font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); }
.stat-k { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.admin-gen {
  border: 1px solid var(--line); border-radius: 11px; padding: 16px; margin-bottom: 20px; background: var(--field);
}
.admin-gen-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-gen-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); flex: 1; min-width: 110px; }
.admin-gen-row input { width: 100%; }
.admin-gen-out { margin-top: 12px; }
.gen-out-head { font-size: 12.5px; color: var(--green); margin-bottom: 6px; }
.admin-gen-out textarea {
  width: 100%; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em;
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 10px; color: var(--ink);
}
.admin-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-tbl th, .admin-tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.admin-tbl th { color: var(--subtle); font-weight: 600; }
.admin-tbl td.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
.admin-tbl td.dim { color: var(--subtle); }
.admin-tbl tr.used td { color: var(--subtle); text-decoration: line-through; }
.admin-tbl tr.used td.mono { text-decoration: none; }

/* ============ 响应式 ============ */
@media (max-width: 820px) {
  .stage { grid-template-columns: 1fr; gap: 18px; padding: 18px 16px 50px; }
  .rail { position: static; top: auto; }
  .steps { display: flex; overflow-x: auto; gap: 4px; padding: 4px; }
  .steps::before { display: none; }
  .step { flex-direction: column; min-width: 76px; gap: 6px; text-align: center; padding: 8px 6px; }
  .step .lbl { font-size: 11px; }
  .step .tick { display: none; }
  .rail-foot { display: none; }
  .grid-2, .choice-grid { grid-template-columns: 1fr; }
  .panel-body { padding: 18px; }
  .preview-frame { height: 460px; }
  .topbar { padding: 14px 16px; gap: 12px; }
  .rec { display: none; }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
}
