/* structure only — every tunable value lives in theme.css */
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--idle);
  font: var(--font);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-section);
  padding: var(--sp-block) var(--sp-section);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-small);
}
.cluster { display: flex; align-items: center; gap: var(--sp-row); }
.quiet { color: var(--faint); }

#bar button {
  background: none;
  border: none;
  color: var(--faint);
  font: inherit;
  padding: 4px 10px;
  cursor: pointer;
}
#bar button:hover { color: var(--idle); }
#bar button.on { color: var(--accent); }
#play.on { color: var(--voice2); }
.bpm { color: var(--faint); display: flex; align-items: center; gap: 6px; }
.bpm input {
  width: 48px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--idle);
  font: inherit;
  padding: 2px 4px;
  text-align: center;
}
#midi .tag { color: var(--faint); letter-spacing: var(--tracking-wide); }

#stage { flex: 1; display: flex; min-height: 0; }
#grid { flex: 1; height: 100%; display: block; touch-action: none; min-width: 0; }

#sidebar {
  width: 232px;
  flex: none;
  border-left: 1px solid var(--line);
  padding: var(--sp-section);
  display: flex;
  flex-direction: column;
  gap: var(--sp-block);
  font-size: var(--text-small);
}
#sidebar[hidden] { display: none; }
.sb-title { color: var(--idle); letter-spacing: var(--tracking-wide); font-weight: var(--weight-strong); }
.sb-meta { color: var(--faint); }
.sb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--dim); }
.sb-row select {
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--idle);
  font: inherit;
  padding: 3px 2px;
  max-width: 140px;
}
.sb-delete {
  background: color-mix(in srgb, var(--voice0) 10%, transparent);
  border: none;
  color: var(--dim);
  font: inherit;
  padding: 5px 0;
  cursor: pointer;
}
.sb-delete:hover { color: var(--voice0); }

footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-section);
  padding: var(--sp-block) var(--sp-section);
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: var(--text-small);
}
footer .brand { color: var(--idle); font-weight: var(--weight-strong); letter-spacing: var(--tracking-wide); }
footer .brand .mark { color: var(--accent); }
footer .brand .sub { color: var(--faint); font-weight: 200; letter-spacing: var(--tracking); }
footer .home { color: var(--faint); text-decoration: none; }
footer .home:hover { color: var(--accent); }
