/* ===== openart clone - workspace css (workspace.css) =====
   Two-panel workspace: .lp (tools / create form / chat) + .rp (creations gallery) */

.wsl{--ws-pink:#fd7921;--ws-panel:#0f1117;--ws-card:#13161c;--ws-inner:#0d0f14;--ws-ln:rgba(214,225,255,.02);--ws-ln2:rgba(248,237,211,.11);--ws-soft:rgba(214,225,255,.04);--ws-soft2:rgba(221,234,248,.08);--ws-t2:#868c96;--ws-t1:#edeef0;--ws-t0:#b0b4ba;
  display:flex;gap:8px;height:calc(100vh - 72px);min-height:520px;align-items:stretch}
#banner:not(:empty)+.app .wsl{height:calc(100vh - 72px - var(--banner-h,0px))}
.lp,.rp{background:var(--ws-panel);border:.67px solid var(--ws-ln);border-radius:20px;min-height:0;min-width:0}
.lp{width:400px;flex:none;display:flex;flex-direction:column;overflow:hidden;position:relative}
.rp{flex:1;position:relative;display:flex;flex-direction:column;padding:0 8px;overflow:hidden}

/* ---------- category tabs ---------- */
.ctabs{display:flex;gap:2px;padding:0 8px;height:56px;align-items:center;flex:none}
.ctabs button{flex:1;height:36px;border-radius:999px;font-size:12px;line-height:16px;font-weight:600;letter-spacing:.05px;color:var(--ws-t2);white-space:nowrap;position:relative;overflow:hidden;transition:color .15s var(--ease),background-color .15s var(--ease)}
.ctabs button:hover{color:var(--ws-t1);background:var(--ws-soft)}
.ctabs button.on{color:#ffffff;background:rgba(217,237,254,.15);background-image:radial-gradient(60% 100% at 50% 100%,rgba(230,238,255,.38),rgba(230,238,255,0) 100%)}
.ctabs button:active:not(:disabled){transform:scale(.98)}

/* ---------- create form ---------- */
.cf{flex:1;min-height:0;overflow-y:auto;padding:0 8px 16px;display:grid;grid-template-columns:1fr 1fr;align-content:start;gap:8px}
.cf>*{grid-column:1/-1;min-width:0}
.cf>div.orow,.cf>div.orow+button.orow{grid-column:auto}

/* tool header */
.thead{position:relative;display:flex;align-items:center;gap:12px;height:64px;padding:8px 12px 8px 8px;border-radius:20px;overflow:hidden;background:var(--ws-soft);text-align:left;isolation:isolate;width:100%}
.thead::before{content:"";position:absolute;inset:-24px;background:var(--g,var(--grad));filter:blur(22px) saturate(1.2);opacity:.75;z-index:-2;transition:opacity .2s var(--ease),transform .4s var(--ease)}
.thead::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(9,15,25,.58) 0%,rgba(9,15,25,.34) 48%,rgba(2,20,42,.64) 100%);z-index:-1}
.thead:hover::before{opacity:.95;transform:scale(1.04)}
.thead:active:not(:disabled){transform:none}
.thead .ti2{width:48px;height:48px;border-radius:12px;background:var(--g,var(--grad));display:grid;place-items:center;flex:none;color:#ffffff;box-shadow:0 0 0 1px rgba(255,255,255,.12) inset}
.thead .ti2 svg{width:22px;height:22px}
.thead b{font-family:"Bricolage Grotesque",ui-sans-serif,system-ui,sans-serif;font-size:16px;line-height:24px;font-weight:600;letter-spacing:-.12px;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thead>svg{width:16px;height:16px;color:var(--ws-t0);opacity:.8}
.thead>svg:last-child{width:20px;height:20px;color:#ffffff;opacity:.85;transition:transform .2s var(--ease)}
.thead:hover>svg:last-child{transform:translateX(3px)}
.thead .sp{flex:1}

/* model / output rows */
.mrow,.orow{position:relative;display:flex;align-items:center;gap:12px;min-height:57px;padding:4px 10px 4px 4px;background:var(--ws-card);border:.67px solid var(--ws-ln);border-radius:16px;text-align:left;color:inherit}
.mrow>span,.orow>span{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.mrow>span{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0;height:40px}
.mrow::before{content:"";width:48px;height:48px;flex:none;border-radius:12px;background:var(--ws-soft) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f9bff' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M5 18v-5M10 18V7M15 18v-9M20 18v-4' stroke='%23b0b4ba'/%3E%3Cpath d='M10 18V7M15 18v-9' stroke='%236f9bff'/%3E%3C/svg%3E") center/24px no-repeat}
.mrow>span{order:1}
.mrow>svg:last-child,.orow>svg:last-child{width:17px;height:17px;color:var(--ws-t0);flex:none;order:2;transition:transform .2s var(--ease)}
.mrow:hover,button.orow:hover{background:#181b22;border-color:rgba(214,225,255,.08)}
.mrow:hover>svg:last-child,button.orow:hover>svg:last-child{transform:translateX(2px);color:#ffffff}
.mrow small,.orow small{display:block;padding:2px 0;font-size:12px;line-height:16px;font-weight:500;color:var(--ws-t2)}
.mrow b,.orow b{display:block;font-size:14px;line-height:20px;font-weight:500;color:var(--ws-t1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.orow>span>svg{width:48px;height:48px;padding:14px;flex:none;border-radius:12px;background:var(--ws-soft);color:var(--ws-t0)}
.orow>span>span{min-width:0;display:flex;flex-direction:column;justify-content:center;height:40px}
.cf>div.orow,.cf>div.orow+button.orow{padding-right:8px}
.cf>div.orow+button.orow{gap:6px}
.cf>div.orow+button.orow>span>svg,.cf>div.orow>span>svg{margin-right:-2px}

/* describe card */
.desc{position:relative;display:flex;flex-direction:column;padding:4px;background:var(--ws-card);border:.67px solid var(--ws-ln);border-radius:16px}
.desc::before{content:"";position:absolute;left:4px;right:4px;top:56px;bottom:4px;background:var(--ws-inner);border:.67px solid var(--ws-ln2);border-radius:12px;pointer-events:none}
.desc>*{position:relative}
.dh{display:flex;align-items:center;justify-content:space-between;gap:16px;height:48px;padding:8px 12px;margin-bottom:4px}
.dh b{font-family:"Bricolage Grotesque",ui-sans-serif,system-ui,sans-serif;font-size:14px;line-height:20px;font-weight:600;color:#ffffff}
.dh .gi{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;color:var(--ws-t0)}
.dh .gi svg{width:16px;height:16px}
.dh .gi:hover{background:var(--ws-soft2);color:#ffffff}

.ref{display:flex;align-items:center;gap:12px;margin:4px 4px 0;padding:8px 12px;min-height:63px;text-align:left;border-radius:8px;border:.67px solid rgba(255,124,36,.98);background:rgba(248,106,0,.08);position:relative;transition:background-color .15s var(--ease),border-color .15s var(--ease),box-shadow .2s var(--ease)}
.ref:hover{background:rgba(248,106,0,.14);box-shadow:0 0 0 3px rgba(255,124,36,.12)}
.rs{position:relative;width:64px;height:36px;flex:none;display:flex;align-items:center;justify-content:center;margin-right:2px}
.rs i{display:block;width:26px;height:34px;border-radius:5px;background:var(--g,linear-gradient(135deg,#ff7a59,#7a3cff));border:1.5px solid #0d0f14;box-shadow:0 2px 6px rgba(0,0,0,.4);transition:transform .2s var(--ease)}
.rs i:nth-child(1){transform:rotate(-12deg) translateX(6px);background:var(--g,linear-gradient(135deg,#ffb347,#ff973c));z-index:1}
.rs i:nth-child(2){transform:translateY(-1px);background:var(--g,linear-gradient(135deg,#ffc53c,#2b3cff));z-index:2}
.rs i:nth-child(3){transform:rotate(12deg) translateX(-6px);background:var(--g,linear-gradient(135deg,#fcb792,#f5576c));z-index:1}
.ref:hover .rs i:nth-child(1){transform:rotate(-16deg) translateX(4px)}
.ref:hover .rs i:nth-child(3){transform:rotate(16deg) translateX(-4px)}
.rt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;padding-right:30px}
.rt b{display:flex;align-items:center;gap:4px;font-size:13px;line-height:20px;font-weight:500;color:#ffffff;white-space:nowrap}
.rt b em{font-style:normal;padding:1px 4px;border-radius:8px;background:var(--ws-soft2);font-size:11px;line-height:16px;font-weight:500;color:var(--ws-t0)}
.rt small{display:block;font-size:12px;line-height:16px;font-weight:400;color:var(--ws-t2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cnt{position:absolute;top:2px;right:2px;padding:2px 6px;border-radius:6px;background:var(--ws-soft2);font-size:11px;line-height:16px;font-weight:500;color:#ffffff}

#fp{display:block;width:calc(100% - 8px);margin:0 4px;height:122px;min-height:122px;padding:6px 8px 16px;background:none;border:0;outline:0;resize:none;font-size:14px;line-height:20px;font-weight:400;color:var(--ws-t1);caret-color:var(--ws-pink)}
#fp::placeholder{color:var(--ws-t2);opacity:1}
.desc:focus-within::before{border-color:rgba(255,124,36,.35);transition:border-color .2s var(--ease)}

.dtool{display:flex;align-items:center;gap:4px;height:36px;margin:0 4px 4px}
.dtool .lk{position:relative;display:inline-flex;align-items:center;gap:8px;height:36px;padding:10px 12px;margin-right:9px;border-radius:10px;font-size:13px;line-height:19.5px;font-weight:500;color:var(--ws-t1)}
.dtool .lk::after{content:"";position:absolute;right:-5px;top:10px;width:1px;height:16px;background:rgba(214,225,255,.12)}
.dtool .lk svg{width:18px;height:18px;color:var(--ws-pink)}
.dtool .lk:hover,.dtool .gi:hover{background:var(--ws-soft2)}
.dtool .gi{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;color:var(--ws-t0)}
.dtool .gi:hover{color:#ffffff}
.dtool .gi svg{width:16px;height:16px}
.dtool .sp{flex:1}

/* toggle switch */
.tg{display:inline-flex;align-items:center;gap:10px;padding:8px;border-radius:10px;font-size:13px;line-height:20px;font-weight:500;color:var(--ws-t1);cursor:pointer;position:relative;user-select:none;flex:none}
.tg input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.tg i{position:relative;display:block;width:32px;height:20px;border-radius:50px;background:var(--ws-t2);flex:none;transition:background-color .2s var(--ease)}
.tg i::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:rgba(255,255,255,.5);box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);transition:transform .2s var(--ease),background-color .2s var(--ease)}
.tg input:checked+i{background:var(--ws-pink)}
.tg input:checked+i::after{transform:translateX(12px);background:#ffffff}
.tg:hover i{filter:brightness(1.15)}
.tg input:focus-visible+i{outline:2px solid rgba(255,166,95,.7);outline-offset:2px}
.orow .tg{padding:0;gap:0}
.orow:hover .tg i{filter:none}

/* generate bar */
.gbar{display:flex;align-items:center;gap:16px;flex:none;padding:16px 8px;background:rgba(21,24,30,.95);border-top:.67px solid rgba(214,225,255,.04)}
.step{display:flex;align-items:center;gap:6px;flex:none;padding:4px;height:46px;background:var(--ws-card);border:.67px solid var(--ws-ln2);border-radius:12px}
.step button{width:37px;height:37px;padding:10px;border-radius:18px;display:grid;place-items:center;color:#ffffff}
.step button svg{width:17px;height:17px}
.step button:hover:not(:disabled){background:var(--ws-soft2)}
.step span{padding:0 4px;min-width:34px;text-align:center;font-size:15px;line-height:22.5px;font-weight:400;color:var(--ws-t2);white-space:nowrap}
.step span::first-letter{font-weight:600;color:#ffffff}

.gen{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;height:44px;padding:8px 8px 12px 12px;border-radius:12px;background:var(--ws-pink);color:#ffffff;font-size:15px;line-height:24px;font-weight:700;white-space:nowrap;overflow:hidden;
  box-shadow:inset 0 1px 0 0 rgba(255,255,255,.3),inset 0 -4px 0 0 rgba(0,0,0,.3);transition:filter .15s var(--ease),box-shadow .1s var(--ease),padding .1s var(--ease),opacity .15s var(--ease)}
.gen::before{content:"";position:absolute;top:0;bottom:0;left:0;width:35%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.28),transparent);transform:translateX(-120%) skewX(-20deg);pointer-events:none}
.gen:hover:not(:disabled){filter:brightness(1.1)}
.gen:hover:not(:disabled)::before{animation:flShine .9s var(--ease) 1}
.gen:active:not(:disabled){transform:none;padding-top:11px;padding-bottom:9px;box-shadow:inset 0 1px 0 0 rgba(255,255,255,.3),inset 0 -1px 0 0 rgba(0,0,0,.3)}
.gen:disabled{opacity:.4;cursor:not-allowed}
.gen span{display:inline-flex;align-items:center;gap:6px}
.gbar .gen{flex:1;min-width:0}
.gen:focus-visible{outline:2px solid #ffffff;outline-offset:2px}

/* ---------- mode switcher (Chat / Tools) ---------- */
.mode{display:flex;gap:8px;padding:8px;flex:none;position:relative}
.mode button{position:relative;flex:1;display:flex;align-items:center;justify-content:center;gap:6px;height:40px;padding:10px 12px;border-radius:999px;font-size:12px;line-height:16px;font-weight:700;color:var(--ws-t0);background:rgba(221,234,248,.04);white-space:nowrap}
.mode button svg{width:20px;height:20px}
.mode button:hover:not(.on){background:var(--ws-soft2);color:#ffffff}
.mode button.on{background:rgba(255,255,255,.95);color:#000000}
.mode button.on:hover{background:#ffffff}
.mode em{position:absolute;top:-4px;left:calc(50% + 30px);padding:2px 5px;border-radius:8px;background:#36e9d1;color:#000000;font-style:normal;font-size:9px;line-height:9px;font-weight:800;box-shadow:inset 0 1px 0 rgba(255,255,255,.2);pointer-events:none}

/* ---------- tool list ---------- */
.tlist{flex:1;min-height:0;overflow-y:auto;padding:0 8px 8px;display:flex;flex-direction:column;gap:4px}
.tlist h4{position:sticky;top:0;z-index:2;flex:none;padding:4px 8px 4px 16px;height:40px;display:flex;align-items:center;background:linear-gradient(var(--ws-panel) 75%,rgba(15,17,23,0));font-family:"Bricolage Grotesque",ui-sans-serif,system-ui,sans-serif;font-size:14px;line-height:20px;font-weight:600;color:#ffffff}
.trow{position:relative;display:flex;align-items:center;gap:10px;flex:none;height:78px;padding:4px 48px 4px 4px;border-radius:12px;text-align:left;transition:background-color .15s var(--ease)}
.trow:hover{background:var(--ws-soft)}
.trow:active{transform:scale(.995)}
.trow .ti{width:64px;height:64px;border-radius:10px;flex:none;display:grid;place-items:center;background:var(--g,var(--grad));color:rgba(255,255,255,.92);overflow:hidden;position:relative}
.trow .ti::after{content:"";position:absolute;inset:0;background:linear-gradient(rgba(255,255,255,.12),rgba(0,0,0,.18))}
.trow .ti svg{width:24px;height:24px;position:relative;z-index:1}
.tx{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.tx b{display:flex;align-items:center;gap:4px;font-family:"Bricolage Grotesque",ui-sans-serif,system-ui,sans-serif;font-size:13px;line-height:20px;font-weight:600;color:#ffffff;white-space:nowrap}
.tx small{display:block;font-size:12px;line-height:16px;font-weight:400;color:var(--ws-t2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tx em{display:inline-block;height:16px;padding:0 6px;border-radius:8px;font-style:normal;font-family:"Bricolage Grotesque",ui-sans-serif,system-ui,sans-serif;font-size:11px;line-height:16px;font-weight:800;box-shadow:inset 0 1px 0 rgba(255,255,255,.2);flex:none}
.tx em.HOT{background:var(--ws-pink);color:#ffffff}
.tx em.NEW{background:#36e9d1;color:#000000;font-family:inherit;font-size:9px;line-height:16px;padding:0 5px}
.trow>svg{position:absolute;right:16px;top:50%;width:16px;height:16px;margin-top:-8px;color:var(--ws-t0);opacity:0;transform:translateX(-4px);transition:opacity .15s var(--ease),transform .15s var(--ease)}
.trow:hover>svg{opacity:1;transform:none}

/* ---------- chat ---------- */
.chat{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}
.msgs{flex:1;min-height:0;overflow-y:auto;padding:8px 16px;display:flex;flex-direction:column;gap:14px;scroll-behavior:smooth}
.m{max-width:88%;font-size:14px;line-height:20px;color:var(--ws-t1);word-break:break-word;white-space:pre-wrap;animation:sd-slideUp .25s var(--ease) both}
.m.u{align-self:flex-end;padding:10px 14px;border-radius:18px 18px 6px 18px;background:rgba(214,225,255,.09);color:#ffffff}
.m.a{align-self:flex-start}
.think{display:inline-flex;align-items:center;font-size:14px;line-height:20px;font-weight:500;background:linear-gradient(90deg,#696e77 0%,#ffffff 50%,#696e77 100%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;animation:thinkingShimmer 2.2s linear infinite}
.think i{display:inline-block;width:4px;height:4px;margin-left:3px;margin-top:6px;border-radius:50%;background:#b0b4ba;-webkit-text-fill-color:initial;animation:agentDotPulse 1.2s ease-in-out infinite}
.think i:nth-child(1){margin-left:5px}
.think i:nth-child(2){animation-delay:.15s}
.think i:nth-child(3){animation-delay:.3s}
.mcards{display:flex;flex-direction:column;gap:8px;margin-top:10px;white-space:normal}
.mcd{display:flex;align-items:center;gap:10px;padding:6px 14px 6px 6px;border-radius:12px;background:var(--ws-card);border:.67px solid var(--ws-ln2);font-size:13px;line-height:20px;font-weight:600;color:#ffffff;transition:background-color .15s var(--ease),border-color .15s var(--ease),transform .15s var(--ease)}
.mcd:hover{background:#1a1d24;border-color:rgba(255,166,95,.4);transform:translateX(2px)}
.mcd .ti{width:32px;height:32px;border-radius:8px;flex:none;display:grid;place-items:center;background:var(--g,var(--grad))}
.mcd .ti svg{width:16px;height:16px}

.hint{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:0 16px 24px;text-align:center}
.hint::before{content:"";width:60px;height:60px;margin-bottom:16px;border-radius:50% 50% 50% 18%;
  background:radial-gradient(ellipse 3.5px 7px at 38% 50%,#161920 98%,transparent),radial-gradient(ellipse 3.5px 7px at 62% 50%,#161920 98%,transparent),radial-gradient(circle at 32% 28%,#ffffff 0,#d9dce4 40%,#8e94a3 100%);box-shadow:0 8px 24px rgba(0,0,0,.45),inset 0 -4px 8px rgba(0,0,0,.2);animation:ws-float 4s ease-in-out infinite}
@keyframes ws-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
.hint h3{font-size:20px;line-height:28px;font-weight:600;background:linear-gradient(to right,#ffffff 68%,rgba(255,255,255,.45) 98%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.hint p{margin:8px 0 28px;font-size:13px;line-height:18px;color:var(--ws-t2);max-width:280px}
.hint .chip{display:inline-flex;align-items:center;height:36px;margin:0 4px 10px;padding:10px 16px;border-radius:99px;font-size:12px;line-height:16px;font-weight:600;color:var(--ws-t1);background:rgba(246,237,216,.04) linear-gradient(rgba(214,225,255,.04) 25%,rgba(214,225,255,.06) 100%)}
.hint .chip:hover{background:rgba(246,237,216,.1);transform:translateY(-1px)}
.hint{flex-flow:row wrap;align-content:center;gap:0}
.hint>h3,.hint>p{flex:0 0 100%}

.cin{position:relative;flex:none;margin:8px;padding:12px 12px 12px 14px;background:var(--ws-card);border:.67px solid var(--ws-ln2);border-radius:20px;transition:border-color .2s var(--ease),box-shadow .2s var(--ease)}
.cin:focus-within{border-color:rgba(255,124,36,.5);box-shadow:0 0 0 3px rgba(255,124,36,.1)}
.cin textarea{display:block;width:100%;min-height:64px;max-height:160px;padding:0 44px 0 0;background:none;border:0;outline:0;resize:none;font-size:14px;line-height:20px;color:var(--ws-t1)}
.cin textarea::placeholder{color:var(--ws-t2);opacity:1}
.cin .send{position:absolute;right:12px;bottom:12px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:#ffffff;background:rgba(255,255,255,.25);transition:background .2s var(--ease),transform .15s var(--ease),box-shadow .2s var(--ease)}
.cin .send svg{width:18px;height:18px}
.cin:has(textarea:not(:placeholder-shown)) .send{background:var(--send)}
.cin .send:hover{transform:scale(1.06);box-shadow:0 4px 16px rgba(255,102,0,.3)}

/* ---------- gallery ---------- */
.gh{display:flex;align-items:center;flex-wrap:wrap;gap:8px 8px;padding:8px 4px;flex:none}
.gh .sp{flex:1;min-width:0}
.sort{display:inline-flex;align-items:center;gap:4px;height:32px;padding:8px 10px;border-radius:999px;background:#ffffff;color:#0e1015;font-size:12px;line-height:16px;font-weight:600;white-space:nowrap}
.sort svg{width:16px;height:16px}
.sort:hover{background:#e9eaec}
.gh .gi{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;border:.67px solid var(--ws-ln2);color:var(--ws-t0)}
.gh .gi svg{width:16px;height:16px}
.gh .gi:hover{background:var(--ws-soft2);color:#ffffff}
.gh .sort+.gi,.gh .sort+.gi+.gi,.gh .sort+.gi+.gi+.gi{width:36px;border-radius:999px;border-color:transparent}
.gsearch{height:32px;width:170px;padding:0 10px;border-radius:8px;background:var(--ws-soft);border:.67px solid var(--ws-ln2);outline:0;font-size:13px;color:#ffffff;animation:sd-fadeIn .2s var(--ease) both;transition:border-color .15s var(--ease),width .2s var(--ease)}
.gsearch:focus{border-color:rgba(255,124,36,.5)}
.gsearch::placeholder{color:var(--ws-t2)}

.keep{position:relative;display:flex;align-items:center;justify-content:center;gap:16px;flex:none;margin:0 0 8px;padding:12px 16px;border-radius:20px;overflow:hidden;font-size:14px;line-height:20px;color:rgba(255,255,255,.72);
  background:radial-gradient(55% 100% at 50% 100%,rgba(230,238,255,.5) 0%,rgba(230,238,255,.18) 35%,rgba(230,238,255,.04) 65%,rgba(230,238,255,0) 100%),linear-gradient(rgba(255,255,255,.08),rgba(255,255,255,.04) 45%,rgba(255,255,255,.07)),rgba(0,0,0,.76);
  border:.67px solid rgba(255,255,255,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.06),inset 0 -1px 0 rgba(255,255,255,.08)}
.keep>svg{width:20px;height:20px;color:var(--ws-t0);flex:none}
.keep b{font-weight:700}
.keep span{display:block}
.keep .btn{height:32px;padding:8px 16px;border-radius:12px;font-size:14px;font-weight:600;background:rgba(255,255,255,.95);color:rgba(0,0,0,.95)}
.keep .btn:hover{background:#ffffff;transform:none}

.grid{flex:none;overflow:visible;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));grid-auto-rows:min-content;gap:8px;padding:0 0 72px;align-content:start}

.cc{position:relative;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--ws-card);border:.67px solid rgba(255,255,255,.06);cursor:pointer;isolation:isolate;animation:sd-fadeIn .3s var(--ease) both;transition:transform .2s var(--ease),border-color .2s var(--ease)}
.cc:hover{border-color:rgba(255,255,255,.18)}
.cc .ph{position:absolute;inset:0;background:var(--g,var(--grad));transition:transform .5s var(--ease);z-index:-1}
.cc:hover .ph{transform:scale(1.05)}
.cc::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(rgba(0,0,0,.35),transparent 30%,transparent 60%,rgba(0,0,0,.55));opacity:0;transition:opacity .2s var(--ease)}
.cc:hover::before,.cc.sel::before{opacity:1}
.cc::after{content:"";position:absolute;inset:0;z-index:4;border-radius:inherit;pointer-events:none;box-shadow:inset 0 0 0 0 var(--green);transition:box-shadow .15s var(--ease)}
.cc.sel::after{box-shadow:inset 0 0 0 2.5px var(--green)}
.cc:has(.gen-ov){animation:sd-fadeIn .3s var(--ease) both,border-flash 2.4s var(--ease) .3s infinite;cursor:default}

.cmeta{position:absolute;left:8px;bottom:8px;z-index:2;display:inline-flex;align-items:center;gap:5px;max-width:calc(100% - 16px);padding:3px 8px 3px 6px;border-radius:999px;background:rgba(0,0,0,.5);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-size:11px;line-height:16px;font-weight:500;color:#ffffff}
.cmeta svg{width:12px;height:12px}
.cmeta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.playb{position:absolute;left:50%;top:50%;z-index:2;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.42);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#ffffff;pointer-events:none;transition:transform .2s var(--ease),background-color .2s var(--ease)}
.playb svg{width:18px;height:18px;margin-left:2px}
.cc:hover .playb{transform:scale(1.1);background:rgba(0,0,0,.6)}
.acts{position:absolute;top:8px;right:8px;z-index:3;display:flex;gap:4px;opacity:0;transform:translateY(-4px);transition:opacity .2s var(--ease),transform .2s var(--ease)}
.cc:hover .acts{opacity:1;transform:none}
.acts button{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:rgba(0,0,0,.55);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);color:#ffffff}
.acts button svg{width:14px;height:14px}
.acts button:hover{background:rgba(0,0,0,.8);transform:scale(1.08)}
.acts button:last-child:hover{background:rgba(220,38,38,.85)}
.chk{position:absolute;top:8px;left:8px;z-index:5;width:22px;height:22px;border-radius:6px;display:grid;place-items:center;border:1.5px solid rgba(255,255,255,.75);background:rgba(0,0,0,.35);color:transparent;opacity:0;transform:scale(.9);transition:opacity .15s var(--ease),transform .15s var(--ease),background-color .15s var(--ease)}
.chk svg{width:14px;height:14px;stroke-width:3}
.cc:hover .chk,.grid:has(.chk.on) .chk{opacity:1;transform:none}
.chk:hover{background:rgba(0,0,0,.6)}
.chk.on{opacity:1;transform:none;background:var(--green);border-color:var(--green);color:#04110a}

.gen-ov{position:absolute;inset:0;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;overflow:hidden;background:rgba(8,10,13,.58);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.shim{position:absolute;top:0;bottom:0;left:0;width:38%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.2),transparent);animation:flShine 1.9s var(--ease) infinite;pointer-events:none}
.pc{position:relative;font-family:"Bricolage Grotesque",ui-sans-serif,system-ui,sans-serif;font-size:24px;line-height:28px;font-weight:700;color:#ffffff;font-variant-numeric:tabular-nums}
.gen-ov small{position:relative;font-size:11px;line-height:16px;font-weight:500;color:var(--ws-t0)}

.selbar{position:absolute;left:8px;right:8px;bottom:8px;z-index:20;display:flex;align-items:center;gap:8px;padding:8px;border-radius:16px;background:#171a21;border:.67px solid rgba(214,225,255,.12);box-shadow:0 9px 64px rgba(0,0,0,.45);opacity:0;visibility:hidden;transform:translateY(12px);pointer-events:none;transition:opacity .2s var(--ease),transform .2s var(--ease),visibility 0s .2s}
.selbar.show{opacity:1;visibility:visible;transform:none;pointer-events:auto;transition:opacity .2s var(--ease),transform .2s var(--ease)}
.selbar span{flex:1;min-width:0;padding-left:6px;font-size:12px;line-height:16px;font-weight:500;color:var(--ws-t1);white-space:nowrap}
.selbar .btn{height:32px;padding:8px 10px;gap:8px;border-radius:10px;font-size:12px;line-height:18px;font-weight:500;flex:none}
.selbar .btn.d{background:var(--ws-soft2);color:var(--ws-t0)}
.selbar .btn.d:first-of-type{background:var(--ws-pink);color:#ffffff}
.selbar .btn.w{background:var(--ws-soft2);color:var(--ws-t0)}
.selbar .btn:hover{filter:brightness(1.15);transform:none}

/* ---------- empty state ---------- */
.empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:0 16px 60px;text-align:center;position:relative}
.cube{position:relative;width:76px;height:76px;margin-bottom:22px;animation:ws-float 5s ease-in-out infinite}
.cube::before,.cube::after,.cube i{content:"";position:absolute;width:56px;height:46px;border-radius:7px;border:1.5px solid rgba(255,255,255,.35)}
.cube::before{left:2px;top:14px;transform:rotate(-9deg);background:linear-gradient(135deg,#6b6f78,#282b33)}
.cube::after{left:16px;top:6px;transform:rotate(4deg);background:linear-gradient(135deg,#aeb3bd,#474a52)}
.cube i{left:14px;top:20px;z-index:2;transform:rotate(-2deg);background:linear-gradient(135deg,#e4e7ee,#7a7f8a 70%,#4b4e56);box-shadow:0 8px 18px rgba(0,0,0,.5)}
.empty h3{font-size:28px;line-height:32px;font-weight:600;background:linear-gradient(to right,#ffffff 0%,rgba(255,255,255,.65) 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;margin-bottom:8px}
.empty p{font-size:14px;line-height:20px;font-weight:500;color:var(--ws-t2)}
.empty small{display:none}

/* ---------- responsive ---------- */
@media(max-width:900px){
  .wsl{flex-direction:column;height:auto;min-height:0;gap:8px}
  .lp{width:100%;height:calc(100vh - 84px);min-height:560px}
  .rp{min-height:480px;height:70vh}
  .grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
}
@media(max-width:700px){
  .wsl{height:auto}
  .lp,.rp{border-radius:16px}
  .thead,.desc{border-radius:16px}
  .cf{grid-template-columns:1fr 1fr}
  .gbar{gap:10px}
  .keep{padding:10px 12px;gap:10px;font-size:13px}
  .gh{padding:8px 2px}
}

/* ================= round 2: states / polish ================= */
.wsl{--t:.15s var(--ease)}
.wsl button,.wsl a,.wsl label{-webkit-tap-highlight-color:transparent}
.wsl button:disabled,.wsl button[aria-disabled=true]{cursor:not-allowed}
.wsl :is(button,a):focus-visible{outline:2px solid rgba(255,166,95,.75);outline-offset:-2px}
.wsl .gen:focus-visible,.wsl .cc:focus-visible{outline-offset:2px}
.wsl .tg input:focus-visible+i{outline:2px solid rgba(255,166,95,.75);outline-offset:2px}

/* tabs */
.ctabs button{transition:color var(--t),background-color var(--t),border-color var(--t)}
.ctabs button.on:hover{color:#ffffff;background-color:rgba(217,237,254,.18)}

/* thead / mrow / orow / ref : 150ms like source */
.thead{transition:background-color var(--t),box-shadow var(--t)}
.thead:hover{background-color:var(--ws-soft2)}
.thead:focus-visible{outline-offset:2px}
.mrow,.orow{transition:background-color var(--t),border-color var(--t),color var(--t)}
.mrow:active,button.orow:active{background:#14171d;border-color:rgba(214,225,255,.1)}
.mrow:focus-visible,button.orow:focus-visible{outline-offset:2px;border-color:rgba(255,166,95,.5)}
div.orow:hover{border-color:rgba(214,225,255,.06)}
.mrow:disabled,button.orow:disabled{opacity:.5;pointer-events:none}
.ref{transition:all .15s var(--ease)}
.ref:active{background:rgba(248,106,0,.2)}
.ref:focus-visible{outline-offset:2px;box-shadow:0 0 0 3px rgba(255,124,36,.25)}
.dh .gi,.dtool .lk,.dtool .gi{transition:background-color var(--t),color var(--t)}
.dh .gi:active,.dtool .lk:active,.dtool .gi:active:not(:disabled){background:rgba(221,234,248,.13)}
.dtool .gi:disabled{opacity:.4;pointer-events:none}
.dtool .lk:focus-visible,.dtool .gi:focus-visible,.dh .gi:focus-visible{outline-offset:-2px}
#fp:disabled{opacity:.5;cursor:not-allowed}
.desc:hover::before{border-color:rgba(248,237,211,.16)}
.desc:focus-within::before{border-color:rgba(255,124,36,.4)}
.tg:active i::after{width:18px}
.tg input:checked:active+i::after{transform:translateX(10px)}
.tg input:disabled+i{opacity:.4}
.tg:has(input:disabled){cursor:not-allowed}
.tg i{transition:background-color .2s var(--ease),filter .15s var(--ease)}

/* generate bar / button */
.gbar{position:relative;z-index:3}
.step button{transition:background-color var(--t),color var(--t)}
.step button:active:not(:disabled){background:rgba(221,234,248,.14)}
.step button:disabled{opacity:.35;cursor:not-allowed}
.gen:disabled:hover::before{animation:none}
.gen:disabled:active{padding-top:8px;padding-bottom:12px;box-shadow:inset 0 1px 0 0 rgba(255,255,255,.3),inset 0 -4px 0 0 rgba(0,0,0,.3)}
.gen.busy,.gen.loading,.gen.running,.gen[aria-busy=true]{cursor:progress;opacity:.75;pointer-events:none}
.gen.busy::before,.gen.loading::before,.gen.running::before,.gen[aria-busy=true]::before{width:50%;animation:flShine 1.3s var(--ease) infinite}

/* mode switch */
.mode button{transition:color var(--t),background-color var(--t)}
.mode button:active:not(.on){background:rgba(221,234,248,.12)}
.mode button:focus-visible{outline-offset:-2px}
.mode button.on:active{background:#e8e9ec}

/* tool rows */
.trow{transition:background-color var(--t)}
.trow:active{background:rgba(214,225,255,.07);transform:none}
.trow:focus-visible{outline-offset:-2px;background:var(--ws-soft)}
.trow>svg{transition:opacity var(--t),transform var(--t)}
.trow:focus-visible>svg{opacity:1;transform:none}
.trow .pin{position:absolute;right:16px;top:50%;width:16px;height:16px;margin-top:-8px;color:var(--ws-pink);opacity:1;transform:none}
.trow:has(.pin):hover>svg:not(.pin){opacity:0}
.tlist h4{justify-content:space-between}
.tlist h4 .vsw{display:inline-flex;gap:2px;padding:2px;border-radius:10px;background:var(--ws-soft2)}
.tlist h4 .vsw button{width:28px;height:24px;border-radius:8px;display:grid;place-items:center;color:var(--ws-t0);transition:background-color var(--t),color var(--t)}
.tlist h4 .vsw button svg{width:16px;height:16px}
.tlist h4 .vsw button:hover{color:#ffffff}
.tlist h4 .vsw button.on{background:rgba(214,225,255,.14);color:#ffffff}
.tlist.gridv{display:grid;grid-template-columns:1fr 1fr;gap:4px;align-content:start}
.tlist.gridv h4{grid-column:1/-1}
.tlist.gridv .trow{flex-direction:column;align-items:flex-start;height:auto;padding:4px 4px 10px}
.tlist.gridv .trow .ti{width:100%;height:auto;aspect-ratio:16/10}
.tlist.gridv .trow .tx{padding:0 6px;width:100%}
.tlist.gridv .trow>svg:not(.pin){display:none}
.tlist.gridv .trow .pin{top:12px;right:12px;margin:0}

/* thumbnails: glossy icon tiles */
.trow .ti,.mcd .ti,.thead .ti2{background-image:radial-gradient(120% 90% at 20% 0%,rgba(255,255,255,.38),rgba(255,255,255,0) 55%),radial-gradient(90% 90% at 100% 100%,rgba(0,0,0,.28),rgba(0,0,0,0) 70%),var(--g,var(--grad));box-shadow:inset 0 0 0 1px rgba(255,255,255,.14),inset 0 1px 0 rgba(255,255,255,.25)}
.trow .ti::after{background:linear-gradient(135deg,rgba(255,255,255,.1),transparent 40%,rgba(0,0,0,.14))}
.trow .ti::before{content:"";position:absolute;width:38px;height:38px;border-radius:12px;background:rgba(255,255,255,.14);box-shadow:inset 0 0 0 1px rgba(255,255,255,.2)}
.trow .ti svg{width:22px;height:22px;filter:drop-shadow(0 1px 2px rgba(0,0,0,.3))}
.thead .ti2 svg,.mcd .ti svg{filter:drop-shadow(0 1px 2px rgba(0,0,0,.3))}

/* gallery header buttons */
.sort{transition:background-color var(--t)}
.sort:active{background:#d9dadd}
.sort:focus-visible{outline-offset:2px}
.gh .gi{transition:background-color var(--t),color var(--t),border-color var(--t)}
.gh .gi:active{background:rgba(221,234,248,.14)}
.gh .gi.on{background:var(--ws-soft2);color:#ffffff}
.gh .gi:focus-visible{outline-offset:-2px}
.keep .btn{transition:background-color var(--t)}
.keep .btn:active{background:#e9eaec}

/* creation cards */
.cc{transition:border-color var(--t),box-shadow .2s var(--ease)}
.cc:focus-visible{outline:2px solid rgba(255,166,95,.75)}
.cc.sel{border-color:var(--green)}
.cc .ph{transition:transform .5s var(--ease),filter .2s var(--ease)}
.cc.sel .ph{filter:brightness(.8);transform:scale(1.03)}
.cc:has(.gen-ov){border-color:rgba(255,166,95,.25)}
.cc:has(.gen-ov):hover .ph{transform:none}
.cc:has(.gen-ov) .chk{display:none}
.cc:has([data-act=cstar][style*="ffd54a"]) .cmeta::after{content:"";width:12px;height:12px;flex:none;background:#ffd54a;-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3 6.1 20.6l1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3 6.1 20.6l1.3-6.6L2.5 9.4l6.6-.8z'/%3E%3C/svg%3E") center/contain no-repeat}
.acts button{transition:background-color var(--t),transform var(--t)}
.acts button:active{transform:scale(.94)}
.acts button:focus-visible{outline-offset:1px}
.cc:focus-within .acts,.cc:focus-within .chk{opacity:1;transform:none}
.cmeta{transition:background-color var(--t)}
.cc:hover .cmeta{background:rgba(0,0,0,.65)}
.chk svg{opacity:0;transition:opacity var(--t)}
.chk:hover{border-color:#ffffff}
.chk.on svg{opacity:1}
.chk:active{transform:scale(.92)}
.chk:focus-visible{outline-offset:2px}
@media(hover:none){.acts,.chk{opacity:1;transform:none}.chk:not(.on){opacity:.85}}

/* running overlay */
.gen-ov{background:rgba(8,10,13,.5);gap:4px}
.gen-ov::before{content:"";width:22px;height:22px;margin-bottom:2px;border-radius:50%;border:2px solid rgba(255,255,255,.18);border-top-color:#ffffff;animation:ws-spin .8s linear infinite}
.gen-ov::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:linear-gradient(90deg,transparent,var(--ws-pink),transparent) -40% 0/40% 100% no-repeat;animation:ws-bar 1.4s var(--ease) infinite}
.gen-ov[style*="--p"]::after{background:linear-gradient(90deg,var(--ws-pink),#ffb07a) 0 0/var(--p) 100% no-repeat,rgba(255,255,255,.1);animation:none}
.pc{font-size:22px;line-height:26px}
@keyframes ws-spin{to{transform:rotate(360deg)}}
@keyframes ws-bar{0%{background-position:-40% 0}100%{background-position:140% 0}}

/* selection bar */
.selbar{backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);background:rgba(23,26,33,.96)}
.selbar .btn{transition:background-color var(--t),filter var(--t)}
.selbar .btn:active{filter:brightness(.92)}
.selbar .btn:focus-visible{outline-offset:2px}
.selbar .btn:disabled{opacity:.4;cursor:not-allowed}

/* ---------- chat ---------- */
.chat:has(>.ct)::before{display:none}
.chat>.ct{flex:none;display:flex;align-items:center;gap:8px;padding:14px 16px 6px;font-size:14px;line-height:20px;font-weight:600;color:#ffffff}
.chat>.ct input{flex:1;min-width:0;height:28px;padding:0 6px;margin-left:-6px;border-radius:8px;background:none;border:.67px solid transparent;font:inherit;color:#ffffff;outline:0;transition:background-color var(--t),border-color var(--t)}
.chat>.ct input:hover{background:var(--ws-soft)}
.chat>.ct input:focus{background:var(--ws-soft);border-color:rgba(255,124,36,.45)}
.msgs{scrollbar-width:thin;scrollbar-color:rgba(214,225,255,.12) transparent}
.m.u{background:rgba(214,225,255,.1);border:.67px solid rgba(214,225,255,.06)}
.m.a{padding:0 2px}
.mcd{position:relative;padding-right:34px;min-height:44px}
.mcd::after{content:"";position:absolute;right:12px;top:50%;width:14px;height:14px;margin-top:-7px;background:var(--ws-t0);opacity:.6;-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform var(--t),opacity var(--t)}
.mcd:hover::after{opacity:1;transform:translateX(2px)}
.mcd:active{transform:scale(.99)}
.mcd:focus-visible{outline-offset:2px}
.hint .chip{transition:background-color var(--t),transform var(--t),color var(--t)}
.hint .chip:hover{color:#ffffff}
.hint .chip:active{transform:scale(.97)}
.cin textarea{scrollbar-width:thin}
.cin:not(:has(textarea:not(:placeholder-shown))) .send{cursor:default}
.cin:not(:has(textarea:not(:placeholder-shown))) .send:hover{transform:none;box-shadow:none}
.cin .send:active{transform:scale(.94)}
.cin .send:focus-visible{outline-offset:2px}
.cin .send:disabled{opacity:.5;cursor:not-allowed}
.cin:hover{border-color:rgba(248,237,211,.18)}
.cin:focus-within{border-color:rgba(255,124,36,.5)}

/* ---------- popups (model / camera / output) ---------- */
.pop .pi{transition:background-color var(--t),color var(--t);cursor:pointer}
.pop .pi:focus-visible{outline:2px solid rgba(255,166,95,.7);outline-offset:-2px}
.pop .pi.on::after{content:"";margin-left:auto;width:14px;height:14px;flex:none;background:var(--green);-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center/contain no-repeat}
.pop .opts{display:flex;flex-wrap:wrap;gap:6px;padding:2px 8px 8px}
.pop .opts button{min-width:52px;height:34px;padding:0 12px;border-radius:10px;background:rgba(221,234,248,.06);border:.67px solid rgba(214,225,255,.06);font-size:13px;line-height:20px;font-weight:500;color:#b0b4ba;cursor:pointer;transition:background-color var(--t),color var(--t),border-color var(--t)}
.pop .opts button:hover{background:rgba(221,234,248,.12);color:#ffffff}
.pop .opts button:active{background:rgba(221,234,248,.16)}
.pop .opts button.on{background:rgba(253,121,33,.16);border-color:rgba(253,121,33,.7);color:#ffffff}
.pop .opts button:focus-visible{outline:2px solid rgba(255,166,95,.7);outline-offset:1px}

/* ---------- mobile ---------- */
@media(max-width:900px){
  .lp{height:calc(100dvh - 84px);min-height:520px}
  .rp{height:auto;min-height:420px}
}
@media(max-width:700px){
  .wsl{gap:8px;height:auto}
  .lp{height:calc(100dvh - 76px);min-height:540px}
  .rp{height:auto;min-height:60vh;overflow:visible}
  .grid{overflow:visible;padding-bottom:72px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .selbar{flex-wrap:nowrap}
  .ctabs{overflow-x:auto;scrollbar-width:none}
  .ctabs button{flex:1 0 auto;min-width:64px;padding:0 10px}
  .ctabs::-webkit-scrollbar{display:none}
  .cf{padding:0 8px 12px}
  .gbar{padding:12px 8px;gap:10px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
  .step{padding:3px;gap:2px}
  .step button{width:34px;height:34px}
  .keep{flex-wrap:wrap;justify-content:center;text-align:center}
  .gh .sp{display:none}
  .gh{gap:6px}
  .gsearch{width:100%;order:9}
  .hint h3{font-size:18px}
  .msgs{padding:8px 12px}
  .m{max-width:92%}
  .trow{height:72px}
  .trow .ti{width:56px;height:56px}
  .pop{max-width:calc(100vw - 16px)}
}
@media(max-width:380px){
  .cf{grid-template-columns:1fr}
  .cf>div.orow,.cf>div.orow+button.orow{grid-column:1/-1}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){
  .wsl *,.pop *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
@media(max-width:700px){
  .lp{height:calc(100dvh - 68px);min-height:480px}
  #banner:not(:empty)+.app .lp{height:calc(100dvh - 68px - 52px)}
  #banner:not(:empty)+.app .wsl{height:auto}
  .rp{min-height:70vh}
}
@media(max-width:340px){.grid{grid-template-columns:1fr}}
@media(max-width:700px){
  .selbar{position:sticky;left:auto;right:auto;bottom:8px;margin:-49px 0 0;flex:none}
}

/* ================= round 3: pixel audit vs openart.ai (measured 1440x900) ================= */
@media(min-width:901px){.lp{width:40.68%;min-width:400px}}
.mode button:not(.on){background:transparent}
.mode button:not(.on):hover{background:var(--ws-soft2)}
.step span{min-width:34px;padding:0;white-space:nowrap}
.orows>[data-act=modep]{grid-column:1/-1}

/* references / brand-kit tab cards (shown over the drop zone on hover, like the source) */
.dbox{position:relative}
.rtabs{display:flex;gap:2px;padding:0 4px;margin:4px 0 0}
.rtabs button{position:relative;flex:1 1 0;min-width:0;display:grid;grid-template-columns:32px 1fr;column-gap:12px;align-items:center;height:63px;padding:12px;border-radius:8px;border:.67px solid var(--ws-ln);background:var(--ws-card);text-align:left;font-size:13px;line-height:20px;font-weight:500;color:#ffffff;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;transition:background-color .15s var(--ease),border-color .15s var(--ease)}
.rtabs button::before{content:"";grid-row:1/3;width:32px;height:32px;border-radius:8px;background:linear-gradient(135deg,#ffc59b,#7f7bff 60%,#ffc743)}
.rtabs button:nth-child(2)::before{background:linear-gradient(135deg,#ffe4d1,#ffa25f 55%,#8b5cff)}
.rtabs button small{grid-column:2;display:block;font-size:12px;line-height:16px;font-weight:400;color:#43484e;overflow:hidden;text-overflow:ellipsis;margin-top:-2px}
.rtabs button:hover,.rtabs button.on:hover{border-color:rgba(255,124,36,.98);background:rgba(248,106,0,.08)}
.rtabs button.on{border-color:rgba(214,225,255,.12)}
.dbox:has(>.ref)>.rtabs{position:absolute;left:0;right:0;top:4px;margin:0;padding:0 4px;z-index:3;opacity:0;pointer-events:none;transition:opacity .3s var(--ease)}
.dbox:has(>.ref:hover)>.rtabs,.dbox:has(>.ref)>.rtabs:hover{opacity:1;pointer-events:auto}

.dbox>.rtabs+.ref{margin-top:4px}

/* ---- gallery (measured) ---- */
.rp{padding:0 8px}
.gh{gap:6px;padding:12px 4px 20px;flex-wrap:nowrap}
.gh .sort+.gi,.gh .sort+.gi+.gi,.gh .sort+.gi+.gi+.gi{margin-left:-4px}
.gh .sort+.gi{margin-left:-4px}
.sort{height:32px;padding:8px 10px;gap:4px}
.keep{justify-content:flex-start;gap:12px;padding:0 24px;height:57px;margin:0 0 8px;color:rgba(255,255,255,.723);text-align:left}
.keep>span{flex:1;min-width:0}
.keep>svg{width:20px;height:20px;color:rgba(255,255,255,.723)}
.keep b{font-weight:700}
.keep .btn{height:32px;padding:0 16px;border-radius:12px;font-size:14px;line-height:20px;font-weight:600;flex:none}
.gscroll{container-type:inline-size;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:0 0 72px;scrollbar-width:thin;scrollbar-color:rgba(214,225,255,.12) transparent}
.gscroll .grid{padding:0}
.gsec{display:block;margin:0}
.gtitle{display:flex;align-items:center;gap:8px;height:50px;padding:16px 4px;font-size:12px;line-height:16px;font-weight:500;color:var(--ws-t2);cursor:pointer;user-select:none}
.gtitle input{-webkit-appearance:none;appearance:none;flex:none;width:18px;height:18px;margin:0;border-radius:6px;border:2px solid rgba(255,255,255,.6);background:rgba(255,255,255,.15);display:grid;place-items:center;cursor:pointer;transition:background-color var(--t),border-color var(--t)}
.gtitle input:hover{border-color:#ffffff}
.gtitle input:checked{background:var(--green);border-color:var(--green)}
.gtitle input:checked::after{content:"";width:9px;height:5px;margin-top:-2px;border-left:2px solid #04110a;border-bottom:2px solid #04110a;transform:rotate(-45deg)}
.gscroll .grid,.grid{display:flex;flex-wrap:wrap;align-items:flex-start;gap:2px;grid-template-columns:none}
.cc{flex:none;height:24.8cqw;min-height:96px;aspect-ratio:var(--ar,1);max-width:100%;border:0;background:#171a21}
.cc:hover,.cc.sel{border:0}
.cc.sel::after{box-shadow:inset 0 0 0 2px var(--green)}
.cc::before{background:rgba(0,0,0,.5);z-index:2}
.cc:hover::before,.cc.sel::before{opacity:1}
.cc:has(.gen-ov)::before{display:none}
.cc .ph{filter:none}
.acts{top:4px;right:4px;gap:2px;z-index:6}
.acts button{width:32px;height:32px;border-radius:8px;background:rgba(0,0,0,.5);backdrop-filter:none;-webkit-backdrop-filter:none;color:rgba(255,255,255,.95)}
.acts button:first-child{border-radius:10px;color:rgba(255,255,255,.85)}
.acts button svg{width:16px;height:16px}
.acts button:hover{background:rgba(0,0,0,.7);transform:none}
.acts button:last-child:hover{background:rgba(0,0,0,.7)}
.chk{top:8px;left:8px;width:18px;height:18px;border-radius:6px;border:1.33px solid rgba(255,255,255,.6);background:rgba(255,255,255,.15);z-index:6}
.chk svg{width:12px;height:12px}
.cmeta{left:4px;bottom:4px;z-index:6;padding:0;gap:2px;background:none;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:0;max-width:calc(100% - 70px);opacity:0;transition:opacity .2s var(--ease)}
.cc:hover .cmeta,.cc:focus-within .cmeta{opacity:1;background:none}
.cres{display:inline-flex;align-items:center;gap:3px;height:20px;padding:0 6px;margin:0;border-radius:999px;background:rgba(0,0,0,.3);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);font-size:11px;line-height:16px;font-weight:500;color:#ffffff}
.cres::before{content:"";width:14px;height:14px;flex:none;background:#ffffff;-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/contain no-repeat}
.cmeta>svg{width:20px;height:20px;padding:3px;border-radius:50%;background:rgba(0,0,0,.3);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);flex:none}
.cuse{position:absolute;right:4px;bottom:4px;z-index:6;display:inline-flex;align-items:center;justify-content:center;gap:0;height:32px;min-width:59px;padding:0 6px 0 10px;border-radius:8px;background:rgba(255,255,255,.95);color:rgba(0,0,0,.95);font-size:12px;line-height:16px;font-weight:500;opacity:0;transform:translateY(2px);transition:opacity .2s var(--ease),transform .2s var(--ease),background-color var(--t)}
.cuse svg{width:16px;height:16px}
.cc:hover .cuse,.cc:focus-within .cuse{opacity:1;transform:none}
.cuse:hover{background:#ffffff}
.wm{left:50%;right:auto;top:50%;bottom:auto;transform:translate(-50%,-50%);z-index:1;font-size:15px;line-height:20px;font-weight:700;letter-spacing:0;opacity:.6;white-space:nowrap;text-shadow:0 1px 4px rgba(0,0,0,.25)}
.wm::before{content:"\221E\00a0";font-size:20px;vertical-align:-2px}
.cc:hover .wm{display:block}
.dbox:has(>.ref)>.ref{transition:opacity .3s var(--ease),background-color .15s var(--ease)}
.dbox:has(>.ref:hover)>.ref,.dbox:has(>.rtabs:hover)>.ref{opacity:0}

/* describe-box metrics (video 301px / image 305px tall like the source) */
.desc::before{bottom:5px}
.dbox{gap:0}
.ref{height:64px;min-height:64px;margin:4px 4px 0}
#fp{margin:8px 4px 0;height:122px;min-height:122px}
.dbox:not(:has(.lk)) #fp{height:126px;min-height:126px}
.dbox>.rtabs+.ref,.dbox>.rtabs:not(:has(+.ref)){margin-top:4px}
.dtool{margin:0 4px 5px}
.rtabs{align-items:center;height:64px;padding:0 4px;margin:4px 0 0}
.rtabs button{height:auto;min-height:57px;row-gap:2px;padding:12px;background:var(--ws-card)}
.rtabs button.on{background:var(--ws-card)}
.rtabs button:hover,.rtabs button.on:hover{background:rgba(248,106,0,.08)}
.dbox:has(>.ref)>.rtabs{top:4px;height:64px}

/* ================= Models / Brand Kit overlay panel (floats over the gallery, 684px wide) ================= */
.rp>.mpanel{position:absolute;z-index:30;top:0;left:0;right:8px;bottom:0;display:flex;flex-direction:column;gap:4px;padding:0 8px 8px;overflow:hidden;background:#171a21;border:.67px solid rgba(214,225,255,.12);border-radius:20px;box-shadow:0 8px 64px rgba(0,0,0,.5);animation:sd-fadeIn .2s var(--ease) both}
.mpanel>*{flex:none;min-width:0}
.mph{display:flex;align-items:center;justify-content:space-between;height:57px;padding:0 12px 0 11px;margin:0}
.mph h3{font-size:16px;line-height:24px;font-weight:600;color:#ffffff}
.mph .gi{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;color:var(--ws-t0);transition:background-color var(--t),color var(--t)}
.mph .gi svg{width:16px;height:16px}
.mph .gi:hover{background:var(--ws-soft2);color:#ffffff}
.msel{display:flex;justify-content:flex-end;margin:0 0 4px}
.msel button,.msm{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 10px;border-radius:10px;font-size:12px;line-height:18px;font-weight:500;color:var(--ws-t0);transition:background-color var(--t),color var(--t)}
.msel button:hover{background:var(--ws-soft2);color:#ffffff}
.msel svg{width:16px;height:16px}
.mrecw{position:relative;height:205px;padding:0 4px;border-radius:16px;background:rgba(26,29,37,.6);border:.67px solid rgba(214,225,255,.02)}
.mlbl{margin:0;padding:14px 8px 10px;font-size:12px;line-height:16px;font-weight:400;color:var(--ws-t0)}
.mrec.row{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;scroll-snap-type:x proximity;padding:0}
.mrec.row::-webkit-scrollbar{display:none}
.mpanel .mrc{position:relative;flex:none;width:306px;height:160px;border-radius:12px;border:1.33px solid transparent;overflow:hidden;cursor:pointer;scroll-snap-align:start;text-align:left;transition:border-color var(--t),transform .2s var(--ease)}
.mpanel .mrc:hover{border-color:rgba(255,255,255,.25)}
.mpanel .mrc.on,.mpanel .mrc[aria-current=true]{border-color:rgba(255,124,36,.98)}
.mpanel .mrc .lb{position:absolute;left:0;right:0;bottom:0;display:flex;flex-direction:column;gap:6px;padding:40px 16px 16px;background:linear-gradient(transparent,rgba(0,0,0,.72));color:#ffffff}
.mpanel .mrc .lb b{display:block;font-size:20px;line-height:24px;font-weight:700;letter-spacing:-.2px;text-shadow:0 1px 8px rgba(0,0,0,.35)}
.mpanel .mrc .lb small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:16px;font-weight:500;color:rgba(255,255,255,.6)}
.mnext{position:absolute;right:8px;top:104px;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.95);color:#000000;z-index:3}
.mnext svg{width:16px;height:16px}
.mall{flex:1;min-height:0;display:flex;flex-direction:column;border-radius:16px;background:rgba(26,29,37,.6);overflow:hidden}
.mbar{display:flex;align-items:center;gap:0;padding:14px 10px 12px 10px;flex:none}
.mbar .sp{flex:1}
.mtabs{display:inline-flex;align-items:center;gap:0;flex-wrap:wrap;width:max-content;max-width:100%;padding:0;border-radius:100px;background:rgba(248,237,211,.11);border:.67px solid rgba(214,225,255,.02)}
.mtabs button{height:32px;padding:0 10px;border-radius:100px;font-size:12px;line-height:16px;font-weight:500;color:var(--ws-t0);white-space:nowrap;transition:background-color var(--t),color var(--t)}
.mtabs button:hover:not(.on){color:#ffffff}
.mtabs button.on{background:#ffffff;color:#0e1015;font-weight:600}
.mpanel>.mtabs{margin:4px 4px 0}
.mfil{display:flex;align-items:center;gap:0}
.mfil select,.mfil input,.mfil .mf{-webkit-appearance:none;appearance:none;height:32px;padding:0 24px 0 8px;border:0;border-radius:64px;background-color:transparent;font-family:inherit;font-size:12px;line-height:16px;font-weight:500;color:var(--ws-t0);outline:0;cursor:pointer;transition:background-color var(--t),color var(--t)}
.mfil select{background-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b0b4ba' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 6px center;background-size:14px}
.mfil select:hover,.mfil input:hover,.mfil input:focus{background-color:var(--ws-soft2);color:#ffffff}
.mfil select option{background:#171a21;color:#edeef0}
.mfil input{width:76px;padding:0 8px 0 26px;cursor:text;background-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b0b4ba' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:8px center;background-size:14px}
.mfil input:focus{width:150px}
.mfil input::placeholder{color:var(--ws-t0);opacity:1}
.mpanel>.mfil{padding:0 4px;justify-content:flex-end}
.mlist{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:2px;padding:0 6px 6px;scrollbar-width:thin;scrollbar-color:rgba(214,225,255,.14) transparent}
.mpanel>.mlist{border-radius:16px;background:rgba(26,29,37,.6);padding:6px}
.mli{position:relative;display:flex;align-items:flex-start;gap:12px;flex:none;width:100%;min-height:68px;padding:8px;border-radius:12px;background:rgba(19,22,28,.4);text-align:left;color:#ffffff;transition:background-color var(--t)}
.mli:hover{background:rgba(214,225,255,.08)}
.mli.on{background:rgba(217,237,254,.15)}
.mlo{display:grid;place-items:center;flex:none;width:44px;height:44px;border-radius:12px;background:rgba(221,234,248,.08);color:#ffffff;font-size:16px;font-weight:700;overflow:hidden}
.mlt{display:flex;flex-direction:column;min-width:0;flex:1;padding-top:4px}
.mlt b{display:flex;align-items:center;gap:4px;font-size:12px;line-height:20px;font-weight:600;color:#ffffff}
.mlt small{display:block;font-size:12px;line-height:16px;font-weight:400;color:var(--ws-t2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mtag{display:inline-flex;align-items:center;height:16px;padding:0 6px;border-radius:4px;font-style:normal;font-size:10px;line-height:12px;font-weight:500;background:rgba(34,255,153,.12);color:rgba(70,254,165,.83)}
.mtag.top,.mtag.arena{background:rgba(254,105,0,.19);color:#ffb582}
.mtag.fast{background:rgba(60,160,255,.16);color:#7fc0ff}
.mchips{display:flex;gap:6px;margin-top:12px}
.mchip{display:inline-flex;align-items:center;gap:4px;height:20px;padding:0 6px;border-radius:6px;background:rgba(221,234,248,.08);font-size:12px;line-height:16px;font-weight:500;color:var(--ws-t2);white-space:nowrap}
.mli>.mchip{align-self:flex-end}
.mchip::before{content:"";width:14px;height:14px;flex:none;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center/contain no-repeat}
.ms{padding:24px;text-align:center;font-size:13px;color:var(--ws-t2)}

/* Brand Kit */
.bkit .bknote{display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;margin:0 0 8px;border-radius:12px;background:rgba(250,130,0,.13);color:#ffca16;font-size:12px;line-height:16px;font-weight:400}
.bkit .bknote::before{content:"";width:16px;height:16px;flex:none;background:#ffca16;-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16.5v.01'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16.5v.01'/%3E%3C/svg%3E") center/contain no-repeat}
#bkset{-webkit-appearance:none;appearance:none;width:100%;height:40px;padding:0 36px 0 14px;margin:0 0 12px;border:0;border-radius:10px;background-color:rgba(221,234,248,.08);background-image:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b0b4ba' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:16px;font-size:14px;font-weight:500;color:var(--ws-t1);outline:0;cursor:pointer}
#bkset:hover{background-color:rgba(221,234,248,.12)}
.bkit .mtabs{margin:8px 4px 0}
.bkit .empty{flex:1;min-height:0;padding:0 16px 40px;animation:none}
.bkit .empty h3{font-size:14px;line-height:20px;font-weight:500;background:none;-webkit-text-fill-color:var(--ws-t2);color:var(--ws-t2);margin:8px 0 20px}
.bkit .empty .cube{margin-bottom:6px}
.bkit .empty .btn.g{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 32px;border-radius:10px;background:var(--ws-pink);color:#ffffff;font-size:16px;line-height:24px;font-weight:700;box-shadow:inset 0 1px 0 0 rgba(255,255,255,.3),inset 0 -4px 0 0 rgba(0,0,0,.3)}
.bkit .empty .btn.g:hover{filter:brightness(1.1);transform:none}
@media(max-width:900px){.rp>.mpanel{position:fixed;z-index:60;inset:8px;border-radius:16px}.mpanel .mrc{width:260px;height:150px}}

/* ================= popovers: Output / Mode / Quality (measured) ================= */
.pop:has(.pt){padding:8px;border-radius:16px;background:#171a21;box-shadow:0 8px 64px rgba(0,0,0,.6);max-height:calc(100vh - 16px)}
.pop .pt{padding:8px 12px;font-size:14px;line-height:20px;font-weight:600;color:#ffffff;cursor:default}
.pop:has(.pt) .pi.hd,.pop .pl{padding:8px 8px 12px;font-size:13px;line-height:20px;font-weight:500;color:var(--ws-t0);letter-spacing:0;cursor:default}
.pop:has(.pt) .pi.hd:not(:first-of-type){padding-top:8px}
.pop:has(.ars){min-width:min(600px,calc(100vw - 16px))!important;width:min(600px,calc(100vw - 16px))}
.pop:has(.pseg){min-width:min(360px,calc(100vw - 16px))!important}
.pop .opts.ars,.pop .opts.seg{display:flex!important;flex-wrap:nowrap;gap:2px;padding:0;margin:0 0 8px;border-radius:12px;background:rgba(214,225,255,.04);border:.67px solid rgba(214,225,255,.02)}
.pop .opts.ars{display:flex!important;grid-template-columns:none!important}
.pop .opts.ars button{flex:1 1 0;min-width:0;height:64px;padding:10px 0 0;border-radius:12px;border:0;background:transparent;display:grid!important;grid-template-rows:20px 20px;gap:4px;justify-items:center;align-items:center;align-content:start;font-size:13px;line-height:20px;font-weight:500;color:var(--ws-t0);transition:background-color var(--t),color var(--t)}
.pop .opts.ars button:hover{background:rgba(221,234,248,.08);color:#ffffff}
.pop .opts.ars button.on,.pop .opts.seg button.on{background:rgba(217,237,254,.15);color:var(--ws-t1);border:0}
.pop .opts.ars button span{line-height:20px}
.pop .opts.seg button{flex:1 1 0;min-width:0;height:40px;padding:0;border-radius:12px;border:0;background:transparent;font-size:13px;line-height:20px;font-weight:500;color:var(--ws-t0);text-align:center}
.pop .opts.seg button:hover:not(.on){background:rgba(221,234,248,.08);color:#ffffff}
.pop .opts.seg{margin-bottom:8px}
.pop .csize{display:flex;align-items:center;gap:8px;padding:0 0 4px!important}
.pop .csize input{flex:1 1 0;min-width:0;width:auto!important;height:40px;padding:0 12px;border-radius:12px;border:.67px solid rgba(214,225,255,.02);background:rgba(214,225,255,.04);font:500 13px/20px inherit;font-family:inherit;color:var(--ws-t1);text-align:right;outline:0;-moz-appearance:textfield}
.pop .csize input::-webkit-outer-spin-button,.pop .csize input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.pop .csize input:focus{border-color:rgba(255,124,36,.5)}
.pop .csize label{position:relative;flex:1 1 0;min-width:0;display:flex;align-items:center}
.pop .csize label span{position:absolute;left:12px;z-index:1;font-size:13px;line-height:20px;font-weight:500;color:var(--ws-t2);pointer-events:none}
.pop .csize label input{width:100%!important;flex:1}
.pop .csize .gi{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:10px;border:.67px solid rgba(248,237,211,.11);color:var(--ws-t0);transition:background-color var(--t),color var(--t)}
.pop .csize .gi.on{background:rgba(217,237,254,.15);color:#ffffff}
.pop .csize .gi svg{width:20px;height:20px}
/* segmented option cards (Mode, Quality): title + caption */
.pop .pseg{display:flex;gap:2px;margin:0 0 8px;padding:0;border-radius:12px;background:rgba(214,225,255,.04);border:.67px solid rgba(214,225,255,.02)}
.pop .pseg button{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-width:0;height:60px;padding:0 16px;border-radius:12px;text-align:center;white-space:nowrap;transition:background-color var(--t)}
.pop .pseg button b{display:block;font-size:13px;line-height:20px;font-weight:500;color:var(--ws-t0)}
.pop .pseg button small{display:block;font-size:12px;line-height:16px;font-weight:500;color:var(--ws-t2)}
.pop .pseg button:hover:not(.on){background:rgba(221,234,248,.08)}
.pop .pseg button.on{background:rgba(217,237,254,.15)}
.pop .pseg button.on b{color:var(--ws-t1)}

/* ================= Camera movement panel (right overlay) ================= */
.mpanel.cam{overflow-y:auto}
.cam .camt{padding:0 12px 4px;text-align:center}
.cam .camt h2{margin:0 0 2px;font-size:28px;line-height:32px;font-weight:600;color:#ffffff;letter-spacing:-.2px}
.cam .camt h2 i,.cam .camt h2 em{font-style:normal;background:linear-gradient(90deg,#d7a8ff,#ff8c3c);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.cam .camt p{margin:0;font-size:12px;line-height:16px;font-weight:400;color:var(--ws-t0)}
.cam .bknote{margin:8px 8px 8px;height:32px;padding:0 8px}
.cgrid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px 4px;padding:0 4px 12px}
.cg{display:flex;flex-direction:column;align-items:stretch;min-width:0;border-radius:8px;text-align:center;cursor:pointer}
.cg .ci{position:relative;display:block;aspect-ratio:1;border-radius:8px;overflow:hidden;background:var(--g,rgba(221,234,248,.08));border:2px solid transparent;transition:border-color var(--t),transform .2s var(--ease)}
.cg:hover .ci{border-color:rgba(255,255,255,.3)}
.cg.on .ci{border-color:rgba(255,124,36,.98)}
.cg>span:last-child{display:block;height:36px;padding-top:6px;font-size:12px;line-height:16px;font-weight:400;color:var(--ws-t2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cg.on>span:last-child,.cg:hover>span:last-child{color:#ffffff}

/* ================= creation detail modal / lightbox (measured 1440x900: dialog 1276x740, r20, 9px inset) ================= */
.ov:has(.mdl.lb){background:rgba(0,0,0,.3);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:40px;align-items:center;justify-content:center}
.ov .mdl.lb{position:relative;display:block;width:calc(100vw - 164px);max-width:1920px;height:min(740px,calc(100vh - 160px));max-height:none;padding:8px;overflow:visible;border-radius:20px;background:#0f1117;border:.667px solid rgba(248,237,211,.11);box-shadow:0 24px 80px rgba(0,0,0,.55)}
.ov .mdl.lb>.mx{position:absolute;top:-1px;right:-43px;left:auto;z-index:8;display:grid;place-items:center;width:32px;height:32px;padding:0;border-radius:50%;background:#696e77;color:#ffffff;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none}
.ov .mdl.lb>.mx:hover{background:#80858e}
.ov .mdl.lb>.mx svg{width:16px;height:16px}
.ov .mdl.lb .lbnav{position:absolute;top:calc(50% - 16px);z-index:8;display:grid;place-items:center;width:32px;height:32px;padding:0 0 3px;border-radius:10px;background:rgba(221,234,248,.08);color:#ffffff;font-size:22px;line-height:1;backdrop-filter:none;transition:background-color var(--t)}
.ov .mdl.lb .lbnav.prev{left:-43px;right:auto}
.ov .mdl.lb .lbnav.next{right:-43px;left:auto}
.ov .mdl.lb .lbnav:hover{background:rgba(221,234,248,.16)}
.ov .mdl.lb .lbx{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:10px;height:100%;min-height:0;max-height:none;overflow:visible}
.ov .mdl.lb .lbm{display:flex;flex-direction:column;gap:8px;min-width:0;min-height:0}
.ov .mdl.lb .lbup{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;height:80px;margin:0;padding:0 20px 0 16px;border-radius:12px;background:rgba(41,249,43,.04);color:#ffffff}
.ov .mdl.lb .lbup::before{content:"";width:16px;height:16px;flex:none;margin-right:-8px;align-self:center;background:rgb(29,218,104);-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 16V8M8.5 11.5L12 8l3.5 3.5'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 16V8M8.5 11.5L12 8l3.5 3.5'/%3E%3C/svg%3E") center/contain no-repeat}
.ov .mdl.lb .lbup>div{flex:1;min-width:0;padding-left:4px}
.ov .mdl.lb .lbup b{display:block;font-size:14px;line-height:20px;font-weight:600;color:#ffffff}
.ov .mdl.lb .lbup small{display:block;margin-top:4px;font-size:12px;line-height:16px;font-weight:400;color:var(--ws-t0);opacity:1}
.ov .mdl.lb .lbup .btn{flex:none;height:32px;min-width:67px;padding:0 10px;border-radius:8px;background:rgba(34,255,70,.12);color:rgb(29,218,104);font-size:12px;line-height:18px;font-weight:500;box-shadow:none;border:0}
.ov .mdl.lb .lbup .btn:hover{background:rgba(34,255,70,.2);filter:none;transform:none}
.ov .mdl.lb .lbx .media.big{flex:1;width:100%;height:auto;min-height:0;border-radius:12px;background:#0f1117;overflow:hidden}
.ov .mdl.lb .lbx .media.big .ph{border-radius:12px}
.ov .mdl.lb .lbx .media.big img,.ov .mdl.lb .lbx .media.big video{border-radius:12px}
.ov .mdl.lb .wm{font-size:28px;line-height:32px;opacity:.5}
.ov .mdl.lb .wm::before{font-size:36px;vertical-align:-4px}
.ov .mdl.lb .lbi{display:flex;flex-direction:column;gap:0;padding:0 0 12px;background:none;border:0;overflow-y:auto;min-width:0;min-height:0;scrollbar-width:thin;scrollbar-color:rgba(214,225,255,.12) transparent}
.ov .mdl.lb .lbi>*{flex:none}
.ov .mdl.lb .lbicons{display:flex;justify-content:flex-end;gap:0;margin:0 0 4px;padding:0}
.ov .mdl.lb .lbicons .gi{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;color:var(--ws-t0);transition:background-color var(--t),color var(--t)}
.ov .mdl.lb .lbicons .gi svg{width:16px;height:16px}
.ov .mdl.lb .lbicons .gi:hover{background:rgba(221,234,248,.08);color:#ffffff}
.ov .mdl.lb .lbi h5{display:flex;align-items:center;justify-content:space-between;min-height:16px;margin:24px 8px 0 8px;font-size:12px;line-height:16px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--ws-t2)}
.ov .mdl.lb .lbicons+h5{margin-top:0}
.ov .mdl.lb .lbi h5 .gi{display:grid;place-items:center;width:32px;height:32px;margin:-8px -8px -8px 0;border-radius:10px;color:var(--ws-t0);transition:background-color var(--t),color var(--t)}
.ov .mdl.lb .lbi h5 .gi svg{width:16px;height:16px}
.ov .mdl.lb .lbi h5 .gi:hover{background:rgba(221,234,248,.08);color:#ffffff}
.ov .mdl.lb .lbi h5:has(.gi){margin-bottom:0}
.ov .mdl.lb .lbi p{margin:10px 8px 0;font-size:13px;line-height:20px;font-weight:400;color:#ffffff;overflow-wrap:anywhere}
.ov .mdl.lb .lbchips{display:flex;flex-wrap:wrap;gap:4px;margin:10px 8px 0}
.ov .mdl.lb .lbchips .chip2{display:inline-flex;align-items:center;height:20px;padding:0 6px;border-radius:6px;background:rgba(221,234,248,.08);border:0;font-size:11px;line-height:16px;font-weight:500;color:#ffffff}
.ov .mdl.lb .lbi code{display:block;margin:10px 8px 0;font-family:inherit;font-size:13px;line-height:20px;font-weight:400;color:#ffffff;background:none;padding:0;overflow-wrap:anywhere}
.ov .mdl.lb .lacts{display:flex;flex-direction:column;gap:0;margin:12px 0 0}
.ov .mdl.lb .lacts .pi{display:flex;align-items:center;gap:8px;width:100%;height:36px;padding:0 12px;border-radius:8px;font-size:13px;line-height:20px;font-weight:500;color:var(--ws-t0)}
.ov .mdl.lb .lacts .pi svg{width:18px;height:18px;flex:none}
.ov .mdl.lb .lacts .pi:hover{background:rgba(221,234,248,.08);color:#ffffff}
.ov .mdl.lb .btn.recreate{display:flex;align-items:center;justify-content:center;gap:8px;width:calc(100% - 8px);height:36px;margin:12px 4px 0;padding:0 12px;border-radius:8px;background:#edeef0;color:#0e1015;font-size:13px;line-height:20px;font-weight:500;border:0;box-shadow:none}
.ov .mdl.lb .btn.recreate:hover{background:#ffffff;filter:none;transform:none}
.ov .mdl.lb .btn.recreate svg{width:18px;height:18px}
.ov .mdl.lb .lbb{display:flex;flex-wrap:nowrap;gap:8px;margin:8px 4px 0;padding:0}
.ov .mdl.lb .lbb .btn{flex:1 1 0;min-width:0;height:36px;padding:0 12px;border-radius:8px;background:rgba(221,234,248,.08);color:var(--ws-t1);font-size:13px;line-height:20px;font-weight:500;border:0;box-shadow:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.ov .mdl.lb .lbb .btn:hover{background:rgba(221,234,248,.14);filter:none;transform:none}
.ov .mdl.lb .lbb .btn svg{width:18px;height:18px}
@media(max-width:900px){
  .ov:has(.mdl.lb){padding:0;align-items:stretch}
  .ov .mdl.lb{width:100vw;height:100dvh;max-width:none;border-radius:0;border:0;padding:8px;overflow:auto}
  .ov .mdl.lb>.mx{top:12px;right:12px;background:rgba(0,0,0,.55);backdrop-filter:blur(6px);z-index:20}
  .ov .mdl.lb .lbnav{display:none}
  .ov .mdl.lb .lbx{grid-template-columns:minmax(0,1fr);height:auto}
  .ov .mdl.lb .lbx .media.big{flex:none;height:min(60vh,520px)}
  .ov .mdl.lb .lbi{overflow:visible;padding-bottom:24px}
}

/* ws tokens also needed by popovers / modals (they live outside .wsl) */
:root{--ws-pink:#fd7921;--ws-panel:#0f1117;--ws-card:#13161c;--ws-inner:#0d0f14;--ws-ln:rgba(214,225,255,.02);--ws-ln2:rgba(248,237,211,.11);--ws-soft:rgba(214,225,255,.04);--ws-soft2:rgba(221,234,248,.08);--ws-t2:#868c96;--ws-t1:#edeef0;--ws-t0:#b0b4ba;--t:.15s var(--ease)}
.ov .mdl.lb .lbx .media.big:has(img,video) .ph{display:none}

/* tool list (measured): toggle 62x33, pin button 32x32 instead of chevron */
.tlist h4 .vsw,.tlist h4 .vt{height:33px;padding:2px;gap:0;border-radius:8px;background:none;border:.67px solid var(--ws-ln2)}
.tlist h4 .vsw button,.tlist h4 .vt .gi{width:28px;height:28px;border-radius:6px}
.tlist h4 .vsw button.on,.tlist h4 .vt .gi.on{background:rgba(217,237,254,.15)}
.tlist h4{padding-right:3px}
.trow>svg:not(.pin){display:none}
.trow .pin{right:17px;opacity:1;color:var(--ws-pink)}
.trow .pinb{position:absolute;right:9px;top:50%;margin-top:-16px;width:32px;height:32px;display:grid;place-items:center;border-radius:8px;color:var(--ws-t0);opacity:0;transition:opacity var(--t),background-color var(--t),color var(--t)}
.trow:hover .pinb,.trow:focus-within .pinb,.trow .pinb:focus-visible{opacity:1}
.trow .pinb svg{width:16px;height:16px}
.trow .pinb:hover{background:var(--ws-soft2);color:#ffffff}
.trow .pinb.on{opacity:1;color:var(--ws-pink)}
.trow .pinb.on svg{fill:currentColor}

/* ================= chat (measured) ================= */
.chat>.ct{height:48px;padding:0 13px;gap:0;align-items:center}
.chat>.ct input,.chat>.ct .ctitle{flex:0 1 auto;width:auto;min-width:40px;max-width:calc(100% - 100px);field-sizing:content;height:32px;padding:0 6px 0 0;margin:0;border-radius:8px;font-size:14px;line-height:20px;font-weight:600;color:#ffffff;text-overflow:ellipsis}
.chat>.ct input:hover{background:none}
.chat>.ct input:focus{padding-left:6px;background:var(--ws-soft)}
.chat>.ct .gi{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:8px;color:var(--ws-t0);transition:background-color var(--t),color var(--t)}
.chat>.ct .gi svg{width:14px;height:14px}
.chat>.ct .gi:hover{background:var(--ws-soft2);color:#ffffff}
.chat>.ct .gi:nth-of-type(2){order:1}
.chat>.ct .gi:nth-of-type(1){order:3;margin-left:auto;width:36px;height:36px;border-radius:10px}
.chat>.ct .gi:nth-of-type(1) svg{width:16px;height:16px}
.hint{padding-bottom:0}
.hint h3{font-size:20px;line-height:28px;margin-top:0}
.hint::before{margin-bottom:16px}
.hint .chip{margin:0 5px 10px;height:36px;padding:0 15px;gap:8px;font-size:12px;font-weight:500;background:rgba(246,237,216,.04);color:var(--ws-t1)}
.hint .chip svg{width:16px;height:16px}
.hint .more{display:inline-flex;align-items:center;gap:6px;height:32px;margin:14px auto 0;padding:0 12px;border-radius:999px;font-size:12px;line-height:18px;font-weight:500;color:var(--ws-t0)}
.hint .more:hover{background:var(--ws-soft2);color:#ffffff}
.hint .more svg{width:14px;height:14px}
.cin{margin:0 8px 8px;padding:0;min-height:160px;display:flex;flex-direction:column;border-radius:20px;background:var(--ws-card);box-shadow:0 8px 32px rgba(0,0,0,.22)}
.cin textarea{flex:1;min-height:100px;max-height:240px;padding:16px 16px 8px;font-size:13px;line-height:20px}
.cin .crow{display:flex;align-items:center;gap:4px;flex:none;padding:0 12px 12px}
.cin .crow .sp{flex:1}
.cin .cb,.cin .cpill{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;border-radius:999px;color:var(--ws-t0);font-size:12px;line-height:16px;font-weight:500;white-space:nowrap;transition:background-color var(--t),color var(--t)}
.cin .cb{width:36px;padding:0}
.cin .cpill{padding:0 12px}
.cin .cb svg,.cin .cpill svg{width:16px;height:16px;flex:none}
.cin .cb:hover,.cin .cpill:hover{background:var(--ws-soft2);color:#ffffff}
.cin .cb.mic{background:var(--ws-soft2);margin-left:2px}
.cin .crow .send{position:static;width:36px;height:36px;margin-left:2px}
.cin .crow .send svg{width:24px;height:24px}

/* audio / character / world feature cards above the tool list */
.afeat{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:14px 8px 0;flex:none}
.afeat .af{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;height:120px;border:1.5px solid transparent;border-radius:16px;background:linear-gradient(var(--ws-panel),var(--ws-panel)) padding-box,linear-gradient(145deg,rgba(255,255,255,.28),rgba(255,255,255,.05) 55%,rgba(255,255,255,.14)) border-box;color:#ffffff;overflow:hidden;transition:transform .2s var(--ease),filter .15s var(--ease)}
.afeat .af.pk{background:linear-gradient(rgba(253,121,33,.1),rgba(253,121,33,.1)),linear-gradient(var(--ws-panel),var(--ws-panel)) padding-box,linear-gradient(145deg,rgba(255,181,130,.6),rgba(253,121,33,.12) 55%,rgba(255,181,130,.35)) border-box;box-shadow:inset 0 0 36px rgba(253,121,33,.12)}
.afeat .af:hover{filter:brightness(1.18)}
.afeat .af:active{transform:scale(.985)}
.afeat .af>svg{width:40px;height:40px;color:#ffffff}
.afeat .af>img{width:96px;height:40px;object-fit:contain}
.afeat .af b{display:inline-flex;align-items:center;gap:6px;font-size:13px;line-height:20px;font-weight:600}
.afeat .af b svg{width:16px;height:16px}
.afeat+h4{margin-top:10px}
.tlist .afeat{padding:6px 0 0}

/* ================= lip-sync / upload style forms (measured on /suite/lip-sync) ================= */
.cf>.fcard,.fcard{grid-column:1/-1;margin:0 -8px;padding:4px;border-radius:16px;background:var(--ws-card);border:.67px solid var(--ws-ln)}
.fcard>h3{padding:9px 12px 0;font-size:14px;line-height:20px;font-weight:600;color:#ffffff}
.fcard>p{padding:4px 12px 0;margin:0 0 12px;font-size:12px;line-height:16px;font-weight:400;color:var(--ws-t2)}
.fcard>h3:last-child{padding-bottom:9px}
.dz{position:relative;border-radius:12px;background:var(--ws-inner);min-height:148px}
.dz.tall{min-height:176px}
.dzone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;width:100%;min-height:inherit;border-radius:12px;border:.67px dashed var(--ws-ln2);background:var(--ws-inner);text-align:center;color:var(--ws-t1);transition:border-color .15s var(--ease),background-color .15s var(--ease)}
.dzone:hover,.dzone.over{border-color:rgba(255,124,36,.7);background:rgba(248,106,0,.05)}
.dzone>svg,.dzone>img,.dzone>i{width:106px;height:50px;margin-bottom:12px;object-fit:contain;color:var(--ws-t0)}
.dzone b{display:block;font-size:13px;line-height:20px;font-weight:500;color:var(--ws-t1)}
.dzone small{display:block;margin-top:2px;font-size:12px;line-height:16px;font-weight:400;color:#43484e}
.dzt{position:absolute;inset:4px;z-index:3;display:flex;flex-wrap:wrap;gap:2px;opacity:0;pointer-events:none;transition:opacity .3s var(--ease)}
.dz:hover>.dzt,.dzt:hover{opacity:1;pointer-events:auto}
.dzt button{flex:1 1 calc(50% - 1px);min-width:0;display:flex;align-items:center;gap:12px;height:calc(50% - 1px);min-height:57px;padding:0 12px;border-radius:8px;border:.67px solid var(--ws-ln);background:var(--ws-card);font-size:13px;line-height:20px;font-weight:500;color:#ffffff;text-align:left;transition:background-color var(--t),border-color var(--t)}
.dzt button:last-child:nth-child(odd){flex-basis:100%}
.dzt button::before{content:"";flex:none;width:32px;height:32px;border-radius:8px;background:linear-gradient(135deg,#ffc59b,#7f7bff 60%,#ffc743)}
.dzt button:hover{border-color:rgba(255,124,36,.98);background:rgba(248,106,0,.08)}
.comm{margin-top:8px;padding:12px 8px 8px;border-radius:12px;background:var(--ws-inner)}
.comm>label,.comm>span{display:block;margin:0 0 8px;font-size:12px;line-height:16px;font-weight:500;color:var(--ws-t2)}
.cthumbs{display:flex;gap:6px}
.cth{position:relative;flex:1 1 0;max-width:71px;aspect-ratio:1;border-radius:10px;border:2px solid transparent;overflow:hidden;background:var(--g,var(--ws-card));transition:border-color var(--t),transform .2s var(--ease)}
.cth:hover{border-color:rgba(255,255,255,.35)}
.cth.on{border-color:var(--ws-pink)}
.cth>img,.cth>i{display:block;width:100%;height:100%;border-radius:8px;object-fit:cover;background:var(--g,var(--ws-card))}
.cth .dur{position:absolute;left:4px;bottom:4px;display:inline-flex;align-items:center;gap:2px;height:16px;padding:0 6px;border-radius:999px;background:rgba(0,0,0,.3);font-size:10px;line-height:16px;font-weight:500;color:rgba(255,255,255,.85)}
.cth .dur svg{width:10px;height:10px}

/* ---- mobile (source: no category tabs on the create form, panel chrome removed, 8px gutters) ---- */
@media(max-width:700px){
  .lp:has(>.cf)>.ctabs{display:none}
  .lp:has(>.cf){background:transparent;border:0;border-radius:0}
  .lp>.cf{padding:0 8px 8px;gap:8px}
  .thead{border-radius:20px}
  .desc{border-radius:16px}
  .gbar{gap:16px;padding:12px 8px;background:rgba(11,12,17,.95);border-top:0}
  .gbar .step{flex:1 1 0}
  .gbar .step span{flex:1}
  .gbar .gen{flex:0 0 160px}
  .lp:has(>.cf)>.mode{display:none}
  .rp>.mpanel{position:fixed;inset:8px 8px 8px}
}
@media(max-width:700px){
  .lp{height:calc(100dvh - 133px);min-height:420px}
  #banner:not(:empty)+.app .lp{height:calc(100dvh - 133px - var(--banner-h,52px))}
  .wsl{padding-bottom:0}
}
.mpanel>section,.mrecw,.mall{margin:0}
.mfil input{width:80px;flex:none}
.mbar{padding-right:6px}
.gen svg{width:16px;height:16px;flex:none}
.gh .gi:has(svg+svg){width:47px;display:inline-flex;align-items:center;justify-content:center;gap:2px}
.gh .gi:has(svg+svg) svg:last-child{width:12px;height:12px}
.keep{padding:0 20px 0 22px;gap:10px}
.keep>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc .chk{width:18px;height:18px;min-width:18px;box-sizing:border-box}
.ov .mdl.lb .lbi h5:has(.gi){min-height:32px}
.ov .mdl.lb .lbi h5 .gi{margin:0 -8px 0 0}
.ov .mdl.lb .lbi h5 .gi{margin:0 10px 0 0}
.mph{margin-bottom:-4px}
.pop .pseg:last-child,.pop .opts.seg:last-child{margin-bottom:0}
.pop .csize{padding-bottom:0!important}
.pop:has(.pseg button:nth-child(3)){min-width:min(540px,calc(100vw - 16px))!important}
.pop:has(.pseg button:nth-child(3)) .pseg button{flex:1 1 0}
.mpanel .bknote{display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;border-radius:12px;background:rgba(250,130,0,.13);color:#ffca16;font-size:12px;line-height:16px;font-weight:400}
.mpanel.cam .bknote{height:32px;margin:8px 8px}
.cin:not(:has(textarea:not(:placeholder-shown))) .crow .send{background:transparent;color:var(--ws-t0)}
.fcard>h3{padding:13px 12px 0;line-height:20px}
.fcard>p{margin:0 0 8px;line-height:16px}
.trow .pinb,.trow .pinb:hover{background-color:transparent}.trow .pinb:hover{background-color:var(--ws-soft2)}

/* ===== FINAL-X ===== */
/* prompt toolbar: orig pitch 36, no gap */
.dtool{gap:0;margin:0 4px 5px 5px}
.dtool .lk{margin-right:9px}
/* gallery sort pill leading icon (orig: Grids4 icon + label + chevron = 110px) */
.sort::before{content:"";width:16px;height:16px;flex:none;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z' fill='black'/%3E%3C/svg%3E") center/16px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6h-6zM14 14h6v6h-6z' fill='black'/%3E%3C/svg%3E") center/16px no-repeat}
.gh .gi[data-act=gdd]{color:#ffffff}
.gh .gi[data-act=gstar],.gh .gi[data-act=glay],.gh .gi[data-act=gmore],.gh .gi[data-act=gsearch] svg{color:#edeef0}
/* tool header: optional real thumbnail (JS adds <img class="tbg"> + <img> inside .ti2) */
.thead .tbg{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transform:scale(1.25);opacity:.8;filter:blur(40px) saturate(1.25);pointer-events:none;z-index:-3}
.thead:has(.tbg)::before{display:none}
.thead .ti2:has(img){background:none;box-shadow:none;overflow:hidden}
.thead .ti2 img{width:100%;height:100%;object-fit:cover;border-radius:12px;display:block}
/* chat empty state: orig = centered chips, "More ideas" on its own centered row, 28px under title */
.hint h3{margin-bottom:28px}
.hint .more{width:103px;margin:6px calc((100% - 103px)/2) 0;padding:0 12px 0 10px;justify-content:center}
.cin .cpill{padding:0 8px 0 12px;gap:2px}
.cin .cb:not(.mic):not(.send){color:#edeef0}
.cin .cpill{padding:0 9px 0 12px}
.wsl:has(.chat) .gh [data-act=selall]{display:none}
/* orig: creation panel scroller has no visible scrollbar (clientWidth 479) */
.cf{scrollbar-width:none;-ms-overflow-style:none}
.cf::-webkit-scrollbar{display:none;width:0;height:0}
/* lip-sync style forms (fcard): orig model row is full-bleed and cards sit 4px under it */
.cf:has(>.fcard)>.mrow{margin-left:-8px;margin-right:-8px}
.cf>.mrow+.fcard{margin-top:-4px}
.fcard>h3{padding:9px 12px 0}
.fcard>p{margin:0 0 12px}
.cf:has(>.fcard)>.orow{margin-left:-8px;margin-right:-8px}
/* popover parity (orig Output popover: 570x319, labels 34px, aspect 48x61, seg 38px, size inputs 38px) */
.pop:has(.ars){min-width:min(600px,calc(100vw - 16px))!important;width:min(600px,calc(100vw - 16px))}
.pop:has(.pt){box-shadow:0 9px 64px rgba(0,0,0,.45)}
.pop:has(.pt) .pi.hd,.pop:has(.pt) .pi.hd:not(:first-of-type){height:36px;padding:8px;line-height:18px;box-sizing:border-box}
.pop .opts.ars button{height:64px;grid-template-rows:20px 20px}
.pop .opts.seg button{height:40px}
.pop .csize input{height:40px}
.pop .csize .gi{width:40px;height:40px}
.pop .pseg button{flex:1 1 0;min-width:max-content;padding:0 12px}
.pop:has(.pt) .opts.ars,.pop:has(.pt) .opts.seg,.pop:has(.pt) .pseg,.pop:has(.pt) .csize{margin-top:4px}
/* workspace menu (orig: 300 wide, 48px workspace row, white "Create Business Workspace" button) */
.pop:has(.wsav){display:flex;flex-direction:column;gap:4px;min-width:300px!important;width:300px}
.pop:has(.wsav) .pi{width:100%;border-radius:10px;height:36px;padding:10px 12px;gap:8px}
.pop:has(.wsav) .pi.hd{height:30px;padding:8px 8px 6px;border-radius:0}
.pop:has(.wsav) .pi.on{height:48px;padding:8px;border-radius:12px;background:rgba(248,237,211,.11);gap:12px;color:#ffffff}
.pop:has(.wsav) .pi.on::after{display:none}
.pop:has(.wsav) .wsav{width:32px!important;height:32px!important;flex:none}
.pop:has(.wsav) .pi.on+.pi{justify-content:center;background:#edeef0;color:#0e1015}
.pop:has(.wsav) .pi.on+.pi:hover{background:#ffffff;color:#0e1015}
.pop:has(.wsav) hr.pdiv{margin:8px 4px;width:auto}
.pop:has(.wsav){box-shadow:0 9px 64px rgba(0,0,0,.45)}
/* mobile creations tab: orig = 46x40 left-rounded tab pinned to the right edge of the panel */
.mcre{display:none}
@media(max-width:700px){
  main:has(.wsl){padding:0}
  .wsl{position:relative;gap:0}
  .mcre{display:grid;place-items:center;position:absolute;right:0;top:16px;z-index:50;width:46px;height:40px;padding:0;border-radius:20px 0 0 20px;background:rgba(221,234,248,.08);color:#b0b4ba;font-size:0;line-height:0}
  .mcre svg{width:20px;height:20px}
  .mcre i{display:none}
  .top .crumb{display:none}
}
/* models panel: orig panel is 684x836 (overlaps rp bottom by 8px), list scrollbar is an overlay */
.rp>.mpanel{bottom:-8px}
.mlist{scrollbar-width:none}
.mlist::-webkit-scrollbar{display:none;width:0}

/* ===== Brand Kit page parity (orig panels 248+924 @ y72, h820). pages.css owns the base; these win by specificity ===== */
main .bkl{padding:8px;height:calc(100dvh - 64px)}
main aside.bkl-l{position:static;margin:0;width:248px;align-self:stretch;align-items:stretch;justify-content:flex-start;overflow-y:auto;isolation:auto;backdrop-filter:none;box-shadow:none;padding:4px;gap:4px;background:#0f1117}
main section.bkl-r{margin:0;padding:61px 20px 40px}
main .bkl-r h1{font-size:36px;line-height:54px;font-weight:600;letter-spacing:normal;margin:0 0 20px;background:linear-gradient(to right,rgba(255,255,255,.85),rgba(255,255,255,.3));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
main .bkl-ban{height:87px;margin-bottom:74px;padding:21px 250px 0 20px}
main .bkl-l .hd{padding:8px 12px;height:40px}
main .bkl-add{width:100%}
@media(max-width:860px){main .bkl{padding:8px;height:auto}main aside.bkl-l{width:auto}main section.bkl-r{padding:32px 16px}}

/* ===== Director Mode landing (orig /suite/director). Markup contract in js-req-final-X.md ===== */
.dmp{padding:0 32px 80px;color:#ffffff}
.dmp h1,.dmp h2{font-family:"Bricolage Grotesque",ui-sans-serif,system-ui,sans-serif;margin:0}
.dmp-hero{display:flex;flex-direction:column;align-items:center;gap:32px;padding:24px 16px 37px;border-radius:0 0 40px 40px;overflow:clip;background:radial-gradient(60% 80% at 50% 0%,rgba(253,121,33,.18),transparent 70%),radial-gradient(50% 70% at 85% 30%,rgba(120,90,255,.18),transparent 70%),#14161c}
.dmp-title{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;text-align:center}
.dmp-title h1{font-size:36px;line-height:40px;font-weight:600;letter-spacing:-.72px;background:linear-gradient(90deg,#ffffff 0,rgba(255,255,255,.3) 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.dmp-title p{margin:0;font-size:14px;line-height:20px;font-weight:500;letter-spacing:-.03px;color:#b0b4ba}
.dmp-pw{display:flex;flex-direction:column;align-items:center;gap:20px;width:100%}
.dmp-card{position:relative;z-index:5;width:100%;max-width:800px;height:165px;box-sizing:border-box;padding:2px;border-radius:32px;background:#07080c;border:.667px solid rgba(255,255,255,.05);box-shadow:0 4px 48px rgba(0,0,0,.45)}
.dmp-in{display:flex;flex-direction:column;gap:10px;height:100%;box-sizing:border-box;padding:16px 16px 15px}
.dmp-ed{flex:1;min-height:0}
.dmp-ed textarea{display:block;width:100%;height:36px;padding:6px 8px;border:0;outline:0;resize:none;background:none;font:500 15px/24px inherit;font-family:inherit;color:#ffffff}
.dmp-ed textarea::placeholder{color:#868c96;opacity:1}
.dmp-tb{display:flex;align-items:center;gap:6px;height:40px;flex:none}
.dmp-tb .sp{flex:1}
.dmp-tb button{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:40px;border-radius:100px;font-size:14px;line-height:20px;font-weight:500;color:#edeef0;white-space:nowrap;transition:background-color .15s}
.dmp-tb .rnd{width:40px;padding:0;border-radius:50%}
.dmp-tb .rnd svg{width:20px;height:20px}
.dmp-tb .pl{padding:8px 12px 8px 16px}
.dmp-tb .pl svg{width:16px;height:16px}
.dmp-tb button:hover:not(.snd){background:rgba(221,234,248,.08)}
.dmp-tb .snd{width:40px;padding:0;border-radius:50%;margin-left:2px;background:rgba(221,234,248,.08);color:#b0b4ba}
.dmp-tb .snd svg{width:24px;height:24px}
.dmp-chips{display:flex;justify-content:center;gap:8px;width:100%;max-width:800px}
.dmp-chips button{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:36px;padding:8px 14px 8px 16px;border-radius:999px;background:linear-gradient(rgba(255,255,255,.25),rgba(255,255,255,.85));box-shadow:inset 0 1px 0 rgba(255,255,255,.45);color:rgba(0,0,0,.85);font-size:13px;line-height:20px;font-weight:600;white-space:nowrap;transition:filter .15s}
.dmp-chips button:hover{filter:brightness(1.08)}
.dmp-chips button svg{width:16px;height:16px}
.dmp-chips .rf{width:36px;padding:0}
.dmp-hero{margin:0}
.dmp-sec{margin-top:40px}
.dmp-sec>h2{padding:0 12px;font-size:26px;line-height:40px;font-weight:600}
.dmp-qs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-top:12px}
.dmp-t{position:relative;isolation:isolate;display:flex;flex-direction:column;gap:4px;height:169px;padding:4px;border-radius:16px;overflow:hidden;text-align:left;background:#171a21;cursor:pointer}
.dmp-t>.bg{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;filter:blur(18px) saturate(1.2);transform:scale(1.2)}
.dmp-t::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:16px;background:rgba(0,0,0,.45)}
.dmp-t::after{content:"";position:absolute;inset:0;border-radius:16px;pointer-events:none;box-shadow:inset 0 0 0 .667px rgba(255,255,255,.12)}
.dmp-t .m{position:relative;flex:none;height:127px;border-radius:12px;overflow:hidden;background:#1f232a}
.dmp-t .m img,.dmp-t .m video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.dmp-t .tag{position:absolute;right:6px;bottom:6px;display:flex;align-items:center;height:24px;padding:3px 6px;border-radius:12px;background:#36e9d1;color:#000000;font:700 12px/18px "Bricolage Grotesque",ui-sans-serif,sans-serif}
.dmp-t .l{display:flex;align-items:center;gap:6px;height:30px;padding:5px 8px;color:#edeef0;font:600 15px/20px "Bricolage Grotesque",ui-sans-serif,sans-serif;white-space:nowrap}
.dmp-t .l svg{width:18px;height:18px;flex:none}
.dmp-t .l span{overflow:hidden;text-overflow:ellipsis}
.dmp-t:hover .m img,.dmp-t:hover .m video{transform:scale(1.04)}
.dmp-t .m img,.dmp-t .m video{transition:transform .4s cubic-bezier(.4,0,.2,1)}
.dmp-ph{display:flex;align-items:center;justify-content:space-between;height:41px}
.dmp-ph .lf{display:flex;align-items:center;gap:12px;padding-left:8px}
.dmp-ph h2{padding:0;font-size:26px;line-height:40px;font-weight:600}
.dmp-ph .cn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:36px;padding:0 14px;border-radius:999px;background:#edeef0;color:#0e1015;font-size:13px;line-height:20px;font-weight:700}
.dmp-ph .cn svg{width:18px;height:18px}
.dmp-ph .mo{font:600 16px/24px "Bricolage Grotesque",ui-sans-serif,sans-serif;color:#b0b4ba;padding:8px 0}
.dmp-ph+.dmp-row{margin-top:24px}
.dmp-row{position:relative}
.dmp-sc{display:flex;gap:12px;overflow-x:auto;scrollbar-width:none;scroll-behavior:smooth}
.dmp-sc::-webkit-scrollbar{display:none}
.dmp-pc{flex:none;width:320px;display:flex;flex-direction:column;gap:0}
.dmp-pc .th{position:relative;aspect-ratio:16/9;width:100%;border-radius:16px;overflow:hidden;background:#171a21}
.dmp-pc .th img{width:100%;height:100%;object-fit:cover}
.dmp-pc .th .ex{position:absolute;left:8px;bottom:8px;display:flex;align-items:center;height:24px;padding:3px 8px;border-radius:12px;background:#36e9d1;color:#000000;font:700 12px/18px "Bricolage Grotesque",ui-sans-serif,sans-serif}
.dmp-pc .nm{padding:12px 0 0;font-size:14px;line-height:23px;font-weight:500;color:#edeef0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:700px){.dmp{padding:0 16px 80px}.dmp-hero{padding:20px 12px 24px;gap:24px}.dmp-title h1{font-size:28px;line-height:34px}.dmp-qs{grid-template-columns:repeat(2,minmax(0,1fr))}.dmp-chips{flex-wrap:wrap}.dmp-pc{width:260px}}

/* ===== orig-style header menus (Follow us / Help / Avatar). Markup contract in js-req-final-X.md ===== */
.xm{position:fixed;z-index:200;width:240px;box-sizing:border-box;padding:8px;border-radius:16px;background:#171a21;box-shadow:inset 0 0 0 .667px rgba(214,225,255,.12),0 9px 32px rgba(0,0,0,.45);display:flex;flex-direction:column;gap:2px;color:#edeef0;animation:pop-in .15s ease both;transform-origin:top right}
.xm.out{animation:pop-out .1s ease forwards;pointer-events:none}
.xm .xt{margin:0 0 2px;padding:4px 8px;font-size:12px;line-height:16px;font-weight:500;color:#868c96}
.xm .xi{display:flex;align-items:center;gap:12px;width:100%;height:36px;padding:8px 10px;border-radius:8px;font-size:13px;line-height:20px;font-weight:500;color:#edeef0;text-align:left;white-space:nowrap;cursor:pointer;transition:background-color .1s}
.xm .xi svg{width:16px;height:16px;flex:none}
.xm .xi span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.xm .xi:hover{background:rgba(214,225,255,.08)}
.xm .xi:active{background:rgba(214,225,255,.14)}
.xm .xi:focus-visible{outline:2px solid rgba(255,166,95,.7);outline-offset:-2px}
.xm.xa{width:280px;padding:0;gap:0;border-radius:16px;box-shadow:inset 0 0 0 .667px rgba(214,225,255,.12),0 9px 64px rgba(0,0,0,.45)}
.xm.xa .xh{display:flex;align-items:center;gap:12px;padding:10px;border-radius:12px}
.xm.xa .xh .av{display:inline-flex;align-items:center;justify-content:center;flex:none;width:32px;height:32px;border-radius:50%;background:#fd7921;color:#ffffff;font-size:13px;font-weight:700;overflow:hidden}
.xm.xa .xh .nm{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.xm.xa .xh .nm b{font-size:13px;line-height:20px;font-weight:600;color:#edeef0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xm.xa .xh .nm small{font-size:12px;line-height:16px;font-weight:500;color:#868c96;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.xm.xa .xl{display:flex;flex-direction:column;gap:2px;padding:6px}
.xm.xa .xi{height:36px;padding:10px 12px;gap:8px;border-radius:10px}
.xm.xa .xi .ic{display:inline-flex;align-items:center;justify-content:center;flex:none;width:18px;height:18px}
.xm.xa .xd{display:flex;align-items:center;height:17px;margin:0;padding:8px 10px;background:transparent}
.xm.xa .xd::before{content:"";flex:1;height:1px;background:rgba(214,225,255,.097)}

/* final-X2: model row có .mico (JS) -> bỏ placeholder ::before, icon 48 box + glyph 24 như gốc */
.mrow:has(>.mico)::before{display:none}
.mrow>.mico{order:0;flex:none;width:48px;height:48px;height:48px;border-radius:12px;background:rgba(214,225,255,.04);justify-content:center;gap:0;color:var(--ws-t1)}
.mrow>.mico svg,.mrow>.mico img{width:24px!important;height:24px!important;flex:none}

/* final-X2: ref card: collage 64x36 (gốc), chữ bắt đầu x=card+12+64+12; box lệch 1px trái */
.dbox .ref{margin:4px 4px 0 5px;width:auto}
.ref .rs.collage{width:64px;height:36px;margin-right:0}
.ref .rs.collage i{top:3px;width:30px;height:30px}
.ref .rs.collage i:nth-child(1){left:2px}.ref .rs.collage i:nth-child(2){left:16px}.ref .rs.collage i:nth-child(3){left:30px}

/* final-X2: màu icon thanh công cụ prompt: #edeef0, khi disabled rgba(217,237,255,.36) opacity 1 */
.dtool .gi{color:#edeef0}
.dtool .gi:disabled{opacity:1;color:rgba(217,237,255,.36)}

/* final-X2: Create Music (đo bản gốc 463 rộng, gap 12): tabs 38, chip 31.3, hàng Instrumental, Song Controls */
.cf:has(>.mtabs2){gap:12px}
.cf:has(>.mtabs2)>*{grid-column:1/-1}
.cf .mtabs2{display:flex;gap:1px;padding:1px;margin:0;height:38px;border-radius:8px;background:rgba(221,234,248,.08)}
.cf .mtabs2 button{flex:1 1 0;display:flex;align-items:center;justify-content:center;gap:4px;height:36px;padding:8px 12px;border-radius:7px;font-size:13px;line-height:20px;font-weight:500;color:#edeef0}
.cf .mtabs2 button.on{font-weight:600;color:#ffffff;background:rgba(214,235,253,.19)}
.cf .mtabs2 button small{font-size:11px;line-height:16px;font-weight:400;color:inherit}
.cf .mgenre{display:flex;align-items:center;gap:8px;padding:0;height:32px}
.cf .mgenre .gchip{height:31.3px;padding:6px 10px;border-radius:10px;background:#0f1117;border:.67px solid rgba(248,237,211,.11);color:#868c96;font-size:12px;line-height:18px;font-weight:600}
.cf .mgenre .gchip:hover{color:#b0b4ba}
.cf .mgenre .gi{margin-left:auto;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;color:#b0b4ba}
.cf .mgenre .gi svg{width:16px;height:16px}
.cf>.orow{width:100%}
.cf>.orow>span{flex:1}
.cf .scard{margin:0;padding:4px;border-radius:16px;background:#13161c;border:.67px solid rgba(214,225,255,.02)}
.cf .scard h4{display:flex;align-items:center;gap:8px;height:36px;padding:8px 12px;margin:0;font-size:14px;line-height:20px;font-weight:600;color:#ffffff}
.cf .scard h4 small{padding:2px 6px;border-radius:65px;background:rgba(221,234,248,.08);color:#868c96;font-size:11px;line-height:16px;font-weight:500}
.cf .scard .srow{padding:0 12px;min-height:21px;margin-bottom:16px;font-size:13px;line-height:21px;color:#edeef0}
.cf .scard .srow:last-child{margin-bottom:12px}
.cf:has(>.mtabs2)>div.orow{grid-column:1/-1;padding-right:10px}
.cf:has(>.mtabs2)>.mrow{margin-top:-4px}
.cf .scard .srow .tg{padding:0}
.cf:has(>.mtabs2)>.mdesc .dbox>textarea{height:122px!important;min-height:0!important}
.mdesc .dh{justify-content:flex-start;gap:0}
.mdesc .dh>svg{display:none}
.mdesc .dh>b::after{content:"";display:inline-block;width:16px;height:16px;margin-left:6px;vertical-align:-3px;background:#b0b4ba;-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M9.6 9.4a2.5 2.5 0 114.2 1.8c-.9.8-1.8 1.2-1.8 2.6M12 17h.01'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M9.6 9.4a2.5 2.5 0 114.2 1.8c-.9.8-1.8 1.2-1.8 2.6M12 17h.01'/%3E%3C/svg%3E") center/contain no-repeat}
.ref{box-shadow:inset 0 -8px 24px rgba(255,118,26,.18),inset 0 2px 6px rgba(255,118,26,.18),inset 0 -4px 8px rgba(255,118,26,.3)}
.ref:hover{box-shadow:inset 0 -8px 24px rgba(255,118,26,.18),inset 0 2px 6px rgba(255,118,26,.18),inset 0 -4px 8px rgba(255,118,26,.3),0 0 0 3px rgba(255,124,36,.12)}

/* final-X2: composer chat: attach/mic gradient, send trắng 45% khi rỗng, chevron xuống */
.cin .cb:not(.send){background:linear-gradient(-45deg,rgba(214,225,255,.06),rgba(214,225,255,.12))}
.cin .cb.mic{background:linear-gradient(-45deg,rgba(214,225,255,.06),rgba(214,225,255,.12))}
.cin:not(:has(textarea:not(:placeholder-shown))) .crow .send{background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(255,255,255,.7));color:#000000;opacity:.45}
.cin .cpill svg:last-child{transform:rotate(90deg)}
.dmp-tb .rnd{background:linear-gradient(-45deg,rgba(214,225,255,.1),rgba(214,225,255,.25))}
.dmp-tb .pl svg:last-child{transform:rotate(90deg)}

/* final-X2: Director Inspirations: pitch 776 (gap 20), header sticky 138 = 12+40+16+46+24, section đầu cách h2 DP 457 */
.dmp-sec .ins{margin-bottom:20px}
.dmp-sec .ins:last-child{margin-bottom:0}
.dmp-sec:has(>.ins){margin-top:39px;padding-top:12px}
.dmp-sec:has(>.ins)>h2{margin:0 0 86px}
.dmp-sec>.ihd{position:sticky;top:0;z-index:20;display:flex;flex-direction:column;gap:16px;padding:12px 0 24px;background:#07080c}
.dmp-sec>.ihd>h2{margin:0;padding:0 12px;font-size:26px;line-height:40px;font-weight:600}
.dmp-sec>.ihd>.tabs{margin:0;padding:0 12px}
.dmp-sec:has(>.ihd){padding-top:0}

/* final-X2: Models panel filter row: All providers 95 / All features 88 / Search 76, gap 2, mép phải 1405 */
.mbar{padding-right:10px}
.mfil{gap:2px}
.mfil #mprov{width:95px;padding:0 4px 0 8px;background-position:right 8px center;background-size:16px}
.mfil #mfeat{width:88px;padding:0 4px 0 8px;background-position:right 8px center;background-size:16px}
.mfil #mq{width:76px;padding:0 10px 0 28px;background-position:10px center;background-size:16px}
.mfil #mq:focus{width:150px}
.mbar{align-items:flex-start;padding:13px 10px 13px 10px}

/* final-X2: popover Mode/Quality: hd 36, seg 61 (nút padding 8 -> 152/187), pop cao 155 */
.pop:has(.pseg) .pi.hd{height:36px}
.pop .pseg{padding:0 1px 1px;gap:2px}
.pop .pseg button{padding:0 8px}

/* final-X2: Camera movement: panel không padding ngang, note 757/651, lưới 745/675 tile 132, ảnh bo 12, grid bắt đầu y=237 */
.mpanel.cam{padding:0 0 8px}
.cam .camt{padding:0 12px 0}
.cam .bknote,.mpanel.cam .bknote{margin:5px 16px 12px;height:32px;padding:0 8px;border-radius:12px}
.cgrid{padding:8px 4px 12px}
.cg .ci{border:0;border-radius:12px;aspect-ratio:1}
.cg.on .ci,.cg:hover .ci{box-shadow:inset 0 0 0 2px rgba(255,124,36,.98)}
.cg:hover:not(.on) .ci{box-shadow:inset 0 0 0 2px rgba(255,255,255,.3)}
.cg>span:last-child{padding-top:6px}

/* final-X2: modal Credits History (gốc 600x680, header 64, thẻ số dư 80, chip 32, danh sách thẻ) */
.mdl.cl{width:600px;max-width:100%;height:min(680px,calc(100vh - 40px));padding:0;display:flex;flex-direction:column;overflow:hidden;background:#171a21;border:.667px solid rgba(214,225,255,.12);border-radius:24px}
.mdl.cl>.mx{top:12px;right:12px;width:40px;height:40px;border-radius:12px;background:transparent;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
.mdl.cl>.mx:hover{background:rgba(221,234,248,.08)}
.mdl.cl>.mx svg{width:20px;height:20px}
.mdl.cl>.mt{flex:none;height:64px;margin:0;padding:20px 64px 20px 20px;font-size:16px;line-height:24px;font-weight:700;color:#edeef0}
.mdl.cl>.cbal{flex:none;display:flex;align-items:center;gap:16px;height:80px;margin:0 8px 16px;padding:20px;border-radius:16px;background:rgba(214,225,255,.04)}
.mdl.cl>.cbal::before{content:"";flex:none;width:44px;height:44px;border-radius:50%;background:center/20px 20px no-repeat url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231dda68' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 3l6.5 9L12 21 5.5 12z'/%3E%3Cpath d='M5.5 12L12 15l6.5-3'/%3E%3C/svg%3E"),rgba(214,225,255,.04)}
.mdl.cl>.cbal>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.mdl.cl .cnum{display:block;font-size:24px;line-height:28px;font-weight:700;color:#1dda68}
.mdl.cl .cbal span{display:block;font-size:12px;line-height:16px;font-weight:400;color:#868c96}
.mdl.cl .cbal .btn{flex:none;height:40px;padding:12px 16px;border-radius:10px;background:#16d866;color:#0c130d;font-size:14px;line-height:20px;font-weight:500}
.mdl.cl>.atabs{flex:none;display:flex;gap:4px;height:32px;margin:0 8px 16px;padding:0 4px}
.mdl.cl>.atabs button{flex:none;height:32px;padding:8px 12px;border-radius:999px;background:transparent;color:#edeef0;font-size:13px;line-height:19.5px;font-weight:600}
.mdl.cl>.atabs button.on{background:#edeef0;color:#0e1015;font-weight:700}
.mdl.cl>.clist{flex:1;min-height:0;max-height:none;margin:0 8px 8px;padding:20px;border-radius:16px;background:rgba(214,225,255,.04);overflow:auto}
.mdl.cl .crow{gap:16px;padding:16px 0;border-bottom:1px solid rgba(214,225,255,.06)}
.mdl.cl .crow:first-child{padding-top:0}
.mdl.cl .crow:last-child{padding-bottom:0;border-bottom:0}
.mdl.cl .crow i{width:44px;height:44px;background:rgba(214,225,255,.04)}
.mdl.cl .crow i svg{width:20px;height:20px}
.mdl.cl .crow b{font-size:15px;line-height:24px;font-weight:500;color:#edeef0}
.mdl.cl .crow small{font-size:12px;line-height:16px;font-weight:500;color:#868c96;opacity:1}
.mdl.cl .crow>span{font-size:16px;line-height:24px;font-weight:600}
.mdl.cl .crow .neg{color:#edeef0}
.mdl.cl .crow .pos{color:#1dda68}
.mdl.cl .clist .ms{text-align:center;color:#868c96;font-size:14px;margin:24px 0}

/* final-X2: Project switcher (gốc 280x209: header 52, ô tìm 36, hàng 36, nút 40 trắng) */
.pop:has(>.pq){width:280px;min-width:280px!important;padding:0;gap:0;border-radius:16px;background:#171a21;border:.667px solid rgba(214,225,255,.12);box-shadow:0 9px 64px rgba(0,0,0,.45);overflow:hidden}
.pop:has(>.pq)>.pt{height:52px;padding:14px 18px;font-size:15px;line-height:24px;font-weight:700;color:#ffffff}
.pop:has(>.pq)>.pq{display:block;width:calc(100% - 24px);height:36px;margin:0 12px 16px;padding:10px 10px 10px 32px;border-radius:10px;border:.667px solid rgba(248,237,211,.11);background:transparent no-repeat 10px center/14px url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23696e77' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");font-size:12px;line-height:16px;color:#ffffff;outline:0}
.pop:has(>.pq)>.pq::placeholder{color:#868c96}
.pop:has(>.pq)>.pq:focus{border-color:rgba(214,225,255,.25)}
.pop:has(>.pq)>.plist{margin:0 12px;display:flex;flex-direction:column;gap:2px}
.pop:has(>.pq) .plist .prow{display:flex;align-items:center;gap:0;height:36px;padding:4px 8px 4px 4px;border-radius:10px;background:transparent;color:#ffffff;font-size:12px;line-height:16px}
.pop:has(>.pq) .plist .prow.on{background:rgba(221,234,248,.08)}
.pop:has(>.pq) .plist .pitem{display:flex;align-items:center;gap:10px;flex:1;min-width:0;height:28px;padding:0;text-align:left}
.pop:has(>.pq) .plist .pitem i{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:6px;background:#fed77c;color:#ffffff;font-size:12px;font-weight:600;font-style:normal}
.pop:has(>.pq) .plist .pitem span{font-size:12px;line-height:16px;font-weight:500;letter-spacing:.05px;color:#ffffff}
.pop:has(>.pq) .plist .gi{flex:none;width:24px;height:24px;padding:5px;border-radius:6px;color:#b0b4ba}
.pop:has(>.pq) .plist .gi svg{width:14px;height:14px}
.pop:has(>.pq)>.pnew{display:flex;align-items:center;justify-content:center;gap:6px;width:calc(100% - 24px);height:40px;margin:16px 12px 12px;padding:0 16px;border-radius:10px;background:#ffffff;color:#0e1015;font-size:14px;line-height:20px;font-weight:600}

/* final-X2: modal New Project (gốc 400x259, p24, h2 16/600, không nút X, Cancel text + Upgrade hồng 75x36) */
.mdl:has(form[data-act=mkproj]){width:400px;max-width:100%;padding:24px;border-radius:16px;background:#13161c;border:.667px solid rgba(248,237,211,.11)}
.mdl:has(form[data-act=mkproj])>.mx{display:none}
.mdl:has(form[data-act=mkproj])>.mt{margin:0 0 16px;font-size:16px;line-height:24px;font-weight:600}
.mdl:has(form[data-act=mkproj])>.ms{margin:0 0 12px;padding:0;font-size:14px;line-height:20px;font-weight:400;color:#868c96}
.mdl:has(form[data-act=mkproj]) .form{display:flex;flex-direction:column;gap:4px}
.mdl:has(form[data-act=mkproj]) .form input{height:37px;padding:8px 12px;border-radius:8px;border:.667px solid rgba(248,237,211,.11);background:rgba(221,234,248,.08);font-size:14px;line-height:20px}
.mdl:has(form[data-act=mkproj]) .form label.ms{margin:0;font-size:12px;line-height:16px;color:#868c96}
.mdl:has(form[data-act=mkproj]) .lbb,.mdl:has(form[data-act=mkproj]) .form>.btn.g{display:flex;justify-content:flex-end;gap:8px;margin-top:20px;padding:0}
.mdl:has(form[data-act=mkproj]) .lbb .btn{flex:none!important;width:auto!important;height:36px;padding:10px 12px;border-radius:10px;font-size:13px;line-height:19.5px;font-weight:500;box-shadow:none}
.mdl:has(form[data-act=mkproj]) .lbb .btn.d{background:transparent;color:#b0b4ba}
.mdl:has(form[data-act=mkproj]) .lbb .btn.g{background:#fd7921;color:#ffffff}

/* final-X2: mobile Create: panel cao 100dvh-119 (nav 93 chồng 20), thanh Generate 86 = pad 16 + qty 54 */
@media(max-width:700px){
.lp{height:calc(100dvh - 119px)}
#banner:not(:empty)+.app .lp{height:calc(100dvh - 119px - var(--banner-h,0px))}
.gbar{padding:16px 8px;gap:16px}
.gbar .step{height:54px}
}
@media(max-width:700px){.mcre{right:-8px}}

/* final-X2: chọn nhiều: viền/checkbox hồng; thanh hành động nổi 600 rộng, cách đáy 25 (gốc: thẻ 600x97 br16 p8, căn giữa panel) */
.cc.sel,.cc:hover.sel{border-color:rgba(255,124,36,.98)}
.cc.sel::after{box-shadow:inset 0 0 0 2px rgba(255,124,36,.98)}
.chk.on{background:#fd7921;border-color:#fd7921;color:#ffffff}
@media(min-width:901px){
.rp>.selbar,.selbar{left:50%;right:auto;bottom:17px;width:min(600px,calc(100% - 16px));margin:0;transform:translate(-50%,12px);gap:4px}
.selbar.show{transform:translate(-50%,0)}
.selbar span{flex:1 1 0;padding-left:8px;overflow:hidden;text-overflow:ellipsis}
.selbar .btn{height:32px}
}

/* final-Z: mobile creations sheet: orig 349x498 at 13,157 (min-height 70vh from .rp made it 568) */
@media(max-width:700px){
.wsl.mgal .rp{min-height:0;height:498px}
}
/* final-Z: mobile Create Video: orig form container has py-4 (Model row at y=134, image tool at 118) */
@media(max-width:700px){
.cf:has(.rtabs)>.mrow{margin-top:16px}
}

/* final-Z: Media page: the gallery panel fills the content area exactly like the Create panels (orig 252,64 1196x836 br20 #0f1117) */
main:has(.mediapg){overflow:hidden;padding:0 0 0 8px}
.wrap:has(>.mediapg){max-width:none;padding:0;margin:0}
.wrap>.rp.mediapg{height:calc(100dvh - 64px);min-height:0;margin-right:0;width:calc(100% + 8px)}
/* final-Z: Brand kit banner is a 707x141 raised box (#171a21, br20, clip) with the cdn art 360x280 right-centred; text block pt29 pr250 (orig measure) */
main .bkl-ban{height:141px;margin-bottom:20px;padding:29px 250px 16px 20px;box-sizing:border-box;border-radius:20px;overflow:hidden;position:relative;background:linear-gradient(135deg,#2a1d3a,#171a21 70%)}
main .bkl-ban .bkl-art{display:none}

/* final-Z: Dub Video form (orig cards inset 8: 462 wide at x260; card1 y196 213 high with 144 drop zone; card2 y430 106 high; Lip Sync row y552 57 high with the switch at the far right) */
.cf:has(>.dubc)>.dubc,.cf:has(>.dubc)>.dubl{margin:0}
.cf:has(>.dubc)>.dubc{margin-top:4px;margin-bottom:12px}
.cf:has(>.dubc)>.dubl{margin-bottom:7px}
.dubc>h3{padding:8px 12px 0}
.dubc>p{padding:4px 12px 8px;margin:0}
.dubc .dubdz{height:144px;min-height:0;padding:0;margin-top:4px}
.dubc .dubdz>svg{width:48px;height:32px;margin-bottom:8px}
.dubl>h3{padding:8px 12px 0;height:48px;box-sizing:border-box}
.dubl .dubpick{width:100%;height:45px;margin-top:4px;border-radius:16px;justify-content:center;gap:6px;background:#0d0f14;border:.67px solid rgba(214,225,255,.02);font-weight:400;color:#868c96}
.cf:has(>.dubc)>.orow{grid-column:1/-1;margin:0;width:auto;display:flex;align-items:center;gap:12px;padding:4px 10px 4px 4px}
.cf:has(>.dubc)>.orow>span:first-child{flex:1}
.cf:has(>.dubc)>.orow .tg{margin-left:auto}

/* final-Z: Gift Center cards: height follows content (orig 396x244 / 155 / 151: p8 10 10 gap16, 14/20 text, 40 high white button); h3 32 high */
.xm .gl3{padding:8px 10px;font-size:12px;line-height:16px}
.xm .gev{display:flex;height:auto;min-height:0;margin-bottom:9px}
.xm .gev .gov{flex:1;height:auto;gap:16px;padding:8px 10px 10px}
.xm .gev .glogo{font-size:14px;line-height:20px;font-weight:600}
.xm .gev .gov>p{margin:0;font-size:14px;line-height:20px;font-weight:500;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.xm .gev .gpl{display:flex;flex-direction:column;gap:8px;padding:16px 0 0;border-top:1px solid rgba(255,255,255,.2)}
.xm .gev .grow{display:flex;align-items:center;justify-content:space-between;height:26px}
.xm .gev .btn{height:40px;font-size:14px;line-height:20px;font-weight:500;background:linear-gradient(to bottom,rgba(255,255,255,.95),rgba(255,255,255,.8));color:rgba(0,0,0,.95)}
.xm.gp{padding:8px 18px 8px 9px}

/* final-Z: New Project modal, Free plan (orig 400x258: text mb12 -> input 37 -> counter 12/16 mt4 -> buttons row mt24, right aligned, natural width) */
.mdl.pnm .ms{margin:0 0 12px}
.mdl.pnm .pc{display:block;margin-top:4px;font-size:12px;line-height:16px;font-weight:400;color:#868c96}
.mdl.pnm .lbb{display:flex;justify-content:flex-end;gap:8px;margin-top:24px;padding:0}
.mdl.pnm .lbb .btn{flex:none;min-width:0;width:auto;height:36px;padding:10px 12px;border-radius:10px;font-size:13px;line-height:19.5px;font-weight:500;box-shadow:none}
.mdl.pnm .lbb .btn.d{background:transparent;color:#b0b4ba;border:0}
.mdl.pnm .lbb .btn.g{background:#fd7921;color:#ffffff}
.mdl.pnm .ms{margin-bottom:8px}
.mdl.pnm input{margin-bottom:0}

/* final-Z: multi-select bar (orig 600x97 at 786,778: p8, column gap8: pink hint row 582x40 (p12 gap16 br12), action row 582x32 (X 32, "N item selected" 12/16, Start to chat 111, Download 99, 4 icon buttons 32, gap 4)) */
.selbar{flex-direction:column;align-items:stretch;gap:8px;padding:8px;box-sizing:border-box}
.selbar .sbhint{height:40px;box-sizing:border-box;gap:16px;padding:12px;border-radius:12px;background:rgba(254,105,0,.19);font-size:12px;line-height:16px;font-weight:400;color:#edeef0;align-items:center}
.selbar .sbhint svg{width:16px;height:16px;flex:none}
.selbar .sbhint span{flex:1;min-width:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.selbar .sbhint .gi{width:16px;height:16px;padding:0;background:none;flex:none}
.selbar .sbhint .gi svg{width:16px;height:16px}
.selbar .sbrow{display:flex;align-items:center;gap:4px;padding:0;height:32px}
.selbar .sbrow>span:not(.sp){flex:none;padding:0 4px 0 4px;margin-right:0;font-size:12px;line-height:16px;font-weight:500;color:var(--ws-t1)}
.selbar .sbrow .sp{flex:1}
.selbar .sbrow .btn{height:32px;padding:8px 10px;border-radius:10px;font-size:12px;line-height:18px;font-weight:500;flex:none;white-space:nowrap}
.selbar .sbrow .btn.g{background:#fd7921;color:#ffffff}
.selbar .sbrow .btn.w{background:rgba(221,234,248,.08);color:#edeef0}
.selbar .sbrow .gi{width:32px;height:32px;padding:0;border-radius:10px;background:rgba(221,234,248,.08);display:inline-flex;align-items:center;justify-content:center;flex:none}
.selbar .sbrow .gi svg{width:16px;height:16px}
.rp>.selbar,.selbar{gap:8px}
.selbar .sbrow .btn{display:inline-flex;align-items:center;gap:8px}
.selbar .sbrow .btn[data-act="tochat"]::before,.selbar .sbrow .btn[data-act="dlsel"]::before{content:"";width:16px;height:16px;flex:none;background:currentColor;-webkit-mask:var(--sbi) center/16px 16px no-repeat;mask:var(--sbi) center/16px 16px no-repeat}
.selbar .sbrow .btn[data-act="tochat"]{--sbi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L3 21l1.9-6.4A8 8 0 1 1 21 12z'/%3E%3C/svg%3E")}
.selbar .sbrow .btn[data-act="dlsel"]{--sbi:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0l-5-5m5 5l5-5M4 21h16'/%3E%3C/svg%3E")}

/* ===== Create forms (FORMS in tools.js) + credit UI ===== */
.fz-cf .fz-hero{padding:4px 6px 0}
.fz-hero h2{margin:0;font-size:18px;line-height:26px;font-weight:600;color:#ffffff}
.fz-hero p{margin:2px 0 0;font-size:13px;line-height:20px;color:var(--ws-t2)}
.fz-opt{font-style:normal;margin-left:6px;font-size:11px;line-height:16px;font-weight:400;color:var(--ws-t2)}
.fz-ct{float:right;font-size:12px;font-weight:400;color:var(--ws-t2)}
.fz-dz .fz-nosub{margin:0;padding:0;height:8px}
.fz-tabs{display:flex;gap:2px;margin:0 4px 8px;padding:2px;border-radius:10px;background:rgba(221,234,248,.06)}
.fz-tabs button{flex:1 1 0;height:30px;padding:0 8px;border-radius:8px;font-size:12px;line-height:18px;font-weight:500;color:var(--ws-t0);transition:background-color var(--t),color var(--t)}
.fz-tabs button:hover:not(.on){background:rgba(221,234,248,.06);color:#ffffff}
.fz-tabs button.on{background:rgba(214,235,253,.17);color:#ffffff;font-weight:600}
.fz-dz .dz{position:relative;min-height:120px}
.fz-dz .dz.fz-dzs{background:transparent;display:flex}
.fz-slots{display:flex;align-items:stretch;gap:0;width:100%}
.fz-slots .dzone{flex:1 1 0;min-width:0;width:auto;min-height:148px;padding:0 8px}
.fz-slots .dzone>svg{width:36px;height:36px;margin-bottom:8px}
.fz-swap{display:grid;place-items:center;flex:none;width:28px;color:var(--ws-t2)}
.fz-swap svg{width:14px;height:14px}
.fz-dz .dzone>svg{width:44px;height:36px;margin-bottom:8px}
.fz-dz .dzone{min-height:120px;padding:12px}
.fz-dz .dzone.has{border-style:solid;border-color:rgba(255,124,36,.5);background:rgba(248,106,0,.06)}
.fz-dz .dzone.has b{color:#ffffff;word-break:break-all}
.fz-dz.fz-herodz .dz,.fz-dz.fz-herodz .dzone{min-height:200px}
.fz-clr{position:absolute;top:8px;right:8px;z-index:2;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:rgba(0,0,0,.5);color:#ffffff}
.fz-clr svg{width:14px;height:14px}
.fz-chars{display:flex;flex-wrap:wrap;gap:6px;padding:8px;width:100%}
.fz-pr .dbox textarea{width:100%}
.fz-pr .dbox:not(:has(.ref)) textarea{min-height:126px;height:126px}
.fz-pr .dbox:has(.ref) textarea{min-height:96px;height:96px}
.fz-pr .dh .tg{margin-left:auto}
.fz-pr .dh .tg+.gi{margin-left:4px}
.fz-pr .dtool .fz-pfi{height:28px;padding:0 8px}
.fz-cnt{font-size:12px;line-height:16px;color:var(--ws-t2);font-variant-numeric:tabular-nums}
.fz-chips,.cf .mgenre.fz-chips{margin:0;padding:0 2px;height:auto;flex-wrap:wrap}/* QA-LOOP M-01: ".cf .mgenre{height:32px}" won on specificity, so wrapped chips ("Brand Story", "More ideas") spilled under the Voice row at 390px and could not be tapped */
.fz-ex small{display:block;margin:0 2px 6px;font-size:12px;color:var(--ws-t2)}
.fz-cf>button.orow.fz-op{grid-column:1/-1}
.fz-cf>div.orow.fz-tg{grid-column:1/-1}
.fz-cf>div.orow.fz-tg:has(+button.orow.fz-op){grid-column:auto}
.fz-cf>div.orow.fz-tg+button.orow.fz-op{grid-column:auto}
.fz-op em,.fz-voice em{display:block;font-style:normal;font-size:11px;line-height:14px;color:var(--ws-t2);font-weight:400}
.fz-sg label{display:block;margin:0 2px 6px;font-size:13px;line-height:20px;font-weight:500;color:var(--ws-t1)}
.fz-sl{padding:10px 12px 8px}
.fz-slh{display:flex;align-items:center;gap:8px;font-size:13px;line-height:20px;color:var(--ws-t1)}
.fz-slh span{flex:1}
.fz-slh b{font-weight:600;color:#ffffff;font-variant-numeric:tabular-nums}
.fz-reset{height:24px;padding:0 8px;border-radius:8px;font-size:12px;color:var(--ws-t0);background:rgba(221,234,248,.08)}
.fz-reset:disabled{opacity:.4;cursor:default}
.fz-range{width:100%;margin:8px 0 2px;accent-color:var(--ws-pink);cursor:pointer}
.fz-range:disabled{opacity:.4;cursor:not-allowed}
.fz-lh{display:flex;justify-content:space-between;font-size:11px;color:var(--ws-t2)}
.fz-card{padding-bottom:8px}
.fz-card>.orow{margin:4px 4px 0;width:calc(100% - 8px)}
.fz-card .fz-sl{margin:4px 4px 0;background:transparent;border:0;padding:6px 8px}
.fz-card .tg{margin:2px 4px}
.fz-card .fz-mp{margin:0 12px 8px}
.fz-adv .fz-advb svg:last-child{transition:transform .2s var(--ease)}
.fz-adv .fz-advb.on svg:last-child{transform:rotate(90deg)}
.fz-input{width:calc(100% - 16px);margin:6px 8px 8px;height:40px;padding:0 12px;border-radius:10px;background:var(--ws-inner);border:.67px solid var(--ws-ln2);color:#ffffff;font-size:14px}
.fz-input:focus{outline:0;border-color:rgba(255,124,36,.5)}
.fz-hint{margin:0 4px;font-size:12px;line-height:18px;color:var(--ws-t2)}
.fz-maskb{margin:0 12px 8px}
.fz-maskb.on{border-color:rgba(255,124,36,.6)}
.fz-allb{width:100%;justify-content:center}
.fz-wsteps{display:flex;gap:6px;padding:10px 12px 0;font-size:11px;color:var(--ws-t2);flex-wrap:wrap}
.fz-wsteps .on{color:#ffffff;font-weight:600}.fz-wsteps .done{color:var(--green)}
.fz-wiz h3{padding-top:8px}
.fz-wchips{display:flex;flex-wrap:wrap;gap:6px;padding:8px 12px}
.fz-wnav{display:flex;gap:8px;justify-content:flex-end;padding:8px 12px}
.fz-wsum{list-style:none;margin:8px 12px;padding:0;display:grid;gap:6px}
.fz-wsum li{display:flex;justify-content:space-between;font-size:13px}.fz-wsum small{color:var(--ws-t2)}
.pop .fz-list,.pop .fz-wl{max-height:300px;overflow-y:auto}
.pop .fz-vi span{display:flex;flex-direction:column;align-items:flex-start;gap:0}
.pop .fz-vi small{font-size:11px;color:var(--ws-t2)}
.pop .fz-wtabs{display:flex;gap:4px;padding:0 8px 6px}.pop .fz-wtabs button{padding:4px 10px;border-radius:8px;font-size:12px;color:var(--ws-t0)}.pop .fz-wtabs .on{background:rgba(214,235,253,.17);color:#ffffff}
.pop .fz-wh{display:flex;align-items:center;gap:8px;padding:0 8px 8px}
.pop .fz-wh input{flex:1;min-width:0;height:34px;padding:0 10px;border-radius:10px;background:rgba(221,234,248,.06);border:.67px solid rgba(214,225,255,.08);color:#ffffff}
/* nut Generate + gia */
.fz-gbar{align-items:center}
.fz-gbar2{flex-direction:column;align-items:stretch;gap:8px}
.fz-gbar2 .gen:not(.fz-main){background:rgba(221,234,248,.12)}
.fz-gen .fz-price{font-variant-numeric:tabular-nums;min-width:1ch;cursor:help}
.fz-gen:disabled{pointer-events:none}
.fz-gen:disabled .fz-price{pointer-events:auto}
.fz-gen .fz-eta{margin-left:4px;font-size:11px;font-weight:500;opacity:.7}
.fz-gen.fz-hideprice .fz-price{display:none}
.fz-gen.fz-need{background:var(--green);color:#06140b}
.fz-price.bump{animation:fzBump .26s var(--ease)}
@keyframes fzBump{0%{transform:scale(1)}40%{transform:scale(1.25)}100%{transform:scale(1)}}
.fz-cnote{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;margin:0 8px;padding:7px 12px;border-radius:10px;font-size:12px;line-height:18px}
.fz-cnote[hidden]{display:none}
.fz-cnote.warn{background:rgba(255,71,87,.12);color:#ff8a95;border:.67px solid rgba(255,71,87,.28)}
.fz-cnote.low{background:rgba(255,184,0,.1);color:#ffcb4d;border:.67px solid rgba(255,184,0,.25)}
.fz-cnote.bill{background:rgba(255,255,255,.06);color:#d6dae1;border:.67px solid rgba(255,255,255,.14)}
.fz-cnote .fz-bn{flex:1 1 auto}
.fz-buy{flex:none;height:24px;padding:0 10px;border-radius:999px;background:var(--green);color:#06140b;font-size:12px;font-weight:600}
.fz-buy:hover{filter:brightness(1.1)}
/* popover Cost breakdown */
.pop:has(.fzcb){padding:6px 4px 8px}
.fzcb{min-width:260px;padding:0 8px}
.fzcb-rows{display:grid;gap:6px;padding:4px 8px 8px}
.fzcb-r{display:flex;justify-content:space-between;gap:12px;font-size:13px;line-height:18px;color:var(--ws-t0)}
.fzcb-r small{display:block;font-size:11px;line-height:14px;color:var(--ws-t2)}
.fzcb-r b{font-weight:600;color:#ffffff;font-variant-numeric:tabular-nums;white-space:nowrap}
.fzcb-t{display:flex;justify-content:space-between;align-items:center;margin:0 8px;padding:8px 0;border-top:.67px solid rgba(214,225,255,.1);font-size:14px;font-weight:600;color:#ffffff}
.fzcb-t b{display:inline-flex;align-items:center;gap:4px;color:var(--green)}.fzcb-t svg{width:14px;height:14px}
.fzcb-bal{display:flex;gap:8px;margin:0 8px}
.fzcb-bal>div{flex:1;padding:6px 10px;border-radius:10px;background:rgba(214,225,255,.05);display:flex;flex-direction:column;font-size:11px;color:var(--ws-t2)}
.fzcb-bal b{font-size:14px;color:#ffffff;font-variant-numeric:tabular-nums}.fzcb-bal b.neg{color:#ff8a95}
.fzcb .fz-buy{display:block;width:calc(100% - 16px);height:32px;margin:8px 8px 0;font-size:13px}
.fzcb-n{display:block;margin:6px 8px 0;color:var(--ws-t2);font-size:11px}
/* gia trong panel Models */
.mchip.mprice{display:inline-flex;align-items:center;gap:3px;color:var(--green);background:rgba(34,255,70,.1)}
.mchip.mprice svg{width:11px;height:11px}
/* credit pill: hieu ung tru / cong */
.cred{position:relative}
.cred-dec{animation:credDec .6s var(--ease)}
.cred-inc{animation:credInc .6s var(--ease)}
@keyframes credDec{0%,100%{background:rgba(34,255,70,.12)}30%{background:rgba(255,71,87,.3)}}
@keyframes credInc{0%,100%{background:rgba(34,255,70,.12)}30%{background:rgba(34,255,70,.4)}}
.cred-delta{position:absolute;right:56px;top:100%;margin-top:2px;font-style:normal;font-size:12px;line-height:16px;font-weight:700;pointer-events:none;animation:credFloat 1.3s ease-out forwards}
.cred-delta.neg{color:#ff6b7a}.cred-delta.pos{color:#46fea5}
@keyframes credFloat{0%{opacity:0;transform:translateY(-6px)}15%{opacity:1}100%{opacity:0;transform:translateY(12px)}}
.cf.fz-cf>.fcard,.cf.fz-cf:has(>.fcard)>.mrow,.cf.fz-cf>.mrow{margin-left:0;margin-right:0}
.cf.fz-cf>.mrow+.fcard{margin-top:0}
.fz-slots .dzone.dis{opacity:.45;pointer-events:none}
.fz-slots .dzone{background:var(--ws-inner);border-color:transparent}
.fz-slots .dzone small{text-decoration:underline}
.cf .mtabs2.fz-main{height:76px;gap:8px;padding:0;background:transparent;border-radius:0}
.cf .mtabs2.fz-main button{flex-direction:column;gap:6px;height:76px;padding:8px;border-radius:12px;background:var(--ws-card);border:.67px solid var(--ws-ln2);font-size:13px;font-weight:500;color:var(--ws-t0);transition:background-color var(--t),border-color var(--t)}
.cf .mtabs2.fz-main button svg{width:26px;height:26px;padding:5px;border-radius:8px;background:rgba(214,235,253,.1)}
.cf .mtabs2.fz-main button.on{background:linear-gradient(180deg,rgba(248,106,0,.26),rgba(248,106,0,.06));border-color:rgba(255,124,36,.55);color:#ffffff;font-weight:600}
.cf .mtabs2.fz-main button.on svg{background:rgba(255,124,36,.35)}
.fz-gbar2{flex-direction:row;align-items:center}
.fz-gbar2 .gen{flex:1 1 0;min-width:0;padding-left:8px;padding-right:6px;font-size:14px}
.fz-cf>button.orow.fz-half{grid-column:auto}
.fz-tiles .fz-slots{gap:8px}
.fz-tiles .dzone{position:relative;justify-content:flex-end;padding-bottom:12px;min-height:148px;background:var(--ws-inner)}
.fz-tiles .dzone>svg{display:none}
.fz-tiles .dzone.has>svg{display:none}
.fz-sct{position:absolute;top:8px;right:10px;font-size:11px;color:var(--ws-t2)}
.fz-dz .dz>.fz-tabs{position:absolute;top:6px;left:6px;right:6px;margin:0;z-index:3;opacity:0;pointer-events:none;transition:opacity .25s var(--ease)}
.fz-dz .dz:hover>.fz-tabs,.fz-dz .dz>.fz-tabs:focus-within{opacity:1;pointer-events:auto}
.fz-dz .dzone .rs{margin-bottom:12px}
.fz-psl{display:flex;align-items:center;gap:10px;padding:2px 12px 10px}.fz-psl b{min-width:30px;text-align:right;color:#ffffff;font-variant-numeric:tabular-nums}
.fz-hp{display:flex;flex-direction:column;gap:8px}
.fz-hp>.thead{flex:none}
.fz-hpage{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:16px;text-align:center;border-radius:16px}
.fz-hpage.dots{background-image:radial-gradient(rgba(214,225,255,.12) 1px,transparent 1px);background-size:16px 16px}
.fz-hpage h2{margin:0 0 4px;font-size:20px;line-height:28px;font-weight:700;color:#ffffff}
.fz-hpage p{margin:0;max-width:300px;font-size:13px;line-height:20px;color:var(--ws-t0)}
.fz-hpage u{color:#ffffff}
.fz-hpage .fz-d2{margin-top:6px}
.fz-hbtn{display:inline-flex;align-items:center;gap:8px;margin-top:16px;height:40px;padding:0 20px;border-radius:12px;background:var(--ws-pink);color:#ffffff;font-size:14px;font-weight:600;transition:filter .15s}
.fz-hbtn:hover{filter:brightness(1.12)}
.fz-hbtn svg{width:18px;height:18px}
.fz-demo{position:relative;width:calc(100% + 0px);max-width:464px;height:220px;margin:0 0 16px;border-radius:16px;overflow:hidden;background:linear-gradient(135deg,#da9a69,#7a3cff 60%,#2b3cff)}
.fz-demo i{position:absolute;inset:0;background:radial-gradient(circle at 35% 40%,rgba(255,255,255,.55),transparent 30%),radial-gradient(circle at 70% 70%,rgba(255,200,120,.4),transparent 35%)}
.fz-demo span{position:absolute;left:16px;right:16px;bottom:14px;display:flex;align-items:center;justify-content:space-between;height:40px;padding:0 6px 0 16px;border-radius:999px;background:#ffffff;color:#0d0f14;font-size:14px;text-align:left}
.fz-demo b{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--ws-pink);color:#ffffff}
.fz-demo b svg{width:14px;height:14px}
.fz-ratios{padding:0 2px}
.fz-ratios label{display:block;margin:4px 4px 8px;font-size:13px;color:var(--ws-t0)}
.fz-rg{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;padding:4px;border-radius:12px;background:var(--ws-card)}
.fz-rg button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 0;border-radius:8px;font-size:11px;line-height:14px;color:var(--ws-t0)}
.fz-rg button:hover{background:rgba(221,234,248,.06)}
.fz-rg button.on{background:rgba(214,235,253,.17);color:#ffffff}
.fz-rg button span{display:grid;place-items:center;width:20px;height:20px}
.fz-rg button i{display:block;border:1.5px solid currentColor;border-radius:2px}
.fz-nohead.desc::before{top:4px}
.fz-nohead .dbox{padding-top:0}
.fz-nodt .dbox textarea{min-height:100px;height:100px}
.fz-chk{display:flex;align-items:center;gap:8px;justify-content:center;padding:6px 0;font-size:12px;line-height:18px;color:var(--ws-t1);cursor:pointer}
.fz-chk input{position:absolute;opacity:0;pointer-events:none}
.fz-chk i{display:block;width:16px;height:16px;border-radius:4px;border:1.5px solid var(--ws-t2);background:transparent;position:relative}
.fz-chk input:checked+i{background:var(--ws-pink);border-color:var(--ws-pink)}
.fz-chk input:checked+i::after{content:"";position:absolute;left:4px;top:1px;width:4px;height:8px;border:solid #ffffff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.fz-chk input:focus-visible+i{outline:2px solid rgba(255,166,95,.7);outline-offset:2px}
.fz-sl.fz-top .fz-slh{flex-direction:column;align-items:stretch}
.fz-sl.fz-top .fz-slh b{order:3;text-align:right;font-size:11px;color:var(--ws-t2);font-weight:400}
/* ===== Create Character / Create World modals ===== */
.mdl.fzm{width:min(1000px,100%);padding:0;background:#111319;border-radius:20px;overflow:hidden}
.mdl.fzm.fzm-world{width:min(950px,100%)}
.ov:has(.fzm-fullm){padding:0;background:#0f1117}
.mdl.fzm.fzm-fullm{width:100vw;height:100vh;max-height:none;border-radius:0;border:0;background:#0f1117;box-shadow:none}
.fzm .mx{top:16px;right:16px}
.fzm-menu{padding:44px 40px 40px;text-align:center}
.fzm-title{margin:0;font-size:32px;line-height:40px;font-weight:700;color:#ffffff}
.fzm-title em{font-style:normal;background:linear-gradient(90deg,#ffb07a,#c06bff);-webkit-background-clip:text;background-clip:text;color:transparent}
.fzm-sub{display:flex;align-items:center;justify-content:center;gap:6px;margin:8px 0 28px;font-size:14px;line-height:20px;color:var(--ws-t2,#696e77)}
.fzm-sub svg{width:14px;height:14px;color:#ffd24d}
.fzm-opts{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.fzm-opts.two{grid-template-columns:repeat(2,1fr)}
.fzm-opt{display:flex;flex-direction:column;align-items:center;gap:10px;padding:8px 8px 16px;border-radius:16px;background:#181b22;border:.67px solid rgba(214,225,255,.06);transition:border-color .15s,background-color .15s,transform .15s}
.fzm-opt:hover{border-color:rgba(255,124,36,.55);background:#1d2028}
.fzm-opt:active{transform:scale(.99)}
.fzm-opt b{font-size:15px;line-height:22px;font-weight:600;color:#ffffff}
.fzm-opt small{font-size:12px;line-height:16px;color:var(--ws-t2,#696e77);margin-top:-8px}
.fzm-art{display:grid;place-items:center;width:100%;height:150px;border-radius:12px;color:rgba(255,255,255,.85)}
.fzm-art svg{width:44px;height:44px}
.fzm-opts.two .fzm-art{height:104px}
.fzm-hd{display:flex;align-items:center;gap:10px;padding:16px 56px 12px 16px;font-size:15px;font-weight:600;color:#ffffff}
.fzm-hd2{justify-content:space-between;padding:16px 56px 0 20px}
.fzm-back{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;color:#ffffff}
.fzm-back:hover{background:rgba(221,234,248,.1)}
.fzm-back svg{width:16px;height:16px}
.fzm-tut{display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:#ffffff}
.fzm-tut svg{width:14px;height:14px}
.fzm-split{display:grid;grid-template-columns:1.6fr 1fr;gap:12px;padding:0 12px 12px}
.fzm-dz{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:420px;border-radius:14px;background:#0d0f14;border:.67px solid rgba(214,225,255,.08);text-align:center;color:var(--ws-t1,#edeef0);transition:border-color .15s}
.fzm-dz:hover{border-color:rgba(255,124,36,.6)}
.fzm-dz b{font-size:13px;font-weight:600;color:#ffffff;margin-top:12px}
.fzm-dz small{font-size:12px;color:var(--ws-t2,#696e77)}
.fzm-dz.has{border-color:rgba(255,124,36,.5);background:rgba(248,106,0,.06)}
.fzm-tilt{display:flex;align-items:center;gap:0}
.fzm-tilt i{display:block;width:44px;height:48px;border-radius:12px;background:#21242c}
.fzm-tilt i:nth-child(1){transform:rotate(-12deg) translateX(8px)}
.fzm-tilt i:nth-child(2){width:52px;height:58px;z-index:1;background:#2b2e36}
.fzm-tilt i:nth-child(3){transform:rotate(12deg) translateX(-8px)}
.fzm-side{display:flex;flex-direction:column;gap:6px;padding:8px 4px 0}
.fzm-side label{margin-top:10px;font-size:13px;font-weight:600;color:#ffffff}
.fzm-side .fz-input{width:100%;margin:0}
.fzm-voice{display:flex;align-items:center;gap:10px;text-align:left;padding:6px 8px;border-radius:10px;background:#181b22;border:.67px solid rgba(214,225,255,.08)}
.fzm-voice i{display:grid;place-items:center;width:30px;height:30px;color:#ffffff}
.fzm-voice i svg{width:16px;height:16px}
.fzm-voice b{display:block;font-size:13px;color:#ffffff}.fzm-voice small{display:block;font-size:11px;color:var(--ws-t2,#696e77)}
.fzm-story{position:relative}
.fzm-story textarea{width:100%;height:110px;padding:10px 12px 28px;border-radius:10px;background:#181b22;border:.67px solid rgba(214,225,255,.08);color:#ffffff;font-size:13px;resize:none}
.fzm-story textarea:focus{outline:0;border-color:rgba(255,124,36,.45)}
.fzm-story .gi{position:absolute;left:6px;bottom:6px;width:24px;height:24px}
.fzm-create{margin-top:auto;width:100%}
.fzm .gen{height:44px}
.fzm .gen:disabled{pointer-events:none}.fzm .gen:disabled .fz-price{pointer-events:auto}
.fzm-full{position:relative;height:100%;display:flex;flex-direction:column;align-items:center;overflow:hidden}
.fzm-spot{position:absolute;top:-40px;left:50%;width:520px;height:340px;transform:translateX(-50%);background:radial-gradient(ellipse at 50% 0,rgba(255,166,110,.85),rgba(190,60,255,.35) 45%,transparent 72%);clip-path:polygon(30% 0,70% 0,100% 100%,0 100%);filter:blur(10px);pointer-events:none}
.fzm-ftitle{position:relative;margin:56px 0 18px;font-size:20px;line-height:28px;font-weight:700;color:#ffffff}
.fzm-fan{position:relative;display:flex;align-items:center;justify-content:center;height:64px;margin-bottom:34px}
.fzm-fan i{display:block;width:46px;height:50px;border-radius:10px;margin:0 -4px;border:2px solid #ffffff}
.fzm-fan i:nth-child(1){transform:rotate(-10deg)}.fzm-fan i:nth-child(3){width:58px;height:64px;z-index:1}.fzm-fan i:nth-child(5){transform:rotate(10deg)}
.fzm-box{position:relative;width:min(760px,calc(100% - 48px));min-height:160px;border-radius:14px;background:rgba(24,27,35,.9);border:.67px solid rgba(214,225,255,.08);padding:12px 14px;display:flex;flex-direction:column}
.fzm-box textarea{flex:1;min-height:110px;resize:none;color:#ffffff;font-size:13px;line-height:20px}
.fzm-bar{display:flex;align-items:center;gap:10px}
.fzm-bar .sp{flex:1}
.fzm-bar select{height:30px;padding:0 8px;border-radius:8px;background:transparent;color:#ffffff;font-size:12px;font-weight:600;border:0;cursor:pointer;max-width:150px}
.fzm-bar select option{background:#181b22}
.fzm-bar .gen{width:150px;flex:none}
.fzm-pill{position:relative;display:flex;gap:28px;margin-top:20px;padding:8px 22px;border-radius:999px;background:rgba(255,173,120,.14);border:.67px solid rgba(255,173,120,.4);font-size:11px;color:var(--ws-t0,#b0b4ba)}
.fzm-pill .on{color:#ffffff;font-weight:600}.fzm-pill .done{color:#ffc39b}
.fzm-wz{position:relative;width:min(900px,calc(100% - 48px));margin-top:190px}
.fzm-wh{display:grid;grid-template-columns:36px 1fr 60px;align-items:center;gap:8px;margin-bottom:22px;text-align:center}
.fzm-wh b{font-size:14px;color:#ffffff}
.fzm-nav{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:rgba(221,234,248,.1);color:#ffffff}
.fzm-nav svg{width:14px;height:14px}
.fzm-skip{height:26px;padding:0 10px;border-radius:8px;background:rgba(221,234,248,.1);font-size:12px;font-weight:600;color:#ffffff}
.fzm-cards{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.fzm-card{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:0;width:120px;height:170px;padding:0 0 10px;border-radius:12px;background:#13161d;border:.67px solid rgba(214,225,255,.08);color:var(--ws-t0,#b0b4ba);font-size:12px;overflow:hidden;position:relative}
.fzm-card .fzm-cb{position:absolute;inset:0 0 34px;opacity:.55;display:grid;place-items:center}
.fzm-card .fzm-cb svg{width:28px;height:28px;color:#ffffff}
.fzm-card b{position:relative;font-weight:500}
.fzm-card:hover,.fzm-card.on{border-color:#ff9f5f;box-shadow:0 0 22px rgba(255,124,36,.45);color:#ffffff}
.fzm-box2{width:min(420px,100%);margin:0 auto 12px;min-height:110px}
.fzm-bar2{justify-content:center}
.fzm-wbox{margin:0 12px;height:360px;border-radius:14px;background:#0c0e13;border:.67px solid rgba(214,225,255,.06);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:4px}
.fzm-wbox textarea{flex:1;width:100%;padding:16px;color:#ffffff;font-size:13px;resize:none;text-align:left}
.fzm-wbox b{font-size:13px;color:#ffffff}.fzm-wbox small{font-size:12px;color:var(--ws-t2,#696e77)}
.fzm-wdz.has{border-color:rgba(255,124,36,.4)}
.fzm-up{color:#ffffff}.fzm-up svg{width:22px;height:22px}
.fzm-sq{display:block;width:40px;height:40px;margin:6px 0 20px;border-radius:10px;border:2px solid #ffffff;transform:rotate(-6deg)}
.fzm-wb{display:flex;gap:8px;margin-top:12px}
.fzm-wb button{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:8px;background:#181b22;color:#ffffff;font-size:12px;font-weight:600}
.fzm-wb svg{width:14px;height:14px}
.fzm-wb2{position:absolute;left:12px;bottom:10px;margin:0}
.fzm-wb2 button{background:transparent;padding:0 8px}
.fzm-hint{display:flex;align-items:center;gap:6px;margin:10px 16px}
.fzm-hint svg{width:12px;height:12px}
.fzm-two{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 12px 12px}
.fzm-two .gen{height:56px;flex-wrap:wrap;align-content:center;gap:0 6px;padding:6px 8px;flex-direction:row}
.fzm-two .gen:not(.fz-main){background:rgba(221,234,248,.18)}
.fzm-two .fz-eta{flex-basis:100%;text-align:center;margin:0;font-size:11px}
.fzm-exp{margin:28px 0 12px;font-size:13px;color:var(--ws-t0,#b0b4ba)}
.fzm-wg{display:grid;grid-template-columns:repeat(4,1fr);gap:4px}
.fzm-wt{position:relative;aspect-ratio:16/9;border-radius:6px;overflow:hidden}
.fzm-wt span{position:absolute;inset:auto 0 0 0;padding:14px 6px 4px;font-size:10px;line-height:12px;color:#ffffff;text-align:left;background:linear-gradient(transparent,rgba(0,0,0,.65))}
.fzm-wt:hover{outline:2px solid #ff9f5f}
.mdl.fzm{width:min(720px,100%)}
.mdl.fzm.fzm-world{width:min(720px,100%)}
.fzm-menu{padding:40px 32px 36px}
.fzm-art{height:auto;aspect-ratio:1/1}
.fzm-opts.two .fzm-art{aspect-ratio:16/9}
.mdl.fzm.fzm-fullm{width:100vw}
.fz-sl .fz-slh b{font-size:12px;font-weight:400;color:var(--ws-t2)}
.fz-tall .dbox textarea{min-height:190px;height:190px}
.fz-chips .gchip{white-space:nowrap}
.fz-bare .dz,.fz-bare .dzone{min-height:210px}
.fz-adv{grid-column:1/-1}
.fz-adv .fz-advb{width:100%;min-height:48px}
.fz-adv .fz-advb>span{flex:1}
.fz-adv .fz-advb b{font-size:14px;font-weight:600;color:#ffffff}
.fz-adv .fz-advb>span>span{height:auto}
.fz-voice>span>span{height:auto;min-height:40px}
.fz-voice b{display:block}
.fz-demo{width:100%;max-width:none;align-self:stretch;flex:none}
.merr{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;white-space:normal}.merr .btn{height:36px;padding:0 14px;font-size:13px}.mcd small{margin-left:6px;opacity:.6;font-size:11px}

/* WP-D (audit PERF-3, MOB-2, AST-8) */
/* PERF-3: before app.js draws the side bar the empty <aside> is a 68px rail, then it jumps to the 232px open rail and the whole page shifts (CLS 0.12). Reserve the open width while it is still empty. */
@media(min-width:769px){#side:empty{width:232px}}
/* MOB-2 / AST-8: Media toolbar on phones. Icon-only Labels/Folders (the title/aria name stays), no captions floating under the icons, the banner text wraps instead of ending in an ellipsis. */
@media(max-width:700px){
  .gh.mh{gap:6px 6px;row-gap:8px}
  .gh.mh .gi.lbl{width:36px;height:32px;padding:0}
  .gh.mh .gi.lbl span{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .gh.mh .msz{flex:1 1 72px;min-width:56px;max-width:120px}
  .gh.mh .tgrp{flex-wrap:nowrap;max-width:100%}
  .keep{flex-wrap:wrap;justify-content:space-between;text-align:left;height:auto;min-height:0}
  .keep span{white-space:normal;overflow:visible;text-overflow:clip;min-width:0;flex:1 1 160px}
}

/* ===== audit 2026-10-24 WP6: G-01 / G-13 / G-34 / a11y =====
   G-01: the hover tab strip must never sit on top of the reference button's centre.
   Pointer devices: the strip becomes a 28px header over the top edge; the button keeps its
   full box and stays visible underneath, so a real click at the centre reaches the button.
   Touch devices (G-13): the strip is a permanent in-flow row, nothing depends on :hover. */
@media(hover:hover){
  .dbox:has(>.ref)>.rtabs{height:28px;align-items:stretch;top:4px;padding:0 4px;gap:2px}
  .dbox:has(>.ref)>.rtabs button{min-height:0;height:28px;padding:0 10px;display:flex;align-items:center;justify-content:center;column-gap:0;border-radius:8px 8px 0 0;font-size:12px;line-height:16px}
  .dbox:has(>.ref)>.rtabs button::before,.dbox:has(>.ref)>.rtabs button small{display:none}
  .dbox:has(>.ref:hover)>.ref,.dbox:has(>.rtabs:hover)>.ref{opacity:1}
  .dbox:has(>.ref:hover)>.ref .rs,.dbox:has(>.rtabs:hover)>.ref .rs{opacity:.5}
  .dbox:has(>.ref)>.rtabs:focus-within{opacity:1;pointer-events:auto}
  .dbox:has(>.ref)>.rtabs button:focus-visible{outline:2px solid rgba(255,166,95,.9);outline-offset:-2px}
}
@media(hover:none),(pointer:coarse){
  .dbox:has(>.ref)>.rtabs{position:static;opacity:1;pointer-events:auto;height:auto;margin:4px 0 0;padding:0 4px}
  .dbox:has(>.ref)>.rtabs button{height:40px;min-height:40px;padding:0 12px;display:flex;align-items:center;justify-content:center;column-gap:0;font-size:13px}
  .dbox:has(>.ref)>.rtabs button::before,.dbox:has(>.ref)>.rtabs button small{display:none}
  .dbox:has(>.ref:hover)>.ref,.dbox:has(>.rtabs:hover)>.ref{opacity:1}
  .fz-dz .dz>.fz-tabs{position:static;opacity:1;pointer-events:auto;margin:0 4px 8px}
  .fz-dz .dz>.fz-tabs button{min-height:36px}
}
/* G-13 also for narrow windows where hover emulation is unreliable */
@media(max-width:700px){
  .fz-dz .dz>.fz-tabs{position:static;opacity:1;pointer-events:auto;margin:0 4px 8px}
  .dbox:has(>.ref)>.rtabs{position:static;opacity:1;pointer-events:auto;height:auto;margin:4px 0 0;padding:0 4px}
  .dbox:has(>.ref)>.rtabs button{height:40px;min-height:40px;padding:0 12px;display:flex;align-items:center;justify-content:center;column-gap:0;font-size:13px}
  .dbox:has(>.ref)>.rtabs button::before,.dbox:has(>.ref)>.rtabs button small{display:none}
  .dbox:has(>.ref:hover)>.ref,.dbox:has(>.rtabs:hover)>.ref{opacity:1}
  /* G-34: popovers/sheets never taller than the viewport */
  .pop{max-height:calc(100dvh - 24px)}
}
/* keyboard focus visibility for controls that relied on browser defaults */
.ref:focus-visible,.dz:focus-visible,.dzone:focus-visible,.ht:focus-visible,[role=button]:focus-visible,button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:2px solid rgba(255,166,95,.9);outline-offset:2px}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* QA-PG: long labels (hi, de) made the Credits History modal scroll sideways; the filter row now scrolls on its own */
.mdl.cl>.atabs{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;max-width:calc(100% - 16px)}
.mdl.cl>.atabs::-webkit-scrollbar{display:none}
/* Free-plan watermark: badge on creation cards + the Remove watermark button (app.js wmShow / wmremove) */
.cc .wmb{position:absolute;left:6px;top:6px;z-index:5;display:inline-flex;align-items:center;height:18px;padding:0 7px;border-radius:999px;background:rgba(18,18,22,.78);color:#ff8a4c;font-size:10px;line-height:18px;font-weight:600;letter-spacing:.02em;pointer-events:none;transition:opacity .2s}
.cc:hover .wmb,.cc:focus-within .wmb{opacity:0}
.ov .mdl.lb .lbup.wmup .btn{background:rgba(255,138,76,.16);color:#ff8a4c}
.ov .mdl.lb .lbup.wmup .btn:hover{background:rgba(255,138,76,.26)}
.ov .mdl.lb .lbup.wmup::before{background:#ff8a4c}

/* ---- UX-2 round 2 (docs/QA-LOOP-UX-2.md) ---- */
/* Free plan: video / character tools need a subscription, said next to Generate */
.plnote{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 8px 8px;padding:10px 12px;border-radius:12px;background:rgba(253,121,33,.1);border:1px solid rgba(253,121,33,.28);color:#edeef0;font-size:13px;line-height:18px}
.plnote button{flex:none;min-height:32px;padding:6px 12px;border-radius:999px;background:#edeef0;color:#0e1015;font-size:13px;font-weight:600}
/* Credits History: the balance card grows with the trial-expiry line instead of overflowing its fixed 80px */
.mdl.cl>.cbal{height:auto;min-height:80px}
.mdl.cl .cbal small.ms{display:block;margin:0!important;padding:0!important;text-align:left!important;font-size:12px;line-height:16px;color:#9aa0a8}
@media(max-width:700px){
  .lp:has(>.cf) .thead{padding-right:56px} /* the Creations edge tab no longer sits on the chevron */
  .gbar:not(:has(.step)) .gen{flex:1 1 auto}
  body:has(.mnav) .gbar:not(:has(.step)){padding-bottom:30px} /* the round Create button of the bottom nav rises into a full-width Generate */
  .plnote{padding:8px 10px;font-size:12px;line-height:16px;margin-bottom:6px}
}
/* delete-my-account dialog: a destructive button looks destructive, text reads left-aligned under its title */
.mdl form[data-act=acctdelgo] .btn.g{background:#cf2f35;color:#fff}
.mdl form[data-act=acctdelgo] .btn.g:hover{background:#d93a40}
.mdl:has(form[data-act=acctdelgo])>.ms{text-align:left}
