:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #60605c;
  --line: #deded8;
  --paper: #fbfbf7;
  --surface: #ffffff;
  --mint: #c8ead7;
  --coral: #ff765f;
  --teal: #4c9a9a;
  --yellow: #f4c84b;
  --blue: #6f9ee8;
  --shadow: 0 18px 50px rgba(21, 21, 21, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex: 0 0 auto;
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: #10100f;
  color: #ffffff;
}

.brand {
  display: grid;
  place-items: center;
  min-height: 128px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #ffffff;
  border-radius: 8px;
}

.brand img {
  width: min(172px, 78%);
  height: auto;
  display: block;
}

.mobile-controls {
  display: none;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-button,
.google-button,
.primary-button,
.text-button,
.icon-button,
.round-button,
.practice-tools button,
.file-row,
.lyric-line,
.setlist-song-button {
  border: 0;
  min-height: 42px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border-radius: 8px;
  text-align: left;
}

.nav-button.active,
.nav-button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.auth-box {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.gate-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(200, 234, 215, 0.82), rgba(255, 255, 255, 0.78)),
    var(--paper);
}

.gate-panel {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.gate-panel img {
  width: 180px;
  max-width: 70%;
  display: block;
  margin-bottom: 24px;
}

.gate-panel h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1;
}

.gate-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.auth-error {
  padding: 12px;
  border-left: 4px solid var(--coral);
  background: #fff4f1;
  color: var(--ink) !important;
}

.user-pill {
  overflow-wrap: anywhere;
  margin: 0 0 10px;
  font-weight: 800;
}

.logout-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  font-weight: 800;
}

.mobile-menu-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.google-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
}

.primary-button:disabled,
.disabled-button {
  background: #d8d8d2;
  color: #5f5f5a;
}

.google-button {
  width: 100%;
  background: #ffffff;
  color: var(--ink);
}

.text-button {
  background: transparent;
  color: var(--teal);
  font-weight: 800;
}

.icon-button,
.round-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--coral);
  color: #ffffff;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.topbar h1,
.section-title h2,
.intro-panel h2,
.lyrics-panel h2,
.player-panel h2,
.drive-layout h2,
.view-stack h2 {
  margin: 0;
  line-height: 1.05;
}

.topbar h1 {
  font-size: 34px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar .eyebrow,
.sidebar .microcopy {
  color: rgba(255, 255, 255, 0.58);
}

.microcopy,
.body-copy,
.song-card p,
.media-card p,
.practice-notes p {
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.intro-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 18px;
  align-items: stretch;
  padding: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 55%, #eaf5f1 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-panel h2 {
  max-width: 820px;
  font-size: 30px;
}

.intro-panel p {
  max-width: 760px;
}

.agenda-stack {
  display: grid;
  gap: 12px;
}

.agenda-card {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border-radius: 8px;
}

.agenda-card.rehearsal {
  background: var(--yellow);
}

.agenda-card.concert {
  background: var(--mint);
}

.agenda-card.empty {
  border: 1px dashed var(--line);
  background: #f6f6f1;
}

.agenda-card strong {
  font-size: 22px;
}

.agenda-card span {
  font-weight: 800;
}

.agenda-card small {
  color: rgba(21, 21, 21, 0.72);
  line-height: 1.4;
}

.empty-state {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fafaf6;
}

.stat-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat,
.panel,
.lyrics-panel,
.player-panel,
.media-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.stat {
  padding: 18px;
}

.stat strong {
  display: block;
  font-size: 30px;
}

.stat span {
  color: var(--muted);
}

.panel,
.lyrics-panel,
.player-panel {
  padding: 20px;
}

.span-2 {
  grid-row: span 2;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.song-list,
.file-list,
.lyrics-list,
.view-stack {
  display: grid;
  gap: 12px;
}

.song-card {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(92px, 120px);
  gap: 8px 12px;
  min-height: 72px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: #ffffff;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.song-card:hover {
  border-color: var(--teal);
  background: #f4fbf8;
  transform: translateY(-1px);
}

.song-card.selected {
  border-left-color: var(--coral);
  box-shadow: 0 10px 30px rgba(255, 118, 95, 0.16);
}

.song-card h3,
.media-card h3 {
  margin: 0;
}

.song-card h3 {
  line-height: 1.05;
  font-size: 22px;
}

.song-meta {
  display: grid;
  gap: 0;
  align-content: center;
  justify-items: end;
  text-align: right;
  font-weight: 800;
  min-width: 92px;
}

.tone-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--ink);
  white-space: nowrap;
}

