:root{
  /* Material 3 角色：现场主动作只用 primary，状态色只表达状态。 */
  --bg:#f7f9f8; --card:#fff; --line:#dbe4e1; --ink:#1a1c1b; --muted:#5f6865;
  --blue:#006a6a; --blue-d:#005252; --ok:#216a3a; --warn:#7b5700; --err:#ba1a1a;
  --teal:#006a6a; --teal-d:#005252; --navy:#173f4c; --amber:#8a5300;
  --primary-container:#b9ebea; --surface-variant:#dde5e3; --outline:#707977;
}
*{box-sizing:border-box}
/* hidden 属性必须压过下面那些 display 规则（.modal 是 display:flex），否则设了 hidden 也照样显示 */
[hidden]{display:none !important}
body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.6 "Microsoft YaHei","PingFang SC",system-ui,sans-serif}
.tag{font-weight:400;font-size:12px;background:rgba(255,255,255,.18);padding:2px 8px;border-radius:10px;margin-left:8px}
/* section 不再自锁 1240px：放到与 .layout 同宽，否则横屏右侧留一大片空白、内容被挤窄 */
section{max-width:1520px;margin:0 auto;padding:14px}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:14px;margin-bottom:14px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
/* 最近场次卡片：原先只有 .card 的默认样式，「默认收起」的说明一直没落地 */
.recent-card{padding:6px 12px;margin-bottom:10px}
.recent-card .recent-summary{padding:4px 2px}
h3{margin:0 0 10px;font-size:15px}
h3 .tag{background:#eef2ff;color:#3b53a1}
.muted{color:var(--muted);font-size:12.5px}
.why{margin-top:8px;background:#f8fafc;border-left:3px solid #c7d2fe;padding:7px 10px;color:#475569;font-size:12.5px;border-radius:0 6px 6px 0}
.row{display:flex;gap:8px;align-items:center;margin:8px 0}
.row.wrap{flex-wrap:wrap}
.row .grow{flex:1}
input,select{border:1px solid var(--line);border-radius:6px;padding:6px 9px;font:inherit;background:#fff}
input:focus,select:focus{outline:2px solid #c7d2fe;border-color:var(--blue)}
button{font:inherit;cursor:pointer;border-radius:6px;border:1px solid var(--line);background:#fff;color:var(--ink);padding:6px 12px}
button:disabled{opacity:.45;cursor:not-allowed}
.act{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:600}
.act:hover:enabled{background:var(--blue-d)}
.act.ghost{background:#fff;color:var(--blue);border-color:#b9c6ff}
.mini{padding:5px 10px;font-size:13px}
.mini.ghost{background:#f3f4f6}
.mini.on{background:#e7f6ee;border-color:#96ddb8;color:var(--ok)}
.chk{display:flex;align-items:center;gap:5px;font-size:13px;color:#374151}
.warn{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;padding:7px 10px;border-radius:6px;font-size:12.5px;margin-top:8px}

.shopbar{padding:8px 12px;border-radius:8px;background:#f3f4f6;border:1px solid var(--line);font-size:13.5px}
.shopbar.ok{background:#e7f6ee;border-color:#96ddb8;color:#0b6b3a}
.preview{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap}
.preview img{height:76px;border-radius:6px;border:1px solid var(--line);object-fit:cover}

/* 门头照 OCR 识别结果 */
.ocrbox{margin-top:8px;background:#f8fafc;border:1px solid var(--line);border-radius:8px;padding:10px}
.shopname{font-size:17px;font-weight:700;color:#0f172a;letter-spacing:.3px}
.cands{margin-top:8px;display:flex;gap:6px;flex-wrap:wrap}
.chipbtn{font-size:12.5px;padding:5px 10px;border-radius:14px;border:1px solid var(--line);background:#fff;color:#334155;cursor:pointer}
.chipbtn:hover{border-color:#93b4fd}
.chipbtn.on{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:600}
.namecands{margin-top:5px;display:flex;gap:5px;flex-wrap:wrap}
.namecands .chipbtn{font-size:12px;padding:3px 9px}
/* 疑似价格候选：多个价格无法自动确定时，点选后才允许确认入库 */
.pricecands{margin-top:5px;display:flex;gap:4px;flex-wrap:wrap;align-items:center;max-width:210px}
.pricecands .chipbtn{font-size:11.5px;padding:2px 7px;border-radius:11px}
.pricecands .chipbtn.price.cond{background:#fff7e6;border-color:#f0c26a;color:#8a5a00}
.pricecands .chipbtn.price.other{background:#f4f4f5;border-color:#d9d9de;color:#77777f}
.pricecands .chipbtn.price.on{background:#2563eb;border-color:#2563eb;color:#fff}
.pricecands .pickmsg{width:100%;font-size:11.5px;color:#b3261e;font-weight:600}
.pricecands .sg{width:100%;font-size:11px;color:#8a8f98}
td.needpick{background:#fff7f6;box-shadow:inset 3px 0 0 #e24b4a}
.ocrraw{white-space:pre-wrap;word-break:break-all;font-size:12px;color:#475569;background:#fff;border:1px solid var(--line);border-radius:6px;padding:8px;margin:6px 0 0;max-height:150px;overflow:auto}
.clock{font-family:Consolas,monospace;font-size:18px;font-weight:700;color:var(--blue);min-width:62px}

/* 时间轴 */
.tl{position:relative;height:52px;background:#eef1f6;border:1px solid var(--line);border-radius:8px;overflow:hidden;cursor:crosshair;user-select:none;touch-action:none;-webkit-user-select:none}
.tlseg{position:absolute;top:6px;height:24px;border-radius:4px;opacity:.9;font-size:11px;color:#fff;line-height:24px;padding:0 5px;overflow:hidden;white-space:nowrap}
.tlgap{position:absolute;top:34px;height:12px;background:repeating-linear-gradient(45deg,#fecaca,#fecaca 4px,#fee2e2 4px,#fee2e2 8px);border-radius:3px}
.tlmark{position:absolute;top:0;bottom:0;width:2px;background:#94a3b8}
.tlcur{position:absolute;top:0;bottom:0;width:2px;background:var(--err);left:0}
.tlsel{position:absolute;top:0;bottom:0;background:rgba(31,94,255,.22);border:1px solid var(--blue)}
/* 秒数标尺 + 选中读数 */
.tlruler{position:relative;height:22px;margin-top:3px;pointer-events:none;user-select:none}
.tlruler .tk{position:absolute;top:0;width:1px;background:#c3cbd8}
.tlruler .tk.major{height:9px;background:#8d99ab}
.tlruler .tk.minor{height:5px}
.tlruler .lb{position:absolute;top:9px;font-size:10.5px;line-height:1.1;color:#75808f;font-family:Consolas,monospace;transform:translateX(-50%);white-space:nowrap}
.tlruler .lb.first{transform:none}
.tlread{margin-top:4px;font-size:12.5px;font-family:Consolas,monospace;color:#3b53a1;background:#eef2ff;border-radius:6px;padding:4px 9px;display:inline-block}
.tlread b{color:#12243d}
.tlread.sel{background:#dbe6ff;color:#1e3a8a;border:1px solid #b9cdff}
.tlread.sel b{color:#0f2f80}
.legend{display:flex;gap:12px;flex-wrap:wrap;margin-top:8px;font-size:12.5px}
.legend i{display:inline-block;width:11px;height:11px;border-radius:3px;margin-right:4px;vertical-align:-1px}

/* 商品卡托盘 */
.tray{display:flex;gap:10px;flex-wrap:wrap}
.pcard{width:132px;border:2px solid var(--line);border-radius:9px;background:#fff;overflow:hidden;cursor:pointer;position:relative}
.pcard.active{border-color:var(--blue);box-shadow:0 0 0 3px #dbe6ff}
.pcard img{width:100%;height:88px;object-fit:cover;display:block;background:#eef1f6}
.pcard .pn{padding:5px 7px;font-size:12.5px;font-weight:600;line-height:1.35}
.pcard .pm{padding:0 7px 6px;font-size:11.5px;color:var(--muted)}
.pcard .del{position:absolute;right:3px;top:3px;background:rgba(0,0,0,.45);color:#fff;border:0;border-radius:4px;font-size:11px;padding:1px 5px}
.pcard .badge{position:absolute;left:3px;top:3px;background:var(--blue);color:#fff;font-size:11px;border-radius:4px;padding:1px 5px}

/* 转写 */
.transcript{max-height:230px;overflow:auto;border:1px solid var(--line);border-radius:8px;padding:8px;background:#fafbfc}
.tline{padding:3px 0;border-bottom:1px dashed #eef1f6;font-size:13px}
.tline .ts{color:var(--muted);font-family:Consolas,monospace;margin-right:8px}
.tline .src{font-size:11px;background:#eef2ff;color:#3b53a1;border-radius:4px;padding:0 4px;margin-right:6px}
.interim{color:var(--muted);font-size:13px;min-height:20px;padding:2px 0;font-style:italic}

/* 校对表格 */
.grid{width:100%;border-collapse:collapse;font-size:13px}
.grid th{background:#1e3a5f;color:#fff;text-align:left;padding:8px 7px;font-weight:600;position:sticky;top:0}
.grid td{border-bottom:1px solid var(--line);padding:6px 7px;vertical-align:top}
.grid tr.todo td{background:#fffdf5}
.grid tr.confirmed td{background:#f2fbf6}
.grid input{width:100%;min-width:70px;padding:4px 6px;font-size:13px}
.grid textarea{width:100%;min-height:52px;border:1px solid var(--line);border-radius:6px;padding:5px 6px;font:inherit;font-size:12.5px;resize:vertical}
.grid .thumb{width:54px;height:44px;object-fit:cover;border-radius:5px;border:1px solid var(--line);display:block}
.grid .flags{color:var(--warn);font-size:11.5px;margin-top:3px}
/* 复述段：业务员口说「复述」之后的最终定案，抽取优先级最高 */
.grid .recap{margin-top:4px;background:#eef6ff;border-left:3px solid #2563eb;border-radius:0 5px 5px 0;
  padding:5px 7px;font-size:11.5px;color:#1e3a8a;line-height:1.45}
.grid .recap.warn{background:#fff7f6;border-left-color:#e24b4a;color:#b3261e}
.grid .recap.none{background:#f8fafc;border-left-color:#cbd5e1;color:#8a8f98}
.grid .recap .rcptag{display:inline-block;background:#2563eb;color:#fff;border-radius:4px;
  padding:1px 5px;font-size:10.5px;font-weight:700;margin-right:5px;vertical-align:1px}
.grid .recap .rcpuse{display:inline-block;color:#b45309;font-weight:600;margin-right:5px}
.grid .recap .rcptxt{color:#334155}
.grid .st{font-size:12px;font-weight:700;border-radius:5px;padding:3px 6px;display:inline-block}
.grid .st.todo{background:#fef3c7;color:#92400e}
.grid .st.ok{background:#d7f5e3;color:#0b6b3a}
.ops{display:flex;flex-direction:column;gap:4px}

.gate{margin:14px 0;display:flex;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px 14px}
.gate .msg{flex:1;font-size:13px;color:var(--muted)}
.gate .msg b{color:var(--err)}

.qrow{display:flex;gap:10px;align-items:center;border:1px solid var(--line);border-radius:8px;padding:9px 11px;margin-bottom:8px;background:#fff}
.qrow .qmeta{flex:1}
.chip{font-size:11.5px;border-radius:10px;padding:1px 8px;background:#eef2ff;color:#3b53a1}
.chip.green{background:#d7f5e3;color:#0b6b3a}
.chip.amber{background:#fef3c7;color:#92400e}
.chip.red{background:#fee2e2;color:#a32d2d}

.modal{position:fixed;inset:0;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;z-index:50}
.modalbox{background:#fff;border-radius:12px;padding:14px;width:min(560px,92vw)}
.modalbox video{width:100%;background:#000;border-radius:8px;max-height:52vh}
.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:#12243d;color:#fff;padding:9px 16px;border-radius:8px;z-index:80;font-size:13.5px;box-shadow:0 6px 20px rgba(0,0,0,.25)}
.donebox li{margin:4px 0}

/* 门头照框选识别弹层 */
.cropbox{width:min(720px,94vw)}
.cropstage{position:relative;max-height:60vh;overflow:auto;background:#0b1220;border-radius:8px;cursor:crosshair;user-select:none;-webkit-user-select:none;touch-action:none;text-align:center;line-height:0}
.cropstage img{display:block;max-width:100%;height:auto;margin:0 auto}
.cropsel{position:absolute;border:2px solid #38bdf8;background:rgba(56,189,248,.18);box-shadow:0 0 0 9999px rgba(0,0,0,.35);pointer-events:none;box-sizing:border-box}
.cropsel::after{content:'';position:absolute;right:-2px;bottom:-2px;width:14px;height:14px;background:#38bdf8;border-radius:2px}
#shopPreviewImg{cursor:zoom-in;border:2px solid var(--line);transition:border-color .15s}
#shopPreviewImg:hover{border-color:#38bdf8}
#btnCropOpen{font-size:12px;align-self:center}

/* ============================================================
   左侧导航 + 主区（工作台布局）
   ============================================================ */
/* 导航从左侧栏改为顶部横条：横屏 iPad 右侧内容宽度 980px → 1182px，够放 1080px 的校对表 */
.layout{display:flex;flex-direction:column;gap:10px;max-width:1520px;margin:0 auto;padding:12px 14px;align-items:stretch}
.nav{display:flex;align-items:center;gap:6px;flex-wrap:wrap;background:var(--card);border:1px solid var(--line);
  border-radius:10px;padding:6px 8px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.navitem{display:flex;align-items:center;gap:7px;text-align:left;border:1px solid transparent;background:transparent;
  border-radius:8px;padding:8px 12px;font-size:13.5px;color:#334155}
.navitem:hover{background:#f1f5f9}
.navitem .nico{font-size:15px;line-height:1}
.navitem.on{background:#e6f1f2;color:var(--teal);font-weight:700;border-color:#bfe0e2}
.navfoot{display:none}
.main{width:100%;min-width:0}
.main > section{padding:0;margin:0;max-width:none}
@media (max-width:900px){
  .layout{flex-direction:column}
  .nav{width:100%;flex:1 1 auto;position:static;display:flex;flex-wrap:wrap;gap:4px;align-items:center}
  .navitem{width:auto}
}

/* ============================================================
   首页：问候语 + 四步流程条
   ============================================================ */
.greet{display:flex;align-items:center;gap:9px;font-size:25px;font-weight:800;color:#16324a;
  padding:6px 2px 12px;letter-spacing:.4px;line-height:1.25}
.greet .wave{font-size:24px}
.greet .gname{color:var(--teal);cursor:pointer;border-bottom:2px dashed #a8c9cc;font-weight:800}
.greet .gname:hover{border-bottom-color:var(--teal)}
.greet .gsep{margin:0 8px;color:#9aa7b6;font-weight:600}

.flowbar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;background:var(--card);border:1px solid var(--line);
  border-radius:12px;padding:10px 14px;margin-bottom:14px;box-shadow:0 1px 2px rgba(16,24,40,.04)}
.fstep{display:flex;align-items:center;gap:8px;border:0;background:transparent;padding:4px 6px;border-radius:8px}
.fstep .fno{width:26px;height:26px;flex:0 0 auto;border-radius:50%;background:#c3cdd8;color:#fff;
  font-size:13px;font-weight:700;display:grid;place-items:center}
.fstep .ftxt{text-align:left;line-height:1.25}
.fstep .ftxt b{display:block;font-size:13.5px;font-weight:700;color:#465569}
.fstep .ftxt i{display:block;font-style:normal;font-size:11.5px;color:#9aa7b6}
.fstep.on .fno{background:var(--teal)}
.fstep.on .ftxt b{color:var(--teal)}
.fstep[data-step="1"]:hover,.fstep[data-step="2"]:hover,.fstep[data-step="3"]:hover,.fstep[data-step="4"]:hover{background:#f4f7f9}
.farrow{color:#cbd5e1;font-size:14px;padding:0 2px}

/* ============================================================
   首页：① 识别商家
   ============================================================ */
.stepcard{padding-top:12px}
.stephead{display:flex;align-items:flex-start;gap:10px}
.stepno{width:22px;height:22px;flex:0 0 auto;margin-top:2px;border-radius:6px;background:var(--teal);color:#fff;
  font-size:12.5px;font-weight:700;display:grid;place-items:center}
.stepmeta{flex:1;min-width:0}
.stepmeta h3{margin:0;font-size:15px}
.curchip{margin-left:auto;flex:0 0 auto;background:#fdf1e0;border:1px solid #f6d7a6;color:#a35b06;
  border-radius:14px;padding:3px 11px;font-size:12.5px;white-space:nowrap}

.dropzone{margin-top:12px;border:1px dashed #c9d3de;border-radius:10px;background:#fbfcfd;padding:20px 16px;text-align:center}
.dropzone .camico{font-size:34px;line-height:1}
.dropzone .dzTitle{font-size:15.5px;font-weight:700;margin-top:4px;color:#243b53}
.dropzone .dzSub{font-size:12.5px;color:#98a4b3;margin-top:3px}
.dropzone .dzBtns{margin-top:13px;display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.act.teal{background:var(--teal);border-color:var(--teal);color:#fff}
.act.teal:hover:enabled{background:var(--teal-d)}

/* 档案库匹配结果 */
.matchbox{margin-top:12px;border:1px solid var(--line);border-radius:10px;padding:12px;background:#fff}
.mhead{display:flex;align-items:center;gap:11px;background:var(--navy);color:#fff;border-radius:8px;padding:10px 13px}
.mhead .mico{font-size:22px;line-height:1}
.mhead .mmeta{flex:1;min-width:0}
.mhead .mmeta b{font-size:14px}
.mhead .mmeta .muted{color:#a7bccf;margin-top:1px}
.mlabel{margin-top:12px;font-size:12.5px;color:#64748b;font-weight:700;letter-spacing:.2px}

.mcard{display:flex;gap:11px;align-items:center;border:1px solid var(--line);border-radius:9px;
  padding:10px 12px;margin-top:8px;background:#fff}
.mcard.old{border-color:#cfe8dc;background:#fbfefc}
.mcard.new{border-color:#f6dcb4;background:#fffdf8}
.mcard .mico2{width:42px;height:42px;flex:0 0 auto;border-radius:8px;background:#eef2f6;display:grid;
  place-items:center;font-size:20px;overflow:hidden}
.mcard .mico2 img{width:100%;height:100%;object-fit:cover;display:block}
.mcard .mb{flex:1;min-width:0}
.mcard .mb .mnm{font-size:14.5px;font-weight:700;color:#1f2937}
.mcard .mb .mrow{font-size:12.5px;color:#6b7a8d;margin-top:1px}
.mcard .mb .mscore{color:#0f8a4a;font-weight:600}
.tagchip{font-size:11.5px;border-radius:10px;padding:1.5px 9px;margin-left:7px;font-weight:600;white-space:nowrap}
.tagchip.old{background:#d7f5e3;color:#0b6b3a}
.tagchip.new{background:#fde8c6;color:#a35b06}
.tagchip.sus{background:#eef2ff;color:#3b53a1}
.btnold{background:#0b4a5c;border-color:#0b4a5c;color:#fff;font-weight:600}
.btnold:hover:enabled{background:#083945}
.btnnew{background:var(--amber);border-color:var(--amber);color:#fff;font-weight:600}
.btnnew:hover:enabled{background:#cf7109}

.recentlist{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.rchip{border:1px solid var(--line);border-radius:8px;background:#fff;padding:7px 11px;text-align:left;
  font-size:12.5px;color:#334155;min-width:150px}
.rchip{position:relative;padding-right:34px}
.rchip::after{content:'›';position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:22px;color:#7a8986}
.rchip:hover{border-color:#9ac7c5;background:#f7fbfa}
.rchip:focus-visible{outline:3px solid #b9dfe2;outline-offset:2px}
.rchip b{display:block;font-size:13px;color:#1f2937}
.rchip span{display:block;color:#9aa7b6;font-size:11.5px;margin-top:1px}

/* ============================================================
   客户档案 / 任务列表 / 商品列表
   ============================================================ */
.crow,.prow{display:flex;gap:11px;align-items:center;border:1px solid var(--line);border-radius:9px;
  padding:9px 11px;margin-bottom:8px;background:#fff}
.crow-history{cursor:pointer;transition:background .16s,border-color .16s,box-shadow .16s}
.crow-history::after{content:'›';margin-left:2px;color:#8b98a8;font-size:24px;line-height:1;font-weight:400}
.crow-history:hover{background:#f8fbfb;border-color:#b9dadd;box-shadow:0 1px 3px rgba(16,24,40,.08)}
.crow-history:focus-visible{outline:3px solid #b9dfe2;outline-offset:2px}
.crow-history .cacts{margin-left:auto}
.crow-history .cacts .act.teal{background:var(--teal);border-color:var(--teal);color:#fff}
.crow-history .cacts .act.teal:hover:enabled{background:var(--teal-d);border-color:var(--teal-d)}
.crow img,.prow img{width:48px;height:48px;flex:0 0 auto;object-fit:cover;border-radius:7px;
  border:1px solid var(--line);display:block;background:#eef1f6}
.crow .cmain,.prow .pmain{flex:1;min-width:0}
.crow .cnm,.prow .pnm{font-size:13.5px;font-weight:700;color:#1f2937}
.crow .csub,.prow .psub{font-size:12px;color:#94a3b8;margin-top:1px}
.crow .cacts,.prow .pacts{display:flex;gap:6px;flex:0 0 auto;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.cico{width:48px;height:48px;flex:0 0 auto;border-radius:7px;background:#eef2f6;display:grid;place-items:center;font-size:20px}
.prow .pnum{font-family:Consolas,monospace;font-size:12.5px;color:#334155;white-space:nowrap}
.sechead{margin:14px 0 8px;font-size:12.5px;color:#64748b;font-weight:700}
.sechead:first-child{margin-top:0}

/* 校对表格：列变多了，允许横向滚动 */
.tablewrap{overflow-x:auto}
.tablewrap .grid{min-width:1220px}
.grid .cathint{font-size:10.5px;color:var(--warn);margin-top:2px;min-height:14px}
.grid .cathint.man{color:#0f8a4a}

/* ============================================================
   iPad / 触控优化
   ============================================================ */
html{background:var(--bg);-webkit-text-size-adjust:100%}
body{min-height:100vh;overscroll-behavior-y:none}
button,input,select,textarea{touch-action:manipulation}
button{min-height:44px}                /* 触屏硬约束：可点目标不得小于 44px */
input,select{min-height:44px}
.mini{min-height:44px}
.chk input{width:20px;height:20px;accent-color:var(--teal)}
.layout{padding-top:calc(12px + env(safe-area-inset-top));
  padding-bottom:calc(14px + env(safe-area-inset-bottom));
  padding-left:calc(14px + env(safe-area-inset-left));
  padding-right:calc(14px + env(safe-area-inset-right))}
.main > section{padding-left:0;padding-right:0}

/* ---------- iPad 横屏竖向预算：把表格往上提 ----------
   校对/采集/完成页不需要首页问候语（“第几步”流程条已经表达了位置）。
   隐藏后省下约 49px，表格每行都能提前一屏出现。 */
body[data-view="review"] .greet,
body[data-view="collect"] .greet,
body[data-view="done"] .greet{display:none}

/* 流程条压缩：保留全部四步与可点跳转，但收紧留白与副标题 */
.fstep{padding:5px 9px;gap:8px}
.fstep .ftxt i{font-size:11px;line-height:1.25}
.flowbar{padding:7px 12px;margin:6px 0 8px}
.flowbar .farrow{font-size:13px}

/* 价格候选：四列单排太占竖向空间，改两列网格 */
.needpick .pricecands{display:grid;grid-template-columns:1fr 1fr;gap:4px;max-width:170px}
.needpick .pricecands .pickmsg,
.needpick .pricecands .sg{grid-column:1 / -1}
.needpick .pricecands button{min-height:44px;padding:4px 6px;font-size:12.5px;width:100%}
.needpick .pricecands .sg{font-size:11px}

/* 表头吸顶：行变高后一屏装不下整表，滚下去必须还看得见列名。
   thead 必须 sticky（不是 th），否则列宽与表体对不齐。 */
.tablewrap thead th{position:sticky;top:0;z-index:5}

/* 矮视口（iPad 横屏 830px 等）：能省则省地把表格往上提、每行压矮 */
@media (max-height:860px){
  .needpick .muted{font-size:11px}
  /* 候选按钮的 title 已含完整出处，小屏不再常驻展示，省约 30px 行高 */
  .pricecands .sg{display:none}
  .sessiontext{max-height:96px}
  .grid th,.grid td{padding:5px 7px}
  /* 规格四行压到每行 34px */
  .specrow2{min-height:34px}
  .specrow2 .sval{padding:2px 5px;font-size:12.5px}
  .specrow2 .slabel{font-size:11px}
  /* 需调整事项：卡片压扁并限高，条目多时内部滚动 */
  .talkcell{max-height:104px;overflow:auto;-webkit-overflow-scrolling:touch}
  .talkrow{padding:3px 6px;font-size:12px;line-height:1.35}
  /* 价格候选按钮压到 38px（仍远大于原生控件，且整块更大更易点） */
  .needpick .pricecands button{min-height:38px;padding:3px 6px;font-size:12px}
  .pickmsg{font-size:11px;line-height:1.28;margin-bottom:2px}
  /* 名称候选限高 */
  .namecands{max-height:64px;overflow:auto;-webkit-overflow-scrolling:touch}
  /* 场次信息卡：音频条压矮，按钮行收紧 */
  #rAudioRow audio{height:32px}
  #view-review .card{padding:10px;margin-bottom:10px}
  .flowbar{padding:5px 10px;margin:4px 0 6px}
  .fstep{padding:3px 8px}
}
.tablewrap{border:1px solid var(--line);border-radius:8px;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
.tablewrap .grid{min-width:1080px}
.grid th,.grid td{padding:9px 8px}
.grid input{min-height:42px}
.grid textarea{min-height:72px}
.grid th:first-child,.grid td:first-child{position:sticky;left:0;z-index:2}
.grid th:first-child{z-index:4;background:#1e3a5f}
.grid tr.todo td:first-child{background:#fffdf5}
.grid tr.confirmed td:first-child{background:#f2fbf6}
.pcard{width:156px;min-height:168px}
.pcard img{height:104px}
.pcard .del{min-width:40px;min-height:40px;right:0;top:0;font-size:17px}
.tl{height:64px}
.tlseg{top:8px;height:28px;line-height:28px}
.tlgap{top:40px}
.modal{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.modalbox{max-height:calc(100vh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto}
.modalbox .row{margin-bottom:0}
.toast{bottom:calc(26px + env(safe-area-inset-bottom))}
.confirmbox{width:min(440px,calc(100vw - 32px));padding:20px}

/* ---------- 校对表：规格单元格（起订量/装箱数/箱规/毛重 四行叠放） ---------- */
.speccell{padding:6px 7px!important}
.specrow2{display:flex;align-items:center;gap:6px;min-height:30px;line-height:1.3}
.specrow2 + .specrow2{border-top:1px dashed #eef2f6}
.specrow2 .slabel{flex:0 0 auto;color:#94a3b8;font-size:11.5px;width:28px}
.specrow2 .sval{flex:1 1 auto;min-width:0;text-align:left;border:1px solid transparent;border-radius:6px;
  background:transparent;padding:4px 6px;font:inherit;font-size:13px;cursor:pointer;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.specrow2 .sval:hover{background:#f1f5f9;border-color:#e3e8ef}
.specrow2 .sval.empty{color:#b9c2ce}
.specrow2 .sval .snum{font-weight:600;font-variant-numeric:tabular-nums}
.specrow2 .sval .sunit{color:#64748b;margin-left:3px;font-size:12px}

/* ---------- 规格微调弹窗 ---------- */
.specbox{width:min(420px,calc(100vw - 32px))}
.specstepper{display:flex;align-items:center;gap:8px;margin-top:14px}
.specstepper .specstep{flex:0 0 auto;width:52px;height:48px;font-size:20px;font-weight:700;border-radius:8px}
.specinput{flex:1 1 auto;text-align:center;font-size:20px;font-weight:700;height:48px;
  font-variant-numeric:tabular-nums;margin:0!important}
.specrow{display:flex;align-items:center;gap:8px;margin-top:12px}
.specrow .speclabel{flex:0 0 auto;color:#6b7280;font-size:12.5px;width:32px}
.specunits{display:flex;flex-wrap:wrap;gap:6px;flex:1 1 auto}
.specunits button{min-height:44px;padding:6px 12px;font-size:13px}
.specunits button.on{background:#e6f1f2;border-color:#bfe0e2;color:var(--teal);font-weight:700}
/* 用户自己加单位 */
.specadd{display:flex;gap:6px;flex:1 1 auto;align-items:center}
.specadd .unitnew{flex:1 1 auto;min-width:0;height:44px;margin:0!important;font-size:13px}
.specadd button{flex:0 0 auto;min-height:44px;white-space:nowrap}

/* ---------- 校对表：行拖动排序 ---------- */
.grid tr[draggable="true"]{cursor:grab}
.grid tr.dragging{opacity:.45}
.grid tr.dropbefore td{border-top:2px solid var(--teal)!important}
.grid tr.dropafter td{border-bottom:2px solid var(--teal)!important}
.grid tbody td.tdtitle .draghint{color:#c3cdd8;font-size:15px;margin-right:4px;cursor:grab;user-select:none}

/* ---------- 校对表：商品行两态视觉（按资料是否齐全自动判定） ----------
   资料齐全＝绿 · 资料待补＝琥珀。两个状态都可入库，颜色只是提示不是拦截。 */
.grid tr.partial td{background:#fffdf7}
.grid tr.partial td:first-child{background:#fffdf7}
.stchip{display:inline-flex;align-items:center;justify-content:center;
  min-width:74px;min-height:30px;padding:3px 9px;border-radius:8px;
  border:1px solid transparent;font-size:12.5px;font-weight:600;white-space:nowrap}
.stchip.complete{background:#e7f6ee;border-color:#96ddb8;color:var(--ok)}
.stchip.partial{background:#fdf1e0;border-color:#f6d7a6;color:#a35b06}

/* ---------- 箱规：长 × 宽 × 高 = 立方 ---------- */
.specrow2 .svol{display:block;color:#8a94a6;font-size:11px;font-weight:400;letter-spacing:0}
.specdims .dimrow{display:flex;align-items:center;gap:6px}
.specdims .dimlabel{flex:0 0 auto;color:#6b7280;font-size:12.5px}
.specdims .diminput{flex:1 1 0;min-width:0;text-align:center;height:48px;font-size:17px;
  font-weight:600;font-variant-numeric:tabular-nums;margin:0!important}
.specdims .dimvol{margin-top:8px;font-size:12.5px;color:#64748b;text-align:center;min-height:18px}
.specdims .dimvol.on{color:var(--teal);font-weight:700}

/* ---------- 校对表：iPad 横屏(830px 高)下的行高控制 ----------
   行高以前被「会话记录」的整段原文撑到 358px，一屏只看得见 1 行。
   这里给各列设高度上限（内部滚动，不丢字），把行高压到能一屏看 3 行左右。 */
.talkcell{max-width:320px}
.talkcell .sessiontext{max-height:132px;overflow:auto;-webkit-overflow-scrolling:touch;
  font-size:12.5px;line-height:1.55;margin:0;padding-right:2px}
.talkcell .sessiontext::-webkit-scrollbar{width:6px}
.talkcell .sessiontext::-webkit-scrollbar-thumb{background:#d7dee7;border-radius:3px}
.talkcell .sessiontext::-webkit-scrollbar-track{background:transparent}
.needpick .pricecands{margin-top:4px;gap:4px;max-width:170px}
.needpick{max-width:190px}
.pricecands button{padding:5px 9px;font-size:12.5px;min-height:32px}
.pricecands .pchint,.needpick .muted{font-size:11.5px;line-height:1.35}
.grid .flags{font-size:11.5px;line-height:1.4;max-height:60px;overflow:auto}
.grid .recap{font-size:12px}

/* ---------- 商品分类：点格子弹出的树面板 ---------- */
.catcell .catpick{display:block;width:100%;min-height:44px;text-align:left;
  background:#fff;border:1px solid var(--line);border-radius:7px;padding:8px 10px;
  font:inherit;font-size:13px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.catcell .catpick.empty{color:#b9c2ce}
.catcell .catpick:hover{background:#f1f5f9;border-color:#cbd5e1}
.catbox{width:min(480px,calc(100vw - 32px))}
.cattree{margin-top:10px;max-height:46vh;overflow:auto;-webkit-overflow-scrolling:touch;
  border:1px solid var(--line);border-radius:10px;padding:6px}
.catnode + .catnode{border-top:1px solid #f1f5f9}
.catline{display:flex;align-items:center;gap:4px}
.catarrow{flex:0 0 auto;width:34px;height:44px;border:0;background:transparent;color:#94a3b8;
  font-size:13px;cursor:pointer;border-radius:6px}
.catarrow:hover{background:#f1f5f9}
.catrow2{flex:1 1 auto;min-height:44px;text-align:left;border:1px solid transparent;background:transparent;
  border-radius:7px;padding:8px 10px;font:inherit;font-size:14px;font-weight:600;color:#1f2937;cursor:pointer}
.catrow2:hover{background:#f1f5f9}
.catrow2.on{background:#e6f1f2;border-color:#bfe0e2;color:var(--teal)}
.catkids{padding:2px 0 6px 34px;display:flex;flex-wrap:wrap;gap:6px}
.catkidline{display:flex;align-items:center;gap:2px}
.catkid{min-height:44px;border:1px solid var(--line);background:#fff;border-radius:8px;
  padding:7px 13px;font:inherit;font-size:13.5px;color:#334155;cursor:pointer}
.catkid:hover{background:#f1f5f9}
.catkid.on{background:#e6f1f2;border-color:#bfe0e2;color:var(--teal);font-weight:700}
.catkid.add{border-style:dashed;color:#94a3b8}
.catop{flex:0 0 auto;width:38px;height:44px;border:1px solid var(--line);background:#fff;border-radius:7px;
  color:#64748b;font-size:14px;cursor:pointer}
.catop:hover{background:#f1f5f9;color:#334155}
.catop.del:hover{background:#fdecec;border-color:#f3c6c6;color:#c0392b}
.catrenamerow{display:flex;gap:6px;align-items:center;padding:4px 6px}
.catrenamerow .dialog-input{flex:1 1 auto;min-width:0;margin:0!important;height:44px}
.catempty{color:#94a3b8;font-size:13px;text-align:center;padding:14px 6px}
.catnew{display:block;width:100%;min-height:48px;margin-top:6px;border:1px dashed var(--teal);
  background:#f2fbfb;border-radius:9px;color:var(--teal);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.catnew:hover{background:#e6f1f2}

/* 商品列表的「按分类筛选」按钮（替代原来的扁平下拉） */
.catfilter{min-height:44px;padding:8px 14px;background:#fff;border:1px solid var(--line);
  border-radius:8px;color:var(--ink);font-size:13.5px;white-space:nowrap;max-width:220px;
  overflow:hidden;text-overflow:ellipsis}
.catfilter:hover{background:#f1f5f9}
.catfilter.on{background:#e6f1f2;border-color:#bfe0e2;color:var(--teal);font-weight:700}

/* ---------- 补录音弹窗 ---------- */
.suppbox{width:min(480px,calc(100vw - 32px))}
.supprec{display:flex;align-items:center;gap:10px;margin-top:14px;flex-wrap:wrap}
.supprec .act{flex:0 0 auto;min-height:48px;padding:0 18px}
.suppclock{font-variant-numeric:tabular-nums;font-weight:700;font-size:17px;color:#162b3b;min-width:52px}
.supprec .muted{flex:1 1 100%;font-size:12px}
.supptext{width:100%;margin-top:6px;font-size:14px;line-height:1.6;resize:vertical;min-height:70px}
#btnSuppRerun{margin-top:8px}
.suppchanges{margin-top:14px;border-top:1px solid var(--line);padding-top:10px;
  max-height:38vh;overflow:auto;-webkit-overflow-scrolling:touch}
.suppchange{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px;
  background:#f8fbff;border:1px solid #dbe7f5;border-radius:8px;padding:7px 10px;margin-bottom:6px;font-size:13px}
.suppchange b{flex:0 0 auto;color:#334155;min-width:64px}
.suppchange .sc-old{color:#94a3b8;text-decoration:line-through}
.suppchange .sc-arrow{color:#94a3b8}
.suppchange .sc-new{color:var(--teal);font-weight:700}
.suppchange .sc-why{flex:1 1 100%;color:#94a3b8;font-size:11.5px;font-style:normal}

/* 补录段落列表（支持多段，越靠后越新） */
.supplisthead{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-top:14px}
.supplisthead .muted{font-size:11.5px}
.supplist{display:flex;flex-direction:column;gap:6px;margin-top:6px;
  max-height:30vh;overflow:auto;-webkit-overflow-scrolling:touch}
.suppseg{display:flex;align-items:flex-start;gap:6px;background:#f8fbff;
  border:1px solid #dbe7f5;border-radius:8px;padding:6px 8px}
.suppseg.latest{background:#f2fbf6;border-color:#b6e3cd}
.segno{flex:0 0 auto;width:20px;height:20px;border-radius:50%;background:#e2e8f0;color:#475569;
  font-size:11.5px;font-weight:700;display:grid;place-items:center;margin-top:4px}
.suppseg.latest .segno{background:#96ddb8;color:#0b6b3a}
.segtext{flex:1 1 auto;min-width:0;border:1px solid transparent;background:transparent;
  border-radius:6px;padding:5px 6px;font:inherit;font-size:13px;line-height:1.5;resize:vertical;
  min-height:40px;color:var(--ink)}
.segtext:hover{background:#fff;border-color:var(--line)}
.segtext:focus{background:#fff;border-color:var(--blue);outline:2px solid #c7d2fe}
.segtag{flex:0 0 auto;font-size:11px;background:#0f8a4a;color:#fff;border-radius:5px;padding:1px 6px;margin-top:5px}
.segdel{flex:0 0 auto;border:0;background:transparent;color:#c07a1e;font-size:14px;cursor:pointer;
  padding:0 4px;min-height:32px;border-radius:5px}
.segdel:hover{background:#fdeecf;color:#a35b06}
.supplistops{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}

/* ---------- 会话记录：原文 + 补录（可点开大弹窗） ---------- */
.sessionwrap{cursor:pointer;border-radius:6px;padding:2px;transition:background .12s}
.sessionwrap:hover{background:#f1f5f9}
.sessionsep{display:flex;align-items:center;gap:6px;margin:7px 0 5px;color:#8a94a6;font-size:11px}
.sessionsep::before,
.sessionsep::after{content:'';flex:1 1 auto;height:1px;background:#e3e8ef}
.sessionsep span{flex:0 0 auto}
.sessiontext.suppline{background:#f2fbf6;border-left:3px solid #96ddb8;border-radius:0 6px 6px 0;
  padding:5px 7px;margin-bottom:4px;color:#334155}
.sessiontext.suppline b{display:inline-block;width:16px;color:#0f8a4a;font-size:11px}

/* 会话记录大弹窗 */
.sessbox{width:min(760px,94vw);max-height:calc(100vh - 40px);display:flex;flex-direction:column}
.sessbody{margin-top:12px;overflow:auto;-webkit-overflow-scrolling:touch;flex:1 1 auto;min-height:0}
.sessblock + .sessblock{margin-top:16px;border-top:1px solid var(--line);padding-top:14px}
.sesslabel{font-size:12.5px;color:#6b7280;margin-bottom:6px;font-weight:600}
.sesstext{font-size:14px;line-height:1.75;color:#1f2937;white-space:pre-wrap;word-break:break-word;
  background:#fafbfc;border:1px solid var(--line);border-radius:8px;padding:10px 12px}
.sesssupp{display:flex;gap:8px;align-items:flex-start;background:#f2fbf6;border:1px solid #b6e3cd;
  border-radius:8px;padding:8px 10px;margin-bottom:6px;font-size:13.5px;line-height:1.7;color:#1f2937}
.sesssupp b{flex:0 0 auto;width:18px;height:18px;border-radius:50%;background:#96ddb8;color:#0b6b3a;
  font-size:11px;display:grid;place-items:center;margin-top:3px}
.sesssupp span{flex:1 1 auto;min-width:0;white-space:pre-wrap;word-break:break-word}

/* ---------- 商谈记录：一条条列（与价格候选同构） ---------- */
.talkcands{display:flex;flex-direction:column;gap:4px;margin-top:4px}
.talkrow{display:flex;align-items:flex-start;gap:6px;background:#fff8ee;border:1px solid #f3dcb8;
  border-radius:7px;padding:5px 7px;font-size:12.5px;line-height:1.4;color:#7a4a08;text-align:left}
/* 条目文字本身就是按钮：点一下改这条 */
.talkrow .tk{flex:1 1 auto;min-width:0;word-break:break-word;text-align:left;
  border:0;background:transparent;font:inherit;color:inherit;cursor:pointer;
  padding:4px 3px;border-radius:5px;min-height:32px}
.tkedit:hover{background:#fdeecf;text-decoration:underline;text-decoration-style:dotted}
.talkrow .tx{flex:0 0 auto;border:0;background:transparent;color:#c07a1e;font-size:14px;cursor:pointer;
  padding:0 4px;min-height:32px;border-radius:5px}
.talkrow .tx:hover{color:#a35b06;background:#fdeecf}
.talkempty{color:#b9c2ce;font-size:12px}
.talkadd{display:block;width:100%;min-height:36px;margin-top:5px;border:1px dashed #f0c26a;
  background:#fffdf7;border-radius:7px;color:#a35b06;font:inherit;font-size:12.5px;cursor:pointer}
.talkadd:hover{background:#fdf1e0}
.talkedittext{width:100%;margin-top:12px;font-size:14px;line-height:1.6;resize:vertical;min-height:80px}
.confirm-title{font-size:17px;font-weight:700;color:#162b3b}
.confirm-message{margin-top:8px;color:#526173;white-space:pre-line}
.dialog-input{width:100%;margin-top:14px}
.confirm-actions{justify-content:flex-end;margin-top:20px!important}

@media (max-width:1100px){
  .layout{gap:10px;padding:10px 12px}
  .nav{padding:4px 6px}
  .navitem{padding:6px 10px;font-size:13px}
  .card{padding:12px;margin-bottom:12px}
  .greet{font-size:22px}
  .flowbar{overflow-x:auto;flex-wrap:nowrap;justify-content:flex-start;padding:8px 10px;-webkit-overflow-scrolling:touch}
  .fstep{flex:0 0 auto;min-width:175px;min-height:50px}
  .farrow{flex:0 0 auto}
}

@media (max-width:900px){
  .layout{display:block;padding:8px 10px calc(10px + env(safe-area-inset-bottom))}
  /* 顶部导航在窄屏保持卡片样式，改为吸顶，不再做整宽出血 */
  .nav{position:sticky;top:0;z-index:20;margin-bottom:10px;padding:6px 8px;flex-wrap:wrap}
  .navfoot{display:none}
  .navitem{width:auto;flex:1 0 132px;justify-content:center;text-align:center;min-height:46px;padding:8px 10px;margin:0;white-space:nowrap}
  .navitem .nico{font-size:20px}
  .main > section{padding:0}
  section{padding:10px}
  .greet{padding-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .greet .wave{font-size:21px}
  .flowbar{margin-left:-2px;margin-right:-2px}
  .fstep{min-width:158px}
  .farrow{display:none}
  .stephead{gap:8px}
  .dropzone{padding:24px 14px}
  .dropzone .dzBtns button{flex:1 1 180px}
  .row.wrap > button,.row.wrap > select{flex:1 1 150px}
  .row.wrap > .clock{flex:0 0 auto}
  .gate{position:sticky;bottom:calc(8px + env(safe-area-inset-bottom));z-index:12;flex-wrap:wrap;box-shadow:0 4px 18px rgba(15,23,42,.12)}
  .gate .msg{flex-basis:100%}
  .gate .act{width:100%}
  .mcard,.crow,.prow{align-items:flex-start;flex-wrap:wrap}
  .mcard .mb,.crow .cmain,.prow .pmain{min-width:calc(100% - 58px)}
  .mcard > button,.crow .cacts,.prow .pacts{width:100%;justify-content:stretch}
  .mcard > button,.crow .cacts button,.prow .pacts button{flex:1 1 150px}
  .recentlist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .rchip{min-width:0;min-height:70px}
  .modalbox{width:min(720px,calc(100vw - 20px));border-radius:14px;padding:14px}
  .modalbox video{max-height:48vh}
}

@media (max-width:560px){
  .card{border-radius:8px;padding:11px}
  .greet{font-size:19px}
  .greet .gsep{margin:0 4px}
  .recentlist{grid-template-columns:1fr}
  .mhead{align-items:flex-start}
  .mhead .chip{display:none}
  .confirm-actions{flex-direction:row!important}
  .confirm-actions button{flex:1}
}

/* 现场主路径只保留动作和结果；详细说明、低频设置按需展开。 */
.why{display:none}
h3 .tag{display:none}
.secondary-controls,.manual-entry,.export-actions{font-size:12px;color:var(--muted)}
.export-actions{margin:10px 0}
.export-actions summary{cursor:pointer;list-style:none;padding:7px 9px;border:1px solid var(--line);border-radius:6px;background:#f8fafc;min-height:38px;display:flex;align-items:center;width:max-content}
.export-actions summary::after{content:'+';margin-left:8px;font-size:16px;line-height:1}
.export-actions[open] summary::after{content:'−'}
.secondary-controls summary,.manual-entry summary{cursor:pointer;list-style:none;padding:7px 9px;border:1px solid var(--line);border-radius:6px;background:#f8fafc;min-height:38px;display:flex;align-items:center}
.secondary-controls summary::after,.manual-entry summary::after{content:'+';margin-left:8px;font-size:16px;line-height:1}
.secondary-controls[open] summary::after,.manual-entry[open] summary::after{content:'−'}
.secondary-controls .chk{display:inline-flex;margin-top:7px;margin-right:7px}
.secondary-controls select{min-height:38px;padding:4px 8px}
.manual-entry{margin-bottom:6px}
#tlHint{display:none}
.camera-meta{display:none!important}
#photoHint{font-size:11.5px}
#srWarn{background:#eef6ff;border-color:#c7d8ff;color:#31558e}
button.act:disabled,.gate .act:disabled{background:#e5e7eb;border-color:#d1d5db;color:#94a3b8;opacity:1}
.gate #btnConfirmClear{min-width:104px}

@media (max-width:900px){
  .secondary-controls{margin-left:auto;flex:0 0 auto}
  .manual-entry summary{width:max-content}
  .gate #btnConfirmClear{flex:1 1 140px}
  .gate #btnCommit{flex:1 1 180px;width:auto}

  /* 校对表在 iPad 上改为商品卡，避免现场左右拖整张宽表。 */
  #view-review{padding-bottom:0}
  .gate{position:static;bottom:auto;box-shadow:none;margin-bottom:18px}
  .tablewrap{overflow:visible;border:0}
  .tablewrap .grid{display:block;min-width:0;border:0}
  .grid thead{display:none}
  .grid tbody{display:grid;gap:12px}
  .grid tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.04)}
  .grid tr.todo,.grid tr.confirmed{background:#fff}
  .grid td{display:block;min-width:0;border:0;padding:0;background:transparent!important;box-shadow:none!important}
  .grid td:first-child{position:static;grid-column:1/-1;padding-bottom:2px}
  .grid td:nth-child(2){grid-column:1;align-self:start}
  .grid td:nth-child(3){grid-column:2}
  .grid td:nth-child(n+4):nth-child(-n+8),.grid td:nth-child(9){grid-column:1/-1}
  .grid td:nth-child(10){grid-column:1/-1}
  .grid td:nth-child(n+4):nth-child(-n+9)::before{display:block;margin-bottom:3px;color:#64748b;font-size:11px;font-weight:700}
  .grid td:nth-child(4)::before{content:'单价'}
  .grid td:nth-child(5)::before{content:'商品分类'}
  .grid td:nth-child(6)::before{content:'起订量'}
  .grid td:nth-child(7)::before{content:'装箱数'}
  .grid td:nth-child(8)::before{content:'毛重'}
  .grid td:nth-child(9)::before{content:'备注'}
  .grid .thumb{width:100%;max-width:150px;height:92px}
  .grid input,.grid textarea{min-height:44px}
  .grid textarea{min-height:84px}
  .grid .ops{flex-direction:row;gap:8px}
  .grid .ops button{flex:1}
  .grid td:nth-child(9) > .muted{display:none}
}

/* 最近场次是低频查看项，默认收起；摘要本身保持完整触控面积。 */
.recent-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;padding:4px 2px;cursor:pointer;list-style:none;color:#1f2937}
.recent-summary::-webkit-details-marker{display:none}
.recent-summary::after{content:'展开';color:var(--teal);font-size:12px;font-weight:700}
.recent-sessions[open] .recent-summary::after{content:'收起'}
.recent-summary b{font-size:15px}
.recent-summary span{margin-left:auto;color:#94a3b8;font-size:12px}
#dzEngine{display:none}

@media (min-width:901px) and (max-width:1280px){
  .dropzone{display:grid;grid-template-columns:34px minmax(180px,1fr) auto;grid-template-areas:'icon title buttons' 'icon sub buttons';align-items:center;column-gap:12px;row-gap:1px;text-align:left;padding:12px 14px;margin-top:8px}
  .dropzone .camico{grid-area:icon;font-size:28px}
  .dropzone .dzTitle{grid-area:title;margin-top:0}
  .dropzone .dzSub{grid-area:sub;margin-top:0}
  .dropzone .dzBtns{grid-area:buttons;margin:0;justify-content:flex-end;flex-wrap:nowrap}
  .dropzone .dzBtns button{min-width:112px}
  .ocrbox{padding:8px;margin-top:8px}
  .ocrbox .row{margin:0}
  .matchbox{padding:8px;margin-top:8px}
  .mhead{padding:8px 10px}
  .mlabel{margin-top:8px}
  .mcard{padding:8px;margin-top:6px;gap:8px}
  .matchbox > .row[style]{margin-top:8px!important}
}

@media (pointer:coarse){
  button,input,select,summary{min-height:44px}
  .mini{min-height:44px;padding:8px 12px}
  .chipbtn{min-height:44px;padding:8px 12px}
  .navitem{min-height:48px}
  .fstep{min-height:48px}
  .recent-summary{min-height:48px;padding:8px 2px}
  .rchip{min-height:64px}
}

@media (max-width:900px){
  .dropzone{display:flex;flex-direction:column;text-align:center;padding:18px 12px}
  .dropzone .dzBtns{margin-top:10px}
  .dropzone .dzBtns button{min-width:0}
}

/* Material 3 色角色收口：主色、承载面、状态色各司其职。 */
body{color:var(--ink)}
.card,.nav,.flowbar,.recent-card{border-color:var(--line)}
input,select,textarea{border-color:var(--outline)}
input:focus,select:focus,textarea:focus{outline-color:var(--primary-container);border-color:var(--teal)}
.act,.act.teal{background:var(--teal);border-color:var(--teal);color:#fff}
.act:hover:enabled,.act.teal:hover:enabled{background:var(--teal-d);border-color:var(--teal-d)}
.act.ghost{color:var(--teal);border-color:#8ebfbd}
.mini.ghost{background:#f1f4f3;border-color:#d2ddda}
.mhead{background:#dff3f1;color:#173f4c;border:1px solid #b9dcd9;min-height:48px;padding:8px 12px;border-radius:12px}
.mhead .mmeta .muted{color:#536e6c}
.mcard.old{border-color:#c9e4dc;background:#f7fcfb}
.mcard.new{border-color:#ead2a1;background:#fffaf0}
.mcard > button{margin-left:auto;flex:0 0 auto}
.match-recovery{justify-content:flex-start}
.match-recovery .mini{color:#52625f;background:#f1f4f3;border-color:#d2ddda}
.btnold{background:var(--teal);border-color:var(--teal)}
.btnold:hover:enabled{background:var(--teal-d);border-color:var(--teal-d)}
.btnnew{background:#ffedc2;border-color:#efcf87;color:#5f4300;font-weight:700}
.btnnew:hover:enabled{background:#ffe3a0;border-color:#d9b45e;color:#4d3500}
.chip{background:#e5eeec;color:#36504d}
.chip.green{background:#d9f0df;color:#216a3a}
.chip.amber{background:#ffedc2;color:#725100}
.chip.red{background:#ffdad6;color:#8c1d18}
.grid th{background:#24585c}
.chipbtn.on,.pricecands .chipbtn.price.on{background:var(--teal);border-color:var(--teal)}
.toast{background:#243534}
.mhead .chip.green{background:#d9f0df;color:#216a3a}
.mhead .mmeta .muted:empty{display:none}
