.stage-position{margin-inline-start:7px;font-size:.88em;font-weight:400;color:#62745c}
.timeline-scroll{overflow-x:auto;padding:6px 0 11px}
.timeline-steps{
  display:grid;
  grid-template-columns:repeat(var(--stage-count),minmax(0,1fr));
  min-width:calc(var(--stage-count) * 94px);
  gap:0;
}
.timeline-steps:before{left:calc(50% / var(--stage-count));right:calc(50% / var(--stage-count))}
.timeline-step{min-width:0;padding-inline:6px}
.timeline-step>span:last-child{display:block;width:100%;text-align:center;overflow-wrap:anywhere}
.timeline-step:focus-visible,.stage-row-actions button:focus-visible,.stage-editor-row input:focus-visible{
  outline:2px solid #6d9255;outline-offset:2px;
}
.board-wrap.status-board{grid-template-columns:repeat(3,minmax(215px,1fr))}
.board-project-name{display:block;padding:0;text-align:left}
.board-stage-action{margin-top:8px;font-size:12px}
.stage-picker-summary{margin:0 0 16px}
.stage-option .step-circle{display:grid;place-items:center;margin-top:0}

.modal-backdrop:has(.project-stage-modal){justify-content:flex-end;padding:0}
.modal.project-stage-modal{
  width:min(510px,100%);
  height:100dvh;
  max-height:100dvh;
  border:0;
  border-radius:16px 0 0 16px;
}
.project-stage-form{display:flex;flex:1;min-height:0;flex-direction:column}
.project-stage-form>.modal-body{flex:1}
.project-stage-form .modal-footer{background:#fff}
.project-stage-form [hidden]{display:none}
.stage-editor-project{margin:0 0 16px;font-size:13px;color:#596d50}
.stage-editor-preview{
  margin-bottom:18px;
  padding:8px 9px 5px;
  border:1px solid #e1e9db;
  border-radius:10px;
  background:#f7faf3;
}
.stage-editor-preview .timeline-steps{min-width:calc(var(--stage-count) * 74px)}
.stage-editor-preview .timeline-step{font-size:11px}
.stage-editor-list{display:grid;gap:8px;margin:0 0 12px;padding:0;list-style:none}
.stage-editor-row{
  display:grid;
  grid-template-columns:22px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:6px 8px;
  border:1px solid #e4eadf;
  border-radius:8px;
}
.stage-editor-row.stage-drop-target{outline:2px solid #769655;background:#edf4e6}
.stage-drag-handle{cursor:grab;color:#637654;font-size:19px;line-height:1;text-align:center}
.stage-drag-handle:active{cursor:grabbing}
.stage-editor-row input,.stage-merge-row select{
  width:100%;
  min-width:0;
  min-height:37px;
  padding:7px 9px;
  border:1px solid #dce5d5;
  border-radius:6px;
  background:#fff;
  color:#384e30;
  font:inherit;
}
.stage-row-actions{display:flex;gap:1px}
.stage-row-actions .icon-btn{font-size:16px}
.stage-row-actions .icon-btn:disabled{opacity:.35;pointer-events:none}
.stage-remove:hover:not(:disabled){color:#a1423a;background:#faece8}
.stage-editor-merges{margin-top:18px;padding:14px;border:1px solid #eadfca;border-radius:8px;background:#fcfaf4}
.stage-editor-merges h3{margin:0 0 6px;font-size:14px}
.stage-editor-merges p{margin:0 0 12px;font-size:13px;color:#786948}
.stage-merge-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 8px;margin-top:10px}
.stage-merge-row label{grid-column:1 / -1;overflow-wrap:anywhere}
.stage-merge-row button{white-space:nowrap}
@media(max-width:540px){
  .modal.project-stage-modal{border-radius:0}
  .stage-editor-row{gap:4px;padding-inline:5px}
  .stage-row-actions .icon-btn{width:30px;height:32px}
  .stage-position{display:block;margin-inline-start:0}
}
