.lyric-page { --shell: 67.5rem; }
.lyric-page .page-intro { max-width: 66ch; }
.lyric-setup, .lyric-timing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: start;
  gap: 1.2rem;
}
.lyric-setup textarea { margin-bottom: .7rem; }
.lyric-setup small { display: block; margin-top: .4rem; }
.lyric-page .lyric-status { margin: .65rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.lyric-status:empty { display: none; }
.lyric-playback audio { display: block; width: 100%; margin-bottom: .8rem; }
.lyric-speed { display: flex; gap: .5rem; align-items: center; }
.lyric-speed select {
  min-height: 42px;
  padding: .4rem .6rem;
  border: 1px solid #617096;
  border-radius: .55rem;
  background: var(--navy);
  color: var(--text);
  font: inherit;
}
.lyric-waveform {
  display: grid;
  min-width: 0;
  gap: .25rem;
  padding: .5rem .8rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--navy);
}
.lyric-waveform canvas { display: block; width: 100%; height: clamp(3rem, 9vw, 5.25rem); cursor: pointer; }
.lyric-waveform input {
  width: 100%;
  min-height: 28px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.lyric-clock {
  display: flex;
  justify-content: space-between;
  margin: .4rem 0 0;
  font-variant-numeric: tabular-nums;
}
.lyric-preview {
  margin: .8rem 0 0;
  padding: .65rem .8rem;
  border-inline-start: 3px solid var(--accent);
  background: var(--navy);
  color: var(--text);
  font-size: clamp(1.12rem, 3vw, 1.5rem);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lyric-preview .sung { color: var(--accent); }
.lyric-preview .singing { color: var(--focus); }
.lyric-modes, .lyric-actions, .lyric-words {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.lyric-page button { min-height: 44px; }
.lyric-modes button[aria-pressed="true"], .lyric-words button[aria-pressed="true"] {
  border-color: var(--accent);
  background: #142d3e;
  color: var(--accent);
}
.lyric-progress { margin: 0 0 .85rem; font-size: .925rem; }
.lyric-current { min-width: 0; }
.lyric-current h3 { margin: 0 0 .85rem; line-height: 1.5; letter-spacing: 0; overflow-wrap: anywhere; }
.lyric-words { margin-bottom: .9rem; }
.lyric-words button {
  display: grid;
  justify-items: start;
  max-width: 100%;
  min-width: 0;
  padding: .35rem .65rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.lyric-words small { font-variant-numeric: tabular-nums; }
.lyric-shortcut { display: block; margin-top: .45rem; }
.lyric-adjust, .lyric-export {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: flex-end;
  margin-top: 1rem;
}
.lyric-adjust > div, .lyric-export > div { flex: 1 1 9rem; min-width: 0; }
.lyric-adjust input { font-variant-numeric: tabular-nums; }
.lyric-lines {
  position: relative;
  display: grid;
  gap: .35rem;
  max-height: 24rem;
  min-width: 0;
  overflow: auto;
  list-style: none;
  padding: .35rem;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--navy);
}
.lyric-lines button {
  display: grid;
  grid-template-columns: 5.1rem minmax(0, 1fr);
  gap: .35rem;
  width: 100%;
  padding: .5rem .65rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  text-align: start;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.lyric-lines button:hover { background: var(--surface); }
.lyric-lines button[aria-pressed="true"] { border-color: #587d91; background: #152640; }
.lyric-lines button:focus-visible { outline-offset: -2px; }
.lyric-line-time { color: var(--accent); font-variant-numeric: tabular-nums; font-size: .85rem; align-self: center; }
.lyric-export { padding-top: 1rem; border-top: 1px solid var(--line); }
.lyric-export > div { max-width: 21rem; }
.lyric-export button { align-self: center; }
.lyric-export .lyric-status { flex-basis: 100%; margin: 0; }
@media (max-width: 42rem) {
  .lyric-setup, .lyric-timing-grid { grid-template-columns: minmax(0, 1fr); }
  .lyric-lines { max-height: 16rem; }
  .lyric-export > div { max-width: none; }
}
@media (max-width: 27rem) {
  .lyric-adjust > div, .lyric-export > div { flex-basis: 100%; }
  .lyric-setup, .lyric-playback, .lyric-editor { padding: .9rem; }
}
