/* A single workspace: artwork on the left, editing and generation on the right. */
#studioView .element-inventory-heading {
  display: flex; align-items: baseline; gap: 8px;
  white-space: normal; overflow: visible; line-height: 1.5;
}
#studioView .element-inventory-type {
  flex: none; white-space: nowrap; color: var(--muted-strong); font-weight: 400;
}
#studioView .element-inventory-name {
  min-width: 0; color: var(--text); font-weight: 500;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; overflow-wrap: anywhere;
}
#studioView .reference-toolbar :is(#toggleEditableRegions, #toggleEditedElements, #canvasVersionCount) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 6px 10px; border: 1px solid transparent;
  border-radius: 10px; color: var(--text-soft); background: transparent; box-shadow: none;
  transition: color 140ms ease, background-color 140ms ease, opacity 90ms ease, transform 90ms ease;
}
#studioView .reference-toolbar .toolbar-count { font: inherit; color: inherit; font-variant-numeric: tabular-nums; }
#studioView .reference-toolbar #canvasVersionCount { cursor: default; }
#studioView .reference-toolbar #toggleEditedElements[aria-pressed="true"] {
  color: var(--text-soft) !important; background: transparent !important;
  outline: 2px solid var(--accent); outline-offset: -2px; box-shadow: none;
}
#studioView .reference-toolbar #toggleEditableRegions:hover:not([aria-pressed="true"]) {
  border-color: transparent;
  color: var(--text);
  background: color-mix(in srgb, var(--card) 42%, transparent);
}
#studioView .reference-toolbar #toggleEditableRegions[aria-pressed="true"] {
  border-color: transparent !important;
  color: var(--accent) !important;
  background: transparent !important;
  outline: none;
  box-shadow: none;
}
#studioView .reference-toolbar #toggleEditableRegions:active {
  opacity: .76;
  transform: scale(.98);
}
#studioView .reference-hotspot[hidden] { display: none !important; }
#studioView .reference-hotspot.is-deleted { border-style: dashed; }
#studioView .reference-hotspot.is-deleted > span::after { content: ' · 已删除'; }
/* Recognition has one fixed status location; the artwork stays unobstructed. */
#studioView.is-analysis-loading .reference-toolbar strong::before {
  width: 12px; height: 12px; box-sizing: border-box;
  border: 2px solid var(--border-strong); border-top-color: var(--muted-strong);
  border-radius: 50%; background: transparent; box-shadow: none;
  animation: reference-status-spin 900ms linear infinite;
}
#studioView.is-analysis-failed .reference-toolbar strong::before { display: none; }
#studioView :is(#referenceAnalysisState, #canvasAnalysisRetry)[hidden] { display: none !important; }
#studioView #referenceAnalysisState:empty { display: none; }
#studioView.is-analysis-loading #referenceAnalysisState,
#studioView.is-analysis-failed #referenceAnalysisState { display: inline; }
#studioView:is(.is-analysis-loading, .is-analysis-failed) #canvasEditHint { display: none; }
#studioView .reference-toolbar #canvasAnalysisRetry {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-control);
  color: #fff;
  background: var(--danger);
  box-shadow: none;
  font-weight: 750;
  transition: background-color 140ms ease, border-color 140ms ease, transform 90ms ease;
}
#studioView .reference-toolbar #canvasAnalysisRetry:hover {
  border-color: color-mix(in srgb, var(--danger) 82%, #000);
  color: #fff;
  background: color-mix(in srgb, var(--danger) 86%, #000);
  box-shadow: none;
}
#studioView .reference-toolbar #canvasAnalysisRetry:active { transform: scale(.98); }
#studioView .reference-toolbar #canvasAnalysisRetry:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--danger) 30%, transparent);
  outline-offset: 2px;
}
#studioView .reference-toolbar #canvasAnalysisRetry:disabled {
  cursor: wait;
  opacity: .62;
  box-shadow: none;
}
#studioView[data-stage="create"] #creationAnalysisRetry { display: none !important; }
@keyframes reference-status-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #studioView.is-analysis-loading .reference-toolbar strong::before { animation: none; }
  #studioView .reference-toolbar #canvasAnalysisRetry { transition: none; }
}
#studioView.focused-editor[data-stage="create"] {
  width: 100%; max-width: none; margin: 0; padding: 0; overflow: visible;
}
body.studio-active:has(.focused-editor[data-stage="create"]) #mainContent.page {
  width: 100%; max-width: none; padding: 16px 24px 24px; margin: 0;
}
#studioView.focused-editor[data-stage="create"] .workspace {
  display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 20px;
  width: 100%; max-width: none; height: calc(100dvh - 116px) !important;
  min-height: 540px !important; align-items: stretch; overflow: visible;
}
#studioView.focused-editor[data-stage="create"] #inputPanel {
  grid-column: 1; width: 100%; height: 100%; min-height: 0; max-height: none;
  padding: 0; border: 1px solid var(--border); border-radius: 20px;
  background: var(--card); box-shadow: none; overflow: hidden;
  container-type: inline-size;
}
#studioView.focused-editor[data-stage="create"] .reference-toolbar {
  min-height: 64px; padding: 10px 16px; gap: 12px; flex-wrap: wrap;
  align-items: center; border-bottom: 1px solid var(--border);
}
#studioView.focused-editor[data-stage="create"] .reference-toolbar-title { flex: 1; min-width: 130px; gap: 4px; }
#studioView.focused-editor[data-stage="create"] .reference-toolbar-title strong { font-size: 15px; font-weight: 600; }
#studioView.focused-editor[data-stage="create"] .reference-toolbar-title span { font-size: 12px; color: var(--muted-strong); }
#studioView.focused-editor[data-stage="create"] .reference-toolbar-actions { gap: 4px; flex-wrap: wrap; }
#studioView.focused-editor[data-stage="create"] :is(.reference-toolbar-actions, .canvas-view-switch) button { min-height: 40px; font-size: 12px; white-space: nowrap; }
#studioView.focused-editor[data-stage="create"] .artwork-recognition-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-soft) 72%, var(--card));
}
#studioView.focused-editor[data-stage="create"] .artwork-recognition-bar strong { display: block; color: var(--text); font-size: 13px; }
#studioView.focused-editor[data-stage="create"] .artwork-recognition-bar p { margin: 0; color: var(--muted-strong); font-size: 12px; line-height: 1.45; }
#studioView.focused-editor[data-stage="create"] .artwork-recognition-bar button { min-height: 44px; flex: 0 0 auto; white-space: nowrap; }
#studioView.focused-editor[data-stage="create"] #dropzone { flex: 1; min-height: 0; border: 0; border-radius: 0; background: var(--bg); }
/* The canvas must not inherit the upload dropzone's hover halo. */
#studioView.focused-editor[data-stage="create"] #dropzone:hover,
#studioView.focused-editor[data-stage="create"] #dropzone.dragging { box-shadow: none; transform: none; }
#studioView.focused-editor[data-stage="create"] #previewWrap { width: 100%; height: 100%; min-height: 0; background-image: none; border-radius: 0; }
#studioView.focused-editor[data-stage="create"] #remixCard,
#studioView.focused-editor[data-stage="create"] #remixCard.is-contextual {
  display: flex !important; position: relative !important; inset: auto !important;
  grid-column: 2; width: 100%; height: 100%; min-height: 0; max-height: none !important;
  margin: 0; padding: 0; flex-direction: column; transform: none !important;
  border: 1px solid var(--border); border-radius: 20px; background: var(--card);
  box-shadow: none; overflow: hidden; z-index: 10; animation: none;
}
#studioView.focused-editor[data-stage="create"] #remixCard .context-panel-head {
  min-height: 72px; padding: 20px 20px 12px; border: 0; align-items: center;
}
#studioView.focused-editor[data-stage="create"] #remixCard .context-title { font-size: 19px; font-weight: 600; line-height: 1.4; }
#studioView.focused-editor[data-stage="create"] #remixCard .context-eyebrow { display: none; }
#studioView.focused-editor[data-stage="create"] #remixCard .editor-panel-hint {
  margin: 4px 0 0;
  max-width: 270px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
}
#studioView.focused-editor[data-stage="create"] #remixCard .context-close[hidden] { display: none !important; }
.editor-panel-nav { display: flex; gap: 4px; margin: 0 20px; padding: 4px; background: var(--bg); border-radius: 10px; flex: none; }
.editor-panel-nav button { flex: 1; min-height: 36px; border: 0; border-radius: 7px; background: transparent; color: var(--muted-strong); font: inherit; font-size: 13px; cursor: pointer; }
.editor-panel-nav button[aria-pressed="true"], .editor-panel-nav button[aria-expanded="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px #00000012; }
.editor-panel-hint { margin: 14px 20px 4px; color: var(--muted-strong); font-size: 12px; line-height: 1.7; }
#studioView.focused-editor[data-stage="create"] #remixCard.is-contextual .editor-panel-hint { display: none; }
#studioView.focused-editor[data-stage="create"] #remixCard.is-artwork-pending :is(.editor-panel-nav, .context-scope, .edit-mode-switch, .context-panel-scroll, #sameStyleActionBar) {
  display: none !important;
}
#studioView.focused-editor[data-stage="create"] #remixCard > #editorOutputSettings {
  display: none;
  flex: none;
  margin: 0 20px 16px;
}
#studioView.focused-editor[data-stage="create"] #remixCard.is-artwork-selected > #editorOutputSettings {
  display: block;
}
#studioView.focused-editor[data-stage="create"] #remixCard.is-artwork-pending > #editorOutputSettings {
  margin-bottom: 20px;
}
#studioView.focused-editor[data-stage="create"] #remixCard.is-artwork-pending #artworkRecognitionBar {
  display: flex !important;
  flex: 1 1 auto;
  justify-content: flex-start;
  margin: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--card-soft) 72%, var(--card));
}
#studioView.focused-editor[data-stage="create"] #remixCard.is-artwork-pending .artwork-recognition-copy {
  display: grid;
  gap: 8px;
}
#studioView.focused-editor[data-stage="create"] #remixCard.is-artwork-pending .artwork-recognition-copy strong {
  font-size: 14px;
  color: var(--text);
}
#studioView.focused-editor[data-stage="create"] #remixCard.is-artwork-pending .artwork-recognition-copy p,
#studioView.focused-editor[data-stage="create"] #remixCard.is-artwork-pending .artwork-recognition-note {
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.6;
}
#studioView.focused-editor[data-stage="create"] #remixCard.is-artwork-pending #artworkRecognizeBtn {
  width: 100%;
  min-height: 44px;
  margin-top: auto;
}
#studioView.focused-editor[data-stage="create"] #remixCard .context-scope { margin: 12px 0 0; padding: 0 20px; }
#studioView.focused-editor[data-stage="create"] #remixCard .context-panel-scroll {
  display: block; flex: 1 1 auto; min-height: 0; padding: 20px; overflow-y: auto; overscroll-behavior: contain;
}
#studioView.focused-editor[data-stage="create"][data-edit-target="none"] #remixCard[data-browse-mode="idle"] .context-panel-scroll {
  display: block; padding: 20px; overflow-y: auto;
}
#studioView.focused-editor[data-stage="create"] #contextFields { width: 100%; }
#studioView.focused-editor[data-stage="create"] #remixCard .context-empty.hidden { display: none !important; }
#studioView.focused-editor[data-stage="create"] #remixCard .context-empty:not(.hidden) { display: block !important; min-height: 0; padding: 0; }
#studioView.focused-editor[data-stage="create"] #contextFields { display: flex; flex-direction: column; min-height: 0; gap: 18px; margin: 0; padding: 0; }
#studioView.focused-editor[data-stage="create"][data-edit-target="none"] #remixCard[data-browse-mode="idle"] #contextFields { display: flex !important; }
#studioView.focused-editor[data-stage="create"] #contextFields #dynamicElementEditor.is-context-visible { display: flex; gap: 12px; }
#studioView.focused-editor[data-stage="create"] #contextFields .field { margin: 0; }
#studioView.focused-editor[data-stage="create"] #contextFields .field.is-context-visible { display: block; animation: none; }
#studioView.focused-editor[data-stage="create"] #contextFields label { font-size: 13px; font-weight: 500; color: var(--text-soft); }
#studioView.focused-editor[data-stage="create"] #uMoreDesc { min-height: 96px; width: 100%; padding: 12px 14px; font-size: 14px; line-height: 1.75; border-radius: 12px; resize: vertical; }
#studioView.focused-editor[data-stage="create"] textarea::placeholder { color: var(--muted-strong); opacity: .8; }
#studioView.focused-editor[data-stage="create"] #remixCard .edit-mode-switch { display: none !important; }
#studioView.focused-editor[data-stage="create"] .editor-settings { border-top: 1px solid var(--border); padding-top: 4px; }
#studioView.focused-editor[data-stage="create"] #remixCard > #editorOutputSettings {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-soft);
}
#studioView.focused-editor[data-stage="create"] #editorOutputSettings > summary {
  min-height: 28px;
  padding: 0 0 10px;
  font-weight: 600;
}
#studioView.focused-editor[data-stage="create"] #editorOutputSettings > summary::after { display: none; }
#studioView.focused-editor[data-stage="create"] #editorOutputSettings[open] > .field + .field { margin-top: 12px !important; }
#studioView.focused-editor[data-stage="create"] #editorOutputSettings .editor-settings-hint {
  margin: -2px 0 12px;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
}
.editor-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; cursor: pointer; color: var(--text); font-size: 13px; list-style: none; }
.editor-settings > summary::-webkit-details-marker { display: none; }
.editor-settings > summary span { margin-left: auto; font-size: 12px; color: var(--muted-strong); }
.editor-settings > summary::after { content: '›'; transform: rotate(90deg); font-size: 18px; color: var(--muted-strong); }
.editor-settings[open] > summary::after { transform: rotate(-90deg); }
#studioView.focused-editor[data-stage="create"] .editor-settings[open] > .field { margin-top: 12px !important; }
/* Compact output settings; keep native select behavior and theme surfaces. */
#studioView.focused-editor #editorOutputSettings > .field > label { margin-bottom: 6px; font-size: 13px; font-weight: 500; }
#studioView.focused-editor #editorOutputSettings .select-control { min-height: 0; }
#studioView.focused-editor #editorOutputSettings select {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  padding: 0 36px 0 12px !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
#studioView.focused-editor #editorOutputSettings .select-control > .ri-icon { right: 12px; width: 14px; height: 14px; }
@media (pointer: coarse) {
  #studioView.focused-editor #editorOutputSettings select { height: 44px; min-height: 44px; }
}
#studioView.focused-editor[data-stage="create"] .style-options { gap: 6px; padding-top: 8px; }
#studioView.focused-editor[data-stage="create"] .style-opt { border-radius: 10px; padding: 10px; }
#studioView.focused-editor[data-stage="create"] .style-opt small { line-height: 1.6; }
#studioView.focused-editor[data-stage="create"] .context-done-bar { padding: 12px 20px; gap: 8px; }
#studioView.focused-editor[data-stage="create"] .context-done-bar .primary { background: var(--field); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
#studioView.focused-editor[data-stage="create"] #sameStyleActionBar {
  position: static !important; inset: auto !important; display: flex !important;
  width: 100% !important; min-height: 0; margin: 0; padding: 16px 20px 12px;
  flex: none; flex-direction: column; align-items: stretch; gap: 10px;
  border: 0; border-radius: 0;
  background: var(--card); box-shadow: none; z-index: auto;
}
#studioView.focused-editor[data-stage="create"] #sameStyleActionBar .selection-summary { display: flex !important; flex: none; flex-wrap: wrap; min-height: 0; padding: 0; width: 100%; gap: 8px; }
#studioView.focused-editor[data-stage="create"] #selectionStatus,
#studioView.focused-editor[data-stage="create"] #overallAdjustBtn { display: none !important; }
.editor-edit-menu { margin-left: auto; position: relative; }
.editor-edit-menu summary { display: grid; place-items: center; min-width: 44px; min-height: 36px; list-style: none; cursor: pointer; color: var(--muted-strong); letter-spacing: 2px; }
.editor-edit-menu summary::-webkit-details-marker { display: none; }
.editor-edit-menu-actions {
  position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 20;
  display: flex; flex-direction: column; gap: 4px; width: max-content;
  max-width: min(300px, calc(100vw - 48px)); padding: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-control);
}
#studioView.focused-editor[data-stage="create"] #editorEditMenu .editor-edit-menu-actions > button:not(.hidden) {
  position: static; display: flex; align-items: center; width: 100%; min-height: 44px;
  padding: 8px 12px; margin: 0; font-size: 12px; text-align: left; white-space: normal;
  background: transparent; color: var(--text); border: 1px solid transparent;
  border-radius: var(--radius-control); box-shadow: none;
}
#studioView.focused-editor[data-stage="create"] #editorEditMenu .editor-edit-menu-actions > button:hover:not(:disabled) {
  background: var(--field); border-color: var(--border);
}
#studioView.focused-editor[data-stage="create"] .generation-action { display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 0; }
#studioView.focused-editor[data-stage="create"] #sameStyleActionBar .generation-action > button { position: static; width: 100%; min-width: 0; min-height: 46px; margin: 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
#studioView.focused-editor[data-stage="create"] #sameStyleActionBar .generation-action > .hidden { display: none !important; }
#studioView.focused-editor[data-stage="create"] #sameStyleActionBar .generation-action > :is(#generateBtn, #editorDownloadBtn) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
#studioView.focused-editor[data-stage="create"] #generateBtn::after { display: none; }
#studioView.focused-editor[data-stage="create"] #genStatus:not(.hidden) { position: static !important; width: 100%; max-width: none; transform: none; margin: 0; padding: 8px 0; font-size: 12px; background: transparent; border: 0; }
.editor-action-hint { margin: 2px 0 0; text-align: center; color: var(--muted-strong); font-size: 12px; line-height: 1.6; }
#studioView.focused-editor[data-stage="create"] .change-summary-popover.is-open { position: static; width: 100%; max-height: 180px; padding: 12px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; background: transparent; }
#studioView.focused-editor[data-stage="create"] #changeCount { min-height: 32px; font-size: 12px; }
#studioView.focused-editor[data-stage="create"] .change-summary-popover li button { font-size: 12px; }
#studioView.focused-editor[data-stage="create"] .canvas-edit-hint { bottom: 18px; font-size: 12px; padding: 8px 14px; border: 0; background: transparent; box-shadow: none; }
#studioView.focused-editor[data-stage="create"].is-analysis-failed .canvas-edit-hint { max-width: 80%; white-space: normal; overflow-wrap: anywhere; text-align: center; color: var(--danger); background: var(--card); }
#studioView.focused-editor[data-stage="create"] .canvas-zoom-controls { left: 16px; bottom: 12px; box-shadow: none; border: 1px solid var(--border); border-radius: 10px; }
.canvas-view-switch { display: inline-flex; align-items: center; padding: 3px; border-radius: 9px; background: var(--bg); }
.canvas-view-switch button { border: 0; padding: 0 10px; border-radius: 6px; font: inherit; color: var(--muted-strong); background: transparent; cursor: pointer; white-space: nowrap; }
.canvas-view-switch button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px #00000012; }
#studioView.focused-editor[data-canvas-view="result"] #preview,
#studioView.focused-editor[data-canvas-view="result"] #referenceOverlay { visibility: hidden; pointer-events: none; }
#studioView.focused-editor[data-canvas-view="reference"] #generationCanvasLayer { visibility: hidden; }
#studioView.focused-editor[data-canvas-view="result"] #toggleEditableRegions { display: none; }
#studioView.focused-editor[data-canvas-view="result"] :is(#referenceAnalysisState, #replaceReferenceBtn) { display: none; }
#studioView.focused-editor[data-stage="create"].is-artwork-pending .reference-toolbar :is(#replaceReferenceBtn, #toggleEditableRegions, #toggleEditedElements) {
  display: none !important;
}
#studioView.focused-editor .generation-canvas-download { display: none; }
#studioView.focused-editor .generation-canvas-image { border: 0; box-shadow: 0 6px 24px #00000014; }
#studioView.focused-editor .generation-canvas-label { font-size: 13px; color: var(--muted-strong); }
.reference-canvas-label { position: absolute; top: 100%; left: 0; width: 100%; pointer-events: none; transform: scale(var(--canvas-inverse-scale, 1)); transform-origin: top center; }
#studioView[data-canvas-view="result"] .reference-canvas-label { display: none; }
#studioView.focused-editor[data-stage="create"] #generationCanvasVersionStrip:not(.hidden) { left: auto; right: 16px; bottom: 12px; transform: none; width: max-content; max-width: min(360px, calc(100% - 176px)); justify-content: flex-start; gap: 4px; border-radius: 10px; padding: 5px; box-shadow: 0 4px 16px #00000010; }
#generationCanvasVersionStrip .generation-version-button { width: 48px; min-width: 48px; min-height: 60px; grid-template-rows: 40px auto; gap: 3px; padding: 3px; }
#generationCanvasVersionStrip .generation-version-button img { width: 40px; height: 40px; }
#generationCanvasVersionStrip .generation-version-button span { font-size: 9px; }
#studioView.focused-editor.is-generation-locked #remixCard { opacity: 1; }
#studioView.focused-editor.is-generation-locked .reference-toolbar button { pointer-events: none; opacity: .5; }
#studioView.focused-editor :is(button, summary):focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; }
@media (max-width: 1100px) {
  #studioView.focused-editor[data-stage="create"] .workspace { grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; }
  #studioView.focused-editor[data-stage="create"] .reference-toolbar { align-items: flex-start; }
  #studioView.focused-editor[data-stage="create"] .reference-toolbar-actions { width: 100%; justify-content: flex-start; }
  #studioView.focused-editor[data-stage="create"] .canvas-edit-hint { bottom: 64px; max-width: 90%; text-align: center; white-space: normal; }
}
@media (max-width: 820px) {
  body.studio-active:has(.focused-editor[data-stage="create"]) #mainContent.page { padding: 12px; }
  #studioView.focused-editor[data-stage="create"] .workspace { grid-template-columns: minmax(0, 1fr); height: auto !important; min-height: 0 !important; gap: 12px; }
  #studioView.focused-editor[data-stage="create"] #inputPanel { grid-column: 1; height: 64dvh; min-height: 390px; border-radius: 16px; }
  #studioView.focused-editor[data-stage="create"] #remixCard,
  #studioView.focused-editor[data-stage="create"] #remixCard.is-contextual { grid-column: 1; width: 100%; height: auto; max-height: none !important; border-radius: 16px; }
  #studioView.focused-editor[data-stage="create"] #remixCard { scroll-margin-top: 140px; }
  #studioView.focused-editor[data-stage="create"] #remixCard .context-panel-scroll { flex: none; overflow: visible; }
  #studioView.focused-editor[data-stage="create"] #remixCard .context-panel-head { min-height: 60px; padding-top: 14px; }
  #studioView.focused-editor[data-stage="create"] #sameStyleActionBar { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  #studioView.focused-editor[data-stage="create"] .reference-toolbar { padding: 10px 12px; gap: 8px; }
  #studioView.focused-editor[data-stage="create"] .artwork-recognition-bar { margin-inline: 12px; }
  #studioView.focused-editor[data-stage="create"] :is(.reference-toolbar-actions, .canvas-view-switch) button { min-height: 44px; }
  #studioView.focused-editor[data-stage="create"] .canvas-view-switch { order: -1; flex: 1 0 100%; }
  #studioView.focused-editor[data-stage="create"] .canvas-view-switch button { flex: 1; }
  #studioView.focused-editor[data-stage="create"] :is(#canvasVersionCount, #canvasDownloadBtn) { padding-inline: 10px; }
  #studioView.focused-editor[data-stage="create"] .editor-panel-nav button { min-height: 44px; }
}

