body[data-studio-next],
body[data-studio-next] * {
  box-sizing: border-box;
}

/* Local ID photo crop, background, and export workbench */
body[data-studio-next] .sn-shell[data-active-task="idphoto"] .sn-body {
  grid-template-columns: 240px minmax(0, 1fr);
}

body[data-studio-next] .sn-shell[data-active-task="idphoto"] .sn-workspace {
  padding: 14px;
  overflow: auto;
}

body[data-studio-next] .sn-shell[data-active-task="idphoto"] .sn-result-rail {
  display: none !important;
}

body[data-studio-next] .sn-id-photo-workspace[hidden] {
  display: none !important;
}

body[data-studio-next] .sn-id-photo-workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: 100%;
  height: calc(100vh - 96px);
  min-width: 0;
  min-height: calc(100vh - 96px);
  overflow: hidden;
  border: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-id-photo-head {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-id-photo-head h2,
body[data-studio-next] .sn-id-photo-canvas-pane h3,
body[data-studio-next] .sn-id-photo-output-pane h3 {
  margin: 3px 0 0;
  letter-spacing: 0;
}

body[data-studio-next] .sn-id-photo-head h2 {
  font-size: 20px;
}

body[data-studio-next] .sn-id-photo-head-status {
  display: grid;
  min-width: 230px;
  gap: 2px;
  justify-items: end;
}

body[data-studio-next] .sn-id-photo-head-status small,
body[data-studio-next] .sn-id-photo-fieldset legend,
body[data-studio-next] .sn-id-photo-readouts dt,
body[data-studio-next] .sn-id-photo-crop-controls label,
body[data-studio-next] .sn-id-photo-canvas-note,
body[data-studio-next] .sn-id-photo-output-note {
  color: var(--sn-muted);
  font-size: 10px;
  font-weight: 800;
}

body[data-studio-next] .sn-id-photo-head-status strong {
  color: #07563f;
  font-size: 11px;
}

body[data-studio-next] .sn-id-photo-boundary {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--sn-line);
  background: #f4f6f3;
}

body[data-studio-next] .sn-id-photo-boundary strong,
body[data-studio-next] .sn-id-photo-boundary span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--sn-line);
  font-size: 9px;
  white-space: nowrap;
}

body[data-studio-next] .sn-id-photo-boundary strong {
  color: #07563f;
  background: var(--sn-emerald-soft);
}

body[data-studio-next] .sn-id-photo-layout {
  display: grid;
  grid-template-columns: 292px minmax(360px, 1fr) 252px;
  min-width: 0;
  min-height: 0;
}

body[data-studio-next] .sn-id-photo-controls {
  display: grid;
  grid-auto-rows: min-content;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--sn-line-strong);
  background: #f8f9f7;
}

body[data-studio-next] .sn-id-photo-control-intro {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-id-photo-control-intro strong {
  font-size: 12px;
}

body[data-studio-next] .sn-id-photo-control-intro small,
body[data-studio-next] .sn-id-photo-file-control small {
  color: var(--sn-muted);
  font-size: 9px;
  line-height: 1.45;
}

body[data-studio-next] .sn-id-photo-file-control {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 68px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--sn-line);
  color: #174a91;
  background: #edf4ff;
  cursor: pointer;
}

body[data-studio-next] .sn-id-photo-file-control::before {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--sn-cobalt);
  background: #ffffff;
  content: "+";
  font-size: 18px;
  font-weight: 900;
}

body[data-studio-next] .sn-id-photo-file-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

body[data-studio-next] .sn-id-photo-file-control span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

body[data-studio-next] .sn-id-photo-file-control strong {
  font-size: 12px;
}

body[data-studio-next] .sn-id-photo-fieldset {
  min-width: 0;
  margin: 0;
  padding: 10px 12px 12px;
  border: 0;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-id-photo-fieldset legend {
  padding: 0;
}

body[data-studio-next] .sn-id-photo-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 7px;
}

body[data-studio-next] .sn-id-photo-option-grid button {
  display: grid;
  min-width: 0;
  min-height: 49px;
  align-content: center;
  gap: 2px;
  padding: 5px 7px;
  border: 1px solid var(--sn-line-strong);
  border-radius: 2px;
  color: var(--sn-ink-soft);
  background: var(--sn-paper);
  text-align: left;
  cursor: pointer;
}

body[data-studio-next] .sn-id-photo-option-grid button[aria-pressed="true"] {
  border-color: var(--sn-cobalt);
  color: #173f87;
  background: var(--sn-cobalt-soft);
  box-shadow: inset 3px 0 0 var(--sn-cobalt);
}

body[data-studio-next] .sn-id-photo-option-grid strong {
  font-size: 10px;
}

body[data-studio-next] .sn-id-photo-option-grid small {
  color: var(--sn-muted);
  font-size: 8px;
}

body[data-studio-next] .sn-id-photo-color-grid button {
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 6px;
}

body[data-studio-next] .sn-id-photo-color-grid i {
  grid-row: 1 / 3;
  width: 20px;
  height: 28px;
  align-self: center;
  border: 1px solid #98a2ad;
  background: var(--swatch);
}

body[data-studio-next] .sn-id-photo-crop-controls label {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
}

body[data-studio-next] .sn-id-photo-crop-controls input[type="range"] {
  width: 100%;
  height: 32px;
  margin: 2px 0 4px;
  accent-color: var(--sn-cobalt);
}

body[data-studio-next] .sn-id-photo-control-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

body[data-studio-next] .sn-id-photo-control-actions button {
  min-width: 0;
  min-height: 38px;
  padding: 4px;
  border: 1px solid var(--sn-line-strong);
  border-radius: 2px;
  background: var(--sn-paper);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

body[data-studio-next] .sn-id-photo-control-actions button:disabled {
  color: #98a2ad;
  cursor: not-allowed;
}

body[data-studio-next] .sn-id-photo-readouts {
  display: grid;
  margin: 0;
}

body[data-studio-next] .sn-id-photo-readouts > div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  min-width: 0;
  padding: 7px 12px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-id-photo-readouts dt,
body[data-studio-next] .sn-id-photo-readouts dd {
  margin: 0;
}

body[data-studio-next] .sn-id-photo-readouts dd {
  overflow: hidden;
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-id-photo-canvas-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background: #e9edf0;
}

body[data-studio-next] .sn-id-photo-canvas-pane > header,
body[data-studio-next] .sn-id-photo-output-pane > header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-id-photo-canvas-pane h3,
body[data-studio-next] .sn-id-photo-output-pane h3 {
  font-size: 14px;
}

body[data-studio-next] [data-id-photo-status],
body[data-studio-next] [data-id-photo-output-status] {
  max-width: 54%;
  padding: 5px 7px;
  border-left: 3px solid #667085;
  color: #344054;
  background: #f2f4f7;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

body[data-studio-next] [data-id-photo-status][data-state="ready"],
body[data-studio-next] [data-id-photo-status][data-state="exported"],
body[data-studio-next] [data-id-photo-output-status][data-state="ready"],
body[data-studio-next] [data-id-photo-output-status][data-state="exported"] {
  border-left-color: #087f5b;
  color: #075c43;
  background: #e5f6ef;
}

body[data-studio-next] [data-id-photo-status][data-state="blocked"],
body[data-studio-next] [data-id-photo-output-status][data-state="blocked"] {
  border-left-color: #c0266f;
  color: #8d164f;
  background: #fff0f6;
}

body[data-studio-next] .sn-id-photo-source-stage {
  position: relative;
  width: min(100%, 720px);
  aspect-ratio: 3 / 2;
  align-self: center;
  justify-self: center;
  margin: 12px;
  overflow: hidden;
  border: 1px solid #687482;
  background: #dce2e7;
  box-shadow: 0 7px 18px rgba(17, 24, 39, 0.14);
  touch-action: none;
}

body[data-studio-next] .sn-id-photo-source-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

body[data-studio-next] .sn-id-photo-selection {
  position: absolute;
  z-index: 2;
  min-width: 44px;
  min-height: 44px;
  border: 2px solid #ffffff;
  background: rgba(39, 89, 215, 0.09);
  box-shadow: 0 0 0 1px #1d4ed8, 0 0 0 999px rgba(9, 18, 30, 0.42);
  cursor: move;
  touch-action: none;
}

body[data-studio-next] .sn-id-photo-selection::before,
body[data-studio-next] .sn-id-photo-selection::after {
  position: absolute;
  inset: 33.333% 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  content: "";
}

body[data-studio-next] .sn-id-photo-selection::after {
  top: 66.666%;
}

body[data-studio-next] .sn-id-photo-empty-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 20px;
  color: #344054;
  background: rgba(244, 246, 248, 0.88);
  text-align: center;
}

body[data-studio-next] .sn-id-photo-empty-overlay[hidden] {
  display: none;
}

body[data-studio-next] .sn-id-photo-empty-overlay strong {
  font-size: 13px;
}

body[data-studio-next] .sn-id-photo-empty-overlay span {
  max-width: 320px;
  color: var(--sn-muted);
  font-size: 10px;
}

body[data-studio-next] .sn-id-photo-canvas-note,
body[data-studio-next] .sn-id-photo-output-note {
  margin: 0;
  padding: 8px 11px;
  border-top: 1px solid var(--sn-line);
  background: var(--sn-paper);
  line-height: 1.45;
}

body[data-studio-next] .sn-id-photo-output-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--sn-line-strong);
  background: #f8f9f7;
}

body[data-studio-next] .sn-id-photo-output-pane [data-id-photo-output-status] {
  max-width: 62%;
  text-align: right;
}

body[data-studio-next] .sn-id-photo-preview-frame {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 14px;
  overflow: hidden;
  background: #dfe4e7;
}

body[data-studio-next] .sn-id-photo-preview-frame canvas {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 310px);
  border: 1px solid #8a96a3;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.18);
}

body[data-studio-next] .sn-id-photo-export-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid var(--sn-line);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-id-photo-export-actions button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #075c43;
  border-radius: 2px;
  color: #ffffff;
  background: #087f5b;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

body[data-studio-next] .sn-id-photo-export-actions button:last-child {
  border-color: #174a91;
  background: #2759d7;
}

body[data-studio-next] .sn-id-photo-export-actions button:disabled {
  border-color: #c6ccd3;
  color: #667085;
  background: #eaecf0;
  cursor: not-allowed;
}

@media (min-width: 768px) {
  body[data-studio-next] .sn-id-photo-fieldset {
    padding: 9px 12px 10px;
  }

  body[data-studio-next] .sn-id-photo-option-grid button {
    min-height: 44px;
  }
}

@media (max-width: 1199px) and (min-width: 768px) {
  body[data-studio-next] .sn-shell[data-active-task="idphoto"] .sn-body {
    grid-template-areas:
      "task"
      "main";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(calc(100vh - 154px), auto);
  }

  body[data-studio-next] .sn-shell[data-active-task="idphoto"] .sn-workspace {
    grid-area: main;
  }

  body[data-studio-next] .sn-id-photo-layout {
    grid-template-columns: 270px minmax(340px, 1fr) 230px;
  }
}

@media (max-width: 767px) {
  body[data-studio-next] .sn-shell[data-active-task="idphoto"] {
    padding-bottom: 0;
  }

  body[data-studio-next] .sn-shell[data-active-task="idphoto"] .sn-body {
    display: block;
  }

  body[data-studio-next] .sn-shell[data-active-task="idphoto"] .sn-workspace {
    padding: 8px;
  }

  body[data-studio-next] .sn-shell[data-active-task="idphoto"] .sn-mobile-steps {
    display: none;
  }

  body[data-studio-next] .sn-id-photo-workspace {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body[data-studio-next] .sn-id-photo-head {
    min-height: 56px;
    padding: 8px 10px;
  }

  body[data-studio-next] .sn-id-photo-head h2 {
    font-size: 17px;
  }

  body[data-studio-next] .sn-id-photo-head-status {
    min-width: 122px;
  }

  body[data-studio-next] .sn-id-photo-head-status strong {
    max-width: 122px;
    font-size: 9px;
    text-align: right;
  }

  body[data-studio-next] .sn-id-photo-boundary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 0;
  }

  body[data-studio-next] .sn-id-photo-boundary strong,
  body[data-studio-next] .sn-id-photo-boundary span {
    min-height: 34px;
    padding: 0 8px;
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-studio-next] .sn-id-photo-boundary span:last-child {
    display: none;
  }

  body[data-studio-next] .sn-id-photo-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-studio-next] .sn-id-photo-controls {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--sn-line-strong);
  }

  body[data-studio-next] .sn-id-photo-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-studio-next] .sn-id-photo-option-grid button {
    min-height: 48px;
  }

  body[data-studio-next] .sn-id-photo-control-actions button {
    min-height: 42px;
  }

  body[data-studio-next] .sn-id-photo-canvas-pane {
    min-height: 0;
    border-bottom: 1px solid var(--sn-line-strong);
  }

  body[data-studio-next] .sn-id-photo-canvas-pane > header {
    min-height: 70px;
  }

  body[data-studio-next] [data-id-photo-status],
  body[data-studio-next] [data-id-photo-output-status] {
    max-width: 58%;
    font-size: 8px;
  }

  body[data-studio-next] .sn-id-photo-source-stage {
    width: calc(100% - 16px);
    margin: 8px;
  }

  body[data-studio-next] .sn-id-photo-output-pane {
    min-height: 520px;
    border-left: 0;
  }

  body[data-studio-next] .sn-id-photo-preview-frame {
    min-height: 340px;
  }

  body[data-studio-next] .sn-id-photo-preview-frame canvas {
    max-height: 330px;
  }

  body[data-studio-next] .sn-id-photo-export-actions {
    position: static;
  }

  body[data-studio-next] .sn-id-photo-export-actions button {
    min-height: 48px;
    font-size: 11px;
  }
}

/* Post-597 browser-local ID-photo cutout handoff */
body[data-studio-next] .sn-id-photo-layout[hidden],
body[data-studio-next] [data-id-photo-crop-panel][hidden],
body[data-studio-next] .sn-id-photo-cutout-panel[hidden],
body[data-studio-next] [data-id-photo-cutout-panel][hidden],
body[data-studio-next] .sn-id-photo-return-cutout[hidden] {
  display: none !important;
}

body[data-studio-next] .sn-id-photo-return-cutout {
  width: 100%;
  min-height: 38px;
  margin-top: 6px;
  border: 1px solid #174a91;
  color: #173f87;
  background: #eef4ff;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

body[data-studio-next] .sn-id-photo-cutout-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #e9edf0;
}

