.ce-editor {
  margin: 14px 22px 18px;
  padding: 20px 22px 15px;
  border: 1px solid #dcd1f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 5px 22px #68528c0b;
  min-width: 0;
  color: #323247;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overflow-x: hidden;
}
.ce-editor[hidden],
.ce-editor [hidden] {
  display: none !important;
}
.ce-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.ce-title-group {
  min-width: 0;
}
.ce-title-group h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.4px;
}
.ce-name {
  margin: 4px 0 0;
  color: #746386;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ce-back {
  color: #67518d;
  background: #f6f2fc;
  flex-shrink: 0;
}
.ce-guide {
  margin: 18px 0 14px;
  line-height: 1.5;
  font-size: 14px;
}
.ce-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 13px;
  overscroll-behavior-x: contain;
}
.ce-wave {
  position: relative;
  width: 100%;
  height: 174px;
  background: #f8f5fc;
  box-shadow: inset 0 0 0 1px #e6dff2;
  cursor: text;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.ce-wave canvas {
  display: block;
  position: absolute;
  top: 0;
  height: 100%;
  pointer-events: none;
}
.ce-selection {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #9470d73b;
  border-left: 2px solid #6948b7;
  border-right: 2px solid #6948b7;
  pointer-events: none;
}
.ce-caret {
  position: absolute;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: #7153c9;
  pointer-events: none;
  z-index: 3;
}
.ce-caret-playing {
  background: #bd4c73;
  box-shadow: 0 0 0 1px #ffffffb0;
}
.ce-fade {
  position: absolute;
  inset-block: 0;
  pointer-events: none;
  background: #e1b54a30;
}
.ce-fade-in {
  left: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.ce-fade-out {
  right: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.ce-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}
.ce-handle span {
  display: block;
  width: 12px;
  height: 40px;
  margin: auto;
  background: #7153c9;
  border: 3px solid white;
  border-radius: 8px;
  box-shadow: 0 2px 6px #52378a30;
}
.ce-handle:hover {
  background: #7153c912;
}
.ce-handle:focus-visible {
  outline-offset: -4px;
}
.ce-scale {
  display: flex;
  justify-content: space-between;
  margin: 8px 0 0;
  color: #7a7087;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ce-zoom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: #79678c;
  font-size: 12px;
}
.ce-pan {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #79678c;
  font-size: 12px;
}
.ce-pan input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  accent-color: #7153c9;
}
.ce-zoom > div {
  display: flex;
  align-items: center;
  gap: 2px;
}
.ce-zoom button {
  min-width: 42px;
  padding: 0 9px;
}
.ce-zoom [data-ce="zoom-label"] {
  min-width: 45px;
  text-align: center;
}
.ce-selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.ce-range {
  margin: 0;
  color: #685280;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}
.ce-delete {
  background: #fde9e3;
  color: #96432f;
  flex-shrink: 0;
}
.ce-split {
  color: #67518d;
  background: #f1edf7;
  flex-shrink: 0;
}
.ce-delete:hover:not(:disabled) {
  background: #f9d9cf;
}
.ce-editor button:disabled {
  opacity: 0.45;
}
.ce-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}
.ce-play {
  background: #7153c9;
  color: #fff;
  min-width: max-content;
}
.ce-play:hover:not(:disabled) {
  background: #5c40b0;
}
.ce-stop {
  background: #f1edf7;
}
.ce-history {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.ce-history button {
  color: #695486;
}
.ce-time {
  font-size: 13px;
  color: #5c4477;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ce-settings {
  margin-top: 12px;
  border-top: 1px solid #eee8f5;
  color: #5c4477;
}
.ce-settings summary {
  cursor: pointer;
  padding: 12px 0;
  min-height: 44px;
  font-size: 14px;
  font-weight: 650;
}
.ce-editor button {
  min-height: 44px;
  min-width: 44px;
}
.ce-editor .ce-play {
  min-width: max-content;
}
.ce-fade-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.ce-fade-controls fieldset {
  border: 1px solid #e3daef;
  border-radius: 12px;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
}
.ce-fade-controls legend {
  font-size: 14px;
  padding: 0 4px;
}
.ce-settings label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}
.ce-settings input[type="number"], .ce-settings select {
  box-sizing: border-box;
  width: 110px;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid #dcd2ed;
  border-radius: 9px;
  background: white;
  color: #4b3d60;
  padding: 8px;
}
.ce-settings select {
  width: 130px;
}
.ce-fade-controls input[type="range"] {
  width: 100%;
  min-height: 44px;
  margin: 5px 0;
  accent-color: #7153c9;
  touch-action: pan-y;
}
.ce-presets, .ce-position-actions, .ce-nudges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.ce-presets button {
  padding: 0 10px;
  background: #f1edf7;
}
.ce-note {
  font-size: 12px;
  line-height: 1.6;
  margin: 8px 0;
}
.ce-nudges {
  margin: 12px 0 8px;
}
.ce-collective {
  width: fit-content;
  min-height: 44px;
  cursor: pointer;
}
.ce-collective input {
  accent-color: #7153c9;
  width: 22px;
  height: 22px;
  margin: 0 4px 0 0;
}
.ce-precision {
  margin-top: 14px;
  border-top: 1px solid #eee8f5;
  padding-top: 9px;
  color: #79678c;
  font-size: 12px;
}
.ce-precision summary {
  cursor: pointer;
  padding: 8px 0;
  width: fit-content;
}
.ce-inputs {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0 4px;
}
.ce-inputs label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}
.ce-inputs input {
  width: 132px;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #dcd2ed;
  border-radius: 9px;
  background: #fff;
  color: #4b3d60;
}
.ce-inputs p {
  flex: 1 1 190px;
  margin: 0 0 8px;
  line-height: 1.5;
}
.ce-busy .ce-wave {
  cursor: default;
}
.ce-error {
  color: #a33d32;
  font-size: 13px;
  margin: 10px 0 0;
}
@media (max-width: 760px) {
  .ce-editor {
    margin: 12px 12px 16px;
    padding: 16px;
  }
  .ce-heading {
    align-items: start;
    gap: 10px;
  }
  .ce-title-group h2 {
    font-size: 19px;
  }
  .ce-back {
    font-size: 12px;
    padding: 0 10px;
  }
  .ce-wave {
    height: 164px;
  }
  .ce-selection-row {
    flex-wrap: wrap;
  }
  .ce-range {
    flex-basis: 100%;
  }
  .ce-delete {
    width: 100%;
  }
  .ce-history {
    margin-left: 0;
    flex: 1 1 100%;
  }
  .ce-history button {
    flex: 1;
  }
  .ce-play {
    flex: 1 0 auto;
    min-width: max-content;
  }
  .ce-zoom {
    flex-wrap: wrap;
  }
  .ce-zoom > div {
    margin-left: auto;
  }
  .ce-fade-controls {
    grid-template-columns: 1fr;
  }
  .ce-position-actions > button, .ce-nudges > button {
    flex: 1 1 140px;
  }
}
@media (max-width: 480px) {
  .ce-actions > .ce-play {
    flex-basis: 100%;
    width: 100%;
  }
  .ce-actions > .ce-stop {
    flex: 1 1 calc(50% - 4px);
  }
  .ce-time {
    flex-basis: 100%;
  }
}
@media (max-height: 720px) {
  .ce-editor {
    padding: 12px 16px;
    margin-top: 8px;
  }
  .ce-wave {
    height: 132px;
  }
  .ce-guide {
    margin: 10px 0;
  }
}
@media (pointer: coarse) {
  .ce-precision summary {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .ce-inputs input {
    min-height: 48px;
  }
  .ce-zoom button {
    min-width: 48px;
  }
}
