body[data-ui-release="177"] .dialog-modal {
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

body[data-ui-release="177"] .dialog-modal > .dialog-card {
  margin: 0 auto !important;
  overscroll-behavior: contain;
  text-align: center;
  scrollbar-width: none;
}

body[data-ui-release="177"] .dialog-modal:not(#prestige-modal) > .dialog-card > .dialog-visual {
  box-sizing: border-box;
  width: var(--dialog-visual-width, min(100%, 320px, 44dvh)) !important;
  height: var(--dialog-visual-height, auto) !important;
  min-height: 0 !important;
  aspect-ratio: var(--dialog-visual-ratio, 16 / 9) !important;
  margin-inline: var(--dialog-visual-margin-inline, auto) !important;
  box-shadow: none;
}

body[data-ui-release="177"] #tier-story-visual.dialog-visual {
  width: min(100%, 360px, 42dvh) !important;
  aspect-ratio: 3 / 2 !important;
}

body[data-ui-release="177"] .dialog-card > .dialog-body {
  max-width: 35ch;
  margin-inline: auto !important;
  text-align: center;
}

body[data-ui-release="177"] .dialog-card > .dialog-body:empty {
  display: none;
}

body[data-ui-release="177"] .dialog-card > .dialog-summary {
  width: 100%;
  border-radius: 8px;
  background: #f7f8fa;
  box-shadow: none;
}

body[data-ui-release="177"] .dialog-card > .dialog-actions,
body[data-ui-release="177"] #daytrade-result > .dialog-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  width: 100%;
  gap: 8px;
}

