.cie-creative-overlay [hidden],.cie-creative-overlay[hidden]{display:none!important}
.cie-creative-overlay{position:fixed;inset:0;z-index:10080;background:rgba(24,32,55,.55);display:grid;place-items:center;padding:20px}
.cie-creative-dialog{width:min(900px,100%);max-height:min(92vh,980px);overflow:auto;background:var(--cie-ui-panel);color:var(--cie-ui-text);border:1px solid #e1e5f0;border-radius:14px;box-shadow:0 28px 90px rgba(24,32,55,.28);font:13px/1.45 Inter,Arial,sans-serif}
.cie-creative-head,.cie-creative-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid #e8ebf4}
.cie-creative-head h2{font-size:19px;margin:0}.cie-creative-head p{margin:3px 0 0;color:var(--cie-ui-muted)}
.cie-creative-head button,.cie-creative-actions button,.cie-creative-form button{border:1px solid #d8ddef;background:var(--cie-ui-panel);color:var(--cie-ui-purple);border-radius:7px;padding:8px 12px;font:inherit;font-weight:700;cursor:pointer}
.cie-creative-tabs{display:flex;align-items:center;gap:6px;padding:12px 20px;border-bottom:1px solid #e8ebf4}
.cie-creative-tabs button{border:1px solid transparent;background:transparent;border-radius:7px;padding:8px 11px;color:var(--cie-ui-muted);font:700 12px/1.35 Inter,Arial,sans-serif;cursor:pointer}
.cie-creative-tabs button[aria-pressed="true"]{color:var(--cie-ui-purple);background:#f1efff;border-color:#dedbff}
.cie-creative-tabs [data-creative-action="back"]{margin-left:auto;color:var(--cie-ui-muted);border-color:#d8ddef;background:var(--cie-ui-panel)}
.cie-creative-tabs button:focus-visible{outline:2px solid #5a4fed;outline-offset:2px}
.cie-creative-actions{border-top:1px solid #e8ebf4;border-bottom:0;position:sticky;bottom:0;background:var(--cie-ui-panel);flex-wrap:wrap}
.cie-creative-action-buttons{display:flex;align-items:end;justify-content:flex-end;flex-wrap:wrap;gap:8px;min-width:0}.cie-creative-action-buttons label{display:grid;gap:4px;color:var(--cie-ui-muted);font-size:var(--cie-ui-text-sm);font-weight:700}.cie-creative-action-buttons select{max-width:100%;box-sizing:border-box;border:1px solid #d9deeb;border-radius:7px;background:var(--cie-ui-panel);color:var(--cie-ui-text);padding:8px;font:12px/1.45 Inter,Arial,sans-serif}
.cie-creative-actions button.primary,.cie-creative-form button.primary{background:#5a4fed;color:var(--cie-ui-on-accent);border-color:#5a4fed}
.cie-creative-actions button:disabled,.cie-creative-form button:disabled{opacity:.5;cursor:not-allowed}
.cie-creative-body{padding:20px;display:grid;gap:16px}
.cie-creative-source{padding:12px 14px;border:1px solid #e4e8f1;border-radius:8px;background:#f9fafd}
.cie-creative-source strong{display:block;color:var(--cie-ui-text);font-size:var(--cie-ui-text-sm)}
.cie-creative-source p{max-height:90px;overflow:auto;margin:6px 0 0;color:var(--cie-ui-muted);font-size:12px;line-height:1.5;white-space:pre-wrap}
.cie-creative-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cie-creative-form label,.cie-creative-review label{display:grid;gap:5px;font-size:var(--cie-ui-text-sm);font-weight:750;color:var(--cie-ui-muted)}
.cie-creative-form label small{font-size:var(--cie-ui-text-sm);line-height:1.45;font-weight:500;color:var(--cie-ui-muted)}
.cie-creative-form label small a{color:var(--cie-ui-purple);text-underline-offset:2px}
.cie-creative-form label.wide,.cie-creative-review label.wide{grid-column:1/-1}
.cie-creative-form input,.cie-creative-form select,.cie-creative-form textarea,.cie-creative-review textarea{width:100%;box-sizing:border-box;border:1px solid #d9deeb;background:var(--cie-ui-panel);border-radius:7px;padding:9px 10px;color:var(--cie-ui-text);font:12px/1.45 Inter,Arial,sans-serif}
.cie-creative-form textarea{min-height:82px}.cie-creative-review textarea{min-height:190px;resize:vertical}.cie-creative-review textarea.json{font:11px/1.45 ui-monospace,SFMono-Regular,monospace;min-height:220px}
.cie-creative-review{display:grid;gap:12px}.cie-creative-note{padding:10px 12px;border:1px solid #dddafd;background:#f8f7ff;border-radius:8px;color:var(--cie-ui-purple);font-size:var(--cie-ui-text-sm)}
.cie-creative-note.error{border-color:#f0caca;background:#fff7f7;color:var(--cie-ui-danger)}
.cie-creative-output{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}.cie-creative-output figure{margin:0}.cie-creative-output img{display:block;width:100%;aspect-ratio:1;object-fit:contain;border:1px solid #e4e8f1;border-radius:7px;background:#f5f6fa}.cie-creative-output figcaption{font-size:var(--cie-ui-text-sm);color:var(--cie-ui-muted);text-align:center;padding:4px}
.cie-creative-thumbnail{position:relative;display:block;width:100%;padding:0;border:0;background:transparent;cursor:zoom-in;text-align:left}.cie-creative-thumbnail span{position:absolute;right:8px;bottom:8px;padding:5px 8px;border-radius:5px;background:rgba(18,24,42,.88);color:var(--cie-ui-on-accent);font:700 11px/1.2 Inter,Arial,sans-serif}.cie-creative-thumbnail:hover img{border-color:#5a4fed}.cie-creative-thumbnail:focus-visible{outline:3px solid #5a4fed;outline-offset:3px;border-radius:7px}
.cie-creative-preview[hidden],.cie-creative-preview [hidden]{display:none!important}.cie-creative-preview{position:fixed;inset:0;z-index:10090;background:#0b0f1d;color:var(--cie-ui-on-accent);padding:20px;box-sizing:border-box}.cie-creative-preview-dialog{height:100%;display:grid;grid-template-rows:auto minmax(0,1fr);gap:16px}.cie-creative-preview header{display:flex;align-items:center;gap:14px;max-width:1500px;width:100%;margin:auto}.cie-creative-preview h2{margin:0;font:700 16px/1.3 Inter,Arial,sans-serif}.cie-creative-preview [data-creative-preview-count]{color:var(--cie-ui-muted);font:600 12px/1.3 Inter,Arial,sans-serif}.cie-creative-preview button{border:1px solid #5d6480;border-radius:7px;background:#242a42;color:var(--cie-ui-on-accent);padding:9px 13px;font:700 12px/1.3 Inter,Arial,sans-serif;cursor:pointer}.cie-creative-preview button:hover{background:#343c5d}.cie-creative-preview button:focus-visible{outline:3px solid #aaa5ff;outline-offset:3px}.cie-creative-preview header button{margin-left:auto}.cie-creative-preview-stage{position:relative;min-height:0;display:grid;place-items:center;max-width:1500px;width:100%;margin:auto}.cie-creative-preview-stage img{display:block;max-width:100%;max-height:calc(100dvh - 105px);width:auto;height:auto;object-fit:contain;border-radius:6px;box-shadow:0 16px 48px rgba(0,0,0,.34)}.cie-creative-preview-stage button{position:absolute;top:50%;transform:translateY(-50%)}.cie-creative-preview-stage [data-creative-preview-action="previous"]{left:0}.cie-creative-preview-stage [data-creative-preview-action="next"]{right:0}
.cie-creative-screen{border:1px solid #e4e8f1;border-radius:8px;padding:12px;display:grid;gap:10px}.cie-creative-screen h3{font-size:13px;margin:0;color:var(--cie-ui-text)}
.cie-creative-pill{display:inline-block;background:#eeedff;color:var(--cie-ui-purple);border-radius:999px;padding:3px 8px;font-size:var(--cie-ui-text-sm);font-weight:700}
.cie-creative-rows{display:grid;gap:9px;grid-template-columns:repeat(auto-fill,minmax(225px,1fr))}.cie-creative-row{border:1px solid #e4e8f1;border-radius:8px;padding:10px;display:grid;gap:7px;min-width:0}.cie-creative-row legend{font-weight:800;color:var(--cie-ui-muted)}.cie-creative-row label{display:grid;gap:3px;font-size:var(--cie-ui-text-sm);color:var(--cie-ui-muted);font-weight:700}.cie-creative-row input{box-sizing:border-box;width:100%;border:1px solid #d9deeb;border-radius:6px;padding:7px}.cie-creative-advanced summary{cursor:pointer;color:var(--cie-ui-purple);font-weight:750;margin-bottom:8px}
@media(max-width:660px){.cie-creative-overlay{padding:0}.cie-creative-dialog{width:100%;height:100dvh;max-height:none;border-radius:0}.cie-creative-form{grid-template-columns:1fr}.cie-creative-head,.cie-creative-body,.cie-creative-actions{padding:14px}.cie-creative-tabs{padding:10px 14px;flex-wrap:wrap}.cie-creative-tabs [data-creative-action="back"]{margin-left:0}.cie-creative-actions{display:grid;align-items:stretch;gap:8px}.cie-creative-action-buttons{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;width:100%}.cie-creative-action-buttons button,.cie-creative-action-buttons select{width:100%;min-height:44px}.cie-creative-head button{min-width:44px;min-height:44px}}
@media(max-width:660px){.cie-creative-preview{padding:12px}.cie-creative-preview-stage button{top:auto;bottom:0;transform:none;padding:8px 10px;font-size:var(--cie-ui-text-sm)}.cie-creative-preview-stage img{max-height:calc(100dvh - 100px)}.cie-creative-preview h2{font-size:14px}}
