/* Common draft and attachment components, built on the existing theme. */
.draft-panel h2,.attachment-panel h2 { font-size:18px; margin-bottom:10px; }
.draft-panel .form-state { margin:0 0 12px; }
.draft-panel .form-hint { margin:12px 0 0; }
.draft-actions,.attachment-actions { display:flex; flex-wrap:wrap; gap:10px; }
.draft-actions > *,.attachment-actions > * { min-width:44px; }
.draft-candidate { border:1px solid var(--app-border); border-radius:10px; padding:15px; margin:12px 0; }
.draft-candidate p { margin:0 0 10px; }
.draft-candidate .btn + .btn { margin-left:8px; }
.draft-conflict { border:1px solid #d5bd83; border-radius:12px; background:#fbf3e3; padding:18px; margin:16px 0; }
.draft-comparison { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:16px; margin:16px 0; }
.draft-comparison > section { min-width:0; padding:14px; border:1px solid var(--app-border); border-radius:10px; background:var(--app-surface); }
.draft-comparison h4 { font-size:16px; }
.draft-comparison dt { font-size:13px; color:var(--app-muted); }
.draft-comparison dd { margin:2px 0 12px; overflow-wrap:anywhere; white-space:pre-wrap; }
.draft-panel [data-draft-access] .btn { margin:4px 8px 4px 0; }
.attachment-panel { margin-top:22px; }
.attachment-panel > p { font-size:14px; color:var(--app-muted); }
.attachment-picker { display:flex; flex-wrap:wrap; gap:10px; margin:14px 0; }
.attachment-picker input[type=file] { position:absolute; width:1px; height:1px; opacity:0; }
.attachment-picker:focus-within { outline:3px solid #326fdf; outline-offset:3px; }
.attachment-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:14px; margin-top:16px; padding:0; list-style:none; }
.attachment-card { border:1px solid var(--app-border); border-radius:12px; padding:16px; min-width:0; }
.attachment-card h3 { margin:0 0 7px; font-size:16px; overflow-wrap:anywhere; }
.attachment-card strong { display:block; overflow-wrap:anywhere; }
.attachment-preview { display:block; max-width:100%; width:auto; max-height:240px; object-fit:contain; border-radius:8px; margin-bottom:12px; }
.attachment-status { font-size:14px; margin:8px 0; overflow-wrap:anywhere; }
.attachment-status.is-error { color:var(--app-danger); }
.attachment-meta { color:var(--app-muted); font-size:13px; margin-bottom:8px; }
.attachment-progress { width:100%; height:12px; display:block; margin:10px 0; }
.attachment-card .attachment-actions { margin-top:12px; }
.attachment-card .attachment-actions > * { flex:1 1 120px; }
.attachment-card .form-hint { margin:10px 0 0; }
.attachment-panel [data-upload-notice]:empty { display:none; }
@media (max-width:575.98px) {
  .draft-panel .draft-actions > * { flex:1 1 100%; }
  .draft-candidate .btn { width:100%; }
  .draft-candidate .btn + .btn { margin:8px 0 0; }
}
