/* ==========================================================
   PSE Editor Engine v0.7.9 - Text Value Insert Picker
   Editor renders Value Sort Engine results only. A selected registered Value
   span is replaced exactly, then the current Tag is re-detected.
   ========================================================== */

body.pse-editor-engine-open{
  overflow:hidden;
  padding-right:var(--pse-editor-scrollbar-compensation,0px);
}

.model-output-tag,
.pse-preset-value-tag,
.pse-preset-directory-chip,
.pse-category-pasted-preset-value,
.pse-category-pasted-preset-directory{
  cursor:pointer;
}

.model-output-tag:hover,
.pse-preset-value-tag:hover,
.pse-preset-directory-chip:hover,
.pse-category-pasted-preset-value:hover,
.pse-category-pasted-preset-directory:hover{
  box-shadow:0 0 0 2px rgba(37,99,235,.16);
}

.pse-editor-overlay{
  position:fixed;
  inset:0;
  z-index:2700;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:rgba(15,23,42,.72);
  backdrop-filter:blur(3px);
}

.pse-editor-overlay[hidden]{
  display:none;
}

.pse-editor-window{
  --pse-editor-window-width:720px;
  position:relative;
  width:min(var(--pse-editor-window-width),calc(100vw - 32px));
  min-width:min(340px,calc(100vw - 32px));
  max-width:calc(100vw - 32px);
  max-height:calc(100vh - 24px);
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid #94a3b8;
  border-radius:14px;
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 28px 80px rgba(15,23,42,.34);
}

.pse-editor-header{
  min-height:56px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:12px 12px 11px 16px;
  border-bottom:1px solid #cbd5e1;
  background:#f8fafc;
}

.pse-editor-title-wrap{
  min-width:0;
  flex:1 1 auto;
}

.pse-editor-title-label{
  margin:0 0 3px;
  color:#64748b;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.pse-editor-title{
  margin:0;
  color:#0f172a;
  font-size:16px;
  font-weight:900;
  line-height:1.42;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}

.pse-editor-title.is-editable{
  cursor:text;
  border-radius:6px;
  transition:background .12s ease,box-shadow .12s ease;
}

.pse-editor-title.is-editable:hover,
.pse-editor-title.is-editable:focus-visible{
  background:#eef6ff;
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
  outline:none;
}

.pse-editor-title-input{
  width:100%;
  min-height:150px;
  max-height:46vh;
  margin:0;
  padding:12px 13px;
  resize:vertical;
  overflow:auto;
  border:1px solid #60a5fa;
  border-radius:9px;
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 0 0 3px rgba(37,99,235,.10);
  font-family:inherit;
  font-size:14px;
  font-weight:750;
  line-height:1.55;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.pse-editor-title-input:focus{
  outline:none;
  border-color:#2563eb;
  box-shadow:0 0 0 4px rgba(37,99,235,.14);
}

.pse-editor-text-edit-overlay{
  position:fixed;
  inset:0;
  z-index:2850;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.68);
  backdrop-filter:blur(3px);
}

.pse-editor-text-edit-overlay[hidden]{
  display:none !important;
}

.pse-editor-text-edit-dialog{
  width:min(760px,calc(100vw - 36px));
  max-height:min(78vh,760px);
  display:flex;
  flex-direction:column;
  gap:11px;
  overflow:hidden;
  padding:17px;
  border:1px solid #93c5fd;
  border-radius:14px;
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 30px 90px rgba(15,23,42,.42);
}

