/* Visual skin for /studio/v2. Structure, controls, and behavior stay with the current studio. */

body.studio-v2 {
  --paper: #f4f3ef;
  --card: #fff;
  --ink: #1a1a1a;
  --muted: #8d897f;
  --line: #e5e2db;
  --line-soft: #f0eee8;
  --chip: #f3f1ec;
  --black: #171717;
  --chrome-line: #e6e2da;
  --chrome-hover: #f3f1ec;
  --schema-stroke: #e6e1d8;
  background: var(--paper);
  color: #242320;
  font-family: Inter, "SF Pro Text", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -0.011em;
  accent-color: #171717;
}

body.studio-v2.flush-controls :is(button, select, input, textarea):not(.prototype *):not(.meaning-scroll *):not(#normalized-output *) {
  border-radius: 16px !important;
  box-shadow: none;
}
body.studio-v2.flush-controls textarea:not(.prototype *),
body.studio-v2.flush-controls dialog :is(input, select, textarea):not([type=checkbox]):not([type=color]):not([type=range]) {
  border-radius: 10px !important;
}
body.studio-v2.flush-controls textarea#spec,
body.studio-v2.flush-controls :is(.pane-resize, .pane-resize-edge, .device-resize) {
  border-radius: 0 !important;
  box-shadow: none !important;
}
body.studio-v2.flush-controls :is(button, select, input, textarea):not(.prototype *):focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

/* Paper canvas, circular project rail, floating header pills. */
body.studio-v2.flush-controls .version-rail {
  padding: 14px 0 16px;
  gap: 8px;
  align-items: center;
  background: var(--paper);
  border-right: 1px solid #ebe7e0;
}
body.studio-v2.flush-controls .version-rail-label {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  padding: 2px 0 8px;
  border: 0;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  color: #a8a398;
}
body.studio-v2.flush-controls #version-list {
  width: 100%;
  gap: 6px;
  align-items: center;
}
body.studio-v2.flush-controls .version-entry {
  width: 100%;
  height: 40px;
  display: grid;
  place-items: center;
}
body.studio-v2.flush-controls .version-rail .version-tile {
  width: 36px;
  height: 36px;
  min-height: 36px !important;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #e0dcd4 !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #3f3d39;
  font-size: 11px;
  font-weight: 650;
  box-shadow: 0 1px 1px #1814100a;
}
body.studio-v2.flush-controls .version-rail #add-version {
  border-style: dashed !important;
  background: transparent !important;
  color: #6f6b64;
  font-size: 18px;
  line-height: 1;
  box-shadow: none;
}
body.studio-v2.flush-controls .version-rail #add-version:hover {
  background: #fff !important;
  border-color: #c8c3b8 !important;
  color: var(--ink) !important;
}
body.studio-v2.flush-controls .version-rail :is(.version-delete, .version-duplicate) {
  width: 16px;
  height: 16px;
  min-height: 16px !important;
  padding: 0;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  font-size: 11px;
}
body.studio-v2.flush-controls .version-rail .version-delete { top: 0; right: 2px; }
body.studio-v2.flush-controls .version-rail .version-duplicate { bottom: 0; right: 2px; }

body.studio-v2.flush-controls .topbar {
  gap: 8px;
  padding: 12px 16px;
  min-height: 0;
  align-items: center;
  background: var(--paper);
  border-bottom: 0;
}
body.studio-v2.flush-controls .topbar #product-name {
  align-self: center;
  flex: 0 1 190px;
  width: 180px;
  height: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--line) !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff;
  box-shadow: 0 1px 1px #1814100a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
