/*
 * ZEQIAO Studio user-front reference shell, ui2 release candidate.
 *
 * This file is intentionally a presentation-only compatibility layer.  It
 * reshapes the production DOM into the approved member-front composition,
 * while leaving every existing id, event handler, drawer, dialog and state
 * machine owned by app.js intact.
 */

:root{
  --ref-bg:#0a0e1a;
  --ref-bg-2:#0f1422;
  --ref-surface:#141c2e;
  --ref-surface-2:#1b2438;
  --ref-surface-3:#232d44;
  --ref-card:#151e32;
  --ref-border:rgba(120,150,220,.10);
  --ref-border-2:rgba(120,160,230,.18);
  --ref-text:#f0f4ff;
  --ref-sub:#a6b4d4;
  --ref-muted:#67779c;
  --ref-primary:#2e6bff;
  --ref-primary-2:#4b83ff;
  --ref-blue:#38a0ff;
  --ref-orange:#f0702b;
  --ref-orange-2:#ff9350;
  --ref-radius:14px;
  /* The asset-library content column is the single width baseline for every
     top-level directory.  Page-specific surfaces may still use their own
     internal grid, but their outer content edges align to this value. */
  --ref-directory-width:1180px;
  --ref-shadow:0 1px 0 rgba(255,255,255,.03) inset,0 10px 30px rgba(0,0,0,.4);

  /* Keep legacy components visually coherent without changing their API. */
  --bg:var(--ref-bg);
  --bg-2:var(--ref-bg-2);
  --panel:rgba(20,28,46,.88);
  --panel-solid:var(--ref-surface);
  --panel-hi:var(--ref-surface-2);
  --line:var(--ref-border);
  --line-2:var(--ref-border-2);
  --line-glow:rgba(46,107,255,.28);
  --text:var(--ref-text);
  --sub:var(--ref-sub);
  --muted:var(--ref-muted);
  --accent:var(--ref-primary);
  --accent-2:var(--ref-blue);
  --coral:var(--ref-orange);
  --radius:10px;
  --radius-lg:14px;
}