body[data-studio-next] .sn-id-photo-cutout-head {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-id-photo-cutout-head h3,
body[data-studio-next] .sn-id-photo-cutout-canvas-pane h3 {
  margin: 3px 0 0;
  font-size: 15px;
  letter-spacing: 0;
}

body[data-studio-next] [data-id-photo-cutout-status],
body[data-studio-next] [data-id-photo-cutout-readout] {
  max-width: 48%;
  padding: 6px 8px;
  border-left: 3px solid #087f5b;
  color: #075c43;
  background: #e5f6ef;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

body[data-studio-next] [data-id-photo-cutout-status][data-state="blocked"] {
  border-left-color: #c0266f;
  color: #8d164f;
  background: #fff0f6;
}

body[data-studio-next] .sn-id-photo-cutout-layout {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

body[data-studio-next] .sn-id-photo-cutout-tools {
  display: grid;
  grid-auto-rows: min-content;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--sn-line-strong);
  background: #f8f9f7;
}

body[data-studio-next] .sn-id-photo-cutout-intro {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-id-photo-cutout-intro strong {
  font-size: 12px;
}

body[data-studio-next] .sn-id-photo-cutout-intro small,
body[data-studio-next] .sn-id-photo-cutout-replace small,
body[data-studio-next] .sn-id-photo-cutout-fieldset legend,
body[data-studio-next] .sn-id-photo-cutout-size span,
body[data-studio-next] .sn-id-photo-cutout-meta dt,
body[data-studio-next] .sn-id-photo-cutout-readback dt {
  color: var(--sn-muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.45;
}

body[data-studio-next] .sn-id-photo-cutout-replace {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sn-line);
  cursor: pointer;
}

body[data-studio-next] .sn-id-photo-cutout-replace::before {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--sn-line-strong);
  color: #173f87;
  background: #eef4ff;
  content: "+";
  font-size: 18px;
  font-weight: 900;
}

body[data-studio-next] .sn-id-photo-cutout-replace input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

body[data-studio-next] .sn-id-photo-cutout-replace span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

body[data-studio-next] .sn-id-photo-cutout-replace strong {
  font-size: 11px;
}

body[data-studio-next] .sn-id-photo-cutout-fieldset {
  min-width: 0;
  margin: 0;
  padding: 10px 12px 12px;
  border: 0;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-id-photo-cutout-fieldset legend {
  padding: 0;
}

body[data-studio-next] .sn-id-photo-cutout-tool-switch,
body[data-studio-next] .sn-id-photo-cutout-history,
body[data-studio-next] .sn-id-photo-cutout-actions {
  display: grid;
  gap: 5px;
}

body[data-studio-next] .sn-id-photo-cutout-tool-switch {
  grid-template-columns: 1fr 1fr;
  margin-top: 7px;
}

body[data-studio-next] .sn-id-photo-cutout-history {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px 12px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-id-photo-cutout-tool-switch button,
body[data-studio-next] .sn-id-photo-cutout-history button,
body[data-studio-next] .sn-id-photo-cutout-actions button {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--sn-line-strong);
  color: var(--sn-ink);
  background: var(--sn-paper);
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

body[data-studio-next] .sn-id-photo-cutout-tool-switch button[aria-pressed="true"] {
  border-color: #174a91;
  color: #173f87;
  background: #eef4ff;
  box-shadow: inset 3px 0 0 #2759d7;
}

body[data-studio-next] .sn-id-photo-cutout-tool-switch button:disabled,
body[data-studio-next] .sn-id-photo-cutout-history button:disabled,
body[data-studio-next] .sn-id-photo-cutout-actions button:disabled {
  color: #98a2ad;
  background: #eaecf0;
  cursor: not-allowed;
}

body[data-studio-next] .sn-id-photo-cutout-size {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-id-photo-cutout-size span {
  display: flex;
  justify-content: space-between;
}

body[data-studio-next] .sn-id-photo-cutout-size input {
  width: 100%;
  height: 32px;
  accent-color: #2759d7;
}

body[data-studio-next] .sn-id-photo-cutout-meta,
body[data-studio-next] .sn-id-photo-cutout-readback {
  display: grid;
  margin: 0;
}

body[data-studio-next] .sn-id-photo-cutout-meta > div,
body[data-studio-next] .sn-id-photo-cutout-readback > div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-id-photo-cutout-meta dt,
body[data-studio-next] .sn-id-photo-cutout-meta dd,
body[data-studio-next] .sn-id-photo-cutout-readback dt,
body[data-studio-next] .sn-id-photo-cutout-readback dd {
  min-width: 0;
  margin: 0;
}

body[data-studio-next] .sn-id-photo-cutout-meta dd,
body[data-studio-next] .sn-id-photo-cutout-readback dd {
  font-size: 9px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

body[data-studio-next] .sn-id-photo-cutout-actions {
  grid-template-columns: 1fr 1.4fr;
  padding: 12px;
  border-top: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-id-photo-cutout-actions button:last-child {
  border-color: #075c43;
  color: #fff;
  background: #087f5b;
}

body[data-studio-next] .sn-id-photo-cutout-canvas-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #dfe4e7;
}

body[data-studio-next] .sn-id-photo-cutout-canvas-pane > header {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-id-photo-cutout-stage-frame {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 420px;
  margin: 14px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #87919c;
  background-color: #f8fafb;
  background-image:
    linear-gradient(45deg, #e0e5e9 25%, transparent 25%),
    linear-gradient(-45deg, #e0e5e9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e0e5e9 75%),
    linear-gradient(-45deg, transparent 75%, #e0e5e9 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

body[data-studio-next] .sn-id-photo-cutout-stage {
  position: absolute;
  inset: 12px;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  touch-action: none;
}

body[data-studio-next] .sn-id-photo-cutout-stage canvas {
  max-width: 100%;
  max-height: 100%;
}

body[data-studio-next] .sn-id-photo-cutout-stage-hint {
  z-index: 0;
  display: grid;
  max-width: 320px;
  gap: 5px;
  padding: 16px;
  color: #344054;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  pointer-events: none;
}

body[data-studio-next] .sn-id-photo-cutout-stage-hint strong {
  font-size: 12px;
}

body[data-studio-next] .sn-id-photo-cutout-stage-hint span {
  color: var(--sn-muted);
  font-size: 9px;
  line-height: 1.5;
}

body[data-studio-next] [data-id-photo-cutout-editor][data-mask-workbench-state="ready"] .sn-id-photo-cutout-stage-hint,
body[data-studio-next] [data-id-photo-cutout-editor][data-mask-workbench-state="loading"] .sn-id-photo-cutout-stage-hint {
  display: none;
}

body[data-studio-next] .sn-id-photo-cutout-readback {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-id-photo-cutout-readback > div {
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  border-right: 1px solid var(--sn-line);
  border-bottom: 0;
}

@media (min-width: 768px) {
  /* Keep every crop readback row fully visible in the fixed desktop workbench. */
  body[data-studio-next] .sn-id-photo-readouts > div {
    padding-block: 3px;
  }

  body[data-studio-next] .sn-id-photo-control-actions button {
    min-height: 34px;
  }
}

@media (max-width: 767px) {
  body[data-studio-next] .sn-id-photo-cutout-panel {
    overflow: visible;
  }

  body[data-studio-next] .sn-id-photo-cutout-head {
    min-height: 64px;
    padding: 8px 10px;
  }

  body[data-studio-next] .sn-id-photo-cutout-head h3 {
    font-size: 14px;
  }

  body[data-studio-next] [data-id-photo-cutout-status] {
    max-width: 52%;
    font-size: 8px;
  }

  body[data-studio-next] .sn-id-photo-cutout-layout {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  body[data-studio-next] .sn-id-photo-cutout-tools {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--sn-line-strong);
  }

  body[data-studio-next] .sn-id-photo-cutout-canvas-pane {
    min-height: 590px;
  }

  body[data-studio-next] .sn-id-photo-cutout-canvas-pane > header {
    min-height: 70px;
  }

  body[data-studio-next] [data-id-photo-cutout-readout] {
    max-width: 56%;
    font-size: 8px;
  }

  body[data-studio-next] .sn-id-photo-cutout-stage-frame {
    min-height: 430px;
    margin: 8px;
  }

  body[data-studio-next] .sn-id-photo-cutout-readback {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-studio-next] .sn-id-photo-cutout-readback > div {
    border-bottom: 1px solid var(--sn-line);
  }
}

/* Local source-space mask workbench */
body[data-studio-next] .sn-shell[data-active-task="mask"] .sn-body {
  grid-template-columns: 240px minmax(0, 1fr);
}

body[data-studio-next] .sn-shell[data-active-task="mask"] .sn-workspace {
  padding: 14px;
  overflow: hidden;
}

body[data-studio-next] .sn-shell[data-active-task="mask"] .sn-result-rail {
  display: none !important;
}

body[data-studio-next] .sn-mask-workspace[hidden] {
  display: none !important;
}

body[data-studio-next] .sn-mask-workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: calc(100vh - 96px);
  overflow: hidden;
  border: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-mask-head {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-mask-head h2,
body[data-studio-next] .sn-mask-canvas-pane h3 {
  margin: 3px 0 0;
  letter-spacing: 0;
}

body[data-studio-next] .sn-mask-head h2 {
  font-size: 20px;
}

body[data-studio-next] .sn-mask-head-status {
  display: grid;
  min-width: 230px;
  gap: 2px;
  justify-items: end;
}

body[data-studio-next] .sn-mask-head-status small,
body[data-studio-next] .sn-mask-tools legend,
body[data-studio-next] .sn-mask-size-field > span,
body[data-studio-next] .sn-mask-runtime span,
body[data-studio-next] .sn-mask-canvas-pane > header small,
body[data-studio-next] .sn-mask-readback dt {
  color: var(--sn-muted);
  font-size: 10px;
  font-weight: 800;
}

body[data-studio-next] .sn-mask-head-status output {
  max-width: 300px;
  overflow: hidden;
  color: var(--sn-ink-soft);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-mask-boundary {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--sn-line);
  background: #f4f6f3;
}

body[data-studio-next] .sn-mask-boundary strong,
body[data-studio-next] .sn-mask-boundary span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--sn-line);
  font-size: 9px;
  white-space: nowrap;
}

body[data-studio-next] .sn-mask-boundary strong {
  color: #07563f;
  background: var(--sn-emerald-soft);
}

body[data-studio-next] .sn-mask-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

body[data-studio-next] .sn-mask-tools {
  display: grid;
  grid-auto-rows: min-content;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  border-right: 1px solid var(--sn-line-strong);
  background: #f8f9f7;
}

body[data-studio-next] .sn-mask-import {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  min-height: 74px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-paper);
  cursor: pointer;
}

body[data-studio-next] .sn-mask-import::before {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--sn-cobalt);
  color: var(--sn-cobalt);
  background: var(--sn-cobalt-soft);
  content: "+";
  font-size: 18px;
  font-weight: 900;
}

body[data-studio-next] .sn-mask-import input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

body[data-studio-next] .sn-mask-import span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

body[data-studio-next] .sn-mask-import strong {
  font-size: 12px;
}

body[data-studio-next] .sn-mask-import small,
body[data-studio-next] .sn-mask-export-control small {
  color: var(--sn-muted);
  font-size: 10px;
  line-height: 1.45;
}

body[data-studio-next] .sn-mask-tool-field {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-mask-tool-field > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 6px;
  border: 1px solid var(--sn-line-strong);
}

body[data-studio-next] .sn-mask-tool-field button,
body[data-studio-next] .sn-mask-history button {
  min-width: 0;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid var(--sn-line);
  color: var(--sn-ink-soft);
  background: var(--sn-paper);
  font-size: 10px;
  font-weight: 800;
}

body[data-studio-next] .sn-mask-tool-field button:last-child,
body[data-studio-next] .sn-mask-history button:last-child {
  border-right: 0;
}

body[data-studio-next] .sn-mask-tool-field button[aria-pressed="true"] {
  color: #ffffff;
  background: var(--sn-cobalt);
}

body[data-studio-next] .sn-mask-size-field {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-mask-size-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body[data-studio-next] .sn-mask-size-field output {
  color: var(--sn-ink);
  font-size: 10px;
}

body[data-studio-next] .sn-mask-size-field input {
  width: 100%;
  min-height: 28px;
  accent-color: var(--sn-cobalt);
}

body[data-studio-next] .sn-mask-history {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 12px;
  border: 1px solid var(--sn-line-strong);
}

body[data-studio-next] .sn-mask-export-control {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
}

body[data-studio-next] .sn-mask-export-control button {
  min-height: 46px;
  border: 1px solid var(--sn-ink);
  color: #ffffff;
  background: var(--sn-ink);
  font-size: 10px;
  font-weight: 900;
}

body[data-studio-next] .sn-mask-tool-field button:disabled,
body[data-studio-next] .sn-mask-history button:disabled,
body[data-studio-next] .sn-mask-export-control button:disabled {
  border-color: var(--sn-line);
  color: #8a928d;
  background: #e9ece8;
  cursor: not-allowed;
}

body[data-studio-next] .sn-mask-import:focus-within,
body[data-studio-next] .sn-mask-tool-field button:focus-visible,
body[data-studio-next] .sn-mask-history button:focus-visible,
body[data-studio-next] .sn-mask-export-control button:focus-visible,
body[data-studio-next] .sn-mask-size-field input:focus-visible {
  outline: 3px solid rgba(39, 89, 215, 0.25);
  outline-offset: 2px;
}

body[data-studio-next] .sn-mask-runtime {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 0 12px;
  border-top: 1px solid var(--sn-line);
  background: #f1f3f0;
}

body[data-studio-next] .sn-mask-runtime strong {
  font-size: 9px;
}

body[data-studio-next] .sn-mask-canvas-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background: #eef1ee;
}

body[data-studio-next] .sn-mask-canvas-pane > header {
  display: flex;
  min-width: 0;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-mask-canvas-pane h3 {
  font-size: 15px;
}

body[data-studio-next] .sn-mask-canvas-pane > header > div:last-child {
  display: grid;
  min-width: 110px;
  gap: 2px;
  justify-items: end;
}

body[data-studio-next] .sn-mask-canvas-pane > header output {
  font-size: 11px;
  font-weight: 900;
}

body[data-studio-next] .sn-mask-stage-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 10px;
  overflow: hidden;
  border: 1px solid var(--sn-line-strong);
  background-color: #dfe4df;
  background-image:
    linear-gradient(45deg, #edf0ed 25%, transparent 25%),
    linear-gradient(-45deg, #edf0ed 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf0ed 75%),
    linear-gradient(-45deg, transparent 75%, #edf0ed 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

body[data-studio-next] .sn-mask-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: crosshair;
}

body[data-studio-next] .sn-mask-stage .konvajs-content,
body[data-studio-next] .sn-mask-stage canvas {
  max-width: 100%;
  max-height: 100%;
}

body[data-studio-next] .sn-mask-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 5px;
  padding: 20px;
  color: var(--sn-muted);
  text-align: center;
}

body[data-studio-next] .sn-mask-placeholder strong {
  color: var(--sn-ink-soft);
  font-size: 13px;
}

body[data-studio-next] .sn-mask-placeholder span {
  font-size: 9px;
}

body[data-studio-next] .sn-mask-workspace[data-mask-workbench-state="ready"] .sn-mask-placeholder,
body[data-studio-next] .sn-mask-workspace[data-mask-workbench-state="exporting"] .sn-mask-placeholder {
  display: none;
}

body[data-studio-next] .sn-mask-readback {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 54px;
  margin: 0;
  border-top: 1px solid var(--sn-line);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-mask-readback > div {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
  padding: 6px 10px;
  border-right: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-mask-readback > div:last-child {
  border-right: 0;
}

body[data-studio-next] .sn-mask-readback dd {
  margin: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1199px) and (min-width: 768px) {
  body[data-studio-next] .sn-task-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body[data-studio-next] .sn-shell[data-active-task="mask"] .sn-body {
    grid-template-areas:
      "task"
      "main";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(calc(100vh - 154px), auto);
  }

  body[data-studio-next] .sn-shell[data-active-task="mask"] .sn-workspace {
    grid-area: main;
  }

  body[data-studio-next] .sn-mask-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  body[data-studio-next] .sn-task-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body[data-studio-next] .sn-task-button {
    padding-inline: 2px;
  }

  body[data-studio-next] .sn-task-button strong {
    font-size: 10px;
    line-height: 1.2;
  }

  body[data-studio-next] .sn-task-button small {
    display: none;
  }

  body[data-studio-next] .sn-shell[data-active-task="mask"] {
    padding-bottom: 0;
  }

  body[data-studio-next] .sn-shell[data-active-task="mask"] .sn-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100dvh - var(--sn-mobile-chrome-height));
    min-height: 0;
  }

  body[data-studio-next] .sn-shell[data-active-task="mask"] .sn-workspace {
    height: auto;
    min-height: 0;
    padding: 6px;
    overflow: hidden;
  }

  body[data-studio-next] .sn-shell[data-active-task="mask"] .sn-mobile-steps {
    display: none;
  }

  body[data-studio-next] .sn-mask-workspace {
    grid-template-rows: auto auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  body[data-studio-next] .sn-mask-head {
    min-height: 48px;
    gap: 8px;
    padding: 5px 7px;
  }

  body[data-studio-next] .sn-mask-head h2 {
    font-size: 15px;
  }

  body[data-studio-next] .sn-mask-head-status {
    min-width: 0;
    max-width: 158px;
  }

  body[data-studio-next] .sn-mask-head-status output {
    max-width: 158px;
    font-size: 10px;
  }

  body[data-studio-next] .sn-mask-boundary,
  body[data-studio-next] .sn-mask-boundary strong,
  body[data-studio-next] .sn-mask-boundary span {
    min-height: 32px;
  }

  body[data-studio-next] .sn-mask-boundary strong,
  body[data-studio-next] .sn-mask-boundary span {
    padding: 0 6px;
    font-size: 10px;
  }

  body[data-studio-next] .sn-mask-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }

  body[data-studio-next] .sn-mask-tools {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    grid-template-rows: repeat(3, minmax(44px, auto));
    max-height: 176px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--sn-line-strong);
  }

  body[data-studio-next] .sn-mask-import {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 44px;
    gap: 7px;
    padding: 4px 7px;
  }

  body[data-studio-next] .sn-mask-import::before {
    width: 30px;
    height: 30px;
  }

  body[data-studio-next] .sn-mask-import span {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
  }

  body[data-studio-next] .sn-mask-import strong {
    font-size: 10px;
  }

  body[data-studio-next] .sn-mask-import small {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-studio-next] .sn-mask-tool-field,
  body[data-studio-next] .sn-mask-size-field {
    min-height: 58px;
    padding: 4px 6px;
    border-right: 1px solid var(--sn-line);
  }

  body[data-studio-next] .sn-mask-tool-field > div {
    margin-top: 2px;
  }

  body[data-studio-next] .sn-mask-tool-field button {
    min-height: 44px;
    font-size: 9px;
  }

  body[data-studio-next] .sn-mask-size-field {
    gap: 1px;
    border-right: 0;
  }

  body[data-studio-next] .sn-mask-size-field input {
    min-height: 30px;
  }

  body[data-studio-next] .sn-mask-history {
    align-self: center;
    margin: 4px 6px;
  }

  body[data-studio-next] .sn-mask-history button {
    min-height: 44px;
    padding: 0 4px;
    font-size: 10px;
  }

  body[data-studio-next] .sn-mask-export-control {
    align-content: center;
    gap: 0;
    padding: 4px 6px;
  }

  body[data-studio-next] .sn-mask-export-control button {
    min-height: 44px;
    font-size: 9px;
  }

  body[data-studio-next] .sn-mask-export-control small,
  body[data-studio-next] .sn-mask-runtime {
    display: none;
  }

  body[data-studio-next] .sn-mask-canvas-pane > header {
    min-height: 40px;
    padding: 4px 7px;
  }

  body[data-studio-next] .sn-mask-canvas-pane h3 {
    font-size: 12px;
  }

  body[data-studio-next] .sn-mask-stage-frame {
    margin: 5px;
  }

  body[data-studio-next] .sn-mask-readback {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 46px;
  }

  body[data-studio-next] .sn-mask-readback > div {
    padding: 4px;
  }

  body[data-studio-next] .sn-mask-readback dt {
    font-size: 10px;
  }

  body[data-studio-next] .sn-mask-readback dd {
    font-size: 10px;
  }
}

body[data-studio-next] {
  --sn-ink: #121514;
  --sn-ink-soft: #3f4643;
  --sn-muted: #4f5853;
  --sn-canvas: #f3f4f1;
  --sn-paper: #ffffff;
  --sn-line: #d8dcd7;
  --sn-line-strong: #aeb6b0;
  --sn-emerald: #087f5b;
  --sn-emerald-soft: #dff3eb;
  --sn-cobalt: #2759d7;
  --sn-cobalt-soft: #e8eeff;
  --sn-coral: #e45c4b;
  --sn-coral-soft: #ffebe7;
  --sn-focus: #1959e6;
  --sn-chrome: #071323;
  --sn-chrome-deep: #020612;
  --sn-chrome-line: rgba(52, 211, 255, 0.24);
  --sn-chrome-line-strong: rgba(52, 211, 255, 0.58);
  --sn-chrome-text: #e8f7ff;
  --sn-chrome-muted: #9eb5c9;
  --sn-chrome-cyan: #22d3ee;
  --sn-chrome-violet: #8b5cf6;
  --sn-chrome-pink: #f472b6;
  color-scheme: light;
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--sn-ink);
  background: var(--sn-canvas);
  font-family: Bahnschrift, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body[data-studio-next] button,
body[data-studio-next] input,
body[data-studio-next] textarea,
body[data-studio-next] select,
body[data-studio-next] output {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

body[data-studio-next] button,
body[data-studio-next] a[href],
body[data-studio-next] textarea,
body[data-studio-next] select,
body[data-studio-next] input:not([type="hidden"]),
body[data-studio-next] [role="button"],
body[data-studio-next] [role="tab"] {
  min-width: 44px;
  min-height: 44px;
}

body[data-studio-next] button,
body[data-studio-next] a {
  -webkit-tap-highlight-color: transparent;
}

body[data-studio-next] button:focus-visible,
body[data-studio-next] a:focus-visible,
body[data-studio-next] input:focus-visible,
body[data-studio-next] textarea:focus-visible,
body[data-studio-next] select:focus-visible,
body[data-studio-next] label.sn-file-control:focus-within {
  outline: 3px solid color-mix(in srgb, var(--sn-focus) 78%, white);
  outline-offset: 3px;
}

body[data-studio-next] button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

body[data-studio-next] h1,
body[data-studio-next] h2,
body[data-studio-next] p,
body[data-studio-next] figure,
body[data-studio-next] fieldset,
body[data-studio-next] dl,
body[data-studio-next] dd {
  margin: 0;
}

body[data-studio-next] fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

body[data-studio-next] img {
  display: block;
  max-width: 100%;
}

body[data-studio-next] .sn-skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #fff;
  background: var(--sn-ink);
  text-decoration: none;
  transform: translateY(-140%);
}

body[data-studio-next] .sn-startup-alert {
  margin: 0;
  padding: 12px 18px;
  border-bottom: 1px solid #b93f31;
  color: #7a2017;
  background: var(--sn-coral-soft);
  font-size: 12px;
  font-weight: 800;
}

body[data-studio-next] .sn-skip-link:focus {
  transform: translateY(0);
}

body[data-studio-next] .sn-shell {
  width: 100%;
  min-height: 100vh;
  background: var(--sn-canvas);
}

body[data-studio-next] .sn-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-areas: "brand nav context actions";
  grid-template-columns: 240px auto minmax(160px, 1fr) auto;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--sn-chrome-line);
  background: var(--sn-chrome);
  box-shadow: 0 10px 24px rgba(2, 6, 18, 0.14);
}

body[data-studio-next] .sn-brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 100%;
  min-width: 0;
  padding: 0 22px;
  border-right: 1px solid var(--sn-chrome-line);
  color: var(--sn-chrome-text);
  text-decoration: none;
}

body[data-studio-next] .sn-brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(232, 247, 255, 0.46);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.34), transparent 34%),
    linear-gradient(135deg, var(--sn-chrome-cyan), var(--sn-chrome-violet) 56%, var(--sn-chrome-pink));
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.24);
}

body[data-studio-next] .sn-brand > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body[data-studio-next] .sn-brand strong {
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

body[data-studio-next] .sn-brand small {
  margin-top: 2px;
  overflow: visible;
  color: var(--sn-chrome-muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
}

body[data-studio-next] .sn-primary-nav {
  grid-area: nav;
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, auto));
  align-items: stretch;
  height: 100%;
  padding: 0 10px;
  border-right: 1px solid var(--sn-chrome-line);
}

body[data-studio-next] .sn-primary-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 11px;
  color: var(--sn-chrome-muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

body[data-studio-next] .sn-primary-nav a:hover {
  color: var(--sn-chrome-text);
  background: rgba(52, 211, 255, 0.08);
}

body[data-studio-next] .sn-primary-nav a[aria-current="page"] {
  color: var(--sn-chrome-text);
  box-shadow: inset 0 -2px 0 var(--sn-chrome-cyan);
}

body[data-studio-next] .sn-heading {
  grid-area: context;
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  padding: 0 24px;
  border-left: 1px solid var(--sn-chrome-line);
  color: var(--sn-chrome-text);
}

body[data-studio-next] .sn-heading h1 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

body[data-studio-next] .sn-current-task {
  min-width: 0;
  overflow: hidden;
  color: var(--sn-chrome-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-topbar-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 0 18px;
}

body[data-studio-next] .sn-local-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--sn-chrome-muted);
  font-size: 12px;
  white-space: nowrap;
}

body[data-studio-next] .sn-local-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sn-chrome-cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.13);
}

body[data-studio-next] .sn-legacy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--sn-chrome-line-strong);
  color: var(--sn-chrome-text);
  background: rgba(52, 211, 255, 0.07);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

