.studio-creative-toolbar{display:flex;align-items:center;gap:7px;margin:0 0 9px}.studio-creative-toolbar .studio-button{border:1px solid #ded6e8;border-radius:7px;padding:6px 9px;background:#fbf9fe;color:#665374;font-size:10px!important}.studio-creative-toolbar .studio-button:hover{background:#f3edfa;border-color:#bc9bdd}.studio-creative-toolbar .studio-button:focus-visible{outline:2px solid #895ec0;outline-offset:2px}
.studio-caption-picker{margin:16px 0 18px;padding:12px;border:1px solid #e5dfeb;border-radius:10px;background:#fbf9fe}.studio-creative-field{display:grid;gap:7px;margin:0 0 14px;font-size:11px;line-height:1.45;color:#554c5f;font-weight:550}.studio-creative-field select,.studio-creative-field input,.studio-creative-field textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;font:inherit!important;color:#3e344a;background:white;border:1px solid #d9d1e2;border-radius:7px;padding:9px 10px;outline-offset:2px}.studio-creative-field select:focus-visible,.studio-creative-field input:focus-visible,.studio-creative-field textarea:focus-visible{outline:2px solid #956ac6;border-color:#956ac6}.studio-creative-field select:disabled,.studio-creative-field input:disabled{opacity:.55}.studio-caption-picker .studio-creative-field{margin-bottom:8px}.studio-creative-hint{font-size:10px!important;line-height:1.6;color:#766b80!important;margin:0!important}.studio-creative-hint[data-tone="error"]{color:#a34444!important}
#studioPromptWriterDialog{width:min(440px,calc(100vw - 40px));max-height:calc(100dvh - 40px);overflow:auto;box-sizing:border-box;border:1px solid #e1d8e9;border-radius:16px;padding:24px;color:#352b40;background:#fffefd;box-shadow:0 24px 100px #20132f33}#studioPromptWriterDialog::backdrop{background:#231b324d;backdrop-filter:blur(3px)}#studioPromptWriterDialog h2{font-size:21px;font-weight:550;letter-spacing:-.5px;margin:0}.studio-creative-intro{font-size:12px!important;line-height:1.7;color:#73677f!important;margin:12px 0 20px!important}.studio-prompt-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.studio-prompt-fields[hidden]{display:none!important}.studio-prompt-checkbox{display:flex;gap:7px;align-items:center;color:#5d506a;font-size:11px;align-self:center}.studio-prompt-checkbox input{width:14px;height:14px;accent-color:#8b5ebe}#studioPromptPreview{background:#f8f5fb;line-height:1.7;resize:vertical;min-height:76px;max-height:150px;font-size:12px!important;font-weight:450}.studio-prompt-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px}.studio-prompt-actions .studio-export{margin:0;background:#8656b7}.studio-prompt-actions button{font-size:12px!important}.studio-prompt-actions .studio-button{color:#62566d}
@media(max-height:850px){.studio-creative-toolbar{margin-bottom:7px}.studio-creative-toolbar .studio-button{padding:5px 8px}#studioPromptWriterDialog{padding:20px}}
@media(prefers-reduced-motion:reduce){.studio-creative-toolbar *,.studio-prompt-writer *{animation:none!important;transition:none!important}}
.studio-creative-toolbar{flex-wrap:wrap}.studio-creative-toolbar [hidden]{display:none!important}.studio-zoom-controls{margin-top:22px;padding-top:16px;border-top:1px solid #e5dfeb}.studio-zoom-controls h3{font-size:13px;margin:0 0 13px;color:#493a57;font-weight:600}.studio-zoom-controls .studio-creative-field{margin-bottom:9px}.studio-zoom-actions{display:flex;gap:8px;margin-bottom:8px}.studio-zoom-actions .studio-button{flex:1;padding:8px;font-size:11px!important;border:1px solid #ded6e8;border-radius:7px}.studio-zoom-controls>.studio-button{font-size:11px!important;border:1px solid #ded6e8;border-radius:7px;padding:9px;margin-bottom:9px}.studio-zoom-controls button:disabled{opacity:.45;cursor:not-allowed}.studio-zoom-controls button:focus-visible{outline:2px solid #895ec0;outline-offset:2px}

/* Caption tiles use the same canonical engine sheet and markup as the regular
   editor. Only proportional dimensions are adjusted here; no copied palettes. */
#studioCaptionPicker{display:flex;flex-direction:column;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent}
.studio-caption-tabs{display:grid;grid-template-columns:1fr 1fr;gap:3px;padding:3px;margin:0 0 14px;border:1px solid #e3dce9;border-radius:8px;background:#f4f0f8}
.studio-caption-tab{min-height:32px;border:0;border-radius:5px;background:transparent;color:#776b80;font-family:inherit;font-weight:500;font-size:12px;line-height:1.2;cursor:pointer}
.studio-caption-tab[aria-selected="true"]{background:#fff;color:#513263;box-shadow:0 1px 4px #39214d12}
.studio-caption-tab:focus-visible,.studio-caption-tile:focus-visible{outline:2px solid #8855bb;outline-offset:2px}
#studioCaptionPresets,#studioCaptionType{min-height:0}#studioCaptionPresets[hidden],#studioCaptionType[hidden]{display:none!important}
#studioCaptionPresets>.studio-creative-field{margin-bottom:12px;font-size:10px;color:#74697c}
#studioCaptionPresets>.studio-creative-field select{padding:8px;font-size:11px!important}
.studio-caption-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:10px 8px;max-height:clamp(180px,45dvh,540px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:3px 3px 8px;margin:0 -3px 9px;scroll-padding:5px}
.studio-caption-tile{display:flex;flex-direction:column;gap:0;min-width:0;position:relative;text-align:left;padding:4px 4px 8px;border:1px solid #e4dce9;border-radius:10px;background:#fff;color:#473b52;cursor:pointer;box-shadow:0 1px 2px #33213b05}
.studio-caption-tile:hover{border-color:#b799d0;background:#fcf9ff}.studio-caption-tile[aria-checked="true"]{border-color:#9563c6;box-shadow:0 0 0 1px #9563c6;background:#faf5ff}
.studio-caption-tile[aria-checked="true"]::after{content:'✓';position:absolute;right:8px;top:8px;display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:#8856b8;color:white;font:600 10px/1 sans-serif;box-shadow:0 1px 4px #25142c30}
.studio-caption-tile:disabled{cursor:not-allowed;opacity:.6}.studio-caption-tile-name{font-size:11px;font-weight:550;line-height:1.3;padding:8px 4px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;box-sizing:border-box}
.studio-caption-tile-gap{font-size:9px;line-height:1.3;padding:3px 4px 0;color:#786780}.studio-caption-tile-gap[hidden]{display:none}
.studio-caption-tile-preview{position:relative;display:grid;place-items:center;width:100%;height:83px;overflow:hidden;border-radius:6px;background:#211e28;isolation:isolate}
.studio-caption-tile-poster{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 36%;filter:brightness(.64);z-index:0}
#studioCaptionGallery .ed3-captions{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;max-width:none;margin:0;padding:7px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;transform:none;z-index:1;pointer-events:none}
#studioCaptionGallery .ed3-cap-line{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;max-width:100%;font-size:18px;line-height:1.2;row-gap:2px;column-gap:.18em;padding:0}
#studioCaptionGallery .ed3-cap-word{-webkit-text-stroke-width:1px;padding:0 .06em}
#studioCaptionGallery .cap-hormozi .ed3-cap-word.active{-webkit-text-stroke-width:0;padding:1px 4px;border-radius:5px}
.studio-caption-preview-fallback{position:relative;z-index:2;padding:8px;color:#dcd3e4;font-size:10px;text-align:center;background:#211e28c9;border-radius:4px}
#studioCaptionGallery[data-preview-state="ready"] .studio-caption-preview-fallback{display:none}
#studioCaptionGallery:not([data-preview-state="ready"]) .ed3-captions{visibility:hidden}
#studioCaptionGallery .cap-classic{visibility:visible!important}
#studioCaptionGallery .cap-classic .ed3-cap-line{font-family:CaptionFont,Inter,Arial,sans-serif;font-size:14px!important;text-transform:none!important;background:transparent!important}
#studioCaptionGallery .cap-classic .ed3-cap-word{color:#fff!important;background:transparent!important;text-transform:none!important;-webkit-text-stroke:.6px #000;paint-order:stroke fill;text-shadow:none!important;transform:none!important;border:0!important;border-radius:0;padding:0 .06em!important;animation:none!important}
.studio-caption-off-preview{position:relative;color:#aaa0b4;font:500 24px/1.2 sans-serif;letter-spacing:-1px}.studio-caption-off-preview::after{content:'';position:absolute;height:1px;width:43px;left:-5px;top:50%;background:#aaa0b4;transform:rotate(-34deg)}
.studio-caption-type{padding:2px 0 14px}.studio-caption-type .studio-field-label{display:block;margin:12px 0 7px;color:#62526e;font-size:11px}.studio-caption-type select{width:100%;box-sizing:border-box;padding:10px;border:1px solid #d9d1e2;border-radius:7px;background:#fff;color:#42344e}.studio-caption-type input[type="range"]{width:calc(100% - 50px);accent-color:#8a5abb;vertical-align:middle}.studio-caption-size-output{display:inline-block;width:44px;text-align:right;font-size:11px;color:#63516e;font-variant-numeric:tabular-nums}.studio-caption-type>.studio-creative-hint{margin-top:15px!important}
.studio-caption-apply{flex:none;position:sticky;bottom:0;z-index:3;margin-top:13px;padding:12px 0 0;border-top:1px solid #e9e0ee;background:#fffefd}.studio-caption-apply #studioApplyStyle{width:100%;margin:10px 0 0;font-size:12px!important;min-height:36px}
#studioTool-effects .studio-zoom-controls{margin:0;padding:0;border:0}
@media(max-height:800px){.studio-caption-gallery{max-height:36dvh;gap:8px}.studio-caption-tile-preview{height:72px}.studio-caption-tabs{margin-bottom:10px}.studio-caption-apply{padding-top:9px;margin-top:9px}}
@media(prefers-reduced-motion:reduce){.studio-caption-gallery *{animation:none!important;transition:none!important}}

/* The left toolkit has one heading. Its available height belongs to the grid;
   only that grid scrolls, with Type settings and explicit Apply kept reachable. */
#studioToolPanel .studio-tool-scroll:has(>#studioPanel-look[data-caption-layout="gallery"]:not([hidden])){display:flex;overflow:hidden}
#studioToolPanel #studioPanel-look[data-caption-layout="gallery"]{display:flex;flex-direction:column;flex:1;min-height:0;max-height:none;height:100%;box-sizing:border-box;padding:10px 12px;overflow:hidden}
#studioToolPanel #studioPanel-look[data-caption-layout="gallery"]>[hidden],#studioToolPanel #studioCaptionPresets>.studio-creative-field[hidden]{display:none!important}
#studioToolPanel #studioCaptionPicker{flex:1;min-height:0;overflow:hidden}
#studioToolPanel .studio-caption-tabs{flex:none;padding:2px;margin-bottom:8px}
#studioToolPanel .studio-caption-tab{min-height:28px;font-size:11px}
#studioToolPanel #studioCaptionPresets{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#studioToolPanel #studioCaptionGallery{flex:1;min-height:0;max-height:none;grid-auto-rows:92px;gap:6px;padding:2px 2px 6px;margin:0;overflow:auto}
#studioToolPanel .studio-caption-tile{height:92px;box-sizing:border-box;padding:2px;border-radius:7px}
#studioToolPanel .studio-caption-tile-preview{height:62px;flex-shrink:0;border-radius:4px}
#studioToolPanel .studio-caption-tile-name{font-size:10px;line-height:12px;padding:3px 3px 0;flex-shrink:0}
#studioToolPanel .studio-caption-tile-gap{font-size:8px;line-height:9px;padding:0 3px;flex-shrink:0}
#studioToolPanel #studioCaptionPreviewStatus{flex:none;font-size:9px!important;line-height:1.35;margin-top:5px!important}
#studioToolPanel #studioCaptionType{flex:1;min-height:0;overflow:auto}
#studioToolPanel .studio-caption-apply{position:static;flex:0 0 auto;margin-top:8px;padding-top:8px}
#studioToolPanel #studioCaptionPresetHint{font-size:10px!important;line-height:1.4}
#studioToolPanel .studio-caption-apply #studioApplyStyle{min-height:32px;margin-top:6px;padding:7px 10px;font-size:11px!important}
