/* Accessibility pass: semantic focus, touch sizing, responsive reading, and motion safety. */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
  color: var(--ink);
  background: var(--surface);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

:where(button, [role="button"], summary, .performance-control__trigger, .performance-control__perform,
  .key-option, .performance-option, .chart-section-jump, .chart-stage__back, .stage-paging__control-rail > *) {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

/* Chips are 36px tall by design (verdict change 10); the row around them keeps its 44px height. */
.library-finder__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* The chip stays 36px tall to the eye; an invisible 4px band above and below it lifts the
   touch target to 44px. The bands stay inside the 8px gap between chips and rows, and the
   2px side bands leave 4px between neighbours, so two hit areas never overlap. */
.library-finder__chip,
.setlist-tags__chip {
  position: relative;
}

.library-finder__chip::after,
.setlist-tags__chip::after {
  content: "";
  position: absolute;
  inset: -4px -2px;
}

.chart-unit__chord {
  speak-as: spell-out;
}

/* Lines wrap between words only; see chart_units.css. */
.chart-sheet--units .chart-unit__lyric {
  overflow-wrap: normal;
}

.chart-sheet--units {
  max-width: 100%;
}

.stage-paging__controls [hidden],
.performance-control__overlay[hidden] {
  display: none !important;
}

@media (max-width: 24.375rem) {
  :is(.chart-reading-page, .library-entry-dialog) .performance-controls__rail {
    gap: 0.25rem;
    padding-inline: 0.4rem;
  }

  :is(.chart-reading-page, .library-entry-dialog) .performance-control__trigger,
  :is(.chart-reading-page, .library-entry-dialog) .performance-control__perform {
    padding-inline: 0.35rem;
    font-size: 0.85rem;
  }
}

@media (min-width: 56rem) and (orientation: landscape) {
  :is(.chart-reading-page, .library-entry-dialog) .chart-sheet--units {
    padding-inline: clamp(2rem, 6vw, 5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