body[data-studio-next] .sn-body {
  display: grid;
  grid-template-columns: 240px minmax(680px, 1fr) 352px;
  min-height: calc(100vh - 68px);
}

body[data-studio-next] .sn-task-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 16px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-right: 1px solid var(--sn-chrome-line);
  color: var(--sn-chrome-text);
  background:
    linear-gradient(180deg, rgba(12, 33, 55, 0.42), transparent 48%),
    var(--sn-chrome-deep);
}

body[data-studio-next] .sn-rail-heading,
body[data-studio-next] .sn-result-head,
body[data-studio-next] .sn-section-head,
body[data-studio-next] .sn-compact-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

body[data-studio-next] .sn-rail-heading {
  padding: 0 6px 16px;
  border-bottom: 1px solid var(--sn-chrome-line);
}

body[data-studio-next] .sn-rail-heading strong {
  font-size: 13px;
}

body[data-studio-next] .sn-rail-heading span,
body[data-studio-next] .sn-result-count {
  min-width: 28px;
  padding: 2px 6px;
  color: var(--sn-paper);
  background: var(--sn-ink);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

body[data-studio-next] .sn-rail-heading span {
  color: var(--sn-chrome-deep);
  background: var(--sn-chrome-cyan);
}

body[data-studio-next] .sn-task-list {
  display: grid;
  gap: 6px;
  padding-top: 14px;
}

body[data-studio-next] .sn-task-button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 66px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--sn-chrome-muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

body[data-studio-next] .sn-task-button:hover {
  border-color: var(--sn-chrome-line-strong);
  color: var(--sn-chrome-text);
  background: rgba(52, 211, 255, 0.08);
}

body[data-studio-next] .sn-task-button.is-active,
body[data-studio-next] .sn-task-button[aria-pressed="true"] {
  border-color: var(--sn-chrome-cyan);
  color: var(--sn-chrome-text);
  background: #0d2238;
  box-shadow: 3px 3px 0 rgba(34, 211, 238, 0.44);
}

body[data-studio-next] .sn-task-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

body[data-studio-next] .sn-task-button > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body[data-studio-next] .sn-task-button strong {
  font-size: 13px;
}

body[data-studio-next] .sn-task-button small {
  margin-top: 2px;
  color: var(--sn-chrome-muted);
  font-size: 11px;
}

body[data-studio-next] .sn-rail-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding: 15px 6px 54px;
  border-top: 1px solid var(--sn-chrome-line);
}

body[data-studio-next] .sn-rail-note span,
body[data-studio-next] .sn-rail-note small {
  color: var(--sn-chrome-muted);
  font-size: 11px;
}

body[data-studio-next] .sn-rail-note strong {
  font-size: 12px;
}

body[data-studio-next] .sn-rail-index {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: rgba(158, 181, 201, 0.42);
  font-size: 26px;
  font-weight: 800;
}

body[data-studio-next] .sn-workspace {
  min-width: 0;
  padding: 24px clamp(22px, 2.6vw, 40px) 40px;
  overflow: auto;
  background: var(--sn-canvas);
  scrollbar-gutter: stable;
}

/* Let the final desktop panel scroll fully into view without exposing the prior panel. */
@media (min-width: 768px) {
  body[data-studio-next] .sn-shell[data-active-task="results"] .sn-workspace {
    padding-bottom: clamp(168px, calc(100vh - 600px), 480px);
  }
}

body[data-studio-next] .sn-step-panel[hidden] {
  display: none !important;
}

body[data-studio-next] .sn-input-panel,
body[data-studio-next] .sn-settings-panel,
body[data-studio-next] .sn-identity-panel {
  width: min(100%, 860px);
  margin-inline: auto;
  background: var(--sn-paper);
  box-shadow: 0 14px 32px rgba(18, 21, 20, 0.08);
}

body[data-studio-next] .sn-input-panel {
  border: 1px solid var(--sn-line-strong);
  border-top: 3px solid var(--sn-ink);
}

