html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #f1f2f6;
  -webkit-tap-highlight-color: transparent;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  touch-action: manipulation;
}

.bar {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  z-index: 5;
  pointer-events: none;
}
.pill {
  pointer-events: auto;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  background: rgba(12, 13, 16, 0.55);
  backdrop-filter: blur(8px);
  color: #f1f2f6;
  font: 500 0.85rem "Inter", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.pill:hover {
  border-color: #ffd166;
  background: rgba(12, 13, 16, 0.8);
}
.pill:focus-visible,
.keys button:focus-visible {
  outline: 2px solid #ffd166;
  outline-offset: 3px;
}

.intro {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.6s;
}
.intro h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 7vw, 3.4rem);
  letter-spacing: -0.04em;
}
.intro p {
  margin: 0;
  color: #c4c8d6;
}
.intro.gone {
  opacity: 0;
}

.keys {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  display: grid;
  gap: 6px;
  justify-items: center;
  z-index: 4;
  pointer-events: none;
}
.keys .row {
  display: flex;
  gap: 6px;
}
.keys button {
  pointer-events: auto;
  width: clamp(26px, 6.6vw, 44px);
  height: clamp(30px, 7.4vw, 46px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #c4c8d6;
  font: 600 0.85rem "Inter", system-ui, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.12s, color 0.12s;
}
.keys button.on {
  background: var(--c);
  border-color: var(--c);
  color: #fff;
  transform: translateY(-3px) scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
  .keys button,
  .intro {
    transition: none;
  }
}

@media (max-width: 640px) {
  .pill {
    padding: 12px 16px;
  }
  .keys button {
    height: 46px;
  }
}
