:root{color-scheme:light;--ink:#203141;--muted:#697b89;--line:rgba(58,92,111,.14);--accent:#008c99;--accent-dark:#00727e;--glass:rgba(255,255,255,.83);--shadow:0 14px 45px rgba(51,96,111,.065);--orb-one:#8bd9ef;--orb-two:#c4c4ff;--orb-three:#b9eedc;--radius:10px}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:110px}body{margin:0;background:#f8fbfc;color:var(--ink);font-family:'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}body[data-palette="rose"]{--orb-one:#ffc7c4;--orb-two:#d2baff;--orb-three:#ffdeb7}body[data-palette="orchid"]{--orb-one:#d0bbff;--orb-two:#a8dcfb;--orb-three:#f7c9e8}body[data-palette="sunrise"]{--orb-one:#ffdaa0;--orb-two:#ffc6d4;--orb-three:#bce9d7}button,input,textarea,select{font:inherit;color:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}button{border:0}button svg,a svg,summary svg{flex-shrink:0;vertical-align:middle}a{color:inherit;text-decoration:none}img,video{display:block;max-width:100%}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid rgba(0,140,153,.4);outline-offset:4px}[hidden]{display:none!important}h1,h2,h3,p{margin:0}::selection{background:rgba(0,140,153,.18)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;padding:0;margin:-1px}

.ambient{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:linear-gradient(135deg,rgba(239,248,255,.4),rgba(252,245,250,.28),rgba(237,251,247,.42))}.orb{position:absolute;width:70vw;height:70vw;max-width:1050px;max-height:1050px;min-width:500px;min-height:500px;border-radius:50%;filter:blur(100px);opacity:.34;will-change:transform;animation:ambient-drift 24s ease-in-out infinite alternate;transition:background 1.6s ease}.orb.one{left:-23%;top:-32%;background:var(--orb-one)}.orb.two{right:-28%;top:10%;background:var(--orb-two);animation-duration:31s;animation-delay:-12s}.orb.three{left:12%;bottom:-54%;background:var(--orb-three);animation-duration:28s;animation-delay:-8s}.motion-paused .orb,body[data-motion="paused"] .orb{animation-play-state:paused}@keyframes ambient-drift{0%{transform:translate3d(-3%,2%,0) scale(.92)}100%{transform:translate3d(13%,-8%,0) scale(1.1)}}

.rail{width:92px;position:fixed;inset:0 auto 0 0;z-index:40;display:flex;flex-direction:column;align-items:center;gap:8px;padding:25px 10px 18px;background:rgba(255,255,255,.79);backdrop-filter:blur(24px);border-right:1px solid var(--line)}.rail-logo{width:48px;height:48px;display:flex;align-items:center;justify-content:center;border-radius:15px;background:var(--accent);color:white;font-size:23px;font-weight:750;letter-spacing:-2px;margin-bottom:28px;box-shadow:0 5px 18px rgba(0,140,153,.13)}.rail-logo svg{width:29px;height:29px}.rail-logo img{width:44px;height:44px;object-fit:contain}.rail-link{width:70px;min-height:64px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;font-size:10px;font-weight:550;color:#687b88;border-radius:12px;background:transparent;text-align:center;transition:background .2s,color .2s}.rail-link svg{width:22px;height:22px}.rail-link:hover,.rail-link.active{background:rgba(0,140,153,.075);color:var(--accent)}.rail-bottom{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:12px}.rail-bottom .rail-link{min-height:48px}.workspace{margin-left:92px;min-height:100vh}.topbar{position:sticky;top:0;height:88px;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 48px;background:rgba(249,252,253,.69);border-bottom:1px solid rgba(58,92,111,.08);backdrop-filter:blur(24px)}.top-left,.top-actions{display:flex;align-items:center;gap:22px}.back-link{display:inline-flex;gap:10px;align-items:center;min-height:44px;color:#526877;font-weight:500}.back-link:hover,.safety-link:hover{color:var(--accent)}.safety-link{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:#59717e}.language-button{min-height:40px;padding:0 13px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.55);font-size:12px;font-weight:600}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;border:1px solid var(--line);background:rgba(255,255,255,.65);color:#5c7481}.icon-button:hover{background:#fff;color:var(--accent)}

main{max-width:2100px;margin:0 auto;padding:33px 48px 0}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:30px}.heading-copy h1{font-size:32px;line-height:1.18;font-weight:700;letter-spacing:-1.2px}.heading-copy h1 span{color:var(--accent)}.heading-copy p{margin-top:10px;color:var(--muted);font-size:13px;line-height:1.6}.eyebrow{display:flex;align-items:center;gap:6px;margin-bottom:9px;text-transform:uppercase;font-size:10px;letter-spacing:1.55px;font-weight:700;color:var(--accent)}.theme-controls{display:flex;align-items:center;gap:8px;flex-shrink:0}.colour-control{display:inline-flex;align-items:center;gap:10px;min-height:38px;padding:7px 11px;background:rgba(255,255,255,.7);border:1px solid var(--line);border-radius:11px;font-size:11px;color:#5d7180}.colour-control label{font-size:11px}.colour-control select{max-width:125px;border:0;background:transparent;outline:none;font-size:11px}.colour-dots{display:flex;gap:4px;align-items:center}.colour-dots span,.colour-dots i{width:9px;height:9px;display:block;border-radius:50%;background:var(--orb-one)}.colour-dots span:nth-child(2),.colour-dots i:nth-child(2){background:var(--orb-two)}.colour-dots span:nth-child(3),.colour-dots i:nth-child(3){background:var(--orb-three)}.theme-controls button[aria-pressed="true"]{background:rgba(0,140,153,.1);color:var(--accent)}

.creation-grid{display:grid;grid-template-columns:405px minmax(0,1fr);gap:28px;align-items:start;scroll-margin-top:110px;outline:none}.panel{border:1px solid rgba(255,255,255,.93);border-radius:var(--radius);background:var(--glass);box-shadow:var(--shadow);backdrop-filter:blur(18px)}.settings-panel{padding:21px}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:23px}.section-title{font-size:17px;line-height:1.35;letter-spacing:-.4px;font-weight:650}.panel-heading>span{font-size:11px;color:var(--muted)}.field{margin-top:22px}.field:first-of-type{margin-top:0}.field-label{display:block;font-size:13px;font-weight:650;margin-bottom:9px;color:#344e60}.field-label>span{font-weight:400;color:#85939e;font-size:11px;margin-left:3px}.field-help{font-size:11px;line-height:1.55;color:#81909b;margin-top:7px}.model-select,.select-input{width:100%;min-height:43px;padding:0 13px;border:1px solid var(--line);border-radius:9px;background:rgba(255,255,255,.78);color:#425867;font-size:12px}.model-select{font-weight:550}.prompt-input{display:block;width:100%;min-height:92px;max-height:350px;resize:vertical;padding:13px 14px;background:rgba(255,255,255,.75);border:1px solid var(--line);border-radius:10px;font-size:12px;line-height:1.65;transition:border-color .2s,box-shadow .2s}.prompt-input::placeholder{color:#a1aab2}.prompt-input:focus,.model-select:focus,.select-input:focus{border-color:rgba(0,140,153,.5);box-shadow:0 0 0 3px rgba(0,140,153,.06)}.prompt-meta{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:7px;color:#8996a0;font-size:10px}.prompt-meta button{font-size:10px}.text-button{padding:0;min-height:28px;background:transparent;color:var(--accent);font-size:11px;font-weight:600}.text-button:hover{text-decoration:underline}.selected-template{display:flex;align-items:center;gap:10px;margin:16px 0;padding:10px;background:rgba(0,140,153,.055);border:1px solid rgba(0,140,153,.13);border-radius:12px}.selected-thumb{width:45px;height:51px;object-fit:cover;border-radius:7px;flex-shrink:0}.selected-info{min-width:0;flex:1}.selected-info strong{display:block;font-size:11px;font-weight:650;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selected-info p,.selected-info span{display:block;font-size:10px;color:var(--muted);margin-top:3px}.selected-template>.text-button{font-size:10px;flex-shrink:0}.upload-zone{position:relative;width:100%;min-height:112px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:16px;text-align:center;background:rgba(246,250,252,.66);border:1px dashed rgba(62,113,136,.28);border-radius:11px;transition:background .2s,border-color .2s}.upload-zone:hover,.upload-zone.drag-over{background:rgba(0,140,153,.04);border-color:var(--accent)}.upload-zone input[type="file"]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.upload-zone:focus-within{outline:3px solid rgba(0,140,153,.35);outline-offset:3px}.upload-icon{color:#86a4b4;margin-bottom:2px}.upload-icon svg{width:22px;height:22px}.upload-title{font-weight:550;font-size:11px;color:#607d8e}.upload-caption{font-size:10px;color:#9aa6af}.reference-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:9px}.reference-chip{position:relative;display:flex;align-items:center;gap:7px;max-width:100%;padding:5px 6px;border:1px solid var(--line);border-radius:8px;background:white;font-size:10px}.reference-chip img{width:31px;height:31px;object-fit:cover;border-radius:5px}.reference-chip span{max-width:100px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.remove-reference{display:flex;align-items:center;justify-content:center;width:25px;height:25px;padding:0;background:#f1f5f7;border-radius:6px;color:#6c808e}.remove-reference svg{width:13px;height:13px}.option-group{display:flex;gap:7px;flex-wrap:wrap}.option-button{flex:1;min-width:49px;min-height:37px;border:1px solid var(--line);border-radius:8px;background:rgba(255,255,255,.67);font-size:11px;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:6px}.option-button svg{width:14px;height:14px}.option-button:hover{border-color:rgba(0,140,153,.4)}.option-button.active,.option-button[aria-pressed="true"]{background:rgba(0,140,153,.075);border-color:rgba(0,140,153,.54);color:var(--accent);box-shadow:inset 0 0 0 .5px rgba(0,140,153,.15)}.advanced-settings{border-top:1px solid var(--line);margin-top:24px;padding-top:16px}.advanced-settings>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;min-height:30px;font-size:12px;font-weight:550;cursor:pointer;color:#617889}.advanced-settings>summary::-webkit-details-marker{display:none}.advanced-settings>summary::after{content:'+';font-size:18px;font-weight:400;color:#87a0ae}.advanced-settings[open]>summary::after{content:'−'}.advanced-content{padding:11px 0 1px}.advanced-content .field{margin-top:13px}.check-option{display:flex;align-items:center;gap:9px;min-height:33px;font-size:11px;color:#657d8c}.check-option input{accent-color:var(--accent);width:15px;height:15px}.primary-button,.secondary-button{min-height:45px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 19px;font-size:12px;font-weight:650;transition:background .2s,box-shadow .2s}.primary-button{color:white;background:var(--accent);box-shadow:0 5px 13px rgba(0,140,153,.1)}.primary-button:hover{background:var(--accent-dark);box-shadow:0 7px 19px rgba(0,140,153,.18)}.settings-panel>.primary-button{width:100%;margin-top:20px}.primary-button svg{width:17px;height:17px}.secondary-button{color:#466475;background:rgba(255,255,255,.72);border:1px solid var(--line)}.secondary-button:hover{background:white;border-color:rgba(0,140,153,.35)}.preview-note{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:12px;font-size:10px;line-height:1.55;color:#8a99a3;text-align:center}.preview-note svg{width:12px;height:12px}

.preview-panel{min-width:0;padding:21px}.preview-panel .panel-heading{margin-bottom:18px}.preview-panel .section-title{font-size:17px}.preview-stage{position:relative;width:100%;max-width:1100px;aspect-ratio:16/9;margin:0 auto;overflow:hidden;border-radius:13px;border:1px solid rgba(115,148,166,.1);background:linear-gradient(138deg,rgba(246,250,253,.91),rgba(237,245,250,.67));display:flex;align-items:center;justify-content:center}.waiting-state{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;color:#8aa2b2}.waiting-icon{width:64px;height:64px;display:flex;align-items:center;justify-content:center;border-radius:19px;background:rgba(255,255,255,.65);border:1px solid rgba(160,184,198,.15);margin-bottom:20px;color:#9cb3c1}.waiting-icon svg{width:29px;height:29px}.waiting-state h3,.waiting-state strong{font-size:14px;font-weight:550;color:#8399a8}.waiting-state p{font-size:11px;line-height:1.7;color:#a0aeba;margin-top:7px;max-width:320px}.preview-player{position:absolute;inset:0;background:#101820;display:flex;align-items:center;justify-content:center}.preview-player video{width:100%;height:100%;object-fit:contain}.preview-description{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:15px;font-size:12px;color:#607a89}.preview-description strong{display:block;font-size:12px;font-weight:600}.preview-description p{font-size:11px;color:#8999a4;margin-top:4px}.preview-description .secondary-button{min-height:35px;padding:7px 12px;font-size:11px}.preview-empty-note{max-width:450px;margin:18px auto 0;font-size:11px;line-height:1.7;text-align:center;color:#9aa8b1}

.gallery-section{margin-top:56px;padding-top:31px;border-top:1px solid rgba(73,111,130,.11)}.gallery-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:21px}.gallery-title h2{font-size:27px;line-height:1.2;font-weight:650;letter-spacing:-.9px}.gallery-title p{margin-top:7px;color:#788b98;font-size:12px}.searchbox{width:280px;min-height:42px;display:flex;align-items:center;gap:9px;padding:0 13px;background:rgba(255,255,255,.73);border:1px solid var(--line);border-radius:11px;color:#8b9ca6}.searchbox svg{width:17px;height:17px;flex-shrink:0}.searchbox input{width:100%;min-width:0;border:0;outline:none;background:transparent;height:40px;font-size:12px;color:var(--ink)}.searchbox:focus-within{border-color:rgba(0,140,153,.55);box-shadow:0 0 0 3px rgba(0,140,153,.06)}.searchbox input:focus-visible{outline:none}.searchbox input::placeholder{color:#91a0aa}.gallery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:17px}.gallery-tabs{display:flex;gap:20px;align-items:center}.gallery-tabs button{position:relative;min-height:37px;padding:0 0 8px;background:transparent;color:#8595a0;font-size:12px;font-weight:550;border-bottom:2px solid transparent}.gallery-tabs button.active,.gallery-tabs button[aria-selected="true"]{color:var(--accent);border-bottom-color:var(--accent)}.gallery-tabs button:hover{color:var(--accent)}.result-count{font-size:11px;color:#879aa7}.category-row{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:25px}.chip{display:inline-flex;align-items:center;gap:6px;min-height:34px;white-space:nowrap;padding:6px 13px;border:1px solid rgba(79,114,132,.13);border-radius:9px;background:rgba(255,255,255,.56);color:#748b99;font-size:11px;font-weight:500;transition:color .2s,background .2s,border-color .2s}.chip:hover{color:var(--accent);border-color:rgba(0,140,153,.33)}.chip.active,.chip[aria-pressed="true"]{color:var(--accent-dark);border-color:rgba(0,140,153,.25);background:rgba(0,140,153,.085)}.chip svg{width:13px;height:13px}.gallery-grid{--gallery-columns:4;--gallery-gap:14px;--gallery-caption-height:64px;position:relative;width:100%;overflow-anchor:none}.template-card{position:absolute;box-sizing:border-box;overflow:hidden;border:1px solid rgba(255,255,255,.82);border-radius:15px;background:rgba(255,255,255,.83);box-shadow:0 4px 17px rgba(43,77,94,.05);transition:box-shadow .24s;isolation:isolate}.template-card:hover,.template-card:focus-within{box-shadow:0 10px 29px rgba(31,69,89,.13)}.media-button{position:relative;display:block;width:100%;margin:0;padding:0;overflow:hidden;background:#e3edf1;text-align:left;isolation:isolate;cursor:pointer}.media-button img,.media-button video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.media-button img{transition:transform .65s ease}.template-card:hover .media-button img{transform:scale(1.025)}.media-button video{z-index:1}.media-button::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(9,20,29,.1),transparent 35%,transparent 58%,rgba(9,20,29,.36));pointer-events:none;z-index:2}.duration-badge{position:absolute;z-index:4;left:11px;bottom:12px;display:inline-flex;gap:5px;align-items:center;padding:4px 7px;background:rgba(13,26,37,.46);backdrop-filter:blur(10px);color:#fff;border:1px solid rgba(255,255,255,.13);border-radius:6px;font-size:10px;font-weight:550;line-height:1.2;pointer-events:none}.duration-badge svg{width:10px;height:10px}.card-actions{position:absolute;z-index:5;top:10px;right:10px;display:flex;gap:5px;opacity:0;transition:opacity .2s}.template-card:hover .card-actions,.template-card:focus-within .card-actions{opacity:1}.quick-view,.save-button{width:31px;height:31px;padding:0;display:inline-flex;align-items:center;justify-content:center;color:white;background:rgba(20,35,43,.34);border:1px solid rgba(255,255,255,.25);backdrop-filter:blur(10px);border-radius:8px}.quick-view svg,.save-button svg{width:14px;height:14px}.quick-view:hover,.save-button:hover{background:rgba(0,140,153,.85)}.save-button.saved{background:var(--accent);opacity:1}.save-button.saved svg{fill:rgba(255,255,255,.2)}.card-actions:has(.saved){opacity:1}.card-cta{position:absolute;z-index:5;right:11px;bottom:11px;min-height:29px;padding:6px 10px;border-radius:7px;background:rgba(255,255,255,.95);color:#294e5a;display:inline-flex;align-items:center;justify-content:center;gap:5px;font-size:10px;font-weight:650;opacity:0;transform:translateY(3px);transition:opacity .2s,transform .2s}.card-cta svg{width:12px;height:12px}.template-card:hover .card-cta,.template-card:focus-within .card-cta{opacity:1;transform:translateY(0)}.card-cta:hover{background:white;color:var(--accent)}.card-caption{height:var(--gallery-caption-height);padding:11px 13px 9px;display:flex;flex-direction:column;justify-content:center;min-width:0}.card-caption h3{font-size:12px;font-weight:600;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.12px}.card-category{margin-top:3px;display:flex;align-items:center;gap:6px;min-width:0;color:#8b9ca7;font-size:9px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-category span{overflow:hidden;text-overflow:ellipsis}.template-card[data-size="large"] .card-caption h3{font-size:14px}.template-card[data-size="large"] .card-category{font-size:10px}.image-fallback{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;padding:20px;background:linear-gradient(145deg,#d4e9ed,#e1d9ed,#d4e9e0);color:#557b87;text-align:center;font-size:11px}.image-fallback svg{width:28px;height:28px;opacity:.6}.gallery-sentinel{height:2px;width:100%;pointer-events:none}.gallery-status{display:flex;align-items:center;justify-content:center;gap:9px;padding:35px 16px;color:#8298a6;font-size:11px}.gallery-status .spinner{width:14px;height:14px;border:2px solid rgba(0,140,153,.12);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.empty-state{padding:60px 20px;text-align:center;background:rgba(255,255,255,.55);border:1px dashed var(--line);border-radius:16px}.empty-state h3{font-size:17px;font-weight:600}.empty-state p{font-size:12px;color:#7c929f;margin-top:8px}.empty-state button{margin-top:18px}.page-footer{padding:22px 0 33px;display:flex;justify-content:space-between;gap:20px;color:#91a2ad;font-size:10px;border-top:1px solid rgba(73,111,130,.09)}.page-footer a:hover{color:var(--accent)}

.back-editor{position:fixed;z-index:45;right:28px;bottom:24px;display:flex;align-items:center;gap:12px;min-height:57px;padding:11px 18px;color:white;background:rgba(0,123,137,.95);border:1px solid rgba(255,255,255,.35);border-radius:15px;box-shadow:0 8px 28px rgba(0,96,111,.22);backdrop-filter:blur(16px)}.back-editor:hover{background:var(--accent-dark)}.back-editor>svg{width:18px;height:18px}.back-editor-copy{text-align:left}.back-editor-copy strong{display:block;font-size:12px;font-weight:600}.back-editor-copy small{display:block;font-size:10px;color:rgba(255,255,255,.72);margin-top:2px}.toast{position:fixed;z-index:110;left:calc(50% + 46px);bottom:28px;transform:translate(-50%,14px);padding:12px 18px;max-width:calc(100vw - 50px);border-radius:12px;background:#233f4a;color:white;font-size:12px;box-shadow:0 6px 25px rgba(22,48,61,.17);opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;text-align:center}.toast.show{opacity:1;transform:translate(-50%,0)}

dialog{border:1px solid rgba(255,255,255,.8);padding:0;color:var(--ink);background:#fbfdfe;border-radius:21px;box-shadow:0 25px 110px rgba(14,37,50,.26)}dialog::backdrop{background:rgba(16,36,48,.48);backdrop-filter:blur(9px)}dialog.preview-dialog{width:min(1080px,calc(100vw - 70px));max-height:calc(100dvh - 70px);overflow:auto}.dialog-close{position:absolute;top:14px;right:14px;z-index:10;display:flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border-radius:50%;background:rgba(255,255,255,.9);border:1px solid var(--line);color:#4d6979}.dialog-close:hover{background:white;color:var(--accent)}.dialog-close svg{width:16px;height:16px}.preview-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);min-height:510px}.modal-art{position:relative;min-width:0;background:#101b25;display:flex;align-items:center;justify-content:center;min-height:510px}.modal-art video,.modal-art img{width:100%;max-height:calc(100dvh - 70px);object-fit:contain}.preview-copy{padding:48px 32px 29px;display:flex;flex-direction:column;min-width:0}.template-label{color:var(--accent);font-size:10px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase}.preview-copy h2{margin-top:10px;font-size:25px;line-height:1.25;font-weight:650;letter-spacing:-.7px}.preview-copy>p{font-size:12px;line-height:1.7;color:#7c919e;margin-top:12px}.preview-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:17px}.preview-tags span{padding:4px 8px;background:#eff5f7;border:1px solid #e6eef1;color:#72909e;border-radius:6px;font-size:10px}.prompt-block{padding:16px;margin-top:24px;background:#f1f7f8;border:1px solid #e1ecef;border-radius:12px;max-height:265px;overflow:auto}.prompt-block h3,.prompt-block strong{font-size:11px;color:#4b6b7b;font-weight:650}.prompt-block p{font-size:12px;color:#5f7b8a;line-height:1.8;white-space:pre-wrap;margin-top:8px}.prompt-block textarea{resize:vertical;min-height:150px;width:100%;border:0;background:transparent;color:#5f7b8a;font-size:12px;line-height:1.8}.preview-actions{display:flex;gap:9px;margin-top:auto;padding-top:25px}.preview-actions .primary-button{flex:1}.preview-actions .secondary-button{padding:11px 14px}.request-dialog{width:min(500px,calc(100vw - 40px));max-height:calc(100dvh - 40px);overflow:auto}.request-content{padding:37px 30px 29px}.request-content h2{font-size:23px;line-height:1.3;letter-spacing:-.5px}.request-content>p{margin-top:12px;font-size:12px;line-height:1.8;color:#718996}.request-summary{margin-top:22px;border:1px solid #e3edef;background:#f2f8f9;border-radius:12px;padding:16px;font-size:12px;color:#526f7f}.request-summary dl{margin:0;display:grid;grid-template-columns:1fr 1fr;gap:10px}.request-summary dt{color:#8ba0ab}.request-summary dd{margin:0;text-align:right;font-weight:500}.request-summary p{line-height:1.7;overflow-wrap:anywhere}.request-summary p+p{margin-top:9px}.request-actions{display:flex;gap:9px;margin-top:24px}.request-actions>*{flex:1}

@media(min-width:1800px){.gallery-grid{--gallery-columns:5}.settings-panel,.preview-panel{padding:21px}.heading-copy h1{font-size:34px}.page-heading{margin-bottom:34px}.field{margin-top:24px}.prompt-input{min-height:92px}.upload-zone{min-height:112px}.option-button{min-height:40px}.model-select,.select-input{min-height:46px}.gallery-section{margin-top:62px}}
@media(max-width:1399px){main{padding:28px 32px 0}.topbar{padding:0 32px}.creation-grid{gap:28px;grid-template-columns:405px minmax(0,1fr)}.settings-panel,.preview-panel{padding:21px}.page-heading{margin-bottom:26px}.heading-copy h1{font-size:29px}.theme-controls{gap:6px}.safety-link{font-size:11px}.gallery-section{margin-top:44px}.preview-empty-note{font-size:10px}.card-caption{padding-left:11px;padding-right:11px}}
@media(max-width:1199px){.gallery-grid{--gallery-columns:3}.rail{width:80px;padding-left:5px;padding-right:5px}.workspace{margin-left:80px}.topbar{height:76px;padding:0 26px}.top-actions{gap:15px}.rail-logo{margin-bottom:23px}.rail-link{width:66px}.creation-grid{gap:28px;grid-template-columns:405px minmax(0,1fr)}main{padding:27px 26px 0}.heading-copy p{max-width:450px;font-size:12px}.colour-control{padding:7px 9px}.theme-controls .icon-button{width:36px;height:36px}.preview-panel{padding:21px}.preview-stage{min-height:275px}.waiting-icon{width:50px;height:50px;border-radius:15px;margin-bottom:15px}.waiting-icon svg{width:24px;height:24px}.waiting-state{padding:20px}.waiting-state p{max-width:240px;font-size:10px}.gallery-title h2{font-size:25px}.gallery-section{padding-top:26px}.toast{left:calc(50% + 40px)}html{scroll-padding-top:96px}.creation-grid{scroll-margin-top:96px}}
@media(max-width:1120px){.creation-grid{grid-template-columns:360px minmax(0,1fr)}}
@media(max-width:999px){.page-heading{align-items:flex-start}.heading-copy p{max-width:380px}.theme-controls{flex-wrap:wrap;justify-content:flex-end;max-width:165px}.colour-control{max-width:165px}.top-actions{gap:12px}.safety-link{font-size:10px}.searchbox{width:240px}.preview-panel .section-title,.section-title{font-size:17px}.settings-panel,.preview-panel{padding:21px}.option-group{gap:5px}.option-button{min-width:40px;font-size:10px}.creation-grid{grid-template-columns:360px minmax(0,1fr);gap:28px}.preview-description{align-items:flex-start;flex-direction:column}.preview-layout{grid-template-columns:minmax(0,1fr) minmax(300px,1fr)}.preview-copy{padding:44px 24px 24px}}
@media(max-width:900px){.creation-grid{grid-template-columns:minmax(0,1fr);gap:20px}.settings-panel,.preview-panel{padding:21px}.preview-stage{min-height:0}.settings-panel .prompt-input{min-height:128px}.settings-panel .field{margin-top:20px}.settings-panel .field:first-of-type{margin-top:0}.panel-heading{margin-bottom:20px}.model-select,.select-input{min-height:44px}.option-button{min-height:41px;font-size:12px}.upload-zone{min-height:114px}.settings-panel>.primary-button{min-height:46px}.preview-description{flex-direction:row;align-items:center}.gallery-section{margin-top:36px}.gallery-heading{gap:15px}.gallery-title h2{font-size:23px}.gallery-title p{font-size:11px}.searchbox{width:210px}.theme-controls{max-width:145px}.colour-control{font-size:10px}.colour-control select{max-width:90px}.preview-layout{grid-template-columns:1fr}.modal-art{min-height:0;max-height:48dvh}.modal-art video,.modal-art img{max-height:48dvh}.preview-copy{padding:26px}.preview-copy h2{font-size:23px}.prompt-block{margin-top:20px;max-height:180px}.preview-actions{padding-top:20px}.preview-layout{min-height:0}.request-content{padding:36px 25px 25px}}
@media(max-width:699px){.rail{display:none}.workspace{margin-left:0}.topbar{height:66px;padding:0 18px;gap:10px}.top-actions{gap:10px}.back-link{font-size:12px;gap:7px}.back-link svg{width:17px;height:17px}.safety-link{font-size:9px;gap:4px;max-width:145px;line-height:1.35}.safety-link svg{width:13px;height:13px}.language-button{min-height:38px;padding:0 10px;font-size:10px}main{padding:25px 16px 0}.page-heading{gap:15px;align-items:flex-start;margin-bottom:24px}.heading-copy h1{font-size:29px;letter-spacing:-1px}.heading-copy p{font-size:11px;line-height:1.6;max-width:270px}.eyebrow{font-size:9px;letter-spacing:1.2px;margin-bottom:8px}.theme-controls{max-width:134px;gap:7px}.colour-control{min-height:36px;padding:6px 8px;gap:7px}.colour-control select{max-width:75px;font-size:10px}.colour-dots{gap:3px}.colour-dots span,.colour-dots i{width:7px;height:7px}.theme-controls .icon-button{width:33px;height:33px}.theme-controls .icon-button svg{width:16px;height:16px}.panel{border-radius:17px}.settings-panel,.preview-panel{padding:21px 19px}.field-label{font-size:12px}.prompt-input,.model-select,.select-input{font-size:16px}.prompt-input{line-height:1.5;min-height:145px}.field-help{font-size:10px}.model-select,.select-input{min-height:46px}.option-button{min-height:44px;font-size:12px}.primary-button,.secondary-button{min-height:46px}.settings-panel>.primary-button{font-size:13px;min-height:48px}.upload-zone{min-height:120px}.upload-title{font-size:12px}.upload-caption{font-size:10px}.advanced-settings>summary{min-height:39px}.check-option{min-height:40px;font-size:12px}.reference-chip{font-size:11px}.remove-reference{width:34px;height:34px}.text-button{min-height:36px}.preview-stage{border-radius:11px}.waiting-state{padding:17px}.waiting-icon{width:42px;height:42px;margin-bottom:12px;border-radius:12px}.waiting-icon svg{width:21px;height:21px}.waiting-state h3,.waiting-state strong{font-size:12px}.waiting-state p{font-size:10px;margin-top:4px}.preview-empty-note{font-size:10px;line-height:1.65}.gallery-section{margin-top:34px;padding-top:26px}.gallery-heading{display:block;margin-bottom:16px}.gallery-title h2{font-size:24px}.gallery-title p{font-size:11px;line-height:1.6}.searchbox{width:100%;min-height:44px;margin-top:19px}.searchbox input{font-size:16px;height:42px}.gallery-toolbar{margin-bottom:13px}.gallery-tabs{gap:20px}.gallery-tabs button{min-height:44px;font-size:12px;padding-bottom:10px}.result-count{font-size:10px}.category-row{gap:6px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:4px;margin-bottom:18px;margin-right:-16px;padding-right:16px}.category-row::-webkit-scrollbar{display:none}.chip{min-height:40px;font-size:11px;padding:8px 12px;border-radius:9px;flex-shrink:0}.gallery-grid{--gallery-columns:2;--gallery-gap:10px}.template-card{border-radius:12px}.card-caption{padding:10px 10px 8px}.card-caption h3{font-size:11px}.card-category{font-size:9px;gap:4px}.template-card[data-size="large"] .card-caption h3{font-size:14px}.template-card[data-size="large"] .card-category{font-size:10px}.duration-badge{font-size:9px;left:8px;bottom:9px;padding:4px 6px}.card-actions{top:7px;right:7px;opacity:1;gap:4px}.quick-view,.save-button{width:36px;height:36px;border-radius:8px}.quick-view svg,.save-button svg{width:15px;height:15px}.quick-view{display:none}.card-cta{opacity:1;transform:none;right:8px;bottom:8px;min-height:32px;padding:5px 7px;font-size:9px;gap:3px}.card-cta svg{width:11px;height:11px}.template-card[data-size="large"] .card-cta{min-height:36px;font-size:11px;padding:7px 11px}.gallery-status{padding:29px 10px;font-size:10px}.page-footer{flex-direction:column;gap:6px;padding-bottom:28px;font-size:9px}.back-editor{right:16px;bottom:16px;padding:10px 14px;gap:9px;min-height:52px;border-radius:13px}.back-editor-copy strong{font-size:11px}.back-editor-copy small{font-size:9px}.toast{left:50%;bottom:81px;font-size:11px;max-width:calc(100vw - 32px)}dialog.preview-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:17px}.dialog-close{width:39px;height:39px;top:11px;right:11px}.preview-copy{padding:24px 20px}.preview-copy h2{font-size:22px}.preview-copy>p{font-size:12px}.prompt-block{padding:14px;max-height:190px}.preview-actions{gap:7px}.preview-actions .secondary-button{padding:10px 12px}.preview-tags span{font-size:10px}.modal-art video,.modal-art img{max-height:40dvh}.modal-art{max-height:40dvh}.request-dialog{width:calc(100vw - 28px);border-radius:17px}.request-content{padding:40px 22px 24px}.request-content h2{font-size:22px}.request-summary dl{font-size:11px}.request-actions{gap:8px}html{scroll-padding-top:84px}.creation-grid{scroll-margin-top:84px}.orb{filter:blur(70px);opacity:.3;min-width:450px;min-height:450px}.orb.one{left:-80%;top:-20%}.orb.two{right:-70%;top:25%}.orb.three{left:-30%;bottom:-20%}}
@media(max-width:399px){main{padding-left:12px;padding-right:12px}.topbar{padding:0 12px}.safety-link{max-width:115px;font-size:8px}.top-actions{gap:8px}.page-heading{gap:8px}.heading-copy h1{font-size:26px}.heading-copy p{max-width:200px;font-size:10px}.theme-controls{max-width:113px}.colour-control{gap:5px;padding:5px 7px}.colour-control select{max-width:66px;font-size:9px}.colour-dots span,.colour-dots i{width:6px;height:6px}.settings-panel,.preview-panel{padding:20px 16px}.card-caption{padding-left:8px;padding-right:8px}.card-caption h3{font-size:10px}.card-category{font-size:8px}.card-cta{font-size:8px;min-height:30px;padding:5px 6px}.duration-badge{font-size:8px;left:6px}.gallery-tabs{gap:17px}.gallery-tabs button{font-size:11px}}
@media(hover:none){.card-actions,.card-cta{opacity:1;transform:none}.media-button img{transition:none}.template-card:hover .media-button img{transform:none}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}.orb{animation:none!important;will-change:auto}.template-card:hover .media-button img{transform:none}.gallery-status .spinner{animation:none!important}}

/* Integration with the live page structure. */
body{isolation:isolate}
.rail-logo{width:66px;height:71px;flex-direction:column;gap:6px;background:transparent;border-radius:0;box-shadow:none;letter-spacing:0;margin-bottom:20px}
.rail-logo img:first-child{width:38px;height:38px;object-fit:contain}
.rail-logo img:last-child{width:57px;height:auto;max-height:22px;object-fit:contain}
.profile-dot{display:flex;align-items:center;justify-content:center;width:35px;height:35px;border:1px solid rgba(0,140,153,.2);border-radius:50%;background:linear-gradient(135deg,#dff5f4,#e5edf9);color:#278590;font-size:13px;font-weight:650}
.gallery-sentinel{position:absolute;left:0}
.card-cta{bottom:calc(var(--gallery-caption-height) + 11px)}
.prompt-block{font-family:inherit;font-size:12px;line-height:1.8;color:#5f7b8a;white-space:pre-wrap;overflow-wrap:anywhere;overscroll-behavior:contain}
.preview-copy>h3{margin-top:22px;font-size:11px;font-weight:650;color:#4b6b7b}
.preview-copy>h3+.prompt-block{margin-top:9px}
pre.request-summary{font-family:inherit;font-size:11px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere;max-height:280px;overflow:auto;overscroll-behavior:contain}
.selected-info>small{display:block;color:#81949f;font-size:10px;margin-bottom:3px}
.preview-description .preview-empty-note{margin:0;max-width:none;text-align:left}
.field>.field-help{margin:-3px 0 9px}
#videoLoadError{color:#bdcbd4;font-size:12px;line-height:1.7;text-align:center;padding:28px;max-width:350px}
@media(max-width:699px){.card-cta,.template-card[data-size="large"] .card-cta{bottom:calc(var(--gallery-caption-height) + 8px);min-height:44px;font-size:10px;padding:8px 9px}.save-button,.quick-view{min-width:44px;min-height:44px}.theme-controls .icon-button{width:44px;height:44px}.colour-control{min-height:44px}.language-button{min-height:44px}.prompt-block{font-size:12px}.request-summary{max-height:240px}.dialog-close{width:44px;height:44px}.theme-controls{max-width:140px}.preview-description{gap:12px}.preview-description>.text-button{white-space:nowrap}}
@media(max-width:399px){.theme-controls{max-width:124px}.card-cta,.template-card[data-size="large"] .card-cta{font-size:9px;padding:8px 7px}}

/* Keep horizontal category scrolling contained at every mobile width. */
@media(max-width:699px){.category-row{margin-right:0;padding-right:0}}

/* Gallery playback is independent of background colour motion. */
.gallery-playback-controls{display:flex;align-items:center;gap:16px}
.preview-motion-toggle{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 10px;font-size:11px;color:var(--accent-dark);border:1px solid rgba(0,140,153,.18);border-radius:9px;background:rgba(255,255,255,.65)}
.preview-motion-toggle svg{width:14px;height:14px}
.media-button video{pointer-events:none}
@media(max-width:699px){.gallery-playback-controls{gap:3px;flex-direction:column;align-items:flex-end}.preview-motion-toggle{min-height:44px;font-size:10px;padding:6px 9px}}

/* Card dimensions follow the source frame: no cropping or letterbox bars. */
.media-button{background:transparent}
.media-button img,.media-button video{object-fit:contain}
.template-card:hover .media-button img{transform:none}

/* The detailed player also uses its intrinsic dimensions, without a black stage. */
.modal-art{background:transparent}
.modal-art video,.modal-art img{width:auto;height:auto;max-width:100%}
@media(max-width:699px){.template-card[data-size="small"] .duration-badge{top:12px;bottom:auto}}

/* Compact, unequal-width masonry lanes: consistent gutters without empty channels. */
.gallery-grid{--gallery-gap:12px}
@media(max-width:699px){.gallery-grid{--gallery-gap:10px}}
/* Let the preview surface fill the same desktop row as Video settings. */
@media(min-width:901px){
  .creation-grid{align-items:stretch}
  .preview-panel{display:flex;flex-direction:column}
  .preview-panel .panel-heading,.preview-description{flex-shrink:0}
  .preview-stage{flex:1;min-height:320px;aspect-ratio:auto;max-width:none}
}

/* Very short screens retain full-frame clips; the card opens the full action dialog. */
.template-card[data-compact="true"] .card-cta{display:none}

/* Scoped integration with the existing FuuVo application frame. */
:host{
  display:block;
  position:relative;
  isolation:isolate;
  min-height:calc(100dvh - 64px);
  overflow:hidden;
  color-scheme:light;
  --ink:#203141;
  --muted:#697b89;
  --line:rgba(58,92,111,.14);
  --accent:#008c99;
  --accent-dark:#00727e;
  --glass:rgba(255,255,255,.83);
  --shadow:0 14px 45px rgba(51,96,111,.065);
  --radius:10px;
  --video-studio-background:#f8fbfc;
  color:var(--ink);
  background:var(--video-studio-background);
  font-family:'DM Sans',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}
:host([data-palette="rose"]){--orb-one:#ffc7c4;--orb-two:#d2baff;--orb-three:#ffdeb7}
:host([data-palette="orchid"]){--orb-one:#d0bbff;--orb-two:#a8dcfb;--orb-three:#f7c9e8}
:host([data-palette="sunrise"]){--orb-one:#ffdaa0;--orb-two:#ffc6d4;--orb-three:#bce9d7}
:host .ambient{position:absolute;inset:0 0 auto;z-index:0;height:clamp(600px,100vh,900px);min-height:0;border-radius:inherit;-webkit-mask-image:linear-gradient(#000 55%,transparent);mask-image:linear-gradient(#000 55%,transparent)}
:host([data-motion="paused"]) .orb{animation-play-state:paused}
:host .workspace{margin-left:0;min-height:0;position:relative;z-index:1}
:host main{max-width:2100px}
:host .toast{left:50%}
:host .back-editor{right:24px}
.creation-toolbar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.long-video-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:8px 12px;border:1px solid rgba(0,140,153,.22);border-radius:10px;background:rgba(255,255,255,.72);color:var(--accent-dark);font-size:11px;font-weight:650}
.long-video-button:hover{background:#fff;border-color:rgba(0,140,153,.48)}
.generation-progress{display:flex;align-items:center;gap:10px;margin-top:18px;padding:13px 14px;border:1px solid #dbecee;border-radius:11px;background:#f2f9f9;color:#5d7883;font-size:12px;line-height:1.6}
.generation-progress[hidden],.generation-error[hidden]{display:none!important}
.generation-spinner{width:18px;height:18px;flex:0 0 18px;border:2px solid #d2e8e9;border-top-color:var(--accent);border-radius:50%;animation:generationSpin .8s linear infinite}
.generation-error{margin-top:18px;padding:13px 14px;border:1px solid #f0cbd1;border-radius:11px;background:#fff6f7;color:#a03d4c;font-size:12px;line-height:1.6}
.video-result-actions{display:flex;gap:9px;margin-top:16px}
.video-result-actions a{flex:1}
@keyframes generationSpin{to{transform:rotate(360deg)}}
@media(max-width:900px){:host .toast{left:50%}}
@media(prefers-reduced-motion:reduce){.generation-spinner{animation:none!important}}
.primary-button{color:#fff!important;background:#007f8a!important;box-shadow:0 5px 13px rgba(0,96,107,.18)!important}
.primary-button:hover{background:#00636d!important}
.primary-button:disabled{opacity:1!important;background:#dce9ec!important;color:#5e777e!important;box-shadow:none!important}
.secondary-button{color:#294e5a!important;background:rgba(255,255,255,.92)!important;border-color:rgba(46,104,121,.26)!important}
:host-context(html[data-ui-theme="dark"]) .primary-button,
:host-context(body[data-ui-theme="dark"]) .primary-button{background:#45d0dc!important;color:#06272c!important;box-shadow:0 5px 16px rgba(25,195,209,.2)!important}
:host-context(html[data-ui-theme="dark"]) .primary-button:hover,
:host-context(body[data-ui-theme="dark"]) .primary-button:hover{background:#72e2eb!important}
:host-context(html[data-ui-theme="dark"]) .primary-button:disabled,
:host-context(body[data-ui-theme="dark"]) .primary-button:disabled{background:#263a43!important;color:#a9bec6!important}
:host-context(html[data-ui-theme="dark"]) .secondary-button,
:host-context(body[data-ui-theme="dark"]) .secondary-button{background:#1a2a33!important;color:#e5f0f4!important;border-color:#405a68!important}

/* These surfaces live in a shadow root and cannot inherit the shell's theme rules. */
:host([data-ui-theme="dark"]){color-scheme:dark;--video-studio-background:#101820;--ink:#e5edf3;--muted:#a6b8c5;--line:#354a59;--glass:rgba(23,36,47,.94);--shadow:0 14px 45px rgba(0,0,0,.16);--accent:#66d6df;--accent-dark:#8de5ec}
:host([data-ui-theme="dark"]) .ambient{background:transparent}
:host([data-ui-theme="dark"]) .orb{opacity:.2}
:host([data-ui-theme="dark"]) :is(.panel,.template-card,dialog){border-color:var(--line);background:var(--glass)}
:host([data-ui-theme="dark"]) :is(.colour-control,.icon-button,.long-video-button,.model-select,.select-input,.prompt-input,.option-button,.searchbox,.chip,.dialog-close,.waiting-icon,.preview-motion-toggle){background:#1a2a36;color:var(--ink);border-color:var(--line)}
:host([data-ui-theme="dark"]) :is(.colour-control,.icon-button,.long-video-button,.dialog-close):hover{background:#253c49;color:var(--accent)}
:host([data-ui-theme="dark"]) :is(.field-label,.upload-title,.advanced-settings>summary,.preview-copy>h3,.preview-description){color:#d6e2eb}
:host([data-ui-theme="dark"]) :is(.field-help,.upload-caption,.prompt-meta,.preview-note,.preview-empty-note,.preview-description p,.gallery-title p,.card-category,.result-count,.gallery-status,.waiting-state,.waiting-state h3,.waiting-state p,.preview-copy>p,.prompt-block){color:var(--muted)}
:host([data-ui-theme="dark"]) :is(.prompt-input,.searchbox input)::placeholder{color:#98aebd}
:host([data-ui-theme="dark"]) .upload-zone{background:#172935;border-color:#456171}
:host([data-ui-theme="dark"]) .upload-zone:hover{background:#203b47;border-color:var(--accent)}
:host([data-ui-theme="dark"]) :is(.option-button,.chip).active,
:host([data-ui-theme="dark"]) :is(.option-button,.chip)[aria-pressed="true"]{background:#20424b;color:#a4f0f4;border-color:#51a5b0}
:host([data-ui-theme="dark"]) .preview-stage{background:linear-gradient(138deg,#1b2c38,#15232f);border-color:var(--line)}
:host([data-ui-theme="dark"]) :is(.selected-template,.preview-tags span,.generation-progress){background:#203842;color:var(--ink);border-color:#385764}
:host([data-ui-theme="dark"]) :is(.reference-chip,.prompt-block){background:#1a2a36;color:var(--ink);border-color:var(--line)}
:host([data-ui-theme="dark"]) :is(.check-option,.prompt-block p,.prompt-block textarea,.prompt-block h3,.prompt-block strong){color:var(--ink)}
:host([data-ui-theme="dark"]) .empty-state{background:var(--glass);border-color:var(--line)}
:host([data-ui-theme="dark"]) .generation-error{background:#3b252f;color:#f4c0ca;border-color:#79505c}
:host([data-ui-theme="dark"]) .primary-button{background:#45d0dc!important;color:#06272c!important}
:host([data-ui-theme="dark"]) .primary-button:hover{background:#72e2eb!important}
:host([data-ui-theme="dark"]) .primary-button:disabled{background:#263a43!important;color:#a9bec6!important}
:host([data-ui-theme="dark"]) .secondary-button{background:#1a2a33!important;color:#e5f0f4!important;border-color:#405a68!important}

/* Preserve readable helper text and selected controls on the bright panels. */
:host(:not([data-ui-theme="dark"])) :is(.upload-title,.upload-caption,.waiting-state h3,.waiting-state strong,.waiting-state p,.check-option){color:#526a79}
:host(:not([data-ui-theme="dark"])) :is(.prompt-input,.searchbox input)::placeholder{color:#526a79;opacity:1}
:host(:not([data-ui-theme="dark"])) :is(.option-button,.chip).active,
:host(:not([data-ui-theme="dark"])) :is(.option-button,.chip)[aria-pressed="true"]{color:#006571}

/* Native model selects must shrink within the embedded desktop control rail. */
:host{box-sizing:border-box;min-width:0;max-width:100%}
:host .workspace,:host main,.creation-grid,.settings-panel,.preview-panel,.field{box-sizing:border-box;min-width:0}
.creation-grid,.settings-panel,.preview-panel,.field,.model-select,.select-input,.prompt-input{max-width:100%}
.model-select,.select-input,.prompt-input{box-sizing:border-box;min-width:0}
.model-select,.select-input{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