body[data-studio-next] .sn-section-head {
  align-items: center;
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-section-index {
  display: block;
  color: var(--sn-cobalt);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
}

body[data-studio-next] .sn-section-head h2,
body[data-studio-next] .sn-compact-head h2,
body[data-studio-next] .sn-result-head h2 {
  margin-top: 3px;
  font-size: 20px;
  line-height: 1.2;
}

body[data-studio-next] .sn-section-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #a7d8c5;
  color: #075c43;
  background: var(--sn-emerald-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

body[data-studio-next] .sn-prompt-field {
  padding: 18px 20px 10px;
}

body[data-studio-next] .sn-prompt-field label,
body[data-studio-next] .sn-settings-panel legend,
body[data-studio-next] .sn-checklist legend {
  display: block;
  margin-bottom: 8px;
  color: var(--sn-ink-soft);
  font-size: 11px;
  font-weight: 800;
}

body[data-studio-next] .sn-prompt-field textarea {
  display: block;
  width: 100%;
  min-height: 210px;
  resize: vertical;
  padding: 16px;
  border: 0;
  border-top: 2px solid var(--sn-ink);
  border-bottom: 1px solid var(--sn-line);
  border-radius: 0;
  color: var(--sn-ink);
  background: #fbfcfa;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
}

body[data-studio-next] .sn-prompt-field textarea::selection {
  color: var(--sn-ink);
  background: #bde3d4;
}

body[data-studio-next] .sn-field-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  color: var(--sn-muted);
  font-size: 10px;
}

body[data-studio-next] .sn-enhance-row {
  display: grid;
  grid-template-columns: minmax(132px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 0 4px;
  border-top: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-secondary-action,
body[data-studio-next] .sn-enhance-row button {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid var(--sn-ink);
  border-radius: 2px;
  color: var(--sn-ink);
  background: var(--sn-paper);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

body[data-studio-next] .sn-enhance-row output {
  min-width: 0;
  color: var(--sn-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body[data-studio-next] .sn-enhance-row output[data-state="ready"] {
  color: #075c43;
}

body[data-studio-next] .sn-enhance-row output[data-state="error"],
body[data-studio-next] .sn-enhance-row output[data-state="stale"] {
  color: #8d2e23;
}

body[data-studio-next] .sn-brief-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-brief-strip > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 12px 16px;
  border-right: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-brief-strip > div:last-child {
  border-right: 0;
}

body[data-studio-next] .sn-brief-strip small,
body[data-studio-next] .sn-model-readout small,
body[data-studio-next] .sn-verdict-row small,
body[data-studio-next] .sn-inspector small {
  color: var(--sn-muted);
  font-size: 9px;
}

body[data-studio-next] .sn-brief-strip strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-settings-panel {
  margin-top: 24px;
  border-top: 3px solid var(--sn-cobalt);
  border-bottom: 1px solid var(--sn-line-strong);
}

body[data-studio-next] .sn-compact-head {
  align-items: center;
  min-height: 60px;
  padding: 10px 16px;
}

body[data-studio-next] .sn-compact-head > span {
  color: var(--sn-muted);
  font-size: 10px;
}

body[data-studio-next] .sn-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr)) minmax(150px, 1.1fr);
  border-top: 1px solid var(--sn-line);
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-settings-grid > * {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-settings-grid > *:last-child {
  border-right: 0;
}

body[data-studio-next] .sn-prompt-pack {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: 12px 14px;
  padding: 16px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-prompt-pack > header {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sn-ink);
}

body[data-studio-next] .sn-prompt-pack h3,
body[data-studio-next] .sn-local-history h3 {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.25;
}

body[data-studio-next] .sn-prompt-pack header small,
body[data-studio-next] .sn-local-history header small {
  color: var(--sn-muted);
  font-size: 9px;
  font-weight: 700;
}

body[data-studio-next] .sn-prompt-pack > label:not(.sn-confirm-row) {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

body[data-studio-next] .sn-prompt-pack > label:not(.sn-confirm-row) > span {
  color: var(--sn-ink-soft);
  font-size: 10px;
  font-weight: 800;
}

body[data-studio-next] .sn-prompt-pack textarea {
  display: block;
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--sn-line-strong);
  border-radius: 2px;
  color: var(--sn-ink);
  background: #fbfcfa;
  font: inherit;
  font-size: 11px;
  line-height: 1.55;
}

body[data-studio-next] .sn-prompt-pack textarea:disabled {
  color: var(--sn-muted);
  background: #eef0ed;
}

body[data-studio-next] .sn-confirm-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--sn-line-strong);
  background: #f7f8f5;
  cursor: pointer;
}

body[data-studio-next] .sn-confirm-row input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--sn-cobalt);
}

body[data-studio-next] .sn-confirm-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body[data-studio-next] .sn-confirm-row strong {
  font-size: 11px;
}

body[data-studio-next] .sn-confirm-row small {
  color: var(--sn-muted);
  font-size: 9px;
}

body[data-studio-next] .sn-confirm-row:has(input[data-state="confirmed"]) {
  border-color: #72bba0;
  background: var(--sn-emerald-soft);
}

body[data-studio-next] .sn-history-readout,
body[data-studio-next] .sn-model-readout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

body[data-studio-next] .sn-history-readout small,
body[data-studio-next] .sn-model-readout small {
  color: var(--sn-muted);
  font-size: 10px;
}

body[data-studio-next] .sn-history-readout strong {
  font-size: 12px;
}

body[data-studio-next] .sn-segmented {
  display: flex;
  min-width: 0;
}

body[data-studio-next] .sn-segmented button,
body[data-studio-next] .sn-zoom-controls button,
body[data-studio-next] .sn-verdict-actions button {
  flex: 1 1 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--sn-line-strong);
  border-right-width: 0;
  border-radius: 0;
  background: var(--sn-paper);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

body[data-studio-next] .sn-segmented button:last-child,
body[data-studio-next] .sn-zoom-controls button:last-child,
body[data-studio-next] .sn-verdict-actions button:last-child {
  border-right-width: 1px;
}

body[data-studio-next] .sn-segmented button[aria-pressed="true"],
body[data-studio-next] .sn-verdict-actions button[aria-pressed="true"] {
  color: var(--sn-paper);
  border-color: var(--sn-ink);
  background: var(--sn-ink);
}

body[data-studio-next] .sn-model-readout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

body[data-studio-next] .sn-model-readout strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

body[data-studio-next] .sn-generate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
}

body[data-studio-next] .sn-generate-row p {
  display: flex;
  flex-direction: column;
}

body[data-studio-next] .sn-generate-row p strong {
  font-size: 11px;
}

body[data-studio-next] .sn-generate-row p span {
  color: var(--sn-muted);
  font-size: 10px;
}

body[data-studio-next] .sn-generate-row p output {
  color: var(--sn-muted);
  font-size: 10px;
  line-height: 1.45;
}

body[data-studio-next] .sn-generate-row p output[data-state="complete"],
body[data-studio-next] .sn-generate-row p output[data-state="ready"] {
  color: #075c43;
}

body[data-studio-next] .sn-primary-action {
  min-width: 130px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--sn-ink);
  border-radius: 2px;
  color: var(--sn-paper);
  background: linear-gradient(120deg, var(--sn-cobalt), var(--sn-emerald));
  font-size: 12px;
  font-weight: 800;
}

body[data-studio-next] button:disabled,
body[data-studio-next] input:disabled {
  cursor: not-allowed;
}

body[data-studio-next] .sn-primary-action:disabled,
body[data-studio-next] .sn-secondary-action:disabled {
  border-color: var(--sn-line-strong);
  color: var(--sn-muted);
  background: #e7eae6;
}

body[data-studio-next] .sn-result-rail {
  min-width: 0;
  padding: 22px 18px 28px;
  overflow: auto;
  border-left: 1px solid var(--sn-line);
  background: #f7f9f6;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body[data-studio-next] .sn-portrait-acceptance {
  display: none;
  align-content: start;
  min-width: 0;
}

body[data-studio-next] .sn-shell[data-active-task="portrait"] .sn-result-review {
  display: none;
}

body[data-studio-next] .sn-shell[data-active-task="portrait"] .sn-portrait-acceptance:not([hidden]) {
  display: grid;
}

body[data-studio-next] .sn-portrait-acceptance-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sn-ink);
}

body[data-studio-next] .sn-portrait-acceptance-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