.pse-editor-text-edit-header{
  min-width:0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.pse-editor-text-edit-heading{
  min-width:0;
}

.pse-editor-text-edit-kicker{
  margin-bottom:3px;
  color:#2563eb;
  font-size:9px;
  font-weight:950;
  letter-spacing:.09em;
  text-transform:uppercase;
}

.pse-editor-text-edit-title{
  margin:0;
  color:#0f172a;
  font-size:17px;
  font-weight:950;
}

.pse-editor-text-edit-help{
  margin:0;
  color:#64748b;
  font-size:11px;
  font-weight:700;
  line-height:1.5;
}

.pse-editor-text-edit-help[data-error="true"]{
  color:#b91c1c;
}

.pse-editor-text-edit-insert-value{
  flex:0 0 auto;
  min-height:32px;
  margin:0;
  padding:7px 11px;
  border:1px solid #60a5fa;
  border-radius:7px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:900;
}

.pse-editor-text-edit-insert-value:hover:not(:disabled){
  border-color:#2563eb;
  background:#dbeafe;
}

.pse-editor-text-edit-insert-value:disabled{
  opacity:.42;
  cursor:default;
}

.pse-editor-text-edit-counter{
  margin-top:-5px;
  color:#64748b;
  font-size:10px;
  font-weight:800;
  text-align:right;
}

.pse-editor-text-edit-counter[data-over-limit="true"]{
  color:#dc2626;
}

.pse-editor-text-edit-overlay.pse-text-edit-suspended-for-directory{
  pointer-events:none;
}

.pse-editor-text-edit-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.pse-editor-text-edit-shortcut{
  min-width:0;
  color:#94a3b8;
  font-size:9px;
  font-weight:750;
}

.pse-editor-text-edit-actions{
  flex:0 0 auto;
  display:flex;
  justify-content:flex-end;
  gap:7px;
}

.pse-editor-text-edit-cancel,
.pse-editor-text-edit-update{
  min-width:82px;
  margin:0;
  padding:8px 12px;
  border-radius:7px;
  font-size:11px;
  font-weight:900;
}

.pse-editor-text-edit-cancel{
  border:1px solid #cbd5e1;
  background:#ffffff;
  color:#475569;
}

.pse-editor-text-edit-cancel:hover{
  border-color:#94a3b8;
  background:#f8fafc;
  color:#0f172a;
}

.pse-editor-text-edit-update{
  border:1px solid #2563eb;
  background:#2563eb;
  color:#ffffff;
}

.pse-editor-text-edit-update:hover:not(:disabled){
  border-color:#1d4ed8;
  background:#1d4ed8;
}

.pse-editor-text-edit-update:disabled{
  opacity:.42;
  cursor:default;
}

.pse-editor-title-empty{
  color:#94a3b8;
  font-style:italic;
  font-weight:750;
}

.pse-editor-header-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:6px;
}

.pse-editor-header-button,
.pse-editor-close{
  margin:0;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#ffffff;
  color:#475569;
  font-size:11px;
  font-weight:850;
}

.pse-editor-header-button{
  min-height:31px;
  padding:6px 9px;
}

.pse-editor-header-button:hover:not(:disabled){
  border-color:#94a3b8;
  background:#f1f5f9;
  color:#0f172a;
}

.pse-editor-header-button:disabled{
  opacity:.42;
  cursor:default;
}

.pse-editor-delete{
  border-color:#fca5a5;
  background:#fff1f2;
  color:#dc2626;
}

.pse-editor-delete:hover:not(:disabled){
  border-color:#ef4444;
  background:#fee2e2;
  color:#b91c1c;
}

.pse-editor-close{
  width:32px;
  height:32px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border-color:transparent;
  font-size:18px;
}

.pse-editor-close:hover{
  border-color:#cbd5e1;
  background:#e2e8f0;
  color:#0f172a;
}

.pse-editor-body{
  min-height:0;
  max-height:min(72vh,calc(100vh - 150px));
  overflow:auto;
  padding:15px;
  background:#ffffff;
  scrollbar-gutter:stable;
}

.pse-editor-loading,
.pse-editor-empty,
.pse-editor-error,
.pse-editor-no-values{
  min-width:260px;
  padding:20px 14px;
  border:1px dashed #cbd5e1;
  border-radius:10px;
  background:#f8fafc;
  color:#64748b;
  font-size:13px;
  line-height:1.5;
  text-align:center;
}

.pse-editor-error{
  border-color:#fecaca;
  background:#fef2f2;
  color:#991b1b;
}

.pse-editor-no-values-title{
  color:#334155;
  font-size:13px;
  font-weight:900;
}

.pse-editor-no-values-text{
  margin-top:8px;
  color:#64748b;
  font-size:11px;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}

.pse-editor-structure-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0 0 10px;
  color:#64748b;
  font-size:10px;
  font-weight:850;
}

.pse-editor-intersection-legend{
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:5px;
}

.pse-editor-intersection-legend-item{
  max-width:150px;
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 6px;
  border:1px solid #dbeafe;
  border-radius:999px;
  background:#eff6ff;
  color:#475569;
  font-size:9px;
  font-weight:800;
  overflow:hidden;
}

.pse-editor-intersection-legend-item b{
  flex:0 0 auto;
  color:#1d4ed8;
  font-size:11px;
}