/* Equal side columns anchor view selection to the whole canvas toolbar. */
#studioView.focused-editor[data-stage="create"] .reference-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}
#studioView.focused-editor[data-stage="create"] .reference-toolbar-title { grid-column: 1; grid-row: 1; min-width: 0; }
#studioView.focused-editor[data-stage="create"] .canvas-view-switch { grid-column: 2; grid-row: 1; justify-self: center; order: 0; }
#studioView.focused-editor[data-stage="create"] .reference-toolbar-actions {
  grid-column: 3; grid-row: 1; width: auto; min-width: 0; justify-content: flex-end;
}
@container (max-width: 920px) {
  #studioView.focused-editor[data-stage="create"] .reference-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #studioView.focused-editor[data-stage="create"] .canvas-view-switch { grid-column: 1 / -1; grid-row: 1; }
  #studioView.focused-editor[data-stage="create"] .reference-toolbar:has(.canvas-view-switch:not(.hidden)) .reference-toolbar-title { grid-row: 2; }
  #studioView.focused-editor[data-stage="create"] .reference-toolbar-actions { grid-column: 2; }
  #studioView.focused-editor[data-stage="create"] .reference-toolbar:has(.canvas-view-switch:not(.hidden)) .reference-toolbar-actions { grid-row: 2; }
}
