/* ==========================================================
   PSE Preset — Category-side launcher + empty shell v0.1
   UI only. No Preset data/reference engine is connected yet.
   ========================================================== */

.pse-category-heading-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 12px;
}

.pse-category-heading-row h2{
  min-width:0;
  margin:0;
}

.pse-category-heading-actions{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:7px;
}


.pse-category-remove-all{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  margin:0;
  padding:6px 10px;
  border:1px solid #dc2626;
  border-radius:6px;
  background:#dc2626;
  color:#ffffff;
  font-size:12px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}

.pse-category-remove-all:hover:not(:disabled){
  border-color:#b91c1c;
  background:#b91c1c;
}

.pse-category-remove-all:disabled{
  border-color:#d1d5db;
  background:#e5e7eb;
  color:#9ca3af;
  cursor:default;
  opacity:.86;
}

.pse-preset-open{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  margin:0;
  padding:6px 10px;
  border:1px solid #cbd5e1;
  border-radius:6px;
  background:#f8fafc;
  color:#334155;
  font-size:12px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
}

.pse-preset-open:hover{
  background:#e2e8f0;
  color:#0f172a;
}

body.pse-preset-dialog-open{
  overflow:hidden;
}

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

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

/* Keep Directory Manager / Preset Mode visually modal as well.
   The Directory engine stylesheet is external, so this host-level rule
   guarantees a consistent DIM layer when it opens above the workspace. */
#pseDirectoryOverlay.pse-directory-overlay{
  background:rgba(15,23,42,.70) !important;
  backdrop-filter:blur(3px) !important;
}

.pse-preset-window{
  width:min(1320px, calc(100vw - 64px));
  height:min(864px, calc(100vh - 64px));
  min-width:min(720px, calc(100vw - 32px));
  min-height:480px;
  display:grid;
  grid-template-rows:auto 1fr;
  overflow:hidden;
  border:1px solid #94a3b8;
  border-radius:12px;
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
}

.pse-preset-titlebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:46px;
  padding:9px 12px 9px 15px;
  border-bottom:1px solid #cbd5e1;
  background:#f8fafc;
}

.pse-preset-title-wrap{
  display:flex;
  align-items:baseline;
  gap:8px;
  min-width:0;
}

.pse-preset-title{
  margin:0;
  color:#0f172a;
  font-size:13px;
  font-weight:800;
  letter-spacing:.01em;
}

.pse-preset-category{
  min-width:0;
  overflow:hidden;
  color:#64748b;
  font-size:11px;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.pse-preset-close{
  width:34px;
  height:30px;
  margin:0;
  padding:0;
  border-radius:6px;
  background:transparent;
  color:#475569;
  font-size:18px;
}

.pse-preset-close:hover{
  background:#fee2e2;
  color:#b91c1c;
}

.pse-preset-body{
  min-height:0;
  background:#ffffff;
}

.pse-preset-body{
  position:relative;
  overflow:hidden;
}

.pse-preset-scroll{
  width:100%;
  height:100%;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-gutter:stable;
  background:#ffffff;
}

.pse-preset-list{
  min-width:0;
}
.pse-preset-paste-feedback{
  position:absolute;
  left:50%;
  bottom:14px;
  z-index:9;
  transform:translateX(-50%);
  max-width:min(620px,calc(100% - 40px));
  padding:8px 12px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#ffffff;
  color:#475569;
  box-shadow:0 8px 24px rgba(15,23,42,.14);
  font-size:11px;
  font-weight:800;
  line-height:1.35;
  text-align:center;
}
.pse-preset-paste-feedback[hidden]{display:none}
.pse-preset-paste-feedback[data-kind="error"]{
  border-color:#fecaca;
  background:#fff7f7;
  color:#b91c1c;
}
.pse-preset-paste-feedback[data-kind="success"]{
  border-color:#bbf7d0;
  background:#f0fdf4;
  color:#166534;
}

.pse-preset-row{
  display:grid;
  grid-template-columns:54px minmax(0,1fr) 132px;
  width:100%;
  min-height:64px;
  border-bottom:1px solid #e2e8f0;
  background:#ffffff;
  transition:background .12s ease, box-shadow .12s ease;
}

.pse-preset-row:hover{
  background:#fbfdff;
}


.pse-preset-controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:64px;
  padding:8px 6px;
  border-left:1px solid #eef2f7;
}

