/* Living Songbook content (inside main site layout) */
.songbook-content {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: visible;
}

.songbook-back {
  margin-bottom: 1rem;
}

.songbook-back-link {
  display: inline-block;
  color: var(--logo-blue);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
}

.songbook-back-link:hover {
  color: var(--accent);
}

.songbook-header h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--logo-blue);
  margin-bottom: 0.35rem;
}

.songbook-song-meta {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.songbook-song-meta-link {
  color: var(--logo-blue);
  font-style: normal;
  font-weight: 500;
  text-decoration: none;
}

.songbook-song-meta-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.songbook-list-recorded {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
}

.songbook-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.songbook-last-updated {
  display: block;
  margin: 0 0 1rem;
  font-style: italic;
  color: var(--logo-blue);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.songbook-archive-listens {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}

.songbook-search-bar {
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.songbook-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.songbook-search-filter {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(22, 24, 42, 0.55);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.songbook-search-filter:hover {
  color: var(--logo-blue);
  border-color: rgba(91, 157, 211, 0.45);
}

.songbook-search-filter.is-active {
  color: var(--accent);
  border-color: var(--accent-muted);
  background: var(--accent-subtle);
}

.songbook-search-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.songbook-search {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

.songbook-random-btn {
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(91, 157, 211, 0.12);
  color: var(--logo-blue);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.songbook-random-btn:hover {
  border-color: var(--logo-blue);
  background: rgba(91, 157, 211, 0.22);
  color: var(--accent);
}

.songbook-random-btn:focus-visible {
  outline: none;
  border-color: var(--accent-muted);
}

.songbook-search:focus {
  outline: none;
  border-color: var(--accent-muted);
}

.songbook-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.songbook-list-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.songbook-list-match {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
}

.songbook-list-item a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(22, 24, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.songbook-list-item a:hover {
  border-color: var(--accent-muted);
  background: rgba(22, 24, 42, 0.85);
}

.songbook-list-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.songbook-title--cover,
.songbook-header-title--cover {
  color: var(--logo-blue);
}

.songbook-cover-tag {
  font-size: 0.72em;
  font-style: italic;
  font-weight: 400;
  opacity: 0.9;
}

.songbook-list-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

.songbook-timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.songbook-detail {
  display: block;
  max-width: 100%;
  overflow-x: visible;
}

.songbook-detail--has-lyrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 16rem);
  gap: 1.5rem 2rem;
  align-items: start;
}

.songbook-detail-main {
  min-width: 0;
}

.songbook-lyrics {
  min-width: 0;
  max-width: 100%;
  padding: 1rem 1.1rem;
  background: rgba(22, 24, 42, 0.45);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: 'Lora', Georgia, serif;
  font-size: 0.8125rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  max-height: min(70vh, 42rem);
  overflow-y: auto;
  box-sizing: border-box;
}

@media (max-width: 968px) {
  .songbook-search {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .songbook-list {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .songbook-list-item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .songbook-detail--has-lyrics {
    grid-template-columns: 1fr;
  }

  .songbook-lyrics {
    max-height: none;
  }

  .songbook-list-item a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
  }

  .songbook-list-count {
    margin-left: 0;
  }

  .songbook-header h1 {
    font-size: 1.375rem;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .songbook-performance {
    overflow: hidden;
    box-sizing: border-box;
  }

  .songbook-performance-title,
  .songbook-performance-venue {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .songbook-recording-player {
    flex-wrap: wrap;
  }

  .songbook-recording-track {
    flex: 1 1 100%;
    min-width: 0;
  }

  .songbook-recording-time {
    min-width: 3.25rem;
    font-size: 0.7rem;
  }
}

.songbook-performance {
  padding: 1.25rem;
  background: rgba(22, 24, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.songbook-performance-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.songbook-performance-venue {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.songbook-recording-player {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.songbook-recording-play {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(91, 157, 211, 0.12);
  color: var(--logo-blue);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.songbook-recording-play:hover {
  border-color: var(--logo-blue);
  background: rgba(91, 157, 211, 0.22);
  color: var(--accent);
}

.songbook-recording-player.is-playing .songbook-recording-play {
  border-color: var(--logo-blue);
  background: rgba(91, 157, 211, 0.28);
}

.songbook-recording-track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.songbook-recording-progress-wrap {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
}

.songbook-recording-progress {
  width: 0;
  height: 100%;
  background: var(--logo-blue);
  border-radius: 999px;
  transition: width 0.1s linear;
}

.songbook-recording-time {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  min-width: 4.5rem;
  text-align: right;
}

.songbook-recording-player.is-loading .songbook-recording-play {
  opacity: 0.55;
  cursor: wait;
}

.songbook-performance-links a {
  color: var(--logo-blue);
  text-decoration: none;
  font-size: 0.9375rem;
  margin-right: 1rem;
}

.songbook-performance-links a:hover {
  color: var(--accent);
}

.songbook-setlist {
  margin-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.65rem;
}

.songbook-setlist-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--logo-blue);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.songbook-setlist-toggle::-webkit-details-marker {
  display: none;
}

.songbook-setlist-toggle::after {
  content: '▾';
  font-size: 0.75rem;
  opacity: 0.8;
  transition: transform 0.15s ease;
}

.songbook-setlist[open] .songbook-setlist-toggle::after {
  transform: rotate(180deg);
}

.songbook-setlist-toggle:hover {
  color: var(--accent);
}

.songbook-setlist-items {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.songbook-setlist-item {
  display: grid;
  grid-template-columns: 1rem 1fr;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.songbook-setlist-item a {
  color: var(--text-secondary);
  text-decoration: none;
}

.songbook-setlist-item a:hover {
  color: var(--accent);
}

.songbook-setlist-item--current {
  color: var(--accent);
  font-weight: 600;
}

.songbook-setlist-item--current span {
  color: var(--accent);
}

.songbook-setlist-marker {
  color: var(--logo-blue);
  font-size: 0.65rem;
  line-height: 1.4;
}

.songbook-empty,
.songbook-loading,
.songbook-error {
  color: var(--text-secondary);
  padding: 2rem 0;
  text-align: center;
}

.songbook-error {
  color: #e88;
}

.site-logo a {
  display: inline-block;
  line-height: 0;
}
