/* Director Workbench / Free Creation: one navigation and interaction language.
   Preview-only shared chrome. All accents stay warm yellow on selection. */
:root { --director-optic-gold: 237,201,109; }
#boardsView.director-workbench .director-sidebar,
body .free-sidebar{
  flex:0 0 var(--free-nav-width,224px);width:var(--free-nav-width,224px);
  padding:20px 12px 16px;border-right:1px solid rgba(206,219,227,.11);
  background:linear-gradient(155deg,rgba(46,53,58,.22),rgba(9,13,17,.16));
  backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);
}
body .free-sidebar{position:fixed;inset:0 auto 0 0;z-index:1000;display:flex;flex-direction:column}
body{--free-nav-width:224px}
body.free-nav-collapsed{--free-nav-width:76px}
body[data-theme=light] .free-sidebar{background:linear-gradient(155deg,rgba(255,255,255,.76),rgba(232,236,237,.45))}
body .free-side-head{height:43px;min-height:43px;padding:4px 7px;margin-bottom:0;align-items:center}
body .free-side-heading{font-size:13px;font-weight:700;color:var(--free-ink);white-space:nowrap}
body .free-side-heading small{display:block;font-size:9px;color:var(--free-muted);font-weight:400;letter-spacing:.12em;margin-top:3px}
body .free-side-nav{display:flex;flex-direction:column;gap:6px;margin-top:17px}
body .free-side-item,#boardsView.director-workbench .director-nav-item{
  display:flex;align-items:center;gap:12px;min-height:42px;padding:0 13px;
  font-size:12px;font-weight:600;text-align:left;white-space:nowrap;
  border-radius:11px;border:1px solid transparent;background:transparent;
  color:var(--free-muted,var(--muted));position:relative;isolation:isolate;
  transition:color .16s,border-color .18s,background .18s,box-shadow .18s;
  overflow:hidden;
}
body .free-side-item{width:100%;font-family:inherit}
body .free-side-icon,#boardsView.director-workbench .director-nav-icon{
  width:22px;height:22px;flex:0 0 22px;display:grid;place-items:center;color:inherit;
}
body .free-side-icon svg,#boardsView.director-workbench .director-nav-icon svg{
  width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.65;
  stroke-linecap:round;stroke-linejoin:round;overflow:visible;
}
body .free-side-item.is-active,#boardsView.director-workbench .director-nav-item.active{
  color:var(--free-accent,#edc96d);
  border-color:rgba(var(--director-optic-gold),.35);
  background:linear-gradient(125deg,rgba(var(--director-optic-gold),.145),rgba(var(--director-optic-gold),.018));
  box-shadow:inset 2px 0 rgba(var(--director-optic-gold),.96);
}
body .free-side-item:hover,#boardsView.director-workbench .director-nav-item:hover{
  color:var(--free-ink,var(--text));border-color:rgba(217,231,238,.22);
  background:linear-gradient(135deg,rgba(255,255,255,.075),rgba(255,255,255,.016));
}
body .free-side-item.is-active:hover,#boardsView.director-workbench .director-nav-item.active:hover{color:var(--free-accent,#edc96d)}
body .free-side-footer{margin-top:auto;padding:14px 9px;font-size:10px;line-height:1.8;color:var(--free-muted);opacity:.65}
body .free-side-collapse,#boardsView.director-workbench .director-collapse{width:34px;height:34px;min-height:34px;flex:0 0 34px;border:1px solid rgba(255,255,255,.12);color:var(--free-ink);border-radius:11px;display:grid;place-items:center;background:transparent}
body.free-nav-collapsed .free-side-heading,body.free-nav-collapsed .free-side-label,body.free-nav-collapsed .free-side-footer{display:none!important}
body.free-nav-collapsed .free-side-item{justify-content:center;padding:0}
body.free-nav-collapsed .free-side-head{justify-content:center;padding:4px 0}
body .free-top{
  height:64px;padding:0 clamp(16px,2.2vw,30px);background:#101214;
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  border-bottom:1px solid rgba(211,227,238,.12);backdrop-filter:blur(22px);
}
body[data-theme=light] .free-top{background:rgba(246,248,248,.91)}
body .free-top .brand-side{display:flex;align-items:center;gap:12px;min-width:0}
body .free-top .free-brand{display:flex;align-items:center;gap:10px;font-weight:600;letter-spacing:0;font-size:14px}
body .free-top .free-brand .brand-mark{font-size:18px;font-weight:750}
body .free-top .free-brand .brand-divider{height:24px;width:1px;background:rgba(225,229,231,.18)}
body .free-top .free-brand .brand-name{display:flex;flex-direction:column;gap:1px;letter-spacing:.03em}
body .free-top .free-brand .brand-name strong{font-size:13px}
body .free-top .free-brand .brand-name small{font-size:9px;letter-spacing:.08em}
body .free-top .product-switch{color:var(--free-muted);font-size:17px}
body .free-top .product-label{font-size:12px;font-weight:600;padding:8px 10px}
body .free-top .test-tag{color:var(--free-muted);font-size:10px;border:1px solid var(--free-edge);padding:5px 8px;border-radius:7px}
body .free-top .free-top-actions{display:flex;align-items:center;gap:10px;font-size:12px;flex:0 0 auto}
body .free-top .free-top-actions .canvas-nav-icon{
  width:36px;height:36px;display:grid;place-items:center;padding:0;
  border:1px solid transparent;background:transparent;border-radius:11px;color:var(--free-ink);
}
body .free-top .free-top-actions .canvas-nav-icon svg{width:21px;height:21px}
body .free-top .free-top-actions .free-account{border-radius:50%;border:1px solid var(--free-edge)}
/* Hover refraction is rendered exclusively by the existing Studio WebGL
   component (hover-liquid-glass.js), not a second CSS faux optical layer. */
