.tts-experience-page {
  --tts-ink: #11192f;
  --tts-ink-soft: #1a2544;
  --tts-blue: #4255dc;
  --tts-blue-deep: #3043c6;
  --tts-line: #dfe4ed;
  --tts-soft: #f5f7fb;
  --tts-paper: #ffffff;
  --tts-muted: #647087;
  --tts-good: #147a52;
}

.tts-experience-page .api-experience-title {
  align-items: center;
  gap: 12px;
}

.tts-experience-page .sub-area .sub-body .sticky-box > .tts-page-header {
  min-height: 100px;
  justify-content: center;
  margin: 0 !important;
  padding: 30px 32px 26px;
  border-bottom: 1px solid var(--tts-line);
  background: var(--tts-paper);
}

.tts-experience-page .tts-page-header .component-user-group__left {
  width: 100%;
}

.tts-experience-page .tts-page-header .api-experience-title {
  justify-content: center;
  line-height: 1.45;
}

.tts-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(480px, .98fr);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--tts-paper);
  box-shadow: none;
}

.tts-compose,
.tts-voices {
  min-width: 0;
  padding: 32px;
}

.tts-compose {
  position: relative;
  background: var(--tts-ink);
  color: #fff;
}

.tts-compose::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, .1);
  content: "";
}