body[data-ui-release="177"] .dialog-actions > .dialog-button {
  box-sizing: border-box;
  min-width: 0;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

body[data-ui-release="177"] .boost-choice-content {
  gap: 12px;
}

body[data-ui-release="177"] .boost-choice-content > .boost-choice-list {
  display: grid;
  margin-bottom: 0;
  border-block: 1px solid #e5e8eb;
}

body[data-ui-release="177"] .boost-choice-option {
  display: grid;
  box-sizing: border-box;
  width: 100%;
  min-height: 96px;
  padding: 12px 2px;
  grid-template-columns: 70px 1fr 20px;
  align-items: center;
  gap: 10px;
  color: #191f28;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e5e8eb;
  text-align: left;
}

body[data-ui-release="177"] .boost-choice-option:last-child {
  border-bottom: 0;
}

body[data-ui-release="177"] .boost-choice-multiplier {
  color: #1769e5;
  font-size: 21px;
  font-weight: 900;
  line-height: 26px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

body[data-ui-release="177"] .boost-choice-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

body[data-ui-release="177"] .boost-choice-copy small {
  color: #6b7684;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 14px;
}

body[data-ui-release="177"] .boost-choice-copy strong {
  color: #1769e5;
  font-size: 15px;
  font-weight: 900;
  line-height: 20px;
  word-break: keep-all;
}

body[data-ui-release="177"] .boost-choice-copy span {
  color: #4e5968;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 16px;
  white-space: normal;
  word-break: keep-all;
}

body[data-ui-release="177"] .boost-choice-arrow {
  color: #8b95a1;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

body[data-ui-release="177"] .boost-choice-status:empty {
  display: none;
}

body[data-ui-release="177"] .share-reward-content {
  display: grid;
  gap: 12px;
  padding: 16px !important;
}

body[data-ui-release="177"] .share-reward-copy {
  display: grid;
  gap: 7px;
  text-align: left;
}

body[data-ui-release="177"] .share-reward-kicker {
  color: #1769e5;
  font-size: 14px;
  font-weight: 850;
  line-height: 20px;
}

body[data-ui-release="177"] .share-reward-content h2 {
  display: grid;
  gap: 1px;
  text-align: left;
}

body[data-ui-release="177"] .share-reward-content h2 > span {
  color: #191f28;
  font-weight: 850;
}

body[data-ui-release="177"] .share-reward-content h2 > strong {
  color: #1769e5;
  font-size: 30px;
  font-weight: 900;
  line-height: 38px;
  font-variant-numeric: tabular-nums;
}

body[data-ui-release="177"] .share-reward-intro {
  margin: 0 !important;
}

body[data-ui-release="177"] .share-reward-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border-block: 1px solid #e5e8eb;
  list-style: none;
}

body[data-ui-release="177"] .share-reward-steps li {
  display: grid;
  min-height: 50px;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #191f28;
  font-size: 15px;
  font-weight: 750;
  line-height: 21px;
}

body[data-ui-release="177"] .share-reward-steps li + li {
  border-top: 1px solid #edf0f3;
}

body[data-ui-release="177"] .share-reward-steps b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #1769e5;
  background: #edf5ff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

body[data-ui-release="177"] .share-reward-note {
  min-height: 20px;
  margin: 0 !important;
  color: #6b7684 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 20px !important;
  text-align: left;
  word-break: keep-all;
}

body[data-ui-release="177"] .share-reward-content .modal-actions {
  margin-top: 0;
}

@media (max-width: 360px), (max-height: 640px) {
  body[data-ui-release="177"] .boost-choice-option {
    min-height: 88px;
    padding-block: 9px;
  }

  body[data-ui-release="177"] .share-reward-content {
    gap: 9px;
    padding: 12px !important;
  }

  body[data-ui-release="177"] .share-reward-content h2 > strong {
    font-size: 27px;
    line-height: 34px;
  }

  body[data-ui-release="177"] .share-reward-steps li {
    min-height: 44px;
  }
}

@media (min-width: 520px) and (max-height: 430px) {
  body[data-ui-release="177"] #sell-reward-visual{--dialog-visual-height:min(82px,24dvh);--dialog-visual-ratio:auto}

  html body[data-ui-release="177"][data-followup-release="239"]
    #work-tutorial-modal > .modal-content {
    --dialog-card-padding: 10px 12px;
    --dialog-card-overflow-y: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(164px, 0.75fr);
    grid-template-areas:
      "title title"
      "scene summary"
      "scene actions";
    gap: 6px 12px;
  }

  html body[data-ui-release="177"][data-followup-release="239"]
    #work-tutorial-modal .dialog-title {
    grid-area: title;
  }

  html body[data-ui-release="177"][data-followup-release="239"]
    #work-tutorial-modal .tutorial-scene-shell {
    grid-area: scene;
    align-self: stretch;
    margin: 0;
  }

  html body[data-ui-release="177"][data-followup-release="239"]
    #work-tutorial-modal .tutorial-scene-shell > .work-tutorial-visual {
    --tutorial-scene-width: 100%;
    --tutorial-scene-height: auto;
    --tutorial-scene-min-height: 0;
    --tutorial-scene-expanded-height: auto;
    --tutorial-scene-expanded-min-height: 0;
    --tutorial-scene-aspect-ratio: 16 / 9;
  }

  html body[data-ui-release="177"][data-followup-release="239"]
    #work-tutorial-modal #work-tutorial-text {
    --tutorial-speech-padding: 6px 8px;
    --tutorial-speech-font-size: 14px;
    --tutorial-speech-line-height: 18px;
    max-width: min(62%, 176px);
  }

  html body[data-speech-typewriter-release="280"]
    #work-tutorial-modal .tutorial-ant-speech[data-speech-layout="centered-safe"] {
    max-width: calc(100% - 16px) !important;
    padding: 6px 8px !important;
  }

  html body[data-speech-typewriter-release="280"]
    #work-tutorial-modal .tutorial-ant-speech[data-speech-layout="centered-safe"] > span {
    font-size: 15px !important;
    line-height: 20px !important;
  }

  html body[data-speech-typewriter-release="280"][data-followup-release="239"]
    #work-tutorial-modal .tutorial-scene-shell > .v174-modal-visual
    :is(.feature-character-avatar, .story-image-actor, .story-image-prop) {
    height: 50% !important;
    max-height: 50% !important;
  }

  html body[data-ui-release="177"][data-followup-release="239"]
    #work-tutorial-modal .work-tutorial-rewards {
    grid-area: summary;
    align-self: end;
    margin: 0;
  }

  html body[data-ui-release="177"][data-followup-release="239"]
    #work-tutorial-modal .modal-actions {
    grid-area: actions;
    align-self: start;
    margin: 0;
  }

  body[data-ui-release="177"] .share-reward-content {
    padding: 10px !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "copy steps"
      "note steps"
      "actions actions";
    gap: 6px 14px;
  }

  body[data-ui-release="177"] .share-reward-copy {
    grid-area: copy;
    gap: 2px;
  }

  body[data-ui-release="177"] .share-reward-content h2 {
    margin-bottom: 2px !important;
  }

  body[data-ui-release="177"] .share-reward-content h2 > strong {
    font-size: 26px;
    line-height: 31px;
  }

  body[data-ui-release="177"] .share-reward-steps {
    grid-area: steps;
    align-self: center;
  }

  body[data-ui-release="177"] .share-reward-note {
    grid-area: note;
  }

  body[data-ui-release="177"] .share-reward-content .modal-actions {
    grid-area: actions;
  }
}

