.mhg-jam {
  --mhg-jam-accent: #8c692a;
  --mhg-jam-accent-dark: #6f521f;
  --mhg-jam-border: #ddd7cc;
  --mhg-jam-text: #222;
  --mhg-jam-text-secondary: #444;
  --mhg-jam-text-muted: #666;
  color: var(--mhg-jam-text);
  max-width: 100%;
}

.mhg-jam h2 {
  margin: 1.5rem 0 0.75rem;
}

.mhg-jam :focus-visible {
  outline: 2px solid var(--mhg-jam-accent);
  outline-offset: 2px;
}

.mhg-jam__count {
  color: var(--mhg-jam-text-muted);
  font-size: 0.92em;
  margin: 0 0 0.65rem;
  white-space: nowrap;
}

.mhg-jam__filters {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(13rem, 2fr) minmax(9rem, 1fr);
  margin-bottom: 0.65rem;
}

.mhg-jam__filters label {
  color: var(--mhg-jam-text-secondary);
  min-width: 0;
}

.mhg-jam__filters label span {
  display: block;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.mhg-jam__filters input,
.mhg-jam__filters select {
  background: #f8f8f8;
  border: 1px solid var(--mhg-jam-border);
  border-radius: 3px;
  box-sizing: border-box;
  color: var(--mhg-jam-text);
  font: inherit;
  max-width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.65rem;
  width: 100%;
}

.mhg-jam__filters input:focus,
.mhg-jam__filters select:focus {
  border-color: var(--mhg-jam-accent);
}

.mhg-jam__list {
  border-top: 1px solid var(--mhg-jam-border);
  list-style: none;
  margin: 0;
  padding: 0;
}

.mhg-jam__item {
  border-bottom: 1px solid var(--mhg-jam-border);
  margin: 0;
}

.mhg-jam__item[hidden] {
  display: none;
}

.mhg-jam__row {
  align-items: end;
  display: grid;
  gap: 0.3rem 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, auto);
  min-height: 48px;
  padding: 0.5rem 0.55rem;
  transition: background-color 120ms ease-out;
}

.mhg-jam__row:hover {
  background: #faf8f3;
}

.mhg-jam__song {
  min-width: 0;
}

.mhg-jam__artist {
  color: var(--mhg-jam-text-secondary);
  display: block;
  font-size: 0.8em;
  line-height: 1.35;
}

.mhg-jam__song-main {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.6rem;
  min-width: 0;
}

.mhg-jam__title {
  color: var(--mhg-jam-text);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: none;
}

a.mhg-jam__title:hover {
  color: var(--mhg-jam-accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.mhg-jam__supports {
  align-items: baseline;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mhg-jam__supports li {
  margin: 0;
}

.mhg-jam__supports li + li::before {
  color: var(--mhg-jam-text-muted);
  content: "·";
  margin-right: 0.5rem;
}

.mhg-jam__supports a {
  color: var(--mhg-jam-accent);
  font-size: 0.86em;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--mhg-jam-border);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.mhg-jam__supports a:hover {
  color: var(--mhg-jam-accent-dark);
  text-decoration-color: currentColor;
}

.mhg-jam__meta {
  align-items: flex-end;
  color: var(--mhg-jam-text-muted);
  display: flex;
  flex-direction: column;
  font-size: 0.84em;
  line-height: 1.35;
  text-align: right;
}

.mhg-jam__difficulty {
  color: var(--mhg-jam-text-secondary);
  white-space: nowrap;
}

.mhg-jam__empty {
  color: var(--mhg-jam-text-muted);
  padding: 1rem;
  text-align: center;
}

@media (max-width: 680px) {
  .mhg-jam__filters {
    grid-template-columns: 1fr;
  }

  .mhg-jam__row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
    padding: 0.6rem 0.45rem;
  }

  .mhg-jam__meta {
    align-items: flex-start;
    flex-flow: row wrap;
    gap: 0.15rem 0.65rem;
    text-align: left;
  }

  .mhg-jam__artist {
    font-size: 0.78em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mhg-jam__row {
    transition: none;
  }
}
