.local-edit-actions { display:grid; gap:7px; padding:8px 0 12px; }
.local-edit-actions button,.safety-dialog button { border:1px solid #d9dce4; border-radius:8px; background:#fff; color:#303758; padding:9px 12px; cursor:pointer; }
.local-edit-actions button:disabled { opacity:.45; cursor:default; }
.local-edit-actions small,#selectionHint { color:#6b7280; font-size:11px; line-height:1.5; }
#selectionHint { flex-basis:100%; }
.selection-tools { flex-wrap:wrap; }
.refine-source-preview { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.refine-source-bounds { position:absolute; border:2px dashed #7257e8; pointer-events:none; box-sizing:border-box; }
.safety-dialog { max-width:min(800px,90vw); border:0; border-radius:16px; padding:24px; box-shadow:0 20px 80px #0005; color:#263146; }
.safety-dialog::backdrop { background:#10182d70; }
.safety-dialog h2 { margin:0 0 12px; font-size:20px; }
.safety-dialog p { font-size:13px; line-height:1.7; }
.draft-list { display:grid; gap:8px; max-height:48vh; overflow:auto; }
.draft-list button { text-align:left; }
.dialog-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:18px; }
.draft-dialog { width:min(560px,calc(100vw - 32px)); padding:0; overflow:hidden; background:#fff; }
.draft-dialog__header { display:flex; align-items:center; gap:14px; padding:24px 26px 20px; border-bottom:1px solid #eceef4; background:linear-gradient(145deg,#faf9ff 0%,#f4fbfa 100%); }
.draft-dialog__header h2 { margin:0; color:#1d2740; font-size:19px; letter-spacing:-.02em; }
.draft-dialog__icon { width:42px; height:42px; display:grid; flex:0 0 auto; place-items:center; border-radius:13px; color:#5f53d8; background:#ebe8ff; box-shadow:inset 0 0 0 1px #ddd8ff; }
.draft-dialog__icon svg { width:22px; }
.draft-dialog .draft-list { min-height:116px; max-height:42vh; margin:20px 26px 0; padding:6px; border:1px solid #e8eaf0; border-radius:12px; background:#f8f9fb; }
.draft-dialog .draft-list:not(:has(.draft-row)) { display:grid; place-items:center; color:#8991a0; font-size:13px; }
.draft-dialog .draft-row { padding:6px; border-radius:9px; background:#fff; box-shadow:0 1px 2px rgba(24,32,51,.06); }
.draft-dialog .draft-row > button:first-child { border-color:transparent; background:transparent; font-weight:600; }
.draft-dialog__actions { margin:0; padding:20px 26px 24px; }
.draft-dialog__actions button { min-height:40px; padding:9px 16px; font-weight:700; }
.draft-dialog__actions .primary-action { min-width:92px; border-color:#635bff; color:#fff; background:linear-gradient(135deg,#7264ee,#5d52d8); box-shadow:0 7px 18px rgba(99,91,255,.2); }
.draft-dialog__actions .primary-action:hover { filter:brightness(1.04); transform:translateY(-1px); }
#repairApplyBtn { color:white; background:#635bff; }
.repair-comparison { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.repair-comparison figure { margin:0; min-width:0; }
.repair-comparison img { width:100%; max-height:42vh; object-fit:contain; background:repeating-conic-gradient(#eee 0% 25%,white 0% 50%) 0/16px 16px; border:1px solid #ddd; }
.repair-comparison figcaption { margin-bottom:8px; font-size:13px; }
.analysis-progress-summary { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:22px 0 10px; font-size:13px; color:#5142c7; }
.analysis-progress-summary strong { font-weight:600; }
#analysisStepCount { white-space:nowrap; font-variant-numeric:tabular-nums; }
.analysis-info .progress-track { height:10px; overflow:hidden; border-radius:20px; background:#e9e9f2; }
.analysis-info .progress-track span { display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,#7054ee,#17bba9); transition:width .25s ease; }
@media (prefers-reduced-motion:reduce) { .analysis-info .progress-track span { transition:none; } }
@media (max-width:600px) {
  .draft-dialog__header { padding:20px; }
  .draft-dialog .draft-list { margin:16px 20px 0; }
  .draft-dialog__actions { padding:16px 20px 20px; }
}
#analysisElapsed { font-size:12px; color:#667085; }