.pse-editor-intersection-legend-item span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pse-editor-structure-hint{
  color:#94a3b8;
  font-size:9px;
  font-weight:800;
  text-align:right;
}


.pse-editor-value-group-list{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:10px;
  width:fit-content;
  max-width:100%;
}

.pse-editor-value-group{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  max-width:100%;
  margin:0;
  padding:9px 11px;
  border:1px solid #93c5fd;
  border-radius:9px;
  background:#eff6ff;
  color:#0f172a;
  font:inherit;
  text-align:left;
  cursor:pointer;
}

.pse-editor-value-group:hover{
  border-color:#2563eb;
  box-shadow:0 0 0 2px rgba(37,99,235,.10);
}

.pse-editor-value-group-text{
  min-width:0;
  font-size:13px;
  font-weight:900;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.pse-editor-value-group-meta{
  flex:0 0 auto;
  padding:2px 7px;
  border-radius:999px;
  background:#dbeafe;
  color:#1d4ed8;
  font-size:9px;
  font-weight:900;
}

.pse-editor-graph,
.pse-editor-directory-forest{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  align-content:flex-start;
  gap:11px;
  width:fit-content;
  max-width:100%;
  min-width:0;
}

/* Root branches are content-sized too. A single short root must not stretch
   across the whole Editor merely because it is the only item. */
.pse-editor-graph > .pse-editor-node,
.pse-editor-directory-forest > .pse-editor-node{
  flex:0 1 auto;
  width:fit-content;
  max-width:100%;
}

.pse-editor-node{
  min-width:0;
  padding:8px;
  border:1px solid #cbd5e1;
  border-radius:11px;
  background:#ffffff;
  box-shadow:0 1px 2px rgba(15,23,42,.025);
}

.pse-editor-node[data-depth="0"]{
  padding:9px;
  border-color:#93c5fd;
  background:#f8fbff;
  box-shadow:0 0 0 1px rgba(59,130,246,.04),0 2px 7px rgba(15,23,42,.035);
}

.pse-editor-node.has-children[data-depth="0"]{
  width:fit-content;
  max-width:100%;
}

.pse-editor-node.has-children[data-depth="0"] > .pse-editor-match{
  width:max-content;
  max-width:100%;
}

.pse-editor-node[data-depth="1"]{
  border-color:#bfdbfe;
  background:#ffffff;
}

.pse-editor-node[data-depth="2"]{
  border-color:#dbeafe;
  background:#fbfdff;
}

/* Leaf Values do not reserve the same large card footprint as branches.
   They grow only to their own text/badge size; nested branches expand normally. */
.pse-editor-node.is-leaf{
  justify-self:start;
  width:max-content;
  max-width:100%;
  padding:4px;
}

.pse-editor-node.is-leaf[data-depth="0"]{
  padding:5px;
}

.pse-editor-node.is-leaf > .pse-editor-match{
  width:auto;
  max-width:100%;
  padding:7px 9px;
}

.pse-editor-match{
  width:100%;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  margin:0;
  padding:8px 9px;
  border:1px solid #d7e0ea;
  border-radius:8px;
  background:#ffffff;
  color:#0f172a;
  font-size:13px;
  font-weight:850;
  line-height:1.25;
  text-align:left;
  overflow-wrap:anywhere;
}

.pse-editor-node[data-depth="0"] > .pse-editor-match{
  border-color:#93c5fd;
  background:#eff6ff;
}

.pse-editor-match:hover{
  border-color:#3b82f6;
  background:#eff6ff;
  color:#1d4ed8;
  box-shadow:0 0 0 2px rgba(59,130,246,.08);
}

.pse-editor-match-static{
  cursor:default;
}

.pse-editor-match-static:hover{
  border-color:#d7e0ea;
  background:#ffffff;
  color:#0f172a;
  box-shadow:none;
}

.pse-editor-match-main{
  min-width:0;
  display:flex;
  align-items:center;
  gap:6px;
}

.pse-editor-match-text{
  min-width:0;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
}

.pse-editor-detected-text{
  color:#2563eb;
  font-weight:950;
}

.pse-editor-match-text{
  color:#0f172a;
}

.pse-editor-match:hover .pse-editor-match-text{
  color:#0f172a;
}

.pse-editor-match:hover .pse-editor-detected-text{
  color:#1d4ed8;
}

.pse-editor-match-directory{
  flex:0 0 auto;
  max-width:155px;
  padding:2px 6px;
  border-radius:999px;
  background:#e2e8f0;
  color:#475569;
  font-size:9px;
  font-weight:900;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pse-editor-intersection-badges{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:2px;
}

.pse-editor-intersection-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:18px;
  height:18px;
  border:1px solid #bfdbfe;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:950;
  line-height:1;
}

/* Containment is visualized as box-inside-box. No tree elbow / left guide.
   Nested branches size to their actual content instead of stretching across
   the full Editor width. Long text can still grow up to the available width. */
.pse-editor-children{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  align-content:flex-start;
  gap:8px;
  width:max-content;
  max-width:100%;
  box-sizing:border-box;
  margin:8px 0 0;
  padding:8px;
  border:1px solid #e2e8f0;
  border-radius:9px;
  background:rgba(248,250,252,.88);
}

.pse-editor-children > .pse-editor-node{
  flex:0 1 auto;
  width:fit-content;
  max-width:100%;
  background:#ffffff;
}

.pse-editor-node.has-children:not([data-depth="0"]){
  width:fit-content;
  max-width:100%;
}

.pse-editor-node.has-children:not([data-depth="0"]) > .pse-editor-match{
  width:max-content;
  max-width:100%;
}

.pse-editor-directory-view{
  min-width:0;
}

.pse-editor-directory-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 12px;
}