body.studio-v2.flush-controls .topbar #product-name:hover,
body.studio-v2.flush-controls .topbar #product-name:focus {
  border-color: #d4d0c7 !important;
  background: #fff;
}
body.studio-v2.flush-controls .app-modes {
  align-items: center;
  align-self: center;
  gap: 4px;
}
body.studio-v2.flush-controls .topbar > .workspace-toolbar {
  gap: 8px;
  align-items: center;
  border: 0;
}
body.studio-v2.flush-controls .topbar .workspace-toolbar > .view-picker {
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
  height: auto;
  margin-left: auto;
}
body.studio-v2.flush-controls .topbar .workspace-toolbar > .view-picker button,
body.studio-v2.flush-controls .app-modes > button,
body.studio-v2.flush-controls .topbar .top-actions > button,
body.studio-v2.flush-controls .topbar .top-actions > a.toolbar-icon {
  flex: 0 0 auto;
  align-self: center;
  height: 44px;
  min-height: 44px !important;
  min-width: 0;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #4a4843;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 1px 1px #18141008;
}
body.studio-v2.flush-controls .topbar .top-actions {
  align-items: center;
  align-self: center;
  gap: 6px;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
body.studio-v2.flush-controls .topbar .top-actions > .toolbar-icon,
body.studio-v2.flush-controls .topbar .top-actions > a.toolbar-icon {
  width: 44px;
  padding: 0;
  border-radius: 16px !important;
}
body.studio-v2.flush-controls .topbar .top-actions > button:not(.toolbar-icon) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none;
  color: #3c3a36;
  font-weight: 550;
}
body.studio-v2.flush-controls .topbar .top-actions > button:not(.toolbar-icon):hover {
  background: #eceae4 !important;
  border-color: transparent !important;
  color: var(--ink) !important;
}
body.studio-v2.flush-controls button:not(.prototype *):not([aria-pressed=true]):not([aria-selected=true]):not(.primary):not(.danger):hover {
  background: #f7f6f2 !important;
  border-color: #d9d5cc !important;
  color: var(--ink);
}

/* Soft cards in the same columns. */
body.studio-v2.flush-controls #workspace {
  gap: 12px;
  padding: 2px 14px 14px;
}
body.studio-v2.flush-controls .pane {
  border: 1px solid #e6e2da;
  border-radius: 16px !important;
  background: var(--card);
  box-shadow: 0 1px 1px #18141008, 0 10px 28px #1814100a;
}
body.studio-v2.flush-controls .pane-heading {
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 10px 10px 10px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}
body.studio-v2.flush-controls .pane-heading > div {
  align-items: center;
  align-content: center;
  padding: 0;
  gap: 8px;
}
body.studio-v2.flush-controls .pane-heading h2 {
  margin: 0;
  padding: 0 !important;
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.02em;
  color: var(--ink);
}
body.studio-v2.flush-controls .pane-heading > button {
  align-self: center;
  width: auto;
  height: 44px;
  min-width: 32px;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 0 12px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #3f3d39 !important;
  font-size: 12px;
  font-weight: 500;
}
body.studio-v2.flush-controls .pane-heading > .expand {
  width: 44px;
  padding: 0;
  color: #6e6a63 !important;
}
body.studio-v2.flush-controls .pane-heading > button[aria-pressed=true],
body.studio-v2.flush-controls .pane-heading > button[aria-pressed=true]:hover {
  background: var(--black) !important;
  border-color: var(--black) !important;
  color: #fff !important;
}
body.studio-v2.flush-controls .pane-heading > .expand:is(:hover, :focus-visible),
body.studio-v2.flush-controls .pane-heading > .expand[aria-pressed=true],
body.studio-v2.flush-controls .pane-heading > .expand[aria-pressed=true]:hover {
  background: #f3f1ec !important;
  border-color: #d9d5cc !important;
  color: #3f3d39 !important;
}