.tts-section-head,
.tts-job-head {
  position: static;
  display: flex;
  width: auto;
  height: auto;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.tts-section-head p,
.tts-job-head p {
  margin: 0 0 7px;
  color: #98a6ff;
  font-family: "Roboto Mono", monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

.tts-compose h4,
.tts-voices h4,
.tts-job-head h4 {
  margin: 0;
  color: inherit;
  font-size: 23px;
  line-height: 1.34;
  letter-spacing: -.04em;
}

.tts-compose .tts-section-head > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 7px;
  color: #ffe16a;
  font-size: 12px;
  font-weight: 850;
}

.tts-field-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.tts-field-label small {
  color: #b7c0dc;
  font-size: 11px;
}

.tts-compose textarea {
  width: 100%;
  min-height: 326px;
  padding: 20px;
  border: 1px solid rgba(190, 201, 235, .38);
  border-radius: 12px;
  background: var(--tts-ink-soft);
  color: #fff;
  font-size: 15px;
  line-height: 1.78;
  resize: vertical;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.tts-compose textarea::placeholder {
  color: #8490ad;
}

.tts-compose textarea:focus {
  border-color: #9ca9ff;
  outline: 3px solid rgba(147, 162, 255, .28);
  outline-offset: 2px;
}

.tts-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
}

.tts-submit-row p {
  margin: 0;
  color: #b4bdd8;
  font-size: 11px;
  line-height: 1.6;
}

.tts-submit-row button,
.tts-job-actions button {
  min-height: 44px;
  padding: 0 19px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: var(--tts-ink);
  font-size: 13px;
  font-weight: 900;
}

.tts-submit-row button:not(:disabled):hover {
  background: #eef1ff;
}

.tts-submit-row button:focus-visible,
.tts-job-actions button:focus-visible {
  outline: 3px solid #9ca9ff;
  outline-offset: 2px;
}

.tts-submit-row button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.tts-voices {
  background: var(--tts-soft);
}

.tts-voices .tts-section-head > span {
  color: var(--tts-muted);
  font-size: 11px;
}

.tts-voice-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.tts-voice-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(190px, 220px);
  align-items: center;
  gap: 14px;
  min-height: 102px;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid var(--tts-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(27, 39, 69, .04);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.tts-voice-card:hover {
  border-color: #bdc7ef;
  box-shadow: 0 7px 18px rgba(39, 55, 101, .09);
  transform: translateY(-1px);
}

.tts-voice-card.is-selected {
  border-color: var(--tts-blue);
  background: #fbfcff;
  box-shadow: inset 4px 0 var(--tts-blue), 0 8px 20px rgba(56, 74, 181, .12);
}

.tts-voice-card:focus-within {
  outline: 3px solid rgba(66, 85, 220, .25);
  outline-offset: 2px;
}

.tts-voice-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tts-voice-index {
  display: flex;
  align-self: stretch;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #e7eaf1;
  color: #9aa4b5;
  font-family: "Roboto Mono", monospace;
}

.tts-voice-index small {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
}

.tts-voice-index strong {
  margin-top: 4px;
  color: #7f899c;
  font-size: 15px;
  line-height: 1;
}

.tts-voice-card.is-selected .tts-voice-index strong {
  color: var(--tts-blue);
}

.tts-voice-copy {
  min-width: 0;
}

.tts-voice-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.tts-voice-title > strong {
  flex: 0 0 auto;
  color: var(--tts-ink);
  font-size: 15px;
  line-height: 1.25;
}

.tts-voice-title code {
  min-width: 0;
  overflow: hidden;
  color: #68748a;
  font-family: "Roboto Mono", monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tts-voice-state {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 5px;
  color: var(--tts-blue-deep);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.tts-voice-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tts-blue);
}

.tts-voice-card.is-selected .tts-voice-state {
  display: inline-flex;
}

.tts-voice-copy > small {
  display: block;
  margin-top: 6px;
  color: #596579;
  font-size: 11px;
  line-height: 1.52;
}

.tts-voice-copy > em {
  display: flex;
  margin-top: 6px;
  align-items: center;
  gap: 6px;
  color: var(--tts-blue-deep);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.tts-voice-copy > em span {
  padding-right: 6px;
  border-right: 1px solid #cbd2ea;
  color: #7c8799;
  font-size: 9px;
  font-weight: 700;
}

.tts-voice-sample {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.tts-voice-sample > small {
  color: #8892a5;
  font-family: "Roboto Mono", monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
}

.tts-voice-card audio {
  display: block;
  width: 100%;
  min-width: 0;
  height: 36px;
}

.tts-job-panel {
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid var(--tts-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31, 44, 78, .07);
}

.tts-job-panel[hidden] {
  display: none;
}

.tts-job-head > span {
  padding: 6px 10px;
  border-radius: 6px;
  background: #fff3cb;
  color: #7c5900;
  font-size: 11px;
  font-weight: 900;
}

.tts-job-head > span.is-processing {
  background: #e9edff;
  color: #3448ca;
}

.tts-job-head > span.is-completed {
  background: #dff5e9;
  color: var(--tts-good);
}

.tts-job-head > span.is-failed,
.tts-job-head > span.is-cancelled {
  background: #fde9e7;
  color: #a43c33;
}

.tts-progress {
  height: 5px;
  margin: 16px 0 17px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebf2;
}

.tts-progress span {
  display: block;
  width: 12%;
  height: 100%;
  background: var(--tts-blue);
  transition: width .3s ease;
}

.tts-job-panel dl {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  margin: 0;
  border-block: 1px solid var(--tts-line);
}

.tts-job-panel dl div {
  min-width: 0;
  padding: 11px 12px;
}

.tts-job-panel dl div + div {
  border-left: 1px solid var(--tts-line);
}

.tts-job-panel dt {
  color: #7a8495;
  font-size: 10px;
}

.tts-job-panel dd {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--tts-ink);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tts-job-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.tts-job-actions button {
  border: 1px solid var(--tts-line);
  background: #fff;
}

.tts-job-actions #tts-download {
  border-color: var(--tts-blue);
  background: var(--tts-blue);
  color: #fff;
}

.tts-job-panel > p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 11px;
  text-align: right;
}

@media (max-width: 1100px) {
  .tts-workbench {
    grid-template-columns: 1fr;
  }

  .tts-compose::after {
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
  }

  .tts-compose textarea {
    min-height: 220px;
  }

  .tts-voice-card {
    grid-template-columns: 48px minmax(0, 1fr) minmax(210px, 250px);
  }
}

@media (max-width: 640px) {
  .tts-experience-page .sub-area .sub-body .sticky-box > .tts-page-header {
    min-height: 0;
    padding: 20px 14px 18px;
  }

  .tts-experience-page .api-experience-title {
    align-items: flex-start;
  }

  .tts-experience-page .api-experience-title .label-button {
    min-width: 0;
    padding-inline: 10px;
    font-size: 12px;
  }

  .tts-workbench {
    border-radius: 0;
    box-shadow: none;
  }

  .tts-compose,
  .tts-voices {
    padding: 16px 14px;
  }

  .tts-compose h4,
  .tts-voices h4,
  .tts-job-head h4 {
    font-size: 18px;
  }

  .tts-compose textarea {
    min-height: 180px;
    padding: 13px;
    border-radius: 9px;
    font-size: 14px;
  }

  .tts-field-label {
    margin-top: 18px;
  }

  .tts-submit-row {
    align-items: flex-end;
  }

  .tts-submit-row button {
    flex: 0 0 auto;
    padding: 0 14px;
  }

  .tts-voices .tts-section-head > span {
    display: none;
  }

  .tts-voice-list {
    gap: 8px;
    margin-top: 15px;
  }

  .tts-voice-card {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    min-height: 0;
    padding: 12px;
    border-radius: 10px;
  }

  .tts-voice-index {
    grid-row: 1;
  }

  .tts-voice-title {
    flex-wrap: wrap;
    gap: 5px 7px;
  }

  .tts-voice-state {
    margin-left: 0;
  }

  .tts-voice-copy > small {
    font-size: 11px;
  }

  .tts-voice-sample {
    grid-column: 1 / -1;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding-top: 2px;
  }

  .tts-voice-sample > small {
    text-align: center;
  }

  .tts-voice-card audio {
    height: 34px;
  }

  .tts-job-panel {
    margin-top: 10px;
    padding: 14px;
    border-radius: 10px;
  }

  .tts-job-panel dl {
    grid-template-columns: 1fr 1fr;
  }

  .tts-job-panel dl div:nth-child(3) {
    border-top: 1px solid var(--tts-line);
    border-left: 0;
  }

  .tts-job-panel dl div:nth-child(4) {
    border-top: 1px solid var(--tts-line);
  }

  .tts-job-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tts-job-panel > p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tts-progress span,
  .tts-voice-card {
    transition: none;
  }
}
