:root {
  color-scheme: dark;
  --bg-1: #020817;
  --bg-2: #0f172a;
  --bg-3: #111827;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --surface: rgba(148, 163, 184, 0.08);
  --surface-strong: rgba(148, 163, 184, 0.14);
  --surface-alt: rgba(30, 41, 59, 0.82);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #39d98a;
  --accent-strong: #19c37d;
  --accent-blue: #60a5fa;
  --accent-warm: #fbbf24;
  --border: rgba(148, 163, 184, 0.18);
  --shadow: rgba(2, 6, 23, 0.42);
  --slot-rest: rgba(148, 163, 184, 0.04);
  --slot-down: rgba(57, 217, 138, 0.17);
  --slot-up: rgba(96, 165, 250, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-1);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(57, 217, 138, 0.16), transparent 28%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 42%, var(--bg-3));
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(96, 165, 250, 0.08), transparent 32%, rgba(57, 217, 138, 0.06));
}

button,
input,
select,
a {
  font: inherit;
}

button,
.nav-link {
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

button:hover,
.nav-link:hover {
  transform: translateY(-1px);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 18px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 34px var(--shadow);
  backdrop-filter: blur(10px);
}

.brand-block {
  display: grid;
  gap: 3px;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 750;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.06em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  padding: 0.78rem 1rem;
}

.secondary-link {
  min-width: 110px;
}

.subtle-button {
  background: rgba(148, 163, 184, 0.05);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.studio-workspace {
  display: block;
}

.sidebar,
.practice-column {
  display: grid;
  gap: 18px;
}

.studio-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.compact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.58rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.05);
  color: var(--text);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 12px 28px var(--shadow);
}

.panel h2 {
  margin: 0;
  letter-spacing: -0.05em;
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background: rgba(96, 165, 250, 0.09);
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 800;
}

.song-list,
.pattern-grid {
  display: grid;
  gap: 10px;
}

.song-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.song-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.05);
  color: var(--text);
}

.song-select {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.song-item.active {
  background: rgba(57, 217, 138, 0.12);
  border-color: rgba(57, 217, 138, 0.42);
}

.song-item:hover {
  border-color: rgba(96, 165, 250, 0.3);
}

.song-meta {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.pattern-grid {
  grid-template-columns: 1fr;
}

.pattern-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.04);
  overflow: hidden;
}

.pattern-select {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.pattern-select small {
  color: var(--muted);
  font-size: 0.72rem;
}

.pattern-select.active {
  background: rgba(96, 165, 250, 0.12);
}

.pattern-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 0.8rem 0.65rem;
  border-left: 1px solid rgba(57, 217, 138, 0.28);
  background: rgba(57, 217, 138, 0.12);
  color: var(--text);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-empty {
  display: inline-block;
  color: var(--muted);
  padding: 6px 0;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: var(--muted);
}

.status-row strong {
  color: var(--text);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.practice-panel {
  display: grid;
  gap: 16px;
  min-height: 760px;
}

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

.practice-header-copy {
  display: grid;
  gap: 4px;
}

.selection-label {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
}

#currentSelectionLabel {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  letter-spacing: -0.05em;
}

.transport-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: end;
}

.transport-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-button {
  min-width: 112px;
  padding: 0.8rem 1rem;
  font-weight: 700;
}

.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #07140f;
  border-color: rgba(57, 217, 138, 0.7);
}

.secondary {
  background: rgba(148, 163, 184, 0.06);
  color: var(--text);
}

.tempo-field {
  display: grid;
  gap: 8px;
}

.tempo-field label,
.toggle-row,
.compact-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.tempo-field strong,
.toggle-row strong {
  color: var(--text);
  font-size: 0.9rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.mode-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.03);
}

#repeatToggle {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.compact-select {
  gap: 12px;
  flex: 1 1 auto;
}

.compact-select select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.62rem 0.7rem;
}

.practice-stage {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.64));
}