body.studio-v2.flush-controls :is(.schema-tools, .text-tools, .reference-tools, .text-bottom) {
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 10px 12px;
  border-color: var(--line-soft);
  background: #fafaf8;
}
body.studio-v2.flush-controls :is(.schema-tools, .reference-tools, .text-bottom) > button {
  flex: 0 0 auto;
  align-self: center;
  height: 30px;
  min-height: 30px !important;
  padding: 0 12px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #3f3d39;
  font-size: 12px;
  font-weight: 500;
}
body.studio-v2.flush-controls .meaning-scroll > #add-object {
  height: 44px;
  min-height: 44px !important;
  padding: 0 14px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #3f3d39;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  box-shadow: 0 2px 10px #18141014;
}
body.studio-v2.flush-controls .meaning-scroll > #add-object:hover {
  background: #fafaf8 !important;
  border-color: #d9d5cc !important;
}
body.studio-v2.flush-controls .text-tools {
  justify-content: flex-end;
}
body.studio-v2.flush-controls .text-tools:not(:has(#interpret:not([hidden]))) {
  display: none;
}
body.studio-v2.flush-controls .text-tools > #interpret {
  flex: 0 0 auto;
  align-self: center;
  height: 44px;
  min-height: 44px !important;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--black) !important;
  border-radius: 16px !important;
  background: var(--black) !important;
  color: #fff !important;
  font-size: 11px;
  font-weight: 500;
  line-height: 15px;
  box-shadow: none;
}
body.studio-v2.flush-controls .text-tools > #interpret:hover {
  background: #333 !important;
  border-color: #333 !important;
  color: #fff !important;
}
body.studio-v2.flush-controls .text-tools > label {
  flex: 0 1 auto;
  min-height: 0;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: #3f3d39;
  cursor: pointer;
}
body.studio-v2.flush-controls .text-tools > label:hover { background: transparent; }
body.studio-v2.flush-controls :is(.text-tools, .reference-tools) > span {
  flex: 0 1 auto;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 12px;
}
body.studio-v2.flush-controls .schema-tools > .diagram-context {
  flex: 0 1 auto;
  order: 0;
  gap: 8px;
  padding: 0;
  border: 0;
  line-height: 1.2;
  text-indent: 0;
  color: var(--muted);
  font-size: 12px;
}
body.studio-v2.flush-controls .diagram-context select,
body.studio-v2.flush-controls .screen-toolbar select {
  flex: 0 1 auto;
  height: 32px;
  min-height: 32px;
  max-width: 220px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background-color: #fff;
  text-indent: 0;
  font-size: 12px;
  font-weight: 500;
}
body.studio-v2.flush-controls .grammar { padding: 0; border-top: 1px solid var(--line-soft); }
body.studio-v2.flush-controls .grammar summary {
  min-height: 0;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 12px;
}
body.studio-v2.flush-controls .grammar p { padding: 0 16px 12px; color: #6f6b64; }

body.studio-v2 .text-workbench #spec {
  padding: 16px 16px 18px;
  border: 0 !important;
  background: #fff;
  color: #2a2926;
  font-size: 14.5px;
  line-height: 1.65;
  letter-spacing: -0.02em;
}
body.studio-v2 .text-workbench #spec:focus { box-shadow: none; outline: none; }
body.studio-v2 .text-workbench #spec:placeholder-shown {
  font-size: var(--spec-prompt-size, 44px);
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
body.studio-v2 .text-workbench #spec::placeholder { color: #b7b3ab; }
body.studio-v2 .dictation-status,
body.studio-v2 .dictation-interim {
  background: #fafaf8;
  border-bottom: 1px solid var(--line-soft);
  color: #6f6b64;
}

/* Schema cards and chips, still in reading order. */
body.studio-v2.flush-controls .meaning-scroll {
  padding: 12px;
  padding-bottom: 56px;
  background: #f7f6f3;
}
body.studio-v2.flush-controls #normalized-output { gap: 10px; }
body.studio-v2.flush-controls .meaning-object {
  padding: 10px;
  border: 1px solid #e7e2d8 !important;
  border-radius: 12px !important;
  background: #fff;
  box-shadow: 0 1px 1px #18141008;
}
body.studio-v2.flush-controls .meaning-object.selected {
  border-color: #c9c3b8 !important;
  box-shadow: 0 1px 2px #1814100c;
}
/* Selected layout list uses the object chip border: 1px #c5d7ee. */
body.studio-v2 #layout-preview .prototype [data-layout-list].is-layout-target {
  outline: 1px solid #c5d7ee;
  outline-offset: 3px;
}
body.studio-v2.flush-controls #normalized-output .operation-nest-label {
  padding-right: 8px;
}
body.studio-v2.flush-controls #normalized-output select.capability-target {
  background-color: #f4f2ee !important;
  color: #3f3d39 !important;
  border-color: #e1dbd1 !important;
  border-width: 1px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%236b665e' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 12px;
}

