:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #60706c;
  --paper: #f6f3ec;
  --panel: #fffdfa;
  --line: #ded8cb;
  --green: #0f7c67;
  --green-dark: #095445;
  --coral: #e85d4f;
  --gold: #c79624;
  --cyan: #147c96;
  --shadow: 0 24px 70px rgba(38, 43, 39, 0.14);
}

body.dark-mode {
  color-scheme: dark;
  --ink: #f5efe3;
  --muted: #b9c5c0;
  --paper: #101614;
  --panel: #18221f;
  --line: #31413c;
  --green: #21a989;
  --green-dark: #17836c;
  --coral: #ff7869;
  --gold: #e3b34a;
  --cyan: #3ca8c3;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
select,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 76px;
  padding: 14px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.9);
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 22px;
  backdrop-filter: blur(18px);
}

body.dark-mode .topbar {
  background: rgba(18, 27, 24, 0.9);
}

.topbar {
  box-shadow: 0 10px 30px rgba(38, 43, 39, 0.06);
}

body.dark-mode .topbar {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-avatar {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.brand-social {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-social a {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

.brand-social svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-social .cutout {
  fill: currentColor;
  stroke: none;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.nav-list a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ba2cff, #2da8ff);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav-list a.active,
.nav-list a:hover {
  background: #ece3d2;
  color: #17211f;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(82, 83, 255, 0.18);
}

.nav-list a.active::after,
.nav-list a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

body.dark-mode .nav-list a.active,
body.dark-mode .nav-list a:hover {
  background: #25342f;
  color: var(--ink);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 0 22px rgba(80, 150, 255, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.theme-toggle,
.small-button,
.primary-action,
.secondary-action,
.download-button,
.contact-links a,
.brand-social a {
  box-shadow: 0 0 22px rgba(108, 68, 255, 0.18), 0 0 34px rgba(45, 168, 255, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.theme-toggle:hover,
.language-toggle:hover,
.small-button:hover,
.primary-action:hover,
.secondary-action:hover,
.download-button:hover,
.contact-links a:hover,
.brand-social a:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(186, 44, 255, 0.38), 0 0 54px rgba(45, 168, 255, 0.3);
}

body.dark-mode .language-toggle {
  background: #f5efe3;
  color: #101614;
}

.small-button,
.primary-action,
.secondary-action {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-content: end;
  overflow: hidden;
  padding: 56px;
  background:
    linear-gradient(110deg, rgba(7, 12, 18, 0.9), rgba(23, 18, 72, 0.68) 56%, rgba(28, 90, 126, 0.58)),
    url("assets/fl-studio-background.jpg") center / cover;
  color: white;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: clamp(240px, 34vw, 520px);
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(58px);
  opacity: 0.62;
  pointer-events: none;
  animation: neonFloat 9s ease-in-out infinite alternate;
}

.hero::before {
  left: -8%;
  top: 12%;
  background: rgba(186, 44, 255, 0.68);
}

.hero::after {
  right: -10%;
  bottom: 8%;
  background: rgba(45, 168, 255, 0.62);
  animation-delay: -3s;
}

@keyframes neonFloat {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(28px, -20px, 0) scale(1.08);
  }
}

body.dark-mode .hero {
  background:
    linear-gradient(110deg, rgba(1, 4, 8, 0.92), rgba(16, 13, 58, 0.78) 56%, rgba(4, 46, 70, 0.72)),
    url("assets/fl-studio-background.jpg") center / cover;
}

#waveCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.74;
  mix-blend-mode: screen;
}

.hero-content {
  position: relative;
  max-width: 820px;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: #ffe3a3;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(54px, 9vw, 118px);
  line-height: 0.9;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  flex-wrap: wrap;
}

.hero-brand img {
  width: clamp(72px, 12vw, 132px);
  height: clamp(72px, 12vw, 132px);
  object-fit: cover;
  border-radius: 999px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

h2 {
  font-size: 23px;
  line-height: 1.12;
}

.hero-copy {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.55;
}

.beat-visualizer {
  display: flex;
  align-items: end;
  gap: 7px;
  width: min(100%, 360px);
  height: 86px;
  margin-top: 28px;
}

.beat-visualizer span {
  flex: 1;
  min-width: 12px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #ba2cff, #2da8ff);
  box-shadow: 0 0 20px rgba(186, 44, 255, 0.42), 0 0 34px rgba(45, 168, 255, 0.26);
  animation: equalize 900ms ease-in-out infinite alternate;
}

.beat-visualizer span:nth-child(2) { animation-delay: -120ms; }
.beat-visualizer span:nth-child(3) { animation-delay: -260ms; }
.beat-visualizer span:nth-child(4) { animation-delay: -380ms; }
.beat-visualizer span:nth-child(5) { animation-delay: -190ms; }
.beat-visualizer span:nth-child(6) { animation-delay: -520ms; }
.beat-visualizer span:nth-child(7) { animation-delay: -310ms; }
.beat-visualizer span:nth-child(8) { animation-delay: -650ms; }

@keyframes equalize {
  from {
    height: 22%;
  }
  to {
    height: 100%;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  text-decoration: none;
}

.primary-action {
  background: #fffaf1;
  color: var(--ink);
}

body.dark-mode .primary-action {
  color: #17211f;
}

.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: white;
}

.signal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 1px;
  max-width: 620px;
  margin-top: 50px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px);
}

.signal-panel div {
  padding: 16px;
}

.signal-panel span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-panel strong {
  font-size: 26px;
}

.workspace {
  padding: 34px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  background:
    linear-gradient(90deg, rgba(23, 33, 31, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(23, 33, 31, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
}

.single-workspace {
  grid-template-columns: minmax(0, 1100px);
  justify-content: center;
  min-height: calc(100vh - 76px);
}

.home-sections {
  display: grid;
  gap: 18px;
  padding: 34px;
  background:
    linear-gradient(90deg, rgba(23, 33, 31, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(23, 33, 31, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
}

.about-section,
.contact-section {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(38, 43, 39, 0.08);
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: center;
}

.about-section p {
  color: var(--muted);
  line-height: 1.7;
}

.about-section img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  text-decoration: none;
}

.contact-links svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.contact-links .cutout {
  fill: currentColor;
  stroke: none;
}

body.dark-mode .about-section,
body.dark-mode .contact-section {
  background: rgba(24, 34, 31, 0.96);
}

.library-page {
  min-height: calc(100vh - 76px);
  padding: 34px;
  background:
    linear-gradient(90deg, rgba(23, 33, 31, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(23, 33, 31, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
}

.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
  padding: 30px;
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(7, 12, 18, 0.9), rgba(23, 18, 72, 0.76)),
    url("assets/fl-studio-background.jpg") center / cover;
  color: white;
}

.library-hero h1 {
  font-size: clamp(42px, 7vw, 86px);
}

.library-hero p {
  max-width: 780px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.library-tools {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

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

.artist-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(38, 43, 39, 0.08);
}

.artist-card h2 {
  margin-bottom: 6px;
}

.artist-card > p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.45;
}

.song-row {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.song-row + .song-row {
  margin-top: 16px;
}

.song-row h3 {
  margin: 0;
  font-size: 15px;
}

.mini-chord-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mini-chord {
  min-width: 0;
  padding: 10px;
  border-radius: 8px;
  background: #17211f;
  color: white;
}

body.dark-mode .mini-chord {
  background: #f5efe3;
  color: #101614;
}

.mini-chord strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.mini-chord .guitar-diagram {
  min-height: 112px;
  gap: 4px;
}

.mini-chord .guitar-string {
  grid-template-rows: 18px repeat(5, 16px) 14px;
  font-size: 9px;
}

.mini-chord .guitar-string::before {
  top: 18px;
  bottom: 14px;
}

.mini-chord .fret-dot {
  width: 13px;
  height: 13px;
}

.mini-chord .piano-diagram {
  min-height: 86px;
  grid-template-columns: repeat(14, minmax(10px, 1fr));
}

.mini-chord .piano-key {
  min-height: 78px;
  padding-bottom: 5px;
  font-size: 8px;
}

.mini-chord .piano-key.black {
  min-height: 50px;
  margin-inline: -8px;
}

.tool-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: 0 12px 36px rgba(38, 43, 39, 0.08);
}

body.dark-mode .tool-panel {
  background: rgba(24, 34, 31, 0.96);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.26);
}

.progression-lab,
.lyrics-generator {
  grid-row: span 2;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 22px;
}

.small-button {
  min-height: 38px;
  padding: 0 13px;
  background: var(--green);
  color: white;
  white-space: nowrap;
}

.small-button:hover {
  background: var(--green-dark);
}

.small-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.control-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.lyrics-controls {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
  margin-bottom: 14px;
}

.lyrics-topic {
  display: block;
  margin-bottom: 14px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select {
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 700;
}

input[type="text"] {
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 700;
}

body.dark-mode input[type="text"] {
  background: #101614;
}

.lyrics-output {
  min-height: 300px;
  margin: 14px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17211f;
  color: #fffaf1;
  white-space: pre-wrap;
  line-height: 1.55;
  font: 600 14px/1.55 Inter, system-ui, sans-serif;
}

body.dark-mode .lyrics-output {
  background: #101614;
}

body.dark-mode select {
  background: #101614;
}

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

.chord-card {
  min-height: 236px;
  padding: 14px;
  border-radius: 8px;
  background: #17211f;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .chord-card {
  background: #f5efe3;
  color: #101614;
}

body.dark-mode .chord-card span {
  color: rgba(16, 22, 20, 0.6);
}

.chord-card span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 800;
}

.chord-card strong {
  font-size: 24px;
}

.chord-notes {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

body.dark-mode .chord-notes {
  color: rgba(16, 22, 20, 0.66);
}

.guitar-diagram {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  align-items: end;
  min-height: 138px;
}

.guitar-string {
  position: relative;
  display: grid;
  grid-template-rows: 22px repeat(5, 20px) 18px;
  justify-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
}

body.dark-mode .guitar-string {
  color: rgba(16, 22, 20, 0.72);
}

.guitar-string::before {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 18px;
  width: 2px;
  background: rgba(255, 255, 255, 0.35);
}

body.dark-mode .guitar-string::before {
  background: rgba(16, 22, 20, 0.22);
}

.fret-cell {
  position: relative;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

body.dark-mode .fret-cell {
  border-top-color: rgba(16, 22, 20, 0.18);
}

.fret-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--coral);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(232, 93, 79, 0.18);
}

.fret-status {
  min-height: 18px;
  color: var(--gold);
}

.string-name {
  align-self: end;
}

.piano-diagram {
  position: relative;
  display: grid;
  grid-template-columns: repeat(14, minmax(18px, 1fr));
  min-height: 120px;
  align-items: end;
  gap: 2px;
}

.piano-key {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 112px;
  padding-bottom: 8px;
  border-radius: 0 0 5px 5px;
  background: #fffaf1;
  color: #17211f;
  font-size: 10px;
  font-weight: 900;
}

.piano-key.black {
  min-height: 72px;
  margin-inline: -12px;
  z-index: 2;
  background: #070a09;
  color: white;
}

.piano-key.active {
  background: var(--coral);
  color: white;
}

.piano-key.black.active {
  background: var(--cyan);
}

.prompt-line {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.section-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  height: 260px;
  gap: 10px;
}

.song-part {
  height: calc(var(--level) * 1%);
  min-height: 64px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: #d8c9af;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 10px 6px;
  font-weight: 900;
}

body.dark-mode .song-part {
  background: #31413c;
}

.song-part.active {
  background: var(--coral);
  color: white;
}

.energy-readout {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.energy-readout span,
.energy-readout strong {
  font-size: 14px;
}

.timer {
  display: grid;
  place-items: center;
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin: 0 auto 22px;
  border: 14px solid #e7decf;
  border-top-color: var(--cyan);
  border-right-color: var(--coral);
  border-radius: 50%;
  color: var(--ink);
  font-size: 44px;
  font-weight: 900;
}

.practice-list,
.mix-list {
  display: grid;
  gap: 12px;
}

.master-console {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.upload-zone {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--green);
  border-radius: 8px;
  background: rgba(15, 124, 103, 0.08);
  color: var(--ink);
  cursor: pointer;
}

.upload-zone span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.upload-zone strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#sourcePreview {
  width: 100%;
  min-height: 42px;
}

.master-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.download-button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

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

.analysis-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

body.dark-mode .analysis-grid div {
  background: #101614;
}

.analysis-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.analysis-grid strong {
  font-size: 18px;
}

.master-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.practice-list label,
.mix-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  line-height: 1.35;
}

body.dark-mode .practice-list label,
body.dark-mode .mix-list label {
  background: #101614;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #17211f;
  color: white;
  font-weight: 900;
  white-space: nowrap;
}

body.dark-mode .score-pill {
  background: #f5efe3;
  color: #101614;
}

@media (max-width: 980px) {
  .topbar {
    position: sticky;
    grid-template-columns: 1fr auto;
    padding: 18px;
  }

  .nav-list {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 86vh;
    padding: 34px 22px;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .about-section {
    grid-template-columns: 1fr;
  }

  .library-page {
    padding: 22px;
  }

  .library-hero,
  .library-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .brand {
    align-items: start;
  }

  .brand-block {
    align-items: center;
    flex-wrap: wrap;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .topbar-actions,
  .theme-toggle {
    width: 100%;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .theme-toggle {
    flex: 1;
  }

  .nav-list {
    grid-column: auto;
    grid-row: auto;
  }

  .hero {
    min-height: 82vh;
  }

  .hero-copy {
    font-size: 16px;
  }

  .signal-panel,
  .control-row,
  .lyrics-controls,
  .chord-grid,
  .mini-chord-grid,
  .section-bars,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .signal-panel {
    max-width: none;
  }

  .section-bars {
    height: auto;
  }

  .song-part {
    height: 54px;
    border-radius: 8px;
    align-items: center;
  }

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }
}