#boardsView.director-workbench .director-panel .director-batch-row{
 display:flex;align-items:center;justify-content:flex-end;min-height:44px;margin-top:10px;
}
#boardsView.director-workbench .director-panel .director-batch-row .director-batch-actions{margin-left:0}
@media(max-width:900px){
 body{--free-nav-width:76px}
 body .free-side-label,body .free-side-heading,body .free-side-footer{display:none!important}
 body .free-side-item{justify-content:center;padding:0}
 body .free-side-head{justify-content:center;padding:0}
}
@media(max-width:640px){
 body{--free-nav-width:54px}
 body .free-sidebar{padding-left:3px;padding-right:3px}
 body .free-top .free-brand .brand-name,body .free-top .product-switch,body .free-top .test-tag{display:none}
 body .free-top{height:60px}
}
@media(prefers-reduced-motion:reduce){
 :is(.free-side-item,.director-nav-item,.free-smart-trigger,.free-tabs button)::after{transition:none}
}
/* Shared header colors and account dropdown for Free Creation. */
body .free-top .free-brand span.brand-mark,
body .free-top .free-brand span.brand-name{color:var(--free-ink)}
body .free-top .free-brand .brand-name small{color:var(--free-muted)}
body .free-top .product-label{color:var(--free-ink);background:transparent;border:1px solid transparent;text-decoration:none;border-radius:9px}
body .free-top .product-label:hover{border-color:rgba(227,233,239,.19);background:rgba(255,255,255,.055);color:var(--free-ink)}
body .free-account-control{position:relative}
body .free-account-menu{position:absolute;right:0;top:calc(100% + 9px);width:168px;z-index:1300;padding:8px;
 background:rgba(32,37,41,.97);border:1px solid var(--free-edge);border-radius:13px;
 box-shadow:0 14px 30px rgba(0,0,0,.24);backdrop-filter:blur(22px)}
body .free-account-menu[hidden]{display:none!important}
body .free-account-menu a{display:block;padding:11px 12px;border-radius:9px;font-size:12px}
body .free-account-menu a:hover{background:rgba(255,255,255,.075)}
body[data-theme=light] .free-account-menu{background:rgba(251,252,252,.97)}
body .free-top .brand-side small{font-weight:400}
@media(max-width:780px){
 #boardsView.director-workbench .director-side-nav{scrollbar-width:none}
 #boardsView.director-workbench .director-side-nav::-webkit-scrollbar{display:none}
}

/* Crisp monochrome vector glyphs like the Studio tool rail; selection alone is gold. */
body:not([data-theme=light]) .free-side-icon,
body:not([data-theme=light]) #boardsView.director-workbench .director-nav-icon{color:rgba(236,241,242,.88)}
body:not([data-theme=light]) .free-side-item.is-active .free-side-icon,
body:not([data-theme=light]) #boardsView.director-workbench .director-nav-item.active .director-nav-icon{color:#edc96d}
body[data-theme=light] .free-side-icon,
body[data-theme=light] #boardsView.director-workbench .director-nav-icon{color:#4b555a}
body[data-theme=light] .free-side-item.is-active .free-side-icon,
body[data-theme=light] #boardsView.director-workbench .director-nav-item.active .director-nav-icon{color:#a98338}
/* Preserve the existing horizontal mobile workbench nav under the shared desktop sidebar. */
@media(max-width:780px){
 #boardsView.director-workbench .director-sidebar,
 #boardsView.director-workbench.director-collapsed .director-sidebar{
  width:100%;flex:0 0 auto;min-height:0;padding:6px 10px;
  border-right:0;border-bottom:1px solid var(--hair);
 }
}

