* {
  box-sizing: border-box;
}

:root {
  --page-bg: #12141a;
  --accent: #c8ff00;
  --text: #e8eaf0;
  --muted: #9aa0b4;
  --panel: #232633;
  --border: #33384a;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text);
  background-color: var(--page-bg);
  background-image: radial-gradient(rgba(50, 52, 62, 0.45) 1px, var(--page-bg) 1px);
  background-size: 20px 20px;
}

.app {
  width: min(940px, 100%);
}

.bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 14px;
}

.bar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar__logo {
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(200, 255, 0, 0.25));
}

.bar__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.bar__sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.bar__scores {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.score {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.score--hi {
  font-size: 14px;
  color: #7b8299;
}

.stage {
  background: #f7f7f7;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5);
  transition: background 0.4s ease;
}

.stage.is-night {
  background: #08090c;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  image-rendering: pixelated;
  cursor: pointer;
  touch-action: manipulation;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

kbd {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 7px;
  font: inherit;
  font-size: 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
}

.sound {
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: 0.15s ease;
}

.sound:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .bar__title {
    font-size: 16px;
  }
  .score {
    font-size: 18px;
  }
  .keys__touch {
    display: inline;
  }
}

@media (min-width: 641px) {
  .keys__touch {
    display: none;
  }
}
