 :root {
  --bg:#0b0b10;
  --card:#12131a;
  --fg:#e9e9ef;
  --muted:#b9bcc8;
  --accent:#ff6a00;
  --good:#20c868;
  --bad:#ff4a4a;
}

body {
  margin:0;
  background:#050509;
  color:var(--fg);
  font-family: system-ui, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16pt;      /* ~21.3px */
  line-height: 1.45;
}

.wrap {
  max-width:980px;
  margin:24px auto;
  padding:24px;
  background:#12131a;
  border-radius:16px;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
}

h1 {
  margin:0 0 16px;
  letter-spacing:.5px;
}

.row {
  display:flex;
  align-items:center;
  gap:12px;
  margin:8px 0 16px;
  flex-wrap:wrap;
  font-size: 1em;  
}

label {
  color:var(--muted);
  font-size: 1em;  
}

input[type=text] {
  background:#1b1d27;
  color:var(--fg);
  border:1px solid #2a2e3a;
  border-radius:10px;
  padding:10px 12px;
  min-width:240px;
  font-size: 1em;  
}

select {
  background:#1b1d27;
  color:var(--fg);
  border:1px solid #2a2e3a;
  border-radius:10px;
  padding:8px 10px;
  font-size: 1em;  
}

button {
  background:#222639;
  color:var(--fg);
  border:1px solid #343a4d;
  padding:10px 14px;
  border-radius:10px;
  cursor:pointer;
  font-size: 1em;  
}

button:hover {
  border-color:#4b536d;
}

button[disabled] {
  opacity:.5;
  cursor:not-allowed;
  font-size: 1em;  
}

.pill {
  background:#1b1d27;
  padding:6px 10px;
  border-radius:999px;
  border:2px solid #2a2e3a;
  font-size: 14px;  
  align-items: right;
  display: inline-block;
  white-space: nowrap;
}

.slider-wrap {
  display:flex;
  align-items:center;
  gap:10px;
  max-width:420px;
  width:100%;
  font-size: 1em;  
}

input[type=range] {
  width:280px;
  accent-color:var(--accent);
  font-size: 1em;  
}

.ticks {
  display:flex;
  gap:46px;
  font-size: 1em;  
  color:var(--muted);
  margin:-6px 0 10px 122px;
  user-select:none;
}

.beat {
  display:inline-block;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size: 1em;  
}

.dot {
  width:10px;
  height:10px;
  border-radius:50%;
  background:#3a3f55;
  box-shadow:0 0 0 0 transparent;
  transition:all .1s ease;
}

.dot.on {
  background:var(--accent);
  box-shadow:0 0 0 6px rgba(255,106,0,.2);
}

/* Keyboard layout */
.kbd {
  display:grid;
  grid-template-columns: repeat(8, 1fr);
  gap:6px;
  padding:12px;
  background:#10121a;
  border-radius:14px;
  border:1px solid #25293a;
}

/* Piano key base */
.key {
  display:inline-block;
  width:100px;
  height:400px;
  margin:2px;
  /* visual styling */
  padding:16px 4px;
  text-align:center;
  border-radius:8px;
  border:3px solid #343a4d;
  background:#f2f2f3;
  color:#e90b0b;
  cursor:pointer;
  user-select:none;
  transition:background-color 0.3s linear, box-shadow 0.15s ease;
  font-size: 1em;  
}

/* Anticipatory fade-in */
.key-anticipate {
  background-color:rgba(120, 180, 255, 0.4);
}

/* “Hit now” state */
.key-lit {
  background-color:rgba(60, 120, 255, 0.9);
  box-shadow:0 0 12px rgba(60, 120, 255, 0.7);
}

/* Hit feedback */
.key-hit-good {
  background-color:rgba(0, 200, 0, 0.85);
}

.key-hit-bad {
  background-color:rgba(200, 0, 0, 0.85);
}

.lesson-bar {
  border-collapse: collapse;
}

.lesson-bar td {
  padding-right: 0.75rem;
  white-space: nowrap; /* keep everything on one row if possible */
}

/* Ensure the dropdown only grows to fit its content, not full-width */
.lesson-select {
  width: auto;
  max-width: 100%;
}