.pse-editor-back{
  flex:0 0 auto;
  margin:0;
  padding:6px 9px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#f8fafc;
  color:#334155;
  font-size:11px;
  font-weight:850;
}

.pse-editor-back:hover{
  background:#e2e8f0;
}

.pse-editor-directory-heading{
  min-width:0;
}

.pse-editor-directory-name{
  margin:0;
  color:#0f172a;
  font-size:15px;
  font-weight:900;
  overflow-wrap:anywhere;
}

.pse-editor-directory-context{
  margin:3px 0 0;
  color:#64748b;
  font-size:10px;
  line-height:1.35;
}

.pse-editor-directory-values{
  min-width:0;
}

.pse-editor-directory-values .pse-directory-value-list{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  gap:7px;
}

.pse-editor-value-option{
  position:relative;
  min-width:0;
  max-width:100%;
  display:inline-flex;
  align-items:center;
  gap:7px;
  margin:0;
  padding:8px 10px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#ffffff;
  color:#0f172a;
  font-size:12px;
  font-weight:850;
  line-height:1.25;
  text-align:left;
  overflow-wrap:anywhere;
}

.pse-editor-value-option:hover{
  border-color:#60a5fa;
  background:#eff6ff;
  color:#1d4ed8;
}

.pse-editor-value-option.is-current{
  border-color:#2563eb;
  box-shadow:0 0 0 2px rgba(37,99,235,.13);
}

.pse-editor-color-swatch{
  flex:0 0 16px;
  width:16px;
  height:16px;
  border:1px solid rgba(15,23,42,.22);
  border-radius:4px;
  background:var(--pse-editor-swatch,#ffffff);
}

.pse-editor-value-option.has-image{
  width:112px;
  min-width:112px;
  padding:8px;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:7px;
}

.pse-editor-value-option.has-image .pse-editor-value-caption{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
}

.pse-editor-value-option.has-image .pse-editor-value-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:center;
}

.pse-editor-value-image{
  width:94px;
  height:94px;
  flex:0 0 94px;
  align-self:center;
  object-fit:cover;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#f8fafc;
}

.pse-editor-hint-engine{
  margin-top:12px;
  padding:10px;
  border:1px solid #cbd5e1;
  border-radius:11px;
  background:#f8fafc;
}

.pse-editor-hint-engine-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 8px;
  color:#334155;
  font-size:10px;
  font-weight:950;
}

.pse-editor-hint-engine-head span:first-child{
  color:#0f172a;
  letter-spacing:.02em;
}

.pse-editor-hint-engine-head span:last-child{
  color:#94a3b8;
  font-size:9px;
  font-weight:800;
}

.pse-editor-hint-engine-rules{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.pse-editor-hint-engine .pse-editor-color-completion-hints,
.pse-editor-hint-engine .pse-editor-joined-hints{
  margin-top:0;
}

.pse-editor-color-completion-hints{
  margin-top:10px;
  padding:10px;
  border:1px solid #bfdbfe;
  border-radius:10px;
  background:#f0f7ff;
}

.pse-editor-color-completion-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:0 0 7px;
  color:#1e3a8a;
  font-size:10px;
  font-weight:950;
}