.timeline-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.time-signature {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 0.48rem 0.8rem;
  border: 1px solid rgba(57, 217, 138, 0.24);
  border-radius: 999px;
  background: rgba(57, 217, 138, 0.1);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.timecode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.timeline-progress {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
  border: 1px solid rgba(148, 163, 184, 0.08);
  overflow: hidden;
}

.timeline-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.52);
  transition: width 0.1s linear;
}

.pattern-viewport {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 290px;
  max-height: 420px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.7) rgba(15, 23, 42, 0.6);
}

.pattern-timeline {
  position: relative;
  min-height: 260px;
  padding: 8px 0 12px;
}

.timeline-inner {
  position: relative;
  min-height: 250px;
  padding-top: 18px;
}

.timeline-guides {
  position: absolute;
  inset: 0 0 0 0;
  z-index: 1;
  pointer-events: none;
}

.timeline-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(148, 163, 184, 0.18);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.05);
}

.timeline-guide.beat-guide {
  background: rgba(148, 163, 184, 0.22);
}

.timeline-guide.bar-guide {
  width: 2px;
  background: rgba(96, 165, 250, 0.56);
}

.timeline-guide.active {
  background: rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
}

.timeline-chords {
  position: relative;
  z-index: 2;
  height: 28px;
  margin-bottom: 8px;
}

.timeline-sections {
  position: relative;
  z-index: 2;
  height: 20px;
  margin-bottom: 4px;
}

.section-label {
  position: absolute;
  top: 0;
  white-space: nowrap;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.timeline-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.timeline-lyrics {
  position: relative;
  z-index: 2;
  height: 20px;
  margin-bottom: 4px;
}

.chord-badge {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.42);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.lyric-badge {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.measure-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  min-height: 200px;
}

.measure {
  position: relative;
  flex: 0 0 auto;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
}

.measure:first-child {
  border-left: none;
}

.measure-header {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  height: 30px;
}

.beat-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-left: 1px solid rgba(148, 163, 184, 0.1);
}

.beat-label:first-child {
  border-left: none;
}

.measure-body {
  display: flex;
  min-height: 160px;
}

.timeline-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  background: var(--slot-rest);
  border-left: 1px solid rgba(148, 163, 184, 0.1);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.timeline-slot:first-child {
  border-left: none;
}

.timeline-slot.down {
  background: var(--slot-down);
}

.timeline-slot.up {
  background: var(--slot-up);
}

.timeline-slot.rest {
  color: var(--muted);
}

.timeline-slot.accent {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.7);
}

.timeline-slot.active {
  background: rgba(251, 191, 36, 0.16);
  box-shadow: inset 0 0 0 2px rgba(251, 191, 36, 0.9);
  transform: translateY(-1px);
  z-index: 2;
}

.measure.count-in .timeline-slot {
  background: rgba(148, 163, 184, 0.04);
  color: var(--muted);
}

.timeline-slot.count-in.count-beat {
  background: rgba(148, 163, 184, 0.1);
}

.measure.count-in .slot-symbol {
  color: rgba(148, 163, 184, 0.7);
  font-size: clamp(0.9rem, 1.2vw, 1.2rem);
}

.slot-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 1.9vw, 1.8rem);
  font-weight: 800;
  line-height: 1;
}

.timeline-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.92), rgba(251, 191, 36, 0.28));
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.78);
  pointer-events: none;
  z-index: 5;
}

.lyrics-panel {
  margin-top: 1rem;
  max-height: 16rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
}

.lyrics-panel[hidden] {
  display: none;
}

.lyrics-row-container {
  display: flex;
  gap: 0.5rem;
  min-width: 100%;
  align-items: center;
}

