/* All rules are scoped to individual graphics. Carousel editing keeps its existing layout. */
body.studio-redesign.editing-artwork:not(.projects-view) > .public-demo-banner { min-height: 26px; padding: 3px 14px; gap: 4px 12px; font-size: 11px; }
body.studio-redesign.editing-artwork:not(.projects-view) > header { min-height: 52px; padding: 5px 14px; gap: 10px 18px; }
body.studio-redesign.editing-artwork:not(.projects-view) .studio-home-link { font-size: 22px; line-height: 1.1; }
body.studio-redesign.editing-artwork:not(.projects-view) .wordmark span { margin-top: 1px; font-size: 10px; }
body.studio-redesign.editing-artwork:not(.projects-view) .area-switch { padding: 3px; gap: 3px; border-radius: 8px; }
body.studio-redesign.editing-artwork:not(.projects-view) .area-switch button { min-width: 96px; min-height: 32px; padding: 5px 12px; font-size: 12px; }
body.studio-redesign.editing-artwork:not(.projects-view) .top-actions { gap: 5px; }
body.studio-redesign.editing-artwork:not(.projects-view) .top-actions button { min-height: 32px; padding: 5px 9px; font-size: 12px; }
body.studio-redesign.editing-artwork:not(.projects-view) .top-actions .saved { font-size: 11px; }
body.studio-redesign.editing-artwork.editor-focus-active:not(.projects-view) > header,
body.editor-focus-active .editor-workspace > aside { display: none; }
.editor-workspace #exitEditorFocus { display: none; }
.editor-workspace.editor-focus-mode #exitEditorFocus { display: inline-flex; align-items: center; }
.editor-workspace.editor-focus-mode .editor-canvas-column > .hint-line { display: none; }
.studio-redesign .workspace.editor-workspace {
  --library-width: 240px;
  --inspector-width: 304px;
  display: grid;
  grid-template-columns: var(--library-width) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  height: var(--editor-height, calc(100dvh - 135px));
  min-height: 440px;
  overflow: clip;
  position: relative;
}
.editor-workspace *, .editor-workspace *::before, .editor-workspace *::after { box-sizing: border-box; }
.studio-redesign .editor-workspace > aside {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 5px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.editor-workspace > aside > div:first-child { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.editor-workspace > aside > div:first-child > .eyebrow { display: none; }
.studio-redesign .editor-workspace #assistantLauncher { min-height: 32px; padding: 4px 8px; font-size: 12px; gap: 6px; }
.editor-workspace #assistantLauncher .assistant-premium { padding: 1px 4px; font-size: 10px; }
.studio-redesign .editor-workspace .projectname { font: 600 14px/1.4 Inter, Arial, sans-serif; margin: 0; max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editor-workspace > aside .projectmeta, .editor-workspace > aside .aside-foot, .editor-workspace > aside #nav,
.editor-workspace > .mobile-toggle, .editor-workspace #progressBox { display: none !important; }
.editor-workspace > aside .eyebrow { white-space: nowrap; font-size: 9px; }
.studio-redesign .editor-workspace .mobile-studio-nav { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; }
.editor-workspace .mobile-studio-nav label { display: none; }
.editor-workspace .mobile-studio-nav select { width: 160px; min-height: 32px; padding: 5px 8px; font-size: 12px; }
.editor-view-controls { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.studio-redesign .editor-view-controls button { min-height: 32px; padding: 5px 8px; font-size: 12px; white-space: nowrap; }
.editor-view-controls button[aria-expanded=true], .editor-view-controls button[aria-pressed=true] { background: var(--bg); border-color: var(--accent); color: var(--accent); }
.studio-redesign .editor-workspace > .editor {
  display: block;
  grid-row: 2;
  grid-column: 1;
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-width: thin;
  padding: 0 16px 20px;
  min-width: 0;
  min-height: 0;
}
.studio-redesign .editor-workspace > .preview { display: block; grid-row: 2; grid-column: 2; padding: 0; height: var(--editor-stage-height, 400px); min-height: 0; overflow: clip; }
/* Keep the stage independent of inspector content, including Safari's percentage-height sizing. */
.editor-workspace #creativeSurface { height: var(--editor-stage-height, 400px); min-height: 0; }
.studio-redesign .editor-workspace .editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--inspector-width);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  height: var(--editor-stage-height, 400px);
  min-height: 0;
}
.editor-work-heading { grid-column: 1 / -1; padding: 5px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.editor-work-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; min-width: 0; flex: 1; }
.editor-work-title > .eyebrow { display: none; }
.editor-work-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.editor-work-title > span:last-child { font-size: 11px; color: var(--muted); white-space: nowrap; }
.editor-work-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.studio-redesign .editor-work-actions button { min-height: 32px; font-size: 12px; padding: 5px 8px; }
.editor-workspace #editorDelivery { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.editor-workspace .editor-canvas-column { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-column: 1; grid-row: 2; min-width: 0; min-height: 0; padding: 8px 12px 0; overflow: clip; }
.studio-redesign .editor-workspace .tool-bar { margin: 0 0 8px; padding: 3px; gap: 3px; box-shadow: none; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.editor-workspace .tool-bar > * { flex-shrink: 0; }
.studio-redesign .editor-workspace .tool-bar button { min-width: 32px; min-height: 32px; border: 1px solid transparent; padding: 5px; cursor: pointer; }
.studio-redesign .editor-workspace .tool-bar button[data-active-tool] { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.editor-workspace .tool-bar :focus-visible { outline-offset: -2px; }
.editor-workspace .tool-bar button.active { border-color: var(--line); color: var(--accent); background: var(--bg); }
.editor-workspace .tool-bar button:disabled { cursor: default; opacity: .4; }
.editor-tool-label { display: none; font-size: 11px; line-height: 1.2; margin: 0; white-space: nowrap; }
.editor-workspace .tool-bar button.active .editor-tool-label { display: inline; }
.editor-workspace .tool-bar .spacer { margin: 0 3px; }
.editor-workspace #workZoom { width: 65px !important; height: 30px; }
.editor-workspace #fitEditorCanvas { padding: 5px 8px; font-size: 12px; }
.editor-workspace #fitEditorCanvas[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }
.studio-redesign .editor-workspace .canvas-viewport {
  display: flex;
  flex-direction: column;
  grid-row: 2;
  min-height: 0;
  max-height: none;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  overscroll-behavior: auto;
  scrollbar-width: thin;
  background: color-mix(in srgb, var(--line) 28%, var(--bg));
}
.editor-workspace .canvas-art { flex-shrink: 0; max-width: none; margin: auto; }
.editor-workspace .editor-canvas-column > .hint-line { font-size: 11px; line-height: 1.5; padding: 4px 0; margin: 0; text-align: center; }
.studio-redesign .editor-workspace .inspector {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-columns: minmax(0, 1fr);
  grid-column: 2;
  grid-row: 2;
  width: auto;
  height: auto;
  align-self: stretch;
  min-height: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  overflow: clip;
}
.editor-panel-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 15px 0; background: var(--panel); min-height: 65px; }
.editor-workspace > .editor .editor-panel-heading { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.editor-workspace .inspector > .editor-panel-heading { padding: 15px 16px 12px; flex: 0 0 auto; }
.studio-redesign .editor-workspace .editor-panel-heading h2 { margin: 2px 0 0; font-size: 16px; }
.studio-redesign .editor-workspace .editor-panel-close { display: grid; place-items: center; padding: 2px; width: 32px; height: 32px; flex-shrink: 0; font-size: 21px; font-weight: 400; border: 0; background: transparent; }
.editor-workspace .field { margin-bottom: 15px; gap: 6px; }
.editor-workspace .editor-elements-tabs { margin: 0 0 15px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; }
.studio-redesign .editor-workspace .editor-elements-tabs button { font-size: 12px; padding: 8px 2px; }
.editor-workspace .editor-elements-tabs button.active { font-weight: 600; }
.studio-redesign .editor-workspace .key-actions { display: flex; gap: 6px; }
.studio-redesign .editor-workspace .key-actions button { min-height: 34px; font-size: 12px; }
.editor-workspace .editor-add-text { flex: 1 1 100%; }
.editor-workspace #newBasicShape { flex: 1 1 100%; }
.editor-workspace .element-library { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: none; gap: 7px; }
.editor-workspace .element-library button { height: 62px; }
.editor-workspace .library-meta { align-items: baseline; gap: 5px; }
.editor-workspace .library-meta .small-label { font-size: 10px; }
.editor-workspace #elementsList > .help { font-size: 11px; line-height: 1.5; }
.editor-library-help { border-bottom: 1px solid var(--line); margin: 0 0 15px; padding: 0 0 12px; }
.editor-library-help summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.editor-workspace .section-guidance { padding: 12px 0 0; margin: 0; background: transparent; font-size: 12px; }
.editor-workspace .section-guidance > strong { display: none; }
.editor-workspace .section-guidance p { margin: 0; }
.editor-empty-library { font-size: 12px; line-height: 1.7; color: var(--muted); padding: 14px; border: 1px dashed var(--line); border-radius: 8px; }
.editor-workspace .editor-files .editor-empty-library { grid-column: 1 / -1; }
.editor-inspector-tabs { display: flex; flex: 0 0 auto; gap: 3px; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
.studio-redesign .editor-inspector-tabs button { flex: 1; min-width: 0; border: 0; padding: 9px 4px; border-radius: 6px; background: transparent; font-size: 12px; }
.editor-inspector-tabs button[aria-selected=true] { color: var(--accent); background: var(--bg); font-weight: 600; }
.editor-inspector-tabs button > span { font-size: 10px; font-weight: 400; color: var(--muted); }
.editor-panel-scroll { min-height: 0; overflow: auto; overscroll-behavior: auto; scrollbar-width: thin; padding: 16px; flex: 1 1 0; }
.editor-workspace #editorInspectorBody, .editor-workspace #editorPane-layers { grid-row: 3; grid-column: 1; }
.editor-workspace #editorPane-layers { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.editor-selection-summary { padding: 0 0 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.editor-selection-summary strong { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.editor-selection-summary p { font-size: 12px; margin: 2px 0 6px; color: var(--muted); }
.editor-empty-selection { padding: 15px 0; font-size: 13px; line-height: 1.7; }
.editor-empty-selection p { color: var(--muted); }
.editor-workspace .editor-property-group { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; }
.editor-workspace .editor-property-group h3 { margin: 0 0 14px; font-size: 13px; }
.editor-workspace .inspector .design-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.editor-workspace .inspector .design-row:has(#objectFont) { grid-template-columns: minmax(0, 1fr); }
.editor-workspace .inspector .design-row > .field { min-width: 0; }
.studio-redesign .editor-workspace .inspector input:not([type=color],[type=checkbox]),
.studio-redesign .editor-workspace .inspector select { min-height: 36px; padding: 8px; font-size: 13px; }
.editor-workspace .inspector input[type=color] { width: 100%; height: 36px; padding: 3px; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; cursor: pointer; }
.editor-workspace .inspector label { line-height: 1.4; }
.editor-workspace .inspector .checkline { font-size: 12px; line-height: 1.5; }
.editor-workspace #objectText { min-height: 105px; font-size: 14px; line-height: 1.6; }
.editor-workspace .inspector button:disabled, .editor-workspace .inspector input:disabled, .editor-workspace .inspector select:disabled, .editor-workspace .inspector textarea:disabled { cursor: not-allowed; opacity: .55; }
.editor-workspace .layer-section { border: 0; padding: 0; margin: 0; }
.editor-workspace .layer-section > h2 { font-size: 13px; margin: 0 0 5px; }
.editor-workspace .layer-section > .hint-line { font-size: 11px; margin: 0 0 14px; }
.editor-workspace .layer-row { background: var(--panel); border-radius: 8px; }
.editor-workspace .layer-row.is-selected { border-color: var(--accent); background: var(--bg); }
.editor-workspace .layer-row.is-hidden > button:first-child { opacity: .55; }
.editor-workspace .layer-row > button:first-child { font-size: 12px; min-height: 32px; }
.editor-workspace .layer-order { gap: 5px; }
.editor-workspace .layer-order button { padding: 5px; min-height: 30px; font-size: 11px; }
.editor-workspace .editor-footer-actions { border-top: 1px solid var(--line); padding-top: 16px; }
.editor-workspace .brand-style-origin-card { margin: 12px 0; padding: 12px; }
.studio-redesign .workspace.editor-workspace.editor-library-hidden { grid-template-columns: 0 minmax(0, 1fr); }
.editor-workspace.editor-library-hidden > #editor { display: none; }
.studio-redesign .editor-workspace.editor-inspector-hidden .editor-shell { grid-template-columns: minmax(0, 1fr); }
.editor-workspace.editor-inspector-hidden #designInspector { display: none; }
.studio-redesign .editor-workspace.editor-no-artwork .editor-shell { grid-template-columns: minmax(0, 1fr); }
.editor-workspace.editor-no-artwork .canvas-empty { margin: 20px; align-self: start; }
.editor-workspace [hidden] { display: none !important; }
@media (min-width: 1600px) {
  .studio-redesign .workspace.editor-workspace { --library-width: 264px; --inspector-width: 328px; }
}
@media (max-width: 1100px) {
  .studio-redesign .workspace.editor-workspace,
  .studio-redesign .workspace.editor-workspace.editor-library-hidden { grid-template-columns: minmax(0, 1fr); }
  .studio-redesign .editor-workspace > .preview { grid-column: 1; }
  .studio-redesign .editor-workspace .editor-shell { grid-template-columns: minmax(0, 1fr); }
  .studio-redesign .editor-workspace > aside { flex-wrap: wrap; gap: 5px 12px; }
  .editor-workspace > aside > div:first-child { flex: 1; }
  .editor-view-controls { margin-left: auto; }
  .studio-redesign .editor-workspace > #editor,
  .studio-redesign .editor-workspace #designInspector { display: none; position: absolute; grid-area: auto; z-index: 6; top: var(--editor-drawer-top, 100px); bottom: 0; width: min(320px, calc(100% - 34px)); height: auto; background: var(--panel); box-shadow: 0 10px 35px #0003; }
  .studio-redesign .editor-workspace > #editor { left: 0; }
  .studio-redesign .editor-workspace #designInspector { right: 0; }
  .studio-redesign .editor-workspace[data-editor-drawer=library] > #editor { display: block; }
  .studio-redesign .editor-workspace[data-editor-drawer=inspector] #designInspector { display: grid; }
  .editor-workspace .editor-canvas-column { padding: 8px 12px 0; }
  .editor-work-title { grid-template-columns: minmax(0, 1fr); }
  .editor-work-heading { padding: 5px 12px; }
}
@media (max-width: 600px) {
  body.studio-redesign.editing-artwork:not(.projects-view) > header { padding: 5px 10px; gap: 5px 10px; }
  body.studio-redesign.editing-artwork:not(.projects-view) .area-switch { order: 4; width: 100%; }
  body.studio-redesign.editing-artwork:not(.projects-view) .area-switch button { min-width: 0; min-height: 36px; }
  body.studio-redesign.editing-artwork:not(.projects-view) .top-actions { max-width: 62%; }
  body.studio-redesign.editing-artwork:not(.projects-view) .top-actions button { font-size: 11px; min-height: 34px; padding: 5px 7px; }
  .studio-redesign .editor-workspace > aside { padding: 5px 10px; gap: 5px 8px; }
  .editor-workspace > aside > div:first-child > .eyebrow { display: none; }
  .studio-redesign .editor-workspace .projectname { max-width: 145px; font-size: 13px; }
  .editor-workspace .mobile-studio-nav select { width: 155px; max-width: 100%; }
  .editor-view-controls { gap: 5px; flex-basis: 100%; margin: 0; }
  .studio-redesign .editor-view-controls button { font-size: 11px; padding: 6px; min-height: 36px; }
  .editor-work-heading { flex-wrap: wrap; gap: 5px; padding: 6px 10px; }
  .editor-work-title { grid-template-columns: minmax(0, 1fr) auto; flex-basis: 100%; }
  .editor-work-actions { gap: 5px; justify-content: flex-start; }
  .studio-redesign .editor-work-actions button { font-size: 11px; padding: 7px; min-height: 34px; }
  .editor-workspace .editor-canvas-column { padding: 6px 10px 0; }
  .editor-workspace .tool-bar button.active .editor-tool-label { display: none; }
  .studio-redesign .editor-workspace .tool-bar { gap: 2px; margin-bottom: 8px; }
  .studio-redesign .editor-workspace .tool-bar button { min-width: 36px; min-height: 38px; }
  .editor-workspace .tool-bar .spacer { margin: 0 2px; }
  .editor-workspace .editor-canvas-column > .hint-line { font-size: 10px; padding: 4px; }
}
