/* One full-height stage: settings strip on top, canvas in the middle,
   on-screen keys at the bottom. Always dark: the brief is a black screen. */
:root {
  --bg: #08080a;
  --fg: #d6d6dc;
  --muted: #8b8b95;
  --ring: #4a4a52;
  --line: #26262c;
  --accent: #f2c14e;
  color-scheme: dark;
}
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  touch-action: manipulation;
}
.bar { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; font-size: 12px; color: var(--muted); }
.bar label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.bar input[type=range] { width: 96px; accent-color: var(--accent); }
.bar output { color: var(--fg); min-width: 2ch; font-variant-numeric: tabular-nums; }
.bar .hint { margin-left: auto; min-width: 0; }
.back {
  color: var(--fg);
  text-decoration: none;
  border: 1.5px solid var(--ring);
  border-radius: 8px;
  padding: 3px 10px;
  font-weight: 600;
}
.back:hover { border-color: var(--fg); }
.back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
kbd { font: inherit; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--fg); }
#stage { flex: 1; min-height: 0; position: relative; }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#kb { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.row { display: flex; gap: 5px; justify-content: center; max-width: 100%; }
.k {
  flex: 0 1 auto;
  width: min(36px, 8.4vw);
  height: 38px;
  padding: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font: 600 13px system-ui, sans-serif;
  text-transform: uppercase;
  border: 1.5px solid var(--line);
  cursor: pointer;
  touch-action: manipulation;
}
.k:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.k:active { background: var(--line); }
.actions { display: flex; gap: 8px; justify-content: center; margin-top: 3px; }
.btn {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--ring);
  border-radius: 8px;
  padding: 7px 16px;
  font: 600 13px system-ui, sans-serif;
  cursor: pointer;
}
.btn.play { border-color: var(--accent); color: var(--accent); }
