/* 生产跟单 Demo · 简洁工业管理风：浅底 + 高对比 + 克制用色
   第三轮整改：师傅端手机壳（.phone/.phone-screen/模拟状态栏/说明栏）已彻底删除，
   任何视口都是标准 H5 单页形态；新建表单全部收进弹窗/抽屉。 */
*{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f2f4f6; --card:#ffffff; --line:#d8dee4; --line2:#e9edf1;
  --ink:#1d2733; --ink2:#5b6774; --ink3:#8a95a1;
  --pri:#0f5f9e; --pri-ink:#0a4a7c; --ok:#1d7a3d; --warn:#b25e09; --bad:#b3261e;
  --chip:#eef3f8;
  --radius:8px; --shadow:0 1px 2px rgba(20,35,55,.08),0 4px 14px rgba(20,35,55,.06);
}
html{font-size:15px}
body{font-family:-apple-system,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  background:var(--bg);color:var(--ink);line-height:1.55;min-height:100vh;
  -webkit-font-smoothing:antialiased;overflow-x:hidden}
button{font:inherit;cursor:pointer}
[hidden]{display:none!important}
table{border-collapse:collapse;width:100%}
h1,h2,h3{line-height:1.3}

/* ---------- topbar (桌面宽屏) ---------- */
.topbar{position:sticky;top:0;z-index:60;display:flex;align-items:center;gap:18px;
  background:var(--card);border-bottom:2px solid var(--line);padding:10px 20px}
.brand{font-size:19px;font-weight:800;letter-spacing:.5px}
.brand span{color:var(--pri);margin-left:4px}
.brand-sub{font-size:11.5px;color:var(--ink3);margin-top:1px}
.tb-tabs{display:flex;gap:6px;margin:0 auto;background:var(--chip);padding:4px;border-radius:10px}
.tb-tab{border:1px solid transparent;background:transparent;padding:8px 20px;border-radius:8px;
  font-weight:600;color:var(--ink2);font-size:14.5px}
