/* 图纸库 v2 左右布局(2026-10-22; 画板 JVbmq3mVsUe3oPNrbo2jbD A 主界面 / D 手机; 本体 drawing-lib.js + drawing-lib-pane.js + drawing-lib-ver.js)
   全部走 styles.css 的 :root 设计令牌; 类名前缀 dl-。下面三个是全站令牌里没有的语义色, 就近定义一次(mold-entry.css / mold-task.css 也借 --dl-info 与 .dl-tag)。 */
:root {
  --dl-info:      #2F4F8F;   /* 源文件类型徽(DXF/PLT…)字色: 语义色, 与 --good 绿(激光图)区分 */
  --dl-info-soft: #EEF1F7;   /* 同上底色 */
  --dl-mask:      rgba(37, 33, 29, 0.5);   /* 并排看叠层遮罩(= --ink 五成) */
}

.dl-page { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dl-toprow { display: flex; align-items: flex-end; gap: 12px; min-width: 0; }
.dl-toprow .tab-bar { margin: 0; flex: 1 1 auto; min-width: 0; }
.dl-sp { flex: 1 1 0; }

/* 通用钮 */
.dl-btn { height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.dl-btn:hover { color: var(--primary); border-color: var(--primary-2); }
.dl-btn:disabled { color: var(--muted-2); cursor: default; border-color: var(--line); }
.dl-btn.is-primary { background: var(--primary); border-color: var(--primary); color: var(--surface); font-weight: 600; }
.dl-btn.is-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--surface); }
.dl-btn.is-primary:disabled { background: var(--line); border-color: var(--line); color: var(--muted); }
.dl-btn.is-dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.dl-btn.is-dark:hover { opacity: .9; color: var(--surface); }
.dl-btn.is-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.dl-x { width: 32px; height: 32px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dl-x:hover { background: var(--line-soft); color: var(--ink); }
.dl-muted { color: var(--muted); font-size: 13px; }

/* 左右两栏 */
.dl-split { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 16px; align-items: start; min-width: 0; }
.dl-side { position: sticky; top: 8px; height: calc(100vh - 150px); min-height: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.dl-filt { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line-soft); flex: 0 0 auto; }
.dl-search { height: 36px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--muted-2); min-width: 0; }
.dl-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); }
.dl-search:focus-within, .dl-ctl:focus-within { border-color: var(--primary-2); box-shadow: var(--ring); }
.dl-two { display: flex; gap: 8px; min-width: 0; }
.dl-two .dl-ctl { flex: 1 1 0; }
.dl-ctl { height: 32px; box-sizing: border-box; display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 12px; min-width: 0; max-width: 100%; }
.dl-ctl > span { color: var(--muted); white-space: nowrap; }
.dl-ctl select, .dl-ctl input { border: 0; outline: 0; font: inherit; font-size: 12px; color: var(--ink); background: transparent; min-width: 0; }
.dl-ctl select { flex: 1 1 auto; text-overflow: ellipsis; }
.dl-ctl input { width: 40px; }
.dl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-chip { height: 28px; padding: 0 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font: inherit; font-size: 12px; }
.dl-chip:hover { border-color: var(--primary-2); }
.dl-chip small { font-size: 11px; color: var(--muted); }
.dl-chip.on { background: var(--primary); border-color: var(--primary); color: var(--surface); font-weight: 600; }
.dl-chip.on small { color: var(--surface); opacity: .85; }
.dl-chip.is-bad small { color: var(--bad); }
.dl-chip.on.is-bad small { color: var(--surface); }
.dl-chip.is-dim { color: var(--muted-2); }
.dl-more { font-size: 12px; color: var(--muted); }
.dl-more summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 4px; }
.dl-more summary::-webkit-details-marker { display: none; }
.dl-morebody { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; align-items: center; }
.dl-lhead { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 11px; color: var(--muted); letter-spacing: .04em; flex: 0 0 auto; }
.dl-lhead > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-imgbtn { height: 26px; padding: 0 9px; border-radius: 99px; font: inherit; font-size: 12px; letter-spacing: 0; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); flex: 0 0 auto; }
.dl-imgbtn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-50); color: var(--cta-hover); }
.dl-selhint { margin: 0 10px 6px; padding: 6px 10px; border-radius: var(--radius); background: var(--warn-soft); color: var(--warn); font-size: 12px; }
.dl-selhint.hidden { display: none; }
.dl-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 6px 8px; }
.dl-list { list-style: none; margin: 0; padding: 0; transition: opacity var(--transition); }
.dl-list.is-loading { opacity: .55; }
.dl-row { width: 100%; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius); font: inherit; font-size: 13px; text-align: left; cursor: pointer; background: transparent; color: var(--ink); }
.dl-row:hover { background: var(--panel); }
.dl-row:focus-visible { outline: 2px solid var(--primary-2); outline-offset: -2px; }
.dl-row.on { background: var(--primary-50); color: var(--cta-hover); font-weight: 600; }
.dl-list.with-img .dl-row { height: 52px; }
.dl-code { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-th { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--line-soft); border: 1px solid var(--line); box-sizing: border-box; }
.dl-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-noimg { font-size: 10px; color: var(--muted-2); font-weight: 400; }
.dl-ring { width: 12px; height: 12px; flex: 0 0 12px; border-radius: 50%; border: 2px solid var(--good); box-sizing: border-box; display: inline-block; }
.dl-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--bad); display: inline-block; }
.dl-chev { display: none; color: var(--muted-2); }
.dl-lempty { padding: 32px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.dl-lempty.is-err { color: var(--bad); }
.dl-sentinel { min-height: 1px; padding: 6px 10px; font-size: 12px; color: var(--muted-2); text-align: center; }
.dl-legend { padding: 8px 14px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.dl-legend .dl-dot { margin-left: 8px; }

/* 右侧 */
.dl-pane { min-width: 0; display: flex; flex-direction: column; gap: 14px; outline: 0; border-radius: var(--radius-lg); }
.dl-pempty, .dl-ploading { min-height: 360px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); text-align: center; padding: 24px; }
.dl-pempty.is-err { color: var(--bad); }
.dl-mback { display: none; }
.dl-hcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; box-shadow: var(--shadow); min-width: 0; }
.dl-hmain { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dl-hrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.dl-hrow h2 { margin: 0; font-size: 22px; font-weight: 600; word-break: break-all; }
.dl-hsub { font-size: 13px; color: var(--muted); }
.dl-hupd { font-size: 12px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.dl-hupd svg { color: var(--muted); flex: 0 0 auto; }
.dl-hacts { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-pill { height: 22px; padding: 0 9px; border-radius: 99px; background: var(--line-soft); color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; white-space: nowrap; }
.dl-pill.is-good { background: var(--good-soft); color: var(--good); font-weight: 600; }
.dl-pill.is-bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.dl-pic { height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; display: inline-flex; align-items: center; gap: 5px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; box-sizing: border-box; }
.dl-pic i { width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; border: 2px dashed var(--muted-2); display: inline-block; }
.dl-pic.is-full { background: var(--good-soft); color: var(--good); border-color: var(--good-soft); }
.dl-pic.is-full i { border: 2px solid var(--good); }
/* 第 4 期 A2: 头卡一行(编号 + 胶囊 + 规格串 + 更新时间 + 按钮), 窄了自己折行 */
.dl-hcard.dl-hone { padding: 12px 16px; gap: 10px 12px; }
.dl-hone h2 { margin: 0; font-size: 20px; font-weight: 600; word-break: break-all; }
.dl-hone .dl-hsub { min-width: 0; }

/* 第 4 期 A2 两框: 左 产品图 / 右 图纸(小页签 + 版本条); 图区固定高, 图 contain */
.dl-frames { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; min-width: 0; }
.dl-frame { position: relative; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.dl-frame.dl-fover { outline: 2px solid var(--primary); outline-offset: -2px; }
.dl-fhead { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); min-height: 46px; box-sizing: border-box; min-width: 0; }
.dl-fhead > b { font-size: 14px; }
.dl-fmeta { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dl-reftag { height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; background: var(--primary-50); color: var(--cta-hover); }   /* 左框引用挂着产品的主图(未确认, 不算本模具产品图) */
.dl-origbtn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-50); color: var(--cta-hover); }
.dl-ibtn.is-sm { width: 28px; height: 28px; flex: 0 0 auto; cursor: pointer; padding: 0; }
.dl-ktabs { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.dl-ktab { height: 30px; padding: 0 10px; border-radius: var(--radius); border: 0; font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; cursor: pointer; background: transparent; color: var(--muted); white-space: nowrap; }
.dl-ktab small { font-size: 11px; opacity: .75; }
.dl-ktab:hover { background: var(--panel); color: var(--ink); }
.dl-ktab.on { background: var(--ink); color: var(--surface); font-weight: 600; }
.dl-ktab.is-zero:not(.on) { color: var(--muted-2); }
.dl-view { height: clamp(320px, 52vh, 560px); background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.dl-view:fullscreen { height: 100vh; }
.dl-big { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.dl-vtools { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; }
.dl-ibtn { width: 36px; height: 36px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.dl-ibtn:hover { color: var(--primary); border-color: var(--primary-2); }
.dl-vempty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; color: var(--muted); text-align: center; font-size: 13px; }
.dl-vempty svg { color: var(--muted-2); }
.dl-vempty.is-big { align-self: stretch; flex: 1 1 auto; margin: 14px; min-height: 0; justify-content: center; border: 2px dashed var(--line); border-radius: var(--radius-lg); background: var(--panel); }
.dl-vempty.is-big b { font-size: 15px; color: var(--ink); }
.dl-filecard { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; color: var(--muted); text-align: center; }
.dl-filecard b { color: var(--ink); word-break: break-all; }
.dl-gone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; color: var(--muted-2); text-align: center; word-break: break-all; }
.dl-gone span { font-size: 12px; }
.dl-tag { height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }
.dl-tag.is-laser { background: var(--good-soft); color: var(--good); }
.dl-tag.is-src { background: var(--dl-info-soft); color: var(--dl-info); }
.dl-filecard .dl-tag { height: 24px; font-size: 13px; }

/* 版本条 / 历史黄条 / 替换面板(drawing-lib-ver.js) */
.dl-oldbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; flex-wrap: wrap; }
.dl-oldbar > span { flex: 1 1 auto; min-width: 0; }
.dl-oldbar .dl-btn { height: 30px; font-size: 12px; padding: 0 10px; }
.dl-verbox { padding: 10px 12px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 8px; }
.dl-vhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl-vhead > span { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; flex: 1 1 auto; }
.dl-vlist { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.dl-vcard { flex: 0 0 172px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 10px; border-radius: 10px; cursor: pointer; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; min-width: 0; }
.dl-vcard:hover { border-color: var(--primary-2); }
.dl-vcard.on { border-color: var(--primary); background: var(--primary-50); }
.dl-vtop { display: flex; align-items: center; gap: 6px; }
.dl-vtop b { font-size: 14px; }
.dl-vtag { height: 18px; padding: 0 7px; border-radius: 99px; font-size: 11px; display: inline-flex; align-items: center; font-weight: 600; background: var(--line-soft); color: var(--muted); }
.dl-vtag.is-cur { background: var(--good-soft); color: var(--good); }
.dl-vtag.is-unreg { background: var(--warn-soft); color: var(--warn); }
.dl-vat { font-size: 12px; }
.dl-vby { font-size: 12px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-rep { margin: 0 12px 12px; padding: 14px; border: 1px solid var(--primary); border-radius: var(--radius-lg); background: var(--primary-50); display: flex; flex-direction: column; gap: 10px; }
.dl-rephead { display: flex; align-items: center; gap: 8px; }
.dl-rephead b { font-size: 14px; flex: 1 1 auto; }
.dl-repdrop { min-height: 72px; border: 2px dashed var(--line); border-radius: 10px; background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; padding: 8px 12px; text-align: center; flex-wrap: wrap; }
.dl-repdrop:hover, .dl-repdrop:focus-visible { border-color: var(--primary-2); outline: 0; }
.dl-repdrop.has-file { color: var(--ink); border-style: solid; border-color: var(--primary-2); }
.dl-repdrop small { color: var(--muted); }
.dl-repfields { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-repver { flex: 0 0 120px; display: flex; flex-direction: column; gap: 4px; }
.dl-repver > span:first-child, .dl-repnote > span { font-size: 12px; font-weight: 500; color: var(--muted); }
.dl-repv { height: 36px; border-radius: var(--radius); padding: 0 10px; font-size: 14px; font-weight: 600; background: var(--line-soft); display: flex; align-items: center; }
.dl-repnote { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dl-repnote input { height: 36px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 10px; font: inherit; font-size: 13px; background: var(--surface); color: var(--ink); min-width: 0; }
.dl-repnote input:focus { outline: 0; border-color: var(--primary-2); box-shadow: var(--ring); }
.dl-repfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dl-repfoot > span { flex: 1 1 200px; font-size: 12px; color: var(--muted); }

/* 第 4 期 A2 下排三格: 参数 / 挂着的产品 / 设计任务 + 登记 */
.dl-info3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; min-width: 0; }
.dl-card2 { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; min-width: 0; }
.dl-card2 h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.dl-h3row { display: flex; align-items: center; margin-bottom: 6px; gap: 8px; }
.dl-h3row h3 { margin: 0; flex: 1 1 auto; }
.dl-h3row > span { font-size: 12px; color: var(--muted); }
.dl-params { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.dl-params > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-params dt { font-size: 12px; color: var(--muted); }
.dl-params dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.dl-prow { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 4px; border: 0; border-top: 1px solid var(--line-soft); background: transparent; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; min-width: 0; }
.dl-prow:hover { background: var(--panel); }
.dl-prow b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.dl-prow:hover b { color: var(--primary); }
.dl-pgo { font-size: 12px; color: var(--primary); flex: 0 0 auto; }
.dl-pth { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--line-soft); border: 1px solid var(--line); box-sizing: border-box; padding: 0; cursor: pointer; }
.dl-pth img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-moreprod { margin-top: 6px; }
.dl-taskcard { display: flex; flex-direction: column; gap: 8px; }
.dl-taskcard h3 { margin: 0; }
.dl-regbox { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }

/* 挂着的产品看图叠层(dlProdOv, drawing-lib-prodview.js) */
.dl-pv { width: min(720px, 94vw); max-height: 92vh; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; color: var(--ink); outline: 0; }
.dl-pvhead { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; min-width: 0; }
.dl-pvhead > b { font-size: 14px; }
.dl-pvdl { font-size: 12px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-pvlink { font-size: 12px; color: var(--primary); text-decoration: none; white-space: nowrap; }
.dl-pvlink:hover { color: var(--cta-hover); }
.dl-pvbody { height: min(560px, 64vh); background: var(--panel); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dl-pvimg { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.dl-pvnone { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; text-align: center; padding: 24px; }
.dl-pvnone svg { color: var(--muted-2); }
.dl-pvnone b { color: var(--ink); font-size: 15px; }
.dl-pvfoot { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 12px; color: var(--muted); }
.dl-pvhint { margin-left: auto; }

/* 第 5 期: 拖文件进页面两框亮投放层(host .dl-dragging, drawing-lib-pane.js) / 图纸照片里老 kind 小标 / 源文件存档列表 / 左框客户样图缩略图条 */
.dl-dropov { display: none; position: absolute; inset: 0; z-index: 5; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; border: 2px dashed var(--primary-2); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--primary-50) 88%, transparent); color: var(--cta-hover); }
.dl-dropov b { font-size: 16px; }
.dl-dropov small { font-size: 12px; color: var(--muted); }
.dl-pane.dl-dragging .dl-dropov { display: flex; }
.dl-pane.dl-dragging .dl-frame.dl-fover .dl-dropov { border-style: solid; border-color: var(--primary); background: color-mix(in srgb, var(--primary-50) 96%, transparent); }
.dl-otag, .dl-vtag.is-orig { background: var(--warn-soft); color: var(--warn); }
.dl-otag { position: absolute; left: 12px; top: 12px; z-index: 1; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.dl-view.is-list { justify-content: flex-start; align-items: stretch; overflow-y: auto; background: var(--surface); }
.dl-arch { list-style: none; margin: 0; padding: 4px 12px; }
.dl-arch li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; min-width: 0; }
.dl-arch b { flex: 1 1 auto; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-archat, .dl-archby { flex: 0 0 auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dl-cstrip { display: flex; gap: 8px; padding: 10px 12px; overflow-x: auto; border-top: 1px solid var(--line-soft); }
.dl-cth { flex: 0 0 96px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dl-cthb { width: 96px; height: 72px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.dl-cth.on .dl-cthb { border-color: var(--primary); box-shadow: var(--ring); }
.dl-cthb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-csrc { align-self: flex-start; max-width: 100%; height: 20px; padding: 0 6px; border-radius: 99px; border: 0; font: inherit; font-size: 11px; display: inline-flex; align-items: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--line-soft); color: var(--muted); }
.dl-csrc.is-mold { background: var(--good-soft); color: var(--good); }
.dl-csrc.is-task { background: var(--primary-50); color: var(--cta-hover); cursor: pointer; }
.dl-csrc.is-task:hover { text-decoration: underline; }
.dl-cdel { align-self: flex-start; height: 20px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--bad); font: inherit; font-size: 11px; cursor: pointer; }
.dl-cdel:hover { background: var(--bad); color: var(--surface); border-color: var(--bad); }

/* ≤1100: 两框叠成一列, 下排两格 */
@media (max-width: 1100px) {
  .dl-frames { grid-template-columns: minmax(0, 1fr); }
  .dl-info3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 无档案引用(第 2 期, drawing-lib-orphan.js; 画板 C): 左栏行 = 编号 + N 款; 右侧 说明 + 两张动作卡 + 产品表 */
.dlo-n { font-size: 12px; color: var(--muted); flex: 0 0 auto; font-weight: 400; }
.dl-row.on .dlo-n { color: var(--cta-hover); }
.dlo-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 18px; }
.dl-pill.dlo-warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.dlo-lead { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); }
.dlo-acts { display: flex; gap: 12px; flex-wrap: wrap; }
.dlo-opt { flex: 1 1 260px; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.dlo-opt.is-main { border-color: var(--primary); background: var(--primary-50); }
.dlo-opt > b { font-size: 14px; }
.dlo-opt > span { font-size: 13px; color: var(--muted); line-height: 1.5; }
.dlo-err { align-self: stretch; padding: 8px 10px; border-radius: var(--radius); background: var(--bad-soft); color: var(--bad); font-size: 13px; }
.dlo-form { align-self: stretch; display: flex; flex-direction: column; gap: 8px; }
.dlo-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.dlo-form .dlo-ro { background: var(--line-soft); color: var(--muted); }
.dlo-tip { font-size: 12px; color: var(--warn); }
.dlo-tip:empty { display: none; }
.dlo-foot { display: flex; justify-content: flex-end; gap: 8px; }
.dlo-tw { overflow-x: auto; }
.dlo-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dlo-table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; padding: 6px 8px; border-bottom: 2px solid var(--line); }
.dlo-table td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); }
.dlo-table .dlo-mut { color: var(--muted); }
.dlo-table .dlo-op { text-align: right; white-space: nowrap; }
.dlo-table .dlo-op a { color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.dlo-table .dlo-op a:hover { color: var(--cta-hover); }
.dlo-sr { position: absolute; left: -9999px; }
.dlo-more { margin-top: 6px; }
#moldSearchOverlay.dlo-picker #msClear, #moldSearchOverlay.dlo-picker #msNew, #moldSearchOverlay.dlo-picker .ms-new { display: none; }

/* 右侧改档案(第 3 期, drawing-lib-edit.js; 画板 B): 头卡「改档案中」+ 取消/保存; 左 分组表单 + 钻位明细, 右 对照小图 / 档案信息 / 挂着的产品 / 删除 */
.dle-pill { background: var(--primary-50); color: var(--cta-hover); font-weight: 600; }
.dle-err[hidden] { display: none; }
.dle-body { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; min-width: 0; }
.dle-form { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.dle-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; min-width: 0; }
.dle-sec h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.dle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px 12px; }
.dle-grid .field { min-width: 0; align-content: start; }
.dle-grid .field.is-wide { grid-column: 1 / -1; }
.dle-grid .field.ma-off { opacity: .45; }
.dle-grid .field.ma-off input { background: var(--line-soft); pointer-events: none; }
.dle-grid textarea { resize: vertical; font: inherit; }
.dle-tip { margin-top: 8px; font-size: 12px; color: var(--muted); }
.dle-tip:empty { display: none; }
.dle-side { flex: 1 1 300px; min-width: 280px; display: flex; flex-direction: column; gap: 14px; }
.dle-ref { padding: 10px; }
.dle-ref img { width: 100%; max-height: 220px; object-fit: contain; display: block; background: var(--panel); border-radius: 10px; }
.dle-ref small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.dle-noref { min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; background: var(--panel); border-radius: 10px; }
.dle-prow { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line-soft); font-size: 13px; min-width: 0; }
.dle-prow a { color: var(--ink); text-decoration: none; font-weight: 600; flex: 0 0 auto; }
.dle-prow a:hover { color: var(--primary); }
.dle-prow small { flex: 1 1 auto; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dle-link { margin-top: 8px; }
.dle-danger { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.dle-danger h3 { margin: 0; }
.dle-del { color: var(--bad); border-color: var(--bad-soft); }
.dle-del:hover { color: var(--surface); background: var(--bad); border-color: var(--bad); }

/* 并排看叠层(dlCmpOv) */
.dl-cmp { width: min(1280px, 96vw); height: min(820px, 92vh); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; color: var(--ink); }
.dl-cmphead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dl-cmpbody { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; }
.dl-cmpbody figure { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; }
.dl-cmpbody figcaption { font-size: 13px; color: var(--muted); }
.dl-cmpimg { flex: 1 1 auto; min-height: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dl-cmpimg img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ≤768 手机(画板 D): 单栏; 选中 → .show-pane 只出右侧, 顶上「‹ 返回」 */
@media (max-width: 768px) {
  .dl-split { display: block; }
  .dl-side { position: static; height: auto; min-height: 0; border-radius: 10px; }
  .dl-scroll { overflow: visible; }
  .dl-search { height: 44px; border-radius: 10px; }
  .dl-search input { font-size: 15px; }
  .dl-chips { flex-wrap: nowrap; overflow-x: auto; }
  .dl-chip { flex: 0 0 auto; height: 32px; padding: 0 12px; font-size: 13px; }
  .dl-row { height: 48px; font-size: 15px; border-radius: 0; border-bottom: 1px solid var(--line-soft); }
  .dl-list.with-img .dl-row { height: 56px; }
  .dl-chev { display: inline-flex; }
  .dl-pane { display: none; }
  .dl-split.show-pane .dl-side { display: none; }
  .dl-split.show-pane .dl-pane { display: flex; }
  .dl-mback { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 12px 4px 4px; min-width: 0; }
  .dl-mback b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
  .dl-backbtn { height: 44px; min-width: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; cursor: pointer; }
  .dl-hcard { padding: 12px; }
  .dl-hrow h2, .dl-hone h2 { font-size: 18px; }
  .dl-hacts { width: 100%; }
  .dl-hacts .dl-btn { flex: 1 1 auto; justify-content: center; height: 44px; }
  .dl-view { height: 280px; }
  .dl-info3 { grid-template-columns: minmax(0, 1fr); }
  .dl-params { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-fhead { flex-wrap: wrap; }
  .dl-ktabs { flex-wrap: nowrap; overflow-x: auto; flex: 1 1 100%; }
  .dl-pvdl, .dl-pvhint { display: none; }
  .dl-ktab { flex: 0 0 auto; height: 32px; }
  .dl-cmpbody { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .dlo-card { padding: 12px; }
  .dle-form, .dle-side { flex-basis: 100%; min-width: 0; }
  .dle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dlo-opt > .dl-btn { align-self: stretch; justify-content: center; height: 44px; }
}
