/* ==========================================================================
   Agenda Assistant · 议程工作台页面样式（页面代理私有）
   工作台/编辑区色值一律使用 shared.css 设计 tokens（契约 §6.3），本文件不自造色值。
   例外：`.a4-page` 及其内部（A4 预览/导出/打印区）是俱乐部真实议程物料的复刻，
   使用该区自有的 --a4-* 变量（黑/金/灰/红 + Arial/SimSun/雅黑），与应用设计系统无关。
   ========================================================================== */

/* ---------- 布局骨架 ---------- */
body { min-height: 100vh; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--gap-m) var(--gap-s) var(--gap-xl);
  display: flex;
  flex-direction: column;
  gap: var(--gap-m);
}

/* 顶栏（瑞士式墨线分隔，无柔影） */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--gap-m);
  flex-wrap: wrap;
  padding: 10px var(--gap-s);
  background: var(--card);
  border-bottom: var(--ui-border-3);
}
.topbar-brand { display: flex; align-items: center; gap: var(--gap-xs); margin-right: auto; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--ui-radius);
  border: var(--ui-border);
  background: var(--brand); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
  box-shadow: var(--ui-shadow-s);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); color: var(--brand-deep); font-size: 17px; }
.brand-text small { color: var(--ink-3); font-size: var(--fs-xs); }

.topbar-meeting { display: flex; align-items: center; gap: var(--gap-xs); flex-wrap: wrap; }
.topbar-label { font-size: var(--fs-s); color: var(--ink-2); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: var(--gap-xs); }

.input-slim { width: auto; min-width: 220px; padding: 9px 14px; font-size: var(--fs-s); }
.btn-slim { padding: 9px 20px; font-size: var(--fs-s); }

.dirty-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--pop);
  box-shadow: 0 0 0 4px var(--pop-soft);
}

/* 访客条 / 微信提示（贴纸感：实底 + 墨边） */
.guest-banner, .wx-hint {
  max-width: 1180px;
  margin: var(--gap-xs) auto 0;
  padding: 10px var(--gap-s);
  font-size: var(--fs-s);
  border: var(--ui-border);
  border-radius: var(--ui-radius);
}
.guest-banner { background: var(--brand-soft); color: var(--brand); }
.wx-hint { background: var(--warn-soft); color: var(--warn); width: calc(100% - 2 * var(--gap-s)); }

/* 步骤卡片 */
.step-head { display: flex; gap: var(--gap-s); align-items: flex-start; margin-bottom: var(--gap-m); }
.step-no {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--ui-radius);
  border: var(--ui-border);
  background: var(--brand); color: #fff;
  font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 800;
  box-shadow: var(--ui-shadow-s);
}
.step-head h2 { margin-bottom: var(--gap-xxs); }
.step-sub { margin: 0; color: var(--ink-2); font-size: var(--fs-s); max-width: 70ch; }

.empty-state { text-align: center; padding: var(--gap-xl) var(--gap-m); }
.empty-state p { color: var(--ink-2); }

/* 访客模式：隐藏编辑区（保留预览导出） */
body.mode-guest .edit-only { display: none !important; }

/* ---------- 步骤 1 · 会议信息 ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap-s);
}
.field { display: flex; flex-direction: column; gap: var(--gap-xxs); }
.field-wide { grid-column: 1 / -1; }
.field-label { font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); letter-spacing: .02em; }

.tt-block { margin-top: var(--gap-m); display: flex; flex-direction: column; gap: var(--gap-xs); }
.tt-modes { display: flex; gap: var(--gap-s); flex-wrap: wrap; }
.tt-mode { position: relative; cursor: pointer; }
.tt-mode input { position: absolute; opacity: 0; pointer-events: none; }
.tt-card {
  display: flex; flex-direction: column; gap: var(--gap-xxs);
  min-width: 220px;
  padding: 14px 18px;
  border: var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--card);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tt-card strong { font-family: var(--font-display); color: var(--brand-deep); }
.tt-card small { color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.45; }
.tt-mode:hover .tt-card { transform: translate(-1px, -1px); box-shadow: var(--ui-shadow-s); }
.tt-mode input:checked + .tt-card { background: var(--brand-soft); box-shadow: var(--ui-shadow-s); }
.tt-mode input:focus-visible + .tt-card { box-shadow: var(--ui-ring); }
.tt-detail { padding: var(--gap-s); background: var(--paper); border-radius: var(--ui-radius); }

/* ---------- 步骤 2 · 接龙识别 ---------- */
.jielong-box { font-family: var(--font-num); font-size: var(--fs-s); min-height: 150px; }
.jielong-actions { display: flex; align-items: center; gap: var(--gap-s); margin-top: var(--gap-s); }

