/* 标签设计器：左边模板和元素，中间画布，右边属性 */
.pane { display: none; }
.pane.active { display: flex; }
aside.left { width: 250px; }
aside.right { width: 320px; border-right: none; border-left: 1px solid var(--line); }
aside select[size] { width: 100%; }
.center { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.toolbar button { padding: 2px 8px; }
.pos { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 12px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#stage-wrap { flex: 1; overflow: auto; padding: 24px; background: #e7e2d6; }
#stage { position: relative; margin: auto; }
#paper { position: absolute; inset: 0; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
#paper svg { display: block; width: 100%; height: 100%; }
#overlay { position: absolute; inset: 0; }
.box { position: absolute; border: 1px dashed rgba(21, 101, 192, .45); cursor: move; }
.box:hover { border-color: var(--accent); }
.box.sel { border: 1px solid var(--accent); background: rgba(21, 101, 192, .06); }
.box.bad { border-color: var(--danger); }
.box .h { position: absolute; width: 8px; height: 8px; background: #fff; border: 1px solid var(--accent); }
.box .h.nw { left: -5px; top: -5px; cursor: nwse-resize; } .box .h.ne { right: -5px; top: -5px; cursor: nesw-resize; }
.box .h.sw { left: -5px; bottom: -5px; cursor: nesw-resize; } .box .h.se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.el-list { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow-y: auto; }
.el-list li { padding: 3px 6px; cursor: pointer; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.el-list li.sel { background: rgba(21, 101, 192, .12); }
.el-list li.bad { color: var(--danger); }
#props h3, aside h3 { margin: 4px 0 8px; font-size: 14px; }
.field { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 6px; margin: 4px 0; }
#props .field { margin: 0; padding: 6px 0; }
#props .field + .field { border-top: 1px solid var(--line); }   /* 属性一项一条分隔线：多行的项（文字 + 插入字段、条件公式）分得清 */
.field > span { color: var(--muted); font-size: 12px; }
.field input[type=number] { width: 90px; }
.field input[type=text], .field select, .field textarea { width: 100%; }
.field .pair { display: flex; gap: 4px; }
.field .pair input { width: 70px; }
.field .checks { display: flex; flex-wrap: wrap; gap: 8px; }
.insert { display: flex; gap: 4px; margin-top: 4px; }
.insert select { flex: 1; min-width: 0; }
.insert button { flex: none; white-space: nowrap; }                /* "始终"按钮不被下拉框挤成竖排 */
.cols td input { width: 64px; }
.cols td input.wide { width: 110px; }
.form-pane { padding: 12px 18px; overflow-y: auto; display: block; }
.form-pane .field { grid-template-columns: 200px 320px; }
#med-preview { margin-top: 16px; }
#med-preview svg { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.import-row { margin-top: 6px; display: flex; flex-wrap: nowrap; gap: 4px; } .import-row select { flex: 1 1 auto; min-width: 0; } .import-row button { flex: none; }
.filebtn { display: inline-block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; }
.filebtn input { display: none; }
.notes-wrap { max-height: 60vh; overflow: auto; }
#notes-table { border-collapse: collapse; font-size: 12px; }
#notes-table td, #notes-table th { border: 1px solid var(--line); padding: 3px 6px; text-align: left; vertical-align: top; }
#notes-table tr.skipped td { color: var(--danger); }
#toast { position: fixed; right: 16px; bottom: 16px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 4px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 480px; }
#toast.show { opacity: .92; }

/* 云端（host.js 给 <html> 加 .cloud）：本机才有的东西藏起来 */
.cloud:not(.shell) .tab[data-tab="printers"], .cloud:not(.shell) #pane-printers, .cloud:not(.shell) #test-printer, .cloud:not(.shell) #test-print { display: none !important; }
.host-dialog { border: 1px solid #ccc; border-radius: 8px; padding: 18px 22px; min-width: 360px; }
.host-dialog .actions { display: flex; gap: 8px; margin-top: 12px; }
.host-dialog .bad { color: #b42318; }
.host-logout { margin-left: 8px; }
.host-support { margin-left: 8px; white-space: nowrap; }
#lds-fonts-dialog { max-width: 780px; } #lds-fonts-table select { max-width: 280px; } #lds-upload { margin: 6px 0; }
#lds-local-fams { max-height: 220px; overflow: auto; border: 1px solid var(--line); padding: 4px 8px; margin: 4px 0; columns: 2; font-size: 12px; }
#lds-local-fams label { display: block; break-inside: avoid; }
#lds-local-fams label.need { font-weight: 600; }
