.ai-actions,.background-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.ai-actions button,.background-actions button{min-height:44px}.ai-result{display:grid;gap:12px}.ai-palette{display:flex;flex-wrap:wrap;gap:14px}.ai-palette span{display:flex;gap:8px;align-items:center}.ai-palette i{width:24px;height:24px;border:1px solid #8893a0;border-radius:50%}.background-dialog{width:min(900px,calc(100% - 24px));max-height:calc(100dvh - 24px);border:0;border-radius:18px;padding:24px;overflow:auto}.background-compare{display:grid;grid-template-columns:1fr 1fr;gap:16px}.background-compare figure{margin:0;min-width:0}.background-compare figcaption{font-size:14px;margin-bottom:8px}.background-compare img,.background-compare canvas{width:100%;max-height:320px;object-fit:contain;background-color:#fff;background-image:conic-gradient(#dce2e8 25%,#fff 0 50%,#dce2e8 0 75%,#fff 0);background-size:20px 20px;border:1px solid #cbd5df;border-radius:10px}.background-compare canvas{touch-action:none;cursor:crosshair}.background-controls{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.background-controls label{display:flex;flex-direction:column;gap:8px;font-size:14px}.background-controls input,.background-controls select{min-height:44px;width:100%;font-size:16px}.background-dialog p{font-size:14px;line-height:1.6}.file-preview{flex-wrap:wrap;gap:10px}.file-preview>span{min-width:0;flex:1 1 140px}.file-preview button,.file-preview a{min-height:44px;font-size:14px}.file-preview img{object-fit:contain}.editor-ai-undo{margin:10px 0}.background-dialog button:focus-visible,.ai-actions button:focus-visible{outline:3px solid #2463eb;outline-offset:3px}
@media(max-width:600px){.background-dialog{padding:18px;max-height:calc(100dvh - 12px)}.background-controls{grid-template-columns:1fr}.background-compare{gap:8px}.background-compare img,.background-compare canvas{max-height:200px}.ai-actions,.background-actions{display:grid;grid-template-columns:1fr}.ai-actions button,.background-actions button{width:100%;white-space:normal}.file-preview button,.file-preview a{flex:1 1 140px}.editor-page .designer-preview{min-height:210px}.editor-page .live-preview{height:210px;max-height:210px}.wizard-steps{flex-wrap:wrap}.logo-controls input[type=range]{min-height:44px;width:100%}}

.background-compare canvas{display:block;width:100%;height:auto;max-height:none}

.ai-actions [hidden],.ai-result[hidden]{display:none!important}
/* Recovery and review controls use the same brand and touch sizes as the editor. */
[hidden]{display:none!important}
.draft-resume{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;margin-top:18px;border:1px solid #bdd0eb;border-radius:14px;background:#edf4ff;color:#142b48}.draft-resume>div{display:grid;gap:5px;min-width:0}.draft-resume strong{font-size:16px}.draft-resume span{font-size:14px;overflow-wrap:anywhere}.draft-resume .btn{flex:none}.draft-status{margin:0;padding:8px 30px;font-size:13px;line-height:1.6;color:#526780}.draft-status[data-state=error]{color:#a62d25}.editor-save-actions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.connection-status{padding:12px 18px;background:#fff4db;color:#614007;font-size:14px;line-height:1.6;text-align:center}.field-error{color:#a62d25;font-size:14px;margin:6px 0;line-height:1.5}.field [aria-invalid=true]{border-color:#b73a31!important;box-shadow:0 0 0 2px #b73a3120}.preview-dialog{width:min(650px,calc(100% - 24px));max-height:calc(100dvh - 24px)}.expanded-preview.editor-page{display:block;width:100%;height:auto;overflow:visible;margin:0;border:0}.preview-dialog .expanded-preview .live-preview{height:auto;min-height:360px;max-height:none;padding:20px 8px;background:#102744;border-radius:16px}.preview-dialog .preview-object{animation:none;transform:none;max-width:90%;width:300px}.preview-dialog .preview-object.board{min-height:330px}.preview-dialog #expandedPreviewFacts{font-size:14px;line-height:1.6;color:#526780}button:disabled{cursor:not-allowed}.background-controls output{font-variant-numeric:tabular-nums}
@media(max-width:790px){.draft-status{padding:8px 16px;font-size:13px}.editor-save-actions{grid-column:1/-1;grid-row:1;justify-content:space-between;gap:10px}.wizard-footer .editor-save-actions #saveProject,.wizard-footer #inspectPreview{width:auto;flex:1;min-height:44px;font-size:14px;grid-column:auto;grid-row:auto;white-space:normal}.draft-resume{margin-top:12px;padding:14px;align-items:stretch;flex-direction:column}.draft-resume .btn{width:100%}.preview-dialog .small-dialog-inner{padding:18px 14px}.preview-dialog .expanded-preview .live-preview{min-height:320px}.preview-dialog .preview-object.board{min-height:300px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
