/* Keep the work visible and put each action next to the content it changes. */
.simple-workspace.creator-studio .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.simple-workspace.creator-studio .studio-nav button:first-child {
  background: transparent;
  color: var(--ink-soft);
}
.simple-workspace.creator-studio .studio-nav button[aria-current="page"] {
  background: var(--soft);
  color: var(--ink);
}
.simple-workspace.creator-studio .conversation-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  margin: 0 2px 14px;
  min-height: 42px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--canvas);
  color: var(--ink-soft);
}
.conversation-search > span {
  font-size: 22px;
}
.simple-workspace.creator-studio .conversation-search input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 13px;
  box-shadow: none;
}
.conversation-search input::-webkit-search-cancel-button {
  display: none;
}
.simple-workspace.creator-studio .conversation-search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.simple-workspace.creator-studio .conversation-search input:focus-visible {
  outline: none;
}
.conversation-search button {
  background: transparent;
  color: var(--ink-soft);
  border: 0;
  font-size: 20px;
  width: 30px;
  height: 36px;
  flex-shrink: 0;
}
.search-status {
  color: var(--ink-soft);
  font-size: 12px;
  margin: -2px 8px 10px;
}
.sidebar-shortcuts,
.creator-menu-backdrop {
  display: none;
}

/* Keep the desktop columns intact when older editor styles switch to a drawer. */
@media (min-width: 761px) {
  body.simple-workspace.creator-studio .sidebar {
    position: static;
    width: auto;
    height: 100%;
    grid-column: 1;
    box-shadow: none;
  }
  body.simple-workspace.creator-studio .main-content {
    grid-column: 2;
  }
  .simple-workspace.creator-studio .creator-menu-toggle {
    display: none;
  }
}

.simple-workspace.creator-studio .studio-project-header {
  padding-bottom: 15px;
}
.simple-workspace.creator-studio .studio-project-header .studio-kicker {
  font-size: 11px;
  margin-bottom: 7px;
}
.simple-workspace.creator-studio .studio-project-header .session-status {
  font-size: 12px;
}
.creator-journey {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 0 22px;
  margin: 0;
  list-style: none;
  color: var(--ink-soft);
}
.creator-journey li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}
.creator-journey li + li::before {
  content: "—";
  color: var(--branch);
  margin-right: 13px;
}
.creator-journey li > span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 11px;
}
.creator-journey .is-current {
  color: var(--ink);
}
.creator-journey .is-current > span {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--ui-accent-soft);
}
.creator-journey .is-done > span {
  border-color: transparent;
  color: var(--accent);
}
.simple-workspace.creator-studio .studio-chat {
  height: calc(100dvh - 210px);
  min-height: 560px;
}
.simple-workspace.creator-studio .chat-heading h2 {
  font-size: 14px;
}
.simple-workspace.creator-studio .chat-heading p {
  font-size: 11px;
  line-height: 1.5;
}
.simple-workspace.creator-studio .studio-chat .message.teacher {
  padding: 10px 0 10px 18px;
}
.simple-workspace.creator-studio .studio-output {
  gap: 18px;
}
.studio-blueprint {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  min-width: 0;
}
.blueprint-heading,
.studio-flow > header,
.product-flow > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.blueprint-heading .studio-kicker {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
}
.blueprint-heading h2 {
  margin: 7px 0 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}
