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

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

.fl {
  --bg: #ffd23f;
  --ink: #17141a;
  --cream: #fff7e6;
  --cloth: #4cd4a6;
  --cloth2: #ff9ebb;
  --pole: #17141a;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 424px;
}

.fl__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: #17141a;
}

.fl__ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #17141a;
}

.fl__field {
  position: relative;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(23, 20, 26, 0.18);
  cursor: crosshair;
  touch-action: none;
}

.fl__field:focus-visible {
  outline: 2px solid #17141a;
  outline-offset: 2px;
}

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

.fl__badge {
  position: absolute;
  right: 8px;
  top: 8px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.78);
  color: #fff7e6;
  font-weight: 700;
  font-size: 11px;
}

.fl__badgeNum {
  font-size: 13px;
  color: #ffd23f;
}

.fl__badgeUnit {
  font-weight: 700;
}

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

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

.fl__dial input[type=range] {
  flex: 1 1 auto;
  accent-color: #17141a;
}

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

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

@media (max-width: 340px) {
  .fl {
    gap: 4px;
  }
  .fl__field {
    height: 114px;
  }
  .fl__badge {
    font-size: 10px;
    padding: 0 4px;
  }
  .fl__badgeNum {
    font-size: 11px;
  }
  .fl__bar {
    gap: 8px;
  }
  .fl__dial {
    font-size: 11px;
  }
  .fl__reset {
    font-size: 11px;
    padding: 4px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fl.is-still .fl__field {
    cursor: default !important;
  }
  .fl.is-still .fl__badge {
    opacity: 0.92 !important;
  }
}