.tb-tab.active{background:var(--pri);color:#fff;border-color:var(--pri-ink)}
.tb-right{display:flex;align-items:center;gap:12px}
.demo-badge{background:var(--bad);color:#fff;font-weight:800;font-size:12.5px;letter-spacing:1px;
  padding:5px 12px;border-radius:6px;border:2px dashed rgba(255,255,255,.7);box-shadow:var(--shadow)}

/* ---------- 页头条（师傅端任何视口都显示；管理端仅窄屏显示）：标题 + DEMO 角标 + 视角切换 ---------- */
.n-top{display:none;position:sticky;top:0;z-index:58;align-items:center;gap:8px;flex-wrap:wrap;
  background:var(--card);border-bottom:2px solid var(--line);
  padding:calc(8px + env(safe-area-inset-top)) 12px 8px}
.n-top .n-title{font-size:16px;font-weight:800}
.n-top .n-badge{background:var(--bad);color:#fff;font-weight:700;font-size:10.5px;letter-spacing:1px;
  padding:2px 8px;border-radius:5px}
html.native .n-top{display:flex}

/* ---------- layout ---------- */
.wrap{max-width:1360px;margin:0 auto;padding:18px 20px 80px}
.anav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.anav-item{border:1px solid var(--line);background:var(--card);padding:9px 16px;border-radius:999px;
  font-size:14px;font-weight:600;color:var(--ink2)}
.anav-item.active{background:var(--pri);border-color:var(--pri-ink);color:#fff}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:18px 20px;margin-bottom:16px}
.card-h{display:flex;align-items:baseline;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.card-h h2{font-size:17px;font-weight:800}
.card-h .sub{font-size:12.5px;color:var(--ink3)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.spacer{flex:1}
.muted{color:var(--ink3)} .small{font-size:12.5px} .mono{font-variant-numeric:tabular-nums}
.hr{border-top:1px solid var(--line2);margin:14px 0}
.entry-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.entry-desc{font-size:13.5px;color:var(--ink2);line-height:1.7;flex:1;min-width:220px}

/* ---------- widgets ---------- */
.btn{border:1px solid var(--pri-ink);background:var(--pri);color:#fff;font-weight:700;
  padding:9px 18px;border-radius:7px;font-size:14px}
.btn:hover{filter:brightness(1.08)}
.btn:disabled{background:#c3ccd4;border-color:#b6c0c9;color:#f4f6f8;cursor:not-allowed}
.btn-ghost{background:var(--card);color:var(--pri-ink);border-color:var(--line)}
.btn-ghost:hover{border-color:var(--pri)}
.btn-warn{background:#fff;color:var(--warn);border-color:#d9b38a}
.btn-danger{background:#fff;color:var(--bad);border-color:#d9a09a}
.btn.sm{padding:5px 12px;font-size:12.5px;border-radius:6px}
.btn.lg{padding:13px 22px;font-size:16px;border-radius:9px}
.tag{display:inline-block;font-size:11.5px;font-weight:700;padding:2px 9px;border-radius:999px;
  background:var(--chip);color:var(--ink2);border:1px solid var(--line)}
.tag.ok{background:#e5f4ea;color:var(--ok);border-color:#b7dcc2}
.tag.pri{background:#e7eff7;color:var(--pri-ink);border-color:#bcd3e8}
.tag.warn{background:#fbf0e0;color:var(--warn);border-color:#e8cfa5}
.tag.bad{background:#fbe9e7;color:var(--bad);border-color:#e5b4ae}
.tag.demo{background:#fff3cd;color:#7a5b00;border-color:#e3c85f}
.field{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}
.field label{font-size:13px;font-weight:600;color:var(--ink2)}
.field .hint{font-size:11.5px;color:var(--ink3)}
select,input[type=text],input[type=number],input[type=date],textarea{border:1px solid var(--line);border-radius:7px;
  padding:9px 11px;font:inherit;font-size:16px;background:#fff;color:var(--ink);width:100%;max-width:100%}
select:focus,input:focus,textarea:focus{outline:2px solid #bcd7ee;outline-offset:0}
input[type=number]{-moz-appearance:textfield}
thead th{font-size:12.5px;color:var(--ink2);text-align:left;padding:8px 10px;
  background:var(--chip);border-bottom:1px solid var(--line);white-space:nowrap}
tbody td{padding:8px 10px;border-bottom:1px solid var(--line2);font-size:14px;vertical-align:top}
tbody tr:hover{background:#f7fafc}
.num{text-align:right;font-variant-numeric:tabular-nums}
.kv{display:grid;grid-template-columns:96px 1fr;gap:4px 10px;font-size:14px}
.kv b{color:var(--ink2);font-weight:600}
.info-strip{display:flex;gap:0;border:1px solid var(--line);border-radius:8px;overflow:hidden;margin-bottom:16px}
.stat{flex:1;padding:12px 16px;background:var(--card);border-right:1px solid var(--line2)}
.stat:last-child{border-right:0}
.stat .v{font-size:22px;font-weight:800;font-variant-numeric:tabular-nums}
.stat .k{font-size:12px;color:var(--ink3);margin-top:2px}
.calcbox{background:#f7fafc;border:1px dashed var(--line);border-radius:8px;padding:12px 14px;
  font-size:13.5px;color:var(--ink2);line-height:1.9}
.calcbox b{color:var(--ink)}
.note{background:#fdf6ec;border:1px solid #f0dcb5;color:#7a5b00;font-size:13px;
  padding:10px 14px;border-radius:8px;margin-bottom:14px;line-height:1.7}
.note b{font-weight:800}
.legend{display:flex;gap:16px;font-size:12px;color:var(--ink3);margin-top:8px;flex-wrap:wrap}

/* ---------- kanban ---------- */
.kanban{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.lane{background:#eaeef2;border:1px solid var(--line);border-radius:10px;padding:12px}
.lane-h{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.lane-h b{font-size:15px}
.lane-h .cnt{font-size:11.5px;background:var(--card);border:1px solid var(--line);
  border-radius:999px;padding:1px 8px;color:var(--ink2)}
.kcard{background:var(--card);border:1px solid var(--line);border-left:4px solid var(--pri);
  border-radius:8px;padding:10px 12px;margin-bottom:10px;box-shadow:var(--shadow);font-size:13px}
.kcard.locked{opacity:.55;border-left-color:#b0b8c0}
.kcard.done{border-left-color:var(--ok)}
.kcard.late{border-left-color:var(--bad)}
.kcard .kc-t{display:flex;justify-content:space-between;gap:8px;font-weight:800;font-size:13.5px}
.kcard .kc-m{color:var(--ink3);font-size:12px;margin-top:4px;line-height:1.6}
.pbar{height:6px;background:var(--line2);border-radius:4px;margin:8px 0 4px;overflow:hidden}
.pbar i{display:block;height:100%;background:var(--pri);border-radius:4px}
.pbar i.full{background:var(--ok)}

/* ---------- flows / timeline（流程记录） ---------- */
.flow-item{padding:7px 0;border-bottom:1px dashed var(--line2);font-size:13.5px}
.flow-item:last-child{border-bottom:0}
.flow-item .ft{font-weight:700}
.flow-item .fm{color:var(--ink3);font-size:12px}
.delta-pos{color:var(--ok);font-weight:700}
.delta-neg{color:var(--bad);font-weight:700}
.timeline{list-style:none;margin:0}
.timeline li{position:relative;padding:0 0 14px 22px;border-left:2px solid var(--line);margin-left:7px}
.timeline li:last-child{padding-bottom:2px;border-left-color:transparent}
.timeline li::before{content:"";position:absolute;left:-7px;top:3px;width:12px;height:12px;
  border-radius:50%;background:var(--pri);border:2px solid #fff;box-shadow:0 0 0 1px var(--line)}
.timeline li.tl-done::before{background:var(--ok)}
.timeline li.tl-bad::before{background:var(--bad)}
.timeline li.tl-warn::before{background:var(--warn)}
.timeline .tl-t{font-weight:700;font-size:13.5px}
.timeline .tl-m{color:var(--ink3);font-size:12px;margin-top:2px;line-height:1.6}

/* ---------- compare ---------- */
.vs{display:grid;grid-template-columns:1fr 60px 1fr;gap:0;align-items:stretch}
.vs-col{border:1px solid var(--line);border-radius:10px;padding:14px}
.vs-col.old{background:#f4f2ef}
.vs-col.new{background:#eef7f0;border-color:#bcd9c4}
.vs-col h3{font-size:14.5px;margin-bottom:10px}
.vs-col ul{list-style:none}
.vs-col li{padding:6px 0 6px 22px;position:relative;font-size:13.5px;border-bottom:1px dashed var(--line2)}
.vs-col li:last-child{border-bottom:0}
.vs-col.old li::before{content:"✕";position:absolute;left:2px;color:var(--bad);font-weight:800}
.vs-col.new li::before{content:"✓";position:absolute;left:2px;color:var(--ok);font-weight:800}
.vs-mid{display:flex;align-items:center;justify-content:center;font-weight:900;color:var(--ink3)}

/* ============================================================
   师傅端 H5 单页形态（第三轮：无壳，任何视口一致）
   · 桌面宽屏：居中单列 max-width 540px —— 就是「打开的 H5」
   · 手机视口：全屏单列；页头 sticky，底部 Tab sticky 避让 safe-area
   ============================================================ */
.h5-root{max-width:540px;margin:0 auto;min-height:100dvh;display:flex;flex-direction:column;
  padding:0 14px 84px;background:var(--bg)}
.h5-root .n-top{display:flex;border-radius:0;margin:0 -14px;padding-left:20px;padding-right:20px}
html:not(.native) .h5-root .n-top{position:static} /* PC：避免与桌面 topbar 双层吸顶 */
.m-scroll{flex:1;padding:14px 0 18px}
.m-tabs{position:fixed;left:0;right:0;bottom:0;z-index:57;display:flex;
  border-top:1px solid var(--line);background:#fff;
  max-width:540px;margin:0 auto;padding-bottom:env(safe-area-inset-bottom)}
.m-tab{flex:1;border:0;background:transparent;min-height:52px;padding:8px 4px;
  font-size:15px;font-weight:700;color:var(--ink3)}
.m-tab.active{color:var(--pri)}
.m-tab.active::after{content:"";display:block;width:26px;height:3px;background:var(--pri);
  border-radius:2px;margin:4px auto -4px}
.m-title{font-size:17px;font-weight:800;margin-bottom:4px}
.m-sub{font-size:13px;color:var(--ink3);margin-bottom:12px}
.mcard{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:12px;
  box-shadow:var(--shadow)}
.mcard.locked{background:#f0f2f4}
.mcard .mc-h{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
.mcard .mc-t{font-size:16px;font-weight:800}
.mcard .mc-s{font-size:15px;color:var(--ink2);margin-top:2px;line-height:1.7}
.m-btn{width:100%;min-height:48px;padding:13px 12px;font-size:17px;font-weight:800;border-radius:11px;
  border:2px solid var(--pri-ink);background:var(--pri);color:#fff;margin-top:10px}
.m-btn:disabled{background:#c3ccd4;border-color:#b6c0c9;color:#eef1f4}
.m-btn.ghost{background:#fff;color:var(--pri-ink)}
.m-btn.ghost:disabled{background:#eceff2;color:#aeb8c2;border-color:#d5dbe1}
.m-btn.danger{background:#fff;color:var(--bad);border-color:#d9a09a}
.m-num{display:flex;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap}
.m-num input{width:110px;font-size:18px;text-align:center;padding:10px}
.m-num .unit{font-size:14px;color:var(--ink2)}
.m-qty-btn{width:44px;height:44px;border-radius:10px;border:1px solid var(--line);
  background:#fff;font-size:20px;font-weight:800;color:var(--pri)}
.lockhint{font-size:13px;color:var(--bad);margin-top:8px;font-weight:600}
.chipset{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.chip{border:1.5px solid var(--line);background:#fff;border-radius:999px;padding:9px 14px;
  font-size:16px;font-weight:600;color:var(--ink2);min-height:44px}
.chip.on{background:var(--pri);border-color:var(--pri-ink);color:#fff}
.chip.on-red{background:var(--bad);border-color:#8f1d17;color:#fff}
.m-toast-hint{font-size:12.5px;color:var(--ink3);margin-top:8px;line-height:1.6}
.m-empty{padding:40px 16px;text-align:center;color:var(--ink3);font-size:14px}

/* ---------- 手机弹层（Bottom Sheet；PC 宽屏自动居中为 modal 形态） ----------
   r4：容器只是定位宿主（无背景、不吃点击）；遮罩为独立 .ov-scrim 子元素，
   内容为兄弟节点。容器无弹层时 hidden（=[hidden] display:none!important）。 */
.m-sheet{position:fixed;inset:0;z-index:115;pointer-events:none;
  display:flex;align-items:flex-end;justify-content:center}
.m-sheet .sheet{position:relative;z-index:1;pointer-events:auto;background:#fff;width:100%;max-width:560px;border-radius:18px 18px 0 0;
  padding:10px 16px calc(24px + env(safe-area-inset-bottom));max-height:86dvh;overflow-y:auto;
  box-shadow:0 -8px 30px rgba(0,0,0,.2);animation:sheetin .28s ease-out}
.m-sheet .sh-grab{width:44px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 10px}
.sheet h3{font-size:17px;margin-bottom:6px}
.sheet .sh-sub{font-size:13px;color:var(--ink3);margin-bottom:12px}
.sheet .sh-close{position:absolute;top:10px;right:12px}
.sheet .sh-head{display:flex;align-items:flex-start;gap:10px}
.sheet .sh-head .sh-t{flex:1}
@keyframes sheetin{from{transform:translateY(26px);opacity:.6}to{transform:none;opacity:1}}
@media (min-width:821px){
  .m-sheet{align-items:center}
  .m-sheet .sheet{border-radius:14px;max-height:84vh;
    padding:18px 20px 20px;box-shadow:0 20px 60px rgba(0,0,0,.35);animation:modalin .22s ease-out}
  .m-sheet .sh-grab{display:none}
}

/* ---------- r5：流程记事条「✓ 本步说明」（文档流内，随内容滚动，不遮挡） ----------
   替代原 fixed 顶部 toast 浮层机制（#toast-root / .toast 已整体下线）。 */
.step-note{display:flex;align-items:flex-start;gap:10px;background:#f4f8f4;
  border:1px solid #d3e2d3;border-left:4px solid var(--ok);border-radius:10px;
  padding:10px 14px;margin-top:16px;font-size:13.5px;color:var(--ink2);line-height:1.7}
.step-note .sn-ico{color:var(--ok);font-weight:900;font-size:15px;line-height:1.5;flex:none}
.step-note .sn-txt{flex:1;min-width:0}
.step-note .sn-txt b{color:var(--ink);font-weight:800}
.step-note .sn-b{margin-top:2px;color:var(--ink2)}
.step-note .sn-guide{flex:none}
/* 校验/错误反馈：字段级内联红字（输入项下方）+ 提交按钮旁短句；绝不用浮层 */
.f-err{display:block;color:var(--bad);font-size:12.5px;font-weight:700;margin-top:6px;line-height:1.6}
.submit-err{display:inline-block;color:var(--bad);font-size:12.5px;font-weight:700;line-height:1.6}
html.native .f-err{font-size:14px}
html.native .submit-err{font-size:14px;flex:1 1 100%}
.h5-root .step-note,.m-sheet .step-note{font-size:16px}
/* 演示导览（完整讲解列表；PC 弹窗 / 手机抽屉复用 r4 弹层机制） */
.guide h4{font-size:14px;margin:14px 0 6px;color:var(--pri-ink)}
.guide h4:first-child{margin-top:2px}
.guide ul{list-style:none}
.guide li{padding:6px 0 6px 20px;position:relative;font-size:13px;line-height:1.7;border-bottom:1px dashed var(--line2)}
.guide li:last-child{border-bottom:0}
.guide li::before{content:"✓";position:absolute;left:2px;color:var(--ok);font-weight:900}
.guide li b{color:var(--ink)}
.guide li span{color:var(--ink2)}
html.native .guide li{font-size:15px}

/* ---------- modal (admin)：PC 居中弹窗 / 窄屏贴底抽屉（r4：遮罩与内容分离） ---------- */
#modal-root{position:fixed;inset:0;z-index:110;pointer-events:none;
  display:flex;align-items:center;justify-content:center}
/* 独立遮罩层：全屏、收点击、点击即关（与内容层兄弟，互不混用） */
.ov-scrim{position:absolute;inset:0;pointer-events:auto;background:rgba(20,30,45,.45);
  -webkit-tap-highlight-color:transparent}
.m-sheet .ov-scrim{background:rgba(20,30,45,.42)}
.modal{position:relative;z-index:1;pointer-events:auto;background:#fff;border-radius:12px;max-width:860px;width:min(860px,94vw);max-height:88vh;
  overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.35);animation:modalin .22s ease-out}
@keyframes modalin{from{transform:translateY(14px);opacity:.5}to{transform:none;opacity:1}}
.modal-h{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;
  border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff}
.modal-h h3{font-size:16px}
.modal-b{padding:18px 20px}
.x-btn{border:0;background:var(--chip);width:30px;height:30px;border-radius:8px;font-size:15px}

/* ---------- contract print ---------- */
#print-area{display:none}
.contract{background:#fff;border:1px solid var(--line);padding:34px 40px;position:relative;
  max-width:760px;margin:0 auto;font-size:14px}
.contract h1{font-size:22px;text-align:center;letter-spacing:.35em;margin-bottom:4px}
.contract .c-no{text-align:right;font-size:12.5px;color:var(--ink2);margin-bottom:14px}
.contract .c-rule{border-top:2px solid var(--ink);margin:10px 0 18px}
.contract p{margin-bottom:9px}
.contract table td,.contract table th{border:1px solid #999;padding:7px 9px;font-size:13px}
.contract .c-total{font-weight:800;background:var(--chip)}
.contract .c-sign{display:flex;justify-content:space-between;margin-top:40px;font-size:13.5px;gap:12px;flex-wrap:wrap}

/* ---------- daily report ---------- */
.report{border:1px solid var(--line);border-radius:10px;overflow:hidden}
.report-h{background:var(--pri);color:#fff;padding:12px 18px;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.report-h b{font-size:16px}
.report-b{padding:16px 18px;background:#fff}
.sum-strip{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.sum{border:1px solid var(--line);border-radius:8px;padding:8px 14px;background:var(--chip);min-width:120px}
.sum .v{font-size:19px;font-weight:800}
.sum .k{font-size:11.5px;color:var(--ink3)}

/* ---------- responsive (桌面窗口) ---------- */
@media (max-width:1080px){
  .grid2,.grid3,.kanban{grid-template-columns:1fr}
  .vs{grid-template-columns:1fr}
  .vs-mid{padding:8px 0}
}

/* ============================================================
   native 模式：真手机 UA 或视口 ≤820px —— 窄屏单列卡片流
   （仅排版差异；两视角都是页面本身，无外框）
   ============================================================ */
html.native{font-size:16px}
html.native .topbar{display:none!important}
html.native .wrap{max-width:none;padding:12px 12px 24px}
html.native .card{padding:14px 12px}
html.native .grid2,html.native .grid3{grid-template-columns:1fr}
html.native .anav{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;
  margin:0 -12px 14px;padding:2px 12px 6px}
html.native .anav::-webkit-scrollbar{display:none}
html.native .anav-item{flex:none;min-height:44px;padding:10px 16px;font-size:16px}
html.native .info-strip{display:grid;grid-template-columns:1fr 1fr;gap:8px;border:0;overflow:visible}
html.native .stat{border:1px solid var(--line);border-radius:10px;border-right:1px solid var(--line)}
html.native .stat .v{font-size:24px}
html.native .stat .k{font-size:13px}
html.native .btn,html.native .chip,html.native .x-btn{min-height:44px}
html.native .btn{font-size:16px;padding:10px 18px}
html.native .btn.sm{font-size:15px;padding:8px 14px}
html.native .x-btn{width:44px;height:44px;border-radius:10px}
html.native .row .btn{flex:1 1 auto}
html.native .legend{gap:10px}
html.native .h5-root{max-width:none;padding:0 12px 88px}
html.native .h5-root .n-top{margin:0 -12px}
html.native .m-tabs{max-width:none}

/* 表格 → key-value 卡片流（admin.js 渲染后由 decorateTables 打标） */
html.native table.tbl-cards thead{display:none}
html.native table.tbl-cards,html.native table.tbl-cards tbody{display:block;width:100%}
html.native table.tbl-cards tr{display:block;border:1px solid var(--line);border-radius:12px;
  background:#fff;padding:4px 12px;margin-bottom:10px;box-shadow:var(--shadow)}
html.native table.tbl-cards td{display:grid;grid-template-columns:86px 1fr;gap:4px 10px;
  border-bottom:1px dashed var(--line2);padding:8px 0;font-size:16px;text-align:left!important}
html.native table.tbl-cards td:last-child{border-bottom:0}
html.native table.tbl-cards td::before{content:attr(data-l);color:var(--ink2);font-weight:700;font-size:13px;align-self:center}
html.native table.tbl-cards td[data-l=""]{display:block}
html.native table.tbl-cards td input,html.native table.tbl-cards td select{max-width:100%}

/* 弹窗：窄屏全宽贴底（抽屉化），不超视口 */
html.native #modal-root{align-items:flex-end}
html.native .modal{width:100%;max-width:none;border-radius:16px 16px 0 0;
  max-height:90dvh;box-shadow:0 -8px 40px rgba(0,0,0,.35);animation:sheetin .28s ease-out}
html.native .modal-h{border-radius:16px 16px 0 0;padding-top:calc(12px + env(safe-area-inset-top))}
html.native .modal-b{padding:14px 14px calc(18px + env(safe-area-inset-bottom))}
html.native .contract{padding:18px 14px;border:0;font-size:15px}
html.native .contract table{width:100%;table-layout:fixed;word-break:break-all}
html.native .contract table td,html.native .contract table th{font-size:12.5px;padding:6px 8px}

/* r5：顶部 toast 浮层机制已整体下线（原生与桌面一致）—— 讲解走文档流内「本步说明」记事条 */

/* ---------- 师傅端排版：全量 ≥16px（产线车间可读性硬要求，任何视口） ---------- */
.h5-root .m-sub,
.h5-root .mcard .mc-s,
.h5-root .m-empty,
.h5-root .lockhint,
.h5-root .m-toast-hint,
.h5-root .m-num .unit,
.h5-root .field label,
.h5-root .field .hint,
.h5-root .small,
.h5-root .flow-item,
.h5-root .flow-item .fm,
.h5-root .sh-sub,
.h5-root .tag,
.m-sheet .sh-sub,
.m-sheet .field label,
.m-sheet .field .hint,
.m-sheet .small,
.m-sheet .tag{font-size:16px;line-height:1.6}
.m-sheet .sheet h3{font-size:17px}
.h5-root .m-btn.ghost{font-size:17px}
.m-sheet input,.m-sheet select,.m-sheet textarea{font-size:16px}

/* ---------- print ---------- */
@media print{
  body{background:#fff}
  .topbar,.wrap,.h5-root,#modal-root,.m-sheet{display:none!important}
  #print-area{display:block!important}
  .contract{border:0;padding:0;max-width:none}
}
