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

.rb {
  --circ: #6ec8ff;
  --boxf: #b9a0ff;
  --ring: #fff7e6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 424px;
}

.rb__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: #fff7e6;
}

.rb__ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #b9a0ff;
}

.rb__field {
  position: relative;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  background: #211d26;
  box-shadow: inset 0 0 0 1px rgba(255, 247, 230, 0.14);
  cursor: grab;
  touch-action: none;
}

.rb__field:focus-visible {
  outline: 2px solid #b9a0ff;
  outline-offset: 2px;
}

.rb__field:active {
  cursor: grabbing;
}

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

.rb__badge {
  position: absolute;
  right: 8px;
  top: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 247, 230, 0.88);
  color: #17141a;
  font-weight: 700;
  font-size: 11px;
}

.rb__badgeNum {
  font-size: 13px;
  color: #0a4fe8;
}

.rb__badgeUnit {
  font-weight: 700;
}

.rb__bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rb__dial {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  font-weight: 700;
  font-size: 12px;
  color: #fff7e6;
}

.rb__dial input[type=range] {
  flex: 1 1 auto;
  accent-color: #b9a0ff;
}

.rb__reset {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  font-size: 12px;
  background: #b9a0ff;
  color: #17141a;
  cursor: pointer;
}

.rb__reset:active {
  transform: translateY(1px);
}

@media (max-width: 340px) {
  .rb {
    gap: 4px;
  }
  .rb__field {
    height: 114px;
  }
  .rb__badge {
    font-size: 10px;
    padding: 0 4px;
  }
  .rb__badgeNum {
    font-size: 11px;
  }
  .rb__bar {
    gap: 8px;
  }
  .rb__dial {
    font-size: 11px;
  }
  .rb__reset {
    font-size: 11px;
    padding: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rb.is-still .rb__field {
    cursor: default !important;
  }
  .rb.is-still .rb__badge {
    opacity: 0.92 !important;
  }
}