body.studio-v2.flush-controls .text-pane .pane-heading > #example {
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 15px;
  letter-spacing: normal;
}
body.studio-v2 .text-pane { container-type: inline-size; container-name: text-pane; }
body.studio-v2 .text-pane .pane-heading > :is(#dictate, #example) {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
body.studio-v2 .text-pane .pane-heading > :is(#dictate, #example) svg { flex: none; }
@container text-pane (max-width: 360px) {
  body.studio-v2.flush-controls .text-pane .pane-heading > :is(#dictate, #example) {
    width: 44px;
    min-width: 44px;
    padding: 0 !important;
    justify-content: center;
    gap: 0;
  }
  body.studio-v2 .text-pane .pane-heading > :is(#dictate, #example) span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}
body.studio-v2 .meaning-unassigned,
body.studio-v2 .question {
  border-radius: 12px;
}
body.studio-v2 .actor-picker-menu {
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px #1814101f;
}
body.studio-v2 .meaning-scroll > .phrase-menu {
  margin: 0 0 10px;
  border: 1px solid #e7e2d8;
  border-radius: 12px;
  box-shadow: none;
  background: #fff;
}
body.studio-v2 #graph-scroll {
  background-color: #f3f2ee;
  background-image: radial-gradient(#d5d1c8 .7px, transparent .7px);
  background-size: 14px 14px;
}
body.studio-v2 .node {
  border-color: #e6e2da;
  border-radius: 14px;
  box-shadow: 0 8px 24px #18141010;
}
body.studio-v2 .node.selected { border-color: #1a1a1a; box-shadow: 0 0 0 1px #1a1a1a; }
body.studio-v2 .node-head { border-bottom-color: var(--line-soft); }

/* Labeled pills for layout and craft, device control unchanged in place. */
body.studio-v2.flush-controls #layout-tools.is-docked-active {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 4px;
  padding: 12px 14px;
  overflow: visible;
  background: var(--black);
  border-top: 1px solid #2a2a2a;
  grid-template-columns: none;
  box-shadow: 0 -8px 24px #00000040;
}
body.studio-v2.flush-controls #layout-tools.is-docked-active .control-caption {
  color: #a8a8a8;
}
body.studio-v2.flush-controls .craft-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
  padding: 12px 14px;
  overflow: visible;
  background: #fafaf8f2;
  border-color: var(--line-soft);
  grid-template-columns: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 -8px 24px #18141012;
}
body.studio-v2.flush-controls #layout-tools label:has(select) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
body.studio-v2.flush-controls #layout-tools label:has(select) + label:has(select) {
  padding-left: 0;
}
body.studio-v2.flush-controls .craft-controls label:not(.color) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  flex: 0 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
body.studio-v2.flush-controls #layout-tools[data-wheel-params] label:has(select) {
  border-radius: 0;
  padding: 0;
  transition: none;
  box-shadow: none !important;
  background: transparent;
}
body.studio-v2.flush-controls #layout-tools[data-wheel-params] label:has(select):hover {
  background: transparent;
  box-shadow: none !important;
  cursor: ns-resize;
}
body.studio-v2.flush-controls #layout-tools[data-wheel-params] label:has(select):hover .wheel-scroll-shell {
  border-color: #a8a8a8;
}
body.studio-v2.flush-controls .control-caption {
  position: static;
  margin: 0;
  padding: 0 2px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  color: var(--muted);
}
body.studio-v2.flush-controls #layout-tools .wheel-scroll-heading {
  padding: 0 2px;
}
body.studio-v2.flush-controls #layout-tools .wheel-scroll-shell {
  display: flex;
  align-items: center;
  gap: 7px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 12px 0 9px;
  border: 1px solid var(--line);
  border-radius: 16px !important;
  background: #fff;
}
body.studio-v2.flush-controls #layout-tools .wheel-scroll-shell .wheel-scroll-indicator {
  flex: 0 0 14px;
  color: #1a1a1a;
}
body.studio-v2.flush-controls #layout-tools .wheel-scroll-shell select {
  display: block;
  flex: 1 1 auto;
  field-sizing: fixed;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 30px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
}
body.studio-v2.flush-controls .craft-controls select {
  grid-row: auto;
  display: block;
  field-sizing: content;
  width: max-content;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 28px 0 12px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background-color: #fff;
  background-position: right 10px center;
  font-size: 12px;
  font-weight: 500;
  line-height: 30px;
  color: var(--ink);
}
body.studio-v2.flush-controls .craft-controls label.color {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 16px !important;
  background: #fff;
  font-size: 12px;
  color: #5c5953;
}
body.studio-v2.flush-controls .craft-controls label.color input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  max-width: 18px;
  padding: 0;
  border: 0;
  border-radius: 50% !important;
}
body.studio-v2.flush-controls .layout-pane .pane-heading .layout-device-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  align-self: center;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0 0 0 auto;
  padding: 0;
  background: transparent;
}
body.studio-v2.flush-controls .layout-pane .pane-heading #layout-devices {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  box-sizing: border-box;
  gap: 2px;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 16px !important;
  background: #f6f5f1;
}
body.studio-v2.flush-controls .layout-pane .pane-heading #layout-devices button {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 36px;
  min-height: 36px !important;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 16px !important;
  background: transparent !important;
  color: #5e5a54;
  box-shadow: none;
}
/* Selection stays light so Create prototype is the only black control. */
body.studio-v2.flush-controls .topbar .workspace-toolbar > .view-picker button[data-pin],
body.studio-v2.flush-controls .topbar .app-modes > button[role=tab],
body.studio-v2.flush-controls .version-rail .version-tile:not(#add-version):not([aria-pressed=true]) {
  background: #eceae4 !important;
  border-color: #ddd9d1 !important;
  color: var(--ink) !important;
  box-shadow: none;
}
body.studio-v2.flush-controls .topbar .workspace-toolbar > .view-picker button[data-pin]:not([aria-pressed=true]):hover,
body.studio-v2.flush-controls .topbar .app-modes > button[role=tab]:not([aria-selected=true]):hover,
body.studio-v2.flush-controls .version-rail .version-tile:not(#add-version):not([aria-pressed=true]):hover {
  background: #e4e1da !important;
  border-color: #d4d0c7 !important;
  color: var(--ink) !important;
}
body.studio-v2.flush-controls .topbar .workspace-toolbar > .view-picker button[data-pin][aria-pressed=true],
body.studio-v2.flush-controls .topbar .workspace-toolbar > .view-picker button[data-pin][aria-pressed=true]:hover,
body.studio-v2.flush-controls .topbar .app-modes > button[role=tab][aria-selected=true],
body.studio-v2.flush-controls .topbar .app-modes > button[role=tab][aria-selected=true]:hover,
body.studio-v2.flush-controls .version-rail .version-tile[aria-pressed=true],
body.studio-v2.flush-controls .version-rail .version-tile[aria-pressed=true]:hover,
body.studio-v2.flush-controls .layout-pane .pane-heading #layout-devices button[aria-pressed=true],
body.studio-v2.flush-controls .layout-pane .pane-heading #layout-devices button[aria-pressed=true]:hover {
  background: #fff !important;
  border-color: var(--line) !important;
  color: #4a4843 !important;
  box-shadow: 0 1px 1px #18141008;
}
body.studio-v2.flush-controls .layout-user-tabs {
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}
body.studio-v2.flush-controls .layout-user-tabs .layout-user-label {
  margin: 0;
}
body.studio-v2.flush-controls .layout-user-tabs #layout-user {
  appearance: none;
  box-sizing: border-box;
  min-width: 9rem;
  height: 44px;
  min-height: 44px !important;
  max-height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%236b665e' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 12px;
  color: #4a4843;
  font-size: 12px;
  font-weight: 550;
  box-shadow: none;
}
body.studio-v2.flush-controls .layout-user-tabs .layout-sync {
  padding: 0;
  border: 0;
  color: var(--muted);
}
body.studio-v2 #layout-preview.device-preview {
  padding: 16px;
  background-color: #f3f2ee;
  background-image: radial-gradient(#d4d0c7 .75px, transparent .75px);
  background-size: 14px 14px;
}
body.studio-v2 #layout-preview .device-frame > .prototype,
body.studio-v2 #craft-preview > .prototype {
  border-radius: 16px;
  box-shadow: 0 8px 28px #18141014;
}
body.studio-v2 #craft-preview {
  background: #f3f2ee;
  background-image: radial-gradient(#d4d0c7 .75px, transparent .75px);
  background-size: 14px 14px;
}