.pse-preset-control{
  width:27px;
  height:27px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:0;
  border:1px solid transparent;
  border-radius:6px;
  background:transparent;
  color:#64748b;
  font-size:14px;
  font-weight:800;
  line-height:1;
}

.pse-preset-control:hover{
  border-color:#cbd5e1;
  background:#f1f5f9;
  color:#0f172a;
}
.pse-preset-trash-control{
  color:#dc2626;
}
.pse-preset-trash-control:hover{
  border-color:#fecaca;
  background:#fff1f2;
  color:#b91c1c;
}
.pse-preset-paste-control{
  width:auto;
  min-width:54px;
  height:27px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:0 9px;
  border:1px solid #cbd5e1;
  border-radius:6px;
  background:#ffffff;
  color:#334155;
  font-size:10px;
  font-weight:900;
  line-height:1;
}
.pse-preset-paste-control:hover{
  border-color:#94a3b8;
  background:#f1f5f9;
  color:#0f172a;
}

.pse-preset-number{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:64px;
  padding:8px 5px;
  border-right:1px solid #eef2f7;
  color:#334155;
  font-size:13px;
  font-weight:900;
  text-align:center;
  user-select:none;
}

.pse-preset-directories{
  position:relative;
  display:flex;
  align-content:flex-start;
  align-items:flex-start;
  flex-wrap:wrap;
  gap:7px;
  min-width:0;
  min-height:64px;
  padding:14px 16px;
}

.pse-preset-directories.is-empty::before{
  content:"";
  position:absolute;
  inset:7px 9px;
  border:1px solid transparent;
  border-radius:7px;
  pointer-events:none;
  transition:border-color .12s ease, background .12s ease;
}

.pse-preset-row:hover .pse-preset-directories.is-empty::before{
  border-color:#e2e8f0;
  background:rgba(248,250,252,.6);
}

.pse-preset-directory-text{
  max-width:100%;
  padding:6px 9px;
  border:1px solid #dbe3ec;
  border-radius:6px;
  background:#f8fafc;
  color:#334155;
  font-size:12px;
  font-weight:700;
  line-height:1.25;
  overflow-wrap:anywhere;
}

/* ==========================================================
   Preset content presentation v0.1
   Preset is a user editing preset, independent of L1/L2/L3.
   ========================================================== */

/* A Preset is always shown as one continuous black wrapper,
   even when it contains only a single Directory or Value. */
.pse-preset-entry-group{
  display:inline-flex;
  flex:0 1 auto;
  flex-wrap:wrap;
  align-items:flex-start;
  align-content:flex-start;
  gap:0;
  width:max-content;
  max-width:100%;
  padding:5px;
  border:2px solid #111827;
  border-radius:11px;
  background:transparent;
}

/* Value uses the same base HTML TAG presentation. */
.pse-preset-value-tag{
  max-width:100%;
}

/* Directory is intentionally visually different from a Value. */
.pse-preset-directory-chip{
  display:inline-flex;
  align-items:center;
  max-width:100%;
  margin:6px;
  padding:9px 12px;
  border:1px solid #9ca3af;
  border-radius:8px;
  background:transparent;
  color:#6b7280;
  font-size:19px;
  font-weight:600;
  line-height:normal;
  white-space:normal;
  overflow-wrap:break-word;
  word-break:keep-all;
  vertical-align:top;
  user-select:text;
}
.pse-preset-directory-chip.has-selected-value{
  border-color:#111827;
  color:#111827;
}


/* ==========================================================
   Preset Entry Reorder v0.1 — dedicated Drag Handle
   - Tag/Directory body click keeps the existing Editor behavior.
   - Only the small grip handle starts reordering.
   - Reorder is restricted to the same Preset row.
   ========================================================== */
.pse-preset-reorder-item{
  position:relative;
  display:inline-flex;
  align-items:center;
  max-width:100%;
  margin:3px;
  border-radius:9px;
  vertical-align:top;
  transition:opacity .12s ease, box-shadow .12s ease, transform .12s ease;
}
.pse-preset-reorder-item > .tag,
.pse-preset-reorder-item > .pse-preset-directory-chip{
  margin:0;
}
.pse-preset-drag-handle{
  flex:0 0 18px;
  width:18px;
  min-width:18px;
  height:30px;
  min-height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0 3px 0 0;
  padding:0;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#94a3b8;
  font-size:16px;
  font-weight:900;
  line-height:1;
  cursor:grab;
  user-select:none;
  touch-action:none;
}
.pse-preset-drag-handle:hover{
  background:#e2e8f0;
  color:#475569;
}
.pse-preset-drag-handle:active{
  cursor:grabbing;
}
.pse-preset-reorder-item.is-dragging{
  opacity:.42;
}
.pse-preset-reorder-item.is-drop-before{
  box-shadow:-3px 0 0 #2563eb;
}
.pse-preset-reorder-item.is-drop-after{
  box-shadow:3px 0 0 #2563eb;
}
.pse-preset-overlay.is-target-select-mode .pse-preset-drag-handle{
  display:none;
}

