/* Shared studio surfaces. The canvas keeps its own light editing palette. */
:root {
  color-scheme: dark;
  --bg: #121315; --surface: #1b1c20; --surface-strong: #222328;
  --text: #f0f0f3; --muted: #a5a6b1; --subtle: #858693;
  --line: #2b2c33; --line-strong: #41424d;
  --accent: #8152f5; --accent-deep: #a98aff; --accent-strong: #bda5ff;
  --accent-soft: #a17aff1a; --danger: #ff7d89;
  --primary-gradient: linear-gradient(110deg, #8547ed, #6040ed 65%, #5035df);
  --shadow: 0 20px 64px #0005; --shadow-soft: none;
  --sidebar: 208px; --topbar: 72px; --shell: 1540px;
  background: var(--bg); font-size: 14px;
}
body, .app { background: var(--bg); }
body { overflow-x: clip; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }
button, a { touch-action: manipulation; }
button { transition: background 160ms, border-color 160ms, color 160ms, opacity 160ms; }
button:disabled { opacity: .45; }
:focus-visible { outline: 2px solid #b49aff; outline-offset: 3px; }
input::placeholder, textarea::placeholder { color: #858693; opacity: 1; }
svg { stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.uiIcon { display: inline-block; width: 19px; height: 19px; flex: 0 0 19px; background: currentColor; mask: var(--icon) center / contain no-repeat; -webkit-mask: var(--icon) center / contain no-repeat; vertical-align: middle; }
.sidebar { display: flex; width: var(--sidebar); height: 100dvh; right: auto; padding: 34px 18px 24px; flex-direction: column; align-items: stretch; gap: 40px; background: #17181b; border: 0; border-right: 1px solid #24252a; box-shadow: none; backdrop-filter: none; }
.mobileTop { display: none; }
.brand { padding: 0 10px; }
.brandMark { padding: 0; gap: 12px; border-radius: 0; background: none; box-shadow: none; font-size: 20px; font-weight: 650; height: 36px; color: #f7f7f9; white-space: nowrap; }
.brandSymbol { font-size: 28px; font-weight: 800; font-style: italic; color: #b79cff; }
.sideNav { flex: 0 0 auto; width: 100%; display: grid; grid-template-columns: minmax(0,1fr); justify-content: stretch; gap: 10px; padding: 0; overflow: visible; }
.navItem span:not(.uiIcon) { font-size: 14px; line-height: 1.5; font-weight: 450; }
.navItem { position: relative; display: flex; justify-content: flex-start; gap: 14px; width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid transparent; border-radius: 7px; background: none; color: #a9aab5; font-size: 14px; font-weight: 500; }
.navItem .uiIcon { width: 20px; height: 20px; flex-basis: 20px; }
.navItem:hover { background: #222328; color: #f4f2fa; transform: none; }
.navItem.active { background: #9b73ff14; border-color: #a384fc1a; color: #d5c5ff; box-shadow: none; }
.navItem.active::before { content: ''; position: absolute; width: 3px; height: 20px; left: -1px; top: 13px; border-radius: 2px; background: var(--primary-gradient); }
.sideFoot { margin-top: auto; width: 100%; display: grid; grid-template-columns: 1fr; gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.points { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 10px 12px; background: transparent; border: 0; border-radius: 6px; color: var(--muted); }
.points small { font-size: 12px; }.points strong { color: var(--text); font-size: 14px; }
.loginBtn { background: #25262c; border: 1px solid #35363f; color: #e9e7f0; border-radius: 7px; min-height: 40px; font-weight: 500; }
main { padding-top: 0; padding-left: var(--sidebar); }
.workspaceHeader { height: var(--topbar); max-width: var(--shell); padding: 0 48px; margin: auto; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid #25262b; color: var(--muted); font-size: 13px; }
.workspaceHeader strong { color: #dedde7; font-weight: 500; }.workspaceHeader .headerDivider { color: #555661; }
.scrollRoot { height: auto; min-height: calc(100dvh - var(--topbar)); overflow: visible; padding-bottom: 64px; scrollbar-width: thin; }
.shell { padding: 42px 48px 0; overflow: visible; }
.pageHost { padding: 0; min-height: 0; }
.moduleTop { height: auto; min-height: 62px; margin: 0 0 36px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; align-items: center; flex-wrap: wrap; }
.moduleTitle, .projects h1 { font-size: 26px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.moduleSub { color: var(--muted); margin-top: 8px; font-size: 13px; font-weight: 400; }
.moduleButton, .btn.primary, .templateGenerateButton { background: var(--primary-gradient); color: #fff; border: 1px solid #ffffff15; box-shadow: inset 0 1px 0 #ffffff12; border-radius: 7px; min-height: 44px; padding: 11px 20px; font-size: 14px; font-weight: 550; gap: 10px; }
.moduleButton:hover, .btn.primary:hover, .templateGenerateButton:hover { filter: brightness(1.1); }
.chip, .btn.secondary, .miniButton, .statusPill, .moduleTop .statusPill, .moduleTop .chip { background: #222328; color: #c1c1cd; border: 1px solid #34353e; border-radius: 6px; min-height: 36px; font-weight: 450; box-shadow: none; }
.chip:hover, .chip.active, .miniButton:hover { background: #282430; border-color: #8061c7; color: #d8caff; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.statusPill { font-size: 12px; }.statusPill.ready { color: #8bdbb1; background: #173428; border-color: #28513d; }
.field, .optionGrid select, .optionGrid input, .modelSelect select, .searchBox, .templateSearch { background: #202126; border: 1px solid #383943; border-radius: 6px; color: var(--text); box-shadow: none; font-weight: 400; }
.field { min-height: 42px; padding: 10px 12px; }
.field:focus, .promptBox:focus, .modelSelect select:focus { border-color: #9470ef; box-shadow: 0 0 0 3px #a47eff13; }
.modelSelect select, .optionGrid select { min-height: 44px; padding: 10px 12px; }
.optionGrid label, .modelSelect { color: #b6b5c3; font-size: 12px; font-weight: 450; }
.panelHead { min-height: 36px; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.panelHead h2 { font-size: 17px; font-weight: 550; }.meta { color: var(--muted); }
.modulePanel, .modulePanel.pad { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; backdrop-filter: none; }
.studioStatus { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.studioStatus::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #96939e; }
.generationLayout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 44px; align-items: start; }
.generationLayout > * { min-width: 0; }
.generationPreview .panelHead, .generationComposer .panelHead { margin-bottom: 24px; }
.generationPreview .resultBox { width: 100%; min-width: 0; min-height: 330px; display: flex; flex-direction: column; justify-content: center; background: #191a1e; border: 1px solid #2d2e35; border-radius: 8px; color: #b9b8c5; padding: 24px; font-size: 13px; white-space: pre-wrap; overflow: auto; }
.generationPreview .resultBox:has(.studioEmpty) { aspect-ratio: 4 / 3; }
.studioEmpty { text-align: center; display: grid; justify-items: center; align-content: center; gap: 16px; white-space: normal; }
.studioEmpty .emptyMediaMark { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid #3b374b; border-radius: 8px; background: #a783ff08; color: #a590cb; }
.studioEmpty .uiIcon { width: 28px; height: 28px; }
.studioEmpty strong { font-weight: 450; font-size: 14px; color: #aca9b8; }
.resultBox img, .resultBox video { max-width: 100%; height: auto; max-height: 580px; object-fit: contain; border-radius: 6px; }
.generationRecent { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.generationRecent .panelHead { margin-bottom: 16px; }
.generationRecent .panelHead h2 { font-size: 14px; color: #b7b6c3; }
.textButton { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #bcb3d2; padding: 8px 0; font-size: 12px; }
.textButton:hover { color: #d6c5ff; }
.generationRecent > p { color: var(--subtle); font-size: 13px; margin: 24px 0; }
.generationRecent .assetCard { margin-bottom: 12px; }.generationRecent .assetOpen { grid-template-columns: 84px minmax(0,1fr); }
.generationRecent .assetThumb { min-height: 76px; aspect-ratio: 1; }.generationRecent .assetInfo { padding: 12px 40px 12px 16px; }
.generationComposer { padding-top: 0; }
.sectionLabel { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 14px; color: #bcbac8; font-size: 13px; }
.referencePanel { padding: 0; border: 0; border-radius: 0; background: none; gap: 16px; margin: 0 0 30px; }
.referencePanel.dragging { background: #9c74fc0c; outline: 1px dashed #9b7be3; outline-offset: 8px; }
.referencePanelHead { gap: 12px; }.referencePanelHead span { font-size: 12px; color: var(--subtle); }
.referencePreviewGrid { gap: 12px; }
.referencePreviewGrid:empty { min-height: 94px; border: 1px dashed #3a3942; border-radius: 7px; background: #ffffff02; }
.referenceEmpty { width: 100%; height: 104px; display: flex; gap: 12px; align-items: center; justify-content: center; border: 1px dashed #45404f; border-radius: 7px; color: #b4a6cb; background: #ffffff02; font-size: 13px; }
.referenceEmpty:hover { border-color: #a07bdc; background: #8b64ce0c; }
.referencePanel:has(.referenceEmpty) .referencePanelHead { display: none; }
.referenceThumb { width: 104px; border: 1px solid #36363f; border-radius: 7px; background: #1e1f23; box-shadow: none; }
.referenceThumb img, .referenceThumb video { aspect-ratio: 1; object-fit: contain; background: #161719; }
.referenceThumb span { font-size: 11px; padding: 9px 8px; font-weight: 400; }
.referenceAlias { border-radius: 4px; background: #19151fdd; font-weight: 500; font-size: 10px; }
.referenceRemoveButton { width: 24px; height: 24px; background: #141318e8; font-size: 16px; border: 1px solid #ffffff25; }
.referenceRemoveButton:hover { background: #552533; }
.promptBox { background: #1e1f24; border: 1px solid #37363f; border-radius: 7px; min-height: 166px; padding: 18px; line-height: 1.9; font-size: 14px; font-weight: 400; }
.promptActions { margin: 10px 0 28px; gap: 8px; }.promptActions .chip { font-size: 12px; min-height: 32px; padding: 6px 10px; }
.promptActions .promptIcon { width: 32px; height: 32px; padding: 6px; background: transparent; border-color: transparent; }
.promptActions .promptIcon:hover { background: #2c2539; border-color: #594774; }
.mentionMenu { background: #24232d; border: 1px solid #5f497d; border-radius: 8px; box-shadow: 0 12px 30px #0005; }
.mentionOption { background: none; color: #e6dff4; }.mentionOption.active, .mentionOption:hover { background: #a47dfc1a; }.mentionOption b { color: #c2a8ff; }.mentionOption span { color: var(--muted); }
.generationSettings { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 24px; border-top: 1px solid var(--line); margin: 0; }
.generationSettings .durationField { grid-column: 1 / -1; }.generationSettings label { gap: 10px; }
.durationControl { grid-template-columns: minmax(0,1fr) 64px auto; gap: 14px; }.durationControl input[type=number] { height: 44px; font-weight: 500; }
.durationControl input[type=range] { accent-color: #9263fa; }
.generationSubmit { width: 100%; margin-top: 28px; min-height: 46px; justify-content: space-between; }
.modelSelect { gap: 12px; }.modelSelect select { min-width: 140px; max-width: 100%; }
.chatShell { grid-template-columns: 188px minmax(0,1fr); background: none; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.aiWorkspace { min-height: 440px; height: min(620px,calc(100dvh - 240px)); }
.aiWorkspace .chatMain { height: auto; min-height: 0; }
.chatList { padding: 8px 22px 0 0; background: none; border-right: 1px solid var(--line); }
.chatList label { color: var(--muted); font-size: 12px; }.chatList button { margin: 6px 0; padding: 12px; font-size: 13px; font-weight: 450; }
.chatList button.active, .chatList button:hover { background: #a57dff13; color: #d3c2f6; }
.chatMain { padding: 6px 0 0 36px; gap: 20px; }.chatHero { display: none; }
#chatMessages { min-height: 300px; max-height: 560px; padding-right: 10px; flex: 1; }
.message { max-width: 90%; border-radius: 8px; padding: 16px 18px; font-size: 14px; line-height: 1.85; margin-bottom: 22px; }
.message.ai { background: #1a1b1f; border: 1px solid #2a2a33; }.message.user { background: #322747; margin-left: auto; color: #eee7ff; }
.chatComposer { padding: 12px; gap: 12px; border: 1px solid #45414f; border-radius: 8px; background: #202025; }.chatComposer:focus-within, .chatComposer.attention { background: #222126; border-color: #9671e8; box-shadow: 0 0 0 3px #986dfa0c; }
.chatComposer textarea { min-height: 44px; }.chatHint { display: none; }
.projects { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; border-radius: 0; }
.projects > header { margin-bottom: 32px; flex-wrap: wrap; gap: 20px; }.projects h1 { margin: 0; }.dateHead { margin-top: 32px; }
.createTile { background: #fff; border-color: #e1e4e9; border-radius: 8px; }
.createSquare { background: #fafbfc; border-color: #dfe3e9; border-radius: 8px 8px 0 0; }
.plusBadge { background: #30263e; color: #c4a6ff; box-shadow: none; }
.canvasCard .previewSquare { background: #f5f7fa; border-radius: 8px 8px 0 0; }
.canvasCard .previewSquare::before { background: #e7ebf1; border-color: #d4dbe5; box-shadow: none; }
.canvasCard .previewSquare::after { background: repeating-linear-gradient(0deg,#c8d0dd99 0 9px,transparent 9px 18px); }
.canvasCard .previewSquare.hasMedia::before, .canvasCard .previewSquare.hasMedia::after { display: none; }
.canvasProjectMedia { width: 100%; height: 100%; display: block; object-fit: cover; background: #f5f7fa; }
.canvasProjectCount { position: absolute; left: 10px; bottom: 10px; z-index: 3; padding: 5px 8px; border: 1px solid #ffffff1f; border-radius: 5px; background: #ffffffe8; color: #5c6778; font-size: 11px; line-height: 1; backdrop-filter: blur(8px); }
.canvasCard, .toolCard, .assetCard { background: #1c1d21; border: 1px solid #303139; border-radius: 8px; box-shadow: none; }
.canvasCard:hover, .toolCard:hover, .assetCard:hover { background: #222127; border-color: #7c5bb7; box-shadow: none; transform: none; }
.previewSquare { background-color: #25232e; }.actions { background: #1d1c24e8; }.actions button { background: #302b3b; color: #e8dcff; }
.toolGrid { gap: 24px; }.toolCard { padding: 28px; min-height: 190px; gap: 22px; }
.toolIcon { width: 44px; height: 44px; border: 1px solid #9c7ac633; background: #a17aff12; color: #bba0ef; border-radius: 8px; }.toolIcon .uiIcon { width: 22px; height: 22px; }
.toolCard { justify-content: flex-start; }
.toolCard strong { font-size: 17px; font-weight: 550; color: var(--text); }
.toolCardTop { display: flex !important; align-items: center; justify-content: space-between; gap: 16px; margin: 0 !important; color: inherit !important; font-size: inherit !important; }
.toolCardTop small { color: var(--subtle); font-size: 12px; font-weight: 450; }
.toolCardBody { display: grid !important; gap: 14px; margin: 0 !important; color: inherit !important; font-size: inherit !important; }
.toolOutputTags { display: flex !important; flex-wrap: wrap; gap: 8px; margin: 0 !important; }
.toolOutputTags em { padding: 5px 8px; border: 1px solid #3b3744; border-radius: 5px; background: #232128; color: #c9bdd9; font-size: 12px; font-style: normal; }
.toolCardAction { display: flex !important; align-items: center; justify-content: space-between; width: 100%; margin: auto 0 0 !important; padding-top: 18px; border-top: 1px solid #302e36; color: #ccb7fa !important; font-size: 13px !important; }
.toolCardAction .uiIcon { width: 16px; height: 16px; flex: 0 0 16px; }
.assetLibrary { gap: 40px; }.assetSection { background: none; padding: 0; border: 0; border-radius: 0; }.assetSectionHeader { margin-bottom: 22px; }.assetSectionHeader h2 { font-size: 17px; font-weight: 500; }
.assetToolbar { gap: 14px; margin-bottom: 38px; }.assetGrid { gap: 20px; }.assetInfo strong { font-weight: 500; color: #efedf6; }.assetThumb { background: #151518; }.assetKindBadge { background: #a77cff15; color: #c6b4ef; }
.assetEmpty, .templateEmpty { border: 1px dashed #36353f; border-radius: 8px; background: #ffffff02; color: var(--muted); padding: 48px 24px; }.assetDeleteButton { background: #211e2be8; color: #c9b7e8; }
.moduleTop.templateTop { height: auto; min-height: 62px; background: none; border: 0; box-shadow: none; }
.templateDiscovery { background: none; border: 0; padding: 0; border-radius: 0; }.templateExploreHead { margin-bottom: 30px; }.templateMarketCard { display: flex; flex-direction: column; aspect-ratio: auto; border-radius: 8px; box-shadow: none; background: #1c1c21; border-color: #34323e; }.templateMasonry { gap: 20px; }
.templateMarketCard:hover { box-shadow: 0 0 0 1px #9d7be3; transform: translateY(-2px); }.templateSearch { min-height: 42px; }.templateSearch input { color: var(--text); }
.templateVisual { height: auto; aspect-ratio: 9 / 14; }
.templateBadge { display: block !important; top: 9px; left: 9px; max-width: calc(100% - 18px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 5px 8px; border: 1px solid #ffffff24; border-radius: 5px; background: #17151dcf; color: #f0e9fa; font-size: 11px; font-weight: 500; backdrop-filter: blur(8px); }
.templateStats { display: flex !important; right: 9px; bottom: 9px; padding: 5px 7px; border: 1px solid #ffffff1c; border-radius: 5px; background: #17151dcc; color: #eee7f6; font-size: 10px; font-weight: 500; text-shadow: none; backdrop-filter: blur(8px); }
.templateCardText { display: grid !important; gap: 7px; padding: 14px; }
.templateCardText strong { color: #f1edf6; font-size: 14px; font-weight: 550; }
.templateCardText span { min-height: 40px; color: #a8a3b2; font-size: 12px; font-weight: 400; }
.templateCardText small { color: #837d8d; font-size: 11px; }
.templateRequiredSlot { display: grid; place-items: center; align-content: center; gap: 5px; aspect-ratio: 1; border: 1px dashed #655471; border-radius: 6px; background: #2a2630; color: #e2d6ef; }
.templateRequiredSlot small { color: #9e93aa; font-size: 11px; }
.templateDescription { margin: 0; color: #aaa4b3 !important; font-size: 13px; line-height: 1.65; }
.dialog, .dialog.templateDialog { background: #202126; color: var(--text); border: 1px solid #3b3945; border-radius: 8px; box-shadow: var(--shadow); }
.dialog::before { display: none; }.dialogBody { padding: 28px; }.dialogHead { margin-bottom: 22px; }.closeBtn, .roundIcon { background: #2a2832; border-color: #45404e; color: #eee7fa; }
.dialog .expandedPrompt { min-height: 260px; line-height: 1.8; font-size: 14px; }
.dialog p, .dialog label { color: #b8b6c4; }.dialog .resultBox, .memberStatus, .planCard { background: #28272e; color: #ece8f5; border-color: #48424f; }
.templateDetailPreview { background: #141417; }.templateDetailSide, .templateDetailFunctional { background: #202126; border-color: #393641; }.templateScriptBox, .templatePromptBox { color: #d4d0dd; background: #191a1e; border-color: #37343f; }.templateGenerateFooter { background: #202126; border-color: #37343f; }.templateUploadButton, .templateCopyButton { color: #d3baff; background: #2c2438; border-color: #51405e; }
.templateDetailClose, .templateDetailIconButton { background: #24202ee8; color: #eee4ff; border-color: #605273; }.templatePill { background: #33253f; color: #d7baff; }
.studioStatus span[data-state="ready"] { color: #7fd6a6; }.studioStatus span[data-state="pending"] { color: #c9b7e8; }.studioStatus span[data-state="error"] { color: #ee999f; }
.studioEmpty > span:last-child { max-width: 260px; color: #777281; font-size: 12px; line-height: 1.5; }
.btn.danger { background: #502333; color: #ffd4dc; border-color: #7c3c4f; }.toast { background: #302a3b; color: #f4ecff; border: 1px solid #5d467a; border-radius: 8px; box-shadow: var(--shadow); }
/* Canvas is intentionally light, including node controls and popovers. */
.editorShell { color-scheme: light; --text: #26242d; --muted: #6e687b; --line: #e4e0eb; --accent: #8050e6; --accent-strong: #7040b6; --accent-deep: #7040b6; background: #fff; border: 1px solid #ddd9e6; border-radius: 8px; box-shadow: none; min-height: 700px; }
.editorCanvas { background-color: #fcfcfe; background-image: linear-gradient(#5e477509 1px, transparent 1px), linear-gradient(90deg,#5e477509 1px,transparent 1px); }
.editorProps { background: #fff; border: 1px solid #e5e0ed; border-radius: 8px; box-shadow: 0 8px 28px #34214814; }
.editorShell .editorProps, .editorShell .editorProps h2, .editorShell .editorProps label { color: #34303e; }
.editorShell .editorProps h2 { font-size: 14px; font-weight: 600; }
.editorShell .field, .editorShell .miniButton, .editorShell .materialItem { background: #fff; color: #34303e; border-color: #e4deec; }
.editorShell .field:focus { border-color: #9b70ed; }.editorShell .nodeBox { color: #292631; background: #fff; border-color: #e9e4ef; }
.editorShell .nodeBox.selected, .editorShell .nodeBox:hover { border-color: #986ce4; box-shadow: 0 0 0 3px #9d6deb19; }.editorShell .nodePort { background: #8955e9; }
.editorShell .nodeBox { box-shadow: 0 6px 18px #35264212; }
.editorShell .nodeBox.multiSelected, .editorShell .nodeBox.connectSource { outline-color: #986ce4; }
.editorShell .edgeLayer path, .editorShell .edgeLayer line { stroke: #a780e2; }.editorShell .edgeLayer circle { fill: #8955e9; }
.editorShell .selectionMarquee { border-color: #8a57dc; background: #9761e51c; }.editorShell .groupBox { border-color: #a385cf; background: #9873da08; }.editorShell .canvasSearchResults button { background: #f3edfc; color: #634480; }
.editorShell .floatingPanel { background: #fff; color: #292532; }.editorShell .nodeMediaFrame { background: #f7f5fb; }
[data-page="canvas-editor"] .shell { padding: 28px 28px 0; }[data-page="canvas-editor"] .moduleTop { margin-bottom: 22px; }[data-page="canvas-editor"] .moduleSub { display: none; }
.mobileBottom { display: none; }
@media (min-width: 1600px) { .generationLayout { gap: 64px; }.shell { padding: 52px 64px 0; }.generationPreview .resultBox { min-height: 430px; } }
@media (max-width: 1200px) { :root { --sidebar: 190px; }.sidebar { padding-inline: 12px; }.shell { padding: 32px 28px 0; }.workspaceHeader { padding-inline: 28px; }.generationLayout { gap: 28px; grid-template-columns: minmax(0,1fr) minmax(320px,1fr); }.chatMain { padding-left: 24px; }.chatShell { grid-template-columns: 160px minmax(0,1fr); } }
@media (max-width: 1000px) { .generationLayout { grid-template-columns: 1fr; gap: 44px; }.generationComposer { grid-row: 1; }.generationPreview { grid-row: 2; }.generationPreview .resultBox:has(.studioEmpty) { aspect-ratio: 16 / 9; min-height: 240px; }.generationRecent { margin-top: 30px; }.toolGrid { grid-template-columns: 1fr; }.chatShell { grid-template-columns: 1fr; }.chatList { display: flex; flex-wrap: wrap; align-items: center; border: 0; padding: 0 0 20px; gap: 8px; }.chatList > label { width: 100%; }.chatList button { width: auto; margin: 0; padding: 8px 10px; }.chatMain { padding: 0; }.assetGrid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  :root { --sidebar: 0px; --topbar: 0px; }
  .app { position: relative; padding-top: 66px; }
  .sidebar { display: block; position: relative; width: 100%; height: auto; padding: 0 12px; border-right: 0; border-bottom: 1px solid var(--line); background: #18191d; }
  .sidebar .brand, .sidebar .sideFoot { display: none; }.sideNav { display: flex; width: 100%; overflow-x: auto; gap: 2px; padding: 12px 0; }.navItem { width: auto; min-width: max-content; padding: 10px 12px; gap: 8px; min-height: 42px; }.navItem.active::before { display: none; }
  main { padding: 0; }.mobileTop { display: flex; position: absolute; top: 0; left: 0; width: 100%; height: 66px; background: #121315; border-color: var(--line); padding: 14px 20px; }.mobileTop .brandMark { font-size: 19px; }.workspaceHeader { display: none; }
  .shell { padding: 26px 20px 0; }.scrollRoot { height: auto; padding-bottom: 48px; }.pageHost { padding: 0; }.moduleTop { min-height: 40px; margin-bottom: 28px; gap: 16px; align-items: flex-start; text-align: left; }.moduleTitle, .projects h1 { font-size: 23px; }.generationLayout { gap: 40px; }
  .panelHead { gap: 12px; }.panelHead h2 { font-size: 16px; }.modelSelect select { min-width: 120px; }.referencePanelHead > span { width: 100%; }.referenceThumb { width: 96px; }.promptBox { min-height: 156px; padding: 14px; }
  .generationSettings { gap: 16px; }.optionGrid label { min-width: 0; }.modelSelect { min-width: 0; }.generationSubmit { min-height: 46px; }.generationPreview .resultBox { padding: 16px; }
  .chatShell, .aiWorkspace { min-height: 0; height: auto; }.chatMain { gap: 16px; }#chatMessages { min-height: 220px; max-height: 460px; }.message { max-width: 100%; }.chatComposer { padding: 8px; gap: 6px; }.chatComposer .moduleButton { padding: 10px 14px; }
  .toolGrid { gap: 16px; }.toolCard { min-height: 190px; padding: 22px; }.assetOpen { grid-template-columns: 94px minmax(0,1fr); }.assetInfo { padding: 14px; }.templateMasonry { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .dialog { width: calc(100vw - 24px); }.dialogBody { padding: 20px; }.dialogActions { flex-wrap: wrap; }.templateDetailWithPanel { grid-template-columns: 1fr; }.templateDetailPreview { min-height: 220px; }
  [data-page="canvas-editor"] .shell { padding: 22px 12px 0; }.editorShell { min-height: 660px; }.editorProps { max-width: calc(100% - 24px); }.moduleTop .chipRow { gap: 8px; }.moduleTop .chip { font-size: 12px; padding: 8px; }
}
@media (max-width: 500px) { .templateMasonry { grid-template-columns: 1fr; }.templateVisual { aspect-ratio: 4 / 5; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Canvas project cards use the same light palette as the editor. */
body[data-page="canvas"] .createTile { background: #fff; color: #30343b; border-color: #dfe3e9; box-shadow: none; }
body[data-page="canvas"] .createSquare { background: #fafbfc; border-color: #d9dfe8; }
body[data-page="canvas"] .createTile .tileText, body[data-page="canvas"] .createTile strong { color: #30343b; }
body[data-page="canvas"] .createTile .meta { color: #788293; }
body[data-page="canvas"] .plusBadge { background: #edf0f5; color: #606b7c; }
body[data-page="canvas"] .canvasCard .actions { background: #fffffff0; border: 1px solid #e1e4e9; }
body[data-page="canvas"] .canvasCard .actions button { color: #596579; background: #f3f5f8; }
