.edit-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:7px;flex-wrap:wrap}.history-actions{display:flex;gap:14px}.edit-actions .text-button{font-size:11px;min-height:38px}.history-notice{font-size:11px;color:var(--green);min-height:18px;line-height:1.5}
.output-format-row{display:flex;align-items:center;gap:15px;font-size:12px;margin:20px 0 15px}.output-format-row select{margin-left:auto;min-width:0;max-width:70%;padding:12px 42px 12px 14px;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--ink);font:inherit;min-height:44px}
.editor-dialog{border:1px solid var(--border);border-radius:17px;padding:27px;width:min(430px,calc(100vw - 36px));color:var(--ink);box-shadow:0 20px 70px #0002}.editor-dialog::backdrop{background:#15110f66}.editor-dialog h2{font-size:19px;margin:0 0 12px}.editor-dialog p{font-size:13px;line-height:1.7;color:var(--muted);margin-bottom:22px}.dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:22px}.dialog-actions .replace-button{margin:0;width:auto}.rename-input{width:100%;padding:12px;border:1px solid var(--border);border-radius:8px;font-size:16px;margin:8px 0 20px}
.output-eyebrow{font-size:10px;color:var(--muted);display:block;margin:5px 0 9px}.output-heading{display:flex;align-items:center;gap:9px;border-bottom:1px solid var(--border);padding-bottom:14px;margin-bottom:16px}.output-heading h2{font-size:18px;letter-spacing:-.35px;margin:0}.output-heading #refresh{margin-left:auto;font-size:11px}.edit-history #results{max-height:min(72vh,860px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:1px 5px 12px 0}.edit-history .result-card{background:var(--soft);border:1px solid var(--border);border-radius:12px;margin:0 0 12px;padding:14px}.result-card h3{font-size:14px;line-height:1.45;margin:0 0 8px;padding-right:6px;overflow-wrap:anywhere}.result-meta{font-size:10px;color:var(--muted);margin-bottom:13px}
.nv-wave-player[hidden],.edit-actions[hidden],.output-format-row[hidden]{display:none!important}
@media(max-width:760px){.edit-history #results{max-height:660px}.edit-history{padding:20px 17px}.output-format-row select{font-size:12px}.edit-actions .text-button{min-height:44px}}

.output-format-row select{appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%236b6b6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 15px center}

@media(max-width:760px){.main-download{min-height:44px}}

/* Shared player rules copied verbatim from the running NiceVois stylesheet. */
.nv-audio-controls {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid #e0d6d0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
}
.nv-audio-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: var(--purple-dark);
  color: #fff;
  font: inherit;
  font-size: .7rem;
  cursor: pointer;
}
.nv-audio-toggle:disabled { cursor: default; opacity: .45; }
.nv-audio-toggle:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.nv-audio-progress { width: 100%; min-width: 0; accent-color: var(--purple-dark); cursor: pointer; }
.nv-audio-time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .66rem; white-space: nowrap; }
/* Tool results use the same visual language as Trim and the published
   splitter comparison: orange audio on a dark stage with a real playhead.
   Input previews and model proofs stay compact, because their job is only to
   confirm which file was chosen. */
.nv-audio-controls.nv-waveform-controls {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  border-color: #d9d1cb;
  padding: 8px;
  background: #fff;
}
.nv-wave-stage {
  position: relative;
  min-width: 0;
  height: 72px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .36);
  border-radius: 9px;
  background: #16171a;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
}
.nv-wave-stage:focus-visible { outline: 2px solid #e96818; outline-offset: 2px; }
.nv-wave-stage canvas { display: block; width: 100%; height: 100%; }
.nv-wave-stage.is-loading canvas { opacity: .6; }
.nv-wave-head {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, .62);
  pointer-events: none;
}
.nv-wave-head[hidden] { display: none; }
.nv-wave-stage .nv-audio-time {
  position: absolute;
  right: 8px;
  bottom: 5px;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(10, 10, 12, .7);
  color: rgba(255, 255, 255, .88);
  font-size: .62rem;
  pointer-events: none;
}
@media (max-width: 560px) {
  .nv-audio-controls.nv-waveform-controls { grid-template-columns: 32px minmax(0, 1fr); gap: 7px; }
  .nv-wave-stage { height: 62px; }
}

