/* 手机与平板布局；嵌入电脑版的页面保持原来的桌面样式。 */
html:not(.emb){--m-blue:#2678db;--m-ink:#18324f;--m-muted:#6b7d90;--m-border:#dce5ef;--m-surface:#f1f5fa;--m-nav:68px;color-scheme:light}
html:not(.emb) body{background:var(--m-surface);color:var(--m-ink);font-size:15px;overflow-x:auto}
html:not(.emb) [hidden]{display:none!important}
html:not(.emb) main{max-width:1040px;padding:12px 12px calc(90px + env(safe-area-inset-bottom));min-width:0}
html:not(.emb) header.bar{height:calc(56px + env(safe-area-inset-top));background:#2678db;box-shadow:0 2px 10px #1f5b9b1a}
html:not(.emb) header.bar h1{font-size:17px;font-weight:600;max-width:62%}
html:not(.emb) header.bar .back{top:env(safe-area-inset-top);width:48px;font-size:30px}
html:not(.emb) header.bar .hr{right:12px;max-width:25%;font-size:14px}
html:not(.emb) a,html:not(.emb) button,html:not(.emb) input,html:not(.emb) select{touch-action:manipulation}
html:not(.emb) button,html:not(.emb) .btn{min-height:44px;border-radius:8px;font-size:14px;padding:10px 14px;font-weight:500;max-width:100%;white-space:normal}
html:not(.emb) button:disabled{opacity:.45}
html:not(.emb) input:not([type=checkbox]):not([type=radio]),html:not(.emb) select,html:not(.emb) textarea{min-height:44px;font-size:16px;border:1px solid var(--m-border)!important;border-radius:7px!important;background:#fff;padding:10px;max-width:100%;min-width:0}
html:not(.emb) input:focus,html:not(.emb) select:focus,html:not(.emb) textarea:focus{border-color:var(--m-blue)!important;box-shadow:0 0 0 2px #2678db12;background:#fff}
html:not(.emb) input[readonly]{background:#f5f8fc;color:#3b5672}
html:not(.emb) label{color:#65788c;font-size:13px;margin:10px 0 5px}
html:not(.emb) .hint{color:#738497;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
html:not(.emb) .card,html:not(.emb) .fl,html:not(.emb) .ls{border:1px solid var(--m-border);border-radius:12px;background:#fff;overflow:visible;box-shadow:none}
html:not(.emb) .card{padding:14px;margin-bottom:12px}
html:not(.emb) .fl .fl{border:0;border-top:1px solid var(--m-border);border-radius:0}
html:not(.emb) .fr{min-height:58px;padding:8px 12px;gap:10px;margin:0;font-size:14px;min-width:0;flex-wrap:nowrap}
html:not(.emb) .fr>span.k{min-width:65px;font-size:14px;max-width:45%;overflow-wrap:anywhere}
html:not(.emb) .fr input,html:not(.emb) .fr select{padding:8px!important;border:0!important;background:transparent!important;text-align:right}
html:not(.emb) .fr:has(input:focus){background:#f4f8ff}
html:not(.emb) .fr input::placeholder{font-size:13px}
html:not(.emb) .fr .ar{font-style:normal;font-size:20px;color:#93a9bf}
html:not(.emb) .row{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
html:not(.emb) .row>*{min-width:0}
html:not(.emb) .li{min-height:64px;font-size:15px;border-color:#e8eef5;padding-left:12px}
html:not(.emb) .li .tt{padding:12px 0;overflow-wrap:anywhere;line-height:1.5}
html:not(.emb) .li .tt small{color:#74879b;font-size:12px;white-space:normal;overflow-wrap:anywhere}
html:not(.emb) .li .ic,html:not(.emb) .li .ic svg{width:26px;height:26px}
html:not(.emb) .li .dots{padding:12px;align-self:center;min-width:44px}
html:not(.emb) .li .plus{padding:9px 14px;color:#2678db;font-size:24px}
html:not(.emb) .li .rn{min-width:44px;padding:8px;min-height:40px;font-size:12px}
html:not(.emb) .sh{background:transparent;font-size:14px;color:#536b85;padding:16px 2px 9px;gap:8px;flex-wrap:wrap}
html:not(.emb) .sh.w{background:transparent;font-size:16px;font-weight:600}
html:not(.emb) .sh a{font-size:13px;color:#2678db}
html:not(.emb) .sh form select{min-height:36px;font-size:13px;padding:4px!important}
html:not(.emb) .kpi{border:1px solid var(--m-border);border-radius:12px;overflow:hidden}
html:not(.emb) .kpi>div{display:flex;flex-direction:column;gap:3px;font-size:12px;color:#6a7f96;padding:13px;border-color:#e9eef5}
html:not(.emb) .kpi>div b{font-size:22px;font-weight:600;color:#1d5fb8;margin:0;font-variant-numeric:tabular-nums}
html:not(.emb) .kpi>div.full{background:#f7faff}
html:not(.emb) .qbar{position:sticky;top:calc(56px + env(safe-area-inset-top));padding:10px 0;background:var(--m-surface);gap:6px;flex-wrap:wrap;z-index:12}
html:not(.emb) .qbar input{flex:1;width:100px;min-width:90px}
html:not(.emb) .qbar select{width:auto;max-width:32%;font-size:13px;padding:8px}
html:not(.emb) .qbar .q{padding:8px;min-width:44px;background:#fff;border:1px solid var(--m-border)}
html:not(.emb) .qbar .add{display:grid;place-items:center;min-width:40px;min-height:44px;background:#2678db;color:white;border-radius:8px;font-size:26px}
html:not(.emb) .crumb{font-size:12px;line-height:1.7;background:transparent;padding:8px 2px 12px;border:0;overflow-wrap:anywhere}
html:not(.emb) details>summary{min-height:44px;display:flex;align-items:center;gap:8px;font-size:14px}
html:not(.emb) details.more{margin:12px 0;border:1px solid var(--m-border);border-radius:10px;background:#fff}
html:not(.emb) details.more>summary{padding:10px 14px;color:#2678db}
html:not(.emb) details.more>summary:empty:before{content:'更多信息 · 联系方式 / 发票 / 备注'}
html:not(.emb) .msg{border-radius:8px;margin-bottom:12px;font-size:14px;overflow-wrap:anywhere}
html:not(.emb) table.t.cards tr{border:1px solid var(--m-border);border-radius:10px;margin-bottom:10px;padding:12px;background:white}
html:not(.emb) table.t.cards{background:transparent}
html:not(.emb) table.t.cards td{font-size:14px;padding:5px 0;overflow-wrap:anywhere;white-space:normal}
html:not(.emb) table.t.cards td:before{font-size:12px;color:#738497}
html:not(.emb) .wrap,html:not(.emb) .qq-table-scroll{max-width:100%;min-width:0;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
html:not(.emb) .pinfo{padding:0 12px 10px;overflow-wrap:anywhere}
html:not(.emb) .line{border:1px solid var(--m-border)!important;border-radius:12px;margin:12px 0;padding:12px;background:white;box-shadow:none;min-width:0}
html:not(.emb) #lines{padding:0 10px}
html:not(.emb) .m-line-head{font-size:13px;font-weight:600;padding-bottom:8px;padding-right:58px;color:#3f6289;border-bottom:1px solid #edf1f6}
html:not(.emb) .line .del{top:8px;right:8px;min-height:36px;font-size:12px;padding:5px 10px;border-color:#e5eaf0;background:#fff;color:#7f8fa1}
html:not(.emb) .line .row>div:has(.p){grid-column:1/-1}
html:not(.emb) .line .row>div:has(.p) input{font-weight:600;color:#203c5e;background:#f6f9fe;padding-right:38px}
html:not(.emb) .line .row.qpa{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding-top:4px}
html:not(.emb) .line .qpa input{padding:10px 6px;font-size:16px}
html:not(.emb) .line .lmore{border-top:1px solid #e9eef5;margin-top:12px}
html:not(.emb) .m-pick-button{position:absolute;right:2px;top:30px;min-height:40px;width:36px;padding:4px;background:transparent;color:#2678db;font-size:23px}
html:not(.emb) .m-price-button{padding:4px 0;min-height:32px;background:transparent;color:#2678db;font-size:12px}
html:not(.emb) .m-batch-button{margin-top:4px;padding:5px 8px;min-height:36px;font-size:12px;background:#eaf3ff;color:#2678db;width:100%}
html:not(.emb) .bb{display:flex;flex-wrap:wrap;gap:8px;max-width:1040px;left:50%;right:auto;transform:translateX(-50%);width:100%;padding:9px 12px calc(9px + env(safe-area-inset-bottom))!important;background:#fffffff5!important;backdrop-filter:blur(12px);border-color:#dce5ef!important;box-shadow:0 -4px 20px #1c426309}
html:not(.emb) .bb .sum{flex:1 1 90px;font-size:12px;min-width:70px}
html:not(.emb) .bb .sum b{font-size:19px;font-weight:600}
html:not(.emb) .bb button:not(.mo){padding:10px 12px;min-height:44px;font-size:14px}
html:not(.emb) .bb button[onclick*=as_draft]{background:#f0f5fb!important;color:#365b82!important;border:1px solid #dce5ef!important;order:2}
html:not(.emb) .bb .savebtn{order:3}
html:not(.emb) .bb .mo{min-height:44px;padding:8px 0;font-size:12px;border:0;color:#2678db}
.m-nav{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:center;z-index:30;padding:8px max(4px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom));background:#fffffff5;border-top:1px solid #dce5ef;backdrop-filter:blur(12px)}
.m-nav a{flex:1;max-width:160px;min-height:47px;text-align:center;color:#8491a1;font-size:11px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px}
.m-nav svg{width:23px;height:23px}.m-nav a.on{color:#2678db;font-weight:600}.m-nav a.on svg{background:#e8f2ff;border-radius:7px;box-shadow:0 0 0 5px #e8f2ff}
html.emb .m-nav{display:none}
.m-hero{padding:20px;border-radius:14px;background:linear-gradient(120deg,#1d64bd,#328bea);color:#fff;margin-bottom:6px;position:relative;overflow:hidden}
.m-hero:after{content:'';position:absolute;width:180px;height:180px;right:-75px;top:-30px;border:26px solid #ffffff0c;border-radius:50%;pointer-events:none}
.m-eyebrow{font-size:11px;letter-spacing:2px;color:#cfe5ff}.m-hero h2{margin:10px 0 6px!important;color:#fff;font-size:21px!important;font-weight:600}.m-hero p{font-size:12px;color:#d7eaff;margin:0}
.m-intro{padding:7px 2px 0}.m-intro>b{font-size:20px}.m-intro p{font-size:12px;color:#7c8da0;margin:6px 0}
.m-section{margin-bottom:4px}.m-section>h2{font-size:15px;margin:18px 2px 10px;font-weight:600;color:#3d5876}
.m-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.m-tile{display:flex;gap:10px;padding:14px 12px;border:1px solid #dce5ef;background:#fff;border-radius:11px;color:#284664;align-items:center;min-width:0;min-height:86px}
.m-tile>span:not(.m-tile-icon){min-width:0}.m-tile b{font-size:14px;display:block;font-weight:600}.m-tile small{display:block;font-size:10px;color:#7b8da0;margin-top:4px;line-height:1.5}.m-tile i{margin-left:auto;color:#9bacbd;font-style:normal;display:none}
.m-tile-icon{background:#eaf3ff;color:#2678db;flex:none;border-radius:9px;padding:8px;display:flex}.m-tile-icon svg{width:22px;height:22px}.m-tile-icon.teal{color:#188e87;background:#e7f6f3}.m-tile-icon.amber{color:#bf8b28;background:#fff5df}.m-tile-icon.violet{color:#7a66c3;background:#f0ecfc}
.m-choice [data-cost][hidden]{display:none}.m-sheet-backdrop{position:fixed;inset:0;z-index:10060;background:#142c465e;display:flex;align-items:flex-end;justify-content:center;padding-top:env(safe-area-inset-top)}
.m-sheet{width:100%;max-width:700px;max-height:94vh;max-height:94dvh;display:flex;flex-direction:column;min-height:45vh;background:#f1f5fa;border-radius:18px 18px 0 0;overflow:hidden;box-shadow:0 -4px 30px #17355525}
.m-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#fff;border-bottom:1px solid #e3eaf2;flex:none}.m-sheet-head b{font-size:17px}.m-sheet-head button{background:#f0f5fa;color:#496885;font-size:14px;padding:8px 12px}
.m-sheet-tools{display:grid;grid-template-columns:minmax(0,1fr) 106px;gap:8px;padding:10px 12px 0}.m-sheet-tools input{min-width:0}.m-sheet-tools select{font-size:12px!important;padding:8px!important}
.m-sheet-crumb{font-size:12px;color:#758ba2;display:flex;gap:7px;align-items:center;white-space:nowrap;overflow:auto;padding:10px 14px;flex:none;min-height:40px}.m-sheet-crumb button{background:none;color:#2678db;padding:4px;min-height:30px;font-size:12px;flex:none}
.m-sheet-list{padding:0 12px 12px;overflow:auto;overscroll-behavior:contain;flex:1;min-height:0}
.m-choice{display:flex;align-items:center;gap:10px;width:100%;padding:13px 12px;margin-bottom:7px;background:#fff;border:1px solid #dce5ef;border-radius:9px;cursor:pointer;min-height:64px;color:#274968}
.m-choice.sel{background:#e8f2ff;border-color:#2678db;box-shadow:inset 3px 0 0 #2678db}.m-choice .m-choice-text{min-width:0;flex:1}.m-choice b{display:block;font-size:14px;overflow-wrap:anywhere}.m-choice small{display:block;color:#788ca1;font-size:11px;margin-top:4px;overflow-wrap:anywhere}.m-choice .m-check{display:grid;place-items:center;flex:none;width:23px;height:23px;border-radius:5px;border:1px solid #c8d5e5;background:white;font-size:15px;color:#fff}.m-choice.sel .m-check{background:#2678db;border-color:#2678db}.m-folder{font-size:24px;color:#dba13c}.m-choice em{font-style:normal;color:#92a8bd}
.m-sheet-footer{padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:#fff;display:flex;align-items:center;gap:8px;border-top:1px solid #dce5ef;flex:none;flex-wrap:wrap}.m-sheet-footer span{flex:1;font-size:13px}.m-sheet-footer button{font-size:13px}.m-empty{text-align:center;padding:38px 12px;color:#8296aa;font-size:14px}
.m-price-choice{display:block}.m-price-choice strong{float:right;color:#2678db;font-size:20px}.m-price-choice:disabled{cursor:default;opacity:.65}
body.m-modal-open{overflow:hidden!important}
html:not(.emb) .qq-party-backdrop{align-items:flex-end;padding-top:env(safe-area-inset-top)}
html:not(.emb) .qq-party-dialog{width:100%;max-width:700px;border:0;border-radius:18px 18px 0 0;max-height:94vh;max-height:94dvh;overflow:hidden;background:#f1f5fa;font-size:14px}
html:not(.emb) .qq-party-heading{padding:12px 14px;background:white;font-size:17px}
html:not(.emb) .qq-party-heading button{min-width:44px;min-height:44px;background:#f1f5fa;border-radius:8px}
html:not(.emb) .qq-party-tools{padding:10px 12px;display:flex;gap:8px;min-width:0}
html:not(.emb) .qq-party-tools input{flex:1 1 100%;min-width:0}
html:not(.emb) .qq-party-tools select{flex:1;width:40%;max-width:none;min-width:0;font-size:13px;padding:8px}
html:not(.emb) .qq-party-tools span{flex:1 1 100%;font-size:12px}
html:not(.emb) .qq-party-list{margin:0 12px;border:0;max-height:48vh;height:48vh;min-height:80px;background:transparent}
html:not(.emb) .qq-party-list table:not(.qq-sized){white-space:normal}
html:not(.emb) .qq-party-footer{flex-wrap:wrap;background:white;gap:8px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
html:not(.emb) .qq-party-footer output{flex:1 1 100%;font-size:12px}
html:not(.emb) .qq-party-footer button{font-size:13px;padding:8px 10px;flex:1}
html:not(.emb) .qq-party-footer [data-apply]{background:#2678db;color:#fff;flex:2}
html:not(.emb) #qq-sync-notice{bottom:calc(80px + env(safe-area-inset-bottom))!important;left:12px;right:12px!important;max-width:none!important;border-radius:8px}
@media(max-width:600px){
 html:not(.emb) .qq-party-list table,html:not(.emb) .qq-party-list tbody{display:block;width:100%!important;table-layout:auto!important}
 html:not(.emb) .qq-party-list colgroup,html:not(.emb) .qq-party-list thead{display:none}
 html:not(.emb) .qq-party-list tr{display:grid;grid-template-columns:1fr 1fr;gap:3px 8px;border:1px solid #dce5ef;border-radius:9px;padding:12px;margin-bottom:8px;background:white;white-space:normal}
 html:not(.emb) .qq-party-list td{padding:0;border:0;max-width:none;white-space:normal;overflow-wrap:anywhere;font-size:12px}
 html:not(.emb) .qq-party-list tr[data-party-row] td:nth-child(2),html:not(.emb) .qq-party-list tr[data-party-cat] td:nth-child(2){grid-column:1/-1;grid-row:1;font-size:15px;font-weight:600}
 html:not(.emb) .qq-party-list tr[data-party-cat] td:empty,html:not(.emb) .qq-party-list tr[data-party-row] td:empty{display:none}
 html:not(.emb) .qq-party-list tr[data-party-row] td:nth-child(5),html:not(.emb) .qq-party-list tr[data-party-row] td:nth-child(6){grid-column:1/-1;color:#71889f}
 html:not(.emb) .qq-party-list tr.sel,html:not(.emb) .qq-party-list tr.qq-batch-selected{background:#edf5ff;border-color:#78afea}
 html:not(.emb) .qq-party-list tr[data-batch-index]{grid-template-columns:26px minmax(0,1fr) minmax(80px,1fr);align-items:center}
 html:not(.emb) .qq-party-list tr[data-batch-index] td:first-child{grid-row:1/3}
 html:not(.emb) .qq-party-list tr[data-batch-index] td:nth-child(2){font-size:15px;font-weight:600}
 html:not(.emb) .qq-party-list tr[data-batch-index] td:nth-child(3){grid-column:2;color:#70869e}
 html:not(.emb) .qq-party-list tr[data-batch-index] td:nth-child(3):before{content:'库存 '}
 html:not(.emb) .qq-party-list tr[data-batch-index] td:last-child{grid-column:3;grid-row:1/3}
 html:not(.emb) .qq-party-list input[type=number]{width:100%;font-size:16px}
}
@media(max-width:359px){.m-tile{padding:12px 10px;gap:8px;align-items:flex-start;flex-direction:column}.m-tile-icon{padding:6px}.m-tile b{font-size:14px}.m-tile small{font-size:10px}html:not(.emb) main{padding-left:10px;padding-right:10px}html:not(.emb) .bb{gap:6px;padding-left:10px!important;padding-right:10px!important}html:not(.emb) .bb .sum{flex-basis:70px}html:not(.emb) .bb button:not(.mo){padding:10px 9px;font-size:13px}html:not(.emb) .bb .sum .hint{max-width:85px}html:not(.emb) .bb .mo{max-width:30px}}
@media(min-width:600px){.m-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}.m-tile i{display:block}.m-sheet-backdrop{align-items:center;padding:20px}.m-sheet{border-radius:16px;max-height:90vh;max-height:90dvh}.m-choice{min-height:72px}html:not(.emb) .qq-party-backdrop{align-items:center;padding:20px}html:not(.emb) .qq-party-dialog{border-radius:16px}html:not(.emb) main{padding-top:20px}html:not(.emb) .fl{padding:4px 12px}html:not(.emb) .line .row{grid-template-columns:repeat(3,minmax(0,1fr))}html:not(.emb) .line .row.qpa{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:900px){.m-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}.m-hero{padding:26px}.m-hero h2{font-size:25px!important}}
@media(max-height:500px){.m-sheet,.qq-party-dialog{max-height:100dvh!important;border-radius:0!important}.m-sheet-backdrop{padding:0}.m-sheet-head{padding:4px 12px}.m-sheet-tools{padding-top:4px}.m-sheet-crumb{padding:3px 12px;min-height:30px}.m-sheet-footer{padding-top:5px;padding-bottom:5px}.m-sheet-head button,.m-sheet-footer button{min-height:38px}html:not(.emb) .qq-party-list{height:30vh;max-height:30vh}}

html:not(.emb) .m-invoice{margin:12px 10px;border:1px solid var(--m-border);border-radius:10px;background:#fff;overflow:hidden}
html:not(.emb) .m-invoice .fr{justify-content:space-between}
html:not(.emb) .m-invoice #inv{width:22px;height:22px;flex:none;margin:0;accent-color:var(--m-blue)}
html:not(.emb) details.more>summary:empty:before{content:'更多信息 · 联系方式 / 备注'}
html:not(.emb) .m-surface-tools{display:flex;gap:8px;justify-content:flex-end;margin-bottom:10px}
html:not(.emb) .m-surface-tools button{background:white;border:1px solid var(--m-border);color:var(--m-blue);min-height:36px;padding:6px 12px;font-size:13px}
html:not(.emb) .m-line-fields>div[data-mobile-field=p]{grid-column:1/-1}
html:not(.emb) .m-line-fields>div{min-width:0}
html:not(.emb) .line>.row:empty{display:none}

/* qq-mobile-display-fix：明细卡片标签不错位；宽表可横滑看全 */
html:not(.emb) table.t.cards td:before{content:attr(data-l);float:left;margin-right:12px;max-width:42%;overflow-wrap:anywhere}
html:not(.emb) .wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
html:not(.emb) .line .m-line-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}
html:not(.emb) .m-line-fields>div[data-mobile-field=p],
html:not(.emb) .m-line-fields>div[data-mobile-field=n],
html:not(.emb) .m-line-fields>div[data-mobile-field=x]{grid-column:1/-1}
