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

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

.hs__canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.hs__canvas:focus-visible {
  outline: 2px solid rgba(58, 48, 76, 0.9);
  outline-offset: -6px;
}

.hs__status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: 46%;
  margin: 0;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.92);
  color: #17141a;
  font: inherit;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  pointer-events: none;
}

.hs__tools {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.hs__btn {
  margin: 0;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.92);
  color: #17141a;
  font: inherit;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 220ms ease-out;
}

.hs__btn:hover {
  background: #fff7e6;
}

.hs__btn[aria-pressed=true] {
  background: #4cd4a6;
}

.hs__btn:focus-visible {
  outline: 2px solid rgba(58, 48, 76, 0.9);
  outline-offset: 2px;
}

.hs__canvas {
  touch-action: pan-y;
}

@media (max-width: 340px) {
  .hs__btn {
    font-size: 10px;
    padding: 4px 8px;
  }
  .hs__status {
    font-size: 10px;
    padding: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hs__btn {
    transition: none;
  }
}
