/* TXT文件合并工具 */
.txm-container { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; max-width: 1120px; margin: 0 auto; }
.txm-sidebar { background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.txm-section h3 { display: flex; align-items: center; gap: 6px; font-size: .95rem; margin: 0 0 12px; }
.txm-section h3 i { color: var(--accent); }

.txm-upload { border: 2px dashed var(--rule); border-radius: var(--radius-sm); padding: 26px 16px; text-align: center; cursor: pointer; transition: all .15s ease; }
.txm-upload i { font-size: 30px; color: var(--accent); display: block; margin-bottom: 8px; }
.txm-upload p { margin: 0 0 4px; font-size: .88rem; color: var(--ink); }
.txm-upload .txm-hint { font-size: .74rem; color: var(--muted); }
.txm-upload:hover, .txm-upload.dragover { border-color: var(--accent); background: var(--accent-soft); }

.txm-form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.txm-form-row > label { font-size: .82rem; color: var(--muted); }
.txm-sep-options { display: flex; flex-wrap: wrap; gap: 6px; }
.txm-sep-btn { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--bg2); color: var(--muted); font-size: .8rem; cursor: pointer; transition: all .15s ease; }
.txm-sep-btn:hover { border-color: var(--accent); color: var(--accent); }
.txm-sep-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.txm-input { padding: 9px 12px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg2); color: var(--ink); font-size: .86rem; }
.txm-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.txm-actions { display: flex; flex-direction: column; gap: 8px; }
.txm-actions .btn { width: 100%; justify-content: center; }

.txm-main { display: flex; flex-direction: column; gap: 20px; }
.txm-file-panel, .txm-preview-panel { background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 20px; }
.txm-file-panel h4, .txm-preview-panel h4 { display: flex; align-items: center; gap: 6px; font-size: .95rem; margin: 0 0 12px; color: var(--ink); }
.txm-file-panel h4 i, .txm-preview-panel h4 i { color: var(--accent); }
.txm-file-count { color: var(--muted); font-size: .8rem; }

.txm-file-list { min-height: 120px; }
.txm-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 16px; color: var(--muted); text-align: center; }
.txm-placeholder i { font-size: 32px; }
.txm-placeholder p { margin: 0; font-size: .82rem; }

.txm-file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius-sm); cursor: grab; }
.txm-file-item.dragging { opacity: .5; }
.txm-file-item.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.txm-file-index { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .74rem; font-weight: 600; flex-shrink: 0; }
.txm-file-icon i { font-size: 20px; color: var(--muted); }
.txm-file-info { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.txm-file-name { font-size: .86rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txm-file-size { font-size: .74rem; color: var(--muted); }
.txm-file-actions { display: flex; gap: 4px; flex-shrink: 0; }
.txm-file-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg); color: var(--muted); cursor: pointer; transition: all .15s ease; }
.txm-file-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.txm-file-btn.delete:hover:not(:disabled) { border-color: #dc2626; color: #dc2626; }
.txm-file-btn:disabled { opacity: .35; cursor: default; }

.txm-preview-text { width: 100%; min-height: 280px; resize: vertical; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--bg2); color: var(--ink); font-family: "SFMono-Regular", Consolas, monospace; font-size: .84rem; line-height: 1.6; box-sizing: border-box; }
.txm-preview-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.txm-tips { background: var(--bg); border: 1px solid var(--rule); border-radius: var(--radius-md); padding: 20px 24px; }
.txm-tips h4 { display: flex; align-items: center; gap: 6px; font-size: 1rem; margin: 0 0 12px; color: var(--ink); }
.txm-tips h4 i { color: var(--accent); }
.txm-tip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.txm-tip-item strong { display: block; font-size: .86rem; color: var(--ink); margin-bottom: 3px; }
.txm-tip-item p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }

@media (max-width: 900px) {
  .txm-container { grid-template-columns: 1fr; }
  .txm-tip-grid { grid-template-columns: 1fr; }
}