/* The 3D Studio shader's overlay is the sole glass highlight. */
body[data-director-glass] .button-glass-surface{pointer-events:none!important}
#previewCanvas[hidden]{display:none!important}

/* Dropdown menus are body-level fixed popovers. No stacking context, clipped
   composer, history thumbnails or sidebars can render above them. */
body .free-smart-menu{position:fixed!important;z-index:12000!important;overscroll-behavior:contain;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;max-height:min(370px,65dvh)}
body .free-smart-option{width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:left}
body .free-smart-option span:first-child{min-width:0}
body .free-smart-select.open{z-index:15}
body .free-control-wrap{position:relative}
body .free-compose{overflow:visible}
body[data-free-view=workspace] .free-compose{z-index:2}
body .free-results{position:relative;z-index:1}
/* Generate is deliberately the only full pill: two true semicircular ends;
   the surrounding settings stay the established 10px glass rectangles. */
body button#freeGenerate,body[data-theme=light] button#freeGenerate{
 border-radius:999px!important;min-height:38px!important;height:38px!important;
 padding:0 17px!important;flex-wrap:nowrap;white-space:nowrap;
}
body #freeGenerateText,body .free-generate-credits{white-space:nowrap}

/* Resolution K and provider-native quality remain independent. Both belong
   to the single Quality column; Gemini uses K alone and Wan uses P alone. */
body .free-control-wrap:has(#freeQuality){width:260px!important;max-width:260px!important;
 display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px 7px;
 align-content:end}
