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

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

.sm {
  --sm-floor: #ffe3ce;
  --sm-trail: #ffcdb0;
  --sm-food: #ffc2ad;
  --sm-salt: #bfe3ff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 424px;
}

.sm__hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-weight: 700;
  font-size: clamp(10px, 2.8vw, 12px);
  line-height: 1.35;
  color: #4a2e18;
}

.sm__field {
  position: relative;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  background: #ffe3ce;
  box-shadow: inset 0 0 0 1px rgba(74, 46, 24, 0.18);
  cursor: crosshair;
}

.sm__field:focus-visible {
  outline: 2px solid #4a2e18;
  outline-offset: 2px;
}

.sm__cv {
  display: block;
  width: 100%;
  height: 100%;
}

.sm__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sm__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: #ffcdb0;
  color: #4a2e18;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 220ms ease-out;
}

.sm__toggle:hover {
  background: #ffc2ad;
}

.sm__toggle:focus-visible {
  outline: 2px solid #4a2e18;
  outline-offset: 2px;
}

.sm__toggle[aria-pressed=true] {
  background: #bfe3ff;
}

.sm__meta--dim {
  font-size: 10px;
  font-weight: 500;
  color: rgba(74, 46, 24, 0.72);
}

@media (max-width: 340px) {
  .sm {
    gap: 4px;
  }
  .sm__field {
    height: 100px;
  }
  .sm__meta--dim {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sm.is-still .sm__field {
    cursor: default !important;
  }
}
