.converter-shell {
  width: min(1180px, calc(100% - 36px));
}
.converter-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}
.converter-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.local-engine {
  font: 700 0.72rem/1 ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.source-drop {
  margin: 24px;
  min-height: 190px;
  border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-align: center;
  cursor: pointer;
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  transition: 0.2s ease;
}
.source-drop:hover,
.source-drop.dragging {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  transform: translateY(-1px);
}
.source-drop input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}
.source-drop strong {
  font-size: 1.08rem;
}
.source-drop small {
  color: var(--muted);
}
.source-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.6rem;
}
.source-card {
  margin: 0 24px 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--raised);
}
.source-file-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.source-file-head > span {
  display: grid;
  place-items: center;
  min-width: 62px;
  height: 54px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  font: 800 0.74rem/1 ui-monospace, SFMono-Regular, monospace;
}
.source-file-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.source-file-head b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-file-head small {
  color: var(--muted);
}
.source-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.source-facts div {
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
}
.source-facts dt {
  font-size: 0.72rem;
  color: var(--muted);
}
.source-facts dd {
  margin: 6px 0 0;
  font-weight: 700;
}
.source-card audio,
.converter-result audio {
  width: 100%;
}
.converter-section {
  padding: 24px;
  border-top: 1px solid var(--line);
}
.converter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.converter-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.converter-heading small {
  color: var(--accent);
  font: 800 0.72rem/1 ui-monospace, SFMono-Regular, monospace;
}
.converter-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}
.converter-heading > span {
  font-size: 0.78rem;
  color: var(--muted);
}
.converter-formats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.converter-formats .format-card {
  min-width: 0;
  min-height: 126px;
  padding: 16px 34px 16px 16px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, auto);
  align-content: center;
  gap: 7px;
}
.converter-formats .format-card span,
.converter-formats .format-card small,
.converter-formats .format-card em {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}
.converter-formats .format-card span {
  line-height: 1.28;
}
.converter-formats .format-card small {
  justify-self: start;
  line-height: 1.35;
}
.converter-formats .format-card em {
  grid-column: 1;
  line-height: 1.45;
}
.converter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.converter-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}
.converter-grid select,
.converter-grid input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}
.converter-note {
  margin: 16px 0 0;
}
.processing-path {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 86%, var(--accent) 14%);
}
.processing-path b { color: var(--ink); font-size: .78rem; }
.processing-path span { color: var(--muted); font-size: .82rem; line-height: 1.5; }
select:disabled { opacity: .58; cursor: not-allowed; }
.converter-action {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-top: 1px solid var(--line);
}
.converter-action .record-button {
  width: auto;
  min-width: 210px;
  margin: 0;
}
.converter-action p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.convert-symbol {
  font-size: 1.2rem;
}
.converter-progress,
.converter-result {
  margin: 0 24px 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--raised);
}
.converter-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}
.progress-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}
.progress-track i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.15s linear;
}
.converter-progress small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}
.converter-cancel {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.converter-result {
  display: grid;
  gap: 16px;
}
.result-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.result-head > div {
  display: grid;
  gap: 3px;
}
.result-head small {
  color: var(--muted);
}
.result-check {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #22c55e;
  color: #07140b;
  font-weight: 900;
}
.result-actions {
  display: flex;
  gap: 10px;
}
.result-actions a,
.result-actions button {
  flex: 1;
  text-align: center;
}
.error-message {
  margin: 0 24px 24px;
}
.hidden {
  display: none !important;
}
html[data-theme="light"] .converter-panel {
  box-shadow: 0 20px 50px rgba(35, 30, 55, 0.09);
}
@media (max-width: 820px) {
  .converter-formats {
    grid-template-columns: repeat(2, 1fr);
  }
  .converter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .source-facts {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .converter-panel {
    border-radius: 20px;
  }
  .source-drop,
  .source-card,
  .converter-progress,
  .converter-result {
    margin-left: 14px;
    margin-right: 14px;
  }
  .converter-section,
  .converter-action {
    padding: 20px 14px;
  }
  .converter-grid {
    grid-template-columns: 1fr;
  }
  .converter-formats {
    grid-template-columns: 1fr;
  }
  .converter-formats .format-card {
    min-height: 104px;
  }
  .converter-heading {
    align-items: flex-start;
  }
  .converter-heading > span {
    max-width: 120px;
    text-align: right;
  }
  .converter-action {
    align-items: stretch;
    flex-direction: column;
  }
  .converter-action .record-button {
    width: 100%;
  }
  .source-facts {
    grid-template-columns: 1fr 1fr;
  }
  .result-actions {
    flex-direction: column;
  }
}
