.audio-shell {
  width: min(1160px, calc(100% - 40px));
}

.audio-header {
  max-width: 860px;
}

.format-ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.format-ribbon span {
  padding: 6px 9px;
  border: 1px solid rgba(var(--brand-rgb), .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
}

.audio-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
}

.audio-pane {
  min-width: 0;
  padding: 30px;
}

.audio-pane + .audio-pane {
  border-left: 1px solid var(--line);
}

.pane-heading > div {
  min-width: 0;
}

.pane-heading h2,
.output-copy h2,
.format-guide-heading h2 {
  margin: 4px 0 0;
  font-size: 19px;
  letter-spacing: -.035em;
}

.step-label {
  margin: 0;
  color: var(--brand);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .13em;
}

.privacy-pill,
.format-kind {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 760;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.privacy-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #23a363;
  box-shadow: 0 0 0 4px rgba(35, 163, 99, .1);
}

.audio-drop-zone {
  min-height: 310px;
  cursor: pointer;
}

.audio-drop-icon {
  background:
    radial-gradient(circle at 72% 22%, rgba(var(--brand-rgb), .16), transparent 35%),
    var(--brand-soft);
  font-family: Georgia, serif;
  font-size: 31px;
}

.source-file {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8fbfd;
}

.source-file[hidden] {
  display: none;
}

.source-file-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 13px;
  background: var(--brand);
}

.source-file-icon i {
  width: 3px;
  border-radius: 999px;
  background: white;
}

.source-file-icon i:nth-child(1) { height: 13px; }
.source-file-icon i:nth-child(2) { height: 27px; }
.source-file-icon i:nth-child(3) { height: 20px; }
.source-file-icon i:nth-child(4) { height: 33px; }

.source-file-copy {
  min-width: 0;
}

.source-file-copy strong,
.source-file-copy span {
  display: block;
}

.source-file-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-file-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.source-file > button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font-size: 20px;
}

.source-file > button:hover {
  background: #fff0f2;
  color: var(--danger);
}

.audio-player {
  width: 100%;
  height: 42px;
  margin-top: 14px;
}

.audio-fields {
  margin-top: 23px;
}

.field small {
  display: block;
}

.metadata-option {
  align-items: flex-start;
  margin: 2px 0 19px;
  cursor: pointer;
}

.metadata-option > span,
.metadata-option strong,
.metadata-option small {
  display: block;
}

.metadata-option strong {
  margin-bottom: 3px;
  font-size: 12px;
}

.metadata-option small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
}

.format-explainer {
  padding: 15px 16px;
  border-left: 3px solid var(--brand);
  border-radius: 0 12px 12px 0;
  background: #f5f9fc;
}

.format-explainer strong {
  color: var(--brand-dark);
  font-size: 12px;
}

.format-explainer p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.convert-actions {
  display: flex;
  gap: 9px;
  margin-top: 20px;
}

.convert-button {
  flex: 1;
  min-height: 49px;
}

.convert-button > span {
  font-size: 17px;
}

.conversion-progress {
  margin-top: 18px;
}

.conversion-progress > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
}

.conversion-progress strong {
  color: var(--brand);
}

.conversion-progress progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e6edf2;
}

.conversion-progress progress::-webkit-progress-bar {
  background: #e6edf2;
}

.conversion-progress progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--brand);
}

.conversion-progress progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--brand);
}

.output-card {
  display: grid;
  grid-template-columns: minmax(200px, .56fr) minmax(0, 1.44fr);
  align-items: center;
  gap: 28px;
  margin-top: 20px;
  padding: 28px 30px;
}

.output-copy > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.output-empty {
  min-height: 124px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px dashed #b8c9d5;
  border-radius: 16px;
  background: #f8fbfd;
  color: var(--muted);
}

.output-empty span {
  color: rgba(var(--brand-rgb), .35);
  font-family: Georgia, serif;
  font-size: 29px;
}

.output-empty p {
  margin: 7px 0 0;
  font-size: 11px;
}

.output-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
}

.output-result[hidden] {
  display: none;
}

.output-file {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.output-file-mark {
  min-width: 54px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 900;
}

.output-file > div {
  min-width: 0;
}

.output-file strong,
.output-file span {
  display: block;
}

.output-file strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-file div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.output-result .audio-player {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
}

.download-button {
  white-space: nowrap;
  text-decoration: none;
}

.format-guide {
  margin-top: 54px;
}

.format-guide-heading {
  max-width: 720px;
}

.format-guide-heading > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.format-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.format-guide-grid article {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, .72);
}

.format-guide-grid article > span {
  position: absolute;
  right: 14px;
  top: -15px;
  color: rgba(var(--brand-rgb), .07);
  font-family: "Songti SC", STSong, serif;
  font-size: 88px;
  font-weight: 900;
}

.format-guide-grid h3 {
  position: relative;
  margin: 29px 0 8px;
  font-size: 14px;
}

.format-guide-grid p {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.engine-note {
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 9px;
}

.engine-note a {
  color: var(--brand-dark);
  text-underline-offset: 2px;
}

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

  .audio-pane + .audio-pane {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .output-card {
    grid-template-columns: 1fr;
  }

  .format-guide-grid {
    grid-template-columns: 1fr;
  }

  .format-guide-grid article {
    min-height: 145px;
  }
}

@media (max-width: 560px) {
  .audio-shell {
    width: min(100% - 28px, 1160px);
  }

  .audio-pane {
    padding: 22px 18px;
  }

  .audio-drop-zone {
    min-height: 260px;
    padding: 22px 16px;
  }

  .two-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .output-card {
    padding: 22px 18px;
  }

  .output-result {
    grid-template-columns: 1fr;
  }

  .download-button {
    width: 100%;
  }

  .format-ribbon span:nth-child(n+7) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .audio-drop-zone,
  .button {
    transition: none;
  }
}
