.office-cert-maker-wrap{width:100%;max-width:100%;box-sizing:border-box;container-type:inline-size;
  font-size:13px;color:var(--text,#333);}
.office-cert-maker-wrap *{box-sizing:border-box;}

/* ===== 顶部工具栏 ===== */
.office-cert-maker-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;max-width:100%;
  padding:8px 10px;margin-bottom:10px;border:1px solid var(--border,#e5e7eb);border-radius:var(--radius,10px);
  background:var(--bg-card,#fff);}
.office-cert-maker-bg2{display:flex;align-items:center;gap:5px;flex-wrap:wrap;}
.office-cert-maker-vsep{width:1px;height:22px;background:var(--border,#e5e7eb);}
.office-cert-maker-mini{font-size:11px;color:var(--text-secondary,#6b7281);}
.office-cert-maker-selw{min-width:190px;max-width:100%;}
.office-cert-maker-x{color:var(--text-secondary,#6b7281);}
.office-cert-maker-ztxt{min-width:46px;text-align:center;font-size:12px;color:var(--text-secondary,#6b7281);
  font-variant-numeric:tabular-nums;}

/* ===== 三栏主体 ===== */
.office-cert-maker-body{display:grid;grid-template-columns:250px minmax(0,1fr) 296px;gap:10px;
  width:100%;max-width:100%;align-items:stretch;}
.office-cert-maker-l,.office-cert-maker-r{width:100%;max-width:100%;min-width:0;
  display:flex;flex-direction:column;min-height:340px;
  border:1px solid var(--border,#e5e7eb);border-radius:var(--radius,10px);background:var(--bg-card,#fff);
  overflow:hidden;}
.office-cert-maker-c{width:100%;max-width:100%;min-width:0;display:flex;flex-direction:column;
  border:0;border-radius:var(--radius,10px);background:transparent;padding:0;}

/* ===== 左栏：标签页 ===== */
.office-cert-maker-tabs{display:flex;flex:0 0 auto;border-bottom:1px solid var(--border,#e5e7eb);
  background:var(--bg-btn,#f3f4f6);}
.office-cert-maker-tab{flex:1;min-width:0;padding:8px 4px;border:0;cursor:pointer;font-size:12px;
  background:transparent;color:var(--text-secondary,#6b7281);border-bottom:2px solid transparent;}
.office-cert-maker-tab.office-cert-maker-on{color:var(--primary,#2563eb);font-weight:600;
  border-bottom-color:var(--primary,#2563eb);background:var(--bg-card,#fff);}
.office-cert-maker-pane{padding:10px;flex:1 1 auto;min-height:0;max-height:min(70vh,640px);overflow:auto;}
.office-cert-maker-sub{margin:12px 0 6px;font-size:12px;font-weight:600;color:var(--text,#333);
  padding-bottom:4px;border-bottom:1px solid var(--border,#e5e7eb);}

/* ===== 图层面板 ===== */
.office-cert-maker-layers{display:flex;flex-direction:column;gap:2px;}
.office-cert-maker-lyr{display:flex;align-items:center;gap:6px;padding:5px 6px;cursor:pointer;
  border:1px solid transparent;border-radius:var(--radius-sm,6px);font-size:12px;}
.office-cert-maker-lyr:hover{background:var(--bg-btn,#f3f4f6);}
.office-cert-maker-lyr.office-cert-maker-sel{border-color:var(--primary,#2563eb);
  background:var(--primary-shadow,rgba(37,99,235,.08));}
.office-cert-maker-eye{width:20px;height:20px;flex:0 0 20px;display:flex;align-items:center;justify-content:center;
  border:0;border-radius:var(--radius-sm,6px);background:transparent;cursor:pointer;font-size:12px;
  color:var(--text-secondary,#6b7281);}
.office-cert-maker-eye.office-cert-maker-off{opacity:.35;}
.office-cert-maker-lyname{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.office-cert-maker-lyoff{opacity:.45;}

/* ===== 中部画布 ===== */
.office-cert-maker-cwrap{display:grid;grid-template-columns:16px minmax(0,1fr);grid-template-rows:16px minmax(0,1fr);
  width:100%;max-width:100%;flex:1 1 auto;min-height:300px;border:1px solid var(--border,#e5e7eb);
  border-radius:var(--radius-sm,6px);overflow:hidden;background:var(--bg-page,#f7f8fa);}
.office-cert-maker-corner{background:var(--bg-btn,#f3f4f6);border-right:1px solid var(--border,#e5e7eb);
  border-bottom:1px solid var(--border,#e5e7eb);}
.office-cert-maker-rh,.office-cert-maker-rv{display:block;width:100%;height:100%;background:var(--bg-btn,#f3f4f6);}
.office-cert-maker-rh{border-bottom:1px solid var(--border,#e5e7eb);cursor:crosshair;}
.office-cert-maker-rv{border-right:1px solid var(--border,#e5e7eb);cursor:crosshair;}
.office-cert-maker-stage{position:relative;overflow:hidden;min-width:0;min-height:0;cursor:grab;}
.office-cert-maker-stage.office-cert-maker-pan{cursor:grabbing;}
.office-cert-maker-art{position:absolute;transform-origin:0 0;box-shadow:0 1px 8px rgba(0,0,0,.18);}
.office-cert-maker-img{display:block;width:100%;height:auto;background:#fff;}
.office-cert-maker-gl{position:absolute;inset:0;pointer-events:none;}
.office-cert-maker-gline{position:absolute;pointer-events:auto;background:var(--primary,#2563eb);opacity:.75;}
.office-cert-maker-gline[data-a="v"]{width:1px;top:0;bottom:0;cursor:ew-resize;}
.office-cert-maker-gline[data-a="h"]{height:1px;left:0;right:0;cursor:ns-resize;}
.office-cert-maker-gline::after{content:attr(data-v);position:absolute;font-size:9px;color:var(--primary,#2563eb);
  background:var(--bg-card,#fff);padding:0 2px;border-radius:var(--radius-sm,6px);white-space:nowrap;}
.office-cert-maker-gline[data-a="v"]::after{left:2px;top:2px;}
.office-cert-maker-gline[data-a="h"]::after{top:2px;left:2px;}
.office-cert-maker-status{flex:0 0 auto;margin-top:4px;display:flex;flex-wrap:wrap;gap:10px;width:100%;max-width:100%;
  font-size:11px;color:var(--text-secondary,#6b7281);}
.office-cert-maker-status span{white-space:nowrap;}

/* ===== 右栏属性 ===== */
.office-cert-maker-rhead{flex:0 0 auto;padding:8px 10px;font-size:12px;font-weight:600;color:var(--text-on-accent,#fff);
  background:var(--primary,#2563eb);}
.office-cert-maker-rbody{padding:10px;flex:1 1 auto;min-height:0;max-height:min(70vh,640px);overflow:auto;}
.office-cert-maker-pg{margin-bottom:6px;}

/* ===== 通用控件 ===== */
.office-cert-maker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(126px,1fr));gap:8px;
  width:100%;max-width:100%;}
.office-cert-maker-cell{display:flex;flex-direction:column;gap:4px;min-width:0;width:100%;max-width:100%;}
.office-cert-maker-cell.office-cert-maker-wide{grid-column:1/-1;}
.office-cert-maker-lbl{font-size:11px;color:var(--text-secondary,#6b7281);display:flex;align-items:center;gap:4px;}
.office-cert-maker-val{font-weight:600;color:var(--primary,#2563eb);font-variant-numeric:tabular-nums;}
.office-cert-maker-sel,.office-cert-maker-in,.office-cert-maker-num,.office-cert-maker-ta{
  width:100%;max-width:100%;box-sizing:border-box;padding:5px 7px;font-size:12px;font-family:inherit;
  border:1px solid var(--border,#e5e7eb);border-radius:var(--radius-sm,6px);
  background:var(--bg-input,#fff);color:var(--text,#333);}
.office-cert-maker-num{width:64px;flex:0 0 auto;}
.office-cert-maker-ta{resize:vertical;min-height:52px;line-height:1.6;}
.office-cert-maker-in[type="color"]{padding:2px;height:29px;cursor:pointer;}
.office-cert-maker-rng{width:100%;max-width:100%;accent-color:var(--primary,#2563eb);}
.office-cert-maker-chk,.office-cert-maker-chk2{display:flex;align-items:center;gap:4px;font-size:11px;
  color:var(--text-secondary,#6b7281);cursor:pointer;white-space:nowrap;}
.office-cert-maker-cbx{width:15px;height:15px;margin:0;accent-color:var(--primary,#2563eb);}
.office-cert-maker-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;width:100%;max-width:100%;}
.office-cert-maker-btns{display:flex;gap:5px;flex-wrap:wrap;}
.office-cert-maker-btn,.office-cert-maker-tbtn,.office-cert-maker-ibtn{padding:5px 10px;font-size:12px;
  font-family:inherit;cursor:pointer;border:1px solid var(--border,#e5e7eb);border-radius:var(--radius-sm,6px);
  background:var(--bg-btn,#f3f4f6);color:var(--text,#333);}
.office-cert-maker-btn:hover,.office-cert-maker-tbtn:hover,.office-cert-maker-ibtn:hover{background:var(--bg-btn-hover,#e5e7eb);}
.office-cert-maker-tbtn{padding:3px 7px;font-size:11px;}
.office-cert-maker-ibtn{padding:3px 8px;font-size:13px;line-height:1;}
.office-cert-maker-btn.office-cert-maker-primary{border-color:var(--primary,#2563eb);
  background:var(--primary,#2563eb);color:var(--text-on-accent,#fff);}
.office-cert-maker-btn.office-cert-maker-primary:hover{background:var(--primary-hover,#1d4ed8);}
.office-cert-maker-file{display:none;}
.office-cert-maker-msg{margin:8px 0 0;font-size:12px;min-height:16px;width:100%;max-width:100%;}
.office-cert-maker-msg.office-cert-maker-ok{color:var(--success,#16a34a);}
.office-cert-maker-msg.office-cert-maker-err{color:var(--danger,#dc2626);}
.office-cert-maker-msg.office-cert-maker-warn{color:var(--warning-fg,#92400e);}
.office-cert-maker-note{margin:8px 0 0;font-size:11px;line-height:1.7;color:var(--text-secondary,#6b7281);
  width:100%;max-width:100%;}
.office-cert-maker-hide{display:none !important;}

/* ===== 响应式 ===== */
@container (max-width:1180px){
  .office-cert-maker-body{grid-template-columns:216px minmax(0,1fr) 258px;}
}
.office-cert-maker-grp{margin-left:6px;padding:1px 6px;border-radius:var(--radius-sm,6px);background:var(--bg-btn,#f3f4f6);color:var(--text-secondary,#6b7281);white-space:nowrap;}
@container (max-width:960px){
  .office-cert-maker-body{grid-template-columns:1fr;}
  .office-cert-maker-c{order:-1;}
  .office-cert-maker-l,.office-cert-maker-r,.office-cert-maker-c{min-height:0;}
  .office-cert-maker-pane,.office-cert-maker-rbody{max-height:none;flex:0 0 auto;}
  .office-cert-maker-cwrap{flex:0 0 auto;height:min(52vh,420px);}
}
@media (max-width:960px){
  .office-cert-maker-body{grid-template-columns:1fr;}
  .office-cert-maker-c{order:-1;}
  .office-cert-maker-l,.office-cert-maker-r,.office-cert-maker-c{min-height:0;}
  .office-cert-maker-pane,.office-cert-maker-rbody{max-height:none;flex:0 0 auto;}
  .office-cert-maker-cwrap{flex:0 0 auto;height:min(52vh,420px);}
}

/* ===== 顶部工具条（严格单行，横向滚动） ===== */
.office-cert-maker-bar {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  align-items: center;
  gap: 3px;
  padding: 6px 6px;
  height: 46px;
}
.office-cert-maker-bar > * { flex: 0 0 auto; }
.office-cert-maker-bar > .office-cert-maker-bg2 { flex-wrap: nowrap; gap: 4px; }
.office-cert-maker-bar > .office-cert-maker-bg2.office-cert-maker-right { margin-left: auto; }
.office-cert-maker-bar .office-cert-maker-mini { white-space: nowrap; }
.office-cert-maker-tools { gap: 2px; }
.office-cert-maker-selg { width: 88px; min-width: 0; max-width: 100%; }
.office-cert-maker-bar .office-cert-maker-selw { width: 168px; min-width: 0; flex: 0 1 168px; }
.office-cert-maker-bar .office-cert-maker-num { width: 54px; }
.office-cert-maker-bar .office-cert-maker-btn { padding: 5px 7px; }
/* 单行紧凑：隐藏顶部冗余文字标签，工具仅留图标 */
.office-cert-maker-bar > .office-cert-maker-bg2 > .office-cert-maker-mini { display: none; }
.office-cert-maker-bar .office-cert-maker-grp { max-width: 96px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
/* 窄容器：工具仅留图标，隐藏次要文本 */
@container (max-width: 1500px) {
  .office-cert-maker-itool .office-cert-maker-txt { display: none; }
  .office-cert-maker-itool { padding: 4px 6px; }
}
.office-cert-maker-bar > .office-cert-maker-bg2:last-child { position: sticky; right: 0;
  background: var(--bg-card, #fff); padding-left: 4px; }
@container (max-width: 1500px) {
  .office-cert-maker-bar .office-cert-maker-grp { display: none; }
  .office-cert-maker-bar .office-cert-maker-selg { width: 74px; }
  .office-cert-maker-bar .office-cert-maker-selw { width: 118px; flex: 0 1 118px; }
  .office-cert-maker-bar .office-cert-maker-num { width: 48px; }
  .office-cert-maker-itool { padding: 4px 3px; }
  .office-cert-maker-bar > .office-cert-maker-bg2 { gap: 3px; }
  .office-cert-maker-bar .office-cert-maker-btn { padding: 5px 6px; }
  .office-cert-maker-bar .office-cert-maker-sel { font-size: 12px; }
  .office-cert-maker-bar .office-cert-maker-selg { min-width: 76px; }
  .office-cert-maker-bar .office-cert-maker-selw { min-width: 100px; flex: 1 1 110px; }
  .office-cert-maker-itool { padding: 4px 5px; }
}
@container (max-width: 900px) {
  .office-cert-maker-bar .office-cert-maker-selw { min-width: 110px; flex: 1 1 110px; }
  .office-cert-maker-tbtn { padding: 3px 5px; }
}
.office-cert-maker-itool {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 7px;
  border: 1px solid var(--border, #d8dde6);
  border-radius: var(--radius-sm, 6px);
  background: #fff;
  color: var(--text, #333);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.office-cert-maker-itool:hover { border-color: var(--primary, #2f6fed); color: var(--primary, #2f6fed); }
.office-cert-maker-itool.office-cert-maker-on {
  background: var(--primary, #2f6fed);
  border-color: var(--primary, #2f6fed);
  color: #fff;
}
.office-cert-maker-ico { font-size: 14px; }
.office-cert-maker-txt { font-size: 12px; }
.office-cert-maker-selsm { min-width: 68px; }
.office-cert-maker-insm { width: 30px; height: 26px; padding: 1px; }
.office-cert-maker-shapehide.office-cert-maker-hide { display: none; }

/* ===== 画布交互层 ===== */
.office-cert-maker-svgbox { width: 100%; height: 100%; }
.office-cert-maker-svgbox > svg { display: block; width: 100%; height: 100%; }
.office-cert-maker-img { display: none; }
.office-cert-maker-art.office-cert-maker-tp { cursor: crosshair; }
.office-cert-maker-art.office-cert-maker-tm { cursor: move; }
.office-cert-maker-art.office-cert-maker-ts { cursor: default; }
.office-cert-maker-art.office-cert-maker-tp2 { cursor: grab; }
.office-cert-maker-tinput {
  position: absolute;
  z-index: 40;
  min-width: 120px;
  padding: 2px 4px;
  border: 1px solid var(--primary, #2f6fed);
  border-radius: var(--radius-sm, 4px);
  background: #fff;
  font-size: 14px;
}
.office-cert-maker-hist {
  border: 1px solid var(--border, #d8dde6);
  border-radius: var(--radius-sm, 6px);
  background: #fff;
  margin: 6px 10px 0;
  max-height: 190px;
  display: flex;
  flex-direction: column;
}
.office-cert-maker-hist.office-cert-maker-hide { display: none; }
.office-cert-maker-histhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-bottom: 1px solid var(--border, #e6e9ef);
  font-size: 12px;
  font-weight: 600;
}
.office-cert-maker-xbtn {
  border: 0;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted, #888);
}
.office-cert-maker-histlist { overflow-y: auto; padding: 4px; }
.office-cert-maker-hitem {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: var(--radius-sm, 4px);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.office-cert-maker-hitem:hover { background: var(--bg-hover, #f2f5fa); }
.office-cert-maker-hitem.office-cert-maker-cur { background: var(--primary, #2f6fed); color: #fff; }
@media (max-width: 900px) {
  .office-cert-maker-txt { display: none; }
}

/* ===== 8.0：工具条与工具参数条 ===== */
.office-cert-maker-tools{display:flex;flex-wrap:wrap;gap:4px;width:100%;max-width:100%;
  padding:6px 8px;margin-bottom:6px;border:1px solid var(--border,#e5e7eb);
  border-radius:var(--radius,10px);background:var(--bg-card,#fff);}
.office-cert-maker-toolopt{display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;max-width:100%;
  min-height:34px;padding:6px 8px;margin-bottom:10px;border:1px solid var(--border,#e5e7eb);
  border-radius:var(--radius,10px);background:var(--bg-card,#fff);font-size:12px;}
.office-cert-maker-tolab{font-size:12px;font-weight:600;color:var(--text-secondary,#6b7281);white-space:nowrap;}
.office-cert-maker-toitem{display:inline-flex;align-items:center;gap:4px;}
.office-cert-maker-tolbl{font-size:11px;color:var(--text-secondary,#6b7281);white-space:nowrap;}
.office-cert-maker-tochk{display:inline-flex;align-items:center;gap:3px;font-size:11px;
  color:var(--text-secondary,#6b7281);white-space:nowrap;cursor:pointer;}
.office-cert-maker-toval{font-size:11px;color:var(--text-secondary,#6b7281);min-width:24px;
  font-variant-numeric:tabular-nums;}
.office-cert-maker-selsm{padding:2px 4px;font-size:11px;max-width:130px;min-width:0;}
.office-cert-maker-insm{width:30px;height:22px;padding:0;}
.office-cert-maker-numsm{width:54px;padding:2px 4px;font-size:11px;}
.office-cert-maker-rngsm{width:86px;accent-color:var(--primary,#2563eb);}
.office-cert-maker-totip{font-size:11px;color:var(--text-secondary,#6b7281);}
@container (max-width: 1500px) {
  .office-cert-maker-rngsm { width: 56px; }
  .office-cert-maker-selw { width: 118px; flex: 0 1 118px; }
  .office-cert-maker-bar .office-cert-maker-sel { font-size: 11px; }
  .office-cert-maker-bar { gap: 2px; }
  .office-cert-maker-bar > .office-cert-maker-bg2 { gap: 3px; }
}
@container (max-width: 900px) {
  .office-cert-maker-selsm { max-width: 100px; }
  .office-cert-maker-rngsm { width: 70px; }
}
