/* Editable storyboard layout. */
/* Shared glass header and calm activity animation for image/video generation. */
html body .cc .cc-media-node.task-active>header{background:rgba(29,35,43,.38)!important;background-image:none!important;backdrop-filter:blur(14px) saturate(115%);-webkit-backdrop-filter:blur(14px) saturate(115%);border:1px solid #ffffff0c!important;box-shadow:inset 0 1px #ffffff08;opacity:1}
.cc .cc-media-node.task-active header [data-task-label],.cc .cc-media-node.task-active header .cc-media-status{display:none!important}
.cc .cc-media-node.task-active header .cc-task-feedback{width:auto;min-width:0}
.cc .cc-media-node.task-active header .cc-task-progress{display:block!important;position:absolute;left:7px;right:7px;bottom:0;height:2px!important;margin:0!important;border-radius:2px;background:#ffffff08;overflow:hidden;pointer-events:none}
.cc .cc-media-node.task-active header .cc-task-progress i{width:32%!important;background:linear-gradient(90deg,transparent,#99c8dfcc,transparent);animation:ccSharedEnergy 3.6s linear infinite!important;transition:none}
.cc .cc-generation-atmosphere{display:none;pointer-events:none}
.cc .cc-media-node.is-generating .cc-generation-atmosphere,.cc .cc-media-node.is-video-loading .cc-video-loading-visual{display:block;position:absolute;inset:-20%;z-index:0;background:radial-gradient(ellipse at 23% 32%,#59749199,transparent 53%),radial-gradient(ellipse at 77% 67%,#78608088,transparent 55%),linear-gradient(125deg,#273642,#40384c 52%,#293f43);background-size:145% 145%;filter:blur(24px);opacity:.75;animation:ccSharedAtmosphere 9s ease-in-out infinite alternate}
.cc .cc-media-node.is-generating .cc-empty-media{position:relative;z-index:1}
.cc .cc-media-node.is-generating .cc-media-surface>img{position:relative;z-index:1}
.cc .cc-media-node.is-video-loading .cc-video-spinner{animation-duration:2.4s!important}
.cc .cc-media-node.is-video-loading .cc-video-surface small{display:none}
@keyframes ccSharedEnergy{from{transform:translateX(-110%)}to{transform:translateX(420%)}}
@keyframes ccSharedAtmosphere{from{background-position:0% 20%;transform:translate3d(-3%,1%,0) scale(1)}to{background-position:100% 80%;transform:translate3d(4%,-3%,0) scale(1.08)}}
@media(prefers-reduced-motion:reduce){.cc .cc-media-node.task-active header .cc-task-progress i,.cc .cc-generation-atmosphere,.cc .cc-media-node.is-video-loading .cc-video-loading-visual,.cc .cc-media-node.is-video-loading .cc-video-spinner{animation:none!important}}
/* Quiet image-generation feedback: one status, three breathing dots, header progress. */
.cc .cc-media-node.is-generating .cc-media-surface:before,.cc .cc-media-node.is-generating .cc-media-surface:after{content:none!important;animation:none!important}
.cc .cc-media-node.is-generating .cc-empty-core em,.cc .cc-media-node.is-generating .cc-empty-core small,.cc .cc-media-node.is-generating .cc-empty-ability{display:none!important}
.cc .cc-media-node.is-generating .cc-media-surface>img{animation:none!important;filter:none;opacity:.7}
.cc .cc-generating-label{display:none;position:absolute;left:0;right:0;top:65%;z-index:3;align-items:center;justify-content:center;gap:7px;color:#e2e7ec;font-size:12px;line-height:20px;pointer-events:none}
.cc .cc-media-node.is-generating .cc-generating-label{display:flex}
.cc .cc-generating-dots{display:inline-flex;align-items:center;gap:4px;height:20px}
.cc .cc-generating-dots i{display:block;width:3px;height:3px;border-radius:50%;background:currentColor;animation:ccQuietDots 2.8s ease-in-out infinite}
.cc .cc-generating-dots i:nth-child(2){animation-delay:.25s}
.cc .cc-generating-dots i:nth-child(3){animation-delay:.5s}
.cc .cc-media-node.is-generating header [data-task-label]{display:none}
.cc .cc-media-node.is-generating header .cc-task-feedback{width:auto;min-width:0}
.cc .cc-media-node.is-generating header .cc-task-progress{display:block!important;position:absolute;left:7px;right:7px;bottom:0;height:2px!important;margin:0!important;border-radius:2px;background:#ffffff0a;pointer-events:none}
@keyframes ccQuietDots{0%,65%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-3px);opacity:1}}
@keyframes ccQuietEnergy{0%,100%{opacity:.55}50%{opacity:.95}}
@media(prefers-reduced-motion:reduce){.cc .cc-generating-dots i,.cc .cc-media-node.is-generating header .cc-task-progress i{animation:none!important}}
.cc .cc-node.type-storyboard>header{height:34px;box-sizing:border-box}
.cc .cc-node.type-storyboard .cc-storyboard-table-wrap thead{height:36px}
.cc .cc-node.type-storyboard>header .cc-drag-title{flex:0 1 auto}
.cc .cc-node.type-storyboard>header .cc-rename-node{margin-left:4px;margin-right:auto}
.cc .cc-node.type-storyboard.selected{border:1px solid #45b9e4!important;outline:none!important;box-shadow:0 8px 22px #0003!important}
.cc .cc-storyboard-table-wrap th{text-align:center;vertical-align:middle;border-bottom:2px solid #68717b66}
.cc .cc-story-col-resize{position:absolute;right:-4px;top:0;bottom:0;width:8px;cursor:col-resize;touch-action:none;z-index:3}
.cc .cc-story-col-resize:after{content:'';position:absolute;left:3px;top:7px;bottom:7px;width:1px;background:#8eb8d5;opacity:0;transition:opacity .15s}
.cc .cc-story-col-resize:hover:after{opacity:.45}
.cc .cc-storyboard-table-wrap th:first-child span{display:flex;justify-content:center;align-items:center}
.cc .cc-storyboard-table-wrap td{text-align:center;vertical-align:middle}
.cc .cc-storyboard-table-wrap td[data-story-select-column="2"]{text-align:left}
.cc .cc-storyboard-table-wrap td.cc-story-prompt{text-align:left;vertical-align:top}
.cc .cc-storyboard-table-wrap th[contenteditable]{cursor:text;outline:none;font:inherit!important;font-size:12px!important;font-weight:600!important;color:var(--text)!important;text-align:center!important;vertical-align:middle!important}
html body .cc .cc-node.type-storyboard .cc-storyboard-table-wrap table thead th{background:var(--raised,#25282e)!important;min-height:36px}
.cc .cc-storyboard-table-wrap tr.is-story-row-selected td{background:#45b9e408}
.cc .cc-storyboard-table-wrap th.is-story-column-selected{box-shadow:inset 0 -2px #45b9e4}
.cc .cc-node.type-storyboard footer{flex-wrap:nowrap!important;white-space:nowrap;gap:8px;margin-top:auto;height:32px;min-height:32px!important;padding-top:4px!important;padding-bottom:4px!important;flex:0 0 32px}
.cc .cc-node.type-storyboard>.cc-node-number{bottom:8px}
.cc .cc-node.type-storyboard>.cc-note-resize{bottom:4px}
.cc .cc-node.type-storyboard footer>span:last-child{display:flex!important;flex-wrap:nowrap!important;align-items:center;min-width:0;gap:4px!important}
.cc .cc-node.type-storyboard footer button{flex:0 0 auto}
.cc .cc-node.type-storyboard footer .cc-story-tool{display:grid;place-items:center;width:20px;height:20px;padding:3px!important;border:0;background:transparent;color:var(--muted);font-size:10px}
.cc .cc-story-tool svg{display:block;width:1em;height:1em;fill:none;stroke:currentColor;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round}
.cc .cc-story-tool svg .cc-story-tool-grid{stroke:#edf1f5;stroke-width:.7;stroke-dasharray:1 1.5;opacity:.55;stroke-linecap:butt}
.cc .cc-story-tool svg .cc-story-tool-axis{stroke-width:1.7;stroke:#79c7e6}
.cc .cc-story-tool svg .cc-story-tool-mark{stroke:#fff;stroke-width:2}
/* Unified image-operation picker and an open-ended sidebar highlight. */
html body .cc .cc-model-options>.cc-panel-field:has([data-field="imageOperation"]){grid-column:1/-1;grid-template-columns:48px minmax(0,1fr);overflow:visible}
html body .cc .cc-model-options .cc-ratio-trigger:focus-visible{outline-offset:-3px}
html body #navigation a[data-route="create"].active{border-right:0!important;border-image:none!important}
/* Creative space: fixed navigation and heading; only the collection scrolls. */
html body .workspace>#main:has(>.cc-gallery),html body .workspace>#main:has(>.wh-panel[data-history-kind]){display:flex!important;flex-direction:column;overflow:hidden!important;min-height:0;gap:0;scrollbar-gutter:auto}
html body .workspace>#main:is(:has(>.cc-gallery),:has(>.wh-panel[data-history-kind]))>.workspace-section-tabs{position:relative;top:auto;flex:0 0 40px;height:40px;min-height:40px;margin:0;padding:0;align-items:center;background:var(--bg,#101214);z-index:2}
html body .workspace>#main>.cc-gallery{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
html body .workspace>#main>.cc-gallery>header,html body .workspace>#main:has(>.wh-panel[data-history-kind])>.page-heading{flex:0 0 58px;height:58px;min-height:58px;margin:0;padding:8px 0;flex-wrap:nowrap;background:var(--bg,#101214);z-index:1}
html body .workspace>#main .cc-gallery>header h1,html body .workspace>#main:has(>.wh-panel[data-history-kind])>.page-heading h1{font-family:inherit;font-size:20px;font-weight:650;line-height:28px;height:28px}
html body .workspace>#main .cc-gallery>header>div:first-child{flex-basis:auto;overflow:hidden}
html body .workspace>#main .cc-gallery>header>div:first-child p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:18px}
html body .workspace>#main .cc-gallery-content,html body .workspace>#main>.wh-panel[data-history-kind]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;padding-top:10px}
html body .workspace>#main .cc-gallery-cloud-notice{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px}
html body .workspace>#main .cc-cloud-conflict{flex:1;min-width:0;margin:0;flex-wrap:nowrap}
html body .workspace>#main .cc-cloud-conflict>span{min-width:0}
@media(max-width:1000px){html body .workspace>#main .cc-gallery>header>div:first-child p{display:none}html body .workspace>#main .cc-cloud-conflict{flex-wrap:wrap}}
/* Compact library layout: no forced full-screen gallery or bottom disclaimer. */
html body #main:has(>.cc-gallery){min-height:0;display:block}
html body #main>.workspace-section-tabs{position:sticky;top:0;z-index:30;width:100%;max-width:100%;gap:18px;margin:0 0 12px;padding:0;min-height:0;flex:none;background:var(--theme-background,var(--bg));border-bottom:0}
html body #main>.workspace-section-tabs a{padding:7px 2px 9px;font-size:12px;line-height:1.4;min-height:0;flex:none}
html body #main>.cc-gallery{display:block;min-height:0}
html body .cc-gallery>header{gap:12px;margin:0 0 10px;padding:0 0 10px;min-height:0;flex-wrap:wrap}
html body .cc-gallery>header>div:first-child{display:flex;align-items:center;gap:14px;min-width:0;flex:1}
html body .cc-gallery>header h1{font-size:20px;line-height:1.4;min-height:0;margin:0;white-space:nowrap}
html body .cc-gallery>header>div:first-child p{margin:0;font-size:12px;line-height:1.5;max-width:none;min-width:0}
html body .cc-gallery>header>div:last-child{gap:3px;flex-shrink:0}
html body .cc-gallery .cc-gallery-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:14px;min-height:0;padding:0 0 16px;flex:none}
html body .cc-gallery .cc-gallery-toolbar:not(:has(button:not(:disabled))){display:none}
html body .cc-gallery .cc-gallery-toolbar{margin:0 0 8px}
html body .cc-gallery .cc-gallery-cloud-notice{margin:0 0 10px;padding:8px 10px;border-radius:6px;background:var(--raised);font-size:12px;line-height:1.5;color:var(--muted)}
html body #main:has(>.wh-panel[data-history-kind="artifacts"])>.page-heading,html body #main:has(>.wh-panel[data-history-kind="jobs"])>.page-heading{display:flex;align-items:center;min-height:47px;box-sizing:border-box;margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid var(--line)}
html body #main:has(>.wh-panel[data-history-kind])>.page-heading>div{display:flex;align-items:center;gap:14px;min-width:0}
html body #main:has(>.wh-panel[data-history-kind])>.page-heading h1{font-size:20px;line-height:1.4;min-height:0;margin:0;white-space:nowrap}
html body #main:has(>.wh-panel[data-history-kind])>.page-heading p{font-size:12px;line-height:1.5;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
html body .cc-gallery>header{min-height:47px;box-sizing:border-box}
.cc-cloud-conflict{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px}.cc-cloud-conflict>span{flex:1;min-width:200px}.cc-cloud-conflict button{font-size:12px;padding:4px 8px;white-space:nowrap}
@media(min-width:761px){html body #main .cc-gallery>header,html body #main:has(>.wh-panel[data-history-kind])>.page-heading{height:48px;min-height:48px;padding:0 0 10px;margin:0 0 10px;box-sizing:border-box;align-items:center}html body #main .cc-gallery>header>div:first-child,html body #main:has(>.wh-panel[data-history-kind])>.page-heading>div:first-child{height:28px;min-height:0;margin:0;padding:0;display:flex;align-items:center}html body #main .cc-gallery>header h1,html body #main:has(>.wh-panel[data-history-kind])>.page-heading h1{margin:0;padding:0;height:28px;min-height:0;line-height:28px}}
html body .cc-gallery [hidden]{display:none!important}
html body .cc-gallery .cc-sync-help{position:relative;font-size:12px;color:var(--muted)}
html body .cc-gallery .cc-sync-help summary{cursor:pointer;padding:7px 9px;white-space:nowrap;list-style:none}
html body .cc-gallery .cc-sync-help>p{position:absolute;top:100%;right:0;width:min(360px,75vw);z-index:20;white-space:normal;box-sizing:border-box;padding:14px;margin:6px 0 0;border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:0 8px 30px #0004;line-height:1.8}
body:has(.cc-gallery) .workspace-footer,body:has(.wh-panel[data-history-kind]) .workspace-footer{display:none}
@media(max-width:760px){html body .cc-gallery>header>div:first-child{flex-basis:100%;gap:10px}html body .cc-gallery>header>div:last-child{flex-wrap:wrap}html body .cc-gallery>header>div:first-child p{font-size:11px}}
body:has(.cc-gallery) .workspace-section-tabs,
body:has(.wh-panel[data-history-kind="artifacts"]) .workspace-section-tabs,
body:has(.wh-panel[data-history-kind="jobs"]) .workspace-section-tabs{
  width:100%;box-sizing:border-box;gap:24px;margin:0 0 22px;padding:0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;
}
.workspace-section-tabs a{position:relative;padding:11px 2px 13px;border-radius:0;background:transparent!important;color:var(--muted);font-size:13px;font-weight:500;text-decoration:none}
.workspace-section-tabs a.active{color:var(--text);font-weight:650}
.workspace-section-tabs a.active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:var(--accent)}
.cc-gallery>header{padding-bottom:18px;border-bottom:1px solid var(--line)}
.cc-gallery>header>div:first-child h1{min-height:31px}
.cc-gallery>header>div:first-child p{margin-top:7px;font-size:13px;line-height:1.6}
.cc-gallery>header>div:last-child{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.cc-gallery>header>[data-library="backup-settings"],.cc-gallery>header>[data-library="trash"],.cc-gallery>header>div:last-child>[data-library="backup-settings"],.cc-gallery>header>div:last-child>[data-library="trash"]{display:inline-flex!important}
.cc-gallery>header [data-library="cloud-restore"],.cc-gallery>header [data-library="backup-settings"],.cc-gallery>header [data-library="trash"]{border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:12px;padding:7px 9px;box-shadow:none}
.cc-gallery>header [data-library="cloud-restore"]:hover,.cc-gallery>header [data-library="backup-settings"]:hover,.cc-gallery>header [data-library="trash"]:hover{background:var(--raised);color:var(--text)}
.cc-gallery>header [data-library="new"]{border-radius:7px;padding:8px 13px;font-size:12px;font-weight:600;box-shadow:none}
.cc-gallery-toolbar{min-height:0;padding:0;margin:0;border:0}
.cc-gallery .cc-gallery-grid{padding:14px 0 10px}
.wh-panel{gap:12px}.wh-panel .wh-filters{padding-bottom:12px;border-bottom:1px solid var(--line)}
.wh-selection-tools{display:flex;align-items:center;justify-content:space-between;min-height:28px;gap:12px;color:var(--muted);font-size:11px}
.wh-selection-tools button{padding:5px 9px;font-size:11px;border:1px solid var(--line);border-radius:6px;background:transparent}
.wh-selection-tools button:not(:disabled):hover{background:var(--raised)}
.wh-panel .result-grid{padding:4px 0 10px}.wh-panel .result-card{overflow:hidden}
.wh-panel .result-card.selected{outline:2px solid var(--accent);outline-offset:2px}
.results-marquee{position:fixed;z-index:9999;pointer-events:none;border:1px solid var(--accent);background:color-mix(in srgb,var(--accent) 18%,transparent)}
.results-context-menu[data-history-menu]{position:fixed;z-index:10000;min-width:150px;padding:5px;border:1px solid var(--line);border-radius:8px;background:var(--panel);box-shadow:0 10px 30px #0006}
.results-context-menu[data-history-menu] button{display:block;width:100%;padding:8px;border:0;border-radius:5px;background:transparent;color:var(--text);font-size:12px;text-align:left}.results-context-menu[data-history-menu] button:hover{background:var(--raised)}
.wh-panel .result-preview{position:relative;overflow:hidden;background:var(--raised);cursor:default}
.wh-panel .result-preview img{opacity:.38;filter:blur(8px);transition:opacity .26s ease,filter .3s ease}
.wh-panel .result-preview img.is-ready{opacity:1;filter:none}
.wh-panel .result-preview:not(:has(img))::after{content:"预览暂不可用";position:absolute;inset:auto 6px 12px;text-align:center;font-size:11px;color:var(--muted)}
.wh-jobs-table{width:100%;border-collapse:collapse}.wh-jobs-table th,.wh-jobs-table td{padding:10px 12px;text-align:left;white-space:nowrap}.wh-jobs-table th:nth-child(3),.wh-jobs-table td:nth-child(3){font-variant-numeric:tabular-nums}
.wh-jobs-table tr+tr{border-top:1px solid var(--line)}
.wh-loading-table,.wh-loading-grid{pointer-events:none}
.wh-loading-table td{height:65px;vertical-align:middle}
.wh-placeholder{display:block;width:100%;height:11px;border-radius:5px;background:#ffffff11;animation:wh-soft-pulse 1.7s ease-in-out infinite;animation-delay:calc(var(--row,0)*45ms)}
.wh-placeholder.long{width:65%;margin:2px 0 10px}.wh-placeholder.short{width:34%}.wh-placeholder.medium{width:58%}.wh-placeholder.pill{width:48%;height:18px;border-radius:5px}
.wh-loading-grid .result-preview.wh-placeholder{height:auto;aspect-ratio:1.35;border-radius:0;animation:none;background:#ffffff0b}
.wh-loading-grid .result-info{min-height:50px;align-content:center;gap:9px}
.wh-loading-grid .result-info .wh-placeholder{height:9px}
@keyframes wh-soft-pulse{0%,100%{opacity:.48}50%{opacity:.78}}
@media(max-width:700px){.workspace-section-tabs{gap:14px}.workspace-section-tabs a{font-size:12px}.cc-gallery>header>div:last-child{gap:2px}.wh-selection-tools span{display:none}.wh-jobs-table th,.wh-jobs-table td{padding:8px 6px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.wh-panel .result-preview img{transition:none}.wh-placeholder{animation:none}}
/* The first two breadcrumb slots are identical on canvas and ordinary pages. */
html body .topbar-start>.breadcrumb,html body .topbar-start>.breadcrumb.cc-breadcrumb{grid-template-columns:66px 14px 80px 14px minmax(0,112px)!important;width:286px!important;min-width:286px!important;max-width:286px!important;column-gap:0!important;font-size:12px!important;line-height:1.2!important}
html body .topbar-start>.breadcrumb:not(.cc-breadcrumb){grid-template-columns:66px 14px 80px!important;width:160px!important;min-width:160px!important;max-width:160px!important}
html body .topbar-start>.breadcrumb.cc-breadcrumb>#crumb{display:contents!important}
html body .topbar-start>.breadcrumb.cc-breadcrumb .cc-personal-label,html body .topbar-start>.breadcrumb.cc-breadcrumb .cc-workspace-label,html body .topbar-start>.breadcrumb:not(.cc-breadcrumb)>#crumb{justify-content:flex-start!important;text-align:left!important;padding:0 6px!important;font-size:12px!important}
html body .topbar-start>.breadcrumb.cc-breadcrumb .cc-crumb-separator,html body .topbar-start>.breadcrumb:not(.cc-breadcrumb)>span{width:14px!important;text-align:center!important}
@media(max-width:950px){html body .topbar-start>.breadcrumb,html body .topbar-start>.breadcrumb.cc-breadcrumb{grid-template-columns:60px 12px 72px 12px minmax(0,80px)!important;width:236px!important;min-width:236px!important;max-width:236px!important}html body .topbar-start>.breadcrumb:not(.cc-breadcrumb){grid-template-columns:60px 12px 72px!important;width:144px!important;min-width:144px!important;max-width:144px!important}}
/* Canvas now uses the same two-level breadcrumb as the other creative tabs. */
html body .topbar-start>.breadcrumb:not(.cc-breadcrumb)>.cc-personal-label{width:100%!important;min-width:0!important;padding:0 6px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;font-size:12px!important}
html body .topbar-start>.breadcrumb:not(.cc-breadcrumb)>#crumb{font-weight:600!important}
html body .topbar-start>.breadcrumb #crumb>.cc-gallery-link{display:inline-flex!important;align-items:center!important;min-height:30px;padding:0 2px!important;color:inherit;text-decoration:none;white-space:nowrap;font-weight:600}
html body .topbar-start>.breadcrumb #crumb>.cc-gallery-link:hover{color:var(--accent)}
/* Give the canvas return label its full width and keep glyph descenders clear. */
html body:has(.cc) .topbar-start>.breadcrumb:not(.cc-breadcrumb){grid-template-columns:66px 14px 124px!important;width:204px!important;min-width:204px!important;max-width:204px!important}
html body:has(.cc) .topbar-start>.breadcrumb:not(.cc-breadcrumb)>#crumb{min-height:34px!important;overflow:visible!important;line-height:1.5!important;padding-block:2px!important}
html body .topbar #accountButton #displayName{display:flex!important;align-items:center!important;min-height:32px!important;line-height:1.6!important;padding-bottom:2px!important;box-sizing:border-box!important}
@media(max-width:950px){html body:has(.cc) .topbar-start>.breadcrumb:not(.cc-breadcrumb){grid-template-columns:60px 12px 124px!important;width:196px!important;min-width:196px!important;max-width:196px!important}}
/* Uniform project cards: cover, name, compact facts, sync state, actions. */
.cc-gallery .cc-gallery-grid{grid-template-columns:repeat(auto-fill,minmax(260px,304px));gap:16px;align-content:start}
.cc-gallery .cc-canvas-card{display:flex;flex-direction:column;min-height:274px;border:1px solid color-mix(in srgb,var(--line) 88%,white 12%);border-radius:13px;background:color-mix(in srgb,var(--panel) 92%,var(--bg));box-shadow:0 6px 18px #00000016;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.cc-gallery .cc-canvas-card:hover{border-color:color-mix(in srgb,var(--accent) 37%,var(--line));box-shadow:0 12px 28px #0000002b;transform:translateY(-2px)}
#main .cc-gallery .cc-card-preview{height:168px;flex:0 0 168px;padding:7px;background:#181b20;border-bottom:1px solid var(--line)}
.cc-gallery .cc-card-preview img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:3px}
.cc-gallery .cc-card-heading{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px;padding:10px 12px 0;min-height:34px}
.cc-gallery .cc-card-heading h2{font-size:13px!important;line-height:1.4;font-weight:650;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cc-gallery .cc-card-heading time,.cc-gallery .cc-card-heading span{font-size:11px;color:var(--muted);white-space:nowrap;line-height:1.4}
.cc-gallery .cc-card-heading time{max-width:108px;overflow:hidden;text-overflow:ellipsis}
.cc-gallery .cc-card-status{min-height:23px;margin:5px 12px 0;color:var(--muted);font-size:11px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc-gallery .cc-card-status:not(.error):has(progress){white-space:normal;overflow:visible}
.cc-gallery .cc-card-status:not(.error):not(:has(progress)){color:color-mix(in srgb,var(--accent) 68%,var(--muted))}
.cc-gallery .cc-card-actions{margin-top:auto;padding:5px 9px;border-top:1px solid var(--line);gap:3px}
#main .cc-gallery .cc-card-actions button{border:0;border-radius:6px;padding:4px 7px;color:var(--muted);font-size:11px}
#main .cc-gallery .cc-card-actions button:hover{background:var(--raised);color:var(--text)}
@media(max-width:700px){.cc-gallery .cc-gallery-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))}}
@media(prefers-reduced-motion:reduce){.cc-gallery .cc-canvas-card{transition:none}.cc-gallery .cc-canvas-card:hover{transform:none}}
/* Works share one calm preview and provenance treatment. */
.result-info .result-title{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.result-info .result-title h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.result-source{flex:none;font-size:10px;color:var(--muted);border:1px solid var(--line);border-radius:99px;padding:2px 7px;white-space:nowrap}
.result-source.is-expired{color:#d6aa83;border-color:#a576584f}
.result-source.is-cloud{color:#a8d7ef;border-color:#75bce052;background:#75bce012}
#detailDialog:has(.artwork-detail){width:min(830px,calc(100vw - 28px));max-height:min(90vh,900px);padding:20px;background:#1c1e22;border-color:#41454c}
#detailDialog:has(.artwork-detail) .dialog-heading{margin-bottom:15px}
.artwork-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,255px);gap:18px;min-width:0}
.artwork-preview{min-height:340px;max-height:min(68vh,610px);display:grid;place-items:center;overflow:hidden;border:1px solid #ffffff12;border-radius:12px;background:#121418}
.artwork-preview img,.artwork-preview video{display:block;max-width:100%;max-height:min(68vh,610px);object-fit:contain}
.artwork-preview video{width:100%;height:auto}
.artwork-meta{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:4px 1px}
.artwork-source{display:inline-flex;align-items:center;border:1px solid #75bce044;border-radius:99px;background:#75bce013;color:#a8d7ef;padding:5px 10px;font-size:11px;font-weight:600}
.artwork-meta p,.artwork-unavailable p{font-size:12px;line-height:1.65;color:var(--muted)}
.artwork-facts{width:100%;margin:0;display:grid;gap:0}
.artwork-facts>div{padding:9px 0;border-bottom:1px solid var(--line)}
.artwork-facts dt{font-size:10px;color:var(--muted);margin-bottom:4px}
.artwork-facts dd{margin:0;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.artwork-meta .detail-actions{margin-top:auto;width:100%}
.artwork-meta .detail-actions a,.artwork-meta .detail-actions button{display:inline-flex;justify-content:center;width:100%;border:1px solid #75bce05e;border-radius:8px;background:#75bce020;color:#d7f0ff;font-size:12px;padding:9px 12px;cursor:pointer}
.artwork-unavailable{display:grid;grid-template-columns:1fr;gap:12px;padding:24px;border:1px solid var(--line);border-radius:12px;background:#17191d}
.artwork-unavailable .artwork-facts{max-width:500px}
@media(max-width:700px){.artwork-detail{grid-template-columns:1fr}.artwork-preview{min-height:220px;max-height:50vh}.artwork-preview img,.artwork-preview video{max-height:50vh}.artwork-meta .detail-actions{margin-top:2px}}
/* Small work cards: a fixed action cluster and a single-line, truthful state. */
#main .result-info{display:grid;gap:6px;min-width:0;padding:8px 9px 9px}
#main .result-info .result-title{display:block;min-width:0;line-height:1.2}
#main .result-info .result-title h3{margin:0;font-size:12px;line-height:18px;min-width:0}
#main .result-info .result-foot{display:flex;align-items:center;justify-content:space-between;gap:4px;min-width:0;min-height:30px}
#main .result-status{display:inline-flex;align-items:center;gap:5px;min-width:0;color:#a6abb3;font-size:10px;line-height:1.2;white-space:nowrap}
#main .result-status-label{overflow:hidden;text-overflow:ellipsis}
#main .result-status-dot{display:block;flex:none;width:6px;height:6px;border-radius:50%;background:#9298a2}
#main .result-status.is-cloud .result-status-dot{background:#64cba9}
#main .result-status.is-saving .result-status-dot{background:#75bce0}
#main .result-status.is-retrying .result-status-dot{background:#d8ad6a}
#main .result-status.is-expired .result-status-dot{background:#c98775}
#main .result-status.is-cloud{color:#9bd8c5}
#main .result-status.is-expired{color:#d7a897}
#main .result-actions{display:flex;align-items:center;gap:3px;flex:none}
#main .result-info .result-icon-action{display:grid;place-items:center;flex:none;width:28px;height:28px;padding:0;border:0;border-radius:7px;background:transparent;color:#aeb6be}
#main .result-info .result-icon-action:hover{background:#ffffff12;color:#fff}
#main .result-icon-action .icon{width:15px;height:15px}
/* Keep an existing thumbnail visible while the full work is decoded. */
.artwork-preview{position:relative}
.artwork-preview .artwork-preview-soft{max-width:100%;max-height:min(68vh,610px);filter:blur(13px);opacity:.58;transform:scale(1.025)}
.artwork-preview .artwork-preview-full{position:absolute;inset:0;margin:auto;opacity:0;filter:blur(9px);transition:opacity .28s ease,filter .38s ease}
.artwork-preview .artwork-preview-full.is-ready{opacity:1;filter:none}
.artwork-preview .artwork-preview-wait{position:absolute;left:14px;bottom:12px;padding:5px 8px;border-radius:6px;background:#14161bd9;color:#c1c8d0;font-size:11px}
.artwork-preview.is-ready .artwork-preview-wait{display:none}
.artwork-preview.is-unavailable .artwork-preview-wait{color:#dfae9f}
@media(prefers-reduced-motion:reduce){.artwork-preview .artwork-preview-full{transition:none;filter:none}}
/* Shared canvas node appearance; preserve custom text-node dimensions. */
.cc .cc-node:is(.type-text,.type-image,.type-material,.type-result,.type-video,.type-prompt){background:#1c1e22!important}
.cc .cc-media-node .cc-video-surface,.cc .cc-media-node .cc-media-surface{background:transparent!important}
.cc .cc-node:is(.type-text,.type-image,.type-material,.type-result,.type-video,.type-prompt)>header{background:#363b43!important;color:#f4f6f8}
.cc .cc-media-node>.cc-port:is(.port-reference,.port-media)::after{background:#5bdea1!important}
.cc .cc-media-node>.cc-port.port-control::after{background:#8a9bff!important}
.cc .cc-media-node>.cc-port.in{opacity:1;transform:none}
.cc .cc-empty-image-icon{width:52px;height:46px;fill:none;stroke:#dce0e4;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.cc .cc-media-node .cc-empty-core{gap:5px}
.cc .cc-media-node .cc-empty-core em{font-size:11px;font-weight:400;line-height:1.4}
.cc .cc-node:is(.type-prompt,.type-text,.type-image,.type-material,.type-result,.type-video)>.cc-port{opacity:0!important;transition:opacity .18s ease!important}
.cc .cc-node:is(.type-prompt,.type-text,.type-image,.type-material,.type-result,.type-video):hover>.cc-port,.cc .cc-node>.cc-port:focus-visible,.cc:has(.cc-port.linking) .cc-node>.cc-port{opacity:1!important}
@media(hover:none){.cc .cc-node:is(.type-prompt,.type-text,.type-image,.type-material,.type-result,.type-video)>.cc-port{opacity:1!important}}
@media(prefers-reduced-motion:reduce){.cc .cc-node>.cc-port{transition:none!important}}
.cc .cc-media-node .cc-empty-media .cc-empty-ability{bottom:28px;left:16px;right:16px;font-size:10px;line-height:1.45;-webkit-line-clamp:3}
/* Quiet canvas: routine success feedback belongs in the nodes, not the footer. */
html body .cc .cc-tip{display:none!important}
html body .cc .cc-status:empty{display:none!important}
/* Storyboard assembly is explicit and separate from paid generation. */
.cc-storyboard-compose{width:min(660px,calc(100vw - 32px));max-height:85vh;overflow:auto;color:#e7e9ed;background:#202328;border:1px solid #ffffff20;border-radius:12px;padding:18px}
.cc-storyboard-compose header,.cc-storyboard-compose footer{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cc-storyboard-compose header h3{margin:0;font-size:16px}.cc-storyboard-compose header button{border:0;background:transparent;color:inherit;font-size:22px}
.cc-storyboard-compose .cc-compose-note{font-size:12px;line-height:1.6;color:#aeb5be}
.cc-compose-shot{padding:12px 0;border-top:1px solid #ffffff12}.cc-compose-shot b{display:block;margin-bottom:7px;font-size:12px}
.cc-compose-shot select{width:100%;padding:7px;background:#292d34;border:1px solid #ffffff20;color:inherit;border-radius:6px}
.cc-compose-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0;font-size:12px}.cc-compose-controls input{width:80px;margin-left:6px;padding:5px;background:#16191e;color:inherit;border:1px solid #ffffff20;border-radius:5px}
.cc-compose-shot video{display:block;width:100%;max-height:180px;background:#131518;border-radius:6px}.cc-compose-shot video[hidden]{display:none}
.cc-storyboard-compose button{padding:5px 9px;color:inherit;background:#30353e;border:1px solid #ffffff18;border-radius:6px;cursor:pointer}.cc-storyboard-compose button:disabled{opacity:.5;cursor:wait}.cc-storyboard-compose button.primary{background:#1766a0}
.cc-compose-error{font-size:12px;color:#ffb5ad;white-space:pre-wrap}.cc-compose-error:empty{display:none}

.cc .cc-video-surface .cc-video-busy-backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:blur(4px) brightness(.38);pointer-events:none;z-index:0}.cc .is-video-loading .cc-video-surface:has(.cc-video-busy-backdrop) .cc-video-loading-visual{opacity:.48}.cc .is-video-loading .cc-video-loading-label{font-size:12px;font-weight:500}.cc .is-video-loading .cc-video-surface small{font-size:10px;color:#c7cdd5;text-align:center;padding:0 12px}

.cc .cc-video-surface .cc-video-loading-visual{position:absolute;inset:-12%;z-index:0;background:radial-gradient(circle at 24% 30%,#5b6f9e 0 15%,transparent 42%),radial-gradient(circle at 75% 68%,#806b96 0 18%,transparent 46%),linear-gradient(125deg,#25364a,#4a3b58 52%,#263f45);filter:blur(15px);opacity:.72;animation:ccVideoGlow 3.2s ease-in-out infinite alternate}.cc .cc-video-spinner,.cc .cc-video-loading-label,.cc .is-video-loading .cc-video-surface small{position:relative;z-index:1}.cc .cc-video-spinner{width:28px;height:28px;border:2px solid #ffffff35;border-top-color:#eef4ff;border-radius:50%;animation:ccVideoSpin .85s linear infinite}.cc .cc-video-loading-label{font-size:11px;color:#f0f3f8}.cc .is-video-loading .cc-video-surface{overflow:hidden;background:#29303a!important}@keyframes ccVideoSpin{to{transform:rotate(360deg)}}@keyframes ccVideoGlow{from{transform:scale(1) translate3d(-2%,0,0)}to{transform:scale(1.08) translate3d(2%,-1%,0)}}@media(prefers-reduced-motion:reduce){.cc .cc-video-spinner,.cc .cc-video-surface .cc-video-loading-visual{animation:none}}
.cc .is-video-loading .cc-video-surface{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;position:relative}.cc .is-video-loading .cc-video-spinner{display:block;flex-shrink:0}