.pse-editor-color-completion-head b,
.pse-editor-joined-hints-head b{
  padding:1px 5px;
  border-radius:999px;
  background:rgba(255,255,255,.72);
  font-size:8px;
  font-weight:950;
}

.pse-editor-color-completion-list{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.pse-editor-color-completion-hint{
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
  margin:0;
  padding:7px 9px;
  border:1px solid #93c5fd;
  border-radius:8px;
  background:#ffffff;
  color:#334155;
  font-size:10px;
  font-weight:750;
  line-height:1.35;
  text-align:left;
}

.pse-editor-color-completion-hint:hover{
  border-color:#2563eb;
  background:#eff6ff;
  box-shadow:0 0 0 2px rgba(37,99,235,.08);
}

.pse-editor-color-completion-hint strong,
.pse-editor-color-completion-hint b{
  color:#1d4ed8;
  font-weight:950;
}

.pse-editor-color-completion-action{
  padding:2px 6px;
  border-radius:999px;
  background:#dbeafe;
  color:#1d4ed8;
  font-size:9px;
  font-weight:900;
}

.pse-editor-joined-hints{
  margin-top:12px;
  padding:10px 11px;
  border:1px solid #fbbf24;
  border-radius:9px;
  background:#fffbeb;
  color:#78350f;
}

.pse-editor-joined-hints-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
  font-size:10px;
  font-weight:900;
}

.pse-editor-joined-hints-head span:last-child{
  color:#a16207;
  font-size:9px;
  font-weight:800;
}

.pse-editor-joined-hint-list{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.pse-editor-joined-hint{
  display:inline-flex;
  align-items:center;
  gap:5px;
  max-width:100%;
  padding:5px 7px;
  border:1px solid #fde68a;
  border-radius:7px;
  background:#ffffff;
  color:#475569;
  font-size:10px;
  font-weight:800;
}

.pse-editor-joined-token{
  max-width:220px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#92400e;
  font-weight:900;
}

.pse-editor-joined-arrow{
  color:#a16207;
  font-size:9px;
  font-weight:750;
}

.pse-editor-joined-hint strong{
  color:#b45309;
  font-weight:950;
}

.pse-editor-joined-directory{
  padding:2px 5px;
  border-radius:999px;
  background:#fef3c7;
  color:#92400e;
  font-size:9px;
  font-weight:900;
}

.pse-editor-joined-hint-note{
  margin-top:7px;
  color:#92400e;
  font-size:9px;
  font-weight:750;
  line-height:1.4;
}

.pse-editor-delete-confirm-overlay{
  position:absolute;
  inset:0;
  z-index:9;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(2px);
}

.pse-editor-delete-confirm-overlay[hidden]{
  display:none;
}

.pse-editor-delete-confirm{
  width:min(430px,calc(100% - 24px));
  padding:16px;
  border:1px solid #fca5a5;
  border-radius:12px;
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 22px 60px rgba(15,23,42,.28);
}

.pse-editor-delete-confirm-kicker{
  margin-bottom:4px;
  color:#dc2626;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.pse-editor-delete-confirm-title{
  margin:0 0 9px;
  font-size:15px;
  font-weight:900;
}

.pse-editor-delete-confirm-message{
  margin:0;
  color:#475569;
  font-size:12px;
  font-weight:700;
  line-height:1.5;
  overflow-wrap:anywhere;
}

.pse-editor-delete-confirm-actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
  margin-top:15px;
}

.pse-editor-delete-confirm-cancel,
.pse-editor-delete-confirm-ok{
  min-width:78px;
  margin:0;
  padding:8px 12px;
  border-radius:7px;
  font-size:11px;
  font-weight:900;
}

.pse-editor-delete-confirm-cancel{
  border:1px solid #cbd5e1;
  background:#ffffff;
  color:#475569;
}

.pse-editor-delete-confirm-ok{
  border:1px solid #dc2626;
  background:#dc2626;
  color:#ffffff;
}

.pse-editor-delete-confirm-ok:hover:not(:disabled){
  background:#b91c1c;
  border-color:#b91c1c;
}

.pse-editor-delete-confirm-ok:disabled{
  opacity:.55;
}

.pse-value-candidate-overlay{
  position:fixed;
  inset:0;
  z-index:2800;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.58);
  backdrop-filter:blur(2px);
}

.pse-value-candidate-overlay[hidden]{
  display:none !important;
}

