/* The shell stays mounted; only the active editor receives interaction. */
.workspace-view { animation:none; }
.plugin-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr)); align-items:start; gap:16px; }
.plugin-grid>.plugin-card { display:flex; flex-direction:column; width:100%; max-width:360px; min-width:0; padding:0; border:1px solid #bdced0; border-radius:8px; text-align:left; color:#243e45; background:#fff; }
.plugin-grid>.plugin-card:hover { border-color:#658f8c; }
.plugin-grid>.plugin-card:focus-visible { outline:2px solid #187f83; outline-offset:3px; }
.plugin-grid .plugin-cover { flex-shrink:0; height:112px; width:100%; overflow:hidden; background:#eaf0f0; }
.plugin-grid .plugin-cover img { display:block; width:100%; height:100%; object-fit:cover; }
.plugin-grid .panel-padding { display:grid; gap:8px; width:100%; min-width:0; padding:16px; }
.plugin-grid .pill { justify-self:start; max-width:100%; overflow-wrap:anywhere; }
.plugin-grid h3 { font-size:15px; line-height:22px; height:44px; margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.plugin-grid .line-clamp { font-size:13px; line-height:20px; height:40px; margin:0; color:#526b70; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.plugin-grid .spread { gap:8px; font-size:13px; line-height:20px; flex-wrap:wrap; }
.plugin-grid .spread b { color:#245d58; overflow-wrap:anywhere; }
.plugin-grid>.empty { grid-column:1/-1; }
@media(max-width:600px) {
 .plugin-grid>.plugin-card { display:grid; grid-template-columns:80px minmax(0,1fr); max-width:none; }
 .plugin-grid .plugin-cover { width:80px; height:100%; }
 .plugin-grid .panel-padding { padding:12px; gap:6px; }
 .plugin-grid h3 { height:auto; min-height:22px; }
}
.clarity .wallet-top { margin-left:auto; min-width:0; }
.top-asset { min-width:70px; }
.top-asset b { letter-spacing:0; overflow-wrap:anywhere; }
.topbar .account-menu { flex-shrink:0; }
.shell-main { padding:20px 28px 24px; }
.content[data-route="home"] .home-hero { height:210px; border:0; border-radius:0; background:#edf5f433; }
.content[data-route="home"] .hero-content { padding:32px 28px; }
.content[data-route="home"] .hero-content h2 { font-size:30px; letter-spacing:0; }
.content[data-route="home"] .hero-content p { font-size:14px; }
.content[data-route="home"] .hero-coordinate { letter-spacing:0; }
.content[data-route="home"] .section-head { margin:22px 0 12px; }
.content[data-route="home"] .quick-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; }
.content[data-route="home"] .quick-card { border-radius:8px; min-height:144px; padding:18px 16px; }
.content[data-route="home"] .quick-card h3 { font-size:14px; overflow-wrap:anywhere; }
.content[data-route="home"] .quick-card p { font-size:12px; margin-top:6px; }
.home-notices { display:flex; align-items:center; gap:18px; margin-top:24px; padding:18px 0; border-top:1px solid #cbd7db; border-bottom:1px solid #cbd7db; }
.home-notices-label { display:flex; gap:8px; align-items:center; color:#40646a; flex-shrink:0; }
.home-notices-items { display:flex; gap:24px; flex:1; min-width:0; }
.home-notice { display:flex; align-items:center; gap:12px; min-width:0; text-align:left; }
.home-notice span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.home-notice time { font-size:11px; color:#596d74; flex-shrink:0; }
.home-notices-empty { color:#596d74; }
.editor-toolbar { display:flex; justify-content:flex-end; gap:10px; margin:0 0 12px; min-height:34px; }
.content[data-route="image"] .live-studio,.content[data-route="video"] .live-studio { gap:18px; grid-template-columns:minmax(320px,400px) minmax(0,1fr); }
.content[data-route="image"] .live-studio>*,.content[data-route="video"] .live-studio>* { min-width:0; }
.content[data-route="image"] .panel,.content[data-route="video"] .panel { border-radius:8px; }
.content[data-route="image"] .form-stack,.content[data-route="video"] .form-stack { gap:12px; }
.image-model-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.image-model-options>label { min-width:0; display:grid; gap:8px; }
.image-model-options select { width:100%; }
.content[data-route="image"] .tracker-heading h2,.content[data-route="video"] .tracker-heading h2 { font-size:16px; letter-spacing:0; }
.canvas-workspace-frame { display:block; width:100%; height:calc(100dvh - var(--top) - 44px); border:0; background:#eef4f4; }
.shell-main:has(> #route-content[data-route="canvas"])>.footer { display:none; }
.canvas-focus { overflow:hidden; }
.canvas-focus .sidebar,.canvas-focus .topbar,.canvas-focus .shell-main>.footer { display:none; }
.canvas-focus .shell-main { margin:0; padding:0; min-height:100dvh; }
.canvas-focus #route-content { max-width:none; margin:0; width:100%; height:100dvh; }
.canvas-focus .canvas-workspace-frame { width:100%; height:100dvh; }
.canvas-floating-nav { position:fixed; width:48px; height:48px; z-index:80; }
.canvas-nav-ball { display:grid; place-items:center; width:48px; height:48px; border-radius:50%; border:1px solid #8eaaa8; background:#fff; box-shadow:0 3px 16px #244f4929; touch-action:none; cursor:grab; user-select:none; }
.canvas-nav-ball:active { cursor:grabbing; }
.canvas-nav-ball img { width:30px; height:30px; pointer-events:none; }
.canvas-nav-menu { position:absolute; width:min(280px,calc(100vw - 24px)); max-height:calc(50dvh - 32px); overflow-y:auto; overscroll-behavior:contain; border:1px solid #aac0be; border-radius:8px; padding:14px; box-shadow:0 8px 32px #243b422b; background:#fff; }
.canvas-nav-menu>strong { font-size:14px; }
.canvas-nav-menu>p { font-size:12px; color:#526b70; margin:6px 0 10px; overflow-wrap:anywhere; }
.canvas-nav-menu nav,.canvas-nav-tools { display:grid; gap:2px; }
.canvas-nav-menu button { display:flex; gap:10px; align-items:center; width:100%; padding:10px 8px; text-align:left; border-radius:5px; font-size:13px; }
.canvas-nav-menu button:hover { background:#eaf4f1; }
.canvas-nav-tools { border-top:1px solid #d6e2df; margin-top:8px; padding-top:8px; }
@media(min-width:1001px) {
 .shell-main:has(> #route-content:is([data-route="image"],[data-route="video"])) { height:calc(100dvh - var(--top)); overflow:hidden; }
 .shell-main:has(> #route-content:is([data-route="image"],[data-route="video"]))>.footer { display:none; }
 #route-content:is([data-route="image"],[data-route="video"]) { height:100%; display:flex; flex-direction:column; min-height:0; }
 #route-content:is([data-route="image"],[data-route="video"])>.live-studio { flex:1; min-height:0; }
 #route-content:is([data-route="image"],[data-route="video"])>.live-studio>* { max-height:100%; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
 #route-content:is([data-route="image"],[data-route="video"]) .form-stack>.dialog-actions { position:sticky; bottom:-22px; z-index:2; padding:12px 0 16px; margin:0; background:#fff; border-top:1px solid #cad8d7; }
 #route-content:is([data-route="image"],[data-route="video"]) .form-stack>.dialog-actions button { width:100%; min-height:40px; }
 #route-content:is([data-route="image"],[data-route="video"]) .form-stack textarea { min-height:120px; }
 .content[data-route="home"]+.footer { margin:22px 0 0; }
}
@media(max-width:1000px) {
 .content[data-route="home"] .quick-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .content[data-route="image"] .live-studio,.content[data-route="video"] .live-studio { grid-template-columns:minmax(0,1fr); }
 .home-notices-items { flex-wrap:wrap; gap:12px; }
}
@media(max-width:720px) {
 .shell-main { padding:16px; }
 .content[data-route="home"] .home-hero { height:196px; }
 .content[data-route="home"] .hero-content { padding:28px 18px; }
 .content[data-route="home"] .hero-content h2 { font-size:25px; }
 .content[data-route="home"] .hero-content p { font-size:13px; max-width:none; }
 .content[data-route="home"] .hero-coordinate { display:none; }
 .content[data-route="home"] .quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .content[data-route="home"] .quick-card { min-height:145px; padding:16px 13px; }
 .home-notices { gap:12px; align-items:flex-start; }
 .home-notices-items { display:grid; gap:12px; }
 .home-notice time { display:none; }
 .topbar .notification { display:flex; grid-column:3; grid-row:1; }
 .topbar .account-menu { grid-column:4; grid-row:1; }
 .clarity .wallet-top { gap:10px; }
 .clarity .top-asset b { font-size:15px; }
 .top-asset { min-width:0; }
 .top-asset.eggs { padding-left:10px; }
 .wallet-actions .btn { padding:6px 8px; }
 .canvas-workspace-frame { height:calc(100dvh - var(--top) - 32px); }
}
.workspace-refreshing { position: relative; }
.workspace-refreshing::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 25%;
  height: 2px;
  background: #187f83;
  animation: workspace-refresh-progress 1.4s ease-in-out infinite alternate;
}
@keyframes workspace-refresh-progress { to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) {
  .workspace-refreshing::after { animation: none; width: 100%; opacity: .5; }
}

/* Workspace-wide navigation and account preferences. */
[data-workspace-entry][hidden],.canvas-nav-menu[hidden] { display:none!important; }
.has-workspace-ball .sidebar .brand { padding-left:72px; padding-right:8px; }
.has-workspace-ball .sidebar .brand b { font-size:13px; }
.workspace-nav-hidden .sidebar { display:none; }
.workspace-nav-hidden .shell-main { margin-left:0; }
.workspace-nav-hidden .topbar { left:0; padding-left:76px; }
.canvas-nav-menu { max-height:min(660px,calc(100dvh - 90px)); }
.workspace-preference-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.workspace-preference { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid #bacdcb; border-radius:8px; cursor:pointer; background:#fff; }
.workspace-preference:has(:checked) { border-color:#347c75; background:#edf6f3; }
.workspace-preference input { width:18px; height:18px; accent-color:#247268; flex-shrink:0; }
.workspace-preference .icon { flex-shrink:0; }
.workspace-preference strong { display:block; font-size:14px; color:#294d4b; }
.workspace-preference small { display:block; margin-top:5px; line-height:1.5; color:#516d6d; }
.content[data-route="home"] .home-hero { height:175px; }
.content[data-route="home"] .hero-content { padding:22px 28px; }
.content[data-route="home"] .home-notices { margin-top:14px; padding:12px 0; }
.content[data-route="home"] .quick-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.content[data-route="home"] .quick-card { min-height:130px; padding:16px; }
.content[data-route="home"] .quick-icon { margin-bottom:10px; }
.content[data-route="home"] .quick-card p { line-height:1.5; }

/* A wide composer with a compact, independently scrollable task column. */
#route-content:is([data-route="image"],[data-route="video"]) .live-studio { grid-template-columns:minmax(0,1fr) clamp(280px,24vw,340px); gap:16px; align-items:start; }
#route-content:is([data-route="image"],[data-route="video"]) .live-studio>.panel { padding:18px; }
#route-content .composer-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px; align-content:start; }
#route-content .composer-controls>* { min-width:0; grid-column:1/-1; }
#route-content .composer-controls label { font-size:13px; line-height:1.5; color:#355653; gap:7px; }
#route-content .composer-controls .composer-backing { position:absolute; width:1px; height:1px; opacity:0; padding:0; border:0; clip-path:inset(50%); pointer-events:none; }
#route-content .composer-controls .composer-choices { display:flex; flex-wrap:wrap; gap:6px; }
#route-content .composer-controls .composer-choice { width:auto; padding:7px 11px; min-height:34px; border:1px solid #b9cbc9; border-radius:6px; color:#385b57; background:#fff; font-size:12px; line-height:1.35; white-space:normal; text-align:left; }
#route-content .composer-controls .composer-choice[aria-pressed="true"] { border-color:#307a71; background:#e9f4ee; color:#175447; box-shadow:inset 0 0 0 1px #307a7140; }
#route-content .composer-controls .composer-choice:focus-visible { outline:2px solid #287f75; outline-offset:2px; }
#route-content .composer-controls .composer-choice:disabled { opacity:.5; cursor:default; }
#route-content .composer-controls .composer-quantity-input { width:78px; padding:6px 10px; min-height:34px; height:34px; }
#route-content .composer-controls label:has(.composer-quantity-input) { display:flex; flex-wrap:wrap; align-items:center; }
#route-content .image-model-options { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:10px 16px; }
#route-content .image-model-options .composer-model { grid-column:1/-1; }
#route-content .composer-controls .composer-prompt { grid-column:1; }
#route-content .composer-controls .image-reference-slot { grid-column:2; grid-row:2; }
#route-content[data-route="image"] .composer-controls:not(:has(.image-reference-slot:not([hidden]))) .composer-prompt { grid-column:1/-1; }
#route-content .composer-controls textarea { min-height:145px; height:145px; resize:vertical; }
#route-content .composer-controls .image-dropzone { min-height:108px; padding:10px; gap:4px; }
#route-content .composer-controls .image-dropzone small { font-size:10px; }
#route-content .composer-controls .image-upload-actions .btn { padding:5px 8px; min-height:28px; }
#route-content .composer-controls [data-image-templates]:empty,#route-content .composer-controls [data-image-wallbreaker]:empty,#route-content .composer-controls [data-image-batch]:empty { display:none; }
#route-content .composer-controls [data-image-templates],#route-content .composer-controls [data-image-wallbreaker] { grid-column:2; }
#route-content .composer-controls label:has(.composer-quantity-input) { grid-column:1; }
#route-content .composer-controls .notice { padding:9px 12px; margin:0; color:#335f58; font-size:12px; }
#route-content .composer-controls .form-error:empty { display:none; }
#route-content .composer-controls .dialog-actions { position:static; padding:0; border:0; margin:0; }
#route-content .composer-controls .dialog-actions button { min-height:40px; }
#route-content .composer-controls #video-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
#route-content .composer-controls #video-model-description { font-size:12px; margin:0; }
#route-content .composer-controls #video-draft-status { margin:0; font-size:11px; }
#route-content .composer-controls .image-inline-note { font-size:11px; }
#route-content:is([data-route="image"],[data-route="video"]) .generation-tracker { padding:14px; min-height:0; }
#route-content:is([data-route="image"],[data-route="video"]) .tracker-row { min-height:62px; padding:10px 8px; gap:6px; }
#route-content:is([data-route="image"],[data-route="video"]) .tracker-row-index { width:16px; }
#route-content:is([data-route="image"],[data-route="video"]) .tracker-row-copy small { color:#5f7570; margin-top:3px; }
#route-content:is([data-route="image"],[data-route="video"]) .tracker-row .tracker-status { padding:4px 6px; font-size:10px; }
#route-content:is([data-route="image"],[data-route="video"]) .tracker-expanded { padding:12px; }
#route-content:is([data-route="image"],[data-route="video"]) .tracker-empty { padding:30px 10px; }
#route-content:is([data-route="image"],[data-route="video"]) .tracker-empty h3 { font-size:15px; }
#route-content:is([data-route="image"],[data-route="video"]) .image-retention { margin:0 0 8px; font-size:11px; }
@media(max-width:1100px) {
 #route-content:is([data-route="image"],[data-route="video"]) .live-studio { grid-template-columns:minmax(0,1fr) 280px; }
}
@media(max-width:1000px) {
 #route-content:is([data-route="image"],[data-route="video"]) .live-studio { grid-template-columns:1fr; }
 .content[data-route="home"] .quick-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:720px) {
 .has-workspace-ball .topbar .mobile-menu { visibility:hidden; }
 .has-workspace-ball .topbar .breadcrumb { padding-left:15px; }
 .has-workspace-ball .sidebar .brand { padding-left:72px; }
 .workspace-preference-grid { grid-template-columns:1fr; }
 .content[data-route="home"] .quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .content[data-route="home"] .hero-content { padding:22px 16px; }
 #route-content .composer-controls { grid-template-columns:1fr; }
 #route-content .composer-controls>* { grid-column:1!important; grid-row:auto!important; }
 #route-content .image-model-options { grid-template-columns:1fr; }
 #route-content .composer-controls #video-options { grid-template-columns:1fr; }
 #route-content .composer-controls .composer-choice { min-height:40px; }
 .canvas-nav-menu { max-height:calc(100dvh - 90px); }
}

#route-content .composer-controls .composer-scene { display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:start; }
#route-content .composer-controls .composer-scene>.composer-prompt { display:flex; flex-direction:column; align-items:stretch; grid-column:auto; grid-row:auto; }
#route-content .composer-controls .composer-reference { display:flex; flex-direction:column; gap:8px; min-width:0; }
#route-content .composer-controls .composer-reference>label { display:flex; flex-direction:column; align-items:stretch; }
#route-content .composer-controls .composer-scene:has(.image-reference-slot[hidden]) { grid-template-columns:1fr; }
#route-content .composer-controls .composer-scene:has(.image-reference-slot[hidden]) .composer-reference { display:none; }
#route-content .composer-controls .composer-scene textarea { height:160px; min-height:160px; }
#route-content .composer-controls .composer-utilities { display:flex; flex-wrap:wrap; align-items:center; gap:12px 18px; }
#route-content .composer-controls .composer-utilities>* { flex:1 1 220px; min-width:0; }
#route-content .composer-controls .composer-utilities label:has(.composer-quantity-input) { flex-direction:row; justify-content:flex-start; gap:8px; }
#route-content .composer-controls .composer-utilities .image-option { display:flex; flex-direction:row; align-items:center; gap:8px; }
#route-content .composer-controls .composer-utilities .image-templates { padding:8px 10px; }
#route-content .composer-controls .composer-utilities [data-image-batch] { flex:0 0 auto; margin:0; }
#route-content .composer-controls .composer-utilities [data-image-wallbreaker] { flex:0 1 200px; }
#route-content .composer-controls .composer-choices { align-items:flex-start; align-content:flex-start; }
#route-content .composer-controls .composer-model,#route-content .composer-controls .composer-spec { align-content:start; align-items:start; }
#route-content .composer-controls .composer-quantity-input+.composer-choices { flex-wrap:nowrap; }
#route-content .composer-controls .composer-reference input[type="file"] { padding:9px; font-size:12px; width:100%; }
#route-content:is([data-route="image"],[data-route="video"]) .form-stack.composer-controls>.dialog-actions { position:static; border:0; padding:0; }
#route-content .composer-controls>.image-inline-note { margin:0; }
#route-content .composer-controls .video-reference-help { margin:0; font-size:11px; }
#route-content .composer-controls .image-inline-actions { margin:0; }
@media(min-width:1001px) {
 #route-content .composer-controls .composer-utilities label:has(.composer-quantity-input) { flex:1 1 360px; }
 #route-content .composer-controls .composer-utilities #video-draft-status { flex:1 0 100%; }
}
@media(min-width:1001px) and (max-height:850px) {
 .shell-main:has(> #route-content:is([data-route="image"],[data-route="video"])) { padding-top:12px; padding-bottom:12px; }
 #route-content .editor-toolbar { min-height:30px; margin-bottom:8px; }
 #route-content .composer-controls { gap:8px 14px; }
 #route-content .composer-controls .image-model-options { gap:7px 12px; }
 #route-content .composer-controls .composer-scene textarea { min-height:122px; height:122px; }
 #route-content .composer-controls .image-dropzone { min-height:86px; padding:7px; }
 #route-content .composer-controls .image-plus { display:none; }
 #route-content .composer-controls .composer-utilities { gap:8px 12px; }
 #route-content .composer-controls .composer-choice { min-height:30px; padding:6px 9px; }
}
@media(max-width:720px) {
 #route-content .composer-controls .composer-scene { grid-template-columns:1fr; }
 #route-content .composer-controls .composer-utilities { align-items:stretch; }
 #route-content .composer-controls .composer-utilities label:has(.composer-quantity-input) { flex-basis:100%; }
}
