body {
  overflow: auto;
}

.pageMain--recordingSearch {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  overflow: visible;
}

.panelHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panelHead h2 {
  margin: 0;
  font-size: 18px;
}

.panelSub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.panelBody {
  padding: 18px;
}

.recordingSearchForm {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}

.searchField {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
}

.searchField--tunes {
  min-width: 320px;
  flex: 1 1 520px;
}

.searchField label {
  font-size: 14px;
  opacity: 0.75;
  color: var(--muted);
  font-weight: 600;
}

.searchWrap--field {
  width: 100%;
}

.searchField input[type="search"],
.searchField select {
  width: auto;
  min-width: 140px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.searchField select,
.searchField select option {
  background-color: #111827;
  color: #e5e7eb;
}

.searchField input:focus,
.searchField select:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.autocompleteShell {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

#tuneSearchInput {
  width: 100%;
}

.autocompleteBox {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 60;
  padding: 6px;
  background: rgba(15, 23, 32, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  max-height: min(360px, 50vh);
  overflow-y: auto;
}

.autocompleteItem {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: #e5eef8;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.autocompleteItem:hover,
.autocompleteItem.is-active {
  background: rgba(96, 165, 250, 0.16);
}

.autocompleteTitleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.autocompleteTitle {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}

.autocompleteType {
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  opacity: 0.82;
  white-space: nowrap;
}

.autocompleteMeta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.autocompleteEmpty {
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}

.selectedTunes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  padding-top: 4px;
}

.selectedTuneChip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 9px 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.selectedTuneChipName {
  overflow-wrap: anywhere;
}

.selectedTuneRemove {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}

.selectedTuneRemove:hover {
  background: rgba(248, 113, 113, 0.25);
}

.searchActions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin-left: auto;
}

#resetBtn,
.smallActionBtn,
.primaryBtn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid var(--stroke);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.primaryBtn {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.35);
}

#resetBtn:hover,
.smallActionBtn:hover,
.primaryBtn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.primaryBtn:hover {
  background: rgba(96, 165, 250, 0.26);
  border-color: rgba(96, 165, 250, 0.55);
}

.summaryCards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summaryCard {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 8px 14px;
}

.summaryCardLabel {
  font-size: 12px;
  color: var(--muted);
}

.summaryCardValue {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
}

.summaryBadges--filters {
  justify-content: flex-end;
}

.recordingResults {
  display: grid;
  gap: 12px;
}

.recordingCard {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 14px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.recordingCard:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(96, 165, 250, 0.25);
  transform: translateY(-1px);
}

.recordingCardHead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recordingTitleBlock {
  min-width: 0;
}

.recordingAlbumRow {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.recordingAlbumName {
  color: #93c5fd;
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.recordingAlbumName:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

.recordingArtist {
  margin-top: 4px;
  color: #45b6ba;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.recordingTrackPill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.matchPills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.matchPill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.matchPill--good {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.matchPill--warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.tuneSequence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  line-height: 1.35;
}

.tuneNode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.tuneNode:hover {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.1);
  text-decoration: none;
}

.tuneNode--matched {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.11);
}

.tuneNodeDot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.9);
  flex: 0 0 auto;
}

.tuneNode--matched .tuneNodeDot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
}

.sequenceArrow {
  color: var(--muted);
  font-size: 12px;
}

.canonicalSequence {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.sessionIconLink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.15s ease;
  flex: 0 0 auto;
}

.sessionIconLink:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  transform: translateY(-1px);
}

.sessionIconLink img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
}

.tableMuted {
  color: var(--muted);
  font-size: 12px;
}

.emptyState,
.errorState,
.loadingState {
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
}

.errorState {
  color: #fca5a5;
}

@media (max-width: 900px) {
  .recordingSearchForm {
    align-items: stretch;
  }

  .searchField,
  .searchField--tunes {
    flex: 1 1 calc(50% - 12px);
    min-width: 180px;
  }

  .searchActions {
    margin-left: 0;
  }

  .summaryCards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .summaryPanel {
    display: none;
  }

  .searchField,
  .searchField--tunes {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .searchWrap--autocomplete {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }

  .searchActions {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .searchActions button {
    flex: 1 1 auto;
  }

  .panelHead {
    padding-left: 14px;
    padding-right: 14px;
    flex-direction: column;
  }

  .panelBody {
    padding-left: 14px;
    padding-right: 14px;
  }

  .recordingCardHead {
    flex-direction: column;
  }
}

.recordingCard {
  padding: 12px 14px;
}

.recordingCardHead {
  margin-bottom: 8px;
}

.matchPills {
  margin-top: 8px;
}

.tuneSequence {
  margin-top: 10px;
}

.labelWithHelp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.helpIcon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.35);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  user-select: none;
}

.helpTooltip {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dbe7f5;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 200;
  text-align: left;
}

.helpTooltip strong {
  color: #ffffff;
}

.helpIcon:hover .helpTooltip,
.helpIcon:focus-within .helpTooltip {
  opacity: 1;
}

.recordingCardActions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.setlistActionBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.setlistActionBtn:hover {
  background: rgba(96, 165, 250, 0.22);
  border-color: rgba(96, 165, 250, 0.55);
  color: #dbeafe;
  text-decoration: none;
}

.tuneNodeWrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tuneSessionIconLink {
  width: 20px;
  height: 20px;
}

.tuneSessionIconLink img {
  width: 20px;
  height: 20px;
}

@media (max-width: 700px) {
  .recordingCardActions {
    width: 100%;
    justify-content: space-between;
  }
}

.setIncipitTooltip {
  position: absolute;
  z-index: 9999;
  width: min(360px, calc(100vw - 24px));
  max-height: min(72vh, 520px);
  overflow-y: auto;
  padding: 8px;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.18);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.setIncipitTooltipItem {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  padding: 6px;
}

.setIncipitTooltipItem+.setIncipitTooltipItem {
  margin-top: 6px;
}

.setIncipitTooltipTitle {
  color: #0f172a;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 2px;
}

.setIncipitTooltipScore {
  background: #ffffff;
  color: #0f172a;
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
}

.setIncipitTooltipScore svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.recordingArtistLink {
  color: inherit;
  text-decoration: none;
  font-size: large;
  font-weight: 600;
}

.recordingArtistLink:hover {
  text-decoration: underline;
}

.setActionGroup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setSessionIconLink {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.setSessionIconLink img {
  width: 18px;
  height: 18px;
}