.piano-controls {
  width: 100vw;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
  padding: 8px 0;
  box-sizing: border-box;
}
.switch-label {
  color: #fff;
  font-size: 1.1em;
  margin: 0 12px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #555;
  transition: .4s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .4s;
  border-radius: 50%;
}
.switch input:checked + .slider {
  background-color: #2196F3;
}
.switch input:checked + .slider:before {
  transform: translateX(24px);
}
body {
  --key-width-white: 70px;
  --key-width-black: calc(var(--key-width-white) / 1.5);
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: #333;
  display: flex;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
}

.piano-container {
  width: 100%;
  max-height: 500px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.keyboard-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 90vh;
  overflow-x: scroll;
  -webkit-overflow-scrolling: touch;
}

.keyboard-wrapper::-webkit-scrollbar {
  height: 0px;
}

.keyboard {
  display: flex;
  height: 100%;
  position: relative;
  width: max-content;
}

.key-group {
  position: relative;
  display: flex;
}

.white-key {
  width: var(--key-width-white);
  height: 100%;
  background-color: white;
  border: 1px solid black;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.black-key {
  width: var(--key-width-black);
  height: 60%;
  background-color: black;
  position: absolute;
  top: 0;
  left: var(--key-width-black);
  z-index: 2;
}

.white-key.active {
  background-color: #ddd;
}
.black-key.active {
  background-color: #555;
}

@media (min-height: 400px) {
  .keyboard-wrapper {
    --key-width-white: 70px;
    --key-width-black: calc(var(--key-width-white) / 1.5);
    height: 70vh;
  }
}