.lyrics-bar-cell {
  flex-shrink: 0;
  min-width: 7rem;
  max-width: 7rem;
  padding: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.375rem;
  background: rgba(148, 163, 184, 0.05);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lyrics-bar-cell .lyrics-word {
  display: inline-block;
  margin: 0.25rem;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.lyrics-bar-cell .lyrics-word.is-current {
  opacity: 1;
  font-weight: 600;
  color: var(--accent, #f5c451);
}

.lyrics-line {
  margin: 0.35rem 0;
  font-size: 1.05rem;
  opacity: 0.45;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.lyrics-line.is-active {
  opacity: 1;
  font-weight: 600;
  color: var(--accent, #f5c451);
}

.measure-lyrics {
  position: relative;
  height: 3.4rem;
  overflow: hidden;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.12);
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
}

/* One syllable: positioned on the 16th-note grid of its bar. */
.measure-lyrics .lyrics-word {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 0 0 0.25rem 3px;
  box-sizing: border-box;
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  transition: color 0.15s ease;
}

/* Chord anchor sits above the syllable it belongs to. */
.lyrics-chord {
  position: absolute;
  top: 0;
  left: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent, #f5c451);
  opacity: 0.85;
  white-space: nowrap;
}

.lyrics-count {
  font-size: 0.55rem;
  font-weight: 400;
  opacity: 0.5;
  line-height: 1;
  margin-top: 1.1rem;
}

.lyrics-text {
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

/* Syllable continues into the next one (hyphenation): show a dash at its right edge. */
.measure-lyrics .lyrics-word.is-joined::after {
  content: '-';
  position: absolute;
  right: 1px;
  bottom: 0.25rem;
  opacity: 0.6;
}

.measure-lyrics .lyrics-word.is-current {
  color: var(--accent, #f5c451);
  font-weight: 600;
}

.measure-lyrics .lyrics-word.is-current .lyrics-chord {
  opacity: 1;
}

.details-panel {
  overflow: hidden;
  transition: max-height 0.2s ease, opacity 0.2s ease, margin-top 0.2s ease;
}

.details-panel.collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: -6px;
  pointer-events: none;
}

.details-card {
  display: grid;
  gap: 14px;
}

.pattern-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.meta-item {
  display: grid;
  gap: 6px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(148, 163, 184, 0.04);
}

.meta-item-wide {
  grid-column: 1 / -1;
}

.meta-label {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meta-value {
  font-size: 1rem;
  font-weight: 700;
}

.chord-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chord-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 0.44rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.38);
  background: rgba(96, 165, 250, 0.14);
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pattern-chord-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-chords {
  color: var(--muted);
  font-size: 0.8rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.legend-item.down .swatch {
  background: rgba(57, 217, 138, 0.9);
}

.legend-item.up .swatch {
  background: rgba(96, 165, 250, 0.9);
}

.legend-item.rest .swatch {
  background: rgba(148, 163, 184, 0.32);
}

.current-signal-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.current-signal-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-signal-value {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.current-signal-value.down {
  color: var(--accent);
}

.current-signal-value.up {
  color: var(--accent-blue);
}

.current-signal-value.rest {
  color: var(--muted);
}

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

  .practice-panel {
    min-height: unset;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .transport-toolbar {
    grid-template-columns: 1fr;
  }

  .mode-toolbar {
    flex-wrap: wrap;
  }

  .compact-select {
    width: 100%;
  }

  .pattern-viewport {
    min-height: 260px;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .panel {
    padding: 14px;
  }

  .transport-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .control-button {
    width: 100%;
    min-width: 0;
  }

  .pattern-viewport {
    min-height: 240px;
  }
}

/* Sections Control Panel */
.sections-control-panel {
  display: grid;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.sections-label {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
}

.sections-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.section-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.section-toggle:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(57, 217, 138, 0.08);
}

.section-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

.section-toggle input[type="checkbox"]:checked ~ * {
  color: var(--accent);
}

.section-toggle.checked {
  background: rgba(57, 217, 138, 0.14);
  border-color: var(--accent);
  color: var(--accent);
}

.section-toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sections-control-panel:disabled .section-toggle {
  opacity: 0.5;
  cursor: not-allowed;
}