body[data-studio-next] .sn-portrait-acceptance-head output {
  color: var(--sn-cobalt);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

body[data-studio-next] .sn-portrait-acceptance-status {
  display: grid;
  gap: 4px;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-portrait-acceptance-status small {
  color: var(--sn-muted);
  font-size: 9px;
  font-weight: 800;
}

body[data-studio-next] .sn-portrait-acceptance-status output {
  color: var(--sn-ink);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

body[data-studio-next] .sn-portrait-acceptance-status p {
  margin: 0;
  color: var(--sn-muted);
  font-size: 10px;
  line-height: 1.5;
}

body[data-studio-next] .sn-portrait-acceptance[data-portrait-acceptance-state="pass"] .sn-portrait-acceptance-status output {
  color: #075c43;
}

body[data-studio-next] .sn-portrait-acceptance[data-portrait-acceptance-state="review"] .sn-portrait-acceptance-status output {
  color: #8d2e23;
}

body[data-studio-next] .sn-portrait-acceptance[data-portrait-acceptance-state="inconclusive"] .sn-portrait-acceptance-status output {
  color: #895b00;
}

body[data-studio-next] .sn-portrait-acceptance-export {
  display: grid;
  grid-template-columns: minmax(128px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-portrait-acceptance-export button {
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--sn-ink);
  border-radius: 2px;
  background: var(--sn-ink);
  color: #ffffff;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

body[data-studio-next] .sn-portrait-acceptance-export button:focus-visible {
  outline: 2px solid var(--sn-cobalt);
  outline-offset: 2px;
}

body[data-studio-next] .sn-portrait-acceptance-export button:disabled {
  border-color: var(--sn-line-strong);
  background: #e7eae6;
  color: var(--sn-muted);
  cursor: not-allowed;
}

body[data-studio-next] .sn-portrait-acceptance-export output {
  min-width: 0;
  color: var(--sn-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body[data-studio-next] .sn-portrait-acceptance-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 0;
}

body[data-studio-next] .sn-portrait-acceptance-pair figure {
  min-width: 0;
  margin: 0;
}

body[data-studio-next] .sn-portrait-acceptance-pair figure > div {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--sn-line-strong);
  background: #e7eae6;
}

body[data-studio-next] .sn-portrait-acceptance-pair img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-studio-next] .sn-portrait-acceptance-pair img:not([src]) {
  display: none;
}

body[data-studio-next] .sn-portrait-acceptance-pair img[src] + span {
  display: none;
}

body[data-studio-next] .sn-portrait-acceptance-pair figure > div > span {
  color: var(--sn-muted);
  font-size: 9px;
}

body[data-studio-next] .sn-portrait-acceptance-pair figcaption {
  padding-top: 6px;
  color: var(--sn-muted);
  font-size: 9px;
  font-weight: 700;
}

body[data-studio-next] .sn-portrait-acceptance-stages {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--sn-ink);
  list-style: none;
}

body[data-studio-next] .sn-portrait-acceptance-stages li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-portrait-acceptance-stages li > span {
  color: var(--sn-muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

body[data-studio-next] .sn-portrait-acceptance-stages strong,
body[data-studio-next] .sn-portrait-acceptance-stages output {
  min-width: 0;
  font-size: 10px;
}

body[data-studio-next] .sn-portrait-acceptance-stages output {
  color: var(--sn-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: right;
}

body[data-studio-next] .sn-portrait-acceptance-stages li[data-portrait-acceptance-stage-state="complete"] output {
  color: #075c43;
}

body[data-studio-next] .sn-portrait-acceptance-stages li[data-portrait-acceptance-stage-state="attention"] output {
  color: #8d2e23;
}

body[data-studio-next] .sn-portrait-acceptance-boundary {
  margin: 14px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid #f2b5ac;
  color: #8d2e23;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

body[data-studio-next] .sn-result-head {
  align-items: center;
  position: sticky;
  z-index: 4;
  top: -22px;
  margin: -22px -18px 14px;
  padding: 22px 18px 14px;
  border-bottom: 1px solid var(--sn-ink);
  background: rgba(247, 249, 246, 0.94);
  backdrop-filter: blur(12px);
}

body[data-studio-next] .sn-version-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

body[data-studio-next] .sn-version-strip button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid var(--sn-line-strong);
  border-radius: 2px;
  background: var(--sn-paper);
  text-align: left;
  cursor: pointer;
}

body[data-studio-next] .sn-version-strip button:hover {
  border-color: var(--sn-cobalt);
}

body[data-studio-next] .sn-version-strip button[aria-pressed="true"] {
  color: var(--sn-paper);
  border-color: var(--sn-cobalt);
  background: var(--sn-cobalt);
}

body[data-studio-next] .sn-version-strip span {
  font-size: 14px;
  font-weight: 800;
}

body[data-studio-next] .sn-version-strip small {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-result-figure {
  border-top: 4px solid var(--sn-ink);
  background: #e5e8e4;
}

body[data-studio-next] .sn-result-inspect {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #dfe3df;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}

body[data-studio-next] .sn-result-inspect img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

body[data-studio-next] .sn-result-inspect:hover img {
  transform: scale(1.02);
}

body[data-studio-next] .sn-result-inspect > span {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-height: 30px;
  padding: 6px 9px;
  color: var(--sn-paper);
  background: rgba(18, 21, 20, 0.88);
  font-size: 9px;
  font-weight: 700;
}

body[data-studio-next] .sn-result-figure figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-result-figure figcaption strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-result-figure figcaption span {
  flex: 0 0 auto;
  color: var(--sn-emerald);
  font-size: 9px;
  font-weight: 700;
}

body[data-studio-next] .sn-provenance {
  margin-top: 16px;
  border-top: 1px solid var(--sn-ink);
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-provenance > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 11px;
}

body[data-studio-next] .sn-source-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sn-emerald);
}

body[data-studio-next] .sn-provenance dl > div {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-provenance dt {
  color: var(--sn-muted);
  font-size: 9px;
}

body[data-studio-next] .sn-provenance dd {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

body[data-studio-next] .sn-export-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

body[data-studio-next] .sn-export-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

body[data-studio-next] .sn-export-row button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--sn-ink);
  border-radius: 2px;
  color: var(--sn-paper);
  background: var(--sn-ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

body[data-studio-next] .sn-export-row button:disabled {
  border-color: var(--sn-line-strong);
  color: var(--sn-muted);
  background: #e7eae6;
}

body[data-studio-next] .sn-export-row output {
  color: var(--sn-muted);
  font-size: 11px;
  line-height: 1.35;
}

body[data-studio-next] .sn-local-history {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--sn-ink);
}

body[data-studio-next] .sn-local-history > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
}

body[data-studio-next] .sn-local-history [data-studio-next-local-history-list] {
  display: grid;
  gap: 6px;
}

body[data-studio-next] .sn-local-history [data-studio-next-local-history-list] > p {
  margin: 0;
  padding: 10px 0;
  color: var(--sn-muted);
  font-size: 10px;
}

body[data-studio-next] .sn-local-history button {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--sn-line-strong);
  border-radius: 2px;
  color: var(--sn-ink);
  background: var(--sn-paper);
  text-align: left;
  cursor: pointer;
}

body[data-studio-next] .sn-local-history button[aria-pressed="true"] {
  border-color: var(--sn-cobalt);
  box-shadow: inset 3px 0 0 var(--sn-cobalt);
}

body[data-studio-next] .sn-local-history button strong,
body[data-studio-next] .sn-local-history button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-local-history button strong {
  font-size: 10px;
}

body[data-studio-next] .sn-local-history button small {
  color: var(--sn-muted);
  font-size: 8px;
}

body[data-studio-next] .sn-identity-panel {
  display: none;
  border: 1px solid var(--sn-ink);
  box-shadow: 7px 7px 0 rgba(18, 21, 20, 0.14);
}

body[data-studio-next] .sn-shell[data-active-task="portrait"] .sn-input-panel,
body[data-studio-next] .sn-shell[data-active-task="portrait"] .sn-settings-panel {
  display: none;
}

body[data-studio-next] .sn-shell[data-active-task="portrait"] .sn-identity-panel {
  display: block;
}

body[data-studio-next] .sn-identity-boundary {
  padding: 11px 16px;
  border-bottom: 1px solid #f2b5ac;
  color: #8d2e23;
  background: var(--sn-coral-soft);
  font-size: 11px;
  font-weight: 800;
}

body[data-studio-next] .sn-candidate-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-candidate-actions > div {
  display: flex;
  flex-direction: column;
}

body[data-studio-next] .sn-candidate-actions strong {
  font-size: 11px;
}

body[data-studio-next] .sn-candidate-actions small {
  color: var(--sn-muted);
  font-size: 11px;
}

body[data-studio-next] .sn-reference-set {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--sn-line);
  background: color-mix(in srgb, var(--sn-paper) 94%, #e8f3ef);
}

body[data-studio-next] .sn-reference-set-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(420px, 1.3fr);
  align-items: end;
  gap: 18px;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-reference-set-head h3 {
  margin: 3px 0 0;
  font-size: 16px;
  line-height: 1.15;
}

body[data-studio-next] .sn-reference-set-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

body[data-studio-next] .sn-reference-set-summary div {
  min-width: 0;
  padding-left: 9px;
  border-left: 2px solid var(--sn-line-strong);
}

body[data-studio-next] .sn-reference-set-summary dt {
  color: var(--sn-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

body[data-studio-next] .sn-reference-set-summary dd {
  margin: 2px 0 0;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

body[data-studio-next] .sn-reference-set-summary output {
  overflow-wrap: anywhere;
}

body[data-studio-next] .sn-reference-role-list {
  display: grid;
}

body[data-studio-next] .sn-reference-role {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto 44px minmax(138px, 0.55fr);
  align-items: center;
  gap: 9px;
  min-height: 64px;
  padding: 9px 16px 9px 13px;
  border-left: 3px solid #1d7765;
}

body[data-studio-next] .sn-reference-role + .sn-reference-role {
  border-top: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-reference-role[data-portrait-reference-slot="structure"] {
  border-left-color: #b77616;
}

body[data-studio-next] .sn-reference-role[data-portrait-reference-slot="style"] {
  border-left-color: #8f4e7c;
}

body[data-studio-next] .sn-reference-role[data-reference-state="error"] {
  background: color-mix(in srgb, var(--sn-coral-soft) 62%, var(--sn-paper));
}

body[data-studio-next] .sn-reference-role-copy {
  display: grid;
  min-width: 0;
}

body[data-studio-next] .sn-reference-role-key {
  color: var(--sn-muted);
  font-size: 9px;
  font-weight: 900;
}

body[data-studio-next] .sn-reference-role-copy strong {
  margin-top: 1px;
  font-size: 12px;
}

body[data-studio-next] .sn-reference-role-copy small,
body[data-studio-next] .sn-reference-status {
  color: var(--sn-muted);
  font-size: 10px;
  line-height: 1.35;
}

body[data-studio-next] .sn-reference-status {
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

body[data-studio-next] .sn-reference-role[data-reference-state="ready"] .sn-reference-status {
  color: #1d6b4f;
}

body[data-studio-next] .sn-reference-role[data-reference-state="error"] .sn-reference-status {
  color: #8d2e23;
}

body[data-studio-next] .sn-portrait-execution {
  display: grid;
  grid-template-columns: minmax(170px, 0.72fr) minmax(220px, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 92px;
  padding: 12px 16px;
  border-top: 1px solid var(--sn-line);
  border-bottom: 1px solid var(--sn-line-strong);
  background: #eef5f1;
}

body[data-studio-next] .sn-portrait-execution-copy,
body[data-studio-next] .sn-portrait-execution-status {
  display: grid;
  min-width: 0;
  gap: 4px;
}

body[data-studio-next] .sn-portrait-execution-copy > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

body[data-studio-next] .sn-portrait-execution h3,
body[data-studio-next] .sn-portrait-execution p {
  margin: 0;
}

body[data-studio-next] .sn-portrait-execution h3 {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1.2;
}

body[data-studio-next] .sn-portrait-execution p,
body[data-studio-next] .sn-portrait-execution-status > output {
  color: var(--sn-muted);
  font-size: 10px;
  line-height: 1.4;
}

body[data-studio-next] .sn-portrait-execution-status {
  position: relative;
  padding-left: 13px;
  border-left: 3px solid #1d7765;
}

body[data-studio-next] .sn-portrait-execution-status > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

body[data-studio-next] .sn-portrait-execution-status small {
  color: var(--sn-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

body[data-studio-next] .sn-portrait-execution-status [data-portrait-execution-state] {
  min-width: 0;
  font-size: 11px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

body[data-studio-next] [data-portrait-execution-progress] {
  position: absolute;
  top: 0;
  right: 0;
  color: #1d5c4e;
  font-size: 10px;
  font-weight: 900;
}

body[data-studio-next] .sn-portrait-execution-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

body[data-studio-next] .sn-portrait-execution-actions button {
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--sn-line-strong);
  border-radius: 2px;
  color: var(--sn-ink);
  background: var(--sn-paper);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

body[data-studio-next] .sn-portrait-execution-actions [data-portrait-execution-run] {
  color: #fff;
  border-color: #174f43;
  background: #174f43;
}

body[data-studio-next] .sn-portrait-execution-actions [data-portrait-execution-real] {
  color: #6a6258;
  border-style: dashed;
  background: #f2eee8;
}

body[data-studio-next] .sn-portrait-execution-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

body[data-studio-next] .sn-portrait-execution[data-portrait-execution-state="running"] {
  background: #edf3f8;
}

body[data-studio-next] .sn-portrait-execution[data-portrait-execution-state="succeeded"] {
  background: #e8f4ed;
}

body[data-studio-next] .sn-portrait-execution[data-portrait-execution-state="failed"],
body[data-studio-next] .sn-portrait-execution[data-portrait-execution-state="stale"] {
  background: color-mix(in srgb, var(--sn-coral-soft) 54%, var(--sn-paper));
}

@media (max-width: 767px) {
  body[data-studio-next] .sn-portrait-execution {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  body[data-studio-next] .sn-portrait-execution-copy > div,
  body[data-studio-next] .sn-portrait-execution-status > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  body[data-studio-next] .sn-portrait-execution-actions {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  body[data-studio-next] .sn-portrait-execution-actions [data-portrait-execution-real] {
    grid-column: 1 / -1;
  }

  body[data-studio-next] .sn-portrait-execution-actions button {
    min-height: 44px;
    white-space: normal;
  }
}

body[data-studio-next] .sn-file-input {
  position: absolute;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body[data-studio-next] .sn-file-control,
body[data-studio-next] .sn-reference-role button,
body[data-studio-next] .sn-candidate-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid var(--sn-line-strong);
  border-radius: 2px;
  background: var(--sn-paper);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

body[data-studio-next] .sn-file-control {
  position: relative;
}

body[data-studio-next] .sn-reference-role .sn-reference-clear {
  width: 44px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

body[data-studio-next] .sn-file-control:focus-within,
body[data-studio-next] .sn-file-control:has(.sn-file-input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--sn-focus) 78%, white);
  outline-offset: 3px;
}

body[data-studio-next] .sn-portrait-cropper {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(18, 42, 71, 0.18);
  border-radius: 8px;
  color: #102033;
  background: #f7fbfd;
  box-shadow: 0 24px 80px rgba(7, 19, 35, 0.28);
}

body[data-studio-next] .sn-portrait-cropper::backdrop {
  background: rgba(7, 19, 35, 0.58);
}

body[data-studio-next] .sn-portrait-cropper header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(18, 42, 71, 0.12);
}

body[data-studio-next] .sn-portrait-cropper h3 {
  margin: 2px 0 0;
  font-size: 18px;
}

body[data-studio-next] .sn-portrait-cropper [data-portrait-cropper-state] {
  min-width: 150px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f5965;
  background: rgba(49, 208, 227, 0.13);
  font-size: 12px;
  text-align: center;
}

body[data-studio-next] .sn-portrait-cropper-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  padding: 18px;
}

body[data-studio-next] .sn-portrait-cropper-stage {
  position: relative;
  height: clamp(420px, 58vh, 560px);
  min-height: 420px;
  max-height: calc(100vh - 220px);
  overflow: hidden;
  border: 1px solid rgba(18, 42, 71, 0.12);
  border-radius: 8px;
  background: #071323;
}

body[data-studio-next] .sn-portrait-cropper-stage cropper-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #071323;
}

body[data-studio-next] .sn-portrait-cropper-stage cropper-selection {
  outline: 1px solid #31d0e3;
}

body[data-studio-next] .sn-portrait-cropper-stage img {
  display: block;
  max-width: 100%;
}

body[data-studio-next] .sn-portrait-cropper-tools {
  display: grid;
  align-content: start;
  gap: 12px;
}

body[data-studio-next] .sn-portrait-cropper-tools output {
  padding: 10px 12px;
  border: 1px solid rgba(18, 42, 71, 0.12);
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
}

body[data-studio-next] .sn-cropper-readiness {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(18, 42, 71, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

body[data-studio-next] .sn-cropper-readiness legend {
  padding: 0 4px;
  color: #102033;
  font-size: 11px;
  font-weight: 800;
}

body[data-studio-next] .sn-cropper-readiness output {
  padding: 0 2px 8px;
  border: 0;
  border-bottom: 1px solid rgba(18, 42, 71, 0.1);
  border-radius: 0;
  color: #526173;
  background: transparent;
  font-size: 11px;
  line-height: 1.4;
}

body[data-studio-next] .sn-cropper-readiness output[data-portrait-cropper-readiness-state="blocked"] {
  color: #8d2e23;
}

body[data-studio-next] .sn-cropper-readiness output[data-portrait-cropper-readiness-state="ready"] {
  color: #075c43;
}

body[data-studio-next] .sn-cropper-readiness label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid rgba(18, 42, 71, 0.1);
  color: #34465a;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
}

body[data-studio-next] .sn-cropper-readiness label:has(input:checked) {
  border-color: #7bb9a2;
  color: #075c43;
  background: #e8f5ef;
}

body[data-studio-next] .sn-cropper-readiness label:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--sn-focus) 78%, white);
  outline-offset: 2px;
}

body[data-studio-next] .sn-cropper-readiness label:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

body[data-studio-next] .sn-cropper-readiness input {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: #13715a;
}

body[data-studio-next] .sn-cropper-ratios,
body[data-studio-next] .sn-portrait-cropper-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body[data-studio-next] .sn-portrait-cropper-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-studio-next] .sn-portrait-cropper button {
  min-height: 38px;
  border: 1px solid rgba(18, 42, 71, 0.18);
  border-radius: 8px;
  color: #102033;
  background: #ffffff;
  cursor: pointer;
}

body[data-studio-next] .sn-portrait-cropper button:hover,
body[data-studio-next] .sn-portrait-cropper button[aria-pressed="true"] {
  border-color: rgba(49, 208, 227, 0.65);
  background: rgba(49, 208, 227, 0.11);
}

body[data-studio-next] .sn-portrait-cropper [data-portrait-cropper-apply] {
  color: #ffffff;
  border-color: #0f5965;
  background: #0f5965;
}

body[data-studio-next] .sn-portrait-cropper button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body[data-studio-next] .sn-identity-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-identity-readiness {
  min-width: 0;
  color: var(--sn-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

body[data-studio-next] .sn-zoom-controls {
  display: flex;
  align-items: center;
}

body[data-studio-next] .sn-zoom-controls output {
  display: grid;
  place-items: center;
  min-width: 56px;
  min-height: 44px;
  border-top: 1px solid var(--sn-line-strong);
  border-bottom: 1px solid var(--sn-line-strong);
  font-size: 10px;
}

body[data-studio-next] .sn-identity-stages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--sn-ink);
}

body[data-studio-next] .sn-identity-stage {
  min-width: 0;
  background: var(--sn-paper);
}

body[data-studio-next] .sn-identity-stage[hidden] {
  display: none;
}

body[data-studio-next] .sn-identity-stage figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 7px 12px;
  font-size: 10px;
}

body[data-studio-next] .sn-identity-stage figcaption span {
  color: var(--sn-muted);
  font-size: 9px;
}

body[data-studio-next] .sn-image-viewport {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e7eae6;
}

body[data-studio-next] .sn-image-viewport:focus-visible {
  outline: 2px solid var(--sn-focus);
  outline-offset: -3px;
}

body[data-studio-next] .sn-image-viewport[data-pan-enabled="true"] {
  cursor: grab;
  touch-action: none;
}

body[data-studio-next] .sn-image-viewport[data-pan-dragging="true"] {
  cursor: grabbing;
}

body[data-studio-next] .sn-image-viewport img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
}

body[data-studio-next] .sn-image-viewport img:not([src]) {
  display: none;
}

body[data-studio-next] .sn-image-viewport img[src] + span {
  display: none;
}

body[data-studio-next] .sn-image-viewport > span {
  color: var(--sn-muted);
  font-size: 10px;
}

body[data-studio-next] .sn-identity-review {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(360px, 1.2fr);
  border-top: 1px solid var(--sn-ink);
}

body[data-studio-next] .sn-candidate-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  border-right: 1px solid var(--sn-line);
  border-bottom: 0;
}

body[data-studio-next] .sn-candidate-actions > div {
  grid-column: 1 / -1;
}

body[data-studio-next] .sn-review-workbench {
  min-width: 0;
}

body[data-studio-next] .sn-review-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-review-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px 7px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--sn-muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

body[data-studio-next] .sn-review-tabs button:hover {
  color: var(--sn-ink);
  background: #f1f3f0;
}

body[data-studio-next] .sn-review-tabs button[aria-selected="true"] {
  border-bottom-color: var(--sn-cobalt);
  color: var(--sn-ink);
  background: var(--sn-cobalt-soft);
}

body[data-studio-next] .sn-review-tabs button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid color-mix(in srgb, var(--sn-focus) 78%, white);
  outline-offset: -3px;
}

body[data-studio-next] .sn-review-panel[hidden] {
  display: none;
}

body[data-studio-next] .sn-review-record {
  min-width: 0;
  padding: 12px 16px 14px;
}

body[data-studio-next] .sn-review-verdict-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-inline: 16px;
}

body[data-studio-next] .sn-review-panel [data-portrait-quality-authoritative="false"] {
  color: var(--sn-muted);
}

body[data-studio-next] .sn-review-panel [data-portrait-quality-authoritative="true"] {
  color: var(--sn-ink);
}

body[data-studio-next] .sn-review-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-bottom: 7px;
}

body[data-studio-next] .sn-review-summary strong,
body[data-studio-next] .sn-review-summary output {
  min-width: 0;
  overflow-wrap: anywhere;
}

body[data-studio-next] .sn-review-summary strong {
  color: var(--sn-ink-soft);
  font-size: 11px;
  font-weight: 800;
}

body[data-studio-next] .sn-review-summary output {
  color: var(--sn-cobalt);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: right;
}

body[data-studio-next] .sn-review-group {
  min-width: 0;
  padding: 8px 0 9px;
  border-top: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-review-group legend {
  width: 100%;
  margin-bottom: 6px;
  color: var(--sn-ink-soft);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

body[data-studio-next] .sn-review-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

body[data-studio-next] .sn-review-options label {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 36px;
  padding: 6px;
  border: 1px solid var(--sn-line);
  color: var(--sn-muted);
  background: var(--sn-paper);
  font-size: 9px;
  line-height: 1.25;
  cursor: pointer;
}

body[data-studio-next] .sn-review-options label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

body[data-studio-next] .sn-review-options input[type="radio"] {
  min-width: 16px;
  min-height: 16px;
  width: 16px;
  height: 16px;
  margin: 0;
}

body[data-studio-next] .sn-review-options input[value="pending"] {
  accent-color: var(--sn-muted);
}

body[data-studio-next] .sn-review-options input[value="match"],
body[data-studio-next] .sn-review-options input[value="clear"] {
  accent-color: var(--sn-emerald);
}

body[data-studio-next] .sn-review-options input[value="mismatch"],
body[data-studio-next] .sn-review-options input[value="issue"] {
  accent-color: var(--sn-coral);
}

body[data-studio-next] .sn-review-options input[value="unable"] {
  accent-color: #a16300;
}

body[data-studio-next] .sn-review-options label:has(input[value="pending"]:checked) {
  border-color: var(--sn-line-strong);
  color: var(--sn-ink);
  background: #f1f3f0;
}

body[data-studio-next] .sn-review-options label:has(input[value="match"]:checked),
body[data-studio-next] .sn-review-options label:has(input[value="clear"]:checked) {
  border-color: #7bb9a2;
  color: #075c43;
  background: var(--sn-emerald-soft);
}

body[data-studio-next] .sn-review-options label:has(input[value="mismatch"]:checked),
body[data-studio-next] .sn-review-options label:has(input[value="issue"]:checked) {
  border-color: #d99187;
  color: #7a2017;
  background: var(--sn-coral-soft);
}

body[data-studio-next] .sn-review-options label:has(input[value="unable"]:checked) {
  border-color: #d5aa62;
  color: #704500;
  background: #fff3da;
}

body[data-studio-next] .sn-review-options label:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--sn-focus) 78%, white);
  outline-offset: 2px;
}

body[data-studio-next] .sn-review-options label:has(input:disabled) {
  opacity: 0.52;
  cursor: not-allowed;
}

body[data-studio-next] .sn-verdict-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-verdict-row > div:not(.sn-verdict-actions) {
  display: flex;
  flex-direction: column;
}

body[data-studio-next] .sn-verdict-row output {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 800;
}

body[data-studio-next] .sn-review-details {
  min-width: 0;
  color: var(--sn-ink-soft);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
}

body[data-studio-next] .sn-verdict-row > output {
  grid-column: 1 / -1;
  color: #a12c20;
  font-size: 10px;
}

body[data-studio-next] .sn-transfer-boundary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--sn-line);
  color: var(--sn-ink-soft);
  background: #f1f2ef;
  font-size: 10px;
}

body[data-studio-next] .sn-transfer-boundary strong {
  color: var(--sn-coral);
}

body[data-studio-next] .sn-mobile-steps {
  display: none;
}

body[data-studio-next] .sn-inspector {
  width: min(92vw, 1120px);
  max-width: none;
  height: min(88vh, 820px);
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #2a2f2c;
  border-radius: 3px;
  color: var(--sn-ink);
  background: var(--sn-paper);
  box-shadow: 0 24px 80px rgba(10, 12, 11, 0.36);
}

body[data-studio-next] .sn-inspector::backdrop {
  background: rgba(12, 15, 13, 0.72);
}

body[data-studio-next] .sn-inspector header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 8px 10px 8px 18px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-inspector header > div {
  display: flex;
  flex-direction: column;
}

body[data-studio-next] .sn-inspector header button {
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

body[data-studio-next] .sn-inspector-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(100% - 60px);
  overflow: auto;
  background: #dfe3df;
}

body[data-studio-next] .sn-inspector-stage img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (prefers-reduced-motion: reduce) {
  body[data-studio-next] *,
  body[data-studio-next] *::before,
  body[data-studio-next] *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-width: 768px) {
  body[data-studio-next] .sn-body {
    height: calc(100vh - 68px);
    min-height: 0;
  }

  body[data-studio-next] .sn-task-rail,
  body[data-studio-next] .sn-workspace,
  body[data-studio-next] .sn-result-rail {
    min-height: 0;
  }
}

@media (max-width: 1199px) and (min-width: 768px) {
  body[data-studio-next] .sn-topbar {
    grid-template-columns: 218px auto minmax(110px, 1fr) auto;
  }

  body[data-studio-next] .sn-brand {
    padding-inline: 16px;
  }

  body[data-studio-next] .sn-heading {
    padding-inline: 18px;
  }

  body[data-studio-next] .sn-local-status {
    display: inline-flex;
  }

  body[data-studio-next] .sn-body {
    grid-template-areas:
      "task task"
      "main result";
    grid-template-columns: minmax(0, 1fr) 336px;
    grid-template-rows: auto minmax(calc(100vh - 154px), auto);
  }

  body[data-studio-next] .sn-task-rail {
    grid-area: task;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-height: 86px;
    padding: 10px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--sn-chrome-line);
  }

  body[data-studio-next] .sn-rail-heading {
    min-width: 90px;
    padding: 0 16px 0 0;
    border-right: 1px solid var(--sn-chrome-line);
    border-bottom: 0;
  }

  body[data-studio-next] .sn-task-list {
    grid-template-columns: repeat(2, minmax(0, 240px));
    padding: 0;
  }

  body[data-studio-next] .sn-task-button {
    min-height: 60px;
  }

  body[data-studio-next] .sn-rail-note,
  body[data-studio-next] .sn-rail-index {
    display: none;
  }

  body[data-studio-next] .sn-workspace {
    grid-area: main;
    padding: 24px 22px 34px;
  }

  body[data-studio-next] .sn-result-rail {
    grid-area: result;
  }

  body[data-studio-next] .sn-prompt-field textarea {
    min-height: 184px;
    font-size: 16px;
  }

  body[data-studio-next] .sn-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-studio-next] .sn-model-readout {
    grid-column: 1 / -1;
    min-height: 52px;
    border-top: 1px solid var(--sn-line);
    border-right: 0;
  }

  body[data-studio-next] .sn-shell[data-active-task="results"] .sn-compact-head {
    min-height: 52px;
    padding-block: 6px;
  }

  body[data-studio-next] .sn-shell[data-active-task="results"] .sn-settings-grid > * {
    padding-block: 8px;
  }

  body[data-studio-next] .sn-shell[data-active-task="results"] .sn-prompt-pack {
    gap: 10px 14px;
    padding-block: 12px;
  }

  body[data-studio-next] .sn-shell[data-active-task="results"] .sn-prompt-pack textarea {
    min-height: 120px;
  }

  body[data-studio-next] .sn-identity-review {
    grid-template-columns: 1fr;
  }

  body[data-studio-next] .sn-candidate-actions {
    border-right: 0;
    border-bottom: 1px solid var(--sn-line);
  }
}

