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

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

.ls {
  position: relative;
  width: min(92vw, 160vh - 12.8vw);
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ls__field {
  touch-action: none;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 220px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 247, 230, 0.22);
}

.ls__item {
  appearance: none;
  border: 0;
  aspect-ratio: 1/1;
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.1);
  color: #fff7e6;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 220ms ease-out, box-shadow 220ms ease-out;
}

.ls__item.is-selected {
  background: #2f6df6;
  box-shadow: 0 0 0 2px #5b8cf8 inset;
}

.ls__item:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

.ls__lasso {
  position: absolute;
  pointer-events: none;
  border: 1px solid #5b8cf8;
  background: rgba(47, 109, 246, 0.16);
  border-radius: 4px;
  opacity: 0;
}

.ls__caption {
  margin: 0;
  color: #fff7e6;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 340px) {
  .ls__field {
    max-width: 180px;
  }
  .ls__item {
    font-size: 12px;
  }
  .ls__caption {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ls__item {
    transition: none;
  }
}