.recog { margin-top: var(--gap-m); border-top: var(--ui-border); padding-top: var(--gap-m); }
.recog-summary { display: flex; gap: var(--gap-xs); flex-wrap: wrap; margin-bottom: var(--gap-s); }
.recog-block { margin-bottom: var(--gap-m); }
.recog-block h3 { margin-bottom: var(--gap-xs); }
.recog-scroll { overflow-x: auto; }
.recog-table { width: 100%; border-collapse: collapse; font-size: var(--fs-s); }
.recog-table th, .recog-table td {
  padding: 8px 10px; text-align: left; vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.recog-table thead th { font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .04em; white-space: nowrap; }
.recog-table .input { padding: 8px 10px; font-size: var(--fs-s); min-width: 120px; }
.recog-table select.input { min-width: 200px; }
.recog-line { color: var(--ink-2); max-width: 320px; }
.overwrite-note { color: var(--warn); font-size: var(--fs-xs); font-weight: 700; }
.recog-actions { display: flex; align-items: center; gap: var(--gap-s); }

/* ---------- 步骤 3 · 议程编辑 ---------- */
.time-summary { display: flex; gap: var(--gap-s); flex-wrap: wrap; margin-bottom: var(--gap-m); }
.sum-chip {
  flex: 1 1 160px;
  background: var(--paper);
  border: var(--ui-border);
  border-radius: var(--ui-radius);
  padding: 14px 20px;
  display: flex; flex-direction: column; gap: var(--gap-xxs);
  box-shadow: var(--ui-shadow-s);
}
.sum-chip small { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; }
.sum-chip strong { font-family: var(--font-num); font-size: var(--fs-h2); color: var(--brand-deep); }
.sum-chip.is-ok strong { color: var(--ok); }
.sum-chip.is-bad { background: var(--danger-soft); }
.sum-chip.is-bad strong, .sum-chip.is-bad small { color: var(--danger); }

.editor-scroll { overflow-x: auto; }
.editor-table { width: 100%; min-width: 960px; border-collapse: collapse; font-size: var(--fs-s); }
.editor-table thead th {
  font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .04em;
  text-align: left; padding: 6px 8px; white-space: nowrap;
}
.editor-table td { padding: 4px 6px; vertical-align: middle; }
.editor-table .input { padding: 8px 10px; font-size: var(--fs-s); }
.editor-table .col-time { width: 62px; }
.editor-table .col-dur { width: 86px; }
.editor-table .col-title { min-width: 200px; }
.editor-table .col-role { width: 130px; }
.editor-table .col-person { width: 150px; }
.editor-table .col-club { width: 130px; }
.editor-table .col-detail { min-width: 160px; }
.editor-table .col-ops { width: 128px; white-space: nowrap; }
.cell-time { font-family: var(--font-num); font-weight: 700; color: var(--brand); font-size: var(--fs-s); padding-left: 4px; }
.dur-input { width: 64px; text-align: center; font-family: var(--font-num); }

.seg-head td {
  background: var(--brand);
  padding: 8px 10px;
}
.seg-head .seg-name { font-weight: 800; color: #FFFFFF; font-family: var(--font-display); }
.seg-head .seg-title { color: #FFFFFF; font-size: var(--fs-xs); margin-left: var(--gap-xs); }
.seg-head .seg-ops { float: right; display: inline-flex; gap: var(--gap-xxs); align-items: center; }

.row-fixed td { background: var(--paper); }
.row-optional td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

.op-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border: var(--ui-border); border-radius: var(--ui-radius);
  background: var(--card); color: var(--brand);
  font-size: 14px; font-weight: 700; line-height: 1;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.op-btn:hover { background: var(--brand-soft); transform: translate(-1px, -1px); box-shadow: var(--ui-shadow-s); }
.op-btn:active { transform: translate(1px, 1px); box-shadow: none; }
.op-btn:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.op-btn--danger { color: var(--danger); }
.op-btn--danger:hover { background: var(--danger-soft); }

.restore-chip {
  display: inline-flex; align-items: center;
  padding: 3px 12px; margin-left: var(--gap-xxs);
  border: 1.5px dashed var(--brand); border-radius: var(--ui-radius);
  background: var(--card); color: var(--brand);
  font-size: var(--fs-xs); font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.restore-chip:hover { background: var(--brand-soft); transform: translate(-1px, -1px); box-shadow: var(--ui-shadow-s); }

.editor-hint { margin-top: var(--gap-s); color: var(--ink-3); font-size: var(--fs-xs); }

/* ---------- 步骤 4 · 导出与预览舞台 ---------- */
.export-bar { display: flex; align-items: center; gap: var(--gap-s); flex-wrap: wrap; margin-bottom: var(--gap-m); }

.preview-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--paper);
  border-radius: var(--ui-radius);
}
.a4-scaler { transform-origin: top left; }
.a4-page {
  /* A4 版式私有 token（复刻俱乐部真实议程，刻意不走 shared.css 设计 tokens） */
  --a4-gold: #F2DF74;
  --a4-gray: #D9D9D9;
  --a4-red: #FF0000;
  --a4-green: #A9D08E;
  --a4-yellow: #FFD966;
  --a4-deepred: #C00000;
  --a4-zh: SimSun, "宋体", NSimSun, serif;
  --a4-yh: "Microsoft YaHei", "微软雅黑", "Microsoft YaHei UI", sans-serif;
  width: 794px;
  height: 1123px;
  overflow: hidden;
  background: #fff;
  color: #000;
  box-shadow: var(--shadow-m);
  margin: 0 auto var(--gap-m);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 57px 25px 56px 23px;   /* 真实议程页边距 42.7pt / 18.9pt / 16.9pt */
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 8.64px;               /* 真实议程正文 6.48pt */
  line-height: 1.22;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.a4-page:not(:last-child) { page-break-after: always; break-after: page; }

/* ==========================================================================
   A4 第 1 页：横幅 + 口号 + 信息行 + 主表（议程 6 列 + 侧边栏 3 列一张表） + 页脚
   版式基准：oz/100th/99th 三期真实 PDF（PyMuPDF span 级对照）。
   ========================================================================== */
.p1-bannerbox { position: relative; flex: none; }
.p1-banner { width: 100%; height: auto; display: block; }
.p1-logo { position: absolute; left: 2.9%; top: 14.5%; width: 8.2%; height: auto; }

.p1-tagline {
  flex: none;
  background: var(--a4-gray);
  border-left: 1px solid #000;   /* 原件标语区左右竖边与信息行外框贯通围合 */
  border-right: 1px solid #000;
  text-align: center;
  padding: 4px 6px 3px;
  line-height: 1.15;
}
.p1-tagline .zh { display: block; font-family: var(--a4-zh); }
.p1-tagline .en { display: block; font-style: italic; }

.p1-info {
  flex: none;
  display: flex;
  align-items: stretch;
  background: var(--a4-gray);
  border: 1px solid #000;   /* 原件信息条为完整围合框：顶边线横贯闭合（与标语行分隔） */
  text-align: center;
}
.p1-info-cell { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 3px 2px; min-width: 0; }
.p1-info-cell + .p1-info-cell { border-left: 1px solid #000; }
/* 7 格列宽与真实议程一致（pt→px：39/30/142/62/170/70/46） */
.p1-info-cell.c1 { flex: 0 0 52px; }
.p1-info-cell.c2 { flex: 0 0 40px; }
.p1-info-cell.c3 { flex: 0 0 189px; align-items: flex-start; text-align: left; padding-left: 7px; }
.p1-info-cell.c4 { flex: 0 0 83px; }
.p1-info-cell.c5 { flex: 0 0 226px; }
.p1-info-cell.c6 { flex: 0 0 93px; }
.p1-info-cell.c7 { flex: 1 1 auto; }
.p1-info-cell .lab { font-weight: 700; }
.p1-info-cell .date { font-weight: 700; font-size: 8px; }
.p1-info-cell .time { font-weight: 700; }
.p1-info-cell .addr { font-family: var(--a4-yh); font-size: 6.08px; line-height: 1.45; }
.p1-info-cell .names { font-weight: 400; }

/* 主表：9 列 = 议程 6 列（52/40/189/83/74/93）+ 侧边栏 3 列（80/67/68） */
.p1-main { flex: 1 1 auto; min-height: 0; }
.ag-table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; }
.ag-table col.c-time { width: 52px; }
.ag-table col.c-dur { width: 40px; }
.ag-table col.c-proc { width: 189px; }
.ag-table col.c-role { width: 83px; }
.ag-table col.c-person { width: 74px; }
.ag-table col.c-club { width: 93px; }
.ag-table col.c-sig { width: 80px; }
.ag-table col.c-s1 { width: 67px; }
.ag-table col.c-s2 { width: 68px; }
.ag-table th, .ag-table td { border: 1px solid #000; padding: 1.4px 2px; vertical-align: middle; text-align: center; font-weight: 400; line-height: 1.2; }
.ag-table thead th { background: var(--a4-gray); font-weight: 700; padding: 3px 2px; }
.ag-table td.c-proc { text-align: left; padding-left: 6px; }

/* 黑金标题带（期数主题带 / 环节带 / 侧边栏模块标题共用） */
.ag-band td {
  background: #000;
  color: var(--a4-gold);
  font-style: italic;
  font-weight: 700;
  padding: 1.6px 4px;
  text-align: center;
}
.ag-band .zh { font-family: var(--a4-zh); font-style: normal; font-weight: 400; }
.ag-band .tb-no { text-align: left; padding-left: 3px; white-space: nowrap; }
.ag-band .tb-lab { text-align: left; padding-left: 7px; }
/* Evaluation for speeches 带左侧的时间/时长格（白底黑字） */
.ag-band td.band-time { background: #fff; color: #000; font-style: normal; font-weight: 700; }
.ag-band td.band-dur { background: #fff; color: #000; font-style: normal; font-weight: 400; }

/* 计时规则信号灯（彩色底 + 白粗斜体；.ag-table td 前缀压过 .ag-band td 的黑金样式） */
.ag-table td.sig-green { background: var(--a4-green); color: #fff; font-weight: 700; font-style: italic; }
.ag-table td.sig-yellow { background: var(--a4-yellow); color: #fff; font-weight: 700; font-style: italic; }
.ag-table td.sig-red { background: var(--a4-deepred); color: #fff; font-weight: 700; font-style: italic; }
.ag-table td.sig-timeup { background: #fff; color: #000; font-style: normal; font-weight: 400; }
.ag-table td.sig-plain { font-weight: 700; }
.ag-table td.timing-foot { color: var(--a4-red); font-weight: 700; border: none !important; }
.sb-blank { border: none !important; }

/* 数据行强调 */
.ag-theme-title { color: var(--a4-red); font-weight: 700; font-size: 11.04px; line-height: 1.0; }  /* 8.28pt；原件该行压得很紧 */
.ag-speech-title { font-weight: 700; }
.ag-timer-note { display: block; color: var(--a4-red); font-weight: 700; white-space: nowrap; margin-left: -4px; line-height: 1.05; }
.ag-timer-note .zh { font-family: var(--a4-yh); }
.ag-detail { display: block; font-size: 7.36px; font-style: italic; }

/* 固定中场行（Free Talk / Group Photo）：白底，时间时长加粗，标题黑粗斜体居中 */
.ag-fixed td.c-time, .ag-fixed td.c-dur { font-weight: 700; }
.ag-fixed .fx { font-style: italic; font-weight: 700; }
.ag-fixed .fx .zh { font-family: var(--a4-zh); font-style: normal; font-weight: 400; }

/* 演讲项目副行：左项目码、右项目描述，小字斜体 */
.ag-proj td { font-style: italic; font-size: 7.36px; padding: 0.5px 2px; line-height: 1.1; }
.ag-proj td.proj-desc { text-align: left; padding-left: 6px; }

/* 静默 1 分钟提示行：黑体加粗居中 */
.ag-note td { font-weight: 700; }

/* 侧边栏模块体（first-join / 注意事项 / how-to-join / 会员制度 / guest fee） */
.sb-body { padding: 2px 4px; text-align: center; }
.ag-table td.sb-body.v-top { vertical-align: top; }
.sb-qr-row { display: flex; align-items: center; gap: 5px; padding-left: 16px; }
.sb-qr { flex: none; width: 78px; height: 75px; object-fit: contain; }
.sb-qr-lg { width: 82px; height: 80px; }
.sb-text { flex: 1; text-align: center; min-width: 0; }
.sb-text .zh5 { display: block; font-family: var(--a4-zh); font-size: 7.36px; line-height: 1.22; }
.sb-text .en5 { display: block; font-size: 7.36px; line-height: 1.24; }
.sb-text .zh6 { display: block; font-family: var(--a4-zh); font-size: 8.8px; line-height: 1.24; }
.sb-text .en6 { display: block; font-size: 8.8px; line-height: 1.24; }
.rules-list { margin: 0; padding: 0 0 0 8px; list-style: none; font-style: italic; font-size: 9.28px; line-height: 1.19; text-align: left; }
.rules-list li { margin: 0; }
.rules-list li b { font-weight: 700; }
.benefits-list { margin: 0; padding: 0 0 0 2px; list-style: none; text-align: left; }
.benefits-list li { line-height: 1.22; }
.benefits-list li .zh { font-family: var(--a4-zh); }

/* Guest fee 金底模块 */
.guestfee-body { background: var(--a4-gold); text-align: left; }
.guestfee-body .gf-col { flex: none; text-align: center; }
.guestfee-body .wx { font-weight: 700; margin-bottom: 3px; text-align: center; }
.guestfee-body .thanks { font-weight: 700; }
.guestfee-body .zh { font-family: var(--a4-zh); }

/* 页脚两格（My feelings / My next actions） */
.ag-foot td { vertical-align: top; text-align: left; padding: 3px 6px; height: 109px; }
.ag-foot .feel-lab { font-weight: 700; }

/* ==========================================================================
   A4 第 2 页：黑金顶条 + LC/OC + 官员表 + 管理架构图 + 口语路径 + 头马介绍 + Pathways + 社交码
   ========================================================================== */
.p2-topbar { flex: none; display: flex; background: #000; color: var(--a4-gold); font-style: italic; font-weight: 700; padding: 2.6px 0; }
.p2-topbar .left { flex: 0 0 281px; text-align: center; }
.p2-topbar .right { flex: 1; text-align: center; }
.p2-topbar .zh { font-family: var(--a4-yh); font-style: normal; }

.p2-row { display: flex; align-items: flex-start; padding-top: 11px; }
.p2-col-a { flex: 0 0 281px; min-width: 0; }
.p2-col-b { flex: 0 0 156px; min-width: 0; }
.p2-col-c { flex: 1; min-width: 0; padding: 4px 0 0 3px; }
/* LC/OC 模块：原稿为带框表格——标题整行横贯顶部（下划线分隔），下方左 QR 右正文（竖线分隔） */
.p2-lc { margin-bottom: 0; border: 1px solid #000; }
.p2-lc + .p2-lc { margin-top: 4px; }
.p2-lc-title { font-weight: 700; font-size: 7.36px; padding: 2px 0 1px 8px; border-bottom: 1px solid #000; }
.p2-lc-body { display: flex; align-items: stretch; padding: 0 4px 0 1px; }
.p2-lc-body .lc-qr { flex: none; align-self: flex-start; width: 94px; height: 90px; margin: 2px 0; object-fit: contain; }
.p2-lc-body .oc-qr { flex: none; align-self: flex-start; width: 81px; height: 80px; margin: 2px 0; object-fit: contain; }
.p2-lc-text { flex: 1; text-align: justify; line-height: 1.22; min-width: 0; margin-left: 3px; padding: 1px 0 1px 4px; border-left: 1px solid #000; }

.officer-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.officer-table col.c-pos { width: 83px; }
.officer-table col.c-name { width: 73px; }
.officer-table th, .officer-table td { border: 1px solid #000; padding: 2.5px 2px; text-align: center; vertical-align: middle; font-weight: 400; }
.officer-table thead th { background: var(--a4-gray); font-weight: 700; font-size: 7.36px; }
.mgmt-img { display: block; width: 100%; height: auto; }

/* 黑金模块标题带（第 2 页通用） */
.p2-band { background: #000; color: var(--a4-gold); font-style: italic; font-weight: 700; text-align: center; padding: 2.6px 4px; }
.p2-band .zh { font-family: var(--a4-zh); font-style: normal; font-weight: 400; }
.p2-journey { margin-top: 6px; }
.p2-journey-body { display: flex; justify-content: center; align-items: flex-start; gap: 25px; padding-top: 9px; }
.journey-img { width: 538px; height: auto; display: block; }
.poster-img { width: 121px; height: auto; display: block; }

.p2-get { margin-top: 6px; }
.p2-get-body { border: 1px solid #000; border-top: none; padding: 5px 7px 7px; }
.p2-get-intro { font-size: 11.04px; line-height: 1.2; text-align: justify; text-align-last: center; margin-bottom: 7px; }
.p2-get-imgs { display: flex; justify-content: center; align-items: flex-start; }
.p2-get-imgs .benefits-strip { width: 725px; height: auto; display: block; }  /* 八图标整条（原 b1 367 + 间距 + b2 351 同宽） */

.p2-path { display: flex; align-items: flex-start; margin-top: 31px; }
.p2-path-main { flex: 1 1 auto; min-width: 0; }
.p2-path-body { padding: 8px 3px 0; }
.p2-pw-head { width: 626px; }  /* 介绍文字通栏至社交码列前（两行断行与真实议程一致） */
.p2-pw-title { font-size: 11.04px; margin-bottom: 3px; }
.p2-pw-intro { font-size: 10.08px; line-height: 1.22; margin-bottom: 5px; }
.p2-pw-flex { display: flex; align-items: flex-start; gap: 22px; }
.pw-badges { flex: 0 0 409px; min-width: 0; }
.pw-badges img { display: block; width: 409px; height: auto; }
.pw-five { flex: 0 0 189px; width: 189px; height: auto; display: block; }
.p2-social { flex: 0 0 124px; text-align: center; }
.p2-social .soc-qr { display: block; margin: 0 auto; object-fit: contain; }
.p2-social .xhs { width: 90px; height: 96px; margin-top: 2px; }
.p2-social .gzh { width: 96px; height: 94px; margin-top: 16px; }
.p2-social .p2-band.wx { font-size: 9.76px; margin-top: 5px; }  /* WeChat 带 7.32pt */

/* 缺素材占位块 */
.img-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: var(--a4-gray); color: #000;
  border: 1.5px dashed #000; border-radius: 0;
  font-size: 8px; text-align: center; padding: 6px;
}
.img-ph b { font-size: 8.5px; }
.img-ph span { color: #444; font-size: 7.5px; }
.p1-banner-ph { width: 100%; height: 95px; border-radius: 0; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 42, 66, .45);
  display: flex; align-items: center; justify-content: center;
  padding: var(--gap-s);
}
.modal {
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--card);
  border: var(--ui-border-3);
  border-radius: var(--ui-radius);
  box-shadow: var(--ui-shadow-l);
  padding: var(--gap-m);
}
.modal h3 { margin-bottom: var(--gap-xs); }
.modal .modal-desc { color: var(--ink-2); font-size: var(--fs-s); margin-bottom: var(--gap-s); }
.modal-actions { display: flex; gap: var(--gap-s); align-items: center; justify-content: flex-end; margin-top: var(--gap-m); flex-wrap: wrap; }
.modal-list { margin: 0 0 var(--gap-s); padding-left: 20px; font-size: var(--fs-s); color: var(--ink-2); max-height: 40vh; overflow-y: auto; }
.modal-list li { margin-bottom: 4px; }
.modal-error { color: var(--danger); font-size: var(--fs-s); font-weight: 600; min-height: 1.4em; }
.check-item { display: flex; gap: var(--gap-xs); align-items: flex-start; }
.check-item .tag { flex: none; margin-top: 2px; }

/* ---------- Toast ---------- */
#toastRoot {
  position: fixed; bottom: var(--gap-m); left: 50%; transform: translateX(-50%);
  z-index: 99; display: flex; flex-direction: column; gap: var(--gap-xs); align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff;
  padding: 10px 22px; border-radius: var(--ui-radius);
  font-size: var(--fs-s); font-weight: 600;
  box-shadow: var(--ui-shadow-m);
  animation: toast-in .25s var(--ease);
  max-width: 86vw;
}
.toast--ok { background: var(--ok); }
.toast--err { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 页脚 ---------- */
.foot {
  display: flex; justify-content: center; gap: var(--gap-m);
  padding: var(--gap-m); color: var(--ink-3); font-size: var(--fs-xs);
}

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
  .topbar { gap: var(--gap-s); }
  .topbar-brand { width: 100%; }
  .input-slim { min-width: 0; flex: 1; }
  .wrap { padding: var(--gap-s) var(--gap-xs) var(--gap-l); }
  .step-head { gap: var(--gap-xs); }
  .step-no { width: 36px; height: 36px; font-size: var(--fs-h3); }
  .export-bar .btn-cta { width: 100%; }
}

/* ---------- 打印兜底（F5）：只输出两页 A4，版式不溢出 ---------- */
@media print {
  @page { size: A4 portrait; margin: 0; }
  body { background: #fff; }
  .no-print, .topbar, .guest-banner, .wx-hint, .foot, #toastRoot, #modalRoot { display: none !important; }
  .wrap { max-width: none; margin: 0; padding: 0; display: block; }
  #stepPreview { border: none; box-shadow: none; padding: 0; border-radius: 0; }
  .preview-stage { overflow: visible; height: auto !important; background: #fff; border-radius: 0; }
  .a4-scaler { transform: none !important; }
  .a4-page { margin: 0; box-shadow: none; }
}

/* ==========================================================================
   响应式适配（【响应式适配代理】追加 · 2026-07-28）
   纪律：只新增 @media 规则——不改动上方桌面端规则、.a4-page 794×1123 版式、
   @page / @media print 区块（打印时上方 print 规则的 !important 依旧复原
   transform/height，本区规则对打印输出无影响）。
   说明：A4 预览缩放由 JS fitPreview() 对任意宽度自适应（index.js），比 CSS 固定
   档位更稳，本区不重复造档位；编辑区与预览区本就是纵向单栏流，无需并排改堆叠。
   ========================================================================== */

/* ---------- 平板（≤1024）：表格行内操作触摸目标 ≥40px、横滑更顺 ---------- */
@media (max-width: 1024px) {
  .op-btn { width: 40px; height: 40px; font-size: 16px; }
  .restore-chip { min-height: 40px; padding: 6px 14px; }
  .editor-scroll, .recog-scroll { -webkit-overflow-scrolling: touch; }
  /* 期次行独占一行：option 文本可能很长（实测 129 字 ≈1450px），不定宽 flex 行
     收缩不可靠，会把整页撑出横向滚动；定宽 100% 后 select 以 flex:1+min-width:0 正常收缩 */
  .topbar-meeting { width: 100%; min-width: 0; }
}

/* ---------- 手机（≤640）：访客条留边、弹窗按钮整行堆叠 ---------- */
@media (max-width: 640px) {
  .guest-banner { width: calc(100% - 2 * var(--gap-s)); }
  .jielong-actions { flex-wrap: wrap; }
  .modal-actions { flex-direction: column; align-items: stretch; }
  .modal-actions .btn,
  .modal-actions .btn-outline,
  .modal-actions .btn-quiet { width: 100%; justify-content: center; }
}

/* ---------- A4 预览防左裁（≤860）----------
   舞台内容宽 < 794px 时，.a4-page 的 margin: 0 auto 会算出负左右边距（页面相对
   缩放容器左右外凸），配合 .a4-scaler 的 transform-origin: top left 缩放后，
   页面左缘位于负 x 处被 .preview-stage 的 overflow:hidden 裁掉。
   改回左对齐后，缩放从左上角起始，整页按比例完整显示。
   打印规则的 .a4-page { margin: 0 } 本就四边归零，与本条一致、互不影响。 */
@media (max-width: 860px) {
  .a4-page { margin-left: 0; margin-right: 0; }
}
