/* Focused phrase editor; no shared page or DSP changes. */
.re-clip-editor{padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--bg);margin:16px 0;min-width:0}
.re-wave-toolbar{display:flex;align-items:end;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:10px}
.re-wave-toolbar label{font-size:.85rem;display:flex;align-items:center;gap:8px}
.re-wave-toolbar select{min-height:44px;max-width:180px}
#re-wave-position{font-size:.8rem;color:var(--text-muted);font-variant-numeric:tabular-nums}
.re-wave-frame{position:relative;min-width:0;touch-action:none}
#re-wave{height:156px;width:100%;box-sizing:border-box;touch-action:none;cursor:crosshair}
.re-wave-handle{position:absolute;width:44px;min-height:44px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;padding:4px 2px;transform:translateX(-50%);background:#234f50;border:1px solid #80d7d0;color:#f3ffff;border-radius:6px;font-size:.68rem;font-weight:600;cursor:ew-resize;touch-action:none;user-select:none;z-index:2}
.re-wave-handle-start{top:25px}.re-wave-handle-end{bottom:0}
.re-wave-handle[hidden]{display:none}.re-wave-handle.is-dragging,.re-wave-handle:focus-visible{outline:2px solid #b9fff5;outline-offset:2px;z-index:3}
.re-wave-head{position:absolute;top:24px;bottom:0;width:2px;background:#f1d18b;pointer-events:none;z-index:1}
.re-wave-head[hidden]{display:none}
.re-wave-pan{display:block;margin:14px 0;font-size:.85rem}.re-wave-pan[hidden]{display:none}
.re-wave-pan input{display:block;width:100%;max-width:100%;min-width:0;min-height:36px;accent-color:var(--accent-cyan)}
.re-clip-help{font-size:.85rem;color:var(--text-muted);line-height:1.6;margin:12px 0}
.re-clip-transport{display:flex;align-items:center;flex-wrap:wrap;gap:8px;border-top:1px solid var(--border);padding-top:14px;margin-top:12px}
#re-trim-time{margin-left:auto;font-size:.82rem;font-variant-numeric:tabular-nums;color:var(--text-muted)}
.re-clip-tempo{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin-top:20px}
.re-clip-tempo label{flex:1 1 170px;min-width:0;font-size:.9rem}
#re-source-bpm{display:block;width:100%;max-width:220px;min-width:0;margin-top:6px;min-height:44px}
#re-tempo-status{font-size:.85rem;line-height:1.6;color:var(--text-muted);margin:10px 0}
.re-tempo-options{margin:14px 0 0;font-size:.85rem}.re-tempo-options p{line-height:1.6}
#re-choose .hk-file-activity[data-state=done] progress{display:none}
@media(max-width:480px){.re-clip-editor{padding:10px}.re-wave-toolbar{align-items:start;flex-direction:column}.re-clip-transport button{font-size:.82rem}#re-trim-time{width:100%;margin-left:0}.re-clip-tempo{align-items:stretch}.re-clip-tempo label{flex-basis:100%}}
@media print{.re-wave-frame,.re-wave-toolbar,.re-wave-pan,.re-clip-transport{display:none}}
.re-wave-frame{overflow:hidden;border-radius:10px}

.re-wave-handle[aria-disabled=true]{opacity:.5;cursor:default}

.re-clip-editor .re-grid.re-settings{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.re-clip-editor .re-grid input{width:100%;max-width:100%;min-width:0;box-sizing:border-box}

.re-clip-editor .re-grid.re-settings{display:grid}

/* Tempo results stay next to the editable BPM and remain visible until changed. */
#re-tempo-status:not(:empty){padding:12px 14px;border:1px solid #a88338;border-left:4px solid #d4a449;border-radius:8px;background:#fff6df;color:#38290c;font-weight:500;scroll-margin:100px}
#re-tempo-status[data-state=busy]{border-color:#679da0;background:#eaf8fa;color:#123f45}
#re-tempo-status[data-state=success],#re-tempo-status[data-state=manual]{border-color:#6c9f80;background:#eef9f0;color:#17402a}
#re-tempo-status[data-state=error]{border-color:#bb7971;background:#fff0ec;color:#64241d}
#re-tempo-status[hidden]{display:none}

/* Visible steps and permissions belong to the active task. */
.hk-ensayo-simple .re-step-navigation{position:sticky;top:10px;z-index:25;margin:16px 0;padding:8px;background:var(--bg,#10161a);border:1px solid var(--border);border-radius:12px;box-shadow:0 4px 14px #0003}
.re-step-navigation .re-step-number{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:4px;border:1px solid currentColor;border-radius:50%;font-size:.75rem}
.hk-ensayo-simple .re-screen{scroll-margin-top:100px}
.hk-ensayo-simple .re-practice-back{margin:0 0 18px;padding:0 0 14px}
#re-other-sources .re-permission-slot .re-rights,.hk-ensayo-simple .re-permission-slot .re-rights{display:flex;align-items:flex-start;gap:10px;margin:12px 0 8px;padding:12px;background:var(--surface);color:var(--text);line-height:1.6}
#re-other-sources .re-permission-slot .re-rights[hidden],.hk-ensayo-simple .re-permission-slot .re-rights[hidden]{display:none}
.re-permission-slot input[type=checkbox]{flex:0 0 auto;margin-top:5px}
.re-file-help{font-size:.85rem;line-height:1.5;color:var(--text-muted);margin:4px 0 14px}
.re-wave-handle{margin:0!important;min-width:44px;max-width:44px;flex-shrink:0;line-height:1.2}
.re-wave-handle[data-edge=before],.re-wave-handle[data-edge=after]{font-size:.6rem}
@media(max-width:480px){.hk-ensayo-simple .re-step-navigation{top:4px;padding:5px;gap:4px}.re-step-navigation .re-step-number{display:none}.hk-ensayo-simple .re-screen{scroll-margin-top:82px}}
@media print{.hk-ensayo-simple .re-step-navigation{position:static;box-shadow:none}}
