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);
}

.pal {
  box-sizing: border-box;
  width: min(264px, 88vw);
  padding: 8px;
  background: #17141a;
  border-radius: 16px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #fff7e6;
}

.pal__bar {
  box-sizing: border-box;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.08);
}

.pal__mag {
  display: inline-flex;
  color: rgba(255, 247, 230, 0.5);
}

.pal__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #fff7e6;
}

.pal__input::placeholder {
  color: rgba(255, 247, 230, 0.42);
}

.pal__input:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 2px;
  border-radius: 4px;
}

.pal__box {
  position: relative;
  box-sizing: border-box;
  height: 96px;
  margin: 8px 0 0;
}

.pal__cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  width: 100%;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.1);
  opacity: 0;
}

.pal__list {
  position: relative;
  z-index: 1;
}

.pal__opt {
  box-sizing: border-box;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-radius: 8px;
  cursor: pointer;
}

.pal__opt.is-at {
  background: rgba(255, 247, 230, 0.1);
}

.pal__opt.is-run {
  background: rgba(47, 109, 246, 0.42);
}

.pal__name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 247, 230, 0.88);
  white-space: nowrap;
}

.pal__keys {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
}

.pal__kbd {
  box-sizing: border-box;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 247, 230, 0.14);
  box-shadow: 0 1px 0 rgba(255, 247, 230, 0.28);
  font-family: inherit;
  font-size: 9px;
  font-weight: 800;
  color: rgba(255, 247, 230, 0.72);
}

.pal.is-demo .pal__cursor {
  opacity: 1;
  animation: cur-step 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes cur-step {
  0%, 4% {
    transform: translateY(0);
  }
  22%, 26% {
    transform: translateY(24px);
  }
  44%, 48% {
    transform: translateY(48px);
  }
  66%, 70% {
    transform: translateY(72px);
  }
  92%, 100% {
    transform: translateY(0);
  }
}
.pal.is-demo #o1 .pal__kbd {
  animation: press-1 2s ease-out infinite;
}

.pal.is-demo #o2 .pal__kbd {
  animation: press-2 2s ease-out infinite;
}

.pal.is-demo #o3 .pal__kbd {
  animation: press-3 2s ease-out infinite;
}

.pal.is-demo #o4 .pal__kbd {
  animation: press-4 2s ease-out infinite;
}

@keyframes press-1 {
  0%, 2% {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(255, 247, 230, 0.28);
    background: rgba(255, 247, 230, 0.14);
  }
  4%, 16% {
    transform: translateY(1px);
    box-shadow: 0 0 0 rgba(255, 247, 230, 0);
    background: rgba(255, 247, 230, 0.3);
  }
  18%, 100% {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(255, 247, 230, 0.28);
    background: rgba(255, 247, 230, 0.14);
  }
}
@keyframes press-2 {
  0%, 24% {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(255, 247, 230, 0.28);
    background: rgba(255, 247, 230, 0.14);
  }
  26%, 38% {
    transform: translateY(1px);
    box-shadow: 0 0 0 rgba(255, 247, 230, 0);
    background: rgba(255, 247, 230, 0.3);
  }
  40%, 100% {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(255, 247, 230, 0.28);
    background: rgba(255, 247, 230, 0.14);
  }
}
@keyframes press-3 {
  0%, 46% {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(255, 247, 230, 0.28);
    background: rgba(255, 247, 230, 0.14);
  }
  48%, 60% {
    transform: translateY(1px);
    box-shadow: 0 0 0 rgba(255, 247, 230, 0);
    background: rgba(255, 247, 230, 0.3);
  }
  62%, 100% {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(255, 247, 230, 0.28);
    background: rgba(255, 247, 230, 0.14);
  }
}
@keyframes press-4 {
  0%, 68% {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(255, 247, 230, 0.28);
    background: rgba(255, 247, 230, 0.14);
  }
  70%, 82% {
    transform: translateY(1px);
    box-shadow: 0 0 0 rgba(255, 247, 230, 0);
    background: rgba(255, 247, 230, 0.3);
  }
  84%, 100% {
    transform: translateY(0);
    box-shadow: 0 1px 0 rgba(255, 247, 230, 0.28);
    background: rgba(255, 247, 230, 0.14);
  }
}
@media (prefers-reduced-motion: reduce) {
  .pal.is-demo .pal__cursor,
  .pal.is-demo .pal__kbd {
    animation: none !important;
  }
  .pal.is-demo .pal__cursor {
    opacity: 1;
  }
}
