.ae-app {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 30px 0 80px;
  color: #10213f;
}

.ae-app *,
.ae-app *::before,
.ae-app *::after {
  box-sizing: border-box;
}

.ae-intro {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 34px;
  overflow: hidden;
  margin-bottom: 22px;
  padding: 36px 40px;
  border: 1px solid rgba(108, 132, 255, 0.28);
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 16%, rgba(85, 224, 255, 0.22), transparent 30%),
    linear-gradient(120deg, #061730 0%, #123576 58%, #6037dd 100%);
  box-shadow: 0 22px 58px rgba(21, 46, 100, 0.18);
}

.ae-intro::after {
  position: absolute;
  right: -54px;
  bottom: -96px;
  width: 290px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  content: "";
  transform: rotate(-12deg);
}

.ae-intro > * {
  position: relative;
  z-index: 1;
}

.ae-eyebrow {
  margin: 0 0 10px;
  color: #70e7ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

body:not([data-page="index"]) .ut-page-content .ae-intro h2 {
  max-width: 720px;
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.ae-intro p:last-child {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.75;
}

.ae-intro__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 280px;
}

.ae-intro__badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ecf8ff;
  background: rgba(5, 17, 44, 0.34);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ae-panel {
  margin-bottom: 22px;
  padding: 30px;
  border: 1px solid #dbe5f7;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(32, 68, 145, 0.09);
}

.ae-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.ae-step {
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #315ce9, #7440ed);
  box-shadow: 0 10px 24px rgba(78, 67, 228, 0.22);
  font-size: 12px;
  font-weight: 900;
}

.ae-panel__head h3 {
  margin: 1px 0 4px;
  color: #0b1b38;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.ae-panel__head p {
  margin: 0;
  color: #6a7891;
  font-size: 14px;
  line-height: 1.65;
}

.ae-dropzone {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  padding: 28px;
  border: 2px dashed #adc2fb;
  border-radius: 20px;
  outline: 0;
  color: #183461;
  background:
    radial-gradient(circle at 50% 0, rgba(97, 223, 255, 0.16), transparent 38%),
    #f8faff;
  cursor: pointer;
  transition-property: border-color, background-color, box-shadow, transform;
  transition-duration: 160ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ae-dropzone:hover,
.ae-dropzone.is-dragging {
  border-color: #315ce9;
  background-color: #f2f6ff;
  box-shadow: 0 14px 32px rgba(49, 92, 233, 0.11);
}

.ae-dropzone:active {
  transform: scale(0.99);
}

.ae-dropzone:focus-visible,
.ae-app button:focus-visible,
.ae-app input:focus-visible {
  outline: 3px solid rgba(49, 92, 233, 0.25);
  outline-offset: 3px;
}

.ae-dropzone__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 5px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #315ce9, #7440ed);
  box-shadow: 0 12px 28px rgba(73, 68, 225, 0.2);
  font-size: 22px;
}

.ae-dropzone strong {
  font-size: 18px;
  font-weight: 900;
}

.ae-dropzone > span:not(.ae-dropzone__icon),
.ae-dropzone small {
  color: #71809b;
}

.ae-file-status {
  min-height: 24px;
  margin-top: 12px;
  color: #71809b;
  font-size: 13px;
  font-weight: 700;
}

.ae-file-status.is-ready {
  color: #10846f;
}

.ae-editor[aria-disabled="true"] {
  opacity: 0.58;
}

.ae-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.ae-player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ae-icon-button,
.ae-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #dbe5f7;
  border-radius: 14px;
  color: #17305f;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition-property: color, border-color, background-color, box-shadow, transform;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ae-icon-button:hover:not(:disabled),
.ae-button:hover:not(:disabled) {
  border-color: #99b2f7;
  box-shadow: 0 9px 22px rgba(38, 79, 184, 0.12);
}

.ae-icon-button:active:not(:disabled),
.ae-button:active:not(:disabled) {
  transform: scale(0.96);
}

.ae-icon-button:disabled,
.ae-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.ae-icon-button--primary,
.ae-button--primary {
  border-color: #315ce9;
  color: #fff;
  background: linear-gradient(135deg, #315ce9, #7440ed);
}

.ae-button--soft {
  color: #315ce9;
  background: #f4f7ff;
}

.ae-time-readout {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7a88a2;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ae-time-readout strong {
  color: #173b78;
}

.ae-waveform-shell {
  position: relative;
  overflow: hidden;
  height: 288px;
  border: 1px solid #173f79;
  border-radius: 20px;
  background: #071c3e;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
}

#ae-waveform {
  display: block;
  width: 100%;
  height: 100%;
}

.ae-waveform-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: rgba(231, 242, 255, 0.72);
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}

.ae-range-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.ae-range-grid label,
.ae-output-row label {
  display: grid;
  gap: 7px;
  margin: 0;
}

.ae-range-grid label span,
.ae-output-row label span {
  color: #435675;
  font-size: 12px;
  font-weight: 800;
}

.ae-range-grid input,
.ae-output-row input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cbd8ee;
  border-radius: 14px;
  color: #10213f;
  background: #fbfcff;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ae-selection-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #4e607e;
  background: #f5f8ff;
  font-size: 13px;
}