.pse-preset-add-slot{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:54px;
  border:1px solid transparent;
  border-left:0;
  border-right:0;
  background:#ffffff;
  transition:border-color .12s ease, background .12s ease;
}

.pse-preset-add-slot:hover{
  border-color:#dbe3ec;
  background:#f8fafc;
}

.pse-preset-add{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:0;
  border:1px solid transparent;
  border-radius:50%;
  background:transparent;
  color:#94a3b8;
  font-size:22px;
  font-weight:500;
  line-height:1;
}

.pse-preset-add-slot:hover .pse-preset-add{
  border-color:#cbd5e1;
  background:#ffffff;
  color:#334155;
}

.pse-preset-add[disabled]{
  opacity:.35;
  cursor:not-allowed;
}


.pse-preset-confirm-overlay{
  position:fixed;
  inset:0;
  z-index:2050;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(2px);
}
.pse-preset-confirm-overlay[hidden]{
  display:none;
}
.pse-preset-confirm-dialog{
  width:min(420px,calc(100vw - 48px));
  overflow:hidden;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 24px 70px rgba(15,23,42,.30);
}
.pse-preset-confirm-header{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 13px 10px 15px;
  border-bottom:1px solid #e2e8f0;
  background:#f8fafc;
}
.pse-preset-confirm-title{
  margin:0;
  color:#0f172a;
  font-size:14px;
  font-weight:900;
}
.pse-preset-confirm-close{
  width:30px;
  height:30px;
  margin:0;
  padding:0;
  border-radius:6px;
  background:transparent;
  color:#64748b;
  font-size:18px;
}
.pse-preset-confirm-close:hover{
  background:#e2e8f0;
  color:#0f172a;
}
.pse-preset-confirm-body{
  padding:19px 16px 16px;
}
.pse-preset-confirm-message{
  margin:0;
  color:#0f172a;
  font-size:14px;
  font-weight:800;
  line-height:1.5;
}
.pse-preset-confirm-subtext{
  margin:8px 0 0;
  color:#64748b;
  font-size:12px;
  line-height:1.45;
}
.pse-preset-confirm-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:11px 14px;
  border-top:1px solid #e2e8f0;
  background:#f8fafc;
}
.pse-preset-confirm-actions button{
  min-width:82px;
  margin:0;
  padding:9px 12px;
  border-radius:7px;
}
.pse-preset-confirm-no{
  background:#e2e8f0;
  color:#334155;
}
.pse-preset-confirm-no:hover{
  background:#cbd5e1;
}
.pse-preset-confirm-yes{
  background:#dc2626;
  color:#ffffff;
}
.pse-preset-confirm-yes:hover{
  background:#b91c1c;
}

@media(max-width:800px){
  .pse-preset-window{
    width:calc(100vw - 32px);
    min-width:0;
    height:calc(100vh - 32px);
    min-height:0;
  }
}

/* ==========================================================
   Preset Target Flow v0.1
   Manual Directory Manager mode:
   selection -> Category -> base Preset 1~5.
   ========================================================== */

.pse-preset-category-picker{
  position:fixed;
  inset:0;
  z-index:1900;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(2px);
}

.pse-preset-category-picker[hidden]{
  display:none;
}

.pse-preset-category-dialog{
  width:min(640px, calc(100vw - 56px));
  overflow:hidden;
  border:1px solid #94a3b8;
  border-radius:12px;
  background:#fff;
  box-shadow:0 24px 70px rgba(15,23,42,.30);
}

.pse-preset-category-header{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:9px 12px 9px 15px;
  border-bottom:1px solid #cbd5e1;
  background:#f8fafc;
}

.pse-preset-category-header h3{
  margin:0;
  color:#0f172a;
  font-size:13px;
  font-weight:900;
}