/* Dialogs and the object drawer keep their places, with the same control shapes. */
body.studio-v2.flush-controls > dialog {
  border: 1px solid #e6e2da;
  border-radius: 16px !important;
  background: #fff;
  color: #242320;
  box-shadow: 0 24px 80px #1814102e;
}
body.studio-v2.flush-controls > dialog .dialog-head {
  align-items: center;
  gap: 12px;
  min-height: 0;
  padding: 14px 14px 14px 18px;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
body.studio-v2.flush-controls > dialog .dialog-head h2 {
  margin: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 620;
  letter-spacing: -0.02em;
}
body.studio-v2.flush-controls > dialog .dialog-head button {
  width: 32px;
  height: 32px;
  min-height: 32px !important;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: var(--ink) !important;
}
body.studio-v2.flush-controls > dialog .dialog-head button:hover {
  background: #f3f1ec !important;
  color: var(--ink) !important;
}
body.studio-v2.flush-controls > dialog .dialog-body { padding: 16px 18px 18px; }
body.studio-v2.flush-controls > dialog .dialog-body :is(input, select, textarea) {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line) !important;
  background: #fff;
}
body.studio-v2.flush-controls > dialog textarea { min-height: 88px; border-radius: 12px !important; }
body.studio-v2.flush-controls > dialog footer,
body.studio-v2.flush-controls > dialog :is(.export-actions, .ds-actions) {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 18px;
}
body.studio-v2.flush-controls > dialog footer { border-top: 1px solid var(--line-soft); }
body.studio-v2.flush-controls > dialog :is(footer, .export-actions, .ds-actions) > button {
  flex: 0 0 auto;
  height: 34px;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 14px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #3f3d39 !important;
}
body.studio-v2.flush-controls :is(button.primary, #export-handoff, #ds-generate, #ds-apply),
body.studio-v2.flush-controls :is(button.primary, #export-handoff, #ds-generate, #ds-apply):hover {
  background: var(--black) !important;
  border-color: var(--black) !important;
  color: #fff !important;
}
body.studio-v2.flush-controls #object-dialog .dialog-body label { padding: 12px 18px 0; }
body.studio-v2.flush-controls #object-dialog .dialog-note { color: var(--muted); }
body.studio-v2 #inspector-dialog {
  background: #fafaf8;
  border-left: 1px solid #e6e2da;
  box-shadow: -16px 0 40px #18141014;
}
body.studio-v2 #inspector-dialog .dialog-head,
body.studio-v2 #inspector-dialog .dialog-head button,
body.studio-v2 #inspector-dialog .dialog-head button:hover {
  background: #fff !important;
  color: var(--ink) !important;
  border-bottom-color: var(--line-soft);
}
body.studio-v2.flush-controls #inspector-dialog .inspector {
  padding: 16px 16px 32px;
  background: #fafaf8;
}
body.studio-v2.flush-controls #inspector-dialog .inspector-title { gap: 8px; margin: 0 0 8px; align-items: center; }
body.studio-v2.flush-controls #inspector-dialog .inspector-title > div { display: flex; flex: 0 0 auto; gap: 6px; }
body.studio-v2.flush-controls #inspector-dialog .inspector-title input,
body.studio-v2.flush-controls #inspector-dialog .field-row > :is(input, select, button),
body.studio-v2.flush-controls #inspector-dialog .operation-field select,
body.studio-v2.flush-controls #inspector-dialog .relation-row > :is(select, button),
body.studio-v2.flush-controls #inspector-dialog .connect-form > :is(select, button) {
  min-height: 36px;
  margin: 0;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  background: #fff;
}
body.studio-v2.flush-controls #inspector-dialog .inspector-title button,
body.studio-v2.flush-controls #inspector-dialog .field-row > button:not(.field-add-submit),
body.studio-v2.flush-controls #inspector-dialog .relation-row > button,
body.studio-v2.flush-controls #inspector-dialog .connect-form > button {
  flex: 0 0 auto;
  border-radius: 16px !important;
}
body.studio-v2.flush-controls #inspector-dialog .field-add-submit {
  flex: 0 0 36px !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #1a1a1a !important;
  color: #fff !important;
  font-size: 20px !important;
  line-height: 1 !important;
}
body.studio-v2.flush-controls #inspector-dialog .field-add-submit:hover {
  background: #303030 !important;
}
body.studio-v2.flush-controls #inspector-dialog .inspector :is(h4, h5) {
  margin: 0;
  padding: 16px 2px 8px;
  border: 0;
}
body.studio-v2.flush-controls #inspector-dialog .field-row,
body.studio-v2.flush-controls #inspector-dialog .operation-field,
body.studio-v2.flush-controls #inspector-dialog .connect-form {
  gap: 6px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  align-items: center;
}
body.studio-v2.flush-controls #inspector-dialog .operation-grid { gap: 6px; padding: 0; }
body.studio-v2.flush-controls #inspector-dialog .operation-grid label {
  min-height: 34px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #e4dfd6 !important;
  border-radius: 16px !important;
  background: #fff !important;
  color: #3f3d39;
}
body.studio-v2.flush-controls #inspector-dialog .operation-grid label:has(input:checked) {
  background: var(--black) !important;
  border-color: var(--black) !important;
  color: #fff;
}
body.studio-v2.flush-controls #inspector-dialog .operation-grid label:has(input:checked) input { accent-color: #fff; }
body.studio-v2.flush-controls #inspector-dialog .relation-row {
  gap: 8px;
  margin: 0 0 8px;
  padding: 10px;
  border: 1px solid #e6e2da !important;
  border-radius: 12px !important;
  background: #fff;
  align-items: center;
}
body.studio-v2.flush-controls #inspector-dialog .relation-row > span { padding: 0; border: 0; }
body.studio-v2 #delete-project-dialog .danger,
body.studio-v2 #delete-object-dialog .danger,
body.studio-v2 #delete-project-dialog .danger:hover,
body.studio-v2 #delete-object-dialog .danger:hover {
  background: #9b473c !important;
  border-color: #9b473c !important;
  color: #fff !important;
}
body.studio-v2 #toast {
  background: var(--black);
  border-radius: 16px;
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: 0 10px 30px #18141033;
}
body.studio-v2 .generation-indicator { background: #f7f6f3db; }
body.studio-v2 .generation-card strong { color: #3f3d39; }
body.studio-v2 .generation-card small { color: var(--muted); }

/* Map mode uses the same chrome, on the existing canvas. */
body.studio-v2 #screen-atlas { background: #efece6; }
body.studio-v2 .screen-toolbar {
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 10px 14px;
  background: var(--paper);
  border-bottom: 0;
}
body.studio-v2 .screen-toolbar > label {
  gap: 8px;
  padding: 0;
  border: 0;
  font-size: 12px;
  color: var(--muted);
}
body.studio-v2 .screen-pan-hint { color: #a39e94; }
body.studio-v2 .screen-zoom { align-items: center; gap: 4px; }
body.studio-v2 .screen-zoom button {
  height: 32px;
  min-height: 32px !important;
  min-width: 32px;
  padding: 0 12px;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: #fff !important;
}
body.studio-v2 .screen-zoom output { border: 0; color: var(--muted); font-size: 12px; }
body.studio-v2 #screen-navigation {
  background: #f7f6f3;
  border-right: 1px solid #e6e2da;
}
body.studio-v2.flush-controls #screen-navigation button {
  width: calc(100% - 16px);
  margin: 4px 8px;
  border-radius: 8px !important;
}
body.studio-v2.flush-controls #screen-navigation .screen-group-button {
  background: transparent;
  border: 0;
}
body.studio-v2.flush-controls #screen-navigation [aria-current=true],
body.studio-v2.flush-controls #screen-navigation [aria-current=true]:hover {
  background: var(--black) !important;
  color: #fff !important;
}
body.studio-v2 .screen-group > h2 { color: #5c5953; }
body.studio-v2 .screen-card {
  overflow: hidden;
  border-radius: 12px;
  outline: 1px solid #e6e2da;
  box-shadow: 0 8px 24px #18141014;
}
body.studio-v2 .screen-card > header { background: #fafaf8; border-bottom-color: var(--line-soft); }
body.studio-v2 #screen-focus-dialog { border-radius: 16px !important; }

@media (max-width: 1120px) {
  body.studio-v2.flush-controls .topbar > .workspace-toolbar { border-top: 0; }
}
@media (max-width: 650px) {
  body.studio-v2.flush-controls .topbar { padding: 10px; gap: 8px; }
  body.studio-v2.flush-controls .topbar > .top-actions { border-top: 0; }
  body.studio-v2.flush-controls #workspace { padding: 8px; }
  body.studio-v2.flush-controls .version-rail .version-tile { width: 32px; height: 32px; min-height: 32px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.studio-v2.flush-controls button:not(.prototype *) { transition: none; }
}

/* Vertical bars stay hidden until that section is scrolling. */
body.studio-v2,
body.studio-v2 * {
  scrollbar-width: none;
}
body.studio-v2::-webkit-scrollbar:vertical,
body.studio-v2 *::-webkit-scrollbar:vertical {
  width: 0;
}
body.studio-v2.is-scrolling,
body.studio-v2 .is-scrolling {
  scrollbar-width: thin;
  scrollbar-color: #b7b2a8 transparent;
}
body.studio-v2.is-scrolling::-webkit-scrollbar:vertical,
body.studio-v2 .is-scrolling::-webkit-scrollbar:vertical {
  width: 8px;
}
body.studio-v2.is-scrolling::-webkit-scrollbar-thumb,
body.studio-v2 .is-scrolling::-webkit-scrollbar-thumb {
  background: #b7b2a8;
  border-radius: 8px;
}