@media (max-width: 767px) {
  body[data-studio-next] {
    --sn-mobile-chrome-height: 133px;
    --sn-mobile-chrome-clearance: 141px;
    background: var(--sn-paper);
  }

  body[data-studio-next] .sn-shell {
    min-height: 100dvh;
    padding-bottom: 120px;
    background: var(--sn-paper);
  }

  body[data-studio-next] .sn-topbar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-areas:
      "brand brand brand"
      "nav nav nav"
      "context context context";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-rows: repeat(3, 44px);
    min-height: var(--sn-mobile-chrome-height);
    background: var(--sn-chrome);
  }

  body[data-studio-next] .sn-review-group legend {
    padding-top: 8px;
  }

  body[data-studio-next] .sn-review-group {
    padding-block: 5px 6px;
  }

  body[data-studio-next] .sn-review-group + .sn-review-group {
    margin-top: 8px;
  }

  body[data-studio-next] .sn-brand {
    grid-area: brand;
    gap: 9px;
    padding: 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--sn-chrome-line);
  }

  body[data-studio-next] .sn-brand-mark {
    width: 26px;
    height: 26px;
    box-shadow: inset 0 0 0 1px rgba(232, 247, 255, 0.18);
  }

  body[data-studio-next] .sn-brand strong {
    font-size: 13px;
  }

  body[data-studio-next] .sn-brand small {
    font-size: 8px;
  }

  body[data-studio-next] .sn-primary-nav {
    grid-area: nav;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-width: 0;
    padding: 0 4px;
    border-right: 1px solid var(--sn-chrome-line);
    border-bottom: 1px solid var(--sn-chrome-line);
  }

  body[data-studio-next] .sn-primary-nav a {
    min-width: 0;
    padding: 0 3px;
    font-size: 10px;
    white-space: nowrap;
  }

  body[data-studio-next] .sn-heading {
    grid-area: context;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
  }

  body[data-studio-next] .sn-heading h1 {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
  }

  body[data-studio-next] .sn-current-task {
    flex: 1 1 auto;
    color: var(--sn-chrome-muted);
    font-size: 9px;
    font-weight: 700;
  }

  body[data-studio-next] .sn-topbar-actions {
    display: none;
  }

  body[data-studio-next] .sn-local-status {
    display: inline-flex;
    gap: 5px;
    font-size: 9px;
  }

  body[data-studio-next] .sn-local-status i {
    width: 6px;
    height: 6px;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.13);
  }

  body[data-studio-next] .sn-legacy-link {
    min-height: 44px;
    padding-inline: 8px;
    font-size: 9px;
  }

  body[data-studio-next] .sn-body {
    display: block;
    min-height: calc(100dvh - var(--sn-mobile-chrome-height) - 76px);
  }

  body[data-studio-next] .sn-task-rail {
    display: none;
  }

  body[data-studio-next] .sn-workspace {
    min-height: 0;
    padding: 0;
    overflow: visible;
    background: var(--sn-paper);
  }

  body[data-studio-next] .sn-input-panel,
  body[data-studio-next] .sn-settings-panel,
  body[data-studio-next] .sn-identity-panel,
  body[data-studio-next] .sn-result-rail {
    display: none;
    width: 100%;
    min-height: calc(100dvh - var(--sn-mobile-chrome-height) - 76px);
    margin: 0;
    scroll-margin-top: var(--sn-mobile-chrome-clearance);
    border: 0;
    box-shadow: none;
  }

  body[data-studio-next] .sn-shell[data-active-step="input"] [data-studio-next-step-panel="input"],
  body[data-studio-next] .sn-shell[data-active-step="settings"] [data-studio-next-step-panel="settings"],
  body[data-studio-next] .sn-shell[data-active-step="identity"] [data-studio-next-step-panel="identity"],
  body[data-studio-next] .sn-shell[data-active-step="review"] [data-studio-next-step-panel="review"] {
    display: block;
  }

  body[data-studio-next] .sn-section-head {
    min-height: 66px;
    padding: 12px 16px;
  }

  body[data-studio-next] .sn-section-head h2,
  body[data-studio-next] .sn-compact-head h2,
  body[data-studio-next] .sn-result-head h2 {
    font-size: 18px;
  }

  body[data-studio-next] .sn-section-state {
    font-size: 9px;
  }

  body[data-studio-next] .sn-prompt-field {
    padding: 16px 14px 8px;
  }

  body[data-studio-next] .sn-prompt-field textarea {
    min-height: 350px;
    padding: 15px 12px;
    font-size: 17px;
  }

  body[data-studio-next] .sn-enhance-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding-top: 12px;
  }

  body[data-studio-next] .sn-enhance-row button {
    width: 100%;
  }

  body[data-studio-next] .sn-brief-strip {
    grid-template-columns: 1fr;
  }

  body[data-studio-next] .sn-brief-strip > div {
    min-height: 50px;
    border-right: 0;
    border-bottom: 1px solid var(--sn-line);
  }

  body[data-studio-next] .sn-settings-panel {
    padding-bottom: 20px;
    border-top: 4px solid var(--sn-cobalt);
  }

  body[data-studio-next] .sn-compact-head {
    min-height: 66px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--sn-line);
  }

  body[data-studio-next] .sn-settings-grid {
    grid-template-columns: 1fr;
    border-top: 0;
  }

  body[data-studio-next] .sn-settings-grid > * {
    min-height: 84px;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--sn-line);
  }

  body[data-studio-next] .sn-prompt-pack {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  body[data-studio-next] .sn-prompt-pack > header,
  body[data-studio-next] .sn-confirm-row {
    grid-column: 1;
  }

  body[data-studio-next] .sn-prompt-pack textarea {
    min-height: 150px;
    font-size: 12px;
  }

  body[data-studio-next] .sn-model-readout {
    min-height: 64px;
  }

  body[data-studio-next] .sn-generate-row {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  body[data-studio-next] .sn-primary-action {
    width: 100%;
  }

  body[data-studio-next] .sn-portrait-cropper {
    width: min(390px, calc(100vw - 16px));
    max-height: calc(100dvh - 16px);
  }

  body[data-studio-next] .sn-portrait-cropper header {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  body[data-studio-next] .sn-portrait-cropper [data-portrait-cropper-state] {
    width: 100%;
  }

  body[data-studio-next] .sn-portrait-cropper-body {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  body[data-studio-next] .sn-portrait-cropper-stage {
    height: min(48dvh, 390px);
    min-height: 330px;
    max-height: 48dvh;
  }

  body[data-studio-next] .sn-cropper-readiness label {
    min-height: 44px;
  }

  body[data-studio-next] .sn-result-rail {
    padding: 10px 14px 24px;
    overflow: visible;
    background: var(--sn-paper);
  }

  body[data-studio-next] .sn-result-head {
    padding-bottom: 8px;
  }

  body[data-studio-next] .sn-portrait-acceptance-head {
    align-items: center;
    padding: 4px 2px 12px;
  }

  body[data-studio-next] .sn-portrait-acceptance-head h2 {
    font-size: 18px;
  }

  body[data-studio-next] .sn-portrait-acceptance-status output {
    font-size: 19px;
  }

  body[data-studio-next] .sn-portrait-acceptance-export {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  body[data-studio-next] .sn-portrait-acceptance-export button {
    min-height: 44px;
  }

  body[data-studio-next] .sn-portrait-acceptance-pair {
    gap: 10px;
  }

  body[data-studio-next] .sn-portrait-acceptance-stages li {
    min-height: 52px;
  }

  body[data-studio-next] .sn-version-strip {
    margin-block: 10px;
  }

  body[data-studio-next] .sn-provenance {
    margin-top: 10px;
  }

  body[data-studio-next] .sn-provenance > div {
    min-height: 40px;
  }

  body[data-studio-next] .sn-provenance dl > div {
    padding-block: 4px;
  }

  body[data-studio-next] .sn-result-inspect {
    height: 184px;
    max-height: none;
    aspect-ratio: auto;
  }

  body[data-studio-next] .sn-result-inspect img {
    object-fit: contain;
  }

  body[data-studio-next] .sn-version-strip button {
    min-height: 54px;
  }

  body[data-studio-next] .sn-export-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 8px;
  }

  body[data-studio-next] .sn-export-row button {
    width: 100%;
  }

  body[data-studio-next] .sn-identity-panel {
    padding-bottom: 20px;
  }

  body[data-studio-next] .sn-candidate-actions {
    grid-template-columns: 1fr 1fr;
  }

  body[data-studio-next] .sn-candidate-actions > div {
    grid-column: 1 / -1;
  }

  body[data-studio-next] .sn-candidate-actions .sn-file-control {
    width: 100%;
  }

  body[data-studio-next] .sn-reference-set-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
  }

  body[data-studio-next] .sn-reference-set-summary {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body[data-studio-next] .sn-reference-role {
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: start;
    min-height: 0;
    padding-block: 12px;
  }

  body[data-studio-next] .sn-reference-role-copy,
  body[data-studio-next] .sn-reference-status {
    grid-column: 1 / -1;
  }

  body[data-studio-next] .sn-reference-role .sn-file-control {
    width: 100%;
  }

  body[data-studio-next] .sn-identity-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  body[data-studio-next] .sn-portrait-execution {
    margin-bottom: 88px;
  }

  body[data-studio-next] .sn-identity-stages {
    grid-template-columns: 1fr;
  }

  body[data-studio-next] .sn-image-viewport {
    aspect-ratio: 3 / 2;
  }

  body[data-studio-next] .sn-identity-review {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  body[data-studio-next] .sn-review-tabs {
    padding-inline: 12px;
  }

  body[data-studio-next] .sn-candidate-actions {
    border-right: 0;
    border-bottom: 1px solid var(--sn-line);
  }

  body[data-studio-next] .sn-verdict-row {
    grid-template-columns: 1fr 1fr;
  }

  body[data-studio-next] .sn-review-details {
    grid-column: 1 / -1;
  }

  body[data-studio-next] .sn-review-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body[data-studio-next] .sn-review-options label {
    min-height: 44px;
    padding: 8px;
  }

  body[data-studio-next] .sn-transfer-boundary {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  body[data-studio-next] .sn-mobile-steps {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 76px;
    padding: 6px max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    border-top: 1px solid var(--sn-line-strong);
    background: var(--sn-paper);
  }

  body[data-studio-next] .sn-mobile-steps button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-width: 44px;
    min-height: 60px;
    padding: 5px 2px;
    border: 0;
    border-top: 3px solid transparent;
    border-radius: 0;
    color: var(--sn-muted);
    background: transparent;
    cursor: pointer;
  }

  body[data-studio-next] .sn-mobile-steps button span {
    font-size: 8px;
  }

  body[data-studio-next] .sn-mobile-steps button strong {
    font-size: 10px;
  }

  body[data-studio-next] .sn-mobile-steps button[aria-current="step"],
  body[data-studio-next] .sn-mobile-steps button[data-active="true"] {
    border-top-color: var(--sn-cobalt);
    color: var(--sn-ink);
    background: var(--sn-cobalt-soft);
  }

  body[data-studio-next] .sn-inspector {
    width: calc(100vw - 20px);
    height: min(calc(100dvh - 24px), calc(66.667vw + 47px));
    max-height: calc(100dvh - 24px);
  }

  body[data-studio-next] .sn-inspector-stage {
    width: 100%;
    height: calc(100% - 60px);
    aspect-ratio: auto;
  }
}

/* Local research CSV workbench */
body[data-studio-next] .sn-shell[data-active-task="research"] .sn-body {
  grid-template-columns: 240px minmax(0, 1fr);
}

body[data-studio-next] .sn-shell[data-active-task="research"] .sn-workspace {
  padding: 18px;
}

body[data-studio-next] .sn-shell[data-active-task="research"] .sn-result-rail {
  display: none !important;
}

body[data-studio-next] .sn-research-workspace[hidden] {
  display: none !important;
}

body[data-studio-next] .sn-research-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: calc(100vh - 104px);
  overflow: hidden;
  border: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-research-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-research-head > div {
  min-width: 0;
}

body[data-studio-next] .sn-research-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.15;
}

body[data-studio-next] .sn-research-head p {
  color: var(--sn-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

body[data-studio-next] .sn-research-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

body[data-studio-next] .sn-research-controls {
  display: grid;
  grid-template-rows: auto auto auto auto auto 1fr;
  align-content: start;
  min-width: 0;
  border-right: 1px solid var(--sn-line);
  background: #f7f8f6;
}

body[data-studio-next] .sn-research-control-intro {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-research-control-intro strong {
  font-size: 13px;
}

body[data-studio-next] .sn-research-control-intro small,
body[data-studio-next] .sn-research-actions small {
  color: var(--sn-muted);
  font-size: 10px;
  line-height: 1.35;
}

body[data-studio-next] .sn-research-file-control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 9px 14px;
  overflow: hidden;
  border-bottom: 1px solid var(--sn-line);
  color: #174a91;
  background: #edf4ff;
  cursor: pointer;
}

body[data-studio-next] .sn-research-file-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

body[data-studio-next] .sn-research-file-control > span {
  display: flex;
  flex-direction: column;
}

body[data-studio-next] .sn-research-file-control strong {
  font-size: 12px;
}

body[data-studio-next] .sn-research-file-control small {
  color: #4a6383;
  font-size: 10px;
}

body[data-studio-next] .sn-research-field {
  display: grid;
  gap: 5px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-research-field > span {
  color: var(--sn-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

body[data-studio-next] .sn-research-field select {
  width: 100%;
  min-height: 44px;
  padding: 7px 30px 7px 9px;
  border: 1px solid var(--sn-line-strong);
  border-radius: 2px;
  background: var(--sn-paper);
  font-size: 12px;
}

body[data-studio-next] .sn-research-actions {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  min-height: 92px;
  padding: 14px;
}

body[data-studio-next] .sn-research-actions button {
  min-height: 44px;
  border: 1px solid #075c43;
  border-radius: 2px;
  color: #ffffff;
  background: #087f5b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

body[data-studio-next] .sn-research-chart-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #ffffff;
}

body[data-studio-next] .sn-research-chart-pane > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-research-chart-pane h3 {
  margin: 2px 0 0;
  font-size: 15px;
}

body[data-studio-next] [data-research-chart-status] {
  max-width: 46%;
  padding: 5px 8px;
  border-left: 3px solid #2759d7;
  color: #174a91;
  background: #edf4ff;
  font-size: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

body[data-studio-next] [data-research-chart-status][data-state="ready"] {
  border-left-color: #087f5b;
  color: #075c43;
  background: #e5f6ef;
}

body[data-studio-next] [data-research-chart-status][data-state="error"] {
  border-left-color: #c0266f;
  color: #8d164f;
  background: #fff0f6;
}

body[data-studio-next] [data-research-chart-status][data-state="error-retained"] {
  border-left-color: #b45309;
  color: #7c2d12;
  background: #fff7ed;
}

body[data-studio-next] .sn-research-chart-canvas {
  width: 100%;
  height: calc(100vh - 222px);
  min-height: 520px;
  padding: 8px;
}

@media (max-width: 1199px) and (min-width: 768px) {
  body[data-studio-next] .sn-task-list {
    grid-template-columns: repeat(3, minmax(0, 220px));
  }

  body[data-studio-next] .sn-shell[data-active-task="research"] .sn-body {
    grid-template-areas:
      "task"
      "main";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(calc(100vh - 154px), auto);
  }

  body[data-studio-next] .sn-shell[data-active-task="research"] .sn-workspace {
    grid-area: main;
  }
}

@media (max-width: 767px) {
  body[data-studio-next] .sn-task-rail {
    display: block;
    padding: 0;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--sn-chrome-line);
  }

  body[data-studio-next] .sn-task-rail .sn-rail-heading,
  body[data-studio-next] .sn-task-rail .sn-rail-note,
  body[data-studio-next] .sn-task-rail .sn-rail-index {
    display: none;
  }

  body[data-studio-next] .sn-task-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0;
  }

  body[data-studio-next] .sn-task-button {
    grid-template-columns: minmax(0, 1fr);
    min-height: 58px;
    padding: 6px 7px;
    border-width: 0 1px 0 0;
    border-radius: 0;
    text-align: center;
  }

  body[data-studio-next] .sn-task-button:last-child {
    border-right: 0;
  }

  body[data-studio-next] .sn-task-number {
    display: none;
  }

  body[data-studio-next] .sn-task-button strong {
    font-size: 11px;
  }

  body[data-studio-next] .sn-task-button small {
    font-size: 9px;
  }

  body[data-studio-next] .sn-shell[data-active-task="research"] {
    padding-bottom: 0;
  }

  body[data-studio-next] .sn-shell[data-active-task="research"] .sn-body {
    display: block;
  }

  body[data-studio-next] .sn-shell[data-active-task="research"] .sn-workspace {
    padding: 8px;
  }

  body[data-studio-next] .sn-shell[data-active-task="research"] .sn-mobile-steps {
    display: none;
  }

  body[data-studio-next] .sn-research-workspace {
    min-height: 0;
    overflow: visible;
  }

  body[data-studio-next] .sn-research-head {
    min-height: 52px;
    padding: 8px 10px;
  }

  body[data-studio-next] .sn-research-head h2 {
    font-size: 17px;
  }

  body[data-studio-next] .sn-research-head p {
    max-width: 150px;
    font-size: 9px;
  }

  body[data-studio-next] .sn-research-layout {
    grid-template-columns: 1fr;
  }

  body[data-studio-next] .sn-research-controls {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    border-right: 0;
    border-bottom: 1px solid var(--sn-line);
  }

  body[data-studio-next] .sn-research-control-intro {
    grid-column: 1 / -1;
    min-height: 44px;
    padding: 7px 10px;
  }

  body[data-studio-next] .sn-research-file-control {
    grid-column: 1 / -1;
    min-height: 50px;
    padding: 6px 10px;
  }

  body[data-studio-next] .sn-research-field {
    padding: 6px 8px;
  }

  body[data-studio-next] .sn-research-field select {
    min-height: 44px;
    font-size: 11px;
  }

  body[data-studio-next] .sn-research-field:nth-of-type(4) {
    grid-column: 1 / 2;
  }

  body[data-studio-next] .sn-research-actions {
    grid-column: 2 / 3;
    grid-row: 4 / 5;
    justify-content: center;
    min-height: 0;
    padding: 6px 8px;
  }

  body[data-studio-next] .sn-research-actions small {
    display: none;
  }

  body[data-studio-next] .sn-research-chart-pane > header {
    min-height: 48px;
    padding: 7px 9px;
  }

  body[data-studio-next] .sn-research-chart-pane h3 {
    font-size: 13px;
  }

  body[data-studio-next] [data-research-chart-status] {
    max-width: 52%;
    font-size: 9px;
  }

  body[data-studio-next] .sn-research-chart-canvas {
    height: 286px;
    min-height: 286px;
    padding: 4px;
  }
}

/* Local engineering graph workbench */
body[data-studio-next] .sn-shell[data-active-task="engineering"] .sn-body {
  grid-template-columns: 240px minmax(0, 1fr);
}

body[data-studio-next] .sn-shell[data-active-task="engineering"] .sn-workspace {
  padding: 14px;
  overflow: hidden;
}

body[data-studio-next] .sn-shell[data-active-task="engineering"] .sn-result-rail {
  display: none !important;
}

body[data-studio-next] .sn-engineering-workspace[hidden] {
  display: none !important;
}

body[data-studio-next] .sn-engineering-workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: calc(100vh - 96px);
  overflow: hidden;
  border: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-engineering-head {
  display: flex;
  min-width: 0;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-engineering-head h2,
body[data-studio-next] .sn-engineering-toolbar h3,
body[data-studio-next] .sn-engineering-inspector-pane h3 {
  margin: 3px 0 0;
  letter-spacing: 0;
}

body[data-studio-next] .sn-engineering-head h2 {
  font-size: 20px;
}

body[data-studio-next] .sn-engineering-counts {
  display: grid;
  grid-template-columns: repeat(2, 62px);
  flex: 0 0 auto;
  border: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-engineering-counts > div {
  display: grid;
  min-height: 42px;
  place-content: center;
  border-right: 1px solid var(--sn-line);
  text-align: center;
}

body[data-studio-next] .sn-engineering-counts > div:last-child {
  border-right: 0;
}

body[data-studio-next] .sn-engineering-counts dt {
  color: var(--sn-muted);
  font-size: 8px;
  font-weight: 800;
}

body[data-studio-next] .sn-engineering-counts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

body[data-studio-next] .sn-engineering-boundary {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  gap: 0;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--sn-line);
  background: #f4f6f3;
}

body[data-studio-next] .sn-engineering-boundary strong,
body[data-studio-next] .sn-engineering-boundary span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--sn-line);
  font-size: 9px;
  white-space: nowrap;
}

body[data-studio-next] .sn-engineering-boundary strong {
  color: #07563f;
  background: var(--sn-emerald-soft);
}

body[data-studio-next] .sn-engineering-boundary .sn-engineering-import-control {
  display: flex;
  min-width: 190px;
  flex: 1 1 260px;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 9px 0 0;
  border-right: 0;
  overflow: hidden;
}

body[data-studio-next] .sn-engineering-import-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

body[data-studio-next] .sn-engineering-import-control label {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--sn-cobalt);
  color: var(--sn-cobalt);
  background: var(--sn-paper);
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
}

body[data-studio-next] .sn-engineering-import-control:focus-within label {
  outline: 2px solid var(--sn-cobalt);
  outline-offset: 2px;
}

body[data-studio-next] .sn-engineering-import-control output {
  min-width: 0;
  max-width: 210px;
  overflow: hidden;
  color: var(--sn-muted);
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-engineering-import-control output[data-status="success"] {
  color: #07563f;
}

body[data-studio-next] .sn-engineering-import-control output[data-status="error"] {
  color: #9f2d20;
}

body[data-studio-next] .sn-engineering-mobile-tabs {
  display: none;
}

body[data-studio-next] .sn-engineering-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  min-width: 0;
  min-height: 0;
}

body[data-studio-next] .sn-engineering-graph-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--sn-line-strong);
  background: #f8faf8;
}

body[data-studio-next] .sn-engineering-toolbar {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) auto auto auto;
  min-width: 0;
  min-height: 82px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-engineering-toolbar h3 {
  font-size: 15px;
}

body[data-studio-next] .sn-engineering-layout-control {
  min-width: 0;
  padding: 0;
  border: 0;
}

body[data-studio-next] .sn-engineering-layout-control legend,
body[data-studio-next] .sn-engineering-export-control output {
  color: var(--sn-muted);
  font-size: 8px;
  font-weight: 800;
}

body[data-studio-next] .sn-engineering-layout-control > div,
body[data-studio-next] .sn-engineering-viewport-control {
  display: flex;
  min-width: 0;
  border: 1px solid var(--sn-line-strong);
}

body[data-studio-next] .sn-engineering-layout-control button,
body[data-studio-next] .sn-engineering-viewport-control button,
body[data-studio-next] .sn-engineering-viewport-control output {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 10px;
  border: 0;
  border-right: 1px solid var(--sn-line);
  background: #f4f6f3;
  font-size: 10px;
  font-weight: 800;
}

body[data-studio-next] .sn-engineering-layout-control button:last-child,
body[data-studio-next] .sn-engineering-viewport-control button:last-child {
  border-right: 0;
}

body[data-studio-next] .sn-engineering-layout-control button[aria-pressed="true"] {
  color: #ffffff;
  background: var(--sn-cobalt);
}

body[data-studio-next] .sn-engineering-viewport-control output {
  min-width: 52px;
  color: var(--sn-muted);
  font-size: 9px;
}

body[data-studio-next] .sn-engineering-export-control {
  display: grid;
  gap: 3px;
}

body[data-studio-next] .sn-engineering-export-control button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--sn-ink);
  color: #ffffff;
  background: var(--sn-ink);
  font-size: 10px;
  font-weight: 800;
}

body[data-studio-next] .sn-engineering-export-control output {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-engineering-node-picker {
  display: none;
}

body[data-studio-next] .sn-engineering-canvas-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background-color: #f8faf8;
  background-image:
    linear-gradient(#e7ebe7 1px, transparent 1px),
    linear-gradient(90deg, #e7ebe7 1px, transparent 1px);
  background-size: 24px 24px;
}

body[data-studio-next] .sn-engineering-canvas {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  touch-action: none;
}

body[data-studio-next] .sn-engineering-footer {
  display: grid;
  grid-template-columns: 170px 154px minmax(0, 1fr);
  min-height: 48px;
  border-top: 1px solid var(--sn-line);
  background: #f1f3f0;
}

body[data-studio-next] .sn-engineering-footer > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 0 12px;
  border-right: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-engineering-footer small {
  color: var(--sn-muted);
  font-size: 7px;
  font-weight: 800;
}

body[data-studio-next] .sn-engineering-footer strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-engineering-footer > span {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
  overflow: hidden;
  color: var(--sn-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-studio-next] .sn-engineering-inspector-pane {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  background: #f8f9f7;
}

body[data-studio-next] .sn-engineering-inspector-pane > header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-engineering-inspector-pane h3 {
  font-size: 17px;
}

body[data-studio-next] [data-engineering-selection-status] {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid var(--sn-line-strong);
  color: var(--sn-muted);
  background: #eef0ed;
  font-size: 9px;
  font-weight: 900;
}

body[data-studio-next] [data-engineering-selection-status][data-status="ready"] {
  border-color: var(--sn-emerald);
  color: #07563f;
  background: var(--sn-emerald-soft);
}

body[data-studio-next] [data-engineering-selection-status][data-status="local"] {
  border-color: var(--sn-cobalt);
  color: #173788;
  background: var(--sn-cobalt-soft);
}

body[data-studio-next] [data-engineering-selection-status][data-status="gate"] {
  border-color: #b7791f;
  color: #6b4700;
  background: #fff3d6;
}

body[data-studio-next] .sn-engineering-inspector-summary,
body[data-studio-next] .sn-engineering-detail-note {
  padding: 13px 14px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-engineering-inspector-summary small,
body[data-studio-next] .sn-engineering-detail-note small {
  color: var(--sn-cobalt);
  font-size: 8px;
  font-weight: 900;
}

body[data-studio-next] .sn-engineering-inspector-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.55;
}

body[data-studio-next] .sn-engineering-detail-list > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-engineering-detail-list dt {
  color: var(--sn-muted);
  font-size: 9px;
  font-weight: 800;
}

body[data-studio-next] .sn-engineering-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 10px;
  font-weight: 700;
}

body[data-studio-next] .sn-engineering-detail-note p,
body[data-studio-next] .sn-engineering-inspector-boundary {
  margin: 5px 0 0;
  color: var(--sn-ink-soft);
  font-size: 10px;
  line-height: 1.6;
}

body[data-studio-next] .sn-engineering-inspector-boundary {
  margin: 0;
  padding: 13px 14px;
  border-left: 3px solid var(--sn-coral);
  background: var(--sn-coral-soft);
}

@media (max-width: 1199px) and (min-width: 768px) {
  body[data-studio-next] .sn-task-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body[data-studio-next] .sn-shell[data-active-task="engineering"] .sn-body {
    grid-template-areas:
      "task"
      "main";
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(calc(100vh - 154px), auto);
  }

  body[data-studio-next] .sn-shell[data-active-task="engineering"] .sn-workspace {
    grid-area: main;
  }

  body[data-studio-next] .sn-engineering-layout {
    grid-template-columns: minmax(0, 1fr) 286px;
  }

  body[data-studio-next] .sn-engineering-toolbar {
    grid-template-columns: minmax(120px, 1fr) auto auto;
  }

  body[data-studio-next] .sn-engineering-export-control {
    display: none;
  }
}

@media (max-width: 767px) {
  body[data-studio-next] .sn-task-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body[data-studio-next] .sn-task-button {
    padding-inline: 3px;
  }

  body[data-studio-next] .sn-task-button strong {
    font-size: 10px;
  }

  body[data-studio-next] .sn-task-button small {
    font-size: 8px;
  }

  body[data-studio-next] .sn-shell[data-active-task="engineering"] {
    padding-bottom: 0;
  }

  body[data-studio-next] .sn-shell[data-active-task="engineering"] .sn-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100dvh - var(--sn-mobile-chrome-height));
    min-height: 0;
  }

  body[data-studio-next] .sn-shell[data-active-task="engineering"] .sn-workspace {
    height: auto;
    min-height: 0;
    padding: 6px;
    overflow: hidden;
  }

  body[data-studio-next] .sn-shell[data-active-task="engineering"] .sn-mobile-steps {
    display: none;
  }

  body[data-studio-next] .sn-engineering-workspace {
    grid-template-rows: auto auto auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  body[data-studio-next] .sn-engineering-head {
    min-height: 50px;
    padding: 6px 8px;
  }

  body[data-studio-next] .sn-engineering-head h2 {
    font-size: 15px;
  }

  body[data-studio-next] .sn-engineering-counts {
    grid-template-columns: repeat(2, 48px);
  }

  body[data-studio-next] .sn-engineering-counts > div {
    min-height: 38px;
  }

  body[data-studio-next] .sn-engineering-boundary {
    min-height: 34px;
  }

  body[data-studio-next] .sn-engineering-boundary strong,
  body[data-studio-next] .sn-engineering-boundary span {
    min-height: 34px;
    padding: 0 7px;
    font-size: 8px;
  }

  body[data-studio-next] .sn-engineering-boundary .sn-engineering-import-control {
    min-width: 138px;
    flex: 1 1 138px;
    gap: 5px;
    padding-right: 5px;
  }

  body[data-studio-next] .sn-engineering-boundary [data-engineering-document-boundary] {
    display: none;
  }

  body[data-studio-next] .sn-engineering-import-control label {
    min-width: 44px;
    min-height: 44px;
    padding: 0 7px;
    font-size: 8px;
  }

  body[data-studio-next] .sn-engineering-import-control output {
    max-width: 90px;
    font-size: 7px;
    line-height: 1.2;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  body[data-studio-next] .sn-engineering-mobile-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 44px;
    border-bottom: 1px solid var(--sn-line-strong);
  }

  body[data-studio-next] .sn-engineering-mobile-tabs button {
    min-height: 44px;
    border: 0;
    border-right: 1px solid var(--sn-line);
    color: var(--sn-muted);
    background: var(--sn-paper);
    font-size: 11px;
    font-weight: 800;
  }

  body[data-studio-next] .sn-engineering-mobile-tabs button:last-child {
    border-right: 0;
  }

  body[data-studio-next] .sn-engineering-mobile-tabs button[aria-pressed="true"] {
    color: var(--sn-cobalt);
    background: var(--sn-cobalt-soft);
    box-shadow: inset 0 -3px 0 var(--sn-cobalt);
  }

  body[data-studio-next] .sn-engineering-layout {
    display: block;
    height: 100%;
    overflow: hidden;
  }

  body[data-studio-next] .sn-engineering-graph-pane,
  body[data-studio-next] .sn-engineering-inspector-pane {
    width: 100%;
    height: 100%;
    border-right: 0;
  }

  body[data-studio-next] .sn-engineering-workspace[data-engineering-mobile-view="graph"] .sn-engineering-inspector-pane,
  body[data-studio-next] .sn-engineering-workspace[data-engineering-mobile-view="inspector"] .sn-engineering-graph-pane {
    display: none;
  }

  body[data-studio-next] .sn-engineering-graph-pane {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }

  body[data-studio-next] .sn-engineering-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 94px;
    gap: 5px 7px;
    padding: 6px 7px;
  }

  body[data-studio-next] .sn-engineering-title-block {
    display: none;
  }

  body[data-studio-next] .sn-engineering-layout-control {
    grid-column: 1 / 2;
  }

  body[data-studio-next] .sn-engineering-viewport-control {
    grid-column: 2 / 3;
  }

  body[data-studio-next] .sn-engineering-layout-control button,
  body[data-studio-next] .sn-engineering-viewport-control button,
  body[data-studio-next] .sn-engineering-viewport-control output {
    min-width: 40px;
    min-height: 44px;
    padding: 0 6px;
    font-size: 9px;
  }

  body[data-studio-next] .sn-engineering-viewport-control output {
    display: none;
  }

  body[data-studio-next] .sn-engineering-export-control {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  body[data-studio-next] .sn-engineering-export-control output {
    max-width: none;
  }

  body[data-studio-next] .sn-engineering-node-picker {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 46px;
    align-items: center;
    gap: 8px;
    padding: 0 7px;
    border-bottom: 1px solid var(--sn-line);
    background: #f4f6f3;
  }

  body[data-studio-next] .sn-engineering-node-picker span {
    color: var(--sn-muted);
    font-size: 9px;
    font-weight: 800;
  }

  body[data-studio-next] .sn-engineering-node-picker select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid var(--sn-line-strong);
    background: var(--sn-paper);
    font-size: 10px;
  }

  body[data-studio-next] .sn-engineering-footer {
    grid-template-columns: 1fr 1fr;
    min-height: 44px;
  }

  body[data-studio-next] .sn-engineering-footer > span {
    display: none;
  }

  body[data-studio-next] .sn-engineering-inspector-pane {
    overflow-y: auto;
  }

  body[data-studio-next] .sn-engineering-inspector-pane > header {
    min-height: 72px;
    padding: 9px 11px;
  }

  body[data-studio-next] .sn-engineering-inspector-pane h3 {
    font-size: 16px;
  }

  body[data-studio-next] .sn-engineering-inspector-summary,
  body[data-studio-next] .sn-engineering-detail-note,
  body[data-studio-next] .sn-engineering-inspector-boundary {
    padding-right: 11px;
    padding-left: 11px;
  }

  body[data-studio-next] .sn-engineering-detail-list > div {
    grid-template-columns: 68px minmax(0, 1fr);
    padding: 9px 11px;
  }
}

/* Keep all six local tools readable and fully contained on narrow screens. */
@media (max-width: 767px) {
  body[data-studio-next] .sn-task-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-inline: 8px;
  }

  body[data-studio-next] .sn-task-button {
    min-height: 44px;
    padding-inline: 1px;
  }

  body[data-studio-next] .sn-task-button strong {
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
  }

  body[data-studio-next] .sn-task-button small {
    display: none;
  }

  body[data-studio-next] .sn-shell[data-active-task="results"] .sn-result-inspect {
    height: 144px;
  }
}