.simple-workspace.creator-studio .blueprint-heading .text-button {
  flex-shrink: 0;
  font-size: 12px;
  min-height: 38px;
  padding: 6px 0 6px 10px;
}
.blueprint-summary {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin: 16px 0 0;
  overflow-wrap: anywhere;
}
.blueprint-io {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.blueprint-io h3,
.blueprint-pending h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink-soft);
}
.blueprint-io ul,
.blueprint-pending ul {
  margin: 0;
  padding-left: 16px;
}
.blueprint-io li,
.blueprint-pending li {
  font-size: 12px;
  line-height: 1.8;
  margin: 3px 0;
  overflow-wrap: anywhere;
}
.blueprint-more {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  margin-top: 8px;
}
.studio-flow {
  margin-top: 19px;
}
.studio-flow > header,
.product-flow > header {
  margin-bottom: 12px;
}
.studio-flow h3,
.product-flow h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}
.studio-flow > header > span,
.product-flow > header > span {
  color: var(--ink-soft);
  font-size: 11px;
}
.blueprint-pending {
  padding: 16px;
  border-radius: 8px;
  background: var(--soft);
  margin-top: 18px;
}
.blueprint-pending h3 {
  color: var(--ink);
}
.flow-step-preview {
  margin: 0;
  padding-left: 24px;
  font-size: 13px;
  line-height: 1.85;
}
.flow-step-preview li {
  padding: 6px 0 6px 5px;
}
.flow-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed var(--branch);
  border-radius: 10px;
}
.flow-empty > span {
  color: var(--accent);
  font-size: 26px;
  letter-spacing: 9px;
}
.flow-empty p {
  font-size: 14px;
  margin: 16px 0 8px;
}
.flow-empty small,
.flow-empty-caption {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
}
.flow-empty-caption {
  margin-bottom: 0;
}
.simple-workspace.creator-studio .launch-message strong {
  font-size: 14px;
  line-height: 1.65;
}
.simple-workspace.creator-studio .launch-controls {
  align-items: stretch;
}
.coze-flow-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 0;
  padding: 0;
  margin: 16px 0 0;
  min-width: 0;
}
.coze-flow-picker legend {
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--ink-soft);
}
.coze-flow-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 145px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.coze-flow-picker label:has(input:checked) {
  background: var(--soft);
  border-color: var(--ink-soft);
}
.coze-flow-picker span {
  display: grid;
  gap: 4px;
}
.coze-flow-picker strong {
  font-size: 12px;
  font-weight: 600;
}
.coze-flow-picker small {
  font-size: 11px;
  color: var(--ink-soft);
}
.simple-workspace.creator-studio .platform-picker button {
  padding: 7px;
  min-height: 50px;
  gap: 8px;
}
.platform-picker button > span {
  display: grid;
  gap: 4px;
  text-align: left;
}
.platform-picker button strong {
  font-size: 11px;
  font-weight: 600;
}
.platform-picker button small {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
}
.simple-workspace.creator-studio .start-production {
  font-size: 13px;
  min-height: 50px;
  padding: 0 16px;
}
.launch-error {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 0;
}
.launch-error .text-button {
  font-size: 12px;
  margin-left: 7px;
}
.mobile-next-step {
  display: none;
}
.pane-ready-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
}

.library-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  padding: 5px 0 30px;
}
.library-heading h1 {
  font-size: 28px;
  line-height: 1.6;
  margin: 8px 0;
}
.library-heading p:not(.studio-kicker) {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
  margin: 0;
}
.simple-workspace.creator-studio .library-heading .button {
  flex-shrink: 0;
  font-size: 13px;
}
.studio-library {
  max-width: 1320px;
  margin: 0 auto;
}
.studio-library .studio-section-title .studio-kicker {
  display: none;
}
.studio-library .studio-section-title h2 {
  font-size: 16px;
}

.simple-workspace.creator-studio #productDialog {
  width: min(1180px, calc(100vw - 48px));
  max-width: 1180px;
}
.simple-workspace.creator-studio .dialog-close {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.product-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 26px;
  align-items: start;
}
.simple-workspace.creator-studio .product-trial-jump {
  display: none;
}
.product-overview {
  min-width: 0;
}
.product-ready-badge {
  display: inline-flex;
  gap: 6px;
  font-size: 12px;
  color: var(--accent);
  background: var(--ui-accent-soft);
  border-radius: 5px;
  padding: 6px 9px;
}
.product-overview > p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-soft);
  margin: 14px 0 22px;
}
.product-flow {
  margin: 18px 0;
}
.simple-workspace.creator-studio .product-overview .friendly-files {
  margin-top: 24px;
}
.product-overview .friendly-files h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
}
.simple-workspace.creator-studio .product-overview .friendly-files > div {
  font-size: 13px;
}
.simple-workspace.creator-studio .product-overview .product-setup p {
  font-size: 12px;
}
.simple-workspace.creator-studio .product-workspace .product-trial {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: min(640px, calc(100dvh - 240px));
  min-height: 440px;
  margin: 0;
  padding: 22px;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background: var(--canvas);
  overflow: hidden;
}
.simple-workspace.creator-studio .product-workspace .product-trial h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.simple-workspace.creator-studio .product-trial .quiet-caption {
  margin: 0 0 14px;
  font-size: 12px;
}
.simple-workspace.creator-studio .product-trial-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.simple-workspace.creator-studio .product-workspace .product-trial-heading h3 {
  margin: 0;
}
.simple-workspace.creator-studio .product-trial-heading [data-clear-trial] {
  flex-shrink: 0;
  min-height: 40px;
  white-space: nowrap;
}
.product-trial-messages {
  flex: 1;
  min-height: 90px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 2px 10px;
}
.simple-workspace.creator-studio .product-trial .product-message {
  padding: 14px;
  margin-bottom: 12px;
}
.simple-workspace.creator-studio .product-trial .product-message > div {
  font-size: 13px;
  line-height: 1.8;
}
.simple-workspace.creator-studio .product-trial .product-message > span {
  font-size: 11px;
}
.trial-empty {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 10px;
}
.trial-empty > span {
  font-size: 31px;
  color: var(--accent);
}
.trial-empty h4 {
  font-size: 14px;
  font-weight: 500;
  margin: 15px 0 8px;
}
.trial-empty p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
  color: var(--ink-soft);
}
.simple-workspace.creator-studio #testChatForm {
  padding-top: 12px;
  margin: 0;
  border-top: 1px solid var(--line);
}
.simple-workspace.creator-studio #testChatForm textarea {
  min-height: 72px;
  max-height: 170px;
  font-size: 14px;
}
.simple-workspace.creator-studio #testChatForm .button {
  font-size: 13px;
  min-height: 42px;
}
.simple-workspace.creator-studio .product-feedback-composer {
  margin-top: 28px;
  background: transparent;
}
.simple-workspace.creator-studio .product-feedback-composer > label {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 7px;
}
.product-feedback-composer .quiet-caption {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
  margin: 0 0 14px;
}
.simple-workspace.creator-studio
  .product-feedback-composer
  .product-composer-actions {
  font-size: 12px;
}

.simple-workspace.creator-studio .diagram-wrap {
  position: relative;
  border-color: var(--line);
  background: var(--canvas);
}
.simple-workspace.creator-studio .diagram-wrap:not(.is-interactive) {
  min-height: 260px;
}
.simple-workspace.creator-studio
  .diagram-wrap
  .mermaid:not([data-diagram-ready="true"]) {
  visibility: hidden;
}
.diagram-loading {
  position: absolute;
  inset: 44px 0 0;
  margin: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  color: var(--ink-soft);
  font-size: 13px;
  pointer-events: none;
  background: var(--canvas);
}
.simple-workspace.creator-studio .diagram-toolbar {
  min-height: 48px;
  background: var(--paper);
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
}
.simple-workspace.creator-studio .diagram-toolbar-label {
  display: none;
}
.simple-workspace.creator-studio .diagram-toolbar-actions {
  width: 100%;
  gap: 5px;
}
.simple-workspace.creator-studio .diagram-tool {
  min-width: 31px;
  width: 31px;
  height: 32px;
  border-color: var(--line);
  background: var(--soft);
  color: var(--ink);
}
.simple-workspace.creator-studio .diagram-tool[data-diagram-action="fit"],
.simple-workspace.creator-studio
  .diagram-tool[data-diagram-action="fullscreen"] {
  width: auto;
  padding: 0 9px;
  font-size: 11px;
  white-space: nowrap;
}
.simple-workspace.creator-studio .diagram-tool[data-diagram-action="fit"] {
  margin-left: auto;
}
.simple-workspace.creator-studio .diagram-zoom {
  min-width: 32px;
  font-size: 11px;
}
.simple-workspace.creator-studio .studio-flow-canvas .diagram-viewport,
.simple-workspace.creator-studio .product-flow .diagram-viewport {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  height: 340px;
  min-height: 280px;
}
.simple-workspace.creator-studio .diagram-stage {
  flex-shrink: 0;
  margin: auto;
}
.simple-workspace.creator-studio .diagram-load-retry {
  margin: 20px;
  font-size: 13px;
}
.simple-workspace.creator-studio .diagram-dialog {
  width: calc(100vw - 40px);
  max-width: 1440px;
  max-height: calc(100dvh - 32px);
}
.simple-workspace.creator-studio .diagram-dialog > header {
  padding: 16px 22px;
}
.diagram-dialog > header h2 {
  margin: 0;
}
.diagram-dialog > header p {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 6px 0 0;
}
.simple-workspace.creator-studio .diagram-dialog .studio-dialog-body {
  padding: 12px;
}
.simple-workspace.creator-studio .diagram-dialog .diagram-viewport {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  height: calc(100dvh - 200px);
  min-height: 240px;
}

@media (max-width: 1190px) and (min-width: 1021px) {
  .simple-workspace.creator-studio .studio-creation-grid {
    grid-template-columns: minmax(320px, 1.1fr) minmax(320px, 1fr);
    gap: 18px;
  }
  .studio-blueprint {
    padding: 18px;
  }
  .blueprint-heading {
    align-items: flex-start;
  }
  .blueprint-heading h2 {
    font-size: 15px;
  }
  .simple-workspace.creator-studio .launch-controls {
    flex-direction: column;
  }
  .simple-workspace.creator-studio .start-production {
    justify-content: center;
  }
}
@media (max-width: 1020px) {
  .simple-workspace.creator-studio .studio-creation-grid {
    display: block;
  }
  .simple-workspace.creator-studio .studio-project .workbench-tabs {
    display: flex;
    gap: 6px;
    padding: 5px;
    margin-bottom: 17px;
    background: var(--soft);
    border-radius: 9px;
  }
  .simple-workspace.creator-studio .studio-project .workbench-tabs button {
    flex: 1;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 13px;
    color: var(--ink-soft);
    min-height: 42px;
  }
  .simple-workspace.creator-studio
    .studio-project
    .workbench-tabs
    button[aria-pressed="true"] {
    background: var(--paper);
    color: var(--ink);
  }
  .simple-workspace.creator-studio
    .studio-project[data-mobile-pane="conversation"]
    .studio-output {
    display: none;
  }
  .simple-workspace.creator-studio
    .studio-project[data-mobile-pane="plan"]
    .studio-chat {
    display: none;
  }
  .simple-workspace.creator-studio .studio-chat {
    height: calc(100dvh - 292px);
    min-height: 420px;
    margin: 0;
  }
  .mobile-next-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    background: var(--ui-accent-soft);
    font-size: 12px;
  }
  .mobile-next-step button {
    background: transparent;
    color: var(--accent);
    border: 0;
    min-height: 36px;
    font-size: 12px;
    font-weight: 600;
  }
  .product-workspace {
    gap: 18px;
  }
  .simple-workspace.creator-studio .product-workspace .product-trial {
    padding: 17px;
  }
}
@media (max-width: 760px) {
  .simple-workspace.creator-studio #productDialog > header {
    flex-wrap: wrap;
  }
  #productDialog > header > div {
    flex: 1;
    min-width: 0;
  }
  .simple-workspace.creator-studio #productDialog > header h2 {
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  .simple-workspace.creator-studio .product-trial-jump:not([hidden]) {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    min-height: 42px;
    padding: 0 10px;
  }
  .simple-workspace.creator-studio .creator-menu-toggle {
    width: 40px;
    height: 42px;
    flex-basis: 40px;
  }
  .simple-workspace.creator-studio.creator-menu-open .creator-menu-backdrop {
    display: block;
    position: fixed;
    top: 62px;
    bottom: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 29;
    border: 0;
    background: #0006;
  }
  .sidebar-shortcuts {
    display: flex;
    flex-shrink: 0;
    gap: 5px;
    padding-bottom: 16px;
  }
  .sidebar-shortcuts button {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 12px;
    min-height: 42px;
  }
  .sidebar-shortcuts button[aria-current="page"] {
    background: var(--soft);
    color: var(--ink);
  }
  .simple-workspace.creator-studio .conversation-search input {
    font-size: 16px;
  }
  .simple-workspace.creator-studio .studio-project-header h1 {
    font-size: 19px;
  }
  .simple-workspace.creator-studio .studio-project-header .header-actions {
    display: none;
  }
  .creator-journey {
    gap: 8px;
    justify-content: space-between;
    padding-bottom: 18px;
  }
  .creator-journey li {
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
    white-space: nowrap;
  }
  .creator-journey li + li::before {
    display: none;
  }
  .creator-journey li > span {
    width: 21px;
    height: 21px;
  }
  .simple-workspace.creator-studio .studio-chat {
    height: calc(100dvh - 291px);
    min-height: 410px;
  }
  .simple-workspace.creator-studio .studio-chat .conversation-scroll {
    padding: 18px 16px;
  }
  .studio-blueprint {
    padding: 18px 15px;
  }
  .blueprint-heading {
    gap: 9px;
  }
  .blueprint-heading h2 {
    font-size: 15px;
  }
  .simple-workspace.creator-studio .blueprint-heading .text-button {
    font-size: 12px;
    min-height: 44px;
  }
  .blueprint-summary {
    font-size: 14px;
  }
  .blueprint-io {
    gap: 15px;
  }
  .blueprint-io li {
    font-size: 12px;
  }
  .simple-workspace.creator-studio .studio-launch {
    padding: 17px 15px;
  }
  .simple-workspace.creator-studio .launch-controls {
    flex-direction: column;
    gap: 10px;
  }
  .simple-workspace.creator-studio .start-production {
    justify-content: center;
    min-height: 46px;
  }
  .simple-workspace.creator-studio .platform-picker button strong {
    font-size: 12px;
  }
  .simple-workspace.creator-studio .platform-picker button small {
    font-size: 11px;
  }
  .simple-workspace.creator-studio .platform-picker button {
    min-height: 48px;
  }
  .library-heading {
    display: block;
    padding: 0 0 25px;
  }
  .library-heading h1 {
    font-size: 23px;
  }
  .library-heading > .button {
    margin-top: 18px;
  }
  .simple-workspace.creator-studio #productDialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .simple-workspace.creator-studio .studio-dialog > header {
    padding: 16px;
    gap: 12px;
  }
  .simple-workspace.creator-studio .dialog-close {
    width: 44px;
    height: 44px;
  }
  .simple-workspace.creator-studio .studio-dialog-body {
    padding: 16px;
  }
  .product-workspace {
    display: flex;
    flex-direction: column;
    gap: 23px;
  }
  .product-overview {
    width: 100%;
  }
  .simple-workspace.creator-studio .product-workspace .product-trial {
    width: 100%;
    position: static;
    height: 540px;
    min-height: 430px;
    max-height: none;
    padding: 17px;
  }
  .simple-workspace.creator-studio #testChatForm textarea {
    font-size: 16px;
  }
  .simple-workspace.creator-studio .product-feedback-composer {
    padding: 16px;
  }
  .simple-workspace.creator-studio
    .product-feedback-composer
    .product-composer-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .simple-workspace.creator-studio .diagram-tool {
    width: 34px;
    min-width: 34px;
    height: 40px;
  }
  .simple-workspace.creator-studio .diagram-toolbar {
    padding: 7px;
  }
  .simple-workspace.creator-studio .diagram-toolbar-actions {
    gap: 4px;
  }
  .simple-workspace.creator-studio .diagram-tool[data-diagram-action="fit"],
  .simple-workspace.creator-studio
    .diagram-tool[data-diagram-action="fullscreen"] {
    font-size: 11px;
    padding: 0 7px;
  }
  .simple-workspace.creator-studio .studio-flow-canvas .diagram-viewport,
  .simple-workspace.creator-studio .product-flow .diagram-viewport {
    height: 320px;
    min-height: 260px;
  }
  .simple-workspace.creator-studio .diagram-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 14px);
  }
  .simple-workspace.creator-studio .diagram-dialog .studio-dialog-body {
    padding: 8px;
  }
  .simple-workspace.creator-studio .diagram-dialog .diagram-viewport {
    height: calc(100dvh - 215px);
    min-height: 230px;
  }
}

