.mp-editor { width: 100%; display: grid; gap: .75rem; }
.mp-editor-scene-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.mp-editor-scene-tabs button { min-height: 2.35rem; padding: .45rem .8rem; border: 1px solid #cdd3df; border-radius: 999px; color: #344054; background: #fff; cursor: pointer; }
.mp-editor-scene-tabs button[aria-selected="true"] { border-color: #5145cd; color: #3529a5; background: #eeecff; }
.mp-editor-stage-wrap { width: 100%; min-height: 0; display: grid; place-items: center; overflow: auto; }
.mp-editor-stage { position: relative; width: min(100%, 720px); max-height: calc(100dvh - 15rem); overflow: hidden; touch-action: none; user-select: none; isolation: isolate; border: 1px solid #c8ced9; border-radius: .35rem; background-color: #fff; background-image: linear-gradient(45deg,#f3f4f7 25%,transparent 25%),linear-gradient(-45deg,#f3f4f7 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#f3f4f7 75%),linear-gradient(-45deg,transparent 75%,#f3f4f7 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; box-shadow: 0 .8rem 2.5rem rgba(30,35,55,.12); }
.mp-editor-safe { position: absolute; z-index: 100000; border: 1px dashed #149267; pointer-events: none; }
.mp-editor-guide { position: absolute; z-index: 100001; pointer-events: none; background: #e348c3; }
.mp-editor-guide-x { left: 0; right: 0; height: 1px; }
.mp-editor-guide-y { top: 0; bottom: 0; width: 1px; }
.mp-editor-layer { position: absolute; box-sizing: border-box; transform-origin: center; cursor: move; outline: 1px solid transparent; will-change: transform,left,top,width,height; }
.mp-editor-layer:hover { outline-color: rgba(81,69,205,.5); }
.mp-editor-layer.is-selected { outline: 2px solid #5145cd; }
.mp-editor-layer.is-locked { cursor: not-allowed; }
.mp-editor-layer.is-outside { outline-color: #d92d20; }
.mp-editor-layer-content { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; overflow-wrap: anywhere; line-height: 1.15; }
.mp-editor-layer-content img { width: 100%; height: 100%; display: block; object-fit: contain; pointer-events: none; }
.mp-editor-layer-content.is-group { border: 1px dashed #7a6fe2; color: #5145cd; background: rgba(238,236,255,.2); font-size: .7rem; }
.mp-editor-layer-content.is-slot { border: 2px dashed #667085; color: #475467; background: rgba(255,255,255,.65); }
.mp-editor-handle { position: absolute; z-index: 3; width: 1rem; height: 1rem; padding: 0; border: 2px solid #fff; border-radius: 50%; background: #5145cd; box-shadow: 0 0 0 1px #5145cd; }
.mp-editor-handle-scale { right: -.5rem; bottom: -.5rem; cursor: nwse-resize; }
.mp-editor-handle-rotate { left: calc(50% - .5rem); top: -1.4rem; cursor: grab; }
.mp-editor-warning { min-height: 1.3rem; color: #b42318; font-weight: 650; text-align: center; }
.mp-editor-tools { display: flex; flex-wrap: wrap; gap: .4rem; padding-bottom: .8rem; border-bottom: 1px solid #eaecf0; }
.mp-editor-tools button { min-height: 2.35rem; padding: .45rem .65rem; border: 1px solid #cdd3df; border-radius: .45rem; background: #fff; color: #344054; cursor: pointer; }
.mp-editor-tools button:hover:not(:disabled) { border-color: #5145cd; color: #3529a5; }
.mp-editor-tools button:disabled { opacity: .42; cursor: not-allowed; }
.mp-editor-inspector { padding: .4rem 0; }
.mp-editor-layer-list { display: grid; gap: .35rem; max-height: 18rem; overflow: auto; }
.mp-editor-layer-list button { display: flex; justify-content: space-between; align-items: center; gap: .6rem; min-height: 2.65rem; padding: .5rem .7rem; border: 1px solid #e0e4eb; border-radius: .5rem; text-align: left; background: #fff; cursor: pointer; }
.mp-editor-layer-list button.is-selected { border-color: #5145cd; background: #f2f0ff; }
.mp-editor-layer-list small { color: #667085; }

@media (max-width: 760px) {
  .mp-editor-stage { max-height: none; width: min(100%, 36rem); }
  .mp-editor-tools { position: sticky; top: 0; z-index: 2; padding: .45rem 0; background: #fff; }
  .mp-editor-tools button { flex: 1 0 6.7rem; }
}

@media (forced-colors: active) {
  .mp-editor-safe, .mp-editor-layer.is-selected, .mp-editor-layer.is-outside { border: 2px solid CanvasText; }
}
.mp-editor-layer-content{overflow:hidden;width:100%;height:100%}.mp-editor-layer-content>img,.mp-editor-layer-content>svg{display:block;max-width:none}.mp-editor-crop{display:grid;gap:.35rem;border:1px solid #d8dde5;border-radius:.5rem;padding:.6rem}.mp-editor-crop label{display:grid;grid-template-columns:5rem 1fr;gap:.5rem;align-items:center}
.mp-editor-library{border-top:1px solid #d8dde5;margin-top:.75rem;padding-top:.75rem}.mp-editor-library-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(7rem,1fr));gap:.35rem;margin:.5rem 0}
.mp-editor-preview-host{width:100%;min-height:0}.mp-product-preview-toolbar{display:flex;justify-content:center;gap:.4rem;margin-bottom:.65rem}.mp-product-preview-toolbar button,.mp-product-preview-views button,.mp-product-preview-navigation button{min-height:2.35rem;padding:.45rem .8rem;border:1px solid #cdd3df;border-radius:999px;background:#fff;color:#344054;cursor:pointer}.mp-product-preview-toolbar button[aria-pressed="true"],.mp-product-preview-views button[aria-pressed="true"]{border-color:#5145cd;background:#eeecff;color:#3529a5}.mp-product-preview-views{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.65rem}.mp-product-preview-views button{display:grid;gap:.25rem;place-items:center;border-radius:.6rem}.mp-product-preview-views canvas{width:5rem;height:auto;max-height:4rem;object-fit:contain}.mp-product-preview-views .is-unavailable{opacity:.55}.mp-product-preview-navigation{display:flex;justify-content:center;gap:.5rem;margin-top:.5rem}.mp-product-preview-navigation button{font-size:1.35rem;line-height:1}.mp-product-preview-main{display:grid;place-items:center;min-height:16rem}.mp-product-preview-main canvas{display:block;max-width:100%;max-height:calc(100dvh - 16rem);width:auto;height:auto}.mp-product-preview-status{text-align:center;min-height:1.5rem;color:#475467}.mp-product-preview-toolbar button:focus-visible,.mp-product-preview-views button:focus-visible,.mp-product-preview-navigation button:focus-visible{outline:3px solid #84adff;outline-offset:2px}
.mp-product-preview-captures{display:flex;justify-content:center;gap:.5rem;flex-wrap:wrap;margin-top:.75rem}.mp-product-preview-captures button{min-height:2.35rem;padding:.45rem .8rem;border:1px solid #cdd3df;border-radius:.55rem;background:#fff;color:#344054;cursor:pointer}.mp-product-preview-captures button:disabled{opacity:.55;cursor:progress}.mp-product-preview-captures button:focus-visible{outline:3px solid #84adff;outline-offset:2px}

/* MC-26: typed 2D inspector and layer operations. */
.mp-editor-safe[data-mode="block"] { border-style: solid; border-width: 2px; }
.mp-editor-inspector { display: grid; gap: .7rem; }
.mp-editor-inspector-section { margin: 0; padding: .7rem; border: 1px solid #d8dde5; border-radius: .55rem; min-width: 0; }
.mp-editor-inspector-section legend { width: auto; padding: 0 .25rem; margin: 0; font-size: .9rem; font-weight: 700; color: #344054; }
.mp-editor-inspector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.mp-editor-inspector-grid label, .mp-editor-crop label { display: grid; gap: .25rem; color: #475467; font-size: .82rem; }
.mp-editor-inspector-grid input, .mp-editor-inspector-grid select, .mp-editor-crop input, .mp-editor-crop select { min-width: 0; width: 100%; }
.mp-editor-font-row, .mp-editor-context-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin: .5rem 0; }
.mp-editor-context-actions { justify-content: flex-start; }
.mp-editor-context-actions button, .mp-editor-font-row button { min-height: 2.2rem; }
.mp-editor-asset-meta { overflow-wrap: anywhere; color: #667085; font-size: .8rem; }
.mp-editor-layer-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 2.5rem); gap: .3rem; align-items: stretch; }
.mp-editor-layer-row > button { min-width: 0; justify-content: center; padding: .45rem; }
.mp-editor-layer-row > .mp-editor-layer-select { justify-content: space-between; }
.mp-editor-layer-row.is-selected > .mp-editor-layer-select { border-color: #5145cd; background: #f2f0ff; }
.mp-editor-layer-row button:focus-visible, .mp-editor-tools button:focus-visible, .mp-editor-inspector button:focus-visible, .mp-editor-inspector input:focus-visible, .mp-editor-inspector select:focus-visible, .mp-editor-inspector textarea:focus-visible { outline: 3px solid #84adff; outline-offset: 2px; }

@media (max-width: 760px) {
  .mp-editor-inspector-grid { grid-template-columns: 1fr; }
  .mp-editor-layer-row { grid-template-columns: minmax(0, 1fr) repeat(4, 2.75rem); }
}
.mp-editor-layer-panel { display: grid; gap: .45rem; }
.mp-editor-layer-panel-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.mp-editor-layer-panel-actions button { min-height: 2.25rem; }

/* 3.35.21: compact, physical-unit editor inspector. */
.mp-editor-text-panel,
.mp-editor-geometry-panel {
  padding: .85rem;
  border-color: #d7dce5;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 .35rem 1rem rgba(16, 24, 40, .05);
}
.mp-editor-text-panel legend,
.mp-editor-geometry-panel legend {
  padding: 0 .4rem;
  font-size: .95rem;
  color: #1d2939;
}
.mp-editor-textarea-field {
  display: grid;
  gap: .35rem;
  margin-bottom: .75rem;
  color: #344054;
  font-size: .82rem;
  font-weight: 650;
}
.mp-editor-textarea-field textarea {
  width: 100%;
  min-height: 5.4rem;
  resize: vertical;
  padding: .7rem .75rem;
  border: 1px solid #cfd5df;
  border-radius: .6rem;
  background: #fff;
  color: #101828;
  line-height: 1.45;
  box-shadow: inset 0 1px 2px rgba(16, 24, 40, .03);
}
.mp-editor-typography-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.mp-editor-control-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  grid-template-areas: "icon title" "icon control";
  align-items: center;
  gap: .18rem .5rem;
  min-width: 0;
  min-height: 4.7rem;
  padding: .65rem .7rem;
  border: 1px solid #e0e4eb;
  border-radius: .65rem;
  background: #fff;
  color: #344054;
}
.mp-editor-control-card-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: .45rem;
  background: #f2f0ff;
  color: #5145cd;
}
.mp-editor-control-card-icon svg,
.mp-editor-segment-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mp-editor-control-card-title {
  grid-area: title;
  min-width: 0;
  color: #667085;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .01em;
}
.mp-editor-control-card > .mp-editor-unit-input,
.mp-editor-control-card > .mp-editor-color-control,
.mp-editor-control-card > .mp-editor-font-name,
.mp-editor-control-card > button {
  grid-column: 2;
}
.mp-editor-font-card {
  grid-template-rows: auto auto auto;
}
.mp-editor-font-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #101828;
  font-size: .88rem;
}
.mp-editor-font-card > button {
  justify-self: start;
  min-height: 1.85rem;
  margin-top: .2rem;
  padding: .25rem .55rem;
  border: 1px solid #cfd5df;
  border-radius: .4rem;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font-size: .75rem;
}
.mp-editor-color-control {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
}
.mp-editor-color-control input[type="color"] {
  width: 2.35rem;
  height: 2rem;
  padding: .12rem;
  border: 1px solid #cfd5df;
  border-radius: .45rem;
  background: #fff;
  cursor: pointer;
}
.mp-editor-color-control code {
  overflow: hidden;
  color: #344054;
  font-size: .78rem;
  text-overflow: ellipsis;
}
.mp-editor-unit-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cfd5df;
  border-radius: .48rem;
  background: #fff;
}
.mp-editor-unit-input:focus-within {
  border-color: #7f73e8;
  box-shadow: 0 0 0 3px rgba(81, 69, 205, .12);
}
.mp-editor-unit-input input {
  min-width: 0;
  width: 100%;
  height: 2.2rem;
  padding: .42rem .5rem;
  border: 0;
  outline: 0;
  background: transparent;
  color: #101828;
  font-variant-numeric: tabular-nums;
}
.mp-editor-unit-input > span {
  display: grid;
  place-items: center;
  min-width: 2.2rem;
  padding: 0 .45rem;
  border-left: 1px solid #eaecf0;
  background: #f8f9fb;
  color: #667085;
  font-size: .72rem;
  font-weight: 700;
}
.mp-editor-unit-input input:disabled {
  background: #f7f8fa;
}
.mp-editor-alignment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  margin-top: .65rem;
  padding-top: .65rem;
  border-top: 1px solid #eaecf0;
}
.mp-editor-control-label {
  color: #475467;
  font-size: .78rem;
  font-weight: 650;
}
.mp-editor-segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 2.35rem;
  overflow: hidden;
  border: 1px solid #cfd5df;
  border-radius: .5rem;
  background: #fff;
}
.mp-editor-segment-button {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.2rem;
  padding: 0;
  border: 0;
  border-right: 1px solid #e4e7ec;
  background: transparent;
  color: #475467;
  cursor: pointer;
}
.mp-editor-segment-button:last-child { border-right: 0; }
.mp-editor-segment-button:hover:not(:disabled) { background: #f5f3ff; color: #5145cd; }
.mp-editor-segment-button[aria-pressed="true"] { background: #eeecff; color: #3529a5; box-shadow: inset 0 0 0 1px #7a6fe2; }
.mp-editor-segment-button:disabled { opacity: .4; cursor: not-allowed; }
.mp-editor-geometry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.mp-editor-compact-field {
  display: grid;
  grid-template-columns: 4.9rem minmax(0, 1fr);
  align-items: center;
  gap: .45rem;
  min-width: 0;
}
.mp-editor-geometry-rotation { grid-column: 1 / -1; }
.mp-editor-geometry-rotation .mp-editor-unit-input { max-width: calc(50% - .275rem); }
.mp-editor-panel-hint {
  margin: .65rem 0 0;
  padding-top: .55rem;
  border-top: 1px solid #eaecf0;
  color: #667085;
  font-size: .72rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .mp-editor-typography-grid,
  .mp-editor-geometry-grid { grid-template-columns: 1fr; }
  .mp-editor-geometry-rotation { grid-column: auto; }
  .mp-editor-geometry-rotation .mp-editor-unit-input { max-width: none; }
}

/* 3.35.22 — viewport-filling editor and stable inspector. */
@media (min-width: 761px) {
  .mp-creator-shell.is-editor-step .mp-editor-preview-host {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .mp-creator-shell.is-editor-step .mp-editor-preview-host > [data-product-preview-project] {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .mp-creator-shell.is-editor-step .mp-editor {
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    gap: .55rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-stage-wrap {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: .35rem;
    overflow: hidden;
    place-items: center;
  }

  .mp-creator-shell.is-editor-step .mp-editor-stage {
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
  }

  .mp-creator-shell.is-editor-step .mp-product-preview-toolbar {
    flex: 0 0 auto;
    margin: 0 0 .45rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-scene-tabs {
    flex: 0 0 auto;
    min-height: 2.25rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-warning {
    min-height: 1.1rem;
    font-size: .78rem;
  }

  .mp-creator-shell.is-editor-step [data-editor-controls] {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    height: 100%;
    min-height: 0;
    padding-right: .28rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .mp-creator-shell.is-editor-step .mp-editor-tools {
    position: sticky;
    top: 0;
    z-index: 4;
    flex: 0 0 auto;
    gap: .3rem;
    margin: 0;
    padding: .15rem 0 .55rem;
    background: linear-gradient(180deg, #fff 0%, #fff 86%, rgba(255,255,255,.92) 100%);
  }

  .mp-creator-shell.is-editor-step .mp-editor-tools button {
    min-height: 2.05rem;
    padding: .34rem .5rem;
    border-radius: .42rem;
    font-size: .76rem;
    line-height: 1.2;
  }

  .mp-creator-shell.is-editor-step .mp-editor-inspector {
    flex: 0 0 auto;
    gap: .5rem;
    padding: 0;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-panel {
    flex: 1 0 11rem;
    min-height: 11rem;
    padding-top: .15rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-list {
    min-height: 7rem;
    max-height: min(28vh, 19rem);
    padding-right: .1rem;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .mp-creator-shell.is-editor-step [data-editor-controls].is-empty-selection .mp-editor-layer-panel {
    flex: 1 1 auto;
  }

  .mp-creator-shell.is-editor-step [data-editor-controls].is-empty-selection .mp-editor-layer-list {
    max-height: none;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-name-field {
    margin: .2rem 0 .1rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-inspector-section {
    padding: .65rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-text-panel,
  .mp-creator-shell.is-editor-step .mp-editor-geometry-panel {
    box-shadow: none;
  }

  .mp-creator-shell.is-editor-step .mp-editor-textarea-field textarea {
    min-height: 4.6rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-control-card {
    min-height: 4.25rem;
    padding: .55rem .6rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-context-actions {
    margin: .25rem 0;
  }
}

.mp-editor-selection-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.7rem;
  padding: .55rem .65rem;
  border: 1px solid #e1e5ec;
  border-radius: .6rem;
  background: #f8f9fc;
  color: #475467;
}

.mp-editor-selection-status strong {
  color: #1d2939;
  font-size: .82rem;
}

.mp-editor-selection-status span {
  min-width: 0;
  color: #667085;
  font-size: .75rem;
  text-align: right;
}

.mp-editor-selection-status.is-selected {
  border-color: #d8d3ff;
  background: #f7f5ff;
}

@media (max-width: 1180px) and (min-width: 761px) {
  .mp-creator-shell.is-editor-step .mp-editor-typography-grid,
  .mp-creator-shell.is-editor-step .mp-editor-geometry-grid {
    grid-template-columns: 1fr;
  }

  .mp-creator-shell.is-editor-step .mp-editor-geometry-rotation {
    grid-column: auto;
  }

  .mp-creator-shell.is-editor-step .mp-editor-geometry-rotation .mp-editor-unit-input {
    max-width: none;
  }
}

@media (min-width: 761px) {
  .mp-creator-shell.is-editor-step .mp-editor-preview-host > [data-product-preview-mockup]:not([hidden]) {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .mp-creator-shell.is-editor-step .mp-product-preview-main {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .mp-creator-shell.is-editor-step .mp-product-preview-main canvas {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }

  .mp-creator-shell.is-editor-step .mp-product-preview-views {
    max-height: 7rem;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start;
    scrollbar-gutter: stable;
  }
}

/* 3.35.23 — compact, non-stretching desktop editor controls. */
@media (min-width: 761px) {
  .mp-creator-shell.is-editor-step [data-editor-controls] {
    display: grid;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: .7rem;
    padding-right: 0;
    overflow: visible;
  }

  .mp-creator-shell.is-editor-step .mp-editor-stage {
    transition: none !important;
  }

  .mp-creator-shell.is-editor-step .mp-editor-stage-wrap {
    padding: .75rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-panel,
  .mp-creator-shell.is-editor-step [data-editor-controls].is-empty-selection .mp-editor-layer-panel {
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    flex: none;
    min-height: 0;
    padding: .65rem;
    border: 1px solid #e1e5ec;
    border-radius: .7rem;
    background: #f9fafb;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    min-height: 2.2rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-panel-head > strong {
    flex: 0 0 auto;
    color: #1d2939;
    font-size: .86rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-panel-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    align-content: center;
    gap: .3rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-panel-actions button,
  .mp-creator-shell.is-editor-step .mp-editor-context-actions button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: 2rem;
    min-height: 2rem;
    padding: .3rem .55rem;
    line-height: 1;
    white-space: nowrap;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-list,
  .mp-creator-shell.is-editor-step [data-editor-controls].is-empty-selection .mp-editor-layer-list {
    display: grid;
    grid-auto-rows: minmax(2.45rem, auto);
    align-content: start;
    gap: .35rem;
    min-height: 0;
    max-height: 12rem;
    margin-top: .45rem;
    padding-right: .15rem;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-row {
    align-items: center;
    min-height: 2.45rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-row > button {
    align-self: center;
    height: 2.35rem;
    min-height: 2.35rem;
    padding-top: .35rem;
    padding-bottom: .35rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-tools {
    position: static;
    display: flex;
    flex: none;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    gap: .35rem;
    margin: 0;
    padding: 0 0 .65rem;
    background: transparent;
  }

  .mp-creator-shell.is-editor-step .mp-editor-tools button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: 2.05rem;
    min-height: 2.05rem;
    white-space: nowrap;
  }

  .mp-creator-shell.is-editor-step .mp-editor-inspector {
    display: grid;
    grid-auto-rows: auto;
    align-content: start;
    flex: none;
    min-height: 0;
    gap: .55rem;
    padding-bottom: .35rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-context-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    gap: .35rem;
    min-height: 0;
    margin: .2rem 0;
  }

  .mp-creator-shell.is-editor-step .mp-editor-inspector-section,
  .mp-creator-shell.is-editor-step .mp-editor-control-card,
  .mp-creator-shell.is-editor-step .mp-editor-selection-status,
  .mp-creator-shell.is-editor-step .mp-editor-layer-name-field {
    align-self: start;
  }
}


/* 3.35.24 — editor controls scroll inside the right pane without stretching sections. */
@media (min-width: 761px) {
  .mp-creator-shell.is-editor-step [data-editor-controls] {
    display: grid;
    grid-auto-rows: max-content;
    grid-template-rows: none;
    align-content: start;
    gap: .7rem;
    width: 100%;
    height: auto;
    min-height: 0;
    padding-right: .35rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-panel,
  .mp-creator-shell.is-editor-step .mp-editor-tools,
  .mp-creator-shell.is-editor-step .mp-editor-inspector {
    min-height: max-content;
  }
}

/* 3.35.25 — stable desktop editor: fixed-height scroll container and dynamic layer actions. */
@media (min-width: 761px) {
  .mp-creator-shell.is-editor-step [data-editor-controls] {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: stretch;
    gap: .7rem;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    padding-right: .35rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-panel,
  .mp-creator-shell.is-editor-step .mp-editor-tools,
  .mp-creator-shell.is-editor-step .mp-editor-inspector {
    flex: 0 0 auto;
    min-height: 0;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    grid-auto-columns: 2.5rem;
    align-items: center;
    gap: .3rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-row > button:not(.mp-editor-layer-select) {
    width: 2.5rem;
    min-width: 2.5rem;
    max-width: 2.5rem;
    padding-left: .25rem;
    padding-right: .25rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-select,
  .mp-creator-shell.is-editor-step .mp-editor-layer-select.is-readonly {
    min-width: 0;
    min-height: 2.35rem;
  }

  .mp-creator-shell.is-editor-step .mp-editor-layer-select.is-readonly {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .45rem .65rem;
    border: 1px solid #d6dbe5;
    border-radius: .45rem;
    background: #f7f8fa;
    color: #667085;
  }
}

@media (min-width: 761px) {
  /* A zero flex-basis gives the controls exactly the remaining card height; overflow then scrolls. */
  .mp-creator-shell.is-editor-step [data-editor-controls] {
    flex: 1 1 0;
    height: 0;
    max-height: none;
  }
}
