:root{color-scheme:light;--bg:#f4f7fc;--surface:#fff;--surface-2:#eef3fb;--text:#0f172a;--muted:#52627a;--line:#d7e0ee;--brand:#2563eb;--brand-2:#7c3aed;--danger:#b42318;--success:#067647;--shadow:0 18px 45px rgba(15,23,42,.08);font-family:Inter,"Noto Sans Arabic",system-ui,sans-serif}
:root[data-theme="dark"]{color-scheme:dark;--bg:#07111f;--surface:#0d1b2d;--surface-2:#14243a;--text:#f8fafc;--muted:#b7c4d6;--line:#2b3d55;--brand:#60a5fa;--brand-2:#a78bfa;--danger:#fda29b;--success:#6ce9a6;--shadow:0 20px 50px rgba(0,0,0,.35)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text)}body{line-height:1.55}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:3px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid color-mix(in srgb,var(--brand) 55%,transparent)}button{cursor:pointer}.studio-topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:16px;padding:14px clamp(16px,4vw,54px);background:color-mix(in srgb,var(--surface) 92%,transparent);border-bottom:1px solid var(--line);backdrop-filter:blur(16px)}.studio-brand{display:flex;align-items:center;gap:10px;color:var(--text);text-decoration:none}.studio-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:13px;color:#fff;background:linear-gradient(135deg,#168cff,#7c3aed);font-weight:900}.studio-brand span{display:flex;flex-direction:column;line-height:1.15}.studio-brand small{color:var(--muted);font-weight:600}.studio-nav{display:flex;gap:6px;margin-inline:auto}.studio-nav a{padding:9px 12px;border-radius:10px;color:var(--muted);text-decoration:none;font-weight:700}.studio-nav a:hover{background:var(--surface-2);color:var(--text)}.studio-actions{display:flex;gap:8px}.studio-actions select,.icon-button{min-height:40px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--text);padding:8px 11px}.studio-shell{width:min(1220px,calc(100% - 32px));margin:34px auto 80px}.studio-hero{display:flex;justify-content:space-between;gap:28px;align-items:end;margin-bottom:24px}.studio-hero p{max-width:720px;color:var(--muted);margin:8px 0 0}.studio-hero h1{font-size:clamp(2rem,5vw,3.6rem);line-height:1.05;margin:0}.privacy-chip{white-space:nowrap;padding:8px 12px;border:1px solid color-mix(in srgb,var(--success) 30%,var(--line));border-radius:999px;color:var(--success);background:color-mix(in srgb,var(--success) 8%,var(--surface));font-weight:800}.tool-tabs{display:flex;gap:8px;overflow:auto;margin-bottom:20px;padding-bottom:5px}.tool-tab{white-space:nowrap;border:1px solid var(--line);background:var(--surface);color:var(--muted);border-radius:999px;padding:10px 14px;font-weight:800}.tool-tab.active{background:var(--text);color:var(--surface);border-color:var(--text)}.studio-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px}.studio-card{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:var(--shadow)}.upload-box{position:relative;display:grid;place-items:center;min-height:230px;text-align:center;border:2px dashed var(--line);border-radius:18px;background:var(--surface-2);padding:28px}.upload-box.drag{border-color:var(--brand);background:color-mix(in srgb,var(--brand) 8%,var(--surface))}.upload-box input{position:absolute;inset:0;opacity:0;cursor:pointer}.upload-icon{display:grid;place-items:center;width:62px;height:62px;border-radius:18px;background:linear-gradient(135deg,var(--brand),var(--brand-2));color:#fff;font-size:1.2rem;font-weight:900}.file-list{display:grid;gap:10px;margin-top:16px}.file-row{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.file-row div{min-width:0;flex:1}.file-row b,.file-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-row small,.hint,.status{color:var(--muted)}.file-row button{border:0;background:transparent;color:var(--danger);font-weight:900}.controls{display:grid;gap:16px}.controls label{display:grid;gap:7px;color:var(--muted);font-weight:700}.controls input,.controls select,.controls textarea{width:100%;min-height:44px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);color:var(--text);padding:10px}.field-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.switch{display:flex!important;align-items:center;justify-content:space-between;gap:12px}.switch input{width:22px;height:22px;min-height:auto}.primary,.secondary,.danger{border-radius:12px;padding:11px 15px;font-weight:900;border:1px solid transparent}.primary{background:linear-gradient(135deg,#2563eb,#5b3ee4);color:#fff}.secondary{background:var(--surface-2);border-color:var(--line);color:var(--text)}.danger{background:color-mix(in srgb,var(--danger) 10%,var(--surface));border-color:color-mix(in srgb,var(--danger) 30%,var(--line));color:var(--danger)}button:disabled{opacity:.5;cursor:not-allowed}.button-row{display:flex;flex-wrap:wrap;gap:9px}.button-row>*{flex:1}.progress{height:8px;border-radius:99px;overflow:hidden;background:var(--surface-2);margin:12px 0}.progress i{display:block;width:0;height:100%;background:linear-gradient(90deg,var(--brand),var(--brand-2));transition:width .18s}.result-card{margin-top:18px;padding:16px;border:1px solid color-mix(in srgb,var(--success) 35%,var(--line));border-radius:15px;background:color-mix(in srgb,var(--success) 7%,var(--surface))}.result-card[hidden],.panel[hidden]{display:none}.result-card audio,.recorder-preview audio,.recorder-preview video{width:100%;max-height:360px;margin-top:12px}.recorder-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.recorder-box{display:grid;gap:12px;align-content:start}.recorder-indicator{display:flex;align-items:center;gap:8px;color:var(--muted)}.recorder-indicator i{width:10px;height:10px;border-radius:99px;background:var(--muted)}.recorder-indicator.live i{background:#e11d48;box-shadow:0 0 0 6px rgba(225,29,72,.12);animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.4}}.canvas-layout{display:grid;grid-template-columns:260px minmax(0,1fr) 310px;gap:18px}.canvas-stage{display:grid;place-items:center;min-height:620px;padding:28px;overflow:auto;background:repeating-conic-gradient(#e8edf5 0 25%,#f8fafc 0 50%) 50%/24px 24px;border-radius:20px;border:1px solid var(--line)}#design-canvas{max-width:100%;max-height:70vh;background:#fff;box-shadow:0 20px 55px rgba(15,23,42,.2);touch-action:none}.layer-list{display:grid;gap:8px}.layer-item{display:flex;gap:8px;align-items:center;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}.layer-item.active{border-color:var(--brand);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 18%,transparent)}.layer-item button{border:0;background:transparent;color:var(--text);text-align:start;flex:1}.layer-dot{width:12px;height:12px;border-radius:4px;background:var(--brand)}.template-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.template-button{min-height:74px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:var(--text);padding:9px;font-weight:800}.template-button.active{border-color:var(--brand);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 18%,transparent)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:900px){.studio-nav{display:none}.studio-grid,.canvas-layout{grid-template-columns:1fr}.studio-grid aside{order:-1}.canvas-stage{min-height:460px}.recorder-grid{grid-template-columns:1fr}.studio-hero{align-items:start;flex-direction:column}.privacy-chip{white-space:normal}.canvas-layout>.studio-card:first-child{order:2}.canvas-layout>.studio-card:last-child{order:3}}
@media(max-width:480px){.studio-shell{width:min(100% - 20px,1220px);margin-top:22px}.studio-topbar{padding:10px}.studio-brand small{display:none}.studio-actions select{max-width:74px}.studio-card{padding:15px;border-radius:17px}.field-pair,.template-grid{grid-template-columns:1fr}.button-row>*{flex-basis:100%}.studio-hero h1{font-size:2.15rem}.canvas-stage{padding:10px;min-height:330px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Shared sizing for the Wave 2 developer workspaces. */
.dev-columns>label,.dev-columns>div{display:grid;min-width:0;align-content:start;gap:7px}
.code-area{display:block;width:100%;border:1px solid var(--line);border-radius:11px;background:var(--surface-2);color:var(--text);padding:12px;resize:vertical}
.ai-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}.ai-preview-grid>div{display:grid;gap:8px;min-width:0}.mask-stage,.checker{position:relative;display:grid;place-items:center;min-height:260px;overflow:auto;border:1px solid var(--line);border-radius:16px;background:repeating-conic-gradient(#e7ecf4 0 25%,#fff 0 50%) 50%/22px 22px}.mask-stage canvas,.checker canvas{display:block;max-width:100%;max-height:520px}.mask-stage #mask-canvas{position:absolute;inset:0;margin:auto;touch-action:none}.media-preview{width:100%;max-height:420px;margin-top:14px;border-radius:14px;background:#020617}@media(max-width:760px){.ai-preview-grid{grid-template-columns:1fr}.mask-stage,.checker{min-height:210px}}
.upload-box input{z-index:2}.upload-box button{position:relative;z-index:3}
[hidden]{display:none!important}
