.karaoke-view {
  box-sizing: border-box; width: 100%; height: 100%; min-height: 0;
  display: grid; grid-template: 9.2% 5.3% 35% 44% 6.5% / minmax(0, 1fr);
  background: #0c1a22; color: #f9edc8; font-family: Arial, Helvetica, sans-serif;
  container-type: size; overflow: hidden;
}
.karaoke-view[hidden] { display: none; }
.karaoke-actions {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.1%; padding: 1% 1.2% .7%;
  background: #1b373d; min-height: 0;
}
.karaoke-view button {
  border: none; border-radius: 0; box-shadow: none; color: #f9edc8; font: inherit; cursor: pointer;
  text-align: center; white-space: normal; background: #2b676c; padding: 0 2px;
}
.karaoke-actions button { font-size: clamp(10px, min(2cqw, 3.45cqh), 40px); }
.karaoke-view button:hover { background: #38767a; }
.karaoke-view button:focus-visible { outline: 2px solid #ffab5d; outline-offset: -3px; }
.karaoke-title { align-self: center; text-align: center; font-size: clamp(10px, min(1.95cqw, 3.2cqh), 32px); padding: 0 .5em; }
.karaoke-lines, .karaoke-staff { display: block; min-width: 0; min-height: 0; width: 100%; height: 100%; }
.karaoke-staff { width: 97.4%; justify-self: center; background: #e7e2d3; }
.karaoke-footer { align-items: center; display: flex; flex-wrap: nowrap; gap: .6em; padding: 0 2.6%; font-size: clamp(9px, min(1.95cqw, 3.1cqh), 28px); }
.karaoke-footer button { background: transparent; text-align: left; }
.karaoke-mute { margin-left: auto; }
.karaoke-sr { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
@media (pointer: coarse) { .karaoke-keys { display: none; } }
/* Keep the controls readable on an upright phone. Canvas artwork is fitted
   proportionally in JavaScript, including when rotating during a song. */
@container (aspect-ratio < 1) {
  .karaoke-actions button { font-size: clamp(12px, 3.2cqw, 18px); }
  .karaoke-title { font-size: clamp(16px, 4.6cqw, 24px); }
  .karaoke-footer { font-size: clamp(12px, 3.2cqw, 18px); }
  .karaoke-keys { display: none; }
}