.pse-value-candidate-dialog{
  width:min(460px,calc(100vw - 32px));
  max-height:min(72vh,680px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 28px 80px rgba(15,23,42,.34);
}

.pse-value-candidate-header{
  padding:16px 18px 12px;
  border-bottom:1px solid #e2e8f0;
}

.pse-value-candidate-header h3{
  margin:0;
  font-size:17px;
  font-weight:950;
}

.pse-value-candidate-help{
  margin:0;
  padding:12px 18px 0;
  color:#64748b;
  font-size:11px;
  font-weight:700;
  line-height:1.45;
}

.pse-value-candidate-list{
  display:flex;
  flex-direction:column;
  gap:9px;
  min-height:0;
  padding:12px 18px 16px;
  overflow:auto;
}

.pse-value-candidate-option{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  margin:0;
  padding:11px 12px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  background:#ffffff;
  color:#0f172a;
  font:inherit;
  text-align:left;
  cursor:pointer;
}

.pse-value-candidate-option:hover{
  border-color:#60a5fa;
  background:#f8fbff;
}

.pse-value-candidate-option.is-selected{
  border-color:#2563eb;
  background:#eff6ff;
  box-shadow:0 0 0 2px rgba(37,99,235,.10);
}

.pse-value-candidate-option strong{
  font-size:13px;
  font-weight:950;
}

.pse-value-candidate-option span{
  color:#64748b;
  font-size:10px;
  font-weight:800;
}

.pse-value-candidate-actions{
  display:flex;
  justify-content:flex-end;
  gap:9px;
  padding:12px 18px 16px;
  border-top:1px solid #e2e8f0;
  background:#f8fafc;
}

.pse-value-candidate-actions button{
  min-width:88px;
  margin:0;
  padding:8px 14px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#ffffff;
  color:#334155;
  font-size:11px;
  font-weight:900;
}

.pse-value-candidate-select:not(:disabled){
  border-color:#2563eb;
  background:#2563eb;
  color:#ffffff;
}

.pse-value-candidate-select:disabled{
  opacity:.45;
  cursor:not-allowed;
}

.pse-editor-footer{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 12px 9px 14px;
  border-top:1px solid #cbd5e1;
  background:#f8fafc;
}

.pse-editor-status{
  min-width:0;
  color:#64748b;
  font-size:10px;
  font-weight:850;
  line-height:1.35;
}

.pse-editor-status[data-changed="true"]{
  color:#64748b;
}

.pse-editor-status-label{
  color:#475569;
  font-weight:900;
}

.pse-editor-previous-text{
  color:#0f172a;
  font-weight:800;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.pse-editor-footer-actions{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:7px;
}

.pse-editor-cancel,
.pse-editor-apply{
  min-width:78px;
  margin:0;
  padding:8px 13px;
  border-radius:7px;
  font-size:12px;
  font-weight:900;
}

.pse-editor-cancel{
  border:1px solid #cbd5e1;
  background:#ffffff;
  color:#475569;
}

.pse-editor-cancel:hover{
  background:#f1f5f9;
  color:#0f172a;
}

.pse-editor-apply{
  border:1px solid #2563eb;
  background:#2563eb;
  color:#ffffff;
}

.pse-editor-apply:hover:not(:disabled){
  background:#1d4ed8;
}

.pse-editor-apply[hidden]{
  display:none !important;
}

.pse-editor-apply:disabled{
  background:#cbd5e1 !important;
  border-color:#cbd5e1 !important;
  color:#f8fafc !important;
}

@media(max-width:680px){
  .pse-editor-overlay{padding:8px}
  .pse-editor-window{
    width:calc(100vw - 16px);
    min-width:0;
    max-width:calc(100vw - 16px);
    max-height:calc(100vh - 16px);
  }
  .pse-editor-header{
    align-items:flex-start;
    gap:8px;
  }
  .pse-editor-header-actions{
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  .pse-editor-body{max-height:calc(100vh - 134px)}
  .pse-editor-children{width:100%;padding:7px}
  .pse-editor-structure-head{flex-direction:column}
  .pse-editor-intersection-legend{justify-content:flex-start}
}

@media (max-width:720px){
  .pse-editor-text-edit-overlay{padding:10px}
  .pse-editor-text-edit-dialog{width:calc(100vw - 20px);max-height:calc(100vh - 20px);padding:14px}
  .pse-editor-text-edit-footer{align-items:flex-end;flex-direction:column}
}
