:root {
  --bg: #121212;
  --surface: #1e1e1e;
  --text: #f1f1f1;
  --muted: #9e9e9e;
  --accent: #38bdf8;
  --chord: #facc15;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
}
.topbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--surface); border-bottom: 1px solid #333;
}
.brand { font-weight: bold; font-size: 1.1rem; }
button, select, input, textarea {
  background: #2a2a2a; color: var(--text); border: 1px solid #444;
  border-radius: 6px; padding: 8px 12px; font-size: 0.95rem;
}
button { cursor: pointer; }
button:hover { background: #3a3a3a; }
button.primary { background: var(--accent); color: #000; border: none; font-weight: bold; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
input, textarea { width: 100%; margin-bottom: 10px; font-family: inherit; }
textarea { font-family: monospace; line-height: 1.4; }
.card-list { display: grid; gap: 8px; }
.card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); padding: 12px 16px; border-radius: 8px; border: 1px solid #2c2c2c;
}
.card-title { font-weight: 600; cursor: pointer; flex: 1; }
.muted { color: var(--muted); font-size: 0.9rem; }
.viewer-controls {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #333;
}
.viewer-controls h1 { margin: 0; font-size: 1.6rem; }
.tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.badge { background: #2a2a2a; padding: 6px 10px; border-radius: 6px; font-weight: bold; cursor: pointer; }
.key-badge { color: var(--chord); min-width: 42px; text-align: center; }
#pulse-dot { color: #555; margin-left: 4px; }
#pulse-dot.flash { color: #22c55e; }
.setlist-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: #1a2433; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px;
}
.sync-toggle { display: flex; align-items: center; gap: 4px; font-size: 0.9rem; cursor: pointer; }
.sync-toggle input { width: auto; margin: 0; }
.chord-sheet {
  font-size: 1.25rem; line-height: 1.6; white-space: pre-wrap; padding-bottom: 60px;
}
.line { display: flex; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; min-height: 1.5em; }
.pair { display: inline-flex; flex-direction: column; margin-right: 2px; }
.chord { color: var(--chord); font-weight: 700; font-size: 0.95em; min-height: 1.2em; padding-right: 6px; }
.section-header { color: var(--accent); font-weight: bold; margin-top: 18px; margin-bottom: 6px; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }
