body[data-speech-layout-release="266"] #avatar-scene
  :is(.ant-scene-dialogue, .ant-action-cue) {
  inset: var(--dialogue-top, 10px) auto auto var(--dialogue-left, 50%) !important;
  box-sizing: border-box;
  width: var(--dialogue-width, min(calc(100vw - clamp(24px, 8vw, 32px)), 440px)) !important;
  max-width: none !important;
  transform: var(--dialogue-transform, translateX(-50%)) !important;
  text-align: center !important;
  text-wrap: balance;
  word-break: keep-all;
}

body[data-speech-layout-release="266"] #avatar-scene
  :is(.ant-scene-dialogue, .ant-action-cue):not([data-speech-layout]),
body[data-speech-layout-release="266"] .modal:not(.hidden)
  .tutorial-ant-speech:not([data-speech-layout]) {
  visibility: hidden !important;
}

body[data-speech-layout-release="266"] #avatar-scene
  .ant-action-cue strong > .speech-line {
  display: block;
  width: fit-content;
}

html body[data-speech-layout-release="266"][data-active-panel="home"]
  #avatar-scene #ant-action-cue[data-action] {
  inset: var(--dialogue-top, 10px) auto auto var(--dialogue-left, 50%) !important;
  transform: var(--dialogue-transform, translateX(-50%)) !important;
}

html body[data-speech-layout-release="266"][data-active-panel="home"]
  #avatar-scene[data-residence] #ant-scene-dialogue[data-speech-layout] {
  inset: var(--dialogue-top, 10px) auto auto var(--dialogue-left, 50%) !important;
  transform: var(--dialogue-transform, translateX(-50%)) !important;
}

html body[data-speech-layout-release="266"][data-active-panel="home"]
  #avatar-scene[data-residence]:has(
    :is(.ant-scene-dialogue, .ant-action-cue):not(.hidden)
  ) {
  min-height: var(--dialogue-min-height, 0px) !important;
}

body[data-speech-layout-release="266"] #avatar-scene
  :is(.ant-scene-dialogue, .ant-action-cue) :is(span, strong, small, button) {
  max-width: 100%;
  margin-inline: auto;
  text-align: center;
  text-wrap: balance;
  word-break: keep-all;
}

body[data-speech-layout-release="266"] .tutorial-ant-speech[data-speech-layout="centered-safe"] {
  inset: var(--tutorial-speech-top, 8px) auto auto var(--tutorial-speech-left) !important;
  box-sizing: border-box;
  width: fit-content !important;
  max-width: min(calc(100% - 16px), 252px) !important;
  transform: none !important;
  text-align: center !important;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: keep-all;
}

body[data-speech-layout-release="266"] .tutorial-ant-speech > span,
body[data-speech-layout-release="266"]
  #analyst-hire-modal[data-story-onboarding="true"] #analyst-hire-text > span {
  display: block !important;
  max-width: 100%;
  margin-inline: auto;
  text-align: center !important;
  text-wrap: balance;
  word-break: keep-all;
}

html body[data-speech-layout-release="266"] .modal
  .tutorial-scene-shell:has(.tutorial-ant-speech) > .v174-modal-visual {
  height: max(
    var(--tutorial-scene-expanded-height, var(--tutorial-scene-height, clamp(188px, 24dvh, 232px))),
    var(--tutorial-geometry-min-height, 0px)
  ) !important;
  min-height: max(
    var(--tutorial-scene-expanded-min-height, var(--tutorial-scene-min-height, 188px)),
    var(--tutorial-geometry-min-height, 0px)
  ) !important;
}

body[data-speech-layout-release="266"] #daytrade-modal.is-intro .daytrade-tutorial-scene {
  height: max(clamp(150px, 22dvh, 180px), var(--tutorial-geometry-min-height, 0px)) !important;
  min-height: max(150px, var(--tutorial-geometry-min-height, 0px)) !important;
}

body[data-speech-layout-release="266"] #starter-mini-coach:not(.hidden) {
  grid-template-columns: minmax(0, 1fr) auto !important;
  grid-template-areas:
    "title step"
    "action step" !important;
  gap: 2px 10px !important;
  text-align: left !important;
}

body[data-speech-layout-release="266"] #starter-mini-coach .starter-coach-step {
  position: static !important;
  grid-area: step;
  align-self: center;
  min-width: 32px !important;
  padding: 4px 6px !important;
  text-align: center !important;
}

body[data-speech-layout-release="266"] #starter-mini-coach :is(strong, em) {
  white-space: normal !important;
  word-break: keep-all;
}

body[data-speech-layout-release="266"] #avatar-scene:has(
  #collection-space-menu:not(.hidden)
) :is(.ant-scene-dialogue, .ant-action-cue) {
  visibility: hidden !important;
  pointer-events: none !important;
}

body[data-speech-layout-release="266"] #toast-container .toast {
  animation: toastIn 0.25s ease-out,
    toastOut 0.3s ease-in var(--toast-exit-delay, 3200ms) forwards;
}

@media (width <= 380px), (height <= 390px) {
  body[data-speech-layout-release="266"] #avatar-scene
    :is(.ant-scene-dialogue, .ant-action-cue) {
    padding: 8px 10px !important;
  }

  body[data-speech-layout-release="266"] .tutorial-ant-speech[data-speech-layout="centered-safe"] {
    max-width: min(calc(100% - 16px), 224px) !important;
    padding: 8px !important;
    font-size: 14px !important;
    line-height: 20px !important;
  }
}
