html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.pn {
  position: relative;
  width: min(92vw, 160vh - 12.8vw);
  aspect-ratio: 480/300;
  margin: 0 auto;
  border-radius: 16px;
  overflow: clip;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  background: #fff7e6;
}

.pn__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.pn__keys {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pn__key {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.pn__key:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: -2px;
  box-shadow: inset 0 0 0 4px #fff7e6;
}

.pn__sound {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: #17141a;
  color: #fff7e6;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}

.pn__sound[aria-pressed=true] {
  background: #fff7e6;
  color: #17141a;
  outline: 2px solid #17141a;
  outline-offset: -2px;
}

.pn__sound:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

.pn__live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 340px) {
  .pn__sound {
    font-size: 11px;
    padding: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pn__sound {
    box-shadow: none !important;
  }
}