.ae-selection-summary strong {
  color: #315ce9;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.ae-selection-summary small {
  margin-left: auto;
  color: #8390a7;
}

.ae-settings-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.45fr;
  gap: 16px;
}

.ae-setting-card {
  padding: 20px;
  border: 1px solid #dce6f7;
  border-radius: 18px;
  background: #fbfcff;
}

.ae-setting-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: #183461;
  font-weight: 900;
}

.ae-setting-card__head span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ae-setting-card__head strong {
  color: #315ce9;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.ae-setting-card--volume input[type="range"],
.ae-fade-row input[type="range"] {
  width: 100%;
  accent-color: #315ce9;
}

.ae-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #8794aa;
  font-size: 11px;
}

.ae-effect-card {
  grid-row: span 2;
  margin: 0;
}

.ae-effect-card legend {
  width: auto;
  margin: 0 0 14px;
  padding: 0;
  color: #183461;
  font-size: 15px;
  font-weight: 900;
}

.ae-effect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ae-effect-grid label {
  margin: 0;
  cursor: pointer;
}

.ae-effect-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ae-effect-grid label > span {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 1px 10px;
  min-height: 66px;
  align-items: center;
  padding: 11px 13px;
  border: 1px solid #dce6f7;
  border-radius: 15px;
  color: #5f708c;
  background: #fff;
  transition-property: color, border-color, background-color, box-shadow, transform;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ae-effect-grid label > span i {
  grid-row: 1 / span 2;
  color: #5972b5;
  font-size: 17px;
  text-align: center;
}

.ae-effect-grid label > span strong {
  color: #183461;
  font-size: 13px;
}

.ae-effect-grid label > span small {
  font-size: 11px;
}

.ae-effect-grid input:checked + span {
  border-color: #315ce9;
  color: #315ce9;
  background: #f2f6ff;
  box-shadow: 0 8px 20px rgba(49, 92, 233, 0.12);
}

.ae-effect-grid input:focus-visible + span {
  outline: 3px solid rgba(49, 92, 233, 0.25);
  outline-offset: 2px;
}

.ae-effect-grid label:active > span {
  transform: scale(0.96);
}

.ae-finishing-card {
  display: grid;
  gap: 18px;
}

.ae-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  cursor: pointer;
}

.ae-switch-row > span {
  display: grid;
  gap: 3px;
}

.ae-switch-row strong {
  color: #183461;
  font-size: 13px;
}

.ae-switch-row small {
  color: #7b89a2;
  font-size: 11px;
}

.ae-switch-row input {
  position: absolute;
  opacity: 0;
}