.pse-preset-category-close{
  width:34px;
  height:30px;
  margin:0;
  padding:0;
  border-radius:6px;
  background:transparent;
  color:#475569;
  font-size:18px;
}

.pse-preset-category-close:hover{
  background:#fee2e2;
  color:#b91c1c;
}

.pse-preset-category-body{
  padding:18px;
}

.pse-preset-category-help{
  margin:0 0 13px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

.pse-preset-category-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}

.pse-preset-category-option{
  min-height:54px;
  margin:0;
  padding:10px 12px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font-size:13px;
  font-weight:900;
}

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

/* Reuse the real Category Preset window as a target chooser. */
.pse-preset-overlay.is-target-select-mode{
  z-index:1850;
  background:rgba(15,23,42,.66);
}

.pse-preset-overlay.is-target-select-mode .pse-preset-window{
  border:2px solid #2563eb;
  box-shadow:
    0 0 0 4px rgba(59,130,246,.10),
    0 26px 76px rgba(15,23,42,.32);
}

.pse-preset-overlay.is-target-select-mode .pse-preset-titlebar{
  border-bottom-color:#93c5fd;
  background:#eff6ff;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-title,
.pse-preset-overlay.is-target-select-mode .pse-preset-category{
  color:#1d4ed8;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-row{
  grid-template-columns:54px minmax(0,1fr);
  cursor:pointer;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-row:hover{
  background:#eff6ff;
  box-shadow:inset 3px 0 0 #2563eb;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-row::after{
  content:"Select";
  align-self:center;
  justify-self:end;
  margin-right:18px;
  padding:5px 9px;
  border:1px solid #bfdbfe;
  border-radius:6px;
  background:#fff;
  color:#2563eb;
  font-size:11px;
  font-weight:900;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-controls{
  display:none;
}

.pse-preset-overlay.is-target-select-mode #psePresetAddSlot{
  display:none !important;
}

.pse-preset-target-banner{
  display:none;
  padding:9px 14px;
  border-bottom:1px solid #bfdbfe;
  background:#f8fbff;
  color:#1e40af;
  font-size:11px;
  font-weight:800;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-target-banner{
  display:block;
}

@media(max-width:700px){
  .pse-preset-category-grid{
    grid-template-columns:1fr 1fr;
  }
}


/* ==========================================================
   Preset multi-target selection v0.2
   Structure only — no Preset data mutation on Apply.
   ========================================================== */

.pse-preset-overlay.is-target-select-mode{
  flex-direction:column;
  gap:10px;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-window{
  height:min(804px, calc(100vh - 138px));
}

.pse-preset-overlay.is-target-select-mode .pse-preset-row{
  grid-template-columns:44px 54px minmax(0,1fr);
  cursor:pointer;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-row::after{
  content:none;
}

.pse-preset-target-check-cell{
  display:none;
  align-items:center;
  justify-content:center;
  min-height:64px;
  border-right:1px solid #eef2f7;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-target-check-cell{
  display:flex;
}

.pse-preset-target-checkbox{
  width:18px;
  height:18px;
  margin:0;
  accent-color:#2563eb;
  pointer-events:none;
}

.pse-preset-overlay.is-target-select-mode .pse-preset-row.is-target-selected{
  background:#eff6ff;
  box-shadow:inset 3px 0 0 #2563eb;
}

.pse-preset-target-apply-dock{
  width:min(1320px, calc(100vw - 64px));
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:9px 12px 9px 15px;
  border:1px solid #60a5fa;
  border-radius:10px;
  background:#eff6ff;
  color:#1e3a8a;
  box-shadow:0 10px 28px rgba(15,23,42,.16);
}

.pse-preset-target-apply-dock[hidden]{
  display:none;
}

.pse-preset-target-selection-status{
  min-width:0;
  color:#1e40af;
  font-size:12px;
  font-weight:800;
}

.pse-preset-target-apply{
  flex:0 0 auto;
  min-width:120px;
  min-height:34px;
  margin:0;
  padding:8px 14px;
  border-radius:7px;
  background:#2563eb;
  color:#fff;
  font-size:12px;
  font-weight:900;
}

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

.pse-preset-target-apply:disabled{
  background:#cbd5e1;
  color:#f8fafc;
  cursor:not-allowed;
}

@media(max-width:800px){
  .pse-preset-target-apply-dock{
    width:calc(100vw - 32px);
  }
}



/* ==========================================================
   PSE Project Preset System v1.1
   Project content is Preset-only. Local/My Directories stay global.
   ========================================================== */
body > .psm-persistent-rail.pse-project-rail{
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  padding:10px 8px !important;
  pointer-events:auto !important;
  overflow:hidden !important;
  background:#f8fafc !important;
  color:#0f172a !important;
  border-right:1px solid #cbd5e1 !important;
}
.pse-project-rail-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:32px;
  padding:0 2px;
}
.pse-project-rail-title{
  min-width:0;
  color:#0f172a;
  font-size:13px;
  font-weight:900;
  letter-spacing:.01em;
}
.pse-project-new-button{
  flex:0 0 28px;
  width:28px;
  height:28px;
  min-width:28px;
  min-height:28px;
  margin:0;
  padding:0;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#ffffff;
  color:#334155;
  font-size:19px;
  line-height:1;
}
.pse-project-new-button:hover{
  background:#e2e8f0;
  color:#0f172a;
}
.pse-project-current-label{
  padding:0 4px;
  color:#64748b;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.pse-project-rail-separator{
  width:calc(100% - 8px);
  height:1px;
  margin:2px 4px 1px;
  background:#dbe3ec;
}
.pse-project-list{
  min-height:0;
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  gap:3px;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:2px;
  scrollbar-width:thin;
}
.pse-project-item{
  width:100%;
  min-height:34px;
  display:flex;
  align-items:center;
  gap:7px;
  margin:0;
  padding:7px 8px;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:#334155;
  font-size:12px;
  font-weight:700;
  text-align:left;
}
.pse-project-item:hover{
  background:#eef2f7;
  color:#0f172a;
}
.pse-project-item.is-active{
  border-color:#bfdbfe;
  background:#dbeafe;
  color:#1d4ed8;
}
.pse-project-item-icon{
  flex:0 0 auto;
  width:14px;
  color:#64748b;
  font-size:11px;
  text-align:center;
}
.pse-project-item-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.pse-project-list-row{
  width:100%;
  display:flex;
  align-items:center;
  gap:3px;
  min-width:0;
}
.pse-project-list-row .pse-project-item{
  flex:1 1 auto;
  min-width:0;
}
.pse-project-delete-button{
  flex:0 0 28px;
  width:28px;
  height:30px;
  min-width:28px;
  min-height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:0;
  border:1px solid transparent;
  border-radius:7px;
  background:transparent;
  color:#94a3b8;
  font-size:14px;
  line-height:1;
}
.pse-project-delete-button:hover{
  border-color:#fecaca;
  background:#fff1f2;
  color:#dc2626;
}
.pse-project-delete-button:disabled{
  border-color:transparent !important;
  background:transparent !important;
  color:#cbd5e1 !important;
}
.pse-project-delete-overlay{
  position:fixed;
  inset:0;
  z-index:2350;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(2px);
}
.pse-project-delete-overlay[hidden]{display:none}
.pse-project-delete-dialog{
  width:min(430px,calc(100vw - 48px));
  overflow:hidden;
  border:1px solid #fca5a5;
  border-radius:12px;
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 24px 70px rgba(15,23,42,.3);
}
.pse-project-delete-header{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 13px 10px 15px;
  border-bottom:1px solid #fecaca;
  background:#fff7f7;
}
.pse-project-delete-title{
  margin:0;
  color:#991b1b;
  font-size:14px;
  font-weight:900;
}
.pse-project-delete-close{
  width:30px;
  height:30px;
  margin:0;
  padding:0;
  border-radius:6px;
  background:transparent;
  color:#64748b;
  font-size:18px;
}
.pse-project-delete-close:hover{background:#fee2e2;color:#b91c1c}
.pse-project-delete-body{
  padding:17px 16px 14px;
}
.pse-project-delete-question{
  margin:0 0 9px;
  color:#0f172a;
  font-size:14px;
  font-weight:800;
}
.pse-project-delete-project-name{
  margin:0;
  padding:9px 10px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  font-weight:800;
  overflow-wrap:anywhere;
}
.pse-project-delete-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:11px 14px;
  border-top:1px solid #fee2e2;
  background:#fffafa;
}
.pse-project-delete-actions button{
  min-width:84px;
  margin:0;
  padding:9px 12px;
  border-radius:7px;
}
.pse-project-delete-cancel{background:#e2e8f0;color:#334155}
.pse-project-delete-confirm{background:#dc2626;color:#ffffff}
.pse-project-delete-confirm:hover{background:#b91c1c}
.pse-project-save-temporary{
  width:100%;
  min-height:32px;
  margin:0;
  padding:7px 8px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#ffffff;
  color:#334155;
  font-size:11px;
  font-weight:800;
}
.pse-project-save-temporary:hover{
  background:#e2e8f0;
}
.pse-project-save-temporary[hidden]{display:none !important}
.pse-project-status{
  min-height:28px;
  padding:5px 4px 0;
  color:#64748b;
  font-size:10px;
  font-weight:700;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.pse-project-status[data-status="saving"]{color:#2563eb}
.pse-project-status[data-status="saved"]{display:none}
.pse-project-status[data-status="error"]{color:#dc2626}
.pse-project-name-overlay{
  position:fixed;
  inset:0;
  z-index:2300;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.62);
  backdrop-filter:blur(2px);
}
.pse-project-name-overlay[hidden]{display:none}
.pse-project-name-dialog{
  width:min(430px,calc(100vw - 48px));
  overflow:hidden;
  border:1px solid #94a3b8;
  border-radius:12px;
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 24px 70px rgba(15,23,42,.3);
}
.pse-project-name-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:46px;
  padding:10px 13px 10px 15px;
  border-bottom:1px solid #cbd5e1;
  background:#f8fafc;
}
.pse-project-name-title{
  margin:0;
  font-size:14px;
  font-weight:900;
}
.pse-project-name-close{
  width:30px;
  height:30px;
  margin:0;
  padding:0;
  border-radius:6px;
  background:transparent;
  color:#475569;
  font-size:18px;
}
.pse-project-name-close:hover{background:#fee2e2;color:#b91c1c}
.pse-project-name-body{padding:16px}
.pse-project-name-help{
  margin:0 0 10px;
  color:#64748b;
  font-size:12px;
  line-height:1.45;
}
.pse-project-name-input{
  width:100%;
  min-height:40px;
  padding:9px 11px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#ffffff;
  color:#0f172a;
  font-size:14px;
  outline:none;
}
.pse-project-name-input:focus{border-color:#3b82f6;box-shadow:0 0 0 2px rgba(59,130,246,.12)}
.pse-project-name-error{
  min-height:18px;
  margin-top:8px;
  color:#dc2626;
  font-size:11px;
  font-weight:700;
}
.pse-project-name-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding:11px 14px;
  border-top:1px solid #e2e8f0;
  background:#f8fafc;
}
.pse-project-name-actions button{margin:0;min-width:84px;padding:9px 12px;border-radius:7px}
.pse-project-name-cancel{background:#e2e8f0;color:#334155}
.pse-project-name-submit{background:#2563eb;color:#ffffff}

/* PSE_STAGE4_2_STANDARD_PLUS_LOCK_V1 */
/* PSE_STAGE4_2_PRESET_LOCK_UI_FIX_V1
   STANDARD must preserve the exact PLUS Preset row geometry.
   Locking changes interactivity only; it never creates another grid column. */
.pse-preset-row.is-plan-locked{
  background:#f8fafc;
}
.pse-preset-row.is-plan-locked .pse-preset-directories{
  opacity:1;
  pointer-events:none;
}
.pse-preset-row.is-plan-locked .pse-preset-number{
  position:relative;
  padding-bottom:21px;
}
.pse-preset-row.is-plan-locked .pse-preset-number::after{
  content:"🔒 PLUS";
  position:absolute;
  left:50%;
  bottom:6px;
  transform:translateX(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 4px;
  border:1px solid #d6dae1;
  border-radius:999px;
  background:#ffffff;
  color:#64748b;
  font-size:8px;
  font-weight:850;
  line-height:1.05;
  white-space:nowrap;
  pointer-events:none;
}
.pse-preset-row.is-plan-locked .pse-preset-controls button:disabled{
  opacity:.42;
  cursor:not-allowed;
  pointer-events:none;
}
.pse-project-plan-lock{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 5px;
  border:1px solid #d6dae1;
  border-radius:999px;
  background:#ffffff;
  color:#64748b;
  font-size:9px;
  font-weight:850;
  line-height:1.1;
  white-space:nowrap;
}
.pse-project-list-row.is-plan-locked{
  opacity:.82;
}
.pse-project-item.is-plan-locked{
  cursor:default;
}
.pse-project-status[data-status="locked"]{
  color:#7c3aed;
}