/* Professional creation entry launcher; execution remains in Classic. */
body[data-studio-next] .sn-creation-launcher {
  min-width: 0;
  border-bottom: 1px solid var(--sn-line-strong);
  background: #f8faf8;
}

body[data-studio-next] .sn-creation-launcher-head {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--sn-line);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-creation-launcher-head h3 {
  margin: 2px 0 0;
  font-size: 15px;
  line-height: 1.25;
}

body[data-studio-next] .sn-creation-launcher-head > p {
  color: var(--sn-muted);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

body[data-studio-next] .sn-creation-launcher-boundary {
  padding: 8px 16px;
  border-bottom: 1px solid var(--sn-line);
  color: #304e46;
  background: #eaf3ef;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

body[data-studio-next] .sn-creation-launcher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  min-width: 0;
}

body[data-studio-next] .sn-creation-task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  align-content: start;
}

body[data-studio-next] .sn-creation-group {
  min-width: 0;
  border-right: 1px solid var(--sn-line);
  border-bottom: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-creation-group > header {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 9px;
  color: var(--sn-ink-soft);
  background: #eef1ed;
}

body[data-studio-next] .sn-creation-group > header strong {
  font-size: 10px;
}

body[data-studio-next] .sn-creation-group > header small {
  color: var(--sn-muted);
  font-size: 8px;
}

body[data-studio-next] .sn-creation-group-tasks {
  display: grid;
  min-width: 0;
}

body[data-studio-next] .sn-creation-task {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto auto;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  align-content: center;
  column-gap: 8px;
  padding: 6px 9px;
  border: 0;
  border-top: 1px solid var(--sn-line);
  border-radius: 0;
  color: var(--sn-ink);
  background: var(--sn-paper);
  text-align: left;
  cursor: pointer;
}

body[data-studio-next] .sn-creation-group-tasks .sn-creation-task:first-child {
  border-top: 0;
}

body[data-studio-next] .sn-creation-task > span {
  display: grid;
  grid-row: 1 / 3;
  width: 36px;
  min-width: 0;
  min-height: 30px;
  place-items: center;
  align-self: center;
  border: 1px solid var(--sn-line-strong);
  color: var(--sn-cobalt);
  font-size: 8px;
  font-weight: 900;
}

body[data-studio-next] .sn-creation-task > strong,
body[data-studio-next] .sn-creation-task > small {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

body[data-studio-next] .sn-creation-task > strong {
  font-size: 10px;
  line-height: 1.25;
}

body[data-studio-next] .sn-creation-task > small {
  color: var(--sn-muted);
  font-size: 8px;
  line-height: 1.25;
}

body[data-studio-next] .sn-creation-task:hover,
body[data-studio-next] .sn-creation-task[aria-pressed="true"] {
  color: #173f87;
  background: var(--sn-cobalt-soft);
}

body[data-studio-next] .sn-creation-task[aria-pressed="true"] {
  box-shadow: inset 3px 0 0 var(--sn-cobalt);
}

body[data-studio-next] .sn-creation-task[aria-pressed="true"] > span {
  border-color: var(--sn-cobalt);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-creation-selection {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border-left: 1px solid var(--sn-line-strong);
  background: var(--sn-paper);
}

body[data-studio-next] .sn-creation-selection > span,
body[data-studio-next] .sn-creation-selection small {
  color: var(--sn-muted);
  font-size: 8px;
  font-weight: 800;
}

body[data-studio-next] .sn-creation-selection > strong {
  font-size: 14px;
  line-height: 1.25;
}

body[data-studio-next] .sn-creation-selection p {
  color: var(--sn-ink-soft);
  font-size: 9px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

body[data-studio-next] .sn-creation-selection > div {
  display: grid;
  gap: 3px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--sn-line);
}

body[data-studio-next] .sn-creation-selection > a {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #163e7e;
  color: #ffffff;
  background: #163e7e;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 1199px) {
  body[data-studio-next] .sn-creation-launcher-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-studio-next] .sn-creation-selection {
    border-top: 1px solid var(--sn-line-strong);
    border-left: 0;
  }
}

@media (max-width: 767px) {
  body[data-studio-next] .sn-creation-launcher,
  body[data-studio-next] .sn-creation-launcher-layout,
  body[data-studio-next] .sn-creation-task-list,
  body[data-studio-next] .sn-creation-group,
  body[data-studio-next] .sn-creation-selection {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body[data-studio-next] .sn-creation-launcher-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
  }

  body[data-studio-next] .sn-creation-launcher-head > p {
    text-align: left;
  }

  body[data-studio-next] .sn-creation-launcher-boundary {
    padding: 8px 12px;
  }

  body[data-studio-next] .sn-creation-task-list {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-studio-next] .sn-creation-group {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    border-right: 0;
    border-bottom: 0;
    box-shadow: inset 0 -1px 0 var(--sn-line);
  }

  body[data-studio-next] .sn-creation-group > header {
    min-height: 100%;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
  }

  body[data-studio-next] .sn-creation-group-tasks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(44px, auto);
  }

  body[data-studio-next] .sn-creation-task {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 44px;
    height: 100%;
    column-gap: 6px;
    padding: 5px 6px;
    border-top: 0;
    border-left: 1px solid var(--sn-line);
  }

  body[data-studio-next] .sn-creation-group-tasks .sn-creation-task:nth-child(n + 3) {
    border-top: 1px solid var(--sn-line);
  }

  body[data-studio-next] .sn-creation-group-tasks .sn-creation-task:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  body[data-studio-next] .sn-creation-task > span {
    width: 28px;
    min-height: 28px;
  }

  body[data-studio-next] .sn-creation-task > strong {
    font-size: 11px;
  }

  body[data-studio-next] .sn-creation-task > small {
    font-size: 9px;
  }

  body[data-studio-next] .sn-creation-selection {
    margin-top: 132px;
    padding: 12px;
  }
}

@media (max-width: 767px) and (max-height: 798px) {
  body[data-studio-next] .sn-creation-task-list {
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 767px) and (max-height: 710px) {
  body[data-studio-next] .sn-creation-task-list {
    max-height: 176px;
  }
}

@media (max-width: 767px) and (max-height: 666px) {
  body[data-studio-next] .sn-creation-task-list {
    max-height: 132px;
  }
}

@media (max-width: 767px) and (max-height: 622px) {
  body[data-studio-next] .sn-creation-task-list {
    max-height: 88px;
  }
}

@media (max-width: 767px) and (max-height: 578px) {
  body[data-studio-next] .sn-creation-task-list {
    max-height: 44px;
  }
}
