.content-section {
  margin-bottom: 2rem;
}

.section-intro p:last-child {
  margin-bottom: 0;
}

.tool-shell {
  margin-top: 1rem;
}

#audio-tool .merge-tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#audio-tool .merge-stack {
  display: grid;
  gap: 6px;
  width: 100%;
}

#audio-tool .merge-reorder-help {
  margin: -4px 0 0;
  color: #6366f1;
  font-size: 12px;
  line-height: 1.45;
}

#audio-tool .merge-empty {
  border: 1px dashed rgba(99, 102, 241, 0.22);
  border-radius: 16px;
  padding: 18px 16px;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.7), rgba(248, 250, 252, 0.92));
  color: #64748b;
  text-align: center;
  line-height: 1.5;
}

#audio-tool .merge-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.05);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

#audio-tool .merge-item.is-dragging {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 18px 36px rgba(99, 102, 241, 0.18);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.96), rgba(255, 255, 255, 0.98));
  z-index: 2;
  cursor: grabbing;
  position: relative;
}

#audio-tool .merge-item-placeholder {
  border-style: dashed;
  border-color: rgba(99, 102, 241, 0.24);
  background: rgba(238, 242, 255, 0.55);
  box-shadow: none;
  min-height: 54px;
}

#audio-tool .merge-item-placeholder-copy {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6366f1;
}

#audio-tool .merge-stack.is-sorting .merge-item:not(.is-dragging):not(.merge-item-placeholder) {
  transform: scale(0.995);
}

#audio-tool .merge-item-main {
  min-width: 0;
}

#audio-tool .merge-item-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}

#audio-tool .merge-item-meta {
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.3;
  color: #64748b;
}

#audio-tool .merge-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.95), rgba(255, 255, 255, 0.98));
  color: #4f46e5;
  cursor: inherit;
  box-shadow: none;
}

#audio-tool .merge-order {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#audio-tool .merge-remove {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
}

#audio-tool .merge-remove i {
  width: 16px;
  height: 16px;
}

#audio-tool .merge-match-toggle {
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.92), rgba(248, 250, 252, 0.96));
}

#audio-tool .merge-match-toggle input {
  margin-top: 2px;
}

#audio-tool .merge-match-help {
  margin: -6px 0 0;
  color: #64748b;
  line-height: 1.5;
}

#audio-tool .merge-actions {
  width: 100%;
}

#audio-tool .merge-actions .at-btn {
  width: 100%;
  min-height: 54px;
  justify-content: center;
  text-align: center;
}

@media (max-width: 640px) {
  #audio-tool .merge-tool-card {
    gap: 10px;
  }

  #audio-tool .merge-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    padding: 8px 9px;
  }

  #audio-tool .merge-remove {
    grid-column: auto;
    width: 36px;
    min-width: 36px;
    height: 38px;
    padding: 0;
    align-self: start;
  }

  #audio-tool .merge-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #audio-tool .merge-handle {
    width: 30px;
    height: 30px;
  }

  #audio-tool .merge-item-main {
    align-self: center;
  }

  #audio-tool .merge-match-toggle {
    padding: 12px 14px;
  }
}

body.merge-drag-lock {
  overflow: hidden;
  touch-action: none;
}