/* Project workbench: presentation-only tabs over the existing project, asset and Agent APIs. */
.reference-ui-shell .project-detail-tabs{display:flex;align-items:center;gap:8px;padding:7px;border:1px solid var(--ref-border-2);border-radius:14px;background:rgba(16,23,39,.72);overflow-x:auto;scrollbar-width:thin}
.reference-ui-shell .project-detail-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:112px;height:38px;padding:0 15px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--ref-sub);font-size:12px;white-space:nowrap}
.reference-ui-shell .project-detail-tabs button:hover,.reference-ui-shell .project-detail-tabs button:focus-visible{border-color:var(--ref-border-2);background:rgba(255,255,255,.045);color:var(--ref-text)}
.reference-ui-shell .project-detail-tabs button.active{border-color:rgba(102,123,255,.42);background:linear-gradient(135deg,rgba(101,84,255,.2),rgba(56,125,255,.13));color:#fff;box-shadow:0 7px 18px rgba(36,64,150,.16)}
.reference-ui-shell .project-detail-tabs button small{display:grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:99px;background:rgba(255,255,255,.09);color:inherit;font-size:9px}
.reference-ui-shell .project-detail-panel{min-width:0}
.reference-ui-shell .project-detail-inline{max-width:min(720px,100%)}
.reference-ui-shell .project-detail-inline .project-inline-field{padding:3px 6px;margin-left:-6px}
.reference-ui-shell .project-detail-name .project-inline-text{font-size:18px!important;line-height:1.35}
.reference-ui-shell .project-detail-desc{margin-top:2px}
.reference-ui-shell .project-detail-desc .project-inline-text{font-size:12.5px!important;line-height:1.7;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.reference-ui-shell .project-detail-inline .project-inline-input{height:36px;font-size:13px}
.reference-ui-shell .project-detail-desc .project-inline-input{height:36px}
.reference-ui-shell .project-asset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:12px}
.reference-ui-shell .project-asset-grid>.empty{grid-column:1/-1}
.reference-ui-shell .project-asset-card{display:grid;grid-template-columns:74px minmax(0,1fr);align-items:center;gap:11px;min-width:0;padding:8px;border:1px solid var(--ref-border-2);border-radius:12px;background:rgba(18,26,44,.68);color:var(--ref-text);text-align:left}
.reference-ui-shell .project-asset-card:hover,.reference-ui-shell .project-asset-card:focus-visible{border-color:rgba(100,132,255,.45);background:rgba(29,40,67,.84);transform:translateY(-1px)}
.reference-ui-shell .project-asset-media{position:relative;display:grid;place-items:center;width:74px;height:74px;overflow:hidden;border-radius:9px;background:#0a1020;color:#aebbd5}
.reference-ui-shell .project-asset-media img,.reference-ui-shell .project-asset-media video{width:100%;height:100%;object-fit:contain;background:#0a1020}
.reference-ui-shell .project-asset-media>small{position:absolute;left:5px;top:5px;max-width:64px;padding:2px 5px;border-radius:6px;background:rgba(6,10,18,.78);color:#fff;font-size:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reference-ui-shell .project-asset-copy{display:grid;gap:6px;min-width:0}
.reference-ui-shell .project-asset-copy strong,.reference-ui-shell .project-asset-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reference-ui-shell .project-asset-copy strong{font-size:12px}.reference-ui-shell .project-asset-copy small{color:var(--ref-sub);font-size:10px}
.reference-ui-shell .project-asset-audio-icon{font-size:28px;color:#ad86ff}.reference-ui-shell .project-asset-play{position:absolute;right:6px;bottom:6px;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:rgba(4,8,16,.76);color:#fff;font-size:8px}
.reference-ui-shell .project-agent-entry{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:15px;padding:18px;border:1px solid rgba(123,106,255,.26);border-radius:14px;background:linear-gradient(135deg,rgba(111,77,255,.11),rgba(37,126,255,.07))}
.reference-ui-shell .project-agent-mark{display:grid;place-items:center;width:56px;height:56px;border-radius:15px;background:linear-gradient(135deg,#755eff,#4389ff);color:#fff;font-size:15px;font-weight:900;box-shadow:0 9px 24px rgba(75,92,255,.22)}
.reference-ui-shell .project-agent-entry div{min-width:0}.reference-ui-shell .project-agent-entry strong{display:block;font-size:14px}.reference-ui-shell .project-agent-entry p{margin:5px 0 0;color:var(--ref-sub);font-size:11px;line-height:1.6}
.reference-ui-shell .project-settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.reference-ui-shell .project-settings-grid>div{display:grid;gap:6px;padding:13px;border:1px solid var(--ref-border);border-radius:11px;background:rgba(255,255,255,.025)}
.reference-ui-shell .project-settings-grid span{color:var(--ref-sub);font-size:10px}.reference-ui-shell .project-settings-grid strong{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reference-ui-shell .project-settings-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:14px}
.reference-ui-shell .project-tab-loading,.reference-ui-shell .project-tab-error{display:flex;align-items:center;gap:9px;margin-bottom:12px;padding:11px 13px;border:1px solid var(--ref-border-2);border-radius:10px;background:rgba(255,255,255,.025);color:var(--ref-sub);font-size:11px}
.reference-ui-shell .project-tab-loading>span{width:13px;height:13px;border:2px solid rgba(255,255,255,.18);border-top-color:#708cff;border-radius:50%;animation:ref-project-spin .7s linear infinite}
.reference-ui-shell .project-tab-error{border-color:rgba(239,92,103,.28);color:#ffb0b5}.reference-ui-shell .project-tab-error span{flex:1}.reference-ui-shell .project-tab-error button{height:28px;padding:0 9px}
@keyframes ref-project-spin{to{transform:rotate(360deg)}}
html[data-zq-theme="light"] .reference-ui-shell .project-detail-tabs{background:rgba(255,255,255,.84)}
html[data-zq-theme="light"] .reference-ui-shell .project-detail-tabs button.active{color:#25345e;background:linear-gradient(135deg,rgba(114,94,255,.14),rgba(65,133,255,.09))}
html[data-zq-theme="light"] .reference-ui-shell .project-asset-card{background:rgba(255,255,255,.86);color:#25314a}
html[data-zq-theme="light"] .reference-ui-shell .project-asset-card:hover{background:#fff}
html[data-zq-theme="light"] .reference-ui-shell .project-asset-media,html[data-zq-theme="light"] .reference-ui-shell .project-asset-media img,html[data-zq-theme="light"] .reference-ui-shell .project-asset-media video{background:#edf1f7}
@media(max-width:760px){
  .reference-ui-shell .project-detail-tabs button{min-width:98px;padding:0 11px}
  .reference-ui-shell .project-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .reference-ui-shell .project-agent-entry{grid-template-columns:48px minmax(0,1fr)}
  .reference-ui-shell .project-agent-mark{width:48px;height:48px}.reference-ui-shell .project-agent-entry button{grid-column:1/-1;width:100%}
}

html,body{width:100%;height:100%;min-width:0}
body.reference-ui-shell{
  background:var(--ref-bg);
  color:var(--ref-text);
  font-family:"Inter","SF Pro Text","HarmonyOS Sans SC","PingFang SC","Microsoft YaHei","Segoe UI",system-ui,sans-serif;
  font-size:14px;
  letter-spacing:.01em;
  overflow:hidden;
}
.reference-ui-shell [hidden]{display:none!important}
body.reference-ui-shell::before{
  background:
    radial-gradient(1100px 620px at 10% -8%,rgba(46,107,255,.13),transparent 55%),
    radial-gradient(980px 620px at 108% -5%,rgba(56,160,255,.10),transparent 50%),
    radial-gradient(860px 720px at 50% 120%,rgba(62,211,207,.06),transparent 55%);
}

/* Login: same glass card, aura and capability rhythm as the approved file. */
.reference-ui-shell .login{
  background:#05070c;
  isolation:isolate;
}
.reference-ui-shell .login::after{display:none}
.reference-ui-shell .login-aura{position:absolute;border-radius:50%;filter:blur(80px);opacity:.55;pointer-events:none}
.reference-ui-shell .login-aura-one{width:520px;height:520px;left:-120px;top:-140px;background:radial-gradient(circle,rgba(46,107,255,.5),transparent 70%);animation:refAuraOne 16s ease-in-out infinite alternate}
.reference-ui-shell .login-aura-two{width:460px;height:460px;right:-100px;bottom:-160px;background:radial-gradient(circle,rgba(56,160,255,.42),transparent 70%);animation:refAuraTwo 20s ease-in-out infinite alternate}
.reference-ui-shell .login-aura-three{width:380px;height:380px;left:22%;bottom:-80px;background:radial-gradient(circle,rgba(62,211,207,.28),transparent 70%);animation:refAuraThree 24s ease-in-out infinite alternate}
@keyframes refAuraOne{to{transform:translate(70px,50px) scale(1.15)}}
@keyframes refAuraTwo{to{transform:translate(-60px,-40px) scale(1.1)}}
@keyframes refAuraThree{to{transform:translate(40px,-60px) scale(1.2)}}
.reference-ui-shell .loginbox{
  width:420px;
  padding:46px 38px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:24px;
  background:rgba(16,24,42,.72);
  backdrop-filter:blur(28px);
  box-shadow:0 40px 100px rgba(0,0,0,.65),0 1px 0 rgba(255,255,255,.06) inset;
}
.reference-ui-shell .loginbox::before{display:none}
.reference-ui-shell .login-logo{width:60px;height:60px;margin:0 auto 20px;border-radius:17px;background:linear-gradient(135deg,var(--ref-primary),var(--ref-blue));color:#fff;box-shadow:0 10px 32px rgba(46,107,255,.45)}
.reference-ui-shell .login-logo svg{width:30px;height:30px}
.reference-ui-shell .loginbox h1{margin:0 0 8px;font-size:24px;background:linear-gradient(100deg,#fff 20%,#c6dbff 90%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.reference-ui-shell .loginbox>p{margin:0 0 22px;color:var(--ref-sub);font-size:13px}
.reference-ui-shell .login-capabilities{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:24px}
.reference-ui-shell .login-capabilities span{padding:4px 11px;border:1px solid var(--ref-border);border-radius:20px;background:rgba(255,255,255,.06);color:var(--ref-sub);font-size:11px}
.reference-ui-shell .loginbox input{height:44px;padding:12px 16px;border:1px solid var(--ref-border-2);border-radius:12px;background:rgba(255,255,255,.05);color:var(--ref-text);font-family:inherit;font-size:15px;text-align:center;letter-spacing:3px}
.reference-ui-shell .loginbox input:focus{border-color:rgba(46,107,255,.6);box-shadow:0 0 0 4px rgba(46,107,255,.15);background:rgba(255,255,255,.07)}
.reference-ui-shell .loginbox .login-submit{height:44px;margin-top:16px;padding:0 18px;border-radius:10px;background:linear-gradient(135deg,var(--ref-primary),var(--ref-blue));color:#fff;box-shadow:0 4px 18px rgba(46,107,255,.35)}
.reference-ui-shell .login-error{min-height:18px!important;margin:10px 0 0!important;color:#ff91a4!important}

/* 60px global command bar and exactly six first-level destinations. */
.reference-ui-shell .topbar{
  position:relative;
  z-index:50;
  height:60px;
  min-height:60px;
  padding:0 20px;
  gap:16px;
  border-bottom:1px solid var(--ref-border);
  background:rgba(12,18,34,.78);
  backdrop-filter:blur(18px);
}
.reference-ui-shell .topbar::after{display:none}
.reference-ui-shell .brand{width:auto;min-width:168px;gap:10px;font-size:15.5px;color:var(--ref-text)}
.reference-ui-shell .brand-mark{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,var(--ref-primary),var(--ref-blue));color:#fff;box-shadow:0 4px 16px rgba(46,107,255,.4)}
.reference-ui-shell .brand-mark svg{width:18px;height:18px}
.reference-ui-shell .brand-copy{display:block;white-space:nowrap;background:none!important;-webkit-text-fill-color:currentColor!important}
.reference-ui-shell .brand-copy small{display:block;color:var(--ref-muted);font-size:9.5px;font-weight:500;letter-spacing:2px;line-height:1.15}
.reference-ui-shell .nav{flex:1;min-width:0;display:flex;gap:3px;margin:0;padding:0;border:0;border-radius:0;background:transparent;overflow-x:auto;scrollbar-width:none}
.reference-ui-shell .nav::-webkit-scrollbar{display:none}
.reference-ui-shell .nav button{height:36px;flex:0 0 auto;padding:0 14px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--ref-sub);font-size:13.5px;font-weight:500}
.reference-ui-shell .nav button:hover{background:rgba(255,255,255,.06);color:var(--ref-text)}
.reference-ui-shell .nav button.active{border-color:rgba(46,107,255,.3);background:linear-gradient(135deg,rgba(46,107,255,.16),rgba(56,160,255,.14));color:#d9e5ff;box-shadow:0 2px 12px rgba(46,107,255,.12);font-weight:600}
.reference-ui-shell .userbar{gap:8px;min-width:0}
.reference-ui-shell .app-version-badge{height:25px;padding:0 9px;border:1px solid var(--ref-border);border-radius:7px;background:rgba(255,255,255,.05);color:var(--ref-muted);font-size:11px}
.reference-ui-shell .quota-box{height:35px;padding:0 11px;border:1px solid var(--ref-border);border-radius:9px;background:rgba(255,255,255,.05);font-size:12px}
.reference-ui-shell .quota-box strong{color:var(--ref-text)}
.reference-ui-shell .recharge,.reference-ui-shell .admin-switch{height:34px;padding:0 12px;border:1px solid var(--ref-border-2);border-radius:9px;background:var(--ref-surface-2);color:var(--ref-text);font-size:12px}
.reference-ui-shell .icon-btn,.reference-ui-shell .app-theme-toggle,.reference-ui-shell .notification-trigger{width:35px;height:35px;border-radius:10px;color:var(--ref-sub)}
.reference-ui-shell .icon-btn:hover{background:rgba(255,255,255,.07);color:var(--ref-text)}
.reference-ui-shell .user-dot{width:33px;height:33px;border-radius:50%;background:linear-gradient(135deg,#fb7185,#c084fc);color:#fff;box-shadow:0 2px 12px rgba(240,120,180,.3)}

/* Page canvas.  Composer is dynamically mounted into the active page slot. */
.reference-ui-shell .workspace{
  position:relative;
  display:none;
  height:calc(100vh - 60px);
  min-width:0;
  grid-template-columns:1fr!important;
  overflow:hidden;
}
.reference-ui-shell .workspace>.compose{display:none}
.reference-ui-shell .compose-collapse-toggle{display:none!important}
.reference-ui-shell .works{
  position:relative;
  min-width:0;
  height:100%;
  padding:0;
  overflow:hidden;
  background:transparent;
}
.reference-ui-shell .right-view{
  position:absolute;
  inset:0;
  min-width:0;
  padding:20px;
  overflow:auto;
}
.reference-ui-shell .right-view.active{display:block;animation:referencePageIn .24s ease}
@keyframes referencePageIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.reference-ui-shell .content-head{width:min(1180px,100%);margin:0 auto 18px;align-items:center}
.reference-ui-shell .content-head h2{font-size:22px}
.reference-ui-shell .content-head h2::after{display:none}
.reference-ui-shell .content-head p{margin-top:5px;color:var(--ref-sub);font-size:12.5px}
.reference-ui-shell .content-head button,.reference-ui-shell button.primary{border:1px solid var(--ref-border-2);border-radius:10px;background:var(--ref-surface-2);color:var(--ref-text)}

/* Approved compact white creation dock. */
.reference-ui-shell .reference-composer-slot{width:100%;min-width:0;padding-top:24px;background:transparent}
.reference-ui-shell .reference-home-composer-slot{padding-top:23px}
.reference-ui-shell .compose[data-reference-surface]{
  position:relative;
  display:block;
  width:min(70vw,1180px);
  max-width:100%;
  height:auto;
  min-height:225px;
  margin:0 auto;
  padding:0;
  overflow:visible;
  border:1px solid rgba(0,0,0,.08);
  border-radius:24px;
  background:#fff;
  color:#111;
  box-shadow:0 12px 44px rgba(0,0,0,.12),0 1px 0 rgba(255,255,255,.9) inset;
}
/* Legacy users may still have the removed left-sidebar collapse preference.
   A composer mounted in a reference page slot is an essential action surface
   and must remain visible regardless of that obsolete workspace class. */
.reference-ui-shell .workspace.create-sidebar-collapsed .compose[data-reference-surface]{visibility:visible!important;opacity:1!important;pointer-events:auto!important;transform:none!important}
.reference-ui-shell .compose[data-reference-surface="home"]{width:100%}
.reference-ui-shell .compose[data-reference-surface]::after{display:none}
.reference-ui-shell .compose[data-reference-surface] .compose-scroll{height:100%;padding:0;overflow:visible}
.reference-ui-shell .compose[data-reference-surface] .panel-title{display:none}
.reference-ui-shell .compose[data-reference-surface] .seg{
  position:absolute;
  z-index:4;
  top:61px;
  left:16px;
  display:flex;
  width:auto;
  margin:0;
  padding:2px;
  gap:2px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  background:rgba(0,0,0,.04);
}
.reference-ui-shell .compose[data-reference-surface] .seg button{height:29px;padding:0 11px;border:0;border-radius:7px;background:transparent;color:#666;font-size:11.5px;box-shadow:none}
.reference-ui-shell .compose[data-reference-surface] .seg button svg{width:12px;height:12px}
.reference-ui-shell .compose[data-reference-surface] .seg button.active{background:var(--ref-primary);color:#fff;font-weight:600;box-shadow:none}
.reference-ui-shell .compose[data-reference-surface] #generationForm{display:flow-root;height:auto;min-height:223px}
.reference-ui-shell .compose[data-reference-surface] #assetField{
  position:absolute;
  z-index:3;
  top:-33px;
  left:2px;
  right:2px;
  height:66px;
  margin:0;
  overflow:visible;
}
.reference-ui-shell .compose[data-reference-surface] #assetField .upload-head{display:none}
.reference-ui-shell .compose[data-reference-surface] #assetGrid{
  display:flex;
  align-items:center;
  width:100%;
  height:66px;
  min-width:0;
  gap:8px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:1px 2px;
  scrollbar-width:thin;
}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile{
  flex:0 0 64px;
  width:64px;
  height:64px;
  min-height:64px;
  padding:3px;
  display:block;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  background:#f6f8fc;
  color:#666;
  box-shadow:0 3px 10px rgba(0,0,0,.06);
}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile .asset-media{width:100%;height:100%;aspect-ratio:1;border-radius:9px;background:#edf1f8}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-copy{
  position:absolute;z-index:3;left:5px;right:5px;top:5px;display:flex;max-height:18px;padding:0;overflow:visible;pointer-events:none
}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-copy-badges{width:auto;max-width:100%;min-height:16px;padding:1px 2px;border-radius:5px;background:rgba(5,10,18,.76);backdrop-filter:blur(5px)}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-kind{height:14px;padding:0 3px;font-size:7px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-name,
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-slot-name,
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-upload-time{display:none}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-duration{position:absolute;right:0;top:0;display:block!important;width:auto;max-width:34px;padding:2px 3px;border-radius:4px;background:rgba(5,10,18,.78);color:#fff;font-size:7px!important}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-tile-footer{
  position:absolute;z-index:5;left:4px;right:4px;bottom:4px;display:flex;height:23px;min-width:0;gap:2px;padding:1px;border-radius:6px;background:rgba(5,10,18,.78);backdrop-filter:blur(5px)
}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-usage-select,
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-usage-label{height:20px;min-width:0;padding-left:3px;padding-right:12px;font-size:7px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-tile-actions{gap:2px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-mention,
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .remove{width:20px;height:20px;border-radius:4px;font-size:10px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-bound-relation{
  position:absolute;z-index:4;left:4px;right:4px;top:24px;display:flex;height:17px;min-width:0;padding:2px 3px;overflow:hidden;border:0;border-radius:4px;background:rgba(7,93,77,.82);color:#d8fff6;font-size:0;pointer-events:none
}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-bound-relation::before{content:"🔊";flex:0 0 auto;margin-right:2px;font-size:8px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-bound-relation strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#eafff9;font-size:7px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile:not(.asset-add) .asset-bound-relation span{display:none}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio{flex:0 0 360px;width:360px;max-width:calc(100vw - 56px);display:block}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-media{position:absolute;left:3px;top:3px;width:56px;height:56px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-copy{left:63px;right:auto;width:86px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-copy-badges{max-width:86px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-audio-player{position:absolute;z-index:6;left:154px;bottom:4px;display:block;width:150px;min-width:150px;height:30px;margin:0}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-tile-footer{left:63px;right:4px;background:transparent;backdrop-filter:none;pointer-events:none}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-tile-footer>*{pointer-events:auto}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-usage-select,
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-usage-label{flex:0 0 86px;background:rgba(5,10,18,.82)}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-tile-actions{margin-left:auto;padding:1px;border-radius:5px;background:rgba(5,10,18,.82)}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-tile.asset-tile-audio .asset-bound-relation{left:154px;right:56px;top:5px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-add{padding:0;border:1.5px dashed rgba(0,0,0,.16);background:#f7f8fc;overflow:visible}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-add .asset-add-primary{width:64px;height:64px;min-height:64px;padding:0;color:#888;border-radius:12px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-add .asset-add-primary strong{font-size:26px;line-height:1}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-add .asset-add-primary span{font-size:0}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-add .asset-add-primary span::after{content:"本地";font-size:9px}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-add .asset-add-actions{position:absolute;left:71px;top:0;width:64px;height:64px;margin:0}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-add .asset-add-option{width:64px;height:64px;padding:4px;border:1.5px dashed rgba(46,107,255,.28);border-radius:12px;background:#f4f7ff;color:var(--ref-primary);font-size:10px;white-space:normal}
.reference-ui-shell .compose[data-reference-surface] #assetGrid>.asset-add{margin-right:71px}
.reference-ui-shell .compose[data-reference-surface] #promptEditorField{
  position:relative;
  z-index:2;
  top:auto;
  left:auto;
  right:auto;
  bottom:auto;
  margin:90px 16px 58px;
}
.reference-ui-shell .compose[data-reference-surface] #promptEditorField .prompt-head{display:none}
.reference-ui-shell .compose[data-reference-surface] .prompt-wrap{height:auto}
.reference-ui-shell .compose[data-reference-surface] #prompt{
  width:100%;
  height:75px;
  min-height:64px;
  max-height:min(58vh,620px);
  padding:9px 11px;
  border:0;
  border-radius:12px;
  background:#fff;
  color:#111;
  font-size:13px;
  line-height:1.55;
  resize:none;
  box-shadow:none;
}
.reference-ui-shell .compose[data-reference-surface] #prompt::placeholder{color:#9ca3af}
.reference-ui-shell .compose[data-reference-surface] .prompt-resize-handle{display:grid;color:#a5adbb}
.reference-ui-shell .compose[data-reference-surface] .prompt-resize-handle:hover,
.reference-ui-shell .compose[data-reference-surface] .prompt-resize-handle:focus-visible,
.reference-ui-shell .compose[data-reference-surface] .prompt-resize-handle[aria-grabbed="true"]{color:var(--ref-primary)}
.reference-ui-shell .workspace.prompt-editor-expanded .compose[data-reference-surface] #prompt{min-height:clamp(300px,46vh,520px)!important}
.reference-ui-shell .compose[data-reference-surface] .mention-menu{top:calc(100% + 8px);border:1px solid rgba(0,0,0,.1);background:#fff;color:#222;box-shadow:0 18px 46px rgba(0,0,0,.18)}
.reference-ui-shell .compose[data-reference-surface] .mention-option{background:#f7f8fc;border-color:rgba(0,0,0,.08);color:#222}
.reference-ui-shell .reference-composer-controls{
  position:absolute;
  z-index:4;
  left:16px;
  right:154px;
  bottom:13px;
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
}
.reference-ui-shell .reference-composer-controls::-webkit-scrollbar{display:none}
.reference-ui-shell .reference-summary-chip{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:5px;
  height:31px;
  max-width:220px;
  padding:0 11px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:18px;
  background:#f7f8fc;
  color:#333;
  font-size:11.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.reference-ui-shell .reference-summary-chip.model{font-weight:600}
.reference-ui-shell .reference-status-dot{width:7px;height:7px;flex:0 0 auto;border-radius:50%;background:#5ab88a;box-shadow:0 0 0 3px rgba(90,184,138,.12)}
.reference-ui-shell .compose-footer{
  position:absolute;
  z-index:5;
  right:16px;
  bottom:12px;
  width:128px;
  padding:0;
  border:0;
  background:transparent;
}
.reference-ui-shell .compose-footer .cost-breakdown{display:none}
.reference-ui-shell .compose-footer .generate{
  width:128px;
  height:36px;
  min-height:36px;
  margin:0;
  padding:0 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:0;
  border-radius:20px;
  background:linear-gradient(135deg,var(--ref-orange),var(--ref-orange-2));
  color:#fff;
  font-size:12.5px;
  font-weight:600;
  box-shadow:0 6px 18px rgba(255,122,47,.3);
}
.reference-ui-shell .compose-footer .generate:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(255,122,47,.42)}
.reference-ui-shell .compose-footer .kbd{display:none}
.reference-ui-shell .compose-footer #genMsg{position:absolute;right:0;bottom:-28px;width:320px;color:var(--ref-sub);text-align:right}
.reference-ui-shell .reference-composer-settings{
  position:fixed;
  z-index:240;
  left:10px;
  right:auto;
  top:10px;
  bottom:auto;
  width:min(640px,calc(100vw - 20px));
  max-width:calc(100vw - 20px);
  max-height:calc(100vh - 20px);
  min-height:0;
  display:flex;
  flex-direction:column;
  transform:none;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.1);
  border-radius:15px;
  background:#fff;
  color:#111;
  box-shadow:0 16px 44px rgba(25,35,58,.22),0 2px 8px rgba(25,35,58,.1);
}
.reference-ui-shell .reference-composer-settings[hidden]{display:none}
.reference-ui-shell .reference-composer-settings::after{
  content:"";
  position:absolute;
  left:var(--reference-popover-arrow-left,28px);
  width:12px;
  height:12px;
  border:inherit;
  background:#fff;
  transform:rotate(45deg);
  pointer-events:none;
}
.reference-ui-shell .reference-composer-settings[data-placement="top"]::after{bottom:-7px;border-left:0;border-top:0}
.reference-ui-shell .reference-composer-settings[data-placement="bottom"]::after{top:-7px;border-right:0;border-bottom:0}
.reference-ui-shell .reference-composer-settings .model-menu{
  position:static;
  width:100%;
  max-height:min(300px,var(--reference-popover-menu-max-height,240px));
  margin-top:6px;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.reference-ui-shell .reference-composer-settings>header{position:relative;z-index:1;min-height:50px;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 14px;border-bottom:1px solid rgba(0,0,0,.08);background:#fff}
.reference-ui-shell .reference-composer-settings>header div{display:grid;gap:2px}
.reference-ui-shell .reference-composer-settings>header strong{font-size:14px}.reference-ui-shell .reference-composer-settings>header span{color:#777;font-size:11px}
.reference-ui-shell .reference-composer-settings>header button{width:30px;height:30px;border-radius:9px;background:#f5f6fa;color:#555;font-size:19px}
.reference-ui-shell .reference-composer-settings-body{flex:1;min-height:0;overflow:hidden;padding:0;background:#fff}
.reference-ui-shell .reference-composer-settings-section{height:100%;max-height:100%;overflow:auto;overscroll-behavior:contain;padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:10px 12px}
.reference-ui-shell .reference-composer-settings-section[hidden]{display:none!important}
.reference-ui-shell .reference-composer-settings-section[data-section="model"],.reference-ui-shell .reference-composer-settings-section[data-section="project"]{grid-template-columns:1fr}
.reference-ui-shell .reference-composer-settings-section[data-section="model"]{overflow:hidden}
.reference-ui-shell .reference-composer-settings-section>.field,.reference-ui-shell .reference-composer-settings-section>.audio-panel{margin:0;padding:12px;border:1px solid rgba(0,0,0,.08);border-radius:12px;background:#f8f9fc;color:#222}
.reference-ui-shell .reference-composer-settings-body input,
.reference-ui-shell .reference-composer-settings-body textarea,
.reference-ui-shell .reference-composer-settings-body select,
.reference-ui-shell .reference-composer-settings-body button{color:#222}
.reference-ui-shell .reference-composer-settings-body input,
.reference-ui-shell .reference-composer-settings-body textarea,
.reference-ui-shell .reference-composer-settings-body select{border-color:rgba(0,0,0,.12);background:#fff}
.reference-ui-shell .reference-composer-settings-section #videoParamGrid,
.reference-ui-shell .reference-composer-settings-section #audioParamPanel,
.reference-ui-shell .reference-composer-settings-section #chanjingDigitalHumanPanel{grid-column:1/-1}
.reference-ui-shell .reference-composer-settings-section #videoParamGrid{margin:0;padding:12px;border:1px solid rgba(0,0,0,.08);border-radius:12px;background:#f8f9fc}
.reference-ui-shell .reference-composer-settings-section #imageRatioField{margin:0;padding:12px;border:1px solid rgba(0,0,0,.08);border-radius:12px;background:#f8f9fc}
.reference-ui-shell .reference-composer-settings-body .field-head,.reference-ui-shell .reference-composer-settings-body label{color:#555}

/* Home: start -> recent projects -> four gateways -> inspiration. */
.reference-ui-shell #view-home{padding:26px 20px 40px}
.reference-ui-shell .home-dashboard{width:100%;min-height:100%}
.reference-ui-shell .reference-home{width:min(1560px,100%);margin:0 auto;display:grid;gap:30px;padding:22px 0 40px}
/* On a wide monitor keep the reference UI readable instead of leaving most
   of the canvas empty. The cap preserves comfortable line lengths while the
   fluid term also behaves correctly when browser zoom changes the CSS width. */
@media(min-width:1600px){.reference-ui-shell .reference-home{width:min(2200px,calc(100% - 48px))}}
.reference-ui-shell .reference-home section{min-width:0}
.reference-ui-shell .reference-home-start{margin-bottom:7px}
.reference-ui-shell .reference-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:11px}
.reference-ui-shell .reference-home-inspiration .reference-section-head{margin-bottom:13px}
.reference-ui-shell .reference-section-head h1{font-size:22px;line-height:24px}.reference-ui-shell .reference-section-head h2{font-size:17px;line-height:20px}
.reference-ui-shell .reference-section-head button{color:var(--ref-blue);font-size:12px}
.reference-ui-shell .reference-recent-projects{display:grid;grid-auto-flow:column;grid-auto-columns:clamp(250px,28vw,390px);grid-template-rows:1fr;gap:12px;width:100%;max-width:100%;padding:2px 2px 10px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scrollbar-width:thin;cursor:grab;touch-action:pan-x pan-y}
.reference-ui-shell .reference-recent-projects.dragging{cursor:grabbing;scroll-snap-type:none}
.reference-ui-shell .reference-recent-project{min-width:0;min-height:84px;padding:10px;display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:11px;border:1px solid var(--ref-border);border-radius:14px;background:linear-gradient(180deg,var(--ref-surface),var(--ref-bg-2));color:var(--ref-text);text-align:left;box-shadow:var(--ref-shadow);scroll-snap-align:start;user-select:none}
.reference-ui-shell .reference-recent-project:hover{border-color:rgba(46,107,255,.42);transform:translateY(-1px)}
.reference-ui-shell .reference-project-preview{width:58px;height:48px;display:grid;place-items:center;border-radius:10px;color:#fff;font-size:14px;background:linear-gradient(135deg,#2e6bff,#38a0ff)}
.reference-ui-shell .reference-project-preview.tone-2{background:linear-gradient(135deg,#8b5cf6,#d47fae)}
.reference-ui-shell .reference-project-preview.tone-3{background:linear-gradient(135deg,#0e93a6,#5fbdbA)}
.reference-ui-shell .reference-project-preview.tone-4{background:linear-gradient(135deg,#d97706,#ff9350)}
.reference-ui-shell .reference-recent-project span:nth-child(2){min-width:0;display:grid;gap:5px}
.reference-ui-shell .reference-recent-project strong,.reference-ui-shell .reference-recent-project small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reference-ui-shell .reference-recent-project strong{font-size:13px}.reference-ui-shell .reference-recent-project small{color:var(--ref-muted);font-size:10.5px}.reference-ui-shell .reference-recent-project>b{color:var(--ref-primary)}
.reference-ui-shell .reference-home-entries{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.reference-ui-shell .reference-home-entry{position:relative;min-height:86px;padding:14px 18px;display:grid;grid-template-columns:48px minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;gap:2px 14px;border:1px solid var(--ref-border);border-radius:18px;background:linear-gradient(180deg,var(--ref-surface),var(--ref-bg-2));color:var(--ref-text);text-align:left;overflow:hidden;box-shadow:var(--ref-shadow)}
.reference-ui-shell .reference-home-entry:hover{border-color:rgba(46,107,255,.5);transform:translateY(-3px);box-shadow:0 18px 44px rgba(0,0,0,.42)}
.reference-ui-shell .reference-home-entry>span{grid-row:1/3;width:48px;height:48px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(135deg,#2e6bff,#38a0ff);color:#fff;font-size:17px}
.reference-ui-shell .reference-home-entry.tone-2>span{background:linear-gradient(135deg,#8b5cf6,#c084fc)}
.reference-ui-shell .reference-home-entry.tone-3>span{background:linear-gradient(135deg,#0e93a6,#5fbdbA)}
.reference-ui-shell .reference-home-entry.tone-4>span{background:linear-gradient(135deg,#e55a1a,#ff9350)}
.reference-ui-shell .reference-home-entry strong{align-self:end;font-size:16px}.reference-ui-shell .reference-home-entry small{align-self:start;color:var(--ref-muted);font-size:11px;line-height:1.45}.reference-ui-shell .reference-home-entry b{grid-column:3;grid-row:1/3;color:var(--ref-primary);font-size:12px;white-space:nowrap}
.reference-ui-shell .reference-inspiration-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.reference-ui-shell .reference-home-showcase{display:grid;gap:13px}
.reference-ui-shell .reference-home-showcase .reference-section-head{align-items:flex-end;margin-bottom:0}
.reference-ui-shell .reference-home-showcase .reference-section-head p{max-width:720px;margin:5px 0 0;color:var(--ref-muted);font-size:11.5px;line-height:1.55}
.reference-ui-shell .reference-home-inspire-toolbar{margin:0}
.reference-ui-shell .reference-home-inspiration-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:18px}
.reference-ui-shell .reference-home-showcase .inspire-card{min-width:0;border-radius:16px}
.reference-ui-shell .reference-home-showcase .inspire-media{width:100%;aspect-ratio:16/9;min-height:220px;background:linear-gradient(145deg,#0c1422,#18233a)}
.reference-ui-shell .reference-home-showcase .inspire-media img,.reference-ui-shell .reference-home-showcase .inspire-media video{width:100%;height:100%;object-fit:contain;background:#08101c}
.reference-ui-shell .reference-home-showcase .inspire-open{opacity:1;transform:none}
.reference-ui-shell .reference-home-showcase .inspire-body{padding:16px 17px}
.reference-ui-shell .reference-inspiration-card{position:relative;min-height:158px;padding:14px;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;overflow:hidden;border:1px solid var(--ref-border);border-radius:16px;background:linear-gradient(145deg,#183059,#1a2034 60%,#222b45);color:#fff;text-align:left;box-shadow:var(--ref-shadow)}
.reference-ui-shell .reference-inspiration-card.tone-2{background:linear-gradient(145deg,#4b2867,#212038 60%,#2d2949)}.reference-ui-shell .reference-inspiration-card.tone-3{background:linear-gradient(145deg,#164b51,#182537 60%,#243443)}.reference-ui-shell .reference-inspiration-card.tone-4{background:linear-gradient(145deg,#5a3524,#282235 60%,#3b2e3d)}
.reference-ui-shell .reference-inspiration-card:hover{transform:translateY(-2px);border-color:rgba(46,107,255,.5)}
.reference-ui-shell .reference-inspiration-type{position:absolute;left:10px;top:10px;padding:3px 8px;border-radius:6px;background:rgba(0,0,0,.42);font-size:10px}
.reference-ui-shell .reference-inspiration-play{position:absolute;left:50%;top:48%;width:38px;height:38px;transform:translate(-50%,-50%);display:grid;place-items:center;border-radius:50%;background:rgba(0,0,0,.45);font-size:12px}
.reference-ui-shell .reference-inspiration-card strong{max-width:100%;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reference-ui-shell .reference-inspiration-card small{color:rgba(255,255,255,.62);font-size:10px}
.reference-ui-shell .reference-empty{grid-column:1/-1;padding:28px;border:1px dashed var(--ref-border-2);border-radius:14px;color:var(--ref-muted);text-align:center}

/* Home activity is operational, not decorative: live tasks and completed
   outputs remain visible after the reference-layout migration. */
.reference-ui-shell .reference-home-activity{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:14px}
.reference-ui-shell .reference-home-activity-panel{min-width:0;padding:14px;border:1px solid var(--ref-border);border-radius:16px;background:linear-gradient(180deg,var(--ref-surface),var(--ref-bg-2));box-shadow:var(--ref-shadow)}
.reference-ui-shell .reference-home-activity-panel .reference-section-head{align-items:flex-start;margin-bottom:10px}
.reference-ui-shell .reference-home-activity-panel .reference-section-head>div{min-width:0}.reference-ui-shell .reference-home-activity-panel .reference-section-head p{margin:4px 0 0;color:var(--ref-muted);font-size:10.5px}
.reference-ui-shell .reference-home-activity-panel .home-job-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.reference-ui-shell .reference-home-activity-panel .home-job-card{min-height:62px;padding:10px 11px;border-color:var(--ref-border);background:rgba(255,255,255,.025);color:var(--ref-text)}
.reference-ui-shell .reference-home-activity-panel .home-job-card strong{font-size:11.5px}.reference-ui-shell .reference-home-activity-panel .home-job-card small{font-size:9.5px;color:var(--ref-muted)}
.reference-ui-shell .reference-home-work-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.reference-ui-shell .reference-home-work-card{min-width:0;overflow:hidden;border:1px solid var(--ref-border);border-radius:11px;background:rgba(255,255,255,.025);color:var(--ref-text);text-align:left;transition:border-color .18s ease,transform .18s ease}
.reference-ui-shell .reference-home-work-card:hover{transform:translateY(-1px);border-color:rgba(46,107,255,.46)}
.reference-ui-shell .reference-home-work-media{position:relative;display:grid;place-items:center;width:100%;aspect-ratio:16/9;overflow:hidden;background:linear-gradient(145deg,#1b2941,#121a2b)}
.reference-ui-shell .reference-home-work-media img{width:100%;height:100%;display:block;object-fit:cover}.reference-ui-shell .reference-home-work-media i{position:absolute;left:6px;top:6px;padding:2px 5px;border-radius:5px;background:rgba(0,0,0,.62);color:#fff;font-size:8px;font-style:normal}
.reference-ui-shell .reference-home-work-audio{font-size:24px;color:#8eaaff}.reference-ui-shell .reference-home-work-copy{display:grid;gap:3px;min-width:0;padding:8px}.reference-ui-shell .reference-home-work-copy strong,.reference-ui-shell .reference-home-work-copy small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reference-ui-shell .reference-home-work-copy strong{font-size:10.5px}.reference-ui-shell .reference-home-work-copy small{color:var(--ref-muted);font-size:8.5px}

/* Production: keep the creation dock as a transparent overlay, not a flex
   sibling that reserves an opaque empty canvas below the work feed.  The
   actual white composer remains the only painted surface; the surrounding
   slot is click-through so work cards stay visible and usable beneath it. */
.reference-ui-shell #view-work.active{display:flex;position:relative;flex:1 1 auto;height:100%;min-height:0;flex-direction:column;padding:20px 20px 36px;overflow:hidden}
.reference-ui-shell #view-work .works-toolbar-sticky{position:relative;top:auto;z-index:10;flex:0 0 auto;width:100%;margin:0 auto 5px;padding:0 0 8px;background:transparent;box-shadow:none}
.reference-ui-shell #view-work .works-toolbar-sticky::before,.reference-ui-shell #view-work .works-toolbar-sticky::after{display:none}
.reference-ui-shell #view-work .works-head{margin:0;align-items:center}
.reference-ui-shell #view-work .works-head h2{font-size:20px}.reference-ui-shell #view-work .works-head h2::after{display:none}
.reference-ui-shell #view-work .tools{gap:7px;overflow-x:auto;scrollbar-width:none}
.reference-ui-shell #view-work .tools::-webkit-scrollbar{display:none}
.reference-ui-shell #view-work .search{width:250px;min-width:190px}.reference-ui-shell #view-work .filter{width:112px;min-width:102px}
.reference-ui-shell #view-work #jobBoard{flex:1;min-height:0;width:100%;margin:0 auto;overflow:auto;padding:0 3px 274px;scroll-padding-bottom:274px}
.reference-ui-shell #view-work .reference-work-composer-slot{position:absolute;z-index:20;left:20px;right:20px;bottom:24px;width:auto;margin:0;padding:0;background:transparent;pointer-events:none}
.reference-ui-shell #view-work .reference-work-composer-slot>.compose[data-reference-surface="work"]{width:min(70vw,1180px);pointer-events:auto}
.reference-ui-shell .queue-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.reference-ui-shell .job-row,.reference-ui-shell .work-card{border-color:var(--ref-border);border-radius:14px;background:rgba(255,255,255,.025)}
.reference-ui-shell .works-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}

/* Projects: compact 3-column card catalog, detailed workspace remains intact. */
.reference-ui-shell #view-projects.active{display:flex;position:relative;flex:1 1 auto;height:100%;min-height:0;flex-direction:column;overflow:hidden}
.reference-ui-shell #view-projects>.content-head{flex:0 0 auto}
.reference-ui-shell #view-projects>.project-manager{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.reference-ui-shell #view-projects>.content-head,.reference-ui-shell #view-projects>.project-manager{width:min(1180px,100%);margin-left:auto;margin-right:auto}
.reference-ui-shell .project-manager{min-height:0}
.reference-ui-shell #view-projects:has(> .reference-project-create)>.content-head{display:none}
.reference-ui-shell #view-projects:has(> .reference-project-create)>.project-manager{width:100%;max-width:1180px;padding-bottom:274px;scroll-padding-bottom:274px}
.reference-ui-shell #view-projects>.reference-project-create{position:absolute;z-index:20;left:20px;right:20px;bottom:24px;width:auto;margin:0;padding:0;border:0;background:transparent;box-shadow:none;pointer-events:none}
.reference-ui-shell #view-projects>.reference-project-create>.reference-project-create-head{display:none}
.reference-ui-shell #view-projects>.reference-project-create>.reference-project-composer-slot{width:100%;margin:0;padding:0;background:transparent;pointer-events:none}
.reference-ui-shell #view-projects>.reference-project-create .compose[data-reference-surface="projects"]{width:min(70vw,1180px);pointer-events:auto}
.reference-ui-shell .project-dashboard{gap:14px}
.reference-ui-shell .project-dashboard>.project-kpis{display:none}
.reference-ui-shell .project-table-panel{border:0;background:transparent;overflow:visible}
.reference-ui-shell .project-table-head{padding:0 0 14px;border:0}
.reference-ui-shell .project-table-head h3{font-size:16px}.reference-ui-shell .project-table-head p{font-size:11.5px}
.reference-ui-shell .project-dashboard .project-table{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;overflow:visible}
.reference-ui-shell .project-dashboard .project-table-header{display:none!important}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data{
  min-width:0;
  min-height:176px;
  padding:16px;
  display:grid;
  grid-template-columns:1fr auto auto;
  grid-template-rows:auto 30px 1fr auto;
  gap:8px;
  align-items:start;
  border:1px solid var(--ref-border);
  border-radius:16px;
  background:linear-gradient(180deg,var(--ref-surface),var(--ref-bg-2));
  box-shadow:var(--ref-shadow);
}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data:hover{border-color:rgba(46,107,255,.42);transform:translateY(-2px);background:linear-gradient(180deg,#18233a,var(--ref-bg-2))}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell{grid-column:1/-1;min-width:0}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell .project-name-block{padding:0}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell strong{font-size:15px}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell small{font-size:11px;line-height:1.5}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>:nth-child(2){grid-column:1}.reference-ui-shell .project-dashboard .project-table-row.project-table-data>:nth-child(3){grid-column:2}.reference-ui-shell .project-dashboard .project-table-row.project-table-data>:nth-child(4){grid-column:3}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-member-cell{grid-column:1/-1;justify-items:start;align-content:center;grid-template-columns:auto 1fr;gap:8px}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-actions-inline{grid-column:1/-1;align-self:end;justify-content:flex-start;overflow-x:auto}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-actions-inline button{height:29px}
.reference-ui-shell .project-detail-toolbar,.reference-ui-shell .project-panel-head{background:rgba(12,18,34,.94)}

/* Assets: filters and categories are both top level; eight compact cards fit at 1440px. */
.reference-ui-shell #view-assets>.content-head,
.reference-ui-shell #view-assets>.asset-library-stats,
.reference-ui-shell #view-assets>.asset-library-toolbar,
.reference-ui-shell #view-assets>.asset-library-layout{width:min(1180px,100%);margin-left:auto;margin-right:auto}
.reference-ui-shell .asset-library-stats{display:none}
.reference-ui-shell .asset-library-toolbar{position:relative;top:auto;padding:9px;margin-bottom:8px;border-color:var(--ref-border);border-radius:12px;background:rgba(20,28,46,.72)}
.reference-ui-shell .asset-library-toolbar .search{min-width:190px;height:36px}.reference-ui-shell .asset-library-toolbar .filter{height:36px;min-width:105px}
.reference-ui-shell .asset-library-layout{display:flex;flex-direction:column;gap:10px}
.reference-ui-shell .asset-library-categories{position:relative;top:auto;width:100%;display:flex;align-items:center;gap:5px;padding:4px;overflow-x:auto;border:1px solid var(--ref-border);border-radius:11px;background:rgba(20,28,46,.64);scrollbar-width:none}
.reference-ui-shell .asset-library-categories::-webkit-scrollbar{display:none}
.reference-ui-shell .asset-library-categories button{flex:0 0 auto;min-height:34px;padding:0 12px;border-radius:8px}
.reference-ui-shell .asset-library-categories button.active{background:rgba(46,107,255,.16);box-shadow:inset 0 0 0 1px rgba(46,107,255,.28);color:#d9e5ff}
.reference-ui-shell .asset-library-main{width:100%;min-width:0}
.reference-ui-shell .asset-library-result-head{margin:0 0 9px}
.reference-ui-shell .asset-library-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:10px}
.reference-ui-shell .asset-library-card{min-width:0;border-radius:12px;background:var(--ref-card);box-shadow:var(--ref-shadow)}
.reference-ui-shell .asset-library-media{aspect-ratio:1/1}.reference-ui-shell .asset-library-card-body{padding:8px}
.reference-ui-shell .asset-library-card-title strong{font-size:11.5px}.reference-ui-shell .asset-library-card-title>span{font-size:8px}
.reference-ui-shell .asset-library-card-meta,.reference-ui-shell .asset-library-status{font-size:9px}
.reference-ui-shell .asset-library-tags,.reference-ui-shell .asset-library-targets{display:none}
.reference-ui-shell .asset-library-voice-binding{display:flex;min-height:32px;gap:4px;margin-top:5px;padding:4px 5px;overflow:hidden;border-radius:7px;font-size:8px}
.reference-ui-shell .asset-library-voice-binding>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reference-ui-shell .asset-library-voice-binding>button{flex:0 0 auto;height:22px;padding:0 5px;font-size:8px}
.reference-ui-shell .asset-library-voice-binding.asset-bound-people{align-items:center}
.reference-ui-shell .asset-library-voice-binding .asset-bound-people-button{min-height:30px!important;padding:2px 4px!important;gap:5px}
.reference-ui-shell .asset-library-voice-binding .asset-bound-avatar{width:22px;height:22px}
.reference-ui-shell .asset-library-voice-binding .asset-bound-people-copy b{font-size:8px}
.reference-ui-shell .asset-library-voice-binding .asset-bound-people-copy small{font-size:7px}
.reference-ui-shell .asset-library-card-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 29px;gap:4px;margin-top:7px;overflow:visible}
.reference-ui-shell .asset-library-card-actions::-webkit-scrollbar{display:none}
.reference-ui-shell .asset-library-card-actions button{height:25px;padding:0 7px;font-size:9px;white-space:nowrap}
.reference-ui-shell .asset-library-drag-handle{width:30px;height:19px;top:5px}.reference-ui-shell .asset-library-select-indicator{left:6px;top:30px;width:21px;height:21px}
.reference-ui-shell .asset-type-badge,.reference-ui-shell .asset-auth-badge{top:6px;height:19px;padding:0 5px;font-size:8px}.reference-ui-shell .asset-type-badge{left:6px}.reference-ui-shell .asset-auth-badge{right:6px}

/* Tools: reference 3x2 rhythm; unavailable features remain visibly disabled. */
.reference-ui-shell #view-tools>.content-head,.reference-ui-shell .production-tool-grid{width:min(1180px,100%);margin-left:auto;margin-right:auto}
.reference-ui-shell .production-tool-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.reference-ui-shell .production-tool-card{position:relative;min-height:176px;padding:20px;display:grid;grid-template-columns:52px minmax(0,1fr);grid-template-rows:1fr auto;gap:12px 16px;border:1px solid var(--ref-border);border-radius:18px;background:linear-gradient(180deg,var(--ref-surface),var(--ref-bg-2));box-shadow:var(--ref-shadow)}
.reference-ui-shell .production-tool-card:hover{border-color:rgba(46,107,255,.46);transform:translateY(-2px)}
.reference-ui-shell .production-tool-card.disabled{opacity:.58}.reference-ui-shell .production-tool-icon{grid-row:1;width:52px;height:52px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,var(--ref-primary),var(--ref-blue));color:#fff;font-size:17px}
.reference-ui-shell .production-tool-card:nth-child(2) .production-tool-icon{background:linear-gradient(135deg,#8b5cf6,#c084fc)}.reference-ui-shell .production-tool-card:nth-child(3) .production-tool-icon{background:linear-gradient(135deg,#0e93a6,#5fbdbA)}.reference-ui-shell .production-tool-card:nth-child(4) .production-tool-icon{background:linear-gradient(135deg,#e55a1a,#ff9350)}.reference-ui-shell .production-tool-card:nth-child(5) .production-tool-icon{background:linear-gradient(135deg,#d63a87,#f472b6)}.reference-ui-shell .production-tool-card:nth-child(6) .production-tool-icon{background:linear-gradient(135deg,#1d6fe0,#7ea6e8)}
.reference-ui-shell .production-tool-status{color:var(--ref-blue);font-size:10px}.reference-ui-shell .production-tool-card h3{margin:4px 0 6px;font-size:16px}.reference-ui-shell .production-tool-card p{margin:0;color:var(--ref-muted);font-size:11.5px;line-height:1.6}
.reference-ui-shell .production-tool-card>button{grid-column:2;justify-self:start;height:31px;padding:0 14px;border:1px solid rgba(46,107,255,.3);border-radius:9px;background:rgba(46,107,255,.12);color:#bad2ff;font-size:11.5px}

/* Help center: five quick steps can wrap without losing hierarchy. */
.reference-ui-shell #view-help>.content-head,.reference-ui-shell #view-help>.help-hero,.reference-ui-shell #view-help>.help-steps,.reference-ui-shell #view-help>.help-troubleshoot{width:min(1180px,100%);margin-left:auto;margin-right:auto}
.reference-ui-shell .help-hero{min-height:190px;padding:22px;border:1px solid var(--ref-border);border-radius:18px;background:linear-gradient(110deg,rgba(24,48,89,.72),rgba(20,28,46,.88));box-shadow:var(--ref-shadow)}
.reference-ui-shell .help-hero-visual{border-color:var(--ref-border)}
.reference-ui-shell .help-steps{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:16px}
.reference-ui-shell .help-step{min-height:132px;padding:15px;border:1px solid var(--ref-border);border-radius:14px;background:var(--ref-card);box-shadow:var(--ref-shadow)}
.reference-ui-shell .help-step>span{display:inline-grid;place-items:center;width:28px;height:28px;margin-bottom:10px;border-radius:8px;background:rgba(46,107,255,.14);color:var(--ref-blue);font-size:10px;font-weight:800}
.reference-ui-shell .help-step b{font-size:13px}.reference-ui-shell .help-step p{color:var(--ref-muted);font-size:11px;line-height:1.6}
.reference-ui-shell .help-troubleshoot{margin-top:18px;padding:18px;border:1px solid var(--ref-border);border-radius:16px;background:var(--ref-surface)}

/* Secondary real pages retain their own feature CSS, only share page width. */
.reference-ui-shell #view-inspire>.content-head,.reference-ui-shell #view-inspire>.inspire-toolbar,.reference-ui-shell #view-inspire>.content-grid,
.reference-ui-shell #view-models>.content-head,.reference-ui-shell #view-models>.model-compare{width:min(1180px,100%);margin-left:auto;margin-right:auto}
.reference-ui-shell #view-chat.active,.reference-ui-shell #view-agent-team.active{padding:0;overflow:hidden}
.reference-ui-shell #view-agent-team .agent-team-root{height:100%}

/* Text conversations are part of Production, not a replacement for it. Keep
   the live conversation and the real task/result feed visible together so a
   user never loses sight of generating or completed work after choosing
   “对话”. No job markup or action is duplicated; both panels reuse the
   existing conversation and work views. */
.reference-ui-shell .works.text-workspace{
  display:grid;
  grid-template-columns:minmax(420px,.92fr) minmax(520px,1.08fr);
  gap:0;
}
.reference-ui-shell .works.text-workspace>#view-chat.active,
.reference-ui-shell .works.text-workspace>#view-work.active{
  position:relative;
  inset:auto;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
}
.reference-ui-shell .works.text-workspace>#view-chat.active{
  grid-column:1;
  grid-row:1;
  border-right:1px solid var(--ref-border);
  background:var(--ref-bg);
}
.reference-ui-shell .works.text-workspace>#view-work.active{
  grid-column:2;
  grid-row:1;
  padding:16px 16px 24px;
}
.reference-ui-shell .works.text-workspace #view-work .works-head h2::after{
  content:" · 对话期间仍实时更新";
  color:var(--ref-muted);
  font-size:11px;
  font-weight:500;
}
.reference-ui-shell .works.text-workspace #view-work .tools{
  flex-wrap:wrap;
}
.reference-ui-shell .works.text-workspace #view-work .search{
  width:100%;
  flex:1 1 180px;
}
.reference-ui-shell .works.text-workspace #view-work .filter{
  flex:1 1 104px;
}

@media(max-width:980px){
  .reference-ui-shell .works.text-workspace{
    grid-template-columns:1fr;
    grid-template-rows:minmax(0,1fr) minmax(0,1fr);
  }
  .reference-ui-shell .works.text-workspace>#view-chat.active{
    grid-column:1;
    grid-row:1;
    border-right:0;
    border-bottom:1px solid var(--ref-border);
  }
  .reference-ui-shell .works.text-workspace>#view-work.active{
    grid-column:1;
    grid-row:2;
  }
}

/* Drawers, menus and dialogs stay above the new shell. */
.reference-ui-shell .drawer{z-index:160}.reference-ui-shell .drawer-backdrop{z-index:150}
.reference-ui-shell .drawer[aria-hidden="true"]{visibility:hidden;pointer-events:none}
.reference-ui-shell .drawer[aria-hidden="false"]{visibility:visible;pointer-events:auto}
.reference-ui-shell .lightbox{z-index:210}.reference-ui-shell .toast{z-index:220}
.reference-ui-shell .topbar-popover{z-index:180}

/* Light mode is a supported surface, not a different information model. */
html[data-zq-theme="light"]{
  --ref-bg:#eef2f8;--ref-bg-2:#f6f8fc;--ref-surface:#fff;--ref-surface-2:#f4f6fb;--ref-surface-3:#eaeff7;--ref-card:#fff;
  --ref-border:rgba(15,27,58,.09);--ref-border-2:rgba(15,27,58,.15);--ref-text:#18213a;--ref-sub:#525d75;--ref-muted:#98a1b5;
}
html[data-zq-theme="light"] body.reference-ui-shell{background:var(--ref-bg);color:var(--ref-text)}
html[data-zq-theme="light"] .reference-ui-shell .topbar{background:rgba(255,255,255,.82)}
html[data-zq-theme="light"] .reference-ui-shell .nav button:hover{background:rgba(15,27,58,.05)}
html[data-zq-theme="light"] .reference-ui-shell .nav button.active{color:#1f55e0;background:rgba(46,107,255,.1);box-shadow:none}
html[data-zq-theme="light"] .reference-ui-shell .project-detail-toolbar,
html[data-zq-theme="light"] .reference-ui-shell .project-panel-head{background:rgba(255,255,255,.94)}

/* Responsive safety: desktop remains exact; smaller widths never overflow. */
@media(max-width:1180px){
  .reference-ui-shell .topbar{height:60px;min-height:60px;padding:0 12px;gap:10px;flex-wrap:nowrap}
  .reference-ui-shell .brand{min-width:auto}.reference-ui-shell .brand-copy{font-size:13px}.reference-ui-shell .brand-copy small{display:none}
  .reference-ui-shell .nav{order:0;width:auto;margin:0;overflow-x:auto;overflow-y:hidden}
  .reference-ui-shell .nav button{padding:0 10px;font-size:12px}
  .reference-ui-shell .userbar{width:auto;max-width:none;margin-left:auto;overflow:visible}
  .reference-ui-shell .app-version-badge,.reference-ui-shell .recharge{display:none}
  .reference-ui-shell .compose[data-reference-surface]{width:100%}
  .reference-ui-shell .reference-home-entries,.reference-ui-shell .reference-inspiration-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .reference-ui-shell .project-dashboard .project-table{grid-template-columns:repeat(2,minmax(0,1fr))}
  .reference-ui-shell .production-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .reference-ui-shell .help-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
  .reference-ui-shell .asset-library-grid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr))}
}
@media(max-width:900px){
  .reference-ui-shell .brand-copy{display:none}.reference-ui-shell .brand{min-width:34px}.reference-ui-shell .quota-box{display:none}
  .reference-ui-shell .right-view{padding:16px}
  .reference-ui-shell .reference-home-activity{grid-template-columns:1fr}
  .reference-ui-shell .reference-composer-settings-section{grid-template-columns:1fr}
  .reference-ui-shell .reference-composer-settings-section>*{grid-column:1!important}
  .reference-ui-shell #view-work .works-head{align-items:flex-start;flex-direction:column}.reference-ui-shell #view-work .tools{width:100%}
  .reference-ui-shell .queue-grid{grid-template-columns:1fr}
  .reference-ui-shell .help-hero{grid-template-columns:1fr}.reference-ui-shell .help-hero-visual{border-right:0;border-bottom:1px solid var(--ref-border)}
  /* Keep the secondary asset filters in the toolbar's own flow.  An
     absolutely positioned panel anchored to a shrinking flex item can cross
     the left edge at 125–150% browser zoom; a full-width row is both visible
     and keyboard reachable at that effective viewport size. */
  .reference-ui-shell .asset-library-filter-more{flex:1 1 100%;min-width:0}
  .reference-ui-shell .asset-library-filter-more>summary{width:100%;justify-content:space-between}
  .reference-ui-shell .asset-library-filter-more[open]>div{position:static;display:grid;width:100%;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:7px;padding:8px}
  .reference-ui-shell .asset-library-filter-more[open]>div select{width:100%;min-width:0}
}
@media(max-width:700px){
  body.reference-ui-shell{overflow:hidden}
  .reference-ui-shell .topbar{height:54px;min-height:54px;padding:0 8px;gap:6px}
  .reference-ui-shell .brand-mark{width:32px;height:32px}.reference-ui-shell .nav{gap:1px}.reference-ui-shell .nav button{height:32px;padding:0 8px;font-size:11.5px}
  .reference-ui-shell .admin-switch,.reference-ui-shell .app-theme-toggle{display:none}.reference-ui-shell .userbar{gap:4px}
  .reference-ui-shell .workspace{height:calc(100vh - 54px)}
  .reference-ui-shell .right-view{padding:12px}
  .reference-ui-shell #view-home{padding:0 12px 24px}.reference-ui-shell .reference-home{gap:18px;padding-top:14px}
  .reference-ui-shell .reference-home-entries,.reference-ui-shell .reference-inspiration-grid:not(.reference-home-inspiration-grid),.reference-ui-shell .project-dashboard .project-table,.reference-ui-shell .production-tool-grid{grid-template-columns:1fr}
  .reference-ui-shell .reference-recent-projects{grid-auto-columns:min(82vw,340px)}
  .reference-ui-shell .reference-home-inspiration-grid{grid-template-columns:1fr}
  .reference-ui-shell .reference-home-showcase .inspire-media{min-height:190px}
  .reference-ui-shell .reference-home-activity-panel .home-job-list{grid-template-columns:1fr}.reference-ui-shell .reference-home-work-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .reference-ui-shell .reference-home-entry{min-height:94px}
  .reference-ui-shell .compose[data-reference-surface]{height:218px;min-height:218px;border-radius:18px}
  .reference-ui-shell #view-work #jobBoard{padding-bottom:244px;scroll-padding-bottom:244px}
  .reference-ui-shell #view-work .reference-work-composer-slot{left:12px;right:12px;bottom:12px}
  .reference-ui-shell #view-projects:has(> .reference-project-create)>.project-manager{padding-bottom:244px;scroll-padding-bottom:244px}
  .reference-ui-shell #view-projects>.reference-project-create{left:12px;right:12px;bottom:12px}
  .reference-ui-shell .compose[data-reference-surface] .seg button{padding:0 7px;font-size:10.5px}.reference-ui-shell .compose[data-reference-surface] .seg button svg{display:none}
  .reference-ui-shell .reference-composer-controls{right:112px;gap:5px}.reference-ui-shell .reference-summary-chip{max-width:142px;height:29px;padding:0 8px;font-size:10px}
  .reference-ui-shell .compose-footer{right:12px;width:96px}.reference-ui-shell .compose-footer .generate{width:96px;padding:0 9px;font-size:11.5px}
  .reference-ui-shell .reference-composer-settings{border-radius:13px}
  .reference-ui-shell .project-dashboard .project-table-row.project-table-data{min-height:164px}
  .reference-ui-shell .help-steps{grid-template-columns:1fr}.reference-ui-shell .help-step{min-height:auto}
  .reference-ui-shell .asset-library-saved-views{width:100%;padding-left:0;border-left:0}.reference-ui-shell .asset-library-saved-views .filter{flex:1}
  .reference-ui-shell .asset-library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:440px){
  .reference-ui-shell .topbar .brand,.reference-ui-shell .topbar .notification-trigger{display:none}.reference-ui-shell .nav button{padding:0 7px;font-size:11px}
  .reference-ui-shell .reference-home-entry b{display:none}
  .reference-ui-shell .reference-summary-chip:nth-child(3){display:none}
  .reference-ui-shell .asset-library-grid{grid-template-columns:1fr 1fr}
  .reference-ui-shell .asset-library-toolbar>*{min-width:100%!important;width:100%!important}
  .reference-ui-shell .loginbox{width:calc(100vw - 28px);padding:34px 24px}
}

@media(prefers-reduced-motion:reduce){
  .reference-ui-shell *, .reference-ui-shell *::before,.reference-ui-shell *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* Unified directory canvas
   ------------------------
   The asset library's 1180px content column is the canonical visual width.
   Keep the full-page background and navigation fluid, while aligning the
   actual page content, work feed and creation dock to that same column. */
.reference-ui-shell .reference-home,
.reference-ui-shell #view-work .works-toolbar-sticky,
.reference-ui-shell #view-work #jobBoard,
.reference-ui-shell #view-work .reference-work-composer-slot>.compose[data-reference-surface],
.reference-ui-shell #view-projects>.reference-project-create .compose[data-reference-surface]{
  width:min(var(--ref-directory-width),100%);
  margin-left:auto;
  margin-right:auto;
}

/* The production/project dock is positioned against the full page so that it
   remains fixed, but its painted surface follows the same content edges. */
.reference-ui-shell #view-work .reference-work-composer-slot>.compose[data-reference-surface],
.reference-ui-shell #view-projects>.reference-project-create .compose[data-reference-surface]{
  max-width:100%;
}

/* At the responsive breakpoint the asset page switches its right-view gutter
   to 16px; match that gutter on home and production instead of leaving a
   two-to-eight-pixel width drift between directories.  The asset page keeps
   its 20px gutter from 901px through 1180px, so use the same breakpoint. */
@media(max-width:900px){
  .reference-ui-shell #view-home{padding-left:16px;padding-right:16px}
  .reference-ui-shell #view-work.active{padding-left:16px;padding-right:16px}
  .reference-ui-shell #view-work .reference-work-composer-slot{left:16px;right:16px}
  .reference-ui-shell #view-projects>.reference-project-create{left:16px;right:16px}
}
@media(max-width:700px){
  .reference-ui-shell #view-home{padding-left:12px;padding-right:12px}
  .reference-ui-shell #view-work.active{padding-left:12px;padding-right:12px}
  .reference-ui-shell #view-work .reference-work-composer-slot{left:12px;right:12px}
  .reference-ui-shell #view-projects>.reference-project-create{left:12px;right:12px}
}

/* Task presentation is a user preference, not a second task workflow.  Both
   modes keep the same cards, actions and filters and only change composition. */
.reference-ui-shell .job-view-switch{flex:0 0 auto;height:34px;display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid var(--ref-border);border-radius:10px;background:var(--ref-bg-2)}
.reference-ui-shell .job-view-switch button{height:26px;min-width:58px;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;gap:5px;border:0;border-radius:7px;background:transparent;color:var(--ref-muted);font-size:10.5px;box-shadow:none}
.reference-ui-shell .job-view-switch button:hover{color:var(--ref-text);background:rgba(46,107,255,.08)}
.reference-ui-shell .job-view-switch button.active,.reference-ui-shell .job-view-switch button[aria-pressed="true"]{background:var(--ref-surface);color:var(--ref-primary);box-shadow:0 2px 9px rgba(0,0,0,.14)}
.reference-ui-shell #jobBoard[data-view-mode="list"] .queue-grid{grid-template-columns:1fr;gap:9px}
.reference-ui-shell #jobBoard[data-view-mode="list"] .section,.reference-ui-shell #jobBoard[data-view-mode="grid"] .section{margin-top:0}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row,.reference-ui-shell .project-work-grid.is-list .job-row{min-height:min(clamp(250px,24vw,340px),var(--history-media-max-height,340px));display:grid;grid-template-columns:minmax(0,1.75fr) minmax(280px,1fr);grid-template-rows:minmax(0,1fr) auto;align-items:stretch;overflow:visible}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .thumb,.reference-ui-shell .project-work-grid.is-list .job-row .thumb{position:relative;grid-column:1;grid-row:1/3;width:100%;height:min(clamp(250px,24vw,340px),var(--history-media-max-height,340px));min-height:0;aspect-ratio:auto;align-self:stretch;overflow:hidden;border-radius:13px 0 0 13px;background:#050a10}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .thumb img,.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .thumb video,.reference-ui-shell .project-work-grid.is-list .job-row .thumb img,.reference-ui-shell .project-work-grid.is-list .job-row .thumb video{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;background:#050a10}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .job-main,.reference-ui-shell .project-work-grid.is-list .job-row .job-main{grid-column:2;grid-row:1;min-width:0;align-self:center;padding:20px 20px 14px}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .job-main h3,.reference-ui-shell .project-work-grid.is-list .job-row .job-main h3{display:-webkit-box;overflow:hidden;font-size:14px;line-height:1.65;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .job-actions,.reference-ui-shell .project-work-grid.is-list .job-row .job-actions{grid-column:2;grid-row:2;min-width:0;align-self:end;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;gap:7px;padding:11px 14px;margin:0;border-top:1px solid var(--ref-border);border-left:0}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .job-actions button,.reference-ui-shell .project-work-grid.is-list .job-row .job-actions button{width:auto;white-space:nowrap}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row>.select-hit,.reference-ui-shell .project-work-grid.is-list .job-row>.select-hit{left:9px;top:9px}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .card-menu,.reference-ui-shell .project-work-grid.is-list .job-row .card-menu{right:10px;bottom:48px;top:auto}
.reference-ui-shell .job-media-pill{position:absolute;z-index:4;top:10px;max-width:42%;padding:4px 8px;overflow:hidden;border:1px solid rgba(255,255,255,.12);border-radius:7px;background:rgba(3,8,15,.76);color:#f8fbff;font-size:9.5px;font-weight:750;line-height:1;text-overflow:ellipsis;white-space:nowrap;backdrop-filter:blur(10px)}
.reference-ui-shell .job-media-pill.type{left:10px}.reference-ui-shell .job-media-pill.model{right:10px}
.reference-ui-shell .job-parameter-chips{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:10px 0 12px}
.reference-ui-shell .job-parameter-chips span{padding:4px 8px;border:1px solid var(--ref-border);border-radius:7px;background:var(--ref-bg-2);color:var(--ref-sub);font-size:9.5px;line-height:1}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row.job-type-audio,.reference-ui-shell .project-work-grid.is-list .job-row.job-type-audio{min-height:176px}
.reference-ui-shell #jobBoard[data-view-mode="list"] .job-row.job-type-audio .thumb,.reference-ui-shell .project-work-grid.is-list .job-row.job-type-audio .thumb{height:176px;background:linear-gradient(135deg,#111a2c,#08111e)}
.reference-ui-shell #jobBoard[data-view-mode="grid"] .works-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}
.reference-ui-shell .project-work-grid.is-list{display:grid;grid-template-columns:1fr;gap:9px}
.reference-ui-shell .project-work-grid.is-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.reference-ui-shell .work-card[class*="status-"]{border-color:var(--ref-border)}
.reference-ui-shell .work-card.status-running,.reference-ui-shell .work-card.status-submitted,.reference-ui-shell .work-card.status-downloading{border-color:rgba(46,107,255,.32)}
.reference-ui-shell .work-card.status-failed,.reference-ui-shell .work-card.status-awaiting_confirmation{border-color:rgba(239,68,68,.3)}
.reference-ui-shell .work-status.queued,.reference-ui-shell .work-status.running,.reference-ui-shell .work-status.submitted,.reference-ui-shell .work-status.downloading{color:var(--ref-primary)}
.reference-ui-shell .work-status.queued i,.reference-ui-shell .work-status.running i,.reference-ui-shell .work-status.submitted i,.reference-ui-shell .work-status.downloading i{background:var(--ref-primary);box-shadow:0 0 5px rgba(46,107,255,.55)}
.reference-ui-shell .work-status.failed,.reference-ui-shell .work-status.awaiting_confirmation{color:#ff7f8d}
.reference-ui-shell .work-status.failed i,.reference-ui-shell .work-status.awaiting_confirmation i{background:#ef5969;box-shadow:0 0 5px rgba(239,89,105,.5)}
.reference-ui-shell .work-status.canceled{color:var(--ref-muted)}.reference-ui-shell .work-status.canceled i{background:var(--ref-muted);box-shadow:none}
.reference-ui-shell .work-alert{margin-top:7px;padding:6px 8px;overflow:hidden;border-radius:7px;background:rgba(239,68,68,.08);color:#ef7180;font-size:9.5px;line-height:1.4;white-space:nowrap;text-overflow:ellipsis}

@media(max-width:900px){
  .reference-ui-shell #view-work .tools .job-view-switch{margin-left:auto}
}
@media(max-width:780px){
  .reference-ui-shell .job-view-switch button{min-width:48px;padding:0 7px;font-size:10px}
  .reference-ui-shell #jobBoard[data-view-mode="list"] .job-row,.reference-ui-shell .project-work-grid.is-list .job-row{grid-template-columns:1fr;grid-template-rows:auto auto auto;min-height:0}
  .reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .thumb,.reference-ui-shell .project-work-grid.is-list .job-row .thumb{grid-column:1;grid-row:1;width:100%;height:min(56.25vw,var(--history-media-max-height,340px));min-height:150px;aspect-ratio:auto;border-radius:13px 13px 0 0}
  .reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .job-main,.reference-ui-shell .project-work-grid.is-list .job-row .job-main{grid-column:1;grid-row:2;padding:12px 13px}
  .reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .job-actions,.reference-ui-shell .project-work-grid.is-list .job-row .job-actions{grid-column:1;grid-row:3;min-width:0;display:flex;flex-direction:row;justify-content:flex-end;padding:8px 10px;border-top:1px solid var(--ref-border);border-left:0}
  .reference-ui-shell #jobBoard[data-view-mode="list"] .job-row .job-actions button,.reference-ui-shell .project-work-grid.is-list .job-row .job-actions button{width:auto}
}

/* Model selection is one platform-aware choice, not a second nested dropdown. */
.reference-ui-shell #referenceComposerModelPanel #modelField{display:block!important;margin:0;padding:0;border:0;background:transparent}
.reference-ui-shell #referenceComposerModelPanel #modelField>.field-head,
.reference-ui-shell #referenceComposerModelPanel #modelSelect>.model-button{display:none!important}
.reference-ui-shell #referenceComposerModelPanel #modelSelect{width:100%}
.reference-ui-shell #referenceComposerModelPanel #modelSelect .model-menu{position:static;inset:auto;width:100%;max-height:var(--reference-popover-menu-max-height,360px);display:grid!important;grid-template-rows:auto minmax(0,1fr);padding:0;overflow:hidden;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none}
.reference-ui-shell .model-channel-tabs{display:flex;align-items:center;gap:5px;padding:2px 2px 10px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.reference-ui-shell .model-channel-tab{flex:0 0 auto;height:31px;padding:0 10px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ref-muted);font-size:10.5px;white-space:nowrap;box-shadow:none}
.reference-ui-shell .model-channel-tab:hover{color:var(--ref-text);background:var(--ref-bg-2)}
.reference-ui-shell .model-channel-tab.active,.reference-ui-shell .model-channel-tab[aria-selected="true"]{border-color:rgba(46,107,255,.3);background:rgba(46,107,255,.1);color:var(--ref-primary)}
.reference-ui-shell .model-channel-list{min-height:0;display:grid;align-content:start;gap:4px;padding:2px;overflow:auto;overscroll-behavior:contain}
.reference-ui-shell .model-option.model-option-rich{width:100%;min-height:54px;display:grid;grid-template-columns:10px minmax(0,1fr);align-items:center;justify-content:stretch;gap:10px;padding:9px 11px;border:1px solid transparent;border-radius:10px;background:transparent;color:var(--ref-text);text-align:left;box-shadow:none}
.reference-ui-shell .model-option.model-option-rich:hover{border-color:var(--ref-border-2);background:var(--ref-bg-2)}
.reference-ui-shell .model-option.model-option-rich.active{border-color:rgba(46,107,255,.28);background:rgba(46,107,255,.1);color:var(--ref-text)}
.reference-ui-shell .model-option-copy{min-width:0;display:grid;gap:5px}.reference-ui-shell .model-option-copy strong{overflow:hidden;font-size:12.5px;text-overflow:ellipsis;white-space:nowrap}.reference-ui-shell .model-option-copy small{color:var(--ref-muted);font-size:9.5px}
.reference-ui-shell .model-availability-dot{width:7px;height:7px;border-radius:50%;background:#8290a8;box-shadow:0 0 0 3px rgba(130,144,168,.08)}
.reference-ui-shell .model-availability-dot.available{background:#159f69;box-shadow:0 0 0 3px rgba(21,159,105,.1)}
.reference-ui-shell .model-availability-dot.limited{background:#c47b13;box-shadow:0 0 0 3px rgba(196,123,19,.1)}
.reference-ui-shell .model-channel-empty{padding:30px;text-align:center;color:var(--ref-muted);font-size:11px}

/* Conversations own their history rail; generated work remains visible beside them. */
.reference-ui-shell .works.text-workspace{grid-template-columns:minmax(640px,1.25fr) minmax(420px,.75fr)}
.reference-ui-shell .works.text-workspace>#view-chat.active{display:grid;grid-template-columns:214px minmax(0,1fr);grid-template-rows:62px minmax(0,1fr) auto}
.reference-ui-shell .works.text-workspace #view-chat .chat-sidebar{grid-column:1;grid-row:1/4;min-height:0;padding:16px 12px;border-right:1px solid var(--ref-border);background:var(--ref-surface)}
.reference-ui-shell .works.text-workspace #view-chat .chat-main-head{grid-column:2;grid-row:1}
.reference-ui-shell .works.text-workspace #view-chat .chat-messages{grid-column:2;grid-row:2;width:100%;height:auto;min-height:0;padding:24px max(18px,calc((100% - 720px)/2));overflow:auto}
.reference-ui-shell .works.text-workspace #view-chat .chat-composer{grid-column:2;grid-row:3;width:min(100%,860px);height:auto;min-height:104px}
.reference-ui-shell .works.text-workspace #view-chat .chat-drop-overlay{grid-column:2;grid-row:1/4}

/* Asset detail uses a centered, inspectable workspace. Other drawers keep the existing side pattern. */
.reference-ui-shell #detailDrawer[data-kind="asset-detail"]{left:50%;right:auto;top:50%;bottom:auto;width:min(1120px,calc(100vw - 48px));height:min(860px,calc(100vh - 48px));height:min(860px,calc(100dvh - 48px));border:1px solid var(--ref-border-2);border-radius:20px;box-shadow:0 28px 100px rgba(0,0,0,.48);transform:translate(-50%,-47%) scale(.98);opacity:0;overflow:hidden;transition:transform .18s cubic-bezier(.2,.75,.2,1),opacity .18s ease}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"].open{transform:translate(-50%,-50%) scale(1)!important;opacity:1}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .drawer-head{flex:0 0 58px;padding:0 22px;background:var(--ref-surface)}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .drawer-body{padding:18px 20px 0;background:var(--ref-bg);overscroll-behavior:contain}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-bottom:18px}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail>.asset-detail-images,
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail>.asset-prompt-block,
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail>.detail-media,
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail>.asset-detail-footer-actions{grid-column:1/-1}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-images{margin:0;padding:14px}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-block-head>div{min-width:0;display:grid;gap:4px}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-block-head>div>span{color:var(--ref-muted);font-size:10px}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-image-showcase{grid-template-columns:minmax(0,1fr) 206px;gap:12px}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-primary-preview{height:clamp(320px,48vh,470px);aspect-ratio:auto}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-angle-strip{grid-template-columns:repeat(2,minmax(0,1fr));max-height:470px;gap:8px;padding-right:3px}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-footer-actions{position:sticky;z-index:3;bottom:0;margin:0 -20px -18px;padding:12px 20px 16px;border-top:1px solid var(--ref-border);background:var(--ref-surface);background:color-mix(in srgb,var(--ref-surface) 94%,transparent);backdrop-filter:blur(16px)}

@media(max-width:1180px){
  .reference-ui-shell .works.text-workspace{display:flex;flex-direction:column;overflow-y:auto!important}
  .reference-ui-shell .works.text-workspace>#view-chat.active{order:1;flex:0 0 auto;height:max(620px,calc(100vh - 70px));height:max(620px,calc(100dvh - 70px));min-height:620px;border-right:0;border-bottom:1px solid var(--ref-border)}
  .reference-ui-shell .works.text-workspace>#view-work.active{order:2;flex:0 0 720px;height:720px;min-height:720px}
}
@media(max-width:720px){
  .reference-ui-shell .works.text-workspace>#view-chat.active{grid-template-columns:1fr;grid-template-rows:auto 56px minmax(300px,1fr) auto;height:760px;min-height:760px}
  .reference-ui-shell .works.text-workspace #view-chat .chat-sidebar{grid-column:1;grid-row:1;display:grid;grid-template-columns:1fr auto;gap:8px;max-height:190px;padding:10px;border-right:0;border-bottom:1px solid var(--ref-border)}
  .reference-ui-shell .works.text-workspace #view-chat .chat-provider-label,.reference-ui-shell .works.text-workspace #view-chat #chatProvider{grid-column:auto}
  .reference-ui-shell .works.text-workspace #view-chat .chat-conversation-list{grid-column:1/-1;display:flex;gap:7px;overflow-x:auto;overflow-y:hidden}
  .reference-ui-shell .works.text-workspace #view-chat .chat-conversation{flex:0 0 190px}
  .reference-ui-shell .works.text-workspace #view-chat .chat-main-head{grid-column:1;grid-row:2;padding:0 12px}
  .reference-ui-shell .works.text-workspace #view-chat .chat-main-actions .ghost:first-child{display:none}
  .reference-ui-shell .works.text-workspace #view-chat .chat-messages{grid-column:1;grid-row:3;padding:16px 12px}
  .reference-ui-shell .works.text-workspace #view-chat .chat-composer{grid-column:1;grid-row:4;padding-left:10px;padding-right:10px}
  .reference-ui-shell .works.text-workspace #view-chat .chat-drop-overlay{grid-column:1;grid-row:2/5}
  .reference-ui-shell #detailDrawer[data-kind="asset-detail"]{width:100vw;height:100vh;height:100dvh;border:0;border-radius:0}
  .reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail{grid-template-columns:1fr}
  .reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail>*{grid-column:1!important}
  .reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-image-showcase{grid-template-columns:1fr}
  .reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-primary-preview{height:auto;aspect-ratio:1}
  .reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-angle-strip{display:flex;max-height:none;overflow-x:auto;overflow-y:hidden}
}

/* ui7: assets are visual objects first. Keep the picker compact, but make the
   actual asset-library page large enough to identify a person or scene without
   opening every card. The information surface is the explicit detail trigger;
   selection controls and modifier-key selection remain independent. */
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card{border-radius:16px;overflow:hidden}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-media{aspect-ratio:4/3;min-height:165px;background:linear-gradient(145deg,#080d18,#111a2a)}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-media img,
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-media video{width:100%;height:100%;object-fit:contain;background:transparent}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card-body{min-height:154px;padding:12px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-info-trigger{margin:-4px -4px 0;padding:4px;border-radius:8px;cursor:pointer;outline:none}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-info-trigger:hover{background:rgba(46,107,255,.055)}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-info-trigger:focus-visible{box-shadow:inset 0 0 0 2px var(--ref-primary)}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card-title strong{font-size:13px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card-title>span{font-size:9.5px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card-meta,
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-status{font-size:10px}
.reference-ui-shell .project-assets-panel .asset-library-card{cursor:pointer}
.reference-ui-shell .project-assets-panel .asset-library-context-placeholder{visibility:hidden;pointer-events:none}
.reference-ui-shell #view-assets .asset-library-card-body{display:flex;flex-direction:column;min-height:238px}
.reference-ui-shell #view-assets .asset-library-relation-slot{flex:0 0 48px}
.reference-ui-shell #view-assets .asset-library-status{min-height:18px}
.reference-ui-shell #view-assets .asset-library-targets{display:flex;min-height:22px}
.reference-ui-shell #view-assets .asset-library-card-actions{margin-top:auto}

/* A project cover is one shared visual fact used on Home, the project catalog,
   project detail and the cover chooser. It never duplicates or moves outputs. */
.reference-ui-shell .project-cover{position:relative;display:block;min-width:0;overflow:hidden;border:1px solid var(--ref-border);background:linear-gradient(135deg,#243a68,#6c4d91);color:#fff;isolation:isolate}
.reference-ui-shell .project-cover-fallback{position:absolute;inset:0;display:grid;place-items:center;font-size:28px;font-weight:800;opacity:.78}
.reference-ui-shell .project-cover img{position:absolute;z-index:1;inset:0;width:100%;height:100%;display:block;object-fit:cover;background:var(--ref-bg-2)}
.reference-ui-shell .project-cover small{position:absolute;z-index:2;left:7px;bottom:6px;max-width:calc(100% - 14px);padding:3px 6px;overflow:hidden;border-radius:6px;background:rgba(4,8,16,.72);color:#fff;font-size:8.5px;line-height:1;text-overflow:ellipsis;white-space:nowrap;backdrop-filter:blur(6px)}
.reference-ui-shell .project-cover.is-editable{cursor:pointer;outline:none;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.reference-ui-shell .project-cover.is-editable:hover,.reference-ui-shell .project-cover.is-editable:focus-visible{border-color:var(--ref-primary);box-shadow:0 0 0 3px rgba(46,107,255,.18);transform:translateY(-1px)}
.reference-ui-shell .project-cover-edit-hint{position:absolute;z-index:3;left:50%;top:50%;display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:0 11px;border:1px solid rgba(255,255,255,.32);border-radius:9px;background:rgba(4,8,16,.76);color:#fff;font-size:10.5px;font-weight:800;white-space:nowrap;opacity:0;transform:translate(-50%,-42%);transition:opacity .16s ease,transform .16s ease;backdrop-filter:blur(10px)}
.reference-ui-shell .project-cover-edit-hint b{font-size:16px;line-height:1}
.reference-ui-shell .project-cover.is-editable:hover .project-cover-edit-hint,.reference-ui-shell .project-cover.is-editable:focus-visible .project-cover-edit-hint,.reference-ui-shell .project-cover.is-editable.is-empty .project-cover-edit-hint{opacity:1;transform:translate(-50%,-50%)}
.reference-ui-shell .project-cover-home{width:58px;height:48px;border-radius:10px}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data{min-height:282px;grid-template-rows:auto 30px 1fr auto}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell.project-name-cell-batch{grid-template-columns:26px minmax(0,1fr)}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell.project-name-cell-batch>.project-row-checkbox,
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell.project-name-cell-batch>.project-row-checkbox-spacer{grid-column:1;grid-row:1/3;align-self:start;margin-top:4px}
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell.project-name-cell-batch>.project-cover,
.reference-ui-shell .project-dashboard .project-table-row.project-table-data>.project-name-cell.project-name-cell-batch>.project-name-block{grid-column:2}
.reference-ui-shell .project-cover-card{width:100%;aspect-ratio:16/8.3;border-radius:12px}
.reference-ui-shell .project-hero-summary{min-width:0;display:flex;align-items:flex-start;gap:16px}
.reference-ui-shell .project-hero-copy{min-width:0;flex:1}
.reference-ui-shell .project-cover-hero{flex:0 0 220px;width:220px;aspect-ratio:16/9;border-radius:12px}

.reference-ui-shell #detailDrawer[data-kind="project-cover"]{left:50%;right:auto;top:50%;bottom:auto;width:min(980px,calc(100vw - 48px));height:min(820px,calc(100vh - 48px));height:min(820px,calc(100dvh - 48px));border:1px solid var(--ref-border-2);border-radius:20px;box-shadow:0 28px 100px rgba(0,0,0,.48);transform:translate(-50%,-47%) scale(.98);opacity:0;overflow:hidden;transition:transform .18s cubic-bezier(.2,.75,.2,1),opacity .18s ease}
.reference-ui-shell #detailDrawer[data-kind="project-cover"].open{transform:translate(-50%,-50%) scale(1)!important;opacity:1}
.reference-ui-shell #detailDrawer[data-kind="project-cover"] .drawer-body{padding:18px 20px;background:var(--ref-bg);overscroll-behavior:contain}
.reference-ui-shell .project-cover-settings{display:grid;gap:16px}
.reference-ui-shell .project-cover-current{display:grid;grid-template-columns:260px minmax(0,1fr);align-items:center;gap:16px;padding:14px;border:1px solid var(--ref-border);border-radius:15px;background:var(--ref-surface)}
.reference-ui-shell .project-cover-dialog{width:100%;aspect-ratio:16/9;border-radius:12px}
.reference-ui-shell .project-cover-settings .project-cover-dialog-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.reference-ui-shell .project-cover-settings .project-cover-upload{height:36px;display:inline-flex;align-items:center;justify-content:center;padding:0 14px;border-radius:9px;cursor:pointer}
.reference-ui-shell .project-cover-settings .project-cover-upload input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.reference-ui-shell .project-cover-settings .project-cover-upload.busy{pointer-events:none;opacity:.65}
.reference-ui-shell .project-cover-choices{display:grid;gap:10px}
.reference-ui-shell .project-cover-option-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.reference-ui-shell .project-cover-option{min-width:0;padding:7px;display:grid;gap:6px;border:1px solid var(--ref-border);border-radius:11px;background:var(--ref-surface);color:var(--ref-text);text-align:left}
.reference-ui-shell .project-cover-option:hover,.reference-ui-shell .project-cover-option.active{border-color:var(--ref-primary);box-shadow:0 0 0 1px rgba(46,107,255,.18)}
.reference-ui-shell .project-cover-option>span{position:relative;width:100%;aspect-ratio:16/9;display:block;overflow:hidden;border-radius:8px;background:var(--ref-bg-2)}
.reference-ui-shell .project-cover-option img{width:100%;height:100%;display:block;object-fit:cover}
.reference-ui-shell .project-cover-option strong,.reference-ui-shell .project-cover-option small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reference-ui-shell .project-cover-option strong{font-size:11px}.reference-ui-shell .project-cover-option small{color:var(--ref-muted);font-size:9px}

html[data-zq-theme="light"] .reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-media{background:linear-gradient(145deg,#eef2f8,#e6ecf6)}

@media(max-width:1180px){
  .reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-grid{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
  .reference-ui-shell .project-cover-option-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:700px){
  .reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-media{min-height:0}
  .reference-ui-shell .project-dashboard .project-table-row.project-table-data{min-height:300px}
  .reference-ui-shell .project-hero-summary{width:100%;flex-direction:column}.reference-ui-shell .project-cover-hero{width:100%;flex-basis:auto}
  .reference-ui-shell #detailDrawer[data-kind="project-cover"]{width:100vw;height:100vh;height:100dvh;border:0;border-radius:0}
  .reference-ui-shell .project-cover-current{grid-template-columns:1fr}.reference-ui-shell .project-cover-option-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:440px){
  .reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-grid{grid-template-columns:1fr}
  .reference-ui-shell .project-cover-option-grid{grid-template-columns:1fr}
}

/* ui7.2 asset-card clarity: person cards repeated type/category labels in the
   media, title and body ("真人/方舟真人/人物资产·N张").  Hide only those
   duplicate person labels; scene/prop/video/audio cards retain their type
   labels so the library remains scannable by media kind.  Keep
   authentication, official IDs and every action intact. */
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card.asset-kind-people .asset-library-media>.asset-type-badge{display:none}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card.asset-kind-people .asset-library-card-title>.asset-library-kind{display:none}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card.asset-kind-people .asset-library-card-meta>span:first-child{display:none}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card.asset-kind-people .asset-library-card-meta{justify-content:flex-end;min-height:16px}

/* Asset previews use the same 16:9 visual canvas as generated works.  Do not
   crop the source: contain keeps portrait assets fully visible with the
   established neutral letterbox background. */
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-media{aspect-ratio:16/9;min-height:0}

/* A relationship is supporting metadata, not a second card.  Compact the
   bound/unbound slot while retaining a stable three-column action layout and
   enough text/avatars to identify one or many bound characters. */
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot{
  grid-template-columns:36px minmax(0,1fr) 40px;
  flex:0 0 40px;
  min-height:40px;
  margin-top:6px;
  padding:4px 5px;
  gap:5px;
}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-icon{width:22px;height:22px;border-radius:6px;font-size:8px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-copy{gap:1px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-copy b{font-size:9px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-copy small{font-size:8px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot>button,
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-action-slot{width:40px;height:22px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot>button{font-size:8px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot>.asset-bound-people-button{grid-column:1/3;width:100%;height:28px!important;min-height:28px!important;padding:1px 0!important;gap:5px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot>.asset-bound-people-button .asset-bound-avatar-stack{min-width:39px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot .asset-bound-avatar{width:20px;height:20px;border-width:1.5px;font-size:8px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot .asset-bound-avatar-more{min-width:20px;height:20px;border-width:1.5px;font-size:7px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot .asset-bound-people-copy b{font-size:8.5px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot .asset-bound-people-copy small{font-size:7.5px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-action-label{width:40px;height:22px;font-size:8px}

/* ui7.1 asset detail: one visual object, many independently certified images.
   The gallery is the primary task; implementation detail stays available but
   no longer competes with the image, prompt and use actions. */
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail{grid-template-columns:1fr}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail>*{grid-column:1/-1}
.reference-ui-shell .asset-detail-overview{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(250px,.65fr);align-items:start;gap:12px}
.reference-ui-shell .asset-detail-overview>.asset-detail-images,
.reference-ui-shell .asset-detail-overview>.detail-media{min-width:0;margin:0}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-image-showcase{grid-template-columns:1fr;gap:10px}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-primary-preview{height:clamp(300px,44vh,460px);aspect-ratio:auto;background:var(--ref-bg-2)}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-primary-preview img{object-fit:contain}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-angle-strip{display:flex;max-height:none;gap:8px;padding:2px 2px 7px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-angle-thumb{flex:0 0 112px;width:112px;aspect-ratio:1;border-radius:10px;background:var(--ref-bg-2)}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-angle-thumb img{object-fit:contain}
.reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-angle-thumb small{bottom:4px;left:4px;right:4px;padding:4px 5px;background:rgba(4,8,16,.78);color:#fff;font-size:9px}
.reference-ui-shell .asset-image-cert{display:inline-flex;align-items:center;min-height:20px;padding:0 7px;border:1px solid transparent;border-radius:999px;font-size:8.5px;font-weight:800;line-height:1;white-space:nowrap}
.reference-ui-shell .asset-image-cert.certified{border-color:rgba(21,159,105,.28);background:rgba(21,159,105,.12);color:#159f69}
.reference-ui-shell .asset-image-cert.syncing{border-color:rgba(46,107,255,.28);background:rgba(46,107,255,.11);color:var(--ref-primary)}
.reference-ui-shell .asset-image-cert.failed{border-color:rgba(211,72,77,.28);background:rgba(211,72,77,.1);color:#d3484d}
.reference-ui-shell .asset-image-cert.local{border-color:var(--ref-border-2);background:var(--ref-bg-2);color:var(--ref-muted)}
.reference-ui-shell .asset-detail-angle-thumb>.asset-image-cert{position:absolute;z-index:2;top:5px;left:5px;max-width:calc(100% - 10px);min-height:18px;padding:0 5px;overflow:hidden;background:rgba(4,8,16,.78);color:#fff;text-overflow:ellipsis;backdrop-filter:blur(6px)}
.reference-ui-shell .asset-detail-add-image{display:grid;place-content:center;gap:8px;border-style:dashed!important;color:var(--ref-primary)!important}
.reference-ui-shell .asset-detail-add-image b{font-size:30px;font-weight:300;line-height:1}
.reference-ui-shell .asset-detail-add-image small{position:static!important;background:transparent!important;color:var(--ref-muted)!important}
.reference-ui-shell .asset-detail-summary{align-self:stretch;display:flex;flex-direction:column;gap:10px;padding:18px}
.reference-ui-shell .asset-detail-summary .asset-detail-kicker{color:var(--ref-primary);font-size:10px;font-weight:800}
.reference-ui-shell .asset-detail-summary h3{margin:0;font-size:20px;line-height:1.3}
.reference-ui-shell .asset-detail-summary dl{display:grid;gap:0;margin:0}
.reference-ui-shell .asset-detail-summary dl>div{display:grid;grid-template-columns:70px minmax(0,1fr);gap:9px;padding:9px 0;border-bottom:1px solid var(--ref-border)}
.reference-ui-shell .asset-detail-summary dt{color:var(--ref-muted);font-size:9.5px}.reference-ui-shell .asset-detail-summary dd{min-width:0;margin:0;color:var(--ref-text);font-size:10.5px;overflow-wrap:anywhere}
.reference-ui-shell .asset-summary-edit{align-self:flex-start;margin-top:auto}
.reference-ui-shell .asset-detail-head-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.reference-ui-shell .asset-detail-unified-editor{grid-column:1/-1;border:1px solid var(--ref-border);border-radius:14px;background:var(--ref-surface);overflow:visible}
.reference-ui-shell .asset-detail-unified-editor>summary{min-height:58px;display:flex;align-items:center;gap:10px;padding:0 16px;cursor:pointer;list-style:none;background:var(--ref-surface)}
.reference-ui-shell .asset-detail-unified-editor>summary::-webkit-details-marker{display:none}
.reference-ui-shell .asset-detail-unified-editor>summary:before{content:"›";font-size:22px;color:var(--ref-muted);transition:transform .15s ease}
.reference-ui-shell .asset-detail-unified-editor[open]>summary:before{transform:rotate(90deg)}
.reference-ui-shell .asset-detail-unified-editor>summary span{font-size:12px;font-weight:850;color:var(--ref-text)}
.reference-ui-shell .asset-detail-unified-editor>summary small{margin-left:auto;color:var(--ref-muted);font-size:9.5px}
.reference-ui-shell .asset-detail-unified-editor-body{display:grid;gap:12px;padding:14px;border-top:1px solid var(--ref-border);background:var(--ref-bg)}
.reference-ui-shell .asset-editor-embedded,.reference-ui-shell .asset-enrichment-editor-embedded{min-width:0;margin:0;padding:0;border:0;background:transparent;box-shadow:none}
.reference-ui-shell .asset-editor-action-dock{flex:0 0 auto;z-index:8;border-top:1px solid var(--ref-border);background:var(--ref-surface);background:color-mix(in srgb,var(--ref-surface) 96%,transparent);box-shadow:0 -12px 28px rgba(0,0,0,.16);backdrop-filter:blur(14px)}
.reference-ui-shell .asset-editor-action-dock[hidden]{display:none}
.reference-ui-shell .asset-editor-action-dock .asset-editor-sticky-actions{position:static;margin:0;padding:12px 20px 14px;border:0;background:transparent;box-shadow:none;backdrop-filter:none}
.reference-ui-shell .asset-detail-voice-editor{display:grid;gap:10px;margin:0;padding:14px}
.reference-ui-shell .asset-detail-voice-editor>label{display:grid;gap:6px;color:var(--ref-muted);font-size:10px}
.reference-ui-shell .asset-detail-voice-editor select{min-height:38px}
.reference-ui-shell .asset-detail-voice-editor.readonly p{margin:0;color:var(--ref-text)}
.reference-ui-shell .asset-prompt-block.is-empty{border-style:dashed;background:var(--ref-surface);background:color-mix(in srgb,var(--ref-primary) 4%,var(--ref-surface))}
.reference-ui-shell .asset-prompt-block.is-empty .asset-prompt-text{min-height:70px;display:flex;align-items:center;color:var(--ref-muted)}
.reference-ui-shell .asset-detail-advanced{grid-column:1/-1;border:1px solid var(--ref-border);border-radius:13px;background:var(--ref-surface);overflow:hidden}
.reference-ui-shell .asset-detail-advanced>summary{min-height:54px;display:flex;align-items:center;gap:10px;padding:0 15px;cursor:pointer;list-style:none}
.reference-ui-shell .asset-detail-advanced>summary::-webkit-details-marker{display:none}
.reference-ui-shell .asset-detail-advanced>summary:before{content:"›";font-size:20px;color:var(--ref-muted);transition:transform .15s ease}.reference-ui-shell .asset-detail-advanced[open]>summary:before{transform:rotate(90deg)}
.reference-ui-shell .asset-detail-advanced>summary span{font-size:11px;font-weight:800}.reference-ui-shell .asset-detail-advanced>summary small{margin-left:auto;color:var(--ref-muted);font-size:9px}
.reference-ui-shell .asset-detail-advanced-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 12px 12px;border-top:1px solid var(--ref-border)}
.reference-ui-shell .asset-detail-advanced-grid>.detail-block{margin-top:12px}
.reference-ui-shell #detailDrawer[data-kind="asset-enrichment"]{width:min(760px,calc(100vw - 32px))}
.reference-ui-shell .asset-enrichment-editor{display:grid;gap:14px;padding-bottom:72px}
.reference-ui-shell .asset-enrichment-intro{display:grid;gap:4px;padding:13px;border:1px solid var(--ref-border);border-radius:11px;background:var(--ref-bg-2)}
.reference-ui-shell .asset-enrichment-intro strong{font-size:14px}.reference-ui-shell .asset-enrichment-intro span{color:var(--ref-muted);font-size:10px}
.reference-ui-shell .asset-enrichment-locked{min-width:0;display:grid;gap:5px;padding:11px;border:1px solid var(--ref-border);border-radius:9px;background:var(--ref-bg-2)}
.reference-ui-shell .asset-enrichment-locked span,.reference-ui-shell .asset-enrichment-locked small{color:var(--ref-muted);font-size:9px}.reference-ui-shell .asset-enrichment-locked strong{overflow-wrap:anywhere;font-size:10.5px;white-space:pre-wrap}

@media(max-width:820px){
  .reference-ui-shell .asset-detail-overview{grid-template-columns:1fr}
  .reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-primary-preview{height:auto;aspect-ratio:4/3}
  .reference-ui-shell .asset-detail-advanced-grid{grid-template-columns:1fr}
}
@media(max-width:520px){
  .reference-ui-shell #detailDrawer[data-kind="asset-detail"] .asset-detail-angle-thumb{flex-basis:88px;width:88px}
  .reference-ui-shell .asset-detail-summary{padding:14px}
  .reference-ui-shell .asset-detail-advanced>summary small{display:none}
  .reference-ui-shell .asset-detail-unified-editor>summary small{display:none}
}

/* ui8 project catalog: compact cover-first cards keep the catalog scannable;
   actions stay in the context menu/detail workspace. */
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact{display:block!important;min-height:0!important;height:auto!important;padding:12px!important;overflow:hidden;border-radius:16px}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact>.project-name-cell{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;width:100%;min-width:0}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact>.project-name-cell.project-name-cell-batch{grid-template-columns:26px minmax(0,1fr);align-items:start;gap:9px}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact>.project-name-cell.project-name-cell-batch>.project-row-checkbox,
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact>.project-name-cell.project-name-cell-batch>.project-row-checkbox-spacer{grid-column:1;grid-row:1/3;align-self:start;margin-top:4px}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact>.project-name-cell.project-name-cell-batch>.project-cover,
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact>.project-name-cell.project-name-cell-batch>.project-name-block{grid-column:2}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact .project-cover-card{width:100%;min-height:0;aspect-ratio:16/9;border-radius:11px}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact .project-name-block{min-width:0;padding:0 1px}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact .project-name-block strong{display:flex;align-items:center;gap:4px;min-width:0;font-size:14px}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact .project-name-block strong .project-pin{flex:0 0 auto}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact .project-name-block small{display:block;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;line-height:1.45}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact.project-pinned{border-color:rgba(248,200,74,.36)}
.reference-ui-shell .project-dashboard .project-table-row.project-card-compact.project-pinned:hover{border-color:rgba(248,200,74,.58)}

/* ui8 asset proportions: remove the fixed body height so visual cards size to
   their content while keeping the 16:9 preview and compact relation slot. */
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card{display:flex;flex-direction:column;min-height:0}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-media{flex:0 0 auto;aspect-ratio:16/9;min-height:0}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card-body{display:grid;align-content:start;gap:0;min-height:0!important;padding:10px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-info-trigger{margin:0;padding:0}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card-title{min-height:22px;align-items:center}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card-meta{min-height:15px;margin-top:4px;line-height:1.25}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-status{min-height:15px;margin-top:4px;line-height:1.25}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-targets{min-height:0;max-height:20px;margin-top:4px;overflow:hidden}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-relation-slot{flex:0 0 40px;min-height:40px;margin-top:4px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card-actions{margin-top:5px}
.reference-ui-shell :is(#view-assets,.project-assets-panel) .asset-library-card-actions button{height:27px}

/* Unassigned work is a routing bucket, not a real project.  Keep its cover
   and name as the single discoverable entry, while removing project-only
   metadata/actions (type, count, status and batch button noise).  The row
   itself remains a keyboard/click/context-menu entry so existing work can
   still be opened and organised. */
.reference-ui-shell .project-dashboard .project-table-row.project-unassigned-row{
  min-height:0;
  grid-template-rows:auto;
  align-content:start;
  align-self:start;
  height:max-content;
}
.reference-ui-shell .project-dashboard .project-table-row.project-unassigned-row>.project-name-cell{
  grid-column:1/-1;
  align-self:start;
}
@media(max-width:700px){
  .reference-ui-shell .project-dashboard .project-table-row.project-unassigned-row{min-height:0}
}
