.dgx-prompt-dialog{box-sizing:border-box;width:min(920px,96vw);max-width:96vw;max-height:94dvh;padding:0;background:var(--bg,#f7f9f5);color:var(--ink);overflow:hidden;border:1px solid var(--line)}
.dgx-prompt-dialog:not([open]){display:none}.dgx-prompt-dialog[open]{display:flex;flex-direction:column}.dgx-prompt-dialog *{box-sizing:border-box}
.dgx-prompt-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 26px;margin:0;border-bottom:1px solid var(--line);flex-shrink:0;background:#fff}
.dgx-prompt-head h2{margin:0;font-size:21px}.dgx-prompt-head p{margin:8px 0 0;color:var(--muted);font-size:13px;line-height:1.7}.dgx-prompt-head button{font-size:24px;min-width:44px;padding:6px}
#dgxPromptForm{display:block;overflow:auto;overscroll-behavior:contain;min-height:0;padding:24px 26px}
#dgxPromptForm label{font-size:14px;line-height:1.6;color:var(--ink);min-width:0}#dgxPromptForm select,#dgxPromptForm textarea{width:100%;min-width:0;font:inherit;line-height:1.7;color:var(--ink);background:#fff;min-height:44px}
#dgxPromptSystem{min-height:260px}#dgxPromptKeywords{min-height:95px}
.dgx-prompt-models{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px}.dgx-prompt-help{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;font-size:12px;color:var(--muted);line-height:1.7;margin-top:8px}.dgx-prompt-help span:first-child{flex-shrink:0}
.dgx-prompt-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px}.dgx-prompt-actions .sub{margin:0;flex:1}#dgxPromptSave{margin-left:auto}
#dgxPromptForm button{min-height:42px}#dgxPromptForm button:disabled{opacity:.5;cursor:default}
#dgxPromptMessage,#dgxPromptPreviewStatus{font-size:13px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}#dgxPromptMessage[data-error=true],#dgxPromptPreviewStatus[data-error=true]{color:var(--danger,#983e32)}#dgxPromptMessage:empty,#dgxPromptPreviewStatus:empty{display:none}
.dgx-prompt-preview{margin-top:24px;border-top:1px solid var(--line);padding-top:22px}.dgx-prompt-preview h3{margin:0;font-size:17px}.dgx-prompt-preview>.sub{line-height:1.8;margin:8px 0 16px}.dgx-prompt-preview-controls{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-top:12px}.dgx-prompt-preview-controls label{min-width:190px!important}
.dgx-prompt-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.dgx-prompt-results article{border:1px solid var(--line);border-radius:12px;background:#fff;padding:16px;min-width:0}.dgx-prompt-results h4{margin:0;font-size:14px}.dgx-prompt-results p{margin:10px 0;font-size:14px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}.dgx-prompt-results small{color:var(--muted)}
@media(max-width:650px){.dgx-prompt-dialog{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0}.dgx-prompt-head{padding:16px}.dgx-prompt-head h2{font-size:19px}#dgxPromptForm{padding:18px 16px}.dgx-prompt-models,.dgx-prompt-results{grid-template-columns:1fr}.dgx-prompt-help{flex-direction:column;gap:4px}.dgx-prompt-actions .sub{flex-basis:100%;order:1}.dgx-prompt-preview-controls{align-items:stretch;flex-direction:column}#dgxPromptSystem{min-height:240px}}