.plan-materials {
  margin: 1.25rem 0;
  min-width: 0;
}
.plan-materials h3 {
  margin-bottom: 0.5rem;
}
.plan-material {
  margin: 0.75rem 0;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-width: 0;
}
.plan-material .message-attachments {
  max-width: 100%;
}
.plan-material img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: 8px;
}
.plan-material figure {
  margin: 0.5rem 0;
}
.plan-material-entry {
  margin: 0.6rem 0;
}
.plan-material-entry summary {
  cursor: pointer;
  overflow-wrap: anywhere;
  padding: 0.4rem 0;
}
.plan-material-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  max-height: 300px;
  overflow-y: auto;
}
.plan-material-table {
  max-width: 100%;
  overflow: auto;
  max-height: 320px;
  margin: 0.6rem 0;
}
.plan-material-table table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 0.8rem;
}
.plan-material-table th,
.plan-material-table td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.6rem;
  text-align: left;
  min-width: 80px;
}
.plan-material-table th {
  background: var(--surface);
}
.plan-material-table caption {
  text-align: left;
  padding-bottom: 0.4rem;
}

/* Give the conversation and the user's draft enough room to work in. */
@media (min-width: 1191px) {
  .simple-workspace.creator-studio .studio-creation-grid {
    grid-template-columns: minmax(380px, 1.1fr) minmax(380px, 1fr);
  }
}
.simple-workspace.creator-studio .creator-compose-area { padding: 16px; }
.simple-workspace.creator-studio #answerForm .chat-input-shell > textarea {
  min-height: 120px;
  max-height: 320px;
  line-height: 1.75;
  resize: vertical;
}
.simple-workspace.creator-studio .studio-quick-composer textarea {
  min-height: 150px;
  font-size: 15px;
}
@media (max-width: 1020px) {
  .simple-workspace.creator-studio .studio-chat {
    min-height: 540px;
    height: max(540px, calc(100dvh - 240px));
  }
}
@media (max-width: 760px) {
  .simple-workspace.creator-studio .creator-compose-area { padding: 12px; }
  .simple-workspace.creator-studio #answerForm .chat-input-shell > textarea { min-height: 112px; }
}
