.preview-dialog{width:min(1180px,calc(100% - 28px));max-height:calc(100vh - 40px);overflow:auto}
.preview-stage{display:grid;place-items:center;min-height:280px;margin-top:8px}
.preview-stage img,.preview-stage video{max-width:100%;max-height:72vh;border-radius:14px;background:#05080d;object-fit:contain}
.preview-compare{display:grid;grid-template-columns:1fr 1fr;gap:14px;width:100%}
.preview-compare figure{position:relative;margin:0}
.preview-compare img,.preview-compare video{width:100%;height:auto;max-height:68vh}
.preview-compare figcaption{position:absolute;left:10px;top:10px;background:rgba(5,8,13,.78);border-radius:8px;padding:5px 9px;font-size:.72rem}
.preview-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:18px}
.preview-prompt{max-height:96px;overflow:auto;margin:14px 0 0;color:var(--muted);font-size:.78rem;line-height:1.6;white-space:pre-wrap;user-select:text}
.gallery-style{display:inline-flex;align-items:center;max-width:100%;margin-bottom:9px;padding:5px 9px;border:1px solid rgba(112,230,239,.35);border-radius:999px;background:rgba(112,230,239,.09);color:var(--cyan);font-size:.7rem;line-height:1.2}
.preview-style{margin:12px 0 0;color:var(--cyan);font-size:.86rem;font-weight:600;text-align:center}
.gallery-media{cursor:zoom-in}
.history-item[data-preview-history]{cursor:zoom-in}
@media(max-width:720px){.preview-compare{grid-template-columns:1fr}.preview-actions{align-items:stretch;flex-direction:column}}
