@font-face {
  font-family: lexend;
  src: url(./Lexend-VariableFont_wght.ttf) format('ttf supports variations');
}

:root {
  --fonts: lexend, Helvetica, Segoe UI, arial, sans-serif;
  --bg: #585653;
  --panel: #2c2b29;
  --panel-alt: #f0e7d9;
  --sidebar: #1d1a1f;
  --sidebar-accent: #d6a74f;
  --text: #f7f7f7;
  --muted: #5c5860;
  --line: rgba(27, 27, 29, 0.12);
  --shadow: 0 18px 45px #f0e7d95e;
  --articleh2: #999;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--fonts);
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button {
  font: inherit;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 300px;
  background: var(--sidebar);
  color: #f8f7f5;
  padding: 1.25rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.sidebar-header h1 {
  margin: 0;
  font-size: 1.7rem;
}

.song-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.song-item button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.song-number {
  display: inline-block;
  width: 3ch;
  white-space: pre;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: var(--sidebar-accent);
}

.song-item button:hover,
.song-item button:focus-visible {
  background: rgba(214, 167, 79, 0.12);
  border-color: rgba(214, 167, 79, 0.45);
  outline: none;
}

.song-item.active button {
  background: rgba(214, 167, 79, 0.18);
  border-color: rgba(214, 167, 79, 0.65);
}

.fullscroll {
  max-height: 100vh;
  overflow-y: auto;
}

.content-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.3rem, 2vw, 2rem);
}

.menu-button,
.close-menu {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 0.75rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  position: relative;
}

.menu-button span {
  display: block;
  width: 1.3rem;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  margin: 0.18rem 0;
}

.close-menu {
  font-size: 2rem;
  line-height: 1;
}

.song-view {
  max-width: 800px;
  width: min(100%, 800px);
  margin: 0 auto;
  padding: 0;
  container-type: inline-size;
}

.song-article {
  background-color: var(--panel);
  padding: clamp(1.25rem, 2vw, 2rem);
  box-shadow: var(--shadow);
  line-height: 1.4;
  font-size: 4cqw;

  h2 {
    font-size: inherit;
    font-weight: normal;
    padding: 0;
    margin: 0;
    color: var(--articleh2);

    &::before {
      content: "[ ";
    }

    &::after {
      content: " ]";
    }
  }
}

.song-article h1 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.song-article h1:first-child,
.song-article h2:first-child,
.song-article h3:first-child {
  margin-top: 0;
}

.song-article p,
.song-article li,
.song-article blockquote {
  font-size: 1.02rem;
  line-height: 1.7;
}

.song-article ul,
.song-article ol {
  padding-left: 1.4rem;
}

.song-article blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--sidebar-accent);
  color: var(--muted);
}

.song-article pre,
.song-article code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.song-article pre {
  overflow-x: auto;
  background: #201d22;
  color: #f7f1e8;
  border-radius: 0.8rem;
  padding: 1rem;
}

.song-article a {
  color: #4a6da7;
}

.song-article strong {
  color: #171619;
}

.empty-state {
  min-height: 40vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-size: 1.05rem;
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 300px);
    transform: translateX(-102%);
    z-index: 30;
    box-shadow: 0 0 32px rgba(8, 8, 8, 0.22);
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-button,
  .close-menu {
    display: inline-flex;
    flex-direction: column;
  }

  .close-menu {
    display: none;
  }

  .sidebar.open .close-menu {
    display: inline-flex;
  }

  .content-wrap {
    min-height: 100vh;
  }

  .topbar {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
}