#prestige-modal .dialog-card {
  gap: 12px;
  text-align: left;
}

#prestige-modal .dialog-title {
  margin-bottom: 0;
}

#prestige-modal .dialog-visual {
  width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  margin-bottom: 0;
}

#prestige-modal .dialog-visual img {
  object-fit: cover !important;
}

#prestige-modal :is(.prestige-outcome-grid, .prestige-change-list, .modal-actions) {
  margin-top: 12px;
}

#sell-reward-modal .sell-reward-summary > div > span {
  color: #191f28;
  font-weight: 800;
}

#sell-reward-modal .sell-reward-summary strong {
  color: #191f28;
}

#sell-reward-modal #sell-reward-pl.profit { color: #d62a3d; }
#sell-reward-modal #sell-reward-pl.loss { color: #1769e5; }
#sell-reward-modal #sell-reward-pl.flat { color: #191f28; }

#prestige-modal .prestige-outcome-grid {
  display: grid;
  box-sizing: border-box;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
}

#prestige-modal .prestige-outcome-grid > span {
  display: grid;
  min-width: 0;
  gap: 3px;
  text-align: center;
}

#prestige-modal .prestige-outcome-grid small {
  color: #6b7684;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
}

#prestige-modal .prestige-outcome-grid strong {
  color: #191f28;
  font-size: 16px;
  font-weight: 850;
  line-height: 21px;
  white-space: nowrap;
}

#prestige-modal .prestige-change-list{display:grid;width:100%;max-width:none;gap:0;overflow:hidden;border:1px solid #e5e8eb;border-radius:8px}
#prestige-modal .prestige-change-list>p{display:grid;margin:0!important;padding:10px 12px;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:8px;background:#f7f8fa}
#prestige-modal .prestige-change-list>p+p{border-top:1px solid #e5e8eb}

#prestige-modal .prestige-change-list strong {
  color: #3182f6;
  font-size: 13px;
  font-weight: 850;
}

#prestige-modal .prestige-change-list span {
  color: #4e5968;
  font-size: 14px;
  font-weight: 650;
  line-height: 19px;
  word-break: keep-all;
}

#prestige-modal .prestige-final-warning {
  margin: 0 !important;
  padding: 10px 12px;
  color: #b42335 !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  line-height: 20px !important;
  word-break: keep-all;
  background: #fff1f3;
  border: 1px solid #ffd0d5;
  border-radius: 8px;
}

#prestige-modal [data-prestige-confirm-step="2"] #prestige-confirm-btn {
  background: #f04452 !important;
}

@media (width <= 360px) {
  #prestige-modal .prestige-outcome-grid {
    padding-inline: 6px;
  }

  #prestige-modal .prestige-outcome-grid small {
    font-size: 11px;
  }

  #prestige-modal .prestige-outcome-grid strong {
    font-size: 14px;
  }
}
#milestone-modal .story-modal-content>#milestone-modal-text{box-sizing:border-box;width:min(100%,464px);margin:0 auto 8px;padding:11px 12px;border:1px solid #d1d6db;border-radius:8px;background:#f2f4f6}
#milestone-modal .story-modal-content>.dialog-actions,#tier-modal .story-modal-content>.dialog-actions{margin-top:6px}
