#copyEditorMask{
  position:fixed;inset:0;z-index:10020;display:none;align-items:center;justify-content:center;
  padding:18px;background:rgba(20,14,8,.72);box-sizing:border-box;
}
#copyEditorMask.show{display:flex}
#copyEditorModal{
  width:min(1040px,96vw);height:min(820px,92vh);display:grid;grid-template-rows:auto 1fr auto;
  overflow:hidden;background:#f4ead2;color:#302414;border:1px solid #8d672d;border-radius:8px;
  box-shadow:0 20px 60px rgba(0,0,0,.55);
}
.ce-head,.ce-foot{display:flex;align-items:center;gap:10px;padding:12px 16px;background:#302315;color:#f5e5bd}
.ce-head strong{font-size:17px}
.ce-head button{margin-left:auto}
.ce-head button,.ce-foot button,.ce-role-tabs button,.ce-type-tabs button{
  border:1px solid #8d672d;background:#fff8e7;color:#3c2a16;min-height:34px;padding:6px 12px;
  border-radius:5px;cursor:pointer;font:inherit;
}
.ce-head button{width:34px;padding:0;background:transparent;color:#f5e5bd;border-color:#8d7653}
.ce-foot button:last-child{background:#6f3e25;color:#fff5df;border-color:#4d2918}
.ce-foot button:disabled,.ce-role-tabs button:disabled,.ce-type-tabs button:disabled{opacity:.5;cursor:default}
.ce-foot #copyEditorStatus{flex:1;font-size:12px;color:#dfc99b}
.ce-foot #copyEditorStatus.error{color:#ffb1a2}
.ce-body{min-height:0;display:grid;grid-template-rows:auto auto auto auto 1fr;padding:14px 16px 0}
.ce-role-tabs,.ce-type-tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:8px}
.ce-role-tabs button,.ce-type-tabs button{white-space:nowrap;background:#eadfc8}
.ce-role-tabs button.active,.ce-type-tabs button.active{background:#6f3e25;color:#fff7e8;border-color:#4d2918}
.ce-filter-row{display:flex;align-items:center;gap:8px;padding:0 0 8px;color:#705b39;font-size:12px}
.ce-filter-row select{
  min-width:240px;max-width:100%;height:34px;border:1px solid #bca77e;border-radius:4px;
  background:#fffdf7;color:#302414;padding:4px 8px;font:13px/1.3 inherit;
}
.ce-table-head,.ce-row{display:grid;grid-template-columns:minmax(210px,34%) 1fr;gap:10px}
.ce-table-head{padding:7px 40px 7px 8px;border-bottom:1px solid #bda679;color:#705b39;font-size:12px;font-weight:700}
.ce-list{min-height:0;overflow:auto;padding:6px 0 14px}
.ce-section{padding:14px 0 4px;border-bottom:1px solid #c7b184}
.ce-section:first-child{padding-top:6px}
.ce-section-title{
  position:sticky;top:0;z-index:1;margin:0 0 6px;padding:8px 4px;background:#f4ead2;
  border-bottom:2px solid #9d7b42;color:#3f2b17;font-size:15px;line-height:1.3;font-weight:700;
}
.ce-row{padding:6px 0;border-bottom:1px solid rgba(112,91,57,.18);align-items:start}
.ce-row:last-child{border-bottom:0}
.ce-row-wide{grid-template-columns:1fr}
.ce-row select,.ce-row textarea,.ce-condition{
  width:100%;box-sizing:border-box;border:1px solid #bca77e;border-radius:4px;background:#fffdf7;
  color:#302414;padding:8px;font:13px/1.45 inherit;
}
.ce-row select{height:40px}
.ce-condition{min-height:40px;background:#eee3cc;color:#5e4a2c}
.ce-row textarea{min-height:58px;resize:vertical;padding-right:34px}
.ce-copy-cell{position:relative}
.ce-delete{
  position:absolute;right:5px;top:5px;width:26px;height:26px;border:0;background:transparent;
  color:#8b3327;cursor:pointer;font-size:14px;border-radius:4px;
}
.ce-delete:hover{background:#f3d5cf}
.ce-empty{padding:36px 12px;text-align:center;color:#806f53}
@media (max-width:900px){
  #copyEditorMask{padding:0}
  #copyEditorModal{width:100vw;height:100dvh;max-height:none;border:0;border-radius:0}
  .ce-body{padding:10px 10px 0}
  .ce-table-head,.ce-row{grid-template-columns:1fr}
  .ce-table-head{display:none}
  .ce-row{gap:6px;padding:8px 0}
  .ce-foot{padding:10px}
  .ce-foot #copyEditorStatus{max-width:42%;line-height:1.25}
  .ce-head button,.ce-foot button,.ce-role-tabs button,.ce-type-tabs button{min-height:44px}
  .ce-filter-row select,.ce-row select{height:44px}
}