body .free-control-wrap:has(#freeQuality)>.free-control-caption{grid-column:1/-1}
body .free-control-wrap:has(#freeQuality)>.free-smart-select{grid-column:1;min-width:0}
body .free-control-wrap .free-detail-control{grid-column:2;display:block;min-width:0}
body .free-control-wrap .free-detail-control[hidden]{display:none!important}
body .free-control-wrap:has(#freeDetailControl[hidden])>.free-smart-select{grid-column:1/-1}
body .free-detail-control>.free-smart-select{width:100%;min-width:0}
body .free-detail-control .free-smart-trigger{width:100%;min-width:0}
@media(max-width:980px){body .free-control-wrap:has(#freeQuality){width:220px!important;max-width:220px!important}}
@media(max-width:630px){body .free-control-wrap:has(#freeQuality){width:calc(50% - 4px)!important;max-width:none!important}}


/* Director Workbench parity · My Canvas is the visual/layout authority.
   Free Creation is a Director page, not a separate edge-to-edge application.
   The upper bar spans the full viewport; both sidebars start below it. */
body[data-free-view]{
  --free-bg:var(--bg,#101215);
  --free-panel:var(--glass,rgba(30,33,38,.71));
  --free-edge:var(--edge,rgba(255,255,255,.13));
  --free-ink:var(--text,#f0f0ee);
  --free-muted:var(--muted,#9298a1);
  --free-accent:var(--accent,#edc96d);
  background:var(--bg,#101215)!important;
  color:var(--text,#f0f0ee);
  padding-left:0!important;
  transition:none!important;
}
body[data-free-view]:not([data-theme=light]){background:#101215!important}
body[data-free-view][data-theme=light]{
  background:#eef0ef!important;
  --free-panel:rgba(255,255,255,.8);
  --free-edge:rgba(28,38,40,.15);
  --free-ink:#252829;
  --free-muted:#646e71;
  --free-accent:#aa813a;
  --free-bg:#eef0ef;
}
body[data-free-view] .free-top{
  width:100%!important;
  height:64px!important;
  position:fixed!important;
  top:0!important;left:0!important;right:0!important;
  z-index:1500;
  padding:0 24px!important;
  border-bottom:1px solid var(--hair,rgba(255,255,255,.08))!important;
  background:var(--surface,rgba(27,29,33,.91))!important;
  backdrop-filter:blur(22px);
}
body[data-free-view]:not([data-theme=light]) .free-top{background:rgba(27,29,33,.91)!important}
body[data-free-view][data-theme=light] .free-top{background:rgba(255,255,255,.91)!important}
body[data-free-view] .free-top .brand-side{gap:15px}
body[data-free-view] .free-top .free-brand .brand-mark{font-size:19px}
body[data-free-view] .free-top .free-brand .brand-divider{height:28px}
body[data-free-view] .free-top .test-tag{
  border:1px solid rgba(246,112,105,.45);
  color:#f17c76;
  border-radius:5px;
}
body[data-free-view] .free-sidebar{
  inset:64px auto 0 0!important;
  top:64px!important;
  bottom:0!important;
  left:0!important;
  width:var(--free-nav-width,224px)!important;
  height:calc(100dvh - 64px)!important;
  min-height:0!important;
  overflow-y:auto;
  border-right:1px solid var(--hair,rgba(255,255,255,.08))!important;
  background:linear-gradient(155deg,rgba(46,53,58,.22),rgba(9,13,17,.16))!important;
}
body[data-free-view][data-theme=light] .free-sidebar{
  background:linear-gradient(155deg,rgba(255,255,255,.76),rgba(232,236,237,.45))!important;
}
body[data-free-view] .free-main{
  box-sizing:border-box!important;
  width:calc(100% - var(--free-nav-width,224px))!important;
  max-width:none!important;
  min-height:calc(100dvh - 64px)!important;
  margin:64px 0 0 var(--free-nav-width,224px)!important;
  padding:36px clamp(22px,4vw,68px) 72px!important;
  background:radial-gradient(ellipse 52% 40% at 70% 0%,rgba(206,164,86,.09),transparent 75%),var(--free-bg)!important;
}
body[data-free-view] .free-compose{
  background:var(--free-panel)!important;
  border-color:var(--free-edge)!important;
  color:var(--free-ink);
  backdrop-filter:blur(24px) saturate(135%);
}
body[data-free-view] .free-side-item{
  color:var(--free-muted);
  border-radius:11px;
}
body[data-free-view] .free-side-item.is-active{
  color:var(--free-accent);
}
body[data-free-view] .free-status.error{color:#e68f86}
body[data-free-view] .free-result-grid .free-item-media{
  background:linear-gradient(145deg,rgba(139,163,173,.09),rgba(75,86,96,.055));
}
@media(max-width:900px){
  body[data-free-view] .free-main{padding:27px 18px 52px!important}
}
@media(max-width:640px){
  body[data-free-view] .free-top{height:60px!important;padding:0 12px!important}
  body[data-free-view] .free-sidebar{
    inset:60px auto 0 0!important;top:60px!important;
    height:calc(100dvh - 60px)!important;
  }
  body[data-free-view] .free-main{
    min-height:calc(100dvh - 60px)!important;
    padding:22px 14px 45px!important;
  }
}


/* Exact shared Canvas account chrome on Free Creation; no separate
   free-account-menu, account chip or independently animated trigger. */
body[data-free-view] .free-top .canvas-account-control{position:relative;display:flex;align-items:center}
body[data-free-view] .free-top #canvasAccountTrigger{
  display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;min-width:40px;
  border:1px solid var(--edge);border-radius:10px;
  padding:3px;background:linear-gradient(140deg,rgba(255,255,255,.085),rgba(255,255,255,.018));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15);
  color:var(--text);backdrop-filter:blur(14px);
}
body[data-free-view] .free-top #canvasAccountTrigger[aria-expanded="true"]{
  color:var(--accent);border-color:rgba(240,203,125,.65);
}
body[data-free-view] .free-top #canvasAccountAvatar:not([hidden]){
  display:block;width:34px;height:34px;border-radius:50%;object-fit:cover;
}
body[data-free-view] .free-top #canvasAccountAvatar[hidden]{display:none!important}
body[data-free-view] .free-top #canvasAccountMenu{
  position:absolute;right:0;top:calc(100% + 12px);
  width:238px;z-index:1100;
  padding:10px;border-radius:15px;border:1px solid rgba(255,255,255,.27);
  background:linear-gradient(145deg,rgba(46,50,52,.93),rgba(20,23,25,.93));
  box-shadow:0 24px 45px rgba(0,0,0,.29),inset 0 1px 0 rgba(255,255,255,.21);
  backdrop-filter:blur(24px) saturate(125%);
}
body[data-free-view] .free-top #canvasAccountMenu[hidden]{display:none!important}
body[data-free-view] .free-top #canvasAccountMenu .canvas-account-action{
  background:transparent;border:1px solid transparent;
  display:flex;width:100%;min-height:37px;align-items:center;
  justify-content:space-between;padding:8px 10px;border-radius:8px;
  font-size:12px;color:var(--text);
}
body[data-free-view] .free-top #canvasAccountMenu .canvas-account-action:hover{
  color:var(--accent);background:rgba(240,203,125,.08);
  border-color:rgba(240,203,125,.15);
}
body[data-free-view][data-theme=light] .free-top #canvasAccountMenu{
 background:linear-gradient(145deg,rgba(222,228,223,.88),rgba(165,171,166,.87));
 border-color:rgba(255,255,255,.66);
}

@media(max-width:640px){body[data-free-view] .free-main{margin-top:60px!important}}