.ae-switch-row i {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 27px;
  border-radius: 999px;
  background: #cbd5e7;
  transition-property: background-color;
  transition-duration: 150ms;
}

.ae-switch-row i::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(17, 33, 63, 0.22);
  content: "";
  transition-property: transform;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.ae-switch-row input:checked + i {
  background: #315ce9;
}

.ae-switch-row input:checked + i::after {
  transform: translateX(21px);
}

.ae-switch-row input:focus-visible + i {
  outline: 3px solid rgba(49, 92, 233, 0.25);
  outline-offset: 2px;
}

.ae-fade-row {
  display: grid;
  gap: 7px;
}

.ae-fade-row label {
  display: flex;
  justify-content: space-between;
  margin: 0;
  color: #536683;
  font-size: 12px;
  font-weight: 800;
}

.ae-fade-row strong {
  color: #315ce9;
  font-variant-numeric: tabular-nums;
}

.ae-output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.ae-output-row .ae-button {
  min-height: 48px;
  padding-inline: 24px;
}

.ae-account-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #5e6f8b;
  background: #f5f8ff;
  font-size: 12px;
  line-height: 1.6;
}

.ae-account-note a {
  color: #315ce9;
  font-weight: 800;
}

.ae-progress {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 24px;
  border-radius: 18px;
  color: #17305f;
  background: #f5f8ff;
}

.ae-progress[hidden] {
  display: none;
}

.ae-progress small {
  color: #7a88a2;
}

.ae-spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  border: 3px solid #dce5fb;
  border-top-color: #315ce9;
  border-radius: 50%;
  animation: ae-spin 760ms linear infinite;
}

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

.ae-result {
  margin-top: 18px;
}

.ae-result-card {
  padding: 22px;
  border: 1px solid #cfe8df;
  border-radius: 18px;
  background: #f5fffb;
}

.ae-result-card__head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: #10846f;
  font-weight: 900;
}

.ae-result-card audio {
  width: 100%;
  margin-bottom: 14px;
}

.ae-result-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ae-result-card__actions span {
  overflow: hidden;
  color: #35506d;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ae-download-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 14px;
  color: #fff;
  background: #10846f;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  transition-property: box-shadow, transform, background-color;
  transition-duration: 150ms;
}

.ae-download-link:hover {
  color: #fff;
  background: #0b7563;
  box-shadow: 0 10px 22px rgba(16, 132, 111, 0.18);
  text-decoration: none;
}

.ae-download-link:active {
  transform: scale(0.96);
}

.ae-result-note,
.ae-error {
  margin: 12px 0 0;
  font-size: 12px;
}

.ae-result-note {
  color: #4c6b62;
}

.ae-error {
  padding: 14px 16px;
  border: 1px solid #f2c7cf;
  border-radius: 14px;
  color: #a72e44;
  background: #fff7f8;
  font-weight: 800;
}

@media (max-width: 900px) {
  .ae-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .ae-intro__badges {
    justify-content: flex-start;
    min-width: 0;
  }

  .ae-range-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ae-settings-grid {
    grid-template-columns: 1fr;
  }

  .ae-effect-card {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .ae-app {
    padding-top: 18px;
  }

  .ae-intro,
  .ae-panel {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .ae-panel__head {
    margin-bottom: 18px;
  }

  .ae-player-bar,
  .ae-result-card__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ae-player-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ae-time-readout {
    justify-content: flex-end;
  }

  .ae-waveform-shell {
    height: 230px;
    border-radius: 16px;
  }

  .ae-range-grid,
  .ae-output-row {
    grid-template-columns: 1fr;
  }

  .ae-selection-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ae-selection-summary small {
    width: 100%;
    margin-left: 0;
  }

  .ae-effect-grid {
    grid-template-columns: 1fr;
  }

  .ae-result-card__actions span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ae-app *,
  .ae-app *::before,
  .ae-app *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