/* Private editor wiring; visual controls above stay identical to NiceVois. */
.nv-wave-player{--purple-dark:#b8471d;--purple:#d95721}
.nv-wave-player .nv-audio-source{display:none!important}
.nv-wave-player .wave-lane input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer;min-width:0}
.nv-wave-player .wave-lane:focus-within{outline:2px solid #e96818;outline-offset:2px}
.wave-error{grid-column:1/-1;color:#ad302b;font-size:11px}.wave-error:empty{display:none}
.input-panel .nv-wave-player{margin-top:16px}.output-panel{min-width:0}

/* Same circular upload remove control as the other NiceVois tools. */
.audio-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #dfcfc6;
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, .94);
  color: #705b50;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(70, 48, 35, .1);
}
.audio-remove[hidden] { display: none; }
.audio-remove:hover { border-color: #efb69a; background: #fff7f2; color: var(--purple-dark); }
.audio-remove:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.audio-remove:disabled { cursor: wait; opacity: .55; }

.song-input-box{position:relative;min-width:0;--purple-dark:#b8471d;--purple:#d95721}.song-input-box .dropzone.has-file{padding-right:60px;padding-left:20px}

/* Original transcription corrections are distinct from changing the song. */
.original-preview{display:block;width:100%;padding:18px;white-space:pre-wrap;overflow:auto;overflow-wrap:break-word;font-size:16px;line-height:1.8;color:var(--ink);cursor:default;caret-color:transparent;outline:none}
.original-preview[hidden]{display:none}
.original-preview:focus-visible{outline:2px solid var(--orange);outline-offset:-2px}
.original-lyrics-toggle{position:absolute;top:9px;right:8px;z-index:3;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid var(--border);border-radius:9px;background:#fff;color:var(--ink);cursor:pointer;touch-action:manipulation}
.original-lyrics-toggle svg{width:19px;height:19px;pointer-events:none}
.original-lyrics-toggle[hidden],.original-lyrics-toggle svg[hidden]{display:none}
.original-lyrics-toggle:hover{background:var(--soft)}
.original-lyrics-toggle:focus-visible{outline:2px solid var(--orange);outline-offset:2px}
.original-lyrics-toggle:disabled{cursor:wait;opacity:.5}

/* Existing NiceVois ETA pill, shared palette and spinner. */
.active-eta-badge{--purple:var(--orange);--purple-dark:var(--orange-dark);display:inline-flex;gap:9px;align-items:center;border:1px solid #efb18b;border-radius:999px;padding:9px 13px;background:#fff2e8;color:var(--purple-dark);font-size:.8rem;box-shadow:0 2px 8px rgba(217,87,33,.08)}
.active-eta-badge i{width:16px;height:16px;flex:0 0 auto;border:2px solid #f2cbb4;border-top-color:var(--purple);border-radius:50%;animation:eta-spin .8s linear infinite}
.active-eta-badge strong{font-weight:850}
.flow-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
.flow-steps li{min-width:0;flex-direction:column;align-items:flex-start;gap:8px;white-space:normal}
.flow-steps li>.flow-step-label,.flow-steps li[aria-current]>.flow-step-label,.flow-steps li.complete>.flow-step-label{display:flex;align-items:center;justify-content:flex-start;gap:8px;width:auto;height:auto;border-radius:0;background:transparent;color:inherit;font-size:inherit;font-weight:inherit}
.flow-step-number{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;border-radius:50%;background:#eaeaea;color:var(--muted);font-size:11px;font-weight:700}
.flow-steps li[aria-current] .flow-step-number{background:var(--orange);color:#fff}
.flow-steps li.complete .flow-step-number{background:var(--orange-soft);color:var(--orange)}
.flow-steps li>.step-eta,.flow-steps li[aria-current]>.step-eta,.flow-steps li.complete>.step-eta{width:auto;height:auto;max-width:100%;gap:5px;padding:5px 8px;font-size:10px;font-weight:600;line-height:1.3;white-space:normal;border-radius:999px;background:#fff2e8;color:var(--orange-dark)}
.step-eta i{width:12px;height:12px}
.job-eta{margin-bottom:15px}
@keyframes eta-spin{to{transform:rotate(360deg)}}
@media(max-width:760px){.flow-steps li>.flow-step-label{gap:5px;font-size:10px}.flow-step-number{flex-basis:20px;width:20px;height:20px;font-size:10px}.flow-steps li{padding-right:5px}.flow-steps li>.step-eta{padding:5px 6px;font-size:9px}}
@media(prefers-reduced-motion:reduce){.active-eta-badge i{animation:none}}

/* Song Generator output header, reveal and lyric styles, copied from live source. */
.vc-result { display: grid; gap: 8px; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--soft); }
.vc-result-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vc-result-top strong { font-size: .86rem; }
.vc-download {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--purple-dark);
  white-space: nowrap;
}
.song-reveal {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px 0;
  border: 0; background: none; color: var(--ink); font: inherit; font-size: .88rem; font-weight: 650;
  text-align: left; cursor: pointer;
}
.song-reveal-sign {
  position: relative; display: inline-block; flex: none; width: 26px; height: 26px;
  border: 0; border-radius: 0; background: transparent;
}
.song-reveal-sign::before, .song-reveal-sign::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.6px; border-radius: 2px;
  background: var(--ink); transform: translate(-50%, -50%); transition: background-color .15s ease, transform .15s ease;
}
.song-reveal-sign::after { transform: translate(-50%, -50%) rotate(90deg); }
.song-reveal[aria-expanded="true"] .song-reveal-sign::after { transform: translate(-50%, -50%) rotate(0deg); }
.song-reveal:hover, .song-reveal:focus-visible { color: var(--purple-dark); }
.song-reveal:hover .song-reveal-sign::before, .song-reveal:hover .song-reveal-sign::after,
.song-reveal:focus-visible .song-reveal-sign::before, .song-reveal:focus-visible .song-reveal-sign::after { background: var(--purple); }
.song-reveal:focus-visible { outline: none; }
.song-reveal:focus-visible .song-reveal-sign { outline: 2px solid var(--purple); outline-offset: 2px; }

.song-inspiration-panel { display: grid; gap: 10px; }
.song-inspiration-panel[hidden] { display: none; }
#song-generator .song-drop { display: grid; justify-items: center; gap: 4px; min-height: 96px; padding: 18px; text-align: center; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
#song-generator #song-drop[hidden] { display: none; }
#song-generator .song-drop:hover, #song-generator .song-drop.is-dragging { border-color: var(--purple); background: var(--purple-soft); }
#song-generator .song-drop strong { font-size: .92rem; color: var(--ink); }
#song-generator .song-drop span { color: var(--muted); font-size: .78rem; }
.song-inspiration { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; }
.song-inspiration[hidden] { display: none; }
.song-inspiration-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .84rem; }
.song-inspiration-remove { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.song-inspiration-remove:hover { background: var(--purple-soft); color: var(--purple-dark); }
.song-consent { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); }
.song-inspiration-status, .song-reference-lyrics p { margin: 0; color: var(--muted); font-size: .8rem; }
.song-reference-lyrics { display: grid; gap: 8px; }
.song-reference-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.song-reference-choices button {
  min-height: 44px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 9px;
  background: #fff; color: var(--ink); font: inherit; font-size: .8rem; font-weight: 600;
  line-height: 1.25; cursor: pointer;
}
.song-reference-choices button:hover, .song-reference-choices button[aria-pressed="true"] {
  border-color: var(--purple); background: var(--purple-soft); color: var(--purple-dark);
}
.song-reference-choices button:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.song-reference-lyrics[hidden], #song-generator #song-lyrics-mode[hidden],
#song-generator #song-lyrics-mode option[hidden] { display: none; }

/* Fields: the same dropdown as the other tools (sep-option), stacked. */
#song-generator .song-option { display: grid; gap: 6px; }
#song-generator .song-option select { width: 100%; min-width: 0; }
#song-generator .song-option select:focus { outline: 2px solid var(--purple); outline-offset: 1px; }
.song-field { display: grid; gap: 6px; }
.song-lyric-note[hidden] { display: none; }
.song-optional { margin-left: 6px; color: var(--muted); font-size: .68rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
#song-generator .song-card input[type="text"], .song-title-edit {
  width: 100%; padding: 10px 12px; border: 1px solid #e2d6ce; border-radius: 9px; background: #fff;
  color: var(--ink); font: inherit; font-size: .9rem;
}
#song-generator .song-card input[type="text"]:hover { border-color: #d9c6b9; }
#song-generator .song-card input[type="text"]:focus, .song-title-edit:focus { outline: 2px solid var(--purple); outline-offset: 1px; }
.song-title-edit { padding: 5px 9px; font-size: .86rem; font-weight: 600; min-width: 0; flex: 1; }
#song-generator .song-card textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #e2d6ce; border-radius: 9px; background: #fff;
  color: var(--ink); font: inherit; font-size: .9rem; line-height: 1.5; resize: vertical;
}
#song-generator .song-card textarea:hover { border-color: #d9c6b9; }
#song-generator .song-card textarea:focus { outline: 2px solid var(--purple); outline-offset: 1px; }
#song-generator .song-card textarea[hidden], .song-lyrics-file[hidden], .song-error[hidden] { display: none; }
.song-lyrics-editor { display: grid; gap: 6px; min-width: 0; }
.song-lyrics-editor[hidden] { display: none; }
.song-lyrics-heading { display: flex; align-items: center; gap: 8px; }
#song-generator #song-lyrics { min-height: 92px; max-height: 240px; resize: none; overflow-y: auto; }
.song-lyrics-guide { position: relative; display: inline-flex; }
.song-lyrics-help { position: fixed; z-index: 100; box-sizing: border-box; width: min(300px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; padding: 10px 12px; border: 1px solid #dfd4cc; border-radius: 9px; background: #fffaf6; color: #3c3029; box-shadow: 0 6px 22px #34221620; font: 500 .82rem/1.45 system-ui, sans-serif; }
.song-lyrics-help[hidden] { display: none; }
.song-lyrics-help p { margin: 0; }
.song-lyrics-help details { margin-top: 8px; border-top: 1px solid #ebded5; }
.song-lyrics-help summary { padding-top: 7px; color: #8b3b16; font-weight: 650; cursor: pointer; }
.song-lyrics-help dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 10px; margin: 8px 0; }
.song-lyrics-help dt { font-weight: 650; }
.song-lyrics-help dd { margin: 0; }
.song-lyrics-file { display: block; padding: 10px 12px; border: 1px dashed #e2d6ce; border-radius: 9px; color: var(--muted); font-size: .84rem; cursor: pointer; }
.song-lyrics-file:hover, .song-lyrics-file.is-dragover, .song-lyrics-file:focus-within { border-color: var(--purple); color: var(--purple-dark); background: #fff7f0; }
.song-lyrics-file input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.song-create { width: 100%; }
.song-taste[hidden], .song-taste [hidden] { display: none; }
.song-taste { min-width: 0; border-top: 1px solid var(--border); }
.song-taste-header { display: flex; align-items: center; gap: 5px 12px; }
.song-taste-summary { flex: 1 1 auto; width: auto; min-width: 0; min-height: 44px; color: var(--muted); font-size: .82rem; }
.song-taste-header .song-taste-use { flex: none; }
.song-taste-body { border: 1px solid var(--border); border-radius: 10px; padding: 11px; background: #fff; }
.song-taste-body > p { color: var(--muted); font-size: .78rem; margin: 0; }
.song-taste-use,.song-taste-consent { font-size: .78rem; color: var(--muted); }
.song-taste-use { position: relative; display: flex; width: fit-content; align-items: center; gap: 9px; min-height: 44px; cursor: pointer; color: var(--ink); font-weight: 650; }
.song-taste-use input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.song-taste-switch { position: relative; flex: none; width: 40px; height: 23px; border: 1px solid var(--border); border-radius: 999px; background: var(--soft); }
.song-taste-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--muted); }
.song-taste-use input:checked + .song-taste-switch { background: var(--purple-dark); border-color: var(--purple-dark); }
.song-taste-use input:checked + .song-taste-switch::after { left: 20px; background: white; }
.song-taste-use input:focus-visible + .song-taste-switch { outline: 2px solid var(--purple); outline-offset: 3px; }
.song-taste-consent { display: flex; margin: 9px 0; }
.song-taste-slots { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; max-width: 570px; }
.song-taste-tile { min-width: 0; position: relative; }
.song-taste-tile button:not(.song-taste-remove), .song-taste-filled {
  box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 65px; aspect-ratio: 1.27; max-height: 96px; gap: 4px; padding: 6px;
  color: var(--muted); background: var(--soft); border: 1px dashed var(--border); border-radius: 10px; font: inherit;
}
.song-taste-tile button:not(.song-taste-remove) { cursor: pointer; }
.song-taste-tile button:hover,.song-taste-tile button:focus-visible,.song-taste-tile.is-dragging button {
  border-color: var(--purple); color: var(--purple-dark); background: var(--purple-soft); box-shadow: 0 0 10px #e9681826;
}
.song-taste-plus { color: var(--purple-dark); font-size: 1.25rem; line-height: 1; }
.song-taste-tile small,.song-taste-tile strong { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .69rem; }
.song-taste-filled { border-style: solid; padding: 21px 5px 4px; }
.song-taste-remove { position: absolute; top: 2px; right: 3px; width: 26px; height: 24px; border: 0; background: transparent; border-radius: 6px; color: var(--muted); cursor: pointer; }
.song-taste-status,.song-taste details { margin: 8px 0 0; }
.song-taste details { font-size: .78rem; }
.song-taste details summary { cursor: pointer; color: var(--purple-dark); font-weight: 600; }
.song-taste details p { margin: 6px 0; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 430px) { .song-taste-body { padding: 8px; } .song-taste-slots { gap: 4px; } }
.song-error { margin: 0; color: var(--red); font-size: .84rem; }
.song-rap-tip { margin: -4px 0 0; color: var(--muted); font-size: .72rem; font-style: italic; line-height: 1.45; }
.song-rap-tip[hidden], .song-test-voice-row .vc-combo-option[hidden] { display: none; }

/* Results: the conversion tool's result rows, plus the extra actions in its link style. */
.song-like { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.song-like svg { width: 19px; height: 19px; }
.song-like[aria-pressed="true"] { color: #cf4663; }
.song-like[aria-pressed="true"] svg { fill: currentColor; }
.song-like:hover,.song-like:focus-visible { color: var(--purple-dark); background: var(--purple-soft); }
.song-like:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.song-playback-status { grid-column: 1 / -1; color: var(--muted); font-size: .74rem; }
.song-playback-status[hidden] { display: none; }
@media (pointer: coarse) { .song-like { width: 44px; height: 44px; } }
.song-result .vc-result-top { gap: 10px; }
.song-showcase { margin-bottom: 24px; }
.song-showcase .splitter-section-head { margin-bottom: 16px; }
.song-showcase .splitter-section-head h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.55rem); }
.song-showcase .vc-workspace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.song-showcase .vc-output-side { min-height: 0; display: grid; gap: 10px; }
.song-menu { position: relative; flex: none; }
.song-menu-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: 36px; height: 34px;
  border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.song-menu-button i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); transition: background-color .15s ease; }
.song-menu-button:hover, .song-menu-button[aria-expanded="true"] { border-color: var(--border); background: #fff; }
.song-menu-button:hover i, .song-menu-button[aria-expanded="true"] i { background: var(--purple); }
.song-menu-button:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.song-menu-panel {
  position: fixed; z-index: 60; display: grid; min-width: 210px; padding: 6px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: 0 12px 32px rgba(40, 20, 10, .14);
}
.song-menu-panel[hidden] { display: none; }
.song-menu-panel hr { margin: 5px 4px; border: 0; border-top: 1px solid var(--border); }
.song-menu-item {
  display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--ink); font: inherit; font-size: .84rem; font-weight: 550; text-align: left; cursor: pointer;
}
.song-menu-item:hover, .song-menu-item:focus-visible { background: var(--purple-soft); color: var(--purple-dark); outline: none; }
.song-menu-item:disabled { color: var(--muted); cursor: progress; }
.song-menu-item.is-danger:hover, .song-menu-item.is-danger:focus-visible { background: #fdecea; color: var(--red); }
.song-lyrics-view { white-space: pre-wrap; margin: 0; padding: 10px 12px; border-radius: 9px; background: #fff; border: 1px solid var(--border); color: var(--muted); font: inherit; font-size: .78rem; line-height: 1.55; max-height: 220px; overflow: auto; }
.song-lyrics-view[hidden] { display: none; }
.song-lyric-line { display: block; overflow-wrap: anywhere; }
.song-lyric-word.is-playing { color: #a84311; font-weight: 700; }
.song-lyrics-toggle { width: auto; justify-self: start; gap: 5px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.song-lyrics-toggle .song-reveal-sign { width: 18px; height: 22px; }

.result-card{--purple:#d95721;--purple-dark:#b8471d;--purple-soft:#fff3ed}
.result-card .vc-result-top{gap:10px;flex-wrap:nowrap;min-width:0}
.result-card h3.song-result-title{flex:1;min-width:0;margin:0;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.86rem;line-height:1.4;font-weight:700;letter-spacing:0}
.result-card .song-result-length{margin-left:auto;color:var(--muted);font-size:.74rem;font-variant-numeric:tabular-nums;white-space:nowrap}
.result-card .main-download{flex:none;min-height:44px;text-decoration:underline}
.result-card .main-download:hover{color:var(--purple);text-underline-offset:2px}
.result-card .main-download[aria-busy=true]{opacity:.6;cursor:wait}
.result-card .result-meta{margin:0;font-size:10px}
.result-card .output-menu{margin:0!important;padding:0!important;border:0!important}
.output-menu>summary{list-style:none}.output-menu>summary::-webkit-details-marker{display:none}
.song-menu-panel{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto}
.result-lyrics{min-width:0;display:grid;gap:8px}
.result-card .song-lyrics-toggle{color:var(--ink);font-size:.88rem;font-weight:650;min-height:36px}
.lyric-timing-note{margin:0;font-size:10px;line-height:1.5;color:var(--muted)}
.compare-original{margin-top:0!important;padding-top:8px!important;border-top:1px solid var(--border)!important}
.compare-original>summary{font-size:.78rem;font-weight:600;min-height:36px;list-style:none}
.compare-original>summary::-webkit-details-marker{display:none}
.compare-original>summary .song-reveal-sign{width:18px;height:22px}

.result-card .song-reveal:hover,.result-card .song-reveal:focus-visible{color:var(--ink)}
.result-card .song-reveal:hover .song-reveal-sign::before,.result-card .song-reveal:hover .song-reveal-sign::after,.result-card .song-reveal:focus-visible .song-reveal-sign::before,.result-card .song-reveal:focus-visible .song-reveal-sign::after{background:var(--ink)}

.status-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-top:12px}
.status-row>.status{margin:0;flex:1 1 190px;min-width:0}
.status-row:has(>.status:empty):has(>.status-eta[hidden]){display:none}
.status-eta{flex:0 0 auto;max-width:100%;padding:6px 10px;font-size:.74rem;line-height:1.35}
.status-eta i{width:14px;height:14px}
.status.ready{color:#25764b;font-weight:600}
.lyric-input-choice{margin:16px 0 18px;padding:16px;background:#fff6ef;border:1px solid #ead8cb;border-radius:13px}.lyric-input-choice>p:first-child{margin:0 0 13px;font-size:14px;line-height:1.6;color:#5d534b}.transcription-action{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.transcribe-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:12px 18px;border:1px solid #c64d16;border-radius:10px;background:#d7581a;color:#fff;font:inherit;font-weight:650;cursor:pointer}.transcribe-button svg{width:19px;height:19px}.transcribe-button:disabled{opacity:.72;cursor:default}.transcribe-button[aria-busy="true"] svg{display:none}.transcribe-button[aria-busy="true"]:before{content:"";width:16px;height:16px;border:2px solid #fff6;border-top-color:white;border-radius:50%;animation:spin .8s linear infinite}.lyric-input-choice .help{margin-bottom:0;font-size:12px}.lyric-input-choice[hidden]{display:none!important}@media(max-width:600px){.lyric-input-choice{padding:14px}.transcription-action{gap:10px}.transcribe-button{width:100%}.import-lyrics-button{white-space:normal;text-align:right}}

.pronunciation-panel{margin:20px 0;padding:16px 0;border-top:1px solid var(--line,#e5dfda);border-bottom:1px solid var(--line,#e5dfda)}.pronunciation-panel summary{cursor:pointer;font-weight:650;font-size:16px}.pronunciation-panel summary span{font-size:13px;color:#85807c;font-weight:400;margin-left:8px}.pronunciation-fields{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:end;margin:14px 0}.pronunciation-fields label{font-size:13px;font-weight:600;display:block}.pronunciation-fields input{box-sizing:border-box;width:100%;min-width:0;border:1px solid #ddd6d1;border-radius:10px;background:#fcfaf9;padding:12px;font:inherit;font-size:15px;color:#242424;margin-top:7px}.pronunciation-connector{font-size:13px;color:#706a65;align-self:center;padding-top:20px;white-space:nowrap}.pronunciation-word{position:relative;min-width:0}#pronunciation-options{position:absolute;z-index:20;left:0;right:0;top:100%;margin-top:4px;background:white;border:1px solid #ddd6d1;border-radius:10px;box-shadow:0 7px 24px #0002;max-height:200px;overflow-y:auto}#pronunciation-options button{display:block;width:100%;padding:11px 12px;border:0;background:transparent;text-align:left;font:inherit;font-size:15px;color:#292929}#pronunciation-options button:hover,#pronunciation-options button:focus{background:#fff0e6;outline:2px solid #d7581a;outline-offset:-2px}.pronunciation-saved-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #eee7e2;margin-top:10px;padding-top:10px;font-size:14px}.pronunciation-saved-row span{overflow-wrap:anywhere}.pronunciation-saved-row button{flex:none}.pronunciation-panel[hidden],#pronunciation-options[hidden]{display:none!important}@media(max-width:600px){.pronunciation-fields{grid-template-columns:1fr;gap:8px}.pronunciation-connector{padding:0;align-self:start}.pronunciation-fields input{font-size:16px}.pronunciation-fields label{font-size:14px}}

.import-lyrics-button{display:inline-flex;gap:7px;align-items:center;white-space:nowrap}.import-lyrics-button svg,.import-file-button svg,.import-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.lyrics-import-dialog{box-sizing:border-box;width:min(880px,calc(100vw - 28px));max-height:90dvh;border:1px solid #ded6d0;border-radius:20px;padding:26px;color:#242424;background:#fffdfb;overflow:auto}.lyrics-import-dialog::backdrop{background:#1c1714a6;backdrop-filter:blur(3px)}.import-dialog-heading{display:flex;align-items:start;justify-content:space-between;gap:16px;margin-bottom:18px}.import-dialog-heading h2{margin:7px 0 0;font-size:25px}.import-dialog-heading .eyebrow{font-size:10px;letter-spacing:.12em}.import-close{width:34px;height:34px;display:grid;place-items:center;flex:none;border:1px solid #e1dad5;border-radius:50%;background:#fff;cursor:pointer;color:#333}.import-file-button{width:100%;border:1px dashed #cfc3ba;background:#fff9f4;border-radius:12px;padding:20px;display:flex;flex-direction:column;align-items:center;gap:8px;color:#2a2420;font:inherit;cursor:pointer}.import-file-button svg{width:24px;height:24px;color:#b74c20}.import-file-button span{font-weight:650}.import-file-button small{font-size:12px;color:#79716a}.import-file-button.drag-over{background:#ffeddf;border-color:#d7581a}.import-filename{font-size:13px;color:#71665e;overflow-wrap:anywhere}.import-paste-label,.import-preview-grid label,.import-preview-grid h3{display:block;font-size:14px;font-weight:650;margin:12px 0 9px}.import-text,.import-preview,.import-reference{box-sizing:border-box;display:block;width:100%;border:1px solid #dfd7d1;border-radius:11px;padding:15px;background:#fff;font:inherit;font-size:16px;line-height:1.65;color:#292929;white-space:pre-wrap;overflow-wrap:anywhere;resize:vertical}.import-text{height:220px;font:16px/1.65 system-ui}.import-preview,.import-reference{height:290px;overflow:auto;margin:0;font:15px/1.65 system-ui}.import-reference{background:#f7f5f3;color:#625b55;resize:none}.import-preview-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.import-preview-grid>div{min-width:0}.import-dialog-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin-top:18px}.import-dialog-actions>button:first-child{margin-right:auto}.import-dialog-actions .replace-button{padding:12px 18px}.import-summary{font-size:13px;color:#74695f}.import-warnings p{font-size:13px;color:#7e5b36;background:#fff7e8;padding:10px 12px;border-radius:8px}.lyrics-import-dialog [hidden]{display:none!important}.lyrics-import-dialog .help{font-size:13px;line-height:1.55}.lyrics-import-dialog .status{margin-top:15px}@media(max-width:600px){.lyrics-import-dialog{padding:19px 16px;border-radius:16px;max-height:88dvh}.import-dialog-heading h2{font-size:22px}.import-preview-grid{grid-template-columns:1fr;gap:8px}.import-reference{height:115px}.import-preview{height:240px;font-size:16px}.import-dialog-actions{gap:10px}.import-file-button small{text-align:center;line-height:1.5}.import-lyrics-button{font-size:13px;gap:5px}.import-text{height:190px}}

.lyrics-import-dialog .status:empty{display:none}.lyrics-import-dialog .import-dialog-actions{position:sticky;bottom:-26px;z-index:3;background:#fffdfb;border-top:1px solid #eee7e1;padding:13px 0 5px}@media(max-width:600px){.lyrics-import-dialog .import-dialog-actions{bottom:-19px}}

/* The original intake is one editable box with its transcription choice above the words. */
.editor-wrap.original-input{position:relative;display:flex;flex-direction:column}
.lyric-input-choice{position:relative;flex:none;top:auto;left:auto;right:auto;margin:0;padding:13px 12px 0;border:0;background:transparent;border-radius:0;display:flex;justify-content:center;z-index:3}
.editor-wrap.reviewing .lyric-input-choice{min-height:57px;padding-inline:57px}
.lyric-input-choice .transcription-action{justify-content:center;gap:7px;max-width:100%}
.lyric-input-choice .transcribe-button{width:auto;min-height:36px;padding:8px 15px;border-radius:999px;border-color:#d9d0c9;background:#fffdfa;color:#4f4842;font-size:12px;font-weight:600;box-shadow:0 1px 3px #00000006}
.lyric-input-choice .transcribe-button svg{width:15px;height:15px}
.lyric-input-choice .transcribe-button:hover:not(:disabled){color:#b84b19;border-color:#d7581a;background:#fff4eb}
.lyric-input-choice .transcribe-button[aria-busy="true"]{color:#b84b19;border-color:#e0b296;background:#fff4eb}
.lyric-input-choice .transcribe-button[aria-busy="true"]:before{border-color:#e7bca2;border-top-color:#b84b19;width:13px;height:13px}
.lyric-input-choice #transcribe-note{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.lyric-input-choice .status-eta{font-size:11px;padding:7px 9px}
.lyric-input-choice[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){.transcribe-button[aria-busy="true"]:before{animation:none}}

.cancel-upload-button {
  min-height: 36px;
  margin-inline-start: auto;
  padding: 7px 13px;
  border: 1px solid var(--line, #dcd6d2);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: #7c4130;
  font: inherit;
  font-size: .87rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.cancel-upload-button:hover { background: #fff6f1; border-color: #d8a18c; }
.cancel-upload-button:focus-visible { outline: 2px solid #b64d25; outline-offset: 2px; }

.lyric-changer-guide { margin-top: 24px; }
.lyric-changer-guide ol { padding-inline-start: 1.4rem; }
.lyric-changer-guide li { margin-block: .45rem; }
.lyric-changer-guide p { margin-bottom: 0; }
footer a { color: inherit; }

.lyric-comparison-label,
#confirmed-lyrics {
  display: none;
}

.editing .lyric-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  max-height: calc(var(--lyric-pane-height) + 40px);
  overflow: auto;
  scrollbar-gutter: stable;
  --lyric-pane-padding: 18px;
  --lyric-pane-height: 280px;
}

.editing .lyric-comparison-label {
  position: sticky;
  top: 0;
  z-index: 1;
  display: block;
  margin: 0;
  background: var(--soft);
  padding: 10px var(--lyric-pane-padding);
  border-block-end: 1px solid var(--border);
  color: var(--ink);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.35;
}

.editing #confirmed-lyrics-label,
.editing #confirmed-lyrics {
  box-shadow: inset -1px 0 var(--border);
  background: #f5f2ef;
}

.editing .lyric-draft {
  min-width: 0;
  position: relative;
}

.editing :is(#confirmed-lyrics, .lyric-backdrop, #lyrics) {
  display: block;
  padding: var(--lyric-pane-padding);
  font-size: 16px;
  line-height: 1.8;
  tab-size: 4;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.editing :is(#confirmed-lyrics, .lyric-backdrop) {
  min-height: var(--lyric-pane-height);
}

/* The rendered draft expands its column as lines wrap. The textarea covers
   that full height, so keyboard focus and wheel scroll use the same viewport. */
.editing .lyric-backdrop {
  position: static;
  overflow: visible;
}

.editing #lyrics {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  max-height: none;
  resize: none;
  overflow: hidden;
}

.editing #confirmed-lyrics {
  cursor: default;
}

@media (forced-colors: active) {
  .editing .lyric-backdrop { visibility: hidden; }
}

.editing #confirmed-lyrics:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

@media (max-width: 600px) {
  .editing .lyric-comparison {
    --lyric-pane-padding: 9px;
    --lyric-pane-height: 245px;
  }
}

/* The left column sizes the desktop row. Long result and upload lists scroll
   within their own regions so they do not pull the right column out of line. */
.workspace {
  gap: 14px 20px;
}

.workspace :is(.input-panel, .output-panel) {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.workspace .card {
  margin: 0;
  padding: 18px;
}

.workspace .section-label { margin-bottom: 10px; }
.workspace .dropzone { min-height: 116px; padding-block: 17px; }
.workspace .dropzone.has-file { min-height: 70px; padding-block: 12px; }
.input-panel .nv-wave-player { margin-top: 12px; }
.workspace .status-row { margin-top: 9px; }
.workspace .replace-panel { margin-top: 12px; padding: 12px; }
.workspace .pronunciation-panel { margin-block: 13px; padding-block: 10px; }
.history-notice:empty { display: none; }

.edit-history .output-heading {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.edit-history #results {
  max-height: 410px;
  padding-bottom: 0;
}

.edit-history .empty { padding: 24px 10px 28px; }
.workspace .history { flex: none; padding-block: 12px; }
.workspace .history summary { min-height: 26px; }

#history {
  max-height: 154px;
  overflow: auto;
  overscroll-behavior-y: contain;
}

@media (min-width: 761px) {
  .workspace { align-items: stretch; }
  .workspace .output-panel { position: static; contain: size; }
  .output-panel .edit-history {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    min-height: 0;
  }

  .edit-history #results {
    flex: 0 1 auto;
    min-height: 0;
    max-height: min(65vh, 660px);
  }

  .workspace .output-panel .history { margin-block-start: auto; }
}

@media (min-width: 1000px) {
  .workspace .replace-panel:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    align-items: end;
  }

  .replace-panel > :is(h3, .help, .replace-feedback) { grid-column: 1 / -1; }
  .replace-panel > #replace-all { margin: 0; }
}

.editor-wrap:not(.editing) {
  --original-lyrics-min: 100px;
  --original-lyrics-max: clamp(148px, 40svh, 224px);
}

.editor-wrap:not(.editing) :is(#lyrics, .original-preview) {
  height: auto;
  min-height: var(--original-lyrics-min);
  max-height: var(--original-lyrics-max);
  padding: 14px;
  overflow-y: auto;
}

.editor-wrap:not(.editing) #lyrics {
  height: var(--original-lyrics-min);
  resize: none;
}

.editor-wrap:not(.editing) #lyrics:not(:placeholder-shown) {
  height: min(184px, var(--original-lyrics-max));
}

@supports (field-sizing: content) {
  .editor-wrap:not(.editing) #lyrics {
    field-sizing: content;
  }

  .editor-wrap:not(.editing) #lyrics:not(:placeholder-shown) {
    height: auto;
  }
}

.previous-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  margin-top: 4px;
}

.previous-step svg { width: 16px; height: 16px; }