mark {
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf2f2;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

mark.good {
  background: var(--mint);
}

mark.muted {
  background: #eeeeeb;
  color: var(--muted);
}

.mini-lyrics {
  display: grid;
  gap: 10px;
}

.mini-lyrics p {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.mini-lyrics strong {
  color: var(--coral);
}

.library-layout,
.drive-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.song-browser {
  min-width: 0;
}

.compact-song-list {
  position: sticky;
  top: 24px;
}

.song-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.song-list-item.selected {
  border-left-color: var(--coral);
  box-shadow: 0 10px 24px rgba(255, 118, 95, 0.13);
}

.song-list-item strong,
.song-list-item small {
  display: block;
  min-width: 0;
}

.song-list-item strong {
  line-height: 1.15;
}

.song-list-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.song-list-item em {
  color: var(--coral);
  font-style: normal;
  font-weight: 900;
}

.song-list-item mark {
  grid-column: 1 / -1;
  width: fit-content;
}

.songbook-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.songbook-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.songbook-header h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.songbook-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.songbook {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.compact-songbook {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.compact-songbook-line {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf7;
}

.compact-songbook-line strong {
  width: fit-content;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fff35f;
  color: #111111;
  font-size: 13px;
  line-height: 1.1;
}

.compact-songbook-line span {
  font-size: 17px;
  line-height: 1.28;
}

.transpose-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafaf6;
}

.transpose-bar button,
.practice-tools button {
  border: 0;
}

.transpose-bar button {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 900;
}

.transpose-bar button:disabled,
.practice-tools button:disabled {
  cursor: default;
  opacity: 0.45;
}

.transpose-bar span,
.practice-tools span {
  color: var(--muted);
  font-weight: 800;
}

.songbook-line {
  display: grid;
  gap: 5px;
  break-inside: avoid;
}

.songbook-line strong {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 5px;
  background: #fff35f;
  color: #111111;
  font-size: 15px;
  line-height: 1.1;
}

.songbook-line span {
  font-size: 20px;
  line-height: 1.32;
}

.songbook-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.songbook-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.songbook-footer a {
  flex: 0 0 auto;
  color: var(--teal);
  font-weight: 900;
}

.cms-note {
  grid-column: 1 / -1;
}

.songbook-page {
  display: grid;
  gap: 18px;
}

.full-songbook {
  max-width: 980px;
}

.setlist-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.setlist-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.setlist-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.setlist-header h3 {
  margin: 0;
}

.setlist-header p,
.compact-setlist p,
.compact-more,
.setlist-notes {
  color: var(--muted);
  line-height: 1.5;
}

.setlist-header p,
.compact-setlist p,
.compact-more,
.setlist-notes {
  margin: 6px 0 0;
}

.setlist-meta {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 78px;
  text-align: right;
}

.setlist-meta span {
  color: var(--coral);
  font-weight: 900;
}

.setlist-meta small {
  color: var(--muted);
}

.setlist-songs {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.setlist-song-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1.4fr) auto;
  gap: 8px 12px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.setlist-song-button:hover {
  border-color: var(--teal);
  background: #f4fbf8;
  transform: translateY(-1px);
}

.setlist-song-button span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.setlist-song-button strong {
  min-width: 0;
  line-height: 1.15;
  font-size: 15px;
  margin-right: 6px;
}

.setlist-song-button em {
  color: var(--teal);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.setlist-notes {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.schema-preview,
.integration-steps,
.practice-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.schema-preview span,
.integration-steps span,
.practice-tools span,
.practice-tools button {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef6ff;
  color: #17385d;
  font-weight: 800;
}

.practice-tools button:disabled {
  background: #ededeb;
  color: #777770;
}

.learn-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.learn-layout .lyrics-panel {
  position: sticky;
  top: 28px;
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.learn-layout .lyrics-list {
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
  scroll-padding-block: 42%;
}

.player-panel {
  display: grid;
  gap: 16px;
}

.media-stage {
  display: grid;
  gap: 14px;
}

.fake-video {
  min-height: 330px;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(150deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.78)),
    linear-gradient(135deg, var(--teal), var(--coral));
  border-radius: 8px;
  color: #ffffff;
}

.fake-video img {
  width: min(180px, 52%);
  padding: 10px;
  background: #ffffff;
  border-radius: 8px;
}

.fake-video .eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.media-key {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.transport {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.timeline {
  display: grid;
  gap: 6px;
}

.timeline input {
  width: 100%;
  accent-color: var(--coral);
}

#audio-player {
  display: none;
}

.no-audio {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.time-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.practice-notes {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-left: 5px solid var(--yellow);
  background: #fff9df;
  border-radius: 8px;
}

.live-stack {
  display: grid;
  gap: 10px;
}

.live-line {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.live-line.current {
  border-color: rgba(21, 21, 21, 0.85);
  background: #151515;
  color: #ffffff;
}

.live-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.live-line.current .live-label {
  color: rgba(255, 255, 255, 0.65);
}

.live-chord {
  margin: 0;
  font-size: 42px;
  line-height: 1;
}

.live-line.current .live-chord {
  color: var(--yellow);
}

.live-line.next .live-chord {
  color: var(--coral);
}

.live-text {
  margin: 0;
  color: inherit;
  font-size: 20px;
  line-height: 1.35;
}

.live-line.next .live-text {
  color: var(--ink);
}

.learn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin-bottom: 20px;
}

.learn-header-copy {
  display: grid;
  gap: 8px;
}

.back-button {
  align-self: start;
  min-height: 34px;
  padding: 0;
  color: var(--teal);
  font-weight: 900;
}

.learn-header h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.active-song-title {
  color: var(--teal);
  font-weight: 800;
}

.selector-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.selector-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.selector-container select {
  min-height: 42px;
  border: 1.5px solid var(--teal);
  border-radius: 8px;
  padding: 8px 36px 8px 14px;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234c9a9a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  font-weight: 700;
  color: var(--teal);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(76, 154, 154, 0.08);
}

.selector-container select:hover {
  border-color: var(--coral);
  color: var(--coral);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff765f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  box-shadow: 0 4px 12px rgba(255, 118, 95, 0.15);
}

.selector-container select:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 118, 95, 0.15);
}

.lyrics-list {
  display: flex;
  flex-direction: column;
}

.lyric-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 4px;
  align-items: start;
  width: 100%;
  height: auto;
  min-height: 92px;
  padding: 18px 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
  overflow: visible;
  cursor: pointer;
}

.lyric-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: nowrap;
}

.lyric-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.lyric-chords {
  display: block;
  color: var(--coral);
  line-height: 1.25;
  overflow-wrap: anywhere;
  min-width: 0;
}

.lyric-text {
  display: block;
  color: var(--ink);
  padding-bottom: 2px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.lyric-line.active {
  border-color: var(--ink);
  background: #151515;
  color: #ffffff;
}

.lyric-line.active .lyric-time,
.lyric-line.active .lyric-chords {
  color: var(--yellow);
}

.lyric-line.active .lyric-text {
  color: #ffffff;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.media-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.media-card-head {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.media-thumb {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mint), #e9efff);
}

.media-thumb svg {
  width: 30px;
  height: 30px;
}

.media-player {
  width: 100%;
  min-width: 0;
}

.media-link {
  display: inline-flex;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef6ff;
  color: #17385d;
  font-weight: 800;
  text-decoration: none;
}

.media-practice {
  justify-self: start;
}

.member-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.timeline-panel {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.timeline-head {
  display: grid;
  gap: 6px;
}

.timeline-head h3 {
  margin: 0;
  font-size: 20px;
}

.timeline-head p {
  margin: 0;
  color: var(--muted);
}

.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.timeline-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 700;
}

.timeline-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #bbb;
  flex: 0 0 auto;
}

.timeline-swatch.voice,
.timeline-bar.voice {
  background: #e4572e;
}

.timeline-swatch.strings,
.timeline-bar.strings {
  background: #18a558;
}

.timeline-swatch.wind,
.timeline-bar.wind {
  background: #2b6cb0;
}

.timeline-swatch.percussion,
.timeline-bar.percussion {
  background: #f59e0b;
}

.timeline-swatch.production,
.timeline-bar.production {
  background: #6b7280;
}

.timeline-swatch.other,
.timeline-bar.other {
  background: #9b59b6;
}

.member-timeline {
  display: grid;
  gap: 8px;
}

.timeline-axis,
.timeline-row {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.timeline-axis {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 0 6px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.timeline-axis-label {
  padding-left: 2px;
  color: var(--muted);
}

.timeline-years {
  display: grid;
  grid-template-columns: repeat(var(--timeline-years), minmax(34px, 1fr));
  gap: 0;
  align-items: center;
  min-width: 0;
}

.timeline-years span {
  display: block;
  text-align: center;
  color: var(--ink);
}

.timeline-row {
  padding-top: 2px;
  border-top: 1px solid rgba(20, 27, 38, 0.08);
  align-items: center;
}

.timeline-person strong,
.timeline-person small {
  display: block;
}

.timeline-person strong {
  line-height: 1.1;
}

.timeline-person small {
  margin-top: 3px;
  color: var(--muted);
}

.timeline-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--timeline-years), minmax(34px, 1fr));
  grid-auto-flow: row;
  min-height: 18px;
  align-items: center;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(20, 27, 38, 0.04) calc(100% - 1px), rgba(20, 27, 38, 0.04) 100%);
  border-radius: 999px;
  overflow: hidden;
}

.compact-score-panel {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.compact-score-head {
  margin: 0;
  padding: 0;
  border: 0;
}

.timeline-bar {
  position: relative;
  height: 10px;
  margin: 4px 0;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.08);
  background: var(--teal);
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 0.7fr 0.7fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.table-head {
  background: #111111;
  color: #ffffff;
  font-weight: 800;
}

.table-row + .table-row {
  border-top: 1px solid var(--line);
}

.file-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  text-align: left;
}

.file-row strong,
.file-row small {
  display: block;
}

.file-row small {
  margin-top: 3px;
  color: var(--muted);
}

@media (max-width: 1060px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    z-index: 20;
    height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    top: 0;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .brand {
    min-height: 56px;
    width: 104px;
    padding: 6px;
  }

  .brand img {
    width: 92px;
  }

  .mobile-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
  }

  .logout-button.compact {
    width: auto;
    min-height: 42px;
    padding: 0 12px;
  }

  .sidebar .nav {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar.menu-open .nav {
    display: grid;
  }

  .sidebar .auth-box {
    display: none;
  }

  .dashboard-grid,
  .library-layout,
  .drive-layout,
  .setlist-layout,
  .learn-layout {
    grid-template-columns: 1fr;
  }

  .compact-song-list {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cms-note {
    grid-column: auto;
  }

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

  .learn-layout .lyrics-panel {
    position: static;
    max-height: 72vh;
  }

  .member-timeline {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .timeline-axis,
  .timeline-row {
    min-width: 680px;
    grid-template-columns: minmax(160px, 220px) minmax(520px, 1fr);
  }

  .timeline-years {
    grid-template-columns: repeat(var(--timeline-years), minmax(26px, 1fr));
  }

  .timeline-person small {
    font-size: 11px;
  }

  .member-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-head,
  .table-row {
    min-width: 520px;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 16px;
  }

  .sidebar {
    padding: 8px 10px;
  }

  .topbar,
  .intro-panel,
  .section-title,
  .songbook-header,
  .songbook-footer,
  .learn-header {
    align-items: stretch;
    flex-direction: column;
  }

  .selector-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .selector-container select {
    width: 100%;
  }

  .topbar {
    display: grid;
  }

  .intro-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .stat-row,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .brand {
    width: 84px;
    min-height: 48px;
  }

  .brand img {
    width: 74px;
  }

  .mobile-controls {
    gap: 6px;
  }

  .logout-button.compact,
  .mobile-menu-button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 14px;
  }

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

  .nav-button {
    min-height: 38px;
    padding: 8px 10px;
  }

  .library-layout {
    display: block;
  }

  .compact-song-list {
    grid-template-columns: 1fr;
  }

  .library-layout .songbook-panel,
  .library-layout .cms-note {
    display: none;
  }

  .song-card,
  .setlist-header,
  .setlist-song-button,
  .table-head,
  .table-row {
    grid-template-columns: 1fr;
  }

  .live-line {
    padding: 12px;
  }

  .live-chord {
    font-size: 34px;
  }

  .live-text {
    font-size: 18px;
  }

  .lyric-line {
    grid-template-columns: 62px minmax(0, 1fr);
    column-gap: 10px;
    min-height: 88px;
    padding: 16px 12px 20px;
  }

  .lyric-body {
    gap: 8px;
  }

  .lyric-time,
  .lyric-chords {
    font-size: 17px;
  }

  .lyric-text {
    font-size: 17px;
    line-height: 1.45;
  }

  .song-meta {
    display: flex;
    text-align: left;
  }

  .transpose-bar,
  .practice-tools {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }

  .transpose-bar button,
  .practice-tools button,
  .transpose-bar span,
  .practice-tools span {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .compact-song-list {
    position: static;
  }

  .songbook-panel {
    padding: 18px;
  }

  .songbook-header h3 {
    font-size: 26px;
  }

  .learn-header-copy {
    gap: 6px;
  }

  .learn-header h2 {
    font-size: 20px;
  }

  .back-button {
    font-size: 13px;
  }

  .fake-video {
    min-height: 220px;
    gap: 12px;
    padding: 14px;
  }

  .fake-video img {
    width: min(110px, 40%);
    padding: 8px;
  }

  .media-key {
    font-size: 14px;
  }

  .compact-score-panel {
    padding: 14px;
  }

  .compact-songbook {
    margin-top: 12px;
  }

  .compact-songbook-line {
    padding: 8px 10px;
  }

  .compact-songbook-line strong {
    font-size: 12px;
  }

  .compact-songbook-line span {
    font-size: 15px;
    line-height: 1.24;
  }

  .member-timeline {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .timeline-axis,
  .timeline-row {
    min-width: 560px;
    grid-template-columns: minmax(132px, 156px) minmax(420px, 1fr);
  }

  .timeline-axis {
    gap: 10px;
  }

  .timeline-years {
    grid-template-columns: repeat(var(--timeline-years), minmax(24px, 1fr));
    font-size: 11px;
  }

  .timeline-axis-label {
    font-size: 11px;
  }

  .timeline-row {
    padding-top: 1px;
  }

  .timeline-person strong {
    font-size: 14px;
  }

  .timeline-person small {
    margin-top: 2px;
    font-size: 10px;
  }

  .member-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-head,
  .table-row {
    min-width: 520px;
    padding: 12px 14px;
  }

  .songbook-line span {
    font-size: 18px;
  }

  .cms-note {
    grid-column: auto;
  }

  .setlist-meta {
    display: flex;
    text-align: left;
  }
}
