:root {
  --paper: #f8f6f0;
  --ink: #1a1a1a;
  --title-font: "Zapf Chancery", "Apple Chancery", "Monotype Corsiva", "URW Chancery L", "Times New Roman", serif;
  --hand-font: "Tekton Pro", "Tekton", "Graphite", "Flux Architect", "Times New Roman", serif;
  --body-font: "Times New Roman", "Plantin", "Century Schoolbook", "Georgia", serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font);
  color: var(--ink);
  background: var(--paper);
}

#music-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

#music-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--ink);
}

.home-link {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
}

#music-title {
  margin: 0;
  font-family: var(--title-font);
  font-size: 28px;
  letter-spacing: 0.05em;
  text-align: center;
  transform: scaleX(1.1);
}

#music-subtitle {
  margin: 4px 0 0 0;
  font-size: 11px;
  font-style: italic;
  text-align: center;
}

#music-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 22px 28px;
}

#music-sidebar {
  width: auto;
  padding-right: 20px;
  border-right: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#music-sidebar h2 {
  margin: 0;
  font-family: var(--body-font);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: bold;
}

.music-note {
  margin: 0;
  font-size: 9px;
  line-height: 1.3;
}

.song-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
}

.song-link {
  width: 100%;
  padding: 2px 0;
  border: none;
  background: none;
  text-align: left;
  font-family: var(--body-font);
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.01em;
  cursor: pointer;
  color: var(--ink);
}

.song-link:hover {
  text-decoration: underline;
}

.song-link.is-active {
  font-weight: 700;
  text-decoration: underline;
}

#music-content {
  flex: 1;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  overflow: auto;
}

.song-entry {
  display: none;
  max-width: 100%;
  margin: 0;
  line-height: 1.18;
  column-count: 2;
  column-gap: 16px;
}

.song-entry.is-active {
  display: block;
}

.song-title {
  margin: 0 0 4px 0;
  font-family: var(--body-font);
  font-size: 14px;
  font-style: italic;
  font-weight: normal;
  letter-spacing: 0.01em;
  break-after: avoid;
}

.song-verse {
  margin: 0 0 6px 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--body-font);
  font-size: 11px;
  line-height: 1.2;
  white-space: pre-wrap;
}

.song-notation {
  font-family: var(--hand-font);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.song-artist {
  margin: 0 0 6px 0;
  font-family: var(--hand-font);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-align: left;
}

.song-writeup {
  margin: 0;
  font-size: 9px;
  font-style: italic;
  line-height: 1.3;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }
}

@media (max-width: 900px) {
  #music-body {
    grid-template-columns: 1fr;
  }

  #music-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--ink);
    padding-right: 0;
    padding-bottom: 16px;
  }
}

@media (max-width: 600px) {
  #music-header {
    padding: 16px 18px;
  }

  #music-content {
    padding: 0;
  }

  .song-title {
    font-size: 13px;
  }

  .song-entry {
    column-count: 1;
  }
}
