/* Generated by scripts/build-style-bundles.mjs. Edit the source stylesheets. */
/* image-generator.css */
:root{--fr-page:#f6f7f9;--fr-surface:#ffffff;--fr-surface-2:#f2f4f7;--fr-text:#15181d;--fr-muted:#606875;--fr-soft:#858e9b;--fr-line:#d9dee6;--fr-line-strong:#b9c1cd;--fr-primary:#1f2937;--fr-primary-text:#ffffff;--fr-danger:#c92c4a;--fr-success:#087a48;--fr-shadow:0 18px 48px rgba(24,32,44,.12)}
html[data-theme="dark"],body.dark{--fr-page:#0b1220;--fr-surface:#111827;--fr-surface-2:#172033;--fr-text:#e5e7eb;--fr-muted:#94a3b8;--fr-soft:#7f8da1;--fr-line:#273246;--fr-line-strong:#3a475c;--fr-primary:#e5e7eb;--fr-primary-text:#0b1220;--fr-danger:#fb7185;--fr-success:#34d399;--fr-shadow:none}
*{box-sizing:border-box}
body{margin:0;background:var(--fr-page);color:var(--fr-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
button,input,a{font:inherit}
.fr-shell{width:min(var(--t67-page-max,1440px),calc(100% - 30px));margin:0 auto;padding:46px 0 72px}
.fr-hero{text-align:center}
.fr-kicker{margin:0 0 10px;color:var(--fr-soft);font-size:12px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.fr-hero h1{margin:0;color:var(--fr-text);font-size:clamp(34px,5vw,54px);line-height:1.04;letter-spacing:-.045em}
.fr-subtitle{max-width:680px;margin:15px auto 0;color:var(--fr-muted);font-size:15px;line-height:1.7}
.fr-demo{display:grid;width:min(680px,100%);margin:30px auto 0;grid-template-columns:1fr 1fr;overflow:hidden;border:1px solid var(--fr-line-strong);border-radius:17px;background:var(--fr-surface);box-shadow:var(--fr-shadow)}
.fr-demo-side{position:relative;min-height:270px;overflow:hidden;background:radial-gradient(circle at 70% 35%,rgba(104,123,255,.35),transparent 20%),linear-gradient(135deg,#667085,#20252d)}
.fr-demo-side::before{content:"";position:absolute;inset:20% 27%;border-radius:46% 46% 42% 42%;background:linear-gradient(145deg,#f0c6aa,#b87558);box-shadow:0 -42px 0 -12px #2c2525,0 72px 0 24px #34445e}
.fr-demo-side.low{filter:blur(1.7px);image-rendering:pixelated}
.fr-demo-side.high{filter:contrast(1.05) saturate(1.05)}
.fr-demo-side+.fr-demo-side{border-left:1px solid var(--fr-line-strong)}
.fr-demo-label{position:absolute;top:12px;z-index:2;padding:7px 10px;border-radius:7px;background:rgba(0,0,0,.72);color:#fff;font-size:12px;font-weight:1000}
.fr-demo-side:first-child .fr-demo-label{left:12px}
.fr-demo-side:last-child .fr-demo-label{right:12px}
.fr-demo-meta{position:absolute;left:50%;bottom:15px;transform:translateX(-50%);padding:7px 10px;border-radius:999px;background:rgba(0,0,0,.65);color:#fff;font-size:12px;font-weight:900;white-space:nowrap}
.fr-usage{margin:20px 0 15px;color:var(--fr-muted);font-size:12px;font-weight:800;text-align:center}
.fr-usage b{color:var(--fr-text)}
.fr-usage.limit{color:var(--fr-danger)}
.fr-usage[hidden]{display:none!important}
.fr-tool{width:min(780px,100%);margin:0 auto}
.fr-preview{display:grid;place-items:center;width:100%;margin:0 auto 16px}
.fr-preview img{display:block;max-width:100%;max-height:640px;object-fit:contain;border:1px solid var(--fr-line-strong);border-radius:16px;background:var(--fr-surface);box-shadow:var(--fr-shadow)}
.fr-preview[hidden],.fr-compare-wrap[hidden],.fr-actions[hidden],.fr-drop[hidden],.fr-progress[hidden],.fr-credit[hidden],.fr-details[hidden]{display:none!important}
.fr-compare-wrap{display:grid;place-items:center;margin:0 auto 20px}
.fr-compare{--split:50%;position:relative;overflow:hidden;width:100%;max-width:780px;border:1px solid var(--fr-line-strong);border-radius:16px;background:var(--fr-surface-2);box-shadow:var(--fr-shadow);touch-action:none;user-select:none}
.fr-compare img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.fr-before{background:var(--fr-surface-2)}
.fr-after{clip-path:inset(0 calc(100% - var(--split)) 0 0);background:var(--fr-surface-2)}
.fr-line{position:absolute;top:0;bottom:0;left:var(--split);width:2px;transform:translateX(-1px);background:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.25);pointer-events:none}
.fr-knob{position:absolute;left:var(--split);top:50%;display:grid;width:44px;height:44px;place-items:center;transform:translate(-50%,-50%);border-radius:50%;background:#fff;color:#111827;font-size:14px;font-weight:1000;box-shadow:0 7px 24px rgba(0,0,0,.32);pointer-events:none}
.fr-label{position:absolute;top:12px;z-index:3;padding:7px 10px;border-radius:7px;background:rgba(0,0,0,.72);color:#fff;font-size:12px;font-weight:1000}
.fr-label.before{left:12px}
.fr-label.after{right:12px}
.fr-drop{display:flex;min-height:205px;margin-bottom:20px;cursor:pointer;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:26px;border:2px dashed var(--fr-line-strong);border-radius:16px;background:#E6E6E6;color:var(--fr-text);text-align:center;transition:border-color .16s ease,background .16s ease}
.fr-drop:hover,.fr-drop.drag{border-color:var(--fr-text);background:var(--fr-surface-2)}
.fr-drop svg{width:36px;height:36px;margin-bottom:5px;fill:none;stroke:var(--fr-muted);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.fr-drop strong{font-size:16px}
.fr-drop span{color:var(--fr-muted);font-size:12px}
.fr-drop small{color:var(--fr-soft);font-size:11px}
.fr-run,.fr-download,.fr-another{min-height:54px;border-radius:14px;cursor:pointer;font-weight:900}
.fr-run{width:100%;min-height:62px;margin-top:14px;border:1px solid var(--fr-primary);background:var(--fr-primary);color:var(--fr-primary-text);font-size:17px}
.fr-run:hover{opacity:.9}
.fr-run:disabled{cursor:not-allowed;opacity:.42}
.fr-download{border:1px solid #315efb;background:#315efb;color:#fff}
.fr-another{border:1px solid var(--fr-line-strong);background:var(--fr-surface);color:var(--fr-text)}
.fr-download:hover,.fr-another:hover{opacity:.9}
.fr-actions{display:grid;grid-template-columns:1fr 1fr;gap:11px;width:min(520px,100%);margin:0 auto 17px}
.fr-details{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 0 16px}
.fr-detail{padding:13px;border:1px solid var(--fr-line);border-radius:13px;background:var(--fr-surface);text-align:center}
.fr-detail b{display:block;color:var(--fr-text);font-size:13px}
.fr-detail span{display:block;margin-top:4px;color:var(--fr-muted);font-size:11px}
.fr-credit{margin:12px 0 0;padding:11px 14px;border:1px solid var(--fr-line);border-radius:13px;background:var(--fr-surface);color:var(--fr-muted);font-size:12px;line-height:1.6}
.fr-credit b{color:var(--fr-text)}
.fr-status{min-height:20px;margin-top:10px;color:var(--fr-muted);font-size:12px;line-height:1.55;text-align:center}
.fr-status.success{color:var(--fr-success)}
.fr-status.error{color:var(--fr-danger)}
.fr-progress{height:3px;margin-top:8px;overflow:hidden;border-radius:99px;background:var(--fr-line)}
.fr-progress i{display:block;width:34%;height:100%;background:var(--fr-text);animation:uploading 1.05s infinite ease-in-out}
@keyframes uploading{from{transform:translateX(-120%)}
to{transform:translateX(400%)}
}
.fr-legal{max-width:760px;margin:15px auto 0;color:var(--fr-soft);font-size:10.5px;line-height:1.55;text-align:center}
.fr-legal a{color:var(--fr-muted);text-underline-offset:2px}
.fr-copy{width:min(780px,100%);margin:54px auto 0;padding:32px;border:1px solid var(--fr-line);border-radius:18px;background:var(--fr-surface);color:var(--fr-muted);font-size:14px;line-height:1.85}
.fr-copy h2,.fr-copy h3{color:var(--fr-text)}
.fr-copy h2{margin:0 0 12px;font-size:27px}
.fr-copy h3{margin:27px 0 8px;font-size:19px}
.fr-copy p{margin:0 0 13px}
.fr-copy ul{margin:9px 0 0;padding-left:20px}
.fr-copy li{margin:7px 0}
.fr-faq{display:grid;gap:10px;margin-top:17px}
.fr-faq details{padding:14px 16px;border:1px solid var(--fr-line);border-radius:14px;background:var(--fr-surface-2)}
.fr-faq summary{cursor:pointer;color:var(--fr-text);font-weight:900}
.fr-faq p{margin:9px 0 0}
@media(max-width:600px){.fr-shell{width:min(100% - 20px,940px);padding-top:30px}
.fr-demo-side{min-height:190px}
.fr-drop{min-height:180px}
.fr-actions{grid-template-columns:1fr}
.fr-details{grid-template-columns:1fr}
.fr-copy{padding:21px}
.fr-label{top:8px}
.fr-label.before{left:8px}
.fr-label.after{right:8px}
}
.fr-makeup-controls{margin:18px 0 14px;text-align:left}
.fr-makeup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.fr-makeup-grid label,.fr-makeup-extra{display:flex;flex-direction:column;gap:7px;color:var(--fr-text);font-size:13px;font-weight:800}
.fr-makeup-grid select,.fr-makeup-extra input,.fr-makeup-extra textarea{width:100%;min-height:50px;padding:0 14px;border:1px solid var(--fr-line);border-radius:13px;background:var(--fr-surface-2);color:var(--fr-text);font:inherit;outline:none;transition:.18s}
.fr-makeup-grid select:focus,.fr-makeup-extra input:focus,.fr-makeup-extra textarea:focus{border-color:#7c5cff;box-shadow:0 0 0 3px rgba(124,92,255,.14)}
.fr-makeup-extra{margin-top:12px}
@media(max-width:640px){.fr-makeup-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.fr-makeup-grid select,.fr-makeup-extra input,.fr-makeup-extra textarea{min-height:48px}
}
.fr-tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.fr-object-control .fr-tool-grid label,.fr-tool-extra{display:flex;flex-direction:column;gap:7px;color:var(--fr-text);font-size:13px;font-weight:800}
.fr-object-control select,.fr-object-control input,.fr-object-control textarea{width:100%;min-height:50px;padding:0 14px;border:1px solid var(--fr-line);border-radius:13px;background:var(--fr-surface-2);color:var(--fr-text);font:inherit;outline:none}
.fr-object-control select:focus,.fr-object-control input:focus,.fr-object-control textarea:focus{border-color:#7c5cff;box-shadow:0 0 0 3px rgba(124,92,255,.14)}
.fr-tool-extra{margin-top:12px}
@media(max-width:640px){.fr-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.fr-api-tool{width:min(780px,100%);margin:0 auto}
.fr-api-card{margin-top:16px;padding:18px;border:1px solid var(--fr-line);border-radius:17px;background:var(--fr-surface)}
.fr-api-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:13px}
.fr-api-head h2{margin:0;color:var(--fr-text);font-size:18px}
.fr-api-head p{margin:5px 0 0;color:var(--fr-muted);font-size:12px;line-height:1.55}
.fr-api-upload{position:relative;display:flex;min-height:220px;margin-bottom:0;overflow:hidden}
.fr-api-upload input{display:none}
.fr-api-upload .upload-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:24px}
.fr-api-upload .upload-empty b{font-size:34px;line-height:1;color:var(--fr-muted)}
.fr-api-upload .upload-empty strong{font-size:16px}
.fr-api-upload .upload-empty small{color:var(--fr-soft);font-size:12px;line-height:1.5}
.fr-api-upload .upload-preview{display:none;width:100%;height:100%;align-items:center;justify-content:center;padding:12px}
.fr-api-upload .upload-preview img{display:block;max-width:100%;max-height:360px;object-fit:contain;border:0;border-radius:13px;background:transparent;box-shadow:none}
.fr-api-upload.has-image .upload-empty{display:none}
.fr-api-upload.has-image .upload-preview{display:flex}
.fr-api-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.fr-api-chip{padding:5px 9px;border:1px solid var(--fr-line);border-radius:999px;background:var(--fr-surface-2);color:var(--fr-muted);font-size:10.5px;font-weight:800}
.fr-api-settings{margin-top:16px;text-align:left}
.fr-api-types{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.fr-api-type{min-height:58px;padding:11px;border:1px solid var(--fr-line);border-radius:13px;background:var(--fr-surface-2);color:var(--fr-text);text-align:left;cursor:pointer}
.fr-api-type b{display:block;font-size:12px}
.fr-api-type span{display:block;margin-top:3px;color:var(--fr-muted);font-size:10.5px;line-height:1.35}
.fr-api-type.active{border-color:#4f63f5;background:#eef1ff;box-shadow:0 0 0 2px rgba(79,99,245,.1)}
.fr-api-type.active b,.fr-api-type.active span{color:#3447c8}
.fr-api-field{display:flex;flex-direction:column;gap:7px;margin-top:12px;color:var(--fr-text);font-size:14px}
.fr-api-field>label{display:flex;align-items:center;justify-content:space-between;gap:10px}
.fr-api-field small{color:var(--fr-muted);font-size:10.5px;font-weight:600}
.fr-api-field input,.fr-api-field textarea,.fr-api-field select{width:100%;border:1px solid var(--fr-line);border-radius:13px;background:var(--fr-surface-2);color:var(--fr-text);font:inherit;outline:none}
.fr-api-field input,.fr-api-field select{min-height:46px;padding:0 12px}
.fr-api-field textarea{min-height:92px;padding:11px 12px;resize:vertical;line-height:1.5}
.fr-api-field input:focus,.fr-api-field textarea:focus,.fr-api-field select:focus{border-color:#7c5cff;box-shadow:0 0 0 3px rgba(124,92,255,.14)}
.fr-api-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.fr-api-examples{display:grid;gap:7px;margin-top:9px}
.fr-api-examples button{padding:9px 11px;border:1px solid var(--fr-line);border-radius:11px;background:var(--fr-surface);color:var(--fr-muted);text-align:left;font-size:12px;line-height:1.45;cursor:pointer}
.fr-api-examples button:hover{border-color:var(--fr-line-strong);color:var(--fr-text)}
.fr-api-mini{min-height:30px;padding:0 11px;border:1px solid var(--fr-line);border-radius:999px;background:var(--fr-surface);color:var(--fr-text);font-size:10.5px;font-weight:800;cursor:pointer}
.fr-api-result{margin-top:16px}
.fr-api-result-box{display:grid;place-items:center;min-height:260px;padding:14px;border:1px solid var(--fr-line);border-radius:16px;background:var(--fr-surface-2);color:var(--fr-muted);font-size:12px;line-height:1.6;text-align:center;overflow:hidden}
.result-item{width:100%;max-width:620px;margin:0 auto;overflow:hidden;border:1px solid var(--fr-line);border-radius:15px;background:var(--fr-surface)}
.result-img{display:flex;align-items:center;justify-content:center;padding:10px;background:var(--fr-surface-2)}
.result-img img{display:block;max-width:100%;max-height:720px;object-fit:contain;border-radius:11px}
.result-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;border-top:1px solid var(--fr-line)}
.result-actions a,.result-actions button{display:flex;min-height:40px;align-items:center;justify-content:center;border:1px solid var(--fr-line);border-radius:11px;background:var(--fr-surface);color:var(--fr-text);font-size:12px;font-weight:900;text-decoration:none;cursor:pointer}
.result-actions .blue{border-color:#315efb;background:#315efb;color:#fff}
.fr-api-credit{margin-top:11px;padding:10px 12px;border:1px solid var(--fr-line);border-radius:12px;background:var(--fr-surface);color:var(--fr-muted);font-size:11.5px;line-height:1.5}
.fr-api-status{min-height:20px;margin-top:9px;color:var(--fr-muted);font-size:12px;line-height:1.5;text-align:center}
.fr-api-copy{width:min(780px,100%);margin:50px auto 0;padding:28px;border:1px solid var(--fr-line);border-radius:18px;background:var(--fr-surface);color:var(--fr-muted);font-size:14px;line-height:1.8}
.fr-api-copy h2,.fr-api-copy h3{color:var(--fr-text)}
.fr-api-copy h2{margin:0 0 10px;font-size:26px}
.fr-api-copy h3{margin:22px 0 6px;font-size:18px}
.spinner{width:40px;height:40px;margin:0 auto 12px;border:4px solid var(--fr-line);border-top-color:var(--fr-text);border-radius:50%;animation:frApiSpin .8s linear infinite}
@keyframes frApiSpin{to{transform:rotate(360deg)}
}
@media(max-width:640px){.fr-api-card{padding:14px}
.fr-api-upload{min-height:190px}
.fr-api-types,.fr-api-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.fr-api-type{padding:9px;min-height:54px}
.fr-api-copy{padding:20px}
}
.fr-api-multi-tool{width:min(760px,100%)}
.fr-api-multi-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:24px}
.fr-api-multi-upload{position:relative;display:flex;min-width:0;min-height:285px;align-items:center;justify-content:center;overflow:hidden;border:1px solid var(--fr-line);border-radius:18px;background:linear-gradient(145deg,var(--fr-surface),var(--fr-surface-2));box-shadow:0 14px 34px rgba(24,32,44,.12);cursor:pointer;transition:box-shadow .18s ease,transform .18s ease,border-color .18s ease,background .18s ease}
.fr-api-multi-upload:hover,.fr-api-multi-upload.drag{border-color:var(--fr-line-strong);background:var(--fr-surface-2);box-shadow:0 20px 48px rgba(24,32,44,.20);transform:translateY(-2px)}
.fr-api-multi-upload input{display:none}
.fr-api-multi-empty{display:flex;width:100%;min-height:100%;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:24px;text-align:center}
.fr-api-multi-empty[hidden]{display:none!important}
.fr-api-multi-icon{display:grid;width:64px;height:64px;place-items:center;margin-bottom:5px;border-radius:18px;background:var(--fr-surface);font-size:31px;box-shadow:0 8px 22px rgba(24,32,44,.10)}
.fr-api-multi-empty strong{color:var(--fr-text);font-size:17px}
.fr-api-multi-empty small{color:var(--fr-muted);font-size:12px}
.fr-api-multi-preview{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:12px;background:var(--fr-surface-2)}
.fr-api-multi-preview[hidden]{display:none!important}
.fr-api-multi-preview img{display:block;width:100%;height:100%;object-fit:contain;border-radius:13px}
.fr-api-multi-preview button{position:absolute;right:10px;bottom:10px;min-height:34px;padding:0 11px;border:1px solid rgba(255,255,255,.3);border-radius:10px;background:rgba(17,24,39,.78);color:#fff;font-size:11px;font-weight:900;cursor:pointer;backdrop-filter:blur(7px)}
.fr-api-multi-extra{margin-top:15px}
.fr-api-multi-extra textarea{min-height:68px}
.fr-api-multi-tool>.fr-run{margin-top:15px}
.fr-api-multi-tool .fr-api-result{padding:0;border:0;background:transparent}
@media(max-width:640px){.fr-api-multi-grid{gap:10px}
.fr-api-multi-upload{min-height:210px;border-radius:15px}
.fr-api-multi-icon{width:52px;height:52px;font-size:25px}
.fr-api-multi-empty strong{font-size:14px}
.fr-api-multi-empty small{font-size:10.5px}
}
.fr-api-result-stage{position:relative;min-height:260px;border-radius:16px;overflow:hidden}
.fr-api-result-stage>.fr-api-result-box{min-height:260px}
.fr-api-generating{position:absolute;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(70,78,92,.82);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);color:#fff;text-align:center}
.fr-api-generating[hidden]{display:none!important}
.fr-api-generating-card{display:flex;min-width:220px;max-width:calc(100% - 32px);flex-direction:column;align-items:center;gap:10px;padding:22px 26px;border:1px solid rgba(255,255,255,.24);border-radius:16px;background:rgba(17,24,39,.88);box-shadow:0 16px 42px rgba(0,0,0,.28)}
.fr-api-generating-spinner{width:46px;height:46px;border:4px solid rgba(255,255,255,.30);border-top-color:#fff;border-radius:50%;animation:frApiGeneratingSpin .8s linear infinite}
.fr-api-generating-label{font-size:16px;font-weight:900;line-height:1.35}
.fr-api-generating-time{font-size:13px;font-variant-numeric:tabular-nums;opacity:.86}
@keyframes frApiGeneratingSpin{to{transform:rotate(360deg)}
}
.result-box{display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:240px}
.result-item{max-width:100%!important}
.result-img{width:100%;min-height:240px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.result-img img{display:block;width:100%!important;height:auto!important;max-width:100%!important;max-height:70vh!important;object-fit:contain!important}
.fr-hero{margin-bottom:20px}
.fr-hero .fr-kicker{margin-bottom:6px}
.fr-hero h1{font-size:clamp(34px,5vw,54px);line-height:1.05}
.fr-hero .fr-subtitle{margin-top:12px}
.core-tabs{display:flex;align-items:flex-end;gap:6px;width:min(780px,100%);max-width:100%;margin:0 auto -1px;padding:0;position:relative;z-index:5;overflow-x:auto;scrollbar-width:none}
.core-tabs::-webkit-scrollbar{display:none}
.core-tabs a{flex:0 0 auto;display:flex;height:39px;align-items:center;justify-content:center;padding:0 10px;border:1px solid #9ca3af;border-bottom-color:#d8dee7;border-radius:0;background:#f8fafc;color:#6b7280;box-shadow:inset 0 1px 0 rgba(255,255,255,.9);font-size:14px;font-weight:700;letter-spacing:.02em;text-decoration:none;transition:background .16s ease,color .16s ease,border-color .16s ease}
@media(max-width:640px){
.core-tabs a{flex:0 0 auto;display:flex;height:30px;align-items:center;justify-content:center;padding:0 6px;border:1px solid #9ca3af;border-bottom-color:#d8dee7;border-radius:0;background:#f8fafc;color:#6b7280;box-shadow:inset 0 1px 0 rgba(255,255,255,.9);font-size:12px;font-weight:700;letter-spacing:.02em;text-decoration:none;transition:background .16s ease,color .16s ease,border-color .16s ease}
}
.core-tabs a:hover{background:#fff;color:#111827}
.core-tabs a.active{border-color:#6b6b6b;border-bottom-color:#6b6b6b;background:#6b6b6b;color:#fff;box-shadow:0 -4px 12px rgba(15,23,42,.08)}
.core-workspace{padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.core-input-shell{position:relative;z-index:2;padding:10px;border:1px solid #d9e0e8;background:#fff;box-shadow:0 17px 36px rgba(15,23,42,.09)}
.core-input-card{margin:0!important;padding:18px!important;border:1px solid #dce3eb!important;border-radius:15px!important;background:#fbfcfe!important;box-shadow:inset 0 0 0 3px #f3f6f9!important}
.core-input-card textarea{min-height:150px!important;max-height:260px!important;padding:8px 2px!important;border:0!important;background:transparent!important;box-shadow:none!important;font-size:15px!important;line-height:1.65!important}
.core-composer{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;align-items:stretch}
.core-upload-side{display:flex;min-height:220px;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px 8px;border:1px solid #e1e7ef;border-radius:15px;background:#f8fafc}
.core-upload-tile{display:flex;width:120px;height:120px;min-height:120px;flex:0 0 auto;flex-direction:column;align-items:center;justify-content:center;padding:10px;border:1px solid #d5dde7;border-radius:16px;background:#fff;color:#111827;box-shadow:inset 0 0 0 3px #f3f6f9,0 8px 20px rgba(15,23,42,.06);font-size:13px;font-weight:800;cursor:pointer}
.core-upload-tile:hover{border-color:#bfc9d6;background:#fff;box-shadow:inset 0 0 0 3px #eef3f8,0 10px 24px rgba(15,23,42,.10)}
.core-upload-tile .ico{display:grid;width:48px;height:48px;place-items:center;margin:0 0 8px;border-radius:11px;background:#fff;box-shadow:0 7px 18px rgba(15,23,42,.10);font-size:25px}
.core-upload-side.has-images .core-upload-tile{display:none}
.core-reference-list{display:none;width:120px;flex-direction:column;gap:7px;margin:0}
.core-reference-list.has-images{display:flex}
.core-reference-item{position:relative;display:flex;width:120px;height:74px;align-items:center;justify-content:center;overflow:hidden;border:1px solid #d5dde7;border-radius:10px;background:#fff;box-shadow:inset 0 0 0 3px #f3f6f9}
.core-reference-item img{display:block;width:100%;height:100%;padding:4px;background:#fff;object-fit:contain}
.core-reference-number{position:absolute;top:4px;left:4px;display:grid;min-width:20px;height:20px;place-items:center;padding:0 5px;border-radius:999px;background:rgba(0,0,0,.68);color:#fff;font-size:10px;font-weight:800}
.core-upload-count{display:none;color:#64748b;font-size:10px;line-height:1.3;text-align:center}
.core-upload-count.show{display:block}
.core-upload-side .fr-create-clear{display:none;margin:0;padding:2px 4px;font-size:11px}
.core-upload-side.has-images .fr-create-clear{display:inline-block}
.core-upload-side .core-mode-note{margin:0;font-size:10px;line-height:1.35}
.core-prompt-side{min-width:0}
.core-prompt-side .core-input-card{height:100%}
.core-prompt-side .core-input-card textarea{min-height:174px!important}
.core-params-card{margin-top:20px!important;padding:20px!important;border:1px solid #dfe5ed!important;border-radius:18px!important;background:#f4f6f9!important;box-shadow:none!important}
.core-params-card::before{content:"Generation settings";display:block;margin-bottom:14px;color:#111827;font-size:14px;font-weight:850}
.core-video-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.core-video-options .fr-api-field.full{grid-column:1/-1}
.core-hidden-input{display:none}
.core-mode-note{text-align:center;color:#64748b}
.core-workspace>.fr-run{margin-top:16px}
.core-workspace>.fr-api-credit,.core-workspace>.fr-api-status{margin-right:3px;margin-left:3px}
.core-workspace>.fr-api-result{margin-top:22px!important;background:#fff!important}
#referencePreviewImg,#mainRefBox,#videoRefPreview,#imageTitle,#imageMeta,#referenceNote,#uploadNote{display:none!important}
@media(max-width:760px){.fr-hero{margin-bottom:16px}
.core-tabs{width:100%;margin:0 auto -1px;gap:3px}
.core-tabs a{flex:1 0 auto;height:37px;padding:0 10px;font-size:12px}
.core-input-shell{padding:10px}
.core-composer{grid-template-columns:1fr}
.core-upload-side{min-height:auto;align-items:center;justify-content:center}
.core-reference-list{width:100%;max-width:390px;flex-direction:row;justify-content:center;gap:7px}
.core-reference-item{width:calc((100% - 14px)/3);max-width:120px;height:88px}
.core-input-card textarea,.core-prompt-side .core-input-card textarea{min-height:145px!important}
.core-video-options{grid-template-columns:1fr}
}
.fr-api-result-box{height:auto;max-height:none;overflow:visible}
.fr-api-result-box .result-item,.resultBox .result-item,#resultBox .result-item{width:100%;max-width:100%;height:auto;overflow:visible}
.fr-api-result-box .result-img,.resultBox .result-img,#resultBox .result-img{display:flex;width:100%;height:auto;min-height:0;max-height:none;align-items:center;justify-content:center;overflow:visible;padding:10px;background:var(--fr-surface-2)}
.fr-api-result-box .result-img img,.resultBox .result-img img,#resultBox .result-img img,#resultBox>img{display:block!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:680px!important;margin:0 auto!important;object-fit:contain!important;object-position:center center!important}
@media(max-width:760px){.fr-api-result-box .result-img img,.resultBox .result-img img,#resultBox .result-img img,#resultBox>img{max-height:680px!important}
}
#resultBox{display:flex;align-items:center;justify-content:center}
#resultBox .result-item-single{width:100%;max-width:100%;margin:0 auto}
#resultBox .result-item-single .result-img{display:flex;width:100%;min-height:0;align-items:center;justify-content:center;overflow:visible}
#resultBox .result-item-single .result-img img{display:block;width:auto!important;height:auto!important;max-width:100%!important;max-height:680px!important;margin:0 auto;object-fit:contain!important;object-position:center center}
#resultBox .result-item-single .result-actions{grid-template-columns:1fr}

/* T67 core creation pages: responsive polish */
.core-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;overflow:visible}
.core-tabs a{min-width:0;width:100%;padding:0 8px;white-space:nowrap}
.core-upload-tile .ico{width:52px;height:52px;font-size:0}
.core-upload-tile .ico svg{display:block;width:29px;height:29px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:#667085}
.core-params-card::before{content:none!important;display:none!important}
.fr-create-four,.core-video-options{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.fr-create-four .fr-api-field,.core-video-options .fr-api-field{min-width:0;margin-top:0}
#resultBox img,#resultBox video,.fr-api-result-box img,.fr-api-result-box video,.result-img img,.result-img video{display:block!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:680px!important;margin:0 auto!important;object-fit:contain!important;object-position:center center!important}
@media(max-width:760px){
  .core-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:2px}
  .core-tabs a{height:34px;padding:0 2px;font-size:10px;letter-spacing:0;line-height:1.05;text-align:center}
  .core-input-shell{padding:8px}
  .core-composer{gap:10px}
  .core-upload-side{min-height:118px;padding:8px}
  .core-upload-tile{width:104px;height:96px;min-height:96px;padding:7px;border-radius:14px;font-size:12px}
  .core-upload-tile .ico{width:42px;height:42px;margin-bottom:5px;border-radius:10px}
  .core-upload-tile .ico svg{width:25px;height:25px}
  .core-reference-item{height:72px}
  .core-prompt-side .core-input-card textarea,.core-input-card textarea{min-height:118px!important}
  .core-params-card{margin-top:14px!important;padding:14px!important}
  .fr-create-four,.core-video-options{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px}
  .core-video-options .fr-api-field.full{grid-column:1/-1}
}
@media(max-width:380px){
  .core-tabs a{font-size:9px}
}


/* T67 result area show/hide + multi-image grid */
.result-card[hidden]{display:none!important}
.loading-gen{display:flex;min-height:240px;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px;color:var(--fr-muted);text-align:center;line-height:1.6}
.loading-gen b{display:block;color:var(--fr-text);font-size:18px;font-weight:900}
.loading-gen span{display:block;font-size:13px;color:var(--fr-muted)}
.result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%}
.result-grid .result-item{width:100%;max-width:none;margin:0;overflow:hidden;border:1px solid var(--fr-line);border-radius:15px;background:var(--fr-surface)}
.result-grid .result-img{display:flex;align-items:center;justify-content:center;min-height:180px;padding:10px;background:var(--fr-surface-2)}
.result-grid .result-img img{display:block;width:auto!important;height:auto!important;max-width:100%!important;max-height:680px!important;object-fit:contain!important;border-radius:11px}
.result-grid .result-actions{display:grid;grid-template-columns:1fr;gap:8px;padding:10px;border-top:1px solid var(--fr-line)}
.result-item-single video,.result-grid video,#resultBox video{display:block;width:auto!important;height:auto!important;max-width:100%!important;max-height:680px!important;margin:0 auto!important;object-fit:contain!important;object-position:center center!important;border-radius:11px}
@media(max-width:760px){.result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.result-grid{grid-template-columns:1fr}}
.fr-api-status a.status-link{color:#d11f3a!important;font-weight:900!important;text-decoration:none}
.fr-api-status a.status-link:hover{text-decoration:underline}
.result-slot .slot-state{display:flex;align-items:center;justify-content:center;min-height:220px;padding:16px;text-align:center}
.result-slot .slot-copy{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;max-width:100%}
.result-slot .slot-copy b{display:block;color:var(--fr-text);font-size:16px;font-weight:900}
.result-slot .slot-copy span{display:block;color:var(--fr-muted);font-size:13px;line-height:1.6}
.result-slot .slot-error{background:#fff3f5}
.result-slot .slot-error .slot-copy b{color:#b4233e}


/* result image quick actions */
.result-img.result-has-tools{position:relative;overflow:hidden}
.result-img.result-has-tools img{transition:transform .22s ease,filter .22s ease}
.result-img.result-has-tools:hover img,.result-img.result-has-tools:focus-within img{transform:scale(1.012);filter:brightness(.58)}
.result-hover-actions{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:14px;opacity:0;pointer-events:none;transition:opacity .2s ease;background:linear-gradient(180deg,rgba(9,15,28,.12),rgba(9,15,28,.38))}
.result-img.result-has-tools:hover .result-hover-actions,.result-img.result-has-tools:focus-within .result-hover-actions{opacity:1;pointer-events:auto}
.result-main-actions{display:flex;flex-direction:column;gap:10px;width:min(220px,84%)}
.result-action-btn{display:flex;align-items:center;justify-content:center;min-height:42px;padding:10px 14px;border:1px solid rgba(255,255,255,.34);border-radius:12px;background:rgba(255,255,255,.95);color:#172033;font-weight:800;line-height:1.2;box-shadow:0 10px 24px rgba(0,0,0,.18);cursor:pointer;transition:transform .18s ease,background .18s ease,color .18s ease;border:none}
.result-action-btn:hover{transform:translateY(-1px)}
.result-action-btn.primary{background:#325ef7;color:#fff}
@media(hover:none){.result-hover-actions{opacity:1;pointer-events:auto;align-items:flex-end;background:linear-gradient(180deg,rgba(9,15,28,0),rgba(9,15,28,.40))}.result-main-actions{width:100%;flex-direction:row}.result-action-btn{flex:1;min-height:40px;font-size:13px}}


/* Tool67 compact image generation parameters */
.core-params-card.core-compact-params{
  margin-top:16px!important;
  padding:10px!important;
  border:1px solid var(--fr-line)!important;
  border-radius:14px!important;
  background:var(--fr-surface)!important;
  box-shadow:none!important;
}
.core-compact-toolbar{
  display:grid;
  grid-template-columns:minmax(150px,1.35fr) repeat(4,minmax(82px,.8fr));
  gap:5px;
  align-items:end;
}
.core-compact-field{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:3px;
  color:var(--fr-muted);
  font-size:10px;
  font-weight:750;
  line-height:1.2;
}
.core-compact-field>span{padding-left:2px;white-space:nowrap}
.core-compact-field>select{
  display:block;
  box-sizing:border-box;
  width:100%;
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  padding:0 27px 0 9px!important;
  border:1px solid var(--fr-line)!important;
  border-radius:10px!important;
  background-color:var(--fr-surface)!important;
  color:var(--fr-text)!important;
  font-size:12px!important;
  font-weight:650!important;
  line-height:34px!important;
  outline:none;
  cursor:pointer;
  appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,#8a93a1 50%),linear-gradient(135deg,#8a93a1 50%,transparent 50%)!important;
  background-position:calc(100% - 14px) 50%,calc(100% - 10px) 50%!important;
  background-size:4px 4px,4px 4px!important;
  background-repeat:no-repeat!important;
}
.core-compact-field>select:hover{border-color:var(--fr-line-strong)!important}
.core-compact-field>select:focus{border-color:#6673ff!important;box-shadow:0 0 0 3px rgba(93,105,246,.12)!important}
.core-compact-params #modelInfo{margin:7px 2px 0;font-size:10px;line-height:1.4}
html[data-theme="dark"] .core-params-card.core-compact-params,.dark .core-params-card.core-compact-params{background:rgba(17,24,39,.42)!important;border-color:rgba(255,255,255,.12)!important}
html[data-theme="dark"] .core-compact-field>select,.dark .core-compact-field>select{background-color:rgba(17,24,39,.74)!important;border-color:rgba(255,255,255,.12)!important;color:#f8fafc!important}
@media(max-width:760px){
  .core-compact-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .core-compact-field:first-child{grid-column:1/-1}
  .core-compact-field>select{height:40px!important;min-height:40px!important;max-height:40px!important;line-height:38px!important}
}

/* Tool67 compact video generation parameters */
.core-params-card.core-video-compact-params{
  margin-top:14px!important;
  padding:9px 10px!important;
  border:1px solid var(--fr-line)!important;
  border-radius:13px!important;
  background:var(--fr-surface)!important;
  box-shadow:none!important;
}
.core-video-compact-params .core-video-options{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:6px!important;
  align-items:end;
}
.core-video-compact-params .core-video-options .fr-api-field{
  min-width:0;
  gap:3px;
  margin-top:0;
  color:var(--fr-muted);
  font-size:10px;
  font-weight:750;
  line-height:1.15;
}
.core-video-compact-params .core-video-options .fr-api-field>label{
  min-width:0;
  padding-left:2px;
  justify-content:flex-start;
  gap:4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.core-video-compact-params .core-video-options select{
  box-sizing:border-box;
  width:100%;
  height:34px!important;
  min-height:34px!important;
  max-height:34px!important;
  padding:0 24px 0 8px!important;
  border:1px solid var(--fr-line)!important;
  border-radius:9px!important;
  background-color:var(--fr-surface)!important;
  color:var(--fr-text)!important;
  font-size:11px!important;
  font-weight:650!important;
  line-height:32px!important;
  outline:none;
  cursor:pointer;
}
.core-video-compact-params .core-video-options select:focus{
  border-color:#6673ff!important;
  box-shadow:0 0 0 2px rgba(93,105,246,.10)!important;
}
.core-video-meta{
  display:flex;
  min-height:22px;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:6px 2px 0;
}
.core-video-model-info{
  min-width:0;
  flex:1 1 auto;
  margin:0!important;
  color:var(--fr-muted)!important;
  font-size:10px!important;
  font-weight:550!important;
  line-height:1.35!important;
}
.core-video-audio{
  flex:0 0 auto;
  margin:0!important;
  gap:0!important;
  color:var(--fr-muted)!important;
  font-size:10px!important;
  font-weight:700!important;
}
.core-video-audio>label{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:5px!important;
  white-space:nowrap;
  cursor:pointer;
}
.core-video-audio input[type="checkbox"]{
  width:13px!important;
  height:13px!important;
  min-height:13px!important;
  margin:0!important;
  padding:0!important;
  accent-color:#111827;
}
html[data-theme="dark"] .core-params-card.core-video-compact-params,.dark .core-params-card.core-video-compact-params{
  background:rgba(17,24,39,.42)!important;
  border-color:rgba(255,255,255,.12)!important;
}
html[data-theme="dark"] .core-video-compact-params .core-video-options select,.dark .core-video-compact-params .core-video-options select{
  background-color:rgba(17,24,39,.74)!important;
  border-color:rgba(255,255,255,.12)!important;
  color:#f8fafc!important;
}
html[data-theme="dark"] .core-video-audio input[type="checkbox"],.dark .core-video-audio input[type="checkbox"]{accent-color:#f8fafc}
@media(max-width:760px){
  .core-params-card.core-video-compact-params{margin-top:10px!important;padding:8px!important}
  .core-video-compact-params .core-video-options{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:6px!important;
  }
  .core-video-compact-params .core-video-options .fr-api-field{font-size:9px}
  .core-video-compact-params .core-video-options select{
    height:33px!important;
    min-height:33px!important;
    max-height:33px!important;
    padding:0 20px 0 6px!important;
    border-radius:8px!important;
    font-size:10px!important;
    line-height:31px!important;
  }
  .core-video-meta{
    min-height:20px;
    gap:7px;
    margin-top:5px;
  }
  .core-video-model-info{font-size:9px!important;line-height:1.3!important}
  .core-video-audio{font-size:9px!important}
  .core-video-audio input[type="checkbox"]{width:12px!important;height:12px!important;min-height:12px!important}
}
@media(max-width:390px){
  .core-video-compact-params .core-video-options{gap:5px!important}
  .core-video-compact-params .core-video-options select{font-size:9.5px!important;padding-left:5px!important}
  .core-video-meta{align-items:flex-start}
  .core-video-model-info{font-size:8.5px!important}
  .core-video-audio{font-size:8.5px!important}
}




/* Tool67 four basic pages — stable layout fix */
:root{
  --t67-page-width: 980px;
  --t67-core-height: 300px;
  --t67-gap: 12px;
  --t67-bg: #f4f6f8;
  --t67-line: #c9d2de;
  --t67-line-strong: #aab6c5;
  --t67-card: #ffffff;
  --t67-upload: #f7f8fa;
  --t67-upload-hover: #eef2f6;
  --t67-text: #111827;
  --t67-muted: #64748b;
  --t67-button: #1f2937;
  --t67-active: #777;
}
html[data-theme="dark"],body.dark{
  --t67-bg:#0b1220;
  --t67-line:#334155;
  --t67-line-strong:#475569;
  --t67-card:#111827;
  --t67-upload:#111827;
  --t67-upload-hover:#172033;
  --t67-text:#e5e7eb;
  --t67-muted:#94a3b8;
  --t67-button:#334155;
  --t67-active:#64748b;
}
html,body{background:var(--t67-bg)!important;color:var(--t67-text)!important;}
.t67-basic-page,.t67-video-basic-page{max-width:1100px!important;margin:0 auto!important;padding:8px 0 52px!important;background:transparent!important;}
.t67-basic-page .fr-hero,.t67-video-basic-page .fr-hero{text-align:center!important;padding:8px 16px 16px!important;background:transparent!important;}
.t67-basic-page .fr-kicker,.t67-video-basic-page .fr-kicker{display:none!important;}
.t67-basic-page .fr-hero h1,.t67-video-basic-page .fr-hero h1{margin:0 0 7px!important;color:var(--t67-text)!important;font-size:56px!important;line-height:1.06!important;letter-spacing:-.025em!important;}
.t67-basic-page .fr-subtitle,.t67-video-basic-page .fr-subtitle{margin:0 auto!important;max-width:660px!important;color:var(--t67-muted)!important;font-size:14px!important;line-height:1.4!important;}

/* One exact content width on all four pages. */
.t67-basic-page>.fr-tool,
.t67-video-basic-page>.fr-tool,
.t67-video-basic-page>.t67-video-basic-root,
.t67-video-basic-root>.fr-tool{
  width:min(var(--t67-page-width),calc(100vw - 32px))!important;
  max-width:min(var(--t67-page-width),calc(100vw - 32px))!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}

/* Tabs remain fixed and centered. */
.t67-basic-page>.core-tabs,.t67-video-basic-page>.core-tabs{display:flex!important;justify-content:center!important;width:auto!important;max-width:calc(100vw - 20px)!important;margin:0 auto 8px!important;padding:0!important;gap:4px!important;border:0!important;background:transparent!important;overflow-x:auto!important;}
.t67-basic-page>.core-tabs a,.t67-video-basic-page>.core-tabs a{display:flex!important;align-items:center!important;justify-content:center!important;flex:0 0 112px!important;width:112px!important;min-width:112px!important;max-width:112px!important;height:38px!important;min-height:38px!important;padding:0 12px!important;margin:0!important;border:1px solid var(--t67-line)!important;border-radius:0!important;background:var(--t67-card)!important;color:var(--t67-muted)!important;box-shadow:none!important;text-decoration:none!important;white-space:nowrap!important;font-size:13.5px!important;font-weight:500!important;line-height:1!important;letter-spacing:0!important;text-transform:none!important;}
.t67-basic-page>.core-tabs a.active,.t67-video-basic-page>.core-tabs a.active{background:var(--t67-active)!important;border-color:var(--t67-active)!important;color:#fff!important;}
.t67-basic-page>.core-tabs a,.t67-video-basic-page>.core-tabs a{transition:background-color .18s ease,border-color .18s ease,color .18s ease!important;}
.t67-basic-page>.core-tabs a:hover,.t67-video-basic-page>.core-tabs a:hover{background:var(--t67-upload-hover)!important;border-color:var(--t67-line-strong)!important;color:var(--t67-text)!important;}
.t67-basic-page>.core-tabs a.active:hover,.t67-video-basic-page>.core-tabs a.active:hover{background:#6d6d6d!important;border-color:#6d6d6d!important;color:#fff!important;}

/* Never allow inherited rounded cards. */
.t67-basic-page .fr-api-card,.t67-video-basic-page .fr-api-card,.t67-basic-page .fr-api-settings,.t67-video-basic-page .fr-api-settings,.t67-basic-page .fr-api-credit,.t67-video-basic-page .fr-api-credit,.t67-basic-page .fr-api-result,.t67-video-basic-page .fr-api-result,.t67-video-basic-result,.t67-vscene-result-stage,.t67-i2i-workspace,.t67-i2v-workspace,.t67-i2v-media-extras .t67-vref-extra-group{border-radius:0!important;box-shadow:none!important;}
.t67-basic-page textarea,.t67-video-basic-page textarea,.t67-basic-page select,.t67-video-basic-page select,.t67-basic-page input,.t67-video-basic-page input,.t67-basic-page button,.t67-video-basic-page button{border-radius:0!important;}

/* Prompt-only pages. */
.t67-basic-page .core-input-shell,.t67-video-basic-root .core-input-shell{width:100%!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;box-sizing:border-box!important;}
.t67-basic-page .core-input-shell .fr-api-field,.t67-video-basic-root .core-input-shell .fr-api-field{width:100%!important;margin:0!important;box-sizing:border-box!important;}
.t67-basic-page .core-input-shell textarea,.t67-video-basic-root .core-input-shell textarea{display:block!important;width:100%!important;max-width:100%!important;height:var(--t67-core-height)!important;min-height:var(--t67-core-height)!important;margin:0!important;padding:16px!important;border:1px solid var(--t67-line)!important;background:var(--t67-card)!important;color:var(--t67-text)!important;box-shadow:none!important;font-size:15px!important;line-height:1.55!important;resize:vertical!important;box-sizing:border-box!important;}
.t67-basic-page textarea:focus,.t67-video-basic-page textarea:focus{outline:none!important;border-color:#8e9caf!important;box-shadow:none!important;}
.t67-basic-page textarea::placeholder,.t67-video-basic-page textarea::placeholder{color:var(--t67-muted)!important;opacity:.82!important;}

/* Image pages use a 4:5 composer and the same 300px core height. */
.t67-i2i-workspace,.t67-i2v-workspace{width:100%!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;box-sizing:border-box!important;}
.t67-i2i-composer,.t67-i2v-composer{display:grid!important;grid-template-columns:minmax(0,4fr) minmax(0,5fr)!important;gap:var(--t67-gap)!important;width:100%!important;height:var(--t67-core-height)!important;margin:0!important;align-items:stretch!important;box-sizing:border-box!important;}
.t67-i2i-upload-side,.t67-i2v-reference-column{display:flex!important;flex-direction:column!important;min-width:0!important;width:100%!important;height:var(--t67-core-height)!important;gap:0!important;padding:0!important;margin:0!important;border:0!important;background:transparent!important;box-sizing:border-box!important;}
.t67-i2i-upload-panel,.t67-i2v-image-panel.t67-vscene-drop{position:relative!important;display:block!important;width:100%!important;height:var(--t67-core-height)!important;min-height:var(--t67-core-height)!important;max-height:var(--t67-core-height)!important;margin:0!important;padding:8px!important;border:1px solid var(--t67-line-strong)!important;background:var(--t67-upload)!important;overflow:hidden!important;cursor:pointer!important;box-shadow:none!important;box-sizing:border-box!important;transition:background-color .15s ease,border-color .15s ease!important;}
.t67-i2i-upload-panel:hover,.t67-i2v-image-panel.t67-vscene-drop:hover,.t67-i2v-image-panel.t67-vscene-drop.drag{background:var(--t67-upload-hover)!important;border-color:#8f9fb3!important;}
.t67-i2i-empty,.t67-i2v-image-panel .t67-vscene-empty{position:absolute!important;inset:8px!important;display:flex!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;gap:8px!important;padding:0!important;text-align:center!important;color:var(--t67-text)!important;}
.t67-i2i-upload-panel.has-images .t67-i2i-empty,.t67-i2v-image-panel .t67-vscene-empty[hidden]{display:none!important;}
.t67-i2i-empty input,.t67-i2v-image-panel>input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;}
.t67-upload-icon,.t67-i2v-image-panel .t67-vscene-plus{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;margin:0!important;border:1px solid var(--t67-line)!important;background:var(--t67-card)!important;color:var(--t67-text)!important;}
.t67-upload-icon svg,.t67-i2v-image-panel .t67-vscene-plus svg{width:21px!important;height:21px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.6!important;stroke-linecap:round!important;stroke-linejoin:round!important;}
.t67-i2i-empty b,.t67-i2v-image-panel .t67-vscene-empty b{display:block!important;margin:0!important;font-size:15px!important;font-weight:600!important;line-height:1.2!important;}
.t67-i2i-empty small,.t67-i2v-image-panel .t67-vscene-empty span{display:block!important;max-width:260px!important;margin:0!important;color:var(--t67-muted)!important;font-size:11px!important;line-height:1.4!important;}
.t67-i2i-prompt-side,.t67-i2v-prompt,.t67-i2i-prompt-side .fr-api-field{width:100%!important;height:var(--t67-core-height)!important;min-width:0!important;margin:0!important;box-sizing:border-box!important;}
.t67-i2i-prompt-side textarea,.t67-i2v-prompt textarea{display:block!important;width:100%!important;max-width:100%!important;height:var(--t67-core-height)!important;min-height:var(--t67-core-height)!important;max-height:var(--t67-core-height)!important;margin:0!important;padding:16px!important;border:1px solid var(--t67-line)!important;background:var(--t67-card)!important;color:var(--t67-text)!important;box-shadow:none!important;font-size:15px!important;line-height:1.55!important;resize:vertical!important;box-sizing:border-box!important;}

/* Hide counts below i2v; they must not steal core height. */
.t67-i2v-upload-meta{display:none!important;}
.t67-i2i-upload-meta{position:absolute!important;right:8px!important;bottom:5px!important;z-index:5!important;min-height:0!important;padding:0!important;margin:0!important;color:var(--t67-muted)!important;font-size:10px!important;pointer-events:none!important;}

/* Full-image preview grids: no white cards around images, no overflow. */
.t67-i2i-reference-grid.core-reference-list,.t67-i2v-image-panel .t67-vref-images{display:none!important;width:100%!important;height:100%!important;min-height:0!important;max-height:100%!important;margin:0!important;padding:0!important;gap:6px!important;align-content:stretch!important;justify-content:stretch!important;grid-auto-flow:row!important;overflow:hidden!important;box-sizing:border-box!important;}
.t67-i2i-reference-grid.core-reference-list.has-images,.t67-i2v-image-panel .t67-vref-images:not(:empty){display:grid!important;}
.t67-i2i-reference-grid[data-count="1"],.t67-i2v-image-panel .t67-vref-images[data-count="1"]{grid-template-columns:1fr!important;grid-template-rows:1fr!important;}
.t67-i2i-reference-grid[data-count="2"],.t67-i2v-image-panel .t67-vref-images[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:1fr!important;}
.t67-i2i-reference-grid[data-count="3"],.t67-i2v-image-panel .t67-vref-images[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:1fr!important;}
.t67-i2i-reference-grid[data-count="4"],.t67-i2v-image-panel .t67-vref-images[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;}
.t67-i2i-reference-grid[data-count="5"],.t67-i2v-image-panel .t67-vref-images[data-count="5"]{grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;}
.t67-i2i-reference-grid[data-count="5"]>.t67-i2i-reference-item,.t67-i2v-image-panel .t67-vref-images[data-count="5"]>.t67-vref-image{grid-column:span 2!important;}
.t67-i2i-reference-grid[data-count="5"]>.t67-i2i-reference-item:nth-child(4),.t67-i2v-image-panel .t67-vref-images[data-count="5"]>.t67-vref-image:nth-child(4){grid-column:2/span 2!important;}
.t67-i2i-reference-grid[data-count="5"]>.t67-i2i-reference-item:nth-child(5),.t67-i2v-image-panel .t67-vref-images[data-count="5"]>.t67-vref-image:nth-child(5){grid-column:4/span 2!important;}
.t67-i2i-reference-grid[data-count="6"],.t67-i2v-image-panel .t67-vref-images[data-count="6"]{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;}
.t67-i2i-reference-grid[data-count="7"],.t67-i2v-image-panel .t67-vref-images[data-count="7"],.t67-i2i-reference-grid[data-count="8"],.t67-i2v-image-panel .t67-vref-images[data-count="8"],.t67-i2i-reference-grid[data-count="9"],.t67-i2v-image-panel .t67-vref-images[data-count="9"]{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(0,1fr))!important;}
.t67-i2i-reference-grid[data-count="10"]{grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;}
.t67-i2i-reference-item,.t67-i2v-image-panel .t67-vref-image{position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;overflow:hidden!important;box-sizing:border-box!important;}
.t67-i2i-reference-item img,.t67-i2v-image-panel .t67-vref-image img{display:block!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;object-fit:contain!important;background:transparent!important;border:0!important;box-shadow:none!important;}

/* Only zoom/crop/remove on uploaded video references; icons sit above image. */
.t67-i2v-image-panel .t67-vref-tools,.t67-i2i-reference-item>.t67-ict-tools{position:absolute!important;z-index:8!important;display:flex!important;flex-direction:column!important;gap:4px!important;opacity:0!important;transform:translateX(4px)!important;transition:opacity .14s ease,transform .14s ease!important;}
.t67-i2v-image-panel .t67-vref-image:hover .t67-vref-tools,.t67-i2i-reference-item:hover>.t67-ict-tools{opacity:1!important;transform:none!important;}
.t67-i2v-image-panel .t67-vref-tools button,.t67-i2i-reference-item>.t67-ict-tools .t67-ict-btn{display:grid!important;place-items:center!important;width:27px!important;height:27px!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:0!important;background:rgba(15,23,42,.82)!important;color:#fff!important;box-shadow:none!important;}
.t67-i2v-image-panel .t67-vref-tools span{display:none!important;}
.t67-i2i-reference-item>.t67-ict-tools [data-action="rotate"],.t67-i2i-reference-item>.t67-ict-tools [data-action="flip"],.t67-i2i-reference-item>.t67-ict-tools [data-action="edit"],.t67-i2i-reference-item>.t67-ict-tools [data-action="video"],.t67-i2i-reference-item>.t67-ict-tools [data-action="download"]{display:none!important;}

/* Reference video/audio is below the 300px core and collapsed by default. */
.t67-i2v-reference-row{width:100%!important;margin-top:5px!important;}
.t67-i2v-reference-more{display:grid!important;grid-template-columns:minmax(0,4fr) minmax(0,5fr)!important;gap:var(--t67-gap)!important;width:100%!important;}
.t67-i2v-add-media-toggle{grid-column:1!important;display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;height:34px!important;margin:0!important;padding:0 10px!important;border:1px solid var(--t67-line)!important;background:var(--t67-card)!important;color:var(--t67-text)!important;font-size:11px!important;font-weight:600!important;cursor:pointer!important;box-shadow:none!important;}
.t67-i2v-add-media-toggle::after{content:'+';font-size:16px;font-weight:400;line-height:1;}
.t67-i2v-add-media-toggle.is-open::after{content:'−';}
.t67-i2v-media-extras{grid-column:1/-1!important;display:none!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;margin-top:0!important;padding:0!important;}
.t67-i2v-media-extras:not([hidden]){display:grid!important;}
.t67-i2v-media-extras .t67-vref-extra-group{padding:8px!important;border:1px solid var(--t67-line)!important;background:var(--t67-card)!important;}
.t67-i2v-media-extras .t67-vref-head>span{font-size:10px!important;color:var(--t67-muted)!important;font-weight:600!important;}
.t67-i2v-media-extras .t67-vref-head small{display:none!important;}
.t67-i2v-media-extras .t67-vref-add{display:flex!important;align-items:center!important;justify-content:center!important;min-height:34px!important;padding:0 8px!important;border:1px dashed var(--t67-line)!important;background:var(--t67-upload)!important;color:var(--t67-text)!important;font-size:10px!important;font-weight:600!important;cursor:pointer!important;}
.t67-i2v-media-extras .t67-vref-add input{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;}
.t67-i2v-media-extras .t67-vref-total{font-size:10px!important;color:var(--t67-muted)!important;}

/* Parameter rows. */
.t67-basic-page .fr-api-settings,.t67-video-basic-page .fr-api-settings{width:100%!important;margin-top:var(--t67-gap)!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;box-sizing:border-box!important;}
.t67-basic-page .core-compact-toolbar{display:flex!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:nowrap!important;gap:8px!important;width:100%!important;overflow-x:auto!important;scrollbar-width:thin!important;}
.t67-basic-page .core-compact-field{display:block!important;flex:0 0 auto!important;min-width:0!important;gap:0!important;}
.t67-basic-page .core-compact-field>span{display:none!important;}
.t67-basic-page .core-compact-field>select{field-sizing:content!important;width:auto!important;min-width:88px!important;max-width:320px!important;padding-left:10px!important;padding-right:28px!important;}
.t67-basic-page .core-compact-field:first-child>select{min-width:150px!important;max-width:360px!important;}
.t67-basic-page .core-compact-field:last-child>select{min-width:82px!important;}
.t67-video-basic-settings .t67-vscene-row{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:8px!important;width:100%!important;}
.t67-basic-page .core-compact-field,.t67-video-basic-settings .t67-vscene-field{display:flex!important;flex-direction:column!important;min-width:0!important;gap:4px!important;}
.t67-basic-page .core-compact-field span,.t67-video-basic-settings .t67-vscene-field span{margin:0!important;color:var(--t67-muted)!important;font-size:10px!important;line-height:1.2!important;font-weight:600!important;letter-spacing:0!important;}
.t67-basic-page select,.t67-video-basic-page select,.t67-video-basic-settings input,.t67-video-basic-settings textarea{width:100%!important;height:36px!important;min-height:36px!important;padding:0 26px 0 9px!important;border:1px solid var(--t67-line)!important;background:var(--t67-card)!important;color:var(--t67-text)!important;box-shadow:none!important;font-size:11px!important;line-height:36px!important;box-sizing:border-box!important;}
#modelInfo,#t67SceneModelInfo,.fr-create-reference-note,.t67-vscene-model-info{display:none!important;}
.t67-vscene-meta{display:flex!important;align-items:center!important;justify-content:flex-end!important;min-height:17px!important;margin:5px 0 0!important;padding:0!important;}
.t67-vscene-audio,.t67-vscene-audio span{font-size:10px!important;font-weight:400!important;line-height:1!important;}
.t67-vscene-audio{display:inline-flex!important;align-items:center!important;gap:4px!important;color:var(--t67-muted)!important;}
.t67-vscene-audio input{width:13px!important;height:13px!important;min-height:13px!important;margin:0!important;padding:0!important;}

/* Buttons/credits/status. */
.t67-basic-page .fr-run.primary,.t67-video-basic-page .fr-run.primary,.t67-video-basic-run{width:100%!important;height:54px!important;min-height:54px!important;margin-top:10px!important;padding:0 14px!important;border:0!important;background:var(--t67-button)!important;color:#fff!important;box-shadow:none!important;font-size:15px!important;font-weight:600!important;box-sizing:border-box!important;}
.t67-basic-page .fr-api-credit,.t67-video-basic-page .fr-api-credit{min-height:30px!important;margin-top:7px!important;padding:5px 0!important;border:0!important;background:transparent!important;color:var(--t67-muted)!important;font-size:10px!important;}
.t67-basic-page .fr-api-status,.t67-video-basic-page .fr-api-status{min-height:14px!important;margin-top:2px!important;font-size:10px!important;color:var(--t67-muted)!important;}

/* Image result area: no surrounding box. */
#resultCard{position:relative!important;margin-top:var(--t67-gap)!important;padding:0 0 24px!important;border:0!important;background:transparent!important;box-shadow:none!important;}
#resultCard .fr-api-result-stage,#resultBox{min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;}
.result-grid{display:grid!important;width:100%!important;gap:8px!important;align-items:start!important;}
.result-grid[data-count="1"]{grid-template-columns:1fr!important;}
.result-grid[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.result-grid[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
.result-grid[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.result-grid[data-count="5"]{grid-template-columns:repeat(6,minmax(0,1fr))!important;}
.result-grid[data-count="5"]>.result-item{grid-column:span 2!important;}
.result-grid[data-count="5"]>.result-item:nth-child(4){grid-column:2/span 2!important;}
.result-grid[data-count="5"]>.result-item:nth-child(5){grid-column:4/span 2!important;}
.result-grid[data-count="6"]{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
.result-item{position:relative!important;min-width:0!important;border:0!important;background:transparent!important;box-shadow:none!important;}
.result-img{position:relative!important;display:block!important;width:100%!important;min-height:0!important;border:0!important;background:transparent!important;overflow:visible!important;}
.result-img>img{display:block!important;width:100%!important;height:auto!important;max-width:100%!important;object-fit:contain!important;background:transparent!important;border:0!important;box-shadow:none!important;}
.result-actions{display:none!important;}
.result-item>.t67-ict-tools{top:7px!important;right:7px!important;gap:4px!important;}
.result-item>.t67-ict-tools .t67-ict-btn{width:28px!important;height:28px!important;border-radius:0!important;box-shadow:none!important;background:rgba(15,23,42,.82)!important;}
.result-zipbar{position:absolute!important;right:0!important;bottom:0!important;display:flex!important;justify-content:flex-end!important;margin:0!important;}
.result-zipbar[hidden]{display:none!important;}
.result-zipbar button{display:inline-flex!important;align-items:center!important;gap:5px!important;padding:0!important;border:0!important;background:transparent!important;color:#40546d!important;font-size:11px!important;font-weight:700!important;cursor:pointer!important;}
.result-zipbar button svg{width:14px!important;height:14px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.8!important;}
.result-zipbar button:hover{text-decoration:underline!important;color:#1f2937!important;}
.slot-state{min-height:120px!important;border:1px solid var(--t67-line)!important;background:var(--t67-upload)!important;}
.slot-copy{display:flex!important;min-height:120px!important;align-items:center!important;justify-content:center!important;flex-direction:column!important;gap:6px!important;padding:14px!important;color:var(--t67-muted)!important;font-size:10px!important;text-align:center!important;}

/* Video result. */
.t67-video-basic-result{margin-top:var(--t67-gap)!important;padding:0!important;border:0!important;background:transparent!important;}
.t67-video-basic-result .t67-vscene-result-stage{min-height:220px!important;background:#0a0d12!important;overflow:hidden!important;}
.t67-video-basic-result .t67-vscene-result-stage video{display:block!important;width:auto!important;height:auto!important;max-width:100%!important;max-height:520px!important;background:#000!important;}

@media(max-width:900px){
  .t67-basic-page .fr-hero h1,.t67-video-basic-page .fr-hero h1{font-size:48px!important;}
  .t67-i2i-composer,.t67-i2v-composer{grid-template-columns:1fr!important;height:auto!important;}
  .t67-i2i-upload-panel,.t67-i2v-reference-column,.t67-i2i-prompt-side textarea,.t67-i2v-prompt textarea{height:260px!important;min-height:260px!important;max-height:260px!important;}
}
@media(max-width:720px){
  :root{--t67-page-width:calc(100vw - 20px);}
  .t67-basic-page,.t67-video-basic-page{padding-bottom:38px!important;}
  .t67-basic-page .fr-hero h1,.t67-video-basic-page .fr-hero h1{font-size:40px!important;}
  .t67-basic-page>.core-tabs,.t67-video-basic-page>.core-tabs{justify-content:flex-start!important;width:404px!important;max-width:calc(100vw - 12px)!important;}
  .t67-basic-page .core-compact-toolbar{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto!important;}
  .t67-video-basic-settings .t67-vscene-row,.t67-video-basic-settings #t67SceneSpecific .t67-vscene-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;}
  .t67-i2v-media-extras{grid-template-columns:1fr!important;}
}


/* deterministic uploaded-image grids — based on actual child count, not only data-count */
.t67-i2v-image-panel #t67ScenePreviews{
  display:grid!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  gap:6px!important;
  overflow:hidden!important;
  align-content:stretch!important;
  justify-content:stretch!important;
  grid-auto-flow:row!important;
  box-sizing:border-box!important;
}
.t67-i2v-image-panel #t67ScenePreviews:empty{display:none!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(1):last-child){grid-template-columns:1fr!important;grid-template-rows:1fr!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:1fr!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:1fr!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(4):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(5):last-child){grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(5):last-child)>:nth-child(-n+3){grid-column:span 2!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(5):last-child)>:nth-child(4){grid-column:2/span 2!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(5):last-child)>:nth-child(5){grid-column:4/span 2!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(6):last-child){grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;}
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(7):last-child),
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(8):last-child),
.t67-i2v-image-panel #t67ScenePreviews:has(>:nth-child(9):last-child){grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(0,1fr))!important;}
.t67-i2v-image-panel #t67ScenePreviews>.t67-vref-image{
  position:relative!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
.t67-i2v-image-panel #t67ScenePreviews>.t67-vref-image>img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
/* toolbars live on the image itself, top-right */
.t67-i2v-image-panel #t67ScenePreviews>.t67-vref-image>.t67-vref-tools{
  position:absolute!important;
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  opacity:0!important;
  pointer-events:none!important;
  transform:translateX(3px)!important;
  z-index:20!important;
}
.t67-i2i-reference-item>.t67-ict-tools{
  position:absolute!important;
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
  opacity:0!important;
  pointer-events:none!important;
  transform:translateX(3px)!important;
  z-index:20!important;
}
.t67-i2v-image-panel #t67ScenePreviews>.t67-vref-image:hover>.t67-vref-tools,
.t67-i2i-reference-item:hover>.t67-ict-tools{
  opacity:1!important;
  pointer-events:auto!important;
  transform:none!important;
}
/* Keep every corner square. */
.t67-basic-page *, .t67-video-basic-page *{--t67-no-radius:0px;}
.t67-basic-page .core-tabs a,.t67-video-basic-page .core-tabs a,
.t67-i2i-upload-panel,.t67-i2v-image-panel,.t67-i2i-reference-item,.t67-vref-image,
.t67-vref-tools button,.t67-ict-btn{border-radius:0!important;}


/* Mobile final spacing / compact tabs */
@media(max-width:720px){
  .t67-basic-page>.core-tabs,
  .t67-video-basic-page>.core-tabs{
    width:100%!important;
    max-width:100%!important;
    justify-content:stretch!important;
    gap:2px!important;
    margin-bottom:14px!important;
    overflow:visible!important;
  }
  .t67-basic-page>.core-tabs a,
  .t67-video-basic-page>.core-tabs a{
    flex:1 1 25%!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:31px!important;
    min-height:31px!important;
    padding:0 2px!important;
    font-size:9.5px!important;
    line-height:1!important;
  }

  /* Keep the vertical rhythm around 20px on every basic page. */
  .t67-basic-page>.fr-tool + .fr-tool,
  .t67-video-basic-root>.fr-tool + .fr-tool{
    margin-top:20px!important;
  }
  .t67-i2i-composer,
  .t67-i2v-composer{
    row-gap:20px!important;
    margin-bottom:0!important;
  }
  .t67-i2i-workspace + .fr-api-settings,
  .t67-i2v-reference-row + .fr-api-settings,
  .t67-video-basic-page .fr-api-settings{
    margin-top:20px!important;
  }
  .t67-i2v-reference-row{
    margin-top:8px!important;
    margin-bottom:0!important;
  }

  /* Image-to-video: explicit breathing room between upload and prompt blocks. */
  .t67-i2v-composer > .t67-i2v-reference-column{
    margin-bottom:0!important;
  }
  .t67-i2v-composer > .t67-i2v-prompt{
    margin-top:0!important;
  }

  /* Image-to-image: reduce excessive inherited spacing. */
  .t67-i2i-upload-meta{
    display:none!important;
  }
  .t67-i2i-settings{
    margin-top:20px!important;
  }

  /* Image model settings stay on one compact horizontal row on mobile. */
  .t67-basic-page .core-compact-toolbar{display:flex!important;flex-wrap:nowrap!important;gap:6px!important;overflow-x:auto!important;}
  .t67-video-basic-settings .t67-vscene-row,
  .t67-video-basic-settings #t67SceneSpecific .t67-vscene-row{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
}

/* video-scene.css */
/* TOOL67 VIDEO SCENE — shared scene workbench base */
.t67-vscene-studio{max-width:var(--t67-page-max,1440px);margin:54px auto;padding:26px;border:1px solid rgba(120,120,120,.18);border-radius:24px;background:var(--t67-vs-panel,#fff);box-shadow:0 18px 55px rgba(15,23,42,.07)}
.t67-vscene-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}.t67-vscene-head small{display:block;margin-bottom:6px;font-size:11px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;opacity:.58}.t67-vscene-head h2{margin:0;font-size:clamp(24px,3vw,38px);line-height:1.05}.t67-vscene-head p{max-width:580px;margin:8px 0 0;opacity:.68;line-height:1.55}.t67-vscene-badge{flex:0 0 auto;padding:7px 10px;border:1px solid rgba(120,120,120,.2);border-radius:999px;font-size:11px;font-weight:800;opacity:.7}
.t67-vscene-grid{display:grid;grid-template-columns:minmax(280px,.82fr) minmax(0,1.38fr);gap:16px;align-items:stretch}.t67-vscene-upload,.t67-vscene-controls{min-width:0;border:1px solid rgba(120,120,120,.17);border-radius:18px;background:rgba(255,255,255,.45)}
.t67-vscene-upload{display:flex;min-height:370px;flex-direction:column;padding:14px}.t67-vscene-upload-label{display:block;margin-bottom:8px;font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;opacity:.58}.t67-vscene-drop{position:relative;display:flex;min-height:280px;flex:1;align-items:center;justify-content:center;border:1px dashed rgba(95,95,95,.38);border-radius:14px;overflow:hidden;cursor:pointer;transition:.16s}.t67-vscene-drop:hover,.t67-vscene-drop.drag{border-color:rgba(70,70,70,.72);background:rgba(127,127,127,.04)}.t67-vscene-drop input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.t67-vscene-empty{text-align:center;padding:18px}
/* Workbench empty-state must disappear after references are selected. */
.t67-vscene-empty[hidden]{display:none!important}
.t67-vscene-empty b{display:block;margin:7px 0 4px;font-size:16px}.t67-vscene-empty span{display:block;font-size:12px;opacity:.62;line-height:1.45}.t67-vscene-plus{display:grid;width:52px;height:52px;margin:auto;place-items:center;border:1px solid rgba(110,110,110,.24);border-radius:14px;font-size:28px;font-weight:300}.t67-vscene-previews{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%;padding:7px}.t67-vscene-previews:empty{display:none}.t67-vscene-ref{position:relative;aspect-ratio:1/1;border-radius:10px;overflow:hidden;background:#ececec}.t67-vscene-ref img{width:100%;height:100%;object-fit:cover}.t67-vscene-ref i{position:absolute;left:6px;top:6px;display:grid;width:22px;height:22px;place-items:center;border-radius:999px;background:rgba(0,0,0,.72);color:#fff;font-size:10px;font-style:normal}.t67-vscene-upload-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px;font-size:11px;opacity:.7}.t67-vscene-clear{padding:4px 7px;border:0;background:transparent;font:inherit;font-weight:800;cursor:pointer;opacity:.75}
.t67-vscene-controls{padding:14px}.t67-vscene-prompt-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}.t67-vscene-prompt-head label{font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;opacity:.62}.t67-vscene-sample{min-height:28px;padding:3px 10px;border:1px solid rgba(110,110,110,.26);border-radius:999px;background:transparent;font-size:10px;font-weight:900;cursor:pointer}.t67-vscene-prompt{display:block;width:100%;min-height:128px;padding:12px 13px;border:1px solid rgba(110,110,110,.25);border-radius:12px;background:rgba(255,255,255,.78);color:inherit;font:inherit;line-height:1.55;resize:vertical;outline:none}.t67-vscene-prompt:focus{border-color:rgba(80,80,80,.55);box-shadow:0 0 0 3px rgba(100,100,100,.07)}
.t67-vscene-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:8px}.t67-vscene-field{min-width:0}.t67-vscene-field span{display:block;margin:0 0 3px 2px;font-size:9px;font-weight:900;letter-spacing:.09em;text-transform:uppercase;opacity:.55;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t67-vscene-field select{width:100%;height:34px;min-height:34px;padding:0 23px 0 8px;border:1px solid rgba(110,110,110,.22);border-radius:8px;background:rgba(255,255,255,.82);color:inherit;font-size:11px;outline:none}.t67-vscene-model-info{min-height:17px;margin:7px 2px 0;font-size:10px;line-height:1.4;opacity:.55}.t67-vscene-generate{width:100%;min-height:46px;margin-top:10px;padding:10px 14px;border:0;border-radius:11px;background:#111;color:#fff;font-size:14px;font-weight:900;cursor:pointer}.t67-vscene-generate:disabled{opacity:.48;cursor:not-allowed}.t67-vscene-credit,.t67-vscene-status{margin-top:7px;text-align:center;font-size:11px;line-height:1.45;opacity:.7}.t67-vscene-credit a{color:inherit;font-weight:900}.t67-vscene-status.error{color:#bd2f45;opacity:1}.t67-vscene-status.success{color:#16804b;opacity:1}
.t67-vscene-result{margin-top:16px}.t67-vscene-result[hidden]{display:none!important}.t67-vscene-result-stage{position:relative;display:flex;min-height:250px;max-height:450px;align-items:center;justify-content:center;overflow:hidden;border-radius:16px;background:#090b0f}.t67-vscene-result-stage video{display:block;width:auto;height:auto;max-width:100%;max-height:450px;background:#000}.t67-vscene-result-stage video[hidden]{display:none!important}.t67-vscene-busy{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:center;background:rgba(5,7,10,.78);color:#fff}.t67-vscene-busy[hidden]{display:none!important}.t67-vscene-busy-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:18px 24px;border:1px solid rgba(255,255,255,.16);border-radius:14px;background:rgba(18,22,28,.82);text-align:center}.t67-vscene-spinner{width:38px;height:38px;border:3px solid rgba(255,255,255,.22);border-top-color:#fff;border-radius:50%;animation:t67-vs-spin .85s linear infinite}.t67-vscene-busy-card strong{font-size:13px}.t67-vscene-busy-card span{font-size:11px;opacity:.7}.t67-vscene-download{position:absolute;z-index:4;right:12px;bottom:12px;display:grid;width:38px;height:38px;place-items:center;border:1px solid rgba(255,255,255,.28);border-radius:999px;background:rgba(0,0,0,.68);color:#fff;text-decoration:none;font-size:20px;font-weight:900;backdrop-filter:blur(5px)}.t67-vscene-download[hidden]{display:none!important}@keyframes t67-vs-spin{to{transform:rotate(360deg)}}
html[data-theme=dark] .t67-vscene-studio,.dark .t67-vscene-studio{--t67-vs-panel:#11151c;color:#f3f4f6;background:#11151c;border-color:#2d3440}.dark .t67-vscene-upload,.dark .t67-vscene-controls{background:#0d1219;border-color:#303844}.dark .t67-vscene-prompt,.dark .t67-vscene-field select{background:#0b1017;border-color:#343d49;color:#f7f7f8}
@media(max-width:900px){.t67-vscene-studio{margin:32px 14px;padding:16px}.t67-vscene-grid{grid-template-columns:1fr}.t67-vscene-upload{min-height:260px}.t67-vscene-drop{min-height:200px}}
@media(max-width:640px){.t67-vscene-studio{margin:22px 8px;padding:10px;border-radius:16px}.t67-vscene-head{align-items:flex-start;flex-direction:column}.t67-vscene-head h2{font-size:24px}.t67-vscene-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.t67-vscene-field select{height:32px;min-height:32px;font-size:10px}.t67-vscene-prompt{min-height:112px}.t67-vscene-result-stage{min-height:220px;max-height:450px}}

<div class="t67-vscene-upload md-panel">
        <span class="t67-vscene-upload-label">Reference images</span>
        <label class="t67-vscene-drop" id="t67SceneDrop">
          <input id="t67SceneRefs" type="file" accept="image/jpeg,image/png,image/webp,image/avif" multiple>
          <div class="t67-vscene-empty" id="t67SceneEmpty"><div class="t67-vscene-plus">＋</div><b>Upload images</b></div>
          <div class="t67-vscene-previews" id="t67ScenePreviews"></div>
        </label>
        <div class="t67-vscene-upload-foot"><span id="t67SceneCount">0/3 images</span><button class="t67-vscene-clear" id="t67SceneClear" type="button" hidden>Clear</button></div>
      </div>
<div class="t67-vscene-upload md-panel">
        <span class="t67-vscene-upload-label">Reference images</span>
        <label class="t67-vscene-drop" id="t67SceneDrop">
          <input id="t67SceneRefs" type="file" accept="image/jpeg,image/png,image/webp,image/avif" multiple>
          <div class="t67-vscene-empty" id="t67SceneEmpty"><div class="t67-vscene-plus">＋</div><b>Upload images</b></div>
          <div class="t67-vscene-previews" id="t67ScenePreviews"></div>
        </label>
        <div class="t67-vscene-upload-foot"><span id="t67SceneCount">0/3 images</span><button class="t67-vscene-clear" id="t67SceneClear" type="button" hidden>Clear</button></div>
      </div>

/* Shared multimodal video reference workbench · rollout 2026-09-20 */
.t67-vref-workbench{min-height:0!important;align-self:stretch;overflow:visible}
.t67-vref-drop{min-height:300px;align-items:stretch!important;padding:0}
.t67-vref-drop>.t67-vscene-empty{margin:auto}
.t67-vref-drop>.t67-vscene-empty span{max-width:270px;margin:4px auto 0;font-size:10px;line-height:1.4;color:inherit;opacity:.62}
.t67-vref-images{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-auto-flow:row;gap:6px!important;width:100%;padding:6px!important;align-content:start;max-height:620px;overflow:auto}
.t67-vref-images:empty{display:none!important}
.t67-vref-image{position:relative;min-width:0;aspect-ratio:1/1;overflow:hidden;border:1px solid rgba(120,120,120,.25);background:#eee;cursor:grab}
.t67-vref-image:active{cursor:grabbing}.t67-vref-image img{width:100%;height:100%;object-fit:cover;display:block}
.t67-vref-images[data-count="1"] .t67-vref-image{grid-column:span 6;aspect-ratio:4/3}
.t67-vref-images[data-count="2"] .t67-vref-image{grid-column:span 3}
.t67-vref-images[data-count="3"] .t67-vref-image{grid-column:span 2}
.t67-vref-images[data-count="4"] .t67-vref-image{grid-column:span 3}
.t67-vref-images[data-count="5"] .t67-vref-image{grid-column:span 2}
.t67-vref-images[data-count="5"] .t67-vref-image:nth-child(4),.t67-vref-images[data-count="5"] .t67-vref-image:nth-child(5){grid-column:span 3}
.t67-vref-images[data-count="6"] .t67-vref-image,.t67-vref-images[data-count="7"] .t67-vref-image,.t67-vref-images[data-count="8"] .t67-vref-image,.t67-vref-images[data-count="9"] .t67-vref-image{grid-column:span 2}
.t67-vref-role{position:absolute;left:6px;bottom:6px;max-width:calc(100% - 12px);padding:3px 6px;background:rgba(0,0,0,.72);color:#fff;font-size:9px;font-weight:800;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t67-vref-tools{position:absolute;right:6px;top:6px;display:flex;flex-direction:column;gap:4px;opacity:0;transform:translateX(5px);transition:.14s}
.t67-vref-image:hover .t67-vref-tools,.t67-vref-image:focus-within .t67-vref-tools{opacity:1;transform:none}
.t67-vref-tools button,.t67-vref-tools span{display:grid;width:26px;height:26px;place-items:center;border:1px solid rgba(255,255,255,.25);background:rgba(0,0,0,.68);color:#fff;padding:0;cursor:pointer}
.t67-vref-tools span{cursor:grab}.t67-vref-tools svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.t67-vref-foot{margin-top:7px!important}
.t67-vref-add-media{display:flex;width:100%;align-items:center;gap:7px;margin-top:9px;padding:7px 2px;border:0;border-top:1px solid rgba(120,120,120,.24);background:transparent;color:inherit;font:inherit;font-size:11px;font-weight:800;text-align:left;cursor:pointer}
.t67-vref-add-media[hidden]{display:none!important}.t67-vref-add-media svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.t67-vref-add-media b{margin-left:auto;font-size:15px;font-weight:500;transition:.15s}.t67-vref-add-media.is-open b{transform:rotate(45deg)}
.t67-vref-extras{display:grid;gap:10px;padding-top:9px}.t67-vref-extras[hidden]{display:none!important}
.t67-vref-extra-group{display:grid;gap:6px;padding:9px;border:1px solid rgba(120,120,120,.24);background:rgba(127,127,127,.035)}
.t67-vref-extra-group[hidden]{display:none!important}
.t67-vref-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.t67-vref-head>span{font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.t67-vref-head small{font-size:9px;opacity:.62}
.t67-vref-add{position:relative;display:flex;min-height:34px;align-items:center;justify-content:center;gap:6px;border:1px dashed rgba(120,120,120,.48);background:rgba(255,255,255,.55);font-size:10px;font-weight:800;cursor:pointer}.t67-vref-add input{position:absolute;width:1px;height:1px;opacity:0}.t67-vref-add svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.t67-vref-videos{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.t67-vref-video{position:relative;min-width:0;background:#111;color:#fff}.t67-vref-video video{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:#000}.t67-vref-video>span{display:block;padding:4px 20px 4px 5px;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t67-vref-video button{position:absolute;right:3px;top:3px;width:20px;height:20px;border:0;background:rgba(0,0,0,.7);color:#fff;cursor:pointer}
.t67-vref-audios{display:grid;gap:4px}.t67-vref-audio{display:grid;grid-template-columns:18px minmax(0,1fr) auto 20px;gap:5px;align-items:center;min-height:30px;padding:4px 5px;border:1px solid rgba(120,120,120,.24);background:rgba(255,255,255,.6)}.t67-vref-audio>span svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.6}.t67-vref-audio b{min-width:0;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t67-vref-audio small{font-size:8px;opacity:.62}.t67-vref-audio button{border:0;background:transparent;font-size:15px;color:inherit;cursor:pointer;opacity:.65}
.t67-vref-total{text-align:right;font-size:9px;opacity:.62}
.t67-vref-modal[hidden]{display:none!important}.t67-vref-modal{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:20px}.t67-vref-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72)}.t67-vref-modal-card{position:relative;z-index:1;width:min(900px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;background:#111;color:#fff;border:1px solid #444;padding:14px}.t67-vref-modal-close{position:absolute;z-index:3;right:8px;top:8px;width:30px;height:30px;border:1px solid #555;background:#111;color:#fff;font-size:20px;cursor:pointer}.t67-vref-modal-media{display:grid;place-items:center;min-height:300px;max-height:70vh;background:#050505;overflow:hidden}.t67-vref-modal-media img{display:block;max-width:100%;max-height:68vh;object-fit:contain}.t67-vref-modal-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding-top:10px}.t67-vref-modal-controls>span{margin-right:4px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.t67-vref-modal-controls button{min-height:30px;padding:4px 9px;border:1px solid #555;background:#1c1c1c;color:#fff;font-size:10px;cursor:pointer}.t67-vref-modal-controls button.active{background:#fff;color:#111}.t67-vref-modal-controls .t67-vref-apply{margin-left:auto;background:#fff;color:#111;font-weight:900}
.t67-vref-upload-state{position:absolute;left:6px;top:6px;z-index:3;max-width:calc(100% - 48px);padding:3px 6px;background:rgba(0,0,0,.72);color:#fff;font-size:8.5px;font-weight:750;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t67-vref-upload-state.is-error{background:rgba(165,25,25,.88)}
.t67-vref-media-state{position:absolute;left:5px;top:5px;padding:3px 5px;background:rgba(0,0,0,.72);color:#fff;font-size:8px;line-height:1.1}.t67-vref-media-state.is-error{background:rgba(165,25,25,.88)}
.t67-vref-image.is-unsupported,.t67-vref-video.is-unsupported,.t67-vref-audio.is-unsupported{outline:1px dashed #b25b51;outline-offset:-1px;opacity:.72}
.t67-vref-unsupported{position:absolute;left:6px;top:6px;z-index:4;padding:3px 6px;background:#7d2f28;color:#fff;font-size:8px;font-weight:800;line-height:1.15}
#t67SceneReferenceTotal.is-error{color:#9d3028;font-weight:750}
.t67-video-reference-workbench.is-disabled,.t67-vref-workbench.is-disabled{opacity:.86}
.t67-video-reference-workbench.is-disabled .t67-vref-image,.t67-video-reference-workbench.is-disabled .t67-vref-video,.t67-video-reference-workbench.is-disabled .t67-vref-audio,.t67-vref-workbench.is-disabled .t67-vref-image,.t67-vref-workbench.is-disabled .t67-vref-video,.t67-vref-workbench.is-disabled .t67-vref-audio{cursor:default}
html[data-theme=dark] .t67-vref-extra-group,.dark .t67-vref-extra-group{background:#151515;border-color:#333}html[data-theme=dark] .t67-vref-add,.dark .t67-vref-add,html[data-theme=dark] .t67-vref-audio,.dark .t67-vref-audio{background:#111;border-color:#444;color:#eee}
@media(max-width:600px){.t67-vref-images{grid-template-columns:repeat(6,minmax(0,1fr))!important;max-height:520px}.t67-vref-videos{grid-template-columns:repeat(3,minmax(0,1fr))}.t67-vref-role{font-size:8px}.t67-vref-tools{opacity:1;transform:none}.t67-vref-tools button,.t67-vref-tools span{width:23px;height:23px}}

/* Compact video generation controls · merged from /video/video-controls-compact.css (2026-09-23).
   Keep options on one row, size selects to content, and keep Audio at far right. */
html body .t67-video-basic-settings .t67-vscene-row,
html body .t67-vscene-studio .t67-vscene-row,
html body .pav-controls-row,
html body .pfx-controls-row,
html body .ptv-control-row {
  display:flex !important;
  grid-template-columns:none !important;
  align-items:center !important;
  justify-content:flex-start !important;
  flex-wrap:nowrap !important;
  gap:10px !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
  width:100% !important;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}

html body .t67-video-basic-settings .t67-vscene-row > label,
html body .t67-vscene-studio .t67-vscene-row > label,
html body .pav-controls-row > label,
html body .pfx-controls-row > label,
html body .ptv-control-row > label,
html body .t67-video-basic-settings .t67-vscene-row #t67SceneSpecific > label,
html body .t67-vscene-studio .t67-vscene-row #t67SceneSpecific > label {
  display:block !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  width:auto !important;
  margin:0 !important;
}

.t67-video-basic-settings .t67-vscene-field,
.t67-vscene-studio .t67-vscene-field {
  flex-direction:row !important;
  gap:0 !important;
}

html body .t67-video-basic-settings .t67-vscene-row > label > span,
html body .t67-vscene-studio .t67-vscene-row > label > span,
html body .pav-controls-row > label > span,
html body .pfx-controls-row > label > span,
html body .ptv-control-row > label > span,
html body .t67-video-basic-settings .t67-vscene-row #t67SceneSpecific > label > span,
html body .t67-vscene-studio .t67-vscene-row #t67SceneSpecific > label > span {
  display:none !important;
}

html body .t67-video-basic-settings .t67-vscene-row select,
html body .t67-vscene-studio .t67-vscene-row select,
html body .pav-controls-row select,
html body .pfx-controls-row select,
html body .ptv-control-row select {
  field-sizing:content;
  box-sizing:border-box !important;
  flex:0 0 auto !important;
  width:auto;
  min-width:74px !important;
  max-width:240px !important;
  white-space:nowrap;
}

html body .t67-video-basic-settings .t67-vscene-row #t67SceneSpecific:not([hidden]),
html body .t67-vscene-studio .t67-vscene-row #t67SceneSpecific:not([hidden]),
html body .pav-controls-row #t67SceneSpecific:not([hidden]),
html body .pfx-controls-row #t67SceneSpecific:not([hidden]),
html body .ptv-control-row #t67SceneSpecific:not([hidden]) {
  display:flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  gap:10px !important;
}

/* Audio is the final item and consumes remaining horizontal space before itself. */
html body .t67-video-basic-settings .t67-vscene-row > #t67SceneAudioWrap,
html body .t67-vscene-studio .t67-vscene-row > #t67SceneAudioWrap,
html body .t67-vscene-row > .t67-audio-inline-right,
html body .pav-controls-row > #t67SceneAudioWrap,
html body .pfx-controls-row > #t67SceneAudioWrap,
html body .ptv-control-row > #t67SceneAudioWrap,
html body .pv-control-row > #t67SceneAudioWrap,
html body .vfx-control-row > #t67SceneAudioWrap,
html body .md-control-row > #t67SceneAudioWrap {
  display:inline-flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  width:auto !important;
  margin:0 2px 0 auto !important;
  padding:0 2px 0 14px !important;
  min-height:36px !important;
  white-space:nowrap !important;
  position:sticky !important;
  right:0 !important;
  z-index:4 !important;
  background:var(--page-bg,#f5f7fa) !important;
}
html body .t67-video-basic-settings .t67-vscene-row > #t67SceneAudioWrap > span,
html body .t67-vscene-studio .t67-vscene-row > #t67SceneAudioWrap > span,
html body .t67-vscene-row > .t67-audio-inline-right > span {
  display:inline !important;
}

@media (max-width:640px){
  html body .t67-video-basic-settings .t67-vscene-row,
  html body .t67-vscene-studio .t67-vscene-row,
  html body .pav-controls-row,
  html body .pfx-controls-row,
  html body .ptv-control-row {
    flex-wrap:nowrap !important;
    overflow-x:auto !important;
  }
}

/* motion-director.css */
:root{--md-bg:#f4f2ed;--md-paper:#fff;--md-ink:#101114;--md-muted:#686b73;--md-line:#d8d6d0;--md-soft:#ebe8e1;--md-accent:#ff5035;--md-shell:var(--t67-page-max,1440px)}
*{box-sizing:border-box}body{margin:0;background:var(--md-bg);color:var(--md-ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.md-shell{width:min(var(--md-shell),calc(100% - 40px));margin-inline:auto}.md-page{overflow:hidden}.md-kicker{display:block;font-size:11px;font-weight:900;letter-spacing:.18em;color:var(--md-muted)}
.md-hero{background:linear-gradient(118deg,#f2efe8 0 57%,#17181c 57% 100%)}.md-hero-inner{min-height:470px;display:grid;grid-template-columns:.9fr 1.1fr;gap:48px;align-items:center;padding-block:34px}.md-hero-copy h1{margin:14px 0 18px;}.md-hero-copy p{max-width:650px;font-size:17px;line-height:1.65;color:#555b63;margin:0}.md-actions{display:flex;align-items:center;gap:22px;margin-top:24px}.md-primary{display:inline-flex;align-items:center;justify-content:center;background:#111;color:#fff;text-decoration:none;min-height:48px;padding:0 22px;font-weight:850;border-radius:2px}.md-link{color:var(--md-ink);text-decoration:none;font-weight:800}.md-hero-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.md-hero-meta span{padding:7px 10px;border:1px solid #cbc6bd;font-size:11px;font-weight:750;background:#fff8}.md-hero-visual{min-width:0}.md-monitor{position:relative;max-width:680px;margin-left:auto;aspect-ratio:16/10;background:#09090b;overflow:hidden;border:7px solid #24252b;box-shadow:0 32px 70px rgba(0,0,0,.22)}.md-monitor video{width:100%;height:100%;object-fit:cover;display:block}.md-monitor-top,.md-monitor-bottom{position:absolute;left:14px;right:14px;display:flex;align-items:center;gap:8px;color:#fff;z-index:2}.md-monitor-top{top:12px;font:800 10px monospace}.md-monitor-top b{color:#ff6047}.md-monitor-top span{margin-left:auto;background:#0009;padding:5px 7px}.md-monitor-bottom{bottom:12px;justify-content:space-between;background:linear-gradient(90deg,#000c,#0005);padding:10px 12px}.md-monitor-bottom strong{font-size:13px}.md-monitor-bottom span{font-size:11px;color:#ddd}
.t67-vscene-studio{padding:30px 0;background:transparent!important;border:0!important;box-shadow:none!important}.md-studio-title{margin-bottom:14px}.md-studio-title h2,.md-section-head h2{margin:6px 0 0;font-size:clamp(28px,3.4vw,48px);letter-spacing:-.04em}.md-workspace-grid{gap:14px}.md-panel{border:1px solid var(--md-line)!important;border-radius:0!important;background:var(--md-paper)!important;box-shadow:none!important}.t67-vscene-upload,.t67-vscene-controls{padding:18px!important}.t67-vscene-drop{min-height:300px;border-radius:0!important;background:#f4f1eb!important;border:1px dashed #a7a39b!important}.t67-vscene-empty span{display:none}.t67-vscene-prompt{min-height:152px!important;border-radius:0!important;border:1px solid #b9b7b1!important;background:#fff!important;color:#111!important}.t67-vscene-sample,.t67-vscene-clear{border-radius:0!important}.md-control-row{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin-top:10px!important}.t67-vscene-field{gap:5px!important}.t67-vscene-field span{font-size:10px!important;letter-spacing:.12em;font-weight:850!important}.t67-vscene-field select{height:38px!important;min-height:38px!important;border-radius:0!important;border:1px solid #aaa!important;background:#fff!important;color:#111!important;padding:0 9px!important;font-size:12px!important}.t67-vscene-model-info{font-size:11px!important;margin-top:8px!important;color:var(--md-muted)!important}.t67-vscene-generate{min-height:48px!important;margin-top:12px!important;border-radius:0!important;background:#111!important;color:#fff!important}.t67-vscene-credit{margin-top:9px!important;font-size:13px!important}.md-result{margin-top:14px!important}.t67-vscene-result-stage{max-height:450px!important;min-height:260px!important;border-radius:0!important;background:#050505!important}.t67-vscene-result-stage video{max-height:450px!important}.t67-vscene-busy{max-height:450px!important;background:rgba(0,0,0,.78)!important}.t67-vscene-download{right:14px!important;bottom:14px!important;border-radius:50%!important}
.md-directions{padding:34px 0 46px}.md-section-head{margin-bottom:18px}.md-direction-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border-top:1px solid var(--md-line);border-left:1px solid var(--md-line)}.md-direction-grid button{min-height:94px;padding:14px;text-align:left;border:0;border-right:1px solid var(--md-line);border-bottom:1px solid var(--md-line);background:var(--md-paper);color:var(--md-ink);cursor:pointer}.md-direction-grid b,.md-direction-grid span{display:block}.md-direction-grid b{font-size:14px;margin-bottom:7px}.md-direction-grid span{font-size:11px;line-height:1.45;color:var(--md-muted)}.md-direction-grid button:hover{background:#111;color:#fff}.md-direction-grid button:hover span{color:#bbb}
.md-showcase{padding:50px 0;background:#111318;color:#fff}.md-showcase .md-kicker{color:#8c9099}.md-shot-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.md-shot-card{min-width:0;cursor:pointer}.md-media{position:relative;aspect-ratio:3/4;background:#222;overflow:hidden}.md-media img,.md-media video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.md-media video{z-index:2;opacity:0}.md-shot-card.is-playing .md-media video{opacity:1}.md-shot-info{padding:11px 2px 0}.md-shot-info span,.md-shot-info b,.md-shot-info small{display:block}.md-shot-info span{font-size:10px;letter-spacing:.14em;color:#7f838c;text-transform:uppercase}.md-shot-info b{font-size:14px;margin:4px 0}.md-shot-info small{color:#a2a5ad}
.md-faq{padding:52px 0 70px}.md-faq-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.md-faq details{background:var(--md-paper);border:1px solid var(--md-line);padding:0 16px}.md-faq summary{list-style:none;cursor:pointer;padding:17px 0;font-weight:800}.md-faq summary::-webkit-details-marker{display:none}.md-faq summary:after{content:"+";float:right;font-size:20px;font-weight:400}.md-faq details[open] summary:after{content:"−"}.md-faq p{margin:0 0 17px;color:var(--md-muted);line-height:1.65;font-size:14px}
html[data-theme="dark"]{--md-bg:#101114;--md-paper:#17181c;--md-ink:#f1f2f3;--md-muted:#a0a3aa;--md-line:#34363d;--md-soft:#1d1f24}html[data-theme="dark"] body,.dark body{background:var(--md-bg);color:var(--md-ink)}html[data-theme="dark"] .md-hero,.dark .md-hero{background:linear-gradient(118deg,#15161a 0 57%,#090a0d 57% 100%)}html[data-theme="dark"] .md-hero-copy p,.dark .md-hero-copy p{color:#aaadb4}html[data-theme="dark"] .md-link,.dark .md-link{color:#f2f2f2}html[data-theme="dark"] .md-hero-meta span,.dark .md-hero-meta span{background:#18191d;border-color:#383a40}html[data-theme="dark"] .md-panel,.dark .md-panel{background:#17181c!important;border-color:#383a40!important}html[data-theme="dark"] .t67-vscene-drop,.dark .t67-vscene-drop{background:#1d1e22!important;border-color:#555!important}html[data-theme="dark"] .t67-vscene-prompt,html[data-theme="dark"] .t67-vscene-field select,.dark .t67-vscene-prompt,.dark .t67-vscene-field select{background:#121317!important;color:#eee!important;border-color:#4b4d53!important}html[data-theme="dark"] .t67-vscene-sample,.dark .t67-vscene-sample{background:#1c1d22;color:#eee;border-color:#4b4d53}html[data-theme="dark"] .t67-vscene-generate,.dark .t67-vscene-generate{background:#f1f1f1!important;color:#111!important}html[data-theme="dark"] .md-direction-grid button,.dark .md-direction-grid button{background:#17181c;color:#eee}html[data-theme="dark"] .md-direction-grid button:hover,.dark .md-direction-grid button:hover{background:#efefef;color:#111}html[data-theme="dark"] .md-direction-grid button:hover span,.dark .md-direction-grid button:hover span{color:#555}html[data-theme="dark"] .md-faq details,.dark .md-faq details{background:#17181c;border-color:#34363d}
@media(max-width:1050px){.md-hero-inner{grid-template-columns:1fr 1fr;gap:24px}.md-direction-grid{grid-template-columns:repeat(3,1fr)}.md-shot-grid{grid-template-columns:repeat(3,1fr)}.md-shot-grid .md-shot-card:nth-child(n/**/+4){display:none}}
@media(max-width:760px){.md-shell{width:min(100% - 24px,var(--md-shell))}.md-hero{background:var(--md-bg)}.md-hero-inner{grid-template-columns:1fr;min-height:0;padding-block:28px;gap:22px}.md-hero-copy h1{}.md-hero-visual{order:2}.md-monitor{max-width:none}.md-actions{gap:14px;flex-wrap:wrap}.md-control-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}.md-direction-grid{grid-template-columns:repeat(2,1fr)}.md-shot-grid{grid-template-columns:repeat(2,1fr)}.md-shot-grid .md-shot-card:nth-child(n/**/+5){display:block}.md-faq-grid{grid-template-columns:1fr}.t67-vscene-studio{padding-block:28px}.md-showcase{padding-block:40px}}
@media(max-width:460px){.md-hero-copy h1{}.md-monitor-bottom span{display:none}.md-shot-grid{gap:8px}}


/* Tool67 20260928 — canonical page width */
.md-shell{
  width:100%!important;
  max-width:var(--t67-page-max,1440px)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:var(--t67-page-gutter,24px)!important;
  padding-right:var(--t67-page-gutter,24px)!important;
  box-sizing:border-box!important;
}
@media(max-width:640px){
  .md-shell{
    padding-left:var(--t67-page-gutter-mobile,14px)!important;
    padding-right:var(--t67-page-gutter-mobile,14px)!important;
  }
}

/* image-workbench.css */
/* Tool67 universal image-card tools v1.5.17 */
.t67-ict-card{position:relative!important}
.t67-ict-tools{position:absolute;top:8px;right:8px;z-index:8;display:flex;flex-direction:column;gap:5px;opacity:0;transform:translateX(4px);transition:opacity .14s ease,transform .14s ease;pointer-events:none}
.t67-ict-card:hover>.t67-ict-tools,.t67-ict-card:focus-within>.t67-ict-tools{opacity:1;transform:none;pointer-events:auto}
.t67-ict-btn{width:30px;height:30px;border:1px solid rgba(255,255,255,.72);border-radius:8px;background:rgba(17,24,39,.82);color:#fff;display:grid;place-items:center;padding:0;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.16);backdrop-filter:blur(4px)}
.t67-ict-btn:hover{background:#111827}.t67-ict-btn:active{background:#6b7280}.t67-ict-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.t67-ict-btn.is-danger:hover{background:#b42318}.t67-ict-btn[disabled]{opacity:.38;cursor:not-allowed}
.t67-ict-toast{position:fixed;left:50%;bottom:24px;z-index:10020;transform:translateX(-50%);max-width:min(520px,calc(100% - 28px));padding:9px 12px;border-radius:9px;background:#111827;color:#fff;font:12px/1.45 Inter,system-ui,sans-serif;box-shadow:0 12px 30px rgba(0,0,0,.22)}
.t67-ict-modal{position:fixed;inset:0;z-index:10010;display:grid;place-items:center;background:rgba(5,10,18,.76);padding:18px}
/* Only crop dialogs omit the redundant top bar; other image editors retain it. */
.t67-ict-modal.is-crop-mode .t67-ict-head{display:none!important}
.t67-ict-modal.is-crop-mode .t67-ict-dialog{grid-template-rows:minmax(0,1fr) auto}
.t67-ict-modal.is-crop-mode .t67-ict-crop-img{max-height:80vh}
.t67-ict-modal[hidden]{display:none!important}.t67-ict-dialog{width:min(1100px,100%);max-height:94vh;border:1px solid #293142;border-radius:14px;background:#111827;color:#fff;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;box-shadow:0 30px 80px rgba(0,0,0,.42)}
.t67-ict-head,.t67-ict-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;background:#151d29}.t67-ict-head b{font-size:13px}.t67-ict-head span{font-size:11px;color:#9ca3af}.t67-ict-foot{justify-content:flex-end}.t67-ict-action{border:1px solid #354052;border-radius:8px;background:#1f2937;color:#fff;padding:7px 11px;font:600 11px/1 Inter,system-ui;cursor:pointer}.t67-ict-action.primary{background:#fff;color:#111827;border-color:#fff}.t67-ict-action:hover{filter:brightness(1.08)}
.t67-ict-close{width:31px;height:31px;border:1px solid #354052;border-radius:8px;background:#1f2937;color:#fff;font-size:19px;line-height:1;cursor:pointer}
.t67-ict-body{min-height:280px;overflow:auto;display:grid;place-items:center;padding:14px;background:#0b1018}
.t67-ict-zoom-img{display:block;max-width:100%;max-height:78vh;width:auto;height:auto;object-fit:contain}
.t67-ict-crop-wrap{position:relative;display:inline-block;line-height:0;user-select:none;touch-action:none}.t67-ict-crop-img{display:block;max-width:min(92vw,980px);max-height:72vh;width:auto;height:auto;object-fit:contain}.t67-ict-shade{position:absolute;inset:0;background:rgba(0,0,0,.44);pointer-events:none}.t67-ict-crop-box{position:absolute;border:2px solid #fff;box-shadow:0 0 0 9999px rgba(0,0,0,.42);cursor:move;touch-action:none}.t67-ict-crop-box:before{content:"";position:absolute;inset:33.333%;border:0 solid rgba(255,255,255,.42);border-left-width:1px;border-right-width:1px;pointer-events:none}.t67-ict-crop-box:after{content:"";position:absolute;left:0;right:0;top:33.333%;bottom:33.333%;border-top:1px solid rgba(255,255,255,.42);border-bottom:1px solid rgba(255,255,255,.42);pointer-events:none}
.t67-ict-handle{position:absolute;width:14px;height:14px;border:2px solid #fff;background:#111827;border-radius:3px}.t67-ict-handle.nw{left:-7px;top:-7px;cursor:nwse-resize}.t67-ict-handle.ne{right:-7px;top:-7px;cursor:nesw-resize}.t67-ict-handle.sw{left:-7px;bottom:-7px;cursor:nesw-resize}.t67-ict-handle.se{right:-7px;bottom:-7px;cursor:nwse-resize}
@media(hover:none){.t67-ict-tools{opacity:.88;transform:none;pointer-events:auto}.t67-ict-btn{width:29px;height:29px}}
@media(max-width:620px){.t67-ict-modal{padding:8px}.t67-ict-dialog{max-height:98vh}.t67-ict-crop-img{max-width:94vw;max-height:70vh}.t67-ict-tools{top:6px;right:6px}}


/* v1.5.18 frameless image preview */
html.t67-ict-lightbox-open,html.t67-ict-lightbox-open body{overflow:hidden}
.t67-ict-lightbox{position:fixed;inset:0;z-index:10030;display:flex;align-items:center;justify-content:center;padding:14px;background:rgba(4,8,14,.82);cursor:zoom-out}
.t67-ict-lightbox[hidden]{display:none!important}
.t67-ict-lightbox img{display:block;width:auto;height:auto;max-width:calc(100vw - 28px);max-height:calc(100vh - 28px);object-fit:contain;border:0;border-radius:0;box-shadow:none;background:transparent;cursor:default}
@media(max-width:620px){.t67-ict-lightbox{padding:6px}.t67-ict-lightbox img{max-width:calc(100vw - 12px);max-height:calc(100vh - 12px)}}


/* Tool67 unified image workbench — scoped, no global body reset */
.t67-iwb-host{--iwb-bg:#f5f7fb;--iwb-card:#fff;--iwb-line:#dfe5ef;--iwb-text:#111827;--iwb-muted:#64748b;--iwb-soft:#f7f9fc;--iwb-danger:#b42318;margin:18px auto 34px;color:var(--iwb-text)}
.t67-iwb-host *{box-sizing:border-box}
.t67-iwb-host .ve-shell{width:100%;max-width:var(--t67-page-max,1440px);margin:0 auto;padding:0 var(--t67-page-gutter,24px)}
.t67-iwb-host .ve-layout{display:grid;grid-template-columns:360px minmax(0,1fr);gap:18px;align-items:start}
.t67-iwb-host .ve-card{background:var(--iwb-card);border:1px solid var(--iwb-line);border-radius:14px;box-shadow:0 12px 28px rgba(15,23,42,.045)}
.t67-iwb-host .ve-side,.t67-iwb-host .ve-main{padding:16px;max-width:none!important;margin:0!important;min-width:0!important;width:auto!important}
.t67-iwb-host .ve-main{min-height:unset;display:flex;flex-direction:column;justify-self:stretch!important;align-self:stretch!important}
.t67-iwb-drop-wrap{display:grid;gap:8px}.t67-iwb-ref-toggle-row{display:flex;justify-content:flex-end;margin-top:-2px}.t67-iwb-ref-toggle{border:0;background:transparent;color:#64748b;font-size:10px;line-height:1;padding:0;cursor:pointer}.t67-iwb-ref-toggle:hover{color:#111827}.t67-iwb-ref-wrap[hidden]{display:none!important}.t67-iwb-ref-wrap.is-collapsed{display:none}
.t67-iwb-drop{position:relative;display:grid;place-items:center;min-height:132px;padding:12px;border:1px dashed #bac5d3;border-radius:12px;background:#fafbfd;transition:border-color .14s,background .14s,transform .14s;overflow:hidden;text-align:center}
.t67-iwb-drop:hover,.t67-iwb-drop.drag{border-color:#111827;background:#f4f6f8;transform:translateY(-1px)}
.t67-iwb-drop-main{min-height:176px;background:#eef2f7}
.t67-iwb-ref-zone .t67-iwb-drop{min-height:96px;background:#fafbfd}
.t67-iwb-drop.is-filled{min-height:116px;padding:6px;border-style:solid;background:#f8fafc}
.t67-iwb-drop-inner{display:grid;gap:5px;justify-items:center;align-items:center;color:var(--iwb-muted)}
.t67-iwb-drop-inner b{font-size:13px;color:var(--iwb-text)}
.t67-iwb-drop-inner span{font-size:10.5px;line-height:1.45}
.t67-iwb-drop-icon{display:grid;place-items:center;width:42px;height:42px;border:1px solid var(--iwb-line);border-radius:10px;background:#fff;color:#334155}
.t67-iwb-drop-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.t67-iwb-file-input{position:absolute;inset:0;opacity:0;cursor:pointer;z-index:1}
.t67-iwb-ref-grid{display:grid;gap:6px;width:100%;height:100%}
.t67-iwb-ref-grid[data-count="1"]{grid-template-columns:1fr}.t67-iwb-ref-grid[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}.t67-iwb-ref-grid[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}.t67-iwb-ref-grid[data-count="4"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.t67-iwb-ref-card{position:relative;z-index:3;min-width:0;border:1px solid var(--iwb-line);border-radius:9px;overflow:hidden;background:#fff;min-height:60px}
.t67-iwb-ref-card img{display:block;width:100%;height:100%;min-height:60px;max-height:112px;object-fit:cover}.t67-iwb-ref-grid[data-count="4"] .t67-iwb-ref-card img{max-height:76px}
.t67-iwb-ref-remove{position:absolute;right:5px;top:5px;z-index:4;width:23px;height:23px;border:0;border-radius:50%;background:rgba(17,24,39,.88);color:#fff;font-size:15px;line-height:23px;text-align:center;cursor:pointer}.t67-iwb-ref-remove:hover{background:#000}
.t67-iwb-input-row{display:grid;gap:6px}
.t67-iwb-prompt{width:100%;min-height:94px;max-height:280px;resize:vertical;padding:10px 11px;border:1px solid #d7dde7;border-radius:10px;background:#fff;color:var(--iwb-text);font:inherit;font-size:11.5px;line-height:1.55;outline:none}.t67-iwb-prompt:focus{border-color:#7b8797;box-shadow:0 0 0 2px rgba(15,23,42,.05)}
.t67-iwb-settings{margin-top:3px;border:1px solid var(--iwb-line);border-radius:9px;background:#f8fafc}.t67-iwb-settings summary{list-style:none;cursor:pointer;padding:7px 9px;font-size:10.5px;font-weight:700;color:#334155}.t67-iwb-settings summary::-webkit-details-marker{display:none}.t67-iwb-settings summary::after{content:'▿';float:right;color:#64748b}.t67-iwb-settings[open] summary::after{content:'▵'}
.t67-iwb-settings-body{padding:0 9px 9px;border-top:1px solid #e5e9ef;display:grid;gap:7px}.t67-iwb-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.t67-iwb-field{display:grid;gap:3px}.t67-iwb-field label{font-size:10px;font-weight:700;color:#334155}.t67-iwb-select{width:100%;min-height:32px;border:1px solid #d7dde7;border-radius:7px;padding:0 7px;background:#fff;color:var(--iwb-text);font:inherit;font-size:10.5px;outline:none}.t67-iwb-select:focus{border-color:#7b8797;box-shadow:0 0 0 2px rgba(15,23,42,.05)}
.t67-iwb-samples{display:flex;flex-wrap:wrap;gap:5px}.t67-iwb-chip{border:1px solid #d7dde7;border-radius:999px;background:#fff;color:#334155;font-size:9.5px;font-weight:700;padding:4px 8px;cursor:pointer}.t67-iwb-chip:hover{border-color:#111827;color:#111827}
.t67-iwb-actions{display:grid;gap:6px;margin-top:10px}.t67-iwb-start,.t67-iwb-host .ve-btn{border:0;border-radius:8px;min-height:40px;padding:0 14px;background:#000;color:#fff;font-weight:700;font-size:12px;cursor:pointer}.t67-iwb-host .ve-btn:active{background:#6b7280}.t67-iwb-host .ve-btn:disabled{background:#c5cbd3;color:#f8fafc;cursor:not-allowed}.t67-iwb-credit{font-size:9px;color:var(--iwb-muted);line-height:1.4}
.t67-iwb-library-slot{margin-bottom:12px}.t67-iwb-library-slot[hidden]{display:none!important}.t67-iwb-library-slot.is-disabled{opacity:.56;filter:saturate(.72)}.t67-iwb-library-slot.is-disabled .hair-pick,.t67-iwb-library-slot.is-disabled .hs-pick,.t67-iwb-library-slot.is-disabled .pp-pick,.t67-iwb-library-slot.is-disabled .sk-pick,.t67-iwb-library-slot.is-disabled .pa-pick,.t67-iwb-library-slot.is-disabled .ct-style-card{pointer-events:none}
/* Restore desktop library density: 8 per row, 16 initially from legacy scripts. */
.t67-iwb-library-slot .hair-style-grid,.t67-iwb-library-slot .hs-style-grid,.t67-iwb-library-slot .pp-style-grid,.t67-iwb-library-slot .sk-style-picker,.t67-iwb-library-slot .pa-style-picker,.t67-iwb-library-slot .ct-style-grid,.t67-iwb-library-slot #ctStylePicker{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:10px!important}
.t67-iwb-library-slot>.section-head,.t67-iwb-library-slot>.sk-style-summary,.t67-iwb-library-slot>.pa-style-summary,.t67-iwb-library-slot>.hair-style-summary,.t67-iwb-library-slot>.hs-style-summary{margin-top:0}.t67-iwb-library-slot .hair-library-top,.t67-iwb-library-slot .hs-library-top,.t67-iwb-library-slot .pp-style-top{margin-top:0}.t67-iwb-library-slot>section{margin:0!important;padding:0!important;width:auto!important;max-width:none!important}
.t67-iwb-section-block{margin-top:10px}.t67-iwb-inline-tabs-field .hair-gender-tabs,.t67-iwb-inline-tabs-field .pp-style-tabs{display:flex;flex-wrap:wrap;gap:6px}.t67-iwb-inline-tabs-field .hair-gender-tabs button,.t67-iwb-inline-tabs-field .pp-style-tabs button{min-height:28px;padding:0 10px;border-radius:999px;font-size:10px}.t67-iwb-result-title{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:7px}.t67-iwb-result-title b{font-size:12px}.t67-iwb-grid-note{font-size:10px;color:var(--iwb-muted)}
.t67-iwb-grid-holder{border:1px solid var(--iwb-line);border-radius:10px;background:#fff;padding:8px}.t67-iwb-grid-holder.is-empty-grid{min-height:0;height:100%;padding:0;overflow:hidden;background:#fcfdff}.t67-iwb-grid-surface{height:100%;min-height:100px;border-radius:10px;background-image:linear-gradient(135deg,rgba(255,255,255,.55),rgba(255,255,255,0) 46%),linear-gradient(to right,rgba(148,163,184,.17) 1px,transparent 1px),linear-gradient(to bottom,rgba(148,163,184,.17) 1px,transparent 1px);background-size:100% 100%,24px 24px,24px 24px;background-position:0 0,-1px -1px,-1px -1px}
.t67-iwb-gallery{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}.t67-iwb-gallery[data-count="1"] .ve-preview-card,.t67-iwb-gallery[data-count="1"] .ve-result-card{grid-column:span 6}.t67-iwb-gallery[data-count="2"] .ve-preview-card,.t67-iwb-gallery[data-count="2"] .ve-result-card{grid-column:span 3}.t67-iwb-gallery[data-count="3"] .ve-preview-card,.t67-iwb-gallery[data-count="3"] .ve-result-card{grid-column:span 2}.t67-iwb-gallery[data-count="4"] .ve-preview-card,.t67-iwb-gallery[data-count="4"] .ve-result-card{grid-column:span 3}.t67-iwb-gallery[data-count="5"] .ve-preview-card:nth-child(-n+3),.t67-iwb-gallery[data-count="5"] .ve-result-card:nth-child(-n+3){grid-column:span 2}.t67-iwb-gallery[data-count="5"] .ve-preview-card:nth-child(n+4),.t67-iwb-gallery[data-count="5"] .ve-result-card:nth-child(n+4){grid-column:span 3}.t67-iwb-gallery[data-count="6"] .ve-preview-card,.t67-iwb-gallery[data-count="6"] .ve-result-card{grid-column:span 2}
.t67-iwb-host .ve-preview-card,.t67-iwb-host .ve-result-card{position:relative;min-width:0;border:1px solid var(--iwb-line);border-radius:9px;overflow:hidden;background:#fff}.t67-iwb-host .ve-preview-media,.t67-iwb-host .ve-result-media{aspect-ratio:4/5;background:#eef2f6;display:grid;place-items:center}.t67-iwb-host .ve-preview-media img,.t67-iwb-host .ve-result-media img{display:block;width:100%;height:100%;object-fit:contain;background:#f7f9fc}.t67-iwb-gallery[data-count="1"] .ve-preview-media,.t67-iwb-gallery[data-count="1"] .ve-result-media{aspect-ratio:auto;min-height:300px;max-height:560px;padding:8px}.t67-iwb-gallery[data-count="1"] .ve-preview-media img,.t67-iwb-gallery[data-count="1"] .ve-result-media img{width:auto;height:auto;max-width:100%;max-height:540px;margin:auto}.t67-iwb-host .ve-preview-foot,.t67-iwb-host .ve-result-foot{display:grid;gap:2px;padding:7px}.t67-iwb-host .ve-preview-foot b,.t67-iwb-host .ve-result-foot b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.t67-iwb-host .ve-preview-foot span,.t67-iwb-host .ve-result-foot span{font-size:9px;color:var(--iwb-muted)}
.t67-iwb-host .ve-progress{margin-top:10px;border-radius:10px;padding:10px}.t67-iwb-host .ve-progress[hidden],.t67-iwb-host .ve-compare[hidden]{display:none!important}.t67-iwb-host .ve-progress-head{display:flex;justify-content:space-between;gap:10px;font-size:11px}.t67-iwb-host .ve-progress-head strong{font-weight:750}.t67-iwb-host .ve-bar{height:8px;border-radius:999px;background:#e8edf3;overflow:hidden;margin-top:7px}.t67-iwb-host .ve-fill{height:100%;width:0;background:#111827;transition:width .25s;background-image:linear-gradient(90deg,rgba(255,255,255,.1) 0 25%,rgba(255,255,255,.34) 50%,rgba(255,255,255,.1) 75%);background-size:120px 100%;animation:t67iwbShift 1.4s linear infinite}.t67-iwb-host .ve-progress-meta{min-height:14px;margin-top:5px;color:var(--iwb-muted);font-size:9.5px}@keyframes t67iwbShift{to{background-position:120px 0}}
.t67-iwb-host .ve-compare{margin-top:10px;border:1px solid var(--iwb-line);border-radius:10px;padding:10px;background:#fff}.t67-iwb-host .ve-section-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:7px}.t67-iwb-host .ve-section-title b{font-size:12px}.t67-iwb-host .ve-section-title span{font-size:10px;color:var(--iwb-muted)}.t67-iwb-host .ve-compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.t67-iwb-host .ve-compare-grid>div{display:grid;gap:2px;border:1px solid #e5e9ef;border-radius:8px;padding:8px;background:#fafbfc}.t67-iwb-host .ve-compare-grid strong{font-size:10.5px}.t67-iwb-host .ve-compare-grid span{font-size:9.5px;color:#667085}.t67-iwb-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:9px}.t67-iwb-host .ve-stat{border:1px solid var(--iwb-line);border-radius:8px;padding:8px}.t67-iwb-host .ve-stat span{display:block;font-size:9px;text-transform:uppercase;color:#64748b}.t67-iwb-host .ve-stat b{display:block;margin-top:2px;font-size:10.5px;font-weight:700;overflow-wrap:anywhere}
.t67-iwb-bulk{display:flex;justify-content:flex-end;margin-top:10px}.t67-iwb-bulk .ve-btn{min-height:34px;padding:0 12px;font-size:10.5px}.t67-iwb-inline-alert{margin-top:8px;padding:8px 10px;border-radius:9px;background:#fff0f0;color:var(--iwb-danger);font-size:10.5px;line-height:1.5}.t67-iwb-inline-alert[hidden]{display:none!important}.t67-iwb-replaced-op{display:none!important}.t67-iwb-duplicate-library{display:none!important}
/* After Start/result, source preview becomes compact so results become the visual focus. */
.t67-iwb-host.is-focus-results #iwbPreviewHolder{padding:6px;max-height:212px;overflow:auto}.t67-iwb-host.is-focus-results .t67-iwb-grid-holder.is-empty-grid,.t67-iwb-host.is-focus-results .t67-iwb-grid-surface{min-height:200px}.t67-iwb-host.is-focus-results #iwbPreviewSection .t67-iwb-gallery{gap:6px}.t67-iwb-host.is-focus-results .t67-iwb-gallery .ve-preview-media{aspect-ratio:3/4}.t67-iwb-host.is-focus-results .t67-iwb-gallery[data-count="1"] .ve-preview-media{min-height:180px;max-height:180px;padding:4px}.t67-iwb-host.is-focus-results .t67-iwb-gallery[data-count="1"] .ve-preview-media img{max-height:170px}.t67-iwb-host.is-focus-results .ve-preview-foot{padding:5px}.t67-iwb-host.is-focus-results .ve-preview-foot b{font-size:9px}.t67-iwb-host.is-focus-results .ve-preview-foot span{font-size:8px}
.t67-iwb-settings .wa-layout-pills{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.t67-iwb-settings .wa-layout-pills button{min-height:34px}
html[data-theme="dark"] .t67-iwb-host{--iwb-card:#111720;--iwb-line:#293344;--iwb-text:#edf2f7;--iwb-muted:#9aa7b9;--iwb-soft:#171e28}html[data-theme="dark"] .t67-iwb-drop-main{background:#16202b}html[data-theme="dark"] .t67-iwb-ref-zone .t67-iwb-drop,html[data-theme="dark"] .t67-iwb-settings,html[data-theme="dark"] .t67-iwb-select,html[data-theme="dark"] .t67-iwb-prompt,html[data-theme="dark"] .t67-iwb-grid-holder,html[data-theme="dark"] .t67-iwb-host .ve-compare,html[data-theme="dark"] .t67-iwb-host .ve-preview-card,html[data-theme="dark"] .t67-iwb-host .ve-result-card{background:#111720;border-color:#293344;color:#edf2f7}html[data-theme="dark"] .t67-iwb-grid-holder.is-empty-grid{background:#0f1723}html[data-theme="dark"] .t67-iwb-grid-surface{background-image:linear-gradient(to right,rgba(148,163,184,.13) 1px,transparent 1px),linear-gradient(to bottom,rgba(148,163,184,.13) 1px,transparent 1px)}html[data-theme="dark"] .t67-iwb-host .ve-compare-grid>div{background:#151c26;border-color:#293344}
@media(max-width:1180px){.t67-iwb-library-slot .hair-style-grid,.t67-iwb-library-slot .hs-style-grid,.t67-iwb-library-slot .pp-style-grid,.t67-iwb-library-slot .sk-style-picker,.t67-iwb-library-slot .pa-style-picker,.t67-iwb-library-slot .ct-style-grid,.t67-iwb-library-slot #ctStylePicker{grid-template-columns:repeat(6,minmax(0,1fr))!important}}
@media(max-width:900px){.t67-iwb-host .ve-shell{width:min(100% - 16px,1280px)}.t67-iwb-host .ve-layout{grid-template-columns:1fr}.t67-iwb-host .ve-side,.t67-iwb-host .ve-main{padding:13px}.t67-iwb-host .ve-main{min-height:420px;display:block}.t67-iwb-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.t67-iwb-library-slot .hair-style-grid,.t67-iwb-library-slot .hs-style-grid,.t67-iwb-library-slot .pp-style-grid,.t67-iwb-library-slot .sk-style-picker,.t67-iwb-library-slot .pa-style-picker,.t67-iwb-library-slot .ct-style-grid,.t67-iwb-library-slot #ctStylePicker{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:640px){.t67-iwb-field-grid{grid-template-columns:1fr}.t67-iwb-grid-holder.is-empty-grid,.t67-iwb-grid-surface{min-height:220px;height:auto}.t67-iwb-status-grid{grid-template-columns:1fr}.t67-iwb-gallery .ve-preview-card,.t67-iwb-gallery .ve-result-card{grid-column:span 6!important}.t67-iwb-settings .wa-layout-pills{grid-template-columns:repeat(2,minmax(0,1fr))}.t67-iwb-library-slot .hair-style-grid,.t67-iwb-library-slot .hs-style-grid,.t67-iwb-library-slot .pp-style-grid,.t67-iwb-library-slot .sk-style-picker,.t67-iwb-library-slot .pa-style-picker,.t67-iwb-library-slot .ct-style-grid,.t67-iwb-library-slot #ctStylePicker{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
/* Keep the Library usable but visually secondary once processing/results start. */
.t67-iwb-host.is-focus-results .t67-iwb-library-slot{max-height:310px;overflow:auto;padding-right:3px;scrollbar-width:thin}
.t67-iwb-library-slot.is-disabled::before{content:'Custom reference image is active. Library image selection is disabled.';display:block;margin:0 0 8px;padding:7px 9px;border:1px solid var(--iwb-line);border-radius:8px;background:#f8fafc;color:var(--iwb-muted);font-size:9.5px;line-height:1.4}


/* Round 17 refinement */
.t67-iwb-ref-card.is-library-ref{box-shadow:inset 0 0 0 1px rgba(15,23,42,.04)}
.t67-iwb-ref-badge{position:absolute;left:6px;bottom:6px;z-index:4;padding:2px 6px;border-radius:999px;background:rgba(17,24,39,.78);color:#fff;font-size:8.5px;font-weight:700;letter-spacing:.02em}
.t67-iwb-grid-holder.is-empty-grid{box-shadow:inset 0 1px 0 rgba(255,255,255,.9),inset 0 -14px 30px rgba(148,163,184,.06),0 8px 20px rgba(15,23,42,.025)}
.t67-iwb-grid-surface{background-image:radial-gradient(circle at 50% 18%,rgba(255,255,255,.85),rgba(255,255,255,0) 42%),linear-gradient(135deg,rgba(255,255,255,.45),rgba(226,232,240,.08)),linear-gradient(to right,rgba(148,163,184,.16) 1px,transparent 1px),linear-gradient(to bottom,rgba(148,163,184,.16) 1px,transparent 1px);background-size:100% 100%,100% 100%,24px 24px,24px 24px;box-shadow:inset 0 0 34px rgba(100,116,139,.06)}
.t67-iwb-inline-tabs-field{gap:5px}
.t67-iwb-inline-tabs-field>label{font-size:9px;color:var(--iwb-muted);font-weight:600}
.t67-iwb-inline-tabs-field .hair-gender-tabs,.t67-iwb-inline-tabs-field .pp-style-tabs{margin:0!important}
.t67-iwb-inline-tabs-field .hair-gender-tabs button,.t67-iwb-inline-tabs-field .pp-style-tabs button{font-size:9.5px!important;min-height:26px!important;padding:0 9px!important}
html[data-theme="dark"] .t67-iwb-ref-badge{background:rgba(255,255,255,.84);color:#111827}

.t67-iwb-host.is-running .t67-iwb-library-slot{pointer-events:none;opacity:.72}
.t67-iwb-host.is-running .t67-iwb-settings summary{cursor:default}


/* Round 19 prompt/UI refinement */
.t67-iwb-ref-toggle{font-weight:800;letter-spacing:.01em}
.t67-iwb-grid-holder.is-empty-grid{position:relative}
.t67-iwb-grid-holder.is-empty-grid::after{content:'Preview area\A Upload source images on the left to begin';position:absolute;inset:auto 16px 14px 16px;display:block;text-align:center;white-space:pre-line;font-size:10px;line-height:1.45;font-weight:700;color:rgba(71,85,105,.72);pointer-events:none}
.t67-iwb-grid-holder.is-empty-grid::before{content:'';position:absolute;inset:12px;border-radius:12px;background:radial-gradient(circle at 50% 24%,rgba(255,255,255,.85),rgba(255,255,255,0) 32%),radial-gradient(circle at 50% 80%,rgba(148,163,184,.08),rgba(148,163,184,0) 38%);pointer-events:none}
html[data-theme="dark"] .t67-iwb-grid-holder.is-empty-grid::after{color:rgba(203,213,225,.68)}
@media(max-width:900px){.t67-iwb-host .ve-main{min-height:auto}.t67-iwb-section-block{margin-top:8px}.t67-iwb-host .ve-main>.t67-iwb-section-block:first-child{margin-top:0}}
@media(max-width:640px){.t67-iwb-host .ve-side,.t67-iwb-host .ve-main{padding:11px}.t67-iwb-grid-holder.is-empty-grid,.t67-iwb-grid-surface{min-height:172px}.t67-iwb-host .ve-main{min-height:auto}.t67-iwb-grid-holder.is-empty-grid::after{font-size:9.5px;inset:auto 12px 10px 12px}}

/* Hide hero keyword rows / pills / action buttons across unified pages */
.hero .hero-actions,
.hero .mood-row,
.hero .pp-pills,
.hero .pp-actions,
.hero .ps-pills,
.hero .ps-actions,
.hero .pod-actions,
.hero .hero-meta,
.hero [class*="hero-actions"],
.hero [class*="hero-pills"],
.hero [class*="hero-chips"],
.hero [class*="hero-tags"],
.hero [class*="keyword"],
.hero [class*="keywords"],
.hero [class*="chips"],
.hero [class*="pills"],
.hero [class*="actions"]{display:none!important}

/* Progress is intentionally non-numeric: API completion time cannot be predicted accurately. */
.t67-iwb-host #iwbProgressPercent{display:none!important}

/* AP upload preview editor */
.t67-ict-edit-wrap{width:min(100%,1040px);display:grid;gap:10px}
.t67-ict-edit-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;width:100%;padding:9px;border:1px solid #293142;border-radius:10px;background:#111827;color:#fff}
.t67-ict-edit-modes,.t67-ict-edit-history{display:flex;gap:5px;align-items:center}
.t67-ict-edit-toolbar button{min-height:31px;padding:0 10px;border:1px solid #3b4658;border-radius:7px;background:#1f2937;color:#fff;font:600 11px/1 Inter,system-ui;cursor:pointer}
.t67-ict-edit-toolbar button:hover,.t67-ict-edit-toolbar button.active{background:#fff;color:#111827;border-color:#fff}
.t67-ict-edit-size,.t67-ict-edit-color{display:flex;align-items:center;gap:7px;font:600 11px/1 Inter,system-ui;color:#dbe3ef}
.t67-ict-edit-size input{width:140px}.t67-ict-edit-size output{min-width:24px;text-align:right;color:#9ca3af}
.t67-ict-edit-color input{width:32px;height:28px;padding:1px;border:1px solid #465164;border-radius:6px;background:transparent}
.t67-ict-edit-history{margin-left:auto}
.t67-ict-edit-stage{display:grid;place-items:center;min-height:280px;max-height:70vh;overflow:auto;border-radius:10px;background:#080d14}
.t67-ict-edit-canvas{display:block;width:auto;height:auto;max-width:100%;max-height:68vh;cursor:crosshair;touch-action:none;user-select:none}
@media(max-width:620px){.t67-ict-edit-toolbar{gap:7px}.t67-ict-edit-size{width:100%}.t67-ict-edit-size input{flex:1;width:auto}.t67-ict-edit-history{margin-left:0}.t67-ict-edit-stage{max-height:64vh}.t67-ict-edit-canvas{max-height:62vh}}
