.ensemble-cue {
  color: var(--ink, #203c36);
  --ec-green: #145b4d;
  --ec-border: #d4dfd5;
}
.ensemble-cue .ec-lead { margin: 0 0 .9rem; line-height: 1.75; font-size: 1.04rem; }
.ensemble-cue .ec-lead strong:first-child { color: #216789; }
.ensemble-cue .ec-lead strong:last-child { color: #6e4895; }
.ec-score { color: #203c36; border: 1px solid var(--ec-border); border-radius: .85rem; overflow: hidden; background: white; }
.ec-score-top,.ec-beat-line { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.ec-score-top { padding: .65rem .9rem; color: #405b52; }
.ec-score-top span { font-size: .88rem; }
.ec-bars { grid-area: 1 / 2; display: grid; align-items: end; color: #65786f; }
.ec-bars span { text-align: center; font: 600 .87rem/1.65 system-ui,sans-serif; background: #f1f4ee; border-inline-end: 1px solid white; }
.ec-bars .is-current { color: #fff; background: var(--ec-green); }
.ec-print { display: grid; align-items: start; margin: .25rem clamp(.3rem, 2vw, 1rem) .65rem; }
.ec-clef { grid-area: 2 / 1; }
.ec-staff { grid-area: 2 / 2; }
.ec-clef,.ec-staff { position: relative; overflow: hidden; width: 100%; }
.ec-music img { position: absolute; max-width: none; pointer-events: none; }
.ec-band,.ec-cursor { position: absolute; display: block; pointer-events: none; }
.ec-band { bottom: 0; top: 0; background: rgb(67 144 110 / .08); border-inline: 1px solid rgb(34 103 76 / .20); }
.ec-cursor { top: 7%; bottom: 9%; width: 2px; background: var(--ec-green); box-shadow: -3px 0 0 rgb(38 119 91 / .14); }
.ensemble-cue [hidden] { display: none !important; }
.ec-beat-line { background: #f2f6ef; border-top: 1px solid var(--ec-border); padding: .45rem .85rem; }
.ec-position { font-weight: 700; font-size: .9rem; }
.ec-beats { display: flex; gap: .32rem; }
.ec-beats i { font: 600 .8rem/1.72rem system-ui,sans-serif; color: #536a61; border: 1px solid #ccd9cf; border-radius: 50%; width: 1.8rem; height: 1.8rem; text-align: center; }
.ec-beats .is-current { color: white; background: var(--ec-green); border-color: var(--ec-green); }
.ensemble-cue[data-beat-cue=cello] .ec-beats .is-current { background: #236988; border-color: #236988; }
.ensemble-cue[data-beat-cue=viola] .ec-beats .is-current { background: #704e96; border-color: #704e96; }
.ec-controls { margin-top: .9rem; }
.ec-tempo { margin-top: .55rem; display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; font-weight: 650; width: fit-content; max-width: 100%; }
.ec-tempo input { width: clamp(90px,29vw,175px); min-height: 36px; accent-color: var(--ec-green); }
.ec-tempo output { color: #34594c; min-width: 4.4rem; font: 650 .9rem/1.5 system-ui,sans-serif; }
.ec-message,.ec-feedback { color: #425a51; font-size: .95rem; line-height: 1.6; }
.ec-message { margin: .35rem 0 .7rem; }
.ec-actions,.ec-tap-area { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.ensemble-cue button { min-height: 44px; border-radius: .65rem; padding: .45rem .9rem; border: 1px solid #a8bfb0; background: white; color: #204b40; font: inherit; font-weight: 700; cursor: pointer; }
.ensemble-cue .ec-start { background: var(--ec-green); border-color: var(--ec-green); color: white; }
.ec-tap-area { margin-top: .7rem; }
.ensemble-cue .ec-tap { background: #edf3ec; touch-action: manipulation; }
.ensemble-cue .ec-tap:disabled { opacity: .6; }
.ensemble-cue button:focus-visible,.ec-tempo input:focus-visible { outline: 3px solid #bd8127; outline-offset: 2px; }
:root[data-ensemble-color=dark] .ensemble-cue .ec-lead strong:first-child { color: #8fd2f0; }
:root[data-ensemble-color=dark] .ensemble-cue .ec-lead strong:last-child { color: #dab5f1; }
:root[data-ensemble-color=dark] .ensemble-cue :is(.ec-message,.ec-feedback,.ec-tempo output) { color: var(--muted); }
:root[data-ensemble-color=dark] .ensemble-cue button { background: var(--mh-theme-elevated); color: var(--ink); border-color: var(--line); }
:root[data-ensemble-color=dark] .ensemble-cue .ec-start { background: var(--mh-theme-button); color: #fff9ec; }
@media (max-width:480px) {
  .ensemble-cue .ec-lead { font-size: 1rem; }
  .ec-actions button { flex: 1 1 auto; padding-inline: .55rem; }
  .ec-tap-area { align-items: start; flex-direction: column; }
  .ec-tap-area .ec-tap { width: 100%; }
  .ec-tap-area .ec-feedback:empty { display: none; }
}
