.auth-password-field {
  position: relative;
  display: block;
}

.auth-password-field input {
  width: 100%;
  padding-right: 74px !important;
}

.auth-password-field button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  min-width: 52px;
  border: 0;
  border-left: 1px solid rgba(143, 231, 255, .2);
  background: transparent;
  color: #91dff5;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}

.chart-auth-password-field {
  position: relative;
  display: block;
}

.chart-auth-password-field input {
  width: 100%;
  padding-right: 5rem !important;
}

.chart-auth-password-field button {
  position: absolute;
  top: 50%;
  right: .7rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #8fe7ff;
  font: inherit;
  font-size: .76rem;
  font-weight: 750;
  cursor: pointer;
}

.auth-form label > small {
  display: block;
  margin-top: 7px;
  color: #758ba4;
  font-size: 11px;
}

.auth-recovery-link {
  display: block;
  margin: 17px auto 0;
  color: #91dff5;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.auth-recovery-link:hover,
.auth-recovery-link:focus-visible {
  text-decoration: underline;
}

.form-notice {
  margin: 18px 0;
  padding: 13px 15px;
  border: 1px solid rgba(80, 205, 163, .35);
  border-radius: 12px;
  background: rgba(26, 112, 87, .14);
  color: #aeeed5;
  font-size: 13px;
  line-height: 1.5;
}

.auth-code-input {
  font-size: 25px !important;
  font-weight: 700;
  letter-spacing: .32em;
  text-align: center;
}

.auth-recovery-card {
  max-width: 520px;
}

.story-mode-choice {
  display: grid;
  gap: 18px;
}

.story-mode-choice > header {
  display: grid;
  gap: 7px;
}

.story-mode-choice > header small,
.story-mode-card small {
  color: #83dff8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
}

.story-mode-choice > header strong {
  font-size: clamp(20px, 3vw, 28px);
}

.story-mode-choice > header span {
  color: #8ea2b8;
  line-height: 1.55;
}

.story-mode-choice > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.story-mode-card {
  display: grid;
  min-height: 220px;
  align-content: start;
  gap: 12px;
  padding: 23px;
  border: 1px solid rgba(128, 159, 192, .23);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15, 29, 44, .96), rgba(8, 16, 27, .98));
  color: #edf7ff;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.story-mode-card:hover:not(:disabled),
.story-mode-card:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(143, 231, 255, .65);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .24);
}

.story-mode-card.recommended {
  border-color: rgba(143, 231, 255, .4);
  background: radial-gradient(circle at 82% 8%, rgba(70, 158, 203, .2), transparent 42%), linear-gradient(145deg, rgba(16, 35, 52, .98), rgba(8, 18, 29, .98));
}

.story-mode-card:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.story-mode-card strong {
  font-size: 22px;
}

.story-mode-card span {
  color: #a7b8ca;
  font-size: 14px;
  line-height: 1.55;
}

.story-mode-card em {
  margin-top: auto;
  color: #7dd5ed;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.story-fixed-moon {
  align-self: center;
  padding: 8px 12px;
  border: 1px solid rgba(143, 231, 255, .25);
  border-radius: 999px;
  color: #88dff6;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.story-background-jobs {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.story-background-jobs article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  border: 1px solid rgba(143, 231, 255, .23);
  border-radius: 14px;
  background: rgba(12, 27, 41, .82);
}

.story-background-job.failed {
  border-color: rgba(241, 148, 138, .34);
  background: linear-gradient(145deg, rgba(49, 24, 28, .82), rgba(19, 15, 22, .94));
}

.story-background-job.failed > i {
  border-color: rgba(241, 148, 138, .4);
  animation: none;
}

.story-background-job.failed > i::after {
  background: #f1948a;
}

.story-background-job > button {
  padding: 8px 12px;
  border: 1px solid rgba(143, 231, 255, .28);
  border-radius: 999px;
  background: rgba(10, 24, 36, .7);
  color: #9cecff;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.story-background-jobs article > i {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(143, 231, 255, .25);
  border-top-color: #8fe7ff;
  border-radius: 50%;
  animation: starwise-job-spin .85s linear infinite;
}

.story-background-jobs article div {
  display: grid;
  gap: 4px;
}

.story-background-jobs article strong {
  color: #eaf8ff;
  font-size: 14px;
}

.story-background-jobs article span {
  color: #8ea3ba;
  font-size: 12px;
}

.story-background-jobs article b {
  color: #8fe7ff;
  font-size: 13px;
}

.story-context-english,
.story-resolved-model-input {
  max-height: 68vh !important;
  white-space: pre-wrap !important;
}

@keyframes starwise-job-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
  .story-mode-choice > div {
    grid-template-columns: 1fr;
  }

  .story-mode-card {
    min-height: 0;
  }

  .story-selection-steps {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .story-selection-steps > span {
    flex: 0 0 auto;
  }

  .story-background-jobs article {
    grid-template-columns: auto 1fr;
  }

  .story-background-jobs article b {
    grid-column: 2;
  }
}
